@anzusystems/common-admin 2.0.0-rc.5 → 2.0.0-rc.7

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 (690) hide show
  1. package/README.md +4 -0
  2. package/dist/AnzuSystemsCommonAdmin.d.ts +42 -32
  3. package/dist/AnzuSystemsCommonAdmin.js.map +1 -1
  4. package/dist/common-admin.css +1 -1
  5. package/dist/common-admin.js +282 -282
  6. package/dist/domains/anzuUser/api/anzuUserApi.d.ts +9 -12
  7. package/dist/domains/anzuUser/api/anzuUserApi.js.map +1 -1
  8. package/dist/domains/anzuUser/components/AAnzuUserDatatable.js.map +1 -1
  9. package/dist/domains/anzuUser/components/AAnzuUserDatatable.vue.d.ts +38 -44
  10. package/dist/domains/anzuUser/components/AAnzuUserDatatable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  11. package/dist/domains/anzuUser/components/AAnzuUserFilter.js.map +1 -1
  12. package/dist/domains/anzuUser/components/AAnzuUserFilter.vue.d.ts +12 -13
  13. package/dist/domains/anzuUser/components/AAnzuUserFilter.vue_vue_type_script_setup_true_lang.js.map +1 -1
  14. package/dist/domains/anzuUser/components/AAnzuUserForm.js.map +1 -1
  15. package/dist/domains/anzuUser/components/AAnzuUserForm.vue.d.ts +18 -20
  16. package/dist/domains/anzuUser/components/AAnzuUserForm.vue_vue_type_script_setup_true_lang.js.map +1 -1
  17. package/dist/domains/anzuUser/components/AAnzuUserRoleAutocomplete.js.map +1 -1
  18. package/dist/domains/anzuUser/components/AAnzuUserRoleAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  19. package/dist/domains/anzuUser/components/AUserBulkActionDialog.js.map +1 -1
  20. package/dist/domains/anzuUser/components/AUserBulkActionDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  21. package/dist/domains/anzuUser/components/AUserCopyPermissionsDialog.js.map +1 -1
  22. package/dist/domains/anzuUser/components/AUserCopyPermissionsDialog.vue.d.ts +2 -3
  23. package/dist/domains/anzuUser/components/AUserCopyPermissionsDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  24. package/dist/domains/anzuUser/components/AUserCreateInSystemButton.js.map +1 -1
  25. package/dist/domains/anzuUser/components/AUserCreateInSystemButton.vue.d.ts +9 -15
  26. package/dist/domains/anzuUser/components/AUserCreateInSystemButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  27. package/dist/domains/anzuUser/components/AUserEnabledSwitch.js.map +1 -1
  28. package/dist/domains/anzuUser/components/AUserEnabledSwitch.vue.d.ts +8 -7
  29. package/dist/domains/anzuUser/components/AUserEnabledSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  30. package/dist/domains/anzuUser/components/AUserManageButton.js.map +1 -1
  31. package/dist/domains/anzuUser/components/AUserManageButton.vue.d.ts +0 -1
  32. package/dist/domains/anzuUser/components/AUserManageButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  33. package/dist/domains/anzuUser/components/AUserMetadataForm.js.map +1 -1
  34. package/dist/domains/anzuUser/components/AUserMetadataForm.vue.d.ts +8 -9
  35. package/dist/domains/anzuUser/components/AUserMetadataForm.vue_vue_type_script_setup_true_lang.js.map +1 -1
  36. package/dist/domains/anzuUser/components/AUserMetadataRepairDialog.js.map +1 -1
  37. package/dist/domains/anzuUser/components/AUserMetadataRepairDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  38. package/dist/domains/anzuUser/components/AUserOtherSystemsTable.js.map +1 -1
  39. package/dist/domains/anzuUser/components/AUserOtherSystemsTable.vue.d.ts +1 -2
  40. package/dist/domains/anzuUser/components/AUserOtherSystemsTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  41. package/dist/domains/anzuUser/components/AUserSystemOverview.js.map +1 -1
  42. package/dist/domains/anzuUser/components/AUserSystemOverview.vue_vue_type_script_setup_true_lang.js.map +1 -1
  43. package/dist/domains/anzuUser/components/AUserSystemPanel.js.map +1 -1
  44. package/dist/domains/anzuUser/components/AUserSystemPanel.vue.d.ts +2 -2
  45. package/dist/domains/anzuUser/components/AUserSystemPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  46. package/dist/domains/anzuUser/components/AUserSystemStatusChip.js.map +1 -1
  47. package/dist/domains/anzuUser/components/AUserSystemStatusChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  48. package/dist/domains/anzuUser/components/AUserTabsShell.js.map +1 -1
  49. package/dist/domains/anzuUser/components/AUserTabsShell.vue.d.ts +17 -22
  50. package/dist/domains/anzuUser/components/AUserTabsShell.vue_vue_type_script_setup_true_lang.js.map +1 -1
  51. package/dist/domains/anzuUser/composables/anzuUserActions.d.ts +5 -9
  52. package/dist/domains/anzuUser/composables/anzuUserActions.js.map +1 -1
  53. package/dist/domains/anzuUser/composables/anzuUserValidations.d.ts +4 -6
  54. package/dist/domains/anzuUser/composables/anzuUserValidations.js.map +1 -1
  55. package/dist/domains/anzuUser/composables/cachedAnzuUsers.d.ts +3 -3
  56. package/dist/domains/anzuUser/composables/cachedAnzuUsers.js.map +1 -1
  57. package/dist/domains/anzuUser/composables/userCrossSystemSearch.d.ts +2 -4
  58. package/dist/domains/anzuUser/composables/userCrossSystemSearch.js.map +1 -1
  59. package/dist/domains/anzuUser/composables/userCrossSystemWrites.d.ts +5 -11
  60. package/dist/domains/anzuUser/composables/userCrossSystemWrites.js.map +1 -1
  61. package/dist/domains/anzuUser/composables/userSystemDescriptor.d.ts +33 -57
  62. package/dist/domains/anzuUser/composables/userSystemDescriptor.js.map +1 -1
  63. package/dist/domains/anzuUser/composables/userSystemProbe.d.ts +7 -27
  64. package/dist/domains/anzuUser/composables/userSystemProbe.js.map +1 -1
  65. package/dist/domains/anzuUser/filter/anzuUserFilter.d.ts +6 -16
  66. package/dist/domains/anzuUser/filter/anzuUserFilter.js.map +1 -1
  67. package/dist/domains/anzuUser/store/anzuUserStore.d.ts +1 -5
  68. package/dist/domains/anzuUser/store/anzuUserStore.js.map +1 -1
  69. package/dist/domains/anzuUser/store/userCrossSystemStore.d.ts +3 -14
  70. package/dist/domains/anzuUser/store/userCrossSystemStore.js.map +1 -1
  71. package/dist/domains/anzuUser/utils/userMetadataDiff.d.ts +7 -19
  72. package/dist/domains/anzuUser/utils/userMetadataDiff.js.map +1 -1
  73. package/dist/domains/anzuUser/utils/userSystemState.d.ts +12 -30
  74. package/dist/domains/anzuUser/utils/userSystemState.js.map +1 -1
  75. package/dist/domains/anzuUser/utils/userTabs.d.ts +1 -3
  76. package/dist/domains/anzuUser/utils/userTabs.js.map +1 -1
  77. package/dist/domains/api/composables/defineApiClient.d.ts +4 -8
  78. package/dist/domains/api/composables/defineApiClient.js.map +1 -1
  79. package/dist/domains/api/composables/request.d.ts +18 -48
  80. package/dist/domains/api/composables/request.js.map +1 -1
  81. package/dist/domains/api/composables/useApiFetchByIds.d.ts +7 -21
  82. package/dist/domains/api/composables/useApiFetchByIds.js.map +1 -1
  83. package/dist/domains/api/composables/useApiFetchItems.d.ts +18 -57
  84. package/dist/domains/api/composables/useApiFetchItems.js.map +1 -1
  85. package/dist/domains/api/composables/useApiFetchList.d.ts +7 -23
  86. package/dist/domains/api/composables/useApiFetchList.js.map +1 -1
  87. package/dist/domains/api/composables/useApiFetchListBatch.d.ts +5 -22
  88. package/dist/domains/api/composables/useApiFetchListBatch.js.map +1 -1
  89. package/dist/domains/api/composables/useApiQueryBuilder.js.map +1 -1
  90. package/dist/domains/api/composables/useApiRequest.d.ts +16 -39
  91. package/dist/domains/api/composables/useApiRequest.js.map +1 -1
  92. package/dist/domains/api/utils/apiErrors.d.ts +28 -55
  93. package/dist/domains/api/utils/apiErrors.js.map +1 -1
  94. package/dist/domains/api/utils/listBody.d.ts +22 -43
  95. package/dist/domains/api/utils/listBody.js.map +1 -1
  96. package/dist/domains/auth/components/Acl.js.map +1 -1
  97. package/dist/domains/auth/components/Acl.vue_vue_type_script_setup_true_lang.js.map +1 -1
  98. package/dist/domains/auth/composables/aclAllowed.d.ts +2 -3
  99. package/dist/domains/auth/composables/aclAllowed.js.map +1 -1
  100. package/dist/domains/auth/composables/defineAuth.js.map +1 -1
  101. package/dist/domains/auth/composables/refreshSession.d.ts +10 -13
  102. package/dist/domains/auth/composables/refreshSession.js.map +1 -1
  103. package/dist/domains/cached/components/ACachedChip.js.map +1 -1
  104. package/dist/domains/cached/components/ACachedChip.vue.d.ts +13 -11
  105. package/dist/domains/cached/components/ACachedChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  106. package/dist/domains/cached/components/ACachedUserChip.js +1 -1
  107. package/dist/domains/cached/components/ACachedUserChip.js.map +1 -1
  108. package/dist/domains/cached/components/ACachedUserChip.vue.d.ts +3 -3
  109. package/dist/domains/cached/components/ACachedUserChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  110. package/dist/domains/cached/composables/createUserAndTimeTrackingFields.d.ts +9 -9
  111. package/dist/domains/cached/composables/createUserAndTimeTrackingFields.js.map +1 -1
  112. package/dist/domains/cached/composables/defineCached.d.ts +13 -11
  113. package/dist/domains/cached/composables/defineCached.js.map +1 -1
  114. package/dist/domains/cached/composables/useCachedItem.d.ts +7 -8
  115. package/dist/domains/cached/composables/useCachedItem.js.map +1 -1
  116. package/dist/domains/collab/components/ACollabLockedByUser.js.map +1 -1
  117. package/dist/domains/collab/components/ACollabLockedByUser.vue_vue_type_script_setup_true_lang.js.map +1 -1
  118. package/dist/domains/collab/composables/collabAnyDataChange.js.map +1 -1
  119. package/dist/domains/collab/composables/collabField.d.ts +5 -3
  120. package/dist/domains/collab/composables/collabField.js.map +1 -1
  121. package/dist/domains/collab/composables/collabInit.js +58 -54
  122. package/dist/domains/collab/composables/collabInit.js.map +1 -1
  123. package/dist/domains/collab/composables/collabRecovery.d.ts +49 -0
  124. package/dist/domains/collab/composables/collabRecovery.js +99 -0
  125. package/dist/domains/collab/composables/collabRecovery.js.map +1 -0
  126. package/dist/domains/collab/composables/collabRoom.js +106 -106
  127. package/dist/domains/collab/composables/collabRoom.js.map +1 -1
  128. package/dist/domains/collab/composables/collabState.d.ts +11 -4
  129. package/dist/domains/collab/composables/collabState.js +34 -25
  130. package/dist/domains/collab/composables/collabState.js.map +1 -1
  131. package/dist/domains/collab/composables/commonAdminCollabOptions.d.ts +4 -2
  132. package/dist/domains/collab/types/Collab.d.ts +31 -5
  133. package/dist/domains/collab/types/Collab.js +23 -11
  134. package/dist/domains/collab/types/Collab.js.map +1 -1
  135. package/dist/domains/customDataForm/components/ACustomDataForm.js.map +1 -1
  136. package/dist/domains/customDataForm/components/ACustomDataForm.vue.d.ts +7 -5
  137. package/dist/domains/customDataForm/components/ACustomDataForm.vue_vue_type_script_setup_true_lang.js.map +1 -1
  138. package/dist/domains/customDataForm/components/ACustomDataFormElement.js.map +1 -1
  139. package/dist/domains/customDataForm/components/ACustomDataFormElement.vue_vue_type_script_setup_true_lang.js.map +1 -1
  140. package/dist/domains/customDataForm/components/ACustomDataFormHiddenPart.js.map +1 -1
  141. package/dist/domains/customDataForm/components/ACustomDataFormHiddenPart.vue.d.ts +5 -3
  142. package/dist/domains/customDataForm/components/ACustomDataFormHiddenPart.vue_vue_type_script_setup_true_lang.js.map +1 -1
  143. package/dist/domains/customDataForm/composables/useCustomDataForm.js.map +1 -1
  144. package/dist/domains/customDataForm/types/CustomDataForm.d.ts +4 -1
  145. package/dist/domains/dam/api/damAssetApi.d.ts +7 -7
  146. package/dist/domains/dam/api/damAssetApi.js.map +1 -1
  147. package/dist/domains/dam/api/damAssetLicenceApi.d.ts +1 -1
  148. package/dist/domains/dam/api/damAssetLicenceApi.js.map +1 -1
  149. package/dist/domains/dam/api/damConstants.js.map +1 -1
  150. package/dist/domains/dam/api/damEndPoints.js.map +1 -1
  151. package/dist/domains/dam/api/damImageApi.js.map +1 -1
  152. package/dist/domains/dam/api/uploadApi.js.map +1 -1
  153. package/dist/domains/dam/assetDetail/components/AssetCustomMetadataForm.js.map +1 -1
  154. package/dist/domains/dam/assetDetail/components/AssetCustomMetadataForm.vue.d.ts +7 -5
  155. package/dist/domains/dam/assetDetail/components/AssetCustomMetadataForm.vue_vue_type_script_setup_true_lang.js.map +1 -1
  156. package/dist/domains/dam/assetDetail/components/AssetDetailDialog.js.map +1 -1
  157. package/dist/domains/dam/assetDetail/components/AssetDetailDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  158. package/dist/domains/dam/assetDetail/components/AssetDetailDialogFrame.js.map +1 -1
  159. package/dist/domains/dam/assetDetail/components/AssetDetailDialogFrame.vue.d.ts +1 -1
  160. package/dist/domains/dam/assetDetail/components/AssetDetailDialogFrame.vue_vue_type_script_setup_true_lang.js.map +1 -1
  161. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarActionsWrapper.vue.d.ts +5 -3
  162. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarFrame.js.map +1 -1
  163. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarFrame.vue_vue_type_script_setup_true_lang.js.map +1 -1
  164. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarMetadata.js.map +1 -1
  165. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
  166. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarROI.js.map +1 -1
  167. package/dist/domains/dam/assetDetail/components/AssetDetailSidebarROI.vue_vue_type_script_setup_true_lang.js.map +1 -1
  168. package/dist/domains/dam/assetDetail/components/AssetFileInfoPanel.js.map +1 -1
  169. package/dist/domains/dam/assetDetail/components/AssetFileInfoPanel.vue.d.ts +1 -1
  170. package/dist/domains/dam/assetDetail/components/AssetFileInfoPanel.vue_vue_type_script_setup_true_lang.js.map +1 -1
  171. package/dist/domains/dam/assetDetail/components/AssetImage.js.map +1 -1
  172. package/dist/domains/dam/assetDetail/components/AssetImage.vue.d.ts +1 -1
  173. package/dist/domains/dam/assetDetail/components/AssetImage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  174. package/dist/domains/dam/assetDetail/components/AssetImageMetaIcons.js.map +1 -1
  175. package/dist/domains/dam/assetDetail/components/AssetImageMetaIcons.vue.d.ts +2 -2
  176. package/dist/domains/dam/assetDetail/components/AssetImageMetaIcons.vue_vue_type_script_setup_true_lang.js.map +1 -1
  177. package/dist/domains/dam/assetDetail/components/AssetInfobox.js.map +1 -1
  178. package/dist/domains/dam/assetDetail/components/AssetInfobox.vue_vue_type_script_setup_true_lang.js.map +1 -1
  179. package/dist/domains/dam/assetDetail/components/AssetMetadata.js.map +1 -1
  180. package/dist/domains/dam/assetDetail/components/AssetMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
  181. package/dist/domains/dam/assetDetail/composables/assetDetailExtSystem.d.ts +5 -6
  182. package/dist/domains/dam/assetDetail/composables/assetDetailExtSystem.js.map +1 -1
  183. package/dist/domains/dam/assetDetail/composables/assetDetailView.d.ts +10 -10
  184. package/dist/domains/dam/assetDetail/composables/assetDetailView.js.map +1 -1
  185. package/dist/domains/dam/assetDetail/store/assetDetailStore.js.map +1 -1
  186. package/dist/domains/dam/assetDetail/utils/assetMetadataMayStillChange.d.ts +4 -3
  187. package/dist/domains/dam/assetDetail/utils/assetMetadataMayStillChange.js.map +1 -1
  188. package/dist/domains/dam/assetSelect/api/damPodcastApi.js.map +1 -1
  189. package/dist/domains/dam/assetSelect/components/AAssetListInner.js.map +1 -1
  190. package/dist/domains/dam/assetSelect/components/AAssetListInner.vue.d.ts +789 -787
  191. package/dist/domains/dam/assetSelect/components/AAssetListInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  192. package/dist/domains/dam/assetSelect/components/AAssetSelect.js.map +1 -1
  193. package/dist/domains/dam/assetSelect/components/AAssetSelect.vue.d.ts +395 -393
  194. package/dist/domains/dam/assetSelect/components/AAssetSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  195. package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.js.map +1 -1
  196. package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.vue.d.ts +14 -12
  197. package/dist/domains/dam/assetSelect/components/AAssetSelectMedia.vue_vue_type_script_setup_true_lang.js.map +1 -1
  198. package/dist/domains/dam/assetSelect/components/AssetDistributionServiceNameFilter.js.map +1 -1
  199. package/dist/domains/dam/assetSelect/components/AssetDistributionServiceNameFilter.vue_vue_type_script_setup_true_lang.js.map +1 -1
  200. package/dist/domains/dam/assetSelect/components/AssetSelectListBar.js.map +1 -1
  201. package/dist/domains/dam/assetSelect/components/AssetSelectListBar.vue.d.ts +9 -7
  202. package/dist/domains/dam/assetSelect/components/AssetSelectListBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  203. package/dist/domains/dam/assetSelect/components/AssetSelectTableRowItem.js.map +1 -1
  204. package/dist/domains/dam/assetSelect/components/AssetSelectTableRowItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  205. package/dist/domains/dam/assetSelect/composables/assetSelectListActions.js.map +1 -1
  206. package/dist/domains/dam/assetSelect/store/assetSelectStore.js.map +1 -1
  207. package/dist/domains/dam/author/api/authorApi.js.map +1 -1
  208. package/dist/domains/dam/author/components/AuthorCreateButton.js.map +1 -1
  209. package/dist/domains/dam/author/components/AuthorCreateButton.vue.d.ts +1 -1
  210. package/dist/domains/dam/author/components/AuthorCreateButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  211. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.js.map +1 -1
  212. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.vue.d.ts +9 -6
  213. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  214. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChipConflicts.js.map +1 -1
  215. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteCachedAuthorChipConflicts.vue_vue_type_script_setup_true_lang.js.map +1 -1
  216. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.js +1 -1
  217. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.js.map +1 -1
  218. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.vue.d.ts +2 -2
  219. package/dist/domains/dam/author/components/AuthorRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js.map +1 -1
  220. package/dist/domains/dam/author/components/DamAuthorFilterRemoteAutocomplete.js.map +1 -1
  221. package/dist/domains/dam/author/components/DamAuthorFilterRemoteAutocomplete.vue.d.ts +1 -1
  222. package/dist/domains/dam/author/components/DamAuthorFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  223. package/dist/domains/dam/author/composables/cachedAuthors.d.ts +5 -4
  224. package/dist/domains/dam/author/composables/cachedAuthors.js.map +1 -1
  225. package/dist/domains/dam/author/composables/cachedUsers.d.ts +5 -4
  226. package/dist/domains/dam/author/composables/cachedUsers.js.map +1 -1
  227. package/dist/domains/dam/author/composables/damAuthorConfig.d.ts +2 -2
  228. package/dist/domains/dam/author/composables/damAuthorConfig.js.map +1 -1
  229. package/dist/domains/dam/components/DamAdminAssetLink.js.map +1 -1
  230. package/dist/domains/dam/components/DamAdminAssetLink.vue_vue_type_script_setup_true_lang.js.map +1 -1
  231. package/dist/domains/dam/composables/commonAdminCoreDamOptions.d.ts +10 -8
  232. package/dist/domains/dam/composables/commonAdminCoreDamOptions.js.map +1 -1
  233. package/dist/domains/dam/composables/damConfigName.d.ts +8 -9
  234. package/dist/domains/dam/composables/damConfigName.js.map +1 -1
  235. package/dist/domains/dam/composables/damNotifications.d.ts +9 -9
  236. package/dist/domains/dam/composables/damNotifications.js.map +1 -1
  237. package/dist/domains/dam/composables/damNotificationsConnection.d.ts +4 -4
  238. package/dist/domains/dam/composables/damNotificationsConnection.js.map +1 -1
  239. package/dist/domains/dam/composables/damNotificationsEventBus.d.ts +2 -2
  240. package/dist/domains/dam/composables/damNotificationsEventBus.js.map +1 -1
  241. package/dist/domains/dam/composables/extSystemIdForCached.d.ts +5 -4
  242. package/dist/domains/dam/composables/extSystemIdForCached.js.map +1 -1
  243. package/dist/domains/dam/config/api/damAssetCustomFormApi.js.map +1 -1
  244. package/dist/domains/dam/config/api/damConfigApi.js.map +1 -1
  245. package/dist/domains/dam/config/composables/damConfigState.d.ts +5 -5
  246. package/dist/domains/dam/config/composables/damConfigState.js.map +1 -1
  247. package/dist/domains/dam/config/store/damConfigStore.d.ts +5 -4
  248. package/dist/domains/dam/config/store/damConfigStore.js.map +1 -1
  249. package/dist/domains/dam/config/utils/damFilterUserAllowedUploadConfigs.d.ts +3 -1
  250. package/dist/domains/dam/config/utils/damFilterUserAllowedUploadConfigs.js.map +1 -1
  251. package/dist/domains/dam/cropper/components/ACropper.js.map +1 -1
  252. package/dist/domains/dam/cropper/components/ACropper.vue.d.ts +8 -16
  253. package/dist/domains/dam/cropper/components/ACropper.vue_vue_type_script_setup_true_lang.js.map +1 -1
  254. package/dist/domains/dam/cropper/components/DamAssetImageRoiSelect.js.map +1 -1
  255. package/dist/domains/dam/cropper/components/DamAssetImageRoiSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  256. package/dist/domains/dam/cropper/store/imageRoiStore.d.ts +9 -12
  257. package/dist/domains/dam/cropper/store/imageRoiStore.js.map +1 -1
  258. package/dist/domains/dam/cropper/utils/cropperGeometry.d.ts +24 -38
  259. package/dist/domains/dam/cropper/utils/cropperGeometry.js.map +1 -1
  260. package/dist/domains/dam/cropper/utils/cropperJsService.d.ts +3 -7
  261. package/dist/domains/dam/cropper/utils/cropperJsService.js +10 -3
  262. package/dist/domains/dam/cropper/utils/cropperJsService.js.map +1 -1
  263. package/dist/domains/dam/cropper/utils/cropperTypes.d.ts +3 -6
  264. package/dist/domains/dam/cropper/utils/damAssetImageRoiSelectLoader.d.ts +5 -5
  265. package/dist/domains/dam/cropper/utils/damAssetImageRoiSelectLoader.js.map +1 -1
  266. package/dist/domains/dam/imageWidget/components/AImageMediaWidget.js.map +1 -1
  267. package/dist/domains/dam/imageWidget/components/AImageMediaWidget.vue_vue_type_script_setup_true_lang.js.map +1 -1
  268. package/dist/domains/dam/imageWidget/components/AImagePublicInput.js.map +1 -1
  269. package/dist/domains/dam/imageWidget/components/AImagePublicInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  270. package/dist/domains/dam/imageWidget/components/AImageWidget.js.map +1 -1
  271. package/dist/domains/dam/imageWidget/components/AImageWidget.vue_vue_type_script_setup_true_lang.js.map +1 -1
  272. package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.js.map +1 -1
  273. package/dist/domains/dam/imageWidget/components/AImageWidgetMultiple.vue_vue_type_script_setup_true_lang.js.map +1 -1
  274. package/dist/domains/dam/imageWidget/components/AImageWidgetSimple.vue.d.ts +43 -41
  275. package/dist/domains/dam/imageWidget/components/AMediaWidgetSimple.vue.d.ts +31 -29
  276. package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.js.map +1 -1
  277. package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue.d.ts +29 -27
  278. package/dist/domains/dam/imageWidget/components/ImageDetailDialogMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
  279. package/dist/domains/dam/imageWidget/components/ImageMassOperations.js.map +1 -1
  280. package/dist/domains/dam/imageWidget/components/ImageMassOperations.vue.d.ts +1 -1
  281. package/dist/domains/dam/imageWidget/components/ImageMassOperations.vue_vue_type_script_setup_true_lang.js.map +1 -1
  282. package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.js.map +1 -1
  283. package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue.d.ts +68 -66
  284. package/dist/domains/dam/imageWidget/components/ImageMediaWidgetInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  285. package/dist/domains/dam/imageWidget/components/ImageWidgetInner.js.map +1 -1
  286. package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue.d.ts +402 -400
  287. package/dist/domains/dam/imageWidget/components/ImageWidgetInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  288. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.js.map +1 -1
  289. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue.d.ts +384 -382
  290. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleInner.vue_vue_type_script_setup_true_lang.js.map +1 -1
  291. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleItem.js.map +1 -1
  292. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
  293. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleLimitDialog.js.map +1 -1
  294. package/dist/domains/dam/imageWidget/components/ImageWidgetMultipleLimitDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  295. package/dist/domains/dam/imageWidget/components/MediaWidgetSimpleDialog.vue.d.ts +7 -5
  296. package/dist/domains/dam/imageWidget/composables/commonAdminImageOptions.js.map +1 -1
  297. package/dist/domains/dam/imageWidget/composables/imageApiCms.js.map +1 -1
  298. package/dist/domains/dam/imageWidget/composables/imageDialogDamAuthors.d.ts +11 -13
  299. package/dist/domains/dam/imageWidget/composables/imageDialogDamAuthors.js.map +1 -1
  300. package/dist/domains/dam/imageWidget/composables/useImageMassOperations.js.map +1 -1
  301. package/dist/domains/dam/imageWidget/store/imageMediaWidgetStore.js.map +1 -1
  302. package/dist/domains/dam/imageWidget/store/imageStore.js.map +1 -1
  303. package/dist/domains/dam/imageWidget/utils/damImage.d.ts +5 -6
  304. package/dist/domains/dam/imageWidget/utils/damImage.js.map +1 -1
  305. package/dist/domains/dam/imageWidget/utils/fieldLockTurns.d.ts +1 -2
  306. package/dist/domains/dam/imageWidget/utils/fieldLockTurns.js.map +1 -1
  307. package/dist/domains/dam/imageWidget/utils/imageSaves.d.ts +10 -14
  308. package/dist/domains/dam/imageWidget/utils/imageSaves.js.map +1 -1
  309. package/dist/domains/dam/imageWidget/utils/metadataToImageMap.js.map +1 -1
  310. package/dist/domains/dam/imageWidget/utils/waitLimit.d.ts +4 -6
  311. package/dist/domains/dam/imageWidget/utils/waitLimit.js.map +1 -1
  312. package/dist/domains/dam/keyword/api/keywordApi.js.map +1 -1
  313. package/dist/domains/dam/keyword/components/DamKeywordFilterRemoteAutocomplete.js.map +1 -1
  314. package/dist/domains/dam/keyword/components/DamKeywordFilterRemoteAutocomplete.vue.d.ts +1 -1
  315. package/dist/domains/dam/keyword/components/DamKeywordFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  316. package/dist/domains/dam/keyword/components/KeywordRemoteAutocompleteCachedKeywordChip.js.map +1 -1
  317. package/dist/domains/dam/keyword/components/KeywordRemoteAutocompleteCachedKeywordChip.vue.d.ts +8 -5
  318. package/dist/domains/dam/keyword/components/KeywordRemoteAutocompleteCachedKeywordChip.vue_vue_type_script_setup_true_lang.js.map +1 -1
  319. package/dist/domains/dam/keyword/components/KeywordRemoteAutocompleteWithCached.js +1 -1
  320. package/dist/domains/dam/keyword/components/KeywordRemoteAutocompleteWithCached.js.map +1 -1
  321. package/dist/domains/dam/keyword/components/KeywordRemoteAutocompleteWithCached.vue.d.ts +2 -2
  322. package/dist/domains/dam/keyword/components/KeywordRemoteAutocompleteWithCached.vue_vue_type_script_setup_true_lang.js.map +1 -1
  323. package/dist/domains/dam/keyword/composables/cachedKeywords.d.ts +5 -4
  324. package/dist/domains/dam/keyword/composables/cachedKeywords.js.map +1 -1
  325. package/dist/domains/dam/keyword/composables/damKeywordConfig.d.ts +2 -2
  326. package/dist/domains/dam/keyword/composables/damKeywordConfig.js.map +1 -1
  327. package/dist/domains/dam/types/Asset.d.ts +1 -1
  328. package/dist/domains/dam/types/Asset.js.map +1 -1
  329. package/dist/domains/dam/types/UploadQueue.d.ts +5 -4
  330. package/dist/domains/dam/types/UploadQueue.js.map +1 -1
  331. package/dist/domains/dam/uploadQueue/components/AssetCustomMetadataFormMassOperations.js.map +1 -1
  332. package/dist/domains/dam/uploadQueue/components/AssetCustomMetadataFormMassOperations.vue_vue_type_script_setup_true_lang.js.map +1 -1
  333. package/dist/domains/dam/uploadQueue/components/AssetQueueSelectedSidebar.js.map +1 -1
  334. package/dist/domains/dam/uploadQueue/components/AssetQueueSelectedSidebar.vue.d.ts +2 -2
  335. package/dist/domains/dam/uploadQueue/components/AssetQueueSelectedSidebar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  336. package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.js.map +1 -1
  337. package/dist/domains/dam/uploadQueue/components/UploadQueueDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  338. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingle.js.map +1 -1
  339. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingle.vue_vue_type_script_setup_true_lang.js.map +1 -1
  340. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebar.js.map +1 -1
  341. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebar.vue.d.ts +6 -4
  342. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  343. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadata.js.map +1 -1
  344. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadata.vue.d.ts +1 -1
  345. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadata.vue_vue_type_script_setup_true_lang.js.map +1 -1
  346. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadataContent.js.map +1 -1
  347. package/dist/domains/dam/uploadQueue/components/UploadQueueDialogSingleSidebarMetadataContent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  348. package/dist/domains/dam/uploadQueue/components/UploadQueueEditable.js.map +1 -1
  349. package/dist/domains/dam/uploadQueue/components/UploadQueueEditable.vue.d.ts +6 -6
  350. package/dist/domains/dam/uploadQueue/components/UploadQueueEditable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  351. package/dist/domains/dam/uploadQueue/components/UploadQueueItemEditable.js.map +1 -1
  352. package/dist/domains/dam/uploadQueue/components/UploadQueueItemEditable.vue.d.ts +13 -13
  353. package/dist/domains/dam/uploadQueue/components/UploadQueueItemEditable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  354. package/dist/domains/dam/uploadQueue/components/uploadQueueBindings.d.ts +13 -13
  355. package/dist/domains/dam/uploadQueue/components/uploadQueueBindings.js.map +1 -1
  356. package/dist/domains/dam/uploadQueue/composables/damUploadChunkSize.d.ts +2 -2
  357. package/dist/domains/dam/uploadQueue/composables/damUploadChunkSize.js.map +1 -1
  358. package/dist/domains/dam/uploadQueue/composables/uploadMeter.d.ts +12 -12
  359. package/dist/domains/dam/uploadQueue/composables/uploadMeter.js.map +1 -1
  360. package/dist/domains/dam/uploadQueue/composables/uploadQueueItemRefresh.d.ts +5 -5
  361. package/dist/domains/dam/uploadQueue/composables/uploadQueueItemRefresh.js.map +1 -1
  362. package/dist/domains/dam/uploadQueue/composables/uploadService.d.ts +2 -3
  363. package/dist/domains/dam/uploadQueue/composables/uploadService.js.map +1 -1
  364. package/dist/domains/dam/uploadQueue/composables/useUploadQueueDialog.d.ts +5 -4
  365. package/dist/domains/dam/uploadQueue/composables/useUploadQueueDialog.js.map +1 -1
  366. package/dist/domains/dam/uploadQueue/core/uploadQueueCore.d.ts +3 -2
  367. package/dist/domains/dam/uploadQueue/core/uploadQueueCore.js.map +1 -1
  368. package/dist/domains/dam/uploadQueue/core/uploadQueueCoreTypes.d.ts +8 -5
  369. package/dist/domains/dam/uploadQueue/core/uploadQueueCoreTypes.js.map +1 -1
  370. package/dist/domains/dam/uploadQueue/core/uploadQueueFill.d.ts +3 -3
  371. package/dist/domains/dam/uploadQueue/core/uploadQueueFill.js.map +1 -1
  372. package/dist/domains/dam/uploadQueue/presets/queuePresets.d.ts +8 -5
  373. package/dist/domains/dam/uploadQueue/presets/queuePresets.js.map +1 -1
  374. package/dist/domains/dam/uploadQueue/presets/uploadPresets.d.ts +15 -13
  375. package/dist/domains/dam/uploadQueue/presets/uploadPresets.js.map +1 -1
  376. package/dist/domains/dam/uploadQueue/settlement/uploadPollSchedule.d.ts +7 -7
  377. package/dist/domains/dam/uploadQueue/settlement/uploadPollSchedule.js.map +1 -1
  378. package/dist/domains/dam/uploadQueue/settlement/uploadPoller.d.ts +4 -4
  379. package/dist/domains/dam/uploadQueue/settlement/uploadPoller.js.map +1 -1
  380. package/dist/domains/dam/uploadQueue/settlement/uploadSettle.d.ts +28 -30
  381. package/dist/domains/dam/uploadQueue/settlement/uploadSettle.js.map +1 -1
  382. package/dist/domains/dam/uploadQueue/settlement/uploadSettlement.d.ts +2 -2
  383. package/dist/domains/dam/uploadQueue/settlement/uploadSettlement.js.map +1 -1
  384. package/dist/domains/dam/uploadQueue/settlement/uploadSettlementRuntime.d.ts +2 -2
  385. package/dist/domains/dam/uploadQueue/settlement/uploadSettlementRuntime.js.map +1 -1
  386. package/dist/domains/dam/uploadQueue/settlement/uploadSettlementTypes.d.ts +63 -73
  387. package/dist/domains/dam/uploadQueue/settlement/uploadSettlementTypes.js.map +1 -1
  388. package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.d.ts +8 -9
  389. package/dist/domains/dam/uploadQueue/store/uploadQueuesStore.js.map +1 -1
  390. package/dist/domains/dam/user/api/userApi.d.ts +2 -2
  391. package/dist/domains/dam/user/api/userApi.js.map +1 -1
  392. package/dist/domains/dam/user/components/DamDistributionServiceSelect.js.map +1 -1
  393. package/dist/domains/dam/user/components/DamDistributionServiceSelect.vue.d.ts +1 -1
  394. package/dist/domains/dam/user/components/DamDistributionServiceSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  395. package/dist/domains/dam/user/components/DamExternalProviderAssetSelect.js.map +1 -1
  396. package/dist/domains/dam/user/components/DamExternalProviderAssetSelect.vue.d.ts +1 -1
  397. package/dist/domains/dam/user/components/DamExternalProviderAssetSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  398. package/dist/domains/dam/user/components/DamUserRemoteAutocomplete.js.map +1 -1
  399. package/dist/domains/dam/user/components/DamUserRemoteAutocomplete.vue.d.ts +1 -1
  400. package/dist/domains/dam/user/components/DamUserRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  401. package/dist/domains/dam/user/composables/damUserSelectActions.d.ts +1 -1
  402. package/dist/domains/dam/user/composables/damUserSelectActions.js.map +1 -1
  403. package/dist/domains/dam/user/types/DamDistributionServiceType.d.ts +2 -2
  404. package/dist/domains/dam/user/types/DamDistributionServiceType.js.map +1 -1
  405. package/dist/domains/dam/user/types/DamExternalProviderAssetType.d.ts +1 -1
  406. package/dist/domains/dam/user/types/DamExternalProviderAssetType.js.map +1 -1
  407. package/dist/domains/filters/bookmarks/components/FilterBookmarkDialog.js.map +1 -1
  408. package/dist/domains/filters/bookmarks/components/FilterBookmarkDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  409. package/dist/domains/filters/bookmarks/store/bookmarksStore.d.ts +3 -3
  410. package/dist/domains/filters/bookmarks/store/bookmarksStore.js.map +1 -1
  411. package/dist/domains/filters/components/AFilterDatetimePicker.js.map +1 -1
  412. package/dist/domains/filters/components/AFilterDatetimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  413. package/dist/domains/filters/components/AFilterInteger.js.map +1 -1
  414. package/dist/domains/filters/components/AFilterInteger.vue_vue_type_script_setup_true_lang.js.map +1 -1
  415. package/dist/domains/filters/components/AFilterString.js.map +1 -1
  416. package/dist/domains/filters/components/AFilterString.vue_vue_type_script_setup_true_lang.js.map +1 -1
  417. package/dist/domains/filters/components/AFilterTimeInterval.js +1 -1
  418. package/dist/domains/filters/components/AFilterTimeInterval.js.map +1 -1
  419. package/dist/domains/filters/components/AFilterTimeInterval.vue.d.ts +5 -3
  420. package/dist/domains/filters/components/AFilterTimeInterval.vue_vue_type_script_setup_true_lang.js.map +1 -1
  421. package/dist/domains/filters/components/AFilterValueObjectOptionsSelect.js.map +1 -1
  422. package/dist/domains/filters/components/AFilterValueObjectOptionsSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  423. package/dist/domains/filters/components/AFilterWrapper.js.map +1 -1
  424. package/dist/domains/filters/components/AFilterWrapper.vue.d.ts +17 -15
  425. package/dist/domains/filters/components/AFilterWrapper.vue_vue_type_script_setup_true_lang.js +63 -62
  426. package/dist/domains/filters/components/AFilterWrapper.vue_vue_type_script_setup_true_lang.js.map +1 -1
  427. package/dist/domains/filters/components/AFilterWrapperSidebar.vue.d.ts +5 -3
  428. package/dist/domains/filters/components/FiltersSelected.js.map +1 -1
  429. package/dist/domains/filters/components/FiltersSelected.vue_vue_type_script_setup_true_lang.js.map +1 -1
  430. package/dist/domains/filters/composables/filterFactory.d.ts +16 -26
  431. package/dist/domains/filters/composables/filterFactory.js +38 -31
  432. package/dist/domains/filters/composables/filterFactory.js.map +1 -1
  433. package/dist/domains/filters/datatable/components/ADatatableOrdering.js.map +1 -1
  434. package/dist/domains/filters/datatable/components/ADatatableOrdering.vue_vue_type_script_setup_true_lang.js +3 -1
  435. package/dist/domains/filters/datatable/components/ADatatableOrdering.vue_vue_type_script_setup_true_lang.js.map +1 -1
  436. package/dist/domains/filters/datatable/components/ADatatablePagination.js.map +1 -1
  437. package/dist/domains/filters/datatable/components/ADatatablePagination.vue_vue_type_script_setup_true_lang.js +2 -4
  438. package/dist/domains/filters/datatable/components/ADatatablePagination.vue_vue_type_script_setup_true_lang.js.map +1 -1
  439. package/dist/domains/filters/utils/filterInjectionKeys.js.map +1 -1
  440. package/dist/domains/form/components/AFormDatetimePicker.js.map +1 -1
  441. package/dist/domains/form/components/AFormDatetimePicker.vue.d.ts +7 -5
  442. package/dist/domains/form/components/AFormDatetimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  443. package/dist/domains/form/components/AFormFlagDatetimePicker.js.map +1 -1
  444. package/dist/domains/form/components/AFormFlagDatetimePicker.vue.d.ts +7 -5
  445. package/dist/domains/form/components/AFormFlagDatetimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  446. package/dist/domains/form/components/AFormSwitch.vue.d.ts +7 -5
  447. package/dist/domains/form/components/AFormTextField.js.map +1 -1
  448. package/dist/domains/form/components/AFormTextField.vue.d.ts +9 -7
  449. package/dist/domains/form/components/AFormTextField.vue_vue_type_script_setup_true_lang.js.map +1 -1
  450. package/dist/domains/form/components/AFormTextarea.vue.d.ts +13 -11
  451. package/dist/domains/form/components/AFormValueObjectOptionsSelect.vue.d.ts +7 -5
  452. package/dist/domains/form/components/ASystemEntityScope.vue.d.ts +5 -3
  453. package/dist/domains/job/api/jobApi.js.map +1 -1
  454. package/dist/domains/job/components/AJobDetailCommon.vue.d.ts +5 -3
  455. package/dist/domains/listEditor/components/AListEditor.js.map +1 -1
  456. package/dist/domains/listEditor/components/AListEditor.vue_vue_type_script_setup_true_lang.js.map +1 -1
  457. package/dist/domains/listEditor/components/ANestedSortableListEditor.js.map +1 -1
  458. package/dist/domains/listEditor/components/ANestedSortableListEditor.vue.d.ts +2 -3
  459. package/dist/domains/listEditor/components/ANestedSortableListEditor.vue_vue_type_script_setup_true_lang.js.map +1 -1
  460. package/dist/domains/listEditor/components/ASortableListEditor.js.map +1 -1
  461. package/dist/domains/listEditor/components/ASortableListEditor.vue.d.ts +2 -3
  462. package/dist/domains/listEditor/components/ASortableListEditor.vue_vue_type_script_setup_true_lang.js.map +1 -1
  463. package/dist/domains/listEditor/composables/useListEditorController.d.ts +4 -5
  464. package/dist/domains/listEditor/composables/useListEditorController.js.map +1 -1
  465. package/dist/domains/listEditor/composables/useNestedListEditor.d.ts +3 -4
  466. package/dist/domains/listEditor/composables/useNestedListEditor.js.map +1 -1
  467. package/dist/domains/listEditor/composables/useNestedListEditorController.d.ts +5 -4
  468. package/dist/domains/listEditor/composables/useNestedListEditorController.js.map +1 -1
  469. package/dist/domains/listEditor/composables/useReorderMode.js.map +1 -1
  470. package/dist/domains/listEditor/types/listEditorTypes.d.ts +2 -2
  471. package/dist/domains/listEditor/utils/listEditorLoader.d.ts +5 -5
  472. package/dist/domains/listEditor/utils/listEditorLoader.js.map +1 -1
  473. package/dist/domains/listEditor/utils/resolveCompactText.js.map +1 -1
  474. package/dist/domains/log/api/logApi.d.ts +2 -3
  475. package/dist/domains/log/api/logApi.js.map +1 -1
  476. package/dist/domains/log/components/ALogDatatable.js.map +1 -1
  477. package/dist/domains/log/components/ALogDatatable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  478. package/dist/domains/log/components/ALogDetailView.js.map +1 -1
  479. package/dist/domains/log/components/ALogDetailView.vue.d.ts +1 -1
  480. package/dist/domains/log/components/ALogDetailView.vue_vue_type_script_setup_true_lang.js.map +1 -1
  481. package/dist/domains/log/components/ALogFilter.js.map +1 -1
  482. package/dist/domains/log/components/ALogFilter.vue_vue_type_script_setup_true_lang.js.map +1 -1
  483. package/dist/domains/log/components/ALogListView.js.map +1 -1
  484. package/dist/domains/log/components/ALogListView.vue.d.ts +1 -1
  485. package/dist/domains/log/components/ALogListView.vue_vue_type_script_setup_true_lang.js.map +1 -1
  486. package/dist/domains/log/composables/logActions.d.ts +4 -5
  487. package/dist/domains/log/composables/logActions.js.map +1 -1
  488. package/dist/domains/log/composables/logType.d.ts +6 -7
  489. package/dist/domains/log/composables/logType.js.map +1 -1
  490. package/dist/domains/log/filter/logFilter.d.ts +8 -11
  491. package/dist/domains/log/filter/logFilter.js.map +1 -1
  492. package/dist/domains/permission/components/APermissionEditor.js.map +1 -1
  493. package/dist/domains/permission/components/APermissionEditor.vue.d.ts +4 -4
  494. package/dist/domains/permission/components/APermissionEditor.vue_vue_type_script_setup_true_lang.js.map +1 -1
  495. package/dist/domains/permission/composables/permissionActions.d.ts +3 -6
  496. package/dist/domains/permission/composables/permissionActions.js.map +1 -1
  497. package/dist/domains/permission/config/api/permissionConfigApi.d.ts +2 -2
  498. package/dist/domains/permission/config/api/permissionConfigApi.js.map +1 -1
  499. package/dist/domains/permission/config/composables/permissionConfigActions.d.ts +3 -7
  500. package/dist/domains/permission/config/composables/permissionConfigActions.js.map +1 -1
  501. package/dist/domains/permission/config/store/permissionConfigStore.d.ts +2 -4
  502. package/dist/domains/permission/config/store/permissionConfigStore.js.map +1 -1
  503. package/dist/domains/permission/group/api/permissionGroupApi.d.ts +8 -10
  504. package/dist/domains/permission/group/api/permissionGroupApi.js.map +1 -1
  505. package/dist/domains/permission/group/components/APermissionGroupDatatable.js.map +1 -1
  506. package/dist/domains/permission/group/components/APermissionGroupDatatable.vue.d.ts +12 -10
  507. package/dist/domains/permission/group/components/APermissionGroupDatatable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  508. package/dist/domains/permission/group/components/APermissionGroupDetail.js.map +1 -1
  509. package/dist/domains/permission/group/components/APermissionGroupDetail.vue.d.ts +21 -22
  510. package/dist/domains/permission/group/components/APermissionGroupDetail.vue_vue_type_script_setup_true_lang.js.map +1 -1
  511. package/dist/domains/permission/group/components/APermissionGroupManage.js.map +1 -1
  512. package/dist/domains/permission/group/components/APermissionGroupManage.vue.d.ts +21 -22
  513. package/dist/domains/permission/group/components/APermissionGroupManage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  514. package/dist/domains/permission/group/composables/cachedPermissionGroups.js.map +1 -1
  515. package/dist/domains/permission/group/composables/permissionGroupActions.d.ts +6 -8
  516. package/dist/domains/permission/group/composables/permissionGroupActions.js.map +1 -1
  517. package/dist/domains/permission/group/composables/permissionGroupValidations.d.ts +2 -3
  518. package/dist/domains/permission/group/composables/permissionGroupValidations.js.map +1 -1
  519. package/dist/domains/permission/group/filter/permissionGroupFilter.d.ts +2 -3
  520. package/dist/domains/permission/group/filter/permissionGroupFilter.js.map +1 -1
  521. package/dist/domains/permission/group/store/permissionGroupStore.d.ts +3 -6
  522. package/dist/domains/permission/group/store/permissionGroupStore.js.map +1 -1
  523. package/dist/domains/remoteAutocomplete/components/AFilterRemoteAutocomplete.js.map +1 -1
  524. package/dist/domains/remoteAutocomplete/components/AFilterRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  525. package/dist/domains/remoteAutocomplete/components/AFilterRemoteAutocompleteWithMinimal.js.map +1 -1
  526. package/dist/domains/remoteAutocomplete/components/AFilterRemoteAutocompleteWithMinimal.vue_vue_type_script_setup_true_lang.js.map +1 -1
  527. package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocomplete.js.map +1 -1
  528. package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
  529. package/dist/domains/remoteAutocomplete/components/AFormRemoteAutocompleteWithCached.vue.d.ts +5 -3
  530. package/dist/domains/remoteAutocomplete/composables/createRemoteAutocomplete.d.ts +11 -13
  531. package/dist/domains/remoteAutocomplete/composables/createRemoteAutocomplete.js.map +1 -1
  532. package/dist/domains/subjectSelect/components/AFilterWrapperSubjectSelect.vue.d.ts +13 -11
  533. package/dist/domains/subjectSelect/components/ASubjectSelect.js.map +1 -1
  534. package/dist/domains/subjectSelect/components/ASubjectSelect.vue_vue_type_script_setup_true_lang.js.map +1 -1
  535. package/dist/domains/subjectSelect/composables/useSubjectSelect.js +53 -51
  536. package/dist/domains/subjectSelect/composables/useSubjectSelect.js.map +1 -1
  537. package/dist/domains/system/appShell/components/AActionbar.vue.d.ts +7 -5
  538. package/dist/domains/system/appShell/components/ALayoutSwitch.js.map +1 -1
  539. package/dist/domains/system/appShell/components/ALayoutSwitch.vue.d.ts +7 -5
  540. package/dist/domains/system/appShell/components/ALayoutSwitch.vue_vue_type_script_setup_true_lang.js.map +1 -1
  541. package/dist/domains/system/appShell/composables/teleportSlot.d.ts +0 -1
  542. package/dist/domains/system/appShell/composables/teleportSlot.js.map +1 -1
  543. package/dist/domains/system/components/AAlerts.js.map +1 -1
  544. package/dist/domains/system/components/AAlerts.vue_vue_type_script_setup_true_lang.js.map +1 -1
  545. package/dist/domains/system/composables/alerts.js.map +1 -1
  546. package/dist/domains/system/composables/breadcrumbs.d.ts +3 -3
  547. package/dist/domains/system/composables/breadcrumbs.js.map +1 -1
  548. package/dist/domains/system/composables/languageSettings.js.map +1 -1
  549. package/dist/domains/system/composables/loginStatus.js.map +1 -1
  550. package/dist/domains/system/composables/navigationError.d.ts +6 -8
  551. package/dist/domains/system/composables/navigationError.js.map +1 -1
  552. package/dist/domains/system/composables/pageNavigation.d.ts +9 -10
  553. package/dist/domains/system/composables/pageNavigation.js.map +1 -1
  554. package/dist/domains/system/composables/recordActions.d.ts +14 -22
  555. package/dist/domains/system/composables/recordActions.js.map +1 -1
  556. package/dist/domains/system/composables/recordPage.d.ts +23 -38
  557. package/dist/domains/system/composables/recordPage.js.map +1 -1
  558. package/dist/domains/system/composables/routeHistory.d.ts +4 -5
  559. package/dist/domains/system/composables/routeHistory.js.map +1 -1
  560. package/dist/domains/system/composables/sentry.js.map +1 -1
  561. package/dist/domains/system/composables/useDebugFeatures.d.ts +3 -6
  562. package/dist/domains/system/composables/useDebugFeatures.js.map +1 -1
  563. package/dist/domains/system/store/datatablePageStore.d.ts +8 -1
  564. package/dist/domains/system/store/datatablePageStore.js +10 -3
  565. package/dist/domains/system/store/datatablePageStore.js.map +1 -1
  566. package/dist/domains/system/systemBar/components/ASystemBar.js.map +1 -1
  567. package/dist/domains/system/systemBar/components/ASystemBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
  568. package/dist/domains/system/systemBar/utils/appReload.d.ts +5 -5
  569. package/dist/domains/system/systemBar/utils/appReload.js.map +1 -1
  570. package/dist/domains/ui/buttons/action/components/AActionCloseButtonHistory.js.map +1 -1
  571. package/dist/domains/ui/buttons/action/components/AActionCloseButtonHistory.vue.d.ts +2 -3
  572. package/dist/domains/ui/buttons/action/components/AActionCloseButtonHistory.vue_vue_type_script_setup_true_lang.js.map +1 -1
  573. package/dist/domains/ui/buttons/action/components/AActionDeleteButton.js.map +1 -1
  574. package/dist/domains/ui/buttons/action/components/AActionDeleteButton.vue_vue_type_script_setup_true_lang.js.map +1 -1
  575. package/dist/domains/ui/buttons/components/ABtnSplit.vue.d.ts +9 -7
  576. package/dist/domains/ui/components/AAvatarColorPicker.js.map +1 -1
  577. package/dist/domains/ui/components/AAvatarColorPicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  578. package/dist/domains/ui/components/ACard.js.map +1 -1
  579. package/dist/domains/ui/components/ACard.vue.d.ts +7 -3
  580. package/dist/domains/ui/components/ACard.vue_vue_type_script_setup_true_lang.js +6 -2
  581. package/dist/domains/ui/components/ACard.vue_vue_type_script_setup_true_lang.js.map +1 -1
  582. package/dist/domains/ui/components/ACardLoader.js.map +1 -1
  583. package/dist/domains/ui/components/ACardLoader.vue.d.ts +1 -0
  584. package/dist/domains/ui/components/ACardLoader.vue_vue_type_script_setup_true_lang.js +13 -7
  585. package/dist/domains/ui/components/ACardLoader.vue_vue_type_script_setup_true_lang.js.map +1 -1
  586. package/dist/domains/ui/components/AChipNoLink.vue.d.ts +5 -3
  587. package/dist/domains/ui/components/ACopyText.vue.d.ts +9 -7
  588. package/dist/domains/ui/components/ACreateDialog.js.map +1 -1
  589. package/dist/domains/ui/components/ACreateDialog.vue.d.ts +11 -9
  590. package/dist/domains/ui/components/ACreateDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  591. package/dist/domains/ui/components/ADialogToolbar.vue.d.ts +5 -3
  592. package/dist/domains/ui/components/ARow.vue.d.ts +5 -3
  593. package/dist/domains/ui/components/ATimeTrackingFields.js.map +1 -1
  594. package/dist/domains/ui/components/ATimeTrackingFields.vue_vue_type_script_setup_true_lang.js.map +1 -1
  595. package/dist/domains/ui/components/AUserAndTimeTrackingFields.js.map +1 -1
  596. package/dist/domains/ui/components/AUserAndTimeTrackingFields.vue.d.ts +3 -5
  597. package/dist/domains/ui/components/AUserAndTimeTrackingFields.vue_vue_type_script_setup_true_lang.js.map +1 -1
  598. package/dist/domains/ui/datetime/components/ADatetimePicker.js +1 -1
  599. package/dist/domains/ui/datetime/components/ADatetimePicker.js.map +1 -1
  600. package/dist/domains/ui/datetime/components/ADatetimePicker.vue.d.ts +5 -3
  601. package/dist/domains/ui/datetime/components/ADatetimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
  602. package/dist/domains/ui/file/components/AFileDropzone.js.map +1 -1
  603. package/dist/domains/ui/file/components/AFileDropzone.vue.d.ts +1 -1
  604. package/dist/domains/ui/file/components/AFileDropzone.vue_vue_type_script_setup_true_lang.js.map +1 -1
  605. package/dist/domains/ui/file/components/AFileInput.js.map +1 -1
  606. package/dist/domains/ui/file/components/AFileInput.vue.d.ts +9 -7
  607. package/dist/domains/ui/file/components/AFileInput.vue_vue_type_script_setup_true_lang.js.map +1 -1
  608. package/dist/domains/ui/file/components/AFileInputDialog.js.map +1 -1
  609. package/dist/domains/ui/file/components/AFileInputDialog.vue.d.ts +9 -7
  610. package/dist/domains/ui/file/components/AFileInputDialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
  611. package/dist/domains/ui/file/composables/dropzone.js.map +1 -1
  612. package/dist/domains/ui/file/composables/formatAndSizeCheck.js.map +1 -1
  613. package/dist/domains/ui/view/components/AGenericView.vue.d.ts +7 -5
  614. package/dist/domains/ui/view/components/ALoginView.js +1 -1
  615. package/dist/domains/ui/view/components/ALoginView.js.map +1 -1
  616. package/dist/domains/ui/view/components/ALoginView.vue.d.ts +5 -3
  617. package/dist/domains/ui/view/components/ALoginView.vue_vue_type_script_setup_true_lang.js.map +1 -1
  618. package/dist/domains/ui/view/components/ALogoutView.js.map +1 -1
  619. package/dist/domains/ui/view/components/ALogoutView.vue_vue_type_script_setup_true_lang.js.map +1 -1
  620. package/dist/domains/ui/view/components/ANotFoundView.js.map +1 -1
  621. package/dist/domains/ui/view/components/ANotFoundView.vue_vue_type_script_setup_true_lang.js.map +1 -1
  622. package/dist/domains/unsavedGuard/composables/useUnsavedChangesGuard.d.ts +6 -7
  623. package/dist/domains/unsavedGuard/composables/useUnsavedChangesGuard.js.map +1 -1
  624. package/dist/lib.d.ts +2 -2
  625. package/dist/plugins/commonVuetifyConfig.d.ts +3 -3
  626. package/dist/plugins/commonVuetifyConfig.js.map +1 -1
  627. package/dist/plugins/i18n.d.ts +4 -5
  628. package/dist/plugins/i18n.js.map +1 -1
  629. package/dist/plugins/pluginOptions.d.ts +4 -2
  630. package/dist/plugins/pluginOptions.js.map +1 -1
  631. package/dist/plugins/webfontloader.js.map +1 -1
  632. package/dist/shared/error/AnzuApiCancelledError.d.ts +5 -8
  633. package/dist/shared/error/AnzuApiCancelledError.js.map +1 -1
  634. package/dist/shared/error/AnzuError.d.ts +3 -5
  635. package/dist/shared/error/AnzuError.js.map +1 -1
  636. package/dist/shared/error/AuthUnavailableError.d.ts +3 -3
  637. package/dist/shared/error/AuthUnavailableError.js.map +1 -1
  638. package/dist/shared/error/isInCauseChain.d.ts +2 -2
  639. package/dist/shared/error/isInCauseChain.js.map +1 -1
  640. package/dist/shared/types/UserAndTimeTracking.d.ts +5 -5
  641. package/dist/shared/types/Validation.d.ts +4 -5
  642. package/dist/shared/types/common.d.ts +1 -3
  643. package/dist/shared/types/globalComponents.d.ts +5 -6
  644. package/dist/shared/utils/common.js.map +1 -1
  645. package/dist/shared/utils/datetime.d.ts +0 -1
  646. package/dist/shared/utils/datetime.js.map +1 -1
  647. package/dist/shared/utils/datetimePickerValue.d.ts +4 -7
  648. package/dist/shared/utils/datetimePickerValue.js.map +1 -1
  649. package/dist/shared/utils/development.d.ts +3 -3
  650. package/dist/shared/utils/development.js.map +1 -1
  651. package/dist/shared/utils/envConfig.d.ts +4 -4
  652. package/dist/shared/utils/envConfig.js.map +1 -1
  653. package/dist/shared/utils/json.d.ts +1 -1
  654. package/dist/shared/utils/json.js.map +1 -1
  655. package/dist/shared/utils/userAndTimeTracking.d.ts +5 -7
  656. package/dist/shared/utils/userAndTimeTracking.js.map +1 -1
  657. package/dist/shared/validators/vuelidate/common/useValidateHexColor.d.ts +3 -5
  658. package/dist/shared/validators/vuelidate/common/useValidateHexColor.js.map +1 -1
  659. package/dist/testing/appShell.d.ts +11 -11
  660. package/dist/testing/appShell.js.map +1 -1
  661. package/dist/testing/closeButtons.d.ts +9 -11
  662. package/dist/testing/closeButtons.js.map +1 -1
  663. package/dist/testing/declaredDependencies.d.ts +7 -7
  664. package/dist/testing/declaredDependencies.js.map +1 -1
  665. package/dist/testing/generatedRoutes.d.ts +6 -11
  666. package/dist/testing/generatedRoutes.js.map +1 -1
  667. package/dist/testing/routeHistory.d.ts +5 -12
  668. package/dist/testing/routeHistory.js.map +1 -1
  669. package/dist/testing/sortableLists.d.ts +16 -21
  670. package/dist/testing/sortableLists.js.map +1 -1
  671. package/dist/testing/typedRouter.d.ts +0 -1
  672. package/dist/testing/typedRouter.js.map +1 -1
  673. package/package.json +39 -29
  674. package/src/e2e/conventions.d.mts +4 -0
  675. package/src/e2e/conventions.mjs +15 -0
  676. package/src/e2e/index.d.mts +8 -0
  677. package/src/e2e/index.mjs +1 -0
  678. package/src/e2e/routeWalk.d.mts +43 -0
  679. package/src/e2e/routeWalk.mjs +606 -0
  680. package/src/e2e/types.d.mts +161 -0
  681. package/src/eslint/adminConfig.mjs +19 -27
  682. package/src/eslint/globalComponentNames.mjs +3 -4
  683. package/src/eslint/oxlint.mjs +7 -20
  684. package/src/eslint/plugin.d.mts +2 -4
  685. package/src/eslint/plugin.mjs +18 -34
  686. package/src/eslint/validRouteName.mjs +6 -7
  687. package/src/vite/devWatch.mjs +30 -43
  688. package/src/vite/index.d.mts +5 -5
  689. package/src/vite/sentry.mjs +7 -12
  690. package/src/vite/sourcemaps.mjs +4 -8
@@ -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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,GAAA,OAAa,gBAAY;IACzC,QAAQ7H,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 // If given, the image data is not fetched.\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 per page at a time, for 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\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 // A release answer sent before a pending request says nothing about that request. Only its own answer decides.\n // Reading a refused release 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// Other editors need both the image and the media.\n// A `v-model` assignment reaches the models only after the parent\n// renders, so paths that just assigned send the assigned value directly.\nconst collabValue = (): ImageMediaCollabValue => ({ image: imageModel.value, media: mediaModel.value })\nconst lockedLocal = ref(false)\n// Lock turn this widget took last, by request or release.\n// A widget of the same field drawn in place of this one may have taken a turn since.\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// Requested once per lock. A drop asks again for an unconfirmed\n// lock, otherwise one refusal left every later drop waiting forever.\n// A refusal still keeps the lock for release: a timed-out request\n// answers the same way and the server may have granted it.\n// Never requested while one is pending: a second answer could arrive after the\n// first, and a request from the menu-closing click 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 // An earlier answer says nothing about this lock. Waiters wait 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 room too.\n// The room turns inactive when the other editor leaves, and the server still holds the lock for whoever returns.\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 the refusal reads as the lock still held.\n// An inactive room still gets the value for 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// Must run before the immediate watcher below, which writes the detail during setup with `expandMetadata`.\n// Keeps a form shown by another widget's open dialog: a late-drawn widget used to empty it.\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// DAM authors offered in the image dialog come from an asset this widget read\n// itself for that image, also for the inline form 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// Marks the store as shown by this widget while its dialog or inline form is open, so no other widget empties it.\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// Copy of the widget's image or media that \"edit metadata\" put into the dialog.\nlet ownInDialog: typeof detail.value = null\n// What this widget's last pick or upload put into the dialog.\n// The dialog store is page-wide, so it may show another widget's dialog opened over this one.\nlet pickInDialog: typeof detail.value = null\n// What the dialog shows loading for: a pick being read, or \"edit metadata\"\n// waiting for another widget's save or for a read of the held asset.\n// The answer is applied only while the dialog still loads for it,\n// not after close or once the page-wide store shows another dialog.\n// Otherwise a pick answer replaced another widget's dialog form and lost the typed\n// input. The loading dialog then closes, since its confirm would save that form 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// Number of answered page saves of the held image at the time the widget read it.\nlet resImageReadAt = 0\n// Marks of this widget's image saves in flight.\nconst ownImageSaves = new Set<symbol>()\n// Cancels the \"edit metadata\" wait for another widget's save. Called when the dialog closes.\nlet cancelSaveWait: (() => void) | null = null\n// Type the dialog is opened for: held image or medium, picked asset, or uploaded image.\n// Sets the title from the start, so it stays the same while loading, waiting and saving.\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 is saving the image, for example the one this\n // widget replaced. The dialog shows loading until that save ends.\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 // The other save timed out: the dialog closes and the user is told. Before, it loaded until the editor closed it.\n // Showing the earlier read would let the confirm overwrite what that save may still 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 held asset was picked without authors: the dialog loads while it is read\n // again, and the result 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 // Another widget saved the image after this one read it: take the image as saved.\n // Otherwise the dialog offered stale texts and its confirm overwrote 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 is inline, with no \"edit metadata\" opening to\n// wait for another widget's save or take its result, so the form does both.\n// Otherwise it showed texts read before that save, and the host's confirm overwrote the saved ones.\n// When the wait runs out the form shows the read data 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 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// Updated only when the socket confirms lock success or failure. Needed for file drops.\nconst collabFieldLockReallyLocked = ref(false)\n\n// Cancelling must settle the promise, not only clear the timer, because `onDrop` awaits it.\n// A Set 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 // Whatever held the field lock goes with the widget. The server keeps a lock until\n // release or until the editor leaves, so the field stayed locked for others.\n // Released with the current value, unless a save or delete in flight releases\n // it at its end, or the replacing widget has taken a lock turn 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 single drop uploaded once the field lock arrives. The upload\n// dialog shows one file but saves all it gets, so only one is kept.\nlet dropInWait: symbol | null = null\n\nconst onDrop = async (files: File[]) => {\n if (props.readonly) return\n // The dropzone rejected every file and reported it, so no lock is requested.\n if (files.length === 0) return\n // An earlier drop's lock request is still pending, so this drop is ignored.\n if (!isNull(dropInWait) && lockRequestPending.value) return\n // Same as a click on the dropzone: another editor holds the field.\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 asks again and replaces 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 waiting for the lock: release it and upload nothing.\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 the upload dialog shows one file,\n // so only the first dropped file is uploaded and the user is warned.\n // Otherwise the extra files were uploaded 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 timed-out request may have been granted, and nothing else would release it.\n // Released only when nothing else waits for or holds the lock. A refused release reads as the lock\n // held, so another waiting drop uploaded without its lock, or a menu opened meanwhile lost its lock.\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 rejected every file and reported it. A dialog over a queue without a row would only show loading.\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// Id of the image this widget just created. The model changes to it, and the widget shows the create response.\n// Reading it again made the preview fall back to the placeholder, and a failed read\n// showed an error after a successful save. Any other id change triggers a read.\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 when the read is sent: a save answered later may have taken effect 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` it would write its image into\n // the page-wide dialog store, which now shows the next widget's image.\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: an open menu or dialog holds the lock and releases it on close or confirm.\n// Otherwise the editor holds no lock, and the value reaches the buffer only here.\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 // Keeps the form shown by another widget's open dialog.\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 // Cleared on every run, also one that ends with media. Otherwise a later change to that id would not be 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 as it answers, and the next dialog opens only after the asset is fetched or copied.\n// Until then the pick counts as an open dialog, or the close watcher released the lock with the old value.\n// Counts every pending pick: one whose dialog was closed released the lock under a later pick.\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 // A pick that ended early (no main file, media not loaded) left the\n // dialog loading, so the next upload or edit showed only a spinner.\n // Cleared unless the dialog now loads for something opened 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 // The asset's role is known only after it is read. The dialog shows loading\n // until then and during the copy into the upload licence, like the image widget.\n // Otherwise nothing was shown, and this dialog covered another widget's dialog opened meanwhile.\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 // Nothing is written to the page-wide dialog store if the widget is gone or the dialog no longer loads for this pick.\n if (!answerTakenFor(thisPick)) return\n if (!mediaDataFromDam) return void (metadataDialog.value = false)\n if (selectedAsset.attributes.assetType === DamAssetType.Video && assetFileIsVideoFile(selectedAsset.mainFile)) {\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 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 // An asset already in the upload licence is used as 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 gone widget, or a dialog no longer loading for this pick, opens no upload dialog.\n // Otherwise the copy continued in the replacing widget's upload dialog, which requested the field lock only then.\n if (!answerTakenFor(thisPick)) return\n // The upload dialog shows the copy and replaces the image dialog.\n metadataDialogLoading.value = false\n metadataDialog.value = false\n if (copyRes) onCopyToLicence(copyRes)\n return\n }\n metadataDialog.value = true\n // Authors are offered only if the pick still owns the dialog. Otherwise\n // a left pick's read offered its authors in a later pick's dialog.\n let authorsToOffer: AssetDetailItemDto | null = null\n try {\n const assetRes = await fetchAsset(damClient, endPointAsset, selectedAsset.id)\n // Like the image widget: if the application has its own mapping, it builds the texts from the asset.\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 asset's licence, like all DAM author names the\n // widgets write. Falls back to the picker's when the licence does not resolve.\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 still fill metadata from the file: saving\n // authors marks the asset described, and the server then fills 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 // Not a kind the widget accepts (audio not in a podcast, video without a video file): 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 // Falls back to the ext system of the widget's upload licence,\n // loaded by its root, when the licence cannot be resolved.\n const shownUnder = (await getExtSystemByLicence(assetRes.licence)) ?? imageWidgetUploadConfig.value!.extSystem\n // Must load before the detail shows the asset: it reads the ext\n // system configuration while rendering and threw 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 still shows: a stale answer must not change the ext system used for name lookups.\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 // Nothing is applied once the dialog is closed. Otherwise a pending\n // pick answer overwrote another widget's dialog form opened meanwhile.\n loadingInDialog = null\n metadataDialogLoading.value = false\n // Cancels this opening's wait for another widget's save.\n cancelSaveWait?.()\n}\n\nconst tryMediaConfirm = async () => {\n if (!isMediaAware(detail.value)) return\n // Ignored while this widget's image save is in flight, like a second image confirm. That save's\n // answer sets the image and dropped the media confirmed meanwhile. The button spins until 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 just-closed detail is still being read, and the read may change\n // what the form requires. The confirm waits for it, then the form confirms again.\n const confirmAgain = () => detailDialogMetadataComponent.value?.confirm()\n if (holdConfirmForDetailAssetRead(metadataDialogSaving.value, confirmAgain)) return\n // Ignores a second press during the save: a host button is not disabled meanwhile and\n // Enter reaches the dialog button. Otherwise the image is created or updated twice.\n if (metadataDialogSaving.value) return\n // A confirm belongs to the image it was pressed on. During waits the dialog\n // may close and reopen for another image or media, or the widget may unmount.\n // Until the save is sent, each step continues only if the widget exists and the dialog still shows that image.\n // Otherwise another image was saved without a press, or an image without fields was created for a media.\n const pressedOn = detail.value\n const confirmIsOver = () => disposed || detail.value !== pressedOn\n // Authors are also not sent if the widget turned read-only meanwhile.\n const authorsSendIsOver = () => confirmIsOver() || props.readonly\n metadataDialogSaving.value = true\n // The dialog shows the source from the held asset, not the pick (its read\n // failed). Once saved, the image has its own source and the asset is released.\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 pick time and may have gained authors\n // since. The write would replace them, so it is read again first.\n // A failed read saves nothing. If it now has authors nothing is written: the pick is dropped,\n // an empty source takes their names, a persistent message is shown, 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 // Author names go into the image source only after the DAM accepts the authors, and are held aside until then.\n // Written earlier, they stayed in the hidden source after a refused\n // write, and a confirm with the pick cleared saved them with the image.\n // Looked up under the ext system of the asset's licence, like the read before the write.\n const authorsRes = await fetchAuthorListByIds(\n damClient,\n endPointAuthor,\n (await getExtSystemByLicence(authorsAsset.licence)) ??\n assetSelectStore.requireSelectedSelectConfig().extSystem,\n authorsAsset.authors\n )\n // Silently stops if the dialog was left or the widget 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 // Names the authors refused by validation as the forms name them. The image is not saved.\n showMetadataSaveError(e, assetSelectStore.requireSelectedSelectConfig().extSystem, damConfigName)\n return\n }\n // The DAM already has the authors. The image is not saved.\n if (confirmIsOver()) return\n pressedOn.texts.source = source\n offerNoDamAuthors()\n }\n }\n const image = imageFieldsOf(pressedOn)\n // The save is noted for the other widgets of the page, even if this widget is gone by the time it answers.\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, so nothing of the answer is written.\n // The dialog store is shared by the page and may already belong to the\n // next widget. Writing here emptied its form and then showed this image.\n if (disposed) return\n letGoHeld()\n // This confirm closes the dialog if it shows the pressed image or nothing, or if \"edit\n // metadata\" reopened it. That copy is stale and its confirm would overwrite this save.\n // A dialog of another pick or upload stays open and keeps the field lock. A dialog still\n // loading for a pick or \"edit metadata\" also stays open. Closing it broke that load.\n // If the dialog was closed meanwhile, the store may show another widget's dialog, so it is not emptied.\n // The `expandMetadata` form is not a dialog. It shows the widget's image, now the saved one.\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 // A dialog of another pick or upload opened during a create gets the created\n // id. Otherwise its confirm created a second image and left this one unused.\n // Only the pick of this widget is updated. An image another widget put in the store belongs to that widget.\n if (dialogOfAnotherPick && !image.id && shown === pickInDialog && isImageCreateUpdateAware(shown)) {\n if (isUndefined(shown.id)) shown.id = res.id\n }\n // Runs before the dialog close is observed, so this release with the saved value is the one\n // sent. When the editor is alone there is no lock and the value goes to the buffer here.\n // While the menu or another dialog holds the field, the lock\n // stays with it. Releasing here broke a picker opened since.\n // Not while a dialog of another pick or upload is open. It sets the final\n // value under this id, and other editors reload only when the id changes.\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 during this confirm left the lock to it. It is released here once nothing else holds it.\n // A disposed widget also releases with its current field value.\n // The server keeps locks until release or leaving the room.\n // Skipped if the replacement widget has taken the lock since, because the release would free its lock.\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// While a delete is pending, closing the menu or a dialog does not release the\n// lock. The menu closes on the click and released with the image still there.\n// Same while a dialog confirm runs. Otherwise the lock went back with\n// the old value and the saved image never reached other editors.\nconst deletePending = ref(false)\nconst onImageMediaDelete = async () => {\n // Use the widget's own image. The store detail is shared and may be empty 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 // A disposed widget releases the lock with its field value, unless the replacement widget has taken the lock since.\n // Otherwise the release freed the lock held by that widget's 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 // An upload brings its own source, so authors of a previously picked asset are not offered.\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 // On open, a lock left unconfirmed by a refused drop is requested again. It\n // is done here, not in the click handler, because the click 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 from an `expandOptions` button there is no menu to request the lock, so\n // the dialog does. Opened from the menu, it requests only an unconfirmed lock.\n if (newValue) return void acquireFieldLockLocal(true)\n if (deletePending.value || metadataDialogSaving.value) return\n releaseFieldLockLocal()\n },\n { immediate: false }\n)\n\n// When read-only, open dialogs and menus close as on cancel and the lock is released\n// once none holds it. A dialog left open kept the lock unseen and reappeared on edit.\n// A dialog with a save in progress is left to that save, which closes it. If the save fails, it closes then.\n// With `expandMetadata` the in-page form is kept for its host to confirm later. Emptying it lost the pick still shown.\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 drops this editor's locks on the server. Kept as\n// held, the lock was never requested again and its release was refused.\n// On reconnect, an open menu or dialog requests the lock again. This includes\n// one opened while alone and one whose request was refused or 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,GAEjD,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,C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