Content Fragment Selector - Related Properties content-fragment-selector-related-properties
The Micro-Frontend Content Fragment Selector allows you to browse or search Content Fragments in the repository, and use them in your application.
You can use the following properties to customize how the Content Fragment Selector is rendered and how it can be used:
Content Fragment Selector Properties content-fragment-selector-properties
refContentFragmentSelector instance, allowing access to provided functionality such as reload.imsTokenrepoIddefaultRepoIdrepoId is not provided. If repoId is set, the repository selector is hidden, and this value is ignored.orgIdlocaleen-USenvEnv type for allowed environment names.filters{ folder: "/content/dam" }/content/dam will be displayed.isOpenfalsenoWrapfalsetrue, the Fragment Selector is embedded directly in the parent container. Useful for integrating the selector into custom layouts or workflows.onSelectionChangeContentFragmentSelection, domainName?: string, tenantInfo?: string, repoId?: string, deliveryRepos?: DeliveryRepository[] }) => voidonDismissonSubmitContentFragmentSelection, domainName?: string, tenantInfo?: string, repoId?: string, deliveryRepos?: DeliveryRepository[] }) => voidthemeselectionTypesingledialogSizefullscreenrunningInUnifiedShellreadonlyFiltersselectedFragments[]hipaaEnabledfalseinventoryViewtableinventoryViewToggleEnabledfalseImsAuthProps Properties imsauthprops-properties
The ImsAuthProps properties define the authentication information and flow that the Content Fragment Selector uses to obtain an imsToken. By setting these properties, you can control how the authentication flow should behave and register listeners for various authentication events.
imsClientIdimsScoperedirectUrlredirectUrl is not supplied, ImsAuthService will use the redirectUrl used to register the imsClientIdmodalModetrue, the authentication flow is displayed in a pop-up. If set to false, the authentication flow is displayed in a full page reload.Note: for better UX, you can dynamically control this value if the user has browser pop-up disabled.
onImsServiceInitializedservice, which is an object representing the Adobe IMS service. See ImsAuthService for more details.onAccessTokenReceivedimsToken is received from the Adobe IMS authentication service. This function takes one parameter, imsToken, which is a string representing the access token.onAccessTokenExpiredonErrorReceivedImsAuthService Properties imsauthservice-properties
The ImsAuthService class handles the authentication flow for the Content Fragment Selector. It is responsible for obtaining an imsToken from the Adobe IMS authentication service. The imsToken is used to authenticate the user and authorize access to the Adobe Experience Manager (AEM) CS repository. ImsAuthService uses the ImsAuthProps properties to control the authentication flow and register listeners for various authentication events. You can use the convenient registerContentFragmentSelectorAuthService function to register the ImsAuthService instance with the Content Fragment Selector. The following functions are available on the ImsAuthService class. However, if you are using the registerContentFragmentSelectorAuthService function, you do not need to call these functions directly.
isSignedInUsergetImsTokenimsToken for the currently signed-in user, which can be used to authenticate requests to other services such as generating asset rendition.signInImsAuthProps to show authentication in either a pop-up or a full page reload.signOutrefreshToken