@anzusystems/common-admin 2.0.0-rc.1 → 2.0.0-rc.3

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 (901) hide show
  1. package/dist/AnzuSystemsCommonAdmin.js +1 -2
  2. package/dist/_virtual/_plugin-vue_export-helper.js +1 -2
  3. package/dist/_virtual/_rolldown/runtime.js +1 -2
  4. package/dist/assets/dam-meta-icons/2k.js +1 -2
  5. package/dist/assets/dam-meta-icons/4k.js +1 -2
  6. package/dist/assets/dam-meta-icons/8k.js +1 -2
  7. package/dist/assets/dam-meta-icons/fhd.js +1 -2
  8. package/dist/assets/dam-meta-icons/low.js +1 -2
  9. package/dist/assets/dam-meta-icons/qhd.js +1 -2
  10. package/dist/assets/dam-meta-icons/rss.js +1 -2
  11. package/dist/assets/dam-meta-icons/slot.js +1 -2
  12. package/dist/assets/dam-meta-icons/tts.js +1 -2
  13. package/dist/assets/image/placeholder16x9.js +1 -2
  14. package/dist/common-admin.js +188 -187
  15. package/dist/domains/anzuUser/api/anzuUserApi.js +1 -2
  16. package/dist/domains/anzuUser/components/AAnzuUserDatatable.js +1 -2
  17. package/dist/domains/anzuUser/components/AAnzuUserDatatable.vue_vue_type_script_setup_true_lang.js +1 -2
  18. package/dist/domains/anzuUser/components/AAnzuUserFilter.js +1 -2
  19. package/dist/domains/anzuUser/components/AAnzuUserFilter.vue_vue_type_script_setup_true_lang.js +1 -2
  20. package/dist/domains/anzuUser/components/AAnzuUserForm.js +1 -2
  21. package/dist/domains/anzuUser/components/AAnzuUserForm.vue_vue_type_script_setup_true_lang.js +1 -2
  22. package/dist/domains/anzuUser/components/AAnzuUserRoleAutocomplete.js +1 -2
  23. package/dist/domains/anzuUser/components/AAnzuUserRoleAutocomplete.vue_vue_type_script_setup_true_lang.js +1 -2
  24. package/dist/domains/anzuUser/components/AUserBulkActionDialog.js +1 -2
  25. package/dist/domains/anzuUser/components/AUserBulkActionDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  26. package/dist/domains/anzuUser/components/AUserCopyPermissionsDialog.js +1 -2
  27. package/dist/domains/anzuUser/components/AUserCopyPermissionsDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  28. package/dist/domains/anzuUser/components/AUserCreateInSystemButton.js +1 -2
  29. package/dist/domains/anzuUser/components/AUserCreateInSystemButton.vue_vue_type_script_setup_true_lang.js +1 -2
  30. package/dist/domains/anzuUser/components/AUserEnabledSwitch.js +1 -2
  31. package/dist/domains/anzuUser/components/AUserEnabledSwitch.vue_vue_type_script_setup_true_lang.js +1 -2
  32. package/dist/domains/anzuUser/components/AUserManageButton.js +1 -2
  33. package/dist/domains/anzuUser/components/AUserManageButton.vue_vue_type_script_setup_true_lang.js +1 -2
  34. package/dist/domains/anzuUser/components/AUserMetadataForm.js +1 -2
  35. package/dist/domains/anzuUser/components/AUserMetadataForm.vue_vue_type_script_setup_true_lang.js +1 -2
  36. package/dist/domains/anzuUser/components/AUserMetadataRepairDialog.js +1 -2
  37. package/dist/domains/anzuUser/components/AUserMetadataRepairDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  38. package/dist/domains/anzuUser/components/AUserOtherSystemsTable.js +1 -2
  39. package/dist/domains/anzuUser/components/AUserOtherSystemsTable.vue_vue_type_script_setup_true_lang.js +1 -2
  40. package/dist/domains/anzuUser/components/AUserSystemOverview.js +1 -2
  41. package/dist/domains/anzuUser/components/AUserSystemOverview.vue_vue_type_script_setup_true_lang.js +1 -2
  42. package/dist/domains/anzuUser/components/AUserSystemPanel.js +1 -2
  43. package/dist/domains/anzuUser/components/AUserSystemPanel.vue_vue_type_script_setup_true_lang.js +1 -2
  44. package/dist/domains/anzuUser/components/AUserSystemStatusChip.js +1 -2
  45. package/dist/domains/anzuUser/components/AUserSystemStatusChip.vue_vue_type_script_setup_true_lang.js +1 -2
  46. package/dist/domains/anzuUser/components/AUserTabsShell.js +1 -2
  47. package/dist/domains/anzuUser/components/AUserTabsShell.vue_vue_type_script_setup_true_lang.js +1 -2
  48. package/dist/domains/anzuUser/composables/anzuUserActions.js +1 -2
  49. package/dist/domains/anzuUser/composables/anzuUserValidations.js +1 -2
  50. package/dist/domains/anzuUser/composables/cachedAnzuUsers.js +1 -2
  51. package/dist/domains/anzuUser/composables/userCrossSystemSearch.js +1 -2
  52. package/dist/domains/anzuUser/composables/userCrossSystemWrites.js +1 -2
  53. package/dist/domains/anzuUser/composables/userSystemDescriptor.js +1 -2
  54. package/dist/domains/anzuUser/composables/userSystemProbe.js +1 -2
  55. package/dist/domains/anzuUser/factory/AnzuUserFactory.js +1 -2
  56. package/dist/domains/anzuUser/filter/anzuUserFilter.js +1 -2
  57. package/dist/domains/anzuUser/store/anzuUserStore.js +1 -2
  58. package/dist/domains/anzuUser/store/userCrossSystemStore.js +1 -2
  59. package/dist/domains/anzuUser/utils/userMetadataDiff.js +1 -2
  60. package/dist/domains/anzuUser/utils/userSystemState.js +1 -2
  61. package/dist/domains/anzuUser/utils/userTabs.js +1 -2
  62. package/dist/domains/api/composables/defineApiClient.js +1 -2
  63. package/dist/domains/api/composables/pagination.js +1 -2
  64. package/dist/domains/api/composables/request.js +1 -2
  65. package/dist/domains/api/composables/useApiFetchByIds.js +0 -1
  66. package/dist/domains/api/composables/useApiFetchItems.js +1 -2
  67. package/dist/domains/api/composables/useApiFetchList.js +1 -2
  68. package/dist/domains/api/composables/useApiFetchListBatch.js +1 -2
  69. package/dist/domains/api/composables/useApiQueryBuilder.js +1 -2
  70. package/dist/domains/api/composables/useApiRequest.js +1 -2
  71. package/dist/domains/api/types/SortOrder.js +1 -2
  72. package/dist/domains/api/utils/apiErrors.js +1 -2
  73. package/dist/domains/api/utils/apiHelper.js +1 -2
  74. package/dist/domains/api/utils/listBody.js +1 -2
  75. package/dist/domains/api/utils/response.js +1 -2
  76. package/dist/domains/auth/components/Acl.js +1 -2
  77. package/dist/domains/auth/components/Acl.vue_vue_type_script_setup_true_lang.js +1 -2
  78. package/dist/domains/auth/composables/aclAllowed.js +1 -2
  79. package/dist/domains/auth/composables/defineAuth.js +1 -2
  80. package/dist/domains/auth/composables/refreshSession.js +1 -2
  81. package/dist/domains/auth/store/authStore.js +1 -2
  82. package/dist/domains/auth/valueObject/Grant.js +1 -2
  83. package/dist/domains/cached/components/ACachedChip.js +1 -2
  84. package/dist/domains/cached/components/ACachedChip.vue_vue_type_script_setup_true_lang.js +1 -2
  85. package/dist/domains/cached/components/ACachedUserChip.js +1 -2
  86. package/dist/domains/cached/components/ACachedUserChip.vue_vue_type_script_setup_true_lang.js +1 -2
  87. package/dist/domains/cached/composables/createCachedChip.js +1 -2
  88. package/dist/domains/cached/composables/createUserAndTimeTrackingFields.js +1 -2
  89. package/dist/domains/cached/composables/defineCached.js +1 -2
  90. package/dist/domains/cached/composables/useCachedItem.js +1 -2
  91. package/dist/domains/collab/components/ACollabCountdown.js +1 -2
  92. package/dist/domains/collab/components/ACollabCountdown.vue_vue_type_script_setup_true_lang.js +1 -2
  93. package/dist/domains/collab/components/ACollabLockedByUser.js +1 -2
  94. package/dist/domains/collab/components/ACollabLockedByUser.vue_vue_type_script_setup_true_lang.js +1 -2
  95. package/dist/domains/collab/components/ACollabManagement.js +1 -2
  96. package/dist/domains/collab/components/ACollabManagement.vue_vue_type_script_setup_true_lang.js +1 -2
  97. package/dist/domains/collab/composables/collabAnyDataChange.js +1 -2
  98. package/dist/domains/collab/composables/collabCurrentUserId.js +1 -2
  99. package/dist/domains/collab/composables/collabEventBus.js +1 -2
  100. package/dist/domains/collab/composables/collabField.js +1 -2
  101. package/dist/domains/collab/composables/collabHelpers.js +1 -2
  102. package/dist/domains/collab/composables/collabInit.js +2 -3
  103. package/dist/domains/collab/composables/collabInit.js.map +1 -1
  104. package/dist/domains/collab/composables/collabRoom.js +1 -2
  105. package/dist/domains/collab/composables/collabState.js +1 -2
  106. package/dist/domains/collab/composables/commonAdminCollabOptions.js +1 -2
  107. package/dist/domains/collab/types/Collab.js +1 -2
  108. package/dist/domains/customDataForm/components/ACustomDataForm.js +1 -2
  109. package/dist/domains/customDataForm/components/ACustomDataForm.vue_vue_type_script_setup_true_lang.js +1 -2
  110. package/dist/domains/customDataForm/components/ACustomDataFormElement.js +1 -2
  111. package/dist/domains/customDataForm/components/ACustomDataFormElement.vue_vue_type_script_setup_true_lang.js +1 -2
  112. package/dist/domains/customDataForm/components/ACustomDataFormHiddenPart.js +1 -2
  113. package/dist/domains/customDataForm/components/ACustomDataFormHiddenPart.vue_vue_type_script_setup_true_lang.js +1 -2
  114. package/dist/domains/customDataForm/composables/useCustomDataForm.js +1 -2
  115. package/dist/domains/customDataForm/types/CustomDataFormElementTypes.js +1 -2
  116. package/dist/domains/dam/api/damAssetApi.js +1 -2
  117. package/dist/domains/dam/api/damAssetLicenceApi.js +1 -2
  118. package/dist/domains/dam/api/damConstants.js +1 -2
  119. package/dist/domains/dam/api/damEndPoints.js +1 -2
  120. package/dist/domains/dam/api/damImageApi.js +1 -2
  121. package/dist/domains/dam/api/damImageRoiApi.js +1 -2
  122. package/dist/domains/dam/api/damfetchAssetListByFileIdsMultipleLicences.js +1 -2
  123. package/dist/domains/dam/api/uploadApi.js +1 -2
  124. package/dist/domains/dam/assetDetail/components/AColorBox.js +1 -2
  125. package/dist/domains/dam/assetDetail/components/AColorBox.vue_vue_type_script_setup_true_lang.js +1 -2
  126. package/dist/domains/dam/assetDetail/components/AssetCustomMetadataForm.js +1 -2
  127. package/dist/domains/dam/assetDetail/components/AssetCustomMetadataForm.vue_vue_type_script_setup_true_lang.js +1 -2
  128. package/dist/domains/dam/assetDetail/components/AssetDetailDialog.js +1 -2
  129. package/dist/domains/dam/assetDetail/components/AssetDetailDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  130. package/dist/domains/dam/assetDetail/components/AssetDetailDialogFrame.js +1 -2
  131. package/dist/domains/dam/assetDetail/components/AssetDetailDialogFrame.vue_vue_type_script_setup_true_lang.js +1 -2
  132. package/dist/domains/dam/assetDetail/components/AssetDetailDialogLoader.js +1 -2
  133. package/dist/domains/dam/assetDetail/components/AssetDetailDialogLoader.vue_vue_type_script_setup_true_lang.js +1 -2
  134. package/dist/domains/dam/assetDetail/components/AssetDetailDialogSidebar.js +1 -2
  135. package/dist/domains/dam/assetDetail/components/AssetDetailDialogSidebar.vue_vue_type_script_setup_true_lang.js +1 -2
  136. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarActionsTeleportTarget.js +1 -2
  137. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarActionsTeleportTarget.vue_vue_type_script_setup_true_lang.js +1 -2
  138. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarActionsWrapper.js +1 -2
  139. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarActionsWrapper.vue_vue_type_script_setup_true_lang.js +1 -2
  140. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarFrame.js +1 -2
  141. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarFrame.vue_vue_type_script_setup_true_lang.js +1 -2
  142. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarMetadata.js +1 -2
  143. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarMetadata.vue_vue_type_script_setup_true_lang.js +1 -2
  144. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarROI.js +1 -2
  145. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarROI.vue_vue_type_script_setup_true_lang.js +1 -2
  146. package/dist/domains/dam/assetDetail/components/AssetFileFailReasonChip.js +1 -2
  147. package/dist/domains/dam/assetDetail/components/AssetFileFailReasonChip.vue_vue_type_script_setup_true_lang.js +1 -2
  148. package/dist/domains/dam/assetDetail/components/AssetFileInfoPanel.js +1 -2
  149. package/dist/domains/dam/assetDetail/components/AssetFileInfoPanel.vue_vue_type_script_setup_true_lang.js +1 -2
  150. package/dist/domains/dam/assetDetail/components/AssetFileRotate.js +1 -2
  151. package/dist/domains/dam/assetDetail/components/AssetFileRotate.vue_vue_type_script_setup_true_lang.js +1 -2
  152. package/dist/domains/dam/assetDetail/components/AssetImage.js +1 -2
  153. package/dist/domains/dam/assetDetail/components/AssetImage.vue_vue_type_script_setup_true_lang.js +1 -2
  154. package/dist/domains/dam/assetDetail/components/AssetImageMetaIcons.js +1 -2
  155. package/dist/domains/dam/assetDetail/components/AssetImageMetaIcons.vue_vue_type_script_setup_true_lang.js +1 -2
  156. package/dist/domains/dam/assetDetail/components/AssetInfobox.js +1 -2
  157. package/dist/domains/dam/assetDetail/components/AssetInfobox.vue_vue_type_script_setup_true_lang.js +1 -2
  158. package/dist/domains/dam/assetDetail/components/AssetMetadata.js +1 -2
  159. package/dist/domains/dam/assetDetail/components/AssetMetadata.vue_vue_type_script_setup_true_lang.js +1 -2
  160. package/dist/domains/dam/assetDetail/components/AssetMetadataImageAttributes.js +1 -2
  161. package/dist/domains/dam/assetDetail/components/AssetMetadataImageAttributes.vue_vue_type_script_setup_true_lang.js +1 -2
  162. package/dist/domains/dam/assetDetail/composables/assetDetailExtSystem.js +1 -2
  163. package/dist/domains/dam/assetDetail/composables/assetDetailSidebarActionbar.js +1 -2
  164. package/dist/domains/dam/assetDetail/composables/assetDetailView.js +1 -2
  165. package/dist/domains/dam/assetDetail/composables/assetFileFailReason.js +1 -2
  166. package/dist/domains/dam/assetDetail/store/assetDetailStore.js +1 -2
  167. package/dist/domains/dam/assetDetail/utils/assetImageIconsConfig.js +1 -2
  168. package/dist/domains/dam/assetDetail/utils/assetMetadataMayStillChange.js +1 -2
  169. package/dist/domains/dam/assetSelect/api/damPodcastApi.js +1 -2
  170. package/dist/domains/dam/assetSelect/components/AAssetListInner.js +1 -2
  171. package/dist/domains/dam/assetSelect/components/AAssetListInner.vue_vue_type_script_setup_true_lang.js +1 -2
  172. package/dist/domains/dam/assetSelect/components/AAssetSelect.js +1 -2
  173. package/dist/domains/dam/assetSelect/components/AAssetSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  174. package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.js +1 -2
  175. package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.vue_vue_type_script_setup_true_lang.js +1 -2
  176. package/dist/domains/dam/assetSelect/components/AssetDistributionServiceNameFilter.js +1 -2
  177. package/dist/domains/dam/assetSelect/components/AssetDistributionServiceNameFilter.vue_vue_type_script_setup_true_lang.js +1 -2
  178. package/dist/domains/dam/assetSelect/components/AssetImagePreview.js +1 -2
  179. package/dist/domains/dam/assetSelect/components/AssetImagePreview.vue_vue_type_script_setup_true_lang.js +1 -2
  180. package/dist/domains/dam/assetSelect/components/AssetSelectFilter.js +1 -2
  181. package/dist/domains/dam/assetSelect/components/AssetSelectFilter.vue_vue_type_script_setup_true_lang.js +1 -2
  182. package/dist/domains/dam/assetSelect/components/AssetSelectFilterForm.js +1 -2
  183. package/dist/domains/dam/assetSelect/components/AssetSelectFilterForm.vue_vue_type_script_setup_true_lang.js +1 -2
  184. package/dist/domains/dam/assetSelect/components/AssetSelectListBar.js +1 -2
  185. package/dist/domains/dam/assetSelect/components/AssetSelectListBar.vue_vue_type_script_setup_true_lang.js +1 -2
  186. package/dist/domains/dam/assetSelect/components/AssetSelectListTable.js +1 -2
  187. package/dist/domains/dam/assetSelect/components/AssetSelectListTable.vue_vue_type_script_setup_true_lang.js +1 -2
  188. package/dist/domains/dam/assetSelect/components/AssetSelectListTiles.js +1 -2
  189. package/dist/domains/dam/assetSelect/components/AssetSelectListTiles.vue_vue_type_script_setup_true_lang.js +1 -2
  190. package/dist/domains/dam/assetSelect/components/AssetSelectTableRowItem.js +1 -2
  191. package/dist/domains/dam/assetSelect/components/AssetSelectTableRowItem.vue_vue_type_script_setup_true_lang.js +1 -2
  192. package/dist/domains/dam/assetSelect/components/AssetSelectTilesItem.js +1 -2
  193. package/dist/domains/dam/assetSelect/components/AssetSelectTilesItem.vue_vue_type_script_setup_true_lang.js +1 -2
  194. package/dist/domains/dam/assetSelect/components/FilterPodcastRemoteAutocomplete.js +1 -2
  195. package/dist/domains/dam/assetSelect/components/FilterPodcastRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +1 -2
  196. package/dist/domains/dam/assetSelect/composables/assetSelectFilterSidebar.js +1 -2
  197. package/dist/domains/dam/assetSelect/composables/assetSelectGridView.js +1 -2
  198. package/dist/domains/dam/assetSelect/composables/assetSelectItemActions.js +1 -2
  199. package/dist/domains/dam/assetSelect/composables/assetSelectListActions.js +1 -2
  200. package/dist/domains/dam/assetSelect/composables/podcastFilterAndActions.js +1 -2
  201. package/dist/domains/dam/assetSelect/filter/AssetFilter.js +1 -2
  202. package/dist/domains/dam/assetSelect/store/assetSelectStore.js +1 -2
  203. package/dist/domains/dam/author/api/authorApi.js +1 -2
  204. package/dist/domains/dam/author/components/AuthorCreateButton.js +1 -2
  205. package/dist/domains/dam/author/components/AuthorCreateButton.vue_vue_type_script_setup_true_lang.js +1 -2
  206. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.js +1 -2
  207. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.vue_vue_type_script_setup_true_lang.js +1 -2
  208. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChipConflicts.js +1 -2
  209. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChipConflicts.vue_vue_type_script_setup_true_lang.js +1 -2
  210. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.js +1 -2
  211. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js +1 -2
  212. package/dist/domains/dam/author/components/DamAuthorFilterRemoteAutocomplete.js +1 -2
  213. package/dist/domains/dam/author/components/DamAuthorFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +1 -2
  214. package/dist/domains/dam/author/composables/authorActions.js +1 -2
  215. package/dist/domains/dam/author/composables/authorValidation.js +1 -2
  216. package/dist/domains/dam/author/composables/cachedAuthors.js +1 -2
  217. package/dist/domains/dam/author/composables/cachedUsers.js +1 -2
  218. package/dist/domains/dam/author/composables/damAuthorConfig.js +1 -2
  219. package/dist/domains/dam/author/factory/AuthorFactory.js +1 -2
  220. package/dist/domains/dam/author/filter/AuthorFilter.js +1 -2
  221. package/dist/domains/dam/author/types/DamAuthorType.js +1 -2
  222. package/dist/domains/dam/components/DamAdminAssetLink.js +1 -2
  223. package/dist/domains/dam/components/DamAdminAssetLink.vue_vue_type_script_setup_true_lang.js +1 -2
  224. package/dist/domains/dam/composables/commonAdminCoreDamOptions.js +1 -2
  225. package/dist/domains/dam/composables/damConfigName.js +1 -2
  226. package/dist/domains/dam/composables/damNotifications.js +1 -2
  227. package/dist/domains/dam/composables/damNotificationsConnection.js +1 -2
  228. package/dist/domains/dam/composables/damNotificationsEventBus.js +1 -2
  229. package/dist/domains/dam/composables/extSystemIdForCached.js +1 -2
  230. package/dist/domains/dam/composables/uploadValidations.js +1 -2
  231. package/dist/domains/dam/config/api/damAssetCustomFormApi.js +1 -2
  232. package/dist/domains/dam/config/api/damConfigApi.js +1 -2
  233. package/dist/domains/dam/config/composables/acceptTypeAndSizeHelper.js +1 -2
  234. package/dist/domains/dam/config/composables/damConfigState.js +1 -2
  235. package/dist/domains/dam/config/store/damConfigStore.js +1 -2
  236. package/dist/domains/dam/config/utils/damFilterUserAllowedUploadConfigs.js +1 -2
  237. package/dist/domains/dam/cropper/components/ACropper.js +1 -2
  238. package/dist/domains/dam/cropper/components/ACropper.js.map +1 -1
  239. package/dist/domains/dam/cropper/components/ACropper.vue_vue_type_script_setup_true_lang.js +2 -3
  240. package/dist/domains/dam/cropper/components/ACropper.vue_vue_type_script_setup_true_lang.js.map +1 -1
  241. package/dist/domains/dam/cropper/components/DamAssetImageRoiSelect.js +1 -2
  242. package/dist/domains/dam/cropper/components/DamAssetImageRoiSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  243. package/dist/domains/dam/cropper/components/DamAssetImageRoiSelectLazy.js +1 -2
  244. package/dist/domains/dam/cropper/components/DamAssetImageRoiSelectLazy.vue_vue_type_script_setup_true_lang.js +1 -2
  245. package/dist/domains/dam/cropper/store/imageRoiStore.js +1 -2
  246. package/dist/domains/dam/cropper/utils/cropperGeometry.js +2 -3
  247. package/dist/domains/dam/cropper/utils/cropperGeometry.js.map +1 -1
  248. package/dist/domains/dam/cropper/utils/cropperJsService.js +1 -2
  249. package/dist/domains/dam/cropper/utils/damAssetImageRoiSelectLoader.js +1 -2
  250. package/dist/domains/dam/imageWidget/components/AImageMediaWidget.js +1 -2
  251. package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue_vue_type_script_setup_true_lang.js +1 -2
  252. package/dist/domains/dam/imageWidget/components/AImagePublicInput.js +1 -2
  253. package/dist/domains/dam/imageWidget/components/AImagePublicInput.vue_vue_type_script_setup_true_lang.js +1 -2
  254. package/dist/domains/dam/imageWidget/components/AImageWidget.js +1 -2
  255. package/dist/domains/dam/imageWidget/components/AImageWidget.vue_vue_type_script_setup_true_lang.js +1 -2
  256. package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.js +1 -2
  257. package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue_vue_type_script_setup_true_lang.js +1 -2
  258. package/dist/domains/dam/imageWidget/components/AImageWidgetMultipleSimple.js +1 -2
  259. package/dist/domains/dam/imageWidget/components/AImageWidgetMultipleSimple.vue_vue_type_script_setup_true_lang.js +1 -2
  260. package/dist/domains/dam/imageWidget/components/AImageWidgetSimple.js +1 -2
  261. package/dist/domains/dam/imageWidget/components/AImageWidgetSimple.vue_vue_type_script_setup_true_lang.js +1 -2
  262. package/dist/domains/dam/imageWidget/components/AMediaWidgetSimple.js +1 -2
  263. package/dist/domains/dam/imageWidget/components/AMediaWidgetSimple.vue_vue_type_script_setup_true_lang.js +1 -2
  264. package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.js +1 -2
  265. package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue_vue_type_script_setup_true_lang.js +1 -2
  266. package/dist/domains/dam/imageWidget/components/ImageMassOperations.js +1 -2
  267. package/dist/domains/dam/imageWidget/components/ImageMassOperations.vue_vue_type_script_setup_true_lang.js +1 -2
  268. package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.js +1 -2
  269. package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js +2 -3
  270. package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  271. package/dist/domains/dam/imageWidget/components/ImageWidgetInner.js +1 -2
  272. package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue_vue_type_script_setup_true_lang.js +2 -3
  273. package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  274. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.js +1 -2
  275. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js +1 -2
  276. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleItem.js +1 -2
  277. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleItem.vue_vue_type_script_setup_true_lang.js +1 -2
  278. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleLimitDialog.js +1 -2
  279. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleLimitDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  280. package/dist/domains/dam/imageWidget/components/MediaWidgetSimpleDialog.js +1 -2
  281. package/dist/domains/dam/imageWidget/components/MediaWidgetSimpleDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  282. package/dist/domains/dam/imageWidget/composables/commonAdminImageOptions.js +1 -2
  283. package/dist/domains/dam/imageWidget/composables/imageActions.js +1 -2
  284. package/dist/domains/dam/imageWidget/composables/imageApiCms.js +1 -2
  285. package/dist/domains/dam/imageWidget/composables/imageDialogDamAuthors.js +1 -2
  286. package/dist/domains/dam/imageWidget/composables/useImageMassOperations.js +1 -2
  287. package/dist/domains/dam/imageWidget/store/imageMediaWidgetStore.js +1 -2
  288. package/dist/domains/dam/imageWidget/store/imageStore.js +1 -2
  289. package/dist/domains/dam/imageWidget/utils/damImage.js +1 -2
  290. package/dist/domains/dam/imageWidget/utils/fieldLockTurns.js +1 -2
  291. package/dist/domains/dam/imageWidget/utils/imageSaves.js +1 -2
  292. package/dist/domains/dam/imageWidget/utils/imageWidgetInkectionKeys.js +1 -2
  293. package/dist/domains/dam/imageWidget/utils/metadataToImageMap.js +1 -2
  294. package/dist/domains/dam/imageWidget/utils/waitLimit.js +1 -2
  295. package/dist/domains/dam/keyword/api/keywordApi.js +1 -2
  296. package/dist/domains/dam/keyword/components/DamKeywordFilterRemoteAutocomplete.js +1 -2
  297. package/dist/domains/dam/keyword/components/DamKeywordFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +1 -2
  298. package/dist/domains/dam/keyword/components/KeywordRemoteAutocompleteCachedKeywordChip.js +1 -2
  299. package/dist/domains/dam/keyword/components/KeywordRemoteAutocompleteCachedKeywordChip.vue_vue_type_script_setup_true_lang.js +1 -2
  300. package/dist/domains/dam/keyword/components/KeywordRemoteAutocompleteWithCached.js +1 -2
  301. package/dist/domains/dam/keyword/components/KeywordRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js +1 -2
  302. package/dist/domains/dam/keyword/composables/cachedKeywords.js +1 -2
  303. package/dist/domains/dam/keyword/composables/damKeywordConfig.js +1 -2
  304. package/dist/domains/dam/keyword/composables/keywordActions.js +1 -2
  305. package/dist/domains/dam/keyword/factory/KeywordFactory.js +3 -4
  306. package/dist/domains/dam/keyword/factory/KeywordFactory.js.map +1 -1
  307. package/dist/domains/dam/keyword/filter/KeywordFilter.js +1 -2
  308. package/dist/domains/dam/types/Asset.js +1 -2
  309. package/dist/domains/dam/types/AssetFile.js +1 -2
  310. package/dist/domains/dam/types/AssetSelect.js +1 -2
  311. package/dist/domains/dam/types/DamConfig.js +1 -2
  312. package/dist/domains/dam/types/MediaAware.js +1 -2
  313. package/dist/domains/dam/types/UploadQueue.js +1 -2
  314. package/dist/domains/dam/uploadQueue/components/AssetCustomMetadataFormMassOperations.js +1 -2
  315. package/dist/domains/dam/uploadQueue/components/AssetCustomMetadataFormMassOperations.vue_vue_type_script_setup_true_lang.js +1 -2
  316. package/dist/domains/dam/uploadQueue/components/AssetQueueSelectedSidebar.js +1 -2
  317. package/dist/domains/dam/uploadQueue/components/AssetQueueSelectedSidebar.vue_vue_type_script_setup_true_lang.js +1 -2
  318. package/dist/domains/dam/uploadQueue/components/UploadQueueButtonStop.js +1 -2
  319. package/dist/domains/dam/uploadQueue/components/UploadQueueButtonStop.vue_vue_type_script_setup_true_lang.js +1 -2
  320. package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.js +1 -2
  321. package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  322. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingle.js +1 -2
  323. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingle.vue_vue_type_script_setup_true_lang.js +1 -2
  324. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebar.js +1 -2
  325. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebar.vue_vue_type_script_setup_true_lang.js +1 -2
  326. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadata.js +1 -2
  327. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadata.vue_vue_type_script_setup_true_lang.js +1 -2
  328. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadataContent.js +1 -2
  329. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadataContent.vue_vue_type_script_setup_true_lang.js +1 -2
  330. package/dist/domains/dam/uploadQueue/components/UploadQueueEditable.js +1 -2
  331. package/dist/domains/dam/uploadQueue/components/UploadQueueEditable.vue_vue_type_script_setup_true_lang.js +1 -2
  332. package/dist/domains/dam/uploadQueue/components/UploadQueueItemEditable.js +1 -2
  333. package/dist/domains/dam/uploadQueue/components/UploadQueueItemEditable.vue_vue_type_script_setup_true_lang.js +1 -2
  334. package/dist/domains/dam/uploadQueue/components/UploadQueueItemErrorOverlay.js +1 -2
  335. package/dist/domains/dam/uploadQueue/components/UploadQueueItemErrorOverlay.vue_vue_type_script_setup_true_lang.js +1 -2
  336. package/dist/domains/dam/uploadQueue/components/uploadQueueBindings.js +1 -2
  337. package/dist/domains/dam/uploadQueue/composables/assetSuggestions.js +1 -2
  338. package/dist/domains/dam/uploadQueue/composables/damUploadChunkSize.js +1 -2
  339. package/dist/domains/dam/uploadQueue/composables/uploadMeter.js +1 -2
  340. package/dist/domains/dam/uploadQueue/composables/uploadQueueItemRefresh.js +1 -2
  341. package/dist/domains/dam/uploadQueue/composables/uploadQueueMassOperations.js +1 -2
  342. package/dist/domains/dam/uploadQueue/composables/uploadService.js +1 -2
  343. package/dist/domains/dam/uploadQueue/composables/useUploadQueueDialog.js +1 -2
  344. package/dist/domains/dam/uploadQueue/core/uploadQueueCore.js +1 -2
  345. package/dist/domains/dam/uploadQueue/core/uploadQueueCoreTypes.js +1 -2
  346. package/dist/domains/dam/uploadQueue/core/uploadQueueFill.js +1 -2
  347. package/dist/domains/dam/uploadQueue/factory/UploadQueueItemFactory.js +1 -2
  348. package/dist/domains/dam/uploadQueue/presets/queuePresets.js +1 -2
  349. package/dist/domains/dam/uploadQueue/presets/uploadPresets.js +1 -2
  350. package/dist/domains/dam/uploadQueue/settlement/uploadPollSchedule.js +1 -2
  351. package/dist/domains/dam/uploadQueue/settlement/uploadPoller.js +1 -2
  352. package/dist/domains/dam/uploadQueue/settlement/uploadSettle.js +1 -2
  353. package/dist/domains/dam/uploadQueue/settlement/uploadSettlement.js +1 -2
  354. package/dist/domains/dam/uploadQueue/settlement/uploadSettlementRuntime.js +1 -2
  355. package/dist/domains/dam/uploadQueue/settlement/uploadSettlementTypes.js +1 -2
  356. package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.js +1 -2
  357. package/dist/domains/dam/uploadQueue/utils/mimeTypeHelper.js +1 -2
  358. package/dist/domains/dam/user/api/assetLicenceApi.js +1 -2
  359. package/dist/domains/dam/user/api/assetLicenceGroupApi.js +1 -2
  360. package/dist/domains/dam/user/api/extSystemApi.js +1 -2
  361. package/dist/domains/dam/user/api/userApi.js +1 -2
  362. package/dist/domains/dam/user/components/DamAssetLicenceGroupRemoteAutocomplete.js +1 -2
  363. package/dist/domains/dam/user/components/DamAssetLicenceGroupRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +1 -2
  364. package/dist/domains/dam/user/components/DamAssetLicenceRemoteAutocomplete.js +1 -2
  365. package/dist/domains/dam/user/components/DamAssetLicenceRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +1 -2
  366. package/dist/domains/dam/user/components/DamDistributionServiceSelect.js +1 -2
  367. package/dist/domains/dam/user/components/DamDistributionServiceSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  368. package/dist/domains/dam/user/components/DamExtSystemRemoteAutocomplete.js +1 -2
  369. package/dist/domains/dam/user/components/DamExtSystemRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +1 -2
  370. package/dist/domains/dam/user/components/DamExternalProviderAssetSelect.js +1 -2
  371. package/dist/domains/dam/user/components/DamExternalProviderAssetSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  372. package/dist/domains/dam/user/components/DamUserFilterRemoteAutocomplete.js +1 -2
  373. package/dist/domains/dam/user/components/DamUserFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +1 -2
  374. package/dist/domains/dam/user/components/DamUserRemoteAutocomplete.js +1 -2
  375. package/dist/domains/dam/user/components/DamUserRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +1 -2
  376. package/dist/domains/dam/user/composables/assetLicenceActions.js +1 -2
  377. package/dist/domains/dam/user/composables/assetLicenceGroupActions.js +1 -2
  378. package/dist/domains/dam/user/composables/damUserSelectActions.js +1 -2
  379. package/dist/domains/dam/user/composables/extSystemActions.js +1 -2
  380. package/dist/domains/dam/user/filter/AssetLicenceFilter.js +1 -2
  381. package/dist/domains/dam/user/filter/AssetLicenceGroupFilter.js +1 -2
  382. package/dist/domains/dam/user/filter/DamUserFilter.js +1 -2
  383. package/dist/domains/dam/user/filter/ExtSystemFilter.js +1 -2
  384. package/dist/domains/dam/user/types/DamDistributionServiceType.js +1 -2
  385. package/dist/domains/dam/user/types/DamExternalProviderAssetType.js +1 -2
  386. package/dist/domains/filters/bookmarks/api/userAdminConfigApi.d.ts +1 -3
  387. package/dist/domains/filters/bookmarks/api/userAdminConfigApi.js +4 -5
  388. package/dist/domains/filters/bookmarks/api/userAdminConfigApi.js.map +1 -1
  389. package/dist/domains/filters/bookmarks/components/AFilterBookmarkButton.js +1 -2
  390. package/dist/domains/filters/bookmarks/components/AFilterBookmarkButton.vue_vue_type_script_setup_true_lang.js +1 -2
  391. package/dist/domains/filters/bookmarks/components/FilterBookmarkDialog.js +1 -2
  392. package/dist/domains/filters/bookmarks/components/FilterBookmarkDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  393. package/dist/domains/filters/bookmarks/components/FilterBookmarks.js +1 -2
  394. package/dist/domains/filters/bookmarks/components/FilterBookmarks.vue_vue_type_script_setup_true_lang.js +1 -2
  395. package/dist/domains/filters/bookmarks/factory/UserAdminConfigFactory.js +1 -2
  396. package/dist/domains/filters/bookmarks/filter/UserAdminConfigFilter.js +1 -2
  397. package/dist/domains/filters/bookmarks/store/bookmarksStore.js +1 -2
  398. package/dist/domains/filters/bookmarks/types/UserAdminConfig.js +1 -2
  399. package/dist/domains/filters/components/AFilterAdvancedButton.js +1 -2
  400. package/dist/domains/filters/components/AFilterAdvancedButton.vue_vue_type_script_setup_true_lang.js +1 -2
  401. package/dist/domains/filters/components/AFilterBooleanSelect.js +1 -2
  402. package/dist/domains/filters/components/AFilterBooleanSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  403. package/dist/domains/filters/components/AFilterDatetimePicker.js +1 -2
  404. package/dist/domains/filters/components/AFilterDatetimePicker.vue_vue_type_script_setup_true_lang.js +1 -2
  405. package/dist/domains/filters/components/AFilterEmpty.js +1 -2
  406. package/dist/domains/filters/components/AFilterEmpty.vue_vue_type_script_setup_true_lang.js +1 -2
  407. package/dist/domains/filters/components/AFilterInteger.js +1 -2
  408. package/dist/domains/filters/components/AFilterInteger.vue_vue_type_script_setup_true_lang.js +1 -2
  409. package/dist/domains/filters/components/AFilterResetButton.js +1 -2
  410. package/dist/domains/filters/components/AFilterResetButton.vue_vue_type_script_setup_true_lang.js +1 -2
  411. package/dist/domains/filters/components/AFilterString.js +1 -2
  412. package/dist/domains/filters/components/AFilterString.vue_vue_type_script_setup_true_lang.js +1 -2
  413. package/dist/domains/filters/components/AFilterSubmitButton.js +1 -2
  414. package/dist/domains/filters/components/AFilterSubmitButton.vue_vue_type_script_setup_true_lang.js +1 -2
  415. package/dist/domains/filters/components/AFilterTimeInterval.js +1 -2
  416. package/dist/domains/filters/components/AFilterTimeInterval.vue_vue_type_script_setup_true_lang.js +1 -2
  417. package/dist/domains/filters/components/AFilterValueObjectOptionsSelect.js +1 -2
  418. package/dist/domains/filters/components/AFilterValueObjectOptionsSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  419. package/dist/domains/filters/components/AFilterWrapper.js +1 -2
  420. package/dist/domains/filters/components/AFilterWrapper.vue_vue_type_script_setup_true_lang.js +1 -2
  421. package/dist/domains/filters/components/AFilterWrapperSidebar.js +1 -2
  422. package/dist/domains/filters/components/AFilterWrapperSidebar.vue_vue_type_script_setup_true_lang.js +1 -2
  423. package/dist/domains/filters/components/FilterDetailItem.js +1 -2
  424. package/dist/domains/filters/components/FilterDetailItem.vue_vue_type_script_setup_true_lang.js +1 -2
  425. package/dist/domains/filters/components/FiltersSelected.js +1 -2
  426. package/dist/domains/filters/components/FiltersSelected.vue_vue_type_script_setup_true_lang.js +1 -2
  427. package/dist/domains/filters/composables/filterFactory.d.ts +31 -2
  428. package/dist/domains/filters/composables/filterFactory.js +79 -69
  429. package/dist/domains/filters/composables/filterFactory.js.map +1 -1
  430. package/dist/domains/filters/composables/filterTimeIntervalTools.js +1 -2
  431. package/dist/domains/filters/datatable/components/ADatatableConfigButton.js +1 -2
  432. package/dist/domains/filters/datatable/components/ADatatableConfigButton.vue_vue_type_script_setup_true_lang.js +1 -2
  433. package/dist/domains/filters/datatable/components/ADatatableOrdering.js +1 -2
  434. package/dist/domains/filters/datatable/components/ADatatableOrdering.vue_vue_type_script_setup_true_lang.js +1 -2
  435. package/dist/domains/filters/datatable/components/ADatatablePagination.js +1 -2
  436. package/dist/domains/filters/datatable/components/ADatatablePagination.vue_vue_type_script_setup_true_lang.js +1 -2
  437. package/dist/domains/filters/datatable/composables/createDatatableColumnsConfig.js +1 -2
  438. package/dist/domains/filters/datatable/utils/datatable.js +1 -2
  439. package/dist/domains/filters/datatable/utils/datatableColumns.js +1 -2
  440. package/dist/domains/filters/utils/filterInjectionKeys.js +1 -2
  441. package/dist/domains/form/components/AFormDatetimePicker.js +1 -2
  442. package/dist/domains/form/components/AFormDatetimePicker.vue_vue_type_script_setup_true_lang.js +1 -2
  443. package/dist/domains/form/components/AFormFlagDatetimePicker.js +1 -2
  444. package/dist/domains/form/components/AFormFlagDatetimePicker.vue_vue_type_script_setup_true_lang.js +1 -2
  445. package/dist/domains/form/components/AFormRemoteCheckbox.js +1 -2
  446. package/dist/domains/form/components/AFormRemoteCheckbox.vue_vue_type_script_setup_true_lang.js +1 -2
  447. package/dist/domains/form/components/AFormRemoteSwitch.js +1 -2
  448. package/dist/domains/form/components/AFormRemoteSwitch.vue_vue_type_script_setup_true_lang.js +1 -2
  449. package/dist/domains/form/components/AFormSwitch.js +1 -2
  450. package/dist/domains/form/components/AFormSwitch.vue_vue_type_script_setup_true_lang.js +1 -2
  451. package/dist/domains/form/components/AFormTextField.js +1 -2
  452. package/dist/domains/form/components/AFormTextField.js.map +1 -1
  453. package/dist/domains/form/components/AFormTextField.vue_vue_type_script_setup_true_lang.js +2 -3
  454. package/dist/domains/form/components/AFormTextField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  455. package/dist/domains/form/components/AFormTextarea.js +1 -2
  456. package/dist/domains/form/components/AFormTextarea.vue_vue_type_script_setup_true_lang.js +1 -2
  457. package/dist/domains/form/components/AFormValueObjectOptionsSelect.js +1 -2
  458. package/dist/domains/form/components/AFormValueObjectOptionsSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  459. package/dist/domains/form/components/ASystemEntityScope.js +1 -2
  460. package/dist/domains/form/components/ASystemEntityScope.vue_vue_type_script_setup_true_lang.js +1 -2
  461. package/dist/domains/job/api/jobApi.js +1 -2
  462. package/dist/domains/job/components/AJobBaseCreateForm.js +1 -2
  463. package/dist/domains/job/components/AJobBaseCreateForm.vue_vue_type_script_setup_true_lang.js +1 -2
  464. package/dist/domains/job/components/AJobDetailCommon.js +1 -2
  465. package/dist/domains/job/components/AJobDetailCommon.vue_vue_type_script_setup_true_lang.js +1 -2
  466. package/dist/domains/job/components/AJobPriorityChip.js +1 -2
  467. package/dist/domains/job/components/AJobPriorityChip.vue_vue_type_script_setup_true_lang.js +1 -2
  468. package/dist/domains/job/components/AJobStatusChip.js +1 -2
  469. package/dist/domains/job/components/AJobStatusChip.vue_vue_type_script_setup_true_lang.js +1 -2
  470. package/dist/domains/job/composables/jobPriority.js +1 -2
  471. package/dist/domains/job/factory/JobFactory.js +1 -2
  472. package/dist/domains/job/valueObject/JobBaseResource.js +1 -2
  473. package/dist/domains/job/valueObject/JobStatus.js +1 -2
  474. package/dist/domains/listEditor/components/AListEditor.js +1 -2
  475. package/dist/domains/listEditor/components/AListEditor.vue_vue_type_script_setup_true_lang.js +1 -2
  476. package/dist/domains/listEditor/components/ANestedSortableListEditor.js +1 -2
  477. package/dist/domains/listEditor/components/ANestedSortableListEditor.vue_vue_type_script_setup_true_lang.js +1 -2
  478. package/dist/domains/listEditor/components/ASortableListEditor.js +1 -2
  479. package/dist/domains/listEditor/components/ASortableListEditor.vue_vue_type_script_setup_true_lang.js +1 -2
  480. package/dist/domains/listEditor/components/internal/LeChangeParentDialog.js +1 -2
  481. package/dist/domains/listEditor/components/internal/LeChangeParentDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  482. package/dist/domains/listEditor/components/internal/LeDeleteDialog.js +1 -2
  483. package/dist/domains/listEditor/components/internal/LeDeleteDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  484. package/dist/domains/listEditor/components/internal/LeDragHandle.js +1 -2
  485. package/dist/domains/listEditor/components/internal/LeDragHandle.vue_vue_type_script_setup_true_lang.js +1 -2
  486. package/dist/domains/listEditor/components/internal/LeEmptyState.js +1 -2
  487. package/dist/domains/listEditor/components/internal/LeEmptyState.vue_vue_type_script_setup_true_lang.js +1 -2
  488. package/dist/domains/listEditor/components/internal/LeMoveToPositionDialog.js +1 -2
  489. package/dist/domains/listEditor/components/internal/LeMoveToPositionDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  490. package/dist/domains/listEditor/components/internal/LeNestedRow.js +1 -2
  491. package/dist/domains/listEditor/components/internal/LeNestedRow.vue_vue_type_script_setup_true_lang.js +1 -2
  492. package/dist/domains/listEditor/components/internal/LeStatus.js +1 -2
  493. package/dist/domains/listEditor/components/internal/LeStatus.vue_vue_type_script_setup_true_lang.js +1 -2
  494. package/dist/domains/listEditor/components/internal/LeUnsavedLabel.js +1 -2
  495. package/dist/domains/listEditor/components/internal/LeUnsavedLabel.vue_vue_type_script_setup_true_lang.js +1 -2
  496. package/dist/domains/listEditor/components/internal/constants.js +1 -2
  497. package/dist/domains/listEditor/composables/useContainerWidth.js +1 -2
  498. package/dist/domains/listEditor/composables/useDeleteDialog.js +1 -2
  499. package/dist/domains/listEditor/composables/useDragInstruction.js +1 -2
  500. package/dist/domains/listEditor/composables/useInlineEditing.js +1 -2
  501. package/dist/domains/listEditor/composables/useIsTouchDevice.js +1 -2
  502. package/dist/domains/listEditor/composables/useKeyboardNav.js +2 -3
  503. package/dist/domains/listEditor/composables/useKeyboardNav.js.map +1 -1
  504. package/dist/domains/listEditor/composables/useListEditorController.js +1 -2
  505. package/dist/domains/listEditor/composables/useListEditorScopeValidity.js +1 -2
  506. package/dist/domains/listEditor/composables/useListEditorStateScope.js +1 -2
  507. package/dist/domains/listEditor/composables/useNestedListEditor.js +1 -2
  508. package/dist/domains/listEditor/composables/useNestedListEditorController.js +1 -2
  509. package/dist/domains/listEditor/composables/useReorderMode.js +1 -2
  510. package/dist/domains/listEditor/utils/listEditorLoader.js +1 -2
  511. package/dist/domains/listEditor/utils/positions.js +1 -2
  512. package/dist/domains/listEditor/utils/resolveCompactText.js +1 -2
  513. package/dist/domains/listEditor/utils/revealInvalidRows.js +1 -2
  514. package/dist/domains/listEditor/utils/tempId.js +1 -2
  515. package/dist/domains/log/api/logApi.js +0 -1
  516. package/dist/domains/log/components/ALogDatatable.js +1 -2
  517. package/dist/domains/log/components/ALogDatatable.vue_vue_type_script_setup_true_lang.js +1 -2
  518. package/dist/domains/log/components/ALogDetail.js +1 -2
  519. package/dist/domains/log/components/ALogDetail.vue_vue_type_script_setup_true_lang.js +1 -2
  520. package/dist/domains/log/components/ALogDetailView.js +1 -2
  521. package/dist/domains/log/components/ALogDetailView.vue_vue_type_script_setup_true_lang.js +1 -2
  522. package/dist/domains/log/components/ALogFilter.js +1 -2
  523. package/dist/domains/log/components/ALogFilter.vue_vue_type_script_setup_true_lang.js +1 -2
  524. package/dist/domains/log/components/ALogLevelChip.js +1 -2
  525. package/dist/domains/log/components/ALogLevelChip.vue_vue_type_script_setup_true_lang.js +1 -2
  526. package/dist/domains/log/components/ALogListView.js +1 -2
  527. package/dist/domains/log/components/ALogListView.vue_vue_type_script_setup_true_lang.js +1 -2
  528. package/dist/domains/log/composables/logActions.js +1 -2
  529. package/dist/domains/log/composables/logType.js +1 -2
  530. package/dist/domains/log/filter/logFilter.js +1 -2
  531. package/dist/domains/log/valueObject/LogLevel.js +6 -7
  532. package/dist/domains/log/valueObject/LogLevel.js.map +1 -1
  533. package/dist/domains/permission/components/APermissionEditor.js +1 -2
  534. package/dist/domains/permission/components/APermissionEditor.vue_vue_type_script_setup_true_lang.js +1 -2
  535. package/dist/domains/permission/components/APermissionGrantEditor.js +1 -2
  536. package/dist/domains/permission/components/APermissionGrantEditor.vue_vue_type_script_setup_true_lang.js +1 -2
  537. package/dist/domains/permission/components/APermissionValueChip.js +1 -2
  538. package/dist/domains/permission/components/APermissionValueChip.vue_vue_type_script_setup_true_lang.js +1 -2
  539. package/dist/domains/permission/composables/permissionActions.js +1 -2
  540. package/dist/domains/permission/config/api/permissionConfigApi.js +1 -2
  541. package/dist/domains/permission/config/composables/permissionConfigActions.js +1 -2
  542. package/dist/domains/permission/config/factory/PermissionConfigFactory.js +1 -2
  543. package/dist/domains/permission/config/store/permissionConfigStore.js +1 -2
  544. package/dist/domains/permission/group/api/permissionGroupApi.js +1 -2
  545. package/dist/domains/permission/group/components/APermissionGroupDatatable.js +1 -2
  546. package/dist/domains/permission/group/components/APermissionGroupDatatable.vue_vue_type_script_setup_true_lang.js +1 -2
  547. package/dist/domains/permission/group/components/APermissionGroupDetail.js +1 -2
  548. package/dist/domains/permission/group/components/APermissionGroupDetail.vue_vue_type_script_setup_true_lang.js +1 -2
  549. package/dist/domains/permission/group/components/APermissionGroupFilter.js +1 -2
  550. package/dist/domains/permission/group/components/APermissionGroupFilter.vue_vue_type_script_setup_true_lang.js +1 -2
  551. package/dist/domains/permission/group/components/APermissionGroupManage.js +1 -2
  552. package/dist/domains/permission/group/components/APermissionGroupManage.vue_vue_type_script_setup_true_lang.js +1 -2
  553. package/dist/domains/permission/group/components/APermissionGroupRemoteAutocomplete.js +1 -2
  554. package/dist/domains/permission/group/components/APermissionGroupRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +1 -2
  555. package/dist/domains/permission/group/composables/cachedPermissionGroups.js +1 -2
  556. package/dist/domains/permission/group/composables/permissionGroupActions.js +1 -2
  557. package/dist/domains/permission/group/composables/permissionGroupValidations.js +1 -2
  558. package/dist/domains/permission/group/factory/PermissionGroupFactory.js +1 -2
  559. package/dist/domains/permission/group/filter/permissionGroupFilter.js +1 -2
  560. package/dist/domains/permission/group/store/permissionGroupStore.js +1 -2
  561. package/dist/domains/permission/valueObject/GrantOrigin.js +1 -2
  562. package/dist/domains/remoteAutocomplete/components/AFilterRemoteAutocomplete.js +1 -2
  563. package/dist/domains/remoteAutocomplete/components/AFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +1 -2
  564. package/dist/domains/remoteAutocomplete/components/AFilterRemoteAutocompleteWithMinimal.js +1 -2
  565. package/dist/domains/remoteAutocomplete/components/AFilterRemoteAutocompleteWithMinimal.vue_vue_type_script_setup_true_lang.js +1 -2
  566. package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocomplete.js +1 -2
  567. package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js +1 -2
  568. package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocompleteWithCached.js +1 -2
  569. package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js +1 -2
  570. package/dist/domains/remoteAutocomplete/composables/createRemoteAutocomplete.js +1 -2
  571. package/dist/domains/subjectSelect/components/AFilterWrapperSubjectSelect.js +1 -2
  572. package/dist/domains/subjectSelect/components/AFilterWrapperSubjectSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  573. package/dist/domains/subjectSelect/components/ASubjectSelect.js +1 -2
  574. package/dist/domains/subjectSelect/components/ASubjectSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  575. package/dist/domains/subjectSelect/composables/useSubjectSelect.js +1 -2
  576. package/dist/domains/subjectSelect/utils/selectStrategies.js +1 -2
  577. package/dist/domains/system/appShell/components/AActionbar.js +1 -2
  578. package/dist/domains/system/appShell/components/AActionbar.vue_vue_type_script_setup_true_lang.js +1 -2
  579. package/dist/domains/system/appShell/components/AActionbarTarget.js +1 -2
  580. package/dist/domains/system/appShell/components/AActionbarTarget.vue_vue_type_script_setup_true_lang.js +1 -2
  581. package/dist/domains/system/appShell/components/ALayoutLoader.js +1 -2
  582. package/dist/domains/system/appShell/components/ALayoutLoader.vue_vue_type_script_setup_true_lang.js +1 -2
  583. package/dist/domains/system/appShell/components/ALayoutSwitch.js +1 -2
  584. package/dist/domains/system/appShell/components/ALayoutSwitch.vue_vue_type_script_setup_true_lang.js +1 -2
  585. package/dist/domains/system/appShell/composables/teleportSlot.js +1 -2
  586. package/dist/domains/system/components/AAdminSwitcher.js +1 -2
  587. package/dist/domains/system/components/AAdminSwitcher.vue_vue_type_script_setup_true_lang.js +1 -2
  588. package/dist/domains/system/components/AAlerts.js +1 -2
  589. package/dist/domains/system/components/AAlerts.vue_vue_type_script_setup_true_lang.js +1 -2
  590. package/dist/domains/system/components/ALanguageSelect.js +1 -2
  591. package/dist/domains/system/components/ALanguageSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  592. package/dist/domains/system/components/AThemeSelect.js +1 -2
  593. package/dist/domains/system/components/AThemeSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  594. package/dist/domains/system/composables/alerts.js +1 -2
  595. package/dist/domains/system/composables/alertsQueue.js +1 -2
  596. package/dist/domains/system/composables/breadcrumbs.d.ts +6 -6
  597. package/dist/domains/system/composables/breadcrumbs.js +8 -9
  598. package/dist/domains/system/composables/breadcrumbs.js.map +1 -1
  599. package/dist/domains/system/composables/languageSettings.js +1 -2
  600. package/dist/domains/system/composables/loginStatus.js +1 -2
  601. package/dist/domains/system/composables/navigationError.js +1 -2
  602. package/dist/domains/system/composables/pageNavigation.js +1 -2
  603. package/dist/domains/system/composables/recordActions.d.ts +41 -0
  604. package/dist/domains/system/composables/recordActions.js +32 -0
  605. package/dist/domains/system/composables/recordActions.js.map +1 -0
  606. package/dist/domains/system/composables/recordPage.d.ts +14 -4
  607. package/dist/domains/system/composables/recordPage.js +37 -36
  608. package/dist/domains/system/composables/recordPage.js.map +1 -1
  609. package/dist/domains/system/composables/routeHistory.js +34 -28
  610. package/dist/domains/system/composables/routeHistory.js.map +1 -1
  611. package/dist/domains/system/composables/sentry.js +1 -2
  612. package/dist/domains/system/composables/themeSettings.js +1 -2
  613. package/dist/domains/system/composables/useDebugFeatures.js +1 -2
  614. package/dist/domains/system/composables/useUnreleasedFeatures.js +1 -2
  615. package/dist/domains/system/composables/useUserActivity.js +1 -2
  616. package/dist/domains/system/flags/components/FlagCountry.js +1 -2
  617. package/dist/domains/system/flags/components/FlagCountry.vue_vue_type_script_setup_true_lang.js +1 -2
  618. package/dist/domains/system/flags/components/FlagEmpty.js +1 -2
  619. package/dist/domains/system/flags/components/FlagEn.js +1 -2
  620. package/dist/domains/system/flags/components/FlagSk.js +1 -2
  621. package/dist/domains/system/store/datatablePageStore.js +1 -2
  622. package/dist/domains/system/systemBar/components/ASystemBar.js +1 -2
  623. package/dist/domains/system/systemBar/components/ASystemBar.vue_vue_type_script_setup_true_lang.js +1 -2
  624. package/dist/domains/system/systemBar/components/ASystemBarNewVersion.js +1 -2
  625. package/dist/domains/system/systemBar/components/ASystemBarNewVersion.vue_vue_type_script_setup_true_lang.js +1 -2
  626. package/dist/domains/system/systemBar/composables/systemBar.js +1 -2
  627. package/dist/domains/system/systemBar/utils/appReload.js +1 -2
  628. package/dist/domains/system/systemBar/utils/pageReload.js +1 -2
  629. package/dist/domains/ui/buttons/action/components/AActionCloseButtonHistory.js +1 -2
  630. package/dist/domains/ui/buttons/action/components/AActionCloseButtonHistory.vue_vue_type_script_setup_true_lang.js +1 -2
  631. package/dist/domains/ui/buttons/action/components/AActionCreateButton.js +1 -2
  632. package/dist/domains/ui/buttons/action/components/AActionCreateButton.vue_vue_type_script_setup_true_lang.js +1 -2
  633. package/dist/domains/ui/buttons/action/components/AActionDeleteButton.js +1 -2
  634. package/dist/domains/ui/buttons/action/components/AActionDeleteButton.vue_vue_type_script_setup_true_lang.js +1 -2
  635. package/dist/domains/ui/buttons/action/components/AActionEditButton.js +1 -2
  636. package/dist/domains/ui/buttons/action/components/AActionEditButton.vue_vue_type_script_setup_true_lang.js +1 -2
  637. package/dist/domains/ui/buttons/action/components/AActionSaveAndCloseButton.js +1 -2
  638. package/dist/domains/ui/buttons/action/components/AActionSaveAndCloseButton.vue_vue_type_script_setup_true_lang.js +1 -2
  639. package/dist/domains/ui/buttons/action/components/AActionSaveButton.js +1 -2
  640. package/dist/domains/ui/buttons/action/components/AActionSaveButton.vue_vue_type_script_setup_true_lang.js +1 -2
  641. package/dist/domains/ui/buttons/components/ABtnSplit.js +1 -2
  642. package/dist/domains/ui/buttons/components/ABtnSplit.vue_vue_type_script_setup_true_lang.js +1 -2
  643. package/dist/domains/ui/buttons/table/components/ATableCopyIdButton.js +1 -2
  644. package/dist/domains/ui/buttons/table/components/ATableCopyIdButton.vue_vue_type_script_setup_true_lang.js +1 -2
  645. package/dist/domains/ui/buttons/table/components/ATableDetailButton.js +1 -2
  646. package/dist/domains/ui/buttons/table/components/ATableDetailButton.vue_vue_type_script_setup_true_lang.js +1 -2
  647. package/dist/domains/ui/buttons/table/components/ATableEditButton.js +1 -2
  648. package/dist/domains/ui/buttons/table/components/ATableEditButton.vue_vue_type_script_setup_true_lang.js +1 -2
  649. package/dist/domains/ui/components/AAnzuUserAvatar.js +1 -2
  650. package/dist/domains/ui/components/AAnzuUserAvatar.vue_vue_type_script_setup_true_lang.js +1 -2
  651. package/dist/domains/ui/components/AAvatarColorPicker.js +1 -2
  652. package/dist/domains/ui/components/AAvatarColorPicker.vue_vue_type_script_setup_true_lang.js +1 -2
  653. package/dist/domains/ui/components/ABooleanSelect.js +1 -2
  654. package/dist/domains/ui/components/ABooleanSelect.vue_vue_type_script_setup_true_lang.js +1 -2
  655. package/dist/domains/ui/components/ABooleanValue.js +1 -2
  656. package/dist/domains/ui/components/ABooleanValue.vue_vue_type_script_setup_true_lang.js +1 -2
  657. package/dist/domains/ui/components/ACard.js +1 -2
  658. package/dist/domains/ui/components/ACard.vue_vue_type_script_setup_true_lang.js +1 -2
  659. package/dist/domains/ui/components/ACardLoader.js +1 -2
  660. package/dist/domains/ui/components/ACardLoader.vue_vue_type_script_setup_true_lang.js +1 -2
  661. package/dist/domains/ui/components/AChipNoLink.js +1 -2
  662. package/dist/domains/ui/components/AChipNoLink.vue_vue_type_script_setup_true_lang.js +1 -2
  663. package/dist/domains/ui/components/ACopyText.js +1 -2
  664. package/dist/domains/ui/components/ACopyText.vue_vue_type_script_setup_true_lang.js +1 -2
  665. package/dist/domains/ui/components/ACreateDialog.js +1 -2
  666. package/dist/domains/ui/components/ACreateDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  667. package/dist/domains/ui/components/ACurrentUserDropdown.js +1 -2
  668. package/dist/domains/ui/components/ACurrentUserDropdown.vue_vue_type_script_setup_true_lang.js +1 -2
  669. package/dist/domains/ui/components/ADialogToolbar.js +1 -2
  670. package/dist/domains/ui/components/ADialogToolbar.vue_vue_type_script_setup_true_lang.js +1 -2
  671. package/dist/domains/ui/components/AIconGroup.js +1 -2
  672. package/dist/domains/ui/components/AIconGroup.vue_vue_type_script_setup_true_lang.js +1 -2
  673. package/dist/domains/ui/components/AProgress.js +1 -2
  674. package/dist/domains/ui/components/AProgress.vue_vue_type_script_setup_true_lang.js +1 -2
  675. package/dist/domains/ui/components/ARow.js +1 -2
  676. package/dist/domains/ui/components/ARow.vue_vue_type_script_setup_true_lang.js +1 -2
  677. package/dist/domains/ui/components/ATimeTrackingFields.js +1 -2
  678. package/dist/domains/ui/components/ATimeTrackingFields.vue_vue_type_script_setup_true_lang.js +1 -2
  679. package/dist/domains/ui/components/AUserAndTimeTrackingFields.js +1 -2
  680. package/dist/domains/ui/components/AUserAndTimeTrackingFields.vue_vue_type_script_setup_true_lang.js +1 -2
  681. package/dist/domains/ui/datetime/components/ADatetime.js +1 -2
  682. package/dist/domains/ui/datetime/components/ADatetime.vue_vue_type_script_setup_true_lang.js +1 -2
  683. package/dist/domains/ui/datetime/components/ADatetimePicker.js +1 -2
  684. package/dist/domains/ui/datetime/components/ADatetimePicker.vue_vue_type_script_setup_true_lang.js +1 -2
  685. package/dist/domains/ui/datetime/components/TimePicker.js +1 -2
  686. package/dist/domains/ui/datetime/components/TimePicker.vue_vue_type_script_setup_true_lang.js +1 -2
  687. package/dist/domains/ui/datetime/composables/remainingTime.js +1 -2
  688. package/dist/domains/ui/file/components/AFileDropzone.js +1 -2
  689. package/dist/domains/ui/file/components/AFileDropzone.vue_vue_type_script_setup_true_lang.js +1 -2
  690. package/dist/domains/ui/file/components/AFileInput.js +1 -2
  691. package/dist/domains/ui/file/components/AFileInput.vue_vue_type_script_setup_true_lang.js +1 -2
  692. package/dist/domains/ui/file/components/AFileInputDialog.js +1 -2
  693. package/dist/domains/ui/file/components/AFileInputDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  694. package/dist/domains/ui/file/composables/dropzone.js +1 -2
  695. package/dist/domains/ui/file/composables/formatAndSizeCheck.js +1 -2
  696. package/dist/domains/ui/file/utils/fileType.js +1 -2
  697. package/dist/domains/ui/view/components/AGenericView.js +1 -2
  698. package/dist/domains/ui/view/components/AGenericView.vue_vue_type_script_setup_true_lang.js +1 -2
  699. package/dist/domains/ui/view/components/ALoginView.js +1 -2
  700. package/dist/domains/ui/view/components/ALoginView.vue_vue_type_script_setup_true_lang.js +1 -2
  701. package/dist/domains/ui/view/components/ALogoutView.js +1 -2
  702. package/dist/domains/ui/view/components/ALogoutView.vue_vue_type_script_setup_true_lang.js +1 -2
  703. package/dist/domains/ui/view/components/ANotFoundView.js +1 -2
  704. package/dist/domains/ui/view/components/ANotFoundView.vue_vue_type_script_setup_true_lang.js +1 -2
  705. package/dist/domains/ui/view/components/AUnauthorizedView.js +1 -2
  706. package/dist/domains/ui/view/components/AUnauthorizedView.vue_vue_type_script_setup_true_lang.js +1 -2
  707. package/dist/domains/unsavedGuard/components/AUnsavedConfirmDialog.js +1 -2
  708. package/dist/domains/unsavedGuard/components/AUnsavedConfirmDialog.vue_vue_type_script_setup_true_lang.js +1 -2
  709. package/dist/domains/unsavedGuard/composables/useUnsavedChangesGuard.js +1 -2
  710. package/dist/domains/unsavedGuard/composables/useUnsavedSection.js +1 -2
  711. package/dist/lib.d.ts +3 -2
  712. package/dist/locales/cs/common/alert.js +1 -2
  713. package/dist/locales/cs/common/anzuUser.js +1 -2
  714. package/dist/locales/cs/common/assetSelect.js +1 -2
  715. package/dist/locales/cs/common/button.js +1 -2
  716. package/dist/locales/cs/common/collab.js +1 -2
  717. package/dist/locales/cs/common/confirmDialog.js +1 -2
  718. package/dist/locales/cs/common/customForm.js +1 -2
  719. package/dist/locales/cs/common/customFormElement.js +1 -2
  720. package/dist/locales/cs/common/damImage.js +1 -2
  721. package/dist/locales/cs/common/dayOfWeek.js +1 -2
  722. package/dist/locales/cs/common/filter.js +1 -2
  723. package/dist/locales/cs/common/job.js +1 -2
  724. package/dist/locales/cs/common/linkDto.js +1 -2
  725. package/dist/locales/cs/common/listItemDto.js +1 -2
  726. package/dist/locales/cs/common/log.js +1 -2
  727. package/dist/locales/cs/common/model.js +1 -2
  728. package/dist/locales/cs/common/permission.js +1 -2
  729. package/dist/locales/cs/common/permissionEditor.js +1 -2
  730. package/dist/locales/cs/common/permissionGroup.js +1 -2
  731. package/dist/locales/cs/common/routeSettings.js +1 -2
  732. package/dist/locales/cs/common/sortable.js +1 -2
  733. package/dist/locales/cs/common/subjectSelect.js +1 -2
  734. package/dist/locales/cs/common/system.js +1 -2
  735. package/dist/locales/cs/common/time.js +1 -2
  736. package/dist/locales/cs/common/userSystem.js +1 -2
  737. package/dist/locales/cs/error/apiDependencyExists.js +1 -2
  738. package/dist/locales/cs/error/apiForbiddenOperation.js +1 -2
  739. package/dist/locales/cs/error/apiTimedOut.js +1 -2
  740. package/dist/locales/cs/error/apiValidation.js +1 -2
  741. package/dist/locales/cs/error/jsValidation.js +1 -2
  742. package/dist/locales/cs/vuetify.js +1 -2
  743. package/dist/locales/cs.js +1 -2
  744. package/dist/locales/en/common/alert.js +1 -2
  745. package/dist/locales/en/common/anzuUser.js +1 -2
  746. package/dist/locales/en/common/assetSelect.js +1 -2
  747. package/dist/locales/en/common/button.js +1 -2
  748. package/dist/locales/en/common/collab.js +1 -2
  749. package/dist/locales/en/common/confirmDialog.js +1 -2
  750. package/dist/locales/en/common/customForm.js +1 -2
  751. package/dist/locales/en/common/customFormElement.js +1 -2
  752. package/dist/locales/en/common/damImage.js +1 -2
  753. package/dist/locales/en/common/dayOfWeek.js +1 -2
  754. package/dist/locales/en/common/filter.js +1 -2
  755. package/dist/locales/en/common/job.js +1 -2
  756. package/dist/locales/en/common/linkDto.js +1 -2
  757. package/dist/locales/en/common/listItemDto.js +1 -2
  758. package/dist/locales/en/common/log.js +1 -2
  759. package/dist/locales/en/common/model.js +1 -2
  760. package/dist/locales/en/common/permission.js +1 -2
  761. package/dist/locales/en/common/permissionEditor.js +1 -2
  762. package/dist/locales/en/common/permissionGroup.js +1 -2
  763. package/dist/locales/en/common/routeSettings.js +1 -2
  764. package/dist/locales/en/common/sortable.js +1 -2
  765. package/dist/locales/en/common/subjectSelect.js +1 -2
  766. package/dist/locales/en/common/system.js +1 -2
  767. package/dist/locales/en/common/time.js +1 -2
  768. package/dist/locales/en/common/userSystem.js +1 -2
  769. package/dist/locales/en/error/apiDependencyExists.js +1 -2
  770. package/dist/locales/en/error/apiForbiddenOperation.js +1 -2
  771. package/dist/locales/en/error/apiTimedOut.js +1 -2
  772. package/dist/locales/en/error/apiValidation.js +1 -2
  773. package/dist/locales/en/error/jsValidation.js +1 -2
  774. package/dist/locales/en/vuetify.js +1 -2
  775. package/dist/locales/en.js +1 -2
  776. package/dist/locales/sk/common/alert.js +1 -2
  777. package/dist/locales/sk/common/anzuUser.js +1 -2
  778. package/dist/locales/sk/common/assetSelect.js +1 -2
  779. package/dist/locales/sk/common/button.js +1 -2
  780. package/dist/locales/sk/common/collab.js +1 -2
  781. package/dist/locales/sk/common/confirmDialog.js +1 -2
  782. package/dist/locales/sk/common/customForm.js +1 -2
  783. package/dist/locales/sk/common/customFormElement.js +1 -2
  784. package/dist/locales/sk/common/damImage.js +1 -2
  785. package/dist/locales/sk/common/dayOfWeek.js +1 -2
  786. package/dist/locales/sk/common/filter.js +1 -2
  787. package/dist/locales/sk/common/job.js +1 -2
  788. package/dist/locales/sk/common/linkDto.js +1 -2
  789. package/dist/locales/sk/common/listItemDto.js +1 -2
  790. package/dist/locales/sk/common/log.js +1 -2
  791. package/dist/locales/sk/common/model.js +1 -2
  792. package/dist/locales/sk/common/permission.js +1 -2
  793. package/dist/locales/sk/common/permissionEditor.js +1 -2
  794. package/dist/locales/sk/common/permissionGroup.js +1 -2
  795. package/dist/locales/sk/common/routeSettings.js +1 -2
  796. package/dist/locales/sk/common/sortable.js +1 -2
  797. package/dist/locales/sk/common/subjectSelect.js +1 -2
  798. package/dist/locales/sk/common/system.js +1 -2
  799. package/dist/locales/sk/common/time.js +1 -2
  800. package/dist/locales/sk/common/userSystem.js +1 -2
  801. package/dist/locales/sk/error/apiDependencyExists.js +1 -2
  802. package/dist/locales/sk/error/apiForbiddenOperation.js +1 -2
  803. package/dist/locales/sk/error/apiTimedOut.js +1 -2
  804. package/dist/locales/sk/error/apiValidation.js +1 -2
  805. package/dist/locales/sk/error/jsValidation.js +1 -2
  806. package/dist/locales/sk/vuetify.js +1 -2
  807. package/dist/locales/sk.js +1 -2
  808. package/dist/plugins/commonVuetifyConfig.js +1 -2
  809. package/dist/plugins/i18n.js +1 -2
  810. package/dist/plugins/pluginOptions.js +1 -2
  811. package/dist/plugins/webfontloader.js +0 -1
  812. package/dist/shared/commonConfig.js +0 -1
  813. package/dist/shared/error/AnzuApiAxiosError.js +1 -2
  814. package/dist/shared/error/AnzuApiCancelledError.js +1 -2
  815. package/dist/shared/error/AnzuApiDependencyExistsError.js +1 -2
  816. package/dist/shared/error/AnzuApiForbiddenError.js +1 -2
  817. package/dist/shared/error/AnzuApiForbiddenOperationError.js +1 -2
  818. package/dist/shared/error/AnzuApiResponseCodeError.js +1 -2
  819. package/dist/shared/error/AnzuApiTimeoutError.js +1 -2
  820. package/dist/shared/error/AnzuApiValidationError.js +1 -2
  821. package/dist/shared/error/AnzuError.js +1 -2
  822. package/dist/shared/error/AnzuFatalError.js +1 -2
  823. package/dist/shared/error/AnzuNewVersionFetchError.js +1 -2
  824. package/dist/shared/error/AuthUnavailableError.js +1 -2
  825. package/dist/shared/error/SessionExpiredError.js +1 -2
  826. package/dist/shared/error/isInCauseChain.js +1 -2
  827. package/dist/shared/injectionKeys.js +1 -2
  828. package/dist/shared/statusCodes.js +1 -2
  829. package/dist/shared/types/CreatedByAware.js +1 -2
  830. package/dist/shared/types/OwnerAware.js +1 -2
  831. package/dist/shared/types/utils.js +1 -2
  832. package/dist/shared/utils/array.js +1 -2
  833. package/dist/shared/utils/boolean.js +1 -2
  834. package/dist/shared/utils/common.js +1 -2
  835. package/dist/shared/utils/datetime.js +0 -1
  836. package/dist/shared/utils/datetimePickerValue.js +0 -1
  837. package/dist/shared/utils/development.js +1 -2
  838. package/dist/shared/utils/enum.js +1 -2
  839. package/dist/shared/utils/envConfig.js +1 -2
  840. package/dist/shared/utils/event.js +1 -2
  841. package/dist/shared/utils/file.js +1 -2
  842. package/dist/shared/utils/generator.js +1 -2
  843. package/dist/shared/utils/history.js +1 -2
  844. package/dist/shared/utils/json.js +1 -2
  845. package/dist/shared/utils/number.js +1 -2
  846. package/dist/shared/utils/object.js +1 -2
  847. package/dist/shared/utils/string.js +1 -2
  848. package/dist/shared/utils/userAndTimeTracking.js +1 -2
  849. package/dist/shared/validators/vuelidate/common/useValidateBetween.js +1 -2
  850. package/dist/shared/validators/vuelidate/common/useValidateCompareDates.js +1 -2
  851. package/dist/shared/validators/vuelidate/common/useValidateEmail.js +1 -2
  852. package/dist/shared/validators/vuelidate/common/useValidateHexColor.js +1 -2
  853. package/dist/shared/validators/vuelidate/common/useValidateMaxLength.js +1 -2
  854. package/dist/shared/validators/vuelidate/common/useValidateMaxValue.js +1 -2
  855. package/dist/shared/validators/vuelidate/common/useValidateMinLength.js +1 -2
  856. package/dist/shared/validators/vuelidate/common/useValidateMinValue.js +1 -2
  857. package/dist/shared/validators/vuelidate/common/useValidateNumeric.js +1 -2
  858. package/dist/shared/validators/vuelidate/common/useValidateRequired.js +1 -2
  859. package/dist/shared/validators/vuelidate/common/useValidateRequiredIf.js +1 -2
  860. package/dist/shared/validators/vuelidate/common/useValidateSlug.js +1 -2
  861. package/dist/shared/validators/vuelidate/common/useValidateStringArrayItemLength.js +1 -2
  862. package/dist/shared/validators/vuelidate/common/useValidateUrl.js +1 -2
  863. package/dist/shared/validators/vuelidate/useValidate.js +1 -2
  864. package/dist/testing/appShell.js +1 -2
  865. package/dist/testing/closeButtons.js +1 -2
  866. package/dist/testing/declaredDependencies.js +1 -2
  867. package/dist/testing/generatedRoutes.js +1 -2
  868. package/dist/testing/routeHistory.js +1 -2
  869. package/dist/testing/sortableLists.js +1 -2
  870. package/dist/testing/typedRouter.js +1 -2
  871. package/dist/vendor/@cropper/element/dist/element.esm.raw.js +2 -3
  872. package/dist/vendor/@cropper/element/dist/element.esm.raw.js.map +1 -1
  873. package/dist/vendor/@cropper/element-canvas/dist/element-canvas.esm.raw.js +2 -3
  874. package/dist/vendor/@cropper/element-canvas/dist/element-canvas.esm.raw.js.map +1 -1
  875. package/dist/vendor/@cropper/element-crosshair/dist/element-crosshair.esm.raw.js +2 -3
  876. package/dist/vendor/@cropper/element-crosshair/dist/element-crosshair.esm.raw.js.map +1 -1
  877. package/dist/vendor/@cropper/element-grid/dist/element-grid.esm.raw.js +2 -3
  878. package/dist/vendor/@cropper/element-grid/dist/element-grid.esm.raw.js.map +1 -1
  879. package/dist/vendor/@cropper/element-handle/dist/element-handle.esm.raw.js +2 -3
  880. package/dist/vendor/@cropper/element-handle/dist/element-handle.esm.raw.js.map +1 -1
  881. package/dist/vendor/@cropper/element-image/dist/element-image.esm.raw.js +77 -62
  882. package/dist/vendor/@cropper/element-image/dist/element-image.esm.raw.js.map +1 -1
  883. package/dist/vendor/@cropper/element-selection/dist/element-selection.esm.raw.js +199 -54
  884. package/dist/vendor/@cropper/element-selection/dist/element-selection.esm.raw.js.map +1 -1
  885. package/dist/vendor/@cropper/element-shade/dist/element-shade.esm.raw.js +12 -6
  886. package/dist/vendor/@cropper/element-shade/dist/element-shade.esm.raw.js.map +1 -1
  887. package/dist/vendor/@cropper/element-viewer/dist/element-viewer.esm.raw.js +9 -10
  888. package/dist/vendor/@cropper/element-viewer/dist/element-viewer.esm.raw.js.map +1 -1
  889. package/dist/vendor/@cropper/utils/dist/utils.esm.raw.js +90 -48
  890. package/dist/vendor/@cropper/utils/dist/utils.esm.raw.js.map +1 -1
  891. package/dist/vendor/{cropperjs2 → cropperjs}/dist/cropper.esm.raw.js +11 -12
  892. package/dist/vendor/cropperjs/dist/cropper.esm.raw.js.map +1 -0
  893. package/dist/vendor/rusha/dist/rusha.js +1 -2
  894. package/dist/vendor/uuid/dist/rng.js +1 -2
  895. package/dist/vendor/uuid/dist/stringify.js +1 -2
  896. package/dist/vendor/uuid/dist/v1.js +1 -2
  897. package/dist/vendor/uuid/dist/v4.js +1 -2
  898. package/package.json +10 -10
  899. package/src/eslint/adminConfig.mjs +2 -1
  900. package/src/eslint/oxlint-admin.json +3 -0
  901. package/dist/vendor/cropperjs2/dist/cropper.esm.raw.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js","names":["_useModel","imagePlaceholderPath","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_normalizeClass","_normalizeStyle","_createTextVNode","_toDisplayString","_createCommentVNode","_createVNode","ACollabLockedByUser","_createBlock","_component_VBtn","_unref","_withCtx","AFileInputDialog","_mergeProps","_withModifiers","_component_VIcon","_component_VTooltip","_component_VMenu","_component_VCard","_component_VList","_component_VListItem","_component_VListItemTitle","_component_VImg","_component_VProgressCircular","AImageDropzone","_renderSlot","ImageDetailDialogMetadata","AAssetSelectMedia","AssetDetailDialog","UploadQueueDialogSingle","ACollabLockedByUser_default","AFileDropzone_default","placeholder16x9_default","AssetDetailDialog_default","ImageDetailDialogMetadata_default","UploadQueueDialogSingle_default","AFileInputDialog_default","AAssetSelectMedia_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","ImageMediaWidgetInner_vue_vue_type_script_setup_true_lang_default","CollabStatus","\"image\"","\"imageModifiers\"","\"media\"","\"mediaModifiers\"","__expose","__emit","props","__props","emit","imageModel","useModel","mediaModel","damConfigName","useDamConfigName","useCommonAdminCollabOptions","useCollabState","releaseFieldLock","ref","changeFieldData","acquireFieldLock","lockedByUserLocal","collabOptions","isDefined","useCollabField","releaseCollabFieldLock","changeCollabFieldData","acquireCollabFieldLock","watch","lockedByUser","newValue","addCollabFieldLockStatusListener","data","CollabFieldLockStatus","CollabFieldLockType","lockRequestPending","collabValue","lockedLocal","ownLockTurn","takeLockTurn","takeFieldLockTurn","lockTurnTakenSince","lastFieldLockTurn","acquireFieldLockLocal","again","releaseFieldLockLocal","releaseFieldLockWith","value","imageWidgetUploadConfig","inject","ImageWidgetUploadConfigKey","isUndefined","useI18n","useAlerts","imageOptions","useCommonAdminImageOptions","useImageActions","uploadQueuesStore","useUploadQueuesStore","useUploadQueueDialog","imageMediaWidgetStore","useImageMediaWidgetStore","storeToRefs","thisWidget","resImageMedia","clickMenuOpened","assetSelectDialog","metadataDialog","metadataDialogSaving","metadataDialogLoading","fileInputDialog","useImageDialogDamAuthors","isImageCreateUpdateAware","detail","shows","hideDropzoneText","computed","isNull","resolvedSrc","uploadQueue","imageMediaLoaded","ownInDialog","pickInDialog","loadingInDialog","answerTakenFor","disposed","opening","resImageReadAt","ownImageSaves","cancelSaveWait","dialogType","DamAssetType","actionEditMeta","type","heldId","id","othersSaves","isNumber","imageSavesOfOthersOver","thisOpening","over","withinWaitLimit","WAIT_RAN_OUT","showErrorT","heldAnew","readHeldAnew","anew","savedId","saved","imageSavedSince","reloadImage","toRaw","takeHeldAnew","showReadInForm","actionLibrary","useExtSystemIdForCached","collabFieldLockReallyLocked","LOCK_WAIT_CANCELLED","pendingLockWaits","wait","deletePending","holdImage","waitForFieldLockIsReallyAcquired","count","checkLock","resolve","dropInWait","onDrop","files","isLocked","config","thisDrop","anyWidgetDialogOpened","showWarningT","stopQueueLeftBehind","onCopyToLicence","onFileInput","useDamAcceptTypeAndSizeHelper","createdImageId","newImage","force","cloneDeep","widgetImageToDamImageUrl","newImageId","readAt","imageApi","imageClient","error","reloadMedia","newMedia","isMediaAware","damImageIdToDamImageUrl","reset","release","oldImage","oldImageId","oldMedia","created","assetSelectStore","useAssetSelectStore","useDamConfigState","assetPicksPending","onAssetSelectConfirm","thisPick","pickAsset","offerNoDamAuthors","description","source","selectedAsset","mediaDataFromDam","fetchAssetAsCmsMedia","damClient","endPointCmsAsset","assetFileIsVideoFile","mediaData","assetFileIsAudioFile","copyToLicenceEnabled","copyRes","copyToLicence","endPointImage","authorsToOffer","assetRes","fetchAsset","endPointAsset","customAssetSelectMetadataToImageMap","mapped","isString","fetchAuthorListByIds","endPointAuthor","getExtSystemByLicence","author","getDamConfigExtSystem","assetMetadataMayStillChange","offerDamAuthorsOf","image","createDamImage","forceReloadViewWithExpandMetadata","assetDetailStore","useAssetDetailStore","assetDialog","useCommonAdminCoreDamOptions","onEditAsset","extSystem","fetchAssetByFileId","assetFileId","shownUnder","loadAssetDetailExtSystem","onMetadataDialogClose","tryMediaConfirm","media","tryImageConfirm","holdConfirmForDetailAssetRead","detailDialogMetadataComponent","pressedOn","confirmIsOver","authorsSendIsOver","letGoHeld","letGoOnceSavedWithSource","authorsAsset","damAuthorsAsset","givenMeanwhile","authorsGivenMeanwhile","showErrorsDefault","showUnknownError","giveNamesToEmptySource","authorsRes","updateAssetAuthors","imageFieldsOf","res","noteImageSave","ownDialogOpen","shown","dialogOfAnotherPick","onMetadataDialogConfirm","onImageMediaDelete","imageId","onAssetUploadConfirm","items","expandedUploadDialog","onDropzoneClick","metadataConfirm","onOptionsButtonClick","uploadQueueDialog","preselectType","DamMediaType","oldValue","readonly","collabReconnecting","reconnecting","status","previous","openBlock","createElementBlock","Fragment","createElementVNode","normalizeClass","normalizeStyle","createTextVNode","toDisplayString","createCommentVNode","createVNode","createBlock","VBtn","unref","t","withCtx","replaceFromDamLabel","addFromDamLabel","_cache","$event","uploadAccept","uploadSizes","fileInputProps","mergeProps","withModifiers","VIcon","VTooltip","VMenu","VCard","VList","VListItem","VListItemTitle","VImg","VProgressCircular","renderSlot","_ctx","showSourceEnabled","sourceLabel","editAssetLabel","confirmWaits","pickDamAuthors","appendMedia","cachedExtSystemId","onAssetDetailClose"],"sources":["../../../../../src/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport AImageDropzone from '@/domains/ui/file/components/AFileDropzone.vue'\nimport type { DocId, IntegerId, IntegerIdNullable } from '@/shared/types/common'\nimport type { ImageAware, ImageCreateUpdateAware } from '@/domains/dam/types/ImageAware'\nimport imagePlaceholderPath from '@/assets/image/placeholder16x9.svg'\nimport { useCommonAdminImageOptions } from '@/domains/dam/imageWidget/composables/commonAdminImageOptions'\nimport { useImageActions } from '@/domains/dam/imageWidget/composables/imageActions'\nimport { cloneDeep, isDefined, isNull, isNumber, isString, isUndefined } from '@/shared/utils/common'\nimport { useDamConfigState } from '@/domains/dam/config/composables/damConfigState'\nimport { useAlerts } from '@/domains/system/composables/alerts'\nimport {\n type AssetDetailItemDto,\n DamAssetType,\n type DamAssetTypeType,\n type DamImageCopyToLicenceResponse,\n} from '@/domains/dam/types/Asset'\nimport { useDamAcceptTypeAndSizeHelper } from '@/domains/dam/config/composables/acceptTypeAndSizeHelper'\nimport { useUploadQueuesStore } from '@/domains/dam/uploadQueue/store/uploadQueuesStore'\nimport type { UploadQueueKey } from '@/domains/dam/types/UploadQueue'\nimport type { AssetSelectReturnData } from '@/domains/dam/types/AssetSelect'\nimport type { DamConfigLicenceExtSystemReturnType } from '@/domains/dam/types/DamConfig'\nimport ImageDetailDialogMetadata from '@/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue'\nimport { computed, inject, onBeforeUnmount, ref, type ShallowRef, toRaw, watch } from 'vue'\nimport AssetDetailDialog from '@/domains/dam/assetDetail/components/AssetDetailDialog.vue'\nimport { useAssetDetailStore } from '@/domains/dam/assetDetail/store/assetDetailStore'\nimport { loadAssetDetailExtSystem } from '@/domains/dam/assetDetail/composables/assetDetailExtSystem'\nimport { storeToRefs } from 'pinia'\nimport {\n fetchAsset,\n fetchAssetAsCmsMedia,\n fetchAssetByFileId,\n showMetadataSaveError,\n updateAssetAuthors,\n} from '@/domains/dam/api/damAssetApi'\nimport { useCommonAdminCoreDamOptions } from '@/domains/dam/composables/commonAdminCoreDamOptions'\nimport UploadQueueDialogSingle from '@/domains/dam/uploadQueue/components/UploadQueueDialogSingle.vue'\nimport { useUploadQueueDialog } from '@/domains/dam/uploadQueue/composables/useUploadQueueDialog'\nimport { fetchAuthorListByIds } from '@/domains/dam/author/api/authorApi'\nimport { useI18n } from 'vue-i18n'\nimport type { VBtn } from 'vuetify/components'\nimport { useExtSystemIdForCached } from '@/domains/dam/composables/extSystemIdForCached'\nimport { useAssetSelectStore } from '@/domains/dam/assetSelect/store/assetSelectStore'\nimport {\n type CollabComponentConfig,\n type CollabFieldData,\n type CollabFieldLockOptions,\n CollabStatus,\n type CollabStatusType,\n} from '@/domains/collab/types/Collab'\nimport { useCommonAdminCollabOptions } from '@/domains/collab/composables/commonAdminCollabOptions'\nimport { useCollabState } from '@/domains/collab/composables/collabState'\nimport { useCollabField } from '@/domains/collab/composables/collabField'\nimport ACollabLockedByUser from '@/domains/collab/components/ACollabLockedByUser.vue'\nimport AFileInputDialog from '@/domains/ui/file/components/AFileInputDialog.vue'\nimport {\n CollabFieldLockStatus,\n type CollabFieldLockStatusPayload,\n CollabFieldLockType,\n} from '@/domains/collab/composables/collabEventBus'\nimport { ImageWidgetUploadConfigKey } from '@/domains/dam/imageWidget/utils/imageWidgetInkectionKeys'\nimport AAssetSelectMedia from '@/domains/dam/assetSelect/components/AAssetSelectMedia.vue'\nimport {\n isImageCreateUpdateAware,\n isMediaAware,\n useImageMediaWidgetStore,\n} from '@/domains/dam/imageWidget/store/imageMediaWidgetStore'\nimport {\n type DamMediaFromDam,\n DamMediaType,\n type DamMediaTypeType,\n type ImageMediaCollabValue,\n type MediaAware,\n} from '@/domains/dam/types/MediaAware'\nimport { assetFileIsAudioFile, assetFileIsVideoFile } from '@/domains/dam/types/AssetFile'\nimport { copyToLicence } from '@/domains/dam/api/damImageApi'\nimport { createDamImage, imageFieldsOf } from '@/domains/dam/imageWidget/utils/damImage'\nimport { assetMetadataMayStillChange } from '@/domains/dam/assetDetail/utils/assetMetadataMayStillChange'\nimport { useDamConfigName } from '@/domains/dam/composables/damConfigName'\nimport {\n giveNamesToEmptySource,\n type HeldAssetAnew,\n useImageDialogDamAuthors,\n} from '@/domains/dam/imageWidget/composables/imageDialogDamAuthors'\nimport { lastFieldLockTurn, takeFieldLockTurn } from '@/domains/dam/imageWidget/utils/fieldLockTurns'\nimport {\n holdImage,\n imageSavedSince,\n imageSavesOfOthersOver,\n noteImageSave,\n} from '@/domains/dam/imageWidget/utils/imageSaves'\nimport { WAIT_RAN_OUT, withinWaitLimit } from '@/domains/dam/imageWidget/utils/waitLimit'\n\nconst props = withDefaults(\n defineProps<{\n queueKey: UploadQueueKey\n uploadLicence: IntegerId\n selectLicences: IntegerId[]\n initialImage?: ImageAware | undefined // optional, if available, no need to fetch image data\n configName?: string\n collab?: CollabComponentConfig\n collabStatus?: CollabStatusType\n label?: string | undefined\n required?: boolean\n readonly?: boolean\n dataCy?: string | undefined\n expandOptions?: boolean\n expandMetadata?: boolean // only one at once, use in dialogs\n disableOnClickMenu?: boolean\n width?: number | undefined\n maxWidth?: number | undefined\n height?: number | undefined\n callDeleteApiOnRemove?: boolean\n damWidth?: undefined | number\n damHeight?: undefined | number\n }>(),\n {\n configName: undefined,\n collab: undefined,\n collabStatus: CollabStatus.Inactive,\n label: undefined,\n required: false,\n initialImage: undefined,\n initialMedia: undefined,\n readonly: false,\n lockable: false,\n lockedById: undefined,\n dataCy: undefined,\n expandOptions: false,\n expandMetadata: false,\n disableOnClickMenu: false,\n width: undefined,\n maxWidth: undefined,\n height: undefined,\n callDeleteApiOnRemove: false,\n damWidth: undefined,\n damHeight: undefined,\n }\n)\n\nconst emit = defineEmits<{\n (e: 'afterMetadataSaveSuccess'): void\n}>()\n\nconst imageModel = defineModel<IntegerIdNullable>('image', { required: true })\nconst mediaModel = defineModel<MediaAware | null>('media', { required: true })\n// eslint-disable-next-line vue/no-setup-props-reactivity-loss\nconst damConfigName = useDamConfigName(props.configName)\n\n// Collaboration\nconst { collabOptions } = useCommonAdminCollabOptions()\nconst { collabReconnecting } = useCollabState()\n\nconst releaseFieldLock = ref((_data: CollabFieldData, _options?: Partial<CollabFieldLockOptions>) => {})\nconst changeFieldData = ref((_data: CollabFieldData) => {})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst acquireFieldLock = ref((options?: Partial<CollabFieldLockOptions>) => {})\nconst lockedByUserLocal = ref<IntegerIdNullable>(null)\n// eslint-disable-next-line vue/no-setup-props-reactivity-loss\nif (collabOptions.value.enabled && isDefined(props.collab)) {\n const {\n releaseCollabFieldLock,\n acquireCollabFieldLock,\n changeCollabFieldData,\n addCollabFieldLockStatusListener,\n lockedByUser,\n } = useCollabField(props.collab.room, props.collab.field)\n releaseFieldLock.value = releaseCollabFieldLock\n changeFieldData.value = changeCollabFieldData\n acquireFieldLock.value = acquireCollabFieldLock\n watch(\n lockedByUser,\n (newValue) => {\n lockedByUserLocal.value = newValue\n },\n { immediate: true }\n )\n addCollabFieldLockStatusListener((data: CollabFieldLockStatusPayload) => {\n if (data.status === CollabFieldLockStatus.Success && data.type === CollabFieldLockType.Acquire) {\n lockRequestPending.value = false\n collabFieldLockReallyLocked.value = true\n } else if (data.status === CollabFieldLockStatus.Failure && data.type === CollabFieldLockType.Acquire) {\n lockRequestPending.value = false\n collabFieldLockReallyLocked.value = false\n } else if (lockRequestPending.value) {\n // The answer to a release sent before a request still out says nothing about that request, whose own answer\n // decides: a refused release read as the lock held let a drop upload before its request was answered.\n return\n } else if (data.status === CollabFieldLockStatus.Success && data.type === CollabFieldLockType.Release) {\n collabFieldLockReallyLocked.value = false\n } else if (data.status === CollabFieldLockStatus.Failure && data.type === CollabFieldLockType.Release) {\n collabFieldLockReallyLocked.value = true\n }\n })\n}\n// What the field holds, both halves: an image or a media, and the other editors have to know which. Read from the\n// models only where they already hold it: an assignment to a `v-model` model shows there after the parent renders,\n// so the paths that just assigned send what they assigned.\nconst collabValue = (): ImageMediaCollabValue => ({ image: imageModel.value, media: mediaModel.value })\nconst lockedLocal = ref(false)\n// The turn of the lock of the field this widget took last, by a request or a release. Another widget of the same field\n// may have taken one since: the widget drawn in place of this one once it is gone.\nlet ownLockTurn = 0\nconst takeLockTurn = () => {\n if (isDefined(props.collab)) ownLockTurn = takeFieldLockTurn(props.collab.room, props.collab.field)\n}\nconst lockTurnTakenSince = () =>\n isDefined(props.collab) && lastFieldLockTurn(props.collab.room, props.collab.field) !== ownLockTurn\n// Asked for once per lock. A drop asks again for a lock not confirmed yet: a refused request left every later drop\n// waiting on a lock never granted. A refusal does not forget the lock either: a timed-out request answers the same,\n// and the server may have granted it, so it is still released. Never asked while a request is out: a second one\n// could answer after the first, and one sent by the click that closes the menu raced its release on the server.\nconst lockRequestPending = ref(false)\nconst acquireFieldLockLocal = (again = false) => {\n if (props.collabStatus === CollabStatus.Inactive) return\n if (lockedLocal.value === true && (!again || lockRequestPending.value || collabFieldLockReallyLocked.value)) return\n // What an earlier answer left says nothing about this lock: the wait for it waits for this answer.\n collabFieldLockReallyLocked.value = false\n lockRequestPending.value = true\n acquireFieldLock.value()\n takeLockTurn()\n lockedLocal.value = true\n}\n// A lock taken while the room was active is released in an inactive one too: the room turned inactive because the\n// other editor left, and the server still holds it for whoever comes back.\nconst releaseFieldLockLocal = () => {\n if (lockedLocal.value === false) return\n releaseFieldLock.value(collabValue())\n takeLockTurn()\n lockedLocal.value = false\n}\n// One release per lock: the server refuses a second one, and its refusal read as the lock still held. An inactive\n// room keeps the value for the editors who join, lock or not.\nconst releaseFieldLockWith = (value: ImageMediaCollabValue) => {\n if (lockedLocal.value === false && props.collabStatus !== CollabStatus.Inactive) return\n releaseFieldLock.value(value)\n takeLockTurn()\n lockedLocal.value = false\n}\n\nconst imageWidgetUploadConfig = inject<ShallowRef<DamConfigLicenceExtSystemReturnType | undefined> | undefined>(\n ImageWidgetUploadConfigKey,\n undefined\n)\n\nif (isUndefined(imageWidgetUploadConfig) || isUndefined(imageWidgetUploadConfig.value)) {\n throw new Error(\"Fatal error, parent component doesn't provide necessary config ext system config.\")\n}\n\nconst { t } = useI18n()\n\nconst { showErrorsDefault, showErrorT, showWarningT, showUnknownError } = useAlerts()\n\nconst imageOptions = useCommonAdminImageOptions(damConfigName)\nconst { imageClient, imageApi } = imageOptions\nconst { widgetImageToDamImageUrl, damImageIdToDamImageUrl } = useImageActions(imageOptions)\nconst uploadQueuesStore = useUploadQueuesStore()\nconst { uploadQueueDialog, stopQueueLeftBehind } = useUploadQueueDialog()\n// Before the immediate watcher below: with expandMetadata it writes the detail while setup runs. Not the form an open\n// dialog of another widget shows: a widget drawn late, once its configuration was read, emptied that form.\nconst imageMediaWidgetStore = useImageMediaWidgetStore()\nimageMediaWidgetStore.resetUnlessShown()\nconst { detail } = storeToRefs(imageMediaWidgetStore)\nconst thisWidget = Symbol('image media widget')\n\nconst resImageMedia = ref<null | ImageCreateUpdateAware | MediaAware>(null)\nconst clickMenuOpened = ref(false)\nconst assetSelectDialog = ref(false)\nconst metadataDialog = ref(false)\nconst metadataDialogSaving = ref(false)\nconst metadataDialogLoading = ref(false)\nconst fileInputDialog = ref(false)\n\n// The authors of the DAM the dialog of the image offers are those of an asset this widget has read itself, for the\n// image that dialog shows, or draws in the page with `expandMetadata`.\nconst {\n damAuthorsAsset,\n offerDamAuthorsOf,\n offerNoDamAuthors,\n pickDamAuthors,\n onAssetDetailClose,\n holdConfirmForDetailAssetRead,\n readHeldAnew,\n takeHeldAnew,\n letGoOnceSavedWithSource,\n authorsGivenMeanwhile,\n confirmWaits,\n} = useImageDialogDamAuthors(\n damConfigName,\n () =>\n (metadataDialog.value || props.expandMetadata) && isImageCreateUpdateAware(detail.value) ? detail.value : null,\n () => props.readonly\n)\n\n// What the widget's open dialog, or its form in the page, shows is in the store of the dialog: no other widget empties\n// it meanwhile.\nwatch(\n () => metadataDialog.value || props.expandMetadata,\n (shows) => imageMediaWidgetStore.setShownBy(thisWidget, shows),\n { immediate: true, flush: 'sync' }\n)\n\nconst hideDropzoneText = computed(() => {\n return !isNull(imageModel.value) || !isNull(mediaModel.value)\n})\n\nconst resolvedSrc = ref('')\n\nconst uploadQueue = computed(() => {\n return uploadQueuesStore.getQueue(props.queueKey)\n})\n\nconst imageMediaLoaded = computed(() => {\n return !isNull(resImageMedia.value)\n})\n\n// What \"edit metadata\" has put into the dialog: a copy of the image or the media of the widget, as it was then.\nlet ownInDialog: typeof detail.value = null\n// What a pick or an upload of this widget has put into the dialog last. The store of the dialog is the page's: what\n// it shows may be what another widget's dialog, opened over this one, shows.\nlet pickInDialog: typeof detail.value = null\n// What the dialog shows its loading for: a pick whose asset is being read, or \"edit metadata\" waiting for a save of the\n// image by another widget, or for a read of the asset the widget holds. Its answer is put into the dialog only while\n// the dialog still loads for it: not once the editor has closed it, nor once the store of the dialog, which is the\n// page's, holds what another dialog shows. The answer of a pick replaced the form of the dialog of another widget,\n// opened meanwhile, and what the editor had typed there was lost. The dialog that loads for it then closes: it shows\n// that form too, and its confirm would save it here.\nlet loadingInDialog: symbol | null = null\nconst answerTakenFor = (opening: symbol) => {\n if (disposed || loadingInDialog !== opening) return false\n if (isNull(detail.value)) return true\n loadingInDialog = null\n metadataDialogLoading.value = false\n metadataDialog.value = false\n return false\n}\n// How many saves of the image it holds the page had seen answered when the widget read that image.\nlet resImageReadAt = 0\n// The marks of the saves of images the widget has on their way.\nconst ownImageSaves = new Set<symbol>()\n// The wait of an opening of \"edit metadata\" for a save of another widget: let go once the dialog closes.\nlet cancelSaveWait: (() => void) | null = null\n// What the dialog is opened for: the image or the medium the widget holds, the asset picked, the uploaded image. Its\n// title says it from the start, the same while the dialog loads, waits and saves.\nconst dialogType = ref<DamAssetTypeType>(DamAssetType.Image)\nconst actionEditMeta = async () => {\n dialogType.value = type.value ?? DamAssetType.Image\n const heldId = () => (isImageCreateUpdateAware(resImageMedia.value) ? resImageMedia.value.id : undefined)\n // Another widget of the page is saving the image (the widget this one was drawn in place of, its save still on its\n // way): the dialog shows its loading till that save is over.\n const id = heldId()\n const othersSaves = isNumber(id) ? imageSavesOfOthersOver(damConfigName, id, ownImageSaves) : null\n if (othersSaves) {\n const thisOpening = (loadingInDialog = Symbol('edit'))\n imageMediaWidgetStore.setDetail(null)\n metadataDialogLoading.value = true\n metadataDialog.value = true\n cancelSaveWait = othersSaves.cancel\n const over = await withinWaitLimit(othersSaves.over, 1, damConfigName)\n cancelSaveWait = null\n if (!answerTakenFor(thisOpening)) return\n loadingInDialog = null\n metadataDialogLoading.value = false\n // That save has not answered in time: the dialog closes, and the user is told the request timed out. It loaded\n // till the editor closed it. Shown, what the widget read before that save would go out with the confirm over what\n // the save may yet write.\n if (over === WAIT_RAN_OUT) {\n othersSaves.cancel()\n metadataDialog.value = false\n showErrorT('error.apiTimedOut.message')\n return\n }\n }\n // The widget holds the asset of the image's file, picked without authors: the dialog shows its loading while that\n // asset is read anew, and what the read finds goes into the dialog with the image. Never for a medium.\n const heldAnew = readHeldAnew(\n isImageCreateUpdateAware(resImageMedia.value) ? resImageMedia.value.dam.damId : undefined\n )\n let anew: HeldAssetAnew | null = null\n if (heldAnew) {\n const thisOpening = (loadingInDialog = Symbol('edit'))\n imageMediaWidgetStore.setDetail(null)\n metadataDialogLoading.value = true\n metadataDialog.value = true\n anew = await heldAnew\n if (!answerTakenFor(thisOpening)) return\n loadingInDialog = null\n metadataDialogLoading.value = false\n }\n // Saved by another widget of the page after this one read it: the widget takes the image as that save left it. It\n // offered the texts it had read, and its confirm saved them back over the saved ones.\n const savedId = heldId()\n const saved = isNumber(savedId) ? imageSavedSince(damConfigName, savedId, resImageReadAt) : null\n if (saved) void reloadImage(saved, null, true)\n imageMediaWidgetStore.setDetail(toRaw(resImageMedia.value))\n takeHeldAnew(anew, isImageCreateUpdateAware(detail.value) ? detail.value : null)\n ownInDialog = detail.value\n metadataDialog.value = true\n}\n\n// With `expandMetadata` the form of the image is in the page once the image is read, with no \"edit metadata\" to wait\n// for a save of the image by another widget, or to take what such a save wrote: the form does both, as that opening\n// does. It showed the texts read before that save took effect, and the confirm of its host saved them back over the\n// saved ones. Once the wait runs out the form shows what was read, and the user is told the request timed out.\nconst showReadInForm = async () => {\n const heldId = () => (isImageCreateUpdateAware(resImageMedia.value) ? resImageMedia.value.id : undefined)\n const id = heldId()\n const othersSaves = isNumber(id) ? imageSavesOfOthersOver(damConfigName, id, ownImageSaves) : null\n if (othersSaves) {\n const thisOpening = (loadingInDialog = Symbol('edit'))\n imageMediaWidgetStore.setDetail(null)\n metadataDialogLoading.value = true\n cancelSaveWait = othersSaves.cancel\n const over = await withinWaitLimit(othersSaves.over, 1, damConfigName)\n cancelSaveWait = null\n if (!answerTakenFor(thisOpening)) return\n loadingInDialog = null\n metadataDialogLoading.value = false\n if (over === WAIT_RAN_OUT) {\n othersSaves.cancel()\n showErrorT('error.apiTimedOut.message')\n }\n // The widget has been given another image meanwhile: that one is shown.\n if (heldId() !== id) return\n }\n const saved = isNumber(id) ? imageSavedSince(damConfigName, id, resImageReadAt) : null\n if (saved) return void reloadImage(saved, null, true)\n imageMediaWidgetStore.setDetail(toRaw(resImageMedia.value))\n}\n\nconst actionLibrary = () => {\n assetSelectDialog.value = true\n}\n\nconst { cachedExtSystemId } = useExtSystemIdForCached(damConfigName)\n\n// this ref is updating only when the lock was really success or failure using sockets, needed for drop files\nconst collabFieldLockReallyLocked = ref(false)\n\n// Cancelling must settle the promise, not just clear the timer — `onDrop` awaits it. A Set\n// because overlapping drops each have their own wait.\nconst LOCK_WAIT_CANCELLED = Symbol('lock wait cancelled')\ntype PendingLockWait = { timer: ReturnType<typeof setTimeout>; reject: (reason: unknown) => void }\nconst pendingLockWaits = new Set<PendingLockWait>()\nlet disposed = false\n\nonBeforeUnmount(() => {\n disposed = true\n pendingLockWaits.forEach((wait) => {\n clearTimeout(wait.timer)\n wait.reject(LOCK_WAIT_CANCELLED)\n })\n pendingLockWaits.clear()\n // What held the lock of the field goes with the widget (its menu, a dialog, the picker, a pick being read, a drop\n // waiting for the lock), and nothing gave it back: the server keeps a lock till it is released or the editor leaves\n // the room, and the field stayed locked for the other editors. Given back with what the field has, unless a save or\n // a delete of the widget is on its way, which gives it back at its end, or the widget drawn in its place has taken a\n // turn of the lock since.\n if (!metadataDialogSaving.value && !deletePending.value && !lockTurnTakenSince()) releaseFieldLockLocal()\n imageMediaWidgetStore.setShownBy(thisWidget, false)\n holdImage(damConfigName, thisWidget, null)\n cancelSaveWait?.()\n})\n\nconst waitForFieldLockIsReallyAcquired = async () => {\n if (!collabOptions.value.enabled || isUndefined(props.collab) || props.collabStatus === CollabStatus.Inactive) {\n return Promise.resolve(true)\n }\n\n let count = 0\n\n const checkLock: () => Promise<Awaited<boolean>> = () => {\n if (disposed) {\n return Promise.reject(LOCK_WAIT_CANCELLED)\n }\n if (collabFieldLockReallyLocked.value) {\n return Promise.resolve(true)\n }\n\n count++\n if (count < 50) {\n return new Promise((resolve, reject) => {\n const wait: PendingLockWait = {\n timer: setTimeout(() => {\n pendingLockWaits.delete(wait)\n resolve(checkLock())\n }, 100),\n reject,\n }\n pendingLockWaits.add(wait)\n })\n }\n\n return Promise.reject(false)\n }\n\n return checkLock()\n}\n\n// The drop that is uploaded once the lock of the field comes: one, as the upload dialog shows one file while it saves\n// all it is given. Each drop that waited used to queue its file.\nlet dropInWait: symbol | null = null\n\nconst onDrop = async (files: File[]) => {\n if (props.readonly) return\n // The dropzone has turned every file away, and said so: there is nothing to ask the lock of the field for.\n if (files.length === 0) return\n // The lock an earlier drop asked for is still on its way: this one is not taken.\n if (!isNull(dropInWait) && lockRequestPending.value) return\n // As a click on the dropzone: the field is another editor's.\n if (isLocked.value) {\n showErrorT('common.damImage.error.unableToLock')\n return\n }\n acquireFieldLockLocal(true)\n const config = imageWidgetUploadConfig.value!\n // After a refusal this drop has asked again, as before: it takes the place of the one still waiting.\n const thisDrop = Symbol('drop')\n dropInWait = thisDrop\n try {\n await waitForFieldLockIsReallyAcquired()\n // The lock can resolve after the widget is gone; uploading into it is worse than dropping.\n if (disposed) return\n if (dropInWait !== thisDrop) return\n // Turned read-only while the lock was awaited: the lock goes back and nothing is uploaded.\n if (props.readonly) {\n if (pendingLockWaits.size === 0 && !clickMenuOpened.value && !anyWidgetDialogOpened.value) releaseFieldLockLocal()\n return\n }\n cachedExtSystemId.value = config.extSystem\n // The widget holds one image, and its upload dialog shows one file: of several dropped at once the first is\n // uploaded, and the user is told. The others used to be uploaded too, unseen, and left without an image.\n if (files.length > 1) showWarningT('common.damImage.upload.onlyOneFile')\n stopQueueLeftBehind(props.queueKey)\n uploadQueuesStore.addByFiles(props.queueKey, config.extSystem, config.licence, files.slice(0, 1), damConfigName)\n uploadQueueDialog.value = props.queueKey\n } catch (e) {\n if (disposed || e === LOCK_WAIT_CANCELLED) return\n // A request that timed out may have been granted after all, and nothing else would release it. Only when nothing\n // else waits for or holds it: refused, this release reads as the lock held, and another drop still waiting uploaded\n // without its lock, or a menu opened meanwhile lost the one it asked for.\n if (pendingLockWaits.size === 0 && !clickMenuOpened.value && !anyWidgetDialogOpened.value) releaseFieldLockLocal()\n showErrorT('common.damImage.error.unableToLock')\n } finally {\n if (dropInWait === thisDrop) dropInWait = null\n }\n}\n\nconst onCopyToLicence = (data: DamImageCopyToLicenceResponse) => {\n if (props.readonly) return\n if (!data[0]) return\n const config = imageWidgetUploadConfig.value!\n cachedExtSystemId.value = config.extSystem\n stopQueueLeftBehind(props.queueKey)\n if (data[0].result === 'copy') {\n uploadQueuesStore.addByCopyToLicence(\n props.queueKey,\n config.extSystem,\n config.licence,\n [data[0].targetAsset],\n damConfigName\n )\n } else if (data[0].result === 'exists') {\n uploadQueuesStore.addByCopyToLicence(\n props.queueKey,\n config.extSystem,\n config.licence,\n [data[0].targetAsset],\n damConfigName\n )\n uploadQueuesStore.queueItemDuplicate(data[0].targetAsset, data[0].targetMainFile, DamAssetType.Image, damConfigName)\n } else {\n showErrorT('common.damImage.queueItem.errorUnableToCopyToLicence')\n return\n }\n uploadQueueDialog.value = props.queueKey\n}\n\nconst onFileInput = (files: File[]) => {\n if (props.readonly) return\n // The input has turned every file away, and said so: a dialog over a queue without a row would only load.\n if (files.length === 0) return\n const config = imageWidgetUploadConfig.value!\n cachedExtSystemId.value = config.extSystem\n stopQueueLeftBehind(props.queueKey)\n uploadQueuesStore.addByFiles(props.queueKey, config.extSystem, config.licence, files, damConfigName)\n uploadQueueDialog.value = props.queueKey\n}\n\nconst { uploadSizes, uploadAccept } = useDamAcceptTypeAndSizeHelper(\n DamAssetType.Image,\n imageWidgetUploadConfig.value.extSystemConfig\n)\n\n// The id of the image this widget has just created. Its model changes to that id, and what the widget shows is the\n// answer to the create: read again, the preview fell back to the placeholder meanwhile, and a read that failed said\n// an error after a save that went through. Any other change of the id is read as before.\nlet createdImageId: IntegerIdNullable = null\n\nconst reloadImage = async (\n newImage: ImageCreateUpdateAware | undefined,\n newImageId: IntegerIdNullable,\n force = false\n) => {\n resolvedSrc.value = imagePlaceholderPath\n if ((newImage && isNull(resImageMedia.value)) || (newImage && force)) {\n resImageMedia.value = cloneDeep(newImage)\n resImageReadAt = holdImage(damConfigName, thisWidget, newImage.id ?? null)\n if (isImageCreateUpdateAware(resImageMedia.value)) {\n if (isNumber(props.damWidth) && isNumber(props.damHeight)) {\n resolvedSrc.value = widgetImageToDamImageUrl(toRaw(resImageMedia.value), props.damWidth, props.damHeight)\n } else {\n resolvedSrc.value = widgetImageToDamImageUrl(toRaw(resImageMedia.value))\n }\n if (props.expandMetadata) {\n imageMediaWidgetStore.setDetail(toRaw(resImageMedia.value))\n }\n }\n return\n }\n if (newImageId) {\n // Counted as the read is sent: a save answered after that may have taken effect only after the read.\n const readAt = holdImage(damConfigName, thisWidget, newImageId)\n try {\n resImageMedia.value = await imageApi.fetchImage(imageClient, newImageId)\n resImageReadAt = readAt\n } catch (error) {\n showErrorsDefault(error)\n }\n // The widget is gone: with `expandMetadata` its image would be put into the store of the dialog, which is the\n // page's, and by now shows the image of the next widget.\n if (disposed) return\n if (isImageCreateUpdateAware(resImageMedia.value)) {\n if (isNumber(props.damWidth) && isNumber(props.damHeight)) {\n resolvedSrc.value = widgetImageToDamImageUrl(toRaw(resImageMedia.value), props.damWidth, props.damHeight)\n } else {\n resolvedSrc.value = widgetImageToDamImageUrl(toRaw(resImageMedia.value))\n }\n if (props.expandMetadata) void showReadInForm()\n }\n return\n }\n resImageMedia.value = null\n holdImage(damConfigName, thisWidget, null)\n}\n\nconst reloadMedia = (newMedia: MediaAware | null) => {\n resolvedSrc.value = imagePlaceholderPath\n holdImage(damConfigName, thisWidget, null)\n if (newMedia) {\n resImageMedia.value = cloneDeep(newMedia)\n if (isMediaAware(resImageMedia.value) && !isNull(resImageMedia.value.damMedia.imageFileId)) {\n if (isNumber(props.damWidth) && isNumber(props.damHeight)) {\n resolvedSrc.value = damImageIdToDamImageUrl(\n resImageMedia.value.damMedia.imageFileId,\n props.damWidth,\n props.damHeight\n )\n } else {\n resolvedSrc.value = damImageIdToDamImageUrl(resImageMedia.value.damMedia.imageFileId)\n }\n if (props.expandMetadata) {\n imageMediaWidgetStore.setDetail(toRaw(resImageMedia.value))\n }\n }\n return\n }\n resImageMedia.value = null\n}\n\n// `release` false: a menu or dialog still open holds the lock, and its close or confirm releases it. Alone, the editor\n// holds none, and the value goes to the buffer here or nowhere.\nconst reset = (release = true) => {\n resolvedSrc.value = imagePlaceholderPath\n resImageMedia.value = null\n holdImage(damConfigName, thisWidget, null)\n imageModel.value = null\n mediaModel.value = null\n // Not the form the open dialog of another widget shows.\n imageMediaWidgetStore.resetUnlessShown(thisWidget)\n if (release || props.collabStatus === CollabStatus.Inactive) releaseFieldLockWith({ image: null, media: null })\n}\n\nwatch(\n [() => props.initialImage, imageModel, mediaModel],\n async ([newImage, newImageId, newMedia], [oldImage, oldImageId, oldMedia]) => {\n // Used up by every run, also one that ends at the media: left standing, it would keep a later change to that id\n // from being read.\n const created = createdImageId\n createdImageId = null\n if (!isNull(newMedia) && JSON.stringify(newMedia) !== JSON.stringify(oldMedia)) {\n reloadMedia(newMedia)\n return\n }\n\n if (newImage !== oldImage || newImageId !== oldImageId) {\n if (!isNull(created) && newImageId === created && newImage === oldImage) return\n await reloadImage(newImage, newImageId)\n return\n }\n\n if (isNull(newMedia) && !isNull(oldMedia)) {\n reloadMedia(null)\n }\n },\n { immediate: true }\n)\n\nconst assetSelectStore = useAssetSelectStore()\nconst { getDamConfigExtSystem } = useDamConfigState(undefined, damConfigName)\n\n// The picker closes itself as it answers, and the widget's next dialog opens only once the asset is fetched or\n// copied: till then the pick counts as an open dialog, or the close watcher gave the lock up with the old value. Each\n// pick on its way counts: the end of one whose dialog the editor had closed gave the lock up under a later one.\nconst assetPicksPending = ref(0)\nconst onAssetSelectConfirm = async (data: AssetSelectReturnData) => {\n if (props.readonly) return\n const thisPick = (loadingInDialog = Symbol('pick'))\n assetPicksPending.value++\n try {\n await pickAsset(data, thisPick)\n } finally {\n assetPicksPending.value--\n // Ended early (no main file, the media not loaded), the pick left the dialog loading: the next upload or edit\n // showed only a spinner. Whatever it loaded is loaded by now. Unless the dialog loads for what has opened it since.\n if (loadingInDialog === thisPick) {\n loadingInDialog = null\n metadataDialogLoading.value = false\n }\n }\n}\n\nconst pickAsset = async (data: AssetSelectReturnData, thisPick: symbol) => {\n if (data.type !== 'asset' || !data.value[0]) return\n metadataDialogLoading.value = true\n imageMediaWidgetStore.setDetail(null)\n offerNoDamAuthors()\n let description = ''\n let source = ''\n const selectedAsset = data.value[0]\n if (!selectedAsset.mainFile) return\n dialogType.value = selectedAsset.attributes.assetType\n // What the asset is to the widget is known once it is read: the dialog shows its loading till then, and while an\n // image is copied into the licence of the upload, as that of the image widget does. Nothing was shown, and a dialog\n // of another widget opened meanwhile was covered by this one.\n metadataDialog.value = true\n let mediaDataFromDam: DamMediaFromDam | null = null\n try {\n mediaDataFromDam = await fetchAssetAsCmsMedia(damClient, selectedAsset.id, endPointCmsAsset)\n } catch (e) {\n showErrorsDefault(e)\n }\n // The widget is gone: nothing of its pick is put into the store of the dialog, which is the page's. Nor when the\n // dialog no longer loads for this pick.\n if (!answerTakenFor(thisPick)) return\n // Nothing to show: the dialog closes.\n if (!mediaDataFromDam) return void (metadataDialog.value = false)\n if (selectedAsset.attributes.assetType === DamAssetType.Video && assetFileIsVideoFile(selectedAsset.mainFile)) {\n // video\n metadataDialog.value = true\n const mediaData: MediaAware = {\n extService: 'damVideo',\n damMedia: {\n imageFileId: selectedAsset.mainFile.imagePreview?.imageFile || null,\n assetId: selectedAsset.id,\n licenceId: selectedAsset.licence,\n assetType: DamAssetType.Video,\n title: mediaDataFromDam.title,\n description: mediaDataFromDam.description,\n seriesName: mediaDataFromDam.seriesName,\n authorNames: mediaDataFromDam.authorNames,\n publishedAt: mediaDataFromDam.publishedAt,\n duration: mediaDataFromDam.duration,\n mediaUrl: mediaDataFromDam.mediaUrl,\n playable: mediaDataFromDam.playable,\n syncedWithDam: true,\n episodeName: mediaDataFromDam.episodeName,\n episodeNumber: mediaDataFromDam.episodeNumber,\n },\n }\n imageMediaWidgetStore.setDetail(mediaData)\n } else if (\n selectedAsset.attributes.assetType === DamAssetType.Audio &&\n selectedAsset.podcasts.length > 0 &&\n assetFileIsAudioFile(selectedAsset.mainFile)\n ) {\n // podcast audio\n metadataDialog.value = true\n const mediaData: MediaAware = {\n extService: 'damPodcast',\n damMedia: {\n imageFileId: selectedAsset.mainFile.imagePreview?.imageFile || null,\n assetId: selectedAsset.id,\n licenceId: selectedAsset.licence,\n assetType: DamAssetType.Audio,\n title: mediaDataFromDam.title,\n description: mediaDataFromDam.description,\n seriesName: mediaDataFromDam.seriesName,\n authorNames: mediaDataFromDam.authorNames,\n publishedAt: mediaDataFromDam.publishedAt,\n duration: mediaDataFromDam.duration,\n mediaUrl: mediaDataFromDam.mediaUrl,\n playable: mediaDataFromDam.playable,\n syncedWithDam: true,\n episodeName: mediaDataFromDam.episodeName,\n episodeNumber: mediaDataFromDam.episodeNumber,\n },\n }\n imageMediaWidgetStore.setDetail(mediaData)\n } else if (selectedAsset.attributes.assetType === DamAssetType.Image) {\n // image\n // An asset already in the licence of the upload is taken as it is.\n if (\n copyToLicenceEnabled !== false &&\n !isUndefined(data.copyToLicence) &&\n selectedAsset.licence !== data.copyToLicence\n ) {\n let copyRes: DamImageCopyToLicenceResponse | null = null\n try {\n copyRes = await copyToLicence(damClient, endPointImage, [\n { asset: data.value[0].id, targetAssetLicence: data.copyToLicence },\n ])\n } catch (e) {\n showErrorsDefault(e)\n }\n // A widget that is gone, or a dialog that no longer loads for the pick, opens no upload dialog: the copy of a\n // widget that is gone went on in the upload dialog of the widget drawn in its place, which asked for the lock of\n // the field only then.\n if (!answerTakenFor(thisPick)) return\n // The upload dialog shows the copy, and takes the place of the dialog of the image.\n metadataDialogLoading.value = false\n metadataDialog.value = false\n if (copyRes) onCopyToLicence(copyRes)\n return\n }\n metadataDialog.value = true\n // The authors are offered once the pick still has the dialog: the read of a pick the dialog has left offered those\n // of its asset in the dialog of the pick shown since.\n let authorsToOffer: AssetDetailItemDto | null = null\n try {\n const assetRes = await fetchAsset(damClient, endPointAsset, selectedAsset.id)\n // As the image widget: the texts are the application's to make of the asset, where it has a mapping of its own.\n if (customAssetSelectMetadataToImageMap) {\n const mapped = customAssetSelectMetadataToImageMap(assetRes)\n description = mapped.description\n source = mapped.source\n } else {\n if (isString(assetRes.metadata.customData?.description)) {\n description = assetRes.metadata.customData.description.trim()\n }\n if (assetRes.authors.length > 0) {\n // Under the ext system of the licence of the asset, as every name of the authors of the DAM the widgets\n // write; that of the picker where the licence does not tell.\n const authorsRes = await fetchAuthorListByIds(\n damClient,\n endPointAuthor,\n (await getExtSystemByLicence(assetRes.licence)) ?? assetSelectStore.requireSelectedSelectConfig().extSystem,\n assetRes.authors\n )\n source = authorsRes.map((author) => author.name).join(', ')\n } else if (assetRes.authors.length === 0) {\n const configExtSystem = getDamConfigExtSystem(imageWidgetUploadConfig.value!.extSystem)\n // Not while the server may yet fill in its metadata from the file: saving the authors marks the asset\n // described, and the server then fills in nothing.\n if (configExtSystem?.[DamAssetType.Image]?.authors?.enabled && !assetMetadataMayStillChange(assetRes)) {\n authorsToOffer = assetRes\n }\n }\n }\n } catch (e) {\n showErrorsDefault(e)\n }\n if (!answerTakenFor(thisPick)) return\n if (authorsToOffer) offerDamAuthorsOf(authorsToOffer, selectedAsset.mainFile.id)\n const image = createDamImage(\n {\n fileId: selectedAsset.mainFile.id,\n licenceId: selectedAsset.licence,\n internal: selectedAsset.mainFileInternal,\n },\n { description, source },\n { position: 1, id: isNull(imageModel.value) ? undefined : imageModel.value }\n )\n imageMediaWidgetStore.setDetail(image)\n pickInDialog = detail.value\n } else {\n // Of no kind the widget takes (an audio in no podcast, a video whose file is no video): nothing to show.\n metadataDialog.value = false\n }\n metadataDialogLoading.value = false\n if (props.expandMetadata) {\n forceReloadViewWithExpandMetadata()\n }\n}\n\nconst assetDetailStore = useAssetDetailStore()\nconst { dialog: assetDialog } = storeToRefs(assetDetailStore)\nconst {\n damClient,\n endPointAsset,\n endPointImage,\n endPointAuthor,\n endPointCmsAsset,\n copyToLicenceEnabled,\n showSourceEnabled,\n sourceLabel,\n editAssetLabel,\n addFromDamLabel,\n replaceFromDamLabel,\n customAssetSelectMetadataToImageMap,\n} = useCommonAdminCoreDamOptions(damConfigName)\n\nconst { getExtSystemByLicence } = useDamConfigState(damClient, damConfigName)\n\nconst onEditAsset = async (assetFileId: DocId) => {\n let extSystem: IntegerId | null = null\n try {\n await assetDetailStore.open(\n props.queueKey,\n async () => {\n const assetRes = await fetchAssetByFileId(damClient, endPointAsset, assetFileId)\n // A licence the client cannot resolve: the ext system of the widget's upload licence, which its root loaded.\n const shownUnder = (await getExtSystemByLicence(assetRes.licence)) ?? imageWidgetUploadConfig.value!.extSystem\n // Before the detail shows the asset: it reads the configuration of its ext system as it draws, and threw\n // without it.\n await loadAssetDetailExtSystem(damClient, shownUnder, assetRes.attributes.assetType, damConfigName)\n extSystem = shownUnder\n return assetRes\n },\n // Only for the asset the detail shows: an answer it no longer waits for must not change the ext system its\n // configuration asks for names under.\n () => {\n if (extSystem) cachedExtSystemId.value = extSystem\n }\n )\n } catch (e) {\n showErrorsDefault(e)\n }\n}\n\nconst onMetadataDialogClose = () => {\n imageMediaWidgetStore.setDetail(null)\n metadataDialog.value = false\n // What it was loading for is not shown once it is closed: the answer of a pick being read went into the store of the\n // dialog all the same, over the form of a dialog of another widget opened meanwhile.\n loadingInDialog = null\n metadataDialogLoading.value = false\n // The wait of the opening it was loading for, for a save of another widget, is taken off that save.\n cancelSaveWait?.()\n}\n\nconst tryMediaConfirm = async () => {\n if (!isMediaAware(detail.value)) return\n // Not taken while the save of an image of this widget is on its way, as a second confirm of that image is not: the\n // answer of that save sets the image, and took away the media confirmed meanwhile. The button spins till then.\n if (metadataDialogSaving.value) return\n metadataDialogSaving.value = true\n try {\n metadataDialog.value = false\n const media = detail.value\n mediaModel.value = media\n imageModel.value = null\n imageMediaWidgetStore.setDetail(null)\n reloadMedia(media)\n emit('afterMetadataSaveSuccess')\n releaseFieldLockWith({ image: null, media })\n } catch (e) {\n showErrorsDefault(e)\n } finally {\n metadataDialogSaving.value = false\n }\n}\n\nconst tryImageConfirm = async () => {\n if (!isImageCreateUpdateAware(detail.value)) return\n // The asset of a detail that has just closed is still being read. What the dialog offers may change by that read,\n // and with it what its form asks for: the confirm waits for the read, and is then taken again by the form.\n const confirmAgain = () => detailDialogMetadataComponent.value?.confirm()\n if (holdConfirmForDetailAssetRead(metadataDialogSaving.value, confirmAgain)) return\n // Pressed again while the save of the first press runs (the button of a host is not disabled meanwhile, and Enter\n // reaches the one of the dialog), it is not taken: the image would be created, or updated, a second time.\n if (metadataDialogSaving.value) return\n // A confirm is for the image it was pressed on. While it waits for an answer the dialog can be closed, and opened\n // again for another image or for a media, and the widget can go away with its page. Until the image is sent to be\n // saved, the confirm goes on after each wait only for a widget that is still there, and only while the dialog still\n // shows that image. It went on with whatever the dialog showed by then: that image was saved without a press, and\n // its dialog closed, and for a media an image without its fields was sent to be created.\n const pressedOn = detail.value\n const confirmIsOver = () => disposed || detail.value !== pressedOn\n // Nor are the authors sent by a widget that has turned read-only meanwhile.\n const authorsSendIsOver = () => confirmIsOver() || props.readonly\n metadataDialogSaving.value = true\n // The dialog shows the source of the image of the asset the widget holds, not the pick (a read of it failed): once\n // saved, the image has a source of its own, and the asset is let go.\n const letGoHeld = letGoOnceSavedWithSource(pressedOn)\n try {\n const authorsAsset = damAuthorsAsset.value\n if (authorsAsset) {\n if (authorsAsset.authors.length > 0) {\n // The asset was read at its pick, and may have been given authors elsewhere since: the write replaces them\n // with those picked here. It is read again first. A read that fails saves nothing. Once it has authors nothing\n // is written either: the pick goes, an empty source takes their names, the user is told till they close the\n // message, and the dialog stays.\n let givenMeanwhile: string | null\n try {\n givenMeanwhile = await authorsGivenMeanwhile(authorsAsset)\n } catch (e) {\n if (!authorsSendIsOver() && !showErrorsDefault(e)) showUnknownError()\n return\n }\n if (authorsSendIsOver()) return\n if (!isNull(givenMeanwhile)) {\n offerNoDamAuthors()\n giveNamesToEmptySource(pressedOn, givenMeanwhile)\n showWarningT('common.damImage.image.meta.authorsGivenMeanwhile', -1)\n return\n }\n // Their names become the source of the image once the DAM has taken the authors, and wait aside till then.\n // Written before, they stayed in the source, which the dialog does not show, after a write the DAM refused,\n // and a confirm with the pick emptied saved them with the image.\n // Under the ext system of the licence of the asset, as the read before the write names authors given since.\n const authorsRes = await fetchAuthorListByIds(\n damClient,\n endPointAuthor,\n (await getExtSystemByLicence(authorsAsset.licence)) ??\n assetSelectStore.requireSelectedSelectConfig().extSystem,\n authorsAsset.authors\n )\n // Nothing is written and nothing said: the authors are not sent for a dialog the user has left, nor by a\n // widget that is gone or read-only.\n if (authorsSendIsOver()) return\n const source = authorsRes.map((author) => author.name).join(', ')\n try {\n await updateAssetAuthors(damClient, endPointAsset, authorsAsset)\n } catch (e) {\n // The authors refused by validation are named as the forms name them. The image is not saved.\n showMetadataSaveError(e, assetSelectStore.requireSelectedSelectConfig().extSystem, damConfigName)\n return\n }\n // The DAM has the authors, and the image is not saved.\n if (confirmIsOver()) return\n pressedOn.texts.source = source\n offerNoDamAuthors()\n }\n }\n const image = imageFieldsOf(pressedOn)\n // An update is noted for the other widgets of the page, also when this one is gone by its answer.\n const res = image.id\n ? await noteImageSave(damConfigName, image.id, ownImageSaves, imageApi.updateImage(imageClient, image.id, image))\n : await imageApi.createImage(imageClient, image)\n // The widget is gone: nothing of the answer is written. The store of the dialog is the page's, and by now the\n // next widget's: its form was emptied, and then showed the image saved here.\n if (disposed) return\n letGoHeld()\n // The save went through, and the widget takes its image. The dialog is this confirm's to close while it shows the\n // image the confirm was pressed on, or none. It is closed as well when \"edit metadata\" has opened it since: what\n // it shows is a copy of the image or the media the widget had before this save, and its confirm would put that\n // over the image saved here. The dialog of another pick or upload, opened since, stays as it is, with the lock of\n // the field, which its own close or confirm gives back. The form `expandMetadata` draws in the page is no such\n // dialog: it shows the image of the widget, the saved one from here on. With the dialog closed meanwhile, what the\n // store of the dialog shows by then is no longer this widget's to empty: it is what another widget's open dialog\n // shows. A dialog opened since that still loads for a pick (or for \"edit metadata\") stays open as well: what it\n // loads for fills it, with the id saved here. Closed here, it left the widget loading for that pick, whose answer\n // opened the dialog again, or closed an \"edit metadata\" opened meanwhile, which showed only the spinner.\n const ownDialogOpen = metadataDialog.value\n const shown = detail.value\n const dialogOfAnotherPick =\n !props.expandMetadata &&\n ownDialogOpen &&\n (isNull(shown) ? !isNull(loadingInDialog) : shown !== pressedOn && shown !== ownInDialog)\n if (!dialogOfAnotherPick) metadataDialog.value = false\n if (!image.id) createdImageId = res.id\n imageModel.value = res.id\n mediaModel.value = null\n if (!dialogOfAnotherPick && (ownDialogOpen || props.expandMetadata)) imageMediaWidgetStore.setDetail(null)\n // That dialog was opened while this image was being created, for a widget that had no image: the image its pick or\n // upload put there takes the id created here, and its confirm updates this image. It created a second one, and\n // this one was left unused. Only that image: one another widget has put into the store since is that widget's.\n if (dialogOfAnotherPick && !image.id && shown === pickInDialog && isImageCreateUpdateAware(shown)) {\n if (isUndefined(shown.id)) shown.id = res.id\n }\n // Before the dialog's close is seen, so this release, with what was just assigned, is the one that goes. Alone,\n // the editor holds no lock, and the value goes to the buffer here or nowhere. While the menu of the widget or\n // another of its dialogs (that of another pick, the picker, the upload) holds the field, the lock stays with it,\n // and gives it back as it closes; the other editors are sent the saved image now. Released here, a picker opened\n // since lost its lock, and what it put into the field later went to nobody. Not while the dialog of another pick\n // or upload is open: it sets what the field ends with, also under the id saved here (it is given that id when\n // this was a create), and the other editors, who read an image again only when its id changes, kept this one.\n if (props.collabStatus === CollabStatus.Inactive || (!clickMenuOpened.value && !anyWidgetDialogOpened.value)) {\n releaseFieldLockWith({ image: res.id, media: null })\n } else if (lockedLocal.value && !dialogOfAnotherPick) {\n changeFieldData.value({ image: res.id, media: null })\n }\n await reloadImage(res, res.id, true)\n emit('afterMetadataSaveSuccess')\n } catch (e) {\n showErrorsDefault(e)\n } finally {\n metadataDialogSaving.value = false\n // A dialog closed while this confirm ran left the lock of the field to it (see the watchers): given back once it\n // is over, when nothing else of the widget holds it. Saved, the image went with it above; otherwise the field\n // keeps what it had. A widget that is gone gives it back too, with what its field has: it wrote nothing of the\n // answer. The server keeps a lock till it is released or the editor leaves the room, and the field stayed locked\n // for the other editors. Unless the widget drawn in its place has taken a turn of the lock since: the release\n // would free the lock that one holds.\n if (disposed ? !lockTurnTakenSince() : !clickMenuOpened.value && !anyWidgetDialogOpened.value) {\n releaseFieldLockLocal()\n }\n }\n}\n\nconst onMetadataDialogConfirm = async () => {\n if (props.readonly) return\n await tryMediaConfirm()\n await tryImageConfirm()\n}\n\n// Till the delete is answered, neither the menu's close nor a dialog's gives the lock up: the menu closes on the click,\n// and its release went out with the image still there, the reset's own skipped as for a lock already given back. Nor\n// while a confirm of the dialog runs: closed before its save answered, the dialog gave the lock back with what the\n// field had before, and the release of the answer, as for a lock already given back, never sent the saved image to the\n// other editors.\nconst deletePending = ref(false)\nconst onImageMediaDelete = async () => {\n // The widget's own image: the store's detail is shared, empty unless a dialog loaded it, or another widget's.\n const imageId = imageModel.value\n if (props.callDeleteApiOnRemove && !isNull(imageId)) {\n deletePending.value = true\n try {\n await imageApi.deleteImage(imageClient, imageId)\n // A widget that is gone writes nothing into the page.\n if (!disposed) reset(!clickMenuOpened.value && !anyWidgetDialogOpened.value)\n } catch (e) {\n showErrorsDefault(e)\n } finally {\n deletePending.value = false\n }\n // Gone, the widget gives the lock back with what its field has, as it does at the end of a confirm: unless the\n // widget drawn in its place has taken a turn of the lock since. The release of the reset freed the lock that one\n // held, under its open menu.\n if (disposed ? !lockTurnTakenSince() : !clickMenuOpened.value && !anyWidgetDialogOpened.value)\n releaseFieldLockLocal()\n return\n }\n reset()\n}\n\nconst forceReloadViewWithExpandMetadata = () => {\n if (isMediaAware(detail.value)) {\n reloadMedia(detail.value)\n return\n } else if (isImageCreateUpdateAware(detail.value)) {\n reloadImage(detail.value, null, true)\n }\n}\n\nconst onAssetUploadConfirm = (items: ImageCreateUpdateAware[]) => {\n if (props.readonly) return\n if (!items[0]) return\n\n if (!isNull(imageModel.value)) {\n items[0].id = imageModel.value\n }\n // The image of an upload comes with its source: the authors of an asset picked before are not offered with it.\n offerNoDamAuthors()\n dialogType.value = DamAssetType.Image\n imageMediaWidgetStore.setDetail(items[0])\n pickInDialog = detail.value\n metadataDialog.value = true\n if (props.expandMetadata) {\n forceReloadViewWithExpandMetadata()\n }\n}\n\nconst expandedUploadDialog = ref<InstanceType<typeof AFileInputDialog> | null>(null)\n\nconst onDropzoneClick = () => {\n if (isLocked.value || props.readonly) return\n acquireFieldLockLocal()\n if (!props.expandOptions) {\n clickMenuOpened.value = true\n return\n }\n expandedUploadDialog.value?.activate()\n}\n\nconst detailDialogMetadataComponent = ref<InstanceType<typeof ImageDetailDialogMetadata> | null>(null)\n\nconst metadataConfirm = () => {\n if (props.readonly) return\n detailDialogMetadataComponent.value?.confirm()\n}\n\nconst onOptionsButtonClick = () => {\n acquireFieldLockLocal()\n}\n\nconst anyWidgetDialogOpened = computed(() => {\n return (\n assetPicksPending.value > 0 ||\n metadataDialog.value ||\n assetSelectDialog.value ||\n fileInputDialog.value ||\n uploadQueueDialog.value === props.queueKey\n )\n})\n\nconst isLocked = computed(() => {\n return !isNull(lockedByUserLocal.value)\n})\n\nconst preselectType = computed(() => {\n if (mediaModel.value && mediaModel.value.damMedia.assetType) {\n return mediaModel.value.damMedia.assetType\n }\n return DamAssetType.Image as DamMediaTypeType\n})\n\nconst type = computed<DamAssetTypeType | null>(() => {\n if (isMediaAware(resImageMedia.value)) {\n return resImageMedia.value.damMedia.assetType === DamMediaType.Video ? DamAssetType.Video : DamAssetType.Audio\n } else if (isImageCreateUpdateAware(resImageMedia.value)) {\n return DamAssetType.Image\n }\n return null\n})\n\nwatch(\n clickMenuOpened,\n (newValue, oldValue) => {\n if (newValue === oldValue) return\n // Opened: a lock a refused drop left unconfirmed is asked for again, here and not in the click, which also closes.\n if (newValue) return void acquireFieldLockLocal(true)\n if (anyWidgetDialogOpened.value || deletePending.value || metadataDialogSaving.value) return\n releaseFieldLockLocal()\n },\n { immediate: false }\n)\n\nwatch(\n anyWidgetDialogOpened,\n (newValue, oldValue) => {\n if (newValue === oldValue) return\n // Opened by a button of `expandOptions`, with no menu to ask for the lock, the dialog asks; opened from the menu,\n // only for a lock not confirmed yet.\n if (newValue) return void acquireFieldLockLocal(true)\n if (deletePending.value || metadataDialogSaving.value) return\n releaseFieldLockLocal()\n },\n { immediate: false }\n)\n\n// Read-only, the widget draws none of its dialogs and menus (`!readonly`): those open close as their cancel does,\n// nothing is saved, and the lock of the field goes back once none holds it. A dialog left open kept the lock for the\n// other editors unseen, and came back by itself once the widget could be edited again. The dialog of a save on its\n// way is left to that save, which closes it and gives the lock back as it ends; one the save leaves open (it failed)\n// closes then. With `expandMetadata` the form is in the page and no dialog is closed: the form of a pick not yet\n// confirmed stays, for its host to confirm once the widget can be edited again. It was emptied, while the widget went\n// on showing the pick.\nwatch([() => props.readonly, metadataDialogSaving], ([readonly]) => {\n if (!readonly) return\n clickMenuOpened.value = false\n fileInputDialog.value = false\n if (metadataDialog.value && !metadataDialogSaving.value && !props.expandMetadata) onMetadataDialogClose()\n})\n\n// A lost connection took this editor's locks on the server: counted still, the lock was never asked for again and the\n// server refused its release. When the room is active again, a menu or dialog still open asks for it anew, as does one\n// opened while the editor was alone, once the other editor arrives, and one whose ask was refused or went unanswered.\nwatch(collabReconnecting, (reconnecting) => {\n if (!reconnecting) return\n lockedLocal.value = false\n lockRequestPending.value = false\n collabFieldLockReallyLocked.value = false\n})\nwatch(\n () => props.collabStatus,\n (status, previous) => {\n if (status === CollabStatus.Inactive || previous !== CollabStatus.Inactive) return\n if (clickMenuOpened.value || anyWidgetDialogOpened.value) acquireFieldLockLocal(true)\n }\n)\n\ndefineExpose({\n metadataConfirm,\n})\n</script>\n\n<template>\n <div\n class=\"a-image-widget\"\n :class=\"{ 'a-image-widget--locked': isLocked }\"\n :style=\"{\n width: width ? width + 'px' : undefined,\n maxWidth: maxWidth ? maxWidth + 'px' : undefined,\n }\"\n >\n <div class=\"a-image-widget__options\">\n <h4\n v-if=\"label\"\n class=\"font-weight-bold text-label-large\"\n >\n {{ label\n }}<span\n v-if=\"required\"\n class=\"a-required-mark\"\n />\n </h4>\n <div class=\"d-flex\">\n <div v-if=\"isLocked && collab\">\n <ACollabLockedByUser\n :id=\"lockedByUserLocal\"\n :users=\"collab.cachedUsers\"\n />\n </div>\n <div v-if=\"!readonly\">\n <div\n v-if=\"expandOptions\"\n class=\"d-flex flex-row\"\n >\n <VBtn\n v-if=\"imageMediaLoaded && !expandMetadata\"\n class=\"mr-2 mb-2\"\n :disabled=\"isLocked\"\n :text=\"\n type === DamAssetType.Image\n ? t('common.damImage.image.meta.edit')\n : t('common.damImage.media.meta.edit')\n \"\n @click=\"actionEditMeta\"\n />\n <VBtn\n class=\"mr-2 mb-2\"\n :disabled=\"isLocked\"\n @click=\"actionLibrary\"\n >\n <span v-if=\"imageMediaLoaded\">{{ replaceFromDamLabel }}</span>\n <span v-else>{{ addFromDamLabel }}</span>\n </VBtn>\n <AFileInputDialog\n ref=\"expandedUploadDialog\"\n v-model=\"fileInputDialog\"\n :file-input-key=\"uploadQueue?.fileInputKey\"\n :accept=\"uploadAccept\"\n :max-sizes=\"uploadSizes\"\n toolbar-t=\"common.damImage.image.button.upload\"\n @files-input=\"onFileInput\"\n >\n <template #activator=\"{ props: fileInputProps }\">\n <VBtn\n v-bind=\"fileInputProps\"\n :disabled=\"isLocked\"\n >\n {{ t('common.damImage.image.button.upload') }}\n </VBtn>\n </template>\n </AFileInputDialog>\n <span\n v-if=\"required\"\n class=\"a-required-mark ml-2\"\n />\n </div>\n <VBtn\n v-else\n variant=\"text\"\n size=\"x-small\"\n icon\n :disabled=\"isLocked\"\n :aria-label=\"t('common.damImage.image.button.options')\"\n @click.stop=\"onOptionsButtonClick\"\n >\n <VIcon icon=\"mdi-dots-horizontal\" />\n <VTooltip\n activator=\"parent\"\n location=\"top\"\n >\n {{ t('common.damImage.image.button.options') }}\n </VTooltip>\n <VMenu\n v-model=\"clickMenuOpened\"\n activator=\"parent\"\n location=\"bottom right\"\n eager\n >\n <VCard>\n <VList density=\"compact\">\n <VListItem\n v-if=\"imageMediaLoaded && !expandMetadata\"\n @click=\"actionEditMeta\"\n >\n <VListItemTitle>\n {{\n type === DamAssetType.Image\n ? t('common.damImage.image.meta.edit')\n : t('common.damImage.media.meta.edit')\n }}\n </VListItemTitle>\n </VListItem>\n <VListItem @click=\"actionLibrary\">\n <VListItemTitle>\n <span v-if=\"imageMediaLoaded\">{{ replaceFromDamLabel }}</span>\n <span v-else>{{ addFromDamLabel }}</span>\n </VListItemTitle>\n </VListItem>\n <AFileInputDialog\n v-model=\"fileInputDialog\"\n :file-input-key=\"uploadQueue?.fileInputKey\"\n :accept=\"uploadAccept\"\n :max-sizes=\"uploadSizes\"\n toolbar-t=\"common.damImage.image.button.upload\"\n @files-input=\"onFileInput\"\n >\n <template #activator=\"{ props: fileInputProps }\">\n <VListItem\n @click=\"\n ($event: any) => {\n fileInputProps.onClick($event)\n clickMenuOpened = false\n }\n \"\n >\n {{ t('common.damImage.image.button.upload') }}\n </VListItem>\n </template>\n </AFileInputDialog>\n <VListItem\n v-if=\"imageMediaLoaded\"\n @click=\"onImageMediaDelete\"\n >\n <VListItemTitle>\n {{\n type === DamAssetType.Image\n ? t('common.damImage.image.button.removeImage')\n : t('common.damImage.media.button.remove')\n }}\n </VListItemTitle>\n </VListItem>\n </VList>\n </VCard>\n </VMenu>\n </VBtn>\n </div>\n </div>\n </div>\n <div class=\"position-relative\">\n <VImg\n :lazy-src=\"imagePlaceholderPath\"\n :src=\"resolvedSrc\"\n :width=\"width\"\n :height=\"height\"\n cover\n max-width=\"100%\"\n class=\"disable-radius\"\n >\n <template #placeholder>\n <div class=\"d-flex align-center justify-center h-100\">\n <VProgressCircular\n indeterminate\n color=\"grey-lighten-4\"\n />\n </div>\n </template>\n </VImg>\n <div\n v-if=\"type\"\n class=\"a-image-widget__icon\"\n >\n <div v-if=\"type === DamAssetType.Audio\">\n <VIcon\n size=\"80\"\n icon=\"mdi-music\"\n color=\"#505050\"\n />\n </div>\n <div v-else-if=\"type === DamAssetType.Video\">\n <VIcon\n size=\"80\"\n icon=\"mdi-video\"\n color=\"#505050\"\n />\n </div>\n </div>\n <AImageDropzone\n v-if=\"!readonly\"\n variant=\"fill\"\n transparent\n :accept=\"uploadAccept\"\n :max-sizes=\"uploadSizes\"\n :hide-text=\"hideDropzoneText || isLocked\"\n @click=\"onDropzoneClick\"\n @drop=\"onDrop\"\n />\n </div>\n <slot\n name=\"append\"\n :image-media=\"resImageMedia\"\n />\n <ImageDetailDialogMetadata\n v-if=\"!readonly\"\n ref=\"detailDialogMetadataComponent\"\n v-model=\"metadataDialog\"\n :show-dam-authors=\"!!damAuthorsAsset\"\n :dam-authors=\"damAuthorsAsset?.authors\"\n :show-source-enabled=\"showSourceEnabled\"\n :source-label=\"sourceLabel\"\n :edit-asset-label=\"editAssetLabel\"\n :expand=\"expandMetadata\"\n :saving=\"metadataDialogSaving || confirmWaits\"\n :loading=\"metadataDialogLoading\"\n :type=\"dialogType\"\n @edit-asset=\"onEditAsset\"\n @update:dam-authors=\"pickDamAuthors\"\n @confirm=\"onMetadataDialogConfirm\"\n @close=\"onMetadataDialogClose\"\n >\n <template #preview=\"{ imageMedia: appendMedia }\">\n <slot\n name=\"preview\"\n :image-media=\"appendMedia\"\n />\n </template>\n </ImageDetailDialogMetadata>\n </div>\n <AAssetSelectMedia\n v-model=\"assetSelectDialog\"\n :select-licences=\"selectLicences\"\n :upload-licence=\"uploadLicence\"\n :min-count=\"1\"\n :max-count=\"1\"\n :config-name=\"damConfigName\"\n return-type=\"asset\"\n :preselect-asset-type=\"preselectType\"\n :preselect-in-podcast=\"preselectType === DamAssetType.Audio || null\"\n @confirm=\"onAssetSelectConfirm\"\n />\n <AssetDetailDialog\n v-if=\"assetDialog === queueKey\"\n :queue-key=\"queueKey\"\n :config-name=\"damConfigName\"\n :ext-system=\"cachedExtSystemId\"\n @close=\"onAssetDetailClose\"\n />\n <UploadQueueDialogSingle\n v-if=\"uploadQueueDialog === queueKey && imageWidgetUploadConfig\"\n :queue-key=\"queueKey\"\n :ext-system=\"imageWidgetUploadConfig.extSystem\"\n :licence-id=\"imageWidgetUploadConfig.licence\"\n :file-input-key=\"uploadQueue?.fileInputKey ?? -1\"\n :accept=\"uploadAccept\"\n :max-sizes=\"uploadSizes\"\n @apply=\"onAssetUploadConfirm\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4FA,IAAMoE,IAAQC,GA+CRC,KAAOH,IAIPI,IAAavE,GAA8BqE,GAAC,OAA2B,GACvEI,IAAazE,GAA8BqE,GAAC,OAA2B,GAEvEK,IAAgBC,GAAiBP,EAAM,UAAU,GAGjD,EAAE,sBAAkBQ,GAA4B,GAChD,EAAE,2BAAuBC,EAAe,GAExCC,KAAmBC,GAAK,GAAwB,MAA+C,CAAC,CAAC,GACjGC,KAAkBD,GAAK,MAA2B,CAAC,CAAC,GAEpDE,KAAmBF,GAAK,MAA8C,CAAC,CAAC,GACxEG,KAAoBH,EAAuB,IAAI;EAErD,IAAII,GAAc,MAAM,WAAWC,EAAUhB,EAAM,MAAM,GAAG;GAC1D,IAAM,EACJ,2BACA,2BACA,0BACA,qCACA,oBACEiB,GAAejB,EAAM,OAAO,MAAMA,EAAM,OAAO,KAAK;GAWxD,AAVA,GAAiB,QAAQkB,GACzB,GAAgB,QAAQC,GACxB,GAAiB,QAAQC,GACzBC,EACEC,IACC,MAAa;IACZ,GAAkB,QAAQC;GAC5B,GACA,EAAE,WAAW,GAAK,CACpB,GACAC,GAAkC,MAAuC;IACvE,IAAIC,EAAK,WAAWC,EAAsB,WAAWD,EAAK,SAASE,EAAoB,SAErF,AADA,EAAmB,QAAQ,IAC3B,EAA4B,QAAQ;SAC/B,IAAIF,EAAK,WAAWC,EAAsB,WAAWD,EAAK,SAASE,EAAoB,SAE5F,AADA,EAAmB,QAAQ,IAC3B,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7H,EAAA4T,EAAA;IACR,aAAW5T,EAAA6T,EAAA;IACX,SAAOnC"}
1
+ {"version":3,"file":"ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js","names":["_useModel","imagePlaceholderPath","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_normalizeClass","_normalizeStyle","_createTextVNode","_toDisplayString","_createCommentVNode","_createVNode","ACollabLockedByUser","_createBlock","_component_VBtn","_unref","_withCtx","AFileInputDialog","_mergeProps","_withModifiers","_component_VIcon","_component_VTooltip","_component_VMenu","_component_VCard","_component_VList","_component_VListItem","_component_VListItemTitle","_component_VImg","_component_VProgressCircular","AImageDropzone","_renderSlot","ImageDetailDialogMetadata","AAssetSelectMedia","AssetDetailDialog","UploadQueueDialogSingle","ACollabLockedByUser_default","AFileDropzone_default","placeholder16x9_default","AssetDetailDialog_default","ImageDetailDialogMetadata_default","UploadQueueDialogSingle_default","AFileInputDialog_default","AAssetSelectMedia_default","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","ImageMediaWidgetInner_vue_vue_type_script_setup_true_lang_default","CollabStatus","\"image\"","\"imageModifiers\"","\"media\"","\"mediaModifiers\"","__expose","__emit","props","__props","emit","imageModel","useModel","mediaModel","damConfigName","useDamConfigName","useCommonAdminCollabOptions","useCollabState","releaseFieldLock","ref","changeFieldData","acquireFieldLock","lockedByUserLocal","collabOptions","isDefined","useCollabField","releaseCollabFieldLock","changeCollabFieldData","acquireCollabFieldLock","watch","lockedByUser","newValue","addCollabFieldLockStatusListener","data","CollabFieldLockStatus","CollabFieldLockType","lockRequestPending","collabValue","lockedLocal","ownLockTurn","takeLockTurn","takeFieldLockTurn","lockTurnTakenSince","lastFieldLockTurn","acquireFieldLockLocal","again","releaseFieldLockLocal","releaseFieldLockWith","value","imageWidgetUploadConfig","inject","ImageWidgetUploadConfigKey","isUndefined","useI18n","useAlerts","imageOptions","useCommonAdminImageOptions","useImageActions","uploadQueuesStore","useUploadQueuesStore","useUploadQueueDialog","imageMediaWidgetStore","useImageMediaWidgetStore","storeToRefs","thisWidget","resImageMedia","clickMenuOpened","assetSelectDialog","metadataDialog","metadataDialogSaving","metadataDialogLoading","fileInputDialog","useImageDialogDamAuthors","isImageCreateUpdateAware","detail","shows","hideDropzoneText","computed","isNull","resolvedSrc","uploadQueue","imageMediaLoaded","ownInDialog","pickInDialog","loadingInDialog","answerTakenFor","disposed","opening","resImageReadAt","ownImageSaves","cancelSaveWait","dialogType","DamAssetType","actionEditMeta","type","heldId","id","othersSaves","isNumber","imageSavesOfOthersOver","thisOpening","over","withinWaitLimit","WAIT_RAN_OUT","showErrorT","heldAnew","readHeldAnew","anew","savedId","saved","imageSavedSince","reloadImage","toRaw","takeHeldAnew","showReadInForm","actionLibrary","useExtSystemIdForCached","collabFieldLockReallyLocked","LOCK_WAIT_CANCELLED","pendingLockWaits","wait","deletePending","holdImage","waitForFieldLockIsReallyAcquired","count","checkLock","resolve","dropInWait","onDrop","files","isLocked","config","thisDrop","anyWidgetDialogOpened","showWarningT","stopQueueLeftBehind","onCopyToLicence","onFileInput","useDamAcceptTypeAndSizeHelper","createdImageId","newImage","force","cloneDeep","widgetImageToDamImageUrl","newImageId","readAt","imageApi","imageClient","error","reloadMedia","newMedia","isMediaAware","damImageIdToDamImageUrl","reset","release","oldImage","oldImageId","oldMedia","created","assetSelectStore","useAssetSelectStore","useDamConfigState","assetPicksPending","onAssetSelectConfirm","thisPick","pickAsset","offerNoDamAuthors","description","source","selectedAsset","mediaDataFromDam","fetchAssetAsCmsMedia","damClient","endPointCmsAsset","assetFileIsVideoFile","mediaData","assetFileIsAudioFile","copyToLicenceEnabled","copyRes","copyToLicence","endPointImage","authorsToOffer","assetRes","fetchAsset","endPointAsset","customAssetSelectMetadataToImageMap","mapped","isString","fetchAuthorListByIds","endPointAuthor","getExtSystemByLicence","author","getDamConfigExtSystem","assetMetadataMayStillChange","offerDamAuthorsOf","image","createDamImage","forceReloadViewWithExpandMetadata","assetDetailStore","useAssetDetailStore","assetDialog","useCommonAdminCoreDamOptions","onEditAsset","extSystem","fetchAssetByFileId","assetFileId","shownUnder","loadAssetDetailExtSystem","onMetadataDialogClose","tryMediaConfirm","media","tryImageConfirm","holdConfirmForDetailAssetRead","detailDialogMetadataComponent","pressedOn","confirmIsOver","authorsSendIsOver","letGoHeld","letGoOnceSavedWithSource","authorsAsset","damAuthorsAsset","givenMeanwhile","authorsGivenMeanwhile","showErrorsDefault","showUnknownError","giveNamesToEmptySource","authorsRes","updateAssetAuthors","imageFieldsOf","res","noteImageSave","ownDialogOpen","shown","dialogOfAnotherPick","onMetadataDialogConfirm","onImageMediaDelete","imageId","onAssetUploadConfirm","items","expandedUploadDialog","onDropzoneClick","metadataConfirm","onOptionsButtonClick","uploadQueueDialog","preselectType","DamMediaType","oldValue","readonly","collabReconnecting","reconnecting","status","previous","openBlock","createElementBlock","Fragment","createElementVNode","normalizeClass","normalizeStyle","createTextVNode","toDisplayString","createCommentVNode","createVNode","createBlock","VBtn","unref","t","withCtx","replaceFromDamLabel","addFromDamLabel","_cache","$event","uploadAccept","uploadSizes","fileInputProps","mergeProps","withModifiers","VIcon","VTooltip","VMenu","VCard","VList","VListItem","VListItemTitle","VImg","VProgressCircular","renderSlot","_ctx","showSourceEnabled","sourceLabel","editAssetLabel","confirmWaits","pickDamAuthors","appendMedia","cachedExtSystemId","onAssetDetailClose"],"sources":["../../../../../src/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport AImageDropzone from '@/domains/ui/file/components/AFileDropzone.vue'\nimport type { DocId, IntegerId, IntegerIdNullable } from '@/shared/types/common'\nimport type { ImageAware, ImageCreateUpdateAware } from '@/domains/dam/types/ImageAware'\nimport imagePlaceholderPath from '@/assets/image/placeholder16x9.svg'\nimport { useCommonAdminImageOptions } from '@/domains/dam/imageWidget/composables/commonAdminImageOptions'\nimport { useImageActions } from '@/domains/dam/imageWidget/composables/imageActions'\nimport { cloneDeep, isDefined, isNull, isNumber, isString, isUndefined } from '@/shared/utils/common'\nimport { useDamConfigState } from '@/domains/dam/config/composables/damConfigState'\nimport { useAlerts } from '@/domains/system/composables/alerts'\nimport {\n type AssetDetailItemDto,\n DamAssetType,\n type DamAssetTypeType,\n type DamImageCopyToLicenceResponse,\n} from '@/domains/dam/types/Asset'\nimport { useDamAcceptTypeAndSizeHelper } from '@/domains/dam/config/composables/acceptTypeAndSizeHelper'\nimport { useUploadQueuesStore } from '@/domains/dam/uploadQueue/store/uploadQueuesStore'\nimport type { UploadQueueKey } from '@/domains/dam/types/UploadQueue'\nimport type { AssetSelectReturnData } from '@/domains/dam/types/AssetSelect'\nimport type { DamConfigLicenceExtSystemReturnType } from '@/domains/dam/types/DamConfig'\nimport ImageDetailDialogMetadata from '@/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue'\nimport { computed, inject, onBeforeUnmount, ref, type ShallowRef, toRaw, watch } from 'vue'\nimport AssetDetailDialog from '@/domains/dam/assetDetail/components/AssetDetailDialog.vue'\nimport { useAssetDetailStore } from '@/domains/dam/assetDetail/store/assetDetailStore'\nimport { loadAssetDetailExtSystem } from '@/domains/dam/assetDetail/composables/assetDetailExtSystem'\nimport { storeToRefs } from 'pinia'\nimport {\n fetchAsset,\n fetchAssetAsCmsMedia,\n fetchAssetByFileId,\n showMetadataSaveError,\n updateAssetAuthors,\n} from '@/domains/dam/api/damAssetApi'\nimport { useCommonAdminCoreDamOptions } from '@/domains/dam/composables/commonAdminCoreDamOptions'\nimport UploadQueueDialogSingle from '@/domains/dam/uploadQueue/components/UploadQueueDialogSingle.vue'\nimport { useUploadQueueDialog } from '@/domains/dam/uploadQueue/composables/useUploadQueueDialog'\nimport { fetchAuthorListByIds } from '@/domains/dam/author/api/authorApi'\nimport { useI18n } from 'vue-i18n'\nimport type { VBtn } from 'vuetify/components'\nimport { useExtSystemIdForCached } from '@/domains/dam/composables/extSystemIdForCached'\nimport { useAssetSelectStore } from '@/domains/dam/assetSelect/store/assetSelectStore'\nimport {\n type CollabComponentConfig,\n type CollabFieldData,\n type CollabFieldLockOptions,\n CollabStatus,\n type CollabStatusType,\n} from '@/domains/collab/types/Collab'\nimport { useCommonAdminCollabOptions } from '@/domains/collab/composables/commonAdminCollabOptions'\nimport { useCollabState } from '@/domains/collab/composables/collabState'\nimport { useCollabField } from '@/domains/collab/composables/collabField'\nimport ACollabLockedByUser from '@/domains/collab/components/ACollabLockedByUser.vue'\nimport AFileInputDialog from '@/domains/ui/file/components/AFileInputDialog.vue'\nimport {\n CollabFieldLockStatus,\n type CollabFieldLockStatusPayload,\n CollabFieldLockType,\n} from '@/domains/collab/composables/collabEventBus'\nimport { ImageWidgetUploadConfigKey } from '@/domains/dam/imageWidget/utils/imageWidgetInkectionKeys'\nimport AAssetSelectMedia from '@/domains/dam/assetSelect/components/AAssetSelectMedia.vue'\nimport {\n isImageCreateUpdateAware,\n isMediaAware,\n useImageMediaWidgetStore,\n} from '@/domains/dam/imageWidget/store/imageMediaWidgetStore'\nimport {\n type DamMediaFromDam,\n DamMediaType,\n type DamMediaTypeType,\n type ImageMediaCollabValue,\n type MediaAware,\n} from '@/domains/dam/types/MediaAware'\nimport { assetFileIsAudioFile, assetFileIsVideoFile } from '@/domains/dam/types/AssetFile'\nimport { copyToLicence } from '@/domains/dam/api/damImageApi'\nimport { createDamImage, imageFieldsOf } from '@/domains/dam/imageWidget/utils/damImage'\nimport { assetMetadataMayStillChange } from '@/domains/dam/assetDetail/utils/assetMetadataMayStillChange'\nimport { useDamConfigName } from '@/domains/dam/composables/damConfigName'\nimport {\n giveNamesToEmptySource,\n type HeldAssetAnew,\n useImageDialogDamAuthors,\n} from '@/domains/dam/imageWidget/composables/imageDialogDamAuthors'\nimport { lastFieldLockTurn, takeFieldLockTurn } from '@/domains/dam/imageWidget/utils/fieldLockTurns'\nimport {\n holdImage,\n imageSavedSince,\n imageSavesOfOthersOver,\n noteImageSave,\n} from '@/domains/dam/imageWidget/utils/imageSaves'\nimport { WAIT_RAN_OUT, withinWaitLimit } from '@/domains/dam/imageWidget/utils/waitLimit'\n\nconst props = withDefaults(\n defineProps<{\n queueKey: UploadQueueKey\n uploadLicence: IntegerId\n selectLicences: IntegerId[]\n initialImage?: ImageAware | undefined // optional, if available, no need to fetch image data\n configName?: string\n collab?: CollabComponentConfig\n collabStatus?: CollabStatusType\n label?: string | undefined\n required?: boolean\n readonly?: boolean\n dataCy?: string | undefined\n expandOptions?: boolean\n expandMetadata?: boolean // only one at once, use in dialogs\n disableOnClickMenu?: boolean\n width?: number | undefined\n maxWidth?: number | undefined\n height?: number | undefined\n callDeleteApiOnRemove?: boolean\n damWidth?: undefined | number\n damHeight?: undefined | number\n }>(),\n {\n configName: undefined,\n collab: undefined,\n collabStatus: CollabStatus.Inactive,\n label: undefined,\n required: false,\n initialImage: undefined,\n initialMedia: undefined,\n readonly: false,\n lockable: false,\n lockedById: undefined,\n dataCy: undefined,\n expandOptions: false,\n expandMetadata: false,\n disableOnClickMenu: false,\n width: undefined,\n maxWidth: undefined,\n height: undefined,\n callDeleteApiOnRemove: false,\n damWidth: undefined,\n damHeight: undefined,\n }\n)\n\nconst emit = defineEmits<{\n (e: 'afterMetadataSaveSuccess'): void\n}>()\n\nconst imageModel = defineModel<IntegerIdNullable>('image', { required: true })\nconst mediaModel = defineModel<MediaAware | null>('media', { required: true })\n// eslint-disable-next-line vue/no-setup-props-reactivity-loss\nconst damConfigName = useDamConfigName(props.configName)\n\n// Collaboration\nconst { collabOptions } = useCommonAdminCollabOptions()\nconst { collabReconnecting } = useCollabState()\n\nconst releaseFieldLock = ref((_data: CollabFieldData, _options?: Partial<CollabFieldLockOptions>) => {})\nconst changeFieldData = ref((_data: CollabFieldData) => {})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst acquireFieldLock = ref((options?: Partial<CollabFieldLockOptions>) => {})\nconst lockedByUserLocal = ref<IntegerIdNullable>(null)\n// eslint-disable-next-line vue/no-setup-props-reactivity-loss\nif (collabOptions.value.enabled && isDefined(props.collab)) {\n const {\n releaseCollabFieldLock,\n acquireCollabFieldLock,\n changeCollabFieldData,\n addCollabFieldLockStatusListener,\n lockedByUser,\n } = useCollabField(props.collab.room, props.collab.field)\n releaseFieldLock.value = releaseCollabFieldLock\n changeFieldData.value = changeCollabFieldData\n acquireFieldLock.value = acquireCollabFieldLock\n watch(\n lockedByUser,\n (newValue) => {\n lockedByUserLocal.value = newValue\n },\n { immediate: true }\n )\n addCollabFieldLockStatusListener((data: CollabFieldLockStatusPayload) => {\n if (data.status === CollabFieldLockStatus.Success && data.type === CollabFieldLockType.Acquire) {\n lockRequestPending.value = false\n collabFieldLockReallyLocked.value = true\n } else if (data.status === CollabFieldLockStatus.Failure && data.type === CollabFieldLockType.Acquire) {\n lockRequestPending.value = false\n collabFieldLockReallyLocked.value = false\n } else if (lockRequestPending.value) {\n // The answer to a release sent before a request still out says nothing about that request, whose own answer\n // decides: a refused release read as the lock held let a drop upload before its request was answered.\n return\n } else if (data.status === CollabFieldLockStatus.Success && data.type === CollabFieldLockType.Release) {\n collabFieldLockReallyLocked.value = false\n } else if (data.status === CollabFieldLockStatus.Failure && data.type === CollabFieldLockType.Release) {\n collabFieldLockReallyLocked.value = true\n }\n })\n}\n// What the field holds, both halves: an image or a media, and the other editors have to know which. Read from the\n// models only where they already hold it: an assignment to a `v-model` model shows there after the parent renders,\n// so the paths that just assigned send what they assigned.\nconst collabValue = (): ImageMediaCollabValue => ({ image: imageModel.value, media: mediaModel.value })\nconst lockedLocal = ref(false)\n// The turn of the lock of the field this widget took last, by a request or a release. Another widget of the same field\n// may have taken one since: the widget drawn in place of this one once it is gone.\nlet ownLockTurn = 0\nconst takeLockTurn = () => {\n if (isDefined(props.collab)) ownLockTurn = takeFieldLockTurn(props.collab.room, props.collab.field)\n}\nconst lockTurnTakenSince = () =>\n isDefined(props.collab) && lastFieldLockTurn(props.collab.room, props.collab.field) !== ownLockTurn\n// Asked for once per lock. A drop asks again for a lock not confirmed yet: a refused request left every later drop\n// waiting on a lock never granted. A refusal does not forget the lock either: a timed-out request answers the same,\n// and the server may have granted it, so it is still released. Never asked while a request is out: a second one\n// could answer after the first, and one sent by the click that closes the menu raced its release on the server.\nconst lockRequestPending = ref(false)\nconst acquireFieldLockLocal = (again = false) => {\n if (props.collabStatus === CollabStatus.Inactive) return\n if (lockedLocal.value === true && (!again || lockRequestPending.value || collabFieldLockReallyLocked.value)) return\n // What an earlier answer left says nothing about this lock: the wait for it waits for this answer.\n collabFieldLockReallyLocked.value = false\n lockRequestPending.value = true\n acquireFieldLock.value()\n takeLockTurn()\n lockedLocal.value = true\n}\n// A lock taken while the room was active is released in an inactive one too: the room turned inactive because the\n// other editor left, and the server still holds it for whoever comes back.\nconst releaseFieldLockLocal = () => {\n if (lockedLocal.value === false) return\n releaseFieldLock.value(collabValue())\n takeLockTurn()\n lockedLocal.value = false\n}\n// One release per lock: the server refuses a second one, and its refusal read as the lock still held. An inactive\n// room keeps the value for the editors who join, lock or not.\nconst releaseFieldLockWith = (value: ImageMediaCollabValue) => {\n if (lockedLocal.value === false && props.collabStatus !== CollabStatus.Inactive) return\n releaseFieldLock.value(value)\n takeLockTurn()\n lockedLocal.value = false\n}\n\nconst imageWidgetUploadConfig = inject<ShallowRef<DamConfigLicenceExtSystemReturnType | undefined> | undefined>(\n ImageWidgetUploadConfigKey,\n undefined\n)\n\nif (isUndefined(imageWidgetUploadConfig) || isUndefined(imageWidgetUploadConfig.value)) {\n throw new Error(\"Fatal error, parent component doesn't provide necessary config ext system config.\")\n}\n\nconst { t } = useI18n()\n\nconst { showErrorsDefault, showErrorT, showWarningT, showUnknownError } = useAlerts()\n\nconst imageOptions = useCommonAdminImageOptions(damConfigName)\nconst { imageClient, imageApi } = imageOptions\nconst { widgetImageToDamImageUrl, damImageIdToDamImageUrl } = useImageActions(imageOptions)\nconst uploadQueuesStore = useUploadQueuesStore()\nconst { uploadQueueDialog, stopQueueLeftBehind } = useUploadQueueDialog()\n// Before the immediate watcher below: with expandMetadata it writes the detail while setup runs. Not the form an open\n// dialog of another widget shows: a widget drawn late, once its configuration was read, emptied that form.\nconst imageMediaWidgetStore = useImageMediaWidgetStore()\nimageMediaWidgetStore.resetUnlessShown()\nconst { detail } = storeToRefs(imageMediaWidgetStore)\nconst thisWidget = Symbol('image media widget')\n\nconst resImageMedia = ref<null | ImageCreateUpdateAware | MediaAware>(null)\nconst clickMenuOpened = ref(false)\nconst assetSelectDialog = ref(false)\nconst metadataDialog = ref(false)\nconst metadataDialogSaving = ref(false)\nconst metadataDialogLoading = ref(false)\nconst fileInputDialog = ref(false)\n\n// The authors of the DAM the dialog of the image offers are those of an asset this widget has read itself, for the\n// image that dialog shows, or draws in the page with `expandMetadata`.\nconst {\n damAuthorsAsset,\n offerDamAuthorsOf,\n offerNoDamAuthors,\n pickDamAuthors,\n onAssetDetailClose,\n holdConfirmForDetailAssetRead,\n readHeldAnew,\n takeHeldAnew,\n letGoOnceSavedWithSource,\n authorsGivenMeanwhile,\n confirmWaits,\n} = useImageDialogDamAuthors(\n damConfigName,\n () =>\n (metadataDialog.value || props.expandMetadata) && isImageCreateUpdateAware(detail.value) ? detail.value : null,\n () => props.readonly\n)\n\n// What the widget's open dialog, or its form in the page, shows is in the store of the dialog: no other widget empties\n// it meanwhile.\nwatch(\n () => metadataDialog.value || props.expandMetadata,\n (shows) => imageMediaWidgetStore.setShownBy(thisWidget, shows),\n { immediate: true, flush: 'sync' }\n)\n\nconst hideDropzoneText = computed(() => {\n return !isNull(imageModel.value) || !isNull(mediaModel.value)\n})\n\nconst resolvedSrc = ref('')\n\nconst uploadQueue = computed(() => {\n return uploadQueuesStore.getQueue(props.queueKey)\n})\n\nconst imageMediaLoaded = computed(() => {\n return !isNull(resImageMedia.value)\n})\n\n// What \"edit metadata\" has put into the dialog: a copy of the image or the media of the widget, as it was then.\nlet ownInDialog: typeof detail.value = null\n// What a pick or an upload of this widget has put into the dialog last. The store of the dialog is the page's: what\n// it shows may be what another widget's dialog, opened over this one, shows.\nlet pickInDialog: typeof detail.value = null\n// What the dialog shows its loading for: a pick whose asset is being read, or \"edit metadata\" waiting for a save of the\n// image by another widget, or for a read of the asset the widget holds. Its answer is put into the dialog only while\n// the dialog still loads for it: not once the editor has closed it, nor once the store of the dialog, which is the\n// page's, holds what another dialog shows. The answer of a pick replaced the form of the dialog of another widget,\n// opened meanwhile, and what the editor had typed there was lost. The dialog that loads for it then closes: it shows\n// that form too, and its confirm would save it here.\nlet loadingInDialog: symbol | null = null\nconst answerTakenFor = (opening: symbol) => {\n if (disposed || loadingInDialog !== opening) return false\n if (isNull(detail.value)) return true\n loadingInDialog = null\n metadataDialogLoading.value = false\n metadataDialog.value = false\n return false\n}\n// How many saves of the image it holds the page had seen answered when the widget read that image.\nlet resImageReadAt = 0\n// The marks of the saves of images the widget has on their way.\nconst ownImageSaves = new Set<symbol>()\n// The wait of an opening of \"edit metadata\" for a save of another widget: let go once the dialog closes.\nlet cancelSaveWait: (() => void) | null = null\n// What the dialog is opened for: the image or the medium the widget holds, the asset picked, the uploaded image. Its\n// title says it from the start, the same while the dialog loads, waits and saves.\nconst dialogType = ref<DamAssetTypeType>(DamAssetType.Image)\nconst actionEditMeta = async () => {\n dialogType.value = type.value ?? DamAssetType.Image\n const heldId = () => (isImageCreateUpdateAware(resImageMedia.value) ? resImageMedia.value.id : undefined)\n // Another widget of the page is saving the image (the widget this one was drawn in place of, its save still on its\n // way): the dialog shows its loading till that save is over.\n const id = heldId()\n const othersSaves = isNumber(id) ? imageSavesOfOthersOver(damConfigName, id, ownImageSaves) : null\n if (othersSaves) {\n const thisOpening = (loadingInDialog = Symbol('edit'))\n imageMediaWidgetStore.setDetail(null)\n metadataDialogLoading.value = true\n metadataDialog.value = true\n cancelSaveWait = othersSaves.cancel\n const over = await withinWaitLimit(othersSaves.over, 1, damConfigName)\n cancelSaveWait = null\n if (!answerTakenFor(thisOpening)) return\n loadingInDialog = null\n metadataDialogLoading.value = false\n // That save has not answered in time: the dialog closes, and the user is told the request timed out. It loaded\n // till the editor closed it. Shown, what the widget read before that save would go out with the confirm over what\n // the save may yet write.\n if (over === WAIT_RAN_OUT) {\n othersSaves.cancel()\n metadataDialog.value = false\n showErrorT('error.apiTimedOut.message')\n return\n }\n }\n // The widget holds the asset of the image's file, picked without authors: the dialog shows its loading while that\n // asset is read anew, and what the read finds goes into the dialog with the image. Never for a medium.\n const heldAnew = readHeldAnew(\n isImageCreateUpdateAware(resImageMedia.value) ? resImageMedia.value.dam.damId : undefined\n )\n let anew: HeldAssetAnew | null = null\n if (heldAnew) {\n const thisOpening = (loadingInDialog = Symbol('edit'))\n imageMediaWidgetStore.setDetail(null)\n metadataDialogLoading.value = true\n metadataDialog.value = true\n anew = await heldAnew\n if (!answerTakenFor(thisOpening)) return\n loadingInDialog = null\n metadataDialogLoading.value = false\n }\n // Saved by another widget of the page after this one read it: the widget takes the image as that save left it. It\n // offered the texts it had read, and its confirm saved them back over the saved ones.\n const savedId = heldId()\n const saved = isNumber(savedId) ? imageSavedSince(damConfigName, savedId, resImageReadAt) : null\n if (saved) void reloadImage(saved, null, true)\n imageMediaWidgetStore.setDetail(toRaw(resImageMedia.value))\n takeHeldAnew(anew, isImageCreateUpdateAware(detail.value) ? detail.value : null)\n ownInDialog = detail.value\n metadataDialog.value = true\n}\n\n// With `expandMetadata` the form of the image is in the page once the image is read, with no \"edit metadata\" to wait\n// for a save of the image by another widget, or to take what such a save wrote: the form does both, as that opening\n// does. It showed the texts read before that save took effect, and the confirm of its host saved them back over the\n// saved ones. Once the wait runs out the form shows what was read, and the user is told the request timed out.\nconst showReadInForm = async () => {\n const heldId = () => (isImageCreateUpdateAware(resImageMedia.value) ? resImageMedia.value.id : undefined)\n const id = heldId()\n const othersSaves = isNumber(id) ? imageSavesOfOthersOver(damConfigName, id, ownImageSaves) : null\n if (othersSaves) {\n const thisOpening = (loadingInDialog = Symbol('edit'))\n imageMediaWidgetStore.setDetail(null)\n metadataDialogLoading.value = true\n cancelSaveWait = othersSaves.cancel\n const over = await withinWaitLimit(othersSaves.over, 1, damConfigName)\n cancelSaveWait = null\n if (!answerTakenFor(thisOpening)) return\n loadingInDialog = null\n metadataDialogLoading.value = false\n if (over === WAIT_RAN_OUT) {\n othersSaves.cancel()\n showErrorT('error.apiTimedOut.message')\n }\n // The widget has been given another image meanwhile: that one is shown.\n if (heldId() !== id) return\n }\n const saved = isNumber(id) ? imageSavedSince(damConfigName, id, resImageReadAt) : null\n if (saved) return void reloadImage(saved, null, true)\n imageMediaWidgetStore.setDetail(toRaw(resImageMedia.value))\n}\n\nconst actionLibrary = () => {\n assetSelectDialog.value = true\n}\n\nconst { cachedExtSystemId } = useExtSystemIdForCached(damConfigName)\n\n// this ref is updating only when the lock was really success or failure using sockets, needed for drop files\nconst collabFieldLockReallyLocked = ref(false)\n\n// Cancelling must settle the promise, not just clear the timer — `onDrop` awaits it. A Set\n// because overlapping drops each have their own wait.\nconst LOCK_WAIT_CANCELLED = Symbol('lock wait cancelled')\ntype PendingLockWait = { timer: ReturnType<typeof setTimeout>; reject: (reason: unknown) => void }\nconst pendingLockWaits = new Set<PendingLockWait>()\nlet disposed = false\n\nonBeforeUnmount(() => {\n disposed = true\n pendingLockWaits.forEach((wait) => {\n clearTimeout(wait.timer)\n wait.reject(LOCK_WAIT_CANCELLED)\n })\n pendingLockWaits.clear()\n // What held the lock of the field goes with the widget (its menu, a dialog, the picker, a pick being read, a drop\n // waiting for the lock), and nothing gave it back: the server keeps a lock till it is released or the editor leaves\n // the room, and the field stayed locked for the other editors. Given back with what the field has, unless a save or\n // a delete of the widget is on its way, which gives it back at its end, or the widget drawn in its place has taken a\n // turn of the lock since.\n if (!metadataDialogSaving.value && !deletePending.value && !lockTurnTakenSince()) releaseFieldLockLocal()\n imageMediaWidgetStore.setShownBy(thisWidget, false)\n holdImage(damConfigName, thisWidget, null)\n cancelSaveWait?.()\n})\n\nconst waitForFieldLockIsReallyAcquired = async () => {\n if (!collabOptions.value.enabled || isUndefined(props.collab) || props.collabStatus === CollabStatus.Inactive) {\n return Promise.resolve(true)\n }\n\n let count = 0\n\n const checkLock: () => Promise<Awaited<boolean>> = () => {\n if (disposed) {\n return Promise.reject(LOCK_WAIT_CANCELLED)\n }\n if (collabFieldLockReallyLocked.value) {\n return Promise.resolve(true)\n }\n\n count++\n if (count < 50) {\n return new Promise((resolve, reject) => {\n const wait: PendingLockWait = {\n timer: setTimeout(() => {\n pendingLockWaits.delete(wait)\n resolve(checkLock())\n }, 100),\n reject,\n }\n pendingLockWaits.add(wait)\n })\n }\n\n return Promise.reject(false)\n }\n\n return checkLock()\n}\n\n// The drop that is uploaded once the lock of the field comes: one, as the upload dialog shows one file while it saves\n// all it is given. Each drop that waited used to queue its file.\nlet dropInWait: symbol | null = null\n\nconst onDrop = async (files: File[]) => {\n if (props.readonly) return\n // The dropzone has turned every file away, and said so: there is nothing to ask the lock of the field for.\n if (files.length === 0) return\n // The lock an earlier drop asked for is still on its way: this one is not taken.\n if (!isNull(dropInWait) && lockRequestPending.value) return\n // As a click on the dropzone: the field is another editor's.\n if (isLocked.value) {\n showErrorT('common.damImage.error.unableToLock')\n return\n }\n acquireFieldLockLocal(true)\n const config = imageWidgetUploadConfig.value!\n // After a refusal this drop has asked again, as before: it takes the place of the one still waiting.\n const thisDrop = Symbol('drop')\n dropInWait = thisDrop\n try {\n await waitForFieldLockIsReallyAcquired()\n // The lock can resolve after the widget is gone; uploading into it is worse than dropping.\n if (disposed) return\n if (dropInWait !== thisDrop) return\n // Turned read-only while the lock was awaited: the lock goes back and nothing is uploaded.\n if (props.readonly) {\n if (pendingLockWaits.size === 0 && !clickMenuOpened.value && !anyWidgetDialogOpened.value) releaseFieldLockLocal()\n return\n }\n cachedExtSystemId.value = config.extSystem\n // The widget holds one image, and its upload dialog shows one file: of several dropped at once the first is\n // uploaded, and the user is told. The others used to be uploaded too, unseen, and left without an image.\n if (files.length > 1) showWarningT('common.damImage.upload.onlyOneFile')\n stopQueueLeftBehind(props.queueKey)\n uploadQueuesStore.addByFiles(props.queueKey, config.extSystem, config.licence, files.slice(0, 1), damConfigName)\n uploadQueueDialog.value = props.queueKey\n } catch (e) {\n if (disposed || e === LOCK_WAIT_CANCELLED) return\n // A request that timed out may have been granted after all, and nothing else would release it. Only when nothing\n // else waits for or holds it: refused, this release reads as the lock held, and another drop still waiting uploaded\n // without its lock, or a menu opened meanwhile lost the one it asked for.\n if (pendingLockWaits.size === 0 && !clickMenuOpened.value && !anyWidgetDialogOpened.value) releaseFieldLockLocal()\n showErrorT('common.damImage.error.unableToLock')\n } finally {\n if (dropInWait === thisDrop) dropInWait = null\n }\n}\n\nconst onCopyToLicence = (data: DamImageCopyToLicenceResponse) => {\n if (props.readonly) return\n if (!data[0]) return\n const config = imageWidgetUploadConfig.value!\n cachedExtSystemId.value = config.extSystem\n stopQueueLeftBehind(props.queueKey)\n if (data[0].result === 'copy') {\n uploadQueuesStore.addByCopyToLicence(\n props.queueKey,\n config.extSystem,\n config.licence,\n [data[0].targetAsset],\n damConfigName\n )\n } else if (data[0].result === 'exists') {\n uploadQueuesStore.addByCopyToLicence(\n props.queueKey,\n config.extSystem,\n config.licence,\n [data[0].targetAsset],\n damConfigName\n )\n uploadQueuesStore.queueItemDuplicate(data[0].targetAsset, data[0].targetMainFile, DamAssetType.Image, damConfigName)\n } else {\n showErrorT('common.damImage.queueItem.errorUnableToCopyToLicence')\n return\n }\n uploadQueueDialog.value = props.queueKey\n}\n\nconst onFileInput = (files: File[]) => {\n if (props.readonly) return\n // The input has turned every file away, and said so: a dialog over a queue without a row would only load.\n if (files.length === 0) return\n const config = imageWidgetUploadConfig.value!\n cachedExtSystemId.value = config.extSystem\n stopQueueLeftBehind(props.queueKey)\n uploadQueuesStore.addByFiles(props.queueKey, config.extSystem, config.licence, files, damConfigName)\n uploadQueueDialog.value = props.queueKey\n}\n\nconst { uploadSizes, uploadAccept } = useDamAcceptTypeAndSizeHelper(\n DamAssetType.Image,\n imageWidgetUploadConfig.value.extSystemConfig\n)\n\n// The id of the image this widget has just created. Its model changes to that id, and what the widget shows is the\n// answer to the create: read again, the preview fell back to the placeholder meanwhile, and a read that failed said\n// an error after a save that went through. Any other change of the id is read as before.\nlet createdImageId: IntegerIdNullable = null\n\nconst reloadImage = async (\n newImage: ImageCreateUpdateAware | undefined,\n newImageId: IntegerIdNullable,\n force = false\n) => {\n resolvedSrc.value = imagePlaceholderPath\n if ((newImage && isNull(resImageMedia.value)) || (newImage && force)) {\n resImageMedia.value = cloneDeep(newImage)\n resImageReadAt = holdImage(damConfigName, thisWidget, newImage.id ?? null)\n if (isImageCreateUpdateAware(resImageMedia.value)) {\n if (isNumber(props.damWidth) && isNumber(props.damHeight)) {\n resolvedSrc.value = widgetImageToDamImageUrl(toRaw(resImageMedia.value), props.damWidth, props.damHeight)\n } else {\n resolvedSrc.value = widgetImageToDamImageUrl(toRaw(resImageMedia.value))\n }\n if (props.expandMetadata) {\n imageMediaWidgetStore.setDetail(toRaw(resImageMedia.value))\n }\n }\n return\n }\n if (newImageId) {\n // Counted as the read is sent: a save answered after that may have taken effect only after the read.\n const readAt = holdImage(damConfigName, thisWidget, newImageId)\n try {\n resImageMedia.value = await imageApi.fetchImage(imageClient, newImageId)\n resImageReadAt = readAt\n } catch (error) {\n showErrorsDefault(error)\n }\n // The widget is gone: with `expandMetadata` its image would be put into the store of the dialog, which is the\n // page's, and by now shows the image of the next widget.\n if (disposed) return\n if (isImageCreateUpdateAware(resImageMedia.value)) {\n if (isNumber(props.damWidth) && isNumber(props.damHeight)) {\n resolvedSrc.value = widgetImageToDamImageUrl(toRaw(resImageMedia.value), props.damWidth, props.damHeight)\n } else {\n resolvedSrc.value = widgetImageToDamImageUrl(toRaw(resImageMedia.value))\n }\n if (props.expandMetadata) void showReadInForm()\n }\n return\n }\n resImageMedia.value = null\n holdImage(damConfigName, thisWidget, null)\n}\n\nconst reloadMedia = (newMedia: MediaAware | null) => {\n resolvedSrc.value = imagePlaceholderPath\n holdImage(damConfigName, thisWidget, null)\n if (newMedia) {\n resImageMedia.value = cloneDeep(newMedia)\n if (isMediaAware(resImageMedia.value) && !isNull(resImageMedia.value.damMedia.imageFileId)) {\n if (isNumber(props.damWidth) && isNumber(props.damHeight)) {\n resolvedSrc.value = damImageIdToDamImageUrl(\n resImageMedia.value.damMedia.imageFileId,\n props.damWidth,\n props.damHeight\n )\n } else {\n resolvedSrc.value = damImageIdToDamImageUrl(resImageMedia.value.damMedia.imageFileId)\n }\n if (props.expandMetadata) {\n imageMediaWidgetStore.setDetail(toRaw(resImageMedia.value))\n }\n }\n return\n }\n resImageMedia.value = null\n}\n\n// `release` false: a menu or dialog still open holds the lock, and its close or confirm releases it. Alone, the editor\n// holds none, and the value goes to the buffer here or nowhere.\nconst reset = (release = true) => {\n resolvedSrc.value = imagePlaceholderPath\n resImageMedia.value = null\n holdImage(damConfigName, thisWidget, null)\n imageModel.value = null\n mediaModel.value = null\n // Not the form the open dialog of another widget shows.\n imageMediaWidgetStore.resetUnlessShown(thisWidget)\n if (release || props.collabStatus === CollabStatus.Inactive) releaseFieldLockWith({ image: null, media: null })\n}\n\nwatch(\n [() => props.initialImage, imageModel, mediaModel],\n async ([newImage, newImageId, newMedia], [oldImage, oldImageId, oldMedia]) => {\n // Used up by every run, also one that ends at the media: left standing, it would keep a later change to that id\n // from being read.\n const created = createdImageId\n createdImageId = null\n if (!isNull(newMedia) && JSON.stringify(newMedia) !== JSON.stringify(oldMedia)) {\n reloadMedia(newMedia)\n return\n }\n\n if (newImage !== oldImage || newImageId !== oldImageId) {\n if (!isNull(created) && newImageId === created && newImage === oldImage) return\n await reloadImage(newImage, newImageId)\n return\n }\n\n if (isNull(newMedia) && !isNull(oldMedia)) {\n reloadMedia(null)\n }\n },\n { immediate: true }\n)\n\nconst assetSelectStore = useAssetSelectStore()\nconst { getDamConfigExtSystem } = useDamConfigState(undefined, damConfigName)\n\n// The picker closes itself as it answers, and the widget's next dialog opens only once the asset is fetched or\n// copied: till then the pick counts as an open dialog, or the close watcher gave the lock up with the old value. Each\n// pick on its way counts: the end of one whose dialog the editor had closed gave the lock up under a later one.\nconst assetPicksPending = ref(0)\nconst onAssetSelectConfirm = async (data: AssetSelectReturnData) => {\n if (props.readonly) return\n const thisPick = (loadingInDialog = Symbol('pick'))\n assetPicksPending.value++\n try {\n await pickAsset(data, thisPick)\n } finally {\n assetPicksPending.value--\n // Ended early (no main file, the media not loaded), the pick left the dialog loading: the next upload or edit\n // showed only a spinner. Whatever it loaded is loaded by now. Unless the dialog loads for what has opened it since.\n if (loadingInDialog === thisPick) {\n loadingInDialog = null\n metadataDialogLoading.value = false\n }\n }\n}\n\nconst pickAsset = async (data: AssetSelectReturnData, thisPick: symbol) => {\n if (data.type !== 'asset' || !data.value[0]) return\n metadataDialogLoading.value = true\n imageMediaWidgetStore.setDetail(null)\n offerNoDamAuthors()\n let description = ''\n let source = ''\n const selectedAsset = data.value[0]\n if (!selectedAsset.mainFile) return\n dialogType.value = selectedAsset.attributes.assetType\n // What the asset is to the widget is known once it is read: the dialog shows its loading till then, and while an\n // image is copied into the licence of the upload, as that of the image widget does. Nothing was shown, and a dialog\n // of another widget opened meanwhile was covered by this one.\n metadataDialog.value = true\n let mediaDataFromDam: DamMediaFromDam | null = null\n try {\n mediaDataFromDam = await fetchAssetAsCmsMedia(damClient, selectedAsset.id, endPointCmsAsset)\n } catch (e) {\n showErrorsDefault(e)\n }\n // The widget is gone: nothing of its pick is put into the store of the dialog, which is the page's. Nor when the\n // dialog no longer loads for this pick.\n if (!answerTakenFor(thisPick)) return\n // Nothing to show: the dialog closes.\n if (!mediaDataFromDam) return void (metadataDialog.value = false)\n if (selectedAsset.attributes.assetType === DamAssetType.Video && assetFileIsVideoFile(selectedAsset.mainFile)) {\n // video\n metadataDialog.value = true\n const mediaData: MediaAware = {\n extService: 'damVideo',\n damMedia: {\n imageFileId: selectedAsset.mainFile.imagePreview?.imageFile || null,\n assetId: selectedAsset.id,\n licenceId: selectedAsset.licence,\n assetType: DamAssetType.Video,\n title: mediaDataFromDam.title,\n description: mediaDataFromDam.description,\n seriesName: mediaDataFromDam.seriesName,\n authorNames: mediaDataFromDam.authorNames,\n publishedAt: mediaDataFromDam.publishedAt,\n duration: mediaDataFromDam.duration,\n mediaUrl: mediaDataFromDam.mediaUrl,\n playable: mediaDataFromDam.playable,\n syncedWithDam: true,\n episodeName: mediaDataFromDam.episodeName,\n episodeNumber: mediaDataFromDam.episodeNumber,\n },\n }\n imageMediaWidgetStore.setDetail(mediaData)\n } else if (\n selectedAsset.attributes.assetType === DamAssetType.Audio &&\n selectedAsset.podcasts.length > 0 &&\n assetFileIsAudioFile(selectedAsset.mainFile)\n ) {\n // podcast audio\n metadataDialog.value = true\n const mediaData: MediaAware = {\n extService: 'damPodcast',\n damMedia: {\n imageFileId: selectedAsset.mainFile.imagePreview?.imageFile || null,\n assetId: selectedAsset.id,\n licenceId: selectedAsset.licence,\n assetType: DamAssetType.Audio,\n title: mediaDataFromDam.title,\n description: mediaDataFromDam.description,\n seriesName: mediaDataFromDam.seriesName,\n authorNames: mediaDataFromDam.authorNames,\n publishedAt: mediaDataFromDam.publishedAt,\n duration: mediaDataFromDam.duration,\n mediaUrl: mediaDataFromDam.mediaUrl,\n playable: mediaDataFromDam.playable,\n syncedWithDam: true,\n episodeName: mediaDataFromDam.episodeName,\n episodeNumber: mediaDataFromDam.episodeNumber,\n },\n }\n imageMediaWidgetStore.setDetail(mediaData)\n } else if (selectedAsset.attributes.assetType === DamAssetType.Image) {\n // image\n // An asset already in the licence of the upload is taken as it is.\n if (\n copyToLicenceEnabled !== false &&\n !isUndefined(data.copyToLicence) &&\n selectedAsset.licence !== data.copyToLicence\n ) {\n let copyRes: DamImageCopyToLicenceResponse | null = null\n try {\n copyRes = await copyToLicence(damClient, endPointImage, [\n { asset: data.value[0].id, targetAssetLicence: data.copyToLicence },\n ])\n } catch (e) {\n showErrorsDefault(e)\n }\n // A widget that is gone, or a dialog that no longer loads for the pick, opens no upload dialog: the copy of a\n // widget that is gone went on in the upload dialog of the widget drawn in its place, which asked for the lock of\n // the field only then.\n if (!answerTakenFor(thisPick)) return\n // The upload dialog shows the copy, and takes the place of the dialog of the image.\n metadataDialogLoading.value = false\n metadataDialog.value = false\n if (copyRes) onCopyToLicence(copyRes)\n return\n }\n metadataDialog.value = true\n // The authors are offered once the pick still has the dialog: the read of a pick the dialog has left offered those\n // of its asset in the dialog of the pick shown since.\n let authorsToOffer: AssetDetailItemDto | null = null\n try {\n const assetRes = await fetchAsset(damClient, endPointAsset, selectedAsset.id)\n // As the image widget: the texts are the application's to make of the asset, where it has a mapping of its own.\n if (customAssetSelectMetadataToImageMap) {\n const mapped = customAssetSelectMetadataToImageMap(assetRes)\n description = mapped.description\n source = mapped.source\n } else {\n if (isString(assetRes.metadata.customData?.description)) {\n description = assetRes.metadata.customData.description.trim()\n }\n if (assetRes.authors.length > 0) {\n // Under the ext system of the licence of the asset, as every name of the authors of the DAM the widgets\n // write; that of the picker where the licence does not tell.\n const authorsRes = await fetchAuthorListByIds(\n damClient,\n endPointAuthor,\n (await getExtSystemByLicence(assetRes.licence)) ?? assetSelectStore.requireSelectedSelectConfig().extSystem,\n assetRes.authors\n )\n source = authorsRes.map((author) => author.name).join(', ')\n } else if (assetRes.authors.length === 0) {\n const configExtSystem = getDamConfigExtSystem(imageWidgetUploadConfig.value!.extSystem)\n // Not while the server may yet fill in its metadata from the file: saving the authors marks the asset\n // described, and the server then fills in nothing.\n if (configExtSystem?.[DamAssetType.Image]?.authors?.enabled && !assetMetadataMayStillChange(assetRes)) {\n authorsToOffer = assetRes\n }\n }\n }\n } catch (e) {\n showErrorsDefault(e)\n }\n if (!answerTakenFor(thisPick)) return\n if (authorsToOffer) offerDamAuthorsOf(authorsToOffer, selectedAsset.mainFile.id)\n const image = createDamImage(\n {\n fileId: selectedAsset.mainFile.id,\n licenceId: selectedAsset.licence,\n internal: selectedAsset.mainFileInternal,\n },\n { description, source },\n { position: 1, id: isNull(imageModel.value) ? undefined : imageModel.value }\n )\n imageMediaWidgetStore.setDetail(image)\n pickInDialog = detail.value\n } else {\n // Of no kind the widget takes (an audio in no podcast, a video whose file is no video): nothing to show.\n metadataDialog.value = false\n }\n metadataDialogLoading.value = false\n if (props.expandMetadata) {\n forceReloadViewWithExpandMetadata()\n }\n}\n\nconst assetDetailStore = useAssetDetailStore()\nconst { dialog: assetDialog } = storeToRefs(assetDetailStore)\nconst {\n damClient,\n endPointAsset,\n endPointImage,\n endPointAuthor,\n endPointCmsAsset,\n copyToLicenceEnabled,\n showSourceEnabled,\n sourceLabel,\n editAssetLabel,\n addFromDamLabel,\n replaceFromDamLabel,\n customAssetSelectMetadataToImageMap,\n} = useCommonAdminCoreDamOptions(damConfigName)\n\nconst { getExtSystemByLicence } = useDamConfigState(damClient, damConfigName)\n\nconst onEditAsset = async (assetFileId: DocId) => {\n let extSystem: IntegerId | null = null\n try {\n await assetDetailStore.open(\n props.queueKey,\n async () => {\n const assetRes = await fetchAssetByFileId(damClient, endPointAsset, assetFileId)\n // A licence the client cannot resolve: the ext system of the widget's upload licence, which its root loaded.\n const shownUnder = (await getExtSystemByLicence(assetRes.licence)) ?? imageWidgetUploadConfig.value!.extSystem\n // Before the detail shows the asset: it reads the configuration of its ext system as it draws, and threw\n // without it.\n await loadAssetDetailExtSystem(damClient, shownUnder, assetRes.attributes.assetType, damConfigName)\n extSystem = shownUnder\n return assetRes\n },\n // Only for the asset the detail shows: an answer it no longer waits for must not change the ext system its\n // configuration asks for names under.\n () => {\n if (extSystem) cachedExtSystemId.value = extSystem\n }\n )\n } catch (e) {\n showErrorsDefault(e)\n }\n}\n\nconst onMetadataDialogClose = () => {\n imageMediaWidgetStore.setDetail(null)\n metadataDialog.value = false\n // What it was loading for is not shown once it is closed: the answer of a pick being read went into the store of the\n // dialog all the same, over the form of a dialog of another widget opened meanwhile.\n loadingInDialog = null\n metadataDialogLoading.value = false\n // The wait of the opening it was loading for, for a save of another widget, is taken off that save.\n cancelSaveWait?.()\n}\n\nconst tryMediaConfirm = async () => {\n if (!isMediaAware(detail.value)) return\n // Not taken while the save of an image of this widget is on its way, as a second confirm of that image is not: the\n // answer of that save sets the image, and took away the media confirmed meanwhile. The button spins till then.\n if (metadataDialogSaving.value) return\n metadataDialogSaving.value = true\n try {\n metadataDialog.value = false\n const media = detail.value\n mediaModel.value = media\n imageModel.value = null\n imageMediaWidgetStore.setDetail(null)\n reloadMedia(media)\n emit('afterMetadataSaveSuccess')\n releaseFieldLockWith({ image: null, media })\n } catch (e) {\n showErrorsDefault(e)\n } finally {\n metadataDialogSaving.value = false\n }\n}\n\nconst tryImageConfirm = async () => {\n if (!isImageCreateUpdateAware(detail.value)) return\n // The asset of a detail that has just closed is still being read. What the dialog offers may change by that read,\n // and with it what its form asks for: the confirm waits for the read, and is then taken again by the form.\n const confirmAgain = () => detailDialogMetadataComponent.value?.confirm()\n if (holdConfirmForDetailAssetRead(metadataDialogSaving.value, confirmAgain)) return\n // Pressed again while the save of the first press runs (the button of a host is not disabled meanwhile, and Enter\n // reaches the one of the dialog), it is not taken: the image would be created, or updated, a second time.\n if (metadataDialogSaving.value) return\n // A confirm is for the image it was pressed on. While it waits for an answer the dialog can be closed, and opened\n // again for another image or for a media, and the widget can go away with its page. Until the image is sent to be\n // saved, the confirm goes on after each wait only for a widget that is still there, and only while the dialog still\n // shows that image. It went on with whatever the dialog showed by then: that image was saved without a press, and\n // its dialog closed, and for a media an image without its fields was sent to be created.\n const pressedOn = detail.value\n const confirmIsOver = () => disposed || detail.value !== pressedOn\n // Nor are the authors sent by a widget that has turned read-only meanwhile.\n const authorsSendIsOver = () => confirmIsOver() || props.readonly\n metadataDialogSaving.value = true\n // The dialog shows the source of the image of the asset the widget holds, not the pick (a read of it failed): once\n // saved, the image has a source of its own, and the asset is let go.\n const letGoHeld = letGoOnceSavedWithSource(pressedOn)\n try {\n const authorsAsset = damAuthorsAsset.value\n if (authorsAsset) {\n if (authorsAsset.authors.length > 0) {\n // The asset was read at its pick, and may have been given authors elsewhere since: the write replaces them\n // with those picked here. It is read again first. A read that fails saves nothing. Once it has authors nothing\n // is written either: the pick goes, an empty source takes their names, the user is told till they close the\n // message, and the dialog stays.\n let givenMeanwhile: string | null\n try {\n givenMeanwhile = await authorsGivenMeanwhile(authorsAsset)\n } catch (e) {\n if (!authorsSendIsOver() && !showErrorsDefault(e)) showUnknownError()\n return\n }\n if (authorsSendIsOver()) return\n if (!isNull(givenMeanwhile)) {\n offerNoDamAuthors()\n giveNamesToEmptySource(pressedOn, givenMeanwhile)\n showWarningT('common.damImage.image.meta.authorsGivenMeanwhile', -1)\n return\n }\n // Their names become the source of the image once the DAM has taken the authors, and wait aside till then.\n // Written before, they stayed in the source, which the dialog does not show, after a write the DAM refused,\n // and a confirm with the pick emptied saved them with the image.\n // Under the ext system of the licence of the asset, as the read before the write names authors given since.\n const authorsRes = await fetchAuthorListByIds(\n damClient,\n endPointAuthor,\n (await getExtSystemByLicence(authorsAsset.licence)) ??\n assetSelectStore.requireSelectedSelectConfig().extSystem,\n authorsAsset.authors\n )\n // Nothing is written and nothing said: the authors are not sent for a dialog the user has left, nor by a\n // widget that is gone or read-only.\n if (authorsSendIsOver()) return\n const source = authorsRes.map((author) => author.name).join(', ')\n try {\n await updateAssetAuthors(damClient, endPointAsset, authorsAsset)\n } catch (e) {\n // The authors refused by validation are named as the forms name them. The image is not saved.\n showMetadataSaveError(e, assetSelectStore.requireSelectedSelectConfig().extSystem, damConfigName)\n return\n }\n // The DAM has the authors, and the image is not saved.\n if (confirmIsOver()) return\n pressedOn.texts.source = source\n offerNoDamAuthors()\n }\n }\n const image = imageFieldsOf(pressedOn)\n // An update is noted for the other widgets of the page, also when this one is gone by its answer.\n const res = image.id\n ? await noteImageSave(damConfigName, image.id, ownImageSaves, imageApi.updateImage(imageClient, image.id, image))\n : await imageApi.createImage(imageClient, image)\n // The widget is gone: nothing of the answer is written. The store of the dialog is the page's, and by now the\n // next widget's: its form was emptied, and then showed the image saved here.\n if (disposed) return\n letGoHeld()\n // The save went through, and the widget takes its image. The dialog is this confirm's to close while it shows the\n // image the confirm was pressed on, or none. It is closed as well when \"edit metadata\" has opened it since: what\n // it shows is a copy of the image or the media the widget had before this save, and its confirm would put that\n // over the image saved here. The dialog of another pick or upload, opened since, stays as it is, with the lock of\n // the field, which its own close or confirm gives back. The form `expandMetadata` draws in the page is no such\n // dialog: it shows the image of the widget, the saved one from here on. With the dialog closed meanwhile, what the\n // store of the dialog shows by then is no longer this widget's to empty: it is what another widget's open dialog\n // shows. A dialog opened since that still loads for a pick (or for \"edit metadata\") stays open as well: what it\n // loads for fills it, with the id saved here. Closed here, it left the widget loading for that pick, whose answer\n // opened the dialog again, or closed an \"edit metadata\" opened meanwhile, which showed only the spinner.\n const ownDialogOpen = metadataDialog.value\n const shown = detail.value\n const dialogOfAnotherPick =\n !props.expandMetadata &&\n ownDialogOpen &&\n (isNull(shown) ? !isNull(loadingInDialog) : shown !== pressedOn && shown !== ownInDialog)\n if (!dialogOfAnotherPick) metadataDialog.value = false\n if (!image.id) createdImageId = res.id\n imageModel.value = res.id\n mediaModel.value = null\n if (!dialogOfAnotherPick && (ownDialogOpen || props.expandMetadata)) imageMediaWidgetStore.setDetail(null)\n // That dialog was opened while this image was being created, for a widget that had no image: the image its pick or\n // upload put there takes the id created here, and its confirm updates this image. It created a second one, and\n // this one was left unused. Only that image: one another widget has put into the store since is that widget's.\n if (dialogOfAnotherPick && !image.id && shown === pickInDialog && isImageCreateUpdateAware(shown)) {\n if (isUndefined(shown.id)) shown.id = res.id\n }\n // Before the dialog's close is seen, so this release, with what was just assigned, is the one that goes. Alone,\n // the editor holds no lock, and the value goes to the buffer here or nowhere. While the menu of the widget or\n // another of its dialogs (that of another pick, the picker, the upload) holds the field, the lock stays with it,\n // and gives it back as it closes; the other editors are sent the saved image now. Released here, a picker opened\n // since lost its lock, and what it put into the field later went to nobody. Not while the dialog of another pick\n // or upload is open: it sets what the field ends with, also under the id saved here (it is given that id when\n // this was a create), and the other editors, who read an image again only when its id changes, kept this one.\n if (props.collabStatus === CollabStatus.Inactive || (!clickMenuOpened.value && !anyWidgetDialogOpened.value)) {\n releaseFieldLockWith({ image: res.id, media: null })\n } else if (lockedLocal.value && !dialogOfAnotherPick) {\n changeFieldData.value({ image: res.id, media: null })\n }\n await reloadImage(res, res.id, true)\n emit('afterMetadataSaveSuccess')\n } catch (e) {\n showErrorsDefault(e)\n } finally {\n metadataDialogSaving.value = false\n // A dialog closed while this confirm ran left the lock of the field to it (see the watchers): given back once it\n // is over, when nothing else of the widget holds it. Saved, the image went with it above; otherwise the field\n // keeps what it had. A widget that is gone gives it back too, with what its field has: it wrote nothing of the\n // answer. The server keeps a lock till it is released or the editor leaves the room, and the field stayed locked\n // for the other editors. Unless the widget drawn in its place has taken a turn of the lock since: the release\n // would free the lock that one holds.\n if (disposed ? !lockTurnTakenSince() : !clickMenuOpened.value && !anyWidgetDialogOpened.value) {\n releaseFieldLockLocal()\n }\n }\n}\n\nconst onMetadataDialogConfirm = async () => {\n if (props.readonly) return\n await tryMediaConfirm()\n await tryImageConfirm()\n}\n\n// Till the delete is answered, neither the menu's close nor a dialog's gives the lock up: the menu closes on the click,\n// and its release went out with the image still there, the reset's own skipped as for a lock already given back. Nor\n// while a confirm of the dialog runs: closed before its save answered, the dialog gave the lock back with what the\n// field had before, and the release of the answer, as for a lock already given back, never sent the saved image to the\n// other editors.\nconst deletePending = ref(false)\nconst onImageMediaDelete = async () => {\n // The widget's own image: the store's detail is shared, empty unless a dialog loaded it, or another widget's.\n const imageId = imageModel.value\n if (props.callDeleteApiOnRemove && !isNull(imageId)) {\n deletePending.value = true\n try {\n await imageApi.deleteImage(imageClient, imageId)\n // A widget that is gone writes nothing into the page.\n if (!disposed) reset(!clickMenuOpened.value && !anyWidgetDialogOpened.value)\n } catch (e) {\n showErrorsDefault(e)\n } finally {\n deletePending.value = false\n }\n // Gone, the widget gives the lock back with what its field has, as it does at the end of a confirm: unless the\n // widget drawn in its place has taken a turn of the lock since. The release of the reset freed the lock that one\n // held, under its open menu.\n if (disposed ? !lockTurnTakenSince() : !clickMenuOpened.value && !anyWidgetDialogOpened.value)\n releaseFieldLockLocal()\n return\n }\n reset()\n}\n\nconst forceReloadViewWithExpandMetadata = () => {\n if (isMediaAware(detail.value)) {\n reloadMedia(detail.value)\n return\n } else if (isImageCreateUpdateAware(detail.value)) {\n reloadImage(detail.value, null, true)\n }\n}\n\nconst onAssetUploadConfirm = (items: ImageCreateUpdateAware[]) => {\n if (props.readonly) return\n if (!items[0]) return\n\n if (!isNull(imageModel.value)) {\n items[0].id = imageModel.value\n }\n // The image of an upload comes with its source: the authors of an asset picked before are not offered with it.\n offerNoDamAuthors()\n dialogType.value = DamAssetType.Image\n imageMediaWidgetStore.setDetail(items[0])\n pickInDialog = detail.value\n metadataDialog.value = true\n if (props.expandMetadata) {\n forceReloadViewWithExpandMetadata()\n }\n}\n\nconst expandedUploadDialog = ref<InstanceType<typeof AFileInputDialog> | null>(null)\n\nconst onDropzoneClick = () => {\n if (isLocked.value || props.readonly) return\n acquireFieldLockLocal()\n if (!props.expandOptions) {\n clickMenuOpened.value = true\n return\n }\n expandedUploadDialog.value?.activate()\n}\n\nconst detailDialogMetadataComponent = ref<InstanceType<typeof ImageDetailDialogMetadata> | null>(null)\n\nconst metadataConfirm = () => {\n if (props.readonly) return\n detailDialogMetadataComponent.value?.confirm()\n}\n\nconst onOptionsButtonClick = () => {\n acquireFieldLockLocal()\n}\n\nconst anyWidgetDialogOpened = computed(() => {\n return (\n assetPicksPending.value > 0 ||\n metadataDialog.value ||\n assetSelectDialog.value ||\n fileInputDialog.value ||\n uploadQueueDialog.value === props.queueKey\n )\n})\n\nconst isLocked = computed(() => {\n return !isNull(lockedByUserLocal.value)\n})\n\nconst preselectType = computed(() => {\n if (mediaModel.value && mediaModel.value.damMedia.assetType) {\n return mediaModel.value.damMedia.assetType\n }\n return DamAssetType.Image as DamMediaTypeType\n})\n\nconst type = computed<DamAssetTypeType | null>(() => {\n if (isMediaAware(resImageMedia.value)) {\n return resImageMedia.value.damMedia.assetType === DamMediaType.Video ? DamAssetType.Video : DamAssetType.Audio\n } else if (isImageCreateUpdateAware(resImageMedia.value)) {\n return DamAssetType.Image\n }\n return null\n})\n\nwatch(\n clickMenuOpened,\n (newValue, oldValue) => {\n if (newValue === oldValue) return\n // Opened: a lock a refused drop left unconfirmed is asked for again, here and not in the click, which also closes.\n if (newValue) return void acquireFieldLockLocal(true)\n if (anyWidgetDialogOpened.value || deletePending.value || metadataDialogSaving.value) return\n releaseFieldLockLocal()\n },\n { immediate: false }\n)\n\nwatch(\n anyWidgetDialogOpened,\n (newValue, oldValue) => {\n if (newValue === oldValue) return\n // Opened by a button of `expandOptions`, with no menu to ask for the lock, the dialog asks; opened from the menu,\n // only for a lock not confirmed yet.\n if (newValue) return void acquireFieldLockLocal(true)\n if (deletePending.value || metadataDialogSaving.value) return\n releaseFieldLockLocal()\n },\n { immediate: false }\n)\n\n// Read-only, the widget draws none of its dialogs and menus (`!readonly`): those open close as their cancel does,\n// nothing is saved, and the lock of the field goes back once none holds it. A dialog left open kept the lock for the\n// other editors unseen, and came back by itself once the widget could be edited again. The dialog of a save on its\n// way is left to that save, which closes it and gives the lock back as it ends; one the save leaves open (it failed)\n// closes then. With `expandMetadata` the form is in the page and no dialog is closed: the form of a pick not yet\n// confirmed stays, for its host to confirm once the widget can be edited again. It was emptied, while the widget went\n// on showing the pick.\nwatch([() => props.readonly, metadataDialogSaving], ([readonly]) => {\n if (!readonly) return\n clickMenuOpened.value = false\n fileInputDialog.value = false\n if (metadataDialog.value && !metadataDialogSaving.value && !props.expandMetadata) onMetadataDialogClose()\n})\n\n// A lost connection took this editor's locks on the server: counted still, the lock was never asked for again and the\n// server refused its release. When the room is active again, a menu or dialog still open asks for it anew, as does one\n// opened while the editor was alone, once the other editor arrives, and one whose ask was refused or went unanswered.\nwatch(collabReconnecting, (reconnecting) => {\n if (!reconnecting) return\n lockedLocal.value = false\n lockRequestPending.value = false\n collabFieldLockReallyLocked.value = false\n})\nwatch(\n () => props.collabStatus,\n (status, previous) => {\n if (status === CollabStatus.Inactive || previous !== CollabStatus.Inactive) return\n if (clickMenuOpened.value || anyWidgetDialogOpened.value) acquireFieldLockLocal(true)\n }\n)\n\ndefineExpose({\n metadataConfirm,\n})\n</script>\n\n<template>\n <div\n class=\"a-image-widget\"\n :class=\"{ 'a-image-widget--locked': isLocked }\"\n :style=\"{\n width: width ? width + 'px' : undefined,\n maxWidth: maxWidth ? maxWidth + 'px' : undefined,\n }\"\n >\n <div class=\"a-image-widget__options\">\n <h4\n v-if=\"label\"\n class=\"font-weight-bold text-label-large\"\n >\n {{ label\n }}<span\n v-if=\"required\"\n class=\"a-required-mark\"\n />\n </h4>\n <div class=\"d-flex\">\n <div v-if=\"isLocked && collab\">\n <ACollabLockedByUser\n :id=\"lockedByUserLocal\"\n :users=\"collab.cachedUsers\"\n />\n </div>\n <div v-if=\"!readonly\">\n <div\n v-if=\"expandOptions\"\n class=\"d-flex flex-row\"\n >\n <VBtn\n v-if=\"imageMediaLoaded && !expandMetadata\"\n class=\"mr-2 mb-2\"\n :disabled=\"isLocked\"\n :text=\"\n type === DamAssetType.Image\n ? t('common.damImage.image.meta.edit')\n : t('common.damImage.media.meta.edit')\n \"\n @click=\"actionEditMeta\"\n />\n <VBtn\n class=\"mr-2 mb-2\"\n :disabled=\"isLocked\"\n @click=\"actionLibrary\"\n >\n <span v-if=\"imageMediaLoaded\">{{ replaceFromDamLabel }}</span>\n <span v-else>{{ addFromDamLabel }}</span>\n </VBtn>\n <AFileInputDialog\n ref=\"expandedUploadDialog\"\n v-model=\"fileInputDialog\"\n :file-input-key=\"uploadQueue?.fileInputKey\"\n :accept=\"uploadAccept\"\n :max-sizes=\"uploadSizes\"\n toolbar-t=\"common.damImage.image.button.upload\"\n @files-input=\"onFileInput\"\n >\n <template #activator=\"{ props: fileInputProps }\">\n <VBtn\n v-bind=\"fileInputProps\"\n :disabled=\"isLocked\"\n >\n {{ t('common.damImage.image.button.upload') }}\n </VBtn>\n </template>\n </AFileInputDialog>\n <span\n v-if=\"required\"\n class=\"a-required-mark ml-2\"\n />\n </div>\n <VBtn\n v-else\n variant=\"text\"\n size=\"x-small\"\n icon\n :disabled=\"isLocked\"\n :aria-label=\"t('common.damImage.image.button.options')\"\n @click.stop=\"onOptionsButtonClick\"\n >\n <VIcon icon=\"mdi-dots-horizontal\" />\n <VTooltip\n activator=\"parent\"\n location=\"top\"\n >\n {{ t('common.damImage.image.button.options') }}\n </VTooltip>\n <VMenu\n v-model=\"clickMenuOpened\"\n activator=\"parent\"\n location=\"bottom right\"\n eager\n >\n <VCard>\n <VList density=\"compact\">\n <VListItem\n v-if=\"imageMediaLoaded && !expandMetadata\"\n @click=\"actionEditMeta\"\n >\n <VListItemTitle>\n {{\n type === DamAssetType.Image\n ? t('common.damImage.image.meta.edit')\n : t('common.damImage.media.meta.edit')\n }}\n </VListItemTitle>\n </VListItem>\n <VListItem @click=\"actionLibrary\">\n <VListItemTitle>\n <span v-if=\"imageMediaLoaded\">{{ replaceFromDamLabel }}</span>\n <span v-else>{{ addFromDamLabel }}</span>\n </VListItemTitle>\n </VListItem>\n <AFileInputDialog\n v-model=\"fileInputDialog\"\n :file-input-key=\"uploadQueue?.fileInputKey\"\n :accept=\"uploadAccept\"\n :max-sizes=\"uploadSizes\"\n toolbar-t=\"common.damImage.image.button.upload\"\n @files-input=\"onFileInput\"\n >\n <template #activator=\"{ props: fileInputProps }\">\n <VListItem\n @click=\"\n ($event: any) => {\n fileInputProps.onClick($event)\n clickMenuOpened = false\n }\n \"\n >\n {{ t('common.damImage.image.button.upload') }}\n </VListItem>\n </template>\n </AFileInputDialog>\n <VListItem\n v-if=\"imageMediaLoaded\"\n @click=\"onImageMediaDelete\"\n >\n <VListItemTitle>\n {{\n type === DamAssetType.Image\n ? t('common.damImage.image.button.removeImage')\n : t('common.damImage.media.button.remove')\n }}\n </VListItemTitle>\n </VListItem>\n </VList>\n </VCard>\n </VMenu>\n </VBtn>\n </div>\n </div>\n </div>\n <div class=\"position-relative\">\n <VImg\n :lazy-src=\"imagePlaceholderPath\"\n :src=\"resolvedSrc\"\n :width=\"width\"\n :height=\"height\"\n cover\n max-width=\"100%\"\n class=\"disable-radius\"\n >\n <template #placeholder>\n <div class=\"d-flex align-center justify-center h-100\">\n <VProgressCircular\n indeterminate\n color=\"grey-lighten-4\"\n />\n </div>\n </template>\n </VImg>\n <div\n v-if=\"type\"\n class=\"a-image-widget__icon\"\n >\n <div v-if=\"type === DamAssetType.Audio\">\n <VIcon\n size=\"80\"\n icon=\"mdi-music\"\n color=\"#505050\"\n />\n </div>\n <div v-else-if=\"type === DamAssetType.Video\">\n <VIcon\n size=\"80\"\n icon=\"mdi-video\"\n color=\"#505050\"\n />\n </div>\n </div>\n <AImageDropzone\n v-if=\"!readonly\"\n variant=\"fill\"\n transparent\n :accept=\"uploadAccept\"\n :max-sizes=\"uploadSizes\"\n :hide-text=\"hideDropzoneText || isLocked\"\n @click=\"onDropzoneClick\"\n @drop=\"onDrop\"\n />\n </div>\n <slot\n name=\"append\"\n :image-media=\"resImageMedia\"\n />\n <ImageDetailDialogMetadata\n v-if=\"!readonly\"\n ref=\"detailDialogMetadataComponent\"\n v-model=\"metadataDialog\"\n :show-dam-authors=\"!!damAuthorsAsset\"\n :dam-authors=\"damAuthorsAsset?.authors\"\n :show-source-enabled=\"showSourceEnabled\"\n :source-label=\"sourceLabel\"\n :edit-asset-label=\"editAssetLabel\"\n :expand=\"expandMetadata\"\n :saving=\"metadataDialogSaving || confirmWaits\"\n :loading=\"metadataDialogLoading\"\n :type=\"dialogType\"\n @edit-asset=\"onEditAsset\"\n @update:dam-authors=\"pickDamAuthors\"\n @confirm=\"onMetadataDialogConfirm\"\n @close=\"onMetadataDialogClose\"\n >\n <template #preview=\"{ imageMedia: appendMedia }\">\n <slot\n name=\"preview\"\n :image-media=\"appendMedia\"\n />\n </template>\n </ImageDetailDialogMetadata>\n </div>\n <AAssetSelectMedia\n v-model=\"assetSelectDialog\"\n :select-licences=\"selectLicences\"\n :upload-licence=\"uploadLicence\"\n :min-count=\"1\"\n :max-count=\"1\"\n :config-name=\"damConfigName\"\n return-type=\"asset\"\n :preselect-asset-type=\"preselectType\"\n :preselect-in-podcast=\"preselectType === DamAssetType.Audio || null\"\n @confirm=\"onAssetSelectConfirm\"\n />\n <AssetDetailDialog\n v-if=\"assetDialog === queueKey\"\n :queue-key=\"queueKey\"\n :config-name=\"damConfigName\"\n :ext-system=\"cachedExtSystemId\"\n @close=\"onAssetDetailClose\"\n />\n <UploadQueueDialogSingle\n v-if=\"uploadQueueDialog === queueKey && imageWidgetUploadConfig\"\n :queue-key=\"queueKey\"\n :ext-system=\"imageWidgetUploadConfig.extSystem\"\n :licence-id=\"imageWidgetUploadConfig.licence\"\n :file-input-key=\"uploadQueue?.fileInputKey ?? -1\"\n :accept=\"uploadAccept\"\n :max-sizes=\"uploadSizes\"\n @apply=\"onAssetUploadConfirm\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4FA,IAAMoE,IAAQC,GA+CRC,KAAOH,IAIPI,IAAavE,GAA8BqE,GAAC,OAA2B,GACvEI,IAAazE,GAA8BqE,GAAC,OAA2B,GAEvEK,IAAgBC,GAAiBP,EAAM,UAAU,GAGjD,EAAE,sBAAkBQ,GAA4B,GAChD,EAAE,2BAAuBC,EAAe,GAExCC,KAAmBC,GAAK,GAAwB,MAA+C,CAAC,CAAC,GACjGC,KAAkBD,GAAK,MAA2B,CAAC,CAAC,GAEpDE,KAAmBF,GAAK,MAA8C,CAAC,CAAC,GACxEG,KAAoBH,EAAuB,IAAI;EAErD,IAAII,GAAc,MAAM,WAAWC,EAAUhB,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AAC,SAAK;IAC1D,WAASuE;;;;;;;;;GAGJhN,EAAAqP,EAAA,MAAgB/L,EAAA,YADxBnE,EAAA,GAAAW,EAMEoB,IAAA;;IAJC,aAAWoC,EAAA;IACX,eAAatD,EAAA2D,CAAA;IACb,cAAY3D,EAAAkV,EAAA;IACZ,SAAOlV,EAAAmV,EAAA;;;;;;;GAGFnV,EAAAgS,EAAA,MAAsB1O,EAAA,YAAYtD,EAAA8F,CAAA,KAD1C3G,EAAA,GAAAW,EASEqB,IAAA;;IAPC,aAAWmC,EAAA;IACX,cAAYtD,EAAA8F,CAAA,CAAuB,CAAC;IACpC,cAAY9F,EAAA8F,CAAA,CAAuB,CAAC;IACpC,kBAAgB+B,GAAA,OAAa,gBAAY;IACzC,QAAQ7H,EAAA4T,EAAA;IACR,aAAW5T,EAAA6T,EAAA;IACX,SAAOnC"}
@@ -1,7 +1,6 @@
1
1
  import e from "./ImageWidgetInner.vue_vue_type_script_setup_true_lang.js";
2
- //#region src/domains/dam/imageWidget/components/ImageWidgetInner.vue
2
+ // src/domains/dam/imageWidget/components/ImageWidgetInner.vue
3
3
  var t = e;
4
- //#endregion
5
4
  export { t as default };
6
5
 
7
6
  //# sourceMappingURL=ImageWidgetInner.js.map
@@ -48,7 +48,7 @@ import { VList as dt, VListItem as ft, VListItemTitle as pt } from "vuetify/comp
48
48
  import { VMenu as mt } from "vuetify/components/VMenu";
49
49
  import { storeToRefs as ht } from "pinia";
50
50
  import { VImg as gt } from "vuetify/components/VImg";
51
- //#region src/domains/dam/imageWidget/components/ImageWidgetInner.vue?vue&type=script&setup=true&lang.ts
51
+ // src/domains/dam/imageWidget/components/ImageWidgetInner.vue?vue&type=script&setup=true&lang.ts
52
52
  var _t = { class: "a-image-widget__options" }, vt = {
53
53
  key: 0,
54
54
  class: "font-weight-bold text-label-large"
@@ -178,7 +178,7 @@ var _t = { class: "a-image-widget__options" }, vt = {
178
178
  tt(() => {
179
179
  X = !0, Y.forEach((e) => {
180
180
  clearTimeout(e.timer), e.reject(wn);
181
- }), Y.clear(), !H.value && !nr.value && !Ht() && j(E.value), I.setShownBy(R, !1), Ve(D, R, null), q?.();
181
+ }), Y.clear(), H.value || nr.value || Ht() || j(E.value), I.setShownBy(R, !1), Ve(D, R, null), q?.();
182
182
  });
183
183
  let Tn = async () => {
184
184
  if (!Pt.value.enabled || a(T.collab) || T.collabStatus === l.Inactive) return Promise.resolve(!0);
@@ -656,7 +656,6 @@ var _t = { class: "a-image-widget__options" }, vt = {
656
656
  ], 64));
657
657
  }
658
658
  });
659
- //#endregion
660
659
  export { Mt as default };
661
660
 
662
661
  //# sourceMappingURL=ImageWidgetInner.vue_vue_type_script_setup_true_lang.js.map