@anzusystems/common-admin 2.0.0-rc.25 → 2.0.0-rc.27

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 (319) hide show
  1. package/dist/AnzuSystemsCommonAdmin.d.ts +22 -1
  2. package/dist/AnzuSystemsCommonAdmin.js.map +1 -1
  3. package/dist/common-admin.css +1 -1
  4. package/dist/common-admin.js +185 -181
  5. package/dist/domains/anzuUser/components/AAnzuUserDatatable.vue_vue_type_script_setup_true_lang.js +101 -100
  6. package/dist/domains/anzuUser/components/AAnzuUserDatatable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  7. package/dist/domains/anzuUser/components/AUserCreateInSystemButton.vue_vue_type_script_setup_true_lang.js +4 -4
  8. package/dist/domains/anzuUser/components/AUserMetadataRepairDialog.vue_vue_type_script_setup_true_lang.js +4 -4
  9. package/dist/domains/anzuUser/components/AUserMetadataRepairDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  10. package/dist/domains/anzuUser/components/AUserSystemOverview.vue_vue_type_script_setup_true_lang.js +4 -4
  11. package/dist/domains/auth/composables/refreshSession.d.ts +7 -0
  12. package/dist/domains/auth/composables/refreshSession.js +26 -19
  13. package/dist/domains/auth/composables/refreshSession.js.map +1 -1
  14. package/dist/domains/auth/composables/sessionEnd.d.ts +37 -0
  15. package/dist/domains/auth/composables/sessionEnd.js +65 -0
  16. package/dist/domains/auth/composables/sessionEnd.js.map +1 -0
  17. package/dist/domains/collab/components/ACollabCountdown.vue_vue_type_script_setup_true_lang.js +3 -3
  18. package/dist/domains/collab/components/ACollabCountdown.vue_vue_type_script_setup_true_lang.js.map +1 -1
  19. package/dist/domains/collab/composables/collabInit.js +13 -13
  20. package/dist/domains/collab/composables/collabInit.js.map +1 -1
  21. package/dist/domains/collab/composables/collabRoom.js +98 -96
  22. package/dist/domains/collab/composables/collabRoom.js.map +1 -1
  23. package/dist/domains/collab/composables/collabState.d.ts +1 -0
  24. package/dist/domains/collab/composables/collabState.js +6 -5
  25. package/dist/domains/collab/composables/collabState.js.map +1 -1
  26. package/dist/domains/customDataForm/components/ACustomDataForm.vue_vue_type_script_setup_true_lang.js +53 -52
  27. package/dist/domains/customDataForm/components/ACustomDataForm.vue_vue_type_script_setup_true_lang.js.map +1 -1
  28. package/dist/domains/customDataForm/components/ACustomDataFormElement.vue_vue_type_script_setup_true_lang.js +78 -77
  29. package/dist/domains/customDataForm/components/ACustomDataFormElement.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/domains/customDataForm/types/CustomDataForm.d.ts +3 -0
  31. package/dist/domains/customDataForm/utils/customDataFormElementName.d.ts +18 -0
  32. package/dist/domains/customDataForm/utils/customDataFormElementName.js +9 -0
  33. package/dist/domains/customDataForm/utils/customDataFormElementName.js.map +1 -0
  34. package/dist/domains/dam/api/damAssetApi.d.ts +1 -1
  35. package/dist/domains/dam/api/damAssetApi.js +90 -85
  36. package/dist/domains/dam/api/damAssetApi.js.map +1 -1
  37. package/dist/domains/dam/assetDetail/components/AssetImage.vue.d.ts +11 -1
  38. package/dist/domains/dam/assetDetail/components/AssetImage.vue_vue_type_script_setup_true_lang.js +31 -7
  39. package/dist/domains/dam/assetDetail/components/AssetImage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  40. package/dist/domains/dam/assetDetail/components/AssetImageMetaIcons.vue.d.ts +10 -0
  41. package/dist/domains/dam/assetDetail/components/AssetImageMetaIcons.vue_vue_type_script_setup_true_lang.js +59 -32
  42. package/dist/domains/dam/assetDetail/components/AssetImageMetaIcons.vue_vue_type_script_setup_true_lang.js.map +1 -1
  43. package/dist/domains/dam/assetDetail/store/assetDetailStore.d.ts +8 -0
  44. package/dist/domains/dam/assetSelect/components/AAssetListInner.vue.d.ts +8 -0
  45. package/dist/domains/dam/assetSelect/components/AAssetSelect.vue.d.ts +10 -2
  46. package/dist/domains/dam/assetSelect/components/AAssetSelect.vue_vue_type_script_setup_true_lang.js +148 -113
  47. package/dist/domains/dam/assetSelect/components/AAssetSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  48. package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.vue.d.ts +6 -2
  49. package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.vue_vue_type_script_setup_true_lang.js +143 -108
  50. package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.vue_vue_type_script_setup_true_lang.js.map +1 -1
  51. package/dist/domains/dam/assetSelect/components/AssetImagePreview.vue.d.ts +9 -2
  52. package/dist/domains/dam/assetSelect/components/AssetImagePreview.vue_vue_type_script_setup_true_lang.js +23 -5
  53. package/dist/domains/dam/assetSelect/components/AssetImagePreview.vue_vue_type_script_setup_true_lang.js.map +1 -1
  54. package/dist/domains/dam/assetSelect/components/AssetSelectDetailTabs.js +6 -0
  55. package/dist/domains/dam/assetSelect/components/AssetSelectDetailTabs.js.map +1 -0
  56. package/dist/domains/dam/assetSelect/components/AssetSelectDetailTabs.vue.d.ts +25 -0
  57. package/dist/domains/dam/assetSelect/components/AssetSelectDetailTabs.vue_vue_type_script_setup_true_lang.js +59 -0
  58. package/dist/domains/dam/assetSelect/components/AssetSelectDetailTabs.vue_vue_type_script_setup_true_lang.js.map +1 -0
  59. package/dist/domains/dam/assetSelect/components/AssetSelectListTable.js +1 -0
  60. package/dist/domains/dam/assetSelect/components/AssetSelectListTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  61. package/dist/domains/dam/assetSelect/components/AssetSelectListTiles.vue_vue_type_script_setup_true_lang.js.map +1 -1
  62. package/dist/domains/dam/assetSelect/components/AssetSelectSingleUseUsage.js +6 -0
  63. package/dist/domains/dam/assetSelect/components/AssetSelectSingleUseUsage.js.map +1 -0
  64. package/dist/domains/dam/assetSelect/components/AssetSelectSingleUseUsage.vue.d.ts +11 -0
  65. package/dist/domains/dam/assetSelect/components/AssetSelectSingleUseUsage.vue_vue_type_script_setup_true_lang.js +92 -0
  66. package/dist/domains/dam/assetSelect/components/AssetSelectSingleUseUsage.vue_vue_type_script_setup_true_lang.js.map +1 -0
  67. package/dist/domains/dam/assetSelect/components/AssetSelectTableRowItem.vue_vue_type_script_setup_true_lang.js +35 -27
  68. package/dist/domains/dam/assetSelect/components/AssetSelectTableRowItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  69. package/dist/domains/dam/assetSelect/components/AssetSelectTilesItem.vue_vue_type_script_setup_true_lang.js +35 -27
  70. package/dist/domains/dam/assetSelect/components/AssetSelectTilesItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  71. package/dist/domains/dam/assetSelect/composables/assetSelectDisabledReason.d.ts +18 -0
  72. package/dist/domains/dam/assetSelect/composables/assetSelectDisabledReason.js +28 -0
  73. package/dist/domains/dam/assetSelect/composables/assetSelectDisabledReason.js.map +1 -0
  74. package/dist/domains/dam/assetSelect/composables/assetSelectItemActions.d.ts +4 -0
  75. package/dist/domains/dam/assetSelect/composables/assetSelectItemActions.js +37 -28
  76. package/dist/domains/dam/assetSelect/composables/assetSelectItemActions.js.map +1 -1
  77. package/dist/domains/dam/assetSelect/composables/assetSelectListActions.d.ts +46 -3
  78. package/dist/domains/dam/assetSelect/composables/assetSelectListActions.js +136 -93
  79. package/dist/domains/dam/assetSelect/composables/assetSelectListActions.js.map +1 -1
  80. package/dist/domains/dam/assetSelect/composables/assetSelectSingleUseUsage.d.ts +848 -0
  81. package/dist/domains/dam/assetSelect/composables/assetSelectSingleUseUsage.js +83 -0
  82. package/dist/domains/dam/assetSelect/composables/assetSelectSingleUseUsage.js.map +1 -0
  83. package/dist/domains/dam/assetSelect/composables/assetSelectTakeOver.d.ts +17 -0
  84. package/dist/domains/dam/assetSelect/composables/assetSelectTakeOver.js +23 -0
  85. package/dist/domains/dam/assetSelect/composables/assetSelectTakeOver.js.map +1 -0
  86. package/dist/domains/dam/assetSelect/filter/AssetFilter.d.ts +3 -3
  87. package/dist/domains/dam/assetSelect/filter/AssetFilter.js +1 -1
  88. package/dist/domains/dam/assetSelect/filter/AssetFilter.js.map +1 -1
  89. package/dist/domains/dam/assetSelect/store/assetSelectStore.d.ts +118 -4
  90. package/dist/domains/dam/assetSelect/store/assetSelectStore.js +135 -87
  91. package/dist/domains/dam/assetSelect/store/assetSelectStore.js.map +1 -1
  92. package/dist/domains/dam/author/composables/authorActions.js +3 -1
  93. package/dist/domains/dam/author/composables/authorActions.js.map +1 -1
  94. package/dist/domains/dam/author/composables/cachedAuthors.js +6 -2
  95. package/dist/domains/dam/author/composables/cachedAuthors.js.map +1 -1
  96. package/dist/domains/dam/author/composables/damCredit.d.ts +3 -1
  97. package/dist/domains/dam/author/composables/damCredit.js +13 -12
  98. package/dist/domains/dam/author/composables/damCredit.js.map +1 -1
  99. package/dist/domains/dam/author/composables/damSourceBadge.d.ts +13 -0
  100. package/dist/domains/dam/author/composables/damSourceBadge.js +11 -0
  101. package/dist/domains/dam/author/composables/damSourceBadge.js.map +1 -0
  102. package/dist/domains/dam/author/factory/AuthorFactory.js +2 -0
  103. package/dist/domains/dam/author/factory/AuthorFactory.js.map +1 -1
  104. package/dist/domains/dam/author/types/DamAuthor.d.ts +8 -0
  105. package/dist/domains/dam/composables/commonAdminCoreDamOptions.d.ts +3 -0
  106. package/dist/domains/dam/composables/commonAdminCoreDamOptions.js +4 -1
  107. package/dist/domains/dam/composables/commonAdminCoreDamOptions.js.map +1 -1
  108. package/dist/domains/dam/config/api/damAssetCustomFormApi.js +17 -16
  109. package/dist/domains/dam/config/api/damAssetCustomFormApi.js.map +1 -1
  110. package/dist/domains/dam/cropper/components/DamAssetImageRoiSelect.vue_vue_type_script_setup_true_lang.js +62 -48
  111. package/dist/domains/dam/cropper/components/DamAssetImageRoiSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  112. package/dist/domains/dam/cropper/store/imageRoiStore.d.ts +2 -0
  113. package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue.d.ts +14 -1
  114. package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue_vue_type_script_setup_true_lang.js +7 -1
  115. package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue_vue_type_script_setup_true_lang.js.map +1 -1
  116. package/dist/domains/dam/imageWidget/components/AImagePublicInput.vue.d.ts +6 -1
  117. package/dist/domains/dam/imageWidget/components/AImagePublicInput.vue_vue_type_script_setup_true_lang.js +91 -88
  118. package/dist/domains/dam/imageWidget/components/AImagePublicInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  119. package/dist/domains/dam/imageWidget/components/AImageWidget.vue.d.ts +14 -1
  120. package/dist/domains/dam/imageWidget/components/AImageWidget.vue_vue_type_script_setup_true_lang.js +7 -1
  121. package/dist/domains/dam/imageWidget/components/AImageWidget.vue_vue_type_script_setup_true_lang.js.map +1 -1
  122. package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue.d.ts +14 -0
  123. package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue_vue_type_script_setup_true_lang.js +7 -1
  124. package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue_vue_type_script_setup_true_lang.js.map +1 -1
  125. package/dist/domains/dam/imageWidget/components/AImageWidgetSimple.vue.d.ts +6 -0
  126. package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue.d.ts +7 -0
  127. package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue_vue_type_script_setup_true_lang.js +123 -111
  128. package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
  129. package/dist/domains/dam/imageWidget/components/ImageDetailSingleUseWarning.js +6 -0
  130. package/dist/domains/dam/imageWidget/components/ImageDetailSingleUseWarning.js.map +1 -0
  131. package/dist/domains/dam/imageWidget/components/ImageDetailSingleUseWarning.vue.d.ts +11 -0
  132. package/dist/domains/dam/imageWidget/components/ImageDetailSingleUseWarning.vue_vue_type_script_setup_true_lang.js +59 -0
  133. package/dist/domains/dam/imageWidget/components/ImageDetailSingleUseWarning.vue_vue_type_script_setup_true_lang.js.map +1 -0
  134. package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue.d.ts +18 -1
  135. package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js +338 -337
  136. package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  137. package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue.d.ts +22 -1
  138. package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue_vue_type_script_setup_true_lang.js +366 -363
  139. package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  140. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue.d.ts +18 -0
  141. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js +376 -311
  142. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  143. package/dist/domains/dam/imageWidget/composables/commonAdminImageOptions.d.ts +9 -0
  144. package/dist/domains/dam/imageWidget/composables/commonAdminImageOptions.js +19 -17
  145. package/dist/domains/dam/imageWidget/composables/commonAdminImageOptions.js.map +1 -1
  146. package/dist/domains/dam/imageWidget/composables/imageApiCms.d.ts +36 -1
  147. package/dist/domains/dam/imageWidget/composables/imageApiCms.js +84 -36
  148. package/dist/domains/dam/imageWidget/composables/imageApiCms.js.map +1 -1
  149. package/dist/domains/dam/imageWidget/composables/imageDialogDamAuthors.d.ts +5 -0
  150. package/dist/domains/dam/imageWidget/composables/imageDialogDamAuthors.js +93 -80
  151. package/dist/domains/dam/imageWidget/composables/imageDialogDamAuthors.js.map +1 -1
  152. package/dist/domains/dam/imageWidget/composables/imageSaveErrors.d.ts +8 -0
  153. package/dist/domains/dam/imageWidget/composables/imageSaveErrors.js +22 -0
  154. package/dist/domains/dam/imageWidget/composables/imageSaveErrors.js.map +1 -0
  155. package/dist/domains/dam/imageWidget/composables/imageSingleUseUsageFetch.d.ts +11 -0
  156. package/dist/domains/dam/imageWidget/composables/imageSingleUseUsageFetch.js +15 -0
  157. package/dist/domains/dam/imageWidget/composables/imageSingleUseUsageFetch.js.map +1 -0
  158. package/dist/domains/dam/imageWidget/store/imageMediaWidgetStore.d.ts +8 -0
  159. package/dist/domains/dam/imageWidget/store/imageStore.d.ts +15 -0
  160. package/dist/domains/dam/imageWidget/store/imageStore.js +24 -14
  161. package/dist/domains/dam/imageWidget/store/imageStore.js.map +1 -1
  162. package/dist/domains/dam/imageWidget/utils/damImage.d.ts +10 -1
  163. package/dist/domains/dam/imageWidget/utils/damImage.js +24 -12
  164. package/dist/domains/dam/imageWidget/utils/damImage.js.map +1 -1
  165. package/dist/domains/dam/types/Asset.d.ts +29 -1
  166. package/dist/domains/dam/types/Asset.js +9 -2
  167. package/dist/domains/dam/types/Asset.js.map +1 -1
  168. package/dist/domains/dam/types/AssetFile.d.ts +1 -0
  169. package/dist/domains/dam/types/AssetFile.js.map +1 -1
  170. package/dist/domains/dam/types/AssetLicence.d.ts +6 -1
  171. package/dist/domains/dam/types/AssetSelect.d.ts +9 -4
  172. package/dist/domains/dam/types/AssetSelect.js.map +1 -1
  173. package/dist/domains/dam/types/ImageAware.d.ts +9 -0
  174. package/dist/domains/dam/types/ImageAware.js +7 -0
  175. package/dist/domains/dam/types/ImageAware.js.map +1 -0
  176. package/dist/domains/dam/uploadQueue/components/AssetCustomMetadataFormMassOperations.vue_vue_type_script_setup_true_lang.js +42 -41
  177. package/dist/domains/dam/uploadQueue/components/AssetCustomMetadataFormMassOperations.vue_vue_type_script_setup_true_lang.js.map +1 -1
  178. package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.vue_vue_type_script_setup_true_lang.js +4 -4
  179. package/dist/domains/dam/uploadQueue/components/UploadQueueEditable.vue_vue_type_script_setup_true_lang.js +59 -58
  180. package/dist/domains/dam/uploadQueue/components/UploadQueueEditable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  181. package/dist/domains/dam/uploadQueue/components/UploadQueueItemErrorOverlay.vue_vue_type_script_setup_true_lang.js +8 -8
  182. package/dist/domains/dam/uploadQueue/components/UploadQueueItemErrorOverlay.vue_vue_type_script_setup_true_lang.js.map +1 -1
  183. package/dist/domains/dam/uploadQueue/composables/uploadService.d.ts +6 -0
  184. package/dist/domains/dam/uploadQueue/composables/uploadService.js +69 -55
  185. package/dist/domains/dam/uploadQueue/composables/uploadService.js.map +1 -1
  186. package/dist/domains/dam/uploadQueue/presets/queuePresets.js +21 -17
  187. package/dist/domains/dam/uploadQueue/presets/queuePresets.js.map +1 -1
  188. package/dist/domains/dam/uploadQueue/presets/uploadPresets.d.ts +4 -0
  189. package/dist/domains/dam/uploadQueue/presets/uploadPresets.js +15 -14
  190. package/dist/domains/dam/uploadQueue/presets/uploadPresets.js.map +1 -1
  191. package/dist/domains/dam/user/composables/cachedAssetLicences.d.ts +2 -0
  192. package/dist/domains/dam/user/composables/cachedAssetLicences.js +11 -8
  193. package/dist/domains/dam/user/composables/cachedAssetLicences.js.map +1 -1
  194. package/dist/domains/filters/bookmarks/components/FilterBookmarkDialog.vue_vue_type_script_setup_true_lang.js +190 -184
  195. package/dist/domains/filters/bookmarks/components/FilterBookmarkDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  196. package/dist/domains/filters/components/AFilterTimeInterval.js +1 -1
  197. package/dist/domains/filters/components/AFilterTimeInterval.vue_vue_type_script_setup_true_lang.js +85 -84
  198. package/dist/domains/filters/components/AFilterTimeInterval.vue_vue_type_script_setup_true_lang.js.map +1 -1
  199. package/dist/domains/filters/composables/filterFactory.d.ts +13 -1
  200. package/dist/domains/filters/composables/filterFactory.js +171 -120
  201. package/dist/domains/filters/composables/filterFactory.js.map +1 -1
  202. package/dist/domains/filters/composables/filterTimeIntervalTools.js +6 -6
  203. package/dist/domains/filters/composables/filterTimeIntervalTools.js.map +1 -1
  204. package/dist/domains/filters/datatable/components/ADatatableOrdering.vue_vue_type_script_setup_true_lang.js +1 -1
  205. package/dist/domains/filters/datatable/components/ADatatableOrdering.vue_vue_type_script_setup_true_lang.js.map +1 -1
  206. package/dist/domains/filters/datatable/components/ADatatablePagination.vue_vue_type_script_setup_true_lang.js +49 -49
  207. package/dist/domains/filters/datatable/components/ADatatablePagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  208. package/dist/domains/filters/datatable/components/ALiveListingPill.vue.d.ts +3 -0
  209. package/dist/domains/filters/datatable/components/ALiveListingPill.vue_vue_type_script_setup_true_lang.js +54 -27
  210. package/dist/domains/filters/datatable/components/ALiveListingPill.vue_vue_type_script_setup_true_lang.js.map +1 -1
  211. package/dist/domains/filters/utils/filterInjectionKeys.d.ts +1 -0
  212. package/dist/domains/filters/utils/filterInjectionKeys.js +2 -2
  213. package/dist/domains/filters/utils/filterInjectionKeys.js.map +1 -1
  214. package/dist/domains/job/api/jobApi.js +3 -3
  215. package/dist/domains/job/api/jobApi.js.map +1 -1
  216. package/dist/domains/listEditor/components/ANestedSortableListEditor.vue.d.ts +1 -1
  217. package/dist/domains/listEditor/components/ANestedSortableListEditor.vue_vue_type_script_setup_true_lang.js +385 -351
  218. package/dist/domains/listEditor/components/ANestedSortableListEditor.vue_vue_type_script_setup_true_lang.js.map +1 -1
  219. package/dist/domains/listEditor/components/ASortableListEditor.vue_vue_type_script_setup_true_lang.js +277 -260
  220. package/dist/domains/listEditor/components/ASortableListEditor.vue_vue_type_script_setup_true_lang.js.map +1 -1
  221. package/dist/domains/listEditor/composables/useKeyboardNav.d.ts +4 -0
  222. package/dist/domains/listEditor/composables/useKeyboardNav.js +33 -20
  223. package/dist/domains/listEditor/composables/useKeyboardNav.js.map +1 -1
  224. package/dist/domains/log/components/ALogDatatable.vue.d.ts +1 -0
  225. package/dist/domains/log/components/ALogDatatable.vue_vue_type_script_setup_true_lang.js +70 -66
  226. package/dist/domains/log/components/ALogDatatable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  227. package/dist/domains/log/components/ALogListView.vue_vue_type_script_setup_true_lang.js +1 -1
  228. package/dist/domains/log/components/ALogListView.vue_vue_type_script_setup_true_lang.js.map +1 -1
  229. package/dist/domains/log/filter/logFilter.d.ts +5 -0
  230. package/dist/domains/log/filter/logFilter.js +2 -2
  231. package/dist/domains/log/filter/logFilter.js.map +1 -1
  232. package/dist/domains/remoteAutocomplete/components/AFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +89 -92
  233. package/dist/domains/remoteAutocomplete/components/AFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  234. package/dist/domains/remoteAutocomplete/components/AFilterRemoteAutocompleteWithMinimal.vue_vue_type_script_setup_true_lang.js +123 -119
  235. package/dist/domains/remoteAutocomplete/components/AFilterRemoteAutocompleteWithMinimal.vue_vue_type_script_setup_true_lang.js.map +1 -1
  236. package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +26 -24
  237. package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  238. package/dist/domains/system/appShell/components/ALayoutSwitch.js +1 -0
  239. package/dist/domains/system/appShell/components/ALayoutSwitch.vue.d.ts +3 -0
  240. package/dist/domains/system/appShell/components/ALayoutSwitch.vue_vue_type_script_setup_true_lang.js +38 -16
  241. package/dist/domains/system/appShell/components/ALayoutSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  242. package/dist/domains/system/composables/alerts.js +57 -40
  243. package/dist/domains/system/composables/alerts.js.map +1 -1
  244. package/dist/domains/system/systemBar/components/ASystemBar.vue_vue_type_script_setup_true_lang.js +39 -38
  245. package/dist/domains/system/systemBar/components/ASystemBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  246. package/dist/domains/system/systemBar/components/ASystemBarSessionEnded.js +6 -0
  247. package/dist/domains/system/systemBar/components/ASystemBarSessionEnded.js.map +1 -0
  248. package/dist/domains/system/systemBar/components/ASystemBarSessionEnded.vue.d.ts +3 -0
  249. package/dist/domains/system/systemBar/components/ASystemBarSessionEnded.vue_vue_type_script_setup_true_lang.js +53 -0
  250. package/dist/domains/system/systemBar/components/ASystemBarSessionEnded.vue_vue_type_script_setup_true_lang.js.map +1 -0
  251. package/dist/domains/ui/datetime/components/ADatetimePicker.js +1 -1
  252. package/dist/domains/ui/datetime/components/ADatetimePicker.vue_vue_type_script_setup_true_lang.js +1 -1
  253. package/dist/domains/ui/datetime/components/ADatetimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  254. package/dist/domains/ui/file/composables/formatAndSizeCheck.js +1 -1
  255. package/dist/domains/ui/file/composables/formatAndSizeCheck.js.map +1 -1
  256. package/dist/domains/ui/view/components/ALogoutView.vue_vue_type_script_setup_true_lang.js +9 -8
  257. package/dist/domains/ui/view/components/ALogoutView.vue_vue_type_script_setup_true_lang.js.map +1 -1
  258. package/dist/lib.d.ts +9 -5
  259. package/dist/locales/cs/common/alert.js +8 -0
  260. package/dist/locales/cs/common/alert.js.map +1 -1
  261. package/dist/locales/cs/common/assetSelect.js +361 -0
  262. package/dist/locales/cs/common/assetSelect.js.map +1 -1
  263. package/dist/locales/cs/common/damCustomFormElement.js +258 -0
  264. package/dist/locales/cs/common/damCustomFormElement.js.map +1 -0
  265. package/dist/locales/cs/common/damImage.js +237 -1
  266. package/dist/locales/cs/common/damImage.js.map +1 -1
  267. package/dist/locales/cs/common/filter.js +1 -9
  268. package/dist/locales/cs/common/filter.js.map +1 -1
  269. package/dist/locales/cs/common/system.js +26 -0
  270. package/dist/locales/cs/common/system.js.map +1 -1
  271. package/dist/locales/cs/error/apiForbiddenOperation.js +113 -7
  272. package/dist/locales/cs/error/apiForbiddenOperation.js.map +1 -1
  273. package/dist/locales/cs/error/apiValidation.js +8 -0
  274. package/dist/locales/cs/error/apiValidation.js.map +1 -1
  275. package/dist/locales/cs.d.ts +120 -1
  276. package/dist/locales/cs.js +20 -18
  277. package/dist/locales/cs.js.map +1 -1
  278. package/dist/locales/en/common/alert.js +8 -0
  279. package/dist/locales/en/common/alert.js.map +1 -1
  280. package/dist/locales/en/common/assetSelect.js +361 -0
  281. package/dist/locales/en/common/assetSelect.js.map +1 -1
  282. package/dist/locales/en/common/damCustomFormElement.js +258 -0
  283. package/dist/locales/en/common/damCustomFormElement.js.map +1 -0
  284. package/dist/locales/en/common/damImage.js +237 -1
  285. package/dist/locales/en/common/damImage.js.map +1 -1
  286. package/dist/locales/en/common/filter.js +1 -9
  287. package/dist/locales/en/common/filter.js.map +1 -1
  288. package/dist/locales/en/common/system.js +26 -0
  289. package/dist/locales/en/common/system.js.map +1 -1
  290. package/dist/locales/en/error/apiForbiddenOperation.js +113 -7
  291. package/dist/locales/en/error/apiForbiddenOperation.js.map +1 -1
  292. package/dist/locales/en/error/apiValidation.js +8 -0
  293. package/dist/locales/en/error/apiValidation.js.map +1 -1
  294. package/dist/locales/en.d.ts +120 -1
  295. package/dist/locales/en.js +20 -18
  296. package/dist/locales/en.js.map +1 -1
  297. package/dist/locales/sk/common/alert.js +8 -0
  298. package/dist/locales/sk/common/alert.js.map +1 -1
  299. package/dist/locales/sk/common/assetSelect.js +361 -0
  300. package/dist/locales/sk/common/assetSelect.js.map +1 -1
  301. package/dist/locales/sk/common/damCustomFormElement.js +258 -0
  302. package/dist/locales/sk/common/damCustomFormElement.js.map +1 -0
  303. package/dist/locales/sk/common/damImage.js +237 -1
  304. package/dist/locales/sk/common/damImage.js.map +1 -1
  305. package/dist/locales/sk/common/filter.js +1 -9
  306. package/dist/locales/sk/common/filter.js.map +1 -1
  307. package/dist/locales/sk/common/system.js +26 -0
  308. package/dist/locales/sk/common/system.js.map +1 -1
  309. package/dist/locales/sk/error/apiForbiddenOperation.js +113 -7
  310. package/dist/locales/sk/error/apiForbiddenOperation.js.map +1 -1
  311. package/dist/locales/sk/error/apiValidation.js +8 -0
  312. package/dist/locales/sk/error/apiValidation.js.map +1 -1
  313. package/dist/locales/sk.d.ts +120 -1
  314. package/dist/locales/sk.js +20 -18
  315. package/dist/locales/sk.js.map +1 -1
  316. package/dist/plugins/i18n.d.ts +120 -1
  317. package/dist/shared/utils/datetimePickerValue.js +9 -6
  318. package/dist/shared/utils/datetimePickerValue.js.map +1 -1
  319. package/package.json +2 -2
@@ -0,0 +1,15 @@
1
+ import { coreDamOptions as e, imageOptions as t } from "../../../../plugins/pluginOptions.js";
2
+ import { isUndefined as n } from "../../../../shared/utils/common.js";
3
+ import { fetchSingleUseUsage as r } from "./imageApiCms.js";
4
+ // src/domains/dam/imageWidget/composables/imageSingleUseUsageFetch.ts
5
+ function i(i) {
6
+ let a = e.value?.configs;
7
+ if ((a && Object.hasOwn(a, i) ? a[i] : void 0)?.singleUseUsageEnabled !== !0) return;
8
+ let o = t.value?.configs, s = o && Object.hasOwn(o, i) ? o[i] : void 0;
9
+ if (n(s)) return;
10
+ let c = s.imageApi ? s.imageApi.fetchSingleUseUsage : r;
11
+ if (!n(c)) return (e, t) => c(s.imageClient, e, t);
12
+ }
13
+ export { i as useImageSingleUseUsageFetch };
14
+
15
+ //# sourceMappingURL=imageSingleUseUsageFetch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageSingleUseUsageFetch.js","names":["fetchSingleUseUsageApi","useImageSingleUseUsageFetch","damConfigs","coreDamOptions","configName","configs","imageOptions","config","isUndefined","fetchUsage","fetchSingleUseUsage","groupIds","usageHolder"],"sources":["../../../../../src/domains/dam/imageWidget/composables/imageSingleUseUsageFetch.ts"],"sourcesContent":["import { coreDamOptions, imageOptions } from '@/plugins/pluginOptions'\nimport { isUndefined } from '@/shared/utils/common'\nimport type { DocId } from '@/shared/types/common'\nimport type { AssetSingleUseUsage } from '@/domains/dam/types/Asset'\nimport type { AssetSelectUsageHolder } from '@/domains/dam/types/AssetSelect'\nimport { fetchSingleUseUsage as fetchSingleUseUsageApi } from '@/domains/dam/imageWidget/composables/imageApiCms'\n\n/**\n * How the asset picker of DAM configuration `configName` asks the CMS where single use photos are used: through the\n * image configuration of the same name, its `imageApi.fetchSingleUseUsage`, else core-cms when it has no `imageApi`.\n * `undefined` asks nobody: a DAM configuration without `singleUseUsageEnabled` (all but admin-cms: their backends,\n * daily tools of admin-inhouse too, have no usage check), no image configuration of that name (the DAM admin), or\n * an own `imageApi` without `fetchSingleUseUsage`.\n */\nexport function useImageSingleUseUsageFetch(configName: string) {\n const damConfigs = coreDamOptions.value?.configs\n const damConfig = damConfigs && Object.hasOwn(damConfigs, configName) ? damConfigs[configName] : undefined\n if (damConfig?.singleUseUsageEnabled !== true) return undefined\n const configs = imageOptions.value?.configs\n const config = configs && Object.hasOwn(configs, configName) ? configs[configName] : undefined\n if (isUndefined(config)) return undefined\n const fetchUsage = config.imageApi ? config.imageApi.fetchSingleUseUsage : fetchSingleUseUsageApi\n if (isUndefined(fetchUsage)) return undefined\n\n return (groupIds: DocId[], usageHolder: AssetSelectUsageHolder | null): Promise<Record<DocId, AssetSingleUseUsage>> =>\n fetchUsage(config.imageClient, groupIds, usageHolder)\n}\n"],"mappings":";;;;AAcA,SAAgBC,EAA4B,GAAoB;CAC9D,IAAMC,IAAaC,EAAe,OAAO;CAEzC,KADkBD,KAAc,OAAO,OAAOA,GAAYE,CAAU,IAAIF,EAAWE,KAAc,KAAA,EAAA,EAClF,0BAA0B,IAAM;CAC/C,IAAMC,IAAUC,EAAa,OAAO,SAC9BC,IAASF,KAAW,OAAO,OAAOA,GAASD,CAAU,IAAIC,EAAQD,KAAc,KAAA;CACrF,IAAII,EAAYD,CAAM,GAAG;CACzB,IAAME,IAAaF,EAAO,WAAWA,EAAO,SAAS,sBAAsBP;CAC3E,IAAI,GAAYS,CAAU,GAE1B,QAAQ,GAAmB,MACzBA,EAAWF,EAAO,aAAaI,GAAUC,CAAW;AACxD"}
@@ -6,6 +6,8 @@ export declare const useImageMediaWidgetStore: import('pinia').SetupStoreDefinit
6
6
  setDetail: (data: ImageCreateUpdateAware | MediaAware | null) => void;
7
7
  detail: import('vue').Ref<{
8
8
  id?: import('../../../../lib').IntegerId | undefined;
9
+ ownerResourceName?: string | undefined;
10
+ ownerResourceId?: import('../../../../lib').IntegerId | undefined;
9
11
  texts: {
10
12
  description: string;
11
13
  source: string;
@@ -21,6 +23,8 @@ export declare const useImageMediaWidgetStore: import('pinia').SetupStoreDefinit
21
23
  licenceId: import('../../../../lib').IntegerId;
22
24
  regionPosition: number;
23
25
  internal: boolean;
26
+ uploadLicenceId?: import('../../../../lib').IntegerId | undefined;
27
+ forceTakeOver?: boolean | undefined;
24
28
  };
25
29
  } | {
26
30
  id?: import('../../../../lib').IntegerId | undefined;
@@ -44,6 +48,8 @@ export declare const useImageMediaWidgetStore: import('pinia').SetupStoreDefinit
44
48
  extService: "damVideo" | "damPodcast";
45
49
  } | null, ImageCreateUpdateAware | MediaAware<import('../../types/MediaAware').DamMedia> | {
46
50
  id?: import('../../../../lib').IntegerId | undefined;
51
+ ownerResourceName?: string | undefined;
52
+ ownerResourceId?: import('../../../../lib').IntegerId | undefined;
47
53
  texts: {
48
54
  description: string;
49
55
  source: string;
@@ -59,6 +65,8 @@ export declare const useImageMediaWidgetStore: import('pinia').SetupStoreDefinit
59
65
  licenceId: import('../../../../lib').IntegerId;
60
66
  regionPosition: number;
61
67
  internal: boolean;
68
+ uploadLicenceId?: import('../../../../lib').IntegerId | undefined;
69
+ forceTakeOver?: boolean | undefined;
62
70
  };
63
71
  } | {
64
72
  id?: import('../../../../lib').IntegerId | undefined;
@@ -1,4 +1,11 @@
1
1
  import { ImageStoreItem } from '../../types/ImageAware';
2
+ /**
3
+ * A saved gallery row with the DAM sources and authors of the row it was sent as. The rows are paired by position:
4
+ * a row taken over into the upload licence comes back with another file. Its asset is then another one, unknown here,
5
+ * so the row keeps no asset and does not offer the pick; its credit was written into the saved asset.
6
+ * Only a row that offered the pick keeps offering it.
7
+ */
8
+ export declare const keepSentDamCredit: (saved: ImageStoreItem, sent: ImageStoreItem) => ImageStoreItem;
2
9
  export declare const useImageStore: import('pinia').SetupStoreDefinition<"commonAdminImageStore", {
3
10
  images: import('vue').Ref<{
4
11
  damAuthors: import('../../../../lib').DocId[];
@@ -7,6 +14,8 @@ export declare const useImageStore: import('pinia').SetupStoreDefinition<"common
7
14
  assetId: undefined | import('../../../../lib').DocId;
8
15
  key: string;
9
16
  id?: import('../../../../lib').IntegerId | undefined;
17
+ ownerResourceName?: string | undefined;
18
+ ownerResourceId?: import('../../../../lib').IntegerId | undefined;
10
19
  texts: {
11
20
  description: string;
12
21
  source: string;
@@ -22,6 +31,8 @@ export declare const useImageStore: import('pinia').SetupStoreDefinition<"common
22
31
  licenceId: import('../../../../lib').IntegerId;
23
32
  regionPosition: number;
24
33
  internal: boolean;
34
+ uploadLicenceId?: import('../../../../lib').IntegerId | undefined;
35
+ forceTakeOver?: boolean | undefined;
25
36
  };
26
37
  }[], ImageStoreItem[] | {
27
38
  damAuthors: import('../../../../lib').DocId[];
@@ -30,6 +41,8 @@ export declare const useImageStore: import('pinia').SetupStoreDefinition<"common
30
41
  assetId: undefined | import('../../../../lib').DocId;
31
42
  key: string;
32
43
  id?: import('../../../../lib').IntegerId | undefined;
44
+ ownerResourceName?: string | undefined;
45
+ ownerResourceId?: import('../../../../lib').IntegerId | undefined;
33
46
  texts: {
34
47
  description: string;
35
48
  source: string;
@@ -45,6 +58,8 @@ export declare const useImageStore: import('pinia').SetupStoreDefinition<"common
45
58
  licenceId: import('../../../../lib').IntegerId;
46
59
  regionPosition: number;
47
60
  internal: boolean;
61
+ uploadLicenceId?: import('../../../../lib').IntegerId | undefined;
62
+ forceTakeOver?: boolean | undefined;
48
63
  };
49
64
  }[]>;
50
65
  maxPosition: import('vue').Ref<number, number>;
@@ -1,21 +1,31 @@
1
- import { ref as e } from "vue";
2
- import { defineStore as t } from "pinia";
1
+ import { hasNoDamCredit as e } from "../../author/composables/damCredit.js";
2
+ import { ref as t } from "vue";
3
+ import { defineStore as n } from "pinia";
3
4
  // src/domains/dam/imageWidget/store/imageStore.ts
4
- var n = t("commonAdminImageStore", () => {
5
- let t = e([]), n = e(0), r = e(!1), i = /* @__PURE__ */ new Map();
6
- function a(e) {
7
- let n = new Set(e.map((e) => e.key));
5
+ var r = (t, n) => {
6
+ let r = t.dam.damId !== n.dam.damId;
7
+ return {
8
+ ...t,
9
+ damAuthors: n.damAuthors,
10
+ damSources: n.damSources,
11
+ showDamAuthors: !r && n.showDamAuthors && e(n.damAuthors, n.damSources),
12
+ assetId: r ? void 0 : n.assetId
13
+ };
14
+ }, i = n("commonAdminImageStore", () => {
15
+ let e = t([]), n = t(0), r = t(!1), i = /* @__PURE__ */ new Map();
16
+ function a(t) {
17
+ let n = new Set(t.map((e) => e.key));
8
18
  for (let e of i.keys()) n.has(e) || i.delete(e);
9
- t.value = e;
19
+ e.value = t;
10
20
  }
11
- function o(e) {
12
- t.value.push(...e);
21
+ function o(t) {
22
+ e.value.push(...t);
13
23
  }
14
24
  function s(e) {
15
25
  e > n.value && (n.value = e);
16
26
  }
17
- function c(e) {
18
- let [n] = t.value.splice(e, 1);
27
+ function c(t) {
28
+ let [n] = e.value.splice(t, 1);
19
29
  n && i.delete(n.key);
20
30
  }
21
31
  function l(e) {
@@ -28,10 +38,10 @@ var n = t("commonAdminImageStore", () => {
28
38
  return i.get(e.key) === e.texts.source;
29
39
  }
30
40
  function f() {
31
- t.value = [], n.value = 0, r.value = !1, i.clear();
41
+ e.value = [], n.value = 0, r.value = !1, i.clear();
32
42
  }
33
43
  return {
34
- images: t,
44
+ images: e,
35
45
  maxPosition: n,
36
46
  readonly: r,
37
47
  setImages: a,
@@ -44,6 +54,6 @@ var n = t("commonAdminImageStore", () => {
44
54
  reset: f
45
55
  };
46
56
  });
47
- export { n as useImageStore };
57
+ export { r as keepSentDamCredit, i as useImageStore };
48
58
 
49
59
  //# sourceMappingURL=imageStore.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"imageStore.js","names":["useImageStore","defineStore","images","ref","maxPosition","readonly","sourcesOfPicks","setImages","keys","data","item","key","addImages","updateMaxPositionIfGreater","newPosition","removeImageByIndex","removed","index","noteSourceOfPick","forgetSourceOfPick","hasSourceOfPick","reset"],"sources":["../../../../../src/domains/dam/imageWidget/store/imageStore.ts"],"sourcesContent":["import { defineStore } from 'pinia'\nimport { ref } from 'vue'\nimport type { ImageStoreItem } from '@/domains/dam/types/ImageAware'\n\nexport const useImageStore = defineStore('commonAdminImageStore', () => {\n const images = ref<ImageStoreItem[]>([])\n const maxPosition = ref(0)\n // Set by the widget. A read-only widget saves nothing, so mass operations must not change what it shows.\n const readonly = ref(false)\n // Source written into a row by an author pick, by row key. \"Fill empty\"\n // writes names into the hidden source of rows offering DAM authors.\n // When the asset turns out to have authors, such a source gets their names; a user's own source stays.\n // Any other write to the source removes the mark, even with the same text. Removing a row removes its mark.\n const sourcesOfPicks = new Map<string, string>()\n\n function setImages(data: ImageStoreItem[]) {\n const keys = new Set(data.map((item) => item.key))\n for (const key of sourcesOfPicks.keys()) {\n if (!keys.has(key)) sourcesOfPicks.delete(key)\n }\n images.value = data\n }\n\n function addImages(data: ImageStoreItem[]) {\n images.value.push(...data)\n }\n\n function updateMaxPositionIfGreater(newPosition: number) {\n if (newPosition > maxPosition.value) {\n maxPosition.value = newPosition\n }\n }\n\n function removeImageByIndex(index: number) {\n const [removed] = images.value.splice(index, 1)\n if (removed) sourcesOfPicks.delete(removed.key)\n }\n\n function noteSourceOfPick(item: ImageStoreItem) {\n sourcesOfPicks.set(item.key, item.texts.source)\n }\n\n function forgetSourceOfPick(item: ImageStoreItem) {\n sourcesOfPicks.delete(item.key)\n }\n\n function hasSourceOfPick(item: ImageStoreItem) {\n return sourcesOfPicks.get(item.key) === item.texts.source\n }\n\n function reset() {\n images.value = []\n maxPosition.value = 0\n readonly.value = false\n sourcesOfPicks.clear()\n }\n\n return {\n images,\n maxPosition,\n readonly,\n setImages,\n addImages,\n updateMaxPositionIfGreater,\n removeImageByIndex,\n noteSourceOfPick,\n forgetSourceOfPick,\n hasSourceOfPick,\n reset,\n }\n})\n"],"mappings":";;;AAIA,IAAaA,IAAgBC,EAAY,+BAA+B;CACtE,IAAMC,IAASC,EAAsB,CAAC,CAAC,GACjCC,IAAcD,EAAI,CAAC,GAEnBE,IAAWF,EAAI,EAAK,GAKpBG,oBAAiB,IAAI,IAAoB;CAE/C,SAASC,EAAU,GAAwB;EACzC,IAAMC,IAAO,IAAI,IAAIC,EAAK,KAAK,MAASC,EAAK,GAAG,CAAC;EACjD,KAAK,IAAMC,KAAOL,EAAe,KAAK,GACpC,AAAKE,EAAK,IAAIG,CAAG,KAAGL,EAAe,OAAOK,CAAG;EAE/C,EAAO,QAAQF;CACjB;CAEA,SAASG,EAAU,GAAwB;EACzC,EAAO,MAAM,KAAK,GAAGH,CAAI;CAC3B;CAEA,SAASI,EAA2B,GAAqB;EACvD,AAAIC,IAAcV,EAAY,UAC5B,EAAY,QAAQU;CAExB;CAEA,SAASC,EAAmB,GAAe;EACzC,IAAM,CAACC,KAAWd,EAAO,MAAM,OAAOe,GAAO,CAAC;EAC9C,AAAID,KAASV,EAAe,OAAOU,EAAQ,GAAG;CAChD;CAEA,SAASE,EAAiB,GAAsB;EAC9C,EAAe,IAAIR,EAAK,KAAKA,EAAK,MAAM,MAAM;CAChD;CAEA,SAASS,EAAmB,GAAsB;EAChD,EAAe,OAAOT,EAAK,GAAG;CAChC;CAEA,SAASU,EAAgB,GAAsB;EAC7C,OAAOd,EAAe,IAAII,EAAK,GAAG,MAAMA,EAAK,MAAM;CACrD;CAEA,SAASW,IAAQ;EAIf,AAHA,EAAO,QAAQ,CAAC,GAChB,EAAY,QAAQ,GACpB,EAAS,QAAQ,IACjBf,EAAe,MAAM;CACvB;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"imageStore.js","names":["keepSentDamCredit","takenOver","saved","sent","hasNoDamCredit","useImageStore","defineStore","images","ref","maxPosition","readonly","sourcesOfPicks","setImages","keys","data","item","key","addImages","updateMaxPositionIfGreater","newPosition","removeImageByIndex","removed","index","noteSourceOfPick","forgetSourceOfPick","hasSourceOfPick","reset"],"sources":["../../../../../src/domains/dam/imageWidget/store/imageStore.ts"],"sourcesContent":["import { defineStore } from 'pinia'\nimport { ref } from 'vue'\nimport type { ImageStoreItem } from '@/domains/dam/types/ImageAware'\nimport { hasNoDamCredit } from '@/domains/dam/author/composables/damCredit'\n\n/**\n * A saved gallery row with the DAM sources and authors of the row it was sent as. The rows are paired by position:\n * a row taken over into the upload licence comes back with another file. Its asset is then another one, unknown here,\n * so the row keeps no asset and does not offer the pick; its credit was written into the saved asset.\n * Only a row that offered the pick keeps offering it.\n */\nexport const keepSentDamCredit = (saved: ImageStoreItem, sent: ImageStoreItem): ImageStoreItem => {\n const takenOver = saved.dam.damId !== sent.dam.damId\n return {\n ...saved,\n damAuthors: sent.damAuthors,\n damSources: sent.damSources,\n showDamAuthors: !takenOver && sent.showDamAuthors && hasNoDamCredit(sent.damAuthors, sent.damSources),\n assetId: takenOver ? undefined : sent.assetId,\n }\n}\n\nexport const useImageStore = defineStore('commonAdminImageStore', () => {\n const images = ref<ImageStoreItem[]>([])\n const maxPosition = ref(0)\n // Set by the widget. A read-only widget saves nothing, so mass operations must not change what it shows.\n const readonly = ref(false)\n // Source written into a row by an author pick, by row key. \"Fill empty\"\n // writes names into the hidden source of rows offering DAM authors.\n // When the asset turns out to have authors, such a source gets their names; a user's own source stays.\n // Any other write to the source removes the mark, even with the same text. Removing a row removes its mark.\n const sourcesOfPicks = new Map<string, string>()\n\n function setImages(data: ImageStoreItem[]) {\n const keys = new Set(data.map((item) => item.key))\n for (const key of sourcesOfPicks.keys()) {\n if (!keys.has(key)) sourcesOfPicks.delete(key)\n }\n images.value = data\n }\n\n function addImages(data: ImageStoreItem[]) {\n images.value.push(...data)\n }\n\n function updateMaxPositionIfGreater(newPosition: number) {\n if (newPosition > maxPosition.value) {\n maxPosition.value = newPosition\n }\n }\n\n function removeImageByIndex(index: number) {\n const [removed] = images.value.splice(index, 1)\n if (removed) sourcesOfPicks.delete(removed.key)\n }\n\n function noteSourceOfPick(item: ImageStoreItem) {\n sourcesOfPicks.set(item.key, item.texts.source)\n }\n\n function forgetSourceOfPick(item: ImageStoreItem) {\n sourcesOfPicks.delete(item.key)\n }\n\n function hasSourceOfPick(item: ImageStoreItem) {\n return sourcesOfPicks.get(item.key) === item.texts.source\n }\n\n function reset() {\n images.value = []\n maxPosition.value = 0\n readonly.value = false\n sourcesOfPicks.clear()\n }\n\n return {\n images,\n maxPosition,\n readonly,\n setImages,\n addImages,\n updateMaxPositionIfGreater,\n removeImageByIndex,\n noteSourceOfPick,\n forgetSourceOfPick,\n hasSourceOfPick,\n reset,\n }\n})\n"],"mappings":";;;;AAWA,IAAaA,KAAqB,GAAuB,MAAyC;CAChG,IAAMC,IAAYC,EAAM,IAAI,UAAUC,EAAK,IAAI;CAC/C,OAAO;EACL,GAAGD;EACH,YAAYC,EAAK;EACjB,YAAYA,EAAK;EACjB,gBAAgB,CAACF,KAAaE,EAAK,kBAAkBC,EAAeD,EAAK,YAAYA,EAAK,UAAU;EACpG,SAASF,IAAY,KAAA,IAAYE,EAAK;CACxC;AACF,GAEaE,IAAgBC,EAAY,+BAA+B;CACtE,IAAMC,IAASC,EAAsB,CAAC,CAAC,GACjCC,IAAcD,EAAI,CAAC,GAEnBE,IAAWF,EAAI,EAAK,GAKpBG,oBAAiB,IAAI,IAAoB;CAE/C,SAASC,EAAU,GAAwB;EACzC,IAAMC,IAAO,IAAI,IAAIC,EAAK,KAAK,MAASC,EAAK,GAAG,CAAC;EACjD,KAAK,IAAMC,KAAOL,EAAe,KAAK,GACpC,AAAKE,EAAK,IAAIG,CAAG,KAAGL,EAAe,OAAOK,CAAG;EAE/C,EAAO,QAAQF;CACjB;CAEA,SAASG,EAAU,GAAwB;EACzC,EAAO,MAAM,KAAK,GAAGH,CAAI;CAC3B;CAEA,SAASI,EAA2B,GAAqB;EACvD,AAAIC,IAAcV,EAAY,UAC5B,EAAY,QAAQU;CAExB;CAEA,SAASC,EAAmB,GAAe;EACzC,IAAM,CAACC,KAAWd,EAAO,MAAM,OAAOe,GAAO,CAAC;EAC9C,AAAID,KAASV,EAAe,OAAOU,EAAQ,GAAG;CAChD;CAEA,SAASE,EAAiB,GAAsB;EAC9C,EAAe,IAAIR,EAAK,KAAKA,EAAK,MAAM,MAAM;CAChD;CAEA,SAASS,EAAmB,GAAsB;EAChD,EAAe,OAAOT,EAAK,GAAG;CAChC;CAEA,SAASU,EAAgB,GAAsB;EAC7C,OAAOd,EAAe,IAAII,EAAK,GAAG,MAAMA,EAAK,MAAM;CACrD;CAEA,SAASW,IAAQ;EAIf,AAHA,EAAO,QAAQ,CAAC,GAChB,EAAY,QAAQ,GACpB,EAAS,QAAQ,IACjBf,EAAe,MAAM;CACvB;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ImageCreateUpdateAware } from '../../types/ImageAware';
1
+ import { ImageCreateUpdateAware, ImageOwner } from '../../types/ImageAware';
2
2
  import { DocId, IntegerId } from '../../../../shared/types/common';
3
3
  export interface DamImageFile {
4
4
  fileId: DocId;
@@ -23,3 +23,12 @@ export declare function createDamImage(file: DamImageFile, texts?: {
23
23
  * such as asset, authors and row key are not read by any backend.
24
24
  */
25
25
  export declare function imageFieldsOf(image: ImageCreateUpdateAware): ImageCreateUpdateAware;
26
+ /**
27
+ * What an image save of a widget sends (`imageFieldsOf`), with the record the image belongs to (`owner`, left out when
28
+ * none) and the upload licence core-cms takes a picked photo of another licence over into. The image is not changed.
29
+ */
30
+ export declare function imageSaveFieldsOf(image: ImageCreateUpdateAware, owner: ImageOwner | null | undefined, uploadLicence: IntegerId): ImageCreateUpdateAware;
31
+ /**
32
+ * File id from a DAM image URL, whatever crop it shows; undefined for any other URL.
33
+ */
34
+ export declare function damImageFileIdFromUrl(url: string): DocId | undefined;
@@ -1,6 +1,7 @@
1
- import { isUndefined as e } from "../../../../shared/utils/common.js";
1
+ import { applyImageOwner as e } from "../../types/ImageAware.js";
2
+ import { isUndefined as t } from "../../../../shared/utils/common.js";
2
3
  // src/domains/dam/imageWidget/utils/damImage.ts
3
- function t(t, n = {}, r = {}) {
4
+ function n(e, n = {}, r = {}) {
4
5
  let i = {
5
6
  texts: {
6
7
  description: "",
@@ -13,22 +14,33 @@ function t(t, n = {}, r = {}) {
13
14
  overrideInternal: !1
14
15
  },
15
16
  dam: {
16
- damId: t.fileId,
17
- licenceId: t.licenceId,
17
+ damId: e.fileId,
18
+ licenceId: e.licenceId,
18
19
  regionPosition: 0,
19
- internal: t.internal ?? !1
20
+ internal: e.internal ?? !1
20
21
  }
21
22
  };
22
- return e(r.position) || (i.position = r.position), e(r.id) || (i.id = r.id), i;
23
+ return t(r.position) || (i.position = r.position), t(r.id) || (i.id = r.id), i;
23
24
  }
24
- function n(t) {
25
+ function r(e) {
25
26
  let n = {
26
- texts: t.texts,
27
- flags: t.flags,
28
- dam: t.dam
27
+ texts: e.texts,
28
+ flags: e.flags,
29
+ dam: e.dam
29
30
  };
30
- return e(t.position) || (n.position = t.position), e(t.id) || (n.id = t.id), n;
31
+ return t(e.position) || (n.position = e.position), t(e.id) || (n.id = e.id), n;
31
32
  }
32
- export { t as createDamImage, n as imageFieldsOf };
33
+ function i(t, n, i) {
34
+ let a = r(t);
35
+ return a.dam = {
36
+ ...a.dam,
37
+ uploadLicenceId: i
38
+ }, e(a, n);
39
+ }
40
+ var a = /\/image\/(?:original|animated|w\d+-h\d+(?:-c\d+)?(?:-q\d+)?)\/([0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12})\.(?:jpg|gif)(?:[?#]|$)/i;
41
+ function o(e) {
42
+ return e.match(a)?.[1];
43
+ }
44
+ export { n as createDamImage, o as damImageFileIdFromUrl, r as imageFieldsOf, i as imageSaveFieldsOf };
33
45
 
34
46
  //# sourceMappingURL=damImage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"damImage.js","names":["createDamImage","image","texts","options","file","isUndefined","imageFieldsOf","fields"],"sources":["../../../../../src/domains/dam/imageWidget/utils/damImage.ts"],"sourcesContent":["import type { ImageCreateUpdateAware } from '@/domains/dam/types/ImageAware'\nimport type { DocId, IntegerId } from '@/shared/types/common'\nimport { isUndefined } from '@/shared/utils/common'\n\nexport interface DamImageFile {\n fileId: DocId\n licenceId: IntegerId\n /** `mainFileInternal` of the asset; false if unknown. */\n internal?: boolean | null\n}\n\n/**\n * CMS image for a DAM file. `position` and `id` are set only when given, including 0, to match hand-built objects.\n * Texts are empty when not given, otherwise used as passed, regardless of application mappings.\n */\nexport function createDamImage(\n file: DamImageFile,\n texts: { description?: string; source?: string } = {},\n options: { showSource?: boolean; position?: number; id?: IntegerId } = {}\n): ImageCreateUpdateAware {\n const image: ImageCreateUpdateAware = {\n texts: { description: '', source: '', ...texts },\n flags: { showSource: options.showSource ?? true, internal: false, overrideInternal: false },\n dam: { damId: file.fileId, licenceId: file.licenceId, regionPosition: 0, internal: file.internal ?? false },\n }\n if (!isUndefined(options.position)) image.position = options.position\n if (!isUndefined(options.id)) image.id = options.id\n return image\n}\n\n/**\n * Only the image's own fields for the image API. Widget extras\n * such as asset, authors and row key are not read by any backend.\n */\nexport function imageFieldsOf(image: ImageCreateUpdateAware): ImageCreateUpdateAware {\n const fields: ImageCreateUpdateAware = { texts: image.texts, flags: image.flags, dam: image.dam }\n if (!isUndefined(image.position)) fields.position = image.position\n if (!isUndefined(image.id)) fields.id = image.id\n return fields\n}\n"],"mappings":";;AAeA,SAAgBA,EACd,GACA,IAAmD,CAAC,GACpD,IAAuE,CAAC,GAChD;CACxB,IAAMC,IAAgC;EACpC,OAAO;GAAE,aAAa;GAAI,QAAQ;GAAI,GAAGC;EAAM;EAC/C,OAAO;GAAE,YAAYC,EAAQ,cAAc;GAAM,UAAU;GAAO,kBAAkB;EAAM;EAC1F,KAAK;GAAE,OAAOC,EAAK;GAAQ,WAAWA,EAAK;GAAW,gBAAgB;GAAG,UAAUA,EAAK,YAAY;EAAM;CAC5G;CAGA,OAFKC,EAAYF,EAAQ,QAAQ,MAAG,EAAM,WAAWA,EAAQ,WACxDE,EAAYF,EAAQ,EAAE,MAAG,EAAM,KAAKA,EAAQ,KAC1CF;AACT;AAMA,SAAgBK,EAAc,GAAuD;CACnF,IAAMC,IAAiC;EAAE,OAAON,EAAM;EAAO,OAAOA,EAAM;EAAO,KAAKA,EAAM;CAAI;CAGhG,OAFKI,EAAYJ,EAAM,QAAQ,MAAG,EAAO,WAAWA,EAAM,WACrDI,EAAYJ,EAAM,EAAE,MAAG,EAAO,KAAKA,EAAM,KACvCM;AACT"}
1
+ {"version":3,"file":"damImage.js","names":["createDamImage","image","texts","options","file","isUndefined","imageFieldsOf","fields","imageSaveFieldsOf","uploadLicence","applyImageOwner","owner","DAM_IMAGE_URL_FILE_ID","damImageFileIdFromUrl","url"],"sources":["../../../../../src/domains/dam/imageWidget/utils/damImage.ts"],"sourcesContent":["import { applyImageOwner, type ImageCreateUpdateAware, type ImageOwner } from '@/domains/dam/types/ImageAware'\nimport type { DocId, IntegerId } from '@/shared/types/common'\nimport { isUndefined } from '@/shared/utils/common'\n\nexport interface DamImageFile {\n fileId: DocId\n licenceId: IntegerId\n /** `mainFileInternal` of the asset; false if unknown. */\n internal?: boolean | null\n}\n\n/**\n * CMS image for a DAM file. `position` and `id` are set only when given, including 0, to match hand-built objects.\n * Texts are empty when not given, otherwise used as passed, regardless of application mappings.\n */\nexport function createDamImage(\n file: DamImageFile,\n texts: { description?: string; source?: string } = {},\n options: { showSource?: boolean; position?: number; id?: IntegerId } = {}\n): ImageCreateUpdateAware {\n const image: ImageCreateUpdateAware = {\n texts: { description: '', source: '', ...texts },\n flags: { showSource: options.showSource ?? true, internal: false, overrideInternal: false },\n dam: { damId: file.fileId, licenceId: file.licenceId, regionPosition: 0, internal: file.internal ?? false },\n }\n if (!isUndefined(options.position)) image.position = options.position\n if (!isUndefined(options.id)) image.id = options.id\n return image\n}\n\n/**\n * Only the image's own fields for the image API. Widget extras\n * such as asset, authors and row key are not read by any backend.\n */\nexport function imageFieldsOf(image: ImageCreateUpdateAware): ImageCreateUpdateAware {\n const fields: ImageCreateUpdateAware = { texts: image.texts, flags: image.flags, dam: image.dam }\n if (!isUndefined(image.position)) fields.position = image.position\n if (!isUndefined(image.id)) fields.id = image.id\n return fields\n}\n\n/**\n * What an image save of a widget sends (`imageFieldsOf`), with the record the image belongs to (`owner`, left out when\n * none) and the upload licence core-cms takes a picked photo of another licence over into. The image is not changed.\n */\nexport function imageSaveFieldsOf(\n image: ImageCreateUpdateAware,\n owner: ImageOwner | null | undefined,\n uploadLicence: IntegerId\n): ImageCreateUpdateAware {\n const fields = imageFieldsOf(image)\n fields.dam = { ...fields.dam, uploadLicenceId: uploadLicence }\n return applyImageOwner(fields, owner)\n}\n\n// Every path the DAM serves an image file on: the original, any crop (`w800-h450`, `-c1`, `-q80`) and an animation.\nconst DAM_IMAGE_URL_FILE_ID =\n /\\/image\\/(?:original|animated|w\\d+-h\\d+(?:-c\\d+)?(?:-q\\d+)?)\\/([0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12})\\.(?:jpg|gif)(?:[?#]|$)/i\n\n/**\n * File id from a DAM image URL, whatever crop it shows; undefined for any other URL.\n */\nexport function damImageFileIdFromUrl(url: string): DocId | undefined {\n return url.match(DAM_IMAGE_URL_FILE_ID)?.[1]\n}\n"],"mappings":";;;AAeA,SAAgBA,EACd,GACA,IAAmD,CAAC,GACpD,IAAuE,CAAC,GAChD;CACxB,IAAMC,IAAgC;EACpC,OAAO;GAAE,aAAa;GAAI,QAAQ;GAAI,GAAGC;EAAM;EAC/C,OAAO;GAAE,YAAYC,EAAQ,cAAc;GAAM,UAAU;GAAO,kBAAkB;EAAM;EAC1F,KAAK;GAAE,OAAOC,EAAK;GAAQ,WAAWA,EAAK;GAAW,gBAAgB;GAAG,UAAUA,EAAK,YAAY;EAAM;CAC5G;CAGA,OAFKC,EAAYF,EAAQ,QAAQ,MAAG,EAAM,WAAWA,EAAQ,WACxDE,EAAYF,EAAQ,EAAE,MAAG,EAAM,KAAKA,EAAQ,KAC1CF;AACT;AAMA,SAAgBK,EAAc,GAAuD;CACnF,IAAMC,IAAiC;EAAE,OAAON,EAAM;EAAO,OAAOA,EAAM;EAAO,KAAKA,EAAM;CAAI;CAGhG,OAFKI,EAAYJ,EAAM,QAAQ,MAAG,EAAO,WAAWA,EAAM,WACrDI,EAAYJ,EAAM,EAAE,MAAG,EAAO,KAAKA,EAAM,KACvCM;AACT;AAMA,SAAgBC,EACd,GACA,GACA,GACwB;CACxB,IAAMD,IAASD,EAAcL,CAAK;CAElC,OADA,EAAO,MAAM;EAAE,GAAGM,EAAO;EAAK,iBAAiBE;CAAc,GACtDC,EAAgBH,GAAQI,CAAK;AACtC;AAGA,IAAMC,IACJ;AAKF,SAAgBC,EAAsB,GAAgC;CACpE,OAAOC,EAAI,MAAMF,CAAqB,CAAC,GAAG;AAC5C"}
@@ -1,4 +1,4 @@
1
- import { DatetimeUTCNullable, DocId, DocIdNullable, IntegerId } from '../../../shared/types/common';
1
+ import { DatetimeUTC, DatetimeUTCNullable, DocId, DocIdNullable, IntegerId } from '../../../shared/types/common';
2
2
  import { AnzuUserAndTimeTrackingAware } from '../../../shared/types/AnzuUserAndTimeTrackingAware';
3
3
  import { ResourceNameSystemAware } from '../../../shared/types/ResourceNameSystemAware';
4
4
  import { AssetFile } from './AssetFile';
@@ -46,12 +46,39 @@ interface Metadata {
46
46
  keywordSuggestions: AssetMetadataSuggestions;
47
47
  customData: any;
48
48
  }
49
+ /**
50
+ * Where a photo stands for the record picking it, as core-cms answers it (`/adm/v1/image/single-use-usage`).
51
+ * `notAllowed`: the record may not use a single use photo. `placement`: the record only places it, holding nothing.
52
+ * `free`: nobody uses it. `own`: only this record. `ownShared`: this record and others. `conflict`: another record.
53
+ */
54
+ export declare const AssetSingleUseUsageStatus: {
55
+ readonly NotAllowed: "notAllowed";
56
+ readonly Placement: "placement";
57
+ readonly Free: "free";
58
+ readonly Own: "own";
59
+ readonly OwnShared: "ownShared";
60
+ readonly Conflict: "conflict";
61
+ };
62
+ export type AssetSingleUseUsageStatusType = (typeof AssetSingleUseUsageStatus)[keyof typeof AssetSingleUseUsageStatus];
63
+ export interface AssetSingleUseUsageEntry {
64
+ resourceName: string;
65
+ resourceId: IntegerId;
66
+ pickedAt: DatetimeUTC;
67
+ }
68
+ export interface AssetSingleUseUsage {
69
+ holder: AssetSingleUseUsageEntry | null;
70
+ status: AssetSingleUseUsageStatusType;
71
+ blocked: boolean;
72
+ usageCount: number;
73
+ usages: AssetSingleUseUsageEntry[];
74
+ }
49
75
  export interface AssetSearchListItemDto extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware {
50
76
  id: DocId;
51
77
  texts: Texts;
52
78
  attributes: Attributes;
53
79
  flags: Flags;
54
80
  licence: IntegerId;
81
+ sources: DocId[];
55
82
  mainFile: null | AssetFile;
56
83
  podcasts: DocId[];
57
84
  assetFileProperties: AssetFileProperties;
@@ -59,6 +86,7 @@ export interface AssetSearchListItemDto extends AnzuUserAndTimeTrackingAware, Re
59
86
  mainFileInternal: Readonly<boolean | null>;
60
87
  mainFileOverrideInternal: Readonly<boolean | null>;
61
88
  autoDeleteAt: Readonly<DatetimeUTCNullable>;
89
+ singleUseUsage?: Readonly<AssetSingleUseUsage | null>;
62
90
  }
63
91
  export interface AssetDetailItemDto extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware {
64
92
  id: DocId;
@@ -8,7 +8,14 @@ var e = {
8
8
  Audio: "audio",
9
9
  Video: "video",
10
10
  Document: "document"
11
- }, r = n.Image;
12
- export { e as DamAssetStatus, t as DamAssetStatusDefault, n as DamAssetType, r as DamAssetTypeDefault };
11
+ }, r = n.Image, i = {
12
+ NotAllowed: "notAllowed",
13
+ Placement: "placement",
14
+ Free: "free",
15
+ Own: "own",
16
+ OwnShared: "ownShared",
17
+ Conflict: "conflict"
18
+ };
19
+ export { i as AssetSingleUseUsageStatus, e as DamAssetStatus, t as DamAssetStatusDefault, n as DamAssetType, r as DamAssetTypeDefault };
13
20
 
14
21
  //# sourceMappingURL=Asset.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Asset.js","names":["DamAssetStatus","DamAssetStatusDefault","DamAssetType","DamAssetTypeDefault"],"sources":["../../../../src/domains/dam/types/Asset.ts"],"sourcesContent":["import type { DatetimeUTCNullable, DocId, DocIdNullable, IntegerId } from '@/shared/types/common'\nimport type { AnzuUserAndTimeTrackingAware } from '@/shared/types/AnzuUserAndTimeTrackingAware'\nimport type { ResourceNameSystemAware } from '@/shared/types/ResourceNameSystemAware'\nimport type { AssetFile } from '@/domains/dam/types/AssetFile'\n\ninterface Texts {\n displayTitle: string\n}\n\nexport type DamDistributionServiceName = string\n\nexport const DamAssetStatus = {\n Draft: 'draft',\n WithFile: 'with_file',\n Deleting: 'deleting',\n} as const\nexport type DamAssetStatusType = (typeof DamAssetStatus)[keyof typeof DamAssetStatus]\nexport const DamAssetStatusDefault = DamAssetStatus.Draft\n\nexport const DamAssetType = {\n Image: 'image',\n Audio: 'audio',\n Video: 'video',\n Document: 'document',\n} as const\nexport type DamAssetTypeType = (typeof DamAssetType)[keyof typeof DamAssetType]\nexport const DamAssetTypeDefault = DamAssetType.Image\n\ninterface Attributes {\n assetType: DamAssetTypeType\n assetStatus: DamAssetStatusType\n}\n\nexport interface AssetFileProperties {\n distributesInServices: DamDistributionServiceName[]\n slotNames: string[]\n fromRss: boolean\n width: number\n height: number\n /** A synthesized (TTS) audio. Not every backend sends it. */\n ttsAudio?: boolean\n}\n\ninterface Flags {\n described: boolean\n visible: boolean\n}\n\nexport interface AssetMetadataSuggestions extends Record<string, Array<string>> {}\n\nexport type AssetCustomData = Record<string, any>\n\ninterface Metadata {\n authorSuggestions: AssetMetadataSuggestions\n keywordSuggestions: AssetMetadataSuggestions\n customData: any\n}\n\nexport interface AssetSearchListItemDto extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware {\n id: DocId\n texts: Texts\n attributes: Attributes\n flags: Flags\n licence: IntegerId\n mainFile: null | AssetFile\n podcasts: DocId[]\n assetFileProperties: AssetFileProperties\n mainFileSingleUse: Readonly<boolean | null>\n mainFileInternal: Readonly<boolean | null>\n mainFileOverrideInternal: Readonly<boolean | null>\n autoDeleteAt: Readonly<DatetimeUTCNullable>\n}\n\nexport interface AssetDetailItemDto extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware {\n id: DocId\n texts: Texts\n attributes: Attributes\n flags: Flags\n licence: IntegerId\n mainFile: null | AssetFile\n keywords: DocId[]\n authors: DocId[]\n sources: DocId[]\n podcasts: DocId[]\n metadata: Metadata\n siblingToAsset: DocIdNullable\n distributionCategory: DocIdNullable\n assetFileProperties: AssetFileProperties\n mainFileSingleUse: Readonly<boolean | null>\n mainFileInternal: Readonly<boolean | null>\n mainFileOverrideInternal: Readonly<boolean | null>\n autoDeleteAt: Readonly<DatetimeUTCNullable>\n}\n\nexport interface AssetMetadataDto extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware, Metadata {\n id: DocId\n customData: AssetCustomData\n}\n\nexport type AssetExternalProviderId = string | number\nexport type AssetExternalProviderIdNullable = AssetExternalProviderId | null\n\nexport type AssetExternalProviderMetadata = Record<string, string | number | number[] | string[] | boolean>\n\nexport interface DamImageCopyToLicenceRequestItem {\n asset: DocId\n targetAssetLicence: IntegerId\n}\n\nexport type DamImageCopyToLicenceRequest = Array<DamImageCopyToLicenceRequestItem>\n\nexport interface DamImageCopyToLicenceResponseItem {\n asset: DocId\n targetAsset: DocId\n targetMainFile: DocId\n targetAssetLicence: IntegerId\n result: 'exists' | 'copy' | 'notAllowed' | 'unassigned'\n assetConflicts: DocId[]\n}\n\nexport type DamImageCopyToLicenceResponse = Array<DamImageCopyToLicenceResponseItem>\n"],"mappings":";AAWA,IAAaA,IAAiB;CAC5B,OAAO;CACP,UAAU;CACV,UAAU;AACZ,GAEaC,IAAwBD,EAAe,OAEvCE,IAAe;CAC1B,OAAO;CACP,OAAO;CACP,OAAO;CACP,UAAU;AACZ,GAEaC,IAAsBD,EAAa"}
1
+ {"version":3,"file":"Asset.js","names":["DamAssetStatus","DamAssetStatusDefault","DamAssetType","DamAssetTypeDefault","AssetSingleUseUsageStatus"],"sources":["../../../../src/domains/dam/types/Asset.ts"],"sourcesContent":["import type { DatetimeUTC, DatetimeUTCNullable, DocId, DocIdNullable, IntegerId } from '@/shared/types/common'\nimport type { AnzuUserAndTimeTrackingAware } from '@/shared/types/AnzuUserAndTimeTrackingAware'\nimport type { ResourceNameSystemAware } from '@/shared/types/ResourceNameSystemAware'\nimport type { AssetFile } from '@/domains/dam/types/AssetFile'\n\ninterface Texts {\n displayTitle: string\n}\n\nexport type DamDistributionServiceName = string\n\nexport const DamAssetStatus = {\n Draft: 'draft',\n WithFile: 'with_file',\n Deleting: 'deleting',\n} as const\nexport type DamAssetStatusType = (typeof DamAssetStatus)[keyof typeof DamAssetStatus]\nexport const DamAssetStatusDefault = DamAssetStatus.Draft\n\nexport const DamAssetType = {\n Image: 'image',\n Audio: 'audio',\n Video: 'video',\n Document: 'document',\n} as const\nexport type DamAssetTypeType = (typeof DamAssetType)[keyof typeof DamAssetType]\nexport const DamAssetTypeDefault = DamAssetType.Image\n\ninterface Attributes {\n assetType: DamAssetTypeType\n assetStatus: DamAssetStatusType\n}\n\nexport interface AssetFileProperties {\n distributesInServices: DamDistributionServiceName[]\n slotNames: string[]\n fromRss: boolean\n width: number\n height: number\n /** A synthesized (TTS) audio. Not every backend sends it. */\n ttsAudio?: boolean\n}\n\ninterface Flags {\n described: boolean\n visible: boolean\n}\n\nexport interface AssetMetadataSuggestions extends Record<string, Array<string>> {}\n\nexport type AssetCustomData = Record<string, any>\n\ninterface Metadata {\n authorSuggestions: AssetMetadataSuggestions\n keywordSuggestions: AssetMetadataSuggestions\n customData: any\n}\n\n/**\n * Where a photo stands for the record picking it, as core-cms answers it (`/adm/v1/image/single-use-usage`).\n * `notAllowed`: the record may not use a single use photo. `placement`: the record only places it, holding nothing.\n * `free`: nobody uses it. `own`: only this record. `ownShared`: this record and others. `conflict`: another record.\n */\nexport const AssetSingleUseUsageStatus = {\n NotAllowed: 'notAllowed',\n Placement: 'placement',\n Free: 'free',\n Own: 'own',\n OwnShared: 'ownShared',\n Conflict: 'conflict',\n} as const\nexport type AssetSingleUseUsageStatusType = (typeof AssetSingleUseUsageStatus)[keyof typeof AssetSingleUseUsageStatus]\n\nexport interface AssetSingleUseUsageEntry {\n resourceName: string\n resourceId: IntegerId\n pickedAt: DatetimeUTC\n}\n\nexport interface AssetSingleUseUsage {\n holder: AssetSingleUseUsageEntry | null\n status: AssetSingleUseUsageStatusType\n blocked: boolean\n usageCount: number\n usages: AssetSingleUseUsageEntry[]\n}\n\nexport interface AssetSearchListItemDto extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware {\n id: DocId\n texts: Texts\n attributes: Attributes\n flags: Flags\n licence: IntegerId\n sources: DocId[]\n mainFile: null | AssetFile\n podcasts: DocId[]\n assetFileProperties: AssetFileProperties\n mainFileSingleUse: Readonly<boolean | null>\n mainFileInternal: Readonly<boolean | null>\n mainFileOverrideInternal: Readonly<boolean | null>\n autoDeleteAt: Readonly<DatetimeUTCNullable>\n // Filled by the asset picker from the CMS (`imageApi.fetchSingleUseUsage`): for a single use image with the list,\n // for any other image when its usage tab opens.\n singleUseUsage?: Readonly<AssetSingleUseUsage | null>\n}\n\nexport interface AssetDetailItemDto extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware {\n id: DocId\n texts: Texts\n attributes: Attributes\n flags: Flags\n licence: IntegerId\n mainFile: null | AssetFile\n keywords: DocId[]\n authors: DocId[]\n sources: DocId[]\n podcasts: DocId[]\n metadata: Metadata\n siblingToAsset: DocIdNullable\n distributionCategory: DocIdNullable\n assetFileProperties: AssetFileProperties\n mainFileSingleUse: Readonly<boolean | null>\n mainFileInternal: Readonly<boolean | null>\n mainFileOverrideInternal: Readonly<boolean | null>\n autoDeleteAt: Readonly<DatetimeUTCNullable>\n}\n\nexport interface AssetMetadataDto extends AnzuUserAndTimeTrackingAware, ResourceNameSystemAware, Metadata {\n id: DocId\n customData: AssetCustomData\n}\n\nexport type AssetExternalProviderId = string | number\nexport type AssetExternalProviderIdNullable = AssetExternalProviderId | null\n\nexport type AssetExternalProviderMetadata = Record<string, string | number | number[] | string[] | boolean>\n\nexport interface DamImageCopyToLicenceRequestItem {\n asset: DocId\n targetAssetLicence: IntegerId\n}\n\nexport type DamImageCopyToLicenceRequest = Array<DamImageCopyToLicenceRequestItem>\n\nexport interface DamImageCopyToLicenceResponseItem {\n asset: DocId\n targetAsset: DocId\n targetMainFile: DocId\n targetAssetLicence: IntegerId\n result: 'exists' | 'copy' | 'notAllowed' | 'unassigned'\n assetConflicts: DocId[]\n}\n\nexport type DamImageCopyToLicenceResponse = Array<DamImageCopyToLicenceResponseItem>\n"],"mappings":";AAWA,IAAaA,IAAiB;CAC5B,OAAO;CACP,UAAU;CACV,UAAU;AACZ,GAEaC,IAAwBD,EAAe,OAEvCE,IAAe;CAC1B,OAAO;CACP,OAAO;CACP,OAAO;CACP,UAAU;AACZ,GAEaC,IAAsBD,EAAa,OAqCnCE,IAA4B;CACvC,YAAY;CACZ,WAAW;CACX,MAAM;CACN,KAAK;CACL,WAAW;CACX,UAAU;AACZ"}
@@ -31,6 +31,7 @@ interface FileAttributes {
31
31
  originFileName: string;
32
32
  originUrl: string;
33
33
  failReason: AssetFileFailReasonType;
34
+ takenOverFromId: DocId;
34
35
  }
35
36
  export declare const AssetFileLinkType: {
36
37
  readonly Image: "image";
@@ -1 +1 @@
1
- {"version":3,"file":"AssetFile.js","names":["AssetFileProcessStatus","AssetFileFailReason","AssetFileFailReasonDefault","AssetFileRouteStatus","AssetFileLinkType","assetFileIsImageFile","value","assetFileIsVideoFile","assetFileIsAudioFile"],"sources":["../../../../src/domains/dam/types/AssetFile.ts"],"sourcesContent":["import type { DatetimeUTC, DocId, DocIdNullable } from '@/shared/types/common'\nimport type { AnzuUserAndTimeTrackingAware } from '@/shared/types/AnzuUserAndTimeTrackingAware'\n\nexport const AssetFileProcessStatus = {\n Uploading: 'uploading', // file entity created and ready to receive chunks\n Uploaded: 'uploaded', // all chunks were sent\n Stored: 'stored', // File is stored and ready to processing\n Duplicate: 'duplicate', // AssetFile is duplicate of another asset\n Processed: 'processed', // file processed and ready to serve\n Failed: 'failed',\n} as const\nexport type AssetFileProcessStatusType = (typeof AssetFileProcessStatus)[keyof typeof AssetFileProcessStatus]\n\nexport const AssetFileFailReason = {\n None: 'none',\n Unknown: 'unknown',\n InvalidChecksum: 'invalid_checksum',\n InvalidMimeType: 'invalid_mime_type',\n DownloadFailed: 'download_failed',\n InvalidSize: 'invalid_size',\n} as const\nexport type AssetFileFailReasonType = (typeof AssetFileFailReason)[keyof typeof AssetFileFailReason]\nexport const AssetFileFailReasonDefault = AssetFileFailReason.None\n\nexport const AssetFileRouteStatus = {\n Disabled: 'disabled',\n Active: 'active',\n} as const\nexport type AssetFileRouteStatusType = (typeof AssetFileRouteStatus)[keyof typeof AssetFileRouteStatus]\n\ninterface FileAttributes {\n status: AssetFileProcessStatusType\n mimeType: string\n size: number\n originFileName: string\n originUrl: string\n failReason: AssetFileFailReasonType\n}\n\nexport const AssetFileLinkType = {\n Image: 'image',\n Audio: 'audio',\n} as const\nexport type AssetFileLinkTypeType = (typeof AssetFileLinkType)[keyof typeof AssetFileLinkType]\n\nexport interface AssetFileLink {\n width: number\n height: number\n requestedWidth: number\n requestedHeight: number\n url: string\n title: string\n type: AssetFileLinkTypeType\n}\n\nexport interface AssetFileRoute {\n id: DocId\n status: AssetFileRouteStatusType\n main: boolean\n publicUrl: string\n _resourceName: 'assetFileRoute'\n}\n\nexport interface AssetFileMainRouteAware {\n mainRoute?: AssetFileRoute\n}\n\nexport type AssetFileLinks =\n | Record<'image_list' | 'image_table' | 'image_detail' | 'image_animated' | 'audio', AssetFileLink>\n | Record<string, never>\n\nexport interface AssetFileAware {\n flags: {\n public: boolean\n singleUse: boolean\n overrideInternal: boolean\n internal: boolean\n }\n}\n\nexport interface AssetFileImage extends AssetFileAware, AnzuUserAndTimeTrackingAware, AssetFileMainRouteAware {\n id: DocId\n asset: DocId\n fileAttributes: FileAttributes\n imageAttributes: ImageAttributes\n originAssetFile: DocIdNullable\n links?: AssetFileLinks\n metadata: Metadata\n manipulatedAt: DatetimeUTC\n _resourceName: 'imageFile'\n}\n\nexport interface AssetFileAudio extends AssetFileAware, AnzuUserAndTimeTrackingAware, AssetFileMainRouteAware {\n id: DocId\n asset: DocId\n fileAttributes: FileAttributes\n audioAttributes: AudioAttributes\n originAssetFile: DocIdNullable\n links?: AssetFileLinks\n imagePreview: AssetFileImagePreviewNullable\n _resourceName: 'audioFile'\n}\n\nexport interface AssetFileVideo extends AssetFileAware, AnzuUserAndTimeTrackingAware {\n id: DocId\n asset: DocId\n fileAttributes: FileAttributes\n videoAttributes: VideoAttributes\n originAssetFile: DocIdNullable\n links?: AssetFileLinks\n imagePreview: AssetFileImagePreviewNullable\n _resourceName: 'videoFile'\n}\n\nexport interface AssetFileDocument extends AssetFileAware, AnzuUserAndTimeTrackingAware, AssetFileMainRouteAware {\n id: DocId\n asset: DocId\n fileAttributes: FileAttributes\n documentAttributes: DocumentAttributes\n originAssetFile: DocIdNullable\n links?: AssetFileLinks\n _resourceName: 'documentFile'\n}\n\nexport interface AssetFileDownloadLink extends AnzuUserAndTimeTrackingAware {\n id: DocId\n link: string\n _system: string\n _resourceName: 'imageFile'\n}\n\nexport type AssetFile = AssetFileImage | AssetFileAudio | AssetFileVideo | AssetFileDocument\n\nexport type AssetFileNullable = AssetFileImage | AssetFileAudio | AssetFileVideo | AssetFileDocument | null\n\nexport const assetFileIsImageFile = (value: any): value is AssetFileImage => {\n if (!value || !value._resourceName) return false\n return value._resourceName === 'imageFile'\n}\n\nexport const assetFileIsVideoFile = (value: any): value is AssetFileVideo => {\n if (!value || !value._resourceName) return false\n return value._resourceName === 'videoFile'\n}\n\nexport const assetFileIsAudioFile = (value: any): value is AssetFileAudio => {\n if (!value || !value._resourceName) return false\n return value._resourceName === 'audioFile'\n}\n\ninterface ImageAttributes {\n ratioWidth: number\n ratioHeight: number\n width: number\n height: number\n rotation: number\n mostDominantColor: string\n animated: boolean\n}\n\ninterface Metadata {\n exifData: Record<string, string | number | boolean | null>\n id: string\n createdAt: string\n modifiedAt: string\n createdBy: number\n modifiedBy: number\n}\n\ninterface AudioAttributes {\n duration: number\n codecName: string\n bitrate: number\n}\n\ninterface DocumentAttributes {\n pageCount: number\n}\n\ninterface VideoAttributes {\n bitrate: number\n codecName: string\n duration: number\n height: number\n ratioHeight: number\n ratioWidth: number\n rotation: number\n width: number\n}\n\nexport interface AssetFileImagePreview {\n imageFile: DocId\n position: number\n}\n\nexport type AssetFileImagePreviewNullable = AssetFileImagePreview | null\n"],"mappings":";AAGA,IAAaA,IAAyB;CACpC,WAAW;CACX,UAAU;CACV,QAAQ;CACR,WAAW;CACX,WAAW;CACX,QAAQ;AACV,GAGaC,IAAsB;CACjC,MAAM;CACN,SAAS;CACT,iBAAiB;CACjB,iBAAiB;CACjB,gBAAgB;CAChB,aAAa;AACf,GAEaC,IAA6BD,EAAoB,MAEjDE,IAAuB;CAClC,UAAU;CACV,QAAQ;AACV,GAYaC,IAAoB;CAC/B,OAAO;CACP,OAAO;AACT,GA6FaC,KAAwB,MAC/B,CAACC,KAAS,CAACA,EAAM,gBAAsB,KACpCA,EAAM,kBAAkB,aAGpBC,KAAwB,MAC/B,CAACD,KAAS,CAACA,EAAM,gBAAsB,KACpCA,EAAM,kBAAkB,aAGpBE,KAAwB,MAC/B,CAACF,KAAS,CAACA,EAAM,gBAAsB,KACpCA,EAAM,kBAAkB"}
1
+ {"version":3,"file":"AssetFile.js","names":["AssetFileProcessStatus","AssetFileFailReason","AssetFileFailReasonDefault","AssetFileRouteStatus","AssetFileLinkType","assetFileIsImageFile","value","assetFileIsVideoFile","assetFileIsAudioFile"],"sources":["../../../../src/domains/dam/types/AssetFile.ts"],"sourcesContent":["import type { DatetimeUTC, DocId, DocIdNullable } from '@/shared/types/common'\nimport type { AnzuUserAndTimeTrackingAware } from '@/shared/types/AnzuUserAndTimeTrackingAware'\n\nexport const AssetFileProcessStatus = {\n Uploading: 'uploading', // file entity created and ready to receive chunks\n Uploaded: 'uploaded', // all chunks were sent\n Stored: 'stored', // File is stored and ready to processing\n Duplicate: 'duplicate', // AssetFile is duplicate of another asset\n Processed: 'processed', // file processed and ready to serve\n Failed: 'failed',\n} as const\nexport type AssetFileProcessStatusType = (typeof AssetFileProcessStatus)[keyof typeof AssetFileProcessStatus]\n\nexport const AssetFileFailReason = {\n None: 'none',\n Unknown: 'unknown',\n InvalidChecksum: 'invalid_checksum',\n InvalidMimeType: 'invalid_mime_type',\n DownloadFailed: 'download_failed',\n InvalidSize: 'invalid_size',\n} as const\nexport type AssetFileFailReasonType = (typeof AssetFileFailReason)[keyof typeof AssetFileFailReason]\nexport const AssetFileFailReasonDefault = AssetFileFailReason.None\n\nexport const AssetFileRouteStatus = {\n Disabled: 'disabled',\n Active: 'active',\n} as const\nexport type AssetFileRouteStatusType = (typeof AssetFileRouteStatus)[keyof typeof AssetFileRouteStatus]\n\ninterface FileAttributes {\n status: AssetFileProcessStatusType\n mimeType: string\n size: number\n originFileName: string\n originUrl: string\n failReason: AssetFileFailReasonType\n // Empty string = not a take-over copy; otherwise the id of the root file of the group.\n takenOverFromId: DocId\n}\n\nexport const AssetFileLinkType = {\n Image: 'image',\n Audio: 'audio',\n} as const\nexport type AssetFileLinkTypeType = (typeof AssetFileLinkType)[keyof typeof AssetFileLinkType]\n\nexport interface AssetFileLink {\n width: number\n height: number\n requestedWidth: number\n requestedHeight: number\n url: string\n title: string\n type: AssetFileLinkTypeType\n}\n\nexport interface AssetFileRoute {\n id: DocId\n status: AssetFileRouteStatusType\n main: boolean\n publicUrl: string\n _resourceName: 'assetFileRoute'\n}\n\nexport interface AssetFileMainRouteAware {\n mainRoute?: AssetFileRoute\n}\n\nexport type AssetFileLinks =\n | Record<'image_list' | 'image_table' | 'image_detail' | 'image_animated' | 'audio', AssetFileLink>\n | Record<string, never>\n\nexport interface AssetFileAware {\n flags: {\n public: boolean\n singleUse: boolean\n overrideInternal: boolean\n internal: boolean\n }\n}\n\nexport interface AssetFileImage extends AssetFileAware, AnzuUserAndTimeTrackingAware, AssetFileMainRouteAware {\n id: DocId\n asset: DocId\n fileAttributes: FileAttributes\n imageAttributes: ImageAttributes\n originAssetFile: DocIdNullable\n links?: AssetFileLinks\n metadata: Metadata\n manipulatedAt: DatetimeUTC\n _resourceName: 'imageFile'\n}\n\nexport interface AssetFileAudio extends AssetFileAware, AnzuUserAndTimeTrackingAware, AssetFileMainRouteAware {\n id: DocId\n asset: DocId\n fileAttributes: FileAttributes\n audioAttributes: AudioAttributes\n originAssetFile: DocIdNullable\n links?: AssetFileLinks\n imagePreview: AssetFileImagePreviewNullable\n _resourceName: 'audioFile'\n}\n\nexport interface AssetFileVideo extends AssetFileAware, AnzuUserAndTimeTrackingAware {\n id: DocId\n asset: DocId\n fileAttributes: FileAttributes\n videoAttributes: VideoAttributes\n originAssetFile: DocIdNullable\n links?: AssetFileLinks\n imagePreview: AssetFileImagePreviewNullable\n _resourceName: 'videoFile'\n}\n\nexport interface AssetFileDocument extends AssetFileAware, AnzuUserAndTimeTrackingAware, AssetFileMainRouteAware {\n id: DocId\n asset: DocId\n fileAttributes: FileAttributes\n documentAttributes: DocumentAttributes\n originAssetFile: DocIdNullable\n links?: AssetFileLinks\n _resourceName: 'documentFile'\n}\n\nexport interface AssetFileDownloadLink extends AnzuUserAndTimeTrackingAware {\n id: DocId\n link: string\n _system: string\n _resourceName: 'imageFile'\n}\n\nexport type AssetFile = AssetFileImage | AssetFileAudio | AssetFileVideo | AssetFileDocument\n\nexport type AssetFileNullable = AssetFileImage | AssetFileAudio | AssetFileVideo | AssetFileDocument | null\n\nexport const assetFileIsImageFile = (value: any): value is AssetFileImage => {\n if (!value || !value._resourceName) return false\n return value._resourceName === 'imageFile'\n}\n\nexport const assetFileIsVideoFile = (value: any): value is AssetFileVideo => {\n if (!value || !value._resourceName) return false\n return value._resourceName === 'videoFile'\n}\n\nexport const assetFileIsAudioFile = (value: any): value is AssetFileAudio => {\n if (!value || !value._resourceName) return false\n return value._resourceName === 'audioFile'\n}\n\ninterface ImageAttributes {\n ratioWidth: number\n ratioHeight: number\n width: number\n height: number\n rotation: number\n mostDominantColor: string\n animated: boolean\n}\n\ninterface Metadata {\n exifData: Record<string, string | number | boolean | null>\n id: string\n createdAt: string\n modifiedAt: string\n createdBy: number\n modifiedBy: number\n}\n\ninterface AudioAttributes {\n duration: number\n codecName: string\n bitrate: number\n}\n\ninterface DocumentAttributes {\n pageCount: number\n}\n\ninterface VideoAttributes {\n bitrate: number\n codecName: string\n duration: number\n height: number\n ratioHeight: number\n ratioWidth: number\n rotation: number\n width: number\n}\n\nexport interface AssetFileImagePreview {\n imageFile: DocId\n position: number\n}\n\nexport type AssetFileImagePreviewNullable = AssetFileImagePreview | null\n"],"mappings":";AAGA,IAAaA,IAAyB;CACpC,WAAW;CACX,UAAU;CACV,QAAQ;CACR,WAAW;CACX,WAAW;CACX,QAAQ;AACV,GAGaC,IAAsB;CACjC,MAAM;CACN,SAAS;CACT,iBAAiB;CACjB,iBAAiB;CACjB,gBAAgB;CAChB,aAAa;AACf,GAEaC,IAA6BD,EAAoB,MAEjDE,IAAuB;CAClC,UAAU;CACV,QAAQ;AACV,GAcaC,IAAoB;CAC/B,OAAO;CACP,OAAO;AACT,GA6FaC,KAAwB,MAC/B,CAACC,KAAS,CAACA,EAAM,gBAAsB,KACpCA,EAAM,kBAAkB,aAGpBC,KAAwB,MAC/B,CAACD,KAAS,CAACA,EAAM,gBAAsB,KACpCA,EAAM,kBAAkB,aAGpBE,KAAwB,MAC/B,CAACF,KAAS,CAACA,EAAM,gBAAsB,KACpCA,EAAM,kBAAkB"}
@@ -9,10 +9,15 @@ export interface DamAssetLicenceSelectFields {
9
9
  /** Up to four characters `A-Z0-9` that mark the licence's assets, empty when it has none. */
10
10
  badge: string;
11
11
  }
12
+ export interface DamAssetLicenceFlags {
13
+ /** The licence's assets may be used as they are. Without it, a picked image is taken over into the upload licence. */
14
+ directUseAllowed: boolean;
15
+ }
12
16
  export interface DamAssetLicence extends DamAssetLicenceMinimal, AnzuUserAndTimeTrackingAware, ResourceNameSystemAware, DamAssetLicenceSelectFields {
13
17
  extSystem: IntegerIdNullable;
14
18
  extId: string;
19
+ flags: DamAssetLicenceFlags;
15
20
  }
16
- export type DamAssetLicenceCached = DamAssetLicenceMinimal & DamAssetLicenceSelectFields;
21
+ export type DamAssetLicenceCached = DamAssetLicenceMinimal & DamAssetLicenceSelectFields & Partial<Pick<DamAssetLicence, 'flags'>>;
17
22
  /** The same as `DamAssetLicence`, which carries `badge` since 1.50.0. Kept for the admins that use the name. */
18
23
  export type DamAssetLicenceExtended = DamAssetLicence;
@@ -1,4 +1,4 @@
1
- import { DocId, IntegerId } from '../../../shared/types/common';
1
+ import { DocId } from '../../../shared/types/common';
2
2
  import { AssetSearchListItemDto } from './Asset';
3
3
  export declare const AssetSelectReturnType: {
4
4
  readonly MainFileId: "mainFileId";
@@ -9,17 +9,22 @@ export type AssetSelectReturnTypeType = (typeof AssetSelectReturnType)[keyof typ
9
9
  export type AssetSelectReturnData = AssetSelectReturnMainFileId | AssetSelectReturnAssetId | AssetSelectReturnAsset;
10
10
  interface AssetSelectReturnMainFileId {
11
11
  type: typeof AssetSelectReturnType.MainFileId;
12
- copyToLicence: undefined | IntegerId;
12
+ forceTakeOver: boolean;
13
13
  value: Array<DocId>;
14
14
  }
15
15
  interface AssetSelectReturnAssetId {
16
16
  type: typeof AssetSelectReturnType.AssetId;
17
- copyToLicence: undefined | IntegerId;
17
+ forceTakeOver: boolean;
18
18
  value: Array<DocId>;
19
19
  }
20
20
  interface AssetSelectReturnAsset {
21
21
  type: typeof AssetSelectReturnType.Asset;
22
- copyToLicence: undefined | IntegerId;
22
+ forceTakeOver: boolean;
23
23
  value: Array<AssetSearchListItemDto>;
24
24
  }
25
+ /** The record a picker picks for, as core-cms names it: the single use usage of a photo is answered for it. */
26
+ export interface AssetSelectUsageHolder {
27
+ resourceName: string;
28
+ resourceId: string | number;
29
+ }
25
30
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"AssetSelect.js","names":["AssetSelectReturnType"],"sources":["../../../../src/domains/dam/types/AssetSelect.ts"],"sourcesContent":["import type { DocId, IntegerId } from '@/shared/types/common'\nimport type { AssetSearchListItemDto } from '@/domains/dam/types/Asset'\n\nexport const AssetSelectReturnType = {\n MainFileId: 'mainFileId',\n AssetId: 'assetId',\n Asset: 'asset',\n} as const\nexport type AssetSelectReturnTypeType = (typeof AssetSelectReturnType)[keyof typeof AssetSelectReturnType]\n\nexport type AssetSelectReturnData = AssetSelectReturnMainFileId | AssetSelectReturnAssetId | AssetSelectReturnAsset\n\ninterface AssetSelectReturnMainFileId {\n type: typeof AssetSelectReturnType.MainFileId\n copyToLicence: undefined | IntegerId\n value: Array<DocId>\n}\n\ninterface AssetSelectReturnAssetId {\n type: typeof AssetSelectReturnType.AssetId\n copyToLicence: undefined | IntegerId\n value: Array<DocId>\n}\n\ninterface AssetSelectReturnAsset {\n type: typeof AssetSelectReturnType.Asset\n copyToLicence: undefined | IntegerId\n value: Array<AssetSearchListItemDto>\n}\n"],"mappings":";AAGA,IAAaA,IAAwB;CACnC,YAAY;CACZ,SAAS;CACT,OAAO;AACT"}
1
+ {"version":3,"file":"AssetSelect.js","names":["AssetSelectReturnType"],"sources":["../../../../src/domains/dam/types/AssetSelect.ts"],"sourcesContent":["import type { DocId } from '@/shared/types/common'\nimport type { AssetSearchListItemDto } from '@/domains/dam/types/Asset'\n\nexport const AssetSelectReturnType = {\n MainFileId: 'mainFileId',\n AssetId: 'assetId',\n Asset: 'asset',\n} as const\nexport type AssetSelectReturnTypeType = (typeof AssetSelectReturnType)[keyof typeof AssetSelectReturnType]\n\nexport type AssetSelectReturnData = AssetSelectReturnMainFileId | AssetSelectReturnAssetId | AssetSelectReturnAsset\n\n// `forceTakeOver`: the picked assets of another licence than the upload licence go into the upload licence even\n// where their licence allows direct use. The picker locks it on for a licence that does not allow it.\ninterface AssetSelectReturnMainFileId {\n type: typeof AssetSelectReturnType.MainFileId\n forceTakeOver: boolean\n value: Array<DocId>\n}\n\ninterface AssetSelectReturnAssetId {\n type: typeof AssetSelectReturnType.AssetId\n forceTakeOver: boolean\n value: Array<DocId>\n}\n\ninterface AssetSelectReturnAsset {\n type: typeof AssetSelectReturnType.Asset\n forceTakeOver: boolean\n value: Array<AssetSearchListItemDto>\n}\n\n/** The record a picker picks for, as core-cms names it: the single use usage of a photo is answered for it. */\nexport interface AssetSelectUsageHolder {\n resourceName: string\n resourceId: string | number\n}\n"],"mappings":";AAGA,IAAaA,IAAwB;CACnC,YAAY;CACZ,SAAS;CACT,OAAO;AACT"}
@@ -1,4 +1,8 @@
1
1
  import { DocId, IntegerId } from '../../../shared/types/common';
2
+ export interface ImageOwner {
3
+ resourceName: string;
4
+ resourceId: IntegerId;
5
+ }
2
6
  export interface ImageAware {
3
7
  id: IntegerId;
4
8
  texts: {
@@ -10,6 +14,8 @@ export interface ImageAware {
10
14
  licenceId: IntegerId;
11
15
  regionPosition: number;
12
16
  internal: boolean;
17
+ uploadLicenceId?: IntegerId;
18
+ forceTakeOver?: boolean;
13
19
  };
14
20
  flags: {
15
21
  showSource: boolean;
@@ -20,10 +26,13 @@ export interface ImageAware {
20
26
  }
21
27
  export interface ImageCreateUpdateAware extends Omit<ImageAware, 'id'> {
22
28
  id?: IntegerId;
29
+ ownerResourceName?: string;
30
+ ownerResourceId?: IntegerId;
23
31
  }
24
32
  export interface ImageCreateUpdateAwareKeyed extends ImageCreateUpdateAware {
25
33
  key: string;
26
34
  }
35
+ export declare function applyImageOwner<T extends Pick<ImageCreateUpdateAware, 'ownerResourceName' | 'ownerResourceId'>>(target: T, owner: ImageOwner | null | undefined): T;
27
36
  export interface ImageStoreItem extends ImageCreateUpdateAwareKeyed {
28
37
  damAuthors: DocId[];
29
38
  showDamAuthors: boolean;
@@ -0,0 +1,7 @@
1
+ // src/domains/dam/types/ImageAware.ts
2
+ function e(e, t) {
3
+ return t && (e.ownerResourceName = t.resourceName, e.ownerResourceId = t.resourceId), e;
4
+ }
5
+ export { e as applyImageOwner };
6
+
7
+ //# sourceMappingURL=ImageAware.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageAware.js","names":["applyImageOwner","owner","target"],"sources":["../../../../src/domains/dam/types/ImageAware.ts"],"sourcesContent":["import type { DocId, IntegerId } from '@/shared/types/common'\n\nexport interface ImageOwner {\n resourceName: string\n resourceId: IntegerId\n}\n\nexport interface ImageAware {\n id: IntegerId\n texts: {\n description: string\n source: string\n }\n dam: {\n damId: DocId\n licenceId: IntegerId\n regionPosition: number\n internal: boolean\n // Request-only, required when an image is picked: licence the server takes it over into when needed.\n uploadLicenceId?: IntegerId\n // Request-only: take over an asset of another licence even when it could be used directly.\n forceTakeOver?: boolean\n }\n flags: {\n showSource: boolean\n internal: boolean\n overrideInternal: boolean\n }\n position?: number\n}\n\nexport interface ImageCreateUpdateAware extends Omit<ImageAware, 'id'> {\n id?: IntegerId\n // Request-only: the entity the image belongs to; an omitted pair keeps the stored owner.\n ownerResourceName?: string\n ownerResourceId?: IntegerId\n}\n\nexport interface ImageCreateUpdateAwareKeyed extends ImageCreateUpdateAware {\n key: string\n}\n\nexport function applyImageOwner<T extends Pick<ImageCreateUpdateAware, 'ownerResourceName' | 'ownerResourceId'>>(\n target: T,\n owner: ImageOwner | null | undefined\n): T {\n if (owner) {\n target.ownerResourceName = owner.resourceName\n target.ownerResourceId = owner.resourceId\n }\n return target\n}\n\nexport interface ImageStoreItem extends ImageCreateUpdateAwareKeyed {\n damAuthors: DocId[]\n showDamAuthors: boolean\n damSources: DocId[]\n assetId: undefined | DocId\n}\n"],"mappings":";AA0CA,SAAgBA,EACd,GACA,GACG;CAKH,OAJIC,MACF,EAAO,oBAAoBA,EAAM,cACjC,EAAO,kBAAkBA,EAAM,aAE1BC;AACT"}