@conduction/nextcloud-vue 2.106.0 → 2.107.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 (135) hide show
  1. package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +9 -0
  2. package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js.map +1 -0
  3. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +338 -0
  4. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -0
  5. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +249 -0
  6. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -0
  7. package/dist/esm/components/CnAdvancedFormDialog/CnPropertiesTab.vue2.js +2 -2
  8. package/dist/esm/components/CnAdvancedFormDialog/CnPropertiesTab.vue2.js.map +1 -1
  9. package/dist/esm/components/CnAppNav/CnAppNav.vue2.js.map +1 -1
  10. package/dist/esm/components/CnAppNav/CnAppNav.vue3.js +145 -138
  11. package/dist/esm/components/CnAppNav/CnAppNav.vue3.js.map +1 -1
  12. package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js +102 -2
  13. package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js.map +1 -1
  14. package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js.map +1 -1
  15. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
  16. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +83 -6
  17. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  18. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +4 -2
  19. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  20. package/dist/esm/components/CnIcon/semanticIcons.js +2 -2
  21. package/dist/esm/components/CnIcon/semanticIcons.js.map +1 -1
  22. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +389 -20
  23. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  24. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +68 -35
  25. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  26. package/dist/esm/components/CnIndexPage/useSelfFetchList.js +22 -2
  27. package/dist/esm/components/CnIndexPage/useSelfFetchList.js.map +1 -1
  28. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js +69 -5
  29. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js.map +1 -1
  30. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js +38 -5
  31. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js.map +1 -1
  32. package/dist/esm/components/CnMapWidget/CnMapWidget.vue.js +1 -1
  33. package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js +7 -1
  34. package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js.map +1 -1
  35. package/dist/esm/components/CnMapWidget/CnMapWidget.vue3.js.map +1 -1
  36. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue.js +8 -0
  37. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue.js.map +1 -0
  38. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue2.js +297 -0
  39. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue2.js.map +1 -0
  40. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue3.js +24 -0
  41. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue3.js.map +1 -0
  42. package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue.js +9 -0
  43. package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue.js.map +1 -0
  44. package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue2.js +95 -0
  45. package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue2.js.map +1 -0
  46. package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue3.js +123 -0
  47. package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue3.js.map +1 -0
  48. package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue.js +1 -1
  49. package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue2.js +13 -5
  50. package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue2.js.map +1 -1
  51. package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue3.js +3 -1
  52. package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue3.js.map +1 -1
  53. package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue.js +1 -1
  54. package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue2.js +49 -23
  55. package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue2.js.map +1 -1
  56. package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue3.js +74 -27
  57. package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue3.js.map +1 -1
  58. package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue.js +0 -1
  59. package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue.js.map +1 -1
  60. package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue2.js +18 -413
  61. package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue2.js.map +1 -1
  62. package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue3.js +27 -214
  63. package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue3.js.map +1 -1
  64. package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue.js +9 -0
  65. package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue.js.map +1 -0
  66. package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue2.js +190 -0
  67. package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue2.js.map +1 -0
  68. package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue3.js +270 -0
  69. package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue3.js.map +1 -0
  70. package/dist/esm/index.js +4 -0
  71. package/dist/esm/index.js.map +1 -1
  72. package/dist/esm/l10n/en.json.js +56 -1
  73. package/dist/esm/l10n/en.json.js.map +1 -1
  74. package/dist/esm/l10n/nl.json.js +56 -1
  75. package/dist/esm/l10n/nl.json.js.map +1 -1
  76. package/dist/esm/library-style.js +1 -1
  77. package/dist/esm/mixins/savedViewsList.js +235 -0
  78. package/dist/esm/mixins/savedViewsList.js.map +1 -0
  79. package/dist/esm/nextcloud-vue.css +348 -108
  80. package/dist/esm/utils/actionsDispatcher.js +2 -2
  81. package/dist/esm/utils/actionsDispatcher.js.map +1 -1
  82. package/dist/esm/utils/builtInModals.js +39 -0
  83. package/dist/esm/utils/builtInModals.js.map +1 -0
  84. package/dist/esm/utils/mapMarkerColor.js +121 -0
  85. package/dist/esm/utils/mapMarkerColor.js.map +1 -0
  86. package/dist/esm/utils/mergeManifestDelta.js +4 -0
  87. package/dist/esm/utils/mergeManifestDelta.js.map +1 -1
  88. package/dist/esm/utils/savedViewHelpers.js +59 -7
  89. package/dist/esm/utils/savedViewHelpers.js.map +1 -1
  90. package/dist/esm/utils/savedViewMenu.js +154 -0
  91. package/dist/esm/utils/savedViewMenu.js.map +1 -0
  92. package/dist/esm/utils/searchGroupSharees.js +50 -15
  93. package/dist/esm/utils/searchGroupSharees.js.map +1 -1
  94. package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
  95. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  96. package/dist/nextcloud-vue.cjs.js +13351 -10855
  97. package/dist/nextcloud-vue.cjs.js.map +2 -2
  98. package/dist/nextcloud-vue.css +348 -108
  99. package/l10n/en.json +56 -1
  100. package/l10n/nl.json +56 -1
  101. package/package.json +1 -1
  102. package/src/components/CnActionDialog/CnActionDialog.vue +545 -0
  103. package/src/components/CnActionDialog/index.js +12 -0
  104. package/src/components/CnAppNav/CnAppNav.vue +17 -0
  105. package/src/components/CnAppRoot/CnAppRoot.vue +102 -2
  106. package/src/components/CnDashboardPage/CnDashboardPage.vue +86 -7
  107. package/src/components/CnIndexPage/CnIndexPage.vue +409 -23
  108. package/src/components/CnIndexPage/useSelfFetchList.js +21 -1
  109. package/src/components/CnIndexSidebar/CnIndexSidebar.md +2 -0
  110. package/src/components/CnIndexSidebar/CnIndexSidebar.vue +91 -1
  111. package/src/components/CnMapWidget/CnMapWidget.vue +16 -1
  112. package/src/components/CnPartyPicker/CnPartyPicker.vue +317 -0
  113. package/src/components/CnPartyPicker/index.js +11 -0
  114. package/src/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue +192 -0
  115. package/src/components/CnSavedViewEditDialog/index.js +11 -0
  116. package/src/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue +21 -6
  117. package/src/components/CnSavedViewShareFields/CnSavedViewShareFields.vue +130 -37
  118. package/src/components/CnSavedViewsControl/CnSavedViewsControl.vue +36 -599
  119. package/src/components/CnSavedViewsPanel/CnSavedViewsPanel.vue +459 -0
  120. package/src/components/CnSavedViewsPanel/index.js +11 -0
  121. package/src/components/index.js +4 -0
  122. package/src/css/index-page.css +16 -0
  123. package/src/css/look-board-index.css +5 -3
  124. package/src/css/look-board.css +18 -3
  125. package/src/index.js +4 -0
  126. package/src/mixins/savedViewsList.js +231 -0
  127. package/src/schemas/app-manifest-v2.schema.json +98 -3
  128. package/src/utils/actionsDispatcher.js +2 -2
  129. package/src/utils/builtInModals.js +35 -0
  130. package/src/utils/mapMarkerColor.js +117 -0
  131. package/src/utils/mergeManifestDelta.js +4 -0
  132. package/src/utils/savedViewHelpers.js +58 -6
  133. package/src/utils/savedViewMenu.js +150 -0
  134. package/src/utils/searchGroupSharees.js +49 -14
  135. package/src/utils/validateManifestV2.compiled.js +3 -3
@@ -0,0 +1,9 @@
1
+ import script from './CnActionDialog.vue2.js';
2
+ import { render } from './CnActionDialog.vue3.js';
3
+
4
+ script.render = render;
5
+ script.__scopeId = "data-v-53fea6f0";
6
+ const __sfc_main = script;
7
+
8
+ export { __sfc_main as default };
9
+ //# sourceMappingURL=CnActionDialog.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CnActionDialog.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -0,0 +1,338 @@
1
+ import axios__default from '@nextcloud/axios';
2
+ import { emit } from '@nextcloud/event-bus';
3
+ import { translate } from '@nextcloud/l10n';
4
+ import { generateUrl } from '@nextcloud/router';
5
+ import { NcButton, NcNoteCard, NcTextArea } from '@nextcloud/vue';
6
+ import CheckCircle from 'vue-material-design-icons/CheckCircle.vue';
7
+ import CircleOutline from 'vue-material-design-icons/CircleOutline.vue';
8
+ import HelpCircleOutline from 'vue-material-design-icons/HelpCircleOutline.vue';
9
+ import { fetchEndpointSource, interpolateUrlTokens } from '../../composables/useEndpointSource.js';
10
+ import { fillTemplate } from '../../utils/fillTemplate.js';
11
+ import { readPath } from '../../utils/readPath.js';
12
+ import __sfc_main from '../CnDialog/CnDialog.vue.js';
13
+ import __sfc_main$1 from '../CnIcon/CnIcon.vue.js';
14
+
15
+ /** The page refresh channel the built-in widgets listen on. */
16
+ const PAGE_REFRESH = 'cn:page:refresh';
17
+
18
+ /** Gives each dialog's reason field its own id. */
19
+ let reasonSeq = 0;
20
+
21
+ /**
22
+ * CnActionDialog — the generic "summary, checklist, reason, confirm" dialog
23
+ * for an act on a record, configured from the manifest (an `open-modal`
24
+ * action's props), so an app does not hand-build each one. dossiq's archive
25
+ * dialog (board DqArchiveren) is the first: the case, what its case type
26
+ * keeps, a readiness checklist read from an endpoint, a reason, a read-only
27
+ * note and Archive it.
28
+ *
29
+ * `config`:
30
+ * - `title`, `eyebrow`, `subtitle`, `doneText`: texts, through the host translate.
31
+ * - `summary`: `{ source?, title, meta?, badge?, icon? }`: templates filled from
32
+ * the record (`source` an endpointSource to read it from, else `object`).
33
+ * - `facts`: `[{ title?, items: [{ label, value }] }]`, `value` a template.
34
+ * - `checklist`: `{ title?, source, itemsPath?, labels?, required? }`: items
35
+ * `{ id, met, label?, detail? }` read from `source`; `labels[id]` gives an
36
+ * item's `{ label, detail?, unmetDetail? }`; the ids in `required` must be
37
+ * met before the action can run. `met: null` reads as unknown.
38
+ * - `permission`: `{ source, allowedPath, reasonPath? }`: the action runs only
39
+ * while `allowedPath` reads true; `reasonPath` says why not.
40
+ * - `reason`: `{ label?, hint?, required?, field? }`: a text area; required by
41
+ * default; sent as `field` (default `reason`).
42
+ * - `note`: `{ variant?, title?, text }`: a read-only note.
43
+ * - `confirm`: `{ label, icon?, request?: { method?, url, body? }, action? }`.
44
+ * `request` posts itself (`body` templates filled with the record and
45
+ * `{reason}`); `action` dispatches a manifest action through the page.
46
+ *
47
+ * Tokens (`@objectId`, `@object.<field>`) resolve in every url.
48
+ */
49
+ var script = {
50
+ name: 'CnActionDialog',
51
+
52
+ components: { CheckCircle, CircleOutline, CnDialog: __sfc_main, CnIcon: __sfc_main$1, HelpCircleOutline, NcButton, NcNoteCard, NcTextArea },
53
+
54
+ inject: {
55
+ /** The host app's translate (CnAppRoot `cnTranslate`). */
56
+ cnTranslate: { default: () => (key) => key },
57
+ /** The page's pre-bound action dispatcher (CnPageRenderer), for `confirm.action`. */
58
+ cnDispatchAction: { default: null },
59
+ },
60
+
61
+ props: {
62
+ /**
63
+ * The dialog's configuration (see the component docs).
64
+ *
65
+ * @type {object}
66
+ */
67
+ config: {
68
+ type: Object,
69
+ default: () => ({}),
70
+ },
71
+
72
+ /** The record's id, for the `@objectId` token. */
73
+ objectId: {
74
+ type: [String, Number],
75
+ default: '',
76
+ },
77
+
78
+ /**
79
+ * The record, when the host has it: the summary and facts read it.
80
+ *
81
+ * @type {object|null}
82
+ */
83
+ object: {
84
+ type: Object,
85
+ default: null,
86
+ },
87
+ },
88
+
89
+ emits: ['close', 'done'],
90
+
91
+ data() {
92
+ return {
93
+ record: this.object,
94
+ items: [],
95
+ checklistError: '',
96
+ allowed: true,
97
+ reason: '',
98
+ busy: false,
99
+ refusal: '',
100
+ done: false,
101
+ reasonId: `cn-action-dialog-reason-${++reasonSeq}`,
102
+ }
103
+ },
104
+
105
+ computed: {
106
+ /** @return {object} The token context. */
107
+ tokenCtx() {
108
+ return { objectId: this.objectId, object: this.record || {} }
109
+ },
110
+
111
+ /** @return {object} The confirm config. */
112
+ confirmConfig() {
113
+ return this.config.confirm && typeof this.config.confirm === 'object' ? this.config.confirm : {}
114
+ },
115
+
116
+ /**
117
+ * The summary row, or null without one or before the record is known.
118
+ *
119
+ * @spec openspec/changes/action-dialog/specs/action-dialog/spec.md#requirement-a-manifest-configures-an-action-dialog
120
+ * @return {{title: string, meta: string, badge: string}|null}
121
+ */
122
+ summary() {
123
+ const def = this.config.summary;
124
+ if (!def || !this.record) {
125
+ return null
126
+ }
127
+ const title = this.fill(def.title);
128
+ return title ? { title, meta: this.fill(def.meta), badge: this.fill(def.badge) } : null
129
+ },
130
+
131
+ /** @return {Array<{title: string, facts: Array<{label: string, value: string}>}>} The fact groups. */
132
+ factSections() {
133
+ if (!Array.isArray(this.config.facts) || !this.record) {
134
+ return []
135
+ }
136
+ const empty = translate('nextcloud-vue', 'Not set');
137
+ return this.config.facts.map((section) => ({
138
+ title: this.text(section.title),
139
+ facts: (Array.isArray(section.items) ? section.items : []).map((fact) => ({ label: this.text(fact.label), value: this.fill(fact.value) || empty })),
140
+ }))
141
+ },
142
+
143
+ /**
144
+ * The checklist rows: label and detail from `labels` by id, else the item's own.
145
+ *
146
+ * @spec openspec/changes/action-dialog/specs/action-dialog/spec.md#requirement-a-manifest-configures-an-action-dialog
147
+ * @return {Array<{id: string, met: (boolean|null), label: string, detail: string}>}
148
+ */
149
+ checklist() {
150
+ const labels = (this.config.checklist && this.config.checklist.labels) || {};
151
+ return this.items.map((item) => {
152
+ const met = item.met === null || item.met === undefined ? null : item.met === true;
153
+ const own = labels[item.id] || {};
154
+ const detail = met === false && own.unmetDetail ? own.unmetDetail : (own.detail || item.detail || '');
155
+ return {
156
+ id: String(item.id),
157
+ met,
158
+ label: this.fill(own.label || item.label || String(item.id), item),
159
+ detail: met === null && !item.detail ? translate('nextcloud-vue', 'Could not be read') : this.fill(detail, item),
160
+ }
161
+ })
162
+ },
163
+
164
+ /** @return {boolean} Whether every required item is met. */
165
+ requiredMet() {
166
+ const required = (this.config.checklist && Array.isArray(this.config.checklist.required)) ? this.config.checklist.required.map(String) : [];
167
+ return required.every((id) => this.items.some((item) => String(item.id) === id && item.met === true))
168
+ },
169
+
170
+ /** @return {boolean} Whether a reason is asked and needed. */
171
+ reasonNeeded() {
172
+ return Boolean(this.config.reason) && this.config.reason.required !== false
173
+ },
174
+
175
+ /** @return {string} The reason field's label. */
176
+ reasonLabel() {
177
+ return this.text(this.config.reason && this.config.reason.label) || translate('nextcloud-vue', 'Reason')
178
+ },
179
+
180
+ /** @return {string} The note's NcNoteCard type. */
181
+ noteType() {
182
+ const variant = this.config.note && this.config.note.variant;
183
+ return ['info', 'warning', 'error', 'success'].includes(variant) ? variant : 'info'
184
+ },
185
+
186
+ /**
187
+ * Whether the action may run: allowed, required items met, a reason
188
+ * when one is needed, and nothing in flight.
189
+ *
190
+ * @spec openspec/changes/action-dialog/specs/action-dialog/spec.md#requirement-a-manifest-configures-an-action-dialog
191
+ * @return {boolean}
192
+ */
193
+ canConfirm() {
194
+ return !this.busy && this.allowed && this.requiredMet && (!this.reasonNeeded || this.reason.trim() !== '')
195
+ },
196
+ },
197
+
198
+ async mounted() {
199
+ await Promise.all([this.loadRecord(), this.loadChecklist(), this.loadPermission()]);
200
+ },
201
+
202
+ methods: {
203
+ t: translate,
204
+
205
+ /**
206
+ * A config text through the host translate, '' for anything else.
207
+ *
208
+ * @param {unknown} value The text.
209
+ * @return {string}
210
+ */
211
+ text(value) {
212
+ return typeof value === 'string' && value !== '' ? this.cnTranslate(value) : ''
213
+ },
214
+
215
+ /**
216
+ * A template filled from a row (the record by default), translated first.
217
+ *
218
+ * @param {unknown} template The template.
219
+ * @param {object} [row] The row.
220
+ * @return {string}
221
+ */
222
+ fill(template, row) {
223
+ if (typeof template !== 'string' || template === '') {
224
+ return ''
225
+ }
226
+ return fillTemplate(this.cnTranslate(template), row || this.record || {}).trim()
227
+ },
228
+
229
+ /**
230
+ * Read an endpoint, fresh.
231
+ *
232
+ * @param {object} source An endpointSource block.
233
+ * @return {Promise<unknown>}
234
+ */
235
+ read(source) {
236
+ return fetchEndpointSource(source, this.tokenCtx, { fresh: true })
237
+ },
238
+
239
+ /** @return {Promise<void>} */
240
+ async loadRecord() {
241
+ const source = this.config.summary && this.config.summary.source;
242
+ if (!source || !source.url) {
243
+ return
244
+ }
245
+ try {
246
+ const data = await this.read(source);
247
+ this.record = data && typeof data === 'object' ? data : this.record;
248
+ } catch {
249
+ // The summary stays empty; the checklist and the action still work.
250
+ }
251
+ },
252
+
253
+ /** @return {Promise<void>} */
254
+ async loadChecklist() {
255
+ const def = this.config.checklist;
256
+ if (!def || !def.source || !def.source.url) {
257
+ return
258
+ }
259
+ try {
260
+ const data = await this.read(def.source);
261
+ const list = def.itemsPath ? readPath(data, def.itemsPath) : data;
262
+ this.items = Array.isArray(list) ? list.filter((item) => item && item.id !== undefined) : [];
263
+ } catch {
264
+ this.items = [];
265
+ this.checklistError = translate('nextcloud-vue', 'Whether this is ready could not be read.');
266
+ }
267
+ },
268
+
269
+ /** @return {Promise<void>} */
270
+ async loadPermission() {
271
+ const def = this.config.permission;
272
+ if (!def || !def.source || !def.source.url) {
273
+ return
274
+ }
275
+ try {
276
+ const data = await this.read(def.source);
277
+ this.allowed = readPath(data, def.allowedPath || 'allowed') === true;
278
+ this.refusal = this.allowed || !def.reasonPath ? '' : String(readPath(data, def.reasonPath) || '');
279
+ } catch {
280
+ this.allowed = false;
281
+ }
282
+ },
283
+
284
+ /**
285
+ * Run the action once: post `confirm.request`, or dispatch
286
+ * `confirm.action`, then show the done text and refresh the page.
287
+ *
288
+ * @spec openspec/changes/action-dialog/specs/action-dialog/spec.md#requirement-a-manifest-configures-an-action-dialog
289
+ * @return {Promise<void>}
290
+ */
291
+ async confirm() {
292
+ if (!this.canConfirm) {
293
+ return
294
+ }
295
+ this.busy = true;
296
+ this.refusal = '';
297
+ const reason = this.reason.trim();
298
+ try {
299
+ const request = this.confirmConfig.request;
300
+ if (request && request.url) {
301
+ const url = interpolateUrlTokens(request.url, this.tokenCtx);
302
+ const body = {};
303
+ for (const [key, value] of Object.entries(request.body || {})) {
304
+ body[key] = typeof value === 'string' ? fillTemplate(value, { ...(this.record || {}), reason }) : value;
305
+ }
306
+ if (this.config.reason) {
307
+ body[this.config.reason.field || 'reason'] = reason;
308
+ }
309
+ const method = String(request.method || 'POST').toLowerCase();
310
+ await axios__default[['post', 'put', 'patch', 'delete'].includes(method) ? method : 'post'](/^https?:\/\//i.test(url) ? url : generateUrl(url), body);
311
+ } else if (this.confirmConfig.action && typeof this.cnDispatchAction === 'function') {
312
+ await this.cnDispatchAction({ ...this.confirmConfig.action, args: [...(this.confirmConfig.action.args || []), { reason }] });
313
+ }
314
+ this.done = true;
315
+ emit(PAGE_REFRESH, {});
316
+ /** @event done The action ran. Payload: `{ reason }`. */
317
+ this.$emit('done', { reason });
318
+ } catch (failure) {
319
+ const data = failure && failure.response && failure.response.data;
320
+ this.refusal = String((data && (data.message || data.error)) || translate('nextcloud-vue', 'The action could not be completed.'));
321
+ } finally {
322
+ this.busy = false;
323
+ }
324
+ },
325
+
326
+ /** Close the dialog, unless the action is running. */
327
+ close() {
328
+ if (this.busy) {
329
+ return
330
+ }
331
+ /** @event close The dialog was closed. */
332
+ this.$emit('close');
333
+ },
334
+ },
335
+ };
336
+
337
+ export { script as default };
338
+ //# sourceMappingURL=CnActionDialog.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CnActionDialog.vue2.js","sources":["../../../../src/components/CnActionDialog/CnActionDialog.vue"],"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=\"text(config.eyebrow)\"\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<CnIcon :name=\"config.summary.icon || 'FolderOutline'\" :size=\"20\" class=\"cn-action-dialog__summary-icon\" />\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 v-if=\"summary.badge\" class=\"cn-action-dialog__badge\">{{ 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\">\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<div v-if=\"config.reason\" class=\"cn-action-dialog__field\">\n\t\t\t\t<NcTextArea\n\t\t\t\t\t:id=\"reasonId\"\n\t\t\t\t\tv-model=\"reason\"\n\t\t\t\t\t:label=\"reasonLabel\"\n\t\t\t\t\t:labelOutside=\"false\"\n\t\t\t\t\tresize=\"vertical\"\n\t\t\t\t\tdata-testid=\"cn-action-dialog-reason\" />\n\t\t\t\t<span v-if=\"config.reason.hint\" class=\"cn-action-dialog__muted\">{{ text(config.reason.hint) }}</span>\n\t\t\t</div>\n\n\t\t\t<NcNoteCard v-if=\"config.note\"\n\t\t\t\t:type=\"noteType\"\n\t\t\t\t:heading=\"text(config.note.title)\"\n\t\t\t\tdata-testid=\"cn-action-dialog-note\">\n\t\t\t\t{{ text(config.note.text) }}\n\t\t\t</NcNoteCard>\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{{ text(config.doneText) || 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=\"confirmConfig.icon\" #icon>\n\t\t\t\t\t<CnIcon :name=\"confirmConfig.icon\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ text(confirmConfig.label) || t('nextcloud-vue', 'Confirm') }}\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, NcNoteCard, NcTextArea } 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 { fetchEndpointSource, interpolateUrlTokens } from '../../composables/useEndpointSource.js'\nimport { fillTemplate } from '../../utils/fillTemplate.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { CnDialog } from '../CnDialog/index.js'\nimport { CnIcon } from '../CnIcon/index.js'\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`, `eyebrow`, `subtitle`, `doneText`: texts, through the host translate.\n * - `summary`: `{ source?, title, meta?, badge?, 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.\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, allowedPath, reasonPath? }`: the action runs only\n * while `allowedPath` reads true; `reasonPath` says why not.\n * - `reason`: `{ label?, hint?, required?, field? }`: a text area; required by\n * default; sent as `field` (default `reason`).\n * - `note`: `{ variant?, title?, text }`: a read-only note.\n * - `confirm`: `{ label, icon?, request?: { method?, url, body? }, action? }`.\n * `request` posts itself (`body` templates filled with the record and\n * `{reason}`); `action` dispatches a manifest action through the page.\n *\n * Tokens (`@objectId`, `@object.<field>`) resolve in every url.\n */\nexport default {\n\tname: 'CnActionDialog',\n\n\tcomponents: { CheckCircle, CircleOutline, CnDialog, CnIcon, HelpCircleOutline, NcButton, NcNoteCard, NcTextArea },\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},\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\tbusy: false,\n\t\t\trefusal: '',\n\t\t\tdone: false,\n\t\t\treasonId: `cn-action-dialog-reason-${++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.objectId, object: this.record || {} }\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 * 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\treturn title ? { title, meta: this.fill(def.meta), badge: this.fill(def.badge) } : null\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.reasonNeeded || this.reason.trim() !== '')\n\t\t},\n\t},\n\n\tasync mounted() {\n\t\tawait Promise.all([this.loadRecord(), this.loadChecklist(), this.loadPermission()])\n\t},\n\n\tmethods: {\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\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\treturn fillTemplate(this.cnTranslate(template), row || this.record || {}).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.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/** @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\tthis.allowed = readPath(data, def.allowedPath || 'allowed') === true\n\t\t\t\tthis.refusal = this.allowed || !def.reasonPath ? '' : String(readPath(data, 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\tconst reason = this.reason.trim()\n\t\t\ttry {\n\t\t\t\tconst request = this.confirmConfig.request\n\t\t\t\tif (request && request.url) {\n\t\t\t\t\tconst url = interpolateUrlTokens(request.url, this.tokenCtx)\n\t\t\t\t\tconst body = {}\n\t\t\t\t\tfor (const [key, value] of Object.entries(request.body || {})) {\n\t\t\t\t\t\tbody[key] = typeof value === 'string' ? fillTemplate(value, { ...(this.record || {}), reason }) : value\n\t\t\t\t\t}\n\t\t\t\t\tif (this.config.reason) {\n\t\t\t\t\t\tbody[this.config.reason.field || 'reason'] = reason\n\t\t\t\t\t}\n\t\t\t\t\tconst method = String(request.method || 'POST').toLowerCase()\n\t\t\t\t\tawait axios[['post', 'put', 'patch', 'delete'].includes(method) ? method : 'post'](/^https?:\\/\\//i.test(url) ? url : generateUrl(url), body)\n\t\t\t\t} else if (this.confirmConfig.action && typeof this.cnDispatchAction === 'function') {\n\t\t\t\t\tawait this.cnDispatchAction({ ...this.confirmConfig.action, args: [...(this.confirmConfig.action.args || []), { reason }] })\n\t\t\t\t}\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: `{ reason }`. */\n\t\t\t\tthis.$emit('done', { reason })\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/** 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.cn-action-dialog {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n}\n\n.cn-action-dialog__summary {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tpadding: 12px 14px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-large, 8px);\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\tbackground: var(--color-background-dark);\n\tfont-size: 13px;\n\tfont-weight: 600;\n\twhite-space: nowrap;\n}\n\n.cn-action-dialog__title {\n\tmargin: 0 0 8px;\n\tfont-size: 15px;\n\tfont-weight: 700;\n}\n\n.cn-action-dialog__facts {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fit, minmax(180px, 1fr));\n\tgap: 8px 16px;\n\tmargin: 0;\n}\n\n.cn-action-dialog__facts dt {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n}\n\n.cn-action-dialog__facts dd {\n\tmargin: 0;\n}\n\n.cn-action-dialog__checks {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\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: 8px;\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.cn-action-dialog__field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-action-dialog__error {\n\tmargin: 0;\n\tcolor: var(--color-error-text, var(--color-error));\n}\n</style>\n"],"names":["CnDialog","CnIcon","t","axios"],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AAI,CAAC,KAAK,CAAC,KAAKD,SAAC,CAAC,eAAe,EAAE,oCAAoC,CAAC,EAAA;AACzH,IAAA,SAAU;AACT,IAAA,IAAI,CAAC,IAAG,GAAI,MAAI;AACjB,IAAA;GACA;;AAED;AACA,EAAA,KAAK,GAAG;GACP,IAAI,IAAI,CAAC,IAAI,EAAE;IACd,MAAK;AACN,IAAA;AACA;AACA,GAAA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAA;GAClB;EACD;AACF;;;;"}
@@ -0,0 +1,249 @@
1
+ import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createTextVNode, toDisplayString, createSlots, createCommentVNode, createElementBlock, createElementVNode, Fragment, renderList } from 'vue';
2
+
3
+ const _hoisted_1 = {
4
+ key: 0,
5
+ class: "cn-action-dialog"
6
+ };
7
+ const _hoisted_2 = {
8
+ key: 0,
9
+ class: "cn-action-dialog__summary",
10
+ "data-testid": "cn-action-dialog-summary"
11
+ };
12
+ const _hoisted_3 = { class: "cn-action-dialog__summary-text" };
13
+ const _hoisted_4 = {
14
+ key: 0,
15
+ class: "cn-action-dialog__muted"
16
+ };
17
+ const _hoisted_5 = {
18
+ key: 0,
19
+ class: "cn-action-dialog__badge"
20
+ };
21
+ const _hoisted_6 = {
22
+ key: 0,
23
+ class: "cn-action-dialog__title"
24
+ };
25
+ const _hoisted_7 = { class: "cn-action-dialog__facts" };
26
+ const _hoisted_8 = {
27
+ key: 1,
28
+ class: "cn-action-dialog__section",
29
+ "data-testid": "cn-action-dialog-checklist"
30
+ };
31
+ const _hoisted_9 = {
32
+ key: 0,
33
+ class: "cn-action-dialog__title"
34
+ };
35
+ const _hoisted_10 = {
36
+ key: 1,
37
+ class: "cn-action-dialog__muted",
38
+ role: "status"
39
+ };
40
+ const _hoisted_11 = { class: "cn-action-dialog__checks" };
41
+ const _hoisted_12 = ["data-testid", "data-met"];
42
+ const _hoisted_13 = { class: "cn-action-dialog__check-label" };
43
+ const _hoisted_14 = {
44
+ key: 3,
45
+ class: "cn-action-dialog__muted"
46
+ };
47
+ const _hoisted_15 = {
48
+ key: 2,
49
+ class: "cn-action-dialog__field"
50
+ };
51
+ const _hoisted_16 = {
52
+ key: 0,
53
+ class: "cn-action-dialog__muted"
54
+ };
55
+ const _hoisted_17 = {
56
+ key: 4,
57
+ class: "cn-action-dialog__error",
58
+ role: "alert",
59
+ "data-testid": "cn-action-dialog-refusal"
60
+ };
61
+ const _hoisted_18 = {
62
+ key: 1,
63
+ role: "status",
64
+ "data-testid": "cn-action-dialog-done"
65
+ };
66
+
67
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
68
+ const _component_CnIcon = resolveComponent("CnIcon");
69
+ const _component_CheckCircle = resolveComponent("CheckCircle");
70
+ const _component_HelpCircleOutline = resolveComponent("HelpCircleOutline");
71
+ const _component_CircleOutline = resolveComponent("CircleOutline");
72
+ const _component_NcTextArea = resolveComponent("NcTextArea");
73
+ const _component_NcNoteCard = resolveComponent("NcNoteCard");
74
+ const _component_NcButton = resolveComponent("NcButton");
75
+ const _component_CnDialog = resolveComponent("CnDialog");
76
+
77
+ return (openBlock(), createBlock(_component_CnDialog, {
78
+ name: $options.text($props.config.title) || $options.t('nextcloud-vue', 'Confirm'),
79
+ eyebrow: $options.text($props.config.eyebrow),
80
+ subtitle: $options.text($props.config.subtitle),
81
+ width: "form",
82
+ noClose: $data.busy,
83
+ "data-testid": "cn-action-dialog",
84
+ onClosing: $options.close
85
+ }, {
86
+ actions: withCtx(() => [
87
+ createVNode(_component_NcButton, {
88
+ disabled: $data.busy,
89
+ "data-testid": "cn-action-dialog-cancel",
90
+ onClick: $options.close
91
+ }, {
92
+ default: withCtx(() => [
93
+ createTextVNode(toDisplayString($data.done ? $options.t('nextcloud-vue', 'Close') : $options.t('nextcloud-vue', 'Cancel')), 1 /* TEXT */)
94
+ ]),
95
+ _: 1 /* STABLE */
96
+ }, 8 /* PROPS */, ["disabled", "onClick"]),
97
+ (!$data.done)
98
+ ? (openBlock(), createBlock(_component_NcButton, {
99
+ key: 0,
100
+ variant: "primary",
101
+ disabled: !$options.canConfirm,
102
+ "data-testid": "cn-action-dialog-confirm",
103
+ onClick: $options.confirm
104
+ }, createSlots({
105
+ default: withCtx(() => [
106
+ createTextVNode(" " + toDisplayString($options.text($options.confirmConfig.label) || $options.t('nextcloud-vue', 'Confirm')), 1 /* TEXT */)
107
+ ]),
108
+ _: 2 /* DYNAMIC */
109
+ }, [
110
+ ($options.confirmConfig.icon)
111
+ ? {
112
+ name: "icon",
113
+ fn: withCtx(() => [
114
+ createVNode(_component_CnIcon, {
115
+ name: $options.confirmConfig.icon,
116
+ size: 20
117
+ }, null, 8 /* PROPS */, ["name"])
118
+ ]),
119
+ key: "0"
120
+ }
121
+ : undefined
122
+ ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["disabled", "onClick"]))
123
+ : createCommentVNode("v-if", true)
124
+ ]),
125
+ default: withCtx(() => [
126
+ (!$data.done)
127
+ ? (openBlock(), createElementBlock("div", _hoisted_1, [
128
+ ($options.summary)
129
+ ? (openBlock(), createElementBlock("div", _hoisted_2, [
130
+ createVNode(_component_CnIcon, {
131
+ name: $props.config.summary.icon || 'FolderOutline',
132
+ size: 20,
133
+ class: "cn-action-dialog__summary-icon"
134
+ }, null, 8 /* PROPS */, ["name"]),
135
+ createElementVNode("span", _hoisted_3, [
136
+ createElementVNode("strong", null, toDisplayString($options.summary.title), 1 /* TEXT */),
137
+ ($options.summary.meta)
138
+ ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString($options.summary.meta), 1 /* TEXT */))
139
+ : createCommentVNode("v-if", true)
140
+ ]),
141
+ ($options.summary.badge)
142
+ ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString($options.summary.badge), 1 /* TEXT */))
143
+ : createCommentVNode("v-if", true)
144
+ ]))
145
+ : createCommentVNode("v-if", true),
146
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.factSections, (section, index) => {
147
+ return (openBlock(), createElementBlock("section", {
148
+ key: `facts-${index}`,
149
+ class: "cn-action-dialog__section",
150
+ "data-testid": "cn-action-dialog-facts"
151
+ }, [
152
+ (section.title)
153
+ ? (openBlock(), createElementBlock("h3", _hoisted_6, toDisplayString(section.title), 1 /* TEXT */))
154
+ : createCommentVNode("v-if", true),
155
+ createElementVNode("dl", _hoisted_7, [
156
+ (openBlock(true), createElementBlock(Fragment, null, renderList(section.facts, (fact) => {
157
+ return (openBlock(), createElementBlock("div", {
158
+ key: fact.label
159
+ }, [
160
+ createElementVNode("dt", null, toDisplayString(fact.label), 1 /* TEXT */),
161
+ createElementVNode("dd", null, toDisplayString(fact.value), 1 /* TEXT */)
162
+ ]))
163
+ }), 128 /* KEYED_FRAGMENT */))
164
+ ])
165
+ ]))
166
+ }), 128 /* KEYED_FRAGMENT */)),
167
+ ($props.config.checklist)
168
+ ? (openBlock(), createElementBlock("section", _hoisted_8, [
169
+ ($props.config.checklist.title)
170
+ ? (openBlock(), createElementBlock("h3", _hoisted_9, toDisplayString($options.text($props.config.checklist.title)), 1 /* TEXT */))
171
+ : createCommentVNode("v-if", true),
172
+ ($data.checklistError)
173
+ ? (openBlock(), createElementBlock("p", _hoisted_10, toDisplayString($data.checklistError), 1 /* TEXT */))
174
+ : createCommentVNode("v-if", true),
175
+ createElementVNode("ul", _hoisted_11, [
176
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.checklist, (item) => {
177
+ return (openBlock(), createElementBlock("li", {
178
+ key: item.id,
179
+ class: "cn-action-dialog__check",
180
+ "data-testid": `cn-action-dialog-check-${item.id}`,
181
+ "data-met": String(item.met)
182
+ }, [
183
+ (item.met === true)
184
+ ? (openBlock(), createBlock(_component_CheckCircle, {
185
+ key: 0,
186
+ size: 20,
187
+ class: "cn-action-dialog__check-icon cn-action-dialog__check-icon--met"
188
+ }))
189
+ : (item.met === null)
190
+ ? (openBlock(), createBlock(_component_HelpCircleOutline, {
191
+ key: 1,
192
+ size: 20,
193
+ class: "cn-action-dialog__check-icon"
194
+ }))
195
+ : (openBlock(), createBlock(_component_CircleOutline, {
196
+ key: 2,
197
+ size: 20,
198
+ class: "cn-action-dialog__check-icon"
199
+ })),
200
+ createElementVNode("strong", _hoisted_13, toDisplayString(item.label), 1 /* TEXT */),
201
+ (item.detail)
202
+ ? (openBlock(), createElementBlock("span", _hoisted_14, toDisplayString(item.detail), 1 /* TEXT */))
203
+ : createCommentVNode("v-if", true)
204
+ ], 8 /* PROPS */, _hoisted_12))
205
+ }), 128 /* KEYED_FRAGMENT */))
206
+ ])
207
+ ]))
208
+ : createCommentVNode("v-if", true),
209
+ ($props.config.reason)
210
+ ? (openBlock(), createElementBlock("div", _hoisted_15, [
211
+ createVNode(_component_NcTextArea, {
212
+ id: $data.reasonId,
213
+ modelValue: $data.reason,
214
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($data.reason) = $event)),
215
+ label: $options.reasonLabel,
216
+ labelOutside: false,
217
+ resize: "vertical",
218
+ "data-testid": "cn-action-dialog-reason"
219
+ }, null, 8 /* PROPS */, ["id", "modelValue", "label"]),
220
+ ($props.config.reason.hint)
221
+ ? (openBlock(), createElementBlock("span", _hoisted_16, toDisplayString($options.text($props.config.reason.hint)), 1 /* TEXT */))
222
+ : createCommentVNode("v-if", true)
223
+ ]))
224
+ : createCommentVNode("v-if", true),
225
+ ($props.config.note)
226
+ ? (openBlock(), createBlock(_component_NcNoteCard, {
227
+ key: 3,
228
+ type: $options.noteType,
229
+ heading: $options.text($props.config.note.title),
230
+ "data-testid": "cn-action-dialog-note"
231
+ }, {
232
+ default: withCtx(() => [
233
+ createTextVNode(toDisplayString($options.text($props.config.note.text)), 1 /* TEXT */)
234
+ ]),
235
+ _: 1 /* STABLE */
236
+ }, 8 /* PROPS */, ["type", "heading"]))
237
+ : createCommentVNode("v-if", true),
238
+ ($data.refusal)
239
+ ? (openBlock(), createElementBlock("p", _hoisted_17, toDisplayString($data.refusal), 1 /* TEXT */))
240
+ : createCommentVNode("v-if", true)
241
+ ]))
242
+ : (openBlock(), createElementBlock("p", _hoisted_18, toDisplayString($options.text($props.config.doneText) || $options.t('nextcloud-vue', 'Done')), 1 /* TEXT */))
243
+ ]),
244
+ _: 1 /* STABLE */
245
+ }, 8 /* PROPS */, ["name", "eyebrow", "subtitle", "noClose", "onClosing"]))
246
+ }
247
+
248
+ export { render };
249
+ //# sourceMappingURL=CnActionDialog.vue3.js.map