@conduction/nextcloud-vue 2.185.1 → 2.186.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/CnCalendarWidget/CnCalendarWidget.vue.js +1 -1
- package/dist/esm/components/CnCalendarWidget/CnCalendarWidget2.vue.js +83 -2
- package/dist/esm/components/CnCalendarWidget/CnCalendarWidget2.vue.js.map +1 -1
- package/dist/esm/components/CnCalendarWidget/CnCalendarWidget3.vue.js +147 -104
- package/dist/esm/components/CnCalendarWidget/CnCalendarWidget3.vue.js.map +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue.js +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid2.vue.js +41 -16
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid2.vue.js.map +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid3.vue.js.map +1 -1
- package/dist/esm/components/CnDividerWidget/index.js +1 -0
- package/dist/esm/components/CnDividerWidget/index.js.map +1 -1
- package/dist/esm/components/CnFilesWidget/CnFilesWidget.vue.js +1 -1
- package/dist/esm/components/CnFilesWidget/CnFilesWidget2.vue.js +158 -5
- package/dist/esm/components/CnFilesWidget/CnFilesWidget2.vue.js.map +1 -1
- package/dist/esm/components/CnFilesWidget/CnFilesWidget3.vue.js +109 -45
- package/dist/esm/components/CnFilesWidget/CnFilesWidget3.vue.js.map +1 -1
- package/dist/esm/components/CnHeaderWidget/index.js +0 -1
- package/dist/esm/components/CnHeaderWidget/index.js.map +1 -1
- package/dist/esm/components/CnHeaderWidgetForm/CnHeaderWidgetForm.vue.js +1 -1
- package/dist/esm/components/CnHeaderWidgetForm/CnHeaderWidgetForm2.vue.js +17 -3
- package/dist/esm/components/CnHeaderWidgetForm/CnHeaderWidgetForm2.vue.js.map +1 -1
- package/dist/esm/components/CnHeaderWidgetForm/CnHeaderWidgetForm3.vue.js +3 -3
- package/dist/esm/components/CnHeaderWidgetForm/CnHeaderWidgetForm3.vue.js.map +1 -1
- package/dist/esm/components/CnVideoWidget/CnVideoWidget.vue.js +1 -1
- package/dist/esm/components/CnVideoWidget/CnVideoWidget2.vue.js +63 -1
- package/dist/esm/components/CnVideoWidget/CnVideoWidget2.vue.js.map +1 -1
- package/dist/esm/components/CnVideoWidget/CnVideoWidget3.vue.js +20 -10
- package/dist/esm/components/CnVideoWidget/CnVideoWidget3.vue.js.map +1 -1
- package/dist/esm/components/CnVideoWidgetForm/CnVideoWidgetForm.vue.js +1 -1
- package/dist/esm/components/CnVideoWidgetForm/CnVideoWidgetForm2.vue.js +15 -0
- package/dist/esm/components/CnVideoWidgetForm/CnVideoWidgetForm2.vue.js.map +1 -1
- package/dist/esm/components/CnVideoWidgetForm/CnVideoWidgetForm3.vue.js +17 -10
- package/dist/esm/components/CnVideoWidgetForm/CnVideoWidgetForm3.vue.js.map +1 -1
- package/dist/esm/components/CnWidgetGrid/dashboardWidgetRegistry.js +1 -0
- package/dist/esm/components/CnWidgetGrid/dashboardWidgetRegistry.js.map +1 -1
- package/dist/esm/dialogs/CnAddWidgetModal.vue.js +1 -1
- package/dist/esm/dialogs/CnAddWidgetModal2.vue.js +18 -4
- package/dist/esm/dialogs/CnAddWidgetModal2.vue.js.map +1 -1
- package/dist/esm/dialogs/CnAddWidgetModal3.vue.js +57 -39
- package/dist/esm/dialogs/CnAddWidgetModal3.vue.js.map +1 -1
- package/dist/esm/l10n/en.json.js +96 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +96 -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 +231 -114
- package/dist/nextcloud-vue.cjs.js +2298 -1602
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +231 -114
- package/l10n/en.json +96 -1
- package/l10n/nl.json +96 -1
- package/package.json +1 -1
- package/src/components/CnCalendarWidget/CnCalendarWidget.vue +217 -75
- package/src/components/CnDashboardGrid/CnDashboardGrid.md +1 -1
- package/src/components/CnDashboardGrid/CnDashboardGrid.vue +41 -16
- package/src/components/CnDividerWidget/index.js +1 -0
- package/src/components/CnFilesWidget/CnFilesWidget.vue +278 -5
- package/src/components/CnHeaderWidget/index.js +0 -1
- package/src/components/CnHeaderWidgetForm/CnHeaderWidgetForm.vue +20 -6
- package/src/components/CnVideoWidget/CnVideoWidget.vue +84 -1
- package/src/components/CnVideoWidgetForm/CnVideoWidgetForm.vue +19 -1
- package/src/components/CnWidgetGrid/dashboardWidgetRegistry.js +1 -0
- package/src/dialogs/CnAddWidgetModal.vue +53 -14
|
@@ -1,37 +1,45 @@
|
|
|
1
|
-
import { resolveComponent, openBlock, createBlock, withCtx, createElementBlock, createElementVNode, toDisplayString, withDirectives, Fragment, renderList, vModelSelect,
|
|
1
|
+
import { resolveComponent, openBlock, createBlock, withCtx, createElementBlock, createElementVNode, toDisplayString, createVNode, createCommentVNode, withDirectives, Fragment, renderList, vModelSelect, renderSlot, resolveDynamicComponent, createTextVNode } from 'vue';
|
|
2
2
|
|
|
3
3
|
const _hoisted_1 = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "cn-add-widget-modal__type"
|
|
6
6
|
};
|
|
7
7
|
const _hoisted_2 = ["for"];
|
|
8
|
-
const _hoisted_3 =
|
|
9
|
-
const _hoisted_4 =
|
|
10
|
-
|
|
8
|
+
const _hoisted_3 = { class: "cn-add-widget-modal__type-row" };
|
|
9
|
+
const _hoisted_4 = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "cn-add-widget-modal__type-icon",
|
|
12
|
+
"data-testid": "widget-type-icon",
|
|
13
|
+
"aria-hidden": "true"
|
|
14
|
+
};
|
|
15
|
+
const _hoisted_5 = ["id"];
|
|
16
|
+
const _hoisted_6 = ["value", "data-testid"];
|
|
17
|
+
const _hoisted_7 = {
|
|
11
18
|
key: 1,
|
|
12
19
|
class: "cn-add-widget-modal__notices",
|
|
13
20
|
"data-testid": "cn-add-widget-modal-notices"
|
|
14
21
|
};
|
|
15
|
-
const
|
|
22
|
+
const _hoisted_8 = {
|
|
16
23
|
key: 2,
|
|
17
24
|
class: "cn-add-widget-modal__form"
|
|
18
25
|
};
|
|
19
|
-
const
|
|
26
|
+
const _hoisted_9 = {
|
|
20
27
|
key: 3,
|
|
21
28
|
class: "cn-add-widget-modal__empty"
|
|
22
29
|
};
|
|
23
|
-
const
|
|
30
|
+
const _hoisted_10 = {
|
|
24
31
|
key: 4,
|
|
25
32
|
class: "cn-add-widget-modal__chrome"
|
|
26
33
|
};
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
34
|
+
const _hoisted_11 = { class: "cn-add-widget-modal__chrome-title" };
|
|
35
|
+
const _hoisted_12 = { class: "cn-add-widget-modal__chrome-row" };
|
|
36
|
+
const _hoisted_13 = { class: "cn-add-widget-modal__chrome-label" };
|
|
37
|
+
const _hoisted_14 = { class: "cn-add-widget-modal__chrome-value" };
|
|
38
|
+
const _hoisted_15 = { class: "cn-add-widget-modal__chrome-row" };
|
|
39
|
+
const _hoisted_16 = { class: "cn-add-widget-modal__chrome-label" };
|
|
33
40
|
|
|
34
41
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
42
|
+
const _component_CnWidgetIcon = resolveComponent("CnWidgetIcon");
|
|
35
43
|
const _component_NcNoteCard = resolveComponent("NcNoteCard");
|
|
36
44
|
const _component_NcCheckboxRadioSwitch = resolveComponent("NcCheckboxRadioSwitch");
|
|
37
45
|
const _component_NcTextField = resolveComponent("NcTextField");
|
|
@@ -78,27 +86,37 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
78
86
|
class: "cn-add-widget-modal__type-label",
|
|
79
87
|
for: $data.typeSelectId
|
|
80
88
|
}, toDisplayString($options.t('nextcloud-vue', 'Widget type')), 9 /* TEXT, PROPS */, _hoisted_2),
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
createElementVNode("div", _hoisted_3, [
|
|
90
|
+
($options.state.type)
|
|
91
|
+
? (openBlock(), createElementBlock("span", _hoisted_4, [
|
|
92
|
+
createVNode(_component_CnWidgetIcon, {
|
|
93
|
+
name: $options.typeIcon($options.state.type),
|
|
94
|
+
size: 20
|
|
95
|
+
}, null, 8 /* PROPS */, ["name"])
|
|
96
|
+
]))
|
|
97
|
+
: createCommentVNode("v-if", true),
|
|
98
|
+
withDirectives(createElementVNode("select", {
|
|
99
|
+
id: $data.typeSelectId,
|
|
100
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($options.state.type) = $event)),
|
|
101
|
+
class: "cn-add-widget-modal__type-select",
|
|
102
|
+
"data-testid": "widget-type-select",
|
|
103
|
+
onChange: _cache[1] || (_cache[1] = (...args) => ($options.onTypeSwitch && $options.onTypeSwitch(...args)))
|
|
104
|
+
}, [
|
|
105
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.availableTypes, (type) => {
|
|
106
|
+
return (openBlock(), createElementBlock("option", {
|
|
107
|
+
key: type,
|
|
108
|
+
value: type,
|
|
109
|
+
"data-testid": `widget-type-option-${type}`
|
|
110
|
+
}, toDisplayString($options.typeDisplayName(type)), 9 /* TEXT, PROPS */, _hoisted_6))
|
|
111
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
112
|
+
], 40 /* PROPS, NEED_HYDRATION */, _hoisted_5), [
|
|
113
|
+
[vModelSelect, $options.state.type]
|
|
114
|
+
])
|
|
97
115
|
])
|
|
98
116
|
]))
|
|
99
117
|
: createCommentVNode("v-if", true),
|
|
100
118
|
($props.notices.length > 0 || _ctx.$slots.notices)
|
|
101
|
-
? (openBlock(), createElementBlock("div",
|
|
119
|
+
? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
102
120
|
(openBlock(true), createElementBlock(Fragment, null, renderList($props.notices, (notice, index) => {
|
|
103
121
|
return (openBlock(), createBlock(_component_NcNoteCard, {
|
|
104
122
|
key: notice.id || index,
|
|
@@ -111,7 +129,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
111
129
|
]))
|
|
112
130
|
: createCommentVNode("v-if", true),
|
|
113
131
|
($options.activeSubFormComponent)
|
|
114
|
-
? (openBlock(), createElementBlock("div",
|
|
132
|
+
? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
115
133
|
(openBlock(), createBlock(resolveDynamicComponent($options.activeSubFormComponent), {
|
|
116
134
|
ref: "activeSubForm",
|
|
117
135
|
key: $options.state.type,
|
|
@@ -122,10 +140,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
122
140
|
"onUpdate:content": $options.onContentUpdate
|
|
123
141
|
}, null, 40 /* PROPS, NEED_HYDRATION */, ["editingWidget", "value", "fileUploadFn", "calendarsFetcher", "onUpdate:content"]))
|
|
124
142
|
]))
|
|
125
|
-
: (openBlock(), createElementBlock("div",
|
|
143
|
+
: (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString($options.t('nextcloud-vue', 'No widget types available')), 1 /* TEXT */)),
|
|
126
144
|
($options.activeSubFormComponent)
|
|
127
|
-
? (openBlock(), createElementBlock("div",
|
|
128
|
-
createElementVNode("h3",
|
|
145
|
+
? (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
146
|
+
createElementVNode("h3", _hoisted_11, toDisplayString($options.t('nextcloud-vue', 'Appearance')), 1 /* TEXT */),
|
|
129
147
|
(!$options.activeTypeOwnsTitle)
|
|
130
148
|
? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
131
149
|
createVNode(_component_NcCheckboxRadioSwitch, {
|
|
@@ -147,18 +165,18 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
147
165
|
: createCommentVNode("v-if", true)
|
|
148
166
|
], 64 /* STABLE_FRAGMENT */))
|
|
149
167
|
: createCommentVNode("v-if", true),
|
|
150
|
-
createElementVNode("div",
|
|
151
|
-
createElementVNode("span",
|
|
168
|
+
createElementVNode("div", _hoisted_12, [
|
|
169
|
+
createElementVNode("span", _hoisted_13, toDisplayString($options.t('nextcloud-vue', 'Background')), 1 /* TEXT */),
|
|
152
170
|
createVNode(_component_CnColorPicker, {
|
|
153
171
|
value: $data.chrome.backgroundColor,
|
|
154
172
|
clearable: "",
|
|
155
173
|
onInput: _cache[4] || (_cache[4] = $event => ($data.chrome.backgroundColor = $event.hex)),
|
|
156
174
|
onClear: _cache[5] || (_cache[5] = $event => ($data.chrome.backgroundColor = ''))
|
|
157
175
|
}, null, 8 /* PROPS */, ["value"]),
|
|
158
|
-
createElementVNode("span",
|
|
176
|
+
createElementVNode("span", _hoisted_14, toDisplayString($data.chrome.backgroundColor || $options.t('nextcloud-vue', 'Default')), 1 /* TEXT */)
|
|
159
177
|
]),
|
|
160
|
-
createElementVNode("div",
|
|
161
|
-
createElementVNode("span",
|
|
178
|
+
createElementVNode("div", _hoisted_15, [
|
|
179
|
+
createElementVNode("span", _hoisted_16, toDisplayString($options.t('nextcloud-vue', 'Icon')), 1 /* TEXT */),
|
|
162
180
|
createVNode(_component_CnIconBrowser, {
|
|
163
181
|
value: $data.chrome.customIcon,
|
|
164
182
|
uploadFn: $props.uploadFn,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnAddWidgetModal3.vue.js","sources":["../../../src/dialogs/CnAddWidgetModal.vue?vue&type=template&id=057fc07c&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<NcDialog\n\t\tv-if=\"show\"\n\t\tsize=\"normal\"\n\t\t:name=\"modalTitle\"\n\t\t@closing=\"onCancel\">\n\t\t<!-- Type selector: shown only in pure-create mode (no preselected\n\t\t type, no editing widget). -->\n\t\t<div v-if=\"showTypeSelect\" class=\"cn-add-widget-modal__type\">\n\t\t\t<label class=\"cn-add-widget-modal__type-label\" :for=\"typeSelectId\">\n\t\t\t\t{{ t('nextcloud-vue', 'Widget type') }}\n\t\t\t</label>\n\t\t\t<select\n\t\t\t\t:id=\"typeSelectId\"\n\t\t\t\tv-model=\"state.type\"\n\t\t\t\tclass=\"cn-add-widget-modal__type-select\"\n\t\t\t\tdata-testid=\"widget-type-select\"\n\t\t\t\t@change=\"onTypeSwitch\">\n\t\t\t\t<option\n\t\t\t\t\tv-for=\"type in availableTypes\"\n\t\t\t\t\t:key=\"type\"\n\t\t\t\t\t:value=\"type\"\n\t\t\t\t\t:data-testid=\"`widget-type-option-${type}`\">\n\t\t\t\t\t{{ typeDisplayName(type) }}\n\t\t\t\t</option>\n\t\t\t</select>\n\t\t</div>\n\n\t\t<!-- Notices about the widget being edited, from the host: a finding\n\t\t the host made about its configuration (non-fatal), above the form. -->\n\t\t<div\n\t\t\tv-if=\"notices.length > 0 || $slots.notices\"\n\t\t\tclass=\"cn-add-widget-modal__notices\"\n\t\t\tdata-testid=\"cn-add-widget-modal-notices\">\n\t\t\t<!-- @slot Extra notices above the form; replaces nothing, follows the `notices` prop. -->\n\t\t\t<NcNoteCard\n\t\t\t\tv-for=\"(notice, index) in notices\"\n\t\t\t\t:key=\"notice.id || index\"\n\t\t\t\t:type=\"noticeType(notice)\"\n\t\t\t\t:text=\"notice.text\"\n\t\t\t\tdata-testid=\"cn-add-widget-modal-notice\" />\n\t\t\t<slot name=\"notices\" />\n\t\t</div>\n\n\t\t<!-- Active per-type sub-form. Driven by `<component :is>` from the\n\t\t shared registry; sub-forms expose `validate()` and either an\n\t\t `assembledContent` getter or `@update:content` events. -->\n\t\t<div v-if=\"activeSubFormComponent\" class=\"cn-add-widget-modal__form\">\n\t\t\t<component\n\t\t\t\t:is=\"activeSubFormComponent\"\n\t\t\t\tref=\"activeSubForm\"\n\t\t\t\t:key=\"state.type\"\n\t\t\t\t:editingWidget=\"state.editingWidget\"\n\t\t\t\t:value=\"state.content\"\n\t\t\t\t:fileUploadFn=\"fileUploadFn\"\n\t\t\t\t:calendarsFetcher=\"calendarsFetcher\"\n\t\t\t\t@update:content=\"onContentUpdate\" />\n\t\t</div>\n\t\t<div v-else class=\"cn-add-widget-modal__empty\">\n\t\t\t{{ t('nextcloud-vue', 'No widget types available') }}\n\t\t</div>\n\n\t\t<!-- Widget appearance (chrome): title, background, icon. Shared with\n\t\t every consumer so the add/edit experience is identical across apps\n\t\t (the chrome rides alongside `content` in the submit payload). -->\n\t\t<div v-if=\"activeSubFormComponent\" class=\"cn-add-widget-modal__chrome\">\n\t\t\t<h3 class=\"cn-add-widget-modal__chrome-title\">\n\t\t\t\t{{ t('nextcloud-vue', 'Appearance') }}\n\t\t\t</h3>\n\t\t\t<!-- Title chrome is hidden for types whose sub-form owns the title\n\t\t\t (e.g. the data widget's own Title field) so there aren't two\n\t\t\t title inputs. -->\n\t\t\t<template v-if=\"!activeTypeOwnsTitle\">\n\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\t:modelValue=\"chrome.showTitle\"\n\t\t\t\t\t@update:modelValue=\"chrome.showTitle = $event\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Show title') }}\n\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t<NcTextField\n\t\t\t\t\tv-if=\"chrome.showTitle\"\n\t\t\t\t\t:modelValue=\"chrome.customTitle\"\n\t\t\t\t\t:label=\"t('nextcloud-vue', 'Custom title')\"\n\t\t\t\t\t@update:modelValue=\"chrome.customTitle = $event\" />\n\t\t\t</template>\n\t\t\t<div class=\"cn-add-widget-modal__chrome-row\">\n\t\t\t\t<span class=\"cn-add-widget-modal__chrome-label\">{{ t('nextcloud-vue', 'Background') }}</span>\n\t\t\t\t<CnColorPicker\n\t\t\t\t\t:value=\"chrome.backgroundColor\"\n\t\t\t\t\tclearable\n\t\t\t\t\t@input=\"chrome.backgroundColor = $event.hex\"\n\t\t\t\t\t@clear=\"chrome.backgroundColor = ''\" />\n\t\t\t\t<span class=\"cn-add-widget-modal__chrome-value\">\n\t\t\t\t\t{{ chrome.backgroundColor || t('nextcloud-vue', 'Default') }}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<div class=\"cn-add-widget-modal__chrome-row\">\n\t\t\t\t<span class=\"cn-add-widget-modal__chrome-label\">{{ t('nextcloud-vue', 'Icon') }}</span>\n\t\t\t\t<CnIconBrowser\n\t\t\t\t\t:value=\"chrome.customIcon\"\n\t\t\t\t\t:uploadFn=\"uploadFn\"\n\t\t\t\t\tallowUrl\n\t\t\t\t\tclearable\n\t\t\t\t\t@input=\"chrome.customIcon = $event\" />\n\t\t\t</div>\n\t\t</div>\n\n\t\t<template #actions>\n\t\t\t<NcButton variant=\"tertiary\" :disabled=\"submitting\" @click=\"onCancel\">\n\t\t\t\t{{ t('nextcloud-vue', 'Cancel') }}\n\t\t\t</NcButton>\n\t\t\t<NcButton\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t:disabled=\"!canSubmit || submitting\"\n\t\t\t\t:title=\"firstError || ''\"\n\t\t\t\tdata-testid=\"add-widget-save\"\n\t\t\t\t@click=\"onSubmit\">\n\t\t\t\t{{ submitLabel }}\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcCheckboxRadioSwitch, NcDialog, NcNoteCard, NcTextField } from '@nextcloud/vue'\nimport { computed, provide } from 'vue'\nimport CnColorPicker from '../components/CnColorPicker/CnColorPicker.vue'\nimport CnIconBrowser from '../components/CnIconBrowser/CnIconBrowser.vue'\nimport {\n\tgetWidgetTypeEntry,\n\tlistUserAddableWidgetTypes,\n\tlistWidgetTypes,\n\tuserWidgetPresets,\n} from '../components/CnWidgetGrid/dashboardWidgetRegistry.js'\nimport { useWidgetForm } from '../composables/useWidgetForm.js'\n\nlet titleIdCounter = 0\nlet selectIdCounter = 0\n\n/**\n * CnAddWidgetModal — unified, isolated host (ADR-004) for both the \"add a\n * dashboard widget\" and \"edit a dashboard widget\" flows. The modal does NO API\n * and NO grid work itself; it emits `submit({type, content})` for the parent to\n * persist. Per-type fields live in sub-form components registered in the shared\n * `dashboardWidgetRegistry`.\n *\n * @spec openspec/changes/cn-widget-library/specs/cn-widget-library/spec.md\n */\nexport default {\n\tname: 'CnAddWidgetModal',\n\n\tcomponents: {\n\t\tNcDialog,\n\t\tNcButton,\n\t\tNcTextField,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcNoteCard,\n\t\tCnIconBrowser,\n\t\tCnColorPicker,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Toggles visibility. Going `false → true` triggers `resetForm()` (or\n\t\t * `loadEditingWidget()` when `editingWidget` is set).\n\t\t */\n\t\tshow: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * When set, the type `<select>` is hidden and the form opens directly\n\t\t * on this type (toolbar deep-links).\n\t\t */\n\t\tpreselectedType: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * When set, the modal opens in edit mode: the type select is hidden\n\t\t * (placement type is immutable) and the sub-form is pre-filled from\n\t\t * `editingWidget.content`. Must expose `type` and `content`.\n\t\t *\n\t\t * @type {{type: string, content: object}|null}\n\t\t */\n\t\teditingWidget: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Optional upload transport for the Appearance icon picker:\n\t\t * `async (dataUrl: string) => ({ url })`. The icon picker reads the chosen\n\t\t * file to a data URL and passes that string here. When null, the upload\n\t\t * control is hidden and the picker still offers its catalogues, NL sets,\n\t\t * and a URL field.\n\t\t *\n\t\t * @type {((dataUrl: string) => Promise<{url: string}>)|null}\n\t\t */\n\t\tuploadFn: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Optional raw-file upload transport forwarded to the active sub-form as\n\t\t * its `file-upload-fn`: `async (file: File) => ({ url })`. Deliberately a\n\t\t * separate prop from `uploadFn` (which the icon picker calls with a data\n\t\t * URL) so the File-typed transport can never reach a sub-form that expects\n\t\t * a data URL (e.g. `CnHeaderWidgetForm.uploadFn`). Sub-forms such as the\n\t\t * image widget defer the upload to submit and hand over the raw `File`.\n\t\t * When null, sub-forms fall back to their own no-transport behaviour.\n\t\t *\n\t\t * @type {((file: File) => Promise<{url: string}>)|null}\n\t\t */\n\t\tfileUploadFn: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Optional async fetcher returning the user's calendars\n\t\t * (`[{key, name, color}]`) for the calendar widget's picker. Provided\n\t\t * by the consuming app (which owns the calendar backend); when null the\n\t\t * calendar form falls back to free-text principal entry.\n\t\t *\n\t\t * @type {(() => Promise<Array<{key: string, name: string, color: string}>>)|null}\n\t\t */\n\t\tcalendarsFetcher: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Non-fatal notices about the widget, shown above its form: what the\n\t\t * host found about its configuration, e.g. a filter dimension the\n\t\t * dashboard does not publish. Each is `{ text, type?, id? }`, `type`\n\t\t * one of `warning` (default), `info`, `error`, `success`.\n\t\t *\n\t\t * @type {Array<{text: string, type?: string, id?: string}>}\n\t\t * @spec openspec/changes/add-widget-modal-notices/specs/add-widget-modal-notices/spec.md#requirement-the-widget-dialog-can-show-the-hosts-notices\n\t\t */\n\t\tnotices: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * The surface the picker offers types for. `'detail-page'` surfaces\n\t\t * detail-only types (e.g. a second `data` widget) alongside the universal\n\t\t * widgets; the default `'app-dashboard'` lists the dashboard set. Types\n\t\t * with no declared `surfaces` appear on every surface.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tsurface: {\n\t\t\ttype: String,\n\t\t\tdefault: 'app-dashboard',\n\t\t},\n\n\t\t/**\n\t\t * Whether this picker is being opened BY A USER for their own\n\t\t * dashboard, rather than by an administrator editing the page for\n\t\t * everybody. It narrows the type list to `userAddable` entries and\n\t\t * turns on the manifest presets.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tuserAddableOnly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The hosting page's config, read for `userWidgets[]` when\n\t\t * `userAddableOnly` is on.\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tpageConfig: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Authoritative object context `{ register, schema }` for the page hosting\n\t\t * the picker (supplied by the Buildiq edit button from the ACTIVE page's\n\t\t * config). Provided down as `cnObjectContext` so the data sub-form resolves\n\t\t * the right schema even though the modal teleports out of the page's\n\t\t * ambient provide tree. Null on surfaces without a single object (e.g.\n\t\t * dashboards).\n\t\t *\n\t\t * @type {{register: string, schema: string}|null}\n\t\t */\n\t\tdataContext: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: [\n\t\t/** Fired on cancel button, backdrop click, or Esc key. */\n\t\t'close',\n\t\t/** Fired with the assembled `{type, content}` payload for the parent to persist. */\n\t\t'submit',\n\t],\n\n\tsetup(props) {\n\t\t// One composable instance per modal mount. The composable owns the\n\t\t// type/content/editingWidget reactive state shared with sub-forms.\n\t\tconst form = useWidgetForm()\n\t\t// Publish the page's object context to the (teleported) sub-forms so the\n\t\t// data widget's property editor loads the ACTIVE page's schema, not\n\t\t// whatever ambient context the modal lands next to in the DOM.\n\t\tprovide('cnObjectContext', computed(() => props.dataContext || null))\n\t\treturn { form }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t// Re-validation tick: `isValid` must recompute every time the\n\t\t\t// active sub-form's input changes. Sub-forms emit `update:content`\n\t\t\t// on every keystroke; we bump this counter in the handler so the\n\t\t\t// computed re-runs.\n\t\t\tvalidationTick: 0,\n\t\t\t// Snapshot of the assembled content + chrome captured when the modal\n\t\t\t// opens; `isDirty` compares the live values against it so editing an\n\t\t\t// existing widget only enables Save once something actually changed.\n\t\t\tinitialSnapshot: '',\n\t\t\ttitleId: `cn-add-widget-modal-title-${++titleIdCounter}`,\n\t\t\ttypeSelectId: `cn-add-widget-modal-type-${++selectIdCounter}`,\n\t\t\t// Widget chrome (title / background / icon) edited in the same modal\n\t\t\t// as the per-type content and emitted back under `payload.chrome`.\n\t\t\tchrome: { showTitle: true, customTitle: '', backgroundColor: '', customIcon: '' },\n\t\t\t// True while the sub-form's commit() (e.g. an image upload) runs on\n\t\t\t// submit, so both footer buttons disable and the label shows progress.\n\t\t\tsubmitting: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The shared form state container ({type, content, editingWidget}).\n\t\t *\n\t\t * @return {{type: string, content: object, editingWidget: (object|null)}} the reactive state.\n\t\t */\n\t\tstate() {\n\t\t\treturn this.form.state\n\t\t},\n\n\t\t/**\n\t\t * Type keys the picker offers — only registry entries that have a form.\n\t\t *\n\t\t * @return {string[]} the form-bearing type keys.\n\t\t */\n\t\tavailableTypes() {\n\t\t\t// A USER PICKING FOR THEMSELVES IS OFFERED A SMALLER LIST. An\n\t\t\t// administrator configures a widget once with the register and\n\t\t\t// schema in front of them; a user has neither and cannot be told\n\t\t\t// about them, so they see only the types whose registry entry\n\t\t\t// declares `userAddable`.\n\t\t\treturn this.userAddableOnly\n\t\t\t\t? listUserAddableWidgetTypes(this.surface)\n\t\t\t\t: listWidgetTypes(this.surface)\n\t\t},\n\n\t\t/**\n\t\t * The presets this page offers a user, from `config.userWidgets[]`.\n\t\t *\n\t\t * @return {Array<object>} The offerable presets.\n\t\t */\n\t\tavailablePresets() {\n\t\t\treturn this.userAddableOnly ? userWidgetPresets(this.pageConfig) : []\n\t\t},\n\n\t\t/**\n\t\t * Whether the active type's sub-form owns the widget title (declares\n\t\t * `ownsTitle` in its registry entry). When true the modal hides its\n\t\t * generic Title chrome so there aren't two title inputs.\n\t\t *\n\t\t * @return {boolean} true when the sub-form provides its own title field.\n\t\t */\n\t\tactiveTypeOwnsTitle() {\n\t\t\tconst entry = getWidgetTypeEntry(this.state.type)\n\t\t\treturn !!(entry && entry.ownsTitle)\n\t\t},\n\n\t\t/**\n\t\t * Whether to show the type select (hidden in edit / preselected mode).\n\t\t *\n\t\t * @return {boolean} true only in pure-create mode.\n\t\t */\n\t\tshowTypeSelect() {\n\t\t\treturn !this.editingWidget && !this.preselectedType\n\t\t},\n\n\t\t/**\n\t\t * The Vue component to mount via `<component :is>` for the active type,\n\t\t * or `null` when the type is unknown or renderer-only.\n\t\t *\n\t\t * @return {object|null} the active sub-form component reference.\n\t\t */\n\t\tactiveSubFormComponent() {\n\t\t\tconst entry = getWidgetTypeEntry(this.state.type)\n\t\t\treturn entry?.form || null\n\t\t},\n\n\t\t/**\n\t\t * Modal heading — flips between Add and Edit based on edit mode.\n\t\t *\n\t\t * @return {string} the localised modal title.\n\t\t */\n\t\tmodalTitle() {\n\t\t\treturn this.editingWidget\n\t\t\t\t? t('nextcloud-vue', 'Edit Widget')\n\t\t\t\t: t('nextcloud-vue', 'Add Widget')\n\t\t},\n\n\t\t/**\n\t\t * Submit button label — flips between Add and Save based on edit mode.\n\t\t *\n\t\t * @return {string} the localised submit label.\n\t\t *\n\t\t * @spec openspec/changes/cn-widget-library/specs/cn-widget-library/spec.md\n\t\t */\n\t\tsubmitLabel() {\n\t\t\tif (this.submitting) {\n\t\t\t\treturn t('nextcloud-vue', 'Uploading…')\n\t\t\t}\n\t\t\treturn this.editingWidget ? t('nextcloud-vue', 'Save') : t('nextcloud-vue', 'Add')\n\t\t},\n\n\t\t/**\n\t\t * The active sub-form's validation errors. `validationTick` keeps Vue's\n\t\t * dependency tracker aware that this computed re-runs on every input.\n\t\t *\n\t\t * @return {string[]} the validation error messages.\n\t\t */\n\t\tvalidationErrors() {\n\t\t\t// Read the tick, discard the value: `$refs` is not reactive, so the\n\t\t\t// tick is what Vue can track as this computed's dependency.\n\t\t\tvoid this.validationTick\n\t\t\treturn this.form.validate(this.$refs.activeSubForm)\n\t\t},\n\n\t\t/**\n\t\t * Whether the submit button is enabled (no validation errors).\n\t\t *\n\t\t * @return {boolean} true when the active sub-form is valid.\n\t\t */\n\t\tisValid() {\n\t\t\treturn this.validationErrors.length === 0\n\t\t},\n\n\t\t/**\n\t\t * Whether the content or chrome differs from the snapshot taken when the\n\t\t * modal opened. Depends on `chrome` (via the snapshot's JSON) and the\n\t\t * `validationTick` (bumped on every sub-form `update:content`) so it\n\t\t * re-runs on both chrome and form-field edits.\n\t\t *\n\t\t * @return {boolean} true when something changed since open.\n\t\t */\n\t\tisDirty() {\n\t\t\t// Read the tick, discard the value, so content edits re-run this.\n\t\t\tvoid this.validationTick\n\t\t\treturn this.currentSnapshot() !== this.initialSnapshot\n\t\t},\n\n\t\t/**\n\t\t * Whether Save is allowed: the form must be valid, and — when editing an\n\t\t * existing widget — something must have changed. Create mode may submit\n\t\t * the (valid) defaults straight away.\n\t\t *\n\t\t * @return {boolean} true when the submit button is enabled.\n\t\t */\n\t\tcanSubmit() {\n\t\t\tif (!this.isValid) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn !this.editingWidget || this.isDirty\n\t\t},\n\n\t\t/**\n\t\t * The first user-visible validation error (hides the internal\n\t\t * `__no-active-form__` sentinel).\n\t\t *\n\t\t * @return {string} the first error message, or an empty string.\n\t\t */\n\t\tfirstError() {\n\t\t\tconst err = this.validationErrors[0]\n\t\t\treturn err && err !== '__no-active-form__' ? err : ''\n\t\t},\n\t},\n\n\twatch: {\n\t\t/**\n\t\t * Re-initialise the form when the modal opens.\n\t\t *\n\t\t * @param {boolean} isOpen the new `show` value.\n\t\t * @return {void}\n\t\t */\n\t\tshow(isOpen) {\n\t\t\tif (isOpen) {\n\t\t\t\tthis.openLifecycle()\n\t\t\t}\n\t\t},\n\n\t\teditingWidget: {\n\t\t\timmediate: false,\n\t\t\t/**\n\t\t\t * Pre-fill from a newly-supplied editing widget while open.\n\t\t\t *\n\t\t\t * @param {object|null} widget the placement being edited.\n\t\t\t * @return {void}\n\t\t\t */\n\t\t\thandler(widget) {\n\t\t\t\tif (this.show && widget) {\n\t\t\t\t\tthis.form.loadEditingWidget(widget)\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Re-seed the form when the preselected type changes while open.\n\t\t *\n\t\t * @param {string|null} type the new preselected type.\n\t\t * @return {void}\n\t\t */\n\t\tpreselectedType(type) {\n\t\t\tif (this.show && type && !this.editingWidget) {\n\t\t\t\tthis.form.resetForm(type)\n\t\t\t}\n\t\t},\n\t},\n\n\tcreated() {\n\t\t// Seed state synchronously before the first render so the\n\t\t// `v-if=\"activeSubFormComponent\"` path resolves to the right sub-form\n\t\t// on initial mount (otherwise the modal flashes the \"No widget types\n\t\t// available\" empty state for one tick).\n\t\tif (this.show) {\n\t\t\tthis.openLifecycle()\n\t\t}\n\t},\n\n\tmounted() {\n\t\tdocument.addEventListener('keydown', this.onKeydown)\n\t\t// The validation gate reads `$refs.activeSubForm`, which is null while\n\t\t// `created()` runs (the sub-form mounts after the first render). Bump\n\t\t// the tick once the ref is bound so `isValid` reflects the freshly\n\t\t// mounted sub-form's `validate()` without waiting for the first input.\n\t\tthis.$nextTick(() => {\n\t\t\tthis.validationTick++\n\t\t})\n\t},\n\n\tbeforeUnmount() {\n\t\tdocument.removeEventListener('keydown', this.onKeydown)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * The note card type of a notice: its own when known, else `warning`.\n\t\t *\n\t\t * @param {{type?: string}} notice The notice.\n\t\t * @return {string}\n\t\t * @spec openspec/changes/add-widget-modal-notices/specs/add-widget-modal-notices/spec.md#requirement-the-widget-dialog-can-show-the-hosts-notices\n\t\t */\n\t\tnoticeType(notice) {\n\t\t\treturn ['warning', 'info', 'error', 'success'].includes(notice && notice.type) ? notice.type : 'warning'\n\t\t},\n\n\t\tt,\n\n\t\t/**\n\t\t * Initialise form state when the modal opens. Edit mode pre-fills from\n\t\t * `editingWidget`; create mode resets to the preselected type (toolbar\n\t\t * invocation) or to the first available registered type.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\topenLifecycle() {\n\t\t\tif (this.editingWidget) {\n\t\t\t\tthis.form.loadEditingWidget(this.editingWidget)\n\t\t\t\tthis.seedChrome(this.editingWidget)\n\t\t\t} else {\n\t\t\t\tconst initialType = this.preselectedType\n\t\t\t\t\t|| this.availableTypes[0]\n\t\t\t\t\t|| ''\n\t\t\t\tthis.form.resetForm(initialType)\n\t\t\t\tthis.seedChrome(null)\n\t\t\t}\n\t\t\t// Revalidate on every open (the modal instance persists across\n\t\t\t// open/close, so `mounted()`'s one-time bump doesn't fire again).\n\t\t\t// Bump synchronously and again once the sub-form has (re)mounted and\n\t\t\t// its `$refs.activeSubForm` is bound — otherwise the submit gate stays\n\t\t\t// stale in edit mode until the user touches a form field. The nextTick\n\t\t\t// pass also captures the pristine snapshot `isDirty` compares against.\n\t\t\tthis.validationTick++\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.validationTick++\n\t\t\t\tthis.initialSnapshot = this.currentSnapshot()\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Serialise the current assembled content + chrome for dirty comparison.\n\t\t *\n\t\t * @return {string} a stable JSON snapshot of the editable state.\n\t\t */\n\t\tcurrentSnapshot() {\n\t\t\tconst { content } = this.form.assembleContent(this.$refs.activeSubForm)\n\t\t\treturn JSON.stringify({ content, chrome: this.chrome })\n\t\t},\n\n\t\t/**\n\t\t * Seed the Appearance controls (title / background / icon) from a\n\t\t * placement being edited, or to defaults in create mode. Reads chrome\n\t\t * fields from the placement's top level with a fallback to its `content`\n\t\t * (and `styleConfig.backgroundColor`), so it round-trips whatever shape\n\t\t * the consumer persists.\n\t\t *\n\t\t * @param {object|null} widget The placement being edited, or null.\n\t\t * @return {void}\n\t\t */\n\t\tseedChrome(widget) {\n\t\t\tconst w = widget || {}\n\t\t\tconst c = (w.content && typeof w.content === 'object') ? w.content : {}\n\t\t\tconst pick = (...vals) => vals.find((v) => v !== undefined && v !== null)\n\t\t\tconst showRaw = pick(w.showTitle, c.showTitle)\n\t\t\tthis.chrome = {\n\t\t\t\t// Cards (stat / gauge / delta) headline themselves via `content.label`,\n\t\t\t\t// so they default headerless — otherwise the chrome header just repeats\n\t\t\t\t// the label, or shows the bare type name when no title was ever set.\n\t\t\t\tshowTitle: showRaw === undefined\n\t\t\t\t\t? !this.isCardType(w.type || this.state.type)\n\t\t\t\t\t: Boolean(Number(showRaw) || showRaw === true),\n\n\t\t\t\tcustomTitle: pick(w.customTitle, c.customTitle, c.title) || '',\n\t\t\t\tbackgroundColor: pick(w.backgroundColor, w.styleConfig?.backgroundColor, c.styleConfig?.backgroundColor) || '',\n\t\t\t\tcustomIcon: pick(w.customIcon, c.customIcon, c.icon) || '',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle a `<select>` change: swap the active sub-form and reset its\n\t\t * state to defaults. Switching type discards any in-progress field\n\t\t * input. The sub-form is keyed on `state.type`, so changing the type\n\t\t * tears down the old `<component :is>` and remounts a new one;\n\t\t * `$refs.activeSubForm` is briefly null between teardown and mount, so\n\t\t * we bump the tick again on the next tick once the ref is rebound.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonTypeSwitch() {\n\t\t\tthis.form.resetForm(this.state.type)\n\t\t\t// Re-apply the type's chrome default: switching between a card and a\n\t\t\t// full widget flips whether a header makes sense.\n\t\t\tthis.chrome.showTitle = !this.isCardType(this.state.type)\n\t\t\tthis.validationTick++\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.validationTick++\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Whether a widget type is a self-contained card (stat / gauge / delta),\n\t\t * which renders headerless by default.\n\t\t *\n\t\t * @param {string} type the registry type key.\n\t\t * @return {boolean} true when the registry entry is a card.\n\t\t */\n\t\tisCardType(type) {\n\t\t\tif (!type) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst entry = getWidgetTypeEntry(type)\n\t\t\treturn Boolean(entry && entry.card === true)\n\t\t},\n\n\t\t/**\n\t\t * Mirror a sub-form `update:content` payload into the composable state\n\t\t * (so `assembleContent()` can fall back to it) and bump the validation\n\t\t * tick so the submit button enables/disables reactively on input.\n\t\t *\n\t\t * @param {object} content the sub-form's current content payload.\n\t\t * @return {void}\n\t\t */\n\t\tonContentUpdate(content) {\n\t\t\tthis.state.content = { ...content }\n\t\t\tthis.validationTick++\n\t\t},\n\n\t\t/**\n\t\t * Cancel button / backdrop / NcModal `close` event — non-destructive,\n\t\t * never emits submit. Suppressed while a sub-form `commit()` (e.g. an\n\t\t * image upload) is in flight so dismissing the dialog can't unmount the\n\t\t * sub-form mid-upload (which would orphan the upload and write into a\n\t\t * destroyed instance).\n\t\t *\n\t\t * @return {void}\n\t\t *\n\t\t * @spec openspec/changes/cn-widget-library/specs/cn-widget-library/spec.md\n\t\t */\n\t\tonCancel() {\n\t\t\tif (this.submitting) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.$emit('close')\n\t\t},\n\n\t\t/**\n\t\t * Esc-key fallback listener (in case NcModal's own handler is\n\t\t * suppressed by a parent focus-trap). Emits `close`, never `submit`.\n\t\t * Suppressed while a commit() is in flight (see `onCancel`).\n\t\t *\n\t\t * @param {KeyboardEvent} event the keydown event.\n\t\t * @return {void}\n\t\t *\n\t\t * @spec openspec/changes/cn-widget-library/specs/cn-widget-library/spec.md\n\t\t */\n\t\tonKeydown(event) {\n\t\t\tif (this.submitting) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.show && event.key === 'Escape') {\n\t\t\t\tthis.$emit('close')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Commit the active sub-form (e.g. upload a pending image), then build\n\t\t * the `{type, content}` payload via the composable's `assembleContent()`\n\t\t * and emit it. The commit is the only step that can hit the network; a\n\t\t * commit failure keeps the modal open and blocks the `submit` emit.\n\t\t *\n\t\t * @return {Promise<void>} resolves once submit is emitted or aborted.\n\t\t *\n\t\t * @spec openspec/changes/cn-widget-library/specs/cn-widget-library/spec.md\n\t\t */\n\t\tasync onSubmit() {\n\t\t\tif (!this.isValid || this.submitting) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst subForm = this.$refs.activeSubForm\n\t\t\tif (subForm && typeof subForm.commit === 'function') {\n\t\t\t\tthis.submitting = true\n\t\t\t\ttry {\n\t\t\t\t\tawait subForm.commit()\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// The sub-form surfaces its own inline error; keep the modal\n\t\t\t\t\t// open so the author can retry or pick another file.\n\t\t\t\t\t// eslint-disable-next-line no-console -- diagnostic for a failure this code already degrades from\n\t\t\t\t\tconsole.error('[CnAddWidgetModal] Widget commit failed:', error)\n\t\t\t\t\treturn\n\t\t\t\t} finally {\n\t\t\t\t\tthis.submitting = false\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst payload = this.form.assembleContent(this.$refs.activeSubForm)\n\t\t\t// Carry the chrome (title / background / icon) alongside the content\n\t\t\t// so the parent persists both from this single modal.\n\t\t\tpayload.chrome = {\n\t\t\t\tshowTitle: this.chrome.showTitle,\n\t\t\t\tcustomTitle: this.chrome.customTitle,\n\t\t\t\tcustomIcon: this.chrome.customIcon,\n\t\t\t\tbackgroundColor: this.chrome.backgroundColor,\n\t\t\t}\n\t\t\tthis.$emit('submit', payload)\n\t\t},\n\n\t\t/**\n\t\t * Look up the human-readable display name for a registry type, falling\n\t\t * back to the type key itself.\n\t\t *\n\t\t * @param {string} type the registry type key.\n\t\t * @return {string} the display name.\n\t\t */\n\t\ttypeDisplayName(type) {\n\t\t\tconst entry = getWidgetTypeEntry(type)\n\t\t\treturn entry?.displayName || type\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-add-widget-modal__type {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-add-widget-modal__type-label {\n\tfont-size: 14px;\n\tfont-weight: 500;\n}\n\n.cn-add-widget-modal__type-select {\n\tpadding: 8px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-main-text);\n\tfont-size: 14px;\n}\n\n.cn-add-widget-modal__form {\n\toverflow-y: auto;\n\t/* Prefer a roomy ~340px for the type-specific fields (data-driven widgets\n\t carry tall forms — columns, thresholds, data source); still shrinks with\n\t its own scroll on short viewports so the Appearance + actions stay visible. */\n\tflex: 1 1 340px;\n\tmin-height: 0;\n}\n\n.cn-add-widget-modal__empty {\n\tpadding: 16px;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-add-widget-modal__chrome {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tborder-top: 1px solid var(--color-border);\n\tpadding-top: 12px;\n}\n\n.cn-add-widget-modal__chrome-title {\n\tmargin: 0;\n\tfont-size: 15px;\n\tfont-weight: 600;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-add-widget-modal__chrome-row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 12px;\n}\n\n.cn-add-widget-modal__chrome-label {\n\tmin-width: 96px;\n\tfont-size: 14px;\n}\n\n.cn-add-widget-modal__chrome-value {\n\tfont-size: 13px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-add-widget-modal__notices {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-block-end: 12px;\n}\n</style>\n"],"names":["_createVNode","_openBlock","_createElementBlock","_createElementVNode","_Fragment","_renderList","_toDisplayString","_vModelSelect","_createBlock"],"mappings":";;;;AAkBqB,EAAA,KAAA,EAAA;;;;;;;OAwBb,EAAC,8BAAmB;eACd,EAAC;;;;AAcsB,EAAA,KAAE,EAAA;;;;AAWzB,EAAA,KAAK,EAAC;;;;AAOiB,EAAA,KA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OAAK,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,KAAE,KAAA,CAAA,MAAM,CAAC,UAAU,GAAG,MAAM,CAAA;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"CnAddWidgetModal3.vue.js","sources":["../../../src/dialogs/CnAddWidgetModal.vue?vue&type=template&id=626d5ba2&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<NcDialog\n\t\tv-if=\"show\"\n\t\tsize=\"normal\"\n\t\t:name=\"modalTitle\"\n\t\t@closing=\"onCancel\">\n\t\t<!-- Type selector: shown only in pure-create mode (no preselected\n\t\t type, no editing widget). -->\n\t\t<div v-if=\"showTypeSelect\" class=\"cn-add-widget-modal__type\">\n\t\t\t<label class=\"cn-add-widget-modal__type-label\" :for=\"typeSelectId\">\n\t\t\t\t{{ t('nextcloud-vue', 'Widget type') }}\n\t\t\t</label>\n\t\t\t<!-- A native option cannot draw an icon, so the chosen type's\n\t\t\t icon stands in front of the select. -->\n\t\t\t<div class=\"cn-add-widget-modal__type-row\">\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"state.type\"\n\t\t\t\t\tclass=\"cn-add-widget-modal__type-icon\"\n\t\t\t\t\tdata-testid=\"widget-type-icon\"\n\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t<CnWidgetIcon :name=\"typeIcon(state.type)\" :size=\"20\" />\n\t\t\t\t</span>\n\t\t\t\t<select\n\t\t\t\t\t:id=\"typeSelectId\"\n\t\t\t\t\tv-model=\"state.type\"\n\t\t\t\t\tclass=\"cn-add-widget-modal__type-select\"\n\t\t\t\t\tdata-testid=\"widget-type-select\"\n\t\t\t\t\t@change=\"onTypeSwitch\">\n\t\t\t\t\t<option\n\t\t\t\t\t\tv-for=\"type in availableTypes\"\n\t\t\t\t\t\t:key=\"type\"\n\t\t\t\t\t\t:value=\"type\"\n\t\t\t\t\t\t:data-testid=\"`widget-type-option-${type}`\">\n\t\t\t\t\t\t{{ typeDisplayName(type) }}\n\t\t\t\t\t</option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<!-- Notices about the widget being edited, from the host: a finding\n\t\t the host made about its configuration (non-fatal), above the form. -->\n\t\t<div\n\t\t\tv-if=\"notices.length > 0 || $slots.notices\"\n\t\t\tclass=\"cn-add-widget-modal__notices\"\n\t\t\tdata-testid=\"cn-add-widget-modal-notices\">\n\t\t\t<!-- @slot Extra notices above the form; replaces nothing, follows the `notices` prop. -->\n\t\t\t<NcNoteCard\n\t\t\t\tv-for=\"(notice, index) in notices\"\n\t\t\t\t:key=\"notice.id || index\"\n\t\t\t\t:type=\"noticeType(notice)\"\n\t\t\t\t:text=\"notice.text\"\n\t\t\t\tdata-testid=\"cn-add-widget-modal-notice\" />\n\t\t\t<slot name=\"notices\" />\n\t\t</div>\n\n\t\t<!-- Active per-type sub-form. Driven by `<component :is>` from the\n\t\t shared registry; sub-forms expose `validate()` and either an\n\t\t `assembledContent` getter or `@update:content` events. -->\n\t\t<div v-if=\"activeSubFormComponent\" class=\"cn-add-widget-modal__form\">\n\t\t\t<component\n\t\t\t\t:is=\"activeSubFormComponent\"\n\t\t\t\tref=\"activeSubForm\"\n\t\t\t\t:key=\"state.type\"\n\t\t\t\t:editingWidget=\"state.editingWidget\"\n\t\t\t\t:value=\"state.content\"\n\t\t\t\t:fileUploadFn=\"fileUploadFn\"\n\t\t\t\t:calendarsFetcher=\"calendarsFetcher\"\n\t\t\t\t@update:content=\"onContentUpdate\" />\n\t\t</div>\n\t\t<div v-else class=\"cn-add-widget-modal__empty\">\n\t\t\t{{ t('nextcloud-vue', 'No widget types available') }}\n\t\t</div>\n\n\t\t<!-- Widget appearance (chrome): title, background, icon. Shared with\n\t\t every consumer so the add/edit experience is identical across apps\n\t\t (the chrome rides alongside `content` in the submit payload). -->\n\t\t<div v-if=\"activeSubFormComponent\" class=\"cn-add-widget-modal__chrome\">\n\t\t\t<h3 class=\"cn-add-widget-modal__chrome-title\">\n\t\t\t\t{{ t('nextcloud-vue', 'Appearance') }}\n\t\t\t</h3>\n\t\t\t<!-- Title chrome is hidden for types whose sub-form owns the title\n\t\t\t (e.g. the data widget's own Title field) so there aren't two\n\t\t\t title inputs. -->\n\t\t\t<template v-if=\"!activeTypeOwnsTitle\">\n\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\t:modelValue=\"chrome.showTitle\"\n\t\t\t\t\t@update:modelValue=\"chrome.showTitle = $event\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Show title') }}\n\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t<NcTextField\n\t\t\t\t\tv-if=\"chrome.showTitle\"\n\t\t\t\t\t:modelValue=\"chrome.customTitle\"\n\t\t\t\t\t:label=\"t('nextcloud-vue', 'Custom title')\"\n\t\t\t\t\t@update:modelValue=\"chrome.customTitle = $event\" />\n\t\t\t</template>\n\t\t\t<div class=\"cn-add-widget-modal__chrome-row\">\n\t\t\t\t<span class=\"cn-add-widget-modal__chrome-label\">{{ t('nextcloud-vue', 'Background') }}</span>\n\t\t\t\t<CnColorPicker\n\t\t\t\t\t:value=\"chrome.backgroundColor\"\n\t\t\t\t\tclearable\n\t\t\t\t\t@input=\"chrome.backgroundColor = $event.hex\"\n\t\t\t\t\t@clear=\"chrome.backgroundColor = ''\" />\n\t\t\t\t<span class=\"cn-add-widget-modal__chrome-value\">\n\t\t\t\t\t{{ chrome.backgroundColor || t('nextcloud-vue', 'Default') }}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<div class=\"cn-add-widget-modal__chrome-row\">\n\t\t\t\t<span class=\"cn-add-widget-modal__chrome-label\">{{ t('nextcloud-vue', 'Icon') }}</span>\n\t\t\t\t<CnIconBrowser\n\t\t\t\t\t:value=\"chrome.customIcon\"\n\t\t\t\t\t:uploadFn=\"uploadFn\"\n\t\t\t\t\tallowUrl\n\t\t\t\t\tclearable\n\t\t\t\t\t@input=\"chrome.customIcon = $event\" />\n\t\t\t</div>\n\t\t</div>\n\n\t\t<template #actions>\n\t\t\t<NcButton variant=\"tertiary\" :disabled=\"submitting\" @click=\"onCancel\">\n\t\t\t\t{{ t('nextcloud-vue', 'Cancel') }}\n\t\t\t</NcButton>\n\t\t\t<NcButton\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t:disabled=\"!canSubmit || submitting\"\n\t\t\t\t:title=\"firstError || ''\"\n\t\t\t\tdata-testid=\"add-widget-save\"\n\t\t\t\t@click=\"onSubmit\">\n\t\t\t\t{{ submitLabel }}\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcCheckboxRadioSwitch, NcDialog, NcNoteCard, NcTextField } from '@nextcloud/vue'\nimport { computed, provide } from 'vue'\nimport CnColorPicker from '../components/CnColorPicker/CnColorPicker.vue'\nimport CnIconBrowser from '../components/CnIconBrowser/CnIconBrowser.vue'\nimport CnWidgetIcon from '../components/CnWidgetGrid/CnWidgetIcon.vue'\nimport {\n\tgetWidgetTypeEntry,\n\tlistUserAddableWidgetTypes,\n\tlistWidgetTypes,\n\tuserWidgetPresets,\n} from '../components/CnWidgetGrid/dashboardWidgetRegistry.js'\nimport { useWidgetForm } from '../composables/useWidgetForm.js'\n\nlet titleIdCounter = 0\nlet selectIdCounter = 0\n\n/**\n * CnAddWidgetModal — unified, isolated host (ADR-004) for both the \"add a\n * dashboard widget\" and \"edit a dashboard widget\" flows. The modal does NO API\n * and NO grid work itself; it emits `submit({type, content})` for the parent to\n * persist. Per-type fields live in sub-form components registered in the shared\n * `dashboardWidgetRegistry`.\n *\n * @spec openspec/changes/cn-widget-library/specs/cn-widget-library/spec.md\n */\nexport default {\n\tname: 'CnAddWidgetModal',\n\n\tcomponents: {\n\t\tNcDialog,\n\t\tNcButton,\n\t\tNcTextField,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcNoteCard,\n\t\tCnIconBrowser,\n\t\tCnColorPicker,\n\t\tCnWidgetIcon,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Toggles visibility. Going `false → true` triggers `resetForm()` (or\n\t\t * `loadEditingWidget()` when `editingWidget` is set).\n\t\t */\n\t\tshow: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * When set, the type `<select>` is hidden and the form opens directly\n\t\t * on this type (toolbar deep-links).\n\t\t */\n\t\tpreselectedType: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * When set, the modal opens in edit mode: the type select is hidden\n\t\t * (placement type is immutable) and the sub-form is pre-filled from\n\t\t * `editingWidget.content`. Must expose `type` and `content`.\n\t\t *\n\t\t * @type {{type: string, content: object}|null}\n\t\t */\n\t\teditingWidget: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Optional upload transport for the Appearance icon picker:\n\t\t * `async (dataUrl: string) => ({ url })`. The icon picker reads the chosen\n\t\t * file to a data URL and passes that string here. When null, the upload\n\t\t * control is hidden and the picker still offers its catalogues, NL sets,\n\t\t * and a URL field.\n\t\t *\n\t\t * @type {((dataUrl: string) => Promise<{url: string}>)|null}\n\t\t */\n\t\tuploadFn: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Optional raw-file upload transport forwarded to the active sub-form as\n\t\t * its `file-upload-fn`: `async (file: File) => ({ url })`. Deliberately a\n\t\t * separate prop from `uploadFn` (which the icon picker calls with a data\n\t\t * URL) so the File-typed transport can never reach a sub-form that expects\n\t\t * a data URL (e.g. `CnHeaderWidgetForm.uploadFn`). Sub-forms such as the\n\t\t * image widget defer the upload to submit and hand over the raw `File`.\n\t\t * When null, sub-forms fall back to their own no-transport behaviour.\n\t\t *\n\t\t * @type {((file: File) => Promise<{url: string}>)|null}\n\t\t */\n\t\tfileUploadFn: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Optional async fetcher returning the user's calendars\n\t\t * (`[{key, name, color}]`) for the calendar widget's picker. Provided\n\t\t * by the consuming app (which owns the calendar backend); when null the\n\t\t * calendar form falls back to free-text principal entry.\n\t\t *\n\t\t * @type {(() => Promise<Array<{key: string, name: string, color: string}>>)|null}\n\t\t */\n\t\tcalendarsFetcher: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Non-fatal notices about the widget, shown above its form: what the\n\t\t * host found about its configuration, e.g. a filter dimension the\n\t\t * dashboard does not publish. Each is `{ text, type?, id? }`, `type`\n\t\t * one of `warning` (default), `info`, `error`, `success`.\n\t\t *\n\t\t * @type {Array<{text: string, type?: string, id?: string}>}\n\t\t * @spec openspec/changes/add-widget-modal-notices/specs/add-widget-modal-notices/spec.md#requirement-the-widget-dialog-can-show-the-hosts-notices\n\t\t */\n\t\tnotices: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * The surface the picker offers types for. `'detail-page'` surfaces\n\t\t * detail-only types (e.g. a second `data` widget) alongside the universal\n\t\t * widgets; the default `'app-dashboard'` lists the dashboard set. Types\n\t\t * with no declared `surfaces` appear on every surface.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tsurface: {\n\t\t\ttype: String,\n\t\t\tdefault: 'app-dashboard',\n\t\t},\n\n\t\t/**\n\t\t * Whether this picker is being opened BY A USER for their own\n\t\t * dashboard, rather than by an administrator editing the page for\n\t\t * everybody. It narrows the type list to `userAddable` entries and\n\t\t * turns on the manifest presets.\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tuserAddableOnly: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The hosting page's config, read for `userWidgets[]` when\n\t\t * `userAddableOnly` is on.\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tpageConfig: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Authoritative object context `{ register, schema }` for the page hosting\n\t\t * the picker (supplied by the Buildiq edit button from the ACTIVE page's\n\t\t * config). Provided down as `cnObjectContext` so the data sub-form resolves\n\t\t * the right schema even though the modal teleports out of the page's\n\t\t * ambient provide tree. Null on surfaces without a single object (e.g.\n\t\t * dashboards).\n\t\t *\n\t\t * @type {{register: string, schema: string}|null}\n\t\t */\n\t\tdataContext: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: [\n\t\t/** Fired on cancel button, backdrop click, or Esc key. */\n\t\t'close',\n\t\t/** Fired with the assembled `{type, content}` payload for the parent to persist. */\n\t\t'submit',\n\t],\n\n\tsetup(props) {\n\t\t// One composable instance per modal mount. The composable owns the\n\t\t// type/content/editingWidget reactive state shared with sub-forms.\n\t\tconst form = useWidgetForm()\n\t\t// Publish the page's object context to the (teleported) sub-forms so the\n\t\t// data widget's property editor loads the ACTIVE page's schema, not\n\t\t// whatever ambient context the modal lands next to in the DOM.\n\t\tprovide('cnObjectContext', computed(() => props.dataContext || null))\n\t\treturn { form }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t// Re-validation tick: `isValid` must recompute every time the\n\t\t\t// active sub-form's input changes. Sub-forms emit `update:content`\n\t\t\t// on every keystroke; we bump this counter in the handler so the\n\t\t\t// computed re-runs.\n\t\t\tvalidationTick: 0,\n\t\t\t// Snapshot of the assembled content + chrome captured when the modal\n\t\t\t// opens; `isDirty` compares the live values against it so editing an\n\t\t\t// existing widget only enables Save once something actually changed.\n\t\t\tinitialSnapshot: '',\n\t\t\ttitleId: `cn-add-widget-modal-title-${++titleIdCounter}`,\n\t\t\ttypeSelectId: `cn-add-widget-modal-type-${++selectIdCounter}`,\n\t\t\t// Widget chrome (title / background / icon) edited in the same modal\n\t\t\t// as the per-type content and emitted back under `payload.chrome`.\n\t\t\tchrome: { showTitle: true, customTitle: '', backgroundColor: '', customIcon: '' },\n\t\t\t// True while the sub-form's commit() (e.g. an image upload) runs on\n\t\t\t// submit, so both footer buttons disable and the label shows progress.\n\t\t\tsubmitting: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The shared form state container ({type, content, editingWidget}).\n\t\t *\n\t\t * @return {{type: string, content: object, editingWidget: (object|null)}} the reactive state.\n\t\t */\n\t\tstate() {\n\t\t\treturn this.form.state\n\t\t},\n\n\t\t/**\n\t\t * Type keys the picker offers — only registry entries that have a form.\n\t\t *\n\t\t * @return {string[]} the form-bearing type keys.\n\t\t */\n\t\tavailableTypes() {\n\t\t\t// A USER PICKING FOR THEMSELVES IS OFFERED A SMALLER LIST. An\n\t\t\t// administrator configures a widget once with the register and\n\t\t\t// schema in front of them; a user has neither and cannot be told\n\t\t\t// about them, so they see only the types whose registry entry\n\t\t\t// declares `userAddable`.\n\t\t\treturn this.userAddableOnly\n\t\t\t\t? listUserAddableWidgetTypes(this.surface)\n\t\t\t\t: listWidgetTypes(this.surface)\n\t\t},\n\n\t\t/**\n\t\t * The presets this page offers a user, from `config.userWidgets[]`.\n\t\t *\n\t\t * @return {Array<object>} The offerable presets.\n\t\t */\n\t\tavailablePresets() {\n\t\t\treturn this.userAddableOnly ? userWidgetPresets(this.pageConfig) : []\n\t\t},\n\n\t\t/**\n\t\t * Whether the active type's sub-form owns the widget title (declares\n\t\t * `ownsTitle` in its registry entry). When true the modal hides its\n\t\t * generic Title chrome so there aren't two title inputs.\n\t\t *\n\t\t * @return {boolean} true when the sub-form provides its own title field.\n\t\t */\n\t\tactiveTypeOwnsTitle() {\n\t\t\tconst entry = getWidgetTypeEntry(this.state.type)\n\t\t\treturn !!(entry && entry.ownsTitle)\n\t\t},\n\n\t\t/**\n\t\t * Whether to show the type select (hidden in edit / preselected mode).\n\t\t *\n\t\t * @return {boolean} true only in pure-create mode.\n\t\t */\n\t\tshowTypeSelect() {\n\t\t\treturn !this.editingWidget && !this.preselectedType\n\t\t},\n\n\t\t/**\n\t\t * The Vue component to mount via `<component :is>` for the active type,\n\t\t * or `null` when the type is unknown or renderer-only.\n\t\t *\n\t\t * @return {object|null} the active sub-form component reference.\n\t\t */\n\t\tactiveSubFormComponent() {\n\t\t\tconst entry = getWidgetTypeEntry(this.state.type)\n\t\t\treturn entry?.form || null\n\t\t},\n\n\t\t/**\n\t\t * Modal heading — flips between Add and Edit based on edit mode.\n\t\t *\n\t\t * @return {string} the localised modal title.\n\t\t */\n\t\tmodalTitle() {\n\t\t\treturn this.editingWidget\n\t\t\t\t? t('nextcloud-vue', 'Edit Widget')\n\t\t\t\t: t('nextcloud-vue', 'Add Widget')\n\t\t},\n\n\t\t/**\n\t\t * Submit button label — flips between Add and Save based on edit mode.\n\t\t *\n\t\t * @return {string} the localised submit label.\n\t\t *\n\t\t * @spec openspec/changes/cn-widget-library/specs/cn-widget-library/spec.md\n\t\t */\n\t\tsubmitLabel() {\n\t\t\tif (this.submitting) {\n\t\t\t\treturn t('nextcloud-vue', 'Uploading…')\n\t\t\t}\n\t\t\treturn this.editingWidget ? t('nextcloud-vue', 'Save') : t('nextcloud-vue', 'Add')\n\t\t},\n\n\t\t/**\n\t\t * The active sub-form's validation errors. `validationTick` keeps Vue's\n\t\t * dependency tracker aware that this computed re-runs on every input.\n\t\t *\n\t\t * @return {string[]} the validation error messages.\n\t\t */\n\t\tvalidationErrors() {\n\t\t\t// Read the tick, discard the value: `$refs` is not reactive, so the\n\t\t\t// tick is what Vue can track as this computed's dependency.\n\t\t\tvoid this.validationTick\n\t\t\treturn this.form.validate(this.$refs.activeSubForm)\n\t\t},\n\n\t\t/**\n\t\t * Whether the submit button is enabled (no validation errors).\n\t\t *\n\t\t * @return {boolean} true when the active sub-form is valid.\n\t\t */\n\t\tisValid() {\n\t\t\treturn this.validationErrors.length === 0\n\t\t},\n\n\t\t/**\n\t\t * Whether the content or chrome differs from the snapshot taken when the\n\t\t * modal opened. Depends on `chrome` (via the snapshot's JSON) and the\n\t\t * `validationTick` (bumped on every sub-form `update:content`) so it\n\t\t * re-runs on both chrome and form-field edits.\n\t\t *\n\t\t * @return {boolean} true when something changed since open.\n\t\t */\n\t\tisDirty() {\n\t\t\t// Read the tick, discard the value, so content edits re-run this.\n\t\t\tvoid this.validationTick\n\t\t\treturn this.currentSnapshot() !== this.initialSnapshot\n\t\t},\n\n\t\t/**\n\t\t * Whether Save is allowed: the form must be valid, and — when editing an\n\t\t * existing widget — something must have changed. Create mode may submit\n\t\t * the (valid) defaults straight away.\n\t\t *\n\t\t * @return {boolean} true when the submit button is enabled.\n\t\t */\n\t\tcanSubmit() {\n\t\t\tif (!this.isValid) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn !this.editingWidget || this.isDirty\n\t\t},\n\n\t\t/**\n\t\t * The first user-visible validation error (hides the internal\n\t\t * `__no-active-form__` sentinel).\n\t\t *\n\t\t * @return {string} the first error message, or an empty string.\n\t\t */\n\t\tfirstError() {\n\t\t\tconst err = this.validationErrors[0]\n\t\t\treturn err && err !== '__no-active-form__' ? err : ''\n\t\t},\n\t},\n\n\twatch: {\n\t\t/**\n\t\t * Re-initialise the form when the modal opens.\n\t\t *\n\t\t * @param {boolean} isOpen the new `show` value.\n\t\t * @return {void}\n\t\t */\n\t\tshow(isOpen) {\n\t\t\tif (isOpen) {\n\t\t\t\tthis.openLifecycle()\n\t\t\t}\n\t\t},\n\n\t\teditingWidget: {\n\t\t\timmediate: false,\n\t\t\t/**\n\t\t\t * Pre-fill from a newly-supplied editing widget while open.\n\t\t\t *\n\t\t\t * @param {object|null} widget the placement being edited.\n\t\t\t * @return {void}\n\t\t\t */\n\t\t\thandler(widget) {\n\t\t\t\tif (this.show && widget) {\n\t\t\t\t\tthis.form.loadEditingWidget(widget)\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Re-seed the form when the preselected type changes while open.\n\t\t *\n\t\t * @param {string|null} type the new preselected type.\n\t\t * @return {void}\n\t\t */\n\t\tpreselectedType(type) {\n\t\t\tif (this.show && type && !this.editingWidget) {\n\t\t\t\tthis.form.resetForm(type)\n\t\t\t}\n\t\t},\n\t},\n\n\tcreated() {\n\t\t// Seed state synchronously before the first render so the\n\t\t// `v-if=\"activeSubFormComponent\"` path resolves to the right sub-form\n\t\t// on initial mount (otherwise the modal flashes the \"No widget types\n\t\t// available\" empty state for one tick).\n\t\tif (this.show) {\n\t\t\tthis.openLifecycle()\n\t\t}\n\t},\n\n\tmounted() {\n\t\tdocument.addEventListener('keydown', this.onKeydown)\n\t\t// The validation gate reads `$refs.activeSubForm`, which is null while\n\t\t// `created()` runs (the sub-form mounts after the first render). Bump\n\t\t// the tick once the ref is bound so `isValid` reflects the freshly\n\t\t// mounted sub-form's `validate()` without waiting for the first input.\n\t\tthis.$nextTick(() => {\n\t\t\tthis.validationTick++\n\t\t})\n\t},\n\n\tbeforeUnmount() {\n\t\tdocument.removeEventListener('keydown', this.onKeydown)\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * The note card type of a notice: its own when known, else `warning`.\n\t\t *\n\t\t * @param {{type?: string}} notice The notice.\n\t\t * @return {string}\n\t\t * @spec openspec/changes/add-widget-modal-notices/specs/add-widget-modal-notices/spec.md#requirement-the-widget-dialog-can-show-the-hosts-notices\n\t\t */\n\t\tnoticeType(notice) {\n\t\t\treturn ['warning', 'info', 'error', 'success'].includes(notice && notice.type) ? notice.type : 'warning'\n\t\t},\n\n\t\tt,\n\n\t\t/**\n\t\t * Initialise form state when the modal opens. Edit mode pre-fills from\n\t\t * `editingWidget`; create mode resets to the preselected type (toolbar\n\t\t * invocation) or to the first available registered type.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\topenLifecycle() {\n\t\t\tif (this.editingWidget) {\n\t\t\t\tthis.form.loadEditingWidget(this.editingWidget)\n\t\t\t\tthis.seedChrome(this.editingWidget)\n\t\t\t} else {\n\t\t\t\tconst initialType = this.preselectedType\n\t\t\t\t\t|| this.availableTypes[0]\n\t\t\t\t\t|| ''\n\t\t\t\tthis.form.resetForm(initialType)\n\t\t\t\tthis.seedChrome(null)\n\t\t\t}\n\t\t\t// Revalidate on every open (the modal instance persists across\n\t\t\t// open/close, so `mounted()`'s one-time bump doesn't fire again).\n\t\t\t// Bump synchronously and again once the sub-form has (re)mounted and\n\t\t\t// its `$refs.activeSubForm` is bound — otherwise the submit gate stays\n\t\t\t// stale in edit mode until the user touches a form field. The nextTick\n\t\t\t// pass also captures the pristine snapshot `isDirty` compares against.\n\t\t\tthis.validationTick++\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.validationTick++\n\t\t\t\tthis.initialSnapshot = this.currentSnapshot()\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Serialise the current assembled content + chrome for dirty comparison.\n\t\t *\n\t\t * @return {string} a stable JSON snapshot of the editable state.\n\t\t */\n\t\tcurrentSnapshot() {\n\t\t\tconst { content } = this.form.assembleContent(this.$refs.activeSubForm)\n\t\t\treturn JSON.stringify({ content, chrome: this.chrome })\n\t\t},\n\n\t\t/**\n\t\t * Seed the Appearance controls (title / background / icon) from a\n\t\t * placement being edited, or to defaults in create mode. Reads chrome\n\t\t * fields from the placement's top level with a fallback to its `content`\n\t\t * (and `styleConfig.backgroundColor`), so it round-trips whatever shape\n\t\t * the consumer persists.\n\t\t *\n\t\t * @param {object|null} widget The placement being edited, or null.\n\t\t * @return {void}\n\t\t */\n\t\tseedChrome(widget) {\n\t\t\tconst w = widget || {}\n\t\t\tconst c = (w.content && typeof w.content === 'object') ? w.content : {}\n\t\t\tconst pick = (...vals) => vals.find((v) => v !== undefined && v !== null)\n\t\t\tconst showRaw = pick(w.showTitle, c.showTitle)\n\t\t\tthis.chrome = {\n\t\t\t\t// Cards (stat / gauge / delta) headline themselves via `content.label`,\n\t\t\t\t// so they default headerless — otherwise the chrome header just repeats\n\t\t\t\t// the label, or shows the bare type name when no title was ever set.\n\t\t\t\tshowTitle: showRaw === undefined\n\t\t\t\t\t? !this.isCardType(w.type || this.state.type)\n\t\t\t\t\t: Boolean(Number(showRaw) || showRaw === true),\n\n\t\t\t\tcustomTitle: pick(w.customTitle, c.customTitle, c.title) || '',\n\t\t\t\tbackgroundColor: pick(w.backgroundColor, w.styleConfig?.backgroundColor, c.styleConfig?.backgroundColor) || '',\n\t\t\t\tcustomIcon: pick(w.customIcon, c.customIcon, c.icon) || '',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle a `<select>` change: swap the active sub-form and reset its\n\t\t * state to defaults. Switching type discards any in-progress field\n\t\t * input. The sub-form is keyed on `state.type`, so changing the type\n\t\t * tears down the old `<component :is>` and remounts a new one;\n\t\t * `$refs.activeSubForm` is briefly null between teardown and mount, so\n\t\t * we bump the tick again on the next tick once the ref is rebound.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonTypeSwitch() {\n\t\t\tthis.form.resetForm(this.state.type)\n\t\t\t// Re-apply the type's chrome default: switching between a card and a\n\t\t\t// full widget flips whether a header makes sense.\n\t\t\tthis.chrome.showTitle = !this.isCardType(this.state.type)\n\t\t\tthis.validationTick++\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.validationTick++\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Whether a widget type is a self-contained card (stat / gauge / delta),\n\t\t * which renders headerless by default.\n\t\t *\n\t\t * @param {string} type the registry type key.\n\t\t * @return {boolean} true when the registry entry is a card.\n\t\t */\n\t\tisCardType(type) {\n\t\t\tif (!type) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst entry = getWidgetTypeEntry(type)\n\t\t\treturn Boolean(entry && entry.card === true)\n\t\t},\n\n\t\t/**\n\t\t * Mirror a sub-form `update:content` payload into the composable state\n\t\t * (so `assembleContent()` can fall back to it) and bump the validation\n\t\t * tick so the submit button enables/disables reactively on input.\n\t\t *\n\t\t * @param {object} content the sub-form's current content payload.\n\t\t * @return {void}\n\t\t */\n\t\tonContentUpdate(content) {\n\t\t\tthis.state.content = { ...content }\n\t\t\tthis.validationTick++\n\t\t},\n\n\t\t/**\n\t\t * Cancel button / backdrop / NcModal `close` event — non-destructive,\n\t\t * never emits submit. Suppressed while a sub-form `commit()` (e.g. an\n\t\t * image upload) is in flight so dismissing the dialog can't unmount the\n\t\t * sub-form mid-upload (which would orphan the upload and write into a\n\t\t * destroyed instance).\n\t\t *\n\t\t * @return {void}\n\t\t *\n\t\t * @spec openspec/changes/cn-widget-library/specs/cn-widget-library/spec.md\n\t\t */\n\t\tonCancel() {\n\t\t\tif (this.submitting) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.$emit('close')\n\t\t},\n\n\t\t/**\n\t\t * Esc-key fallback listener (in case NcModal's own handler is\n\t\t * suppressed by a parent focus-trap). Emits `close`, never `submit`.\n\t\t * Suppressed while a commit() is in flight (see `onCancel`).\n\t\t *\n\t\t * @param {KeyboardEvent} event the keydown event.\n\t\t * @return {void}\n\t\t *\n\t\t * @spec openspec/changes/cn-widget-library/specs/cn-widget-library/spec.md\n\t\t */\n\t\tonKeydown(event) {\n\t\t\tif (this.submitting) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.show && event.key === 'Escape') {\n\t\t\t\tthis.$emit('close')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Commit the active sub-form (e.g. upload a pending image), then build\n\t\t * the `{type, content}` payload via the composable's `assembleContent()`\n\t\t * and emit it. The commit is the only step that can hit the network; a\n\t\t * commit failure keeps the modal open and blocks the `submit` emit.\n\t\t *\n\t\t * @return {Promise<void>} resolves once submit is emitted or aborted.\n\t\t *\n\t\t * @spec openspec/changes/cn-widget-library/specs/cn-widget-library/spec.md\n\t\t */\n\t\tasync onSubmit() {\n\t\t\tif (!this.isValid || this.submitting) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst subForm = this.$refs.activeSubForm\n\t\t\tif (subForm && typeof subForm.commit === 'function') {\n\t\t\t\tthis.submitting = true\n\t\t\t\ttry {\n\t\t\t\t\tawait subForm.commit()\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// The sub-form surfaces its own inline error; keep the modal\n\t\t\t\t\t// open so the author can retry or pick another file.\n\t\t\t\t\t// eslint-disable-next-line no-console -- diagnostic for a failure this code already degrades from\n\t\t\t\t\tconsole.error('[CnAddWidgetModal] Widget commit failed:', error)\n\t\t\t\t\treturn\n\t\t\t\t} finally {\n\t\t\t\t\tthis.submitting = false\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst payload = this.form.assembleContent(this.$refs.activeSubForm)\n\t\t\t// Carry the chrome (title / background / icon) alongside the content\n\t\t\t// so the parent persists both from this single modal.\n\t\t\tpayload.chrome = {\n\t\t\t\tshowTitle: this.chrome.showTitle,\n\t\t\t\tcustomTitle: this.chrome.customTitle,\n\t\t\t\tcustomIcon: this.chrome.customIcon,\n\t\t\t\tbackgroundColor: this.chrome.backgroundColor,\n\t\t\t}\n\t\t\tthis.$emit('submit', payload)\n\t\t},\n\n\t\t/**\n\t\t * Look up the human-readable display name for a registry type, falling\n\t\t * back to the type key itself.\n\t\t *\n\t\t * @param {string} type the registry type key.\n\t\t * @return {string} the display name.\n\t\t */\n\t\ttypeDisplayName(type) {\n\t\t\tconst entry = getWidgetTypeEntry(type)\n\t\t\treturn entry?.displayName || type\n\t\t},\n\n\t\t/**\n\t\t * The icon a registry type declares (an MDI name, SVG path or URL), or\n\t\t * `null` for the default widget icon.\n\t\t *\n\t\t * @param {string} type the registry type key.\n\t\t * @return {string|null} the icon.\n\t\t */\n\t\ttypeIcon(type) {\n\t\t\tconst icon = getWidgetTypeEntry(type)?.icon\n\t\t\treturn typeof icon === 'string' && icon !== '' ? icon : null\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-add-widget-modal__type {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-add-widget-modal__type-label {\n\tfont-size: 14px;\n\tfont-weight: 500;\n}\n\n.cn-add-widget-modal__type-row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n}\n\n.cn-add-widget-modal__type-icon {\n\tdisplay: inline-flex;\n\tflex: none;\n\tcolor: var(--color-main-text);\n}\n\n.cn-add-widget-modal__type-select {\n\tflex: 1;\n\tmin-width: 0;\n\tpadding: 8px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-main-text);\n\tfont-size: 14px;\n}\n\n.cn-add-widget-modal__form {\n\toverflow-y: auto;\n\t/* Prefer a roomy ~340px for the type-specific fields (data-driven widgets\n\t carry tall forms — columns, thresholds, data source); still shrinks with\n\t its own scroll on short viewports so the Appearance + actions stay visible. */\n\tflex: 1 1 340px;\n\tmin-height: 0;\n}\n\n.cn-add-widget-modal__empty {\n\tpadding: 16px;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-add-widget-modal__chrome {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tborder-top: 1px solid var(--color-border);\n\tpadding-top: 12px;\n}\n\n.cn-add-widget-modal__chrome-title {\n\tmargin: 0;\n\tfont-size: 15px;\n\tfont-weight: 600;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-add-widget-modal__chrome-row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 12px;\n}\n\n.cn-add-widget-modal__chrome-label {\n\tmin-width: 96px;\n\tfont-size: 14px;\n}\n\n.cn-add-widget-modal__chrome-value {\n\tfont-size: 13px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-add-widget-modal__notices {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmargin-block-end: 12px;\n}\n</style>\n"],"names":["_createVNode","_openBlock","_createElementBlock","_createElementVNode","_Fragment","_renderList","_vModelSelect","_createBlock","_toDisplayString"],"mappings":";;;;AAkB6B,EAAA,KAAK,EAAA;;;AAM1B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,+BAAS;;;AAG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,CAAA,eAAA,EAAA,SAAA,CAAA,CAAA,EAAA,CAAA;;AAGZ,gBAAAL,kBAAA,CAQI,OARJ,WAQI,EAAA;kBAPJA,kBAAA,CAAQ,MAAA,EAAR,WAAQ,EAAAK,eAAA,CAAA,QAAA,CAAA,CAAA,CAAA,eAAA,EAAA,MAAA,CAAA,CAAA,EAAA,CAAA,YAAA;kBACRR,WAAA,CAKsC,wBAAA,EAAA;oBAJrC,KAAE,EAAA,KAAA,CAAA,MAAA,CAAA,UAAA;AACF,oBAAA,QAAC,EAAA,MAAA,CAAA,QAAA;;AAEF,oBAAA,SAAS,EAAT,EAAS;AACR,oBAAA,OAAK,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,KAAE,KAAA,CAAA,MAAM,CAAC,UAAU,GAAG,MAAM,CAAA;;;;;;;;;;;"}
|
package/dist/esm/l10n/en.json.js
CHANGED
|
@@ -2807,7 +2807,94 @@ var translations = {
|
|
|
2807
2807
|
"An EAN-13 code takes twelve or thirteen digits with a valid check digit.": "An EAN-13 code takes twelve or thirteen digits with a valid check digit.",
|
|
2808
2808
|
"A Code 128 code takes letters, digits and plain punctuation only.": "A Code 128 code takes letters, digits and plain punctuation only.",
|
|
2809
2809
|
"Started. It finishes in the background.": "Started. It finishes in the background.",
|
|
2810
|
-
"At most {max} rows.": "At most {max} rows."
|
|
2810
|
+
"At most {max} rows.": "At most {max} rows.",
|
|
2811
|
+
"Loading calendars…": "Loading calendars…",
|
|
2812
|
+
"The calendars are taking too long to load.": "The calendars are taking too long to load.",
|
|
2813
|
+
"Failed to load events": "Failed to load events",
|
|
2814
|
+
"No calendar available": "No calendar available",
|
|
2815
|
+
"No calendar is selected yet. Choose one in this widget’s settings.": "No calendar is selected yet. Choose one in this widget’s settings.",
|
|
2816
|
+
"No events in the next {n} days": "No events in the next {n} days",
|
|
2817
|
+
Sun: "Sun",
|
|
2818
|
+
Mon: "Mon",
|
|
2819
|
+
Tue: "Tue",
|
|
2820
|
+
Wed: "Wed",
|
|
2821
|
+
Thu: "Thu",
|
|
2822
|
+
Fri: "Fri",
|
|
2823
|
+
Sat: "Sat",
|
|
2824
|
+
Month: "Month",
|
|
2825
|
+
Week: "Week",
|
|
2826
|
+
Agenda: "Agenda",
|
|
2827
|
+
"All day": "All day",
|
|
2828
|
+
Calendars: "Calendars",
|
|
2829
|
+
"Select calendars…": "Select calendars…",
|
|
2830
|
+
"One calendar principal URI per line": "One calendar principal URI per line",
|
|
2831
|
+
"External ICS URLs (one per line)": "External ICS URLs (one per line)",
|
|
2832
|
+
"Days ahead": "Days ahead",
|
|
2833
|
+
"Color by calendar": "Color by calendar",
|
|
2834
|
+
"At least one calendar source is required": "At least one calendar source is required",
|
|
2835
|
+
"External ICS URLs must start with https://": "External ICS URLs must start with https://",
|
|
2836
|
+
"Folder breadcrumb": "Folder breadcrumb",
|
|
2837
|
+
Root: "Root",
|
|
2838
|
+
"Search this folder": "Search this folder",
|
|
2839
|
+
"Search this folder…": "Search this folder…",
|
|
2840
|
+
"Upload File": "Upload File",
|
|
2841
|
+
"Drop files to upload": "Drop files to upload",
|
|
2842
|
+
"Loading folder…": "Loading folder…",
|
|
2843
|
+
"Files is not available": "Files is not available",
|
|
2844
|
+
"You don't have access to this folder.": "You don't have access to this folder.",
|
|
2845
|
+
"Folder no longer exists.": "Folder no longer exists.",
|
|
2846
|
+
"Failed to load folder contents.": "Failed to load folder contents.",
|
|
2847
|
+
"This folder is empty.": "This folder is empty.",
|
|
2848
|
+
"Uploading {loaded} / {total}": "Uploading {loaded} / {total}",
|
|
2849
|
+
"Upload complete": "Upload complete",
|
|
2850
|
+
"No files matching '{query}'": "No files matching '{query}'",
|
|
2851
|
+
"You no longer have permission to delete {name}.": "You no longer have permission to delete {name}.",
|
|
2852
|
+
"Could not delete {name}.": "Could not delete {name}.",
|
|
2853
|
+
"Not enough storage space": "Not enough storage space",
|
|
2854
|
+
"You may not upload to this folder": "You may not upload to this folder",
|
|
2855
|
+
"This file type is not allowed here": "This file type is not allowed here",
|
|
2856
|
+
"Upload failed": "Upload failed",
|
|
2857
|
+
Sent: "Sent",
|
|
2858
|
+
Uploaded: "Uploaded",
|
|
2859
|
+
"Uploading {percent}%": "Uploading {percent}%",
|
|
2860
|
+
"Delete file": "Delete file",
|
|
2861
|
+
"Are you sure you want to delete {name}?": "Are you sure you want to delete {name}?",
|
|
2862
|
+
"Current object": "Current object",
|
|
2863
|
+
"Browse…": "Browse…",
|
|
2864
|
+
"Sort descending": "Sort descending",
|
|
2865
|
+
"Show thumbnails": "Show thumbnails",
|
|
2866
|
+
"MIME type filter (comma separated)": "MIME type filter (comma separated)",
|
|
2867
|
+
"e.g. image/*, application/pdf": "e.g. image/*, application/pdf",
|
|
2868
|
+
"Allow upload": "Allow upload",
|
|
2869
|
+
"Allow delete": "Allow delete",
|
|
2870
|
+
"This widget shows files attached to the current object, so the folder cannot be set here.": "This widget shows files attached to the current object, so the folder cannot be set here.",
|
|
2871
|
+
Grid: "Grid",
|
|
2872
|
+
Tree: "Tree",
|
|
2873
|
+
"Choose a folder": "Choose a folder",
|
|
2874
|
+
Choose: "Choose",
|
|
2875
|
+
"Could not open the folder picker": "Could not open the folder picker",
|
|
2876
|
+
"Folder path or folder id is required": "Folder path or folder id is required",
|
|
2877
|
+
"No video URL configured": "No video URL configured",
|
|
2878
|
+
"Edit the widget to add a video": "Edit the widget to add a video",
|
|
2879
|
+
"Configure now": "Configure now",
|
|
2880
|
+
"Video not accessible": "Video not accessible",
|
|
2881
|
+
"Video failed to load": "Video failed to load",
|
|
2882
|
+
"Invalid video URL or domain not allowed.": "Invalid video URL or domain not allowed.",
|
|
2883
|
+
"Video URL": "Video URL",
|
|
2884
|
+
"Nextcloud File ID": "Nextcloud File ID",
|
|
2885
|
+
"Aspect Ratio": "Aspect Ratio",
|
|
2886
|
+
Autoplay: "Autoplay",
|
|
2887
|
+
"Autoplay requires muting": "Autoplay requires muting",
|
|
2888
|
+
Muted: "Muted",
|
|
2889
|
+
Loop: "Loop",
|
|
2890
|
+
"Show controls": "Show controls",
|
|
2891
|
+
"Poster Image URL (optional)": "Poster Image URL (optional)",
|
|
2892
|
+
"Detected: YouTube": "Detected: YouTube",
|
|
2893
|
+
"Detected: Vimeo": "Detected: Vimeo",
|
|
2894
|
+
"Detected: PeerTube": "Detected: PeerTube",
|
|
2895
|
+
"Detected: Nextcloud File": "Detected: Nextcloud File",
|
|
2896
|
+
"Video URL is required": "Video URL is required",
|
|
2897
|
+
"Nextcloud file ID is required": "Nextcloud file ID is required"
|
|
2811
2898
|
};
|
|
2812
2899
|
var plurals = {
|
|
2813
2900
|
"{count} member": [
|
|
@@ -3048,6 +3135,14 @@ var plurals = {
|
|
|
3048
3135
|
"%n log line": [
|
|
3049
3136
|
"%n log line",
|
|
3050
3137
|
"%n log lines"
|
|
3138
|
+
],
|
|
3139
|
+
"{count} calendar source unavailable": [
|
|
3140
|
+
"{count} calendar source unavailable",
|
|
3141
|
+
"{count} calendar sources unavailable"
|
|
3142
|
+
],
|
|
3143
|
+
"{count} file could not be uploaded": [
|
|
3144
|
+
"{count} file could not be uploaded",
|
|
3145
|
+
"{count} files could not be uploaded"
|
|
3051
3146
|
]
|
|
3052
3147
|
};
|
|
3053
3148
|
var en = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/esm/l10n/nl.json.js
CHANGED
|
@@ -3075,7 +3075,94 @@ var translations = {
|
|
|
3075
3075
|
"Location field": "Locatieveld",
|
|
3076
3076
|
"Objects are plotted from the location field: a point, line or area. Without one, from their location (@self.geo). Objects without a location are skipped.": "Objecten worden getekend vanuit het locatieveld: een punt, lijn of vlak. Zonder locatieveld vanuit hun locatie (@self.geo). Objecten zonder locatie worden overgeslagen.",
|
|
3077
3077
|
"Custom base map": "Eigen achtergrondkaart",
|
|
3078
|
-
"Base map": "Achtergrondkaart"
|
|
3078
|
+
"Base map": "Achtergrondkaart",
|
|
3079
|
+
"Loading calendars…": "Agenda's laden…",
|
|
3080
|
+
"The calendars are taking too long to load.": "Het laden van de agenda's duurt te lang.",
|
|
3081
|
+
"Failed to load events": "Afspraken laden mislukt",
|
|
3082
|
+
"No calendar available": "Geen agenda beschikbaar",
|
|
3083
|
+
"No calendar is selected yet. Choose one in this widget’s settings.": "Er is nog geen agenda gekozen. Kies er een in de instellingen van deze widget.",
|
|
3084
|
+
"No events in the next {n} days": "Geen afspraken in de komende {n} dagen",
|
|
3085
|
+
Sun: "zo",
|
|
3086
|
+
Mon: "ma",
|
|
3087
|
+
Tue: "di",
|
|
3088
|
+
Wed: "wo",
|
|
3089
|
+
Thu: "do",
|
|
3090
|
+
Fri: "vr",
|
|
3091
|
+
Sat: "za",
|
|
3092
|
+
Month: "Maand",
|
|
3093
|
+
Week: "Week",
|
|
3094
|
+
Agenda: "Agenda",
|
|
3095
|
+
"All day": "Hele dag",
|
|
3096
|
+
Calendars: "Agenda's",
|
|
3097
|
+
"Select calendars…": "Kies agenda's…",
|
|
3098
|
+
"One calendar principal URI per line": "Eén agenda-principal-URI per regel",
|
|
3099
|
+
"External ICS URLs (one per line)": "Externe ICS-URL's (één per regel)",
|
|
3100
|
+
"Days ahead": "Dagen vooruit",
|
|
3101
|
+
"Color by calendar": "Kleur per agenda",
|
|
3102
|
+
"At least one calendar source is required": "Kies minstens één agendabron",
|
|
3103
|
+
"External ICS URLs must start with https://": "Externe ICS-URL's moeten beginnen met https://",
|
|
3104
|
+
"Folder breadcrumb": "Mappad",
|
|
3105
|
+
Root: "Hoofdmap",
|
|
3106
|
+
"Search this folder": "Zoek in deze map",
|
|
3107
|
+
"Search this folder…": "Zoek in deze map…",
|
|
3108
|
+
"Upload File": "Bestand uploaden",
|
|
3109
|
+
"Drop files to upload": "Zet bestanden hier neer om te uploaden",
|
|
3110
|
+
"Loading folder…": "Map laden…",
|
|
3111
|
+
"Files is not available": "Bestanden is niet beschikbaar",
|
|
3112
|
+
"You don't have access to this folder.": "Je hebt geen toegang tot deze map.",
|
|
3113
|
+
"Folder no longer exists.": "Deze map bestaat niet meer.",
|
|
3114
|
+
"Failed to load folder contents.": "De inhoud van de map kon niet worden geladen.",
|
|
3115
|
+
"This folder is empty.": "Deze map is leeg.",
|
|
3116
|
+
"Uploading {loaded} / {total}": "Uploaden {loaded} / {total}",
|
|
3117
|
+
"Upload complete": "Upload voltooid",
|
|
3118
|
+
"No files matching '{query}'": "Geen bestanden gevonden voor '{query}'",
|
|
3119
|
+
"You no longer have permission to delete {name}.": "Je mag {name} niet meer verwijderen.",
|
|
3120
|
+
"Could not delete {name}.": "{name} kon niet worden verwijderd.",
|
|
3121
|
+
"Not enough storage space": "Niet genoeg opslagruimte",
|
|
3122
|
+
"You may not upload to this folder": "Je mag niet uploaden naar deze map",
|
|
3123
|
+
"This file type is not allowed here": "Dit bestandstype is hier niet toegestaan",
|
|
3124
|
+
"Upload failed": "Uploaden mislukt",
|
|
3125
|
+
Sent: "Verzonden",
|
|
3126
|
+
Uploaded: "Geüpload",
|
|
3127
|
+
"Uploading {percent}%": "Uploaden {percent}%",
|
|
3128
|
+
"Delete file": "Bestand verwijderen",
|
|
3129
|
+
"Are you sure you want to delete {name}?": "Weet je zeker dat je {name} wilt verwijderen?",
|
|
3130
|
+
"Current object": "Huidig object",
|
|
3131
|
+
"Browse…": "Bladeren…",
|
|
3132
|
+
"Sort descending": "Aflopend sorteren",
|
|
3133
|
+
"Show thumbnails": "Miniaturen tonen",
|
|
3134
|
+
"MIME type filter (comma separated)": "MIME-typefilter (gescheiden door komma's)",
|
|
3135
|
+
"e.g. image/*, application/pdf": "bijv. image/*, application/pdf",
|
|
3136
|
+
"Allow upload": "Uploaden toestaan",
|
|
3137
|
+
"Allow delete": "Verwijderen toestaan",
|
|
3138
|
+
"This widget shows files attached to the current object, so the folder cannot be set here.": "Deze widget toont de bestanden bij het huidige object, dus de map is hier niet in te stellen.",
|
|
3139
|
+
Grid: "Raster",
|
|
3140
|
+
Tree: "Boom",
|
|
3141
|
+
"Choose a folder": "Kies een map",
|
|
3142
|
+
Choose: "Kiezen",
|
|
3143
|
+
"Could not open the folder picker": "De mapkiezer kon niet worden geopend",
|
|
3144
|
+
"Folder path or folder id is required": "Een mappad of map-id is verplicht",
|
|
3145
|
+
"No video URL configured": "Geen video-URL ingesteld",
|
|
3146
|
+
"Edit the widget to add a video": "Bewerk de widget om een video toe te voegen",
|
|
3147
|
+
"Configure now": "Nu instellen",
|
|
3148
|
+
"Video not accessible": "Video niet toegankelijk",
|
|
3149
|
+
"Video failed to load": "Video laden mislukt",
|
|
3150
|
+
"Invalid video URL or domain not allowed.": "Ongeldige video-URL of domein niet toegestaan.",
|
|
3151
|
+
"Video URL": "Video-URL",
|
|
3152
|
+
"Nextcloud File ID": "Nextcloud-bestands-id",
|
|
3153
|
+
"Aspect Ratio": "Beeldverhouding",
|
|
3154
|
+
Autoplay: "Automatisch afspelen",
|
|
3155
|
+
"Autoplay requires muting": "Automatisch afspelen kan alleen zonder geluid",
|
|
3156
|
+
Muted: "Geluid uit",
|
|
3157
|
+
Loop: "Herhalen",
|
|
3158
|
+
"Show controls": "Bediening tonen",
|
|
3159
|
+
"Poster Image URL (optional)": "URL van voorbeeldafbeelding (optioneel)",
|
|
3160
|
+
"Detected: YouTube": "Herkend: YouTube",
|
|
3161
|
+
"Detected: Vimeo": "Herkend: Vimeo",
|
|
3162
|
+
"Detected: PeerTube": "Herkend: PeerTube",
|
|
3163
|
+
"Detected: Nextcloud File": "Herkend: Nextcloud-bestand",
|
|
3164
|
+
"Video URL is required": "Video-URL is verplicht",
|
|
3165
|
+
"Nextcloud file ID is required": "Nextcloud-bestands-id is verplicht"
|
|
3079
3166
|
};
|
|
3080
3167
|
var plurals = {
|
|
3081
3168
|
"{count} member": [
|
|
@@ -3337,6 +3424,14 @@ var plurals = {
|
|
|
3337
3424
|
"%n log line": [
|
|
3338
3425
|
"%n logregel",
|
|
3339
3426
|
"%n logregels"
|
|
3427
|
+
],
|
|
3428
|
+
"{count} calendar source unavailable": [
|
|
3429
|
+
"{count} agendabron niet beschikbaar",
|
|
3430
|
+
"{count} agendabronnen niet beschikbaar"
|
|
3431
|
+
],
|
|
3432
|
+
"{count} file could not be uploaded": [
|
|
3433
|
+
"{count} bestand kon niet worden geüpload",
|
|
3434
|
+
"{count} bestanden konden niet worden geüpload"
|
|
3340
3435
|
]
|
|
3341
3436
|
};
|
|
3342
3437
|
var nl = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nl.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nl.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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