@anzusystems/common-admin 2.0.0-rc.28 → 2.0.0-rc.29
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/domains/dam/api/damAssetApi.d.ts +12 -1
- package/dist/domains/dam/api/damAssetApi.js +151 -95
- package/dist/domains/dam/api/damAssetApi.js.map +1 -1
- package/dist/domains/dam/api/damMetadataOnServer.d.ts +35 -0
- package/dist/domains/dam/api/damMetadataOnServer.js +28 -0
- package/dist/domains/dam/api/damMetadataOnServer.js.map +1 -0
- package/dist/domains/dam/assetDetail/components/AssetDetailSidebarMetadata.vue.js +26 -25
- package/dist/domains/dam/assetDetail/components/AssetDetailSidebarMetadata.vue.js.map +1 -1
- package/dist/domains/dam/assetDetail/store/assetDetailStore.js +40 -39
- package/dist/domains/dam/assetDetail/store/assetDetailStore.js.map +1 -1
- package/dist/domains/dam/cropper/components/ACropper.vue.d.ts +1 -1
- package/dist/domains/dam/cropper/components/ACropper.vue.js +153 -136
- package/dist/domains/dam/cropper/components/ACropper.vue.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue.d.ts +1 -1
- package/dist/domains/dam/imageWidget/components/AImagePublicInput.vue.d.ts +1 -1
- package/dist/domains/dam/imageWidget/components/AImageWidget.vue.d.ts +1 -1
- package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue.d.ts +1 -1
- package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue.d.ts +1 -1
- package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue.d.ts +1 -1
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue.d.ts +1 -1
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.vue.js +106 -106
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.vue.js.map +1 -1
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingle.vue.js +13 -13
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingle.vue.js.map +1 -1
- package/dist/domains/dam/uploadQueue/settlement/uploadSettle.js +115 -114
- package/dist/domains/dam/uploadQueue/settlement/uploadSettle.js.map +1 -1
- package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.js +147 -143
- package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.js.map +1 -1
- package/dist/domains/filters/components/FiltersSelected.vue.js +5 -5
- package/dist/domains/filters/components/FiltersSelected.vue.js.map +1 -1
- package/dist/domains/filters/composables/filterFactory.js +41 -38
- package/dist/domains/filters/composables/filterFactory.js.map +1 -1
- package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocomplete.vue.js +46 -38
- package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocomplete.vue.js.map +1 -1
- package/dist/domains/system/composables/alerts.js +8 -2
- package/dist/domains/system/composables/alerts.js.map +1 -1
- package/dist/domains/system/systemBar/utils/appReload.d.ts +9 -1
- package/dist/domains/system/systemBar/utils/appReload.js +3 -3
- package/dist/domains/system/systemBar/utils/appReload.js.map +1 -1
- package/dist/lib.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alerts.js","names":["t","pushAlert","commonT","commonTe","isAnzuFatalError","isAnzuApiForbiddenError","isAnzuApiValidationError","isAnzuApiResponseCodeError","isAnzuApiForbiddenOperationError","isAnzuApiDependencyExistsError","isAnzuApiTimeoutError","isAnzuApiAxiosError","isAnzuApiCancelledError","AuthUnavailableError","SessionExpiredError","isInCauseChain","resolveImageSaveErrorMessage","extractImageSaveErrorInfo","useSessionEnd","DEFAULT_DURATION_SECONDS","AUTH_UNAVAILABLE_QUIET_MS","authUnavailableShownAt","SESSION_ENDED_NOT_DONE_QUIET_MS","SESSION_ENDED_NOT_DONE_DURATION_MS","sessionEndedNotDoneShownAt","NEW_LINE_MARK","useAlerts","showSuccess","message","duration","showSuccessT","translation","showError","showErrorT","showInfo","showInfoT","showWarning","showWarningT","showValidationError","showRecordWas","variant","showApiValidationError","errors","fieldIsTranslated","t","te","texts","error","fieldText","resolveListErrors","errorsTexts","code","showApiForbiddenOperationError","detail","text","showUnknownError","showForbiddenError","showAuthUnavailable","now","showSessionEndedNotDone","showErrorsDefault","cause","imageSaveErrorMessage","parsedField","firstField","parsedSecond","indexNumber","secondField"],"sources":["../../../../src/domains/system/composables/alerts.ts"],"sourcesContent":["import { pushAlert } from '@/domains/system/composables/alertsQueue'\nimport { commonT, commonTe } from '@/plugins/i18n'\nimport { isAnzuFatalError } from '@/shared/error/AnzuFatalError'\nimport { isAnzuApiForbiddenError } from '@/shared/error/AnzuApiForbiddenError'\nimport { isAnzuApiValidationError, type ValidationError } from '@/shared/error/AnzuApiValidationError'\nimport { isAnzuApiResponseCodeError } from '@/shared/error/AnzuApiResponseCodeError'\nimport { isAnzuApiForbiddenOperationError } from '@/shared/error/AnzuApiForbiddenOperationError'\nimport { isAnzuApiDependencyExistsError } from '@/shared/error/AnzuApiDependencyExistsError'\nimport { isAnzuApiTimeoutError } from '@/shared/error/AnzuApiTimeoutError'\nimport { isAnzuApiAxiosError } from '@/shared/error/AnzuApiAxiosError'\nimport { isAnzuApiCancelledError } from '@/shared/error/AnzuApiCancelledError'\nimport { AuthUnavailableError } from '@/shared/error/AuthUnavailableError'\nimport { SessionExpiredError } from '@/shared/error/SessionExpiredError'\nimport { isInCauseChain } from '@/shared/error/isInCauseChain'\nimport { resolveImageSaveErrorMessage } from '@/domains/dam/imageWidget/composables/imageSaveErrors'\nimport { extractImageSaveErrorInfo } from '@/domains/dam/imageWidget/composables/imageApiCms'\nimport { useSessionEnd } from '@/domains/auth/composables/sessionEnd'\n\nconst DEFAULT_DURATION_SECONDS = 3\n// One \"sign-in server does not answer\" per outage: a page's requests all fail at once.\nconst AUTH_UNAVAILABLE_QUIET_MS = 30_000\nlet authUnavailableShownAt = -Infinity\n// One for the requests a single action fails at once.\nconst SESSION_ENDED_NOT_DONE_QUIET_MS = 3000\nconst SESSION_ENDED_NOT_DONE_DURATION_MS = 6000\nlet sessionEndedNotDoneShownAt = -Infinity\n\nexport const NEW_LINE_MARK = '\\n'\n\nexport type RecordWasType = 'created' | 'deleted' | 'updated' | 'published' | 'unpublished' | 'enabled' | 'disabled'\n\nexport function useAlerts() {\n const showSuccess = (message: string, duration = DEFAULT_DURATION_SECONDS) => {\n pushAlert('success', message, duration * 1000)\n }\n\n const showSuccessT = (translation: string, duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n showSuccess(t(translation), duration)\n }\n\n const showError = (message: string, duration = DEFAULT_DURATION_SECONDS) => {\n pushAlert('error', message, duration * 1000)\n }\n\n const showErrorT = (translation: string, duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n showError(t(translation), duration)\n }\n\n const showInfo = (message: string, duration = DEFAULT_DURATION_SECONDS) => {\n pushAlert('info', message, duration * 1000)\n }\n\n const showInfoT = (translation: string, duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n showInfo(t(translation), duration)\n }\n\n const showWarning = (message: string, duration = DEFAULT_DURATION_SECONDS) => {\n pushAlert('warning', message, duration * 1000)\n }\n\n const showWarningT = (translation: string, duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n showWarning(t(translation), duration)\n }\n\n const showValidationError = (duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n pushAlert('error', t('common.alert.fixValidationErrors'), duration * 1000)\n }\n\n const showRecordWas = (variant: RecordWasType, duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n pushAlert('success', t('common.alert.recordWas.' + variant), duration * 1000)\n }\n\n const showApiValidationError = (errors: ValidationError[], duration = -1, fieldIsTranslated = false) => {\n const t = commonT\n const te = commonTe\n const texts = [t('common.alert.fixApiValidationErrors')]\n\n for (const error of errors) {\n let fieldText = ''\n if (fieldIsTranslated) {\n fieldText += error.field\n } else if (te(error.field)) {\n fieldText += t(error.field)\n } else if (error.field.includes('[')) {\n fieldText += resolveListErrors(error.field)\n } else {\n fieldText += error.field.split('.').at(-1)\n }\n const errorsTexts = new Set<string>()\n for (const code of error.errors) {\n if (te('error.apiValidation.' + code)) {\n errorsTexts.add(t('error.apiValidation.' + code))\n continue\n }\n errorsTexts.add(t('error.apiValidation.noTranslation'))\n }\n if (fieldText.length > 0) {\n texts.push(fieldText + ': ' + Array.from(errorsTexts).join(', '))\n }\n }\n pushAlert('error', texts.join(NEW_LINE_MARK), duration * 1000)\n }\n\n const showApiForbiddenOperationError = (detail: string, duration = -1) => {\n const t = commonT\n const te = commonTe\n let text = t('error.apiForbiddenOperation.noTranslation')\n if (te('error.apiForbiddenOperation.' + detail)) {\n text = t('error.apiForbiddenOperation.' + detail)\n }\n pushAlert('error', text, duration * 1000)\n }\n\n const showUnknownError = (duration = -1) => {\n const t = commonT\n pushAlert('error', t('common.alert.unknownError'), duration * 1000)\n }\n\n const showForbiddenError = (duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n pushAlert('error', t('common.alert.forbiddenError'), duration * 1000)\n }\n\n const showAuthUnavailable = (duration = -1) => {\n const now = Date.now()\n if (now - authUnavailableShownAt < AUTH_UNAVAILABLE_QUIET_MS) return\n authUnavailableShownAt = now\n pushAlert('error', commonT('common.alert.authUnavailable'), duration * 1000)\n }\n\n // Not until closed: it covers the bar that says the same and offers the sign-in.\n const showSessionEndedNotDone = () => {\n const now = Date.now()\n if (now - sessionEndedNotDoneShownAt < SESSION_ENDED_NOT_DONE_QUIET_MS) return\n sessionEndedNotDoneShownAt = now\n pushAlert('error', commonT('common.alert.sessionEndedNotDone'), SESSION_ENDED_NOT_DONE_DURATION_MS)\n }\n\n const showErrorsDefault = (error: any, duration = -1) => {\n // A cancelled request is not a failure: something newer stopped it, or its view is gone.\n // Returns `true` because callers using `if (!showErrorsDefault(e)) showUnknownError()`\n // would otherwise show \"unknown error\" on every autocomplete keystroke.\n if (isAnzuApiCancelledError(error)) return true\n // Stopped by the token refresh. Either the session is gone and\n // logout is loading, or the sign-in server did not answer.\n // The latter is reported once, not for every request stopped at the same time.\n if (isInCauseChain(error, (cause) => cause instanceof SessionExpiredError)) {\n // The user kept the page for its unsaved changes: what failed must not pass for done.\n if (useSessionEnd().sessionEnded.value) showSessionEndedNotDone()\n return true\n }\n if (isInCauseChain(error, (cause) => cause instanceof AuthUnavailableError)) {\n showAuthUnavailable(duration)\n return true\n }\n if (isAnzuApiForbiddenError(error)) {\n showForbiddenError(duration)\n return true\n }\n if (isAnzuApiValidationError(error)) {\n showApiValidationError(error.fields, duration)\n return true\n }\n if (isAnzuApiDependencyExistsError(error)) {\n showErrorT('error.apiDependencyExists.message', duration)\n return true\n }\n if (isAnzuApiForbiddenOperationError(error)) {\n showApiForbiddenOperationError(error.detail, duration)\n return true\n }\n if (isAnzuApiTimeoutError(error)) {\n showErrorT('error.apiTimedOut.message', duration)\n return true\n }\n // Any save that writes image rows (an article, a gallery, a person) can be refused by the single use rule.\n // Also a bare axios error: `bulkUpdateImages` rejects with one.\n const imageSaveErrorMessage = resolveImageSaveErrorMessage(extractImageSaveErrorInfo(error), commonT)\n if (imageSaveErrorMessage) {\n showError(imageSaveErrorMessage, duration)\n return true\n }\n if (isAnzuApiAxiosError(error)) {\n showUnknownError(duration)\n return true\n }\n if (isAnzuFatalError(error)) {\n showUnknownError(duration)\n return true\n }\n if (isAnzuApiResponseCodeError(error)) {\n showUnknownError(duration)\n return true\n }\n return false\n }\n\n const resolveListErrors = (error: string) => {\n const t = commonT\n // Only called for a field that contains `[`, so the split has a second part.\n const parsedField = error.split('[')\n const firstField = parsedField[0]!.trim()\n const parsedSecond = parsedField[1]!.split(']')\n const indexNumber = parsedSecond[0]\n const secondField: string = parsedSecond[1] ?? ''\n\n return t(firstField) + '[' + indexNumber + ']: ' + t(firstField.slice(0, -1) + secondField)\n }\n\n return {\n showSuccess,\n showSuccessT,\n showError,\n showErrorT,\n showInfo,\n showInfoT,\n showWarning,\n showWarningT,\n showValidationError,\n showRecordWas,\n showApiValidationError,\n showApiForbiddenOperationError,\n showUnknownError,\n showForbiddenError,\n showEr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AOrB,EAAEoB,CAAU,IAAI,MAAME,IAAc,QAAQtB,EAAEoB,EAAW,MAAM,GAAG,EAAE,IAAIG,CAAW;CAC5F;CAEA,OAAO;EACLxC;EACAG;EACAE;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAE;EACAW;EACAG;EACAC;EACAI;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"alerts.js","names":["t","pushAlert","commonT","commonTe","isAnzuFatalError","isAnzuApiForbiddenError","isAnzuApiValidationError","isAnzuApiResponseCodeError","isAnzuApiForbiddenOperationError","isAnzuApiDependencyExistsError","isAnzuApiTimeoutError","isAnzuApiAxiosError","isAnzuApiCancelledError","AuthUnavailableError","SessionExpiredError","isInCauseChain","resolveImageSaveErrorMessage","extractImageSaveErrorInfo","useSessionEnd","DEFAULT_DURATION_SECONDS","AUTH_UNAVAILABLE_QUIET_MS","authUnavailableShownAt","SESSION_ENDED_NOT_DONE_QUIET_MS","SESSION_ENDED_NOT_DONE_DURATION_MS","sessionEndedNotDoneShownAt","NEW_LINE_MARK","useAlerts","showSuccess","message","duration","showSuccessT","translation","showError","showErrorT","showInfo","showInfoT","showWarning","showWarningT","showValidationError","showRecordWas","variant","showApiValidationError","errors","fieldIsTranslated","t","te","texts","error","fieldText","resolveListErrors","errorsTexts","code","showApiForbiddenOperationError","detail","text","showUnknownError","showForbiddenError","showAuthUnavailable","now","showSessionEndedNotDone","showErrorsDefault","cause","imageSaveErrorMessage","parsedField","firstField","parsedSecond","indexNumber","secondField","listText","itemKeys","owner","list","itemKey","key"],"sources":["../../../../src/domains/system/composables/alerts.ts"],"sourcesContent":["import { pushAlert } from '@/domains/system/composables/alertsQueue'\nimport { commonT, commonTe } from '@/plugins/i18n'\nimport { isAnzuFatalError } from '@/shared/error/AnzuFatalError'\nimport { isAnzuApiForbiddenError } from '@/shared/error/AnzuApiForbiddenError'\nimport { isAnzuApiValidationError, type ValidationError } from '@/shared/error/AnzuApiValidationError'\nimport { isAnzuApiResponseCodeError } from '@/shared/error/AnzuApiResponseCodeError'\nimport { isAnzuApiForbiddenOperationError } from '@/shared/error/AnzuApiForbiddenOperationError'\nimport { isAnzuApiDependencyExistsError } from '@/shared/error/AnzuApiDependencyExistsError'\nimport { isAnzuApiTimeoutError } from '@/shared/error/AnzuApiTimeoutError'\nimport { isAnzuApiAxiosError } from '@/shared/error/AnzuApiAxiosError'\nimport { isAnzuApiCancelledError } from '@/shared/error/AnzuApiCancelledError'\nimport { AuthUnavailableError } from '@/shared/error/AuthUnavailableError'\nimport { SessionExpiredError } from '@/shared/error/SessionExpiredError'\nimport { isInCauseChain } from '@/shared/error/isInCauseChain'\nimport { resolveImageSaveErrorMessage } from '@/domains/dam/imageWidget/composables/imageSaveErrors'\nimport { extractImageSaveErrorInfo } from '@/domains/dam/imageWidget/composables/imageApiCms'\nimport { useSessionEnd } from '@/domains/auth/composables/sessionEnd'\n\nconst DEFAULT_DURATION_SECONDS = 3\n// One \"sign-in server does not answer\" per outage: a page's requests all fail at once.\nconst AUTH_UNAVAILABLE_QUIET_MS = 30_000\nlet authUnavailableShownAt = -Infinity\n// One for the requests a single action fails at once.\nconst SESSION_ENDED_NOT_DONE_QUIET_MS = 3000\nconst SESSION_ENDED_NOT_DONE_DURATION_MS = 6000\nlet sessionEndedNotDoneShownAt = -Infinity\n\nexport const NEW_LINE_MARK = '\\n'\n\nexport type RecordWasType = 'created' | 'deleted' | 'updated' | 'published' | 'unpublished' | 'enabled' | 'disabled'\n\nexport function useAlerts() {\n const showSuccess = (message: string, duration = DEFAULT_DURATION_SECONDS) => {\n pushAlert('success', message, duration * 1000)\n }\n\n const showSuccessT = (translation: string, duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n showSuccess(t(translation), duration)\n }\n\n const showError = (message: string, duration = DEFAULT_DURATION_SECONDS) => {\n pushAlert('error', message, duration * 1000)\n }\n\n const showErrorT = (translation: string, duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n showError(t(translation), duration)\n }\n\n const showInfo = (message: string, duration = DEFAULT_DURATION_SECONDS) => {\n pushAlert('info', message, duration * 1000)\n }\n\n const showInfoT = (translation: string, duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n showInfo(t(translation), duration)\n }\n\n const showWarning = (message: string, duration = DEFAULT_DURATION_SECONDS) => {\n pushAlert('warning', message, duration * 1000)\n }\n\n const showWarningT = (translation: string, duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n showWarning(t(translation), duration)\n }\n\n const showValidationError = (duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n pushAlert('error', t('common.alert.fixValidationErrors'), duration * 1000)\n }\n\n const showRecordWas = (variant: RecordWasType, duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n pushAlert('success', t('common.alert.recordWas.' + variant), duration * 1000)\n }\n\n const showApiValidationError = (errors: ValidationError[], duration = -1, fieldIsTranslated = false) => {\n const t = commonT\n const te = commonTe\n const texts = [t('common.alert.fixApiValidationErrors')]\n\n for (const error of errors) {\n let fieldText = ''\n if (fieldIsTranslated) {\n fieldText += error.field\n } else if (te(error.field)) {\n fieldText += t(error.field)\n } else if (error.field.includes('[')) {\n fieldText += resolveListErrors(error.field)\n } else {\n fieldText += error.field.split('.').at(-1)\n }\n const errorsTexts = new Set<string>()\n for (const code of error.errors) {\n if (te('error.apiValidation.' + code)) {\n errorsTexts.add(t('error.apiValidation.' + code))\n continue\n }\n errorsTexts.add(t('error.apiValidation.noTranslation'))\n }\n if (fieldText.length > 0) {\n texts.push(fieldText + ': ' + Array.from(errorsTexts).join(', '))\n }\n }\n pushAlert('error', texts.join(NEW_LINE_MARK), duration * 1000)\n }\n\n const showApiForbiddenOperationError = (detail: string, duration = -1) => {\n const t = commonT\n const te = commonTe\n let text = t('error.apiForbiddenOperation.noTranslation')\n if (te('error.apiForbiddenOperation.' + detail)) {\n text = t('error.apiForbiddenOperation.' + detail)\n }\n pushAlert('error', text, duration * 1000)\n }\n\n const showUnknownError = (duration = -1) => {\n const t = commonT\n pushAlert('error', t('common.alert.unknownError'), duration * 1000)\n }\n\n const showForbiddenError = (duration = DEFAULT_DURATION_SECONDS) => {\n const t = commonT\n pushAlert('error', t('common.alert.forbiddenError'), duration * 1000)\n }\n\n const showAuthUnavailable = (duration = -1) => {\n const now = Date.now()\n if (now - authUnavailableShownAt < AUTH_UNAVAILABLE_QUIET_MS) return\n authUnavailableShownAt = now\n pushAlert('error', commonT('common.alert.authUnavailable'), duration * 1000)\n }\n\n // Not until closed: it covers the bar that says the same and offers the sign-in.\n const showSessionEndedNotDone = () => {\n const now = Date.now()\n if (now - sessionEndedNotDoneShownAt < SESSION_ENDED_NOT_DONE_QUIET_MS) return\n sessionEndedNotDoneShownAt = now\n pushAlert('error', commonT('common.alert.sessionEndedNotDone'), SESSION_ENDED_NOT_DONE_DURATION_MS)\n }\n\n const showErrorsDefault = (error: any, duration = -1) => {\n // A cancelled request is not a failure: something newer stopped it, or its view is gone.\n // Returns `true` because callers using `if (!showErrorsDefault(e)) showUnknownError()`\n // would otherwise show \"unknown error\" on every autocomplete keystroke.\n if (isAnzuApiCancelledError(error)) return true\n // Stopped by the token refresh. Either the session is gone and\n // logout is loading, or the sign-in server did not answer.\n // The latter is reported once, not for every request stopped at the same time.\n if (isInCauseChain(error, (cause) => cause instanceof SessionExpiredError)) {\n // The user kept the page for its unsaved changes: what failed must not pass for done.\n if (useSessionEnd().sessionEnded.value) showSessionEndedNotDone()\n return true\n }\n if (isInCauseChain(error, (cause) => cause instanceof AuthUnavailableError)) {\n showAuthUnavailable(duration)\n return true\n }\n if (isAnzuApiForbiddenError(error)) {\n showForbiddenError(duration)\n return true\n }\n if (isAnzuApiValidationError(error)) {\n showApiValidationError(error.fields, duration)\n return true\n }\n if (isAnzuApiDependencyExistsError(error)) {\n showErrorT('error.apiDependencyExists.message', duration)\n return true\n }\n if (isAnzuApiForbiddenOperationError(error)) {\n showApiForbiddenOperationError(error.detail, duration)\n return true\n }\n if (isAnzuApiTimeoutError(error)) {\n showErrorT('error.apiTimedOut.message', duration)\n return true\n }\n // Any save that writes image rows (an article, a gallery, a person) can be refused by the single use rule.\n // Also a bare axios error: `bulkUpdateImages` rejects with one.\n const imageSaveErrorMessage = resolveImageSaveErrorMessage(extractImageSaveErrorInfo(error), commonT)\n if (imageSaveErrorMessage) {\n showError(imageSaveErrorMessage, duration)\n return true\n }\n if (isAnzuApiAxiosError(error)) {\n showUnknownError(duration)\n return true\n }\n if (isAnzuFatalError(error)) {\n showUnknownError(duration)\n return true\n }\n if (isAnzuApiResponseCodeError(error)) {\n showUnknownError(duration)\n return true\n }\n return false\n }\n\n /**\n * `exportData[2].exportType`: the list's label, the index and the label of the item's field. Admins keep that label\n * under the list name without its final \"s\" (admin-cms: `items` → `item.name`), under the list name itself, or in an\n * entity of its own named after the parent and the list (admin-dam: `podcast` + `exportData` →\n * `podcastExportData.model.exportType`). A name nothing translates is shown bare, as for a field outside a list.\n * Cutting the last letter of any list name turned `exportData` into `exportDat`, and the alert showed the raw key.\n */\n const resolveListErrors = (error: string) => {\n const t = commonT\n const te = commonTe\n // Only called for a field that contains `[`, so the split has a second part.\n const parsedField = error.split('[')\n const firstField = parsedField[0]!.trim()\n const parsedSecond = parsedField[1]!.split(']')\n const indexNumber = parsedSecond[0]\n const secondField: string = parsedSecond[1] ?? ''\n\n const listText = (te(firstField) ? t(firstField) : firstField.split('.').at(-1)) + '[' + indexNumber + ']'\n if (secondField.length === 0) return listText\n\n const itemKeys = [firstField + secondField]\n // A body that is a list itself names `model.[0].title`: the item's label is the entity's own, `model.title`.\n if (firstField.endsWith('s') || firstField.endsWith('.')) itemKeys.unshift(firstField.slice(0, -1) + secondField)\n const [owner, list] = firstField.split('.model.')\n if (owner && list && !list.includes('.')) {\n itemKeys.push(owner + list.charAt(0).toUpperCase() + list.slice(1) + '.model' + secondField)\n }\n const itemKey = itemKeys.find((key) => te(key))\n\n return listText + ': ' + (itemKey ? t(itemKey) : secondField.split('.').at(-1))\n }\n\n return {\n showSuccess,\n showSuccessT,\n showError,\n showErrorT,\n showInfo,\n showInfoT,\n showWarning,\n showWarningT,\n showValidationError,\n showRecordWas,\n showApiValidationError,\n showApiForbiddenOperationError,\n showUnknownError,\n showForbiddenError,\n showErrorsDefault,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,IAAMmB,IAA2B,GAE3BC,IAA4B,KAC9BC,IAAyB,QAEvBC,IAAkC,KAClCC,IAAqC,KACvCC,IAA6B,QAEpBC,IAAgB;AAI7B,SAAgBC,IAAY;CAC1B,IAAMC,KAAeC,GAAiBC,IAAWV,MAA6B;EAC5ElB,EAAU,WAAW2B,GAASC,IAAW,GAAI;CAC/C,GAEMC,KAAgBC,GAAqBF,IAAWV,MAA6B;EAEjFQ,EAAY3B,EAAE+B,CAAW,GAAGF,CAAQ;CACtC,GAEMG,KAAaJ,GAAiBC,IAAWV,MAA6B;EAC1ElB,EAAU,SAAS2B,GAASC,IAAW,GAAI;CAC7C,GAEMI,KAAcF,GAAqBF,IAAWV,MAA6B;EAE/Ea,EAAUhC,EAAE+B,CAAW,GAAGF,CAAQ;CACpC,GAEMK,KAAYN,GAAiBC,IAAWV,MAA6B;EACzElB,EAAU,QAAQ2B,GAASC,IAAW,GAAI;CAC5C,GAEMM,KAAaJ,GAAqBF,IAAWV,MAA6B;EAE9Ee,EAASlC,EAAE+B,CAAW,GAAGF,CAAQ;CACnC,GAEMO,KAAeR,GAAiBC,IAAWV,MAA6B;EAC5ElB,EAAU,WAAW2B,GAASC,IAAW,GAAI;CAC/C,GAEMQ,KAAgBN,GAAqBF,IAAWV,MAA6B;EAEjFiB,EAAYpC,EAAE+B,CAAW,GAAGF,CAAQ;CACtC,GAEMS,KAAuBT,IAAWV,MAA6B;EAEnElB,EAAU,SAASD,EAAE,kCAAkC,GAAG6B,IAAW,GAAI;CAC3E,GAEMU,KAAiBC,GAAwBX,IAAWV,MAA6B;EAErFlB,EAAU,WAAWD,EAAE,4BAA4BwC,CAAO,GAAGX,IAAW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MAAM,GAAG,GAC7BiB,IAAaD,EAAY,EAAE,CAAE,KAAK,GAClCE,IAAeF,EAAY,EAAE,CAAE,MAAM,GAAG,GACxCG,IAAcD,EAAa,IAC3BE,IAAsBF,EAAa,MAAM,IAEzCG,KAAYvB,EAAGmB,CAAU,IAAIpB,EAAEoB,CAAU,IAAIA,EAAW,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,MAAME,IAAc;EACvG,IAAIC,EAAY,WAAW,GAAG,OAAOC;EAErC,IAAMC,IAAW,CAACL,IAAaG,CAAW;EAE1C,CAAIH,EAAW,SAAS,GAAG,KAAKA,EAAW,SAAS,GAAG,MAAGK,EAAS,QAAQL,EAAW,MAAM,GAAG,EAAE,IAAIG,CAAW;EAChH,IAAM,CAACG,GAAOC,KAAQP,EAAW,MAAM,SAAS;EAC5CM,KAASC,KAAQ,CAACA,EAAK,SAAS,GAAG,KACrCF,EAAS,KAAKC,IAAQC,EAAK,OAAO,CAAC,CAAC,CAAC,YAAY,IAAIA,EAAK,MAAM,CAAC,IAAI,WAAWJ,CAAW;EAE7F,IAAMK,IAAUH,EAAS,MAAMI,MAAQ5B,EAAG4B,CAAG,CAAC;EAE9C,OAAOL,IAAW,QAAQI,IAAU5B,EAAE4B,CAAO,IAAIL,EAAY,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE;CAC/E;CAEA,OAAO;EACLxC;EACAG;EACAE;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAC;EACAE;EACAW;EACAG;EACAC;EACAI;CACF;AACF"}
|
|
@@ -5,9 +5,17 @@ export declare const RELOAD_VETO_GRACE = 3000;
|
|
|
5
5
|
* Returns whether a reload is under way. `onReload` runs once per reload, while the document can still send a request.
|
|
6
6
|
*/
|
|
7
7
|
export declare function requestAppReload(onReload?: () => void): boolean;
|
|
8
|
+
export interface CheckForNewVersionOptions {
|
|
9
|
+
/**
|
|
10
|
+
* For an admin whose page holds work a reload would lose (DAM's running uploads). While it returns `true`, a new
|
|
11
|
+
* version does not reload: the navigation goes on and the system bar keeps its link to load the new version.
|
|
12
|
+
* The first navigation after it returns `false` reloads. Without it, the reload is never postponed.
|
|
13
|
+
*/
|
|
14
|
+
postponeWhile?: () => boolean;
|
|
15
|
+
}
|
|
8
16
|
/**
|
|
9
17
|
* Reloads when `ASystemBar` has seen a new `appVersion` in `config.json`.
|
|
10
18
|
* For a route guard: returns whether a reload is under way, and
|
|
11
19
|
* the guard then holds the navigation for `RELOAD_VETO_GRACE`.
|
|
12
20
|
*/
|
|
13
|
-
export declare function checkForNewVersion(): boolean;
|
|
21
|
+
export declare function checkForNewVersion(options?: CheckForNewVersionOptions): boolean;
|
|
@@ -13,9 +13,9 @@ function o(t) {
|
|
|
13
13
|
a = !1;
|
|
14
14
|
}, i), t?.(), e(), !0;
|
|
15
15
|
}
|
|
16
|
-
function s() {
|
|
17
|
-
let { newVersion:
|
|
18
|
-
return
|
|
16
|
+
function s(e = {}) {
|
|
17
|
+
let { newVersion: n } = t();
|
|
18
|
+
return !n.value || e.postponeWhile?.() ? !1 : o();
|
|
19
19
|
}
|
|
20
20
|
export { i as RELOAD_VETO_GRACE, s as checkForNewVersion, o as requestAppReload };
|
|
21
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appReload.js","names":["reloadPage","useSystemBar","RELOAD_KEY","RELOAD_COOLDOWN","RELOAD_VETO_GRACE","reloadRequested","requestAppReload","onReload","lastReload","checkForNewVersion","newVersion"],"sources":["../../../../../src/domains/system/systemBar/utils/appReload.ts"],"sourcesContent":["import { reloadPage } from '@/domains/system/systemBar/utils/pageReload'\nimport { useSystemBar } from '@/domains/system/systemBar/composables/systemBar'\n\nconst RELOAD_KEY = 'anzu.appReloadAt'\nconst RELOAD_COOLDOWN = 30_000\n/** How long a navigation waits for a reload to commit before it is aborted. */\nexport const RELOAD_VETO_GRACE = 3_000\n\nlet reloadRequested = false\n\n/**\n * Reloads the page at most once per `RELOAD_COOLDOWN`, so a reload that does not take cannot loop.\n * Returns whether a reload is under way. `onReload` runs once per reload, while the document can still send a request.\n */\nexport function requestAppReload(onReload?: () => void): boolean {\n if (reloadRequested) return true\n try {\n const lastReload = Number(sessionStorage.getItem(RELOAD_KEY)) || 0\n if (Date.now() - lastReload < RELOAD_COOLDOWN) return false\n sessionStorage.setItem(RELOAD_KEY, String(Date.now()))\n } catch {\n // No stamp means no loop guard, which is still better than a dead tab.\n }\n reloadRequested = true\n // A beforeunload handler can veto the reload.\n setTimeout(() => {\n reloadRequested = false\n }, RELOAD_VETO_GRACE)\n onReload?.()\n reloadPage()\n return true\n}\n\n/**\n * Reloads when `ASystemBar` has seen a new `appVersion` in `config.json`.\n * For a route guard: returns whether a reload is under way, and\n * the guard then holds the navigation for `RELOAD_VETO_GRACE`.\n */\nexport function checkForNewVersion(): boolean {\n const { newVersion } = useSystemBar()\n if (!newVersion.value) return false\n return requestAppReload()\n}\n"],"mappings":";;;AAGA,IAAME,IAAa,oBACbC,IAAkB,KAEXC,IAAoB,KAE7BC,IAAkB;AAMtB,SAAgBC,EAAiBC,GAAgC;CAC/D,IAAIF,GAAiB,OAAO;CAC5B,IAAI;EACF,IAAMG,IAAa,OAAO,eAAe,QAAQN,CAAU,CAAC,KAAK;EACjE,IAAI,KAAK,IAAI,IAAIM,IAAaL,GAAiB,OAAO;EACtD,eAAe,QAAQD,GAAY,OAAO,KAAK,IAAI,CAAC,CAAC;CACvD,QAAQ,CAER;CAQA,OAPAG,IAAkB,IAElB,iBAAiB;EACfA,IAAkB;CACpB,GAAGD,CAAiB,GACpBG,IAAW,GACXP,EAAW,GACJ;AACT;
|
|
1
|
+
{"version":3,"file":"appReload.js","names":["reloadPage","useSystemBar","RELOAD_KEY","RELOAD_COOLDOWN","RELOAD_VETO_GRACE","reloadRequested","requestAppReload","onReload","lastReload","checkForNewVersion","options","newVersion"],"sources":["../../../../../src/domains/system/systemBar/utils/appReload.ts"],"sourcesContent":["import { reloadPage } from '@/domains/system/systemBar/utils/pageReload'\nimport { useSystemBar } from '@/domains/system/systemBar/composables/systemBar'\n\nconst RELOAD_KEY = 'anzu.appReloadAt'\nconst RELOAD_COOLDOWN = 30_000\n/** How long a navigation waits for a reload to commit before it is aborted. */\nexport const RELOAD_VETO_GRACE = 3_000\n\nlet reloadRequested = false\n\n/**\n * Reloads the page at most once per `RELOAD_COOLDOWN`, so a reload that does not take cannot loop.\n * Returns whether a reload is under way. `onReload` runs once per reload, while the document can still send a request.\n */\nexport function requestAppReload(onReload?: () => void): boolean {\n if (reloadRequested) return true\n try {\n const lastReload = Number(sessionStorage.getItem(RELOAD_KEY)) || 0\n if (Date.now() - lastReload < RELOAD_COOLDOWN) return false\n sessionStorage.setItem(RELOAD_KEY, String(Date.now()))\n } catch {\n // No stamp means no loop guard, which is still better than a dead tab.\n }\n reloadRequested = true\n // A beforeunload handler can veto the reload.\n setTimeout(() => {\n reloadRequested = false\n }, RELOAD_VETO_GRACE)\n onReload?.()\n reloadPage()\n return true\n}\n\nexport interface CheckForNewVersionOptions {\n /**\n * For an admin whose page holds work a reload would lose (DAM's running uploads). While it returns `true`, a new\n * version does not reload: the navigation goes on and the system bar keeps its link to load the new version.\n * The first navigation after it returns `false` reloads. Without it, the reload is never postponed.\n */\n postponeWhile?: () => boolean\n}\n\n/**\n * Reloads when `ASystemBar` has seen a new `appVersion` in `config.json`.\n * For a route guard: returns whether a reload is under way, and\n * the guard then holds the navigation for `RELOAD_VETO_GRACE`.\n */\nexport function checkForNewVersion(options: CheckForNewVersionOptions = {}): boolean {\n const { newVersion } = useSystemBar()\n if (!newVersion.value) return false\n if (options.postponeWhile?.()) return false\n return requestAppReload()\n}\n"],"mappings":";;;AAGA,IAAME,IAAa,oBACbC,IAAkB,KAEXC,IAAoB,KAE7BC,IAAkB;AAMtB,SAAgBC,EAAiBC,GAAgC;CAC/D,IAAIF,GAAiB,OAAO;CAC5B,IAAI;EACF,IAAMG,IAAa,OAAO,eAAe,QAAQN,CAAU,CAAC,KAAK;EACjE,IAAI,KAAK,IAAI,IAAIM,IAAaL,GAAiB,OAAO;EACtD,eAAe,QAAQD,GAAY,OAAO,KAAK,IAAI,CAAC,CAAC;CACvD,QAAQ,CAER;CAQA,OAPAG,IAAkB,IAElB,iBAAiB;EACfA,IAAkB;CACpB,GAAGD,CAAiB,GACpBG,IAAW,GACXP,EAAW,GACJ;AACT;AAgBA,SAAgBS,EAAmBC,IAAqC,CAAC,GAAY;CACnF,IAAM,EAAEC,kBAAeV,EAAa;CAGpC,OAFI,CAACU,EAAW,SACZD,EAAQ,gBAAgB,IAAU,KAC/BJ,EAAiB;AAC1B"}
|
package/dist/lib.d.ts
CHANGED
|
@@ -256,7 +256,7 @@ import { useApiFetchItems, FetchItemsParams, ItemsShape, UseApiFetchItemsParams,
|
|
|
256
256
|
import { useApiCommand, useApiRequest, ExecuteRequestParams, UseApiRequestParams, UseApiRequestReturnType } from './domains/api/composables/useApiRequest';
|
|
257
257
|
import { ApiClientSetup, ApiClientRequestInterceptor, ApiClientResponseInterceptor, defineApiClient, skipUrlPrefixes } from './domains/api/composables/defineApiClient';
|
|
258
258
|
import { startWithEnvConfig } from './shared/utils/envConfig';
|
|
259
|
-
import { checkForNewVersion, RELOAD_VETO_GRACE, requestAppReload } from './domains/system/systemBar/utils/appReload';
|
|
259
|
+
import { checkForNewVersion, CheckForNewVersionOptions, RELOAD_VETO_GRACE, requestAppReload } from './domains/system/systemBar/utils/appReload';
|
|
260
260
|
import { apiErrorIsReported, apiErrorStatus, defaultApiErrorLogger, setApiErrorLogger, ApiErrorContext, ApiErrorLogger } from './domains/api/utils/apiErrors';
|
|
261
261
|
import { useApiFetchListBatch, FetchListBatchParams, UseApiFetchListBatchParams, UseApiFetchListBatchReturnType } from './domains/api/composables/useApiFetchListBatch';
|
|
262
262
|
import { useApiQueryBuilder } from './domains/api/composables/useApiQueryBuilder';
|
|
@@ -305,7 +305,7 @@ import { OTHER_SYSTEMS_TAB, UserSystemTab } from './domains/anzuUser/utils/userT
|
|
|
305
305
|
import { useUserCreateFromSource, UseUserCreateFromSourceOptions } from './domains/anzuUser/composables/userCreateFromSource';
|
|
306
306
|
import { USER_PROBE_ENTITY, UserSystemRefreshHook } from './domains/anzuUser/composables/userSystemProbe';
|
|
307
307
|
import { default as AUserSystemOverview } from './domains/anzuUser/components/AUserSystemOverview.vue';
|
|
308
|
-
export { ACard, AProgress, ARow, AChipNoLink, AAlerts, AActionbar, AActionbarTarget, ALayoutLoader, ALayoutSwitch, actionbarSlot, createTeleportSlot, type TeleportSlot, ABooleanValue, ASystemEntityScope, AFormTextField, AFormTextarea, AFormDatetimePicker, AFormFlagDatetimePicker, AFormRemoteCheckbox, AFormRemoteSwitch, AFormSwitch, AFormValueObjectOptionsSelect, ADatetime, ADatetimePicker, ADatatableConfigButton, ADialogToolbar, ACreateDialog, AJobStatusChip, ACachedChip, ACachedUserChip, AAdminSwitcher, ATimeTrackingFields, Acl, ACopyText, AIconGroup, AUserAndTimeTrackingFields, AActionCloseButtonHistory, AActionCreateButton, AActionDeleteButton, AActionEditButton, AActionSaveButton, ATableCopyIdButton, ATableDetailButton, ATableEditButton, ABtnSplit, AThemeSelect, ALanguageSelect, ASystemBar, AAnzuUserAvatar, AAvatarColorPicker, ACurrentUserDropdown, AJobDetailCommon, AJobPriorityChip, AJobBaseCreateForm, ACustomDataForm, ACustomDataFormElement, AImageWidget, AImageWidgetInner, AImageMediaWidget, AImageWidgetSimple, AMediaWidgetSimple, AImageWidgetMultiple, AImageWidgetMultipleInner, AImageWidgetMultipleSimple, AImageMassOperations, AImagePublicInput, ADamAssetImageRoiSelect, ACollabLockedByUser, ACollabManagement, AFileInput, AAssetSelect, AAssetListInner, ABooleanSelect, ADamExtSystemRemoteAutocomplete, ADamExternalProviderAssetSelect, ADamDistributionServiceSelect, ADamAssetLicenceRemoteAutocomplete, ADamAssetListViewRemoteAutocomplete, ADamAssetLicenceGroupRemoteAutocomplete, ADamAuthorFilterRemoteAutocomplete, ADamKeywordFilterRemoteAutocomplete, ADamUserFilterRemoteAutocomplete, ADamUserRemoteAutocomplete, ADamAdminAssetLink, ALoginView, ALogoutView, AUnauthorizedView, ANotFoundView, AGenericView, useRouteHistory, type NavigateBackOptions, type NavigateBackTarget, type RouteHistoryEntry, handleRecordLoadError, useRecordPage, type UseRecordPageOptions, type UseRecordPageReturn, defineRecordLoader, defineRecordSave, trackNavigation, isNavigationPending, usePageNavigation, type UsePageNavigationReturn, createNavigationErrorHandler, type NavigationErrorHandlerOptions, useRemainingTime, useAlerts, useTheme, defineCached, useCachedItem, Theme, type ThemeType, useLanguageSettings, modifyLanguageSettings, useLoginStatus, generateDatatableMinMaxSelectStrategy, useCustomDataFormElementType, useDamConfigState, useUploadQueueItemFactory, useDamUploadChunkSize, useDamAcceptTypeAndSizeHelper, useAssetSuggestions, destroyDamNotifications, initDamNotifications, useDamNotifications, useDamNotificationsConnection, createUploadSettlement, uploadSettlementRuntime, UPLOAD_POLL_SCHEDULE, useDropzoneGlobalDragState, useDamKeywordFactory, useDamAuthorFactory, useDamAuthorType, useDamDistributionServiceType, useDamAssetLicenceInnerFilter, useImageActions, useCommonAdminImageOptions, defineAuth, useAclAllowed, AuthUnavailableError, type AuthCookieState, createRefreshRequestInterceptor, createRefreshSession, isInCauseChain, type RefreshResult, SessionExpiredError, broadcastSessionEnd, endSession, sessionLive, useSessionEnd, watchSessionEnd, defineBreadcrumbs, useDamCachedUsers, useDamCachedAssetLicences, useUnreleasedFeatures, useDebugFeatures, useSentry, useUserActivity, type GrantType, Grant, useGrant, type GrantOriginType, GrantOrigin, GrantOriginDefault, useGrantOrigin, LogLevel, type LogLevelType, type IntegerId, type IntegerIdNullable, type DocId, type DocIdNullable, type DatetimeUTCNullable, type DatetimeUTC, type DateUTC, type DatetimePickerType, type AnzuUser, type BaseUser, type AnzuUserMinimal, type AnzuUserAndTimeTrackingAware, type ValueObjectOption, type CreatedByAware, type PermissionConfig, type PermissionTranslationGroup, type PermissionGroup, type PermissionGroupMinimal, type VuetifyIconValue, type JobBase, type JobUserDataDelete, JOB_RESOURCE_USER_DATA_DELETE, JobStatus, JobStatusDefault, type JobStatusType, type JobBaseResource, useCommonJobFactory, type AclValue, type AclRegistry, type AclValueOf, type RegisteredAclValue, type Permissions, type PluginOptions, type CommonAdminImageOptions, type CommonAdminCoreDamOptions, type CommonAdminCollabOptions, type LanguageCode, type Immutable, type ResourceNameSystemAware, type ValidationScope, type AFormFieldValidation, type CommonAdminGlobalComponents, type ACreateDialogValidation, type Log, type ApiInfiniteResponseList, type DatatableOrderingOption, type DatatableOrderingOptions, type DatatableSortBy, type SortOrderType, type ObjectLeaves, type UniqueValues, ensureUniqueValues, type CachedItem, type AddToCachedArgs, type CachedUnresolvedReason, type DefineCachedOptions, type RecordWasType, type UrlParams, type AssetSelectReturnData, AssetSelectReturnType, type AssetSelectReturnTypeType, type AssetSelectUsageHolder, type SortableItemDataAware, type AssetFileProperties, type AssetSearchListItemDto, type AssetSingleUseUsage, type AssetSingleUseUsageEntry, type AssetSingleUseUsageStatusType, type AssetDetailItemDto, type AssetMetadataDto, type AssetCustomData, type AssetMetadataSuggestions, AssetFileFailReason, type AssetFileFailReasonType, AssetFileProcessStatus, type AssetFileProcessStatusType, AssetFileLinkType, type AssetFileLinkTypeType, type AssetFile, type AssetFileDocument, type AssetFileVideo, type AssetFileAudio, type AssetFileImage, type AssetFileNullable, type AssetFileLink, type AssetFileLinks, type AssetFileRoute, AssetFileRouteStatus, type AssetFileRouteStatusType, type AssetFileMainRouteAware, type AssetFileDownloadLink, type AssetFileImagePreviewNullable, assetFileIsImageFile, assetFileIsVideoFile, assetFileIsAudioFile, type UploadQueue, type UploadQueueItem, UploadQueueItemStatus, type UploadQueueItemStatusType, UploadQueueItemType, type UploadQueueItemTypeType, type CustomDataAware, type CustomDataValue, type CustomDataFormElement, type CustomDataFormElementAttributes, CustomDataFormElementType, CustomDataFormElementTypeDefault, type CustomDataFormElementTypeType, DamAssetType, DamAssetTypeDefault, type DamAssetTypeType, AssetSingleUseUsageStatus, DamAssetStatus, DamAssetStatusDefault, type DamAssetStatusType, type DamPubConfig, type DamPrvConfig, type DamExtSystemConfig, type DamDistributionServiceName, type DamExtSystemConfigItem, type DamExtSystemConfigItemImage, type DamExternalProviderAssetConfig, type DamExternalProviderAssetName, type DamDistributionConfig, type DamDistributionRequirementsConfig, DamDistributionRequirementStrategy, type DamDistributionRequirementStrategyType, type DamDistributionRequirementsCategorySelectConfig, type DamExtSystemAssetTypeExifMetadata, DamDistributionServiceType, type DamDistributionServiceTypeType, DamDistributionStatus, type DamDistributionStatusType, UserAuthType, type UserAuthTypeType, type DamUploadStartResponse, type DamNotificationNameType, DamNotificationName, type DamNotificationListenerOptions, UploadRowRole, type UploadRowRoleType, type UploadSettlement, type UploadSettlementProfile, type UploadSettlementEvent, type UploadSettlementTarget, type UploadSettlePolicy, type UploadRefreshOutcome, type UploadReadOptions, type UploadSettlementScheduler, type UploadSettlementVisibility, type ImageAware, type ImageOwner, applyImageOwner, type ImageCreateUpdateAware, type ImageCreateUpdateAwareKeyed, type UploadMetadataToImageMapFn, type UploadMetadataToImageMapItem, type AssetSelectMetadataToImageMapFn, isImageCreateUpdateAware, type ImageMediaCollabValue, type MediaAware, isMediaAware, type DamMediaFromDam, type DamMedia, DamMediaType, type DamMediaTypeType, type DamAuthor, type DamAuthorMinimal, type DamKeyword, type DamKeywordMinimal, DamAuthorType, type DamAuthorTypeType, type DamExtSystem, type DamExtSystemMinimal, type DamCurrentUserDto, type DamAssetLicence, type DamAssetLicenceCached, type DamAssetLicenceExtended, type DamAssetLicenceFlags, type DamAssetLicenceMinimal, type DamAssetLicenceSelectFields, type DamAssetListViewMinimal, type DamAssetListViewResolved, type DamAssetLicenceGroup, type DamUserUpdateDto, type DamUser, type BreadcrumbItem, type Breadcrumbs, type UploadQueueKey, type DamConfigLicenceExtSystemReturnType, useAnzuUserFactory, usePermissionConfigFactory, usePermissionGroupFactory, cloneDeep, isEmpty, isEmptyObject, isObject, isArray, isFunction, isBoolean, isDocId, isNull, isUndefined, isDefined, isInt, isString, isNumber, objectGetValueByPath, objectSetValueByPath, objectDeletePropertyByPath, objectDeepFreeze, stringToInt, stringToFloat, stringToSlug, stringSplitOnFirstOccurrence, stringToKebabCase, stringIsValidEmail, stringToBooleanExact, DATETIME_MIN, DATETIME_MAX, dateTimeEndOfDay, dateTimeStartOfDay, dateTimeNow, dateTimeFriendly, dateTimePretty, dateModifyMinutes, dateToUtc, dateNow, dateTimeToDate, datePretty, dateUtcPretty, dateUtcToday, timePretty, dateDiff, type DateDiffUnit, prettyBytes, prettyDuration, booleanToInteger, arrayItemToggle, arrayFromArgs, arrayFlatten, type NestedArray, arraysHaveSameElements, browserHistoryReplaceUrlByRouter, eventClickBlur, generateUUIDv1, generateUUIDv4, isOneOf, useJobBaseResource, useJobStatus, fetchDamAssetLicenceListByIds, fetchDamAssetListViewListByIds, useFetchDamAssetLicenceList, fetchDamAssetLicenceGroupListByIds, fetchDamExtSystemListByIds, fetchDamUserListByIds, useFetchDamUserList, updateDamUser, fetchDamUser, fetchAssetAndCheckForSingleUseByFileIds, fetchAsset, fetchAssetAsCmsMedia, fetchAssetByFileId, type IdsGroupedByLicences, messagesCs, messagesEn, messagesSk, SystemScopeKey, SubjectScopeKey, HTTP_STATUS_OK, HTTP_STATUS_CREATED, HTTP_STATUS_NO_CONTENT, HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_UNAUTHORIZED, HTTP_STATUS_FORBIDDEN, HTTP_STATUS_NOT_FOUND, HTTP_STATUS_UNPROCESSABLE_ENTITY, ROLE_SUPER_ADMIN, NEW_LINE_MARK, COMMON_CONFIG, SORT_BY_SCORE, SORT_BY_SCORE_BEST, SORT_BY_SCORE_DATE, SORT_BY_ID, SortOrder, ImageWidgetUploadConfigKey, useValidate, useCollabInit, useCommonAdminCollabOptions, useCollabCurrentUserId, useCollabState, useCollabField, useCollabRoom, useCollabHelpers, useCollabAnyDataChange, type CollabGatheringBufferDataEvent, useCollabReconnectEventBus, useCollabGatheringBufferDataEventBus, CollabFieldLockType, type CollabFieldLockTypeType, CollabFieldLockStatus, type CollabFieldLockStatusType, type CollabFieldLockStatusPayload, type CollabUserId, type CollabUserIdNullable, type CollabRoom, CollabStatus, type CollabStatusType, CollabConnectionState, type CollabConnectionStateType, CollabReconnectVerdict, type CollabReconnectVerdictType, type CollabRoomInfo, type CollabRoomsInfo, type CollabFieldDataEnvelope, type CollabFieldData, type CollabFieldName, type CollabFieldLock, type CollabRoomLocks, type CollabRoomData, type CollabRoomPlainData, CollabAccessRoomStatus, type CollabAccessRoomStatusType, CollabChangeRoomLockStatus, type CollabChangeRoomLockStatusType, type CollabFieldLockOptions, CollabRoomJoinStrategy, type CollabRoomJoinStrategyType, type CollabJoinAckOptions, type CollabRoomOptions, CollabRequestToTakeModerationStatus, type CollabRequestToTakeModerationStatusType, CollabRequestToJoinStatus, type CollabRequestToJoinStatusType, type CollabCachedUsersMap, type CollabComponentConfig, COLLAB_FIELD_PREFIX_COMMENT, COLLAB_FIELD_PREFIX_EMBED, useDamConfigStore, useDamConfigStoreOf, type DamConfigStore, useImageStore, type CommonAdminI18n, slovakPluralizationRule, isAnzuApiForbiddenError, axiosErrorResponseIsForbidden, AnzuApiForbiddenError, isAnzuApiResponseCodeError, AnzuApiResponseCodeError, isAnzuApiForbiddenOperationError, axiosErrorResponseHasForbiddenOperationData, AnzuApiForbiddenOperationError, isAnzuApiValidationError, hasAnzuApiValidationErrorSpecific, axiosErrorResponseHasValidationData, AnzuApiValidationError, isAnzuFatalError, AnzuFatalError, isAnzuApiTimeoutError, AnzuApiTimeoutError, AnzuApiCancelledError, isAnzuApiCancelledError, AnzuError, isAnzuError, isAnzuApiAxiosError, AnzuApiAxiosError, type ValidationError, type AnzuApiValidationResponseData, isAnzuApiDependencyExistsError, axiosErrorResponseHasDependencyExistsData, AnzuApiDependencyExistsError, AnzuSystemsCommonAdmin, useCommonVuetifyConfig, createAnzuVuetify, type CreateAnzuVuetifyOptions, loadCommonFonts, getAssetTypeByMimeType, damFileTypeFix, localTimeShiftInSeconds, useSystemBar, AFilterWrapper, AFilterWrapperSidebar, AFilterWrapperSubjectSelect, AFiltersSelected, AFilterBooleanSelect, AFilterInteger, AFilterRemoteAutocomplete, AFilterString, AFilterTimeInterval, AFilterValueObjectOptionsSelect, FilterConfigKey, FilterDataKey, FilterInnerConfigKey, FilterInnerDataKey, ADatatableOrdering, ADatatablePagination, DatatablePaginationKey, AFormRemoteAutocomplete, createFilterRemoteAutocomplete, createRemoteAutocomplete, type CreateRemoteAutocompleteOptions, type RemoteAutocompleteScope, type FilterRemoteAutocompleteComponent, type FilterRemoteAutocompleteProps, type RemoteAutocompleteComponent, type RemoteAutocompleteProps, type RemoteInnerFilter, type RemoteSelectActions, AFormRemoteAutocompleteWithCached, buildFilterHash, createFilter, createFilterStore, isRouterSafeHash, useFilterHelpers, useDatatableList, type FilterHelpersMoreOptions, type FilterConfig, type FilterData, type FilterStoreIdentifier, type MakeFilterOption, type AllowedFilterValues, type FilterField, type FilterType, type FilterVariant, TimeIntervalSpecialOptions, type TimeIntervalToolsValue, type TimeIntervalSpecialOptionsType, type Pagination, useApiFetchByIds, useApiFetchItems, useApiFetchList, useApiCommand, useApiRequest, defineApiClient, startWithEnvConfig, checkForNewVersion, requestAppReload, RELOAD_VETO_GRACE, skipUrlPrefixes, type ApiClientSetup, type ApiClientRequestInterceptor, type ApiClientResponseInterceptor, type UseApiRequestParams, type ExecuteRequestParams, type UseApiRequestReturnType, type UseApiFetchListParams, type FetchListParams, type UseApiFetchListReturnType, type UseApiFetchByIdsParams, type FetchByIdsParams, type UseApiFetchByIdsReturnType, type UseApiFetchItemsParams, type FetchItemsParams, type ItemsShape, type UseApiFetchItemsReturnType, type UseApiFetchListBatchParams, type FetchListBatchParams, type UseApiFetchListBatchReturnType, defaultApiErrorLogger, apiErrorStatus, apiErrorIsReported, setApiErrorLogger, type ApiErrorContext, type ApiErrorLogger, useApiFetchListBatch, useApiQueryBuilder, generateListQuery, usePagination, createDatatableColumnsConfig, useSubjectSelect, ASubjectSelect, AListEditor, ASortableListEditor, ANestedSortableListEditor, AUnsavedConfirmDialog, useUnsavedChangesGuard, useUnsavedSection, type UnsavedSectionDescriptor, type UnsavedSectionSource, useListEditorController, type ListEditorHandle, type ExposedListEditorHandle, type UseListEditorControllerOptions, type ListEditorChanges, type ListEditorValidationResult, type GetKey, type PositionOption, type PositionStrategy, type PositionAction, renumberPositions, sortByPosition, sortByPositionDeep, type RenumberPositionsOptions, nextListEditorTempId, type NestedViewItem, useNestedListEditorController, type NestedListEditorHandle, type ExposedNestedListEditorHandle, type ExposedNestedSortableListEditorHandle, type NestedSortableListEditorExtras, type UseNestedListEditorControllerOptions, type NestedListEditorChanges, type ListEditorKey, type ListEditorValidationState, type ListViewItem, type NestedPositionHint, type NestedTree, type NestedTreeNode, type PositionHint, useJobApi, type AxiosClientFn, useUserAdminConfigApi, type UserAdminConfig, UserAdminConfigType, type UserAdminConfigTypeType, UserAdminConfigLayoutType, type UserAdminConfigLayoutTypeType, type UserAdminConfigDataFilterBookmark, type UserAdminConfigDataPinnedWidgets, useUserAdminConfigFactory, ALogListView, ALogDetailView, LogType, LogTypeDefault, type LogTypeType, isLogType, DEFAULT_LOG_PATHS, type LogPaths, type LogTimeWindow, APermissionGroupDatatable, APermissionGroupDetail, APermissionGroupManage, usePermissionGroupActions, type PermissionGroupActionsParams, AAnzuUserDatatable, AAnzuUserForm, AUserCopyPermissionsDialog, useAnzuUserActions, type AnzuUserActionsParams, defineUserSystemDescriptor, descriptorMayWrite, type UserSystemWriteAction, resolveProbeEndpoint, resolveMetadataWrite, resolveEnabledWrite, resolveCreateEndpoint, type UserSystemDescriptor, type AnyUserSystemDescriptor, type UserSystemEndpoints, type AnzuUserEndpointPair, type BaseUserEndpointPair, type UserSystemExtraState, type UserSystemManageTarget, AUserTabsShell, AUserOtherSystemsTable, AUserMissingAccount, OTHER_SYSTEMS_TAB, type UserSystemTab, useUserCreateFromSource, type UseUserCreateFromSourceOptions, USER_PROBE_ENTITY, type UserSystemRefreshHook, AUserSystemOverview, };
|
|
308
|
+
export { ACard, AProgress, ARow, AChipNoLink, AAlerts, AActionbar, AActionbarTarget, ALayoutLoader, ALayoutSwitch, actionbarSlot, createTeleportSlot, type TeleportSlot, ABooleanValue, ASystemEntityScope, AFormTextField, AFormTextarea, AFormDatetimePicker, AFormFlagDatetimePicker, AFormRemoteCheckbox, AFormRemoteSwitch, AFormSwitch, AFormValueObjectOptionsSelect, ADatetime, ADatetimePicker, ADatatableConfigButton, ADialogToolbar, ACreateDialog, AJobStatusChip, ACachedChip, ACachedUserChip, AAdminSwitcher, ATimeTrackingFields, Acl, ACopyText, AIconGroup, AUserAndTimeTrackingFields, AActionCloseButtonHistory, AActionCreateButton, AActionDeleteButton, AActionEditButton, AActionSaveButton, ATableCopyIdButton, ATableDetailButton, ATableEditButton, ABtnSplit, AThemeSelect, ALanguageSelect, ASystemBar, AAnzuUserAvatar, AAvatarColorPicker, ACurrentUserDropdown, AJobDetailCommon, AJobPriorityChip, AJobBaseCreateForm, ACustomDataForm, ACustomDataFormElement, AImageWidget, AImageWidgetInner, AImageMediaWidget, AImageWidgetSimple, AMediaWidgetSimple, AImageWidgetMultiple, AImageWidgetMultipleInner, AImageWidgetMultipleSimple, AImageMassOperations, AImagePublicInput, ADamAssetImageRoiSelect, ACollabLockedByUser, ACollabManagement, AFileInput, AAssetSelect, AAssetListInner, ABooleanSelect, ADamExtSystemRemoteAutocomplete, ADamExternalProviderAssetSelect, ADamDistributionServiceSelect, ADamAssetLicenceRemoteAutocomplete, ADamAssetListViewRemoteAutocomplete, ADamAssetLicenceGroupRemoteAutocomplete, ADamAuthorFilterRemoteAutocomplete, ADamKeywordFilterRemoteAutocomplete, ADamUserFilterRemoteAutocomplete, ADamUserRemoteAutocomplete, ADamAdminAssetLink, ALoginView, ALogoutView, AUnauthorizedView, ANotFoundView, AGenericView, useRouteHistory, type NavigateBackOptions, type NavigateBackTarget, type RouteHistoryEntry, handleRecordLoadError, useRecordPage, type UseRecordPageOptions, type UseRecordPageReturn, defineRecordLoader, defineRecordSave, trackNavigation, isNavigationPending, usePageNavigation, type UsePageNavigationReturn, createNavigationErrorHandler, type NavigationErrorHandlerOptions, useRemainingTime, useAlerts, useTheme, defineCached, useCachedItem, Theme, type ThemeType, useLanguageSettings, modifyLanguageSettings, useLoginStatus, generateDatatableMinMaxSelectStrategy, useCustomDataFormElementType, useDamConfigState, useUploadQueueItemFactory, useDamUploadChunkSize, useDamAcceptTypeAndSizeHelper, useAssetSuggestions, destroyDamNotifications, initDamNotifications, useDamNotifications, useDamNotificationsConnection, createUploadSettlement, uploadSettlementRuntime, UPLOAD_POLL_SCHEDULE, useDropzoneGlobalDragState, useDamKeywordFactory, useDamAuthorFactory, useDamAuthorType, useDamDistributionServiceType, useDamAssetLicenceInnerFilter, useImageActions, useCommonAdminImageOptions, defineAuth, useAclAllowed, AuthUnavailableError, type AuthCookieState, createRefreshRequestInterceptor, createRefreshSession, isInCauseChain, type RefreshResult, SessionExpiredError, broadcastSessionEnd, endSession, sessionLive, useSessionEnd, watchSessionEnd, defineBreadcrumbs, useDamCachedUsers, useDamCachedAssetLicences, useUnreleasedFeatures, useDebugFeatures, useSentry, useUserActivity, type GrantType, Grant, useGrant, type GrantOriginType, GrantOrigin, GrantOriginDefault, useGrantOrigin, LogLevel, type LogLevelType, type IntegerId, type IntegerIdNullable, type DocId, type DocIdNullable, type DatetimeUTCNullable, type DatetimeUTC, type DateUTC, type DatetimePickerType, type AnzuUser, type BaseUser, type AnzuUserMinimal, type AnzuUserAndTimeTrackingAware, type ValueObjectOption, type CreatedByAware, type PermissionConfig, type PermissionTranslationGroup, type PermissionGroup, type PermissionGroupMinimal, type VuetifyIconValue, type JobBase, type JobUserDataDelete, JOB_RESOURCE_USER_DATA_DELETE, JobStatus, JobStatusDefault, type JobStatusType, type JobBaseResource, useCommonJobFactory, type AclValue, type AclRegistry, type AclValueOf, type RegisteredAclValue, type Permissions, type PluginOptions, type CommonAdminImageOptions, type CommonAdminCoreDamOptions, type CommonAdminCollabOptions, type LanguageCode, type Immutable, type ResourceNameSystemAware, type ValidationScope, type AFormFieldValidation, type CommonAdminGlobalComponents, type ACreateDialogValidation, type Log, type ApiInfiniteResponseList, type DatatableOrderingOption, type DatatableOrderingOptions, type DatatableSortBy, type SortOrderType, type ObjectLeaves, type UniqueValues, ensureUniqueValues, type CachedItem, type AddToCachedArgs, type CachedUnresolvedReason, type DefineCachedOptions, type RecordWasType, type UrlParams, type AssetSelectReturnData, AssetSelectReturnType, type AssetSelectReturnTypeType, type AssetSelectUsageHolder, type SortableItemDataAware, type AssetFileProperties, type AssetSearchListItemDto, type AssetSingleUseUsage, type AssetSingleUseUsageEntry, type AssetSingleUseUsageStatusType, type AssetDetailItemDto, type AssetMetadataDto, type AssetCustomData, type AssetMetadataSuggestions, AssetFileFailReason, type AssetFileFailReasonType, AssetFileProcessStatus, type AssetFileProcessStatusType, AssetFileLinkType, type AssetFileLinkTypeType, type AssetFile, type AssetFileDocument, type AssetFileVideo, type AssetFileAudio, type AssetFileImage, type AssetFileNullable, type AssetFileLink, type AssetFileLinks, type AssetFileRoute, AssetFileRouteStatus, type AssetFileRouteStatusType, type AssetFileMainRouteAware, type AssetFileDownloadLink, type AssetFileImagePreviewNullable, assetFileIsImageFile, assetFileIsVideoFile, assetFileIsAudioFile, type UploadQueue, type UploadQueueItem, UploadQueueItemStatus, type UploadQueueItemStatusType, UploadQueueItemType, type UploadQueueItemTypeType, type CustomDataAware, type CustomDataValue, type CustomDataFormElement, type CustomDataFormElementAttributes, CustomDataFormElementType, CustomDataFormElementTypeDefault, type CustomDataFormElementTypeType, DamAssetType, DamAssetTypeDefault, type DamAssetTypeType, AssetSingleUseUsageStatus, DamAssetStatus, DamAssetStatusDefault, type DamAssetStatusType, type DamPubConfig, type DamPrvConfig, type DamExtSystemConfig, type DamDistributionServiceName, type DamExtSystemConfigItem, type DamExtSystemConfigItemImage, type DamExternalProviderAssetConfig, type DamExternalProviderAssetName, type DamDistributionConfig, type DamDistributionRequirementsConfig, DamDistributionRequirementStrategy, type DamDistributionRequirementStrategyType, type DamDistributionRequirementsCategorySelectConfig, type DamExtSystemAssetTypeExifMetadata, DamDistributionServiceType, type DamDistributionServiceTypeType, DamDistributionStatus, type DamDistributionStatusType, UserAuthType, type UserAuthTypeType, type DamUploadStartResponse, type DamNotificationNameType, DamNotificationName, type DamNotificationListenerOptions, UploadRowRole, type UploadRowRoleType, type UploadSettlement, type UploadSettlementProfile, type UploadSettlementEvent, type UploadSettlementTarget, type UploadSettlePolicy, type UploadRefreshOutcome, type UploadReadOptions, type UploadSettlementScheduler, type UploadSettlementVisibility, type ImageAware, type ImageOwner, applyImageOwner, type ImageCreateUpdateAware, type ImageCreateUpdateAwareKeyed, type UploadMetadataToImageMapFn, type UploadMetadataToImageMapItem, type AssetSelectMetadataToImageMapFn, isImageCreateUpdateAware, type ImageMediaCollabValue, type MediaAware, isMediaAware, type DamMediaFromDam, type DamMedia, DamMediaType, type DamMediaTypeType, type DamAuthor, type DamAuthorMinimal, type DamKeyword, type DamKeywordMinimal, DamAuthorType, type DamAuthorTypeType, type DamExtSystem, type DamExtSystemMinimal, type DamCurrentUserDto, type DamAssetLicence, type DamAssetLicenceCached, type DamAssetLicenceExtended, type DamAssetLicenceFlags, type DamAssetLicenceMinimal, type DamAssetLicenceSelectFields, type DamAssetListViewMinimal, type DamAssetListViewResolved, type DamAssetLicenceGroup, type DamUserUpdateDto, type DamUser, type BreadcrumbItem, type Breadcrumbs, type UploadQueueKey, type DamConfigLicenceExtSystemReturnType, useAnzuUserFactory, usePermissionConfigFactory, usePermissionGroupFactory, cloneDeep, isEmpty, isEmptyObject, isObject, isArray, isFunction, isBoolean, isDocId, isNull, isUndefined, isDefined, isInt, isString, isNumber, objectGetValueByPath, objectSetValueByPath, objectDeletePropertyByPath, objectDeepFreeze, stringToInt, stringToFloat, stringToSlug, stringSplitOnFirstOccurrence, stringToKebabCase, stringIsValidEmail, stringToBooleanExact, DATETIME_MIN, DATETIME_MAX, dateTimeEndOfDay, dateTimeStartOfDay, dateTimeNow, dateTimeFriendly, dateTimePretty, dateModifyMinutes, dateToUtc, dateNow, dateTimeToDate, datePretty, dateUtcPretty, dateUtcToday, timePretty, dateDiff, type DateDiffUnit, prettyBytes, prettyDuration, booleanToInteger, arrayItemToggle, arrayFromArgs, arrayFlatten, type NestedArray, arraysHaveSameElements, browserHistoryReplaceUrlByRouter, eventClickBlur, generateUUIDv1, generateUUIDv4, isOneOf, useJobBaseResource, useJobStatus, fetchDamAssetLicenceListByIds, fetchDamAssetListViewListByIds, useFetchDamAssetLicenceList, fetchDamAssetLicenceGroupListByIds, fetchDamExtSystemListByIds, fetchDamUserListByIds, useFetchDamUserList, updateDamUser, fetchDamUser, fetchAssetAndCheckForSingleUseByFileIds, fetchAsset, fetchAssetAsCmsMedia, fetchAssetByFileId, type IdsGroupedByLicences, messagesCs, messagesEn, messagesSk, SystemScopeKey, SubjectScopeKey, HTTP_STATUS_OK, HTTP_STATUS_CREATED, HTTP_STATUS_NO_CONTENT, HTTP_STATUS_BAD_REQUEST, HTTP_STATUS_UNAUTHORIZED, HTTP_STATUS_FORBIDDEN, HTTP_STATUS_NOT_FOUND, HTTP_STATUS_UNPROCESSABLE_ENTITY, ROLE_SUPER_ADMIN, NEW_LINE_MARK, COMMON_CONFIG, SORT_BY_SCORE, SORT_BY_SCORE_BEST, SORT_BY_SCORE_DATE, SORT_BY_ID, SortOrder, ImageWidgetUploadConfigKey, useValidate, useCollabInit, useCommonAdminCollabOptions, useCollabCurrentUserId, useCollabState, useCollabField, useCollabRoom, useCollabHelpers, useCollabAnyDataChange, type CollabGatheringBufferDataEvent, useCollabReconnectEventBus, useCollabGatheringBufferDataEventBus, CollabFieldLockType, type CollabFieldLockTypeType, CollabFieldLockStatus, type CollabFieldLockStatusType, type CollabFieldLockStatusPayload, type CollabUserId, type CollabUserIdNullable, type CollabRoom, CollabStatus, type CollabStatusType, CollabConnectionState, type CollabConnectionStateType, CollabReconnectVerdict, type CollabReconnectVerdictType, type CollabRoomInfo, type CollabRoomsInfo, type CollabFieldDataEnvelope, type CollabFieldData, type CollabFieldName, type CollabFieldLock, type CollabRoomLocks, type CollabRoomData, type CollabRoomPlainData, CollabAccessRoomStatus, type CollabAccessRoomStatusType, CollabChangeRoomLockStatus, type CollabChangeRoomLockStatusType, type CollabFieldLockOptions, CollabRoomJoinStrategy, type CollabRoomJoinStrategyType, type CollabJoinAckOptions, type CollabRoomOptions, CollabRequestToTakeModerationStatus, type CollabRequestToTakeModerationStatusType, CollabRequestToJoinStatus, type CollabRequestToJoinStatusType, type CollabCachedUsersMap, type CollabComponentConfig, COLLAB_FIELD_PREFIX_COMMENT, COLLAB_FIELD_PREFIX_EMBED, useDamConfigStore, useDamConfigStoreOf, type DamConfigStore, useImageStore, type CommonAdminI18n, slovakPluralizationRule, isAnzuApiForbiddenError, axiosErrorResponseIsForbidden, AnzuApiForbiddenError, isAnzuApiResponseCodeError, AnzuApiResponseCodeError, isAnzuApiForbiddenOperationError, axiosErrorResponseHasForbiddenOperationData, AnzuApiForbiddenOperationError, isAnzuApiValidationError, hasAnzuApiValidationErrorSpecific, axiosErrorResponseHasValidationData, AnzuApiValidationError, isAnzuFatalError, AnzuFatalError, isAnzuApiTimeoutError, AnzuApiTimeoutError, AnzuApiCancelledError, isAnzuApiCancelledError, AnzuError, isAnzuError, isAnzuApiAxiosError, AnzuApiAxiosError, type ValidationError, type AnzuApiValidationResponseData, isAnzuApiDependencyExistsError, axiosErrorResponseHasDependencyExistsData, AnzuApiDependencyExistsError, AnzuSystemsCommonAdmin, useCommonVuetifyConfig, createAnzuVuetify, type CreateAnzuVuetifyOptions, loadCommonFonts, getAssetTypeByMimeType, damFileTypeFix, localTimeShiftInSeconds, useSystemBar, AFilterWrapper, AFilterWrapperSidebar, AFilterWrapperSubjectSelect, AFiltersSelected, AFilterBooleanSelect, AFilterInteger, AFilterRemoteAutocomplete, AFilterString, AFilterTimeInterval, AFilterValueObjectOptionsSelect, FilterConfigKey, FilterDataKey, FilterInnerConfigKey, FilterInnerDataKey, ADatatableOrdering, ADatatablePagination, DatatablePaginationKey, AFormRemoteAutocomplete, createFilterRemoteAutocomplete, createRemoteAutocomplete, type CreateRemoteAutocompleteOptions, type RemoteAutocompleteScope, type FilterRemoteAutocompleteComponent, type FilterRemoteAutocompleteProps, type RemoteAutocompleteComponent, type RemoteAutocompleteProps, type RemoteInnerFilter, type RemoteSelectActions, AFormRemoteAutocompleteWithCached, buildFilterHash, createFilter, createFilterStore, isRouterSafeHash, useFilterHelpers, useDatatableList, type FilterHelpersMoreOptions, type FilterConfig, type FilterData, type FilterStoreIdentifier, type MakeFilterOption, type AllowedFilterValues, type FilterField, type FilterType, type FilterVariant, TimeIntervalSpecialOptions, type TimeIntervalToolsValue, type TimeIntervalSpecialOptionsType, type Pagination, useApiFetchByIds, useApiFetchItems, useApiFetchList, useApiCommand, useApiRequest, defineApiClient, startWithEnvConfig, checkForNewVersion, type CheckForNewVersionOptions, requestAppReload, RELOAD_VETO_GRACE, skipUrlPrefixes, type ApiClientSetup, type ApiClientRequestInterceptor, type ApiClientResponseInterceptor, type UseApiRequestParams, type ExecuteRequestParams, type UseApiRequestReturnType, type UseApiFetchListParams, type FetchListParams, type UseApiFetchListReturnType, type UseApiFetchByIdsParams, type FetchByIdsParams, type UseApiFetchByIdsReturnType, type UseApiFetchItemsParams, type FetchItemsParams, type ItemsShape, type UseApiFetchItemsReturnType, type UseApiFetchListBatchParams, type FetchListBatchParams, type UseApiFetchListBatchReturnType, defaultApiErrorLogger, apiErrorStatus, apiErrorIsReported, setApiErrorLogger, type ApiErrorContext, type ApiErrorLogger, useApiFetchListBatch, useApiQueryBuilder, generateListQuery, usePagination, createDatatableColumnsConfig, useSubjectSelect, ASubjectSelect, AListEditor, ASortableListEditor, ANestedSortableListEditor, AUnsavedConfirmDialog, useUnsavedChangesGuard, useUnsavedSection, type UnsavedSectionDescriptor, type UnsavedSectionSource, useListEditorController, type ListEditorHandle, type ExposedListEditorHandle, type UseListEditorControllerOptions, type ListEditorChanges, type ListEditorValidationResult, type GetKey, type PositionOption, type PositionStrategy, type PositionAction, renumberPositions, sortByPosition, sortByPositionDeep, type RenumberPositionsOptions, nextListEditorTempId, type NestedViewItem, useNestedListEditorController, type NestedListEditorHandle, type ExposedNestedListEditorHandle, type ExposedNestedSortableListEditorHandle, type NestedSortableListEditorExtras, type UseNestedListEditorControllerOptions, type NestedListEditorChanges, type ListEditorKey, type ListEditorValidationState, type ListViewItem, type NestedPositionHint, type NestedTree, type NestedTreeNode, type PositionHint, useJobApi, type AxiosClientFn, useUserAdminConfigApi, type UserAdminConfig, UserAdminConfigType, type UserAdminConfigTypeType, UserAdminConfigLayoutType, type UserAdminConfigLayoutTypeType, type UserAdminConfigDataFilterBookmark, type UserAdminConfigDataPinnedWidgets, useUserAdminConfigFactory, ALogListView, ALogDetailView, LogType, LogTypeDefault, type LogTypeType, isLogType, DEFAULT_LOG_PATHS, type LogPaths, type LogTimeWindow, APermissionGroupDatatable, APermissionGroupDetail, APermissionGroupManage, usePermissionGroupActions, type PermissionGroupActionsParams, AAnzuUserDatatable, AAnzuUserForm, AUserCopyPermissionsDialog, useAnzuUserActions, type AnzuUserActionsParams, defineUserSystemDescriptor, descriptorMayWrite, type UserSystemWriteAction, resolveProbeEndpoint, resolveMetadataWrite, resolveEnabledWrite, resolveCreateEndpoint, type UserSystemDescriptor, type AnyUserSystemDescriptor, type UserSystemEndpoints, type AnzuUserEndpointPair, type BaseUserEndpointPair, type UserSystemExtraState, type UserSystemManageTarget, AUserTabsShell, AUserOtherSystemsTable, AUserMissingAccount, OTHER_SYSTEMS_TAB, type UserSystemTab, useUserCreateFromSource, type UseUserCreateFromSourceOptions, USER_PROBE_ENTITY, type UserSystemRefreshHook, AUserSystemOverview, };
|
|
309
309
|
export { createCachedChip } from './domains/cached/composables/createCachedChip';
|
|
310
310
|
export type { CreateCachedChipOptions } from './domains/cached/composables/createCachedChip';
|
|
311
311
|
export { createUserAndTimeTrackingFields } from './domains/cached/composables/createUserAndTimeTrackingFields';
|
package/package.json
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"./package.json": "./package.json"
|
|
42
42
|
},
|
|
43
|
-
"version": "2.0.0-rc.
|
|
43
|
+
"version": "2.0.0-rc.29",
|
|
44
44
|
"license": "Apache-2.0",
|
|
45
45
|
"repository": {
|
|
46
46
|
"type": "git",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"release:cleanup": "npx -y --allow-git=all github:anzusystems/release-tools#main cleanup"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@anzusystems/common-admin": "2.0.0-rc.
|
|
83
|
+
"@anzusystems/common-admin": "2.0.0-rc.29",
|
|
84
84
|
"@intlify/unplugin-vue-i18n": "^11.2.8",
|
|
85
85
|
"@mdi/font": "^7.4.47",
|
|
86
86
|
"@sentry/vite-plugin": "11.19.0",
|