@conduction/nextcloud-vue 2.170.0 → 2.171.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.
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroup.vue.js +9 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroup.vue.js.map +1 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroup.vue2.js +242 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroup.vue2.js.map +1 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroup.vue3.js +200 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroup.vue3.js.map +1 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroupEditor.vue.js +9 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroupEditor.vue.js.map +1 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroupEditor.vue2.js +186 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroupEditor.vue2.js.map +1 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroupEditor.vue3.js +24 -0
- package/dist/esm/components/CnConditionGroupEditor/CnConditionGroupEditor.vue3.js.map +1 -0
- package/dist/esm/components/CnConditionListEditor/CnConditionListEditor.vue.js +1 -1
- package/dist/esm/components/CnConditionListEditor/CnConditionListEditor.vue2.js +3 -15
- package/dist/esm/components/CnConditionListEditor/CnConditionListEditor.vue2.js.map +1 -1
- package/dist/esm/components/CnConditionListEditor/CnConditionListEditor.vue3.js +16 -61
- package/dist/esm/components/CnConditionListEditor/CnConditionListEditor.vue3.js.map +1 -1
- package/dist/esm/components/CnConditionListEditor/CnConditionRow.vue.js +9 -0
- package/dist/esm/components/CnConditionListEditor/CnConditionRow.vue.js.map +1 -0
- package/dist/esm/components/CnConditionListEditor/CnConditionRow.vue2.js +120 -0
- package/dist/esm/components/CnConditionListEditor/CnConditionRow.vue2.js.map +1 -0
- package/dist/esm/components/CnConditionListEditor/CnConditionRow.vue3.js +86 -0
- package/dist/esm/components/CnConditionListEditor/CnConditionRow.vue3.js.map +1 -0
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +9 -9
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
- package/dist/esm/components/CnDialogActions/CnDialogActions.vue.js +8 -0
- package/dist/esm/components/CnDialogActions/CnDialogActions.vue.js.map +1 -0
- package/dist/esm/components/CnDialogActions/CnDialogActions.vue2.js +101 -0
- package/dist/esm/components/CnDialogActions/CnDialogActions.vue2.js.map +1 -0
- package/dist/esm/components/CnDialogActions/CnDialogActions.vue3.js +54 -0
- package/dist/esm/components/CnDialogActions/CnDialogActions.vue3.js.map +1 -0
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +14 -2
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/filesBrowser.js +21 -2
- package/dist/esm/components/CnFilesBrowser/filesBrowser.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue.js +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js +7 -0
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js +2 -2
- package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js +11 -0
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js +2 -1
- package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js.map +1 -1
- package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue.js +1 -1
- package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnMassActionDialog/CnMassActionDialog.vue.js +9 -0
- package/dist/esm/components/CnMassActionDialog/CnMassActionDialog.vue.js.map +1 -0
- package/dist/esm/components/CnMassActionDialog/CnMassActionDialog.vue2.js +248 -0
- package/dist/esm/components/CnMassActionDialog/CnMassActionDialog.vue2.js.map +1 -0
- package/dist/esm/components/{CnMassDeleteDialog/CnMassDeleteDialog.vue3.js → CnMassActionDialog/CnMassActionDialog.vue3.js} +66 -52
- package/dist/esm/components/CnMassActionDialog/CnMassActionDialog.vue3.js.map +1 -0
- package/dist/esm/components/CnMassDeleteDialog/CnMassDeleteDialog.vue.js +0 -3
- package/dist/esm/components/CnMassDeleteDialog/CnMassDeleteDialog.vue.js.map +1 -1
- package/dist/esm/components/CnMassDeleteDialog/CnMassDeleteDialog.vue2.js +25 -121
- package/dist/esm/components/CnMassDeleteDialog/CnMassDeleteDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue.js +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js +11 -3
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js.map +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue.js +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue2.js +21 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue3.js +2 -2
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue3.js.map +1 -1
- package/dist/esm/components/CnTreeView/CnTreeNode.vue.js +1 -1
- package/dist/esm/components/CnTreeView/CnTreeNode.vue2.js.map +1 -1
- package/dist/esm/components/CnTreeView/CnTreeNode.vue3.js +23 -5
- package/dist/esm/components/CnTreeView/CnTreeNode.vue3.js.map +1 -1
- package/dist/esm/components/CnTreeView/CnTreeView.vue.js +1 -1
- package/dist/esm/components/CnTreeView/CnTreeView.vue2.js +3 -0
- package/dist/esm/components/CnTreeView/CnTreeView.vue2.js.map +1 -1
- package/dist/esm/components/CnTreeView/CnTreeView.vue3.js +14 -4
- package/dist/esm/components/CnTreeView/CnTreeView.vue3.js.map +1 -1
- package/dist/esm/dialogs/CnConfirmDialog.vue.js +1 -1
- package/dist/esm/dialogs/CnConfirmDialog.vue2.js.map +1 -1
- package/dist/esm/dialogs/CnConfirmDialog.vue3.js +5 -3
- package/dist/esm/dialogs/CnConfirmDialog.vue3.js.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +16 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +16 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +638 -302
- package/dist/esm/utils/noteThreads.js +14 -2
- package/dist/esm/utils/noteThreads.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +11316 -10074
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +638 -302
- package/l10n/en.json +16 -1
- package/l10n/nl.json +16 -1
- package/package.json +1 -1
- package/scripts/.jsdoc-baselines.json +1 -1
- package/src/components/CnConditionGroupEditor/CnConditionGroup.vue +528 -0
- package/src/components/CnConditionGroupEditor/CnConditionGroupEditor.vue +211 -0
- package/src/components/CnConditionGroupEditor/index.js +9 -0
- package/src/components/CnConditionListEditor/CnConditionListEditor.vue +15 -78
- package/src/components/CnConditionListEditor/CnConditionRow.vue +226 -0
- package/src/components/CnDetailPage/CnDetailPage.vue +8 -8
- package/src/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue +6 -0
- package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +0 -6
- package/src/components/CnDialogActions/CnDialogActions.vue +124 -0
- package/src/components/CnDialogActions/index.js +7 -0
- package/src/components/CnFilesBrowser/CnFilesBrowser.vue +15 -3
- package/src/components/CnFilesBrowser/filesBrowser.js +21 -2
- package/src/components/CnFlowsPage/CnFlowBoard.vue +10 -3
- package/src/components/CnFlowsPage/CnFlowEditorPage.vue +12 -0
- package/src/components/CnLinkedWidget/CnLinkedWidget.vue +7 -0
- package/src/components/CnMassActionDialog/CnMassActionDialog.vue +382 -0
- package/src/components/CnMassActionDialog/index.js +7 -0
- package/src/components/CnMassDeleteDialog/CnMassDeleteDialog.md +4 -0
- package/src/components/CnMassDeleteDialog/CnMassDeleteDialog.vue +25 -254
- package/src/components/CnNotesCard/CnNotesCard.vue +12 -4
- package/src/components/CnObjectSidebar/CnNotesTab.vue +23 -3
- package/src/components/CnTreeView/CnTreeNode.vue +10 -1
- package/src/components/CnTreeView/CnTreeView.vue +9 -0
- package/src/components/index.js +3 -0
- package/src/css/context-menu.css +7 -0
- package/src/css/look-board-detail.css +120 -1
- package/src/css/look-board.css +43 -2
- package/src/dialogs/CnConfirmDialog.vue +3 -1
- package/src/index.js +3 -0
- package/src/utils/noteThreads.js +13 -1
- package/dist/esm/components/CnMassDeleteDialog/CnMassDeleteDialog.vue3.js.map +0 -1
package/src/css/look-board.css
CHANGED
|
@@ -224,6 +224,15 @@
|
|
|
224
224
|
border-width: 0;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
+
/* A stacked board tile keeps its label on its top inset when its row is
|
|
228
|
+
taller than the tile itself (a `sameHeight` row where another tile has a
|
|
229
|
+
caption), as the boards draw every tile; centred, the label sat 10px low
|
|
230
|
+
(DqProcesanalyse).
|
|
231
|
+
@spec openspec/changes/board-stat-tile-content-from-top/specs/kpi-card/spec.md#requirement-a-board-stat-tile-holds-its-content-at-the-top */
|
|
232
|
+
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-kpi-card--board.cn-kpi-card--stacked {
|
|
233
|
+
justify-content: flex-start;
|
|
234
|
+
}
|
|
235
|
+
|
|
227
236
|
/* ---- Dashboard switch row --------------------------------------------- */
|
|
228
237
|
/* The switch row under a board dashboard's header (DqMijnWerk, DqMijnTeam).
|
|
229
238
|
The link pills take the deep primary ink of the boards' primary pills: the
|
|
@@ -809,6 +818,29 @@
|
|
|
809
818
|
background: var(--color-background-hover);
|
|
810
819
|
}
|
|
811
820
|
|
|
821
|
+
/* ---- The flow page head (cards layout) ---------------------------------- */
|
|
822
|
+
/* Board DqFlow stacks the page head, the notice and the cards 20px apart, and
|
|
823
|
+
the head is one block: the title row 4px under its top, the path 6px under
|
|
824
|
+
the title row and 8px of the head below the path. The canvas layout keeps
|
|
825
|
+
its own head (PqFlow).
|
|
826
|
+
@spec openspec/changes/flow-board-cards-header/specs/flow-board/spec.md#requirement-the-cards-layout-spaces-its-head-as-the-board */
|
|
827
|
+
.cn-look-board .cn-flow-board:not(.cn-flow-board--canvas):not(.cn-look-nextcloud *) {
|
|
828
|
+
gap: 20px;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
.cn-look-board .cn-flow-board:not(.cn-flow-board--canvas):not(.cn-look-nextcloud *) > .cn-flow-board__header {
|
|
832
|
+
padding-top: 4px;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.cn-look-board .cn-flow-board:not(.cn-flow-board--canvas):not(.cn-look-nextcloud *) > .cn-flow-board__path {
|
|
836
|
+
margin-top: -14px;
|
|
837
|
+
padding-bottom: 8px;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
.cn-look-board .cn-flow-board:not(.cn-flow-board--canvas):not(.cn-look-nextcloud *) > .cn-flow-board__notice {
|
|
841
|
+
margin: 0;
|
|
842
|
+
}
|
|
843
|
+
|
|
812
844
|
/* ---- An ordered list field ----------------------------------------------- */
|
|
813
845
|
/* DqPersoonlijkeInstellingen "Weergaven in mijn menu": a row's labelled remove
|
|
814
846
|
button ("Uit menu halen") is an outlined secondary button, and the select
|
|
@@ -1277,6 +1309,14 @@ body:has(.cn-look-board):not(:has(.cn-look-nextcloud)) .v-popper__popper.action-
|
|
|
1277
1309
|
color: var(--nldesign-component-status-badge-error-color, var(--nl-color-red-text, var(--color-error-text)));
|
|
1278
1310
|
}
|
|
1279
1311
|
|
|
1312
|
+
/* A destructive row action (CnRowActions `destructive`) is the same red, the
|
|
1313
|
+
error tag's #a30000 (PtUitnodigingen "Uitnodiging intrekken", PtPortals
|
|
1314
|
+
"Verwijderen"); it outranks the menu-wide error colour in context-menu.css. */
|
|
1315
|
+
body:has(.cn-look-board):not(:has(.cn-look-nextcloud)) .v-popper__popper.action-item__popper li.action.cn-row-action--destructive > .action-button,
|
|
1316
|
+
body:has(.cn-look-board):not(:has(.cn-look-nextcloud)) .v-popper__popper.action-item__popper li.action.cn-row-action--destructive > .action-link {
|
|
1317
|
+
color: var(--nldesign-component-status-badge-error-color, var(--nl-color-red-text, var(--color-error-text))) !important;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1280
1320
|
/* ---- A search select's open list (CnSearchSelect) ------------------------ */
|
|
1281
1321
|
/* NcSelect teleports its list to <body>, so the rules key on the body as the
|
|
1282
1322
|
menus above do. The board draws the list as a card 4px under the field: a
|
|
@@ -3342,9 +3382,10 @@ body:has(.cn-look-board):not(:has(.cn-look-nextcloud)) .vs__dropdown-menu:has(.c
|
|
|
3342
3382
|
}
|
|
3343
3383
|
|
|
3344
3384
|
/* The placed sentence replaces the card's own text, which stays as the
|
|
3345
|
-
sentence for a library without placement.
|
|
3385
|
+
sentence for a library without placement. Important: the text widget sets
|
|
3386
|
+
its display in its style attribute. */
|
|
3346
3387
|
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-widget-wrapper__content:has(> .cn-record-notes__all-sentence--placed) > .cn-text-widget {
|
|
3347
|
-
display: none;
|
|
3388
|
+
display: none !important;
|
|
3348
3389
|
}
|
|
3349
3390
|
|
|
3350
3391
|
/* The card holding that pair draws its title and sentence 24px in, as the
|
|
@@ -41,6 +41,8 @@
|
|
|
41
41
|
<NcNoteCard v-else :type="variant === 'error' ? 'warning' : 'info'">
|
|
42
42
|
{{ message }}
|
|
43
43
|
</NcNoteCard>
|
|
44
|
+
<!-- @slot default Extra body content below the message in the confirm phase, such as a checkbox, a list or a note. -->
|
|
45
|
+
<slot />
|
|
44
46
|
<CnConfirmValueField v-if="confirmValue !== ''"
|
|
45
47
|
v-model="typedConfirmValue"
|
|
46
48
|
:value="confirmValue"
|
|
@@ -48,7 +50,7 @@
|
|
|
48
50
|
</div>
|
|
49
51
|
|
|
50
52
|
<template #actions>
|
|
51
|
-
<NcButton @click="$emit('close')">
|
|
53
|
+
<NcButton :disabled="loading" @click="$emit('close')">
|
|
52
54
|
{{ result !== null ? closeLabel : cancelLabel }}
|
|
53
55
|
</NcButton>
|
|
54
56
|
<NcButton
|
package/src/index.js
CHANGED
|
@@ -78,6 +78,7 @@ export {
|
|
|
78
78
|
CnChoicePickerWidget,
|
|
79
79
|
CnColorPicker,
|
|
80
80
|
CnCommandPalette,
|
|
81
|
+
CnConditionGroupEditor,
|
|
81
82
|
CnConditionListEditor,
|
|
82
83
|
CnConfigurationCard,
|
|
83
84
|
CnConnectionsPanel,
|
|
@@ -118,6 +119,7 @@ export {
|
|
|
118
119
|
CnDetailWidgetHost,
|
|
119
120
|
CnDeviceFramesWidget,
|
|
120
121
|
CnDialog,
|
|
122
|
+
CnDialogActions,
|
|
121
123
|
CnDialogHeader,
|
|
122
124
|
CnDividerWidget,
|
|
123
125
|
CnDividerWidgetForm,
|
|
@@ -226,6 +228,7 @@ export {
|
|
|
226
228
|
CnMarkdownWidget,
|
|
227
229
|
CnMarkdownWidgetForm,
|
|
228
230
|
CnMassActionBar,
|
|
231
|
+
CnMassActionDialog,
|
|
229
232
|
CnMassCopyDialog,
|
|
230
233
|
CnMassDeleteDialog,
|
|
231
234
|
CnMassExportDialog,
|
package/src/utils/noteThreads.js
CHANGED
|
@@ -12,7 +12,19 @@
|
|
|
12
12
|
/** A reply this many notes (or more) below its parent shows a one-line quote of it. */
|
|
13
13
|
export const QUOTE_DISTANCE = 5
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* When a note was written. OpenRegister's notes endpoint sends `createdAt`;
|
|
17
|
+
* older backends sent `creationDateTime` or `created`.
|
|
18
|
+
*
|
|
19
|
+
* @param {object} note The note.
|
|
20
|
+
* @return {string} The moment as the backend wrote it, or '' when unknown.
|
|
21
|
+
* @spec openspec/changes/notes-tab-authored-rows/specs/notes-tab-authored-rows/spec.md#requirement-the-notes-tab-can-draw-a-note-as-an-authored-row
|
|
22
|
+
*/
|
|
23
|
+
export function noteCreatedAt(note) {
|
|
24
|
+
return note?.createdAt || note?.creationDateTime || note?.created || ''
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const created = (note) => new Date(noteCreatedAt(note) || 0).getTime()
|
|
16
28
|
|
|
17
29
|
/**
|
|
18
30
|
* Whether the notes response says the backend supports replies: its notes carry
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CnMassDeleteDialog.vue3.js","sources":["../../../../src/components/CnMassDeleteDialog/CnMassDeleteDialog.vue?vue&type=template&id=be5c1658&lang.js"],"sourcesContent":["<template>\n\t<CnDialog\n\t\t:look=\"look\"\n\t\t:width=\"width\"\n\t\tdefaultWidth=\"confirm\"\n\t\t:eyebrow=\"eyebrow\"\n\t\t:subtitle=\"subtitle\"\n\t\t:name=\"dialogTitle\"\n\t\tsize=\"normal\"\n\t\t:noClose=\"loading\"\n\t\t@closing=\"$emit('close')\">\n\t\t<!-- Review phase -->\n\t\t<div v-if=\"result === null\"\n\t\t\tclass=\"cn-mass-delete__review\"\n\t\t\tdata-testid=\"cn-modal\"\n\t\t\tdata-testid-modal=\"cn-mass-delete-dialog\"\n\t\t\tdata-testid-phase=\"review\">\n\t\t\t<template v-if=\"isBoardLook\">\n\t\t\t\t<p class=\"cn-dialog__sentence\" data-testid=\"cn-mass-delete-sentence\">\n\t\t\t\t\t{{ sentenceParts[0] }}<strong class=\"cn-dialog__name\">{{ countLabel }}</strong>{{ sentenceParts[1] }}\n\t\t\t\t\t<template v-if=\"irreversible\">\n\t\t\t\t\t\t{{ irreversibleText }}\n\t\t\t\t\t</template>\n\t\t\t\t</p>\n\t\t\t\t<p class=\"cn-dialog__note\"\n\t\t\t\t\trole=\"note\"\n\t\t\t\t\tdata-testid=\"cn-mass-delete-note\">\n\t\t\t\t\t<AlertOutline :size=\"20\" aria-hidden=\"true\" />\n\t\t\t\t\t<span>{{ warningText }}</span>\n\t\t\t\t</p>\n\t\t\t</template>\n\t\t\t<NcNoteCard v-else type=\"warning\">\n\t\t\t\t{{ warningText }}\n\t\t\t</NcNoteCard>\n\n\t\t\t<div class=\"cn-mass-delete__list\">\n\t\t\t\t<div\n\t\t\t\t\tv-for=\"item in localItems\"\n\t\t\t\t\t:key=\"item.id\"\n\t\t\t\t\tclass=\"cn-mass-delete__item\">\n\t\t\t\t\t<span class=\"cn-mass-delete__item-name\">\n\t\t\t\t\t\t{{ getItemName(item) }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t:aria-label=\"removeLabel\"\n\t\t\t\t\t\t@click=\"removeItem(item.id)\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<Close :size=\"16\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcButton>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<p v-if=\"localItems.length === 0\" class=\"cn-mass-delete__empty\">\n\t\t\t\t{{ emptyText }}\n\t\t\t</p>\n\t\t\t<CnConfirmValueField v-if=\"confirmValue !== ''\"\n\t\t\t\tv-model=\"typedConfirmValue\"\n\t\t\t\t:value=\"confirmValue\"\n\t\t\t\t:label=\"confirmFieldLabel\" />\n\t\t</div>\n\n\t\t<!-- Result phase -->\n\t\t<div v-else\n\t\t\tclass=\"cn-mass-delete__result\"\n\t\t\tdata-testid=\"cn-modal\"\n\t\t\tdata-testid-modal=\"cn-mass-delete-dialog\"\n\t\t\tdata-testid-phase=\"result\">\n\t\t\t<NcNoteCard v-if=\"result.success\" type=\"success\">\n\t\t\t\t{{ successText }}\n\t\t\t</NcNoteCard>\n\t\t\t<NcNoteCard v-if=\"result.error\" type=\"error\">\n\t\t\t\t{{ result.error }}\n\t\t\t</NcNoteCard>\n\t\t</div>\n\n\t\t<template #actions>\n\t\t\t<NcButton @click=\"$emit('close')\">\n\t\t\t\t{{ result === null ? cancelLabel : closeLabel }}\n\t\t\t</NcButton>\n\t\t\t<NcButton\n\t\t\t\tv-if=\"result === null\"\n\t\t\t\tvariant=\"error\"\n\t\t\t\t:class=\"{ 'cn-dialog__confirm-pending': confirmValuePending }\"\n\t\t\t\t:disabled=\"loading || localItems.length === 0 || confirmValuePending\"\n\t\t\t\t:aria-disabled=\"confirmValuePending ? 'true' : undefined\"\n\t\t\t\tdata-testid=\"cn-mass-delete-dialog-confirm\"\n\t\t\t\t@click=\"executeDelete\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"loading\" :size=\"20\" />\n\t\t\t\t\t<TrashCanOutline v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ confirmLabel }}\n\t\t\t</NcButton>\n\t\t</template>\n\t</CnDialog>\n</template>\n\n<script>\nimport { translatePlural as n, translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcLoadingIcon, NcNoteCard } from '@nextcloud/vue'\nimport AlertOutline from 'vue-material-design-icons/AlertOutline.vue'\nimport Close from 'vue-material-design-icons/Close.vue'\nimport TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'\nimport CnConfirmValueField from '../CnConfirmValueField/CnConfirmValueField.vue'\nimport CnDialog from '../CnDialog/CnDialog.vue'\nimport { confirmValueMixin } from '../../mixins/confirmValue.js'\nimport { dialogBoardMixin } from '../../mixins/dialogBoard.js'\nimport { splitAroundPlaceholder } from '../../utils/dialogSentence.js'\n\n/**\n * CnMassDeleteDialog — Two-phase mass delete confirmation dialog.\n *\n * Phase 1 (review): Shows the items to be deleted with the ability to remove\n * individual items before confirming. Phase 2 (result): Shows success or error.\n *\n * The dialog does NOT perform the delete itself — it emits a `confirm` event\n * with the item IDs. The parent component performs the actual API call and\n * calls `setResult()` via a ref.\n *\n * ```vue\n * <CnMassDeleteDialog\n * v-if=\"showDeleteDialog\"\n * :items=\"selectedObjects\"\n * :name-field=\"'title'\"\n * @confirm=\"onDeleteConfirm\"\n * @close=\"showDeleteDialog = false\" />\n * ```\n *\n * // In methods:\n * async onDeleteConfirm(ids) {\n * try {\n * await store.massDelete(ids)\n * this.$refs.deleteDialog.setResult({ success: true })\n * } catch (e) {\n * this.$refs.deleteDialog.setResult({ error: e.message })\n * }\n * }\n *\n * @event close Emitted when the dialog should be closed (cancel, close button, or auto-close after success).\n */\nexport default {\n\tname: 'CnMassDeleteDialog',\n\n\tcomponents: {\n\t\tCnDialog,\n\t\tNcButton,\n\t\tNcNoteCard,\n\t\tNcLoadingIcon,\n\t\tTrashCanOutline,\n\t\tClose,\n\t\tAlertOutline,\n\t\tCnConfirmValueField,\n\t},\n\n\tmixins: [dialogBoardMixin, confirmValueMixin],\n\n\tprops: {\n\t\t/** Items to delete. Each must have an `id` property. */\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Property name used for display (e.g., 'title', 'name') */\n\t\tnameField: {\n\t\t\ttype: String,\n\t\t\tdefault: 'title',\n\t\t},\n\n\t\t/** Optional function to format the item name. Receives the item, returns a string. Overrides nameField when provided. */\n\t\tnameFormatter: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Dialog title */\n\t\tdialogTitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Delete items'),\n\t\t},\n\n\t\t/** Warning text shown above the item list */\n\t\twarningText: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'The following items will be permanently deleted. Remove any items you want to keep.'),\n\t\t},\n\n\t\t/** Text when all items removed from list */\n\t\temptyText: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'No items selected for deletion.'),\n\t\t},\n\n\t\t/** Success message */\n\t\tsuccessText: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Items successfully deleted.'),\n\t\t},\n\n\t\t/** Label for the cancel button (visible before the delete runs). */\n\t\tcancelLabel: { type: String, default: () => t('nextcloud-vue', 'Cancel') },\n\t\t/** Label for the close button (visible after delete completes). */\n\t\tcloseLabel: { type: String, default: () => t('nextcloud-vue', 'Close') },\n\t\t/** Label for the primary confirm button that triggers the delete. */\n\t\tconfirmLabel: { type: String, default: () => t('nextcloud-vue', 'Delete') },\n\t\t/** Aria label for the per-row \"remove from list\" icon button. */\n\t\tremoveLabel: { type: String, default: () => t('nextcloud-vue', 'Remove from list') },\n\n\t\t/** Board look: end the sentence with \"This action cannot be undone.\" */\n\t\tirreversible: { type: Boolean, default: true },\n\t},\n\n\temits: ['close', 'confirm'],\n\n\tdata() {\n\t\treturn {\n\t\t\tlocalItems: [...this.items],\n\t\t\tloading: false,\n\t\t\tresult: null,\n\t\t\tcloseTimeout: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** The board sentence around the bold item count. */\n\t\tsentenceParts() {\n\t\t\treturn splitAroundPlaceholder(t('nextcloud-vue', 'Are you sure you want to permanently delete {count}?'), 'count')\n\t\t},\n\n\t\tcountLabel() {\n\t\t\treturn n('nextcloud-vue', '%n item', '%n items', this.localItems.length)\n\t\t},\n\n\t\tirreversibleText() {\n\t\t\treturn t('nextcloud-vue', 'This action cannot be undone.')\n\t\t},\n\t},\n\n\twatch: {\n\t\titems(val) {\n\t\t\tthis.localItems = [...val]\n\t\t},\n\t},\n\n\tbeforeUnmount() {\n\t\tif (this.closeTimeout) {\n\t\t\tclearTimeout(this.closeTimeout)\n\t\t}\n\t},\n\n\tmethods: {\n\t\tgetItemName(item) {\n\t\t\tif (this.nameFormatter) {\n\t\t\t\treturn this.nameFormatter(item)\n\t\t\t}\n\t\t\treturn item[this.nameField] || item.name || item.title || item.id\n\t\t},\n\n\t\tremoveItem(id) {\n\t\t\tthis.localItems = this.localItems.filter((i) => i.id !== id)\n\t\t},\n\n\t\texecuteDelete() {\n\t\t\tif (!this.confirmValueMatches) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.loading = true\n\t\t\tconst ids = this.localItems.map((i) => i.id)\n\t\t\t/**\n\t\t\t * @event confirm Emitted when the user confirms deletion.\n\t\t\t * Payload: array of item IDs to delete.\n\t\t\t */\n\t\t\tthis.$emit('confirm', ids)\n\t\t},\n\n\t\t/**\n\t\t * Set the result of the delete operation. Call this from the parent\n\t\t * after the API call completes.\n\t\t *\n\t\t * @param {{ success?: boolean, error?: string }} resultData - Result data to pass to the dialog\n\t\t * @public\n\t\t */\n\t\tsetResult(resultData) {\n\t\t\tthis.loading = false\n\t\t\tthis.result = resultData\n\t\t\tif (resultData.success) {\n\t\t\t\tthis.closeTimeout = setTimeout(() => {\n\t\t\t\t\tthis.$emit('close')\n\t\t\t\t}, 2000)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-mass-delete__list {\n\tmax-height: 300px;\n\toverflow-y: auto;\n\tmargin-top: 12px;\n}\n\n.cn-mass-delete__item {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tpadding: 8px 12px;\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n.cn-mass-delete__item:last-child {\n\tborder-bottom: none;\n}\n\n.cn-mass-delete__item-name {\n\tfont-weight: 500;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-mass-delete__empty {\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-style: italic;\n\tpadding: 20px;\n}\n</style>\n"],"names":["_createBlock","_createVNode","_createTextVNode","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_toDisplayString","_renderList"],"mappings":";;;;AAaG,EAAA,KAAK,EAAC,wBAAuB;AAC7B,EAAA,aAAW,EAAC,UAAS;AACrB,EAAA,mBAAiB,EAAC,uBAAsB;AACxC,EAAA,mBAAiB,EAAC,QAAQ;;;AAEtB,EAAA,KAAK,EAAC,qBAAsB;AAAA,EAAA,aAAW,EAAC,yBAAyB;;AACrC,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,iBAAiB,GAAA;;AAKnD,EAAA,KAAK,EAAC,iBAAgB;AACxB,EAAA,IAAI,EAAC,MAAK;AACV,EAAA,aAAW,EAAC,qBAAqB;;AAS9B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,sBAAsB,GAAA;AAKzB,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,2BAA2B,GAAA;;;AAcP,EAAA,KAAK,EAAC,uBAAuB;;;;AAW/D,EAAA,KAAK,EAAC,wBAAuB;AAC7B,EAAA,aAAW,EAAC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