@anzusystems/common-admin 2.0.0-rc.22 → 2.0.0-rc.23
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 +2 -0
- package/dist/AnzuSystemsCommonAdmin.js.map +1 -1
- package/dist/common-admin.css +1 -1
- package/dist/common-admin.js +33 -29
- package/dist/domains/dam/api/damAssetApi.d.ts +12 -5
- package/dist/domains/dam/api/damAssetApi.js +66 -55
- package/dist/domains/dam/api/damAssetApi.js.map +1 -1
- package/dist/domains/dam/assetDetail/components/AssetDetailSidebarMetadata.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/domains/dam/assetDetail/components/AssetDetailSidebarMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetDetail/components/AssetMetadata.vue_vue_type_script_setup_true_lang.js +100 -108
- package/dist/domains/dam/assetDetail/components/AssetMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/assetDetail/store/assetDetailStore.d.ts +2 -0
- package/dist/domains/dam/assetSelect/components/AAssetListInner.vue.d.ts +2 -0
- package/dist/domains/dam/assetSelect/components/AAssetSelect.vue.d.ts +1 -0
- package/dist/domains/dam/assetSelect/composables/assetSelectListActions.js +1 -1
- package/dist/domains/dam/assetSelect/composables/assetSelectListActions.js.map +1 -1
- package/dist/domains/dam/assetSelect/store/assetSelectStore.d.ts +112 -0
- package/dist/domains/dam/author/components/AuthorCreateButton.vue.d.ts +6 -0
- package/dist/domains/dam/author/components/AuthorCreateButton.vue_vue_type_script_setup_true_lang.js +13 -5
- package/dist/domains/dam/author/components/AuthorCreateButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.js +4 -2
- package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.js.map +1 -1
- package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.vue_vue_type_script_setup_true_lang.js +45 -39
- package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.js +1 -1
- package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.vue.d.ts +15 -2
- package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js +118 -96
- package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/author/components/DamAuthorFilterRemoteAutocomplete.vue.d.ts +3 -0
- package/dist/domains/dam/author/components/DamAuthorFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/domains/dam/author/components/DamAuthorFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/author/components/DamSourcesAuthorsFields.js +8 -0
- package/dist/domains/dam/author/components/DamSourcesAuthorsFields.js.map +1 -0
- package/dist/domains/dam/author/components/DamSourcesAuthorsFields.vue.d.ts +67 -0
- package/dist/domains/dam/author/components/DamSourcesAuthorsFields.vue_vue_type_script_setup_true_lang.js +144 -0
- package/dist/domains/dam/author/components/DamSourcesAuthorsFields.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/domains/dam/author/components/DamSourcesAuthorsRow.js +8 -0
- package/dist/domains/dam/author/components/DamSourcesAuthorsRow.js.map +1 -0
- package/dist/domains/dam/author/components/DamSourcesAuthorsRow.vue.d.ts +27 -0
- package/dist/domains/dam/author/components/DamSourcesAuthorsRow.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/domains/dam/author/components/DamSourcesAuthorsRow.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/domains/dam/author/composables/authorActions.js +2 -1
- package/dist/domains/dam/author/composables/authorActions.js.map +1 -1
- package/dist/domains/dam/author/composables/authorFieldRouting.d.ts +15 -0
- package/dist/domains/dam/author/composables/authorFieldRouting.js +18 -0
- package/dist/domains/dam/author/composables/authorFieldRouting.js.map +1 -0
- package/dist/domains/dam/author/composables/authorValidation.js +1 -1
- package/dist/domains/dam/author/composables/authorValidation.js.map +1 -1
- package/dist/domains/dam/author/composables/cachedAuthors.js +4 -2
- package/dist/domains/dam/author/composables/cachedAuthors.js.map +1 -1
- package/dist/domains/dam/author/composables/damAuthorConfig.d.ts +5 -0
- package/dist/domains/dam/author/composables/damAuthorConfig.js +5 -2
- package/dist/domains/dam/author/composables/damAuthorConfig.js.map +1 -1
- package/dist/domains/dam/author/composables/damCredit.d.ts +35 -0
- package/dist/domains/dam/author/composables/damCredit.js +44 -0
- package/dist/domains/dam/author/composables/damCredit.js.map +1 -0
- package/dist/domains/dam/author/composables/damSourceConfig.d.ts +15 -0
- package/dist/domains/dam/author/composables/damSourceConfig.js +19 -0
- package/dist/domains/dam/author/composables/damSourceConfig.js.map +1 -0
- package/dist/domains/dam/author/factory/AuthorFactory.js +3 -1
- package/dist/domains/dam/author/factory/AuthorFactory.js.map +1 -1
- package/dist/domains/dam/author/filter/AuthorFilter.d.ts +38 -4
- package/dist/domains/dam/author/filter/AuthorFilter.js +20 -6
- package/dist/domains/dam/author/filter/AuthorFilter.js.map +1 -1
- package/dist/domains/dam/author/types/DamAuthor.d.ts +4 -0
- package/dist/domains/dam/composables/commonAdminCoreDamOptions.d.ts +1 -0
- package/dist/domains/dam/composables/commonAdminCoreDamOptions.js +1 -0
- package/dist/domains/dam/composables/commonAdminCoreDamOptions.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue.d.ts +9 -1
- package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue_vue_type_script_setup_true_lang.js +206 -204
- package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/ImageMassOperations.vue_vue_type_script_setup_true_lang.js +165 -131
- package/dist/domains/dam/imageWidget/components/ImageMassOperations.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js +344 -335
- 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 +1 -0
- package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue_vue_type_script_setup_true_lang.js +251 -242
- 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 +1 -0
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js +308 -303
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleItem.vue.d.ts +1 -0
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleItem.vue_vue_type_script_setup_true_lang.js +84 -87
- package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/imageWidget/composables/imageDialogDamAuthors.d.ts +6 -3
- package/dist/domains/dam/imageWidget/composables/imageDialogDamAuthors.js +82 -77
- package/dist/domains/dam/imageWidget/composables/imageDialogDamAuthors.js.map +1 -1
- package/dist/domains/dam/imageWidget/composables/useImageMassOperations.d.ts +2 -0
- package/dist/domains/dam/imageWidget/composables/useImageMassOperations.js +59 -37
- package/dist/domains/dam/imageWidget/composables/useImageMassOperations.js.map +1 -1
- package/dist/domains/dam/imageWidget/store/imageStore.d.ts +2 -0
- package/dist/domains/dam/imageWidget/utils/metadataToImageMap.d.ts +3 -1
- package/dist/domains/dam/imageWidget/utils/metadataToImageMap.js +13 -22
- package/dist/domains/dam/imageWidget/utils/metadataToImageMap.js.map +1 -1
- package/dist/domains/dam/types/Asset.d.ts +1 -0
- package/dist/domains/dam/types/Asset.js.map +1 -1
- package/dist/domains/dam/types/DamConfig.d.ts +6 -0
- package/dist/domains/dam/types/DamConfig.js.map +1 -1
- package/dist/domains/dam/types/ImageAware.d.ts +1 -0
- package/dist/domains/dam/types/UploadQueue.d.ts +1 -0
- package/dist/domains/dam/types/UploadQueue.js.map +1 -1
- package/dist/domains/dam/uploadQueue/components/AssetQueueSelectedSidebar.vue_vue_type_script_setup_true_lang.js +204 -175
- package/dist/domains/dam/uploadQueue/components/AssetQueueSelectedSidebar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.vue_vue_type_script_setup_true_lang.js +67 -65
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingle.vue_vue_type_script_setup_true_lang.js +71 -70
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingle.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadataContent.vue_vue_type_script_setup_true_lang.js +83 -91
- package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadataContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/uploadQueue/components/UploadQueueEditable.vue_vue_type_script_setup_true_lang.js +4 -0
- package/dist/domains/dam/uploadQueue/components/UploadQueueEditable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/uploadQueue/components/UploadQueueItemEditable.vue.d.ts +10 -2
- package/dist/domains/dam/uploadQueue/components/UploadQueueItemEditable.vue_vue_type_script_setup_true_lang.js +178 -177
- package/dist/domains/dam/uploadQueue/components/UploadQueueItemEditable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/dam/uploadQueue/components/uploadQueueBindings.d.ts +2 -0
- package/dist/domains/dam/uploadQueue/components/uploadQueueBindings.js +4 -3
- package/dist/domains/dam/uploadQueue/components/uploadQueueBindings.js.map +1 -1
- package/dist/domains/dam/uploadQueue/composables/uploadQueueMassOperations.d.ts +1 -0
- package/dist/domains/dam/uploadQueue/composables/uploadQueueMassOperations.js +11 -8
- package/dist/domains/dam/uploadQueue/composables/uploadQueueMassOperations.js.map +1 -1
- package/dist/domains/dam/uploadQueue/core/uploadQueueFill.d.ts +2 -0
- package/dist/domains/dam/uploadQueue/core/uploadQueueFill.js +4 -1
- package/dist/domains/dam/uploadQueue/core/uploadQueueFill.js.map +1 -1
- package/dist/domains/dam/uploadQueue/factory/UploadQueueItemFactory.js +1 -0
- package/dist/domains/dam/uploadQueue/factory/UploadQueueItemFactory.js.map +1 -1
- package/dist/domains/dam/uploadQueue/settlement/uploadSettle.js +4 -4
- package/dist/domains/dam/uploadQueue/settlement/uploadSettle.js.map +1 -1
- package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.d.ts +1 -0
- package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.js +7 -4
- package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.js.map +1 -1
- package/dist/domains/filters/datatable/components/ADatatableSidePanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/filters/datatable/components/ALiveListingPill.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocompleteWithCached.vue.d.ts +3 -0
- package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js +6 -2
- package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/lib.d.ts +5 -1
- package/dist/locales/cs/common/assetSelect.js +1 -1
- package/dist/locales/cs/common/damImage.js +84 -10
- package/dist/locales/cs/common/damImage.js.map +1 -1
- package/dist/locales/cs.d.ts +6 -0
- package/dist/locales/en/common/assetSelect.js +1 -1
- package/dist/locales/en/common/damImage.js +84 -10
- package/dist/locales/en/common/damImage.js.map +1 -1
- package/dist/locales/en.d.ts +6 -0
- package/dist/locales/sk/common/assetSelect.js +1 -1
- package/dist/locales/sk/common/damImage.js +84 -10
- package/dist/locales/sk/common/damImage.js.map +1 -1
- package/dist/locales/sk.d.ts +6 -0
- package/dist/plugins/i18n.d.ts +6 -0
- package/package.json +26 -26
|
@@ -7,55 +7,55 @@ import { DamAssetType as s } from "../../types/Asset.js";
|
|
|
7
7
|
import c from "../../assetSelect/components/AAssetSelect.js";
|
|
8
8
|
import l from "../../../ui/file/components/AFileInput.js";
|
|
9
9
|
import u from "../../../ui/file/components/AFileDropzone.js";
|
|
10
|
-
import { useDamAcceptTypeAndSizeHelper as
|
|
11
|
-
import { useUploadQueuesStore as
|
|
12
|
-
import
|
|
13
|
-
import { useUploadQueueDialog as
|
|
14
|
-
import
|
|
15
|
-
import { bulkUpdateAssetsAuthors as
|
|
16
|
-
import { useAssetDetailStore as
|
|
17
|
-
import { loadAssetDetailExtSystem as
|
|
18
|
-
import { useCommonAdminCoreDamOptions as
|
|
19
|
-
import { generateUUIDv1 as
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import { AImageMetadataValidationScopeSymbol as
|
|
24
|
-
import { useExtSystemIdForCached as
|
|
25
|
-
import { useAssetSelectStore as
|
|
26
|
-
import
|
|
27
|
-
import { ImageWidgetUploadConfigKey as
|
|
28
|
-
import { fetchAssetListByFileIdsMultipleLicences as
|
|
29
|
-
import { copyToLicence as
|
|
30
|
-
import { createDamImage as
|
|
31
|
-
import { useDamConfigState as
|
|
32
|
-
import { useDamConfigStoreOf as
|
|
33
|
-
import { useDamConfigName as
|
|
34
|
-
import { holdImages as
|
|
35
|
-
import { WAIT_RAN_OUT as
|
|
36
|
-
import { Fragment as
|
|
37
|
-
import { useI18n as
|
|
38
|
-
import { VProgressCircular as
|
|
39
|
-
import { VBtn as
|
|
40
|
-
import
|
|
41
|
-
import { storeToRefs as
|
|
10
|
+
import { useDamAcceptTypeAndSizeHelper as d } from "../../config/composables/acceptTypeAndSizeHelper.js";
|
|
11
|
+
import { useUploadQueuesStore as ee } from "../../uploadQueue/store/uploadQueuesStore.js";
|
|
12
|
+
import te from "../../uploadQueue/components/UploadQueueDialog.js";
|
|
13
|
+
import { useUploadQueueDialog as ne } from "../../uploadQueue/composables/useUploadQueueDialog.js";
|
|
14
|
+
import re from "../../assetDetail/components/AssetDetailDialog.js";
|
|
15
|
+
import { bulkUpdateAssetsAuthors as ie, fetchAsset as ae, fetchAssetByFileId as oe, fetchAssetListByIds as se, showMetadataSaveError as ce } from "../../api/damAssetApi.js";
|
|
16
|
+
import { useAssetDetailStore as le } from "../../assetDetail/store/assetDetailStore.js";
|
|
17
|
+
import { loadAssetDetailExtSystem as ue } from "../../assetDetail/composables/assetDetailExtSystem.js";
|
|
18
|
+
import { useCommonAdminCoreDamOptions as de } from "../../composables/commonAdminCoreDamOptions.js";
|
|
19
|
+
import { generateUUIDv1 as f } from "../../../../shared/utils/generator.js";
|
|
20
|
+
import fe from "../../../listEditor/components/ASortableListEditor.js";
|
|
21
|
+
import pe from "./AImageWidgetSimple.js";
|
|
22
|
+
import { damCreditConfigOf as me, damCreditFromMap as he, fetchDamAuthorsMap as ge, fetchDamCredit as _e, hasNoDamCredit as p } from "../../author/composables/damCredit.js";
|
|
23
|
+
import { AImageMetadataValidationScopeSymbol as ve } from "../../composables/uploadValidations.js";
|
|
24
|
+
import { useExtSystemIdForCached as ye } from "../../composables/extSystemIdForCached.js";
|
|
25
|
+
import { useAssetSelectStore as be } from "../../assetSelect/store/assetSelectStore.js";
|
|
26
|
+
import xe from "./ImageWidgetMultipleLimitDialog.js";
|
|
27
|
+
import { ImageWidgetUploadConfigKey as Se } from "../utils/imageWidgetInkectionKeys.js";
|
|
28
|
+
import { fetchAssetListByFileIdsMultipleLicences as Ce } from "../../api/damfetchAssetListByFileIdsMultipleLicences.js";
|
|
29
|
+
import { copyToLicence as we } from "../../api/damImageApi.js";
|
|
30
|
+
import { createDamImage as Te, imageFieldsOf as Ee } from "../utils/damImage.js";
|
|
31
|
+
import { useDamConfigState as De } from "../../config/composables/damConfigState.js";
|
|
32
|
+
import { useDamConfigStoreOf as Oe } from "../../config/store/damConfigStore.js";
|
|
33
|
+
import { useDamConfigName as ke } from "../../composables/damConfigName.js";
|
|
34
|
+
import { holdImages as m, imageSavedSince as Ae, imageSavesOfOthersOver as je, noteImagesSave as Me } from "../utils/imageSaves.js";
|
|
35
|
+
import { WAIT_RAN_OUT as Ne, withinWaitLimit as Pe } from "../utils/waitLimit.js";
|
|
36
|
+
import { Fragment as Fe, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as Ie, createTextVNode as Le, createVNode as b, defineComponent as x, guardReactiveProps as Re, inject as ze, isRef as Be, mergeProps as Ve, normalizeProps as He, onBeforeUnmount as Ue, onMounted as We, openBlock as S, ref as C, renderList as Ge, renderSlot as Ke, toDisplayString as w, toRaw as qe, unref as T, watch as Je, withCtx as E } from "vue";
|
|
37
|
+
import { useI18n as Ye } from "vue-i18n";
|
|
38
|
+
import { VProgressCircular as Xe } from "vuetify/components/VProgressCircular";
|
|
39
|
+
import { VBtn as Ze } from "vuetify/components/VBtn";
|
|
40
|
+
import Qe from "@vuelidate/core";
|
|
41
|
+
import { storeToRefs as $e } from "pinia";
|
|
42
42
|
// src/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue?vue&type=script&setup=true&lang.ts
|
|
43
|
-
var
|
|
43
|
+
var et = {
|
|
44
44
|
key: 0,
|
|
45
45
|
class: "font-weight-bold text-label-large"
|
|
46
|
-
},
|
|
46
|
+
}, tt = {
|
|
47
47
|
key: 1,
|
|
48
48
|
class: "pb-2"
|
|
49
|
-
},
|
|
49
|
+
}, nt = {
|
|
50
50
|
key: 2,
|
|
51
51
|
class: "w-100 d-flex align-center justify-center"
|
|
52
|
-
},
|
|
52
|
+
}, rt = {
|
|
53
53
|
class: "position-relative w-100",
|
|
54
54
|
style: { "min-height": "140px" }
|
|
55
|
-
},
|
|
55
|
+
}, it = { class: "asset-list-tiles asset-list-tiles--thumbnail a-sortable-widget__group" }, at = { class: "image-widget-multiple-reorder" }, ot = { class: "image-widget-multiple-reorder__thumb" }, st = { class: "image-widget-multiple-reorder__meta" }, ct = { class: "image-widget-multiple-reorder__title" }, lt = {
|
|
56
56
|
key: 0,
|
|
57
57
|
class: "image-widget-multiple-reorder__source"
|
|
58
|
-
},
|
|
58
|
+
}, ut = /*@__PURE__*/ x({
|
|
59
59
|
__name: "ImageWidgetMultipleInner",
|
|
60
60
|
props: {
|
|
61
61
|
modelValue: {},
|
|
@@ -86,26 +86,26 @@ var Qe = {
|
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
emits: ["update:modelValue"],
|
|
89
|
-
setup(
|
|
90
|
-
let
|
|
91
|
-
if (n(
|
|
92
|
-
let { imageClient:
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
setup(x, { expose: ut, emit: dt }) {
|
|
90
|
+
let D = x, O = dt, k = ke(D.configName), A = C(!1), j = ze(Se, void 0);
|
|
91
|
+
if (n(j) || n(j.value)) throw Error("Fatal error, parent component doesn't provide necessary config ext system config.");
|
|
92
|
+
let { imageClient: M, imageApi: N } = a(k), { showErrorsDefault: P, showValidationError: ft, showErrorT: pt, showWarningT: mt, showUnknownError: F } = o(), ht = C(null), { uploadSizes: I, uploadAccept: L } = d(s.Image, j.value.extSystemConfig), { t: gt } = Ye(), R = C(!1), _t = C(!1), vt = C(D.modelValue.length === 0), z = C(null), B = r();
|
|
93
|
+
B.reset(), Je(() => D.readonly, (e) => {
|
|
94
|
+
B.readonly = e;
|
|
95
95
|
}, { immediate: !0 });
|
|
96
|
-
let { images:
|
|
97
|
-
let n = t.map((e) =>
|
|
96
|
+
let { images: V, maxPosition: yt } = $e(B), H = Symbol("image widget multiple"), bt = /* @__PURE__ */ new Set(), U = null, xt = async (t) => {
|
|
97
|
+
let n = t.map((e) => je(k, e, bt)).filter((t) => !e(t));
|
|
98
98
|
if (n.length === 0) return;
|
|
99
|
-
|
|
100
|
-
let r = await
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
let e =
|
|
106
|
-
if (await
|
|
99
|
+
U = () => n.forEach((e) => e.cancel());
|
|
100
|
+
let r = await Pe(Promise.all(n.map((e) => e.over)), 1, k);
|
|
101
|
+
U = null, r === Ne && (n.forEach((e) => e.cancel()), Z || pt("error.apiTimedOut.message"));
|
|
102
|
+
}, W = Promise.resolve(), St = async () => {
|
|
103
|
+
if (D.modelValue.length !== 0) try {
|
|
104
|
+
R.value = !0;
|
|
105
|
+
let e = m(k, H, D.modelValue), t = await N.fetchImageListByIds(M, D.modelValue);
|
|
106
|
+
if (await xt(t.map((e) => e.id)), Z) return;
|
|
107
107
|
let r = t.map((t) => {
|
|
108
|
-
let n =
|
|
108
|
+
let n = Ae(k, t.id, e.get(t.id) ?? 0);
|
|
109
109
|
return n ? {
|
|
110
110
|
...t,
|
|
111
111
|
...n,
|
|
@@ -119,331 +119,334 @@ var Qe = {
|
|
|
119
119
|
});
|
|
120
120
|
let a = [];
|
|
121
121
|
try {
|
|
122
|
-
a = await
|
|
122
|
+
a = await Ce(J, Y, i);
|
|
123
123
|
} catch (e) {
|
|
124
|
-
if (!
|
|
124
|
+
if (!D.readonly) throw e;
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
B.setImages(r.map((e) => {
|
|
127
127
|
if (n(e.position)) throw Error("Image object needs position field!");
|
|
128
|
-
|
|
128
|
+
B.updateMaxPositionIfGreater(e.position);
|
|
129
129
|
let t = a.find((t) => t.mainFile?.id === e.dam.damId);
|
|
130
130
|
return {
|
|
131
|
-
key:
|
|
131
|
+
key: f(),
|
|
132
132
|
...e,
|
|
133
133
|
damAuthors: t ? [...t.authors] : [],
|
|
134
|
-
|
|
134
|
+
damSources: t ? [...t.sources ?? []] : [],
|
|
135
|
+
showDamAuthors: t ? p(t.authors, t.sources) : !1,
|
|
135
136
|
assetId: t ? t.id : void 0
|
|
136
137
|
};
|
|
137
|
-
})),
|
|
138
|
+
})), D.readonly || O("update:modelValue", V.value.map((e) => e.id).filter((e) => e !== void 0));
|
|
138
139
|
} catch (e) {
|
|
139
|
-
|
|
140
|
+
_t.value = !0, P(e);
|
|
140
141
|
} finally {
|
|
141
|
-
|
|
142
|
+
R.value = !1, vt.value = !0;
|
|
142
143
|
}
|
|
143
|
-
},
|
|
144
|
-
if (
|
|
145
|
-
let t =
|
|
146
|
-
n(t) || (
|
|
147
|
-
},
|
|
148
|
-
if (
|
|
149
|
-
let t =
|
|
150
|
-
n(t) || (
|
|
151
|
-
},
|
|
152
|
-
if (
|
|
153
|
-
let t =
|
|
144
|
+
}, G = ee(), Ct = h(() => G.getQueue(D.queueKey)), { cachedExtSystemId: K } = ye(k), { uploadQueueDialog: q, stopQueueLeftBehind: wt } = ne(), Tt = (e) => {
|
|
145
|
+
if (D.readonly || e.length === 0) return;
|
|
146
|
+
let t = j.value;
|
|
147
|
+
n(t) || (K.value = t.extSystem, wt(D.queueKey), ln.value?.check(e));
|
|
148
|
+
}, Et = (e) => {
|
|
149
|
+
if (D.readonly || e.length === 0) return;
|
|
150
|
+
let t = j.value;
|
|
151
|
+
n(t) || (K.value = t.extSystem, wt(D.queueKey), ln.value?.check(e));
|
|
152
|
+
}, Dt = (e) => {
|
|
153
|
+
if (D.readonly || e.length === 0) return;
|
|
154
|
+
let t = j.value;
|
|
154
155
|
if (n(t)) return;
|
|
155
|
-
|
|
156
|
+
K.value = t.extSystem, wt(D.queueKey);
|
|
156
157
|
let r = 0;
|
|
157
158
|
e.forEach((e) => {
|
|
158
|
-
e.result === "copy" ?
|
|
159
|
-
}), r > 0 &&
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
},
|
|
163
|
-
let
|
|
159
|
+
e.result === "copy" ? G.addByCopyToLicence(D.queueKey, t.extSystem, t.licence, [e.targetAsset], k) : e.result === "exists" ? (G.addByCopyToLicence(D.queueKey, t.extSystem, t.licence, [e.targetAsset], k), G.queueItemDuplicate(e.targetAsset, e.targetMainFile, s.Image, k)) : r++;
|
|
160
|
+
}), r > 0 && pt("common.damImage.queueItem.errorUnableToCopyToLicence"), r !== e.length && (q.value = D.queueKey);
|
|
161
|
+
}, Ot = () => {
|
|
162
|
+
q.value = D.queueKey;
|
|
163
|
+
}, kt = async (e, n) => {
|
|
164
|
+
let r = be(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
164
165
|
e.forEach((e) => {
|
|
165
|
-
let t =
|
|
166
|
-
|
|
166
|
+
let t = n ? n.licence : e.licence, r = o.get(t);
|
|
167
|
+
r ? r.push(e.id) : o.set(t, [e.id]);
|
|
167
168
|
});
|
|
168
|
-
let
|
|
169
|
-
for (let [e,
|
|
170
|
-
let
|
|
171
|
-
if (
|
|
172
|
-
|
|
173
|
-
let t =
|
|
174
|
-
|
|
169
|
+
let s = [];
|
|
170
|
+
for (let [e, c] of o) try {
|
|
171
|
+
let o = await se(J, Y, c, e);
|
|
172
|
+
if (Vt) {
|
|
173
|
+
o.forEach((e) => {
|
|
174
|
+
let t = Vt(e);
|
|
175
|
+
i.set(e.id, {
|
|
175
176
|
description: t.description,
|
|
176
|
-
authorIds: []
|
|
177
|
-
|
|
177
|
+
authorIds: [],
|
|
178
|
+
sourceIds: []
|
|
179
|
+
}), a.set(e.id, t.source);
|
|
178
180
|
});
|
|
179
181
|
continue;
|
|
180
182
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
a.set(e.id, {
|
|
183
|
+
o.forEach((e) => {
|
|
184
|
+
i.set(e.id, {
|
|
184
185
|
description: t(e.metadata.customData?.description) ? e.metadata.customData.description.trim() : "",
|
|
185
|
-
authorIds: e.authors
|
|
186
|
-
|
|
187
|
-
c.add(e);
|
|
186
|
+
authorIds: e.authors,
|
|
187
|
+
sourceIds: e.sources ?? []
|
|
188
188
|
});
|
|
189
|
-
})
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
});
|
|
190
|
+
let s = o.filter((e) => !p(e.authors, e.sources));
|
|
191
|
+
if (s.length > 0) {
|
|
192
|
+
let t = r.selectConfig.find((t) => t.licence === e), i = n ? n.extSystem : await Yt(e) ?? (t ?? r.requireSelectedSelectConfig()).extSystem, o = await ge(J, Ft, i, s.flatMap((e) => [...e.sources ?? [], ...e.authors])), c = en(i);
|
|
193
|
+
s.forEach((e) => {
|
|
194
|
+
a.set(e.id, he(o, e.sources, e.authors, c));
|
|
193
195
|
});
|
|
194
196
|
}
|
|
195
197
|
} catch (e) {
|
|
196
|
-
|
|
198
|
+
s.push(e);
|
|
197
199
|
}
|
|
198
|
-
return
|
|
199
|
-
let t =
|
|
200
|
-
|
|
201
|
-
key:
|
|
202
|
-
...
|
|
200
|
+
return s.length > 0 && !P(s[0]) && F(), e.map((e) => {
|
|
201
|
+
let t = i.get(e.id)?.authorIds || [], n = i.get(e.id)?.sourceIds || [], r = i.get(e.id)?.description ?? "";
|
|
202
|
+
return Vt ? {
|
|
203
|
+
key: f(),
|
|
204
|
+
...Te({
|
|
203
205
|
fileId: e.mainFile.id,
|
|
204
206
|
licenceId: e.licence,
|
|
205
207
|
internal: e.mainFileInternal
|
|
206
208
|
}, {
|
|
207
209
|
description: r,
|
|
208
|
-
source:
|
|
210
|
+
source: a.get(e.id) ?? ""
|
|
209
211
|
}, { position: 0 }),
|
|
210
212
|
damAuthors: [],
|
|
213
|
+
damSources: [],
|
|
211
214
|
showDamAuthors: !1,
|
|
212
215
|
assetId: e.id
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
let t = o.get(e);
|
|
217
|
-
!n(t) && t.trim().length > 0 && i.push(t);
|
|
218
|
-
}), {
|
|
219
|
-
key: d(),
|
|
220
|
-
...Se({
|
|
216
|
+
} : {
|
|
217
|
+
key: f(),
|
|
218
|
+
...Te({
|
|
221
219
|
fileId: e.mainFile.id,
|
|
222
220
|
licenceId: e.licence,
|
|
223
221
|
internal: e.mainFileInternal
|
|
224
222
|
}, {
|
|
225
223
|
description: r,
|
|
226
|
-
source:
|
|
224
|
+
source: a.get(e.id) ?? ""
|
|
227
225
|
}, { position: 0 }),
|
|
228
226
|
damAuthors: t,
|
|
229
|
-
|
|
227
|
+
damSources: n,
|
|
228
|
+
showDamAuthors: i.has(e.id) && p(t, n),
|
|
230
229
|
assetId: e.id
|
|
231
230
|
};
|
|
232
231
|
});
|
|
233
|
-
},
|
|
232
|
+
}, At = (e) => e.map((e) => (yt.value++, {
|
|
234
233
|
...e,
|
|
235
|
-
position:
|
|
236
|
-
})),
|
|
237
|
-
if (
|
|
238
|
-
let r = t.value.filter((t) => !e(t.mainFile)), i =
|
|
234
|
+
position: yt.value
|
|
235
|
+
})), jt = async (t) => {
|
|
236
|
+
if (D.readonly || t.type !== "asset" || t.value.length === 0) return;
|
|
237
|
+
let r = t.value.filter((t) => !e(t.mainFile)), i = It !== !1 && !n(t.copyToLicence) ? r.filter((e) => e.licence !== t.copyToLicence) : [], a = () => Z || D.readonly;
|
|
239
238
|
if (i.length === 0) {
|
|
240
|
-
let e = await
|
|
241
|
-
await
|
|
239
|
+
let e = await kt(r);
|
|
240
|
+
await W, a() || B.addImages(At(e));
|
|
242
241
|
return;
|
|
243
242
|
}
|
|
244
|
-
let o =
|
|
243
|
+
let o = we(J, Pt, i.map((e) => ({
|
|
245
244
|
asset: e.id,
|
|
246
245
|
targetAssetLicence: t.copyToLicence
|
|
247
|
-
}))), s = r.filter((e) => !i.includes(e)), c =
|
|
246
|
+
}))), s = r.filter((e) => !i.includes(e)), c = j.value, l = s.length === 0 ? Promise.resolve([]) : kt(s, c ? {
|
|
248
247
|
licence: t.copyToLicence,
|
|
249
248
|
extSystem: c.extSystem
|
|
250
249
|
} : void 0), u = null;
|
|
251
250
|
try {
|
|
252
251
|
u = await o;
|
|
253
252
|
} catch (e) {
|
|
254
|
-
|
|
253
|
+
P(e);
|
|
255
254
|
}
|
|
256
|
-
let
|
|
257
|
-
await
|
|
258
|
-
},
|
|
259
|
-
|
|
260
|
-
Z = !0,
|
|
255
|
+
let d = await l;
|
|
256
|
+
await W, a() || (B.addImages(At(d)), u && Dt(u));
|
|
257
|
+
}, Mt = le(), { dialog: Nt } = $e(Mt), { damClient: J, endPointAsset: Y, endPointImage: Pt, endPointAuthor: Ft, copyToLicenceEnabled: It, showSourceEnabled: Lt, sourceLabel: Rt, editAssetLabel: zt, addFromDamLabel: Bt, customAssetSelectMetadataToImageMap: Vt } = de(k), Ht = !1, X = /* @__PURE__ */ new Map(), Z = !1;
|
|
258
|
+
Ue(() => {
|
|
259
|
+
Z = !0, m(k, H, []), U?.();
|
|
261
260
|
});
|
|
262
|
-
let
|
|
263
|
-
|
|
261
|
+
let Ut = async (e) => {
|
|
262
|
+
Ht = !0;
|
|
264
263
|
let t = null;
|
|
265
264
|
try {
|
|
266
|
-
await
|
|
267
|
-
let n = await
|
|
268
|
-
return await
|
|
265
|
+
await Mt.open(D.queueKey, async () => {
|
|
266
|
+
let n = await oe(J, Y, e), r = await Yt(n.licence) ?? j.value.extSystem;
|
|
267
|
+
return await ue(J, r, n.attributes.assetType, k), t = r, n;
|
|
269
268
|
}, () => {
|
|
270
|
-
t && (
|
|
269
|
+
t && (K.value = t);
|
|
271
270
|
});
|
|
272
271
|
} catch (e) {
|
|
273
|
-
|
|
272
|
+
P(e);
|
|
274
273
|
}
|
|
275
|
-
},
|
|
276
|
-
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
n(e.assetId) || e.damAuthors.
|
|
280
|
-
t.assetId === e.assetId && t.showDamAuthors &&
|
|
274
|
+
}, Wt = !1, Gt = async (e) => {
|
|
275
|
+
D.readonly || e.length !== 0 && (R.value && (Wt || (Wt = !0, await W, Wt = !1, Z || D.readonly)) || (Kt(e), q.value = null, G.stopUpload(D.queueKey)));
|
|
276
|
+
}, Kt = (e) => {
|
|
277
|
+
$t.value && e.forEach((e) => {
|
|
278
|
+
n(e.assetId) || p(e.damAuthors, e.damSources) || V.value.forEach((t) => {
|
|
279
|
+
t.assetId === e.assetId && t.showDamAuthors && nn(t, e.damAuthors, e.damSources, e.texts.source);
|
|
281
280
|
});
|
|
282
|
-
}),
|
|
283
|
-
},
|
|
284
|
-
|
|
285
|
-
},
|
|
286
|
-
let
|
|
287
|
-
return e.authors
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}, Yt = (e, t, n) => {
|
|
292
|
-
e.damAuthors = [...t], (e.texts.source.trim().length === 0 || L.hasSourceOfPick(e)) && (e.texts.source = n), L.forgetSourceOfPick(e), e.showDamAuthors = !1;
|
|
293
|
-
}, Xt = async (e, t, n) => {
|
|
281
|
+
}), B.addImages(At(e));
|
|
282
|
+
}, qt = () => {
|
|
283
|
+
A.value = !0;
|
|
284
|
+
}, Jt = Qe({ $scope: ve }), { getDamConfigExtSystem: Q, getExtSystemByLicence: Yt } = De(J, k), Xt = Oe(k), Zt = h(() => !!Q(K.value)?.[s.Image]?.authors?.enabled), Qt = h(() => !!Q(K.value)?.[s.Image]?.sources?.enabled), $t = h(() => Zt.value || Qt.value), en = (e) => me(Q(e) ?? Q(K.value)), tn = async (e, t) => {
|
|
285
|
+
let n = await Yt(e.licence) ?? t;
|
|
286
|
+
return _e(J, Ft, n, e.sources, e.authors, en(n));
|
|
287
|
+
}, nn = (e, t, n, r) => {
|
|
288
|
+
e.damAuthors = [...t], e.damSources = [...n ?? []], (e.texts.source.trim().length === 0 || B.hasSourceOfPick(e)) && (e.texts.source = r), B.forgetSourceOfPick(e), e.showDamAuthors = !1;
|
|
289
|
+
}, rn = async (e, t, n) => {
|
|
294
290
|
try {
|
|
295
291
|
await t;
|
|
296
|
-
let r = await
|
|
297
|
-
if (r.authors.
|
|
298
|
-
let i = await
|
|
299
|
-
if (Z ||
|
|
300
|
-
|
|
301
|
-
e.assetId === r.id && e.showDamAuthors &&
|
|
292
|
+
let r = await ae(J, Y, e);
|
|
293
|
+
if (p(r.authors, r.sources)) return;
|
|
294
|
+
let i = await tn(r, n);
|
|
295
|
+
if (Z || D.readonly) return;
|
|
296
|
+
V.value.forEach((e) => {
|
|
297
|
+
e.assetId === r.id && e.showDamAuthors && nn(e, r.authors, r.sources, i);
|
|
302
298
|
});
|
|
303
299
|
} catch (e) {
|
|
304
|
-
!Z && !
|
|
300
|
+
!Z && !P(e) && F();
|
|
305
301
|
}
|
|
306
|
-
},
|
|
307
|
-
let n =
|
|
308
|
-
if (
|
|
302
|
+
}, an = (t) => {
|
|
303
|
+
let n = Ht;
|
|
304
|
+
if (Ht = !1, !n || e(t) || D.readonly || !$t.value) return;
|
|
309
305
|
let r = t.id;
|
|
310
|
-
if (!
|
|
311
|
-
let i =
|
|
306
|
+
if (!V.value.some((e) => e.assetId === r && e.showDamAuthors)) return;
|
|
307
|
+
let i = Mt.savingOf(r, k), a = K.value, o = (X.get(r) ?? Promise.resolve()).then(() => rn(r, i, a));
|
|
312
308
|
X.set(r, o), o.then(() => {
|
|
313
309
|
X.get(r) === o && X.delete(r);
|
|
314
310
|
});
|
|
315
|
-
},
|
|
316
|
-
if (
|
|
317
|
-
if (
|
|
311
|
+
}, on = async () => {
|
|
312
|
+
if (D.readonly) return !0;
|
|
313
|
+
if (R.value || _t.value) return F(), !1;
|
|
318
314
|
if (await Promise.all(X.values()), Z) return !1;
|
|
319
|
-
if (
|
|
315
|
+
if (Jt.value.$touch(), Jt.value.$invalid) return ft(), !1;
|
|
320
316
|
try {
|
|
321
|
-
let e = [], t =
|
|
322
|
-
|
|
317
|
+
let e = [], t = qe(V.value), r = /* @__PURE__ */ new Map();
|
|
318
|
+
$t.value && V.value.forEach((e) => {
|
|
323
319
|
if (!e.showDamAuthors) return;
|
|
324
320
|
let t = e.assetId ?? e.key, n = r.get(t) ?? {
|
|
325
321
|
assetId: e.assetId,
|
|
326
322
|
rows: [],
|
|
327
|
-
authors: []
|
|
323
|
+
authors: [],
|
|
324
|
+
sources: []
|
|
328
325
|
};
|
|
329
326
|
r.set(t, n), n.rows.push(e), e.damAuthors.forEach((e) => {
|
|
330
327
|
n.authors.includes(e) || n.authors.push(e);
|
|
331
328
|
});
|
|
329
|
+
for (let t of e.damSources ?? []) n.sources.includes(t) || n.sources.push(t);
|
|
332
330
|
});
|
|
333
331
|
let i = [];
|
|
334
|
-
for (let { assetId: t, rows: n, authors: a } of r.values()) {
|
|
335
|
-
if (a
|
|
332
|
+
for (let { assetId: t, rows: n, authors: a, sources: o } of r.values()) {
|
|
333
|
+
if (p(a, o)) continue;
|
|
336
334
|
t && e.push({
|
|
337
335
|
id: t,
|
|
338
|
-
authors: a
|
|
336
|
+
authors: a,
|
|
337
|
+
sources: o
|
|
339
338
|
});
|
|
340
|
-
let r =
|
|
339
|
+
let r = Xt.damConfigLicenceExtSystem.get(n[0].dam.licenceId)?.extSystem ?? K.value, s = await ge(J, Ft, r, [...o, ...a]);
|
|
341
340
|
i.push({
|
|
342
341
|
assetId: t,
|
|
343
342
|
rows: n,
|
|
344
343
|
authors: a,
|
|
345
|
-
|
|
344
|
+
sources: o,
|
|
345
|
+
source: he(s, o, a, en(r))
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
348
|
if (Z) return !1;
|
|
349
|
-
if (
|
|
350
|
-
let a = [...r.values()].filter(({ assetId: e, authors: t }) => !n(e) && t
|
|
349
|
+
if (D.readonly) return !0;
|
|
350
|
+
let a = [...r.values()].filter(({ assetId: e, authors: t, sources: r }) => !n(e) && !p(t, r));
|
|
351
351
|
if (a.length > 0) {
|
|
352
|
-
let e = await Promise.all(a.map(({ assetId: e }) =>
|
|
353
|
-
if (Z ||
|
|
352
|
+
let e = await Promise.all(a.map(({ assetId: e }) => ae(J, Y, e)));
|
|
353
|
+
if (Z || D.readonly) return !1;
|
|
354
354
|
let t = a.map(({ rows: t }, n) => ({
|
|
355
355
|
rows: t,
|
|
356
356
|
asset: e[n]
|
|
357
|
-
})).filter(({ asset: e }) => e.authors.
|
|
357
|
+
})).filter(({ asset: e }) => !p(e.authors, e.sources));
|
|
358
358
|
if (t.length > 0) {
|
|
359
|
-
let e =
|
|
360
|
-
return Z ||
|
|
359
|
+
let e = K.value, n = await Promise.all(t.map(({ asset: t }) => tn(t, e)));
|
|
360
|
+
return Z || D.readonly || (t.forEach(({ rows: e, asset: t }, r) => {
|
|
361
361
|
e.forEach((e) => {
|
|
362
|
-
e.showDamAuthors &&
|
|
362
|
+
e.showDamAuthors && nn(e, t.authors, t.sources, n[r]);
|
|
363
363
|
});
|
|
364
|
-
}),
|
|
364
|
+
}), mt("common.damImage.image.meta.galleryAuthorsGivenMeanwhile", -1)), !1;
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
if (e.length && (await
|
|
368
|
-
i.forEach(({ assetId: e, rows: t, authors: r,
|
|
367
|
+
if (e.length && (await ie(J, Y, s.Image, K.value, e, k), Z)) return !1;
|
|
368
|
+
i.forEach(({ assetId: e, rows: t, authors: r, sources: i, source: a }) => {
|
|
369
369
|
t.forEach((t) => {
|
|
370
|
-
t.damAuthors = [...r], t.texts.source =
|
|
370
|
+
t.damAuthors = [...r], t.damSources = [...i], t.texts.source = a, n(e) || (t.showDamAuthors = !1, B.forgetSourceOfPick(t));
|
|
371
371
|
});
|
|
372
372
|
});
|
|
373
|
-
let o = [...t],
|
|
373
|
+
let o = [...t], c = await Me(k, o.map((e) => e.id).filter((e) => !n(e)), bt, N.bulkUpdateImages(M, o.map(Ee)));
|
|
374
374
|
if (Z) return !0;
|
|
375
|
-
|
|
376
|
-
let
|
|
377
|
-
key:
|
|
375
|
+
m(k, H, c.map((e) => e.id));
|
|
376
|
+
let l = [], u = c.map((e) => (l.push(e.id), {
|
|
377
|
+
key: f(),
|
|
378
378
|
...e,
|
|
379
379
|
damAuthors: [],
|
|
380
|
+
damSources: [],
|
|
380
381
|
showDamAuthors: !1,
|
|
381
382
|
assetId: void 0
|
|
382
383
|
}));
|
|
383
|
-
if (
|
|
384
|
-
let
|
|
384
|
+
if (B.images.length === 0) return z.value?.commit([]), O("update:modelValue", l), !0;
|
|
385
|
+
let d = u.map((e) => {
|
|
385
386
|
let t = o.findIndex((t) => t.dam.damId === e.dam.damId), n = t < 0 ? void 0 : o.splice(t, 1)[0];
|
|
386
387
|
return {
|
|
387
388
|
...e,
|
|
388
389
|
damAuthors: n ? n.damAuthors : e.damAuthors,
|
|
389
|
-
|
|
390
|
+
damSources: n ? n.damSources : e.damSources,
|
|
391
|
+
showDamAuthors: n ? n.showDamAuthors && p(n.damAuthors, n.damSources) : !1,
|
|
390
392
|
assetId: n ? n.assetId : e.assetId
|
|
391
393
|
};
|
|
392
394
|
});
|
|
393
|
-
return
|
|
395
|
+
return B.setImages(d), z.value?.commit(d), O("update:modelValue", l), !0;
|
|
394
396
|
} catch (e) {
|
|
395
|
-
return
|
|
397
|
+
return ce(e, K.value, k), !1;
|
|
396
398
|
}
|
|
397
|
-
},
|
|
398
|
-
|
|
399
|
-
},
|
|
400
|
-
let t =
|
|
399
|
+
}, sn = (e) => {
|
|
400
|
+
B.removeImageByIndex(e), dn();
|
|
401
|
+
}, cn = async (e) => {
|
|
402
|
+
let t = V.value[e];
|
|
401
403
|
if (t) {
|
|
402
|
-
if (n(t.id))
|
|
403
|
-
else if (
|
|
404
|
-
await
|
|
404
|
+
if (n(t.id)) sn(e);
|
|
405
|
+
else if (D.callDeleteApiOnRemove) try {
|
|
406
|
+
await N.deleteImage(M, t.id), sn(e);
|
|
405
407
|
} catch (e) {
|
|
406
|
-
|
|
408
|
+
P(e);
|
|
407
409
|
}
|
|
408
|
-
else
|
|
410
|
+
else sn(e);
|
|
409
411
|
}
|
|
410
|
-
},
|
|
411
|
-
|
|
412
|
-
e && $.value === "reorder" &&
|
|
412
|
+
}, ln = C(null), $ = C("view");
|
|
413
|
+
Je(() => D.readonly, (e) => {
|
|
414
|
+
e && $.value === "reorder" && z.value?.cancelReorderMode();
|
|
413
415
|
});
|
|
414
|
-
let
|
|
415
|
-
key:
|
|
416
|
-
...
|
|
416
|
+
let un = () => ({
|
|
417
|
+
key: f(),
|
|
418
|
+
...Te({
|
|
417
419
|
fileId: "",
|
|
418
420
|
licenceId: 0
|
|
419
421
|
}, {}, { position: 0 }),
|
|
420
422
|
damAuthors: [],
|
|
423
|
+
damSources: [],
|
|
421
424
|
showDamAuthors: !1,
|
|
422
425
|
assetId: void 0
|
|
423
|
-
}),
|
|
426
|
+
}), dn = () => {
|
|
424
427
|
let e = 0;
|
|
425
|
-
|
|
428
|
+
V.value.forEach((t) => {
|
|
426
429
|
e++, t.position = e;
|
|
427
|
-
}),
|
|
428
|
-
},
|
|
429
|
-
|
|
430
|
+
}), B.maxPosition = e;
|
|
431
|
+
}, fn = () => {
|
|
432
|
+
dn();
|
|
430
433
|
};
|
|
431
|
-
return
|
|
432
|
-
|
|
433
|
-
}), (e, t) => (
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
"file-input-key":
|
|
437
|
-
accept:
|
|
438
|
-
"max-sizes":
|
|
434
|
+
return ut({ saveImages: on }), We(() => {
|
|
435
|
+
W = St();
|
|
436
|
+
}), (e, t) => (S(), v("div", null, [
|
|
437
|
+
x.label ? (S(), v("h4", et, w(x.label), 1)) : _("", !0),
|
|
438
|
+
x.readonly ? _("", !0) : (S(), v("div", tt, [b(l, {
|
|
439
|
+
"file-input-key": Ct.value?.fileInputKey,
|
|
440
|
+
accept: T(L),
|
|
441
|
+
"max-sizes": T(I),
|
|
439
442
|
multiple: "",
|
|
440
|
-
onFilesInput:
|
|
443
|
+
onFilesInput: Tt
|
|
441
444
|
}, {
|
|
442
|
-
activator:
|
|
445
|
+
activator: E(({ props: e }) => [b(Ze, Ve({
|
|
443
446
|
ref_key: "uploadButtonComponent",
|
|
444
|
-
ref:
|
|
447
|
+
ref: ht
|
|
445
448
|
}, e), {
|
|
446
|
-
default:
|
|
449
|
+
default: E(() => [Le(w(T(gt)("common.damImage.image.button.upload")), 1)]),
|
|
447
450
|
_: 1
|
|
448
451
|
}, 16)]),
|
|
449
452
|
_: 1
|
|
@@ -451,29 +454,29 @@ var Qe = {
|
|
|
451
454
|
"file-input-key",
|
|
452
455
|
"accept",
|
|
453
456
|
"max-sizes"
|
|
454
|
-
]),
|
|
457
|
+
]), b(Ze, {
|
|
455
458
|
class: "mr-2",
|
|
456
|
-
onClick:
|
|
459
|
+
onClick: qt
|
|
457
460
|
}, {
|
|
458
|
-
default:
|
|
461
|
+
default: E(() => [Le(w(T(Bt)), 1)]),
|
|
459
462
|
_: 1
|
|
460
463
|
})])),
|
|
461
|
-
|
|
462
|
-
modelValue:
|
|
463
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
464
|
-
"select-licences":
|
|
465
|
-
"list-views":
|
|
466
|
-
"upload-licence":
|
|
464
|
+
b(c, {
|
|
465
|
+
modelValue: A.value,
|
|
466
|
+
"onUpdate:modelValue": t[0] ||= (e) => A.value = e,
|
|
467
|
+
"select-licences": x.selectLicences,
|
|
468
|
+
"list-views": x.listViews,
|
|
469
|
+
"upload-licence": x.uploadLicence,
|
|
467
470
|
"min-count": 1,
|
|
468
471
|
"max-count": 50,
|
|
469
|
-
"asset-type":
|
|
470
|
-
"skip-current-user-check":
|
|
471
|
-
"config-name":
|
|
472
|
+
"asset-type": T(s).Image,
|
|
473
|
+
"skip-current-user-check": x.skipCurrentUserCheck,
|
|
474
|
+
"config-name": T(k),
|
|
472
475
|
"return-type": "asset",
|
|
473
|
-
onConfirm:
|
|
474
|
-
},
|
|
476
|
+
onConfirm: jt
|
|
477
|
+
}, Ie({ _: 2 }, [e.$slots["asset-select-sidebar-prepend"] ? {
|
|
475
478
|
name: "sidebar-prepend",
|
|
476
|
-
fn:
|
|
479
|
+
fn: E((t) => [Ke(e.$slots, "asset-select-sidebar-prepend", He(Re(t)))]),
|
|
477
480
|
key: "0"
|
|
478
481
|
} : void 0]), 1032, [
|
|
479
482
|
"modelValue",
|
|
@@ -484,88 +487,90 @@ var Qe = {
|
|
|
484
487
|
"skip-current-user-check",
|
|
485
488
|
"config-name"
|
|
486
489
|
]),
|
|
487
|
-
|
|
490
|
+
R.value ? (S(), v("div", nt, [b(Xe, {
|
|
488
491
|
indeterminate: "",
|
|
489
492
|
color: "primary"
|
|
490
|
-
})])) :
|
|
491
|
-
|
|
493
|
+
})])) : _("", !0),
|
|
494
|
+
y("div", rt, [vt.value ? (S(), g(fe, {
|
|
492
495
|
key: 0,
|
|
493
496
|
ref_key: "listEditor",
|
|
494
|
-
ref:
|
|
495
|
-
modelValue:
|
|
496
|
-
"onUpdate:modelValue": t[1] ||= (e) =>
|
|
497
|
+
ref: z,
|
|
498
|
+
modelValue: T(V),
|
|
499
|
+
"onUpdate:modelValue": t[1] ||= (e) => Be(V) ? V.value = e : null,
|
|
497
500
|
mode: $.value,
|
|
498
501
|
"onUpdate:mode": t[2] ||= (e) => $.value = e,
|
|
499
|
-
factory:
|
|
502
|
+
factory: un,
|
|
500
503
|
"get-key": "key",
|
|
501
504
|
position: "position",
|
|
502
505
|
"show-add-button": !1,
|
|
503
506
|
"show-delete-button": !1,
|
|
504
507
|
"show-edit-button": !1,
|
|
505
|
-
"disable-drag":
|
|
506
|
-
readonly:
|
|
507
|
-
onReorderApplied:
|
|
508
|
+
"disable-drag": x.disableDraggable || x.readonly,
|
|
509
|
+
readonly: x.readonly,
|
|
510
|
+
onReorderApplied: fn
|
|
508
511
|
}, {
|
|
509
|
-
"view-body":
|
|
512
|
+
"view-body": E(() => [y("div", it, [(S(!0), v(Fe, null, Ge(T(V), (e, t) => (S(), g(i, {
|
|
510
513
|
key: e.key,
|
|
511
514
|
index: t,
|
|
512
|
-
"show-source-enabled":
|
|
513
|
-
"source-label":
|
|
514
|
-
"edit-asset-label":
|
|
515
|
-
"author-enabled":
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
515
|
+
"show-source-enabled": T(Lt),
|
|
516
|
+
"source-label": T(Rt),
|
|
517
|
+
"edit-asset-label": T(zt),
|
|
518
|
+
"author-enabled": Zt.value,
|
|
519
|
+
"source-enabled": Qt.value,
|
|
520
|
+
readonly: x.readonly,
|
|
521
|
+
"config-name": T(k),
|
|
522
|
+
onEditAsset: Ut,
|
|
523
|
+
onRemoveItem: cn
|
|
520
524
|
}, null, 8, [
|
|
521
525
|
"index",
|
|
522
526
|
"show-source-enabled",
|
|
523
527
|
"source-label",
|
|
524
528
|
"edit-asset-label",
|
|
525
529
|
"author-enabled",
|
|
530
|
+
"source-enabled",
|
|
526
531
|
"readonly",
|
|
527
532
|
"config-name"
|
|
528
533
|
]))), 128))])]),
|
|
529
|
-
"item-compact":
|
|
534
|
+
"item-compact": E(({ raw: e }) => [y("div", at, [y("div", ot, [b(pe, {
|
|
530
535
|
"model-value": e.id,
|
|
531
536
|
image: e,
|
|
532
|
-
"config-name":
|
|
537
|
+
"config-name": T(k)
|
|
533
538
|
}, null, 8, [
|
|
534
539
|
"model-value",
|
|
535
540
|
"image",
|
|
536
541
|
"config-name"
|
|
537
|
-
])]),
|
|
542
|
+
])]), y("div", st, [y("div", ct, w(e.texts?.description?.trim() || "—"), 1), e.texts?.source ? (S(), v("div", lt, w(e.texts.source), 1)) : _("", !0)])])]),
|
|
538
543
|
_: 1
|
|
539
544
|
}, 8, [
|
|
540
545
|
"modelValue",
|
|
541
546
|
"mode",
|
|
542
547
|
"disable-drag",
|
|
543
548
|
"readonly"
|
|
544
|
-
])) :
|
|
549
|
+
])) : _("", !0), $.value === "view" && !x.readonly ? (S(), g(u, {
|
|
545
550
|
key: 1,
|
|
546
551
|
variant: "fill",
|
|
547
|
-
"hover-only":
|
|
548
|
-
accept:
|
|
549
|
-
"max-sizes":
|
|
550
|
-
onDrop:
|
|
551
|
-
onClick: t[3] ||= (e) =>
|
|
552
|
+
"hover-only": x.modelValue.length > 0 || T(V).length > 0,
|
|
553
|
+
accept: T(L),
|
|
554
|
+
"max-sizes": T(I),
|
|
555
|
+
onDrop: Et,
|
|
556
|
+
onClick: t[3] ||= (e) => ht.value?.$el.click()
|
|
552
557
|
}, null, 8, [
|
|
553
558
|
"hover-only",
|
|
554
559
|
"accept",
|
|
555
560
|
"max-sizes"
|
|
556
|
-
])) :
|
|
557
|
-
|
|
561
|
+
])) : _("", !0)]),
|
|
562
|
+
T(q) === x.queueKey && T(j) ? (S(), g(te, {
|
|
558
563
|
key: 3,
|
|
559
|
-
"queue-key":
|
|
560
|
-
"ext-system":
|
|
561
|
-
"licence-id":
|
|
562
|
-
"file-input-key":
|
|
563
|
-
accept:
|
|
564
|
-
"max-sizes":
|
|
564
|
+
"queue-key": x.queueKey,
|
|
565
|
+
"ext-system": T(j).extSystem,
|
|
566
|
+
"licence-id": T(j).licence,
|
|
567
|
+
"file-input-key": Ct.value?.fileInputKey ?? -1,
|
|
568
|
+
accept: T(L),
|
|
569
|
+
"max-sizes": T(I),
|
|
565
570
|
multiple: "",
|
|
566
|
-
onApply:
|
|
567
|
-
onFilesInput:
|
|
568
|
-
onDrop:
|
|
571
|
+
onApply: Gt,
|
|
572
|
+
onFilesInput: Tt,
|
|
573
|
+
onDrop: Tt
|
|
569
574
|
}, null, 8, [
|
|
570
575
|
"queue-key",
|
|
571
576
|
"ext-system",
|
|
@@ -573,27 +578,27 @@ var Qe = {
|
|
|
573
578
|
"file-input-key",
|
|
574
579
|
"accept",
|
|
575
580
|
"max-sizes"
|
|
576
|
-
])) :
|
|
577
|
-
|
|
581
|
+
])) : _("", !0),
|
|
582
|
+
T(Nt) === x.queueKey ? (S(), g(re, {
|
|
578
583
|
key: 4,
|
|
579
|
-
"queue-key":
|
|
580
|
-
"config-name":
|
|
581
|
-
"ext-system":
|
|
582
|
-
onClose:
|
|
584
|
+
"queue-key": x.queueKey,
|
|
585
|
+
"config-name": T(k),
|
|
586
|
+
"ext-system": T(K),
|
|
587
|
+
onClose: an
|
|
583
588
|
}, null, 8, [
|
|
584
589
|
"queue-key",
|
|
585
590
|
"config-name",
|
|
586
591
|
"ext-system"
|
|
587
|
-
])) :
|
|
588
|
-
|
|
592
|
+
])) : _("", !0),
|
|
593
|
+
b(xe, {
|
|
589
594
|
ref_key: "limitDialogComponent",
|
|
590
|
-
ref:
|
|
591
|
-
"queue-key":
|
|
592
|
-
onAfterAdd:
|
|
595
|
+
ref: ln,
|
|
596
|
+
"queue-key": x.queueKey,
|
|
597
|
+
onAfterAdd: Ot
|
|
593
598
|
}, null, 8, ["queue-key"])
|
|
594
599
|
]));
|
|
595
600
|
}
|
|
596
601
|
});
|
|
597
|
-
export {
|
|
602
|
+
export { ut as default };
|
|
598
603
|
|
|
599
604
|
//# sourceMappingURL=ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js.map
|