@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
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { translate } from '@nextcloud/l10n';
|
|
2
|
+
import { NcButton, NcLoadingIcon } from '@nextcloud/vue';
|
|
3
|
+
import __sfc_main from '../CnIcon/CnIcon.vue.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* CnDialogActions — the footer of a hand-built dialog: a cancel button and a
|
|
7
|
+
* primary button that shows a loading icon while the dialog saves.
|
|
8
|
+
*
|
|
9
|
+
* Put it in the `#actions` slot of `CnDialog` (or `NcDialog`) when the dialog
|
|
10
|
+
* body is too custom for `CnFormDialog`. The component holds no state: the
|
|
11
|
+
* parent owns `saving` and `canSubmit` and does the work on `submit`.
|
|
12
|
+
*
|
|
13
|
+
* ```vue
|
|
14
|
+
* <CnDialog :name="t('myapp', 'Edit source')" default-width="form" @closing="close">
|
|
15
|
+
* <MySourceForm v-model="source" />
|
|
16
|
+
* <template #actions>
|
|
17
|
+
* <CnDialogActions
|
|
18
|
+
* :saving="saving"
|
|
19
|
+
* :can-submit="source.title !== ''"
|
|
20
|
+
* :confirm-label="editing ? t('myapp', 'Save') : t('myapp', 'Create')"
|
|
21
|
+
* @cancel="close"
|
|
22
|
+
* @submit="save" />
|
|
23
|
+
* </template>
|
|
24
|
+
* </CnDialog>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* The primary button is disabled while `saving` is true or `canSubmit` is
|
|
28
|
+
* false. While saving it draws a loading icon with an accessible name, so a
|
|
29
|
+
* screen-reader user hears that the save is running.
|
|
30
|
+
*/
|
|
31
|
+
var script = {
|
|
32
|
+
name: 'CnDialogActions',
|
|
33
|
+
|
|
34
|
+
components: {
|
|
35
|
+
CnIcon: __sfc_main,
|
|
36
|
+
NcButton,
|
|
37
|
+
NcLoadingIcon,
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
props: {
|
|
41
|
+
/** Whether a save is in flight. Disables both buttons and draws a loading icon on the primary one. */
|
|
42
|
+
saving: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
/** Whether the dialog holds enough to submit. False disables the primary button. */
|
|
48
|
+
canSubmit: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: true,
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
/** Label of the primary button. */
|
|
54
|
+
confirmLabel: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: () => translate('nextcloud-vue', 'Save'),
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
/** Label of the cancel button. */
|
|
60
|
+
cancelLabel: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: () => translate('nextcloud-vue', 'Cancel'),
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
/** Variant of the primary button. Use `error` for a destructive submit. */
|
|
66
|
+
variant: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: 'primary',
|
|
69
|
+
validator: (v) => ['primary', 'secondary', 'error', 'warning', 'success'].includes(v),
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
/** A CnIcon name drawn on the primary button when it is not saving. Empty draws none. */
|
|
73
|
+
confirmIcon: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: '',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
emits: ['cancel', 'submit'],
|
|
80
|
+
|
|
81
|
+
methods: {
|
|
82
|
+
t: translate,
|
|
83
|
+
|
|
84
|
+
onCancel() {
|
|
85
|
+
/**
|
|
86
|
+
* @event cancel Emitted when the cancel button is clicked.
|
|
87
|
+
*/
|
|
88
|
+
this.$emit('cancel');
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
onSubmit() {
|
|
92
|
+
/**
|
|
93
|
+
* @event submit Emitted when the primary button is clicked while it is enabled.
|
|
94
|
+
*/
|
|
95
|
+
this.$emit('submit');
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export { script as default };
|
|
101
|
+
//# sourceMappingURL=CnDialogActions.vue2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CnDialogActions.vue2.js","sources":["../../../../src/components/CnDialogActions/CnDialogActions.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<NcButton :disabled=\"saving\" data-testid=\"cn-dialog-actions-cancel\" @click=\"onCancel\">\n\t\t{{ cancelLabel }}\n\t</NcButton>\n\t<NcButton\n\t\t:variant=\"variant\"\n\t\t:disabled=\"saving || !canSubmit\"\n\t\tdata-testid=\"cn-dialog-actions-submit\"\n\t\t@click=\"onSubmit\">\n\t\t<template v-if=\"saving || confirmIcon\" #icon>\n\t\t\t<NcLoadingIcon\n\t\t\t\tv-if=\"saving\"\n\t\t\t\t:size=\"20\"\n\t\t\t\t:name=\"t('nextcloud-vue', 'Loading …')\" />\n\t\t\t<CnIcon v-else :name=\"confirmIcon\" :size=\"20\" />\n\t\t</template>\n\t\t{{ confirmLabel }}\n\t</NcButton>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcLoadingIcon } from '@nextcloud/vue'\nimport { CnIcon } from '../CnIcon/index.js'\n\n/**\n * CnDialogActions — the footer of a hand-built dialog: a cancel button and a\n * primary button that shows a loading icon while the dialog saves.\n *\n * Put it in the `#actions` slot of `CnDialog` (or `NcDialog`) when the dialog\n * body is too custom for `CnFormDialog`. The component holds no state: the\n * parent owns `saving` and `canSubmit` and does the work on `submit`.\n *\n * ```vue\n * <CnDialog :name=\"t('myapp', 'Edit source')\" default-width=\"form\" @closing=\"close\">\n * <MySourceForm v-model=\"source\" />\n * <template #actions>\n * <CnDialogActions\n * :saving=\"saving\"\n * :can-submit=\"source.title !== ''\"\n * :confirm-label=\"editing ? t('myapp', 'Save') : t('myapp', 'Create')\"\n * @cancel=\"close\"\n * @submit=\"save\" />\n * </template>\n * </CnDialog>\n * ```\n *\n * The primary button is disabled while `saving` is true or `canSubmit` is\n * false. While saving it draws a loading icon with an accessible name, so a\n * screen-reader user hears that the save is running.\n */\nexport default {\n\tname: 'CnDialogActions',\n\n\tcomponents: {\n\t\tCnIcon,\n\t\tNcButton,\n\t\tNcLoadingIcon,\n\t},\n\n\tprops: {\n\t\t/** Whether a save is in flight. Disables both buttons and draws a loading icon on the primary one. */\n\t\tsaving: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Whether the dialog holds enough to submit. False disables the primary button. */\n\t\tcanSubmit: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Label of the primary button. */\n\t\tconfirmLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Save'),\n\t\t},\n\n\t\t/** Label of the cancel button. */\n\t\tcancelLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Cancel'),\n\t\t},\n\n\t\t/** Variant of the primary button. Use `error` for a destructive submit. */\n\t\tvariant: {\n\t\t\ttype: String,\n\t\t\tdefault: 'primary',\n\t\t\tvalidator: (v) => ['primary', 'secondary', 'error', 'warning', 'success'].includes(v),\n\t\t},\n\n\t\t/** A CnIcon name drawn on the primary button when it is not saving. Empty draws none. */\n\t\tconfirmIcon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['cancel', 'submit'],\n\n\tmethods: {\n\t\tt,\n\n\t\tonCancel() {\n\t\t\t/**\n\t\t\t * @event cancel Emitted when the cancel button is clicked.\n\t\t\t */\n\t\t\tthis.$emit('cancel')\n\t\t},\n\n\t\tonSubmit() {\n\t\t\t/**\n\t\t\t * @event submit Emitted when the primary button is clicked while it is enabled.\n\t\t\t */\n\t\t\tthis.$emit('submit')\n\t\t},\n\t},\n}\n</script>\n"],"names":["CnIcon","t"],"mappings":";;;;AA6BA;AACC;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;;AAGA;;AAED,aAAe;CACd,IAAI,EAAE,iBAAiB;;CAEvB,UAAU,EAAE;AACX,UAAAA,UAAM;AACN,EAAA,QAAQ;EACR,aAAa;EACb;;AAED,CAAA,KAAK,EAAE;AACN;AACA,EAAA,MAAM,EAAE;GACP,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;;AAED;EACA,SAAS,EAAE;GACV,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,IAAI;GACb;;;EAGD,YAAY,EAAE;GACb,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,MAAMC,SAAC,CAAC,eAAe,EAAE,MAAM,CAAC;GACzC;;;EAGD,WAAW,EAAE;GACZ,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,MAAMA,SAAC,CAAC,eAAe,EAAE,QAAQ,CAAC;GAC3C;;AAED;AACA,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,SAAS;AAClB,GAAA,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;GACrF;;AAED;EACA,WAAW,EAAE;GACZ,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;EACD;;CAED,KAAK,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;;AAE3B,CAAA,OAAO,EAAE;KACRA,SAAC;;EAED,QAAQ,GAAG;AACV;;;AAGA,GAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAA;GACnB;;EAED,QAAQ,GAAG;AACV;AACC;;AAED,GAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAA;GACnB;EACD;AACF;;;;"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { resolveComponent, openBlock, createElementBlock, Fragment, createVNode, withCtx, createTextVNode, toDisplayString, createSlots, createBlock } from 'vue';
|
|
2
|
+
|
|
3
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4
|
+
const _component_NcButton = resolveComponent("NcButton");
|
|
5
|
+
const _component_NcLoadingIcon = resolveComponent("NcLoadingIcon");
|
|
6
|
+
const _component_CnIcon = resolveComponent("CnIcon");
|
|
7
|
+
|
|
8
|
+
return (openBlock(), createElementBlock(Fragment, null, [
|
|
9
|
+
createVNode(_component_NcButton, {
|
|
10
|
+
disabled: $props.saving,
|
|
11
|
+
"data-testid": "cn-dialog-actions-cancel",
|
|
12
|
+
onClick: $options.onCancel
|
|
13
|
+
}, {
|
|
14
|
+
default: withCtx(() => [
|
|
15
|
+
createTextVNode(toDisplayString($props.cancelLabel), 1 /* TEXT */)
|
|
16
|
+
]),
|
|
17
|
+
_: 1 /* STABLE */
|
|
18
|
+
}, 8 /* PROPS */, ["disabled", "onClick"]),
|
|
19
|
+
createVNode(_component_NcButton, {
|
|
20
|
+
variant: $props.variant,
|
|
21
|
+
disabled: $props.saving || !$props.canSubmit,
|
|
22
|
+
"data-testid": "cn-dialog-actions-submit",
|
|
23
|
+
onClick: $options.onSubmit
|
|
24
|
+
}, createSlots({
|
|
25
|
+
default: withCtx(() => [
|
|
26
|
+
createTextVNode(" " + toDisplayString($props.confirmLabel), 1 /* TEXT */)
|
|
27
|
+
]),
|
|
28
|
+
_: 2 /* DYNAMIC */
|
|
29
|
+
}, [
|
|
30
|
+
($props.saving || $props.confirmIcon)
|
|
31
|
+
? {
|
|
32
|
+
name: "icon",
|
|
33
|
+
fn: withCtx(() => [
|
|
34
|
+
($props.saving)
|
|
35
|
+
? (openBlock(), createBlock(_component_NcLoadingIcon, {
|
|
36
|
+
key: 0,
|
|
37
|
+
size: 20,
|
|
38
|
+
name: $options.t('nextcloud-vue', 'Loading …')
|
|
39
|
+
}, null, 8 /* PROPS */, ["name"]))
|
|
40
|
+
: (openBlock(), createBlock(_component_CnIcon, {
|
|
41
|
+
key: 1,
|
|
42
|
+
name: $props.confirmIcon,
|
|
43
|
+
size: 20
|
|
44
|
+
}, null, 8 /* PROPS */, ["name"]))
|
|
45
|
+
]),
|
|
46
|
+
key: "0"
|
|
47
|
+
}
|
|
48
|
+
: undefined
|
|
49
|
+
]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["variant", "disabled", "onClick"])
|
|
50
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { render };
|
|
54
|
+
//# sourceMappingURL=CnDialogActions.vue3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CnDialogActions.vue3.js","sources":["../../../../src/components/CnDialogActions/CnDialogActions.vue?vue&type=template&id=2dcddfe3&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<NcButton :disabled=\"saving\" data-testid=\"cn-dialog-actions-cancel\" @click=\"onCancel\">\n\t\t{{ cancelLabel }}\n\t</NcButton>\n\t<NcButton\n\t\t:variant=\"variant\"\n\t\t:disabled=\"saving || !canSubmit\"\n\t\tdata-testid=\"cn-dialog-actions-submit\"\n\t\t@click=\"onSubmit\">\n\t\t<template v-if=\"saving || confirmIcon\" #icon>\n\t\t\t<NcLoadingIcon\n\t\t\t\tv-if=\"saving\"\n\t\t\t\t:size=\"20\"\n\t\t\t\t:name=\"t('nextcloud-vue', 'Loading …')\" />\n\t\t\t<CnIcon v-else :name=\"confirmIcon\" :size=\"20\" />\n\t\t</template>\n\t\t{{ confirmLabel }}\n\t</NcButton>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcLoadingIcon } from '@nextcloud/vue'\nimport { CnIcon } from '../CnIcon/index.js'\n\n/**\n * CnDialogActions — the footer of a hand-built dialog: a cancel button and a\n * primary button that shows a loading icon while the dialog saves.\n *\n * Put it in the `#actions` slot of `CnDialog` (or `NcDialog`) when the dialog\n * body is too custom for `CnFormDialog`. The component holds no state: the\n * parent owns `saving` and `canSubmit` and does the work on `submit`.\n *\n * ```vue\n * <CnDialog :name=\"t('myapp', 'Edit source')\" default-width=\"form\" @closing=\"close\">\n * <MySourceForm v-model=\"source\" />\n * <template #actions>\n * <CnDialogActions\n * :saving=\"saving\"\n * :can-submit=\"source.title !== ''\"\n * :confirm-label=\"editing ? t('myapp', 'Save') : t('myapp', 'Create')\"\n * @cancel=\"close\"\n * @submit=\"save\" />\n * </template>\n * </CnDialog>\n * ```\n *\n * The primary button is disabled while `saving` is true or `canSubmit` is\n * false. While saving it draws a loading icon with an accessible name, so a\n * screen-reader user hears that the save is running.\n */\nexport default {\n\tname: 'CnDialogActions',\n\n\tcomponents: {\n\t\tCnIcon,\n\t\tNcButton,\n\t\tNcLoadingIcon,\n\t},\n\n\tprops: {\n\t\t/** Whether a save is in flight. Disables both buttons and draws a loading icon on the primary one. */\n\t\tsaving: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Whether the dialog holds enough to submit. False disables the primary button. */\n\t\tcanSubmit: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Label of the primary button. */\n\t\tconfirmLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Save'),\n\t\t},\n\n\t\t/** Label of the cancel button. */\n\t\tcancelLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Cancel'),\n\t\t},\n\n\t\t/** Variant of the primary button. Use `error` for a destructive submit. */\n\t\tvariant: {\n\t\t\ttype: String,\n\t\t\tdefault: 'primary',\n\t\t\tvalidator: (v) => ['primary', 'secondary', 'error', 'warning', 'success'].includes(v),\n\t\t},\n\n\t\t/** A CnIcon name drawn on the primary button when it is not saving. Empty draws none. */\n\t\tconfirmIcon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['cancel', 'submit'],\n\n\tmethods: {\n\t\tt,\n\n\t\tonCancel() {\n\t\t\t/**\n\t\t\t * @event cancel Emitted when the cancel button is clicked.\n\t\t\t */\n\t\t\tthis.$emit('cancel')\n\t\t},\n\n\t\tonSubmit() {\n\t\t\t/**\n\t\t\t * @event submit Emitted when the primary button is clicked while it is enabled.\n\t\t\t */\n\t\t\tthis.$emit('submit')\n\t\t},\n\t},\n}\n</script>\n"],"names":["_createVNode","_createBlock"],"mappings":";;;;;;;;IASEA,WAEU,CAAA,mBAAA,EAAA;AAFA,MAAA,QAAO,EAAA,MAAA,CAAA,MAAA;AAAA,MAAA,aAAA,EAAA,0BAAA;AAAA,MAAA,OAAA,EAAA,QAAA,CAAA,QAAA;;uBACjB,MAAkB;wCAAf,MAAW,CAAA,WAAA,CAAA,EAAA,CAAA,YAAA;;;;IAEdA;AACC,MAAA,OAAO,EAAE,MAAO,CAAA,OAAA;MAChB,QAAQ,EAAE,MAAG,CAAA,MAAA,IAAA,CAAA,MAAA,CAAA,SAAA;mBACH,EAAC,0BAAE;AACZ,MAAA,OAAI,EAAE,QAAG,CAAA,QAAA;;;;;;;AACK,MAAA,CAAA,MAAA,CAAA,MAAM,IAAI,MAAW,CAAA,WAAA;;kBAAG,MAAG;wBAC1C,MAGQ;eAFD,MAAE,CAAA,MAAA;gCADTC,WAGQ,CAAA,wBAAA,EAAA;;AADN,oBAAA,IAAI,EAAE,EAAE;AACR,oBAAA,IAAI,EAAE,QAAA,CAAA,CAAA,CAAA,eAAA,EAAA,WAAA,CAAA;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import script from './CnFilesBrowser.vue2.js';
|
|
|
2
2
|
import { render } from './CnFilesBrowser.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-a7f2fc46";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -1541,6 +1541,20 @@ var script = {
|
|
|
1541
1541
|
return list.some((v) => String(v).toLowerCase() === String(value).toLowerCase())
|
|
1542
1542
|
},
|
|
1543
1543
|
|
|
1544
|
+
/**
|
|
1545
|
+
* Whether the row button is drawn on a file: never on a folder, and
|
|
1546
|
+
* only where its `when` and `visibleIf` (row included) hold.
|
|
1547
|
+
*
|
|
1548
|
+
* @param {object} node The file.
|
|
1549
|
+
* @return {boolean}
|
|
1550
|
+
*/
|
|
1551
|
+
rowButtonApplies(node) {
|
|
1552
|
+
if (!this.rowButton || this.isFolder(node)) {
|
|
1553
|
+
return false
|
|
1554
|
+
}
|
|
1555
|
+
return hostActionApplies(this.rowButton, node, this.rowValueOf(node))
|
|
1556
|
+
},
|
|
1557
|
+
|
|
1544
1558
|
/**
|
|
1545
1559
|
* Whether a file's row button is the primary one: the row-data field
|
|
1546
1560
|
* `primaryWhen.key` holds one of `primaryWhen.values`.
|
|
@@ -1560,8 +1574,6 @@ var script = {
|
|
|
1560
1574
|
return when.values.some((v) => String(v).toLowerCase() === String(raw).toLowerCase())
|
|
1561
1575
|
},
|
|
1562
1576
|
|
|
1563
|
-
hostActionApplies,
|
|
1564
|
-
|
|
1565
1577
|
/**
|
|
1566
1578
|
* Re-read the folder once after a burst of change signals. One upload
|
|
1567
1579
|
* of ten files answers ten `files:node:created`, and one PROPFIND
|