@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.
Files changed (150) hide show
  1. package/dist/AnzuSystemsCommonAdmin.d.ts +2 -0
  2. package/dist/AnzuSystemsCommonAdmin.js.map +1 -1
  3. package/dist/common-admin.css +1 -1
  4. package/dist/common-admin.js +33 -29
  5. package/dist/domains/dam/api/damAssetApi.d.ts +12 -5
  6. package/dist/domains/dam/api/damAssetApi.js +66 -55
  7. package/dist/domains/dam/api/damAssetApi.js.map +1 -1
  8. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarMetadata.vue_vue_type_script_setup_true_lang.js +1 -1
  9. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
  10. package/dist/domains/dam/assetDetail/components/AssetMetadata.vue_vue_type_script_setup_true_lang.js +100 -108
  11. package/dist/domains/dam/assetDetail/components/AssetMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
  12. package/dist/domains/dam/assetDetail/store/assetDetailStore.d.ts +2 -0
  13. package/dist/domains/dam/assetSelect/components/AAssetListInner.vue.d.ts +2 -0
  14. package/dist/domains/dam/assetSelect/components/AAssetSelect.vue.d.ts +1 -0
  15. package/dist/domains/dam/assetSelect/composables/assetSelectListActions.js +1 -1
  16. package/dist/domains/dam/assetSelect/composables/assetSelectListActions.js.map +1 -1
  17. package/dist/domains/dam/assetSelect/store/assetSelectStore.d.ts +112 -0
  18. package/dist/domains/dam/author/components/AuthorCreateButton.vue.d.ts +6 -0
  19. package/dist/domains/dam/author/components/AuthorCreateButton.vue_vue_type_script_setup_true_lang.js +13 -5
  20. package/dist/domains/dam/author/components/AuthorCreateButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  21. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.js +4 -2
  22. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.js.map +1 -1
  23. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.vue_vue_type_script_setup_true_lang.js +45 -39
  24. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  25. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.js +1 -1
  26. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.vue.d.ts +15 -2
  27. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js +118 -96
  28. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js.map +1 -1
  29. package/dist/domains/dam/author/components/DamAuthorFilterRemoteAutocomplete.vue.d.ts +3 -0
  30. package/dist/domains/dam/author/components/DamAuthorFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +5 -1
  31. package/dist/domains/dam/author/components/DamAuthorFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  32. package/dist/domains/dam/author/components/DamSourcesAuthorsFields.js +8 -0
  33. package/dist/domains/dam/author/components/DamSourcesAuthorsFields.js.map +1 -0
  34. package/dist/domains/dam/author/components/DamSourcesAuthorsFields.vue.d.ts +67 -0
  35. package/dist/domains/dam/author/components/DamSourcesAuthorsFields.vue_vue_type_script_setup_true_lang.js +144 -0
  36. package/dist/domains/dam/author/components/DamSourcesAuthorsFields.vue_vue_type_script_setup_true_lang.js.map +1 -0
  37. package/dist/domains/dam/author/components/DamSourcesAuthorsRow.js +8 -0
  38. package/dist/domains/dam/author/components/DamSourcesAuthorsRow.js.map +1 -0
  39. package/dist/domains/dam/author/components/DamSourcesAuthorsRow.vue.d.ts +27 -0
  40. package/dist/domains/dam/author/components/DamSourcesAuthorsRow.vue_vue_type_script_setup_true_lang.js +47 -0
  41. package/dist/domains/dam/author/components/DamSourcesAuthorsRow.vue_vue_type_script_setup_true_lang.js.map +1 -0
  42. package/dist/domains/dam/author/composables/authorActions.js +2 -1
  43. package/dist/domains/dam/author/composables/authorActions.js.map +1 -1
  44. package/dist/domains/dam/author/composables/authorFieldRouting.d.ts +15 -0
  45. package/dist/domains/dam/author/composables/authorFieldRouting.js +18 -0
  46. package/dist/domains/dam/author/composables/authorFieldRouting.js.map +1 -0
  47. package/dist/domains/dam/author/composables/authorValidation.js +1 -1
  48. package/dist/domains/dam/author/composables/authorValidation.js.map +1 -1
  49. package/dist/domains/dam/author/composables/cachedAuthors.js +4 -2
  50. package/dist/domains/dam/author/composables/cachedAuthors.js.map +1 -1
  51. package/dist/domains/dam/author/composables/damAuthorConfig.d.ts +5 -0
  52. package/dist/domains/dam/author/composables/damAuthorConfig.js +5 -2
  53. package/dist/domains/dam/author/composables/damAuthorConfig.js.map +1 -1
  54. package/dist/domains/dam/author/composables/damCredit.d.ts +35 -0
  55. package/dist/domains/dam/author/composables/damCredit.js +44 -0
  56. package/dist/domains/dam/author/composables/damCredit.js.map +1 -0
  57. package/dist/domains/dam/author/composables/damSourceConfig.d.ts +15 -0
  58. package/dist/domains/dam/author/composables/damSourceConfig.js +19 -0
  59. package/dist/domains/dam/author/composables/damSourceConfig.js.map +1 -0
  60. package/dist/domains/dam/author/factory/AuthorFactory.js +3 -1
  61. package/dist/domains/dam/author/factory/AuthorFactory.js.map +1 -1
  62. package/dist/domains/dam/author/filter/AuthorFilter.d.ts +38 -4
  63. package/dist/domains/dam/author/filter/AuthorFilter.js +20 -6
  64. package/dist/domains/dam/author/filter/AuthorFilter.js.map +1 -1
  65. package/dist/domains/dam/author/types/DamAuthor.d.ts +4 -0
  66. package/dist/domains/dam/composables/commonAdminCoreDamOptions.d.ts +1 -0
  67. package/dist/domains/dam/composables/commonAdminCoreDamOptions.js +1 -0
  68. package/dist/domains/dam/composables/commonAdminCoreDamOptions.js.map +1 -1
  69. package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue.d.ts +9 -1
  70. package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue_vue_type_script_setup_true_lang.js +206 -204
  71. package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
  72. package/dist/domains/dam/imageWidget/components/ImageMassOperations.vue_vue_type_script_setup_true_lang.js +165 -131
  73. package/dist/domains/dam/imageWidget/components/ImageMassOperations.vue_vue_type_script_setup_true_lang.js.map +1 -1
  74. package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js +344 -335
  75. package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  76. package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue.d.ts +1 -0
  77. package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue_vue_type_script_setup_true_lang.js +251 -242
  78. package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  79. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue.d.ts +1 -0
  80. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js +308 -303
  81. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  82. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleItem.vue.d.ts +1 -0
  83. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleItem.vue_vue_type_script_setup_true_lang.js +84 -87
  84. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  85. package/dist/domains/dam/imageWidget/composables/imageDialogDamAuthors.d.ts +6 -3
  86. package/dist/domains/dam/imageWidget/composables/imageDialogDamAuthors.js +82 -77
  87. package/dist/domains/dam/imageWidget/composables/imageDialogDamAuthors.js.map +1 -1
  88. package/dist/domains/dam/imageWidget/composables/useImageMassOperations.d.ts +2 -0
  89. package/dist/domains/dam/imageWidget/composables/useImageMassOperations.js +59 -37
  90. package/dist/domains/dam/imageWidget/composables/useImageMassOperations.js.map +1 -1
  91. package/dist/domains/dam/imageWidget/store/imageStore.d.ts +2 -0
  92. package/dist/domains/dam/imageWidget/utils/metadataToImageMap.d.ts +3 -1
  93. package/dist/domains/dam/imageWidget/utils/metadataToImageMap.js +13 -22
  94. package/dist/domains/dam/imageWidget/utils/metadataToImageMap.js.map +1 -1
  95. package/dist/domains/dam/types/Asset.d.ts +1 -0
  96. package/dist/domains/dam/types/Asset.js.map +1 -1
  97. package/dist/domains/dam/types/DamConfig.d.ts +6 -0
  98. package/dist/domains/dam/types/DamConfig.js.map +1 -1
  99. package/dist/domains/dam/types/ImageAware.d.ts +1 -0
  100. package/dist/domains/dam/types/UploadQueue.d.ts +1 -0
  101. package/dist/domains/dam/types/UploadQueue.js.map +1 -1
  102. package/dist/domains/dam/uploadQueue/components/AssetQueueSelectedSidebar.vue_vue_type_script_setup_true_lang.js +204 -175
  103. package/dist/domains/dam/uploadQueue/components/AssetQueueSelectedSidebar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  104. package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.vue_vue_type_script_setup_true_lang.js +67 -65
  105. package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  106. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingle.vue_vue_type_script_setup_true_lang.js +71 -70
  107. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingle.vue_vue_type_script_setup_true_lang.js.map +1 -1
  108. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadataContent.vue_vue_type_script_setup_true_lang.js +83 -91
  109. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadataContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  110. package/dist/domains/dam/uploadQueue/components/UploadQueueEditable.vue_vue_type_script_setup_true_lang.js +4 -0
  111. package/dist/domains/dam/uploadQueue/components/UploadQueueEditable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  112. package/dist/domains/dam/uploadQueue/components/UploadQueueItemEditable.vue.d.ts +10 -2
  113. package/dist/domains/dam/uploadQueue/components/UploadQueueItemEditable.vue_vue_type_script_setup_true_lang.js +178 -177
  114. package/dist/domains/dam/uploadQueue/components/UploadQueueItemEditable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  115. package/dist/domains/dam/uploadQueue/components/uploadQueueBindings.d.ts +2 -0
  116. package/dist/domains/dam/uploadQueue/components/uploadQueueBindings.js +4 -3
  117. package/dist/domains/dam/uploadQueue/components/uploadQueueBindings.js.map +1 -1
  118. package/dist/domains/dam/uploadQueue/composables/uploadQueueMassOperations.d.ts +1 -0
  119. package/dist/domains/dam/uploadQueue/composables/uploadQueueMassOperations.js +11 -8
  120. package/dist/domains/dam/uploadQueue/composables/uploadQueueMassOperations.js.map +1 -1
  121. package/dist/domains/dam/uploadQueue/core/uploadQueueFill.d.ts +2 -0
  122. package/dist/domains/dam/uploadQueue/core/uploadQueueFill.js +4 -1
  123. package/dist/domains/dam/uploadQueue/core/uploadQueueFill.js.map +1 -1
  124. package/dist/domains/dam/uploadQueue/factory/UploadQueueItemFactory.js +1 -0
  125. package/dist/domains/dam/uploadQueue/factory/UploadQueueItemFactory.js.map +1 -1
  126. package/dist/domains/dam/uploadQueue/settlement/uploadSettle.js +4 -4
  127. package/dist/domains/dam/uploadQueue/settlement/uploadSettle.js.map +1 -1
  128. package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.d.ts +1 -0
  129. package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.js +7 -4
  130. package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.js.map +1 -1
  131. package/dist/domains/filters/datatable/components/ADatatableSidePanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  132. package/dist/domains/filters/datatable/components/ALiveListingPill.vue_vue_type_script_setup_true_lang.js.map +1 -1
  133. package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocompleteWithCached.vue.d.ts +3 -0
  134. package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js +6 -2
  135. package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js.map +1 -1
  136. package/dist/lib.d.ts +5 -1
  137. package/dist/locales/cs/common/assetSelect.js +1 -1
  138. package/dist/locales/cs/common/damImage.js +84 -10
  139. package/dist/locales/cs/common/damImage.js.map +1 -1
  140. package/dist/locales/cs.d.ts +6 -0
  141. package/dist/locales/en/common/assetSelect.js +1 -1
  142. package/dist/locales/en/common/damImage.js +84 -10
  143. package/dist/locales/en/common/damImage.js.map +1 -1
  144. package/dist/locales/en.d.ts +6 -0
  145. package/dist/locales/sk/common/assetSelect.js +1 -1
  146. package/dist/locales/sk/common/damImage.js +84 -10
  147. package/dist/locales/sk/common/damImage.js.map +1 -1
  148. package/dist/locales/sk.d.ts +6 -0
  149. package/dist/plugins/i18n.d.ts +6 -0
  150. 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 ee } from "../../config/composables/acceptTypeAndSizeHelper.js";
11
- import { useUploadQueuesStore as te } from "../../uploadQueue/store/uploadQueuesStore.js";
12
- import ne from "../../uploadQueue/components/UploadQueueDialog.js";
13
- import { useUploadQueueDialog as re } from "../../uploadQueue/composables/useUploadQueueDialog.js";
14
- import ie from "../../assetDetail/components/AssetDetailDialog.js";
15
- import { bulkUpdateAssetsAuthors as ae, fetchAsset as oe, fetchAssetByFileId as se, fetchAssetListByIds as ce, showMetadataSaveError as le } from "../../api/damAssetApi.js";
16
- import { useAssetDetailStore as ue } from "../../assetDetail/store/assetDetailStore.js";
17
- import { loadAssetDetailExtSystem as de } from "../../assetDetail/composables/assetDetailExtSystem.js";
18
- import { useCommonAdminCoreDamOptions as fe } from "../../composables/commonAdminCoreDamOptions.js";
19
- import { generateUUIDv1 as d } from "../../../../shared/utils/generator.js";
20
- import pe from "../../../listEditor/components/ASortableListEditor.js";
21
- import me from "./AImageWidgetSimple.js";
22
- import { fetchAuthorListByIds as f } from "../../author/api/authorApi.js";
23
- import { AImageMetadataValidationScopeSymbol as he } from "../../composables/uploadValidations.js";
24
- import { useExtSystemIdForCached as ge } from "../../composables/extSystemIdForCached.js";
25
- import { useAssetSelectStore as _e } from "../../assetSelect/store/assetSelectStore.js";
26
- import ve from "./ImageWidgetMultipleLimitDialog.js";
27
- import { ImageWidgetUploadConfigKey as ye } from "../utils/imageWidgetInkectionKeys.js";
28
- import { fetchAssetListByFileIdsMultipleLicences as be } from "../../api/damfetchAssetListByFileIdsMultipleLicences.js";
29
- import { copyToLicence as xe } from "../../api/damImageApi.js";
30
- import { createDamImage as Se, imageFieldsOf as Ce } from "../utils/damImage.js";
31
- import { useDamConfigState as we } from "../../config/composables/damConfigState.js";
32
- import { useDamConfigStoreOf as Te } from "../../config/store/damConfigStore.js";
33
- import { useDamConfigName as Ee } from "../../composables/damConfigName.js";
34
- import { holdImages as p, imageSavedSince as De, imageSavesOfOthersOver as Oe, noteImagesSave as ke } from "../utils/imageSaves.js";
35
- import { WAIT_RAN_OUT as Ae, withinWaitLimit as je } from "../utils/waitLimit.js";
36
- import { Fragment as Me, computed as Ne, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as Pe, createTextVNode as Fe, createVNode as v, defineComponent as y, guardReactiveProps as Ie, inject as Le, isRef as Re, mergeProps as ze, normalizeProps as Be, onBeforeUnmount as Ve, onMounted as He, openBlock as b, ref as x, renderList as Ue, renderSlot as We, toDisplayString as S, toRaw as Ge, unref as C, watch as Ke, withCtx as w } from "vue";
37
- import { useI18n as qe } from "vue-i18n";
38
- import { VProgressCircular as Je } from "vuetify/components/VProgressCircular";
39
- import { VBtn as Ye } from "vuetify/components/VBtn";
40
- import Xe from "@vuelidate/core";
41
- import { storeToRefs as Ze } from "pinia";
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 Qe = {
43
+ var et = {
44
44
  key: 0,
45
45
  class: "font-weight-bold text-label-large"
46
- }, $e = {
46
+ }, tt = {
47
47
  key: 1,
48
48
  class: "pb-2"
49
- }, et = {
49
+ }, nt = {
50
50
  key: 2,
51
51
  class: "w-100 d-flex align-center justify-center"
52
- }, tt = {
52
+ }, rt = {
53
53
  class: "position-relative w-100",
54
54
  style: { "min-height": "140px" }
55
- }, nt = { class: "asset-list-tiles asset-list-tiles--thumbnail a-sortable-widget__group" }, rt = { class: "image-widget-multiple-reorder" }, it = { class: "image-widget-multiple-reorder__thumb" }, at = { class: "image-widget-multiple-reorder__meta" }, ot = { class: "image-widget-multiple-reorder__title" }, st = {
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
- }, ct = /*@__PURE__*/ y({
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(y, { expose: ct, emit: lt }) {
90
- let T = y, ut = lt, E = Ee(T.configName), D = x(!1), O = Le(ye, void 0);
91
- if (n(O) || n(O.value)) throw Error("Fatal error, parent component doesn't provide necessary config ext system config.");
92
- let { imageClient: k, imageApi: A } = a(E), { showErrorsDefault: j, showValidationError: dt, showErrorT: ft, showWarningT: pt, showUnknownError: M } = o(), mt = x(null), { uploadSizes: N, uploadAccept: P } = ee(s.Image, O.value.extSystemConfig), { t: ht } = qe(), F = x(!1), gt = x(!1), _t = x(T.modelValue.length === 0), I = x(null), L = r();
93
- L.reset(), Ke(() => T.readonly, (e) => {
94
- L.readonly = e;
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: R, maxPosition: vt } = Ze(L), z = Symbol("image widget multiple"), yt = /* @__PURE__ */ new Set(), B = null, bt = async (t) => {
97
- let n = t.map((e) => Oe(E, e, yt)).filter((t) => !e(t));
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
- B = () => n.forEach((e) => e.cancel());
100
- let r = await je(Promise.all(n.map((e) => e.over)), 1, E);
101
- B = null, r === Ae && (n.forEach((e) => e.cancel()), Z || ft("error.apiTimedOut.message"));
102
- }, V = Promise.resolve(), xt = async () => {
103
- if (T.modelValue.length !== 0) try {
104
- F.value = !0;
105
- let e = p(E, z, T.modelValue), t = await A.fetchImageListByIds(k, T.modelValue);
106
- if (await bt(t.map((e) => e.id)), Z) return;
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 = De(E, t.id, e.get(t.id) ?? 0);
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 be(J, Y, i);
122
+ a = await Ce(J, Y, i);
123
123
  } catch (e) {
124
- if (!T.readonly) throw e;
124
+ if (!D.readonly) throw e;
125
125
  }
126
- L.setImages(r.map((e) => {
126
+ B.setImages(r.map((e) => {
127
127
  if (n(e.position)) throw Error("Image object needs position field!");
128
- L.updateMaxPositionIfGreater(e.position);
128
+ B.updateMaxPositionIfGreater(e.position);
129
129
  let t = a.find((t) => t.mainFile?.id === e.dam.damId);
130
130
  return {
131
- key: d(),
131
+ key: f(),
132
132
  ...e,
133
133
  damAuthors: t ? [...t.authors] : [],
134
- showDamAuthors: t ? t.authors.length === 0 : !1,
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
- })), T.readonly || ut("update:modelValue", R.value.map((e) => e.id).filter((e) => e !== void 0));
138
+ })), D.readonly || O("update:modelValue", V.value.map((e) => e.id).filter((e) => e !== void 0));
138
139
  } catch (e) {
139
- gt.value = !0, j(e);
140
+ _t.value = !0, P(e);
140
141
  } finally {
141
- F.value = !1, _t.value = !0;
142
+ R.value = !1, vt.value = !0;
142
143
  }
143
- }, H = te(), St = Ne(() => H.getQueue(T.queueKey)), { cachedExtSystemId: U } = ge(E), { uploadQueueDialog: W, stopQueueLeftBehind: Ct } = re(), G = (e) => {
144
- if (T.readonly || e.length === 0) return;
145
- let t = O.value;
146
- n(t) || (U.value = t.extSystem, Ct(T.queueKey), tn.value?.check(e));
147
- }, wt = (e) => {
148
- if (T.readonly || e.length === 0) return;
149
- let t = O.value;
150
- n(t) || (U.value = t.extSystem, Ct(T.queueKey), tn.value?.check(e));
151
- }, Tt = (e) => {
152
- if (T.readonly || e.length === 0) return;
153
- let t = O.value;
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
- U.value = t.extSystem, Ct(T.queueKey);
156
+ K.value = t.extSystem, wt(D.queueKey);
156
157
  let r = 0;
157
158
  e.forEach((e) => {
158
- e.result === "copy" ? H.addByCopyToLicence(T.queueKey, t.extSystem, t.licence, [e.targetAsset], E) : e.result === "exists" ? (H.addByCopyToLicence(T.queueKey, t.extSystem, t.licence, [e.targetAsset], E), H.queueItemDuplicate(e.targetAsset, e.targetMainFile, s.Image, E)) : r++;
159
- }), r > 0 && ft("common.damImage.queueItem.errorUnableToCopyToLicence"), r !== e.length && (W.value = T.queueKey);
160
- }, Et = () => {
161
- W.value = T.queueKey;
162
- }, Dt = async (e, r) => {
163
- let i = _e(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
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 = r ? r.licence : e.licence, n = s.get(t);
166
- n ? n.push(e.id) : s.set(t, [e.id]);
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 c = [];
169
- for (let [e, n] of s) try {
170
- let s = await ce(J, Y, n, e);
171
- if (Lt) {
172
- s.forEach((e) => {
173
- let t = Lt(e);
174
- a.set(e.id, {
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
- }), o.set(e.id, t.source);
177
+ authorIds: [],
178
+ sourceIds: []
179
+ }), a.set(e.id, t.source);
178
180
  });
179
181
  continue;
180
182
  }
181
- let c = /* @__PURE__ */ new Set();
182
- if (s.forEach((e) => {
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
- }), e.authors.forEach((e) => {
187
- c.add(e);
186
+ authorIds: e.authors,
187
+ sourceIds: e.sources ?? []
188
188
  });
189
- }), c.size > 0) {
190
- let t = i.selectConfig.find((t) => t.licence === e);
191
- (await f(J, jt, r ? r.extSystem : await Kt(e) ?? (t ?? i.requireSelectedSelectConfig()).extSystem, [...c])).forEach((e) => {
192
- o.set(e.id, e.name);
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
- c.push(e);
198
+ s.push(e);
197
199
  }
198
- return c.length > 0 && !j(c[0]) && M(), e.map((e) => {
199
- let t = a.get(e.id)?.authorIds || [], r = a.get(e.id)?.description ?? "";
200
- if (Lt) return {
201
- key: d(),
202
- ...Se({
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: o.get(e.id) ?? ""
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
- let i = [];
215
- return a.get(e.id)?.authorIds.forEach((e) => {
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: i.join(", ")
224
+ source: a.get(e.id) ?? ""
227
225
  }, { position: 0 }),
228
226
  damAuthors: t,
229
- showDamAuthors: a.has(e.id) && t.length === 0,
227
+ damSources: n,
228
+ showDamAuthors: i.has(e.id) && p(t, n),
230
229
  assetId: e.id
231
230
  };
232
231
  });
233
- }, K = (e) => e.map((e) => (vt.value++, {
232
+ }, At = (e) => e.map((e) => (yt.value++, {
234
233
  ...e,
235
- position: vt.value
236
- })), Ot = async (t) => {
237
- if (T.readonly || t.type !== "asset" || t.value.length === 0) return;
238
- let r = t.value.filter((t) => !e(t.mainFile)), i = Mt !== !1 && !n(t.copyToLicence) ? r.filter((e) => e.licence !== t.copyToLicence) : [], a = () => Z || T.readonly;
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 Dt(r);
241
- await V, a() || L.addImages(K(e));
239
+ let e = await kt(r);
240
+ await W, a() || B.addImages(At(e));
242
241
  return;
243
242
  }
244
- let o = xe(J, At, i.map((e) => ({
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 = O.value, l = s.length === 0 ? Promise.resolve([]) : Dt(s, 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
- j(e);
253
+ P(e);
255
254
  }
256
- let ee = await l;
257
- await V, a() || (L.addImages(K(ee)), u && Tt(u));
258
- }, q = ue(), { dialog: kt } = Ze(q), { damClient: J, endPointAsset: Y, endPointImage: At, endPointAuthor: jt, copyToLicenceEnabled: Mt, showSourceEnabled: Nt, sourceLabel: Pt, editAssetLabel: Ft, addFromDamLabel: It, customAssetSelectMetadataToImageMap: Lt } = fe(E), Rt = !1, X = /* @__PURE__ */ new Map(), Z = !1;
259
- Ve(() => {
260
- Z = !0, p(E, z, []), B?.();
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 zt = async (e) => {
263
- Rt = !0;
261
+ let Ut = async (e) => {
262
+ Ht = !0;
264
263
  let t = null;
265
264
  try {
266
- await q.open(T.queueKey, async () => {
267
- let n = await se(J, Y, e), r = await Kt(n.licence) ?? O.value.extSystem;
268
- return await de(J, r, n.attributes.assetType, E), t = r, n;
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 && (U.value = t);
269
+ t && (K.value = t);
271
270
  });
272
271
  } catch (e) {
273
- j(e);
272
+ P(e);
274
273
  }
275
- }, Bt = !1, Vt = async (e) => {
276
- T.readonly || e.length !== 0 && (F.value && (Bt || (Bt = !0, await V, Bt = !1, Z || T.readonly)) || (Ht(e), W.value = null, H.stopUpload(T.queueKey)));
277
- }, Ht = (e) => {
278
- Q.value && e.forEach((e) => {
279
- n(e.assetId) || e.damAuthors.length === 0 || R.value.forEach((t) => {
280
- t.assetId === e.assetId && t.showDamAuthors && Yt(t, e.damAuthors, e.texts.source);
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
- }), L.addImages(K(e));
283
- }, Ut = () => {
284
- D.value = !0;
285
- }, Wt = Xe({ $scope: he }), { getDamConfigExtSystem: Gt, getExtSystemByLicence: Kt } = we(J, E), qt = Te(E), Q = Ne(() => !!Gt(U.value)?.[s.Image]?.authors?.enabled), Jt = async (e, t) => {
286
- let r = await Kt(e.licence) ?? t, i = await f(J, jt, r, e.authors), a = [];
287
- return e.authors.forEach((e) => {
288
- let t = i.find((t) => t.id === e)?.name;
289
- !n(t) && t.trim().length > 0 && a.push(t);
290
- }), a.join(", ");
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 oe(J, Y, e);
297
- if (r.authors.length === 0) return;
298
- let i = await Jt(r, n);
299
- if (Z || T.readonly) return;
300
- R.value.forEach((e) => {
301
- e.assetId === r.id && e.showDamAuthors && Yt(e, r.authors, i);
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 && !j(e) && M();
300
+ !Z && !P(e) && F();
305
301
  }
306
- }, Zt = (t) => {
307
- let n = Rt;
308
- if (Rt = !1, !n || e(t) || T.readonly || !Q.value) return;
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 (!R.value.some((e) => e.assetId === r && e.showDamAuthors)) return;
311
- let i = q.savingOf(r, E), a = U.value, o = (X.get(r) ?? Promise.resolve()).then(() => Xt(r, i, a));
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
- }, Qt = async () => {
316
- if (T.readonly) return !0;
317
- if (F.value || gt.value) return M(), !1;
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 (Wt.value.$touch(), Wt.value.$invalid) return dt(), !1;
315
+ if (Jt.value.$touch(), Jt.value.$invalid) return ft(), !1;
320
316
  try {
321
- let e = [], t = Ge(R.value), r = /* @__PURE__ */ new Map();
322
- Q.value && R.value.forEach((e) => {
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.length === 0) continue;
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 = qt.damConfigLicenceExtSystem.get(n[0].dam.licenceId)?.extSystem ?? U.value, o = await f(J, jt, r, a);
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
- source: o.map((e) => e.name).join(", ")
344
+ sources: o,
345
+ source: he(s, o, a, en(r))
346
346
  });
347
347
  }
348
348
  if (Z) return !1;
349
- if (T.readonly) return !0;
350
- let a = [...r.values()].filter(({ assetId: e, authors: t }) => !n(e) && t.length > 0);
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 }) => oe(J, Y, e)));
353
- if (Z || T.readonly) return !1;
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.length > 0);
357
+ })).filter(({ asset: e }) => !p(e.authors, e.sources));
358
358
  if (t.length > 0) {
359
- let e = U.value, n = await Promise.all(t.map(({ asset: t }) => Jt(t, e)));
360
- return Z || T.readonly || (t.forEach(({ rows: e, asset: t }, r) => {
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 && Yt(e, t.authors, n[r]);
362
+ e.showDamAuthors && nn(e, t.authors, t.sources, n[r]);
363
363
  });
364
- }), pt("common.damImage.image.meta.galleryAuthorsGivenMeanwhile", -1)), !1;
364
+ }), mt("common.damImage.image.meta.galleryAuthorsGivenMeanwhile", -1)), !1;
365
365
  }
366
366
  }
367
- if (e.length && (await ae(J, Y, e), Z)) return !1;
368
- i.forEach(({ assetId: e, rows: t, authors: r, source: i }) => {
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 = i, n(e) || (t.showDamAuthors = !1, L.forgetSourceOfPick(t));
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], s = await ke(E, o.map((e) => e.id).filter((e) => !n(e)), yt, A.bulkUpdateImages(k, o.map(Ce)));
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
- p(E, z, s.map((e) => e.id));
376
- let c = [], l = s.map((e) => (c.push(e.id), {
377
- key: d(),
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 (L.images.length === 0) return I.value?.commit([]), ut("update:modelValue", c), !0;
384
- let u = l.map((e) => {
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
- showDamAuthors: n ? n.showDamAuthors && n.damAuthors.length === 0 : !1,
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 L.setImages(u), I.value?.commit(u), ut("update:modelValue", c), !0;
395
+ return B.setImages(d), z.value?.commit(d), O("update:modelValue", l), !0;
394
396
  } catch (e) {
395
- return le(e, U.value, E), !1;
397
+ return ce(e, K.value, k), !1;
396
398
  }
397
- }, $t = (e) => {
398
- L.removeImageByIndex(e), rn();
399
- }, en = async (e) => {
400
- let t = R.value[e];
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)) $t(e);
403
- else if (T.callDeleteApiOnRemove) try {
404
- await A.deleteImage(k, t.id), $t(e);
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
- j(e);
408
+ P(e);
407
409
  }
408
- else $t(e);
410
+ else sn(e);
409
411
  }
410
- }, tn = x(null), $ = x("view");
411
- Ke(() => T.readonly, (e) => {
412
- e && $.value === "reorder" && I.value?.cancelReorderMode();
412
+ }, ln = C(null), $ = C("view");
413
+ Je(() => D.readonly, (e) => {
414
+ e && $.value === "reorder" && z.value?.cancelReorderMode();
413
415
  });
414
- let nn = () => ({
415
- key: d(),
416
- ...Se({
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
- }), rn = () => {
426
+ }), dn = () => {
424
427
  let e = 0;
425
- R.value.forEach((t) => {
428
+ V.value.forEach((t) => {
426
429
  e++, t.position = e;
427
- }), L.maxPosition = e;
428
- }, an = () => {
429
- rn();
430
+ }), B.maxPosition = e;
431
+ }, fn = () => {
432
+ dn();
430
433
  };
431
- return ct({ saveImages: Qt }), He(() => {
432
- V = xt();
433
- }), (e, t) => (b(), g("div", null, [
434
- y.label ? (b(), g("h4", Qe, S(y.label), 1)) : h("", !0),
435
- y.readonly ? h("", !0) : (b(), g("div", $e, [v(l, {
436
- "file-input-key": St.value?.fileInputKey,
437
- accept: C(P),
438
- "max-sizes": C(N),
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: G
443
+ onFilesInput: Tt
441
444
  }, {
442
- activator: w(({ props: e }) => [v(Ye, ze({
445
+ activator: E(({ props: e }) => [b(Ze, Ve({
443
446
  ref_key: "uploadButtonComponent",
444
- ref: mt
447
+ ref: ht
445
448
  }, e), {
446
- default: w(() => [Fe(S(C(ht)("common.damImage.image.button.upload")), 1)]),
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
- ]), v(Ye, {
457
+ ]), b(Ze, {
455
458
  class: "mr-2",
456
- onClick: Ut
459
+ onClick: qt
457
460
  }, {
458
- default: w(() => [Fe(S(C(It)), 1)]),
461
+ default: E(() => [Le(w(T(Bt)), 1)]),
459
462
  _: 1
460
463
  })])),
461
- v(c, {
462
- modelValue: D.value,
463
- "onUpdate:modelValue": t[0] ||= (e) => D.value = e,
464
- "select-licences": y.selectLicences,
465
- "list-views": y.listViews,
466
- "upload-licence": y.uploadLicence,
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": C(s).Image,
470
- "skip-current-user-check": y.skipCurrentUserCheck,
471
- "config-name": C(E),
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: Ot
474
- }, Pe({ _: 2 }, [e.$slots["asset-select-sidebar-prepend"] ? {
476
+ onConfirm: jt
477
+ }, Ie({ _: 2 }, [e.$slots["asset-select-sidebar-prepend"] ? {
475
478
  name: "sidebar-prepend",
476
- fn: w((t) => [We(e.$slots, "asset-select-sidebar-prepend", Be(Ie(t)))]),
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
- F.value ? (b(), g("div", et, [v(Je, {
490
+ R.value ? (S(), v("div", nt, [b(Xe, {
488
491
  indeterminate: "",
489
492
  color: "primary"
490
- })])) : h("", !0),
491
- _("div", tt, [_t.value ? (b(), m(pe, {
493
+ })])) : _("", !0),
494
+ y("div", rt, [vt.value ? (S(), g(fe, {
492
495
  key: 0,
493
496
  ref_key: "listEditor",
494
- ref: I,
495
- modelValue: C(R),
496
- "onUpdate:modelValue": t[1] ||= (e) => Re(R) ? R.value = e : null,
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: nn,
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": y.disableDraggable || y.readonly,
506
- readonly: y.readonly,
507
- onReorderApplied: an
508
+ "disable-drag": x.disableDraggable || x.readonly,
509
+ readonly: x.readonly,
510
+ onReorderApplied: fn
508
511
  }, {
509
- "view-body": w(() => [_("div", nt, [(b(!0), g(Me, null, Ue(C(R), (e, t) => (b(), m(i, {
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": C(Nt),
513
- "source-label": C(Pt),
514
- "edit-asset-label": C(Ft),
515
- "author-enabled": Q.value,
516
- readonly: y.readonly,
517
- "config-name": C(E),
518
- onEditAsset: zt,
519
- onRemoveItem: en
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": w(({ raw: e }) => [_("div", rt, [_("div", it, [v(me, {
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": C(E)
537
+ "config-name": T(k)
533
538
  }, null, 8, [
534
539
  "model-value",
535
540
  "image",
536
541
  "config-name"
537
- ])]), _("div", at, [_("div", ot, S(e.texts?.description?.trim() || "—"), 1), e.texts?.source ? (b(), g("div", st, S(e.texts.source), 1)) : h("", !0)])])]),
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
- ])) : h("", !0), $.value === "view" && !y.readonly ? (b(), m(u, {
549
+ ])) : _("", !0), $.value === "view" && !x.readonly ? (S(), g(u, {
545
550
  key: 1,
546
551
  variant: "fill",
547
- "hover-only": y.modelValue.length > 0 || C(R).length > 0,
548
- accept: C(P),
549
- "max-sizes": C(N),
550
- onDrop: wt,
551
- onClick: t[3] ||= (e) => mt.value?.$el.click()
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
- ])) : h("", !0)]),
557
- C(W) === y.queueKey && C(O) ? (b(), m(ne, {
561
+ ])) : _("", !0)]),
562
+ T(q) === x.queueKey && T(j) ? (S(), g(te, {
558
563
  key: 3,
559
- "queue-key": y.queueKey,
560
- "ext-system": C(O).extSystem,
561
- "licence-id": C(O).licence,
562
- "file-input-key": St.value?.fileInputKey ?? -1,
563
- accept: C(P),
564
- "max-sizes": C(N),
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: Vt,
567
- onFilesInput: G,
568
- onDrop: G
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
- ])) : h("", !0),
577
- C(kt) === y.queueKey ? (b(), m(ie, {
581
+ ])) : _("", !0),
582
+ T(Nt) === x.queueKey ? (S(), g(re, {
578
583
  key: 4,
579
- "queue-key": y.queueKey,
580
- "config-name": C(E),
581
- "ext-system": C(U),
582
- onClose: Zt
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
- ])) : h("", !0),
588
- v(ve, {
592
+ ])) : _("", !0),
593
+ b(xe, {
589
594
  ref_key: "limitDialogComponent",
590
- ref: tn,
591
- "queue-key": y.queueKey,
592
- onAfterAdd: Et
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 { ct as default };
602
+ export { ut as default };
598
603
 
599
604
  //# sourceMappingURL=ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js.map