@anzusystems/common-admin 2.0.0-rc.14 → 2.0.0-rc.15

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.
Files changed (27) hide show
  1. package/dist/common-admin.js +38 -35
  2. package/dist/domains/anzuUser/api/anzuUserApi.d.ts +1 -1
  3. package/dist/domains/anzuUser/api/anzuUserApi.js +2 -2
  4. package/dist/domains/anzuUser/api/anzuUserApi.js.map +1 -1
  5. package/dist/domains/anzuUser/components/AUserManageButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  6. package/dist/domains/anzuUser/components/AUserMissingAccount.js +6 -0
  7. package/dist/domains/anzuUser/components/AUserMissingAccount.js.map +1 -0
  8. package/dist/domains/anzuUser/components/AUserMissingAccount.vue.d.ts +20 -0
  9. package/dist/domains/anzuUser/components/AUserMissingAccount.vue_vue_type_script_setup_true_lang.js +38 -0
  10. package/dist/domains/anzuUser/components/AUserMissingAccount.vue_vue_type_script_setup_true_lang.js.map +1 -0
  11. package/dist/domains/anzuUser/components/AUserOtherSystemsTable.vue.d.ts +56 -11
  12. package/dist/domains/anzuUser/components/AUserOtherSystemsTable.vue_vue_type_script_setup_true_lang.js +36 -27
  13. package/dist/domains/anzuUser/components/AUserOtherSystemsTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  14. package/dist/domains/anzuUser/components/AUserSystemPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  15. package/dist/domains/anzuUser/components/AUserTabsShell.vue.d.ts +15 -33
  16. package/dist/domains/anzuUser/components/AUserTabsShell.vue_vue_type_script_setup_true_lang.js +54 -155
  17. package/dist/domains/anzuUser/components/AUserTabsShell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  18. package/dist/domains/anzuUser/composables/anzuUserActions.d.ts +2 -0
  19. package/dist/domains/anzuUser/composables/anzuUserActions.js +74 -71
  20. package/dist/domains/anzuUser/composables/anzuUserActions.js.map +1 -1
  21. package/dist/domains/anzuUser/composables/userCreateFromSource.d.ts +70 -0
  22. package/dist/domains/anzuUser/composables/userCreateFromSource.js +62 -0
  23. package/dist/domains/anzuUser/composables/userCreateFromSource.js.map +1 -0
  24. package/dist/domains/anzuUser/utils/userTabs.d.ts +7 -1
  25. package/dist/domains/anzuUser/utils/userTabs.js.map +1 -1
  26. package/dist/lib.d.ts +5 -2
  27. package/package.json +2 -2
@@ -266,38 +266,41 @@ import Io from "./domains/anzuUser/components/AUserCopyPermissionsDialog.js";
266
266
  import { useAnzuUserActions as Lo } from "./domains/anzuUser/composables/anzuUserActions.js";
267
267
  import { defineUserSystemDescriptor as Ro, descriptorMayWrite as zo, resolveCreateEndpoint as Bo, resolveEnabledWrite as Vo, resolveMetadataWrite as Ho, resolveProbeEndpoint as Uo } from "./domains/anzuUser/composables/userSystemDescriptor.js";
268
268
  import Wo from "./domains/anzuUser/components/AUserTabsShell.js";
269
- import { OTHER_SYSTEMS_TAB as Go } from "./domains/anzuUser/utils/userTabs.js";
270
- import Ko from "./domains/anzuUser/components/AUserSystemOverview.js";
271
- import { createCachedChip as qo } from "./domains/cached/composables/createCachedChip.js";
272
- import { createUserAndTimeTrackingFields as Jo } from "./domains/cached/composables/createUserAndTimeTrackingFields.js";
273
- import { useCachedAnzuUsers as Yo } from "./domains/anzuUser/composables/cachedAnzuUsers.js";
274
- import { useCachedPermissionGroups as Xo } from "./domains/permission/group/composables/cachedPermissionGroups.js";
275
- import { syncUserAndTimeTracking as Zo } from "./shared/utils/userAndTimeTracking.js";
276
- import { imageUploadChunk as Qo, imageUploadFinish as $o, imageUploadStart as es } from "./domains/dam/api/damImageApi.js";
277
- import { uploadStop as ts, uploadValidationMessage as ns, useUpload as rs } from "./domains/dam/uploadQueue/composables/uploadService.js";
278
- import { adminDamUploadPreset as is } from "./domains/dam/uploadQueue/presets/uploadPresets.js";
279
- import { UPLOAD_QUEUE_ITEM_CHUNK_SIZE as as, createUploadQueueCore as os } from "./domains/dam/uploadQueue/core/uploadQueueCore.js";
280
- import { adminDamImportRun as ss, adminDamQueuePreset as cs } from "./domains/dam/uploadQueue/presets/queuePresets.js";
281
- import { fillAuthors as ls, fillCustomDataValue as us, fillKeywords as ds } from "./domains/dam/uploadQueue/core/uploadQueueFill.js";
282
- import fs from "./domains/dam/assetDetail/components/AssetImage.js";
283
- import ps from "./domains/dam/assetDetail/components/AssetImageMetaIcons.js";
284
- import ms from "./domains/dam/assetDetail/components/AssetFileFailReasonChip.js";
285
- import { useAssetFileFailReason as hs } from "./domains/dam/assetDetail/composables/assetFileFailReason.js";
286
- import gs from "./domains/dam/assetDetail/components/AssetCustomMetadataForm.js";
287
- import _s from "./domains/dam/uploadQueue/components/UploadQueueButtonStop.js";
288
- import vs from "./domains/dam/keyword/components/KeywordRemoteAutocompleteWithCached.js";
289
- import ys from "./domains/dam/author/components/AuthorRemoteAutocompleteWithCached.js";
290
- import bs from "./domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.js";
291
- import xs from "./domains/dam/author/components/AuthorCreateButton.js";
292
- import { useDamCachedAuthors as Ss } from "./domains/dam/author/composables/cachedAuthors.js";
293
- import { useDamCachedKeywords as Cs } from "./domains/dam/keyword/composables/cachedKeywords.js";
294
- import { useImageRoiStore as ws } from "./domains/dam/cropper/store/imageRoiStore.js";
295
- import { useExtSystemIdForCached as Ts } from "./domains/dam/composables/extSystemIdForCached.js";
296
- import { useDamKeywordAssetTypeConfig as Es } from "./domains/dam/keyword/composables/damKeywordConfig.js";
297
- import { useDamAuthorAssetTypeConfig as Ds } from "./domains/dam/author/composables/damAuthorConfig.js";
298
- import { useFormatAndSizeCheck as Os } from "./domains/ui/file/composables/formatAndSizeCheck.js";
299
- import { UploadQueueSuggestionsKey as ks } from "./domains/dam/uploadQueue/components/uploadQueueBindings.js";
300
- import As from "./domains/dam/uploadQueue/components/UploadQueueItemEditable.js";
301
- import js from "./domains/dam/uploadQueue/components/UploadQueueEditable.js";
302
- import Ms from "./domains/dam/uploadQueue/components/AssetQueueSelectedSidebar.js";
303
- export { L as AActionCloseButtonHistory, R as AActionCreateButton, z as AActionDeleteButton, B as AActionEditButton, V as AActionSaveButton, r as AActionbar, i as AActionbarTarget, _ as AAdminSwitcher, n as AAlerts, Y as AAnzuUserAvatar, Po as AAnzuUserDatatable, Fo as AAnzuUserForm, ce as AAssetListInner, se as AAssetSelect, X as AAvatarColorPicker, Se as ABooleanSelect, e as ABooleanValue, G as ABtnSplit, k as ACachedChip, A as ACachedUserChip, u as ACard, N as AChipNoLink, P as ACollabLockedByUser, F as ACollabManagement, j as ACopyText, g as ACreateDialog, Z as ACurrentUserDropdown, le as ACustomDataForm, ue as ACustomDataFormElement, Ki as ADamAdminAssetLink, gs as ADamAssetCustomMetadataForm, ms as ADamAssetFileFailReasonChip, fs as ADamAssetImage, ps as ADamAssetImageMetaIcons, xe as ADamAssetImageRoiSelect, mi as ADamAssetLicenceGroupRemoteAutocomplete, fi as ADamAssetLicenceRemoteAutocomplete, pi as ADamAssetListViewRemoteAutocomplete, bs as ADamAuthorCachedChip, xs as ADamAuthorCreateButton, Hi as ADamAuthorFilterRemoteAutocomplete, ys as ADamAuthorRemoteAutocompleteWithCached, _i as ADamDistributionServiceSelect, hi as ADamExtSystemRemoteAutocomplete, gi as ADamExternalProviderAssetSelect, Ui as ADamKeywordFilterRemoteAutocomplete, vs as ADamKeywordRemoteAutocompleteWithCached, As as ADamUploadQueueItem, js as ADamUploadQueueList, Ms as ADamUploadQueueMassOperations, _s as ADamUploadQueueStopButton, Wi as ADamUserFilterRemoteAutocomplete, Gi as ADamUserRemoteAutocomplete, m as ADatatableConfigButton, Ca as ADatatableOrdering, wa as ADatatablePagination, b as ADatetime, x as ADatetimePicker, h as ADialogToolbar, oe as AFileInput, la as AFilterBooleanSelect, ua as AFilterInteger, da as AFilterRemoteAutocomplete, ga as AFilterString, _a as AFilterTimeInterval, va as AFilterValueObjectOptionsSelect, ya as AFilterWrapper, ba as AFilterWrapperSidebar, xa as AFilterWrapperSubjectSelect, Sa as AFiltersSelected, S as AFormDatetimePicker, C as AFormFlagDatetimePicker, fa as AFormRemoteAutocomplete, ha as AFormRemoteAutocompleteWithCached, w as AFormRemoteCheckbox, E as AFormRemoteSwitch, T as AFormSwitch, d as AFormTextField, f as AFormTextarea, D as AFormValueObjectOptionsSelect, ne as AGenericView, M as AIconGroup, ye as AImageMassOperations, pe as AImageMediaWidget, be as AImagePublicInput, de as AImageWidget, fe as AImageWidgetInner, ge as AImageWidgetMultiple, _e as AImageWidgetMultipleInner, ve as AImageWidgetMultipleSimple, me as AImageWidgetSimple, ae as AJobBaseCreateForm, re as AJobDetailCommon, ie as AJobPriorityChip, O as AJobStatusChip, q as ALanguageSelect, a as ALayoutLoader, o as ALayoutSwitch, mo as AListEditor, Ka as ALogDetailView, Ga as ALogListView, Q as ALoginView, $ as ALogoutView, he as AMediaWidgetSimple, go as ANestedSortableListEditor, te as ANotFoundView, Ao as APermissionGroupDatatable, jo as APermissionGroupDetail, Mo as APermissionGroupManage, l as AProgress, t as ARow, ho as ASortableListEditor, po as ASubjectSelect, J as ASystemBar, p as ASystemEntityScope, H as ATableCopyIdButton, U as ATableDetailButton, W as ATableEditButton, K as AThemeSelect, v as ATimeTrackingFields, ee as AUnauthorizedView, _o as AUnsavedConfirmDialog, I as AUserAndTimeTrackingFields, Io as AUserCopyPermissionsDialog, Ko as AUserSystemOverview, Wo as AUserTabsShell, y as Acl, rn as AnzuApiAxiosError, cn as AnzuApiCancelledError, Qt as AnzuApiDependencyExistsError, qn as AnzuApiForbiddenError, Xn as AnzuApiForbiddenOperationError, Kt as AnzuApiResponseCodeError, on as AnzuApiTimeoutError, Jt as AnzuApiValidationError, un as AnzuError, tn as AnzuFatalError, yn as AnzuSystemsCommonAdmin, lr as AssetFileFailReason, ur as AssetFileLinkType, dr as AssetFileProcessStatus, fr as AssetFileRouteStatus, vr as AssetSelectReturnType, Ii as AuthUnavailableError, Xr as COLLAB_FIELD_PREFIX_COMMENT, Zr as COLLAB_FIELD_PREFIX_EMBED, Pn as COMMON_CONFIG, ii as CollabAccessRoomStatus, ai as CollabChangeRoomLockStatus, oi as CollabConnectionState, ei as CollabFieldLockStatus, ti as CollabFieldLockType, si as CollabReconnectVerdict, ci as CollabRequestToJoinStatus, li as CollabRequestToTakeModerationStatus, ui as CollabRoomJoinStrategy, di as CollabStatus, Ce as CustomDataFormElementType, we as CustomDataFormElementTypeDefault, tt as DATETIME_MAX, nt as DATETIME_MIN, qa as DEFAULT_LOG_PATHS, ar as DamAssetStatus, or as DamAssetStatusDefault, sr as DamAssetType, cr as DamAssetTypeDefault, Br as DamAuthorType, br as DamDistributionRequirementStrategy, xr as DamDistributionServiceType, Sr as DamDistributionStatus, Qi as DamMediaType, zr as DamNotificationName, Za as DatatablePaginationKey, Qa as FilterConfigKey, $a as FilterDataKey, eo as FilterInnerConfigKey, to as FilterInnerDataKey, _t as Grant, yt as GrantOrigin, bt as GrantOriginDefault, Rt as HTTP_STATUS_BAD_REQUEST, zt as HTTP_STATUS_CREATED, Bt as HTTP_STATUS_FORBIDDEN, Vt as HTTP_STATUS_NOT_FOUND, Ht as HTTP_STATUS_NO_CONTENT, Ut as HTTP_STATUS_OK, Wt as HTTP_STATUS_UNAUTHORIZED, Gt as HTTP_STATUS_UNPROCESSABLE_ENTITY, ca as ImageWidgetUploadConfigKey, _n as JOB_RESOURCE_USER_DATA_DELETE, mn as JobStatus, hn as JobStatusDefault, Nn as LogLevel, Ja as LogType, Ya as LogTypeDefault, fn as NEW_LINE_MARK, Go as OTHER_SYSTEMS_TAB, Ma as RELOAD_VETO_GRACE, ji as ROLE_SUPER_ADMIN, In as SORT_BY_ID, Ln as SORT_BY_SCORE, Rn as SORT_BY_SCORE_BEST, zn as SORT_BY_SCORE_DATE, Li as SessionExpiredError, Bn as SortOrder, Pt as SubjectScopeKey, Ft as SystemScopeKey, bn as Theme, co as TimeIntervalSpecialOptions, Fr as UPLOAD_POLL_SCHEDULE, as as UPLOAD_QUEUE_ITEM_CHUNK_SIZE, Fa as USER_PROBE_ENTITY, gr as UploadQueueItemStatus, _r as UploadQueueItemType, ks as UploadQueueSuggestionsKey, Lr as UploadRowRole, Oo as UserAdminConfigLayoutType, ko as UserAdminConfigType, Cr as UserAuthType, s as actionbarSlot, ss as adminDamImportRun, cs as adminDamQueuePreset, is as adminDamUploadPreset, Ia as apiErrorIsReported, La as apiErrorStatus, wn as arrayFlatten, Tn as arrayFromArgs, En as arrayItemToggle, Dn as arraysHaveSameElements, pr as assetFileIsAudioFile, mr as assetFileIsImageFile, hr as assetFileIsVideoFile, $t as axiosErrorResponseHasDependencyExistsData, Zn as axiosErrorResponseHasForbiddenOperationData, Yt as axiosErrorResponseHasValidationData, Jn as axiosErrorResponseIsForbidden, $e as booleanToInteger, On as browserHistoryReplaceUrlByRouter, no as buildFilterHash, Na as checkForNewVersion, Me as cloneDeep, Vn as createAnzuVuetify, qo as createCachedChip, uo as createDatatableColumnsConfig, ro as createFilter, pa as createFilterRemoteAutocomplete, io as createFilterStore, Et as createNavigationErrorHandler, Pi as createRefreshRequestInterceptor, Fi as createRefreshSession, ma as createRemoteAutocomplete, c as createTeleportSlot, os as createUploadQueueCore, Pr as createUploadSettlement, Jo as createUserAndTimeTrackingFields, Dr as damFileTypeFix, Qo as damFileUploadChunk, $o as damFileUploadFinish, es as damFileUploadStart, rt as dateDiff, it as dateModifyMinutes, at as dateNow, ot as datePretty, st as dateTimeEndOfDay, ct as dateTimeFriendly, lt as dateTimeNow, ut as dateTimePretty, dt as dateTimeStartOfDay, ft as dateTimeToDate, pt as dateToUtc, mt as dateUtcPretty, ht as dateUtcToday, Ra as defaultApiErrorLogger, ka as defineApiClient, Mi as defineAuth, zi as defineBreadcrumbs, Un as defineCached, kt as defineRecordLoader, At as defineRecordSave, Ro as defineUserSystemDescriptor, zo as descriptorMayWrite, Ar as destroyDamNotifications, Gn as ensureUniqueValues, kn as eventClickBlur, aa as fetchAsset, ia as fetchAssetAndCheckForSingleUseByFileIds, oa as fetchAssetAsCmsMedia, sa as fetchAssetByFileId, Ci as fetchDamAssetLicenceGroupListByIds, bi as fetchDamAssetLicenceListByIds, Si as fetchDamAssetListViewListByIds, wi as fetchDamExtSystemListByIds, Ti as fetchDamUser, Ei as fetchDamUserListByIds, Ee as generateDatatableMinMaxSelectStrategy, Ha as generateListQuery, er as generateUUIDv1, tr as generateUUIDv4, Tr as getAssetTypeByMimeType, Dt as handleRecordLoadError, Xt as hasAnzuApiValidationErrorSpecific, jr as initDamNotifications, an as isAnzuApiAxiosError, ln as isAnzuApiCancelledError, en as isAnzuApiDependencyExistsError, Yn as isAnzuApiForbiddenError, Qn as isAnzuApiForbiddenOperationError, qt as isAnzuApiResponseCodeError, sn as isAnzuApiTimeoutError, Zt as isAnzuApiValidationError, dn as isAnzuError, nn as isAnzuFatalError, Ne as isArray, Pe as isBoolean, Fe as isDefined, Ie as isDocId, Le as isEmpty, Re as isEmptyObject, ze as isFunction, Xi as isImageCreateUpdateAware, Ri as isInCauseChain, Be as isInt, Xa as isLogType, Zi as isMediaAware, jt as isNavigationPending, Ve as isNull, He as isNumber, Ue as isObject, et as isOneOf, ao as isRouterSafeHash, We as isString, Ge as isUndefined, Kn as loadCommonFonts, nr as localTimeShiftInSeconds, An as messagesCs, jn as messagesEn, Mn as messagesSk, Sn as modifyLanguageSettings, wo as nextListEditorTempId, Oe as objectDeepFreeze, ke as objectDeletePropertyByPath, Ae as objectGetValueByPath, je as objectSetValueByPath, It as prettyBytes, Lt as prettyDuration, xo as renumberPositions, Pa as requestAppReload, Bo as resolveCreateEndpoint, Vo as resolveEnabledWrite, Ho as resolveMetadataWrite, Uo as resolveProbeEndpoint, za as setApiErrorLogger, Aa as skipUrlPrefixes, De as slovakPluralizationRule, So as sortByPosition, Co as sortByPositionDeep, ja as startWithEnvConfig, Ke as stringIsValidEmail, qe as stringSplitOnFirstOccurrence, Je as stringToBooleanExact, Ye as stringToFloat, Xe as stringToInt, Ze as stringToKebabCase, Qe as stringToSlug, Zo as syncUserAndTimeTracking, gt as timePretty, Mt as trackNavigation, Di as updateDamUser, ls as uploadQueueFillAuthors, us as uploadQueueFillCustomDataValue, ds as uploadQueueFillKeywords, Ir as uploadSettlementRuntime, ts as uploadStop, ns as uploadValidationMessage, Ni as useAclAllowed, pn as useAlerts, Lo as useAnzuUserActions, St as useAnzuUserFactory, Da as useApiCommand, Ta as useApiFetchByIds, Ea as useApiFetchItems, Ua as useApiFetchList, Ba as useApiFetchListBatch, Va as useApiQueryBuilder, Oa as useApiRequest, kr as useAssetSuggestions, Yo as useCachedAnzuUsers, Wn as useCachedItem, Xo as useCachedPermissionGroups, $r as useCollabAnyDataChange, Kr as useCollabCurrentUserId, Jr as useCollabField, ni as useCollabGatheringBufferDataEventBus, Qr as useCollabHelpers, Wr as useCollabInit, ri as useCollabReconnectEventBus, Yr as useCollabRoom, qr as useCollabState, Gr as useCommonAdminCollabOptions, Ai as useCommonAdminImageOptions, $n as useCommonJobFactory, Hn as useCommonVuetifyConfig, Te as useCustomDataFormElementType, Or as useDamAcceptTypeAndSizeHelper, hs as useDamAssetFileFailReason, yi as useDamAssetLicenceInnerFilter, Ds as useDamAuthorAssetTypeConfig, Ur as useDamAuthorFactory, Vr as useDamAuthorType, Ji as useDamCachedAssetLicences, Ss as useDamCachedAuthors, Cs as useDamCachedKeywords, qi as useDamCachedUsers, yr as useDamConfigState, Bi as useDamConfigStore, Vi as useDamConfigStoreOf, vi as useDamDistributionServiceType, ws as useDamImageRoiStore, Es as useDamKeywordAssetTypeConfig, Hr as useDamKeywordFactory, Mr as useDamNotifications, Nr as useDamNotificationsConnection, rs as useDamUpload, Er as useDamUploadChunkSize, oo as useDatatableList, ea as useDebugFeatures, Rr as useDropzoneGlobalDragState, Ts as useExtSystemIdForCached, xi as useFetchDamAssetLicenceList, Oi as useFetchDamUserList, so as useFilterHelpers, Os as useFormatAndSizeCheck, vt as useGrant, xt as useGrantOrigin, ki as useImageActions, Yi as useImageStore, Wa as useJobApi, vn as useJobBaseResource, gn as useJobStatus, Cn as useLanguageSettings, bo as useListEditorController, rr as useLoginStatus, To as useNestedListEditorController, Nt as usePageNavigation, lo as usePagination, Ct as usePermissionConfigFactory, No as usePermissionGroupActions, wt as usePermissionGroupFactory, Ot as useRecordPage, ir as useRemainingTime, Tt as useRouteHistory, ta as useSentry, fo as useSubjectSelect, ra as useSystemBar, xn as useTheme, $i as useUnreleasedFeatures, vo as useUnsavedChangesGuard, yo as useUnsavedSection, wr as useUploadQueueItemFactory, na as useUserActivity, Eo as useUserAdminConfigApi, Do as useUserAdminConfigFactory, Fn as useValidate };
269
+ import Go from "./domains/anzuUser/components/AUserOtherSystemsTable.js";
270
+ import Ko from "./domains/anzuUser/components/AUserMissingAccount.js";
271
+ import { OTHER_SYSTEMS_TAB as qo } from "./domains/anzuUser/utils/userTabs.js";
272
+ import { useUserCreateFromSource as Jo } from "./domains/anzuUser/composables/userCreateFromSource.js";
273
+ import Yo from "./domains/anzuUser/components/AUserSystemOverview.js";
274
+ import { createCachedChip as Xo } from "./domains/cached/composables/createCachedChip.js";
275
+ import { createUserAndTimeTrackingFields as Zo } from "./domains/cached/composables/createUserAndTimeTrackingFields.js";
276
+ import { useCachedAnzuUsers as Qo } from "./domains/anzuUser/composables/cachedAnzuUsers.js";
277
+ import { useCachedPermissionGroups as $o } from "./domains/permission/group/composables/cachedPermissionGroups.js";
278
+ import { syncUserAndTimeTracking as es } from "./shared/utils/userAndTimeTracking.js";
279
+ import { imageUploadChunk as ts, imageUploadFinish as ns, imageUploadStart as rs } from "./domains/dam/api/damImageApi.js";
280
+ import { uploadStop as is, uploadValidationMessage as as, useUpload as os } from "./domains/dam/uploadQueue/composables/uploadService.js";
281
+ import { adminDamUploadPreset as ss } from "./domains/dam/uploadQueue/presets/uploadPresets.js";
282
+ import { UPLOAD_QUEUE_ITEM_CHUNK_SIZE as cs, createUploadQueueCore as ls } from "./domains/dam/uploadQueue/core/uploadQueueCore.js";
283
+ import { adminDamImportRun as us, adminDamQueuePreset as ds } from "./domains/dam/uploadQueue/presets/queuePresets.js";
284
+ import { fillAuthors as fs, fillCustomDataValue as ps, fillKeywords as ms } from "./domains/dam/uploadQueue/core/uploadQueueFill.js";
285
+ import hs from "./domains/dam/assetDetail/components/AssetImage.js";
286
+ import gs from "./domains/dam/assetDetail/components/AssetImageMetaIcons.js";
287
+ import _s from "./domains/dam/assetDetail/components/AssetFileFailReasonChip.js";
288
+ import { useAssetFileFailReason as vs } from "./domains/dam/assetDetail/composables/assetFileFailReason.js";
289
+ import ys from "./domains/dam/assetDetail/components/AssetCustomMetadataForm.js";
290
+ import bs from "./domains/dam/uploadQueue/components/UploadQueueButtonStop.js";
291
+ import xs from "./domains/dam/keyword/components/KeywordRemoteAutocompleteWithCached.js";
292
+ import Ss from "./domains/dam/author/components/AuthorRemoteAutocompleteWithCached.js";
293
+ import Cs from "./domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.js";
294
+ import ws from "./domains/dam/author/components/AuthorCreateButton.js";
295
+ import { useDamCachedAuthors as Ts } from "./domains/dam/author/composables/cachedAuthors.js";
296
+ import { useDamCachedKeywords as Es } from "./domains/dam/keyword/composables/cachedKeywords.js";
297
+ import { useImageRoiStore as Ds } from "./domains/dam/cropper/store/imageRoiStore.js";
298
+ import { useExtSystemIdForCached as Os } from "./domains/dam/composables/extSystemIdForCached.js";
299
+ import { useDamKeywordAssetTypeConfig as ks } from "./domains/dam/keyword/composables/damKeywordConfig.js";
300
+ import { useDamAuthorAssetTypeConfig as As } from "./domains/dam/author/composables/damAuthorConfig.js";
301
+ import { useFormatAndSizeCheck as js } from "./domains/ui/file/composables/formatAndSizeCheck.js";
302
+ import { UploadQueueSuggestionsKey as Ms } from "./domains/dam/uploadQueue/components/uploadQueueBindings.js";
303
+ import Ns from "./domains/dam/uploadQueue/components/UploadQueueItemEditable.js";
304
+ import Ps from "./domains/dam/uploadQueue/components/UploadQueueEditable.js";
305
+ import Fs from "./domains/dam/uploadQueue/components/AssetQueueSelectedSidebar.js";
306
+ export { L as AActionCloseButtonHistory, R as AActionCreateButton, z as AActionDeleteButton, B as AActionEditButton, V as AActionSaveButton, r as AActionbar, i as AActionbarTarget, _ as AAdminSwitcher, n as AAlerts, Y as AAnzuUserAvatar, Po as AAnzuUserDatatable, Fo as AAnzuUserForm, ce as AAssetListInner, se as AAssetSelect, X as AAvatarColorPicker, Se as ABooleanSelect, e as ABooleanValue, G as ABtnSplit, k as ACachedChip, A as ACachedUserChip, u as ACard, N as AChipNoLink, P as ACollabLockedByUser, F as ACollabManagement, j as ACopyText, g as ACreateDialog, Z as ACurrentUserDropdown, le as ACustomDataForm, ue as ACustomDataFormElement, Ki as ADamAdminAssetLink, ys as ADamAssetCustomMetadataForm, _s as ADamAssetFileFailReasonChip, hs as ADamAssetImage, gs as ADamAssetImageMetaIcons, xe as ADamAssetImageRoiSelect, mi as ADamAssetLicenceGroupRemoteAutocomplete, fi as ADamAssetLicenceRemoteAutocomplete, pi as ADamAssetListViewRemoteAutocomplete, Cs as ADamAuthorCachedChip, ws as ADamAuthorCreateButton, Hi as ADamAuthorFilterRemoteAutocomplete, Ss as ADamAuthorRemoteAutocompleteWithCached, _i as ADamDistributionServiceSelect, hi as ADamExtSystemRemoteAutocomplete, gi as ADamExternalProviderAssetSelect, Ui as ADamKeywordFilterRemoteAutocomplete, xs as ADamKeywordRemoteAutocompleteWithCached, Ns as ADamUploadQueueItem, Ps as ADamUploadQueueList, Fs as ADamUploadQueueMassOperations, bs as ADamUploadQueueStopButton, Wi as ADamUserFilterRemoteAutocomplete, Gi as ADamUserRemoteAutocomplete, m as ADatatableConfigButton, Ca as ADatatableOrdering, wa as ADatatablePagination, b as ADatetime, x as ADatetimePicker, h as ADialogToolbar, oe as AFileInput, la as AFilterBooleanSelect, ua as AFilterInteger, da as AFilterRemoteAutocomplete, ga as AFilterString, _a as AFilterTimeInterval, va as AFilterValueObjectOptionsSelect, ya as AFilterWrapper, ba as AFilterWrapperSidebar, xa as AFilterWrapperSubjectSelect, Sa as AFiltersSelected, S as AFormDatetimePicker, C as AFormFlagDatetimePicker, fa as AFormRemoteAutocomplete, ha as AFormRemoteAutocompleteWithCached, w as AFormRemoteCheckbox, E as AFormRemoteSwitch, T as AFormSwitch, d as AFormTextField, f as AFormTextarea, D as AFormValueObjectOptionsSelect, ne as AGenericView, M as AIconGroup, ye as AImageMassOperations, pe as AImageMediaWidget, be as AImagePublicInput, de as AImageWidget, fe as AImageWidgetInner, ge as AImageWidgetMultiple, _e as AImageWidgetMultipleInner, ve as AImageWidgetMultipleSimple, me as AImageWidgetSimple, ae as AJobBaseCreateForm, re as AJobDetailCommon, ie as AJobPriorityChip, O as AJobStatusChip, q as ALanguageSelect, a as ALayoutLoader, o as ALayoutSwitch, mo as AListEditor, Ka as ALogDetailView, Ga as ALogListView, Q as ALoginView, $ as ALogoutView, he as AMediaWidgetSimple, go as ANestedSortableListEditor, te as ANotFoundView, Ao as APermissionGroupDatatable, jo as APermissionGroupDetail, Mo as APermissionGroupManage, l as AProgress, t as ARow, ho as ASortableListEditor, po as ASubjectSelect, J as ASystemBar, p as ASystemEntityScope, H as ATableCopyIdButton, U as ATableDetailButton, W as ATableEditButton, K as AThemeSelect, v as ATimeTrackingFields, ee as AUnauthorizedView, _o as AUnsavedConfirmDialog, I as AUserAndTimeTrackingFields, Io as AUserCopyPermissionsDialog, Ko as AUserMissingAccount, Go as AUserOtherSystemsTable, Yo as AUserSystemOverview, Wo as AUserTabsShell, y as Acl, rn as AnzuApiAxiosError, cn as AnzuApiCancelledError, Qt as AnzuApiDependencyExistsError, qn as AnzuApiForbiddenError, Xn as AnzuApiForbiddenOperationError, Kt as AnzuApiResponseCodeError, on as AnzuApiTimeoutError, Jt as AnzuApiValidationError, un as AnzuError, tn as AnzuFatalError, yn as AnzuSystemsCommonAdmin, lr as AssetFileFailReason, ur as AssetFileLinkType, dr as AssetFileProcessStatus, fr as AssetFileRouteStatus, vr as AssetSelectReturnType, Ii as AuthUnavailableError, Xr as COLLAB_FIELD_PREFIX_COMMENT, Zr as COLLAB_FIELD_PREFIX_EMBED, Pn as COMMON_CONFIG, ii as CollabAccessRoomStatus, ai as CollabChangeRoomLockStatus, oi as CollabConnectionState, ei as CollabFieldLockStatus, ti as CollabFieldLockType, si as CollabReconnectVerdict, ci as CollabRequestToJoinStatus, li as CollabRequestToTakeModerationStatus, ui as CollabRoomJoinStrategy, di as CollabStatus, Ce as CustomDataFormElementType, we as CustomDataFormElementTypeDefault, tt as DATETIME_MAX, nt as DATETIME_MIN, qa as DEFAULT_LOG_PATHS, ar as DamAssetStatus, or as DamAssetStatusDefault, sr as DamAssetType, cr as DamAssetTypeDefault, Br as DamAuthorType, br as DamDistributionRequirementStrategy, xr as DamDistributionServiceType, Sr as DamDistributionStatus, Qi as DamMediaType, zr as DamNotificationName, Za as DatatablePaginationKey, Qa as FilterConfigKey, $a as FilterDataKey, eo as FilterInnerConfigKey, to as FilterInnerDataKey, _t as Grant, yt as GrantOrigin, bt as GrantOriginDefault, Rt as HTTP_STATUS_BAD_REQUEST, zt as HTTP_STATUS_CREATED, Bt as HTTP_STATUS_FORBIDDEN, Vt as HTTP_STATUS_NOT_FOUND, Ht as HTTP_STATUS_NO_CONTENT, Ut as HTTP_STATUS_OK, Wt as HTTP_STATUS_UNAUTHORIZED, Gt as HTTP_STATUS_UNPROCESSABLE_ENTITY, ca as ImageWidgetUploadConfigKey, _n as JOB_RESOURCE_USER_DATA_DELETE, mn as JobStatus, hn as JobStatusDefault, Nn as LogLevel, Ja as LogType, Ya as LogTypeDefault, fn as NEW_LINE_MARK, qo as OTHER_SYSTEMS_TAB, Ma as RELOAD_VETO_GRACE, ji as ROLE_SUPER_ADMIN, In as SORT_BY_ID, Ln as SORT_BY_SCORE, Rn as SORT_BY_SCORE_BEST, zn as SORT_BY_SCORE_DATE, Li as SessionExpiredError, Bn as SortOrder, Pt as SubjectScopeKey, Ft as SystemScopeKey, bn as Theme, co as TimeIntervalSpecialOptions, Fr as UPLOAD_POLL_SCHEDULE, cs as UPLOAD_QUEUE_ITEM_CHUNK_SIZE, Fa as USER_PROBE_ENTITY, gr as UploadQueueItemStatus, _r as UploadQueueItemType, Ms as UploadQueueSuggestionsKey, Lr as UploadRowRole, Oo as UserAdminConfigLayoutType, ko as UserAdminConfigType, Cr as UserAuthType, s as actionbarSlot, us as adminDamImportRun, ds as adminDamQueuePreset, ss as adminDamUploadPreset, Ia as apiErrorIsReported, La as apiErrorStatus, wn as arrayFlatten, Tn as arrayFromArgs, En as arrayItemToggle, Dn as arraysHaveSameElements, pr as assetFileIsAudioFile, mr as assetFileIsImageFile, hr as assetFileIsVideoFile, $t as axiosErrorResponseHasDependencyExistsData, Zn as axiosErrorResponseHasForbiddenOperationData, Yt as axiosErrorResponseHasValidationData, Jn as axiosErrorResponseIsForbidden, $e as booleanToInteger, On as browserHistoryReplaceUrlByRouter, no as buildFilterHash, Na as checkForNewVersion, Me as cloneDeep, Vn as createAnzuVuetify, Xo as createCachedChip, uo as createDatatableColumnsConfig, ro as createFilter, pa as createFilterRemoteAutocomplete, io as createFilterStore, Et as createNavigationErrorHandler, Pi as createRefreshRequestInterceptor, Fi as createRefreshSession, ma as createRemoteAutocomplete, c as createTeleportSlot, ls as createUploadQueueCore, Pr as createUploadSettlement, Zo as createUserAndTimeTrackingFields, Dr as damFileTypeFix, ts as damFileUploadChunk, ns as damFileUploadFinish, rs as damFileUploadStart, rt as dateDiff, it as dateModifyMinutes, at as dateNow, ot as datePretty, st as dateTimeEndOfDay, ct as dateTimeFriendly, lt as dateTimeNow, ut as dateTimePretty, dt as dateTimeStartOfDay, ft as dateTimeToDate, pt as dateToUtc, mt as dateUtcPretty, ht as dateUtcToday, Ra as defaultApiErrorLogger, ka as defineApiClient, Mi as defineAuth, zi as defineBreadcrumbs, Un as defineCached, kt as defineRecordLoader, At as defineRecordSave, Ro as defineUserSystemDescriptor, zo as descriptorMayWrite, Ar as destroyDamNotifications, Gn as ensureUniqueValues, kn as eventClickBlur, aa as fetchAsset, ia as fetchAssetAndCheckForSingleUseByFileIds, oa as fetchAssetAsCmsMedia, sa as fetchAssetByFileId, Ci as fetchDamAssetLicenceGroupListByIds, bi as fetchDamAssetLicenceListByIds, Si as fetchDamAssetListViewListByIds, wi as fetchDamExtSystemListByIds, Ti as fetchDamUser, Ei as fetchDamUserListByIds, Ee as generateDatatableMinMaxSelectStrategy, Ha as generateListQuery, er as generateUUIDv1, tr as generateUUIDv4, Tr as getAssetTypeByMimeType, Dt as handleRecordLoadError, Xt as hasAnzuApiValidationErrorSpecific, jr as initDamNotifications, an as isAnzuApiAxiosError, ln as isAnzuApiCancelledError, en as isAnzuApiDependencyExistsError, Yn as isAnzuApiForbiddenError, Qn as isAnzuApiForbiddenOperationError, qt as isAnzuApiResponseCodeError, sn as isAnzuApiTimeoutError, Zt as isAnzuApiValidationError, dn as isAnzuError, nn as isAnzuFatalError, Ne as isArray, Pe as isBoolean, Fe as isDefined, Ie as isDocId, Le as isEmpty, Re as isEmptyObject, ze as isFunction, Xi as isImageCreateUpdateAware, Ri as isInCauseChain, Be as isInt, Xa as isLogType, Zi as isMediaAware, jt as isNavigationPending, Ve as isNull, He as isNumber, Ue as isObject, et as isOneOf, ao as isRouterSafeHash, We as isString, Ge as isUndefined, Kn as loadCommonFonts, nr as localTimeShiftInSeconds, An as messagesCs, jn as messagesEn, Mn as messagesSk, Sn as modifyLanguageSettings, wo as nextListEditorTempId, Oe as objectDeepFreeze, ke as objectDeletePropertyByPath, Ae as objectGetValueByPath, je as objectSetValueByPath, It as prettyBytes, Lt as prettyDuration, xo as renumberPositions, Pa as requestAppReload, Bo as resolveCreateEndpoint, Vo as resolveEnabledWrite, Ho as resolveMetadataWrite, Uo as resolveProbeEndpoint, za as setApiErrorLogger, Aa as skipUrlPrefixes, De as slovakPluralizationRule, So as sortByPosition, Co as sortByPositionDeep, ja as startWithEnvConfig, Ke as stringIsValidEmail, qe as stringSplitOnFirstOccurrence, Je as stringToBooleanExact, Ye as stringToFloat, Xe as stringToInt, Ze as stringToKebabCase, Qe as stringToSlug, es as syncUserAndTimeTracking, gt as timePretty, Mt as trackNavigation, Di as updateDamUser, fs as uploadQueueFillAuthors, ps as uploadQueueFillCustomDataValue, ms as uploadQueueFillKeywords, Ir as uploadSettlementRuntime, is as uploadStop, as as uploadValidationMessage, Ni as useAclAllowed, pn as useAlerts, Lo as useAnzuUserActions, St as useAnzuUserFactory, Da as useApiCommand, Ta as useApiFetchByIds, Ea as useApiFetchItems, Ua as useApiFetchList, Ba as useApiFetchListBatch, Va as useApiQueryBuilder, Oa as useApiRequest, kr as useAssetSuggestions, Qo as useCachedAnzuUsers, Wn as useCachedItem, $o as useCachedPermissionGroups, $r as useCollabAnyDataChange, Kr as useCollabCurrentUserId, Jr as useCollabField, ni as useCollabGatheringBufferDataEventBus, Qr as useCollabHelpers, Wr as useCollabInit, ri as useCollabReconnectEventBus, Yr as useCollabRoom, qr as useCollabState, Gr as useCommonAdminCollabOptions, Ai as useCommonAdminImageOptions, $n as useCommonJobFactory, Hn as useCommonVuetifyConfig, Te as useCustomDataFormElementType, Or as useDamAcceptTypeAndSizeHelper, vs as useDamAssetFileFailReason, yi as useDamAssetLicenceInnerFilter, As as useDamAuthorAssetTypeConfig, Ur as useDamAuthorFactory, Vr as useDamAuthorType, Ji as useDamCachedAssetLicences, Ts as useDamCachedAuthors, Es as useDamCachedKeywords, qi as useDamCachedUsers, yr as useDamConfigState, Bi as useDamConfigStore, Vi as useDamConfigStoreOf, vi as useDamDistributionServiceType, Ds as useDamImageRoiStore, ks as useDamKeywordAssetTypeConfig, Hr as useDamKeywordFactory, Mr as useDamNotifications, Nr as useDamNotificationsConnection, os as useDamUpload, Er as useDamUploadChunkSize, oo as useDatatableList, ea as useDebugFeatures, Rr as useDropzoneGlobalDragState, Os as useExtSystemIdForCached, xi as useFetchDamAssetLicenceList, Oi as useFetchDamUserList, so as useFilterHelpers, js as useFormatAndSizeCheck, vt as useGrant, xt as useGrantOrigin, ki as useImageActions, Yi as useImageStore, Wa as useJobApi, vn as useJobBaseResource, gn as useJobStatus, Cn as useLanguageSettings, bo as useListEditorController, rr as useLoginStatus, To as useNestedListEditorController, Nt as usePageNavigation, lo as usePagination, Ct as usePermissionConfigFactory, No as usePermissionGroupActions, wt as usePermissionGroupFactory, Ot as useRecordPage, ir as useRemainingTime, Tt as useRouteHistory, ta as useSentry, fo as useSubjectSelect, ra as useSystemBar, xn as useTheme, $i as useUnreleasedFeatures, vo as useUnsavedChangesGuard, yo as useUnsavedSection, wr as useUploadQueueItemFactory, na as useUserActivity, Eo as useUserAdminConfigApi, Do as useUserAdminConfigFactory, Jo as useUserCreateFromSource, Fn as useValidate };
@@ -28,7 +28,7 @@ export interface AnzuUserApiParams {
28
28
  export declare const useAnzuUserApi: <T extends AnzuUser = AnzuUser>({ client, system, entity, validationSystem, validationEntity, endPoint, }: AnzuUserApiParams) => {
29
29
  useFetchAnzuUserListByIds: () => import('../../api/composables/useApiFetchByIds').UseApiFetchByIdsReturnType<T>;
30
30
  useFetchAnzuUserList: () => import('../../api/composables/useApiFetchList').UseApiFetchListReturnType<T>;
31
- useFetchAnzuUser: () => import('../../api/composables/useApiRequest').UseApiRequestReturnType<T, null>;
31
+ useFetchAnzuUser: (requestEntity?: string) => import('../../api/composables/useApiRequest').UseApiRequestReturnType<T, null>;
32
32
  useCreateAnzuUser: () => import('../../api/composables/useApiRequest').UseApiRequestReturnType<T, T>;
33
33
  useUpdateAnzuUser: () => import('../../api/composables/useApiRequest').UseApiRequestReturnType<T, T>;
34
34
  usePatchBaseUser: (patchEndPoint: string) => import('../../api/composables/useApiRequest').UseApiRequestReturnType<T, T>;
@@ -22,11 +22,11 @@ var r = "anzuUser", i = "/adm/v1/anzu-user", a = ({ client: a, system: o, entity
22
22
  ...d,
23
23
  urlTemplate: u
24
24
  }),
25
- useFetchAnzuUser: () => n({
25
+ useFetchAnzuUser: (e = s) => n({
26
26
  client: a,
27
27
  method: "GET",
28
28
  system: o,
29
- entity: s,
29
+ entity: e,
30
30
  ...d,
31
31
  urlTemplate: u + "/:id"
32
32
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"anzuUserApi.js","names":["ANZU_USER_ENTITY","ANZU_USER_ENDPOINT","useAnzuUserApi","entity","scope","useApiFetchByIds","endPoint","useApiFetchList","useApiRequest","patchEndPoint"],"sources":["../../../../src/domains/anzuUser/api/anzuUserApi.ts"],"sourcesContent":["import type { AxiosClientFn } from '@/domains/api/utils/client'\nimport { useApiFetchByIds } from '@/domains/api/composables/useApiFetchByIds'\nimport { useApiFetchList } from '@/domains/api/composables/useApiFetchList'\nimport { useApiRequest } from '@/domains/api/composables/useApiRequest'\nimport type { AnzuUser } from '@/shared/types/AnzuUser'\n\nexport const ANZU_USER_ENTITY = 'anzuUser'\nexport const ANZU_USER_ENDPOINT = '/adm/v1/anzu-user'\n\nexport interface AnzuUserApiParams {\n client: AxiosClientFn\n /**\n * Both reach every `useApiRequest` built here.\n * This file serves nine backends, so the error context has to name the right one.\n */\n system: string\n entity?: string\n /**\n * i18n scope for server-side validation failures, separate from which backend answered.\n * `AnzuApiValidationError` builds `<system>.<entity>.model.<field>` keys. For a component shared by\n * nine backends the labels are the library's `common.*`; `weather.anzuUser.model.email` does not exist.\n * Defaults to `common` plus the entity. contentHub passes its own pair to keep its existing keys.\n */\n validationSystem?: string\n validationEntity?: string\n endPoint?: string\n}\n\n/**\n * Generic in the user type: the systems on `/adm/users` return their own DTO (`CmsUserDto`,\n * `DamUserDto`, `ContentHubUserDto`) extending `UserDto` with system fields.\n * Those fields must survive the round trip: a write body is the whole object the preceding GET returned.\n */\nexport const useAnzuUserApi = <T extends AnzuUser = AnzuUser>({\n client,\n system,\n entity = ANZU_USER_ENTITY,\n validationSystem = 'common',\n validationEntity = entity,\n endPoint = ANZU_USER_ENDPOINT,\n}: AnzuUserApiParams) => {\n const scope = { validationSystem, validationEntity }\n const useFetchAnzuUserListByIds = () =>\n useApiFetchByIds<T>({ client, system, entity, ...scope, urlTemplate: endPoint })\n\n const useFetchAnzuUserList = () => useApiFetchList<T>({ client, system, entity, ...scope, urlTemplate: endPoint })\n\n const useFetchAnzuUser = () =>\n useApiRequest<T, null>({ client, method: 'GET', system, entity, ...scope, urlTemplate: endPoint + '/:id' })\n\n const useCreateAnzuUser = () =>\n useApiRequest<T, T>({ client, method: 'POST', system, entity, ...scope, urlTemplate: endPoint })\n\n const useUpdateAnzuUser = () =>\n useApiRequest<T, T>({ client, method: 'PUT', system, entity, ...scope, urlTemplate: endPoint + '/:id' })\n\n /**\n * Only cms, dam and contentHub have this path. It is the safe path for metadata:\n * the backend method writes e-mail, locale, avatar and person and nothing else.\n * The body is the whole record from the preceding read, typed `T`, not `BaseUser`. The method calls `setLocale`\n * unconditionally, and `BaseUser` has no `locale`, so a `BaseUser` body would erase the user's interface language.\n * The body must also carry `id`. `BaseUserDto` has a uniqueness constraint on `id` and `email`, and the validator\n * excludes the record itself only when `id` is set. Without it the server reports the user's own e-mail as taken.\n */\n const usePatchBaseUser = (patchEndPoint: string) =>\n useApiRequest<T, T>({ client, method: 'PATCH', system, entity, ...scope, urlTemplate: patchEndPoint })\n\n return {\n useFetchAnzuUserListByIds,\n useFetchAnzuUserList,\n useFetchAnzuUser,\n useCreateAnzuUser,\n useUpdateAnzuUser,\n usePatchBaseUser,\n }\n}\n"],"mappings":";;;;AAMA,IAAaA,IAAmB,YACnBC,IAAqB,qBA0BrBC,KAAiD,EAC5D,WACA,WACA,YAASF,GACT,sBAAmB,UACnB,sBAAmBG,GACnB,cAAWF,QACY;CACvB,IAAMG,IAAQ;EAAE;EAAkB;CAAiB;CA0BnD,OAAO;EACL,iCAzBAC,EAAoB;GAAE;GAAQ;GAAQ;GAAQ,GAAGD;GAAO,aAAaE;EAAS,CAAC;EA0B/E,4BAxBiCC,EAAmB;GAAE;GAAQ;GAAQ;GAAQ,GAAGH;GAAO,aAAaE;EAAS,CAAC;EAyB/G,wBAtBAE,EAAuB;GAAE;GAAQ,QAAQ;GAAO;GAAQ;GAAQ,GAAGJ;GAAO,aAAaE,IAAW;EAAO,CAAC;EAuB1G,yBApBAE,EAAoB;GAAE;GAAQ,QAAQ;GAAQ;GAAQ;GAAQ,GAAGJ;GAAO,aAAaE;EAAS,CAAC;EAqB/F,yBAlBAE,EAAoB;GAAE;GAAQ,QAAQ;GAAO;GAAQ;GAAQ,GAAGJ;GAAO,aAAaE,IAAW;EAAO,CAAC;EAmBvG,mBATwB,MACxBE,EAAoB;GAAE;GAAQ,QAAQ;GAAS;GAAQ;GAAQ,GAAGJ;GAAO,aAAaK;EAAc,CAAC;CASvG;AACF"}
1
+ {"version":3,"file":"anzuUserApi.js","names":["ANZU_USER_ENTITY","ANZU_USER_ENDPOINT","useAnzuUserApi","entity","scope","useApiFetchByIds","endPoint","useApiFetchList","useApiRequest","requestEntity","patchEndPoint"],"sources":["../../../../src/domains/anzuUser/api/anzuUserApi.ts"],"sourcesContent":["import type { AxiosClientFn } from '@/domains/api/utils/client'\nimport { useApiFetchByIds } from '@/domains/api/composables/useApiFetchByIds'\nimport { useApiFetchList } from '@/domains/api/composables/useApiFetchList'\nimport { useApiRequest } from '@/domains/api/composables/useApiRequest'\nimport type { AnzuUser } from '@/shared/types/AnzuUser'\n\nexport const ANZU_USER_ENTITY = 'anzuUser'\nexport const ANZU_USER_ENDPOINT = '/adm/v1/anzu-user'\n\nexport interface AnzuUserApiParams {\n client: AxiosClientFn\n /**\n * Both reach every `useApiRequest` built here.\n * This file serves nine backends, so the error context has to name the right one.\n */\n system: string\n entity?: string\n /**\n * i18n scope for server-side validation failures, separate from which backend answered.\n * `AnzuApiValidationError` builds `<system>.<entity>.model.<field>` keys. For a component shared by\n * nine backends the labels are the library's `common.*`; `weather.anzuUser.model.email` does not exist.\n * Defaults to `common` plus the entity. contentHub passes its own pair to keep its existing keys.\n */\n validationSystem?: string\n validationEntity?: string\n endPoint?: string\n}\n\n/**\n * Generic in the user type: the systems on `/adm/users` return their own DTO (`CmsUserDto`,\n * `DamUserDto`, `ContentHubUserDto`) extending `UserDto` with system fields.\n * Those fields must survive the round trip: a write body is the whole object the preceding GET returned.\n */\nexport const useAnzuUserApi = <T extends AnzuUser = AnzuUser>({\n client,\n system,\n entity = ANZU_USER_ENTITY,\n validationSystem = 'common',\n validationEntity = entity,\n endPoint = ANZU_USER_ENDPOINT,\n}: AnzuUserApiParams) => {\n const scope = { validationSystem, validationEntity }\n const useFetchAnzuUserListByIds = () =>\n useApiFetchByIds<T>({ client, system, entity, ...scope, urlTemplate: endPoint })\n\n const useFetchAnzuUserList = () => useApiFetchList<T>({ client, system, entity, ...scope, urlTemplate: endPoint })\n\n /** `requestEntity` names the read in the error context, e.g. `USER_PROBE_ENTITY` where a 404 is expected. */\n const useFetchAnzuUser = (requestEntity = entity) =>\n useApiRequest<T, null>({\n client,\n method: 'GET',\n system,\n entity: requestEntity,\n ...scope,\n urlTemplate: endPoint + '/:id',\n })\n\n const useCreateAnzuUser = () =>\n useApiRequest<T, T>({ client, method: 'POST', system, entity, ...scope, urlTemplate: endPoint })\n\n const useUpdateAnzuUser = () =>\n useApiRequest<T, T>({ client, method: 'PUT', system, entity, ...scope, urlTemplate: endPoint + '/:id' })\n\n /**\n * Only cms, dam and contentHub have this path. It is the safe path for metadata:\n * the backend method writes e-mail, locale, avatar and person and nothing else.\n * The body is the whole record from the preceding read, typed `T`, not `BaseUser`. The method calls `setLocale`\n * unconditionally, and `BaseUser` has no `locale`, so a `BaseUser` body would erase the user's interface language.\n * The body must also carry `id`. `BaseUserDto` has a uniqueness constraint on `id` and `email`, and the validator\n * excludes the record itself only when `id` is set. Without it the server reports the user's own e-mail as taken.\n */\n const usePatchBaseUser = (patchEndPoint: string) =>\n useApiRequest<T, T>({ client, method: 'PATCH', system, entity, ...scope, urlTemplate: patchEndPoint })\n\n return {\n useFetchAnzuUserListByIds,\n useFetchAnzuUserList,\n useFetchAnzuUser,\n useCreateAnzuUser,\n useUpdateAnzuUser,\n usePatchBaseUser,\n }\n}\n"],"mappings":";;;;AAMA,IAAaA,IAAmB,YACnBC,IAAqB,qBA0BrBC,KAAiD,EAC5D,WACA,WACA,YAASF,GACT,sBAAmB,UACnB,sBAAmBG,GACnB,cAAWF,QACY;CACvB,IAAMG,IAAQ;EAAE;EAAkB;CAAiB;CAkCnD,OAAO;EACL,iCAjCAC,EAAoB;GAAE;GAAQ;GAAQ;GAAQ,GAAGD;GAAO,aAAaE;EAAS,CAAC;EAkC/E,4BAhCiCC,EAAmB;GAAE;GAAQ;GAAQ;GAAQ,GAAGH;GAAO,aAAaE;EAAS,CAAC;EAiC/G,mBA9BwB,IAAgBH,MACxCK,EAAuB;GACrB;GACA,QAAQ;GACR;GACA,QAAQC;GACR,GAAGL;GACH,aAAaE,IAAW;EAC1B,CAAC;EAuBD,yBApBAE,EAAoB;GAAE;GAAQ,QAAQ;GAAQ;GAAQ;GAAQ,GAAGJ;GAAO,aAAaE;EAAS,CAAC;EAqB/F,yBAlBAE,EAAoB;GAAE;GAAQ,QAAQ;GAAO;GAAQ;GAAQ,GAAGJ;GAAO,aAAaE,IAAW;EAAO,CAAC;EAmBvG,mBATwB,MACxBE,EAAoB;GAAE;GAAQ,QAAQ;GAAS;GAAQ;GAAQ,GAAGJ;GAAO,aAAaM;EAAc,CAAC;CASvG;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"AUserManageButton.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_component_VTooltip","_withCtx","_createElementVNode","_normalizeProps","_guardReactiveProps","_createVNode","_component_VBtn","_createTextVNode","_toDisplayString","_unref","AUserManageButton_vue_vue_type_script_setup_true_lang_default","props","__props","useI18n","isExternal","computed","missingUrl","href","to","label","t","openBlock","createBlock","VTooltip","withCtx","tooltipProps","createElementVNode","normalizeProps","guardReactiveProps","createVNode","VBtn","createTextVNode","toDisplayString","unref"],"sources":["../../../../src/domains/anzuUser/components/AUserManageButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useI18n } from 'vue-i18n'\nimport type { UserSystemManageTarget } from '@/domains/anzuUser/composables/userSystemDescriptor'\n\nconst props = withDefaults(\n defineProps<{\n target: UserSystemManageTarget\n systemLabel: string\n /** \"Edit\" instead of \"Manage in X\" -- used where the operator is already in that admin. */\n internalLabel?: string | undefined\n }>(),\n {\n internalLabel: undefined,\n }\n)\n\nconst { t } = useI18n()\n\nconst isExternal = computed(() => props.target.kind === 'external')\n\n/** A missing url means the template is configured but absent. Show the reason instead of a silently disabled button. */\nconst missingUrl = computed(() => props.target.kind === 'external' && props.target.href === null)\n\nconst href = computed(() => (props.target.kind === 'external' ? (props.target.href ?? undefined) : undefined))\nconst to = computed(() => (props.target.kind === 'internal' ? props.target.to : undefined))\n\nconst label = computed(() =>\n isExternal.value\n ? t('common.userSystem.button.manageIn', { system: props.systemLabel })\n : (props.internalLabel ?? t('common.userSystem.button.edit'))\n)\n</script>\n\n<template>\n <VTooltip\n :disabled=\"!missingUrl\"\n location=\"top\"\n >\n <template #activator=\"{ props: tooltipProps }\">\n <!--\n An anchor, not a click handler, so middle-click, open in new tab and screen reader announcements work.\n This is also why the tab bar never navigates: `VTab` renders `role=\"tab\"` and cannot carry a link.\n -->\n <span v-bind=\"tooltipProps\">\n <VBtn\n :to=\"to\"\n :href=\"href\"\n :target=\"isExternal ? '_blank' : undefined\"\n :rel=\"isExternal ? 'noopener' : undefined\"\n :append-icon=\"isExternal ? 'mdi-open-in-new' : undefined\"\n variant=\"text\"\n :disabled=\"missingUrl\"\n size=\"small\"\n data-cy=\"user-system-manage\"\n >\n {{ label }}\n </VBtn>\n </span>\n </template>\n {{ t('common.userSystem.manageMissingUrl') }}\n </VTooltip>\n</template>\n"],"mappings":";;;;;;;;;;;;;EAKA,IAAMa,IAAQC,GAYR,EAAE,SAAMC,EAAQ,GAEhBC,IAAaC,QAAeJ,EAAM,OAAO,SAAS,UAAU,GAG5DK,IAAaD,QAAeJ,EAAM,OAAO,SAAS,cAAcA,EAAM,OAAO,SAAS,IAAI,GAE1FM,IAAOF,QAAgBJ,EAAM,OAAO,SAAS,aAAcA,EAAM,OAAO,QAAQ,KAAA,IAAa,KAAA,CAAU,GACvGO,IAAKH,QAAgBJ,EAAM,OAAO,SAAS,aAAaA,EAAM,OAAO,KAAK,KAAA,CAAU,GAEpFQ,IAAQJ,QACZD,EAAW,QACPM,EAAE,qCAAqC,EAAE,QAAQT,EAAM,YAAY,CAAC,IACnEA,EAAM,iBAAiBS,EAAE,+BAA+B,CAC/D;E,kBAIEtB,EAAA,GAAAC,EA0BWC,GAAA;GAzBR,UAAQ,CAAGgB,EAAA;GACZ,UAAS;;GAEE,WAASf,GAmBX,EAAA,OAnBsBwB,QAAY,CAKzCvB,EAcO,QAAAC,EAAAC,EAdOqB,CAAY,CAAA,GAAA,CACxBpB,EAYOC,GAAA;IAXJ,IAAIY,EAAA;IACJ,MAAMD,EAAA;IACN,QAAQH,EAAA,QAAU,WAAc,KAAA;IAChC,KAAKA,EAAA,QAAU,aAAgB,KAAA;IAC/B,eAAaA,EAAA,QAAU,oBAAuB,KAAA;IAC/C,SAAQ;IACP,UAAUE,EAAA;IACX,MAAK;IACL,WAAQ;;IAER,SAAAf,QAAW,CAARM,EAAAC,EAAAW,EAAA,KAAK,GAAA,CAAA,C;;;;;;;;;;GAGH,SAAAlB,QACX,CADWM,EAAA,MACXC,EAAGC,EAAAW,CAAA,CAAC,CAAA,oCAAA,CAAA,GAAA,CAAA,C"}
1
+ {"version":3,"file":"AUserManageButton.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_component_VTooltip","_withCtx","_createElementVNode","_normalizeProps","_guardReactiveProps","_createVNode","_component_VBtn","_createTextVNode","_toDisplayString","_unref","AUserManageButton_vue_vue_type_script_setup_true_lang_default","props","__props","useI18n","isExternal","computed","missingUrl","href","to","label","t","openBlock","createBlock","VTooltip","withCtx","tooltipProps","createElementVNode","normalizeProps","guardReactiveProps","createVNode","VBtn","createTextVNode","toDisplayString","unref"],"sources":["../../../../src/domains/anzuUser/components/AUserManageButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useI18n } from 'vue-i18n'\nimport type { UserSystemManageTarget } from '@/domains/anzuUser/composables/userSystemDescriptor'\n\nconst props = withDefaults(\n defineProps<{\n target: UserSystemManageTarget\n systemLabel: string\n /** \"Edit\" instead of \"Manage in X\" -- used where the operator is already in that admin. */\n internalLabel?: string | undefined\n }>(),\n {\n internalLabel: undefined,\n }\n)\n\nconst { t } = useI18n()\n\nconst isExternal = computed(() => props.target.kind === 'external')\n\n/** A missing url means the template is configured but absent. Show the reason instead of a silently disabled button. */\nconst missingUrl = computed(() => props.target.kind === 'external' && props.target.href === null)\n\nconst href = computed(() => (props.target.kind === 'external' ? (props.target.href ?? undefined) : undefined))\nconst to = computed(() => (props.target.kind === 'internal' ? props.target.to : undefined))\n\nconst label = computed(() =>\n isExternal.value\n ? t('common.userSystem.button.manageIn', { system: props.systemLabel })\n : (props.internalLabel ?? t('common.userSystem.button.edit'))\n)\n</script>\n\n<template>\n <VTooltip\n :disabled=\"!missingUrl\"\n location=\"top\"\n >\n <template #activator=\"{ props: tooltipProps }\">\n <!-- An anchor, not a click handler, so middle-click, open in new tab and screen reader announcements work. -->\n <span v-bind=\"tooltipProps\">\n <VBtn\n :to=\"to\"\n :href=\"href\"\n :target=\"isExternal ? '_blank' : undefined\"\n :rel=\"isExternal ? 'noopener' : undefined\"\n :append-icon=\"isExternal ? 'mdi-open-in-new' : undefined\"\n variant=\"text\"\n :disabled=\"missingUrl\"\n size=\"small\"\n data-cy=\"user-system-manage\"\n >\n {{ label }}\n </VBtn>\n </span>\n </template>\n {{ t('common.userSystem.manageMissingUrl') }}\n </VTooltip>\n</template>\n"],"mappings":";;;;;;;;;;;;;EAKA,IAAMa,IAAQC,GAYR,EAAE,SAAMC,EAAQ,GAEhBC,IAAaC,QAAeJ,EAAM,OAAO,SAAS,UAAU,GAG5DK,IAAaD,QAAeJ,EAAM,OAAO,SAAS,cAAcA,EAAM,OAAO,SAAS,IAAI,GAE1FM,IAAOF,QAAgBJ,EAAM,OAAO,SAAS,aAAcA,EAAM,OAAO,QAAQ,KAAA,IAAa,KAAA,CAAU,GACvGO,IAAKH,QAAgBJ,EAAM,OAAO,SAAS,aAAaA,EAAM,OAAO,KAAK,KAAA,CAAU,GAEpFQ,IAAQJ,QACZD,EAAW,QACPM,EAAE,qCAAqC,EAAE,QAAQT,EAAM,YAAY,CAAC,IACnEA,EAAM,iBAAiBS,EAAE,+BAA+B,CAC/D;E,kBAIEtB,EAAA,GAAAC,EAuBWC,GAAA;GAtBR,UAAQ,CAAGgB,EAAA;GACZ,UAAS;;GAEE,WAASf,GAgBX,EAAA,OAhBsBwB,QAAY,CAEzCvB,EAcO,QAAAC,EAAAC,EAdOqB,CAAY,CAAA,GAAA,CACxBpB,EAYOC,GAAA;IAXJ,IAAIY,EAAA;IACJ,MAAMD,EAAA;IACN,QAAQH,EAAA,QAAU,WAAc,KAAA;IAChC,KAAKA,EAAA,QAAU,aAAgB,KAAA;IAC/B,eAAaA,EAAA,QAAU,oBAAuB,KAAA;IAC/C,SAAQ;IACP,UAAUE,EAAA;IACX,MAAK;IACL,WAAQ;;IAER,SAAAf,QAAW,CAARM,EAAAC,EAAAW,EAAA,KAAK,GAAA,CAAA,C;;;;;;;;;;GAGH,SAAAlB,QACX,CADWM,EAAA,MACXC,EAAGC,EAAAW,CAAA,CAAC,CAAA,oCAAA,CAAA,GAAA,CAAA,C"}
@@ -0,0 +1,6 @@
1
+ import e from "./AUserMissingAccount.vue_vue_type_script_setup_true_lang.js";
2
+ // src/domains/anzuUser/components/AUserMissingAccount.vue
3
+ var t = e;
4
+ export { t as default };
5
+
6
+ //# sourceMappingURL=AUserMissingAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AUserMissingAccount.js","names":["AUserMissingAccount_vue_vue_type_script_setup_true_lang_default","AUserMissingAccount_default"],"sources":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import { AnyUserSystemDescriptor } from '../composables/userSystemDescriptor';
2
+ import { IntegerId } from '../../../shared/types/common';
3
+ /**
4
+ * A user page whose system holds no account for the person. It stays inside the tabs and offers
5
+ * to create the account, copying another managed system's record, instead of leaving the page.
6
+ */
7
+ type __VLS_Props = {
8
+ /** The page's own system. */
9
+ descriptor: AnyUserSystemDescriptor;
10
+ userId: IntegerId;
11
+ /** The admin's other systems, in order of preference; the first holding the person is copied. */
12
+ sources: AnyUserSystemDescriptor[];
13
+ };
14
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
15
+ created: () => any;
16
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ onCreated?: (() => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import e from "./AUserSystemPanel.js";
2
+ import { useUserCreateFromSource as t } from "../composables/userCreateFromSource.js";
3
+ import { createBlock as n, defineComponent as r, onMounted as i, openBlock as a, unref as o } from "vue";
4
+ // src/domains/anzuUser/components/AUserMissingAccount.vue?vue&type=script&setup=true&lang.ts
5
+ var s = /*@__PURE__*/ r({
6
+ __name: "AUserMissingAccount",
7
+ props: {
8
+ descriptor: {},
9
+ userId: {},
10
+ sources: {}
11
+ },
12
+ emits: ["created"],
13
+ setup(r, { emit: s }) {
14
+ let c = r, l = s, { source: u, createEnabled: d, creatingSystem: f, loadSource: p, create: m } = t({
15
+ userId: () => c.userId,
16
+ sources: () => c.sources
17
+ }), h = async (e, t) => {
18
+ await m(e, t) && l("created");
19
+ };
20
+ return i(p), (t, i) => (a(), n(e, {
21
+ descriptor: r.descriptor,
22
+ "user-id": r.userId,
23
+ "create-enabled": o(d),
24
+ source: o(u),
25
+ creating: o(f) === r.descriptor.system,
26
+ onCreate: h
27
+ }, null, 8, [
28
+ "descriptor",
29
+ "user-id",
30
+ "create-enabled",
31
+ "source",
32
+ "creating"
33
+ ]));
34
+ }
35
+ });
36
+ export { s as default };
37
+
38
+ //# sourceMappingURL=AUserMissingAccount.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AUserMissingAccount.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","AUserSystemPanel","_unref","AUserSystemPanel_default","AUserMissingAccount_vue_vue_type_script_setup_true_lang_default","__emit","props","__props","emit","useUserCreateFromSource","onCreate","create","target","metadata","onMounted","loadSource","openBlock","createBlock","unref","createEnabled","source","creatingSystem"],"sources":["../../../../src/domains/anzuUser/components/AUserMissingAccount.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { onMounted } from 'vue'\nimport AUserSystemPanel from '@/domains/anzuUser/components/AUserSystemPanel.vue'\nimport type { AnyUserSystemDescriptor } from '@/domains/anzuUser/composables/userSystemDescriptor'\nimport { useUserCreateFromSource } from '@/domains/anzuUser/composables/userCreateFromSource'\nimport type { BaseUser } from '@/shared/types/AnzuUser'\nimport type { IntegerId } from '@/shared/types/common'\n\n/**\n * A user page whose system holds no account for the person. It stays inside the tabs and offers\n * to create the account, copying another managed system's record, instead of leaving the page.\n */\nconst props = defineProps<{\n /** The page's own system. */\n descriptor: AnyUserSystemDescriptor\n userId: IntegerId\n /** The admin's other systems, in order of preference; the first holding the person is copied. */\n sources: AnyUserSystemDescriptor[]\n}>()\n\nconst emit = defineEmits<{\n /** The account exists now; the page loads it. */\n (e: 'created'): void\n}>()\n\nconst { source, createEnabled, creatingSystem, loadSource, create } = useUserCreateFromSource({\n userId: () => props.userId,\n sources: () => props.sources,\n})\n\nconst onCreate = async (target: AnyUserSystemDescriptor, metadata: BaseUser) => {\n if (await create(target, metadata)) emit('created')\n}\n\nonMounted(loadSource)\n</script>\n\n<template>\n <AUserSystemPanel\n :descriptor=\"descriptor\"\n :user-id=\"userId\"\n :create-enabled=\"createEnabled\"\n :source=\"source\"\n :creating=\"creatingSystem === descriptor.system\"\n @create=\"onCreate\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;EAYA,IAAMO,IAAQC,GAQRC,IAAOH,GAKP,EAAE,WAAQ,kBAAe,mBAAgB,eAAY,cAAWI,EAAwB;GAC5F,cAAcH,EAAM;GACpB,eAAeA,EAAM;EACvB,CAAC,GAEKI,IAAW,OAAO,GAAiC,MAAuB;GAC9E,AAAI,MAAMC,EAAOC,GAAQC,CAAQ,KAAGL,EAAK,SAAS;EACpD;E,OAEAM,EAAUC,CAAU,I,UAIlBhB,EAAA,GAAAC,EAOEC,GAAA;GANC,YAAYM,EAAA;GACZ,WAASA,EAAA;GACT,kBAAgBL,EAAAiB,CAAA;GAChB,QAAQjB,EAAAkB,CAAA;GACR,UAAUlB,EAAAmB,CAAA,MAAmBd,EAAA,WAAW;GAChC"}
@@ -1,23 +1,68 @@
1
1
  import { AnyUserSystemDescriptor } from '../composables/userSystemDescriptor';
2
- import { BaseUser } from '../../../shared/types/AnzuUser';
3
2
  import { IntegerId } from '../../../shared/types/common';
4
3
  type __VLS_Props = {
4
+ /** The systems this admin does not manage, one row each. */
5
5
  descriptors: AnyUserSystemDescriptor[];
6
6
  userId: IntegerId;
7
+ /** Where an account created from a row copies from, in order of preference; see `useUserCreateFromSource`. */
8
+ sources: AnyUserSystemDescriptor[];
7
9
  readonly?: boolean;
8
- /** Whether an account created from here would be switched on. The dialog states it. */
9
- createEnabled?: boolean;
10
- /** What the owning system holds, to prefill the create form. */
11
- source?: BaseUser | null;
12
- creatingSystem?: string | null;
13
10
  };
14
11
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
15
12
  refresh: () => void;
16
13
  refreshSystem: (system: string) => void;
17
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
18
- create: (descriptor: AnyUserSystemDescriptor, user: BaseUser) => any;
19
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
20
- onCreate?: ((descriptor: AnyUserSystemDescriptor, user: BaseUser) => any) | undefined;
21
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ /** The source record, for a page that names the person. */
15
+ source: import('vue').Ref<{
16
+ enabled: boolean;
17
+ locale: import('../../../lib').LanguageCode | null;
18
+ roles: string[];
19
+ permissionGroups: IntegerId[];
20
+ permissions: import('../../../lib').Permissions;
21
+ resolvedPermissions: import('../../../lib').Permissions;
22
+ _resourceName: string;
23
+ _system: string;
24
+ createdAt: import('../../../shared/types/common').DatetimeUTC;
25
+ modifiedAt: import('../../../shared/types/common').DatetimeUTC;
26
+ modifiedBy: import('../../../shared/types/common').IntegerIdNullable;
27
+ createdBy: import('../../../shared/types/common').IntegerIdNullable;
28
+ id?: import('../../../shared/types/common').IntegerIdNullable | undefined;
29
+ email: string;
30
+ person: {
31
+ firstName: string;
32
+ lastName: string;
33
+ fullName: string;
34
+ };
35
+ avatar: {
36
+ color: string;
37
+ text: string;
38
+ };
39
+ } | null, import('../../../shared/types/AnzuUser').AnzuUser | {
40
+ enabled: boolean;
41
+ locale: import('../../../lib').LanguageCode | null;
42
+ roles: string[];
43
+ permissionGroups: IntegerId[];
44
+ permissions: import('../../../lib').Permissions;
45
+ resolvedPermissions: import('../../../lib').Permissions;
46
+ _resourceName: string;
47
+ _system: string;
48
+ createdAt: import('../../../shared/types/common').DatetimeUTC;
49
+ modifiedAt: import('../../../shared/types/common').DatetimeUTC;
50
+ modifiedBy: import('../../../shared/types/common').IntegerIdNullable;
51
+ createdBy: import('../../../shared/types/common').IntegerIdNullable;
52
+ id?: import('../../../shared/types/common').IntegerIdNullable | undefined;
53
+ email: string;
54
+ person: {
55
+ firstName: string;
56
+ lastName: string;
57
+ fullName: string;
58
+ };
59
+ avatar: {
60
+ color: string;
61
+ text: string;
62
+ };
63
+ } | null>;
64
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
65
+ readonly: boolean;
66
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
67
  declare const _default: typeof __VLS_export;
23
68
  export default _default;
@@ -1,40 +1,49 @@
1
1
  import e from "./AUserSystemPanel.js";
2
- import { Fragment as t, createBlock as n, createElementBlock as r, createVNode as i, defineComponent as a, openBlock as o, ref as s, renderList as c, withCtx as l } from "vue";
3
- import { VCard as u, VCardText as d } from "vuetify/components/VCard";
2
+ import { useUserCreateFromSource as t } from "../composables/userCreateFromSource.js";
3
+ import { Fragment as n, createBlock as r, createElementBlock as i, createVNode as a, defineComponent as o, onMounted as s, openBlock as c, ref as l, renderList as u, unref as d, withCtx as f } from "vue";
4
+ import { VCard as p, VCardText as m } from "vuetify/components/VCard";
4
5
  // src/domains/anzuUser/components/AUserOtherSystemsTable.vue?vue&type=script&setup=true&lang.ts
5
- var f = /*@__PURE__*/ a({
6
+ var h = /*@__PURE__*/ o({
6
7
  __name: "AUserOtherSystemsTable",
7
8
  props: {
8
9
  descriptors: {},
9
10
  userId: {},
10
- readonly: { type: Boolean },
11
- createEnabled: { type: Boolean },
12
- source: {},
13
- creatingSystem: {}
11
+ sources: {},
12
+ readonly: {
13
+ type: Boolean,
14
+ default: !1
15
+ }
14
16
  },
15
- emits: ["create"],
16
- setup(a, { expose: f, emit: p }) {
17
- let m = a, h = p, g = s([]);
18
- return f({
19
- refresh: () => g.value.forEach((e) => e?.refresh()),
20
- refreshSystem: (e) => {
21
- let t = m.descriptors.findIndex((t) => t.system === e);
22
- g.value[t]?.refresh();
23
- }
24
- }), (s, f) => (o(), n(u, { variant: "flat" }, {
25
- default: l(() => [i(d, { class: "d-flex flex-column ga-4" }, {
26
- default: l(() => [(o(!0), r(t, null, c(a.descriptors, (t) => (o(), n(e, {
17
+ setup(o, { expose: h }) {
18
+ let g = o, { source: _, createEnabled: v, creatingSystem: y, loadSource: b, create: x } = t({
19
+ userId: () => g.userId,
20
+ sources: () => g.sources
21
+ }), S = l([]), C = (e) => {
22
+ let t = g.descriptors.findIndex((t) => t.system === e);
23
+ S.value[t]?.refresh();
24
+ }, w = async (e, t) => {
25
+ await x(e, t) && C(e.system);
26
+ };
27
+ return s(b), h({
28
+ refresh: () => {
29
+ b(), S.value.forEach((e) => e?.refresh());
30
+ },
31
+ refreshSystem: C,
32
+ source: _
33
+ }), (t, s) => (c(), r(p, { variant: "flat" }, {
34
+ default: f(() => [a(m, { class: "d-flex flex-column ga-4" }, {
35
+ default: f(() => [(c(!0), i(n, null, u(o.descriptors, (t) => (c(), r(e, {
27
36
  key: t.system,
28
37
  ref_for: !0,
29
38
  ref_key: "panels",
30
- ref: g,
39
+ ref: S,
31
40
  descriptor: t,
32
- "user-id": a.userId,
33
- readonly: a.readonly,
34
- "create-enabled": a.createEnabled,
35
- source: a.source,
36
- creating: a.creatingSystem === t.system,
37
- onCreate: f[0] ||= (e, t) => h("create", e, t)
41
+ "user-id": o.userId,
42
+ readonly: o.readonly,
43
+ "create-enabled": d(v),
44
+ source: d(_),
45
+ creating: d(y) === t.system,
46
+ onCreate: w
38
47
  }, null, 8, [
39
48
  "descriptor",
40
49
  "user-id",
@@ -49,6 +58,6 @@ var f = /*@__PURE__*/ a({
49
58
  }));
50
59
  }
51
60
  });
52
- export { f as default };
61
+ export { h as default };
53
62
 
54
63
  //# sourceMappingURL=AUserOtherSystemsTable.vue_vue_type_script_setup_true_lang.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AUserOtherSystemsTable.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_component_VCard","_withCtx","_createVNode","_component_VCardText","_createElementBlock","_Fragment","_renderList","AUserSystemPanel","AUserSystemPanel_default","AUserOtherSystemsTable_vue_vue_type_script_setup_true_lang_default","__expose","__emit","props","__props","emit","panels","ref","panel","index","descriptor","system","openBlock","createBlock","VCard","withCtx","createVNode","VCardText","createElementBlock","Fragment","renderList","_cache","target","user"],"sources":["../../../../src/domains/anzuUser/components/AUserOtherSystemsTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ref } from 'vue'\nimport AUserSystemPanel from '@/domains/anzuUser/components/AUserSystemPanel.vue'\nimport type { AnyUserSystemDescriptor } from '@/domains/anzuUser/composables/userSystemDescriptor'\nimport type { BaseUser } from '@/shared/types/AnzuUser'\nimport type { IntegerId } from '@/shared/types/common'\n\nconst props = defineProps<{\n descriptors: AnyUserSystemDescriptor[]\n userId: IntegerId\n readonly?: boolean\n /** Whether an account created from here would be switched on. The dialog states it. */\n createEnabled?: boolean\n /** What the owning system holds, to prefill the create form. */\n source?: BaseUser | null\n creatingSystem?: string | null\n}>()\n\nconst emit = defineEmits<{\n (e: 'create', descriptor: AnyUserSystemDescriptor, user: BaseUser): void\n}>()\n\n/**\n * A read-only list of panels, not `AUserSystemOverview`. The overview adds search, bulk\n * actions and inconsistency detection, and building on it would make task 2 depend on task 3.\n */\nconst panels = ref<InstanceType<typeof AUserSystemPanel>[]>([])\n\nconst refreshSystem = (system: string) => {\n const index = props.descriptors.findIndex((descriptor) => descriptor.system === system)\n panels.value[index]?.refresh()\n}\n\ndefineExpose({\n refresh: () => panels.value.forEach((panel) => panel?.refresh()),\n refreshSystem,\n})\n</script>\n\n<template>\n <VCard variant=\"flat\">\n <VCardText class=\"d-flex flex-column ga-4\">\n <AUserSystemPanel\n v-for=\"descriptor in descriptors\"\n :key=\"descriptor.system\"\n ref=\"panels\"\n :descriptor=\"descriptor\"\n :user-id=\"userId\"\n :readonly=\"readonly\"\n :create-enabled=\"createEnabled\"\n :source=\"source\"\n :creating=\"creatingSystem === descriptor.system\"\n @create=\"(target, user) => emit('create', target, user)\"\n />\n </VCardText>\n </VCard>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAOA,IAAMc,IAAQC,GAWRC,IAAOH,GAQPI,IAASC,EAA6C,CAAC,CAAC;E,OAO9DN,EAAa;GACX,eAAeK,EAAO,MAAM,SAAS,MAAUE,GAAO,QAAQ,CAAC;GAC/D,gBAPqB,MAAmB;IACxC,IAAMC,IAAQN,EAAM,YAAY,WAAW,MAAeO,EAAW,WAAWC,CAAM;IACtF,EAAO,MAAMF,EAAM,EAAE,QAAQ;GAC/B;EAKA,CAAC,I,UAICpB,EAAA,GAAAC,EAeQC,GAAA,EAfD,SAAQ,OAAM,GAAA;GACnB,SAAAC,QAaY,CAbZC,EAaYC,GAAA,EAbD,OAAM,0BAAyB,GAAA;IAEtC,SAAAF,QAAiC,EADnCH,EAAA,EAAA,GAAAM,EAWEC,GAAA,MAAAC,EAVqBO,EAAA,cAAd,OADTf,EAAA,GAAAC,EAWEQ,GAAA;KATC,KAAKY,EAAW;;KACb,SAAA;KAAJ,KAAIJ;KACS;KACZ,WAASF,EAAA;KACT,UAAUA,EAAA;KACV,kBAAgBA,EAAA;KAChB,QAAQA,EAAA;KACR,UAAUA,EAAA,mBAAmBM,EAAW;KACxC,UAAM,AAAAW,EAAA,QAAG,GAAQ,MAAShB,EAAI,UAAWiB,GAAQC,CAAI"}
1
+ {"version":3,"file":"AUserOtherSystemsTable.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_component_VCard","_withCtx","_createVNode","_component_VCardText","_createElementBlock","_Fragment","_renderList","AUserSystemPanel","_unref","AUserSystemPanel_default","AUserOtherSystemsTable_vue_vue_type_script_setup_true_lang_default","__expose","props","__props","useUserCreateFromSource","panels","ref","refreshSystem","index","descriptor","system","onCreate","create","target","metadata","onMounted","loadSource","panel","openBlock","createBlock","VCard","withCtx","createVNode","VCardText","createElementBlock","Fragment","renderList","unref","createEnabled","source","creatingSystem"],"sources":["../../../../src/domains/anzuUser/components/AUserOtherSystemsTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { onMounted, ref } from 'vue'\nimport AUserSystemPanel from '@/domains/anzuUser/components/AUserSystemPanel.vue'\nimport type { AnyUserSystemDescriptor } from '@/domains/anzuUser/composables/userSystemDescriptor'\nimport { useUserCreateFromSource } from '@/domains/anzuUser/composables/userCreateFromSource'\nimport type { BaseUser } from '@/shared/types/AnzuUser'\nimport type { IntegerId } from '@/shared/types/common'\n\nconst props = withDefaults(\n defineProps<{\n /** The systems this admin does not manage, one row each. */\n descriptors: AnyUserSystemDescriptor[]\n userId: IntegerId\n /** Where an account created from a row copies from, in order of preference; see `useUserCreateFromSource`. */\n sources: AnyUserSystemDescriptor[]\n readonly?: boolean\n }>(),\n {\n readonly: false,\n }\n)\n\nconst { source, createEnabled, creatingSystem, loadSource, create } = useUserCreateFromSource({\n userId: () => props.userId,\n sources: () => props.sources,\n})\n\n/**\n * A read-only list of panels, not `AUserSystemOverview`. The overview adds search, bulk\n * actions and inconsistency detection, and building on it would make task 2 depend on task 3.\n */\nconst panels = ref<InstanceType<typeof AUserSystemPanel>[]>([])\n\nconst refreshSystem = (system: string) => {\n const index = props.descriptors.findIndex((descriptor) => descriptor.system === system)\n panels.value[index]?.refresh()\n}\n\nconst onCreate = async (target: AnyUserSystemDescriptor, metadata: BaseUser) => {\n if (await create(target, metadata)) refreshSystem(target.system)\n}\n\nonMounted(loadSource)\n\ndefineExpose({\n refresh: () => {\n void loadSource()\n panels.value.forEach((panel) => panel?.refresh())\n },\n refreshSystem,\n /** The source record, for a page that names the person. */\n source,\n})\n</script>\n\n<template>\n <VCard variant=\"flat\">\n <VCardText class=\"d-flex flex-column ga-4\">\n <AUserSystemPanel\n v-for=\"descriptor in descriptors\"\n :key=\"descriptor.system\"\n ref=\"panels\"\n :descriptor=\"descriptor\"\n :user-id=\"userId\"\n :readonly=\"readonly\"\n :create-enabled=\"createEnabled\"\n :source=\"source\"\n :creating=\"creatingSystem === descriptor.system\"\n @create=\"onCreate\"\n />\n </VCardText>\n </VCard>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EAQA,IAAMc,IAAQC,GAcR,EAAE,WAAQ,kBAAe,mBAAgB,eAAY,cAAWC,EAAwB;GAC5F,cAAcF,EAAM;GACpB,eAAeA,EAAM;EACvB,CAAC,GAMKG,IAASC,EAA6C,CAAC,CAAC,GAExDC,KAAiB,MAAmB;GACxC,IAAMC,IAAQN,EAAM,YAAY,WAAW,MAAeO,EAAW,WAAWC,CAAM;GACtF,EAAO,MAAMF,EAAM,EAAE,QAAQ;EAC/B,GAEMG,IAAW,OAAO,GAAiC,MAAuB;GAC9E,AAAI,MAAMC,EAAOC,GAAQC,CAAQ,KAAGP,EAAcM,EAAO,MAAM;EACjE;E,OAEAE,EAAUC,CAAU,GAEpBf,EAAa;GACX,eAAe;IAEb,AADAe,EAAgB,GAChBX,EAAO,MAAM,SAAS,MAAUY,GAAO,QAAQ,CAAC;GAClD;GACA;GAEA;EACF,CAAC,I,UAIC7B,EAAA,GAAAC,EAeQC,GAAA,EAfD,SAAQ,OAAM,GAAA;GACnB,SAAAC,QAaY,CAbZC,EAaYC,GAAA,EAbD,OAAM,0BAAyB,GAAA;IAEtC,SAAAF,QAAiC,EADnCH,EAAA,EAAA,GAAAM,EAWEC,GAAA,MAAAC,EAVqBO,EAAA,cAAd,OADTf,EAAA,GAAAC,EAWEQ,GAAA;KATC,KAAKY,EAAW;;KACb,SAAA;KAAJ,KAAIJ;KACS;KACZ,WAASF,EAAA;KACT,UAAUA,EAAA;KACV,kBAAgBL,EAAA8B,CAAA;KAChB,QAAQ9B,EAAA+B,CAAA;KACR,UAAU/B,EAAAgC,CAAA,MAAmBrB,EAAW;KAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AUserSystemPanel.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_createVNode","AUserSystemStatusChip","_unref","_createBlock","_component_VChip","_withCtx","_createTextVNode","_component_VSpacer","AUserManageButton","AUserCreateInSystemButton","_component_VBtn","AUserCreateInSystemButton_default","AUserManageButton_default","AUserSystemStatusChip_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","AUserSystemPanel_vue_vue_type_script_setup_true_lang_default","__expose","__emit","props","__props","emit","useI18n","refreshHook","inject","UserSystemRefreshHookKey","useUserSystemProbe","label","computed","showManage","axes","UserSystemLoad","user","isUndefined","descriptorMayWrite","showCreate","isAuthoritativelyAbsent","showNoWriteRight","manageTarget","extraState","EXTRA_STATE_COLOR","canRetry","UserSystemAccess","run","probe","onMounted","watch","onBeforeUnmount","cancel","openBlock","createElementBlock","createElementVNode","toDisplayString","createVNode","unref","createBlock","VChip","withCtx","createTextVNode","createCommentVNode","VSpacer","_cache","t","VBtn"],"sources":["../../../../src/domains/anzuUser/components/AUserSystemPanel.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, onMounted, watch } from 'vue'\nimport { useI18n } from 'vue-i18n'\nimport AUserCreateInSystemButton from '@/domains/anzuUser/components/AUserCreateInSystemButton.vue'\nimport AUserManageButton from '@/domains/anzuUser/components/AUserManageButton.vue'\nimport AUserSystemStatusChip from '@/domains/anzuUser/components/AUserSystemStatusChip.vue'\nimport { type AnyUserSystemDescriptor, descriptorMayWrite } from '@/domains/anzuUser/composables/userSystemDescriptor'\nimport { useUserSystemProbe, UserSystemRefreshHookKey } from '@/domains/anzuUser/composables/userSystemProbe'\nimport { isAuthoritativelyAbsent, UserSystemAccess, UserSystemLoad } from '@/domains/anzuUser/utils/userSystemState'\nimport type { BaseUser } from '@/shared/types/AnzuUser'\nimport type { IntegerId } from '@/shared/types/common'\nimport { isUndefined } from '@/shared/utils/common'\n\nconst props = withDefaults(\n defineProps<{\n descriptor: AnyUserSystemDescriptor\n userId: IntegerId\n /**\n * On a viewing page there is no Create, because no read-only screen offers a write action.\n * Manage stays because it only navigates.\n */\n readonly?: boolean\n /** Whether the account about to be created would be switched on. */\n createEnabled?: boolean\n /** What the owning system holds, to prefill the create form. */\n source?: BaseUser | null\n creating?: boolean\n }>(),\n {\n readonly: false,\n createEnabled: false,\n source: null,\n creating: false,\n }\n)\n\nconst emit = defineEmits<{\n (e: 'create', descriptor: AnyUserSystemDescriptor, user: BaseUser): void\n}>()\n\nconst { t } = useI18n()\n\n// Provided once per page rather than passed down through every row.\nconst refreshHook = inject(UserSystemRefreshHookKey, undefined)\n\n/* eslint-disable vue/no-setup-props-reactivity-loss */\nconst { axes, user, probe, cancel } = useUserSystemProbe({ descriptor: props.descriptor, refreshHook })\n/* eslint-enable vue/no-setup-props-reactivity-loss */\n\nconst label = computed(() => props.descriptor.label ?? props.descriptor.system)\n\n/**\n * The buttons depend on the probe's answer, not on `<Acl>`, except that the descriptor can deny writing (`canWrite`).\n * On a cross-system surface no current user is loaded for other backends, so `can()` would throw and\n * `<Acl>` would render nothing. The probe is the only signal, so its 401 handling must be right.\n */\nconst showManage = computed(\n () =>\n axes.value.load === UserSystemLoad.Loaded &&\n user.value !== null &&\n !isUndefined(props.descriptor.manage) &&\n descriptorMayWrite(props.descriptor, 'update')\n)\nconst showCreate = computed(\n () => !props.readonly && isAuthoritativelyAbsent(axes.value) && descriptorMayWrite(props.descriptor, 'create')\n)\n\nconst showNoWriteRight = computed(\n () =>\n (axes.value.load === UserSystemLoad.Loaded &&\n user.value !== null &&\n !isUndefined(props.descriptor.manage) &&\n !descriptorMayWrite(props.descriptor, 'update')) ||\n (!props.readonly && isAuthoritativelyAbsent(axes.value) && !descriptorMayWrite(props.descriptor, 'create'))\n)\n\nconst manageTarget = computed(() => {\n if (user.value === null || isUndefined(props.descriptor.manage)) return null\n return props.descriptor.manage(user.value)\n})\n\nconst extraState = computed(() => {\n if (user.value === null || isUndefined(props.descriptor.extraState)) return null\n return props.descriptor.extraState(user.value)\n})\n\nconst EXTRA_STATE_COLOR = { ok: 'success', warn: 'warning', error: 'error' } as const\n\nconst canRetry = computed(\n () => axes.value.access === UserSystemAccess.Unavailable || axes.value.access === UserSystemAccess.Unauthenticated\n)\n\nconst run = () => probe(props.userId)\n\nonMounted(run)\n\n// The panel is never re-created because `VWindowItem` hides it\n// with `v-show`. A new id has to reach it through this watcher.\nwatch(() => props.userId, run)\n\nonBeforeUnmount(cancel)\n\ndefineExpose({\n refresh: run,\n})\n</script>\n\n<template>\n <div\n class=\"d-flex align-center flex-wrap ga-2\"\n :data-cy=\"`user-system-panel-${descriptor.system}`\"\n >\n <div class=\"font-weight-medium\">{{ label }}</div>\n <AUserSystemStatusChip :axes=\"axes\" />\n <VChip\n v-if=\"extraState\"\n :color=\"EXTRA_STATE_COLOR[extraState.tone]\"\n label\n size=\"small\"\n >\n {{ extraState.label }}: {{ extraState.value }}\n </VChip>\n <div\n v-if=\"user\"\n class=\"text-body-small text-medium-emphasis\"\n >\n {{ user.person.fullName }} · {{ user.email }}\n </div>\n <div\n v-if=\"descriptor.enabledNote\"\n class=\"text-body-small text-medium-emphasis w-100\"\n >\n {{ descriptor.enabledNote }}\n </div>\n <VSpacer />\n <AUserManageButton\n v-if=\"showManage && manageTarget\"\n :target=\"manageTarget\"\n :system-label=\"label\"\n />\n <AUserCreateInSystemButton\n v-if=\"showCreate\"\n :system-label=\"label\"\n :create-note=\"descriptor.createNote\"\n :will-be-enabled=\"createEnabled\"\n :loading=\"creating\"\n :required-metadata=\"descriptor.requiredMetadata\"\n :user-id=\"userId\"\n :source=\"source\"\n @confirm=\"(user) => emit('create', descriptor, user)\"\n />\n <span\n v-if=\"showNoWriteRight\"\n class=\"text-body-small text-medium-emphasis\"\n data-cy=\"user-system-no-write\"\n >\n {{ t('common.userSystem.state.noWriteRight') }}\n </span>\n <VBtn\n v-if=\"canRetry\"\n size=\"small\"\n variant=\"text\"\n data-cy=\"user-system-retry\"\n @click=\"run\"\n >\n {{ t('common.userSystem.button.retry') }}\n </VBtn>\n </div>\n</template>\n"],"mappings":"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"}
1
+ {"version":3,"file":"AUserSystemPanel.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_createVNode","AUserSystemStatusChip","_unref","_createBlock","_component_VChip","_withCtx","_createTextVNode","_component_VSpacer","AUserManageButton","AUserCreateInSystemButton","_component_VBtn","AUserCreateInSystemButton_default","AUserManageButton_default","AUserSystemStatusChip_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","AUserSystemPanel_vue_vue_type_script_setup_true_lang_default","__expose","__emit","props","__props","emit","useI18n","refreshHook","inject","UserSystemRefreshHookKey","useUserSystemProbe","label","computed","showManage","axes","UserSystemLoad","user","isUndefined","descriptorMayWrite","showCreate","isAuthoritativelyAbsent","showNoWriteRight","manageTarget","extraState","EXTRA_STATE_COLOR","canRetry","UserSystemAccess","run","probe","onMounted","watch","onBeforeUnmount","cancel","openBlock","createElementBlock","createElementVNode","toDisplayString","createVNode","unref","createBlock","VChip","withCtx","createTextVNode","createCommentVNode","VSpacer","_cache","t","VBtn"],"sources":["../../../../src/domains/anzuUser/components/AUserSystemPanel.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, onMounted, watch } from 'vue'\nimport { useI18n } from 'vue-i18n'\nimport AUserCreateInSystemButton from '@/domains/anzuUser/components/AUserCreateInSystemButton.vue'\nimport AUserManageButton from '@/domains/anzuUser/components/AUserManageButton.vue'\nimport AUserSystemStatusChip from '@/domains/anzuUser/components/AUserSystemStatusChip.vue'\nimport { type AnyUserSystemDescriptor, descriptorMayWrite } from '@/domains/anzuUser/composables/userSystemDescriptor'\nimport { useUserSystemProbe, UserSystemRefreshHookKey } from '@/domains/anzuUser/composables/userSystemProbe'\nimport { isAuthoritativelyAbsent, UserSystemAccess, UserSystemLoad } from '@/domains/anzuUser/utils/userSystemState'\nimport type { BaseUser } from '@/shared/types/AnzuUser'\nimport type { IntegerId } from '@/shared/types/common'\nimport { isUndefined } from '@/shared/utils/common'\n\nconst props = withDefaults(\n defineProps<{\n descriptor: AnyUserSystemDescriptor\n userId: IntegerId\n /**\n * On a viewing page there is no Create, because no read-only screen offers a write action.\n * Manage stays because it only navigates.\n */\n readonly?: boolean\n /** Whether the account about to be created would be switched on. */\n createEnabled?: boolean\n /** What the owning system holds, to prefill the create form. */\n source?: BaseUser | null\n creating?: boolean\n }>(),\n {\n readonly: false,\n createEnabled: false,\n source: null,\n creating: false,\n }\n)\n\nconst emit = defineEmits<{\n (e: 'create', descriptor: AnyUserSystemDescriptor, user: BaseUser): void\n}>()\n\nconst { t } = useI18n()\n\n// Provided once per page rather than passed down through every row.\nconst refreshHook = inject(UserSystemRefreshHookKey, undefined)\n\n/* eslint-disable vue/no-setup-props-reactivity-loss */\nconst { axes, user, probe, cancel } = useUserSystemProbe({ descriptor: props.descriptor, refreshHook })\n/* eslint-enable vue/no-setup-props-reactivity-loss */\n\nconst label = computed(() => props.descriptor.label ?? props.descriptor.system)\n\n/**\n * The buttons depend on the probe's answer, not on `<Acl>`, except that the descriptor can deny writing (`canWrite`).\n * On a cross-system surface no current user is loaded for other backends, so `can()` would throw and\n * `<Acl>` would render nothing. The probe is the only signal, so its 401 handling must be right.\n */\nconst showManage = computed(\n () =>\n axes.value.load === UserSystemLoad.Loaded &&\n user.value !== null &&\n !isUndefined(props.descriptor.manage) &&\n descriptorMayWrite(props.descriptor, 'update')\n)\nconst showCreate = computed(\n () => !props.readonly && isAuthoritativelyAbsent(axes.value) && descriptorMayWrite(props.descriptor, 'create')\n)\n\nconst showNoWriteRight = computed(\n () =>\n (axes.value.load === UserSystemLoad.Loaded &&\n user.value !== null &&\n !isUndefined(props.descriptor.manage) &&\n !descriptorMayWrite(props.descriptor, 'update')) ||\n (!props.readonly && isAuthoritativelyAbsent(axes.value) && !descriptorMayWrite(props.descriptor, 'create'))\n)\n\nconst manageTarget = computed(() => {\n if (user.value === null || isUndefined(props.descriptor.manage)) return null\n return props.descriptor.manage(user.value)\n})\n\nconst extraState = computed(() => {\n if (user.value === null || isUndefined(props.descriptor.extraState)) return null\n return props.descriptor.extraState(user.value)\n})\n\nconst EXTRA_STATE_COLOR = { ok: 'success', warn: 'warning', error: 'error' } as const\n\nconst canRetry = computed(\n () => axes.value.access === UserSystemAccess.Unavailable || axes.value.access === UserSystemAccess.Unauthenticated\n)\n\nconst run = () => probe(props.userId)\n\nonMounted(run)\n\nwatch(() => props.userId, run)\n\nonBeforeUnmount(cancel)\n\ndefineExpose({\n refresh: run,\n})\n</script>\n\n<template>\n <div\n class=\"d-flex align-center flex-wrap ga-2\"\n :data-cy=\"`user-system-panel-${descriptor.system}`\"\n >\n <div class=\"font-weight-medium\">{{ label }}</div>\n <AUserSystemStatusChip :axes=\"axes\" />\n <VChip\n v-if=\"extraState\"\n :color=\"EXTRA_STATE_COLOR[extraState.tone]\"\n label\n size=\"small\"\n >\n {{ extraState.label }}: {{ extraState.value }}\n </VChip>\n <div\n v-if=\"user\"\n class=\"text-body-small text-medium-emphasis\"\n >\n {{ user.person.fullName }} · {{ user.email }}\n </div>\n <div\n v-if=\"descriptor.enabledNote\"\n class=\"text-body-small text-medium-emphasis w-100\"\n >\n {{ descriptor.enabledNote }}\n </div>\n <VSpacer />\n <AUserManageButton\n v-if=\"showManage && manageTarget\"\n :target=\"manageTarget\"\n :system-label=\"label\"\n />\n <AUserCreateInSystemButton\n v-if=\"showCreate\"\n :system-label=\"label\"\n :create-note=\"descriptor.createNote\"\n :will-be-enabled=\"createEnabled\"\n :loading=\"creating\"\n :required-metadata=\"descriptor.requiredMetadata\"\n :user-id=\"userId\"\n :source=\"source\"\n @confirm=\"(user) => emit('create', descriptor, user)\"\n />\n <span\n v-if=\"showNoWriteRight\"\n class=\"text-body-small text-medium-emphasis\"\n data-cy=\"user-system-no-write\"\n >\n {{ t('common.userSystem.state.noWriteRight') }}\n </span>\n <VBtn\n v-if=\"canRetry\"\n size=\"small\"\n variant=\"text\"\n data-cy=\"user-system-retry\"\n @click=\"run\"\n >\n {{ t('common.userSystem.button.retry') }}\n </VBtn>\n </div>\n</template>\n"],"mappings":"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"}