@anzusystems/common-admin 2.0.0-rc.12 → 2.0.0-rc.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnzuSystemsCommonAdmin.d.ts +10 -4
- package/dist/AnzuSystemsCommonAdmin.js.map +1 -1
- package/dist/common-admin.js +255 -254
- package/dist/domains/anzuUser/components/AUserCreateInSystemButton.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/domains/anzuUser/components/AUserCreateInSystemButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/anzuUser/components/AUserManageButton.vue_vue_type_script_setup_true_lang.js +1 -4
- package/dist/domains/anzuUser/components/AUserManageButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/anzuUser/components/AUserSystemOverview.vue_vue_type_script_setup_true_lang.js +93 -86
- package/dist/domains/anzuUser/components/AUserSystemOverview.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/anzuUser/components/AUserSystemPanel.vue_vue_type_script_setup_true_lang.js +30 -25
- package/dist/domains/anzuUser/components/AUserSystemPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/api/damAssetApi.d.ts +5 -0
- package/dist/domains/dam/api/damAssetApi.js +39 -34
- package/dist/domains/dam/api/damAssetApi.js.map +1 -1
- package/dist/domains/dam/assetDetail/components/AssetMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/api/damPodcastApi.d.ts +2 -2
- package/dist/domains/dam/assetSelect/api/damPodcastApi.js +4 -4
- package/dist/domains/dam/assetSelect/api/damPodcastApi.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AAssetListInner.vue_vue_type_script_setup_true_lang.js +152 -153
- package/dist/domains/dam/assetSelect/components/AAssetListInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AAssetSelect.vue.d.ts +3 -0
- package/dist/domains/dam/assetSelect/components/AAssetSelect.vue_vue_type_script_setup_true_lang.js +80 -72
- package/dist/domains/dam/assetSelect/components/AAssetSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.vue.d.ts +3 -0
- package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.vue_vue_type_script_setup_true_lang.js +88 -80
- package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AssetSelectFilter.vue.d.ts +3 -0
- package/dist/domains/dam/assetSelect/components/AssetSelectFilter.vue_vue_type_script_setup_true_lang.js +42 -60
- package/dist/domains/dam/assetSelect/components/AssetSelectFilter.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AssetSelectFilterForm.vue_vue_type_script_setup_true_lang.js +7 -9
- package/dist/domains/dam/assetSelect/components/AssetSelectFilterForm.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AssetSelectLicencePresetBar.js +6 -0
- package/dist/domains/dam/assetSelect/components/AssetSelectLicencePresetBar.js.map +1 -0
- package/dist/domains/dam/assetSelect/components/AssetSelectLicencePresetBar.vue.d.ts +3 -0
- package/dist/domains/dam/assetSelect/components/AssetSelectLicencePresetBar.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/domains/dam/assetSelect/components/AssetSelectLicencePresetBar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/domains/dam/assetSelect/components/AssetSelectListBar.vue_vue_type_script_setup_true_lang.js +127 -106
- package/dist/domains/dam/assetSelect/components/AssetSelectListBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AssetSelectListTable.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/domains/dam/assetSelect/components/AssetSelectListTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/FilterPodcastRemoteAutocomplete.vue.d.ts +3 -1
- package/dist/domains/dam/assetSelect/components/FilterPodcastRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/domains/dam/assetSelect/components/FilterPodcastRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/composables/assetSelectItemActions.js +32 -30
- package/dist/domains/dam/assetSelect/composables/assetSelectItemActions.js.map +1 -1
- package/dist/domains/dam/assetSelect/composables/assetSelectListActions.js +96 -96
- package/dist/domains/dam/assetSelect/composables/assetSelectListActions.js.map +1 -1
- package/dist/domains/dam/assetSelect/composables/assetSelectPresetControl.d.ts +22 -0
- package/dist/domains/dam/assetSelect/composables/assetSelectPresetControl.js +44 -0
- package/dist/domains/dam/assetSelect/composables/assetSelectPresetControl.js.map +1 -0
- package/dist/domains/dam/assetSelect/composables/assetSelectPresets.d.ts +28 -0
- package/dist/domains/dam/assetSelect/composables/assetSelectPresets.js +32 -0
- package/dist/domains/dam/assetSelect/composables/assetSelectPresets.js.map +1 -0
- package/dist/domains/dam/assetSelect/composables/podcastFilterAndActions.d.ts +19 -6
- package/dist/domains/dam/assetSelect/composables/podcastFilterAndActions.js +9 -5
- package/dist/domains/dam/assetSelect/composables/podcastFilterAndActions.js.map +1 -1
- package/dist/domains/dam/assetSelect/store/assetSelectStore.d.ts +5 -1
- package/dist/domains/dam/assetSelect/store/assetSelectStore.js +97 -80
- package/dist/domains/dam/assetSelect/store/assetSelectStore.js.map +1 -1
- package/dist/domains/dam/composables/commonAdminCoreDamOptions.js +3 -3
- package/dist/domains/dam/composables/commonAdminCoreDamOptions.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue.d.ts +3 -0
- package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/AImageWidget.vue.d.ts +3 -0
- package/dist/domains/dam/imageWidget/components/AImageWidget.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/domains/dam/imageWidget/components/AImageWidget.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue.d.ts +3 -0
- package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue.d.ts +3 -0
- package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue.d.ts +3 -0
- package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue.d.ts +3 -0
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/types/AssetLicence.d.ts +6 -6
- package/dist/domains/dam/types/AssetListView.d.ts +10 -0
- package/dist/domains/dam/types/DamCurrentUser.d.ts +3 -0
- package/dist/domains/dam/user/api/assetListViewApi.d.ts +7 -0
- package/dist/domains/dam/user/api/assetListViewApi.js +21 -0
- package/dist/domains/dam/user/api/assetListViewApi.js.map +1 -0
- package/dist/domains/dam/user/components/DamAssetLicenceGroupRemoteAutocomplete.vue.d.ts +3 -0
- package/dist/domains/dam/user/components/DamAssetLicenceGroupRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +18 -14
- package/dist/domains/dam/user/components/DamAssetLicenceGroupRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/user/components/DamAssetLicenceRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +31 -31
- package/dist/domains/dam/user/components/DamAssetLicenceRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/user/components/DamAssetListViewRemoteAutocomplete.js +6 -0
- package/dist/domains/dam/user/components/DamAssetListViewRemoteAutocomplete.js.map +1 -0
- package/dist/domains/dam/user/components/DamAssetListViewRemoteAutocomplete.vue.d.ts +36 -0
- package/dist/domains/dam/user/components/DamAssetListViewRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/domains/dam/user/components/DamAssetListViewRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/domains/dam/user/composables/assetListViewActions.d.ts +10 -0
- package/dist/domains/dam/user/composables/assetListViewActions.js +15 -0
- package/dist/domains/dam/user/composables/assetListViewActions.js.map +1 -0
- package/dist/domains/dam/user/composables/cachedAssetLicences.d.ts +3 -3
- package/dist/domains/dam/user/filter/AssetLicenceGroupFilter.d.ts +14 -4
- package/dist/domains/dam/user/filter/AssetLicenceGroupFilter.js +3 -0
- package/dist/domains/dam/user/filter/AssetLicenceGroupFilter.js.map +1 -1
- package/dist/domains/dam/user/filter/AssetListViewFilter.d.ts +24 -0
- package/dist/domains/dam/user/filter/AssetListViewFilter.js +25 -0
- package/dist/domains/dam/user/filter/AssetListViewFilter.js.map +1 -0
- package/dist/domains/log/components/ALogFilter.vue_vue_type_script_setup_true_lang.js +28 -32
- package/dist/domains/log/components/ALogFilter.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/permission/components/APermissionEditor.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/domains/permission/components/APermissionEditor.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/lib.d.ts +4 -2
- package/dist/locales/cs/common/anzuUser.js +4 -4
- package/dist/locales/cs/common/assetSelect.js +26 -0
- package/dist/locales/cs/common/assetSelect.js.map +1 -1
- package/dist/locales/cs.d.ts +5 -0
- package/dist/locales/en/common/anzuUser.js +4 -4
- package/dist/locales/en/common/assetSelect.js +26 -0
- package/dist/locales/en/common/assetSelect.js.map +1 -1
- package/dist/locales/en.d.ts +5 -0
- package/dist/locales/sk/common/anzuUser.js +4 -4
- package/dist/locales/sk/common/assetSelect.js +26 -0
- package/dist/locales/sk/common/assetSelect.js.map +1 -1
- package/dist/locales/sk.d.ts +5 -0
- package/dist/plugins/i18n.d.ts +5 -0
- package/package.json +15 -15
- package/dist/domains/ui/buttons/action/components/AActionSaveAndCloseButton.js +0 -6
- package/dist/domains/ui/buttons/action/components/AActionSaveAndCloseButton.js.map +0 -1
- package/dist/domains/ui/buttons/action/components/AActionSaveAndCloseButton.vue.d.ts +0 -25
- package/dist/domains/ui/buttons/action/components/AActionSaveAndCloseButton.vue_vue_type_script_setup_true_lang.js +0 -67
- package/dist/domains/ui/buttons/action/components/AActionSaveAndCloseButton.vue_vue_type_script_setup_true_lang.js.map +0 -1
|
@@ -76,7 +76,10 @@ export interface CommonAdminCoreDamConfig {
|
|
|
76
76
|
* Used by this configuration's user cache and by user inputs and filters under it that have no client of their own.
|
|
77
77
|
*/
|
|
78
78
|
endPointUser?: string;
|
|
79
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Where the podcasts of an ext system are listed (`/ext-system/:extSystemId` after it, filtered by the browsed
|
|
81
|
+
* licences); `/adm/v1/podcast` by default.
|
|
82
|
+
*/
|
|
80
83
|
endPointPodcast?: string;
|
|
81
84
|
/** Where the image and media widget reads a picked asset as a medium of the CMS; `/adm/v1/cms/asset` by default. */
|
|
82
85
|
endPointCmsAsset?: string;
|
|
@@ -119,12 +122,15 @@ export interface CommonAdminCoreDamConfig {
|
|
|
119
122
|
showFileInfoEnabled?: boolean;
|
|
120
123
|
/**
|
|
121
124
|
* The asset detail of this configuration's widgets and asset selects shows when DAM deletes the asset (the time
|
|
122
|
-
* left), for an asset whose licence deletes automatically.
|
|
125
|
+
* left), for an asset whose licence deletes automatically. On unless `false`.
|
|
123
126
|
*/
|
|
124
127
|
showAutoDeleteEnabled?: boolean;
|
|
125
|
-
/** The asset detail of this configuration's widgets and asset selects shows the asset's licence.
|
|
128
|
+
/** The asset detail of this configuration's widgets and asset selects shows the asset's licence. On unless `false`. */
|
|
126
129
|
showLicenceEnabled?: boolean;
|
|
127
|
-
/**
|
|
130
|
+
/**
|
|
131
|
+
* The tiles and rows of this configuration's asset selects show the badge of the asset's licence while the select
|
|
132
|
+
* searches in more than one licence. On unless `false`.
|
|
133
|
+
*/
|
|
128
134
|
showLicenceBadgeEnabled?: boolean;
|
|
129
135
|
sourceLabel?: string;
|
|
130
136
|
editAssetLabel?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnzuSystemsCommonAdmin.js","names":["Acl","AChipNoLink","Acl_default","AChipNoLink_default","AnzuSystemsCommonAdmin_default","options","setCommonAdminI18n","app","AvailableLanguagesSymbol","DefaultLanguageSymbol","initCommonAdminImageOptions","initCommonAdminCoreDamOptions","initCommonAdminCollabOptions"],"sources":["../src/AnzuSystemsCommonAdmin.ts"],"sourcesContent":["import type { io } from 'socket.io-client'\nimport type { CollabReconnectVerdictType } from '@/domains/collab/types/Collab'\nimport type { App } from 'vue'\nimport Acl from '@/domains/auth/components/Acl.vue'\nimport AChipNoLink from '@/domains/ui/components/AChipNoLink.vue'\nimport type { LanguageCode } from '@/domains/system/composables/languageSettings'\nimport { type CommonAdminI18n, setCommonAdminI18n } from '@/plugins/i18n'\nimport { AvailableLanguagesSymbol, DefaultLanguageSymbol } from '@/shared/injectionKeys'\nimport type { AxiosInstance } from 'axios'\nimport {\n initCommonAdminCollabOptions,\n initCommonAdminCoreDamOptions,\n initCommonAdminImageOptions,\n} from '@/plugins/pluginOptions'\nimport type { IntegerId } from '@/shared/types/common'\nimport type { AclValue } from '@/domains/auth/types/Permission'\nimport type { ImageAware, ImageCreateUpdateAware } from '@/domains/dam/types/ImageAware'\nimport type {\n UploadMetadataToImageMapFn,\n AssetSelectMetadataToImageMapFn,\n} from '@/domains/dam/imageWidget/utils/metadataToImageMap'\n\nexport type PluginOptions = {\n /**\n * The admin's vue-i18n instance, in composition mode (`legacy: false`).\n * The library translates through it (components, validators, alerts), so its messages must include\n * the library's `common`, `error` and `$vuetify` from `messagesSk`/`messagesEn`/`messagesCs`.\n */\n i18n: CommonAdminI18n\n languages: { available: LanguageCode[]; default: LanguageCode }\n coreDam?: CommonAdminCoreDamOptions\n image?: CommonAdminImageOptions\n collab?: CommonAdminCollabOptions\n}\n\nexport interface CommonAdminImageConfig {\n imageClient: () => AxiosInstance\n previewDomain: string\n previewDomainOriginal: string\n width: number\n height: number\n imageApi?: {\n fetchImage: (client: () => AxiosInstance, id: IntegerId) => Promise<ImageAware>\n createImage: (client: () => AxiosInstance, data: ImageCreateUpdateAware) => Promise<ImageAware>\n updateImage: (client: () => AxiosInstance, id: IntegerId, data: ImageCreateUpdateAware) => Promise<ImageAware>\n deleteImage: (client: () => AxiosInstance, id: IntegerId) => Promise<void>\n fetchImageListByIds: (client: () => AxiosInstance, ids: IntegerId[]) => Promise<ImageAware[]>\n bulkUpdateImages: (client: () => AxiosInstance, items: ImageCreateUpdateAware[]) => Promise<ImageAware[]>\n }\n}\n\nexport type CommonAdminImageOptions =\n | undefined\n | {\n configs: { [key: string]: CommonAdminImageConfig }\n }\n\nexport interface ImageFieldValidationConfig {\n required?: boolean\n min?: number\n max?: number\n}\n\nexport interface CommonAdminCoreDamConfig {\n damClient: () => AxiosInstance\n endPointAsset?: string\n endPointImage?: string\n endPointRoi?: string\n /**\n * Endpoint for listing, looking up and creating DAM authors; `/adm/v1/author` by default.\n * Used by components under this configuration and by its author name cache.\n */\n endPointAuthor?: string\n /** The same for the keywords of DAM; `/adm/v1/keyword` by default. */\n endPointKeyword?: string\n /**\n * Endpoint for DAM settings and, with `/ext-system/:extSystem` appended,\n * an ext system's configuration; `/adm/v1/configuration` by default.\n */\n endPointConfiguration?: string\n /** Where the public configuration of DAM is read (`loadDamPubConfig`); `/pub/v1/configuration` by default. */\n endPointPubConfiguration?: string\n /** Where a licence is read by its id, for its ext system; `/adm/v1/asset-licence` by default. */\n endPointAssetLicence?: string\n /** Where the custom forms of an ext system and of a distribution service are read; `/adm/v1/asset-custom-form`. */\n endPointAssetCustomForm?: string\n /**\n * Endpoint for listing and looking up DAM users; `/adm/v1/user` by default.\n * Used by this configuration's user cache and by user inputs and filters under it that have no client of their own.\n */\n endPointUser?: string\n /** Where the podcasts of a licence are listed (`/licence/:licenceId` after it); `/adm/v1/podcast` by default. */\n endPointPodcast?: string\n /** Where the image and media widget reads a picked asset as a medium of the CMS; `/adm/v1/cms/asset` by default. */\n endPointCmsAsset?: string\n /**\n * The system whose current user decides which licences image widgets and asset\n * selects under this configuration may upload into and pick from; `dam` by default.\n * That user must be a DAM user (`DamCurrentUserDto`). The application loads it itself, as it\n * does for `dam`. A user of another system allows no licence and logs an error to the console.\n * `false` allows every licence, like a component's `skipCurrentUserCheck`. That prop still wins.\n */\n currentUser?: string | false\n /** The DAM admin an asset of this configuration links to; the root `adminDomain` where left out. */\n adminDomain?: string\n /**\n * Request timeout in seconds for this configuration, matching its\n * `damClient` timeout. The library sets no timeout on the client.\n * Upload chunk size and widget wait limits depend on it. Falls back to the root `apiTimeout`.\n */\n apiTimeout?: number\n /**\n * The grant needed to save a region of interest, checked before the editor is offered.\n * Default: `dam_regionOfInterest_update` for the default `/adm/v1/roi`, none\n * for another endpoint (the UGC one checks no grant). `null` checks none.\n */\n roiUpdateAcl?: AclValue | null\n /** The grant an image's rotation needs, as `roiUpdateAcl`: `dam_image_update` for the default `/adm/v1/image`. */\n imageRotateAcl?: AclValue | null\n /** The grant creating a keyword needs, checked before it is offered (Enter, comma, \"+ name\"). None by default. */\n keywordCreateAcl?: AclValue | null\n /** The same for an author, also the \"+\" button. */\n authorCreateAcl?: AclValue | null\n mainFileSingleUseEnabled?: boolean\n /**\n * Copying a picked asset into the widget's upload licence: the asset\n * picker offers it and the widgets send it. On unless `false`.\n * An application that picks only from its upload licence has no use for it and should turn it off, as admin-ugc does.\n */\n copyToLicenceEnabled?: boolean\n showSourceEnabled?: boolean\n showFileInfoEnabled?: boolean\n /**\n * The asset detail of this configuration's widgets and asset selects shows when DAM deletes the asset (the time\n * left), for an asset whose licence deletes automatically. Off unless `true`.\n */\n showAutoDeleteEnabled?: boolean\n /** The asset detail of this configuration's widgets and asset selects shows the asset's licence. Off unless `true`. */\n showLicenceEnabled?: boolean\n /** The tiles and rows of this configuration's asset selects show the badge of the asset's licence. Off unless `true`. */\n showLicenceBadgeEnabled?: boolean\n sourceLabel?: string\n editAssetLabel?: string\n addFromDamLabel?: string\n replaceFromDamLabel?: string\n descriptionValidation?: ImageFieldValidationConfig\n sourceValidation?: ImageFieldValidationConfig\n customUploadMetadataToImageMap?: UploadMetadataToImageMapFn\n customAssetSelectMetadataToImageMap?: AssetSelectMetadataToImageMapFn\n assetListEnabledFilters?: string[]\n simpleAssetSidebar?: boolean\n /**\n * The notification service of this configuration, read like the root `notification` of `coreDam`.\n * If left out, `default` uses the root one and other configurations have none.\n * Their uploads are then polled at the rate of a page without the service.\n * Configurations naming the same service share its socket. An event applies to the rows of each, each requested\n * read uses that configuration's own client, and a reported failure or duplicate is written into the rows of each.\n */\n notification?: {\n enabled?: boolean | string\n webSocketUrl?: string\n }\n}\n\nexport type CommonAdminCoreDamOptions =\n | undefined\n | {\n configs: { [key: string]: CommonAdminCoreDamConfig }\n apiTimeout: number\n /** @deprecated The state of an upload is always polled for; the value is not read. */\n uploadStatusFallback?: boolean\n adminDomain: string\n /**\n * Used only with an address and `enabled` set to `true` or the text \"true\",\n * case-insensitive and trimmed (\"True\", \" TRUE \"). Any other value is off.\n */\n notification?: {\n enabled?: boolean | string\n webSocketUrl?: string\n }\n }\n\nexport type CommonAdminCollabOptions = {\n enabled: boolean\n socketUrl: string\n /**\n * Called after the server refused the connection, not after a transport error (socket.io reconnects from\n * those on its own). Refresh the session here and answer whether to connect again; resolving `void` means\n * `ready`. Anything else, a rejection or no answer within 20 s means `retryLater`.\n */\n beforeReconnect: () => Promise<void | CollabReconnectVerdictType>\n /**\n * Synchronous: do the session cookies still belong to the user the page was loaded for? Asked before each of\n * socket.io's own reconnection attempts, which `beforeReconnect` does not see; `false` stops them\n * (`identityChanged`). `undefined` when it cannot tell. The server checks the same, this only saves the attempt.\n */\n isSameIdentity?: () => boolean | undefined\n /** `io` from `socket.io-client`. Passed in, so that only an admin with collaboration depends on the package. */\n io: typeof io | undefined\n}\n\nexport default {\n install(app: App, options: PluginOptions): void {\n if (!options.i18n) {\n console.warn(\n '[common-admin] installed without `i18n`: the library translates through an instance without messages, ' +\n \"so its texts render as keys. Pass the admin's instance: app.use(AnzuSystemsCommonAdmin, { i18n, … }).\"\n )\n }\n setCommonAdminI18n(options.i18n)\n app.provide(AvailableLanguagesSymbol, options.languages.available)\n app.provide(DefaultLanguageSymbol, options.languages.default)\n app.component('Acl', Acl)\n // The component, not a Vuetify alias of `VChip`: used without an import it still looks like the library's chip.\n app.component('AChipNoLink', AChipNoLink)\n initCommonAdminImageOptions(options.image)\n initCommonAdminCoreDamOptions(options.coreDam)\n initCommonAdminCollabOptions(options.collab)\n },\n}\n"],"mappings":";;;;;;AAyMA,IAAAI,IAAe,EACb,QAAQ,GAAU,GAA8B;CAe9C,AAdKC,EAAQ,QACX,QAAQ,KACN,6MAEF,GAEFC,EAAmBD,EAAQ,IAAI,GAC/BE,EAAI,QAAQC,GAA0BH,EAAQ,UAAU,SAAS,GACjEE,EAAI,QAAQE,GAAuBJ,EAAQ,UAAU,OAAO,GAC5DE,EAAI,UAAU,OAAOP,CAAG,GAExBO,EAAI,UAAU,eAAeN,CAAW,GACxCS,EAA4BL,EAAQ,KAAK,GACzCM,EAA8BN,EAAQ,OAAO,GAC7CO,EAA6BP,EAAQ,MAAM;AAC7C,EACF"}
|
|
1
|
+
{"version":3,"file":"AnzuSystemsCommonAdmin.js","names":["Acl","AChipNoLink","Acl_default","AChipNoLink_default","AnzuSystemsCommonAdmin_default","options","setCommonAdminI18n","app","AvailableLanguagesSymbol","DefaultLanguageSymbol","initCommonAdminImageOptions","initCommonAdminCoreDamOptions","initCommonAdminCollabOptions"],"sources":["../src/AnzuSystemsCommonAdmin.ts"],"sourcesContent":["import type { io } from 'socket.io-client'\nimport type { CollabReconnectVerdictType } from '@/domains/collab/types/Collab'\nimport type { App } from 'vue'\nimport Acl from '@/domains/auth/components/Acl.vue'\nimport AChipNoLink from '@/domains/ui/components/AChipNoLink.vue'\nimport type { LanguageCode } from '@/domains/system/composables/languageSettings'\nimport { type CommonAdminI18n, setCommonAdminI18n } from '@/plugins/i18n'\nimport { AvailableLanguagesSymbol, DefaultLanguageSymbol } from '@/shared/injectionKeys'\nimport type { AxiosInstance } from 'axios'\nimport {\n initCommonAdminCollabOptions,\n initCommonAdminCoreDamOptions,\n initCommonAdminImageOptions,\n} from '@/plugins/pluginOptions'\nimport type { IntegerId } from '@/shared/types/common'\nimport type { AclValue } from '@/domains/auth/types/Permission'\nimport type { ImageAware, ImageCreateUpdateAware } from '@/domains/dam/types/ImageAware'\nimport type {\n UploadMetadataToImageMapFn,\n AssetSelectMetadataToImageMapFn,\n} from '@/domains/dam/imageWidget/utils/metadataToImageMap'\n\nexport type PluginOptions = {\n /**\n * The admin's vue-i18n instance, in composition mode (`legacy: false`).\n * The library translates through it (components, validators, alerts), so its messages must include\n * the library's `common`, `error` and `$vuetify` from `messagesSk`/`messagesEn`/`messagesCs`.\n */\n i18n: CommonAdminI18n\n languages: { available: LanguageCode[]; default: LanguageCode }\n coreDam?: CommonAdminCoreDamOptions\n image?: CommonAdminImageOptions\n collab?: CommonAdminCollabOptions\n}\n\nexport interface CommonAdminImageConfig {\n imageClient: () => AxiosInstance\n previewDomain: string\n previewDomainOriginal: string\n width: number\n height: number\n imageApi?: {\n fetchImage: (client: () => AxiosInstance, id: IntegerId) => Promise<ImageAware>\n createImage: (client: () => AxiosInstance, data: ImageCreateUpdateAware) => Promise<ImageAware>\n updateImage: (client: () => AxiosInstance, id: IntegerId, data: ImageCreateUpdateAware) => Promise<ImageAware>\n deleteImage: (client: () => AxiosInstance, id: IntegerId) => Promise<void>\n fetchImageListByIds: (client: () => AxiosInstance, ids: IntegerId[]) => Promise<ImageAware[]>\n bulkUpdateImages: (client: () => AxiosInstance, items: ImageCreateUpdateAware[]) => Promise<ImageAware[]>\n }\n}\n\nexport type CommonAdminImageOptions =\n | undefined\n | {\n configs: { [key: string]: CommonAdminImageConfig }\n }\n\nexport interface ImageFieldValidationConfig {\n required?: boolean\n min?: number\n max?: number\n}\n\nexport interface CommonAdminCoreDamConfig {\n damClient: () => AxiosInstance\n endPointAsset?: string\n endPointImage?: string\n endPointRoi?: string\n /**\n * Endpoint for listing, looking up and creating DAM authors; `/adm/v1/author` by default.\n * Used by components under this configuration and by its author name cache.\n */\n endPointAuthor?: string\n /** The same for the keywords of DAM; `/adm/v1/keyword` by default. */\n endPointKeyword?: string\n /**\n * Endpoint for DAM settings and, with `/ext-system/:extSystem` appended,\n * an ext system's configuration; `/adm/v1/configuration` by default.\n */\n endPointConfiguration?: string\n /** Where the public configuration of DAM is read (`loadDamPubConfig`); `/pub/v1/configuration` by default. */\n endPointPubConfiguration?: string\n /** Where a licence is read by its id, for its ext system; `/adm/v1/asset-licence` by default. */\n endPointAssetLicence?: string\n /** Where the custom forms of an ext system and of a distribution service are read; `/adm/v1/asset-custom-form`. */\n endPointAssetCustomForm?: string\n /**\n * Endpoint for listing and looking up DAM users; `/adm/v1/user` by default.\n * Used by this configuration's user cache and by user inputs and filters under it that have no client of their own.\n */\n endPointUser?: string\n /**\n * Where the podcasts of an ext system are listed (`/ext-system/:extSystemId` after it, filtered by the browsed\n * licences); `/adm/v1/podcast` by default.\n */\n endPointPodcast?: string\n /** Where the image and media widget reads a picked asset as a medium of the CMS; `/adm/v1/cms/asset` by default. */\n endPointCmsAsset?: string\n /**\n * The system whose current user decides which licences image widgets and asset\n * selects under this configuration may upload into and pick from; `dam` by default.\n * That user must be a DAM user (`DamCurrentUserDto`). The application loads it itself, as it\n * does for `dam`. A user of another system allows no licence and logs an error to the console.\n * `false` allows every licence, like a component's `skipCurrentUserCheck`. That prop still wins.\n */\n currentUser?: string | false\n /** The DAM admin an asset of this configuration links to; the root `adminDomain` where left out. */\n adminDomain?: string\n /**\n * Request timeout in seconds for this configuration, matching its\n * `damClient` timeout. The library sets no timeout on the client.\n * Upload chunk size and widget wait limits depend on it. Falls back to the root `apiTimeout`.\n */\n apiTimeout?: number\n /**\n * The grant needed to save a region of interest, checked before the editor is offered.\n * Default: `dam_regionOfInterest_update` for the default `/adm/v1/roi`, none\n * for another endpoint (the UGC one checks no grant). `null` checks none.\n */\n roiUpdateAcl?: AclValue | null\n /** The grant an image's rotation needs, as `roiUpdateAcl`: `dam_image_update` for the default `/adm/v1/image`. */\n imageRotateAcl?: AclValue | null\n /** The grant creating a keyword needs, checked before it is offered (Enter, comma, \"+ name\"). None by default. */\n keywordCreateAcl?: AclValue | null\n /** The same for an author, also the \"+\" button. */\n authorCreateAcl?: AclValue | null\n mainFileSingleUseEnabled?: boolean\n /**\n * Copying a picked asset into the widget's upload licence: the asset\n * picker offers it and the widgets send it. On unless `false`.\n * An application that picks only from its upload licence has no use for it and should turn it off, as admin-ugc does.\n */\n copyToLicenceEnabled?: boolean\n showSourceEnabled?: boolean\n showFileInfoEnabled?: boolean\n /**\n * The asset detail of this configuration's widgets and asset selects shows when DAM deletes the asset (the time\n * left), for an asset whose licence deletes automatically. On unless `false`.\n */\n showAutoDeleteEnabled?: boolean\n /** The asset detail of this configuration's widgets and asset selects shows the asset's licence. On unless `false`. */\n showLicenceEnabled?: boolean\n /**\n * The tiles and rows of this configuration's asset selects show the badge of the asset's licence while the select\n * searches in more than one licence. On unless `false`.\n */\n showLicenceBadgeEnabled?: boolean\n sourceLabel?: string\n editAssetLabel?: string\n addFromDamLabel?: string\n replaceFromDamLabel?: string\n descriptionValidation?: ImageFieldValidationConfig\n sourceValidation?: ImageFieldValidationConfig\n customUploadMetadataToImageMap?: UploadMetadataToImageMapFn\n customAssetSelectMetadataToImageMap?: AssetSelectMetadataToImageMapFn\n assetListEnabledFilters?: string[]\n simpleAssetSidebar?: boolean\n /**\n * The notification service of this configuration, read like the root `notification` of `coreDam`.\n * If left out, `default` uses the root one and other configurations have none.\n * Their uploads are then polled at the rate of a page without the service.\n * Configurations naming the same service share its socket. An event applies to the rows of each, each requested\n * read uses that configuration's own client, and a reported failure or duplicate is written into the rows of each.\n */\n notification?: {\n enabled?: boolean | string\n webSocketUrl?: string\n }\n}\n\nexport type CommonAdminCoreDamOptions =\n | undefined\n | {\n configs: { [key: string]: CommonAdminCoreDamConfig }\n apiTimeout: number\n /** @deprecated The state of an upload is always polled for; the value is not read. */\n uploadStatusFallback?: boolean\n adminDomain: string\n /**\n * Used only with an address and `enabled` set to `true` or the text \"true\",\n * case-insensitive and trimmed (\"True\", \" TRUE \"). Any other value is off.\n */\n notification?: {\n enabled?: boolean | string\n webSocketUrl?: string\n }\n }\n\nexport type CommonAdminCollabOptions = {\n enabled: boolean\n socketUrl: string\n /**\n * Called after the server refused the connection, not after a transport error (socket.io reconnects from\n * those on its own). Refresh the session here and answer whether to connect again; resolving `void` means\n * `ready`. Anything else, a rejection or no answer within 20 s means `retryLater`.\n */\n beforeReconnect: () => Promise<void | CollabReconnectVerdictType>\n /**\n * Synchronous: do the session cookies still belong to the user the page was loaded for? Asked before each of\n * socket.io's own reconnection attempts, which `beforeReconnect` does not see; `false` stops them\n * (`identityChanged`). `undefined` when it cannot tell. The server checks the same, this only saves the attempt.\n */\n isSameIdentity?: () => boolean | undefined\n /** `io` from `socket.io-client`. Passed in, so that only an admin with collaboration depends on the package. */\n io: typeof io | undefined\n}\n\nexport default {\n install(app: App, options: PluginOptions): void {\n if (!options.i18n) {\n console.warn(\n '[common-admin] installed without `i18n`: the library translates through an instance without messages, ' +\n \"so its texts render as keys. Pass the admin's instance: app.use(AnzuSystemsCommonAdmin, { i18n, … }).\"\n )\n }\n setCommonAdminI18n(options.i18n)\n app.provide(AvailableLanguagesSymbol, options.languages.available)\n app.provide(DefaultLanguageSymbol, options.languages.default)\n app.component('Acl', Acl)\n // The component, not a Vuetify alias of `VChip`: used without an import it still looks like the library's chip.\n app.component('AChipNoLink', AChipNoLink)\n initCommonAdminImageOptions(options.image)\n initCommonAdminCoreDamOptions(options.coreDam)\n initCommonAdminCollabOptions(options.collab)\n },\n}\n"],"mappings":";;;;;;AA+MA,IAAAI,IAAe,EACb,QAAQ,GAAU,GAA8B;CAe9C,AAdKC,EAAQ,QACX,QAAQ,KACN,6MAEF,GAEFC,EAAmBD,EAAQ,IAAI,GAC/BE,EAAI,QAAQC,GAA0BH,EAAQ,UAAU,SAAS,GACjEE,EAAI,QAAQE,GAAuBJ,EAAQ,UAAU,OAAO,GAC5DE,EAAI,UAAU,OAAOP,CAAG,GAExBO,EAAI,UAAU,eAAeN,CAAW,GACxCS,EAA4BL,EAAQ,KAAK,GACzCM,EAA8BN,EAAQ,OAAO,GAC7CO,EAA6BP,EAAQ,MAAM;AAC7C,EACF"}
|