@conduction/nextcloud-vue 2.177.0 → 2.179.0

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 (204) hide show
  1. package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +1 -1
  2. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +90 -7
  3. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
  4. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +82 -79
  5. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
  6. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue.js +1 -1
  7. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue2.js +12 -1
  8. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue2.js.map +1 -1
  9. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue3.js.map +1 -1
  10. package/dist/esm/components/CnCardNotices/CnCardNotices.vue.js +1 -1
  11. package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js +45 -7
  12. package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js.map +1 -1
  13. package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js +1 -1
  14. package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js.map +1 -1
  15. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue.js +1 -1
  16. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +10 -8
  17. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
  18. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js +95 -88
  19. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
  20. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
  21. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +40 -1
  22. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
  23. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +149 -109
  24. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
  25. package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
  26. package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js.map +1 -1
  27. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue.js +1 -1
  28. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js +86 -8
  29. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js.map +1 -1
  30. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js +137 -121
  31. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js.map +1 -1
  32. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue.js +1 -1
  33. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue2.js +56 -4
  34. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue2.js.map +1 -1
  35. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue3.js +166 -70
  36. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue3.js.map +1 -1
  37. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue.js +9 -0
  38. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue.js.map +1 -0
  39. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue2.js +123 -0
  40. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue2.js.map +1 -0
  41. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue3.js +268 -0
  42. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue3.js.map +1 -0
  43. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue.js +9 -0
  44. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue.js.map +1 -0
  45. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue2.js +49 -0
  46. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue2.js.map +1 -0
  47. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue3.js +41 -0
  48. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue3.js.map +1 -0
  49. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue.js +1 -1
  50. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js +116 -8
  51. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js.map +1 -1
  52. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js +110 -58
  53. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js.map +1 -1
  54. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js +78 -1
  55. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js.map +1 -1
  56. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js +44 -3
  57. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js.map +1 -1
  58. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue.js +1 -1
  59. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js +112 -1
  60. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js.map +1 -1
  61. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js +53 -18
  62. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js.map +1 -1
  63. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js +3 -3
  64. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js.map +1 -1
  65. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js +108 -74
  66. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js.map +1 -1
  67. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +219 -83
  68. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  69. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +92 -58
  70. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  71. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
  72. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +56 -0
  73. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
  74. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js +185 -123
  75. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
  76. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue.js +1 -1
  77. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +2 -0
  78. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
  79. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +2 -1
  80. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
  81. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  82. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +197 -63
  83. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  84. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +244 -161
  85. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  86. package/dist/esm/components/CnSearchPage/CnSearchPage.vue.js +1 -1
  87. package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js +39 -1
  88. package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js.map +1 -1
  89. package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js +12 -2
  90. package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js.map +1 -1
  91. package/dist/esm/components/CnStepper/CnStepper.vue.js +1 -1
  92. package/dist/esm/components/CnStepper/CnStepper.vue2.js.map +1 -1
  93. package/dist/esm/components/CnStepper/CnStepper.vue3.js.map +1 -1
  94. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue.js +1 -1
  95. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js +51 -2
  96. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js.map +1 -1
  97. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js +49 -11
  98. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js.map +1 -1
  99. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js +9 -0
  100. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js.map +1 -0
  101. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js +328 -0
  102. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js.map +1 -0
  103. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js +85 -0
  104. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js.map +1 -0
  105. package/dist/esm/components/CnTaskFormWidget/index.js +24 -0
  106. package/dist/esm/components/CnTaskFormWidget/index.js.map +1 -0
  107. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue.js +1 -1
  108. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js +8 -2
  109. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js.map +1 -1
  110. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js +16 -3
  111. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js.map +1 -1
  112. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  113. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
  114. package/dist/esm/composables/indexSources.js +24 -4
  115. package/dist/esm/composables/indexSources.js.map +1 -1
  116. package/dist/esm/composables/useFlowStore.js +75 -4
  117. package/dist/esm/composables/useFlowStore.js.map +1 -1
  118. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue.js +1 -1
  119. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue2.js +17 -0
  120. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue2.js.map +1 -1
  121. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue3.js +9 -1
  122. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue3.js.map +1 -1
  123. package/dist/esm/dialogs/CnFlowEditModal.vue.js +1 -1
  124. package/dist/esm/dialogs/CnFlowEditModal.vue2.js +15 -0
  125. package/dist/esm/dialogs/CnFlowEditModal.vue2.js.map +1 -1
  126. package/dist/esm/dialogs/CnFlowEditModal.vue3.js +13 -3
  127. package/dist/esm/dialogs/CnFlowEditModal.vue3.js.map +1 -1
  128. package/dist/esm/dialogs/CnFlowStepPickerModal.vue.js +1 -1
  129. package/dist/esm/dialogs/CnFlowStepPickerModal.vue2.js +13 -1
  130. package/dist/esm/dialogs/CnFlowStepPickerModal.vue2.js.map +1 -1
  131. package/dist/esm/dialogs/CnFlowStepPickerModal.vue3.js.map +1 -1
  132. package/dist/esm/index.js +3 -0
  133. package/dist/esm/index.js.map +1 -1
  134. package/dist/esm/l10n/en.json.js +52 -1
  135. package/dist/esm/l10n/en.json.js.map +1 -1
  136. package/dist/esm/l10n/nl.json.js +51 -1
  137. package/dist/esm/l10n/nl.json.js.map +1 -1
  138. package/dist/esm/library-style.js +1 -1
  139. package/dist/esm/nextcloud-vue.css +1203 -812
  140. package/dist/esm/utils/dialogWidths.js +6 -4
  141. package/dist/esm/utils/dialogWidths.js.map +1 -1
  142. package/dist/esm/utils/fieldPill.js +77 -0
  143. package/dist/esm/utils/fieldPill.js.map +1 -0
  144. package/dist/esm/utils/flowCondition.js +177 -0
  145. package/dist/esm/utils/flowCondition.js.map +1 -0
  146. package/dist/esm/utils/flowRunStatus.js +64 -1
  147. package/dist/esm/utils/flowRunStatus.js.map +1 -1
  148. package/dist/esm/utils/flowStepList.js +385 -0
  149. package/dist/esm/utils/flowStepList.js.map +1 -0
  150. package/dist/esm/utils/libraryWidgetKeys.js +1 -0
  151. package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
  152. package/dist/esm/utils/searchRefusal.js +35 -1
  153. package/dist/esm/utils/searchRefusal.js.map +1 -1
  154. package/dist/esm/utils/widgetDispatch.js +1 -1
  155. package/dist/esm/utils/widgetDispatch.js.map +1 -1
  156. package/dist/nextcloud-vue.cjs.js +14837 -11411
  157. package/dist/nextcloud-vue.cjs.js.map +2 -2
  158. package/dist/nextcloud-vue.css +1203 -812
  159. package/l10n/en.json +52 -1
  160. package/l10n/nl.json +51 -1
  161. package/package.json +1 -1
  162. package/src/components/CnActionDialog/CnActionDialog.vue +116 -9
  163. package/src/components/CnBuildiqEditButton/CnBuildiqEditButton.vue +12 -1
  164. package/src/components/CnCardNotices/CnCardNotices.vue +46 -8
  165. package/src/components/CnCellRenderer/CnCellRenderer.vue +8 -0
  166. package/src/components/CnFilesBrowser/CnFilesBrowser.vue +61 -2
  167. package/src/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
  168. package/src/components/CnFlowDetail/CnFlowDetail.vue +110 -12
  169. package/src/components/CnFlowDetail/CnFlowDryRunResult.vue +163 -5
  170. package/src/components/CnFlowDetail/CnFlowStepList.vue +408 -0
  171. package/src/components/CnFlowDetail/CnFlowViewSwitch.vue +117 -0
  172. package/src/components/CnFlowDetail/index.js +2 -0
  173. package/src/components/CnFlowsPage/CnFlowBoard.vue +182 -25
  174. package/src/components/CnFlowsPage/CnFlowEditorPage.vue +101 -3
  175. package/src/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue +141 -1
  176. package/src/components/CnIndexPage/CnIndexHeaderMenu.vue +22 -4
  177. package/src/components/CnIndexPage/CnIndexPage.vue +172 -13
  178. package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +148 -4
  179. package/src/components/CnObjectSidebar/CnFilesTab.vue +3 -0
  180. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +310 -66
  181. package/src/components/CnSearchPage/CnSearchPage.vue +50 -1
  182. package/src/components/CnStepper/CnStepper.vue +14 -5
  183. package/src/components/CnTaskFormFields/CnTaskFormFields.md +1 -0
  184. package/src/components/CnTaskFormFields/CnTaskFormFields.vue +89 -3
  185. package/src/components/CnTaskFormWidget/CnTaskFormWidget.vue +400 -0
  186. package/src/components/CnTaskFormWidget/index.js +23 -0
  187. package/src/components/CnTasksWidget/CnTasksWidget.vue +17 -3
  188. package/src/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  189. package/src/components/index.js +2 -1
  190. package/src/composables/indexSources.js +24 -4
  191. package/src/composables/useFlowStore.js +75 -4
  192. package/src/css/index-page.css +10 -0
  193. package/src/dialogs/CnFlowEdgeEditModal.vue +28 -0
  194. package/src/dialogs/CnFlowEditModal.vue +26 -6
  195. package/src/dialogs/CnFlowStepPickerModal.vue +13 -1
  196. package/src/index.js +3 -0
  197. package/src/utils/dialogWidths.js +6 -4
  198. package/src/utils/fieldPill.js +73 -0
  199. package/src/utils/flowCondition.js +173 -0
  200. package/src/utils/flowRunStatus.js +63 -0
  201. package/src/utils/flowStepList.js +381 -0
  202. package/src/utils/libraryWidgetKeys.js +1 -0
  203. package/src/utils/searchRefusal.js +33 -0
  204. package/src/utils/widgetDispatch.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CnActionDialog.vue3.js","sources":["../../../../src/components/CnActionDialog/CnActionDialog.vue?vue&type=template&id=fc71dad0&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<CnDialog\n\t\t:name=\"text(config.title) || t('nextcloud-vue', 'Confirm')\"\n\t\t:eyebrow=\"eyebrowText\"\n\t\t:subtitle=\"text(config.subtitle)\"\n\t\twidth=\"form\"\n\t\t:noClose=\"busy\"\n\t\tdata-testid=\"cn-action-dialog\"\n\t\t@closing=\"close\">\n\t\t<div v-if=\"!done\" class=\"cn-action-dialog\">\n\t\t\t<!-- The record the action is about: its title, a meta line, a badge. -->\n\t\t\t<div v-if=\"summary\" class=\"cn-action-dialog__summary\" data-testid=\"cn-action-dialog-summary\">\n\t\t\t\t<span class=\"cn-action-dialog__summary-icon\">\n\t\t\t\t\t<CnIcon :name=\"config.summary.icon || 'FolderOutline'\" :size=\"20\" />\n\t\t\t\t</span>\n\t\t\t\t<span class=\"cn-action-dialog__summary-text\">\n\t\t\t\t\t<strong>{{ summary.title }}</strong>\n\t\t\t\t\t<span v-if=\"summary.meta\" class=\"cn-action-dialog__muted\">{{ summary.meta }}</span>\n\t\t\t\t</span>\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"summary.badge\"\n\t\t\t\t\tclass=\"cn-action-dialog__badge\"\n\t\t\t\t\t:class=\"summary.badgeVariant ? 'cn-status-badge--' + summary.badgeVariant : ''\">{{ summary.badge }}</span>\n\t\t\t</div>\n\n\t\t\t<!-- Facts about the record, in titled groups (\"Retention under the case type\"). -->\n\t\t\t<section v-for=\"(section, index) in factSections\"\n\t\t\t\t:key=\"`facts-${index}`\"\n\t\t\t\tclass=\"cn-action-dialog__section\"\n\t\t\t\tdata-testid=\"cn-action-dialog-facts\">\n\t\t\t\t<h3 v-if=\"section.title\" class=\"cn-action-dialog__title\">\n\t\t\t\t\t{{ section.title }}\n\t\t\t\t</h3>\n\t\t\t\t<dl class=\"cn-action-dialog__facts\">\n\t\t\t\t\t<div v-for=\"fact in section.facts\" :key=\"fact.label\" class=\"cn-action-dialog__fact\">\n\t\t\t\t\t\t<dt>{{ fact.label }}</dt>\n\t\t\t\t\t\t<dd>{{ fact.value }}</dd>\n\t\t\t\t\t</div>\n\t\t\t\t</dl>\n\t\t\t</section>\n\n\t\t\t<!-- The checklist, read from an endpoint: each item met, not met or\n\t\t\t unknown. Items named in `required` decide whether the action may\n\t\t\t run; the others inform. -->\n\t\t\t<section v-if=\"config.checklist\" class=\"cn-action-dialog__section\" data-testid=\"cn-action-dialog-checklist\">\n\t\t\t\t<h3 v-if=\"config.checklist.title\" class=\"cn-action-dialog__title\">\n\t\t\t\t\t{{ text(config.checklist.title) }}\n\t\t\t\t</h3>\n\t\t\t\t<p v-if=\"checklistError\" class=\"cn-action-dialog__muted\" role=\"status\">\n\t\t\t\t\t{{ checklistError }}\n\t\t\t\t</p>\n\t\t\t\t<ul class=\"cn-action-dialog__checks\">\n\t\t\t\t\t<li v-for=\"item in checklist\"\n\t\t\t\t\t\t:key=\"item.id\"\n\t\t\t\t\t\tclass=\"cn-action-dialog__check\"\n\t\t\t\t\t\t:data-testid=\"`cn-action-dialog-check-${item.id}`\"\n\t\t\t\t\t\t:data-met=\"String(item.met)\">\n\t\t\t\t\t\t<CheckCircle v-if=\"item.met === true\" :size=\"20\" class=\"cn-action-dialog__check-icon cn-action-dialog__check-icon--met\" />\n\t\t\t\t\t\t<HelpCircleOutline v-else-if=\"item.met === null\" :size=\"20\" class=\"cn-action-dialog__check-icon\" />\n\t\t\t\t\t\t<CircleOutline v-else :size=\"20\" class=\"cn-action-dialog__check-icon\" />\n\t\t\t\t\t\t<strong class=\"cn-action-dialog__check-label\">{{ item.label }}</strong>\n\t\t\t\t\t\t<span v-if=\"item.detail\" class=\"cn-action-dialog__muted\">{{ item.detail }}</span>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\n\t\t\t<!-- The fields, the reason and the note, in the order `bodyParts`\n\t\t\t gives: the fields first, or after the note with\n\t\t\t `fieldsAfterNote` (DqArchiveren's \"let the requester know\"). -->\n\t\t\t<template v-for=\"part in bodyParts\" :key=\"part\">\n\t\t\t\t<template v-if=\"part === 'fields'\">\n\t\t\t\t\t<!-- Fields the action asks for, sent beside the reason. -->\n\t\t\t\t\t<div v-for=\"field in shownFields\"\n\t\t\t\t\t\t:key=\"field.field\"\n\t\t\t\t\t\tclass=\"cn-action-dialog__field\"\n\t\t\t\t\t\t:data-testid=\"`cn-action-dialog-field-${field.field}`\">\n\t\t\t\t\t\t<!-- A checkbox field: a tinted box, the label filled from the\n\t\t\t\t\t\t record, a hint under it (DqArchiveren \"Sanne de Vries laten\n\t\t\t\t\t\t weten...\"). -->\n\t\t\t\t\t\t<NcCheckboxRadioSwitch v-if=\"field.type === 'checkbox'\"\n\t\t\t\t\t\t\tclass=\"cn-action-dialog__checkbox\"\n\t\t\t\t\t\t\t:modelValue=\"checkboxValue(field)\"\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t@update:modelValue=\"(on) => setChecked(field.field, on)\">\n\t\t\t\t\t\t\t<span class=\"cn-action-dialog__checkbox-text\">\n\t\t\t\t\t\t\t\t<strong class=\"cn-action-dialog__checkbox-label\">{{ fill(field.label) || field.field }}</strong>\n\t\t\t\t\t\t\t\t<span v-if=\"field.hint\" class=\"cn-action-dialog__muted\">{{ fill(field.hint) }}</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t\t\t<!-- A search field: records of `source` found as the reader\n\t\t\t\t\t\t types (DqZaakKoppelen \"Zaak koppelen\"). -->\n\t\t\t\t\t\t<CnSearchSelect v-else-if=\"field.type === 'search'\"\n\t\t\t\t\t\t\t:modelValue=\"values[field.field] || null\"\n\t\t\t\t\t\t\t:options=\"searchOptions[field.field] || []\"\n\t\t\t\t\t\t\t:inputLabel=\"fill(field.label) || field.field\"\n\t\t\t\t\t\t\t:labelOutside=\"true\"\n\t\t\t\t\t\t\t:loading=\"searching === field.field\"\n\t\t\t\t\t\t\t:filterable=\"false\"\n\t\t\t\t\t\t\t:placeholder=\"fill(field.placeholder)\"\n\t\t\t\t\t\t\t@search=\"(typed) => onSearch(field, typed)\"\n\t\t\t\t\t\t\t@update:modelValue=\"(value) => setValue(field.field, value && typeof value === 'object' ? value.id : value)\" />\n\t\t\t\t\t\t<!-- Several items to tick, listed from the record or the config\n\t\t\t\t\t\t (DqZaakDialogen \"Documenten die meegaan\"). -->\n\t\t\t\t\t\t<fieldset v-else-if=\"field.type === 'checks'\"\n\t\t\t\t\t\t\tclass=\"cn-action-dialog__checks\"\n\t\t\t\t\t\t\t:data-testid=\"`cn-action-dialog-checks-${field.field}`\">\n\t\t\t\t\t\t\t<legend class=\"cn-action-dialog__checks-legend\">\n\t\t\t\t\t\t\t\t{{ fill(field.label) || field.field }}\n\t\t\t\t\t\t\t</legend>\n\t\t\t\t\t\t\t<!-- Several ticks per item, one per column (\"moves\" or \"on both\"). -->\n\t\t\t\t\t\t\t<template v-if=\"hasColumns(field)\">\n\t\t\t\t\t\t\t\t<div class=\"cn-action-dialog__columns cn-action-dialog__columns--head\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t<span />\n\t\t\t\t\t\t\t\t\t<span v-for=\"column in field.columns\" :key=\"column.field\">{{ text(column.label) || column.field }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div v-for=\"item in checkItems(field)\"\n\t\t\t\t\t\t\t\t\t:key=\"item.value\"\n\t\t\t\t\t\t\t\t\tclass=\"cn-action-dialog__columns\"\n\t\t\t\t\t\t\t\t\t:data-testid=\"`cn-action-dialog-columns-${field.field}-${item.value}`\">\n\t\t\t\t\t\t\t\t\t<span class=\"cn-action-dialog__checkbox-text\">\n\t\t\t\t\t\t\t\t\t\t<strong class=\"cn-action-dialog__checkbox-label\">{{ item.label }}</strong>\n\t\t\t\t\t\t\t\t\t\t<span v-if=\"item.secondary\" class=\"cn-action-dialog__muted\">{{ item.secondary }}</span>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<NcCheckboxRadioSwitch v-for=\"column in field.columns\"\n\t\t\t\t\t\t\t\t\t\t:key=\"column.field\"\n\t\t\t\t\t\t\t\t\t\t:modelValue=\"columnValue(column).includes(item.value)\"\n\t\t\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\t\t\t:ariaLabel=\"`${item.label}: ${text(column.label) || column.field}`\"\n\t\t\t\t\t\t\t\t\t\t@update:modelValue=\"(on) => setCheck(column, item.value, on)\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t<NcCheckboxRadioSwitch v-for=\"item in (hasColumns(field) ? [] : checkItems(field))\"\n\t\t\t\t\t\t\t\t:key=\"item.value\"\n\t\t\t\t\t\t\t\t:modelValue=\"checksValue(field).includes(item.value)\"\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\t@update:modelValue=\"(on) => setCheck(field, item.value, on)\">\n\t\t\t\t\t\t\t\t<span class=\"cn-action-dialog__checkbox-text\">\n\t\t\t\t\t\t\t\t\t<strong class=\"cn-action-dialog__checkbox-label\">{{ item.label }}</strong>\n\t\t\t\t\t\t\t\t\t<span v-if=\"item.secondary\" class=\"cn-action-dialog__muted\">{{ item.secondary }}</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t\t\t\t<span v-if=\"checkItems(field).length === 0\" class=\"cn-action-dialog__muted\">\n\t\t\t\t\t\t\t\t{{ text(field.emptyText) || t('nextcloud-vue', 'Nothing to choose from.') }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span v-if=\"conflicts(field).length > 0\"\n\t\t\t\t\t\t\t\tclass=\"cn-action-dialog__error\"\n\t\t\t\t\t\t\t\trole=\"alert\"\n\t\t\t\t\t\t\t\t:data-testid=\"`cn-action-dialog-conflict-${field.field}`\">\n\t\t\t\t\t\t\t\t{{ text(field.exclusiveText) || t('nextcloud-vue', 'An item cannot be ticked in more than one column.') }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t<!-- One choice out of a few explained options (DqZaakSamenwerken\n\t\t\t\t\t\t \"Delen\" or \"Overdragen\"). -->\n\t\t\t\t\t\t<CnChoiceCards v-else-if=\"field.type === 'cards'\"\n\t\t\t\t\t\t\t:modelValue=\"cardsValue(field)\"\n\t\t\t\t\t\t\t:options=\"cardOptions(field)\"\n\t\t\t\t\t\t\t:label=\"fill(field.label) || field.field\"\n\t\t\t\t\t\t\t@update:modelValue=\"(value) => setValue(field.field, value)\" />\n\t\t\t\t\t\t<!-- An optional select or text field: its label above the control,\n\t\t\t\t\t\t \"(optional)\" in grey after it (DqUwWachtrij \"Sjabloon (niet\n\t\t\t\t\t\t verplicht)\"). -->\n\t\t\t\t\t\t<CnFormField v-if=\"labelsOutside(field)\"\n\t\t\t\t\t\t\t:controlId=\"controlId(field)\"\n\t\t\t\t\t\t\t:text=\"fill(field.label) || field.field\"\n\t\t\t\t\t\t\t:optional=\"true\" />\n\t\t\t\t\t\t<NcSelect v-if=\"field.type === 'select'\"\n\t\t\t\t\t\t\t:modelValue=\"selectedOption(field)\"\n\t\t\t\t\t\t\t:options=\"optionsOf(field)\"\n\t\t\t\t\t\t\t:inputId=\"controlId(field)\"\n\t\t\t\t\t\t\t:inputLabel=\"fill(field.label) || field.field\"\n\t\t\t\t\t\t\t:labelOutside=\"labelsOutside(field)\"\n\t\t\t\t\t\t\t:placeholder=\"fill(field.placeholder)\"\n\t\t\t\t\t\t\t:clearable=\"field.required === false\"\n\t\t\t\t\t\t\t:filterable=\"!searchesRemotely(field)\"\n\t\t\t\t\t\t\t:loading=\"loadingOptions === field.field\"\n\t\t\t\t\t\t\t@search=\"(typed) => onOptionsSearch(field, typed)\"\n\t\t\t\t\t\t\t@update:modelValue=\"(option) => pick(field, option)\" />\n\t\t\t\t\t\t<NcTextField v-else-if=\"field.type === 'secret'\"\n\t\t\t\t\t\t\t:modelValue=\"values[field.field] || ''\"\n\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\tautocomplete=\"new-password\"\n\t\t\t\t\t\t\t:label=\"text(field.label) || field.field\"\n\t\t\t\t\t\t\t:placeholder=\"secretStored(field) ? t('nextcloud-vue', 'Stored. Type a new value to replace it.') : ''\"\n\t\t\t\t\t\t\t@update:modelValue=\"(value) => setValue(field.field, value)\" />\n\t\t\t\t\t\t<NcTextField v-else-if=\"!['checkbox', 'search', 'checks', 'cards'].includes(field.type)\"\n\t\t\t\t\t\t\t:id=\"controlId(field)\"\n\t\t\t\t\t\t\t:modelValue=\"values[field.field] || ''\"\n\t\t\t\t\t\t\t:type=\"field.type === 'datetime' ? 'datetime-local' : (field.type === 'date' ? 'date' : 'text')\"\n\t\t\t\t\t\t\t:label=\"fill(field.label) || field.field\"\n\t\t\t\t\t\t\t:labelOutside=\"labelsOutside(field)\"\n\t\t\t\t\t\t\t@update:modelValue=\"(value) => setValue(field.field, value)\" />\n\t\t\t\t\t\t<span v-if=\"field.hint && field.type !== 'checkbox'\" class=\"cn-action-dialog__muted\">{{ fill(field.hint) }}</span>\n\t\t\t\t\t\t<span v-if=\"optionsErrors[field.field]\"\n\t\t\t\t\t\t\tclass=\"cn-action-dialog__error\"\n\t\t\t\t\t\t\trole=\"alert\"\n\t\t\t\t\t\t\t:data-testid=\"`cn-action-dialog-options-error-${field.field}`\">{{ optionsErrors[field.field] }}</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t</template>\n\t\t\t\t<template v-else-if=\"part === 'reason'\">\n\t\t\t\t\t<div v-if=\"config.reason\" class=\"cn-action-dialog__field cn-action-dialog__reason\">\n\t\t\t\t\t\t<NcTextArea\n\t\t\t\t\t\t\t:id=\"reasonId\"\n\t\t\t\t\t\t\tv-model=\"reason\"\n\t\t\t\t\t\t\t:label=\"reasonLabel\"\n\t\t\t\t\t\t\t:labelOutside=\"false\"\n\t\t\t\t\t\t\t:rows=\"config.reason.rows || 2\"\n\t\t\t\t\t\t\tresize=\"vertical\"\n\t\t\t\t\t\t\tdata-testid=\"cn-action-dialog-reason\" />\n\t\t\t\t\t\t<span v-if=\"config.reason.hint\" class=\"cn-action-dialog__muted cn-action-dialog__hint\">{{ text(config.reason.hint) }}</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t</template>\n\t\t\t\t<template v-else>\n\t\t\t\t\t<NcNoteCard v-if=\"config.note && noteShown\"\n\t\t\t\t\t\t:type=\"noteType\"\n\t\t\t\t\t\t:heading=\"text(config.note.title)\"\n\t\t\t\t\t\tdata-testid=\"cn-action-dialog-note\">\n\t\t\t\t\t\t<template v-if=\"config.note.icon\" #icon>\n\t\t\t\t\t\t\t<CnIcon class=\"cn-action-dialog__note-icon\" :name=\"config.note.icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ noteText }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t</template>\n\t\t\t</template>\n\n\t\t\t<p v-if=\"refusal\"\n\t\t\t\tclass=\"cn-action-dialog__error\"\n\t\t\t\trole=\"alert\"\n\t\t\t\tdata-testid=\"cn-action-dialog-refusal\">\n\t\t\t\t{{ refusal }}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<p v-else role=\"status\" data-testid=\"cn-action-dialog-done\">\n\t\t\t{{ answerText || text(doneTextOf) || t('nextcloud-vue', 'Done') }}\n\t\t</p>\n\n\t\t<template #actions>\n\t\t\t<NcButton :disabled=\"busy\" data-testid=\"cn-action-dialog-cancel\" @click=\"close\">\n\t\t\t\t{{ done ? t('nextcloud-vue', 'Close') : t('nextcloud-vue', 'Cancel') }}\n\t\t\t</NcButton>\n\t\t\t<NcButton v-if=\"!done\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t:disabled=\"!canConfirm\"\n\t\t\t\tdata-testid=\"cn-action-dialog-confirm\"\n\t\t\t\t@click=\"confirm\">\n\t\t\t\t<template v-if=\"confirmIcon\" #icon>\n\t\t\t\t\t<CnIcon :name=\"confirmIcon\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ confirmText }}\n\t\t\t</NcButton>\n\t\t</template>\n\t</CnDialog>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { emit } from '@nextcloud/event-bus'\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcButton, NcCheckboxRadioSwitch, NcNoteCard, NcSelect, NcTextArea, NcTextField } from '@nextcloud/vue'\nimport CheckCircle from 'vue-material-design-icons/CheckCircle.vue'\nimport CircleOutline from 'vue-material-design-icons/CircleOutline.vue'\nimport HelpCircleOutline from 'vue-material-design-icons/HelpCircleOutline.vue'\nimport CnFormField from '../CnFormField/CnFormField.vue'\nimport { fetchEndpointSource, interpolateUrlTokens } from '../../composables/useEndpointSource.js'\nimport { bodyValue, checksSent, chosenRequest, isFilled, isShown, matchingRows, optionsRead, pickCase, tickedTwice } from '../../utils/actionDialogForm.js'\nimport { BUILT_IN_FORMATTERS } from '../../utils/builtInFormatters.js'\nimport { fillTemplate, firstFilled } from '../../utils/fillTemplate.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { CnChoiceCards } from '../CnChoiceCards/index.js'\nimport { CnDialog } from '../CnDialog/index.js'\nimport { CnIcon } from '../CnIcon/index.js'\nimport { CnSearchSelect } from '../CnSearchSelect/index.js'\n\n/** How long typing rests before a search field searches, in ms. */\nconst SEARCH_DELAY = 250\n\n/** The page refresh channel the built-in widgets listen on. */\nconst PAGE_REFRESH = 'cn:page:refresh'\n\n/** Gives each dialog's reason field its own id. */\nlet reasonSeq = 0\n\n/**\n * CnActionDialog — the generic \"summary, checklist, reason, confirm\" dialog\n * for an act on a record, configured from the manifest (an `open-modal`\n * action's props), so an app does not hand-build each one. dossiq's archive\n * dialog (board DqArchiveren) is the first: the case, what its case type\n * keeps, a readiness checklist read from an endpoint, a reason, a read-only\n * note and Archive it.\n *\n * `config`:\n * - `title`, `subtitle`, `doneText`: texts, through the host translate;\n * `eyebrow` a template filled from the record (\"Close off · {identifier}\").\n * - `summary`: `{ source?, title, meta?, badge?, badgeVariant?, badgeColorMap?, icon? }`: templates filled from\n * the record (`source` an endpointSource to read it from, else `object`).\n * - `facts`: `[{ title?, items: [{ label, value }] }]`, `value` a template; a\n * `{path|<formatter>}` token reads through the built-in and app formatters.\n * - `checklist`: `{ title?, source, itemsPath?, labels?, required? }`: items\n * `{ id, met, label?, detail? }` read from `source`; `labels[id]` gives an\n * item's `{ label, detail?, unmetDetail? }`; the ids in `required` must be\n * met before the action can run. `met: null` reads as unknown.\n * - `permission`: `{ source, listPath?, match?, allowedPath, reasonPath? }`:\n * the action runs only while `allowedPath` reads true; `reasonPath` says\n * why not. With `listPath` the paths read the entry of that list whose\n * fields equal `match` (`{ act: \"archive\" }`).\n * - `fields`: `[{ field, type?: \"text\"|\"date\"|\"datetime\"|\"select\"|\"checkbox\", label?,\n * required?, options?: [{ value, label, fills? }], hint?, default? }]`: inputs\n * sent beside the reason, required by default; a select option's `fills`\n * sets other fields that are still empty. A `checkbox` is sent as a boolean,\n * starts at `default` (false), fills its `label` and `hint` from the record,\n * and is optional unless `required: true` (then it must be ticked). A\n * `search` field finds records of `source: { register, schema }` as the\n * reader types, shows each as `optionLabel` with `optionSecondary` under\n * it (templates on the found record), leaves the record in hand out with\n * `excludeSelf`, and sends the chosen record's id. Every field's `label`,\n * `hint` and `placeholder` (search and select) are templates filled from the record.\n * An optional select or text field (`required: false`) draws its label above\n * the control with \"(optional)\" after it. A `checks` field ticks several\n * items, listed in `options` or read off the record at `itemsPath`\n * (`optionValue`, `optionLabel` and `optionSecondary` name their parts),\n * starts on `default` (a list, or \"all\") and sends the ticked values as a\n * list; required means at least one. A `cards` field is one choice out of\n * `options` `[{ value, label, description? }]` drawn as cards, starting on\n * `default`.\n * - `reason`: `{ label?, hint?, required?, field?, rows? }`: a text area; required by\n * default; sent as `field` (default `reason`). `rows` is its height in lines\n * (default 2; board DqBesluit draws 4).\n * - `note`: `{ variant?, title?, text, icon? }`: a read-only note; `icon` an\n * icon name in place of the variant's own (\"LockOutline\").\n * - `fieldsAfterNote`: true draws the fields after the reason and the note\n * instead of before them (DqArchiveren's checkbox at the end).\n * - `confirm`: `{ label, icon?, request?: { method?, url, body?, answerPath? }, action? }`.\n * `request` posts itself (`body` templates filled with the record and\n * `{reason}`); `action` dispatches a manifest action through the page.\n * `answerPath` shows the text at that path of the answer once the act ran,\n * in place of `doneText` (a lookup that says what it found).\n *\n * - `source`: an endpointSource the record is read from, beside or in place\n * of `summary.source` (a policy a field's `visibleWhen` reads).\n * - A field's `visibleWhen`: `{ field | path, equals? | in? | includes? | filled? }`\n * shows the field only while another field's value (`field`) or a value of\n * the record (`path`) matches; a hidden field is not required and not sent.\n * The note takes `visibleWhen` too, and `note.textsBy: { field, cases }`\n * gives its text per chosen value.\n * - A select or checks field's `optionsSource`: an endpointSource (`url`,\n * `params`, `responsePath`) its options are read from, `match` keeping the\n * entries whose fields equal it, `search: true` reading again as the reader\n * types (the term under `searchParam`, default `_search`) and `errorText`\n * saying a failed read. `optionValue` (default `id`) and `optionLabel` (a\n * template, or a list of them, the first that fills) name each option.\n * - A checks field's `sendUnticked: true` sends the items left unticked, and\n * any field's `sendAs` sends its value under another key (\"ticked means\n * shared\" posted as `fieldExclusions`). `hideWhenEmpty` hides a checks field\n * with no items. `columns: [{ field, label }]` ticks each item once per\n * column, each column sent as its own list; `exclusive: true` refuses an\n * item ticked in two columns (`exclusiveText`).\n * - `requireOneOf`: field names of which at least one must hold a value.\n * - `confirm.requestsBy: { field, cases: { <value>: request } }` posts the\n * request of the chosen act, each with its own `url`, `method`, `body` and\n * optional `label`, `icon` and `doneText`. A body value that is one whole\n * token (`\"{fields.permission}\"`) sends the value as it is; `{fields.<key>}`\n * reads a sent value by the key it is sent under. `fieldsInBody: false`\n * sends only the body.\n *\n * Tokens (`@objectId`, `@object.<field>`) resolve in every url.\n */\nexport default {\n\tname: 'CnActionDialog',\n\n\tcomponents: { CheckCircle, CircleOutline, CnChoiceCards, CnDialog, CnFormField, CnIcon, CnSearchSelect, HelpCircleOutline, NcButton, NcCheckboxRadioSwitch, NcNoteCard, NcSelect, NcTextArea, NcTextField },\n\n\tinject: {\n\t\t/** The host app's translate (CnAppRoot `cnTranslate`). */\n\t\tcnTranslate: { default: () => (key) => key },\n\t\t/** The page's pre-bound action dispatcher (CnPageRenderer), for `confirm.action`. */\n\t\tcnDispatchAction: { default: null },\n\t\t/** The app's named formatters (CnAppRoot), for `{path|<formatter>}` in a template. */\n\t\tcnFormatters: { default: () => ({}) },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The dialog's configuration (see the component docs).\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tconfig: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** The record's id, for the `@objectId` token. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The record, when the host has it: the summary and facts read it.\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tobject: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['close', 'done'],\n\n\tdata() {\n\t\treturn {\n\t\t\trecord: this.object,\n\t\t\titems: [],\n\t\t\tchecklistError: '',\n\t\t\tallowed: true,\n\t\t\treason: '',\n\t\t\tvalues: {},\n\t\t\t/** A search field's found options, by field name. */\n\t\t\tsearchOptions: {},\n\t\t\t/** The search field whose search runs, or ''. */\n\t\t\tsearching: '',\n\t\t\t/** The entries an `optionsSource` gave, by field name. */\n\t\t\tremoteOptions: {},\n\t\t\t/** A failed `optionsSource` read in words, by field name. */\n\t\t\toptionsErrors: {},\n\t\t\t/** The field whose options are being read, or ''. */\n\t\t\tloadingOptions: '',\n\t\t\tbusy: false,\n\t\t\trefusal: '',\n\t\t\tdone: false,\n\t\t\tanswerText: '',\n\t\t\treasonId: `cn-action-dialog-reason-${++reasonSeq}`,\n\t\t\tfieldIdPrefix: `cn-action-dialog-field-${reasonSeq}`,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {object} The token context. */\n\t\ttokenCtx() {\n\t\t\treturn { objectId: this.recordId, object: this.record || {} }\n\t\t},\n\n\t\t/**\n\t\t * The record's id: `objectId`, or the route's `id` when the prop is\n\t\t * empty or a token the opener could not resolve.\n\t\t *\n\t\t * @return {string|number}\n\t\t */\n\t\trecordId() {\n\t\t\tconst given = this.objectId\n\t\t\tif (given !== '' && given !== null && given !== undefined && !String(given).startsWith('@')) {\n\t\t\t\treturn given\n\t\t\t}\n\t\t\treturn (this.$route && this.$route.params && this.$route.params.id) || ''\n\t\t},\n\n\t\t/** @return {object} The confirm config. */\n\t\tconfirmConfig() {\n\t\t\treturn this.config.confirm && typeof this.config.confirm === 'object' ? this.config.confirm : {}\n\t\t},\n\n\t\t/**\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-each-act-posts-to-its-own-endpoint\n\t\t * @return {object|null} The request the chosen act posts.\n\t\t */\n\t\trequest() {\n\t\t\treturn chosenRequest(this.confirmConfig, this.fieldValues)\n\t\t},\n\n\t\t/** @return {string} The confirm button's text: the chosen act's, else the config's. */\n\t\tconfirmText() {\n\t\t\treturn this.text(this.request?.label) || this.text(this.confirmConfig.label) || t('nextcloud-vue', 'Confirm')\n\t\t},\n\n\t\t/** @return {string} The confirm button's icon name, or ''. */\n\t\tconfirmIcon() {\n\t\t\treturn this.request?.icon || this.confirmConfig.icon || ''\n\t\t},\n\n\t\t/** @return {string} The done text: the chosen act's, else the config's. */\n\t\tdoneTextOf() {\n\t\t\treturn this.request?.doneText || this.config.doneText\n\t\t},\n\n\t\t/** @return {{values: object, record: (object|null)}} What a `visibleWhen` reads. */\n\t\tshownState() {\n\t\t\treturn { values: this.fieldValues, record: this.record }\n\t\t},\n\n\t\t/**\n\t\t * The fields that show: their `visibleWhen` holds, and a checks field\n\t\t * with `hideWhenEmpty` has items.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-a-field-shows-only-when-another-value-says-so\n\t\t * @return {Array<object>}\n\t\t */\n\t\tshownFields() {\n\t\t\treturn this.fields.filter((field) => this.fieldShown(field, 0) && !(field.hideWhenEmpty === true && this.checkItems(field).length === 0))\n\t\t},\n\n\t\t/** @return {boolean} Whether the note shows. */\n\t\tnoteShown() {\n\t\t\treturn isShown(this.config.note, this.shownState)\n\t\t},\n\n\t\t/** @return {string} The note's text: the case of `textsBy` the chosen value names, else `text`. */\n\t\tnoteText() {\n\t\t\tconst picked = pickCase(this.config.note && this.config.note.textsBy, this.fieldValues)\n\t\t\treturn this.text(typeof picked === 'string' ? picked : this.config.note.text)\n\t\t},\n\n\t\t/**\n\t\t * The values sent: the shown fields only, each under its `sendAs`, a\n\t\t * checks field with `sendUnticked` as the items left unticked and one\n\t\t * with `columns` as a list per column.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-ticked-can-mean-left-out\n\t\t * @return {object}\n\t\t */\n\t\tsentValues() {\n\t\t\tconst out = {}\n\t\t\tfor (const field of this.shownFields) {\n\t\t\t\tObject.assign(out, this.sentOf(field))\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/**\n\t\t * The summary row, or null without one or before the record is known.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog/specs/action-dialog/spec.md#requirement-a-manifest-configures-an-action-dialog\n\t\t * @return {{title: string, meta: string, badge: string}|null}\n\t\t */\n\t\tsummary() {\n\t\t\tconst def = this.config.summary\n\t\t\tif (!def || !this.record) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst title = this.fill(def.title)\n\t\t\tconst badge = this.fill(def.badge)\n\t\t\tconst variants = ['default', 'success', 'warning', 'error', 'info', 'purple', 'teal']\n\t\t\tconst mapped = def.badgeColorMap && typeof def.badgeColorMap === 'object' ? def.badgeColorMap[badge] : undefined\n\t\t\tconst wanted = mapped || def.badgeVariant\n\t\t\tconst badgeVariant = variants.includes(wanted) ? wanted : ''\n\t\t\treturn title ? { title, meta: this.fill(def.meta), badge, badgeVariant } : null\n\t\t},\n\n\t\t/** @return {Array<string>} The order of the fields, the reason and the note. */\n\t\tbodyParts() {\n\t\t\treturn this.config.fieldsAfterNote === true ? ['reason', 'note', 'fields'] : ['fields', 'reason', 'note']\n\t\t},\n\n\t\t/** @return {Array<{title: string, facts: Array<{label: string, value: string}>}>} The fact groups. */\n\t\tfactSections() {\n\t\t\tif (!Array.isArray(this.config.facts) || !this.record) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tconst empty = t('nextcloud-vue', 'Not set')\n\t\t\treturn this.config.facts.map((section) => ({\n\t\t\t\ttitle: this.text(section.title),\n\t\t\t\tfacts: (Array.isArray(section.items) ? section.items : []).map((fact) => ({ label: this.text(fact.label), value: this.fill(fact.value) || empty })),\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * The checklist rows: label and detail from `labels` by id, else the item's own.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog/specs/action-dialog/spec.md#requirement-a-manifest-configures-an-action-dialog\n\t\t * @return {Array<{id: string, met: (boolean|null), label: string, detail: string}>}\n\t\t */\n\t\tchecklist() {\n\t\t\tconst labels = (this.config.checklist && this.config.checklist.labels) || {}\n\t\t\treturn this.items.map((item) => {\n\t\t\t\tconst met = item.met === null || item.met === undefined ? null : item.met === true\n\t\t\t\tconst own = labels[item.id] || {}\n\t\t\t\tconst detail = met === false && own.unmetDetail ? own.unmetDetail : (own.detail || item.detail || '')\n\t\t\t\treturn {\n\t\t\t\t\tid: String(item.id),\n\t\t\t\t\tmet,\n\t\t\t\t\tlabel: this.fill(own.label || item.label || String(item.id), item),\n\t\t\t\t\tdetail: met === null && !item.detail ? t('nextcloud-vue', 'Could not be read') : this.fill(detail, item),\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\t/** @return {boolean} Whether every required item is met. */\n\t\trequiredMet() {\n\t\t\tconst required = (this.config.checklist && Array.isArray(this.config.checklist.required)) ? this.config.checklist.required.map(String) : []\n\t\t\treturn required.every((id) => this.items.some((item) => String(item.id) === id && item.met === true))\n\t\t},\n\n\t\t/** @return {boolean} Whether a reason is asked and needed. */\n\t\treasonNeeded() {\n\t\t\treturn Boolean(this.config.reason) && this.config.reason.required !== false\n\t\t},\n\n\t\t/** @return {string} The reason field's label. */\n\t\treasonLabel() {\n\t\t\treturn this.text(this.config.reason && this.config.reason.label) || t('nextcloud-vue', 'Reason')\n\t\t},\n\n\t\t/** @return {string} The note's NcNoteCard type. */\n\t\tnoteType() {\n\t\t\tconst variant = this.config.note && this.config.note.variant\n\t\t\treturn ['info', 'warning', 'error', 'success'].includes(variant) ? variant : 'info'\n\t\t},\n\n\t\t/**\n\t\t * Whether the action may run: allowed, required items met, a reason\n\t\t * when one is needed, and nothing in flight.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog/specs/action-dialog/spec.md#requirement-a-manifest-configures-an-action-dialog\n\t\t * @return {boolean}\n\t\t */\n\t\tcanConfirm() {\n\t\t\treturn !this.busy && this.allowed && this.requiredMet && this.fieldsFilled && (!this.reasonNeeded || this.reason.trim() !== '')\n\t\t},\n\n\t\t/** @return {string} The eyebrow, filled from the record once it is known. */\n\t\teyebrowText() {\n\t\t\treturn this.record ? this.fill(this.config.eyebrow) || this.text(this.config.eyebrow) : this.text(this.config.eyebrow)\n\t\t},\n\n\t\t/**\n\t\t * The value of every field as sent: a checkbox as a boolean, the\n\t\t * others as entered ('' when empty).\n\t\t *\n\t\t * @return {object} Values by field name.\n\t\t */\n\t\tfieldValues() {\n\t\t\tconst out = { ...this.values }\n\t\t\tfor (const field of this.fields) {\n\t\t\t\tObject.assign(out, this.heldValues(field))\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/** @return {Array<object>} The fields with a name. */\n\t\tfields() {\n\t\t\treturn (Array.isArray(this.config.fields) ? this.config.fields : []).filter((f) => f && f.field)\n\t\t},\n\n\t\t/**\n\t\t * Whether every required field has a value.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-fields-and-acts/specs/action-dialog/spec.md#requirement-an-action-dialog-asks-for-fields-and-reads-a-permission-from-a-list\n\t\t * @return {boolean}\n\t\t */\n\t\tfieldsFilled() {\n\t\t\treturn this.oneOfFilled && this.shownFields.every((f) => this.conflicts(f).length === 0 && this.fieldFilled(f))\n\t\t},\n\n\t\t/**\n\t\t * Whether one of the fields `requireOneOf` names holds a value.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-a-checks-field-can-tick-in-columns-that-exclude-each-other\n\t\t * @return {boolean}\n\t\t */\n\t\toneOfFilled() {\n\t\t\tconst names = Array.isArray(this.config.requireOneOf) ? this.config.requireOneOf : []\n\t\t\treturn names.length === 0 || names.some((name) => isFilled(this.sentValues[name]))\n\t\t},\n\t},\n\n\twatch: {\n\t\trecord: {\n\t\t\thandler() {\n\t\t\t\tthis.startValues()\n\t\t\t},\n\n\t\t\timmediate: true,\n\t\t},\n\t},\n\n\tasync mounted() {\n\t\tawait Promise.all([this.loadRecord(), this.loadChecklist(), this.loadPermission(), ...this.fields.map((field) => this.loadOptions(field, ''))])\n\t},\n\n\tbeforeUnmount() {\n\t\tclearTimeout(this.searchTimer)\n\t\tclearTimeout(this.optionsTimer)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Whether a field's label sits above its control with \"(optional)\" after\n\t\t * it: a select or a text field the action does not require.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-optional-fields/specs/action-dialog/spec.md#requirement-an-optional-field-says-so-beside-its-label\n\t\t * @param {object} field The field.\n\t\t * @return {boolean}\n\t\t */\n\t\tlabelsOutside(field) {\n\t\t\treturn field.required === false && !['checkbox', 'search', 'secret', 'checks', 'cards'].includes(field.type)\n\t\t},\n\n\t\t/**\n\t\t * The id of a field's control, which its outside label points at.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {string}\n\t\t */\n\t\tcontrolId(field) {\n\t\t\treturn `${this.fieldIdPrefix}-${field.field}`\n\t\t},\n\n\t\tt,\n\n\t\t/**\n\t\t * A config text through the host translate, '' for anything else.\n\t\t *\n\t\t * @param {unknown} value The text.\n\t\t * @return {string}\n\t\t */\n\t\t/**\n\t\t * Search a search field's records once typing rests.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @param {string} typed What the reader typed.\n\t\t * @return {void}\n\t\t * @spec openspec/changes/action-dialog-search-field/specs/action-dialog-search-field/spec.md#requirement-an-action-dialog-field-can-search-records\n\t\t */\n\t\tonSearch(field, typed) {\n\t\t\tclearTimeout(this.searchTimer)\n\t\t\tthis.searchTimer = setTimeout(() => this.searchRecords(field, String(typed || '').trim()), SEARCH_DELAY)\n\t\t},\n\n\t\t/**\n\t\t * Read the records of a search field's `source` that match the term.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @param {string} term The term.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync searchRecords(field, term) {\n\t\t\tconst source = field.source || {}\n\t\t\tif (!term || !source.register || !source.schema) {\n\t\t\t\tthis.searchOptions = { ...this.searchOptions, [field.field]: [] }\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.searching = field.field\n\t\t\ttry {\n\t\t\t\tconst url = generateUrl(`/apps/openregister/api/objects/${encodeURIComponent(source.register)}/${encodeURIComponent(source.schema)}`)\n\t\t\t\tconst { data } = await axios.get(url, { params: { _search: term, _limit: 10 } })\n\t\t\t\tconst rows = Array.isArray(data) ? data : (data && Array.isArray(data.results) ? data.results : [])\n\t\t\t\tconst self = String(this.recordId || '')\n\t\t\t\tconst options = rows\n\t\t\t\t\t.map((row) => ({ row, id: String(row.id || (row['@self'] && row['@self'].id) || '') }))\n\t\t\t\t\t.filter(({ id }) => id !== '' && !(field.excludeSelf && id === self))\n\t\t\t\t\t.map(({ row, id }) => {\n\t\t\t\t\t\tconst option = { id, label: this.fill(field.optionLabel || '{title}', row) || id }\n\t\t\t\t\t\tconst secondary = this.fill(field.optionSecondary, row)\n\t\t\t\t\t\treturn secondary ? { ...option, secondary } : option\n\t\t\t\t\t})\n\t\t\t\tthis.searchOptions = { ...this.searchOptions, [field.field]: options }\n\t\t\t} catch {\n\t\t\t\tthis.searchOptions = { ...this.searchOptions, [field.field]: [] }\n\t\t\t} finally {\n\t\t\t\tthis.searching = ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The items of a checks field, from `options` or the record's `itemsPath`.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-checks-cards/specs/action-dialog-checks-cards/spec.md#requirement-a-field-ticks-several-items\n\t\t * @param {object} field The field.\n\t\t * @return {Array<{value: string, label: string, secondary: string}>}\n\t\t */\n\t\tcheckItems(field) {\n\t\t\tconst listed = field.optionsSource ? this.remoteOptions[field.field] : (Array.isArray(field.options) ? field.options : readPath(this.record || {}, field.itemsPath || ''))\n\t\t\treturn (Array.isArray(listed) ? listed : []).map((item) => {\n\t\t\t\tif (item === null || typeof item !== 'object') {\n\t\t\t\t\treturn { value: String(item), label: String(item), secondary: '' }\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tvalue: String(readPath(item, field.optionValue || 'value') ?? item.id ?? ''),\n\t\t\t\t\tlabel: firstFilled(field.optionLabel || ['{label}', '{name}', '{title}'], item),\n\t\t\t\t\tsecondary: field.optionSecondary ? fillTemplate(field.optionSecondary, item) : '',\n\t\t\t\t}\n\t\t\t}).filter((item) => item.value !== '')\n\t\t},\n\n\t\t/**\n\t\t * The ticked values of a checks field: what the reader ticked, else its\n\t\t * `default`, a list or \"all\".\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-checks-cards/specs/action-dialog-checks-cards/spec.md#requirement-a-field-ticks-several-items\n\t\t * @param {object} field The field.\n\t\t * @return {Array<string>}\n\t\t */\n\t\tchecksValue(field) {\n\t\t\tif (Array.isArray(this.values[field.field])) {\n\t\t\t\treturn this.values[field.field]\n\t\t\t}\n\t\t\tif (field.default === 'all') {\n\t\t\t\treturn this.checkItems(field).map((item) => item.value)\n\t\t\t}\n\t\t\treturn Array.isArray(field.default) ? field.default.map(String) : []\n\t\t},\n\n\t\t/**\n\t\t * Tick or untick one item of a checks field.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @param {string} value The item's value.\n\t\t * @param {boolean} on Ticked.\n\t\t * @return {void}\n\t\t */\n\t\tsetCheck(field, value, on) {\n\t\t\tconst others = this.checksValue(field).filter((held) => held !== value)\n\t\t\tthis.values = { ...this.values, [field.field]: on ? [...others, value] : others }\n\t\t},\n\n\t\t/**\n\t\t * The options of a cards field, through the host translate.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-checks-cards/specs/action-dialog-checks-cards/spec.md#requirement-a-field-offers-one-choice-as-cards\n\t\t * @param {object} field The field.\n\t\t * @return {Array<object>}\n\t\t */\n\t\tcardOptions(field) {\n\t\t\treturn (Array.isArray(field.options) ? field.options : []).map((option) => ({\n\t\t\t\t...option,\n\t\t\t\tlabel: this.text(option.label) || String(option.value),\n\t\t\t\tdescription: this.text(option.description),\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * The value of a cards field: what the reader chose, else its `default`.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {string}\n\t\t */\n\t\tcardsValue(field) {\n\t\t\treturn this.values[field.field] ?? field.default ?? ''\n\t\t},\n\n\t\t/**\n\t\t * A checkbox field's state: what was ticked, else its `default`.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {boolean}\n\t\t * @spec openspec/changes/action-dialog-checkbox-field/specs/action-dialog-checkbox-field/spec.md#requirement-an-action-dialog-field-can-be-a-checkbox\n\t\t */\n\t\tcheckboxValue(field) {\n\t\t\treturn field.field in this.values ? this.values[field.field] === true : field.default === true\n\t\t},\n\n\t\t/**\n\t\t * Tick or untick a checkbox field.\n\t\t *\n\t\t * @param {string} name The field.\n\t\t * @param {boolean} on Ticked.\n\t\t * @return {void}\n\t\t */\n\t\tsetChecked(name, on) {\n\t\t\tthis.values = { ...this.values, [name]: on === true }\n\t\t},\n\n\t\ttext(value) {\n\t\t\treturn typeof value === 'string' && value !== '' ? this.cnTranslate(value) : ''\n\t\t},\n\n\t\t/**\n\t\t * A template filled from a row (the record by default), translated first.\n\t\t *\n\t\t * @param {unknown} template The template.\n\t\t * @param {object} [row] The row.\n\t\t * @return {string}\n\t\t */\n\t\tfill(template, row) {\n\t\t\tif (typeof template !== 'string' || template === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst formatters = { ...BUILT_IN_FORMATTERS, ...(this.cnFormatters || {}) }\n\t\t\treturn fillTemplate(this.cnTranslate(template), row || this.record || {}, new Date(), { formatters }).trim()\n\t\t},\n\n\t\t/**\n\t\t * Read an endpoint, fresh.\n\t\t *\n\t\t * @param {object} source An endpointSource block.\n\t\t * @return {Promise<unknown>}\n\t\t */\n\t\tread(source) {\n\t\t\treturn fetchEndpointSource(source, this.tokenCtx, { fresh: true })\n\t\t},\n\n\t\t/** @return {Promise<void>} */\n\t\tasync loadRecord() {\n\t\t\tconst source = this.config.source || (this.config.summary && this.config.summary.source)\n\t\t\tif (!source || !source.url) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst data = await this.read(source)\n\t\t\t\tthis.record = data && typeof data === 'object' ? data : this.record\n\t\t\t} catch {\n\t\t\t\t// The summary stays empty; the checklist and the action still work.\n\t\t\t}\n\t\t},\n\n\t\t/** @return {Promise<void>} */\n\t\tasync loadChecklist() {\n\t\t\tconst def = this.config.checklist\n\t\t\tif (!def || !def.source || !def.source.url) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst data = await this.read(def.source)\n\t\t\t\tconst list = def.itemsPath ? readPath(data, def.itemsPath) : data\n\t\t\t\tthis.items = Array.isArray(list) ? list.filter((item) => item && item.id !== undefined) : []\n\t\t\t} catch {\n\t\t\t\tthis.items = []\n\t\t\t\tthis.checklistError = t('nextcloud-vue', 'Whether this is ready could not be read.')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The entry of a list whose fields equal `match`, or null.\n\t\t *\n\t\t * @param {unknown} list The list.\n\t\t * @param {object} [match] The fields to match.\n\t\t * @return {object|null}\n\t\t */\n\t\tmatchIn(list, match) {\n\t\t\tconst wanted = Object.entries(match || {})\n\t\t\treturn (Array.isArray(list) ? list : []).find((entry) => entry && wanted.every(([key, value]) => String(entry[key]) === String(value))) || null\n\t\t},\n\n\t\t/**\n\t\t * A select field's options, labels translated.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {Array<{id: string, label: string, fills?: object}>}\n\t\t */\n\t\toptionsOf(field) {\n\t\t\tif (field.optionsSource) {\n\t\t\t\treturn this.remoteOptionsOf(field)\n\t\t\t}\n\t\t\treturn (Array.isArray(field.options) ? field.options : []).map((o) => ({ id: String(o.value), label: this.text(o.label) || String(o.value), fills: o.fills }))\n\t\t},\n\n\t\t/**\n\t\t * A select field's options read from its `optionsSource`: each entry's\n\t\t * `optionValue` (default `id`) and the first `optionLabel` that fills.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-a-field-reads-its-options-from-an-endpoint\n\t\t * @param {object} field The field.\n\t\t * @return {Array<{id: string, label: string}>}\n\t\t */\n\t\tremoteOptionsOf(field) {\n\t\t\tconst labels = field.optionLabel || ['{label}', '{name}', '{title}']\n\t\t\treturn (this.remoteOptions[field.field] || [])\n\t\t\t\t.map((row) => ({ id: String(readPath(row, field.optionValue || 'id') ?? ''), row }))\n\t\t\t\t.filter((option) => option.id !== '')\n\t\t\t\t.map(({ id, row }) => ({ id, label: firstFilled(labels, row, this.cnTranslate) || id }))\n\t\t},\n\n\t\t/**\n\t\t * Whether a field's `visibleWhen` holds, and the field it reads (if any)\n\t\t * shows too, so hiding one field hides the fields that depend on it.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-a-field-shows-only-when-another-value-says-so\n\t\t * @param {object} field The field.\n\t\t * @param {number} depth How many fields deep the check is, to stop a loop.\n\t\t * @return {boolean}\n\t\t */\n\t\tfieldShown(field, depth) {\n\t\t\tif (!isShown(field, this.shownState)) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst parent = this.parentOf(field)\n\t\t\treturn !parent || (depth < 8 && this.fieldShown(parent, depth + 1))\n\t\t},\n\n\t\t/**\n\t\t * The field another field's `visibleWhen` reads, or null.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {object|null}\n\t\t */\n\t\tparentOf(field) {\n\t\t\tconst name = field.visibleWhen && field.visibleWhen.field\n\t\t\treturn typeof name === 'string' ? (this.fields.find((other) => other.field === name) || null) : null\n\t\t},\n\n\t\t/**\n\t\t * A field's value by key: a checkbox as a boolean, a checks field as a\n\t\t * list (one per column with `columns`), the others as entered.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {object}\n\t\t */\n\t\theldValues(field) {\n\t\t\tif (this.hasColumns(field)) {\n\t\t\t\treturn Object.fromEntries(field.columns.map((column) => [column.field, this.columnValue(column)]))\n\t\t\t}\n\t\t\tconst read = { checks: this.checksValue, cards: this.cardsValue, checkbox: this.checkboxValue }[field.type] || this.plainValue\n\t\t\treturn { [field.field]: read(field) }\n\t\t},\n\n\t\t/**\n\t\t * Whether a shown field holds what it needs: a checkbox is ticked when\n\t\t * `required: true`; any other field has a value unless `required: false`\n\t\t * or a secret is stored.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-fields-and-acts/specs/action-dialog/spec.md#requirement-an-action-dialog-asks-for-fields-and-reads-a-permission-from-a-list\n\t\t * @param {object} field The field.\n\t\t * @return {boolean}\n\t\t */\n\t\tfieldFilled(field) {\n\t\t\tif (field.type === 'checkbox') {\n\t\t\t\treturn field.required !== true || this.checkboxValue(field)\n\t\t\t}\n\t\t\tif (field.required === false || this.secretStored(field)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tconst held = Object.values(this.heldValues(field))\n\t\t\treturn this.hasColumns(field) ? held.some(isFilled) : isFilled(held[0])\n\t\t},\n\n\t\t/**\n\t\t * A select or text field's value: what was entered, else its `default`.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {string}\n\t\t */\n\t\tplainValue(field) {\n\t\t\tif (field.field in this.values) {\n\t\t\t\treturn this.values[field.field] ?? ''\n\t\t\t}\n\t\t\treturn field.type === 'select' && field.default !== undefined ? String(field.default) : ''\n\t\t},\n\n\t\t/**\n\t\t * Whether a select field reads its options again as the reader types.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {boolean}\n\t\t */\n\t\tsearchesRemotely(field) {\n\t\t\treturn Boolean(field.optionsSource && field.optionsSource.search === true)\n\t\t},\n\n\t\t/**\n\t\t * Read a searching select field's options again once typing rests.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @param {string} typed What the reader typed.\n\t\t * @return {void}\n\t\t */\n\t\tonOptionsSearch(field, typed) {\n\t\t\tif (!this.searchesRemotely(field)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tclearTimeout(this.optionsTimer)\n\t\t\tthis.optionsTimer = setTimeout(() => this.loadOptions(field, String(typed || '').trim()), SEARCH_DELAY)\n\t\t},\n\n\t\t/**\n\t\t * Read a field's `optionsSource`, keep the entries `match` allows, and\n\t\t * say so when the read fails rather than offer an empty list.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-a-field-reads-its-options-from-an-endpoint\n\t\t * @param {object} field The field.\n\t\t * @param {string} term What the reader typed, or ''.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadOptions(field, term) {\n\t\t\tconst source = field.optionsSource\n\t\t\tif (!source || !source.url) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.loadingOptions = field.field\n\t\t\ttry {\n\t\t\t\tconst rows = matchingRows(await this.read(optionsRead(source, term)), source.match)\n\t\t\t\tthis.remoteOptions = { ...this.remoteOptions, [field.field]: rows }\n\t\t\t\tthis.optionsErrors = { ...this.optionsErrors, [field.field]: '' }\n\t\t\t} catch {\n\t\t\t\tthis.optionsErrors = { ...this.optionsErrors, [field.field]: this.text(source.errorText) || t('nextcloud-vue', 'The options could not be read.') }\n\t\t\t} finally {\n\t\t\t\tthis.loadingOptions = ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Whether a checks field ticks per column.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {boolean}\n\t\t */\n\t\thasColumns(field) {\n\t\t\treturn field.type === 'checks' && Array.isArray(field.columns) && field.columns.length > 0\n\t\t},\n\n\t\t/**\n\t\t * The values ticked in one column of a checks field; nothing is ticked\n\t\t * at the start.\n\t\t *\n\t\t * @param {{field: string}} column The column.\n\t\t * @return {Array<string>}\n\t\t */\n\t\tcolumnValue(column) {\n\t\t\treturn Array.isArray(this.values[column.field]) ? this.values[column.field] : []\n\t\t},\n\n\t\t/**\n\t\t * The items of an `exclusive` checks field ticked in more than one column.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-a-checks-field-can-tick-in-columns-that-exclude-each-other\n\t\t * @param {object} field The field.\n\t\t * @return {Array<string>}\n\t\t */\n\t\tconflicts(field) {\n\t\t\treturn this.hasColumns(field) && field.exclusive === true ? tickedTwice(field.columns, this.values) : []\n\t\t},\n\n\t\t/**\n\t\t * What one shown field sends, by key.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-ticked-can-mean-left-out\n\t\t * @param {object} field The field.\n\t\t * @return {object}\n\t\t */\n\t\tsentOf(field) {\n\t\t\tif (this.hasColumns(field)) {\n\t\t\t\treturn this.heldValues(field)\n\t\t\t}\n\t\t\tif (field.type === 'secret' && String(this.values[field.field] ?? '') === '') {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t\tconst value = field.type === 'checks'\n\t\t\t\t? checksSent(field, { ticked: this.checksValue(field), items: this.checkItems(field) })\n\t\t\t\t: this.fieldValues[field.field]\n\t\t\treturn { [field.sendAs || field.field]: value }\n\t\t},\n\n\t\t/**\n\t\t * A select field's chosen option.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {object|null}\n\t\t */\n\t\tselectedOption(field) {\n\t\t\treturn this.optionsOf(field).find((o) => o.id === String(this.plainValue(field))) || null\n\t\t},\n\n\t\t/**\n\t\t * Set a field's value.\n\t\t *\n\t\t * @param {string} name The field.\n\t\t * @param {unknown} value The value.\n\t\t */\n\t\tsetValue(name, value) {\n\t\t\tthis.values = { ...this.values, [name]: value === null || value === undefined ? '' : String(value) }\n\t\t},\n\n\t\t/**\n\t\t * Choose a select option; its `fills` set the fields still empty.\n\t\t *\n\t\t * @param {object} field The select field.\n\t\t * @param {{id: string, fills?: object}|null} option The option.\n\t\t */\n\t\tpick(field, option) {\n\t\t\tthis.setValue(field.field, option ? option.id : '')\n\t\t\tfor (const [name, value] of Object.entries((option && option.fills) || {})) {\n\t\t\t\tif (String(this.values[name] ?? '').trim() === '') {\n\t\t\t\t\tthis.setValue(name, this.text(value) || value)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/** @return {Promise<void>} */\n\t\tasync loadPermission() {\n\t\t\tconst def = this.config.permission\n\t\t\tif (!def || !def.source || !def.source.url) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst data = await this.read(def.source)\n\t\t\t\tconst entry = def.listPath ? this.matchIn(readPath(data, def.listPath), def.match) : data\n\t\t\t\tthis.allowed = readPath(entry, def.allowedPath || 'allowed') === true\n\t\t\t\tthis.refusal = this.allowed || !def.reasonPath ? '' : String(readPath(entry, def.reasonPath) || '')\n\t\t\t} catch {\n\t\t\t\tthis.allowed = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Run the action once: post `confirm.request`, or dispatch\n\t\t * `confirm.action`, then show the done text and refresh the page.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog/specs/action-dialog/spec.md#requirement-a-manifest-configures-an-action-dialog\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync confirm() {\n\t\t\tif (!this.canConfirm) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.busy = true\n\t\t\tthis.refusal = ''\n\t\t\ttry {\n\t\t\t\tawait this.runAct(this.reason.trim())\n\t\t\t\tthis.done = true\n\t\t\t\temit(PAGE_REFRESH, {})\n\t\t\t\t/** @event done The action ran. Payload: the sent field values and `reason`. */\n\t\t\t\tthis.$emit('done', { ...this.sentValues, reason: this.reason.trim() })\n\t\t\t} catch (failure) {\n\t\t\t\tconst data = failure && failure.response && failure.response.data\n\t\t\t\tthis.refusal = String((data && (data.message || data.error)) || t('nextcloud-vue', 'The action could not be completed.'))\n\t\t\t} finally {\n\t\t\t\tthis.busy = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Post the chosen act's request, or dispatch `confirm.action`.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-each-act-posts-to-its-own-endpoint\n\t\t * @param {string} reason The reason given.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync runAct(reason) {\n\t\t\tconst request = this.request\n\t\t\tif (request && request.url) {\n\t\t\t\tawait this.post(request, reason)\n\t\t\t} else if (this.confirmConfig.action && typeof this.cnDispatchAction === 'function') {\n\t\t\t\tawait this.cnDispatchAction({ ...this.confirmConfig.action, args: [...(this.confirmConfig.action.args || []), { ...this.sentValues, reason }] })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Send one request and keep the text at its `answerPath`.\n\t\t *\n\t\t * @param {object} request The request.\n\t\t * @param {string} reason The reason given.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync post(request, reason) {\n\t\t\tconst url = interpolateUrlTokens(request.url, this.tokenCtx)\n\t\t\tconst method = String(request.method || 'POST').toLowerCase()\n\t\t\tconst send = axios[['post', 'put', 'patch', 'delete'].includes(method) ? method : 'post']\n\t\t\tconst answer = await send(/^https?:\\/\\//i.test(url) ? url : generateUrl(url), this.requestBody(request, reason))\n\t\t\tif (request.answerPath) {\n\t\t\t\tconst said = readPath(answer?.data, request.answerPath)\n\t\t\t\tthis.answerText = said === null || said === undefined ? '' : String(said)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * A request's body: its `body` templates filled from the record, the\n\t\t * reason and `fields`, then the reason and the sent field values unless\n\t\t * `fieldsInBody` is false.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-each-act-posts-to-its-own-endpoint\n\t\t * @param {object} request The request.\n\t\t * @param {string} reason The reason given.\n\t\t * @return {object}\n\t\t */\n\t\trequestBody(request, reason) {\n\t\t\tconst filler = { context: { fields: this.sentValues, ...(this.record || {}), reason }, fill: (value, context) => fillTemplate(value, context) }\n\t\t\tconst body = {}\n\t\t\tfor (const [key, value] of Object.entries(request.body || {})) {\n\t\t\t\tbody[key] = bodyValue(value, filler)\n\t\t\t}\n\t\t\tif (request.fieldsInBody === false) {\n\t\t\t\treturn body\n\t\t\t}\n\t\t\tif (this.config.reason) {\n\t\t\t\tbody[this.config.reason.field || 'reason'] = reason\n\t\t\t}\n\t\t\treturn Object.assign(body, this.sentValues)\n\t\t},\n\n\t\t/**\n\t\t * Start each field with `valuePath` from the record, unless it was\n\t\t * already edited.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-secret-field/specs/action-dialog/spec.md#requirement-a-field-can-start-from-the-record-and-a-secret-is-write-only\n\t\t * @return {void}\n\t\t */\n\t\tstartValues() {\n\t\t\tif (!this.record) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst values = { ...this.values }\n\t\t\tfor (const field of this.fields) {\n\t\t\t\tif (field.valuePath && !['secret', 'checks'].includes(field.type) && !(field.field in values)) {\n\t\t\t\t\tconst value = readPath(this.record, field.valuePath)\n\t\t\t\t\tif (value !== null && value !== undefined) {\n\t\t\t\t\t\tvalues[field.field] = String(value)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.values = values\n\t\t},\n\n\t\t/**\n\t\t * Whether a secret field has a value stored: `storedPath` reads true on the record.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {boolean}\n\t\t */\n\t\tsecretStored(field) {\n\t\t\treturn field.type === 'secret' && Boolean(field.storedPath && this.record && readPath(this.record, field.storedPath))\n\t\t},\n\n\t\t/** Close the dialog, unless the action is running. */\n\t\tclose() {\n\t\t\tif (this.busy) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t/** @event close The dialog was closed. */\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* The parts stand 18px apart, as the board draws the dialog (DqArchiveren). */\n.cn-action-dialog {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 18px;\n}\n\n.cn-action-dialog__summary {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 12px;\n\tpadding: 12px 14px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-large, 10px);\n}\n\n/* The record's icon on a tinted tile (DqArchiveren). */\n.cn-action-dialog__summary-icon {\n\tdisplay: flex;\n\tflex: none;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 36px;\n\theight: 36px;\n\tborder-radius: 8px;\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n}\n\n.cn-action-dialog__summary-text strong {\n\tfont-size: 15px;\n\tfont-weight: 600;\n\tline-height: 1.2;\n}\n\n.cn-action-dialog__summary-text .cn-action-dialog__muted {\n\tfont-size: 13px;\n}\n\n.cn-action-dialog__summary-text {\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\tflex-direction: column;\n\tmin-width: 0;\n}\n\n.cn-action-dialog__badge {\n\tpadding: 3px 10px;\n\tborder-radius: 12px;\n\tfont-size: 13px;\n\tfont-weight: 600;\n\tline-height: normal;\n\twhite-space: nowrap;\n}\n\n/* Without a tone (`badgeVariant`, `badgeColorMap`) the badge is neutral. */\n.cn-action-dialog__badge:not([class*='cn-status-badge--']) {\n\tbackground: var(--color-background-dark);\n}\n\n.cn-action-dialog__title {\n\tmargin: 0 0 8px;\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tline-height: normal;\n}\n\n/* Facts in columns of at least 200px, each a label over its value above a\n hairline, both on the font's normal line (DqArchiveren \"Bewaring volgens\n het zaaktype\", rows 59px). */\n.cn-action-dialog__facts {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\tgap: 12px 24px;\n\tmargin: 0;\n\t/* The server pads every dl 12px. */\n\tpadding: 0;\n}\n\n.cn-action-dialog__fact {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 3px;\n\tpadding-bottom: 10px;\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n/* The server draws every dt as a 130px right-aligned inline block and pads\n dt and dd 12px; a fact is a label over its value. */\n.cn-action-dialog__facts dt,\n.cn-action-dialog__facts dd {\n\tdisplay: block;\n\twidth: auto;\n\twhite-space: normal;\n\ttext-align: start;\n}\n\n.cn-action-dialog__facts dt {\n\tmargin: 0;\n\tpadding: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n\tline-height: normal;\n}\n\n.cn-action-dialog__facts dd {\n\tmargin: 0;\n\tpadding: 0;\n\tfont-size: 15px;\n\tfont-weight: 500;\n\tline-height: normal;\n}\n\n/* Checklist rows divided by hairlines, the detail at the row's end\n (DqArchiveren \"Klaar om te archiveren\"). */\n.cn-action-dialog__checks {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-action-dialog__check {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 2px 12px;\n\tpadding: 10px 0;\n\tborder-top: 1px solid var(--color-border);\n\tfont-size: 15px;\n}\n\n.cn-action-dialog__check-label {\n\tflex: 1 1 auto;\n\tfont-weight: 600;\n}\n\n.cn-action-dialog__check-icon {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-action-dialog__check-icon--met {\n\tcolor: var(--color-success-text, var(--color-success));\n}\n\n.cn-action-dialog__muted {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 14px;\n}\n\n/* A checkbox field is a tinted box with a 2px edge, its label bold and its\n hint under it (DqArchiveren). */\n/* A note's own icon stands on the heading's line, as the variant's icon\n does (NcNoteCard centres a slotted icon on the whole note). */\n.cn-action-dialog__note-icon {\n\talign-self: flex-start;\n\tmargin-top: 1px;\n}\n\n/* Two classes: the switch root's own `padding: 0` weighs the same and is\n injected again by every bundle that ships NcCheckboxRadioSwitch. */\n.cn-action-dialog__checkbox.checkbox-radio-switch {\n\tpadding: 12px 14px;\n}\n\n.cn-action-dialog__checkbox {\n\tborder: 2px solid var(--color-primary-element);\n\tborder-radius: var(--border-radius-element, 8px);\n\tbackground: var(--color-main-background);\n}\n\n/* The box sits at the card's inset, 12px before the label, the label on\n its first line (DqArchiveren \"Sanne de Vries laten weten ...\"):\n NcCheckboxRadioSwitch pads its row and centres a 34px target. */\n.cn-action-dialog__checkbox :deep(.checkbox-content) {\n\tpadding: 0;\n\tgap: 12px;\n\talign-items: flex-start;\n\tmin-height: 0;\n}\n\n.cn-action-dialog__checkbox :deep(.checkbox-content__icon) {\n\tmargin: 0;\n}\n\n.cn-action-dialog__checkbox :deep(.checkbox-radio-switch__input) {\n\tmin-height: 0;\n}\n\n.cn-action-dialog__checkbox-text {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n}\n\n.cn-action-dialog__checkbox-label {\n\tfont-size: 15px;\n\tfont-weight: 600;\n\tline-height: 1.2;\n}\n\n.cn-action-dialog__checkbox .cn-action-dialog__muted {\n\tfont-size: 13px;\n}\n\n.cn-action-dialog__checks {\n\tborder: 0;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-action-dialog__checks-legend {\n\tfont-weight: 600;\n\tmargin-bottom: 4px;\n\tpadding: 0;\n}\n\n.cn-action-dialog__field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n/* The reason's help line is 13px on the normal line, right under the text\n area: the inline text area left a descender gap and NcTextArea's 2px\n ring room came on top (DqArchiveren \"Komt in de historie ...\"). */\n.cn-action-dialog__hint {\n\tfont-size: 13px;\n\tline-height: normal;\n}\n\n.cn-action-dialog__reason :deep(.textarea__input) {\n\tvertical-align: top;\n}\n\n.cn-action-dialog__reason :deep(.textarea) {\n\tmargin-block-end: -2px;\n}\n\n.cn-action-dialog__error {\n\tmargin: 0;\n\tcolor: var(--color-error-text, var(--color-error));\n}\n</style>\n"],"names":["_createVNode","_createBlock","_createTextVNode","_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_normalizeClass","_Fragment","_renderList"],"mappings":";;;;AAiBoB,EAAA,KAAK,EAAC,kBAAkB;;;;AAErB,EAAA,KAAK,EAAC,2BAAmB;AAAA,EAAA,aAAA,EAAA,0BAAA;;AACtC,MAAA,UAAA,GAAA,EAAA,KAAM,EAAA,gCAAwB,GAAA;AAGhC,MAAA,UAAA,GAAA,EAAA,KAAA,EAAA,gCAAA,GAAA;;;AAEuB,EAAA,KAAI,EAAA,yBAAA;;;;AAaN,EAAA,KAAK,EAAC,yBAAyB;;AAGpD,MAAA,UAAA,GAAA,EAAA,KAAE,EAAA,yBAAA,GAAA;;;AAW0B,EAAA,KAAK,EAAC,2BAA2B;AAAC,EAAA,aAAI,EAAA,4BAAA;;;;AAClD,EAAA,KAAA,EAAA,yBAAA;;;;AAGK,EAAA,KAAI,EAAA,yBAAA;AAAA,EAAA,IAAA,EAAA,QAAA;;AAGzB,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,0BAA0B,GAAA;;AAS5B,MAAA,WAAA,GAAA,EAAA,KAAA,EAAA,+BAAA,GAAA;;;;;;AAwBC,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,iCAAU,GAAA;AACb,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,kCAAkC,GAAA;;;AACvB,EAAA,KAAI,EAAE,yBAAc;;;AAoBtC,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,iCAAoB,GAAA;;AAK5B,EAAA,KAAK,EAAC,2DAA0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AAA,CAAA,EAAA,CAAA,YAAA;;;wBAIZF,kBAEK,CAAA,GAAA,EAFL,WAEK,EADDE,eAAA,CAAA,KAAA,CAAA,UAAU,IAAI,QAAI,CAAA,IAAA,CAAC,QAAU,CAAA,UAAA,CAAA,IAAK,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,MAAA,CAAA,CAAA,EAAA,CAAA,YAAA,CAAA;;;;;;;;"}
1
+ {"version":3,"file":"CnActionDialog.vue3.js","sources":["../../../../src/components/CnActionDialog/CnActionDialog.vue?vue&type=template&id=5007fe32&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<CnDialog\n\t\t:name=\"text(config.title) || t('nextcloud-vue', 'Confirm')\"\n\t\t:eyebrow=\"eyebrowText\"\n\t\t:subtitle=\"text(config.subtitle)\"\n\t\twidth=\"form\"\n\t\t:noClose=\"busy\"\n\t\tdata-testid=\"cn-action-dialog\"\n\t\t@closing=\"close\">\n\t\t<div v-if=\"!done\" class=\"cn-action-dialog\" :style=\"partsGap\">\n\t\t\t<!-- The record the action is about: its title, a meta line, a badge. -->\n\t\t\t<div v-if=\"summary\" class=\"cn-action-dialog__summary\" data-testid=\"cn-action-dialog-summary\">\n\t\t\t\t<span class=\"cn-action-dialog__summary-icon\">\n\t\t\t\t\t<CnIcon :name=\"config.summary.icon || 'FolderOutline'\" :size=\"20\" />\n\t\t\t\t</span>\n\t\t\t\t<span class=\"cn-action-dialog__summary-text\">\n\t\t\t\t\t<strong>{{ summary.title }}</strong>\n\t\t\t\t\t<span v-if=\"summary.meta\" class=\"cn-action-dialog__muted\">{{ summary.meta }}</span>\n\t\t\t\t</span>\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"summary.badge\"\n\t\t\t\t\tclass=\"cn-action-dialog__badge\"\n\t\t\t\t\t:class=\"summary.badgeVariant ? 'cn-status-badge--' + summary.badgeVariant : ''\">{{ summary.badge }}</span>\n\t\t\t</div>\n\n\t\t\t<!-- Facts about the record, in titled groups (\"Retention under the case type\"). -->\n\t\t\t<section v-for=\"(section, index) in factSections\"\n\t\t\t\t:key=\"`facts-${index}`\"\n\t\t\t\tclass=\"cn-action-dialog__section\"\n\t\t\t\tdata-testid=\"cn-action-dialog-facts\">\n\t\t\t\t<h3 v-if=\"section.title\" class=\"cn-action-dialog__title\">\n\t\t\t\t\t{{ section.title }}\n\t\t\t\t</h3>\n\t\t\t\t<dl class=\"cn-action-dialog__facts\">\n\t\t\t\t\t<div v-for=\"fact in section.facts\" :key=\"fact.label\" class=\"cn-action-dialog__fact\">\n\t\t\t\t\t\t<dt>{{ fact.label }}</dt>\n\t\t\t\t\t\t<dd>{{ fact.value }}</dd>\n\t\t\t\t\t</div>\n\t\t\t\t</dl>\n\t\t\t</section>\n\n\t\t\t<!-- The checklist, read from an endpoint: each item met, not met or\n\t\t\t unknown. Items named in `required` decide whether the action may\n\t\t\t run; the others inform. -->\n\t\t\t<section v-if=\"config.checklist\" class=\"cn-action-dialog__section\" data-testid=\"cn-action-dialog-checklist\">\n\t\t\t\t<h3 v-if=\"config.checklist.title\" class=\"cn-action-dialog__title\">\n\t\t\t\t\t{{ text(config.checklist.title) }}\n\t\t\t\t</h3>\n\t\t\t\t<p v-if=\"checklistError\" class=\"cn-action-dialog__muted\" role=\"status\">\n\t\t\t\t\t{{ checklistError }}\n\t\t\t\t</p>\n\t\t\t\t<ul class=\"cn-action-dialog__checks\">\n\t\t\t\t\t<li v-for=\"item in checklist\"\n\t\t\t\t\t\t:key=\"item.id\"\n\t\t\t\t\t\tclass=\"cn-action-dialog__check\"\n\t\t\t\t\t\t:data-testid=\"`cn-action-dialog-check-${item.id}`\"\n\t\t\t\t\t\t:data-met=\"String(item.met)\">\n\t\t\t\t\t\t<CheckCircle v-if=\"item.met === true\" :size=\"20\" class=\"cn-action-dialog__check-icon cn-action-dialog__check-icon--met\" />\n\t\t\t\t\t\t<HelpCircleOutline v-else-if=\"item.met === null\" :size=\"20\" class=\"cn-action-dialog__check-icon\" />\n\t\t\t\t\t\t<CircleOutline v-else :size=\"20\" class=\"cn-action-dialog__check-icon\" />\n\t\t\t\t\t\t<strong class=\"cn-action-dialog__check-label\">{{ item.label }}</strong>\n\t\t\t\t\t\t<span v-if=\"item.detail\" class=\"cn-action-dialog__muted\">{{ item.detail }}</span>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\n\t\t\t<!-- The fields, the reason and the note, in the order `bodyParts`\n\t\t\t gives: the fields first, or after the note with\n\t\t\t `fieldsAfterNote` (DqArchiveren's \"let the requester know\"). -->\n\t\t\t<template v-for=\"part in bodyParts\" :key=\"part\">\n\t\t\t\t<template v-if=\"part === 'fields'\">\n\t\t\t\t\t<!-- Fields the action asks for, sent beside the reason. -->\n\t\t\t\t\t<div v-for=\"field in shownFields\"\n\t\t\t\t\t\t:key=\"field.field\"\n\t\t\t\t\t\tclass=\"cn-action-dialog__field\"\n\t\t\t\t\t\t:data-testid=\"`cn-action-dialog-field-${field.field}`\">\n\t\t\t\t\t\t<!-- A checkbox field: a tinted box, the label filled from the\n\t\t\t\t\t\t record, a hint under it (DqArchiveren \"Sanne de Vries laten\n\t\t\t\t\t\t weten...\"). -->\n\t\t\t\t\t\t<NcCheckboxRadioSwitch v-if=\"field.type === 'checkbox'\"\n\t\t\t\t\t\t\tclass=\"cn-action-dialog__checkbox\"\n\t\t\t\t\t\t\t:class=\"{ 'cn-action-dialog__checkbox--plain': field.look === 'plain' }\"\n\t\t\t\t\t\t\t:modelValue=\"checkboxValue(field)\"\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t@update:modelValue=\"(on) => setChecked(field.field, on)\">\n\t\t\t\t\t\t\t<span class=\"cn-action-dialog__checkbox-text\">\n\t\t\t\t\t\t\t\t<strong class=\"cn-action-dialog__checkbox-label\">{{ fill(field.label) || field.field }}</strong>\n\t\t\t\t\t\t\t\t<span v-if=\"field.hint\" class=\"cn-action-dialog__muted\">{{ fill(field.hint) }}</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t\t\t<!-- A search field: records of `source` found as the reader\n\t\t\t\t\t\t types (DqZaakKoppelen \"Zaak koppelen\"). -->\n\t\t\t\t\t\t<CnSearchSelect v-else-if=\"field.type === 'search'\"\n\t\t\t\t\t\t\t:modelValue=\"values[field.field] || null\"\n\t\t\t\t\t\t\t:options=\"searchOptions[field.field] || []\"\n\t\t\t\t\t\t\t:inputLabel=\"fill(field.label) || field.field\"\n\t\t\t\t\t\t\t:labelOutside=\"true\"\n\t\t\t\t\t\t\t:loading=\"searching === field.field\"\n\t\t\t\t\t\t\t:filterable=\"false\"\n\t\t\t\t\t\t\t:placeholder=\"fill(field.placeholder)\"\n\t\t\t\t\t\t\t@search=\"(typed) => onSearch(field, typed)\"\n\t\t\t\t\t\t\t@update:modelValue=\"(value) => setValue(field.field, value && typeof value === 'object' ? value.id : value)\" />\n\t\t\t\t\t\t<!-- Several items to tick, listed from the record or the config\n\t\t\t\t\t\t (DqZaakDialogen \"Documenten die meegaan\"). -->\n\t\t\t\t\t\t<fieldset v-else-if=\"field.type === 'checks'\"\n\t\t\t\t\t\t\tclass=\"cn-action-dialog__checks\"\n\t\t\t\t\t\t\t:data-testid=\"`cn-action-dialog-checks-${field.field}`\">\n\t\t\t\t\t\t\t<legend class=\"cn-action-dialog__checks-legend\">\n\t\t\t\t\t\t\t\t{{ fill(field.label) || field.field }}\n\t\t\t\t\t\t\t</legend>\n\t\t\t\t\t\t\t<!-- Several ticks per item, one per column (\"moves\" or \"on both\"). -->\n\t\t\t\t\t\t\t<template v-if=\"hasColumns(field)\">\n\t\t\t\t\t\t\t\t<div class=\"cn-action-dialog__columns cn-action-dialog__columns--head\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t<span />\n\t\t\t\t\t\t\t\t\t<span v-for=\"column in field.columns\" :key=\"column.field\">{{ text(column.label) || column.field }}</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div v-for=\"item in checkItems(field)\"\n\t\t\t\t\t\t\t\t\t:key=\"item.value\"\n\t\t\t\t\t\t\t\t\tclass=\"cn-action-dialog__columns\"\n\t\t\t\t\t\t\t\t\t:data-testid=\"`cn-action-dialog-columns-${field.field}-${item.value}`\">\n\t\t\t\t\t\t\t\t\t<span class=\"cn-action-dialog__checkbox-text\">\n\t\t\t\t\t\t\t\t\t\t<strong class=\"cn-action-dialog__checkbox-label\">{{ item.label }}</strong>\n\t\t\t\t\t\t\t\t\t\t<span v-if=\"item.secondary\" class=\"cn-action-dialog__muted\">{{ item.secondary }}</span>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<NcCheckboxRadioSwitch v-for=\"column in field.columns\"\n\t\t\t\t\t\t\t\t\t\t:key=\"column.field\"\n\t\t\t\t\t\t\t\t\t\t:modelValue=\"columnValue(column).includes(item.value)\"\n\t\t\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\t\t\t:ariaLabel=\"`${item.label}: ${text(column.label) || column.field}`\"\n\t\t\t\t\t\t\t\t\t\t@update:modelValue=\"(on) => setCheck(column, item.value, on)\" />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t<NcCheckboxRadioSwitch v-for=\"item in (hasColumns(field) ? [] : checkItems(field))\"\n\t\t\t\t\t\t\t\t:key=\"item.value\"\n\t\t\t\t\t\t\t\t:modelValue=\"checksValue(field).includes(item.value)\"\n\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\t@update:modelValue=\"(on) => setCheck(field, item.value, on)\">\n\t\t\t\t\t\t\t\t<span class=\"cn-action-dialog__checkbox-text\">\n\t\t\t\t\t\t\t\t\t<strong class=\"cn-action-dialog__checkbox-label\">{{ item.label }}</strong>\n\t\t\t\t\t\t\t\t\t<span v-if=\"item.secondary\" class=\"cn-action-dialog__muted\">{{ item.secondary }}</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t\t\t\t<span v-if=\"checkItems(field).length === 0\" class=\"cn-action-dialog__muted\">\n\t\t\t\t\t\t\t\t{{ text(field.emptyText) || t('nextcloud-vue', 'Nothing to choose from.') }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span v-if=\"conflicts(field).length > 0\"\n\t\t\t\t\t\t\t\tclass=\"cn-action-dialog__error\"\n\t\t\t\t\t\t\t\trole=\"alert\"\n\t\t\t\t\t\t\t\t:data-testid=\"`cn-action-dialog-conflict-${field.field}`\">\n\t\t\t\t\t\t\t\t{{ text(field.exclusiveText) || t('nextcloud-vue', 'An item cannot be ticked in more than one column.') }}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</fieldset>\n\t\t\t\t\t\t<!-- One choice out of a few explained options (DqZaakSamenwerken\n\t\t\t\t\t\t \"Delen\" or \"Overdragen\"). -->\n\t\t\t\t\t\t<CnChoiceCards v-else-if=\"field.type === 'cards'\"\n\t\t\t\t\t\t\t:modelValue=\"cardsValue(field)\"\n\t\t\t\t\t\t\t:options=\"cardOptions(field)\"\n\t\t\t\t\t\t\t:label=\"fill(field.label) || field.field\"\n\t\t\t\t\t\t\t:layout=\"field.layout === 'rows' ? 'rows' : 'cards'\"\n\t\t\t\t\t\t\t:columns=\"typeof field.columns === 'number' ? field.columns : 0\"\n\t\t\t\t\t\t\t:hideLabel=\"field.hideLabel === true\"\n\t\t\t\t\t\t\t@update:modelValue=\"(value) => setValue(field.field, value)\" />\n\t\t\t\t\t\t<!-- An optional select or text field: its label above the control,\n\t\t\t\t\t\t \"(optional)\" in grey after it (DqUwWachtrij \"Sjabloon (niet\n\t\t\t\t\t\t verplicht)\"). -->\n\t\t\t\t\t\t<CnFormField v-if=\"labelsOutside(field)\"\n\t\t\t\t\t\t\t:controlId=\"controlId(field)\"\n\t\t\t\t\t\t\t:text=\"fill(field.label) || field.field\"\n\t\t\t\t\t\t\t:optional=\"true\" />\n\t\t\t\t\t\t<NcSelect v-if=\"field.type === 'select'\"\n\t\t\t\t\t\t\t:modelValue=\"selectedOption(field)\"\n\t\t\t\t\t\t\t:options=\"optionsOf(field)\"\n\t\t\t\t\t\t\t:inputId=\"controlId(field)\"\n\t\t\t\t\t\t\t:inputLabel=\"fill(field.label) || field.field\"\n\t\t\t\t\t\t\t:labelOutside=\"labelsOutside(field)\"\n\t\t\t\t\t\t\t:placeholder=\"fill(field.placeholder)\"\n\t\t\t\t\t\t\t:clearable=\"field.required === false\"\n\t\t\t\t\t\t\t:filterable=\"!searchesRemotely(field)\"\n\t\t\t\t\t\t\t:loading=\"loadingOptions === field.field\"\n\t\t\t\t\t\t\t@search=\"(typed) => onOptionsSearch(field, typed)\"\n\t\t\t\t\t\t\t@update:modelValue=\"(option) => pick(field, option)\" />\n\t\t\t\t\t\t<NcTextField v-else-if=\"field.type === 'secret'\"\n\t\t\t\t\t\t\t:modelValue=\"values[field.field] || ''\"\n\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\tautocomplete=\"new-password\"\n\t\t\t\t\t\t\t:label=\"text(field.label) || field.field\"\n\t\t\t\t\t\t\t:placeholder=\"secretStored(field) ? t('nextcloud-vue', 'Stored. Type a new value to replace it.') : ''\"\n\t\t\t\t\t\t\t@update:modelValue=\"(value) => setValue(field.field, value)\" />\n\t\t\t\t\t\t<NcTextField v-else-if=\"!['checkbox', 'search', 'checks', 'cards'].includes(field.type)\"\n\t\t\t\t\t\t\t:id=\"controlId(field)\"\n\t\t\t\t\t\t\t:modelValue=\"values[field.field] || ''\"\n\t\t\t\t\t\t\t:type=\"field.type === 'datetime' ? 'datetime-local' : (field.type === 'date' ? 'date' : 'text')\"\n\t\t\t\t\t\t\t:label=\"fill(field.label) || field.field\"\n\t\t\t\t\t\t\t:labelOutside=\"labelsOutside(field)\"\n\t\t\t\t\t\t\t@update:modelValue=\"(value) => setValue(field.field, value)\" />\n\t\t\t\t\t\t<span v-if=\"field.hint && field.type !== 'checkbox'\" class=\"cn-action-dialog__muted\">{{ fill(field.hint) }}</span>\n\t\t\t\t\t\t<span v-if=\"optionsErrors[field.field]\"\n\t\t\t\t\t\t\tclass=\"cn-action-dialog__error\"\n\t\t\t\t\t\t\trole=\"alert\"\n\t\t\t\t\t\t\t:data-testid=\"`cn-action-dialog-options-error-${field.field}`\">{{ optionsErrors[field.field] }}</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t</template>\n\t\t\t\t<template v-else-if=\"part === 'reason'\">\n\t\t\t\t\t<div v-if=\"config.reason\" class=\"cn-action-dialog__field cn-action-dialog__reason\">\n\t\t\t\t\t\t<NcTextArea\n\t\t\t\t\t\t\t:id=\"reasonId\"\n\t\t\t\t\t\t\tv-model=\"reason\"\n\t\t\t\t\t\t\t:label=\"reasonLabel\"\n\t\t\t\t\t\t\t:labelOutside=\"false\"\n\t\t\t\t\t\t\t:rows=\"config.reason.rows || 2\"\n\t\t\t\t\t\t\tresize=\"vertical\"\n\t\t\t\t\t\t\tdata-testid=\"cn-action-dialog-reason\" />\n\t\t\t\t\t\t<span v-if=\"config.reason.hint\" class=\"cn-action-dialog__muted cn-action-dialog__hint\">{{ text(config.reason.hint) }}</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t</template>\n\t\t\t\t<template v-else>\n\t\t\t\t\t<NcNoteCard v-if=\"config.note && noteShown\"\n\t\t\t\t\t\t:type=\"noteType\"\n\t\t\t\t\t\t:heading=\"text(config.note.title)\"\n\t\t\t\t\t\tdata-testid=\"cn-action-dialog-note\">\n\t\t\t\t\t\t<template v-if=\"config.note.icon\" #icon>\n\t\t\t\t\t\t\t<CnIcon class=\"cn-action-dialog__note-icon\" :name=\"config.note.icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t{{ noteText }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t</template>\n\t\t\t</template>\n\n\t\t\t<p v-if=\"refusal\"\n\t\t\t\tclass=\"cn-action-dialog__error\"\n\t\t\t\trole=\"alert\"\n\t\t\t\tdata-testid=\"cn-action-dialog-refusal\">\n\t\t\t\t{{ refusal }}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<p v-else role=\"status\" data-testid=\"cn-action-dialog-done\">\n\t\t\t{{ doneMessage }}\n\t\t</p>\n\n\t\t<template #actions>\n\t\t\t<NcButton :disabled=\"busy\" data-testid=\"cn-action-dialog-cancel\" @click=\"close\">\n\t\t\t\t{{ done ? t('nextcloud-vue', 'Close') : t('nextcloud-vue', 'Cancel') }}\n\t\t\t</NcButton>\n\t\t\t<NcButton v-if=\"!done\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t:disabled=\"!canConfirm\"\n\t\t\t\tdata-testid=\"cn-action-dialog-confirm\"\n\t\t\t\t@click=\"confirm\">\n\t\t\t\t<template v-if=\"confirmIcon\" #icon>\n\t\t\t\t\t<CnIcon :name=\"confirmIcon\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ confirmText }}\n\t\t\t</NcButton>\n\t\t</template>\n\t</CnDialog>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { showSuccess } from '@nextcloud/dialogs'\nimport { emit } from '@nextcloud/event-bus'\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcButton, NcCheckboxRadioSwitch, NcNoteCard, NcSelect, NcTextArea, NcTextField } from '@nextcloud/vue'\nimport CheckCircle from 'vue-material-design-icons/CheckCircle.vue'\nimport CircleOutline from 'vue-material-design-icons/CircleOutline.vue'\nimport HelpCircleOutline from 'vue-material-design-icons/HelpCircleOutline.vue'\nimport CnFormField from '../CnFormField/CnFormField.vue'\nimport { fetchEndpointSource, interpolateUrlTokens } from '../../composables/useEndpointSource.js'\nimport { bodyValue, checksSent, chosenRequest, isFilled, isShown, matchingRows, optionsRead, pickCase, tickedTwice } from '../../utils/actionDialogForm.js'\nimport { BUILT_IN_FORMATTERS } from '../../utils/builtInFormatters.js'\nimport { fillTemplate, firstFilled } from '../../utils/fillTemplate.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { CnChoiceCards } from '../CnChoiceCards/index.js'\nimport { CnDialog } from '../CnDialog/index.js'\nimport { CnIcon } from '../CnIcon/index.js'\nimport { CnSearchSelect } from '../CnSearchSelect/index.js'\n\n/** How long typing rests before a search field searches, in ms. */\nconst SEARCH_DELAY = 250\n\n/** The page refresh channel the built-in widgets listen on. */\nconst PAGE_REFRESH = 'cn:page:refresh'\n\n/** Gives each dialog's reason field its own id. */\nlet reasonSeq = 0\n\n/**\n * CnActionDialog — the generic \"summary, checklist, reason, confirm\" dialog\n * for an act on a record, configured from the manifest (an `open-modal`\n * action's props), so an app does not hand-build each one. dossiq's archive\n * dialog (board DqArchiveren) is the first: the case, what its case type\n * keeps, a readiness checklist read from an endpoint, a reason, a read-only\n * note and Archive it.\n *\n * `config`:\n * - `title`, `subtitle`, `doneText`: texts, through the host translate;\n * `eyebrow` a template filled from the record (\"Close off · {identifier}\").\n * - `summary`: `{ source?, title, meta?, badge?, badgeVariant?, badgeColorMap?, icon? }`: templates filled from\n * the record (`source` an endpointSource to read it from, else `object`).\n * - `facts`: `[{ title?, items: [{ label, value }] }]`, `value` a template; a\n * `{path|<formatter>}` token reads through the built-in and app formatters.\n * - `checklist`: `{ title?, source, itemsPath?, labels?, required? }`: items\n * `{ id, met, label?, detail? }` read from `source`; `labels[id]` gives an\n * item's `{ label, detail?, unmetDetail? }`; the ids in `required` must be\n * met before the action can run. `met: null` reads as unknown.\n * - `permission`: `{ source, listPath?, match?, allowedPath, reasonPath? }`:\n * the action runs only while `allowedPath` reads true; `reasonPath` says\n * why not. With `listPath` the paths read the entry of that list whose\n * fields equal `match` (`{ act: \"archive\" }`).\n * - `fields`: `[{ field, type?: \"text\"|\"date\"|\"datetime\"|\"select\"|\"checkbox\", label?,\n * required?, options?: [{ value, label, fills? }], hint?, default? }]`: inputs\n * sent beside the reason, required by default; a select option's `fills`\n * sets other fields that are still empty. A `checkbox` is sent as a boolean,\n * starts at `default` (false), fills its `label` and `hint` from the record,\n * and is optional unless `required: true` (then it must be ticked). A\n * `search` field finds records of `source: { register, schema }` as the\n * reader types, shows each as `optionLabel` with `optionSecondary` under\n * it (templates on the found record), leaves the record in hand out with\n * `excludeSelf`, and sends the chosen record's id. Every field's `label`,\n * `hint` and `placeholder` (search and select) are templates filled from the record.\n * An optional select or text field (`required: false`) draws its label above\n * the control with \"(optional)\" after it. A `checks` field ticks several\n * items, listed in `options` or read off the record at `itemsPath`\n * (`optionValue`, `optionLabel` and `optionSecondary` name their parts),\n * starts on `default` (a list, or \"all\") and sends the ticked values as a\n * list; required means at least one. A `cards` field is one choice out of\n * `options` `[{ value, label, description? }]` drawn as cards, starting on\n * `default`.\n * - `reason`: `{ label?, hint?, required?, field?, rows? }`: a text area; required by\n * default; sent as `field` (default `reason`). `rows` is its height in lines\n * (default 2; board DqBesluit draws 4).\n * - `note`: `{ variant?, title?, text, icon? }`: a read-only note; `icon` an\n * icon name in place of the variant's own (\"LockOutline\").\n * - `fieldsAfterNote`: true draws the fields after the reason and the note\n * instead of before them (DqArchiveren's checkbox at the end).\n * - `confirm`: `{ label, icon?, request?: { method?, url, body?, answerPath? }, action? }`.\n * `request` posts itself (`body` templates filled with the record and\n * `{reason}`); `action` dispatches a manifest action through the page.\n * `answerPath` shows the text at that path of the answer once the act ran,\n * in place of `doneText` (a lookup that says what it found).\n *\n * - `source`: an endpointSource the record is read from, beside or in place\n * of `summary.source` (a policy a field's `visibleWhen` reads).\n * - A field's `visibleWhen`: `{ field | path, equals? | in? | includes? | filled? }`\n * shows the field only while another field's value (`field`) or a value of\n * the record (`path`) matches; a hidden field is not required and not sent.\n * The note takes `visibleWhen` too, and `note.textsBy: { field, cases }`\n * gives its text per chosen value.\n * - A select or checks field's `optionsSource`: an endpointSource (`url`,\n * `params`, `responsePath`) its options are read from, `match` keeping the\n * entries whose fields equal it, `search: true` reading again as the reader\n * types (the term under `searchParam`, default `_search`) and `errorText`\n * saying a failed read. `optionValue` (default `id`) and `optionLabel` (a\n * template, or a list of them, the first that fills) name each option.\n * - A checks field's `sendUnticked: true` sends the items left unticked, and\n * any field's `sendAs` sends its value under another key (\"ticked means\n * shared\" posted as `fieldExclusions`). `hideWhenEmpty` hides a checks field\n * with no items. `columns: [{ field, label }]` ticks each item once per\n * column, each column sent as its own list; `exclusive: true` refuses an\n * item ticked in two columns (`exclusiveText`).\n * - `requireOneOf`: field names of which at least one must hold a value.\n * - `confirm.requestsBy: { field, cases: { <value>: request } }` posts the\n * request of the chosen act, each with its own `url`, `method`, `body` and\n * optional `label`, `icon` and `doneText`. A body value that is one whole\n * token (`\"{fields.permission}\"`) sends the value as it is; `{fields.<key>}`\n * reads a sent value by the key it is sent under. `fieldsInBody: false`\n * sends only the body.\n * - `{chosen.<field>.<path>}` reads the entry a select field's\n * `optionsSource` gave for the chosen option, and `{objectId}` the record's\n * id, in a body and in `doneText`; `doneText` also reads `{fields.<key>}`.\n * - `closeOnDone: true` says the done text as a toast and closes the dialog\n * rather than showing it in the dialog. `errorText` on the request or on\n * `confirm` words a failure the server gives no message for.\n * - `gap`: the room between the dialog's parts in px (default 18). A cards\n * field takes `layout` (`rows`), `columns` and `hideLabel` as\n * `CnChoiceCards` does; a checkbox field with `look: 'plain'` is a plain\n * checkbox and label, without the tinted box.\n *\n * Tokens (`@objectId`, `@object.<field>`) resolve in every url.\n */\nexport default {\n\tname: 'CnActionDialog',\n\n\tcomponents: { CheckCircle, CircleOutline, CnChoiceCards, CnDialog, CnFormField, CnIcon, CnSearchSelect, HelpCircleOutline, NcButton, NcCheckboxRadioSwitch, NcNoteCard, NcSelect, NcTextArea, NcTextField },\n\n\tinject: {\n\t\t/** The host app's translate (CnAppRoot `cnTranslate`). */\n\t\tcnTranslate: { default: () => (key) => key },\n\t\t/** The page's pre-bound action dispatcher (CnPageRenderer), for `confirm.action`. */\n\t\tcnDispatchAction: { default: null },\n\t\t/** The app's named formatters (CnAppRoot), for `{path|<formatter>}` in a template. */\n\t\tcnFormatters: { default: () => ({}) },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The dialog's configuration (see the component docs).\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tconfig: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** The record's id, for the `@objectId` token. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The record, when the host has it: the summary and facts read it.\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tobject: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['close', 'done'],\n\n\tdata() {\n\t\treturn {\n\t\t\trecord: this.object,\n\t\t\titems: [],\n\t\t\tchecklistError: '',\n\t\t\tallowed: true,\n\t\t\treason: '',\n\t\t\tvalues: {},\n\t\t\t/** A search field's found options, by field name. */\n\t\t\tsearchOptions: {},\n\t\t\t/** The search field whose search runs, or ''. */\n\t\t\tsearching: '',\n\t\t\t/** The entries an `optionsSource` gave, by field name. */\n\t\t\tremoteOptions: {},\n\t\t\t/** A failed `optionsSource` read in words, by field name. */\n\t\t\toptionsErrors: {},\n\t\t\t/** The field whose options are being read, or ''. */\n\t\t\tloadingOptions: '',\n\t\t\tbusy: false,\n\t\t\trefusal: '',\n\t\t\tdone: false,\n\t\t\tanswerText: '',\n\t\t\treasonId: `cn-action-dialog-reason-${++reasonSeq}`,\n\t\t\tfieldIdPrefix: `cn-action-dialog-field-${reasonSeq}`,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {object} The token context. */\n\t\ttokenCtx() {\n\t\t\treturn { objectId: this.recordId, object: this.record || {} }\n\t\t},\n\n\t\t/**\n\t\t * The record's id: `objectId`, or the route's `id` when the prop is\n\t\t * empty or a token the opener could not resolve.\n\t\t *\n\t\t * @return {string|number}\n\t\t */\n\t\trecordId() {\n\t\t\tconst given = this.objectId\n\t\t\tif (given !== '' && given !== null && given !== undefined && !String(given).startsWith('@')) {\n\t\t\t\treturn given\n\t\t\t}\n\t\t\treturn (this.$route && this.$route.params && this.$route.params.id) || ''\n\t\t},\n\n\t\t/** @return {object} The confirm config. */\n\t\tconfirmConfig() {\n\t\t\treturn this.config.confirm && typeof this.config.confirm === 'object' ? this.config.confirm : {}\n\t\t},\n\n\t\t/**\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-each-act-posts-to-its-own-endpoint\n\t\t * @return {object|null} The request the chosen act posts.\n\t\t */\n\t\trequest() {\n\t\t\treturn chosenRequest(this.confirmConfig, this.fieldValues)\n\t\t},\n\n\t\t/** @return {string} The confirm button's text: the chosen act's, else the config's. */\n\t\tconfirmText() {\n\t\t\treturn this.text(this.request?.label) || this.text(this.confirmConfig.label) || t('nextcloud-vue', 'Confirm')\n\t\t},\n\n\t\t/** @return {string} The confirm button's icon name, or ''. */\n\t\tconfirmIcon() {\n\t\t\treturn this.request?.icon || this.confirmConfig.icon || ''\n\t\t},\n\n\t\t/** @return {string} The done text: the chosen act's, else the config's. */\n\t\tdoneTextOf() {\n\t\t\treturn this.request?.doneText || this.config.doneText\n\t\t},\n\n\t\t/**\n\t\t * What the dialog says once the act ran: the answer, else the done text\n\t\t * filled from the sent values, the chosen entries and the record.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-share-look-and-outcome/specs/action-dialog/spec.md#requirement-the-done-text-names-what-was-chosen\n\t\t * @return {string}\n\t\t */\n\t\tdoneMessage() {\n\t\t\treturn this.answerText || this.fill(this.doneTextOf, this.templateContext('')) || this.text(this.doneTextOf) || t('nextcloud-vue', 'Done')\n\t\t},\n\n\t\t/** @return {object|null} The room between the parts, when `gap` sets it. */\n\t\tpartsGap() {\n\t\t\treturn Number.isFinite(this.config.gap) ? { gap: `${this.config.gap}px` } : null\n\t\t},\n\n\t\t/**\n\t\t * The entry each select field's `optionsSource` gave for its chosen\n\t\t * option, by field name (null when nothing is chosen).\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-share-look-and-outcome/specs/action-dialog/spec.md#requirement-the-done-text-names-what-was-chosen\n\t\t * @return {object}\n\t\t */\n\t\tchosenRows() {\n\t\t\tconst out = {}\n\t\t\tfor (const field of this.fields.filter((f) => f.type === 'select' && f.optionsSource)) {\n\t\t\t\tconst value = String(this.plainValue(field))\n\t\t\t\tout[field.field] = (this.remoteOptions[field.field] || []).find((row) => String(readPath(row, field.optionValue || 'id')) === value) || null\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/** @return {{values: object, record: (object|null)}} What a `visibleWhen` reads. */\n\t\tshownState() {\n\t\t\treturn { values: this.fieldValues, record: this.record }\n\t\t},\n\n\t\t/**\n\t\t * The fields that show: their `visibleWhen` holds, and a checks field\n\t\t * with `hideWhenEmpty` has items.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-a-field-shows-only-when-another-value-says-so\n\t\t * @return {Array<object>}\n\t\t */\n\t\tshownFields() {\n\t\t\treturn this.fields.filter((field) => this.fieldShown(field, 0) && !(field.hideWhenEmpty === true && this.checkItems(field).length === 0))\n\t\t},\n\n\t\t/** @return {boolean} Whether the note shows. */\n\t\tnoteShown() {\n\t\t\treturn isShown(this.config.note, this.shownState)\n\t\t},\n\n\t\t/** @return {string} The note's text: the case of `textsBy` the chosen value names, else `text`. */\n\t\tnoteText() {\n\t\t\tconst picked = pickCase(this.config.note && this.config.note.textsBy, this.fieldValues)\n\t\t\treturn this.text(typeof picked === 'string' ? picked : this.config.note.text)\n\t\t},\n\n\t\t/**\n\t\t * The values sent: the shown fields only, each under its `sendAs`, a\n\t\t * checks field with `sendUnticked` as the items left unticked and one\n\t\t * with `columns` as a list per column.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-ticked-can-mean-left-out\n\t\t * @return {object}\n\t\t */\n\t\tsentValues() {\n\t\t\tconst out = {}\n\t\t\tfor (const field of this.shownFields) {\n\t\t\t\tObject.assign(out, this.sentOf(field))\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/**\n\t\t * The summary row, or null without one or before the record is known.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog/specs/action-dialog/spec.md#requirement-a-manifest-configures-an-action-dialog\n\t\t * @return {{title: string, meta: string, badge: string}|null}\n\t\t */\n\t\tsummary() {\n\t\t\tconst def = this.config.summary\n\t\t\tif (!def || !this.record) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst title = this.fill(def.title)\n\t\t\tconst badge = this.fill(def.badge)\n\t\t\tconst variants = ['default', 'success', 'warning', 'error', 'info', 'purple', 'teal']\n\t\t\tconst mapped = def.badgeColorMap && typeof def.badgeColorMap === 'object' ? def.badgeColorMap[badge] : undefined\n\t\t\tconst wanted = mapped || def.badgeVariant\n\t\t\tconst badgeVariant = variants.includes(wanted) ? wanted : ''\n\t\t\treturn title ? { title, meta: this.fill(def.meta), badge, badgeVariant } : null\n\t\t},\n\n\t\t/** @return {Array<string>} The order of the fields, the reason and the note. */\n\t\tbodyParts() {\n\t\t\treturn this.config.fieldsAfterNote === true ? ['reason', 'note', 'fields'] : ['fields', 'reason', 'note']\n\t\t},\n\n\t\t/** @return {Array<{title: string, facts: Array<{label: string, value: string}>}>} The fact groups. */\n\t\tfactSections() {\n\t\t\tif (!Array.isArray(this.config.facts) || !this.record) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tconst empty = t('nextcloud-vue', 'Not set')\n\t\t\treturn this.config.facts.map((section) => ({\n\t\t\t\ttitle: this.text(section.title),\n\t\t\t\tfacts: (Array.isArray(section.items) ? section.items : []).map((fact) => ({ label: this.text(fact.label), value: this.fill(fact.value) || empty })),\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * The checklist rows: label and detail from `labels` by id, else the item's own.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog/specs/action-dialog/spec.md#requirement-a-manifest-configures-an-action-dialog\n\t\t * @return {Array<{id: string, met: (boolean|null), label: string, detail: string}>}\n\t\t */\n\t\tchecklist() {\n\t\t\tconst labels = (this.config.checklist && this.config.checklist.labels) || {}\n\t\t\treturn this.items.map((item) => {\n\t\t\t\tconst met = item.met === null || item.met === undefined ? null : item.met === true\n\t\t\t\tconst own = labels[item.id] || {}\n\t\t\t\tconst detail = met === false && own.unmetDetail ? own.unmetDetail : (own.detail || item.detail || '')\n\t\t\t\treturn {\n\t\t\t\t\tid: String(item.id),\n\t\t\t\t\tmet,\n\t\t\t\t\tlabel: this.fill(own.label || item.label || String(item.id), item),\n\t\t\t\t\tdetail: met === null && !item.detail ? t('nextcloud-vue', 'Could not be read') : this.fill(detail, item),\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\t/** @return {boolean} Whether every required item is met. */\n\t\trequiredMet() {\n\t\t\tconst required = (this.config.checklist && Array.isArray(this.config.checklist.required)) ? this.config.checklist.required.map(String) : []\n\t\t\treturn required.every((id) => this.items.some((item) => String(item.id) === id && item.met === true))\n\t\t},\n\n\t\t/** @return {boolean} Whether a reason is asked and needed. */\n\t\treasonNeeded() {\n\t\t\treturn Boolean(this.config.reason) && this.config.reason.required !== false\n\t\t},\n\n\t\t/** @return {string} The reason field's label. */\n\t\treasonLabel() {\n\t\t\treturn this.text(this.config.reason && this.config.reason.label) || t('nextcloud-vue', 'Reason')\n\t\t},\n\n\t\t/** @return {string} The note's NcNoteCard type. */\n\t\tnoteType() {\n\t\t\tconst variant = this.config.note && this.config.note.variant\n\t\t\treturn ['info', 'warning', 'error', 'success'].includes(variant) ? variant : 'info'\n\t\t},\n\n\t\t/**\n\t\t * Whether the action may run: allowed, required items met, a reason\n\t\t * when one is needed, and nothing in flight.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog/specs/action-dialog/spec.md#requirement-a-manifest-configures-an-action-dialog\n\t\t * @return {boolean}\n\t\t */\n\t\tcanConfirm() {\n\t\t\treturn !this.busy && this.allowed && this.requiredMet && this.fieldsFilled && (!this.reasonNeeded || this.reason.trim() !== '')\n\t\t},\n\n\t\t/** @return {string} The eyebrow, filled from the record once it is known. */\n\t\teyebrowText() {\n\t\t\treturn this.record ? this.fill(this.config.eyebrow) || this.text(this.config.eyebrow) : this.text(this.config.eyebrow)\n\t\t},\n\n\t\t/**\n\t\t * The value of every field as sent: a checkbox as a boolean, the\n\t\t * others as entered ('' when empty).\n\t\t *\n\t\t * @return {object} Values by field name.\n\t\t */\n\t\tfieldValues() {\n\t\t\tconst out = { ...this.values }\n\t\t\tfor (const field of this.fields) {\n\t\t\t\tObject.assign(out, this.heldValues(field))\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/** @return {Array<object>} The fields with a name. */\n\t\tfields() {\n\t\t\treturn (Array.isArray(this.config.fields) ? this.config.fields : []).filter((f) => f && f.field)\n\t\t},\n\n\t\t/**\n\t\t * Whether every required field has a value.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-fields-and-acts/specs/action-dialog/spec.md#requirement-an-action-dialog-asks-for-fields-and-reads-a-permission-from-a-list\n\t\t * @return {boolean}\n\t\t */\n\t\tfieldsFilled() {\n\t\t\treturn this.oneOfFilled && this.shownFields.every((f) => this.conflicts(f).length === 0 && this.fieldFilled(f))\n\t\t},\n\n\t\t/**\n\t\t * Whether one of the fields `requireOneOf` names holds a value.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-a-checks-field-can-tick-in-columns-that-exclude-each-other\n\t\t * @return {boolean}\n\t\t */\n\t\toneOfFilled() {\n\t\t\tconst names = Array.isArray(this.config.requireOneOf) ? this.config.requireOneOf : []\n\t\t\treturn names.length === 0 || names.some((name) => isFilled(this.sentValues[name]))\n\t\t},\n\t},\n\n\twatch: {\n\t\trecord: {\n\t\t\thandler() {\n\t\t\t\tthis.startValues()\n\t\t\t},\n\n\t\t\timmediate: true,\n\t\t},\n\t},\n\n\tasync mounted() {\n\t\tawait Promise.all([this.loadRecord(), this.loadChecklist(), this.loadPermission(), ...this.fields.map((field) => this.loadOptions(field, ''))])\n\t},\n\n\tbeforeUnmount() {\n\t\tclearTimeout(this.searchTimer)\n\t\tclearTimeout(this.optionsTimer)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Whether a field's label sits above its control with \"(optional)\" after\n\t\t * it: a select or a text field the action does not require.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-optional-fields/specs/action-dialog/spec.md#requirement-an-optional-field-says-so-beside-its-label\n\t\t * @param {object} field The field.\n\t\t * @return {boolean}\n\t\t */\n\t\tlabelsOutside(field) {\n\t\t\treturn field.required === false && !['checkbox', 'search', 'secret', 'checks', 'cards'].includes(field.type)\n\t\t},\n\n\t\t/**\n\t\t * The id of a field's control, which its outside label points at.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {string}\n\t\t */\n\t\tcontrolId(field) {\n\t\t\treturn `${this.fieldIdPrefix}-${field.field}`\n\t\t},\n\n\t\tt,\n\n\t\t/**\n\t\t * A config text through the host translate, '' for anything else.\n\t\t *\n\t\t * @param {unknown} value The text.\n\t\t * @return {string}\n\t\t */\n\t\t/**\n\t\t * Search a search field's records once typing rests.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @param {string} typed What the reader typed.\n\t\t * @return {void}\n\t\t * @spec openspec/changes/action-dialog-search-field/specs/action-dialog-search-field/spec.md#requirement-an-action-dialog-field-can-search-records\n\t\t */\n\t\tonSearch(field, typed) {\n\t\t\tclearTimeout(this.searchTimer)\n\t\t\tthis.searchTimer = setTimeout(() => this.searchRecords(field, String(typed || '').trim()), SEARCH_DELAY)\n\t\t},\n\n\t\t/**\n\t\t * Read the records of a search field's `source` that match the term.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @param {string} term The term.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync searchRecords(field, term) {\n\t\t\tconst source = field.source || {}\n\t\t\tif (!term || !source.register || !source.schema) {\n\t\t\t\tthis.searchOptions = { ...this.searchOptions, [field.field]: [] }\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.searching = field.field\n\t\t\ttry {\n\t\t\t\tconst url = generateUrl(`/apps/openregister/api/objects/${encodeURIComponent(source.register)}/${encodeURIComponent(source.schema)}`)\n\t\t\t\tconst { data } = await axios.get(url, { params: { _search: term, _limit: 10 } })\n\t\t\t\tconst rows = Array.isArray(data) ? data : (data && Array.isArray(data.results) ? data.results : [])\n\t\t\t\tconst self = String(this.recordId || '')\n\t\t\t\tconst options = rows\n\t\t\t\t\t.map((row) => ({ row, id: String(row.id || (row['@self'] && row['@self'].id) || '') }))\n\t\t\t\t\t.filter(({ id }) => id !== '' && !(field.excludeSelf && id === self))\n\t\t\t\t\t.map(({ row, id }) => {\n\t\t\t\t\t\tconst option = { id, label: this.fill(field.optionLabel || '{title}', row) || id }\n\t\t\t\t\t\tconst secondary = this.fill(field.optionSecondary, row)\n\t\t\t\t\t\treturn secondary ? { ...option, secondary } : option\n\t\t\t\t\t})\n\t\t\t\tthis.searchOptions = { ...this.searchOptions, [field.field]: options }\n\t\t\t} catch {\n\t\t\t\tthis.searchOptions = { ...this.searchOptions, [field.field]: [] }\n\t\t\t} finally {\n\t\t\t\tthis.searching = ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The items of a checks field, from `options` or the record's `itemsPath`.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-checks-cards/specs/action-dialog-checks-cards/spec.md#requirement-a-field-ticks-several-items\n\t\t * @param {object} field The field.\n\t\t * @return {Array<{value: string, label: string, secondary: string}>}\n\t\t */\n\t\tcheckItems(field) {\n\t\t\tconst listed = field.optionsSource ? this.remoteOptions[field.field] : (Array.isArray(field.options) ? field.options : readPath(this.record || {}, field.itemsPath || ''))\n\t\t\treturn (Array.isArray(listed) ? listed : []).map((item) => {\n\t\t\t\tif (item === null || typeof item !== 'object') {\n\t\t\t\t\treturn { value: String(item), label: String(item), secondary: '' }\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tvalue: String(readPath(item, field.optionValue || 'value') ?? item.id ?? ''),\n\t\t\t\t\tlabel: firstFilled(field.optionLabel || ['{label}', '{name}', '{title}'], item),\n\t\t\t\t\tsecondary: field.optionSecondary ? fillTemplate(field.optionSecondary, item) : '',\n\t\t\t\t}\n\t\t\t}).filter((item) => item.value !== '')\n\t\t},\n\n\t\t/**\n\t\t * The ticked values of a checks field: what the reader ticked, else its\n\t\t * `default`, a list or \"all\".\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-checks-cards/specs/action-dialog-checks-cards/spec.md#requirement-a-field-ticks-several-items\n\t\t * @param {object} field The field.\n\t\t * @return {Array<string>}\n\t\t */\n\t\tchecksValue(field) {\n\t\t\tif (Array.isArray(this.values[field.field])) {\n\t\t\t\treturn this.values[field.field]\n\t\t\t}\n\t\t\tif (field.default === 'all') {\n\t\t\t\treturn this.checkItems(field).map((item) => item.value)\n\t\t\t}\n\t\t\treturn Array.isArray(field.default) ? field.default.map(String) : []\n\t\t},\n\n\t\t/**\n\t\t * Tick or untick one item of a checks field.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @param {string} value The item's value.\n\t\t * @param {boolean} on Ticked.\n\t\t * @return {void}\n\t\t */\n\t\tsetCheck(field, value, on) {\n\t\t\tconst others = this.checksValue(field).filter((held) => held !== value)\n\t\t\tthis.values = { ...this.values, [field.field]: on ? [...others, value] : others }\n\t\t},\n\n\t\t/**\n\t\t * The options of a cards field, through the host translate.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-checks-cards/specs/action-dialog-checks-cards/spec.md#requirement-a-field-offers-one-choice-as-cards\n\t\t * @param {object} field The field.\n\t\t * @return {Array<object>}\n\t\t */\n\t\tcardOptions(field) {\n\t\t\treturn (Array.isArray(field.options) ? field.options : []).map((option) => ({\n\t\t\t\t...option,\n\t\t\t\tlabel: this.text(option.label) || String(option.value),\n\t\t\t\tdescription: this.text(option.description),\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * The value of a cards field: what the reader chose, else its `default`.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {string}\n\t\t */\n\t\tcardsValue(field) {\n\t\t\treturn this.values[field.field] ?? field.default ?? ''\n\t\t},\n\n\t\t/**\n\t\t * A checkbox field's state: what was ticked, else its `default`.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {boolean}\n\t\t * @spec openspec/changes/action-dialog-checkbox-field/specs/action-dialog-checkbox-field/spec.md#requirement-an-action-dialog-field-can-be-a-checkbox\n\t\t */\n\t\tcheckboxValue(field) {\n\t\t\treturn field.field in this.values ? this.values[field.field] === true : field.default === true\n\t\t},\n\n\t\t/**\n\t\t * Tick or untick a checkbox field.\n\t\t *\n\t\t * @param {string} name The field.\n\t\t * @param {boolean} on Ticked.\n\t\t * @return {void}\n\t\t */\n\t\tsetChecked(name, on) {\n\t\t\tthis.values = { ...this.values, [name]: on === true }\n\t\t},\n\n\t\ttext(value) {\n\t\t\treturn typeof value === 'string' && value !== '' ? this.cnTranslate(value) : ''\n\t\t},\n\n\t\t/**\n\t\t * A template filled from a row (the record by default), translated first.\n\t\t *\n\t\t * @param {unknown} template The template.\n\t\t * @param {object} [row] The row.\n\t\t * @return {string}\n\t\t */\n\t\tfill(template, row) {\n\t\t\tif (typeof template !== 'string' || template === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst formatters = { ...BUILT_IN_FORMATTERS, ...(this.cnFormatters || {}) }\n\t\t\treturn fillTemplate(this.cnTranslate(template), row || this.record || {}, new Date(), { formatters }).trim()\n\t\t},\n\n\t\t/**\n\t\t * Read an endpoint, fresh.\n\t\t *\n\t\t * @param {object} source An endpointSource block.\n\t\t * @return {Promise<unknown>}\n\t\t */\n\t\tread(source) {\n\t\t\treturn fetchEndpointSource(source, this.tokenCtx, { fresh: true })\n\t\t},\n\n\t\t/** @return {Promise<void>} */\n\t\tasync loadRecord() {\n\t\t\tconst source = this.config.source || (this.config.summary && this.config.summary.source)\n\t\t\tif (!source || !source.url) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst data = await this.read(source)\n\t\t\t\tthis.record = data && typeof data === 'object' ? data : this.record\n\t\t\t} catch {\n\t\t\t\t// The summary stays empty; the checklist and the action still work.\n\t\t\t}\n\t\t},\n\n\t\t/** @return {Promise<void>} */\n\t\tasync loadChecklist() {\n\t\t\tconst def = this.config.checklist\n\t\t\tif (!def || !def.source || !def.source.url) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst data = await this.read(def.source)\n\t\t\t\tconst list = def.itemsPath ? readPath(data, def.itemsPath) : data\n\t\t\t\tthis.items = Array.isArray(list) ? list.filter((item) => item && item.id !== undefined) : []\n\t\t\t} catch {\n\t\t\t\tthis.items = []\n\t\t\t\tthis.checklistError = t('nextcloud-vue', 'Whether this is ready could not be read.')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The entry of a list whose fields equal `match`, or null.\n\t\t *\n\t\t * @param {unknown} list The list.\n\t\t * @param {object} [match] The fields to match.\n\t\t * @return {object|null}\n\t\t */\n\t\tmatchIn(list, match) {\n\t\t\tconst wanted = Object.entries(match || {})\n\t\t\treturn (Array.isArray(list) ? list : []).find((entry) => entry && wanted.every(([key, value]) => String(entry[key]) === String(value))) || null\n\t\t},\n\n\t\t/**\n\t\t * A select field's options, labels translated.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {Array<{id: string, label: string, fills?: object}>}\n\t\t */\n\t\toptionsOf(field) {\n\t\t\tif (field.optionsSource) {\n\t\t\t\treturn this.remoteOptionsOf(field)\n\t\t\t}\n\t\t\treturn (Array.isArray(field.options) ? field.options : []).map((o) => ({ id: String(o.value), label: this.text(o.label) || String(o.value), fills: o.fills }))\n\t\t},\n\n\t\t/**\n\t\t * A select field's options read from its `optionsSource`: each entry's\n\t\t * `optionValue` (default `id`) and the first `optionLabel` that fills.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-a-field-reads-its-options-from-an-endpoint\n\t\t * @param {object} field The field.\n\t\t * @return {Array<{id: string, label: string}>}\n\t\t */\n\t\tremoteOptionsOf(field) {\n\t\t\tconst labels = field.optionLabel || ['{label}', '{name}', '{title}']\n\t\t\treturn (this.remoteOptions[field.field] || [])\n\t\t\t\t.map((row) => ({ id: String(readPath(row, field.optionValue || 'id') ?? ''), row }))\n\t\t\t\t.filter((option) => option.id !== '')\n\t\t\t\t.map(({ id, row }) => ({ id, label: firstFilled(labels, row, this.cnTranslate) || id }))\n\t\t},\n\n\t\t/**\n\t\t * Whether a field's `visibleWhen` holds, and the field it reads (if any)\n\t\t * shows too, so hiding one field hides the fields that depend on it.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-a-field-shows-only-when-another-value-says-so\n\t\t * @param {object} field The field.\n\t\t * @param {number} depth How many fields deep the check is, to stop a loop.\n\t\t * @return {boolean}\n\t\t */\n\t\tfieldShown(field, depth) {\n\t\t\tif (!isShown(field, this.shownState)) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst parent = this.parentOf(field)\n\t\t\treturn !parent || (depth < 8 && this.fieldShown(parent, depth + 1))\n\t\t},\n\n\t\t/**\n\t\t * The field another field's `visibleWhen` reads, or null.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {object|null}\n\t\t */\n\t\tparentOf(field) {\n\t\t\tconst name = field.visibleWhen && field.visibleWhen.field\n\t\t\treturn typeof name === 'string' ? (this.fields.find((other) => other.field === name) || null) : null\n\t\t},\n\n\t\t/**\n\t\t * A field's value by key: a checkbox as a boolean, a checks field as a\n\t\t * list (one per column with `columns`), the others as entered.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {object}\n\t\t */\n\t\theldValues(field) {\n\t\t\tif (this.hasColumns(field)) {\n\t\t\t\treturn Object.fromEntries(field.columns.map((column) => [column.field, this.columnValue(column)]))\n\t\t\t}\n\t\t\tconst read = { checks: this.checksValue, cards: this.cardsValue, checkbox: this.checkboxValue }[field.type] || this.plainValue\n\t\t\treturn { [field.field]: read(field) }\n\t\t},\n\n\t\t/**\n\t\t * Whether a shown field holds what it needs: a checkbox is ticked when\n\t\t * `required: true`; any other field has a value unless `required: false`\n\t\t * or a secret is stored.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-fields-and-acts/specs/action-dialog/spec.md#requirement-an-action-dialog-asks-for-fields-and-reads-a-permission-from-a-list\n\t\t * @param {object} field The field.\n\t\t * @return {boolean}\n\t\t */\n\t\tfieldFilled(field) {\n\t\t\tif (field.type === 'checkbox') {\n\t\t\t\treturn field.required !== true || this.checkboxValue(field)\n\t\t\t}\n\t\t\tif (field.required === false || this.secretStored(field)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tconst held = Object.values(this.heldValues(field))\n\t\t\treturn this.hasColumns(field) ? held.some(isFilled) : isFilled(held[0])\n\t\t},\n\n\t\t/**\n\t\t * A select or text field's value: what was entered, else its `default`.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {string}\n\t\t */\n\t\tplainValue(field) {\n\t\t\tif (field.field in this.values) {\n\t\t\t\treturn this.values[field.field] ?? ''\n\t\t\t}\n\t\t\treturn field.type === 'select' && field.default !== undefined ? String(field.default) : ''\n\t\t},\n\n\t\t/**\n\t\t * Whether a select field reads its options again as the reader types.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {boolean}\n\t\t */\n\t\tsearchesRemotely(field) {\n\t\t\treturn Boolean(field.optionsSource && field.optionsSource.search === true)\n\t\t},\n\n\t\t/**\n\t\t * Read a searching select field's options again once typing rests.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @param {string} typed What the reader typed.\n\t\t * @return {void}\n\t\t */\n\t\tonOptionsSearch(field, typed) {\n\t\t\tif (!this.searchesRemotely(field)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tclearTimeout(this.optionsTimer)\n\t\t\tthis.optionsTimer = setTimeout(() => this.loadOptions(field, String(typed || '').trim()), SEARCH_DELAY)\n\t\t},\n\n\t\t/**\n\t\t * Read a field's `optionsSource`, keep the entries `match` allows, and\n\t\t * say so when the read fails rather than offer an empty list.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-a-field-reads-its-options-from-an-endpoint\n\t\t * @param {object} field The field.\n\t\t * @param {string} term What the reader typed, or ''.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadOptions(field, term) {\n\t\t\tconst source = field.optionsSource\n\t\t\tif (!source || !source.url) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.loadingOptions = field.field\n\t\t\ttry {\n\t\t\t\tconst rows = matchingRows(await this.read(optionsRead(source, term)), source.match)\n\t\t\t\tthis.remoteOptions = { ...this.remoteOptions, [field.field]: rows }\n\t\t\t\tthis.optionsErrors = { ...this.optionsErrors, [field.field]: '' }\n\t\t\t} catch {\n\t\t\t\tthis.optionsErrors = { ...this.optionsErrors, [field.field]: this.text(source.errorText) || t('nextcloud-vue', 'The options could not be read.') }\n\t\t\t} finally {\n\t\t\t\tthis.loadingOptions = ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Whether a checks field ticks per column.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {boolean}\n\t\t */\n\t\thasColumns(field) {\n\t\t\treturn field.type === 'checks' && Array.isArray(field.columns) && field.columns.length > 0\n\t\t},\n\n\t\t/**\n\t\t * The values ticked in one column of a checks field; nothing is ticked\n\t\t * at the start.\n\t\t *\n\t\t * @param {{field: string}} column The column.\n\t\t * @return {Array<string>}\n\t\t */\n\t\tcolumnValue(column) {\n\t\t\treturn Array.isArray(this.values[column.field]) ? this.values[column.field] : []\n\t\t},\n\n\t\t/**\n\t\t * The items of an `exclusive` checks field ticked in more than one column.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-a-checks-field-can-tick-in-columns-that-exclude-each-other\n\t\t * @param {object} field The field.\n\t\t * @return {Array<string>}\n\t\t */\n\t\tconflicts(field) {\n\t\t\treturn this.hasColumns(field) && field.exclusive === true ? tickedTwice(field.columns, this.values) : []\n\t\t},\n\n\t\t/**\n\t\t * What one shown field sends, by key.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-ticked-can-mean-left-out\n\t\t * @param {object} field The field.\n\t\t * @return {object}\n\t\t */\n\t\tsentOf(field) {\n\t\t\tif (this.hasColumns(field)) {\n\t\t\t\treturn this.heldValues(field)\n\t\t\t}\n\t\t\tif (field.type === 'secret' && String(this.values[field.field] ?? '') === '') {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t\tconst value = field.type === 'checks'\n\t\t\t\t? checksSent(field, { ticked: this.checksValue(field), items: this.checkItems(field) })\n\t\t\t\t: this.fieldValues[field.field]\n\t\t\treturn { [field.sendAs || field.field]: value }\n\t\t},\n\n\t\t/**\n\t\t * A select field's chosen option.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {object|null}\n\t\t */\n\t\tselectedOption(field) {\n\t\t\treturn this.optionsOf(field).find((o) => o.id === String(this.plainValue(field))) || null\n\t\t},\n\n\t\t/**\n\t\t * Set a field's value.\n\t\t *\n\t\t * @param {string} name The field.\n\t\t * @param {unknown} value The value.\n\t\t */\n\t\tsetValue(name, value) {\n\t\t\tthis.values = { ...this.values, [name]: value === null || value === undefined ? '' : String(value) }\n\t\t},\n\n\t\t/**\n\t\t * Choose a select option; its `fills` set the fields still empty.\n\t\t *\n\t\t * @param {object} field The select field.\n\t\t * @param {{id: string, fills?: object}|null} option The option.\n\t\t */\n\t\tpick(field, option) {\n\t\t\tthis.setValue(field.field, option ? option.id : '')\n\t\t\tfor (const [name, value] of Object.entries((option && option.fills) || {})) {\n\t\t\t\tif (String(this.values[name] ?? '').trim() === '') {\n\t\t\t\t\tthis.setValue(name, this.text(value) || value)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/** @return {Promise<void>} */\n\t\tasync loadPermission() {\n\t\t\tconst def = this.config.permission\n\t\t\tif (!def || !def.source || !def.source.url) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst data = await this.read(def.source)\n\t\t\t\tconst entry = def.listPath ? this.matchIn(readPath(data, def.listPath), def.match) : data\n\t\t\t\tthis.allowed = readPath(entry, def.allowedPath || 'allowed') === true\n\t\t\t\tthis.refusal = this.allowed || !def.reasonPath ? '' : String(readPath(entry, def.reasonPath) || '')\n\t\t\t} catch {\n\t\t\t\tthis.allowed = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Run the action once: post `confirm.request`, or dispatch\n\t\t * `confirm.action`, then show the done text and refresh the page.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog/specs/action-dialog/spec.md#requirement-a-manifest-configures-an-action-dialog\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync confirm() {\n\t\t\tif (!this.canConfirm) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.busy = true\n\t\t\tthis.refusal = ''\n\t\t\ttry {\n\t\t\t\tawait this.runAct(this.reason.trim())\n\t\t\t\tthis.finish()\n\t\t\t} catch (failure) {\n\t\t\t\tthis.refusal = this.refusalOf(failure)\n\t\t\t} finally {\n\t\t\t\tthis.busy = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * After the act: refresh the page, report `done`, and show the done\n\t\t * text, or with `closeOnDone` say it as a toast and close.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-share-look-and-outcome/specs/action-dialog/spec.md#requirement-the-dialog-can-close-once-the-act-ran\n\t\t * @return {void}\n\t\t */\n\t\tfinish() {\n\t\t\tconst closing = this.config.closeOnDone === true\n\t\t\tthis.done = !closing\n\t\t\temit(PAGE_REFRESH, {})\n\t\t\t/** @event done The action ran. Payload: the sent field values and `reason`. */\n\t\t\tthis.$emit('done', { ...this.sentValues, reason: this.reason.trim() })\n\t\t\tif (closing) {\n\t\t\t\tshowSuccess(this.doneMessage)\n\t\t\t\tthis.$emit('close')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * A failed act in words: the server's message, else the configured\n\t\t * `errorText`, else the library's sentence.\n\t\t *\n\t\t * @param {unknown} failure The error axios threw.\n\t\t * @return {string}\n\t\t */\n\t\trefusalOf(failure) {\n\t\t\tconst data = failure && failure.response && failure.response.data\n\t\t\tconst said = data && (data.message || data.error)\n\t\t\treturn String(said || this.text(this.request?.errorText || this.confirmConfig.errorText) || t('nextcloud-vue', 'The action could not be completed.'))\n\t\t},\n\n\t\t/**\n\t\t * What a body or done text template reads: the sent values under\n\t\t * `fields`, the record, the reason, the chosen entries under `chosen`\n\t\t * and the record's id as `objectId`.\n\t\t *\n\t\t * @param {string} reason The reason given.\n\t\t * @return {object}\n\t\t */\n\t\ttemplateContext(reason) {\n\t\t\treturn { fields: this.sentValues, ...(this.record || {}), reason, chosen: this.chosenRows, objectId: this.recordId }\n\t\t},\n\n\t\t/**\n\t\t * Post the chosen act's request, or dispatch `confirm.action`.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-each-act-posts-to-its-own-endpoint\n\t\t * @param {string} reason The reason given.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync runAct(reason) {\n\t\t\tconst request = this.request\n\t\t\tif (request && request.url) {\n\t\t\t\tawait this.post(request, reason)\n\t\t\t} else if (this.confirmConfig.action && typeof this.cnDispatchAction === 'function') {\n\t\t\t\tawait this.cnDispatchAction({ ...this.confirmConfig.action, args: [...(this.confirmConfig.action.args || []), { ...this.sentValues, reason }] })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Send one request and keep the text at its `answerPath`.\n\t\t *\n\t\t * @param {object} request The request.\n\t\t * @param {string} reason The reason given.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync post(request, reason) {\n\t\t\tconst url = interpolateUrlTokens(request.url, this.tokenCtx)\n\t\t\tconst method = String(request.method || 'POST').toLowerCase()\n\t\t\tconst send = axios[['post', 'put', 'patch', 'delete'].includes(method) ? method : 'post']\n\t\t\tconst answer = await send(/^https?:\\/\\//i.test(url) ? url : generateUrl(url), this.requestBody(request, reason))\n\t\t\tif (request.answerPath) {\n\t\t\t\tconst said = readPath(answer?.data, request.answerPath)\n\t\t\t\tthis.answerText = said === null || said === undefined ? '' : String(said)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * A request's body: its `body` templates filled from the record, the\n\t\t * reason and `fields`, then the reason and the sent field values unless\n\t\t * `fieldsInBody` is false.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-acts-and-sources/specs/action-dialog/spec.md#requirement-each-act-posts-to-its-own-endpoint\n\t\t * @param {object} request The request.\n\t\t * @param {string} reason The reason given.\n\t\t * @return {object}\n\t\t */\n\t\trequestBody(request, reason) {\n\t\t\tconst filler = { context: this.templateContext(reason), fill: (value, context) => fillTemplate(value, context) }\n\t\t\tconst body = {}\n\t\t\tfor (const [key, value] of Object.entries(request.body || {})) {\n\t\t\t\tbody[key] = bodyValue(value, filler)\n\t\t\t}\n\t\t\tif (request.fieldsInBody === false) {\n\t\t\t\treturn body\n\t\t\t}\n\t\t\tif (this.config.reason) {\n\t\t\t\tbody[this.config.reason.field || 'reason'] = reason\n\t\t\t}\n\t\t\treturn Object.assign(body, this.sentValues)\n\t\t},\n\n\t\t/**\n\t\t * Start each field with `valuePath` from the record, unless it was\n\t\t * already edited.\n\t\t *\n\t\t * @spec openspec/changes/action-dialog-secret-field/specs/action-dialog/spec.md#requirement-a-field-can-start-from-the-record-and-a-secret-is-write-only\n\t\t * @return {void}\n\t\t */\n\t\tstartValues() {\n\t\t\tif (!this.record) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst values = { ...this.values }\n\t\t\tfor (const field of this.fields) {\n\t\t\t\tif (field.valuePath && !['secret', 'checks'].includes(field.type) && !(field.field in values)) {\n\t\t\t\t\tconst value = readPath(this.record, field.valuePath)\n\t\t\t\t\tif (value !== null && value !== undefined) {\n\t\t\t\t\t\tvalues[field.field] = String(value)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.values = values\n\t\t},\n\n\t\t/**\n\t\t * Whether a secret field has a value stored: `storedPath` reads true on the record.\n\t\t *\n\t\t * @param {object} field The field.\n\t\t * @return {boolean}\n\t\t */\n\t\tsecretStored(field) {\n\t\t\treturn field.type === 'secret' && Boolean(field.storedPath && this.record && readPath(this.record, field.storedPath))\n\t\t},\n\n\t\t/** Close the dialog, unless the action is running. */\n\t\tclose() {\n\t\t\tif (this.busy) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t/** @event close The dialog was closed. */\n\t\t\tthis.$emit('close')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* The parts stand 18px apart, as the board draws the dialog (DqArchiveren). */\n.cn-action-dialog {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 18px;\n}\n\n.cn-action-dialog__summary {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 12px;\n\tpadding: 12px 14px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-large, 10px);\n}\n\n/* The record's icon on a tinted tile (DqArchiveren). */\n.cn-action-dialog__summary-icon {\n\tdisplay: flex;\n\tflex: none;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 36px;\n\theight: 36px;\n\tborder-radius: 8px;\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n}\n\n.cn-action-dialog__summary-text strong {\n\tfont-size: 15px;\n\tfont-weight: 600;\n\tline-height: 1.2;\n}\n\n.cn-action-dialog__summary-text .cn-action-dialog__muted {\n\tfont-size: 13px;\n}\n\n.cn-action-dialog__summary-text {\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\tflex-direction: column;\n\tmin-width: 0;\n}\n\n.cn-action-dialog__badge {\n\tpadding: 3px 10px;\n\tborder-radius: 12px;\n\tfont-size: 13px;\n\tfont-weight: 600;\n\tline-height: normal;\n\twhite-space: nowrap;\n}\n\n/* Without a tone (`badgeVariant`, `badgeColorMap`) the badge is neutral. */\n.cn-action-dialog__badge:not([class*='cn-status-badge--']) {\n\tbackground: var(--color-background-dark);\n}\n\n.cn-action-dialog__title {\n\tmargin: 0 0 8px;\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tline-height: normal;\n}\n\n/* Facts in columns of at least 200px, each a label over its value above a\n hairline, both on the font's normal line (DqArchiveren \"Bewaring volgens\n het zaaktype\", rows 59px). */\n.cn-action-dialog__facts {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\tgap: 12px 24px;\n\tmargin: 0;\n\t/* The server pads every dl 12px. */\n\tpadding: 0;\n}\n\n.cn-action-dialog__fact {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 3px;\n\tpadding-bottom: 10px;\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n/* The server draws every dt as a 130px right-aligned inline block and pads\n dt and dd 12px; a fact is a label over its value. */\n.cn-action-dialog__facts dt,\n.cn-action-dialog__facts dd {\n\tdisplay: block;\n\twidth: auto;\n\twhite-space: normal;\n\ttext-align: start;\n}\n\n.cn-action-dialog__facts dt {\n\tmargin: 0;\n\tpadding: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n\tline-height: normal;\n}\n\n.cn-action-dialog__facts dd {\n\tmargin: 0;\n\tpadding: 0;\n\tfont-size: 15px;\n\tfont-weight: 500;\n\tline-height: normal;\n}\n\n/* Checklist rows divided by hairlines, the detail at the row's end\n (DqArchiveren \"Klaar om te archiveren\"). */\n.cn-action-dialog__checks {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-action-dialog__check {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 2px 12px;\n\tpadding: 10px 0;\n\tborder-top: 1px solid var(--color-border);\n\tfont-size: 15px;\n}\n\n.cn-action-dialog__check-label {\n\tflex: 1 1 auto;\n\tfont-weight: 600;\n}\n\n.cn-action-dialog__check-icon {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-action-dialog__check-icon--met {\n\tcolor: var(--color-success-text, var(--color-success));\n}\n\n.cn-action-dialog__muted {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 14px;\n}\n\n/* A checkbox field is a tinted box with a 2px edge, its label bold and its\n hint under it (DqArchiveren). */\n/* A note's own icon stands on the heading's line, as the variant's icon\n does (NcNoteCard centres a slotted icon on the whole note). */\n.cn-action-dialog__note-icon {\n\talign-self: flex-start;\n\tmargin-top: 1px;\n}\n\n/* Two classes: the switch root's own `padding: 0` weighs the same and is\n injected again by every bundle that ships NcCheckboxRadioSwitch. */\n.cn-action-dialog__checkbox.checkbox-radio-switch {\n\tpadding: 12px 14px;\n}\n\n.cn-action-dialog__checkbox {\n\tborder: 2px solid var(--color-primary-element);\n\tborder-radius: var(--border-radius-element, 8px);\n\tbackground: var(--color-main-background);\n}\n\n/* The box sits at the card's inset, 12px before the label, the label on\n its first line (DqArchiveren \"Sanne de Vries laten weten ...\"):\n NcCheckboxRadioSwitch pads its row and centres a 34px target. */\n.cn-action-dialog__checkbox :deep(.checkbox-content) {\n\tpadding: 0;\n\tgap: 12px;\n\talign-items: flex-start;\n\tmin-height: 0;\n}\n\n.cn-action-dialog__checkbox :deep(.checkbox-content__icon) {\n\tmargin: 0;\n}\n\n.cn-action-dialog__checkbox :deep(.checkbox-radio-switch__input) {\n\tmin-height: 0;\n}\n\n.cn-action-dialog__checkbox-text {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n}\n\n.cn-action-dialog__checkbox-label {\n\tfont-size: 15px;\n\tfont-weight: 600;\n\tline-height: 1.2;\n}\n\n.cn-action-dialog__checkbox .cn-action-dialog__muted {\n\tfont-size: 13px;\n}\n\n/* A plain checkbox: the box and its label on one line, no tinted card\n (DqZaakSamenwerken \"Alleen een deel van de zaakvelden delen\"). */\n.cn-action-dialog__checkbox--plain.checkbox-radio-switch {\n\tpadding: 0;\n}\n\n.cn-action-dialog__checkbox--plain {\n\tborder: 0;\n\tbackground: transparent;\n}\n\n.cn-action-dialog__checkbox--plain :deep(.checkbox-content) {\n\tgap: 10px;\n\talign-items: center;\n}\n\n.cn-action-dialog__checkbox--plain .cn-action-dialog__checkbox-label {\n\tfont-size: 14px;\n}\n\n.cn-action-dialog__checks {\n\tborder: 0;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-action-dialog__checks-legend {\n\tfont-weight: 600;\n\tmargin-bottom: 4px;\n\tpadding: 0;\n}\n\n.cn-action-dialog__field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n/* The reason's help line is 13px on the normal line, right under the text\n area: the inline text area left a descender gap and NcTextArea's 2px\n ring room came on top (DqArchiveren \"Komt in de historie ...\"). */\n.cn-action-dialog__hint {\n\tfont-size: 13px;\n\tline-height: normal;\n}\n\n.cn-action-dialog__reason :deep(.textarea__input) {\n\tvertical-align: top;\n}\n\n.cn-action-dialog__reason :deep(.textarea) {\n\tmargin-block-end: -2px;\n}\n\n.cn-action-dialog__error {\n\tmargin: 0;\n\tcolor: var(--color-error-text, var(--color-error));\n}\n</style>\n"],"names":["_createVNode","_createBlock","_createTextVNode","_createElementBlock","_openBlock","_createElementVNode","_toDisplayString","_normalizeClass","_Fragment","_renderList"],"mappings":";;;;AAmBuB,EAAA,KAAK,EAAC,2BAAmB;AAAA,EAAA,aAAA,EAAA,0BAAA;;AACtC,MAAA,UAAA,GAAA,EAAA,KAAM,EAAA,gCAAwB,GAAA;AAGhC,MAAA,UAAA,GAAA,EAAA,KAAA,EAAA,gCAAA,GAAA;;;AAEuB,EAAA,KAAI,EAAA,yBAA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3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-e8e28cd0";
5
+ script.__scopeId = "data-v-590c4483";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -193,6 +193,13 @@ var script = {
193
193
  return this.activeEditor ? this.unref(this.activeEditor.working) : null
194
194
  },
195
195
 
196
+ /** @return {string} Where flows open in list mode, '' for an app without such a page. */
197
+ flowListRoute() {
198
+ const page = (this.effectiveManifest?.pages || []).find((candidate) => ['flow', 'flow-detail'].includes(candidate?.type) && candidate?.config?.listMode === true);
199
+
200
+ return page ? String(page.route || '').replace(':id', 'new') : ''
201
+ },
202
+
196
203
  /** The manifest to read page metadata from: working copy, else the live one. */
197
204
  effectiveManifest() {
198
205
  return this.workingManifest || this.unref(this.cnManifest) || null
@@ -568,7 +575,11 @@ var script = {
568
575
  * store, and there is one editor for it.
569
576
  */
570
577
  onEditFlows() {
571
- this.showFlowsCanvasModal = true;
578
+ if (this.flowListRoute !== '' && this.$router) {
579
+ this.$router.push({ path: this.flowListRoute, query: { view: 'list' } });
580
+ } else {
581
+ this.showFlowsCanvasModal = true;
582
+ }
572
583
  this.menuOpen = false;
573
584
  /**
574
585
  * @event edit-flows Emitted when the flows editor opens.