@anzusystems/common-admin 2.0.0-rc.13 → 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.
- package/dist/AnzuSystemsCommonAdmin.d.ts +10 -4
- package/dist/AnzuSystemsCommonAdmin.js.map +1 -1
- package/dist/common-admin.js +258 -254
- package/dist/domains/anzuUser/api/anzuUserApi.d.ts +1 -1
- package/dist/domains/anzuUser/api/anzuUserApi.js +2 -2
- package/dist/domains/anzuUser/api/anzuUserApi.js.map +1 -1
- package/dist/domains/anzuUser/components/AUserCreateInSystemButton.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/domains/anzuUser/components/AUserCreateInSystemButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/anzuUser/components/AUserManageButton.vue_vue_type_script_setup_true_lang.js +1 -4
- package/dist/domains/anzuUser/components/AUserManageButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/anzuUser/components/AUserMissingAccount.js +6 -0
- package/dist/domains/anzuUser/components/AUserMissingAccount.js.map +1 -0
- package/dist/domains/anzuUser/components/AUserMissingAccount.vue.d.ts +20 -0
- package/dist/domains/anzuUser/components/AUserMissingAccount.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/domains/anzuUser/components/AUserMissingAccount.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/domains/anzuUser/components/AUserOtherSystemsTable.vue.d.ts +56 -11
- package/dist/domains/anzuUser/components/AUserOtherSystemsTable.vue_vue_type_script_setup_true_lang.js +36 -27
- package/dist/domains/anzuUser/components/AUserOtherSystemsTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/anzuUser/components/AUserSystemOverview.vue_vue_type_script_setup_true_lang.js +93 -86
- package/dist/domains/anzuUser/components/AUserSystemOverview.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/anzuUser/components/AUserSystemPanel.vue_vue_type_script_setup_true_lang.js +30 -25
- package/dist/domains/anzuUser/components/AUserSystemPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/anzuUser/components/AUserTabsShell.vue.d.ts +15 -33
- package/dist/domains/anzuUser/components/AUserTabsShell.vue_vue_type_script_setup_true_lang.js +54 -155
- package/dist/domains/anzuUser/components/AUserTabsShell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/anzuUser/composables/anzuUserActions.d.ts +2 -0
- package/dist/domains/anzuUser/composables/anzuUserActions.js +74 -71
- package/dist/domains/anzuUser/composables/anzuUserActions.js.map +1 -1
- package/dist/domains/anzuUser/composables/userCreateFromSource.d.ts +70 -0
- package/dist/domains/anzuUser/composables/userCreateFromSource.js +62 -0
- package/dist/domains/anzuUser/composables/userCreateFromSource.js.map +1 -0
- package/dist/domains/anzuUser/utils/userTabs.d.ts +7 -1
- package/dist/domains/anzuUser/utils/userTabs.js.map +1 -1
- package/dist/domains/dam/api/damAssetApi.d.ts +5 -0
- package/dist/domains/dam/api/damAssetApi.js +39 -34
- package/dist/domains/dam/api/damAssetApi.js.map +1 -1
- package/dist/domains/dam/assetDetail/components/AssetMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/api/damPodcastApi.d.ts +2 -2
- package/dist/domains/dam/assetSelect/api/damPodcastApi.js +4 -4
- package/dist/domains/dam/assetSelect/api/damPodcastApi.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AAssetListInner.vue_vue_type_script_setup_true_lang.js +152 -153
- package/dist/domains/dam/assetSelect/components/AAssetListInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AAssetSelect.vue.d.ts +3 -0
- package/dist/domains/dam/assetSelect/components/AAssetSelect.vue_vue_type_script_setup_true_lang.js +80 -72
- package/dist/domains/dam/assetSelect/components/AAssetSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.vue.d.ts +3 -0
- package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.vue_vue_type_script_setup_true_lang.js +88 -80
- package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AssetSelectFilter.vue.d.ts +3 -0
- package/dist/domains/dam/assetSelect/components/AssetSelectFilter.vue_vue_type_script_setup_true_lang.js +42 -60
- package/dist/domains/dam/assetSelect/components/AssetSelectFilter.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AssetSelectFilterForm.vue_vue_type_script_setup_true_lang.js +7 -9
- package/dist/domains/dam/assetSelect/components/AssetSelectFilterForm.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AssetSelectLicencePresetBar.js +6 -0
- package/dist/domains/dam/assetSelect/components/AssetSelectLicencePresetBar.js.map +1 -0
- package/dist/domains/dam/assetSelect/components/AssetSelectLicencePresetBar.vue.d.ts +3 -0
- package/dist/domains/dam/assetSelect/components/AssetSelectLicencePresetBar.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/domains/dam/assetSelect/components/AssetSelectLicencePresetBar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/domains/dam/assetSelect/components/AssetSelectListBar.vue_vue_type_script_setup_true_lang.js +127 -106
- package/dist/domains/dam/assetSelect/components/AssetSelectListBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/AssetSelectListTable.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/domains/dam/assetSelect/components/AssetSelectListTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/components/FilterPodcastRemoteAutocomplete.vue.d.ts +3 -1
- package/dist/domains/dam/assetSelect/components/FilterPodcastRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +3 -2
- package/dist/domains/dam/assetSelect/components/FilterPodcastRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetSelect/composables/assetSelectItemActions.js +32 -30
- package/dist/domains/dam/assetSelect/composables/assetSelectItemActions.js.map +1 -1
- package/dist/domains/dam/assetSelect/composables/assetSelectListActions.js +96 -96
- package/dist/domains/dam/assetSelect/composables/assetSelectListActions.js.map +1 -1
- package/dist/domains/dam/assetSelect/composables/assetSelectPresetControl.d.ts +22 -0
- package/dist/domains/dam/assetSelect/composables/assetSelectPresetControl.js +44 -0
- package/dist/domains/dam/assetSelect/composables/assetSelectPresetControl.js.map +1 -0
- package/dist/domains/dam/assetSelect/composables/assetSelectPresets.d.ts +28 -0
- package/dist/domains/dam/assetSelect/composables/assetSelectPresets.js +32 -0
- package/dist/domains/dam/assetSelect/composables/assetSelectPresets.js.map +1 -0
- package/dist/domains/dam/assetSelect/composables/podcastFilterAndActions.d.ts +19 -6
- package/dist/domains/dam/assetSelect/composables/podcastFilterAndActions.js +9 -5
- package/dist/domains/dam/assetSelect/composables/podcastFilterAndActions.js.map +1 -1
- package/dist/domains/dam/assetSelect/store/assetSelectStore.d.ts +5 -1
- package/dist/domains/dam/assetSelect/store/assetSelectStore.js +97 -80
- package/dist/domains/dam/assetSelect/store/assetSelectStore.js.map +1 -1
- package/dist/domains/dam/composables/commonAdminCoreDamOptions.js +3 -3
- package/dist/domains/dam/composables/commonAdminCoreDamOptions.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue.d.ts +3 -0
- package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/AImageWidget.vue.d.ts +3 -0
- package/dist/domains/dam/imageWidget/components/AImageWidget.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/domains/dam/imageWidget/components/AImageWidget.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue.d.ts +3 -0
- package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue.d.ts +3 -0
- package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue.d.ts +3 -0
- package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue.d.ts +3 -0
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js +3 -0
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/types/AssetLicence.d.ts +6 -6
- package/dist/domains/dam/types/AssetListView.d.ts +10 -0
- package/dist/domains/dam/types/DamCurrentUser.d.ts +3 -0
- package/dist/domains/dam/user/api/assetListViewApi.d.ts +7 -0
- package/dist/domains/dam/user/api/assetListViewApi.js +21 -0
- package/dist/domains/dam/user/api/assetListViewApi.js.map +1 -0
- package/dist/domains/dam/user/components/DamAssetLicenceGroupRemoteAutocomplete.vue.d.ts +3 -0
- package/dist/domains/dam/user/components/DamAssetLicenceGroupRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +18 -14
- package/dist/domains/dam/user/components/DamAssetLicenceGroupRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/user/components/DamAssetLicenceRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +31 -31
- package/dist/domains/dam/user/components/DamAssetLicenceRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/user/components/DamAssetListViewRemoteAutocomplete.js +6 -0
- package/dist/domains/dam/user/components/DamAssetListViewRemoteAutocomplete.js.map +1 -0
- package/dist/domains/dam/user/components/DamAssetListViewRemoteAutocomplete.vue.d.ts +36 -0
- package/dist/domains/dam/user/components/DamAssetListViewRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/domains/dam/user/components/DamAssetListViewRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/domains/dam/user/composables/assetListViewActions.d.ts +10 -0
- package/dist/domains/dam/user/composables/assetListViewActions.js +15 -0
- package/dist/domains/dam/user/composables/assetListViewActions.js.map +1 -0
- package/dist/domains/dam/user/composables/cachedAssetLicences.d.ts +3 -3
- package/dist/domains/dam/user/filter/AssetLicenceGroupFilter.d.ts +14 -4
- package/dist/domains/dam/user/filter/AssetLicenceGroupFilter.js +3 -0
- package/dist/domains/dam/user/filter/AssetLicenceGroupFilter.js.map +1 -1
- package/dist/domains/dam/user/filter/AssetListViewFilter.d.ts +24 -0
- package/dist/domains/dam/user/filter/AssetListViewFilter.js +25 -0
- package/dist/domains/dam/user/filter/AssetListViewFilter.js.map +1 -0
- package/dist/domains/log/components/ALogFilter.vue_vue_type_script_setup_true_lang.js +28 -32
- package/dist/domains/log/components/ALogFilter.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/permission/components/APermissionEditor.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/domains/permission/components/APermissionEditor.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/lib.d.ts +8 -3
- package/dist/locales/cs/common/anzuUser.js +4 -4
- package/dist/locales/cs/common/assetSelect.js +26 -0
- package/dist/locales/cs/common/assetSelect.js.map +1 -1
- package/dist/locales/cs.d.ts +5 -0
- package/dist/locales/en/common/anzuUser.js +4 -4
- package/dist/locales/en/common/assetSelect.js +26 -0
- package/dist/locales/en/common/assetSelect.js.map +1 -1
- package/dist/locales/en.d.ts +5 -0
- package/dist/locales/sk/common/anzuUser.js +4 -4
- package/dist/locales/sk/common/assetSelect.js +26 -0
- package/dist/locales/sk/common/assetSelect.js.map +1 -1
- package/dist/locales/sk.d.ts +5 -0
- package/dist/plugins/i18n.d.ts +5 -0
- package/package.json +7 -7
- package/dist/domains/ui/buttons/action/components/AActionSaveAndCloseButton.js +0 -6
- package/dist/domains/ui/buttons/action/components/AActionSaveAndCloseButton.js.map +0 -1
- package/dist/domains/ui/buttons/action/components/AActionSaveAndCloseButton.vue.d.ts +0 -25
- package/dist/domains/ui/buttons/action/components/AActionSaveAndCloseButton.vue_vue_type_script_setup_true_lang.js +0 -67
- package/dist/domains/ui/buttons/action/components/AActionSaveAndCloseButton.vue_vue_type_script_setup_true_lang.js.map +0 -1
|
@@ -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:
|
|
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>({
|
|
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"}
|
|
@@ -54,8 +54,7 @@ var D = { class: "d-inline-flex" }, O = { class: "mt-2" }, k = {
|
|
|
54
54
|
disabled: u.disabled,
|
|
55
55
|
loading: u.loading,
|
|
56
56
|
size: "small",
|
|
57
|
-
variant: "
|
|
58
|
-
color: "primary",
|
|
57
|
+
variant: "text",
|
|
59
58
|
"data-cy": "user-system-create",
|
|
60
59
|
onClick: r[0] ||= v((e) => I.value = !0, ["stop"])
|
|
61
60
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AUserCreateInSystemButton.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createVNode","_component_VBtn","_withModifiers","_withCtx","_createTextVNode","_toDisplayString","_unref","_component_VDialog","_component_VCard","ADialogToolbar","_component_VCardText","AUserMetadataForm","_createElementVNode","_component_VCardActions","_component_VSpacer","ADialogToolbar_default","AUserMetadataForm_default","useVuelidate","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","AUserCreateInSystemButton_vue_vue_type_script_setup_true_lang_default","__emit","props","__props","emit","useI18n","useAnzuUserFactory","dialog","ref","user","createAnzuUser","v$","open","seed","isNull","cloneDeep","confirm","_component_ABtnTertiary","resolveComponent","_component_ABtnPrimary","openBlock","createElementBlock","createVNode","VBtn","_cache","withModifiers","withCtx","createTextVNode","toDisplayString","unref","t","VDialog","$event","VCard","VCardText","createElementVNode","createCommentVNode","VCardActions","VSpacer"],"sources":["../../../../src/domains/anzuUser/components/AUserCreateInSystemButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ref, watch } from 'vue'\nimport useVuelidate from '@vuelidate/core'\nimport { useI18n } from 'vue-i18n'\nimport ADialogToolbar from '@/domains/ui/components/ADialogToolbar.vue'\nimport AUserMetadataForm from '@/domains/anzuUser/components/AUserMetadataForm.vue'\nimport { useAnzuUserFactory } from '@/domains/anzuUser/factory/AnzuUserFactory'\nimport type { BaseUser } from '@/shared/types/AnzuUser'\nimport type { IntegerIdNullable } from '@/shared/types/common'\nimport { cloneDeep, isNull } from '@/shared/utils/common'\n\nconst props = withDefaults(\n defineProps<{\n systemLabel: string\n /** The system's `createNote`: what is special about having an account there. */\n createNote?: string | undefined\n /**\n * Whether the created account will be switched on.\n * The sentence about a working public account is composed here, not in the descriptor, because it depends on\n * this value. Creating from a panel copies the source's `enabled`; creating after an empty search sends false.\n */\n willBeEnabled?: boolean\n loading?: boolean\n disabled?: boolean\n /** The target system's `requiredMetadata`: the profile the form validates against. */\n requiredMetadata?: boolean\n /** The person's id. Always shown and never editable here, because this path is for a person who already exists. */\n userId?: IntegerIdNullable\n /**\n * Known data used to prefill the form. It is not the posted\n * body: the caller re-reads the source right before the POST.\n * The operator must complete it. A person known only in blog usually has an empty `person`, which\n * the target may require, so a silent copy would create a record the target's form refuses to save.\n */\n source?: BaseUser | null\n }>(),\n {\n createNote: undefined,\n willBeEnabled: false,\n loading: false,\n disabled: false,\n requiredMetadata: false,\n userId: null,\n source: null,\n }\n)\n\nconst emit = defineEmits<{\n (e: 'confirm', user: BaseUser): void\n}>()\n\nconst { t } = useI18n()\nconst { createAnzuUser } = useAnzuUserFactory()\nconst dialog = ref(false)\n\nconst user = ref<BaseUser>(createAnzuUser())\nconst v$ = useVuelidate()\n\n// Seeded on every open, not once. The row is re-probed after\n// each write, and a stale prefill would send outdated values.\nwatch(dialog, (open) => {\n if (!open) return\n const seed = isNull(props.source) ? createAnzuUser() : cloneDeep(props.source)\n if (!isNull(props.userId)) seed.id = props.userId\n user.value = seed\n v$.value.$reset()\n})\n\nconst confirm = async () => {\n if (!(await v$.value.$validate())) return\n dialog.value = false\n emit('confirm', cloneDeep(user.value))\n}\n</script>\n\n<template>\n <div class=\"d-inline-flex\">\n <VBtn\n :disabled=\"disabled\"\n :loading=\"loading\"\n size=\"small\"\n variant=\"
|
|
1
|
+
{"version":3,"file":"AUserCreateInSystemButton.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createVNode","_component_VBtn","_withModifiers","_withCtx","_createTextVNode","_toDisplayString","_unref","_component_VDialog","_component_VCard","ADialogToolbar","_component_VCardText","AUserMetadataForm","_createElementVNode","_component_VCardActions","_component_VSpacer","ADialogToolbar_default","AUserMetadataForm_default","useVuelidate","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","AUserCreateInSystemButton_vue_vue_type_script_setup_true_lang_default","__emit","props","__props","emit","useI18n","useAnzuUserFactory","dialog","ref","user","createAnzuUser","v$","open","seed","isNull","cloneDeep","confirm","_component_ABtnTertiary","resolveComponent","_component_ABtnPrimary","openBlock","createElementBlock","createVNode","VBtn","_cache","withModifiers","withCtx","createTextVNode","toDisplayString","unref","t","VDialog","$event","VCard","VCardText","createElementVNode","createCommentVNode","VCardActions","VSpacer"],"sources":["../../../../src/domains/anzuUser/components/AUserCreateInSystemButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ref, watch } from 'vue'\nimport useVuelidate from '@vuelidate/core'\nimport { useI18n } from 'vue-i18n'\nimport ADialogToolbar from '@/domains/ui/components/ADialogToolbar.vue'\nimport AUserMetadataForm from '@/domains/anzuUser/components/AUserMetadataForm.vue'\nimport { useAnzuUserFactory } from '@/domains/anzuUser/factory/AnzuUserFactory'\nimport type { BaseUser } from '@/shared/types/AnzuUser'\nimport type { IntegerIdNullable } from '@/shared/types/common'\nimport { cloneDeep, isNull } from '@/shared/utils/common'\n\nconst props = withDefaults(\n defineProps<{\n systemLabel: string\n /** The system's `createNote`: what is special about having an account there. */\n createNote?: string | undefined\n /**\n * Whether the created account will be switched on.\n * The sentence about a working public account is composed here, not in the descriptor, because it depends on\n * this value. Creating from a panel copies the source's `enabled`; creating after an empty search sends false.\n */\n willBeEnabled?: boolean\n loading?: boolean\n disabled?: boolean\n /** The target system's `requiredMetadata`: the profile the form validates against. */\n requiredMetadata?: boolean\n /** The person's id. Always shown and never editable here, because this path is for a person who already exists. */\n userId?: IntegerIdNullable\n /**\n * Known data used to prefill the form. It is not the posted\n * body: the caller re-reads the source right before the POST.\n * The operator must complete it. A person known only in blog usually has an empty `person`, which\n * the target may require, so a silent copy would create a record the target's form refuses to save.\n */\n source?: BaseUser | null\n }>(),\n {\n createNote: undefined,\n willBeEnabled: false,\n loading: false,\n disabled: false,\n requiredMetadata: false,\n userId: null,\n source: null,\n }\n)\n\nconst emit = defineEmits<{\n (e: 'confirm', user: BaseUser): void\n}>()\n\nconst { t } = useI18n()\nconst { createAnzuUser } = useAnzuUserFactory()\nconst dialog = ref(false)\n\nconst user = ref<BaseUser>(createAnzuUser())\nconst v$ = useVuelidate()\n\n// Seeded on every open, not once. The row is re-probed after\n// each write, and a stale prefill would send outdated values.\nwatch(dialog, (open) => {\n if (!open) return\n const seed = isNull(props.source) ? createAnzuUser() : cloneDeep(props.source)\n if (!isNull(props.userId)) seed.id = props.userId\n user.value = seed\n v$.value.$reset()\n})\n\nconst confirm = async () => {\n if (!(await v$.value.$validate())) return\n dialog.value = false\n emit('confirm', cloneDeep(user.value))\n}\n</script>\n\n<template>\n <div class=\"d-inline-flex\">\n <VBtn\n :disabled=\"disabled\"\n :loading=\"loading\"\n size=\"small\"\n variant=\"text\"\n data-cy=\"user-system-create\"\n @click.stop=\"dialog = true\"\n >\n {{ t('common.userSystem.button.create') }}\n </VBtn>\n <VDialog\n v-model=\"dialog\"\n :max-width=\"640\"\n >\n <VCard>\n <ADialogToolbar @cancel=\"dialog = false\">\n {{ t('common.userSystem.create.title', { system: systemLabel }) }}\n </ADialogToolbar>\n <VCardText>\n <!-- The id is shown and locked: this gives the existing person's global id an account here. -->\n <AUserMetadataForm\n v-model:user=\"user\"\n :required=\"requiredMetadata\"\n id-input\n is-edit\n />\n <!--\n Stated explicitly because neither is obvious or reversible: the account\n is created with nothing granted, and no admin can delete an AnzuUser.\n -->\n <p class=\"mt-2\">{{ t('common.userSystem.create.note') }}</p>\n <p\n v-if=\"createNote\"\n class=\"mt-2\"\n >\n {{ createNote }}\n </p>\n <p class=\"mt-2\">\n {{\n props.willBeEnabled\n ? t('common.userSystem.create.willBeEnabled')\n : t('common.userSystem.create.willBeDisabled')\n }}\n </p>\n </VCardText>\n <VCardActions>\n <ABtnTertiary @click.stop=\"dialog = false\">\n {{ t('common.button.cancel') }}\n </ABtnTertiary>\n <VSpacer />\n <ABtnPrimary\n :loading=\"loading\"\n data-cy=\"user-system-create-confirm\"\n @click.stop=\"confirm\"\n >\n {{ t('common.button.confirm') }}\n </ABtnPrimary>\n </VCardActions>\n </VCard>\n </VDialog>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWA,IAAM0B,IAAQC,GAoCRC,IAAOH,GAIP,EAAE,SAAMI,EAAQ,GAChB,EAAE,sBAAmBC,EAAmB,GACxCC,IAASC,EAAI,EAAK,GAElBC,IAAOD,EAAcE,EAAe,CAAC,GACrCC,IAAKhB,EAAa;EAIxB,EAAMY,IAAS,MAAS;GACtB,IAAI,CAACK,GAAM;GACX,IAAMC,IAAOC,EAAOZ,EAAM,MAAM,IAAIQ,EAAe,IAAIK,EAAUb,EAAM,MAAM;GAG7E,AAFKY,EAAOZ,EAAM,MAAM,MAAG,EAAK,KAAKA,EAAM,SAC3C,EAAK,QAAQW,GACbF,EAAG,MAAM,OAAO;EAClB,CAAC;EAED,IAAMK,IAAU,YAAY;GAC1B,AAAM,MAAML,EAAG,MAAM,UAAU,MAC/B,EAAO,QAAQ,IACfP,EAAK,WAAWW,EAAUN,EAAK,KAAK,CAAC;EACvC;;;GAIE,OAAAjC,EAAA,GAAAC,EA6DM,OA7DNmB,GA6DM,CA5DJlB,EASOC,GAAA;IARJ,UAAUwB,EAAA;IACV,SAASA,EAAA;IACV,MAAK;IACL,SAAQ;IACR,WAAQ;IACP,SAAK,AAAAqB,EAAA,OAAA5C,GAAA,MAAO,EAAA,QAAM,IAAA,CAAA,MAAA,CAAA;;IAEnB,SAAAC,QAA0C,CAAvCC,EAAAC,EAAAC,EAAA8C,CAAA,CAAC,CAAA,iCAAA,CAAA,GAAA,CAAA,C;;G,gCAENpD,EAiDUO,GAAA;IAhDC,YAAAsB,EAAA;IAAA,uBAAA,AAAAiB,EAAA,QAAA,MAAA,EAAM,QAAAQ;IACd,aAAW;;IAEZ,SAAAnD,QA4CQ,CA5CRH,EA4CQQ,GAAA,MAAA;KA3CN,SAAAL,QAEiB;MAFjBH,EAEiBS,GAAA,EAFA,UAAM,AAAAqC,EAAA,QAAA,MAAE,EAAA,QAAM,G;OAC7B,SAAA3C,QAAkE,CAA/DC,EAAAC,EAAAC,EAAA8C,CAAA,CAAC,CAAA,kCAAA,EAAA,QAA6C3B,EAAA,YAAW,CAAA,CAAA,GAAA,CAAA,C;;;MAE9DzB,EA0BYU,GAAA,MAAA;OAxBV,SAAAP,QAKE;QALFH,EAKEW,GAAA;SAJQ,MAAMoB,EAAA;SAAA,iBAAA,AAAAe,EAAA,QAAA,MAAA,EAAI,QAAAQ;SACjB,UAAU7B,EAAA;SACX,YAAA;SACA,WAAA;;QAMFb,EAA4D,KAA5DO,GAA4Dd,EAAzCC,EAAA8C,CAAA,CAAC,CAAA,+BAAA,CAAA,GAAA,CAAA;QAEZ3B,EAAA,cADR3B,EAAA,GAAAC,EAKI,KALJqB,GAKIf,EADCoB,EAAA,UAAU,GAAA,CAAA,K;QAEfb,EAMI,KANJS,GAMIhB,EAJAmB,EAAM,gBAAgClB,EAAA8C,CAAA,CAAC,CAAA,wCAAA,IAA6D9C,EAAA8C,CAAA,CAAC,CAAA,yCAAA,CAAA,GAAA,CAAA;;;;MAM3GpD,EAYea,GAAA,MAAA;OAXb,SAAAV,QAEe;QAFfH,EAEeuC,GAAA,EAFA,SAAK,AAAAO,EAAA,OAAA5C,GAAA,MAAO,EAAA,QAAM,IAAA,CAAA,MAAA,CAAA,E;SAC/B,SAAAC,QAA+B,CAA5BC,EAAAC,EAAAC,EAAA8C,CAAA,CAAC,CAAA,sBAAA,CAAA,GAAA,CAAA,C;;;QAENpD,EAAWc,CAAA;QACXd,EAMcyC,GAAA;SALX,SAAShB,EAAA;SACV,WAAQ;SACP,SAAKvB,EAAOoC,GAAO,CAAA,MAAA,CAAA;;SAEpB,SAAAnC,QAAgC,CAA7BC,EAAAC,EAAAC,EAAA8C,CAAA,CAAC,CAAA,uBAAA,CAAA,GAAA,CAAA,C"}
|
package/dist/domains/anzuUser/components/AUserManageButton.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -22,8 +22,7 @@ var h = /*@__PURE__*/ a({
|
|
|
22
22
|
target: _.value ? "_blank" : void 0,
|
|
23
23
|
rel: _.value ? "noopener" : void 0,
|
|
24
24
|
"append-icon": _.value ? "mdi-open-in-new" : void 0,
|
|
25
|
-
variant:
|
|
26
|
-
color: _.value ? void 0 : "primary",
|
|
25
|
+
variant: "text",
|
|
27
26
|
disabled: v.value,
|
|
28
27
|
size: "small",
|
|
29
28
|
"data-cy": "user-system-manage"
|
|
@@ -36,8 +35,6 @@ var h = /*@__PURE__*/ a({
|
|
|
36
35
|
"target",
|
|
37
36
|
"rel",
|
|
38
37
|
"append-icon",
|
|
39
|
-
"variant",
|
|
40
|
-
"color",
|
|
41
38
|
"disabled"
|
|
42
39
|
])], 16)]),
|
|
43
40
|
default: d(() => [r(" " + l(u(g)("common.userSystem.manageMissingUrl")), 1)]),
|
|
@@ -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
|
|
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 @@
|
|
|
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;
|
package/dist/domains/anzuUser/components/AUserMissingAccount.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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 {
|
|
3
|
-
import {
|
|
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
|
|
6
|
+
var h = /*@__PURE__*/ o({
|
|
6
7
|
__name: "AUserOtherSystemsTable",
|
|
7
8
|
props: {
|
|
8
9
|
descriptors: {},
|
|
9
10
|
userId: {},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
sources: {},
|
|
12
|
+
readonly: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
}
|
|
14
16
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
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:
|
|
39
|
+
ref: S,
|
|
31
40
|
descriptor: t,
|
|
32
|
-
"user-id":
|
|
33
|
-
readonly:
|
|
34
|
-
"create-enabled":
|
|
35
|
-
source:
|
|
36
|
-
creating:
|
|
37
|
-
onCreate:
|
|
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 {
|
|
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","
|
|
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"}
|