@conduction/nextcloud-vue 2.97.0 → 2.99.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/CnActionsMenu/CnActionsMenu.vue2.js +12 -0
- package/dist/esm/components/CnActionsMenu/CnActionsMenu.vue2.js.map +1 -1
- package/dist/esm/components/CnActionsMenu/CnActionsMenu.vue3.js +11 -2
- package/dist/esm/components/CnActionsMenu/CnActionsMenu.vue3.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js +17 -0
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js.map +1 -1
- package/dist/esm/components/CnBreadcrumbs/CnBreadcrumbs.vue.js +1 -1
- package/dist/esm/components/CnBreadcrumbs/CnBreadcrumbs.vue2.js.map +1 -1
- package/dist/esm/components/CnBreadcrumbs/CnBreadcrumbs.vue3.js +1 -1
- package/dist/esm/components/CnBreadcrumbs/CnBreadcrumbs.vue3.js.map +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue.js +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js +106 -2
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue.js +9 -0
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue.js.map +1 -0
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js +964 -0
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js +282 -0
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnChecklistRunWidget/index.js +28 -0
- package/dist/esm/components/CnChecklistRunWidget/index.js.map +1 -0
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +1 -0
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +26 -8
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +188 -5
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +2 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue.js +1 -1
- package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue2.js +3 -3
- package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue2.js.map +1 -1
- package/dist/esm/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue3.js.map +1 -1
- package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue.js +1 -1
- package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue2.js +27 -0
- package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue2.js.map +1 -1
- package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue3.js +16 -2
- package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +43 -3
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnOrderedListField/CnOrderedListField.vue.js +9 -0
- package/dist/esm/components/CnOrderedListField/CnOrderedListField.vue.js.map +1 -0
- package/dist/esm/components/CnOrderedListField/CnOrderedListField.vue2.js +239 -0
- package/dist/esm/components/CnOrderedListField/CnOrderedListField.vue2.js.map +1 -0
- package/dist/esm/components/CnOrderedListField/CnOrderedListField.vue3.js +182 -0
- package/dist/esm/components/CnOrderedListField/CnOrderedListField.vue3.js.map +1 -0
- package/dist/esm/components/CnSettingsField/CnSettingsField.vue.js +9 -0
- package/dist/esm/components/CnSettingsField/CnSettingsField.vue.js.map +1 -0
- package/dist/esm/components/CnSettingsField/CnSettingsField.vue2.js +265 -0
- package/dist/esm/components/CnSettingsField/CnSettingsField.vue2.js.map +1 -0
- package/dist/esm/components/CnSettingsField/CnSettingsField.vue3.js +191 -0
- package/dist/esm/components/CnSettingsField/CnSettingsField.vue3.js.map +1 -0
- package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue.js +9 -0
- package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue.js.map +1 -0
- package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue2.js +508 -0
- package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue2.js.map +1 -0
- package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue3.js +99 -0
- package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue3.js.map +1 -0
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue.js +1 -1
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue2.js +18 -70
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue2.js.map +1 -1
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue3.js +6 -44
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue3.js.map +1 -1
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue.js +1 -1
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue2.js +83 -9
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue3.js +80 -11
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +2 -0
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
- package/dist/esm/components/CnWorkingCalendarWidget/CnWorkingCalendarWidget.vue.js +9 -0
- package/dist/esm/components/CnWorkingCalendarWidget/CnWorkingCalendarWidget.vue.js.map +1 -0
- package/dist/esm/components/CnWorkingCalendarWidget/CnWorkingCalendarWidget.vue2.js +472 -0
- package/dist/esm/components/CnWorkingCalendarWidget/CnWorkingCalendarWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnWorkingCalendarWidget/CnWorkingCalendarWidget.vue3.js +231 -0
- package/dist/esm/components/CnWorkingCalendarWidget/CnWorkingCalendarWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnWorkingCalendarWidget/index.js +27 -0
- package/dist/esm/components/CnWorkingCalendarWidget/index.js.map +1 -0
- package/dist/esm/composables/indexSources.js +238 -2
- package/dist/esm/composables/indexSources.js.map +1 -1
- package/dist/esm/composables/useFlowStore.js +2 -1
- package/dist/esm/composables/useFlowStore.js.map +1 -1
- package/dist/esm/composables/useOrganisationStore.js +115 -0
- package/dist/esm/composables/useOrganisationStore.js.map +1 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +109 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +138 -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 +1071 -274
- package/dist/esm/utils/builtInFormatters.js +34 -1
- package/dist/esm/utils/builtInFormatters.js.map +1 -1
- package/dist/esm/utils/libraryWidgetKeys.js +2 -0
- package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
- package/dist/esm/utils/matrixCells.js +158 -0
- package/dist/esm/utils/matrixCells.js.map +1 -0
- package/dist/esm/utils/nextcloudDirectory.js +121 -0
- package/dist/esm/utils/nextcloudDirectory.js.map +1 -0
- package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/esm/utils/workingCalendarMonth.js +85 -0
- package/dist/esm/utils/workingCalendarMonth.js.map +1 -0
- package/dist/nextcloud-vue.cjs.js +14888 -10014
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +1071 -274
- package/l10n/en.json +109 -1
- package/l10n/nl.json +138 -1
- package/package.json +2 -2
- package/scripts/merge-l10n.js +196 -0
- package/src/components/CnActionsMenu/CnActionsMenu.vue +14 -1
- package/src/components/CnAppRoot/CnAppRoot.md +1 -0
- package/src/components/CnAppRoot/CnAppRoot.vue +17 -0
- package/src/components/CnBreadcrumbs/CnBreadcrumbs.vue +1 -0
- package/src/components/CnChartWidget/CnChartWidget.md +2 -1
- package/src/components/CnChartWidget/CnChartWidget.vue +106 -2
- package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +1269 -0
- package/src/components/CnChecklistRunWidget/index.js +27 -0
- package/src/components/CnDashboardPage/CnDashboardPage.vue +1 -0
- package/src/components/CnDataTable/CnDataTable.vue +26 -8
- package/src/components/CnDetailPage/CnDetailPage.md +48 -0
- package/src/components/CnDetailPage/CnDetailPage.vue +189 -5
- package/src/components/CnFeaturesAndRoadmapView/CnFeaturesAndRoadmapView.vue +3 -3
- package/src/components/CnFeaturesBoard/CnFeaturesBoard.vue +38 -2
- package/src/components/CnIndexPage/CnIndexPage.md +28 -0
- package/src/components/CnIndexPage/CnIndexPage.vue +43 -3
- package/src/components/CnOrderedListField/CnOrderedListField.vue +458 -0
- package/src/components/CnOrderedListField/index.js +7 -0
- package/src/components/CnSettingsField/CnSettingsField.vue +449 -0
- package/src/components/CnSettingsField/index.js +4 -0
- package/src/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue +613 -0
- package/src/components/CnSettingsFieldsSection/index.js +4 -0
- package/src/components/CnSettingsPage/CnSettingsPage.vue +6 -86
- package/src/components/CnUserSettingsDialog/CnUserSettingsDialog.vue +139 -10
- package/src/components/CnWidgetGrid/registerDashboardWidgets.js +2 -0
- package/src/components/CnWorkingCalendarWidget/CnWorkingCalendarWidget.vue +725 -0
- package/src/components/CnWorkingCalendarWidget/index.js +26 -0
- package/src/components/index.js +5 -0
- package/src/composables/indexSources.js +237 -1
- package/src/composables/useFlowStore.js +2 -1
- package/src/composables/useOrganisationStore.js +111 -0
- package/src/css/badge.css +32 -16
- package/src/css/look-board-detail.css +80 -8
- package/src/css/look-board-index.css +52 -8
- package/src/css/look-board.css +219 -1
- package/src/index.js +5 -0
- package/src/schemas/app-manifest-v2.schema.json +33 -3
- package/src/utils/builtInFormatters.js +33 -0
- package/src/utils/libraryWidgetKeys.js +2 -0
- package/src/utils/matrixCells.js +154 -0
- package/src/utils/nextcloudDirectory.js +117 -0
- package/src/utils/validateManifestV2.compiled.js +3 -3
- package/src/utils/workingCalendarMonth.js +82 -0
|
@@ -55,9 +55,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
55
55
|
const _component_ContentSave = resolveComponent("ContentSave");
|
|
56
56
|
const _component_NcButton = resolveComponent("NcButton");
|
|
57
57
|
const _component_CnPageHeader = resolveComponent("CnPageHeader");
|
|
58
|
-
const
|
|
59
|
-
const _component_NcTextField = resolveComponent("NcTextField");
|
|
60
|
-
const _component_NcSelect = resolveComponent("NcSelect");
|
|
58
|
+
const _component_CnSettingsField = resolveComponent("CnSettingsField");
|
|
61
59
|
const _component_CnSettingsSection = resolveComponent("CnSettingsSection");
|
|
62
60
|
const _component_CnSettingsWidgetMount = resolveComponent("CnSettingsWidgetMount");
|
|
63
61
|
const _component_CnSettingsCard = resolveComponent("CnSettingsCard");
|
|
@@ -213,47 +211,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
213
211
|
value: $data.formData[field.key],
|
|
214
212
|
onInput: (v) => $options.updateField(field.key, v)
|
|
215
213
|
}, () => [
|
|
216
|
-
(
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}, {
|
|
222
|
-
default: withCtx(() => [
|
|
223
|
-
createTextVNode(toDisplayString($options.resolveLabel(field.label)), 1 /* TEXT */)
|
|
224
|
-
]),
|
|
225
|
-
_: 2 /* DYNAMIC */
|
|
226
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "onUpdate:modelValue"]))
|
|
227
|
-
: (field.type === 'number')
|
|
228
|
-
? (openBlock(), createBlock(_component_NcTextField, {
|
|
229
|
-
key: 1,
|
|
230
|
-
label: $options.resolveLabel(field.label),
|
|
231
|
-
type: "number",
|
|
232
|
-
modelValue: String($options.fieldValue(field.key, '')),
|
|
233
|
-
"onUpdate:modelValue": $event => ($options.updateField(field.key, $event === '' ? null : Number($event)))
|
|
234
|
-
}, null, 8 /* PROPS */, ["label", "modelValue", "onUpdate:modelValue"]))
|
|
235
|
-
: (field.type === 'password')
|
|
236
|
-
? (openBlock(), createBlock(_component_NcTextField, {
|
|
237
|
-
key: 2,
|
|
238
|
-
label: $options.resolveLabel(field.label),
|
|
239
|
-
type: "password",
|
|
240
|
-
modelValue: $options.fieldValue(field.key, ''),
|
|
241
|
-
"onUpdate:modelValue": $event => ($options.updateField(field.key, $event))
|
|
242
|
-
}, null, 8 /* PROPS */, ["label", "modelValue", "onUpdate:modelValue"]))
|
|
243
|
-
: (field.type === 'enum' && Array.isArray(field.options))
|
|
244
|
-
? (openBlock(), createBlock(_component_NcSelect, {
|
|
245
|
-
key: 3,
|
|
246
|
-
modelValue: $options.selectedOption(field),
|
|
247
|
-
options: field.options,
|
|
248
|
-
inputLabel: $options.resolveLabel(field.label),
|
|
249
|
-
"onUpdate:modelValue": $event => ($options.updateField(field.key, $options.optionValue($event)))
|
|
250
|
-
}, null, 8 /* PROPS */, ["modelValue", "options", "inputLabel", "onUpdate:modelValue"]))
|
|
251
|
-
: (openBlock(), createBlock(_component_NcTextField, {
|
|
252
|
-
key: 4,
|
|
253
|
-
label: $options.resolveLabel(field.label),
|
|
254
|
-
modelValue: $options.fieldValue(field.key, ''),
|
|
255
|
-
"onUpdate:modelValue": $event => ($options.updateField(field.key, $event))
|
|
256
|
-
}, null, 8 /* PROPS */, ["label", "modelValue", "onUpdate:modelValue"]))
|
|
214
|
+
createVNode(_component_CnSettingsField, {
|
|
215
|
+
field: { ...field, label: $options.resolveLabel(field.label) },
|
|
216
|
+
modelValue: $data.formData[field.key],
|
|
217
|
+
"onUpdate:modelValue": $event => ($options.updateField(field.key, $event))
|
|
218
|
+
}, null, 8 /* PROPS */, ["field", "modelValue", "onUpdate:modelValue"])
|
|
257
219
|
]),
|
|
258
220
|
(field.help)
|
|
259
221
|
? (openBlock(), createElementBlock("small", _hoisted_11, toDisplayString($options.resolveLabel(field.help)), 1 /* TEXT */))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnSettingsPage.vue3.js","sources":["../../../../src/components/CnSettingsPage/CnSettingsPage.vue?vue&type=template&id=50865bde&lang.js"],"sourcesContent":["<!--\n CnSettingsPage — Admin / config surface.\n\n Renders manifest-driven config sections. The page MAY declare\n EITHER a flat `sections[]` array (back-compat) OR a `tabs[]` array\n (each tab owns its own `sections[]`) — XOR, never both. See\n manifest-settings-orchestration spec.\n\n Each section is a CnSettingsCard wrapping a CnSettingsSection.\n A section MUST declare exactly one of three body kinds:\n\n 1. `fields[]` — flat form fields (back-compat, default)\n 2. `component` — registry-resolved component as the section body\n 3. `widgets[]` — ordered list of widgets (built-in + customComponents)\n\n Built-in widget types (resolved BEFORE the customComponents registry):\n - `version-info` → CnVersionInfoCard\n - `register-mapping` → CnRegisterMapping\n - `component` → discriminator; `widget.componentName`\n resolves against customComponents\n\n Saves via `axios.put(saveEndpoint, formData)` with the consumer's\n settings controller URL. Widget events bubble up through\n `@widget-event` so consumers wire one page-level handler that\n dispatches by `widgetType` + event `name` (the manifest can't carry\n inline JS).\n\n Supports the same `headerComponent` / `actionsComponent` / generic\n `slots` overrides that the other built-in page types do — the\n CnPageRenderer wires them via the `#header`, `#actions`, and named\n `slots[]` slots exposed here.\n-->\n<template>\n\t<div class=\"cn-settings-page\" data-testid=\"cn-settings-page\">\n\t\t<!-- Header — overridable via #header slot. CnPageHeader renders whenever\n\t\t there is a title: `visuallyHidden` keeps the <h1> in the\n\t\t accessibility tree (and out of the visual layout) when showTitle is\n\t\t false, so <main> is never left with no heading at all\n\t\t (WCAG 2.4.6 / 1.3.1). -->\n\t\t<slot\n\t\t\tname=\"header\"\n\t\t\t:title=\"title\"\n\t\t\t:description=\"description\"\n\t\t\t:icon=\"icon\">\n\t\t\t<CnPageHeader\n\t\t\t\tv-if=\"title\"\n\t\t\t\t:title=\"title\"\n\t\t\t\t:description=\"resolvedDescription\"\n\t\t\t\t:icon=\"icon\"\n\t\t\t\t:breadcrumb=\"breadcrumb\"\n\t\t\t\t:meta=\"headerMeta\"\n\t\t\t\t:visuallyHidden=\"!showTitle\">\n\t\t\t\t<!-- Board look: the buildiq square, then the page Save as the\n\t\t\t\t last header button. -->\n\t\t\t\t<template v-if=\"headerButtonsInHeader\" #extra>\n\t\t\t\t\t<div class=\"cn-settings-page__header-buttons\" data-testid=\"cn-settings-page-header-buttons\">\n\t\t\t\t\t\t<CnBuildiqEditButton v-if=\"isBoard\" />\n\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\tv-if=\"pageSave\"\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\t\t\t\tdata-testid=\"cn-settings-page-save\"\n\t\t\t\t\t\t\t@click=\"save\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ saveLabel }}\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</CnPageHeader>\n\t\t</slot>\n\n\t\t<!-- The same buttons when the header itself is hidden or replaced. -->\n\t\t<div\n\t\t\tv-if=\"headerButtonsOutside\"\n\t\t\tclass=\"cn-settings-page__header-buttons\"\n\t\t\tdata-testid=\"cn-settings-page-header-buttons\">\n\t\t\t<CnBuildiqEditButton v-if=\"isBoard\" />\n\t\t\t<NcButton\n\t\t\t\tv-if=\"pageSave\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\tdata-testid=\"cn-settings-page-save\"\n\t\t\t\t@click=\"save\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ saveLabel }}\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<!-- The Changes card of a page that saves in its header. -->\n\t\t<div\n\t\t\tv-if=\"pageSave && changedFields.length > 0\"\n\t\t\tclass=\"cn-settings-page__changes\"\n\t\t\tdata-testid=\"cn-settings-page-changes\">\n\t\t\t<h2 class=\"cn-settings-page__changes-title\">\n\t\t\t\t{{ changesLabel }}\n\t\t\t</h2>\n\t\t\t<ul>\n\t\t\t\t<li v-for=\"field in changedFields\" :key=\"field.key\">\n\t\t\t\t\t{{ field.label }}\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\n\t\t<!-- Actions slot for save / discard / reset overrides -->\n\t\t<div v-if=\"$slots.actions || $slots.actions\" class=\"cn-settings-page__actions\">\n\t\t\t<slot name=\"actions\" />\n\t\t</div>\n\n\t\t<!-- Tab strip — only rendered when `tabs[]` is set\n\t\t\t (manifest-settings-orchestration REQ-MSO-5). Built with\n\t\t\t native <button role=\"tab\"> + ARIA wiring; uses Nextcloud\n\t\t\t CSS variables only (no hex literals). -->\n\t\t<div\n\t\t\tv-if=\"hasTabs\"\n\t\t\tclass=\"cn-settings-page__tabs\"\n\t\t\trole=\"tablist\"\n\t\t\tdata-testid=\"cn-settings-page-tabs\">\n\t\t\t<button\n\t\t\t\tv-for=\"(tab, tabIndex) in tabs\"\n\t\t\t\t:key=\"`tab-${tab.id}`\"\n\t\t\t\trole=\"tab\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-settings-page__tab\"\n\t\t\t\t:class=\"{ 'cn-settings-page__tab--active': activeTabId === tab.id }\"\n\t\t\t\t:aria-selected=\"activeTabId === tab.id ? 'true' : 'false'\"\n\t\t\t\t:aria-controls=\"`cn-settings-tab-panel-${tab.id}`\"\n\t\t\t\t:data-testid=\"`cn-settings-page-tab-${tab.id}`\"\n\t\t\t\t@click=\"onTabClick(tab, tabIndex)\">\n\t\t\t\t{{ resolveLabel(tab.label) }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<!-- Sections — rendered for the active tab when `tabs[]` is\n\t\t\t set, otherwise the flat `sections[]` (back-compat). The wrapper\n\t\t\t draws no box of its own (`display: contents`); the board look\n\t\t\t turns it into the card grid. -->\n\t\t<div class=\"cn-settings-page__sections\">\n\t\t\t<CnSettingsCard\n\t\t\t\tv-for=\"(section, sectionIndex) in activeSections\"\n\t\t\t\t:key=\"`section-${activeTabId || 'flat'}-${sectionIndex}`\"\n\t\t\t\t:title=\"resolveLabel(section.title)\"\n\t\t\t\t:icon=\"section.icon || ''\"\n\t\t\t\t:collapsible=\"section.collapsible || false\">\n\t\t\t\t<!--\n\t\t\t\t\tBody resolution — see `sectionBodyKind(section)` in the\n\t\t\t\t\tscript: returns 'fields' (default + back-compat),\n\t\t\t\t\t'component', or 'widgets'.\n\t\t\t\t-->\n\n\t\t\t\t<!-- Body: bare fields[] (back-compat). Wrapped in a\n\t\t\t\t\t CnSettingsSection mirroring the pre-rich-sections layout. -->\n\t\t\t\t<CnSettingsSection\n\t\t\t\t\tv-if=\"sectionBodyKind(section) === 'fields'\"\n\t\t\t\t\t:name=\"resolveLabel(section.title)\"\n\t\t\t\t\t:description=\"resolveLabel(section.description)\"\n\t\t\t\t\t:docUrl=\"section.docUrl || ''\"\n\t\t\t\t\t:wide=\"Boolean(section.wide)\">\n\t\t\t\t\t<div class=\"cn-settings-page__fields\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tv-for=\"field in section.fields\"\n\t\t\t\t\t\t\t:key=\"field.key\"\n\t\t\t\t\t\t\tclass=\"cn-settings-page__field\">\n\t\t\t\t\t\t\t<!-- Per-field slot — `field-<key>` lets a consumer override the input entirely. -->\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:name=\"`field-${field.key}`\"\n\t\t\t\t\t\t\t\t:field=\"field\"\n\t\t\t\t\t\t\t\t:value=\"formData[field.key]\"\n\t\t\t\t\t\t\t\t:onInput=\"(v) => updateField(field.key, v)\">\n\t\t\t\t\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\t\t\t\t\tv-if=\"field.type === 'boolean'\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"!!formData[field.key]\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event)\">\n\t\t\t\t\t\t\t\t\t{{ resolveLabel(field.label) }}\n\t\t\t\t\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\t\t\tv-else-if=\"field.type === 'number'\"\n\t\t\t\t\t\t\t\t\t:label=\"resolveLabel(field.label)\"\n\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"String(fieldValue(field.key, ''))\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event === '' ? null : Number($event))\" />\n\t\t\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\t\t\tv-else-if=\"field.type === 'password'\"\n\t\t\t\t\t\t\t\t\t:label=\"resolveLabel(field.label)\"\n\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"fieldValue(field.key, '')\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event)\" />\n\t\t\t\t\t\t\t\t<NcSelect\n\t\t\t\t\t\t\t\t\tv-else-if=\"field.type === 'enum' && Array.isArray(field.options)\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"selectedOption(field)\"\n\t\t\t\t\t\t\t\t\t:options=\"field.options\"\n\t\t\t\t\t\t\t\t\t:inputLabel=\"resolveLabel(field.label)\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, optionValue($event))\" />\n\t\t\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\t\t\tv-else\n\t\t\t\t\t\t\t\t\t:label=\"resolveLabel(field.label)\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"fieldValue(field.key, '')\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event)\" />\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t<small\n\t\t\t\t\t\t\t\tv-if=\"field.help\"\n\t\t\t\t\t\t\t\tclass=\"cn-settings-page__field-help\">\n\t\t\t\t\t\t\t\t{{ resolveLabel(field.help) }}\n\t\t\t\t\t\t\t</small>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<template v-if=\"sectionSave\" #footer>\n\t\t\t\t\t\t<div class=\"cn-settings-section__save\" data-testid=\"cn-settings-section-save\">\n\t\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\t\t\t\t\t@click=\"save\">\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t{{ saveLabel }}\n\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</template>\n\t\t\t\t</CnSettingsSection>\n\n\t\t\t\t<!-- Body: a single registry-resolved component. The\n\t\t\t\t\t component is responsible for its own chrome — we do\n\t\t\t\t\t NOT wrap it in CnSettingsSection because the existing\n\t\t\t\t\t widget shape (CnVersionInfoCard, CnRegisterMapping)\n\t\t\t\t\t already wraps itself. Custom components are expected\n\t\t\t\t\t to do the same OR opt in by adding their own section\n\t\t\t\t\t wrapper.\n\n\t\t\t\t\t Wrapped in CnSettingsWidgetMount so the child's $emit\n\t\t\t\t\t is intercepted and re-emitted as @widget-event on this\n\t\t\t\t\t page (manifests can't carry inline JS). -->\n\t\t\t\t<CnSettingsWidgetMount\n\t\t\t\t\tv-else-if=\"sectionBodyKind(section) === 'component' && resolveSectionComponent(section)\"\n\t\t\t\t\t:component=\"resolveSectionComponent(section)\"\n\t\t\t\t\t:componentProps=\"section.props || {}\"\n\t\t\t\t\t:widgetType=\"section.component\"\n\t\t\t\t\t:sectionIndex=\"sectionIndex\"\n\t\t\t\t\t:widgetIndex=\"0\"\n\t\t\t\t\t@widgetEvent=\"onWidgetEvent\" />\n\n\t\t\t\t<!-- Body: ordered list of widgets. Each widget is its own\n\t\t\t\t\t mounted component with v-bind props + bubbled events\n\t\t\t\t\t via CnSettingsWidgetMount. Built-ins (version-info,\n\t\t\t\t\t register-mapping) wrap themselves in CnSettingsSection;\n\t\t\t\t\t custom widgets are expected to do the same. -->\n\t\t\t\t<template v-else-if=\"sectionBodyKind(section) === 'widgets'\">\n\t\t\t\t\t<CnSettingsWidgetMount\n\t\t\t\t\t\tv-for=\"entry in resolvedWidgetEntries(section, sectionIndex)\"\n\t\t\t\t\t\t:key=\"entry.key\"\n\t\t\t\t\t\t:component=\"entry.component\"\n\t\t\t\t\t\t:componentProps=\"entry.props\"\n\t\t\t\t\t\t:widgetType=\"entry.widgetType\"\n\t\t\t\t\t\t:sectionIndex=\"sectionIndex\"\n\t\t\t\t\t\t:widgetIndex=\"entry.widgetIndex\"\n\t\t\t\t\t\t@widgetEvent=\"onWidgetEvent\" />\n\t\t\t\t</template>\n\t\t\t</CnSettingsCard>\n\t\t</div>\n\n\t\t<!-- Save bar -->\n\t\t<div v-if=\"showSaveBar && !saveMode && !autosave\" class=\"cn-settings-page__save-bar\">\n\t\t\t<NcButton\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\t@click=\"save\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ saveLabel }}\n\t\t\t</NcButton>\n\t\t\t<NcButton\n\t\t\t\tv-if=\"dirty\"\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t:disabled=\"saving\"\n\t\t\t\t@click=\"reset\">\n\t\t\t\t{{ resetLabel }}\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<!-- Error -->\n\t\t<div v-if=\"lastError\" class=\"cn-settings-page__error\">\n\t\t\t{{ lastError }}\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { translate as t } from '@nextcloud/l10n'\nimport {\n\tNcButton,\n\tNcCheckboxRadioSwitch,\n\tNcLoadingIcon,\n\tNcSelect,\n\tNcTextField,\n} from '@nextcloud/vue'\nimport ContentSave from 'vue-material-design-icons/ContentSave.vue'\nimport CnBuildiqEditButton from '../CnBuildiqEditButton/CnBuildiqEditButton.vue'\nimport CnRegisterMapping from '../CnRegisterMapping/CnRegisterMapping.vue'\nimport CnToggleTableWidget from '../CnToggleTableWidget/CnToggleTableWidget.vue'\nimport CnVersionInfoCard from '../CnVersionInfoCard/CnVersionInfoCard.vue'\nimport { useLook } from '../../composables/useLook.js'\nimport { prefixUrl } from '../../utils/headers.js'\nimport { CnPageHeader } from '../CnPageHeader/index.js'\nimport { CnSettingsCard } from '../CnSettingsCard/index.js'\nimport { CnSettingsSection } from '../CnSettingsSection/index.js'\nimport CnSettingsWidgetMount from './CnSettingsWidgetMount.js'\n\n/**\n * Sentinel value used in the built-in widget registry to mark the\n * `'component'` discriminator (manifest-settings-orchestration\n * REQ-MSO-6). The discriminator does NOT resolve to a fixed\n * component — instead, the resolver detects this sentinel and looks\n * up `widget.componentName` in the customComponents registry.\n */\nconst COMPONENT_DISCRIMINATOR = Symbol('cn-settings-component-widget')\n\n/**\n * Built-in widget registry. Used by `CnSettingsPage` to resolve\n * `widgets[].type` to a component BEFORE consulting the\n * consumer-provided customComponents registry.\n *\n * The order matters — built-ins win on collision so consumers can't\n * accidentally shadow `version-info` with their own component. If a\n * consumer needs to truly replace one of these, they can render their\n * own component via `section.component` or\n * `{ type: \"component\", componentName: <name> }` instead of `widgets[]`.\n *\n * Spec:\n * - REQ-MSRS-2 (manifest-settings-rich-sections) — fixed-component\n * built-ins (`version-info`, `register-mapping`).\n * - REQ-MSO-6 (manifest-settings-orchestration) — `'component'`\n * discriminator (sentinel value, resolved via componentName).\n */\nconst BUILTIN_SETTINGS_WIDGETS = Object.freeze({\n\t'version-info': CnVersionInfoCard,\n\t'register-mapping': CnRegisterMapping,\n\t// Rows with a switch: objects (`bind.mode: 'each'`) or a config map (`'map'`).\n\t'toggle-table': CnToggleTableWidget,\n\tcomponent: COMPONENT_DISCRIMINATOR,\n})\n\n/**\n * CnSettingsPage — Manifest-driven settings page.\n *\n * Reads `sections[]` from `pages[].config` and renders one\n * `CnSettingsCard` per section. Each section declares EXACTLY ONE of\n * three body kinds:\n *\n * - `fields[]` — flat form fields (back-compat default).\n * Each field's `type` controls which input renders:\n * - `boolean` → NcCheckboxRadioSwitch\n * - `number` → NcTextField (type=number)\n * - `string` → NcTextField (default)\n * - `password` → NcTextField (type=password)\n * - `enum` → NcSelect (requires `options: string[]`)\n * Per-field `#field-<key>` slots are exposed so consumers can drop\n * in their own widget.\n *\n * - `component` — registry-resolved component as the section body.\n * `section.props` is v-bind'd to it. Useful when a whole section\n * is one bespoke widget the library doesn't know about.\n *\n * - `widgets[]` — ordered list of widgets. Each entry has a `type`\n * string and optional `props`. Built-in widget types resolve\n * first (`version-info` → `CnVersionInfoCard`, `register-mapping`\n * → `CnRegisterMapping`, `toggle-table` → `CnToggleTableWidget`);\n * unknown types fall back to the\n * `customComponents` registry.\n *\n * Widget events (e.g. CnRegisterMapping's `@save`, CnVersionInfoCard's\n * `@update`) bubble up as a single `@widget-event` event on the page,\n * with payload `{ widgetType, widgetIndex, sectionIndex, name, args }`.\n * Consumers wire one handler at the CnAppRoot level and dispatch by\n * `widgetType` / `name` — the manifest can't carry inline JS, so this\n * is the documented event-wiring escape hatch.\n *\n * Saves via `axios.put(saveEndpoint, formData)`. The `saveEndpoint`\n * default is `/index.php/apps/{appId}/api/settings` — consumers should\n * pass a fully-qualified URL via the manifest (or `saveEndpoint` prop)\n * because the library has no knowledge of the consumer's app id at\n * import time.\n *\n * Slots:\n * - `#header` — Replaces the CnPageHeader.\n * - `#actions` — Right-aligned actions area (the renderer fills this\n * via `pages[].actionsComponent`).\n * - `#field-<key>` — Replaces the input for a specific field within\n * a `fields[]` section. Scope: `{ field, value, onInput }`.\n *\n * Events:\n * - `@save` — Emitted on successful save. Payload: the form data.\n * - `@error` — Emitted when save fails. Payload: the error.\n * - `@input` — Emitted on every field change. Payload: `{ key, value }`.\n * - `@widget-event` — Emitted when a widget mounted via `widgets[]`\n * or `component` re-emits one of its own events. Payload:\n * `{ widgetType, widgetIndex, sectionIndex, name, args }`.\n */\nexport default {\n\tname: 'CnSettingsPage',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcLoadingIcon,\n\t\tNcSelect,\n\t\tNcTextField,\n\t\tContentSave,\n\t\tCnBuildiqEditButton,\n\t\tCnSettingsCard,\n\t\tCnSettingsSection,\n\t\tCnPageHeader,\n\t\tCnSettingsWidgetMount,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * Custom-component registry injected from CnAppRoot. Used to\n\t\t * resolve `section.component` and to fall back when a\n\t\t * `widgets[].type` isn't in the built-in widget map. Defaults\n\t\t * to an empty object when the page is mounted standalone.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tcnCustomComponents: { default: () => ({}) },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The look the page is drawn in: `board` or `nextcloud`. Empty follows\n\t\t * the `cnLook` that CnAppRoot (or the page's `config.look`) provides.\n\t\t *\n\t\t * @spec openspec/changes/screens-chrome-parity/specs/app-look/spec.md#requirement-an-app-can-take-the-board-look\n\t\t */\n\t\tlook: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Where the page saves (`config.saveMode`): `section` ends each section\n\t\t * that has fields in its own Save button, `page` draws one Save as the\n\t\t * last header button and a Changes card, and empty keeps the save bar\n\t\t * under the last section. Never both a section and a page save.\n\t\t *\n\t\t * @spec openspec/changes/screens-chrome-parity/specs/settings-board-look/spec.md#requirement-a-settings-page-saves-in-one-declared-place\n\t\t * @type {'section'|'page'|''}\n\t\t */\n\t\tsaveMode: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t\tvalidator: (value) => ['', 'section', 'page'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * The page saves on change (`config.autosave`): no save button at all,\n\t\t * and the description ends with \"Changes are saved automatically.\"\n\t\t *\n\t\t * @spec openspec/changes/screens-chrome-parity/specs/settings-board-look/spec.md#requirement-a-settings-page-saves-in-one-declared-place\n\t\t */\n\t\tautosave: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Page title. */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Settings'),\n\t\t},\n\n\t\t/**\n\t\t * A breadcrumb under the title (manifest `config.breadcrumb`): one\n\t\t * crumb `{ label, route?, params?, href?, icon?, separator? }` or a\n\t\t * list; the title follows as the current crumb. Drawn as the detail\n\t\t * header's breadcrumb row. Null (the default) draws none.\n\t\t *\n\t\t * @type {object|Array<object>|null}\n\t\t * @spec openspec/changes/page-header-breadcrumb/specs/page-header/spec.md#requirement-a-list-dashboard-or-settings-page-can-show-a-breadcrumb-and-a-meta-note\n\t\t */\n\t\tbreadcrumb: {\n\t\t\ttype: [Object, Array],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * A note after the breadcrumb and a middle dot (manifest `config.headerMeta`).\n\t\t *\n\t\t * @spec openspec/changes/page-header-breadcrumb/specs/page-header/spec.md#requirement-a-list-dashboard-or-settings-page-can-show-a-breadcrumb-and-a-meta-note\n\t\t */\n\t\theaderMeta: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Description shown under the title when `showTitle` is set. */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether to render the inline page header VISIBLY. When false the\n\t\t * `<h1>` is still rendered visually-hidden, so the `<main>` landmark\n\t\t * always has an accessible heading (WCAG 2.4.6 / 1.3.1).\n\t\t */\n\t\tshowTitle: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** MDI icon name for the header. */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Section definitions (flat shape — back-compat). Each section\n\t\t * MUST declare EXACTLY ONE of:\n\t\t * - `fields: Array<Field>` (back-compat flat-field body)\n\t\t * - `component: <registry-name>` + optional `props`\n\t\t * - `widgets: Array<{ type, props?, componentName? }>`\n\t\t *\n\t\t * Common keys: `{ title, description?, icon?, collapsible?, docUrl? }`.\n\t\t *\n\t\t * Mutually exclusive with `tabs[]` (XOR — see\n\t\t * manifest-settings-orchestration REQ-MSO-1).\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tsections: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Tab definitions (orchestration shape — manifest-settings-\n\t\t * orchestration REQ-MSO-2). When set, CnSettingsPage renders\n\t\t * a tab strip above the section area; the active tab's\n\t\t * `sections[]` flow into the same renderer used by the flat\n\t\t * shape. Mutually exclusive with `sections[]`.\n\t\t *\n\t\t * Each tab MUST be `{ id: string, label: string,\n\t\t * icon?: string, sections: array<Section> }`.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\ttabs: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Optional ID of the tab to activate on mount. When empty AND\n\t\t * `tabs[]` is non-empty, the first tab is active by default.\n\t\t * Unknown IDs fall back to the first tab.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tinitialTab: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Initial values keyed by `field.key`. Defaults to an empty\n\t\t * object; in practice the consumer passes the current\n\t\t * IAppConfig snapshot loaded from their settings controller.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tinitialValues: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Endpoint that receives the PUT on save. Pass a fully-qualified\n\t\t * URL — the library has no knowledge of the consumer's app id.\n\t\t * When empty, no PUT is issued and `@save` is emitted with the\n\t\t * form data so the consumer can persist it themselves.\n\t\t */\n\t\tsaveEndpoint: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Whether to render the built-in save/reset bar. */\n\t\tshowSaveBar: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Label for the save button. */\n\t\tsaveLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Save'),\n\t\t},\n\n\t\t/** Label for the reset (discard) button. */\n\t\tresetLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Discard changes'),\n\t\t},\n\n\t\t/**\n\t\t * Optional translation function. When provided, applied to\n\t\t * section titles, field labels, and other i18n-key strings\n\t\t * declared in the manifest. Defaults to the identity function.\n\t\t *\n\t\t * @type {((key: string) => string)|null}\n\t\t */\n\t\ttranslate: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Optional explicit custom-component registry. When set, takes\n\t\t * precedence over the injected `cnCustomComponents`. Use this\n\t\t * when mounting CnSettingsPage outside a CnAppRoot tree (or\n\t\t * when test-mounting with a stub registry).\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tcustomComponents: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['save', 'error', 'input', 'widget-event', 'tab-change'],\n\n\tsetup(props) {\n\t\tconst { isBoard } = useLook(props)\n\t\treturn { isBoard }\n\t},\n\n\tdata() {\n\t\t// Resolve the initial active-tab id synchronously so the very\n\t\t// first render has the correct tab active (otherwise tests\n\t\t// that mount + assert without an `await tick` see the empty\n\t\t// default). Mirrors the logic in `resolveInitialTabId` (the\n\t\t// watcher path); keep them aligned.\n\t\tlet activeTabId = ''\n\t\tconst tabs = Array.isArray(this.tabs) ? this.tabs : []\n\t\tif (tabs.length > 0) {\n\t\t\tif (typeof this.initialTab === 'string' && this.initialTab.length > 0\n\t\t\t\t&& tabs.some((t) => t && t.id === this.initialTab)) {\n\t\t\t\tactiveTabId = this.initialTab\n\t\t\t} else if (tabs[0] && typeof tabs[0].id === 'string') {\n\t\t\t\tactiveTabId = tabs[0].id\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tformData: this.cloneInitial(),\n\t\t\toriginalData: this.cloneInitial(),\n\t\t\tsaving: false,\n\t\t\tlastError: null,\n\t\t\tactiveTabId,\n\t\t\tautosaveTimer: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {boolean} The page saves from its header (`saveMode: \"page\"`, not autosave). */\n\t\tpageSave() {\n\t\t\treturn this.saveMode === 'page' && !this.autosave\n\t\t},\n\n\t\t/** @return {boolean} Each section with fields saves on its own (`saveMode: \"section\"`). */\n\t\tsectionSave() {\n\t\t\treturn this.saveMode === 'section' && !this.autosave\n\t\t},\n\n\t\t/**\n\t\t * The description, with the autosave note appended when the page saves\n\t\t * on change.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedDescription() {\n\t\t\tif (!this.autosave) {\n\t\t\t\treturn this.description\n\t\t\t}\n\t\t\tconst note = t('nextcloud-vue', 'Changes are saved automatically.')\n\t\t\treturn this.description ? `${this.description} ${note}` : note\n\t\t},\n\n\t\t/** @return {boolean} The header buttons render inside the visible page header. */\n\t\theaderButtonsInHeader() {\n\t\t\treturn Boolean(this.title && this.showTitle && !this.$slots.header && (this.isBoard || this.pageSave))\n\t\t},\n\n\t\t/** @return {boolean} The header buttons need a row of their own (header hidden or replaced). */\n\t\theaderButtonsOutside() {\n\t\t\treturn Boolean((this.isBoard || this.pageSave) && !this.headerButtonsInHeader)\n\t\t},\n\n\t\t/** @return {string} Title of the Changes card. */\n\t\tchangesLabel() {\n\t\t\treturn t('nextcloud-vue', 'Changes')\n\t\t},\n\n\t\t/**\n\t\t * The fields that differ from their saved value, across every section,\n\t\t * labelled for the Changes card.\n\t\t *\n\t\t * @return {Array<{key: string, label: string}>}\n\t\t */\n\t\tchangedFields() {\n\t\t\tconst labels = {}\n\t\t\tconst sections = [...(this.sections || [])]\n\t\t\tfor (const tab of this.tabs || []) {\n\t\t\t\tif (tab && Array.isArray(tab.sections)) {\n\t\t\t\t\tsections.push(...tab.sections)\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const section of sections) {\n\t\t\t\tfor (const field of (section && section.fields) || []) {\n\t\t\t\t\tlabels[field.key] = this.resolveLabel(field.label) || field.key\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst keys = new Set([...Object.keys(this.formData), ...Object.keys(this.originalData)])\n\t\t\treturn [...keys]\n\t\t\t\t.filter((key) => JSON.stringify(this.formData[key]) !== JSON.stringify(this.originalData[key]))\n\t\t\t\t.map((key) => ({ key, label: labels[key] || key }))\n\t\t},\n\n\t\t/** Whether any field has changed since load. */\n\t\tdirty() {\n\t\t\treturn JSON.stringify(this.formData) !== JSON.stringify(this.originalData)\n\t\t},\n\n\t\t/**\n\t\t * Effective custom-component registry. Explicit prop wins over\n\t\t * the injected value (mirrors CnPageRenderer's resolution\n\t\t * order).\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\teffectiveCustomComponents() {\n\t\t\treturn this.customComponents ?? this.cnCustomComponents ?? {}\n\t\t},\n\n\t\t/**\n\t\t * Whether the page is in tabs orchestration mode. True when\n\t\t * `tabs[]` is non-empty — drives the tab-strip render gate\n\t\t * (manifest-settings-orchestration REQ-MSO-5).\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasTabs() {\n\t\t\treturn Array.isArray(this.tabs) && this.tabs.length > 0\n\t\t},\n\n\t\t/**\n\t\t * The sections to render right now. In flat mode, this is the\n\t\t * `sections` prop directly. In tabs mode, this is the\n\t\t * `sections[]` array of the currently active tab. Centralising\n\t\t * this in one computed keeps the template's `v-for` simple\n\t\t * and decouples it from the body kind dispatcher (which\n\t\t * applies per-section, not per-mode).\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tactiveSections() {\n\t\t\tif (!this.hasTabs) {\n\t\t\t\treturn this.sections || []\n\t\t\t}\n\t\t\tconst active = this.tabs.find((t) => t && t.id === this.activeTabId)\n\t\t\tif (active && Array.isArray(active.sections)) {\n\t\t\t\treturn active.sections\n\t\t\t}\n\t\t\t// Defensive fallback — should not happen because\n\t\t\t// `resolveInitialTabId` always lands on a known tab.\n\t\t\tconst first = this.tabs[0]\n\t\t\treturn first && Array.isArray(first.sections) ? first.sections : []\n\t\t},\n\t},\n\n\twatch: {\n\t\tinitialValues: {\n\t\t\tdeep: true,\n\t\t\thandler() {\n\t\t\t\tthis.formData = this.cloneInitial()\n\t\t\t\tthis.originalData = this.cloneInitial()\n\t\t\t},\n\t\t},\n\n\t\t// When `tabs[]` changes (e.g. consumer swaps manifests at\n\t\t// runtime), re-resolve the active tab so the page doesn't get\n\t\t// stuck on a removed id.\n\t\ttabs: {\n\t\t\thandler() {\n\t\t\t\tthis.activeTabId = this.resolveInitialTabId()\n\t\t\t},\n\t\t},\n\n\t\t// When `initialTab` changes (consumer-controlled tab\n\t\t// activation), follow it.\n\t\tinitialTab(next) {\n\t\t\tif (typeof next === 'string' && next.length > 0) {\n\t\t\t\tconst exists = this.tabs.some((t) => t && t.id === next)\n\t\t\t\tif (exists) {\n\t\t\t\t\tthis.activeTabId = next\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n\n\tbeforeUnmount() {\n\t\tclearTimeout(this.autosaveTimer)\n\t},\n\n\tmethods: {\n\t\t// Coalesce a field value to a fallback when null / undefined.\n\t\t// Used in template bindings instead of `formData[key] ?? ''` because\n\t\t// vue-template-es2015-compiler (the Rollup VuePlugin's parser) does\n\t\t// not accept ES2020 nullish-coalescing inside template expressions.\n\t\tfieldValue(key, fallback) {\n\t\t\tconst v = this.formData[key]\n\t\t\treturn (v === null || v === undefined) ? fallback : v\n\t\t},\n\n\t\t// Resolve the currently-selected option for an enum field.\n\t\t// `field.options` may be an array of strings/numbers OR an array\n\t\t// of `{ label, value }`-shaped objects. NcSelect needs the actual\n\t\t// option entry (not the bare value) to render the selection\n\t\t// correctly, so this resolver looks up the matching object form\n\t\t// when a primitive value is stored. Returns `null` when nothing\n\t\t// is selected so NcSelect renders the empty state instead of\n\t\t// emitting a Vue warning about an undefined `value` prop.\n\t\tselectedOption(field) {\n\t\t\tconst v = this.formData[field.key]\n\t\t\tif (v === null || v === undefined) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (!Array.isArray(field.options)) {\n\t\t\t\treturn v\n\t\t\t}\n\t\t\tfor (const opt of field.options) {\n\t\t\t\tif (opt && typeof opt === 'object') {\n\t\t\t\t\tif (opt.value === v) {\n\t\t\t\t\t\treturn opt\n\t\t\t\t\t}\n\t\t\t\t} else if (opt === v) {\n\t\t\t\t\treturn opt\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn v\n\t\t},\n\n\t\t// Inverse of `selectedOption` — extract the storable value from\n\t\t// whatever NcSelect emits. NcSelect emits the full option entry\n\t\t// when options are objects, the primitive when options are\n\t\t// primitives, or `null` on clear.\n\t\toptionValue(emitted) {\n\t\t\tif (emitted === null || emitted === undefined) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (typeof emitted === 'object' && 'value' in emitted) {\n\t\t\t\treturn emitted.value\n\t\t\t}\n\t\t\treturn emitted\n\t\t},\n\n\t\tcloneInitial() {\n\t\t\tconst merged = { ...(this.initialValues || {}) }\n\t\t\t// Collect every section across both modes (flat\n\t\t\t// `sections[]` AND `tabs[].sections[]`) so default values\n\t\t\t// are applied regardless of orchestration shape.\n\t\t\t// Only flat-field sections contribute defaults; component\n\t\t\t// and widgets sections own their own state.\n\t\t\tconst allSections = []\n\t\t\tfor (const section of this.sections || []) {\n\t\t\t\tallSections.push(section)\n\t\t\t}\n\t\t\tfor (const tab of this.tabs || []) {\n\t\t\t\tif (tab && Array.isArray(tab.sections)) {\n\t\t\t\t\tfor (const section of tab.sections) {\n\t\t\t\t\t\tallSections.push(section)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const section of allSections) {\n\t\t\t\tif (!section || !Array.isArray(section.fields)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tfor (const field of section.fields) {\n\t\t\t\t\tif (field.default !== undefined && merged[field.key] === undefined) {\n\t\t\t\t\t\tmerged[field.key] = field.default\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn merged\n\t\t},\n\n\t\tresolveLabel(value) {\n\t\t\tif (!value) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (this.translate) {\n\t\t\t\treturn this.translate(value)\n\t\t\t}\n\t\t\treturn value\n\t\t},\n\n\t\tupdateField(key, value) {\n\t\t\tthis.formData[key] = value\n\t\t\tthis.$emit('input', { key, value })\n\t\t\tif (this.autosave) {\n\t\t\t\tthis.queueAutosave()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Determine which body kind a section declares. Returns\n\t\t * `'fields'` (default + back-compat), `'component'`, or\n\t\t * `'widgets'`. The validator (`validateManifest`) enforces\n\t\t * exactly-one at parse time; this method is the runtime\n\t\t * equivalent and is permissive when one of the keys is set\n\t\t * (last-defined wins in the rare case of an unvalidated\n\t\t * manifest).\n\t\t *\n\t\t * @param {object} section A section entry from `sections[]`.\n\t\t * @return {'fields' | 'component' | 'widgets'}\n\t\t */\n\t\tsectionBodyKind(section) {\n\t\t\tif (Array.isArray(section.widgets) && section.widgets.length > 0) {\n\t\t\t\treturn 'widgets'\n\t\t\t}\n\t\t\tif (typeof section.component === 'string' && section.component.length > 0) {\n\t\t\t\treturn 'component'\n\t\t\t}\n\t\t\treturn 'fields'\n\t\t},\n\n\t\t/**\n\t\t * Resolve a `section.component` registry name to a Vue\n\t\t * component via `effectiveCustomComponents`. Returns `null`\n\t\t * (and warns) when the registry has no entry.\n\t\t *\n\t\t * @param {object} section A section entry.\n\t\t * @return {object|null} Vue component or null.\n\t\t */\n\t\tresolveSectionComponent(section) {\n\t\t\tconst name = section.component\n\t\t\tif (!name) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst resolved = this.effectiveCustomComponents[name]\n\t\t\tif (!resolved) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn(`[CnSettingsPage] Section component \"${name}\" not found in customComponents registry. Section body will be empty.`)\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn resolved\n\t\t},\n\n\t\t/**\n\t\t * Resolve a single `widgets[]` entry to a concrete Vue\n\t\t * component. Lookup order:\n\t\t *\n\t\t * 1. Built-in widget map (`version-info`, `register-mapping`).\n\t\t * 2. `'component'` discriminator (REQ-MSO-6) — resolves\n\t\t * `widget.componentName` against `effectiveCustomComponents`.\n\t\t * 3. Legacy fallback — looks up `widget.type` against\n\t\t * `effectiveCustomComponents`. Kept for back-compat with\n\t\t * manifest-settings-rich-sections consumers; flagged as\n\t\t * deprecated in JSDoc — manifest authors should migrate to\n\t\t * the explicit `{ type: \"component\", componentName }` shape.\n\t\t *\n\t\t * Returns `null` (and warns) when nothing resolves. Built-ins\n\t\t * win on collision so consumers can't accidentally shadow them.\n\t\t *\n\t\t * @param {object} widget A `widgets[]` entry, e.g. `{ type, props?, componentName? }`.\n\t\t * @return {object|null} Vue component or null.\n\t\t */\n\t\tresolveWidgetComponent(widget) {\n\t\t\tconst type = widget && typeof widget.type === 'string' ? widget.type : ''\n\t\t\tif (!type) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (Object.hasOwn(BUILTIN_SETTINGS_WIDGETS, type)) {\n\t\t\t\tconst builtin = BUILTIN_SETTINGS_WIDGETS[type]\n\t\t\t\tif (builtin === COMPONENT_DISCRIMINATOR) {\n\t\t\t\t\t// REQ-MSO-6: discriminator — look up `componentName`.\n\t\t\t\t\tconst name = widget.componentName\n\t\t\t\t\tif (typeof name !== 'string' || name.length === 0) {\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.warn('[CnSettingsPage] Widget {type:\"component\"} requires a non-empty `componentName`. Widget will be skipped.')\n\t\t\t\t\t\treturn null\n\t\t\t\t\t}\n\t\t\t\t\tconst resolved = this.effectiveCustomComponents[name]\n\t\t\t\t\tif (!resolved) {\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.warn(`[CnSettingsPage] Widget component \"${name}\" not found in customComponents registry. Widget will be skipped.`)\n\t\t\t\t\t\treturn null\n\t\t\t\t\t}\n\t\t\t\t\treturn resolved\n\t\t\t\t}\n\t\t\t\treturn builtin\n\t\t\t}\n\t\t\t// Legacy fallback (manifest-settings-rich-sections REQ-MSRS-2).\n\t\t\t// Deprecated — manifest authors should migrate to\n\t\t\t// `{ type: \"component\", componentName: <X> }`. Kept here so\n\t\t\t// existing consumers continue working unchanged.\n\t\t\tconst resolved = this.effectiveCustomComponents[type]\n\t\t\tif (!resolved) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn(`[CnSettingsPage] Widget type \"${type}\" not found in built-in widgets or customComponents registry. Widget will be skipped.`)\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn resolved\n\t\t},\n\n\t\t/**\n\t\t * Build the list of widget mount entries for a `widgets[]`\n\t\t * section. Filters out entries whose `widget.type` doesn't\n\t\t * resolve (built-in OR customComponents) — `resolveWidgetComponent`\n\t\t * has already logged a warn. The filter happens here so the\n\t\t * template can use a clean `v-for` without nested `v-if`.\n\t\t *\n\t\t * The `widgetType` carried on the bubbled `@widget-event`\n\t\t * payload is the widget's `componentName` (when the\n\t\t * discriminator is `'component'`) or `widget.type` otherwise —\n\t\t * giving consumers a stable identifier for the dispatch.\n\t\t *\n\t\t * @param {object} section A section entry with `widgets[]`.\n\t\t * @param {number} sectionIndex Index in `sections[]`.\n\t\t * @return {Array<{key: string, component: object, props: object, widgetType: string, widgetIndex: number}>}\n\t\t */\n\t\tresolvedWidgetEntries(section, sectionIndex) {\n\t\t\tconst entries = []\n\t\t\tconst widgets = Array.isArray(section.widgets) ? section.widgets : []\n\t\t\tfor (let widgetIndex = 0; widgetIndex < widgets.length; widgetIndex++) {\n\t\t\t\tconst widget = widgets[widgetIndex] || {}\n\t\t\t\tconst component = this.resolveWidgetComponent(widget)\n\t\t\t\tif (!component) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst widgetType = widget.type === 'component' && typeof widget.componentName === 'string'\n\t\t\t\t\t? widget.componentName\n\t\t\t\t\t: widget.type\n\t\t\t\tentries.push({\n\t\t\t\t\tkey: `widget-${sectionIndex}-${widgetIndex}`,\n\t\t\t\t\tcomponent,\n\t\t\t\t\tprops: widget.props || {},\n\t\t\t\t\twidgetType,\n\t\t\t\t\twidgetIndex,\n\t\t\t\t})\n\t\t\t}\n\t\t\treturn entries\n\t\t},\n\n\t\t/**\n\t\t * Resolve the active-tab id on mount / when `tabs[]` changes.\n\t\t * Lookup order: explicit `initialTab` prop → first tab in\n\t\t * `tabs[]` → empty string. Unknown `initialTab` values fall\n\t\t * back to the first tab so the page never gets stuck.\n\t\t * (manifest-settings-orchestration REQ-MSO-5.)\n\t\t *\n\t\t * @return {string} The resolved tab id (empty in flat mode).\n\t\t */\n\t\tresolveInitialTabId() {\n\t\t\tif (!this.hasTabs) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (typeof this.initialTab === 'string' && this.initialTab.length > 0) {\n\t\t\t\tconst exists = this.tabs.some((t) => t && t.id === this.initialTab)\n\t\t\t\tif (exists) {\n\t\t\t\t\treturn this.initialTab\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst first = this.tabs[0]\n\t\t\treturn first && typeof first.id === 'string' ? first.id : ''\n\t\t},\n\n\t\t/**\n\t\t * Handle a tab button click. Switches the active tab and\n\t\t * emits `@tab-change` so consumers can react (e.g. persist the\n\t\t * active tab in their preference store, update the URL hash).\n\t\t * (manifest-settings-orchestration REQ-MSO-5.)\n\t\t *\n\t\t * @param {object} tab The clicked tab definition.\n\t\t * @param {number} tabIndex The tab's index in `tabs[]`.\n\t\t */\n\t\tonTabClick(tab, tabIndex) {\n\t\t\tif (!tab || typeof tab.id !== 'string') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.activeTabId === tab.id) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.activeTabId = tab.id\n\t\t\tthis.$emit('tab-change', { tabId: tab.id, tabIndex })\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a widget's `widget-event` (caught by the local\n\t\t * CnSettingsWidgetMount helper) as a top-level `widget-event`\n\t\t * on this page. Consumers wire one `@widget-event` handler at\n\t\t * the CnAppRoot mount point and dispatch by `widgetType` /\n\t\t * `name`.\n\t\t *\n\t\t * @param {object} payload `{ widgetType, widgetIndex, sectionIndex, name, args }`\n\t\t */\n\t\tonWidgetEvent(payload) {\n\t\t\tthis.$emit('widget-event', payload)\n\t\t},\n\n\t\t/**\n\t\t * Save shortly after the last change (`autosave`): a burst of typing\n\t\t * is one request.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tqueueAutosave() {\n\t\t\tclearTimeout(this.autosaveTimer)\n\t\t\tthis.autosaveTimer = setTimeout(() => {\n\t\t\t\tthis.autosaveTimer = null\n\t\t\t\tif (this.dirty && !this.saving) {\n\t\t\t\t\tthis.save()\n\t\t\t\t}\n\t\t\t}, 600)\n\t\t},\n\n\t\treset() {\n\t\t\tthis.formData = this.cloneInitial()\n\t\t\tthis.lastError = null\n\t\t},\n\n\t\tasync save() {\n\t\t\tthis.saving = true\n\t\t\tthis.lastError = null\n\t\t\ttry {\n\t\t\t\tif (this.saveEndpoint) {\n\t\t\t\t\tawait axios.put(prefixUrl(this.saveEndpoint), this.formData)\n\t\t\t\t}\n\t\t\t\tthis.originalData = JSON.parse(JSON.stringify(this.formData))\n\t\t\t\tthis.$emit('save', this.formData)\n\t\t\t} catch (err) {\n\t\t\t\tthis.lastError = err?.response?.data?.message || err?.message || t('nextcloud-vue', 'Save failed')\n\t\t\t\tthis.$emit('error', err)\n\t\t\t} finally {\n\t\t\t\tthis.saving = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* The section wrapper draws no box; the board look makes it the card grid. */\n.cn-settings-page__sections {\n\tdisplay: contents;\n}\n\n.cn-settings-page__header-buttons {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tmargin-inline-start: auto;\n}\n\n.cn-settings-page {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n}\n\n.cn-settings-page__actions {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tgap: 8px;\n}\n\n/*\n * Tab strip for the orchestration shape (manifest-settings-\n * orchestration REQ-MSO-5). Uses Nextcloud CSS variables only — no\n * hex literals, no rgba overrides on the elements themselves.\n */\n.cn-settings-page__tabs {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 4px;\n\tborder-bottom: 1px solid var(--color-border);\n\tpadding-bottom: 0;\n\tmargin-bottom: 8px;\n}\n\n.cn-settings-page__tab {\n\tbackground: transparent;\n\tborder: 0;\n\tborder-bottom: 3px solid transparent;\n\tpadding: 8px 16px;\n\tmargin: 0;\n\tcursor: pointer;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: normal;\n\tborder-radius: var(--border-radius-large) var(--border-radius-large) 0 0;\n\ttransition: background-color 0.1s ease-in-out, color 0.1s ease-in-out, border-color 0.1s ease-in-out;\n}\n\n.cn-settings-page__tab:hover,\n.cn-settings-page__tab:focus-visible {\n\tbackground-color: var(--color-background-hover);\n\tcolor: var(--color-main-text);\n\toutline: none;\n}\n\n.cn-settings-page__tab--active {\n\tcolor: var(--color-primary-element);\n\tborder-bottom-color: var(--color-primary-element);\n\tfont-weight: bold;\n}\n\n@media (max-width: 768px) {\n\t.cn-settings-page__tabs {\n\t\tflex-direction: column;\n\t\tgap: 0;\n\t\tborder-bottom: 0;\n\t}\n\n\t.cn-settings-page__tab {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t}\n\n\t.cn-settings-page__tab--active {\n\t\tborder-bottom-width: 1px;\n\t\tbackground-color: var(--color-background-hover);\n\t}\n}\n\n.cn-settings-page__fields {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-settings-page__field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-settings-page__field-help {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-settings-page__save-bar {\n\tdisplay: flex;\n\tgap: 8px;\n\tmargin-top: 16px;\n}\n\n.cn-settings-page__error {\n\tcolor: var(--color-error);\n\tbackground: var(--color-error-light, var(--color-background-hover));\n\tpadding: 8px 12px;\n\tborder-radius: var(--border-radius);\n}\n</style>\n"],"names":["_renderSlot","_createBlock","_createElementVNode","_createTextVNode","_openBlock","_createElementBlock","_toDisplayString","_Fragment","_renderList","_createVNode"],"mappings":";;;OAiEW,EAAC,kBAAkB;AAAC,EAAA,aAAS,EAAA,kBAAA;;;AAsB9B,EAAA,KAAK,EAAC,kCAA8B;AAAA,EAAA,aAAA,EAAA,iCAAA;;;;AAsB3C,EAAA,KAAK,EAAC,kCAAkC;AACxC,EAAA,aAAW,EAAC,iCAAiC;;;;AAmB5C,EAAA,KAAI,EAAC,2BAA2B;eACtB,EAAC,0BAA0B;;AAClC,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,iCAAiC,GAAA;;;AAWL,EAAA,KAAA,EAAA,2BAAA;;;;OAUjC,EAAC,wBAAqB;AAC1B,EAAA,IAAE,EAAA,SAAA;;;;AAqBE,MAAA,UAAA,GAAA,EAAA,KAAI,EAAC,4BAAgB,GAAA;AAqBnB,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,0BAAgB,GAAA;;;AA2CxB,EAAA,KAAK,EAAC,8BAAW;;;AAMd,EAAA,KAAK,EAAC,2BAAG;AAAA,EAAA,aAAA,EAAA,0BAAA;;;;;;;;;;;;;;;;;;;;;;;;;IA7KjBA,UAiCM,CAAA,IAAA,CAAA,MAAA,EAAA,QAAA,EAAA;;AA9BL,MAAA,WAAY,EAAC,MAAY,CAAA,WAAA;AACzB,MAAA,IAAC,EAAA,MAAA,CAAA,IAAA;OAJF,MAiCM;OA3BC,MAAK,CAAA,KAAA;wBADZC,WA2Be,CAAA,uBAAA,EAAA;;AAzBb,Y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,cAAU,EAAA,KAAA,CAAA,KAAA;wBACV,UAAA,EAAA,KAAA,CAAA,UAAA;AACD,wBAAA,YAAA,EAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"CnSettingsPage.vue3.js","sources":["../../../../src/components/CnSettingsPage/CnSettingsPage.vue?vue&type=template&id=0b4a7625&lang.js"],"sourcesContent":["<!--\n CnSettingsPage — Admin / config surface.\n\n Renders manifest-driven config sections. The page MAY declare\n EITHER a flat `sections[]` array (back-compat) OR a `tabs[]` array\n (each tab owns its own `sections[]`) — XOR, never both. See\n manifest-settings-orchestration spec.\n\n Each section is a CnSettingsCard wrapping a CnSettingsSection.\n A section MUST declare exactly one of three body kinds:\n\n 1. `fields[]` — flat form fields (back-compat, default)\n 2. `component` — registry-resolved component as the section body\n 3. `widgets[]` — ordered list of widgets (built-in + customComponents)\n\n Built-in widget types (resolved BEFORE the customComponents registry):\n - `version-info` → CnVersionInfoCard\n - `register-mapping` → CnRegisterMapping\n - `component` → discriminator; `widget.componentName`\n resolves against customComponents\n\n Saves via `axios.put(saveEndpoint, formData)` with the consumer's\n settings controller URL. Widget events bubble up through\n `@widget-event` so consumers wire one page-level handler that\n dispatches by `widgetType` + event `name` (the manifest can't carry\n inline JS).\n\n Supports the same `headerComponent` / `actionsComponent` / generic\n `slots` overrides that the other built-in page types do — the\n CnPageRenderer wires them via the `#header`, `#actions`, and named\n `slots[]` slots exposed here.\n-->\n<template>\n\t<div class=\"cn-settings-page\" data-testid=\"cn-settings-page\">\n\t\t<!-- Header — overridable via #header slot. CnPageHeader renders whenever\n\t\t there is a title: `visuallyHidden` keeps the <h1> in the\n\t\t accessibility tree (and out of the visual layout) when showTitle is\n\t\t false, so <main> is never left with no heading at all\n\t\t (WCAG 2.4.6 / 1.3.1). -->\n\t\t<slot\n\t\t\tname=\"header\"\n\t\t\t:title=\"title\"\n\t\t\t:description=\"description\"\n\t\t\t:icon=\"icon\">\n\t\t\t<CnPageHeader\n\t\t\t\tv-if=\"title\"\n\t\t\t\t:title=\"title\"\n\t\t\t\t:description=\"resolvedDescription\"\n\t\t\t\t:icon=\"icon\"\n\t\t\t\t:breadcrumb=\"breadcrumb\"\n\t\t\t\t:meta=\"headerMeta\"\n\t\t\t\t:visuallyHidden=\"!showTitle\">\n\t\t\t\t<!-- Board look: the buildiq square, then the page Save as the\n\t\t\t\t last header button. -->\n\t\t\t\t<template v-if=\"headerButtonsInHeader\" #extra>\n\t\t\t\t\t<div class=\"cn-settings-page__header-buttons\" data-testid=\"cn-settings-page-header-buttons\">\n\t\t\t\t\t\t<CnBuildiqEditButton v-if=\"isBoard\" />\n\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\tv-if=\"pageSave\"\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\t\t\t\tdata-testid=\"cn-settings-page-save\"\n\t\t\t\t\t\t\t@click=\"save\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ saveLabel }}\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</CnPageHeader>\n\t\t</slot>\n\n\t\t<!-- The same buttons when the header itself is hidden or replaced. -->\n\t\t<div\n\t\t\tv-if=\"headerButtonsOutside\"\n\t\t\tclass=\"cn-settings-page__header-buttons\"\n\t\t\tdata-testid=\"cn-settings-page-header-buttons\">\n\t\t\t<CnBuildiqEditButton v-if=\"isBoard\" />\n\t\t\t<NcButton\n\t\t\t\tv-if=\"pageSave\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\tdata-testid=\"cn-settings-page-save\"\n\t\t\t\t@click=\"save\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ saveLabel }}\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<!-- The Changes card of a page that saves in its header. -->\n\t\t<div\n\t\t\tv-if=\"pageSave && changedFields.length > 0\"\n\t\t\tclass=\"cn-settings-page__changes\"\n\t\t\tdata-testid=\"cn-settings-page-changes\">\n\t\t\t<h2 class=\"cn-settings-page__changes-title\">\n\t\t\t\t{{ changesLabel }}\n\t\t\t</h2>\n\t\t\t<ul>\n\t\t\t\t<li v-for=\"field in changedFields\" :key=\"field.key\">\n\t\t\t\t\t{{ field.label }}\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\n\t\t<!-- Actions slot for save / discard / reset overrides -->\n\t\t<div v-if=\"$slots.actions || $slots.actions\" class=\"cn-settings-page__actions\">\n\t\t\t<slot name=\"actions\" />\n\t\t</div>\n\n\t\t<!-- Tab strip — only rendered when `tabs[]` is set\n\t\t\t (manifest-settings-orchestration REQ-MSO-5). Built with\n\t\t\t native <button role=\"tab\"> + ARIA wiring; uses Nextcloud\n\t\t\t CSS variables only (no hex literals). -->\n\t\t<div\n\t\t\tv-if=\"hasTabs\"\n\t\t\tclass=\"cn-settings-page__tabs\"\n\t\t\trole=\"tablist\"\n\t\t\tdata-testid=\"cn-settings-page-tabs\">\n\t\t\t<button\n\t\t\t\tv-for=\"(tab, tabIndex) in tabs\"\n\t\t\t\t:key=\"`tab-${tab.id}`\"\n\t\t\t\trole=\"tab\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-settings-page__tab\"\n\t\t\t\t:class=\"{ 'cn-settings-page__tab--active': activeTabId === tab.id }\"\n\t\t\t\t:aria-selected=\"activeTabId === tab.id ? 'true' : 'false'\"\n\t\t\t\t:aria-controls=\"`cn-settings-tab-panel-${tab.id}`\"\n\t\t\t\t:data-testid=\"`cn-settings-page-tab-${tab.id}`\"\n\t\t\t\t@click=\"onTabClick(tab, tabIndex)\">\n\t\t\t\t{{ resolveLabel(tab.label) }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<!-- Sections — rendered for the active tab when `tabs[]` is\n\t\t\t set, otherwise the flat `sections[]` (back-compat). The wrapper\n\t\t\t draws no box of its own (`display: contents`); the board look\n\t\t\t turns it into the card grid. -->\n\t\t<div class=\"cn-settings-page__sections\">\n\t\t\t<CnSettingsCard\n\t\t\t\tv-for=\"(section, sectionIndex) in activeSections\"\n\t\t\t\t:key=\"`section-${activeTabId || 'flat'}-${sectionIndex}`\"\n\t\t\t\t:title=\"resolveLabel(section.title)\"\n\t\t\t\t:icon=\"section.icon || ''\"\n\t\t\t\t:collapsible=\"section.collapsible || false\">\n\t\t\t\t<!--\n\t\t\t\t\tBody resolution — see `sectionBodyKind(section)` in the\n\t\t\t\t\tscript: returns 'fields' (default + back-compat),\n\t\t\t\t\t'component', or 'widgets'.\n\t\t\t\t-->\n\n\t\t\t\t<!-- Body: bare fields[] (back-compat). Wrapped in a\n\t\t\t\t\t CnSettingsSection mirroring the pre-rich-sections layout. -->\n\t\t\t\t<CnSettingsSection\n\t\t\t\t\tv-if=\"sectionBodyKind(section) === 'fields'\"\n\t\t\t\t\t:name=\"resolveLabel(section.title)\"\n\t\t\t\t\t:description=\"resolveLabel(section.description)\"\n\t\t\t\t\t:docUrl=\"section.docUrl || ''\"\n\t\t\t\t\t:wide=\"Boolean(section.wide)\">\n\t\t\t\t\t<div class=\"cn-settings-page__fields\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tv-for=\"field in section.fields\"\n\t\t\t\t\t\t\t:key=\"field.key\"\n\t\t\t\t\t\t\tclass=\"cn-settings-page__field\">\n\t\t\t\t\t\t\t<!-- Per-field slot — `field-<key>` lets a consumer override the input entirely. -->\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:name=\"`field-${field.key}`\"\n\t\t\t\t\t\t\t\t:field=\"field\"\n\t\t\t\t\t\t\t\t:value=\"formData[field.key]\"\n\t\t\t\t\t\t\t\t:onInput=\"(v) => updateField(field.key, v)\">\n\t\t\t\t\t\t\t\t<CnSettingsField\n\t\t\t\t\t\t\t\t\t:field=\"{ ...field, label: resolveLabel(field.label) }\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"formData[field.key]\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event)\" />\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t<small\n\t\t\t\t\t\t\t\tv-if=\"field.help\"\n\t\t\t\t\t\t\t\tclass=\"cn-settings-page__field-help\">\n\t\t\t\t\t\t\t\t{{ resolveLabel(field.help) }}\n\t\t\t\t\t\t\t</small>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<template v-if=\"sectionSave\" #footer>\n\t\t\t\t\t\t<div class=\"cn-settings-section__save\" data-testid=\"cn-settings-section-save\">\n\t\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\t\t\t\t\t@click=\"save\">\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t{{ saveLabel }}\n\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</template>\n\t\t\t\t</CnSettingsSection>\n\n\t\t\t\t<!-- Body: a single registry-resolved component. The\n\t\t\t\t\t component is responsible for its own chrome — we do\n\t\t\t\t\t NOT wrap it in CnSettingsSection because the existing\n\t\t\t\t\t widget shape (CnVersionInfoCard, CnRegisterMapping)\n\t\t\t\t\t already wraps itself. Custom components are expected\n\t\t\t\t\t to do the same OR opt in by adding their own section\n\t\t\t\t\t wrapper.\n\n\t\t\t\t\t Wrapped in CnSettingsWidgetMount so the child's $emit\n\t\t\t\t\t is intercepted and re-emitted as @widget-event on this\n\t\t\t\t\t page (manifests can't carry inline JS). -->\n\t\t\t\t<CnSettingsWidgetMount\n\t\t\t\t\tv-else-if=\"sectionBodyKind(section) === 'component' && resolveSectionComponent(section)\"\n\t\t\t\t\t:component=\"resolveSectionComponent(section)\"\n\t\t\t\t\t:componentProps=\"section.props || {}\"\n\t\t\t\t\t:widgetType=\"section.component\"\n\t\t\t\t\t:sectionIndex=\"sectionIndex\"\n\t\t\t\t\t:widgetIndex=\"0\"\n\t\t\t\t\t@widgetEvent=\"onWidgetEvent\" />\n\n\t\t\t\t<!-- Body: ordered list of widgets. Each widget is its own\n\t\t\t\t\t mounted component with v-bind props + bubbled events\n\t\t\t\t\t via CnSettingsWidgetMount. Built-ins (version-info,\n\t\t\t\t\t register-mapping) wrap themselves in CnSettingsSection;\n\t\t\t\t\t custom widgets are expected to do the same. -->\n\t\t\t\t<template v-else-if=\"sectionBodyKind(section) === 'widgets'\">\n\t\t\t\t\t<CnSettingsWidgetMount\n\t\t\t\t\t\tv-for=\"entry in resolvedWidgetEntries(section, sectionIndex)\"\n\t\t\t\t\t\t:key=\"entry.key\"\n\t\t\t\t\t\t:component=\"entry.component\"\n\t\t\t\t\t\t:componentProps=\"entry.props\"\n\t\t\t\t\t\t:widgetType=\"entry.widgetType\"\n\t\t\t\t\t\t:sectionIndex=\"sectionIndex\"\n\t\t\t\t\t\t:widgetIndex=\"entry.widgetIndex\"\n\t\t\t\t\t\t@widgetEvent=\"onWidgetEvent\" />\n\t\t\t\t</template>\n\t\t\t</CnSettingsCard>\n\t\t</div>\n\n\t\t<!-- Save bar -->\n\t\t<div v-if=\"showSaveBar && !saveMode && !autosave\" class=\"cn-settings-page__save-bar\">\n\t\t\t<NcButton\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\t@click=\"save\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ saveLabel }}\n\t\t\t</NcButton>\n\t\t\t<NcButton\n\t\t\t\tv-if=\"dirty\"\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t:disabled=\"saving\"\n\t\t\t\t@click=\"reset\">\n\t\t\t\t{{ resetLabel }}\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<!-- Error -->\n\t\t<div v-if=\"lastError\" class=\"cn-settings-page__error\">\n\t\t\t{{ lastError }}\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { translate as t } from '@nextcloud/l10n'\nimport {\n\tNcButton,\n\tNcLoadingIcon,\n} from '@nextcloud/vue'\nimport ContentSave from 'vue-material-design-icons/ContentSave.vue'\nimport CnBuildiqEditButton from '../CnBuildiqEditButton/CnBuildiqEditButton.vue'\nimport CnRegisterMapping from '../CnRegisterMapping/CnRegisterMapping.vue'\nimport CnSettingsField from '../CnSettingsField/CnSettingsField.vue'\nimport CnToggleTableWidget from '../CnToggleTableWidget/CnToggleTableWidget.vue'\nimport CnVersionInfoCard from '../CnVersionInfoCard/CnVersionInfoCard.vue'\nimport { useLook } from '../../composables/useLook.js'\nimport { prefixUrl } from '../../utils/headers.js'\nimport { CnPageHeader } from '../CnPageHeader/index.js'\nimport { CnSettingsCard } from '../CnSettingsCard/index.js'\nimport { CnSettingsSection } from '../CnSettingsSection/index.js'\nimport CnSettingsWidgetMount from './CnSettingsWidgetMount.js'\n\n/**\n * Sentinel value used in the built-in widget registry to mark the\n * `'component'` discriminator (manifest-settings-orchestration\n * REQ-MSO-6). The discriminator does NOT resolve to a fixed\n * component — instead, the resolver detects this sentinel and looks\n * up `widget.componentName` in the customComponents registry.\n */\nconst COMPONENT_DISCRIMINATOR = Symbol('cn-settings-component-widget')\n\n/**\n * Built-in widget registry. Used by `CnSettingsPage` to resolve\n * `widgets[].type` to a component BEFORE consulting the\n * consumer-provided customComponents registry.\n *\n * The order matters — built-ins win on collision so consumers can't\n * accidentally shadow `version-info` with their own component. If a\n * consumer needs to truly replace one of these, they can render their\n * own component via `section.component` or\n * `{ type: \"component\", componentName: <name> }` instead of `widgets[]`.\n *\n * Spec:\n * - REQ-MSRS-2 (manifest-settings-rich-sections) — fixed-component\n * built-ins (`version-info`, `register-mapping`).\n * - REQ-MSO-6 (manifest-settings-orchestration) — `'component'`\n * discriminator (sentinel value, resolved via componentName).\n */\nconst BUILTIN_SETTINGS_WIDGETS = Object.freeze({\n\t'version-info': CnVersionInfoCard,\n\t'register-mapping': CnRegisterMapping,\n\t// Rows with a switch: objects (`bind.mode: 'each'`) or a config map (`'map'`).\n\t'toggle-table': CnToggleTableWidget,\n\tcomponent: COMPONENT_DISCRIMINATOR,\n})\n\n/**\n * CnSettingsPage — Manifest-driven settings page.\n *\n * Reads `sections[]` from `pages[].config` and renders one\n * `CnSettingsCard` per section. Each section declares EXACTLY ONE of\n * three body kinds:\n *\n * - `fields[]` — flat form fields (back-compat default).\n * Each field's `type` controls which input CnSettingsField renders:\n * - `boolean` → NcCheckboxRadioSwitch\n * - `number` → NcTextField (type=number)\n * - `string` → NcTextField (default)\n * - `password` → NcTextField (type=password)\n * - `enum` → NcSelect (requires `options: string[]`)\n * Per-field `#field-<key>` slots are exposed so consumers can drop\n * in their own widget.\n *\n * - `component` — registry-resolved component as the section body.\n * `section.props` is v-bind'd to it. Useful when a whole section\n * is one bespoke widget the library doesn't know about.\n *\n * - `widgets[]` — ordered list of widgets. Each entry has a `type`\n * string and optional `props`. Built-in widget types resolve\n * first (`version-info` → `CnVersionInfoCard`, `register-mapping`\n * → `CnRegisterMapping`, `toggle-table` → `CnToggleTableWidget`);\n * unknown types fall back to the\n * `customComponents` registry.\n *\n * Widget events (e.g. CnRegisterMapping's `@save`, CnVersionInfoCard's\n * `@update`) bubble up as a single `@widget-event` event on the page,\n * with payload `{ widgetType, widgetIndex, sectionIndex, name, args }`.\n * Consumers wire one handler at the CnAppRoot level and dispatch by\n * `widgetType` / `name` — the manifest can't carry inline JS, so this\n * is the documented event-wiring escape hatch.\n *\n * Saves via `axios.put(saveEndpoint, formData)`. The `saveEndpoint`\n * default is `/index.php/apps/{appId}/api/settings` — consumers should\n * pass a fully-qualified URL via the manifest (or `saveEndpoint` prop)\n * because the library has no knowledge of the consumer's app id at\n * import time.\n *\n * Slots:\n * - `#header` — Replaces the CnPageHeader.\n * - `#actions` — Right-aligned actions area (the renderer fills this\n * via `pages[].actionsComponent`).\n * - `#field-<key>` — Replaces the input for a specific field within\n * a `fields[]` section. Scope: `{ field, value, onInput }`.\n *\n * Events:\n * - `@save` — Emitted on successful save. Payload: the form data.\n * - `@error` — Emitted when save fails. Payload: the error.\n * - `@input` — Emitted on every field change. Payload: `{ key, value }`.\n * - `@widget-event` — Emitted when a widget mounted via `widgets[]`\n * or `component` re-emits one of its own events. Payload:\n * `{ widgetType, widgetIndex, sectionIndex, name, args }`.\n */\nexport default {\n\tname: 'CnSettingsPage',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcLoadingIcon,\n\t\tContentSave,\n\t\tCnSettingsField,\n\t\tCnBuildiqEditButton,\n\t\tCnSettingsCard,\n\t\tCnSettingsSection,\n\t\tCnPageHeader,\n\t\tCnSettingsWidgetMount,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * Custom-component registry injected from CnAppRoot. Used to\n\t\t * resolve `section.component` and to fall back when a\n\t\t * `widgets[].type` isn't in the built-in widget map. Defaults\n\t\t * to an empty object when the page is mounted standalone.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tcnCustomComponents: { default: () => ({}) },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The look the page is drawn in: `board` or `nextcloud`. Empty follows\n\t\t * the `cnLook` that CnAppRoot (or the page's `config.look`) provides.\n\t\t *\n\t\t * @spec openspec/changes/screens-chrome-parity/specs/app-look/spec.md#requirement-an-app-can-take-the-board-look\n\t\t */\n\t\tlook: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Where the page saves (`config.saveMode`): `section` ends each section\n\t\t * that has fields in its own Save button, `page` draws one Save as the\n\t\t * last header button and a Changes card, and empty keeps the save bar\n\t\t * under the last section. Never both a section and a page save.\n\t\t *\n\t\t * @spec openspec/changes/screens-chrome-parity/specs/settings-board-look/spec.md#requirement-a-settings-page-saves-in-one-declared-place\n\t\t * @type {'section'|'page'|''}\n\t\t */\n\t\tsaveMode: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t\tvalidator: (value) => ['', 'section', 'page'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * The page saves on change (`config.autosave`): no save button at all,\n\t\t * and the description ends with \"Changes are saved automatically.\"\n\t\t *\n\t\t * @spec openspec/changes/screens-chrome-parity/specs/settings-board-look/spec.md#requirement-a-settings-page-saves-in-one-declared-place\n\t\t */\n\t\tautosave: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Page title. */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Settings'),\n\t\t},\n\n\t\t/**\n\t\t * A breadcrumb under the title (manifest `config.breadcrumb`): one\n\t\t * crumb `{ label, route?, params?, href?, icon?, separator? }` or a\n\t\t * list; the title follows as the current crumb. Drawn as the detail\n\t\t * header's breadcrumb row. Null (the default) draws none.\n\t\t *\n\t\t * @type {object|Array<object>|null}\n\t\t * @spec openspec/changes/page-header-breadcrumb/specs/page-header/spec.md#requirement-a-list-dashboard-or-settings-page-can-show-a-breadcrumb-and-a-meta-note\n\t\t */\n\t\tbreadcrumb: {\n\t\t\ttype: [Object, Array],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * A note after the breadcrumb and a middle dot (manifest `config.headerMeta`).\n\t\t *\n\t\t * @spec openspec/changes/page-header-breadcrumb/specs/page-header/spec.md#requirement-a-list-dashboard-or-settings-page-can-show-a-breadcrumb-and-a-meta-note\n\t\t */\n\t\theaderMeta: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Description shown under the title when `showTitle` is set. */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether to render the inline page header VISIBLY. When false the\n\t\t * `<h1>` is still rendered visually-hidden, so the `<main>` landmark\n\t\t * always has an accessible heading (WCAG 2.4.6 / 1.3.1).\n\t\t */\n\t\tshowTitle: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** MDI icon name for the header. */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Section definitions (flat shape — back-compat). Each section\n\t\t * MUST declare EXACTLY ONE of:\n\t\t * - `fields: Array<Field>` (back-compat flat-field body)\n\t\t * - `component: <registry-name>` + optional `props`\n\t\t * - `widgets: Array<{ type, props?, componentName? }>`\n\t\t *\n\t\t * Common keys: `{ title, description?, icon?, collapsible?, docUrl? }`.\n\t\t *\n\t\t * Mutually exclusive with `tabs[]` (XOR — see\n\t\t * manifest-settings-orchestration REQ-MSO-1).\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tsections: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Tab definitions (orchestration shape — manifest-settings-\n\t\t * orchestration REQ-MSO-2). When set, CnSettingsPage renders\n\t\t * a tab strip above the section area; the active tab's\n\t\t * `sections[]` flow into the same renderer used by the flat\n\t\t * shape. Mutually exclusive with `sections[]`.\n\t\t *\n\t\t * Each tab MUST be `{ id: string, label: string,\n\t\t * icon?: string, sections: array<Section> }`.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\ttabs: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Optional ID of the tab to activate on mount. When empty AND\n\t\t * `tabs[]` is non-empty, the first tab is active by default.\n\t\t * Unknown IDs fall back to the first tab.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tinitialTab: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Initial values keyed by `field.key`. Defaults to an empty\n\t\t * object; in practice the consumer passes the current\n\t\t * IAppConfig snapshot loaded from their settings controller.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tinitialValues: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Endpoint that receives the PUT on save. Pass a fully-qualified\n\t\t * URL — the library has no knowledge of the consumer's app id.\n\t\t * When empty, no PUT is issued and `@save` is emitted with the\n\t\t * form data so the consumer can persist it themselves.\n\t\t */\n\t\tsaveEndpoint: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Whether to render the built-in save/reset bar. */\n\t\tshowSaveBar: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Label for the save button. */\n\t\tsaveLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Save'),\n\t\t},\n\n\t\t/** Label for the reset (discard) button. */\n\t\tresetLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Discard changes'),\n\t\t},\n\n\t\t/**\n\t\t * Optional translation function. When provided, applied to\n\t\t * section titles, field labels, and other i18n-key strings\n\t\t * declared in the manifest. Defaults to the identity function.\n\t\t *\n\t\t * @type {((key: string) => string)|null}\n\t\t */\n\t\ttranslate: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Optional explicit custom-component registry. When set, takes\n\t\t * precedence over the injected `cnCustomComponents`. Use this\n\t\t * when mounting CnSettingsPage outside a CnAppRoot tree (or\n\t\t * when test-mounting with a stub registry).\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tcustomComponents: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['save', 'error', 'input', 'widget-event', 'tab-change'],\n\n\tsetup(props) {\n\t\tconst { isBoard } = useLook(props)\n\t\treturn { isBoard }\n\t},\n\n\tdata() {\n\t\t// Resolve the initial active-tab id synchronously so the very\n\t\t// first render has the correct tab active (otherwise tests\n\t\t// that mount + assert without an `await tick` see the empty\n\t\t// default). Mirrors the logic in `resolveInitialTabId` (the\n\t\t// watcher path); keep them aligned.\n\t\tlet activeTabId = ''\n\t\tconst tabs = Array.isArray(this.tabs) ? this.tabs : []\n\t\tif (tabs.length > 0) {\n\t\t\tif (typeof this.initialTab === 'string' && this.initialTab.length > 0\n\t\t\t\t&& tabs.some((t) => t && t.id === this.initialTab)) {\n\t\t\t\tactiveTabId = this.initialTab\n\t\t\t} else if (tabs[0] && typeof tabs[0].id === 'string') {\n\t\t\t\tactiveTabId = tabs[0].id\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tformData: this.cloneInitial(),\n\t\t\toriginalData: this.cloneInitial(),\n\t\t\tsaving: false,\n\t\t\tlastError: null,\n\t\t\tactiveTabId,\n\t\t\tautosaveTimer: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {boolean} The page saves from its header (`saveMode: \"page\"`, not autosave). */\n\t\tpageSave() {\n\t\t\treturn this.saveMode === 'page' && !this.autosave\n\t\t},\n\n\t\t/** @return {boolean} Each section with fields saves on its own (`saveMode: \"section\"`). */\n\t\tsectionSave() {\n\t\t\treturn this.saveMode === 'section' && !this.autosave\n\t\t},\n\n\t\t/**\n\t\t * The description, with the autosave note appended when the page saves\n\t\t * on change.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedDescription() {\n\t\t\tif (!this.autosave) {\n\t\t\t\treturn this.description\n\t\t\t}\n\t\t\tconst note = t('nextcloud-vue', 'Changes are saved automatically.')\n\t\t\treturn this.description ? `${this.description} ${note}` : note\n\t\t},\n\n\t\t/** @return {boolean} The header buttons render inside the visible page header. */\n\t\theaderButtonsInHeader() {\n\t\t\treturn Boolean(this.title && this.showTitle && !this.$slots.header && (this.isBoard || this.pageSave))\n\t\t},\n\n\t\t/** @return {boolean} The header buttons need a row of their own (header hidden or replaced). */\n\t\theaderButtonsOutside() {\n\t\t\treturn Boolean((this.isBoard || this.pageSave) && !this.headerButtonsInHeader)\n\t\t},\n\n\t\t/** @return {string} Title of the Changes card. */\n\t\tchangesLabel() {\n\t\t\treturn t('nextcloud-vue', 'Changes')\n\t\t},\n\n\t\t/**\n\t\t * The fields that differ from their saved value, across every section,\n\t\t * labelled for the Changes card.\n\t\t *\n\t\t * @return {Array<{key: string, label: string}>}\n\t\t */\n\t\tchangedFields() {\n\t\t\tconst labels = {}\n\t\t\tconst sections = [...(this.sections || [])]\n\t\t\tfor (const tab of this.tabs || []) {\n\t\t\t\tif (tab && Array.isArray(tab.sections)) {\n\t\t\t\t\tsections.push(...tab.sections)\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const section of sections) {\n\t\t\t\tfor (const field of (section && section.fields) || []) {\n\t\t\t\t\tlabels[field.key] = this.resolveLabel(field.label) || field.key\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst keys = new Set([...Object.keys(this.formData), ...Object.keys(this.originalData)])\n\t\t\treturn [...keys]\n\t\t\t\t.filter((key) => JSON.stringify(this.formData[key]) !== JSON.stringify(this.originalData[key]))\n\t\t\t\t.map((key) => ({ key, label: labels[key] || key }))\n\t\t},\n\n\t\t/** Whether any field has changed since load. */\n\t\tdirty() {\n\t\t\treturn JSON.stringify(this.formData) !== JSON.stringify(this.originalData)\n\t\t},\n\n\t\t/**\n\t\t * Effective custom-component registry. Explicit prop wins over\n\t\t * the injected value (mirrors CnPageRenderer's resolution\n\t\t * order).\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\teffectiveCustomComponents() {\n\t\t\treturn this.customComponents ?? this.cnCustomComponents ?? {}\n\t\t},\n\n\t\t/**\n\t\t * Whether the page is in tabs orchestration mode. True when\n\t\t * `tabs[]` is non-empty — drives the tab-strip render gate\n\t\t * (manifest-settings-orchestration REQ-MSO-5).\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasTabs() {\n\t\t\treturn Array.isArray(this.tabs) && this.tabs.length > 0\n\t\t},\n\n\t\t/**\n\t\t * The sections to render right now. In flat mode, this is the\n\t\t * `sections` prop directly. In tabs mode, this is the\n\t\t * `sections[]` array of the currently active tab. Centralising\n\t\t * this in one computed keeps the template's `v-for` simple\n\t\t * and decouples it from the body kind dispatcher (which\n\t\t * applies per-section, not per-mode).\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tactiveSections() {\n\t\t\tif (!this.hasTabs) {\n\t\t\t\treturn this.sections || []\n\t\t\t}\n\t\t\tconst active = this.tabs.find((t) => t && t.id === this.activeTabId)\n\t\t\tif (active && Array.isArray(active.sections)) {\n\t\t\t\treturn active.sections\n\t\t\t}\n\t\t\t// Defensive fallback — should not happen because\n\t\t\t// `resolveInitialTabId` always lands on a known tab.\n\t\t\tconst first = this.tabs[0]\n\t\t\treturn first && Array.isArray(first.sections) ? first.sections : []\n\t\t},\n\t},\n\n\twatch: {\n\t\tinitialValues: {\n\t\t\tdeep: true,\n\t\t\thandler() {\n\t\t\t\tthis.formData = this.cloneInitial()\n\t\t\t\tthis.originalData = this.cloneInitial()\n\t\t\t},\n\t\t},\n\n\t\t// When `tabs[]` changes (e.g. consumer swaps manifests at\n\t\t// runtime), re-resolve the active tab so the page doesn't get\n\t\t// stuck on a removed id.\n\t\ttabs: {\n\t\t\thandler() {\n\t\t\t\tthis.activeTabId = this.resolveInitialTabId()\n\t\t\t},\n\t\t},\n\n\t\t// When `initialTab` changes (consumer-controlled tab\n\t\t// activation), follow it.\n\t\tinitialTab(next) {\n\t\t\tif (typeof next === 'string' && next.length > 0) {\n\t\t\t\tconst exists = this.tabs.some((t) => t && t.id === next)\n\t\t\t\tif (exists) {\n\t\t\t\t\tthis.activeTabId = next\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n\n\tbeforeUnmount() {\n\t\tclearTimeout(this.autosaveTimer)\n\t},\n\n\tmethods: {\n\t\tcloneInitial() {\n\t\t\tconst merged = { ...(this.initialValues || {}) }\n\t\t\t// Collect every section across both modes (flat\n\t\t\t// `sections[]` AND `tabs[].sections[]`) so default values\n\t\t\t// are applied regardless of orchestration shape.\n\t\t\t// Only flat-field sections contribute defaults; component\n\t\t\t// and widgets sections own their own state.\n\t\t\tconst allSections = []\n\t\t\tfor (const section of this.sections || []) {\n\t\t\t\tallSections.push(section)\n\t\t\t}\n\t\t\tfor (const tab of this.tabs || []) {\n\t\t\t\tif (tab && Array.isArray(tab.sections)) {\n\t\t\t\t\tfor (const section of tab.sections) {\n\t\t\t\t\t\tallSections.push(section)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const section of allSections) {\n\t\t\t\tif (!section || !Array.isArray(section.fields)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tfor (const field of section.fields) {\n\t\t\t\t\tif (field.default !== undefined && merged[field.key] === undefined) {\n\t\t\t\t\t\tmerged[field.key] = field.default\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn merged\n\t\t},\n\n\t\tresolveLabel(value) {\n\t\t\tif (!value) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (this.translate) {\n\t\t\t\treturn this.translate(value)\n\t\t\t}\n\t\t\treturn value\n\t\t},\n\n\t\tupdateField(key, value) {\n\t\t\tthis.formData[key] = value\n\t\t\tthis.$emit('input', { key, value })\n\t\t\tif (this.autosave) {\n\t\t\t\tthis.queueAutosave()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Determine which body kind a section declares. Returns\n\t\t * `'fields'` (default + back-compat), `'component'`, or\n\t\t * `'widgets'`. The validator (`validateManifest`) enforces\n\t\t * exactly-one at parse time; this method is the runtime\n\t\t * equivalent and is permissive when one of the keys is set\n\t\t * (last-defined wins in the rare case of an unvalidated\n\t\t * manifest).\n\t\t *\n\t\t * @param {object} section A section entry from `sections[]`.\n\t\t * @return {'fields' | 'component' | 'widgets'}\n\t\t */\n\t\tsectionBodyKind(section) {\n\t\t\tif (Array.isArray(section.widgets) && section.widgets.length > 0) {\n\t\t\t\treturn 'widgets'\n\t\t\t}\n\t\t\tif (typeof section.component === 'string' && section.component.length > 0) {\n\t\t\t\treturn 'component'\n\t\t\t}\n\t\t\treturn 'fields'\n\t\t},\n\n\t\t/**\n\t\t * Resolve a `section.component` registry name to a Vue\n\t\t * component via `effectiveCustomComponents`. Returns `null`\n\t\t * (and warns) when the registry has no entry.\n\t\t *\n\t\t * @param {object} section A section entry.\n\t\t * @return {object|null} Vue component or null.\n\t\t */\n\t\tresolveSectionComponent(section) {\n\t\t\tconst name = section.component\n\t\t\tif (!name) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst resolved = this.effectiveCustomComponents[name]\n\t\t\tif (!resolved) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn(`[CnSettingsPage] Section component \"${name}\" not found in customComponents registry. Section body will be empty.`)\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn resolved\n\t\t},\n\n\t\t/**\n\t\t * Resolve a single `widgets[]` entry to a concrete Vue\n\t\t * component. Lookup order:\n\t\t *\n\t\t * 1. Built-in widget map (`version-info`, `register-mapping`).\n\t\t * 2. `'component'` discriminator (REQ-MSO-6) — resolves\n\t\t * `widget.componentName` against `effectiveCustomComponents`.\n\t\t * 3. Legacy fallback — looks up `widget.type` against\n\t\t * `effectiveCustomComponents`. Kept for back-compat with\n\t\t * manifest-settings-rich-sections consumers; flagged as\n\t\t * deprecated in JSDoc — manifest authors should migrate to\n\t\t * the explicit `{ type: \"component\", componentName }` shape.\n\t\t *\n\t\t * Returns `null` (and warns) when nothing resolves. Built-ins\n\t\t * win on collision so consumers can't accidentally shadow them.\n\t\t *\n\t\t * @param {object} widget A `widgets[]` entry, e.g. `{ type, props?, componentName? }`.\n\t\t * @return {object|null} Vue component or null.\n\t\t */\n\t\tresolveWidgetComponent(widget) {\n\t\t\tconst type = widget && typeof widget.type === 'string' ? widget.type : ''\n\t\t\tif (!type) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (Object.hasOwn(BUILTIN_SETTINGS_WIDGETS, type)) {\n\t\t\t\tconst builtin = BUILTIN_SETTINGS_WIDGETS[type]\n\t\t\t\tif (builtin === COMPONENT_DISCRIMINATOR) {\n\t\t\t\t\t// REQ-MSO-6: discriminator — look up `componentName`.\n\t\t\t\t\tconst name = widget.componentName\n\t\t\t\t\tif (typeof name !== 'string' || name.length === 0) {\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.warn('[CnSettingsPage] Widget {type:\"component\"} requires a non-empty `componentName`. Widget will be skipped.')\n\t\t\t\t\t\treturn null\n\t\t\t\t\t}\n\t\t\t\t\tconst resolved = this.effectiveCustomComponents[name]\n\t\t\t\t\tif (!resolved) {\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.warn(`[CnSettingsPage] Widget component \"${name}\" not found in customComponents registry. Widget will be skipped.`)\n\t\t\t\t\t\treturn null\n\t\t\t\t\t}\n\t\t\t\t\treturn resolved\n\t\t\t\t}\n\t\t\t\treturn builtin\n\t\t\t}\n\t\t\t// Legacy fallback (manifest-settings-rich-sections REQ-MSRS-2).\n\t\t\t// Deprecated — manifest authors should migrate to\n\t\t\t// `{ type: \"component\", componentName: <X> }`. Kept here so\n\t\t\t// existing consumers continue working unchanged.\n\t\t\tconst resolved = this.effectiveCustomComponents[type]\n\t\t\tif (!resolved) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn(`[CnSettingsPage] Widget type \"${type}\" not found in built-in widgets or customComponents registry. Widget will be skipped.`)\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn resolved\n\t\t},\n\n\t\t/**\n\t\t * Build the list of widget mount entries for a `widgets[]`\n\t\t * section. Filters out entries whose `widget.type` doesn't\n\t\t * resolve (built-in OR customComponents) — `resolveWidgetComponent`\n\t\t * has already logged a warn. The filter happens here so the\n\t\t * template can use a clean `v-for` without nested `v-if`.\n\t\t *\n\t\t * The `widgetType` carried on the bubbled `@widget-event`\n\t\t * payload is the widget's `componentName` (when the\n\t\t * discriminator is `'component'`) or `widget.type` otherwise —\n\t\t * giving consumers a stable identifier for the dispatch.\n\t\t *\n\t\t * @param {object} section A section entry with `widgets[]`.\n\t\t * @param {number} sectionIndex Index in `sections[]`.\n\t\t * @return {Array<{key: string, component: object, props: object, widgetType: string, widgetIndex: number}>}\n\t\t */\n\t\tresolvedWidgetEntries(section, sectionIndex) {\n\t\t\tconst entries = []\n\t\t\tconst widgets = Array.isArray(section.widgets) ? section.widgets : []\n\t\t\tfor (let widgetIndex = 0; widgetIndex < widgets.length; widgetIndex++) {\n\t\t\t\tconst widget = widgets[widgetIndex] || {}\n\t\t\t\tconst component = this.resolveWidgetComponent(widget)\n\t\t\t\tif (!component) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst widgetType = widget.type === 'component' && typeof widget.componentName === 'string'\n\t\t\t\t\t? widget.componentName\n\t\t\t\t\t: widget.type\n\t\t\t\tentries.push({\n\t\t\t\t\tkey: `widget-${sectionIndex}-${widgetIndex}`,\n\t\t\t\t\tcomponent,\n\t\t\t\t\tprops: widget.props || {},\n\t\t\t\t\twidgetType,\n\t\t\t\t\twidgetIndex,\n\t\t\t\t})\n\t\t\t}\n\t\t\treturn entries\n\t\t},\n\n\t\t/**\n\t\t * Resolve the active-tab id on mount / when `tabs[]` changes.\n\t\t * Lookup order: explicit `initialTab` prop → first tab in\n\t\t * `tabs[]` → empty string. Unknown `initialTab` values fall\n\t\t * back to the first tab so the page never gets stuck.\n\t\t * (manifest-settings-orchestration REQ-MSO-5.)\n\t\t *\n\t\t * @return {string} The resolved tab id (empty in flat mode).\n\t\t */\n\t\tresolveInitialTabId() {\n\t\t\tif (!this.hasTabs) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (typeof this.initialTab === 'string' && this.initialTab.length > 0) {\n\t\t\t\tconst exists = this.tabs.some((t) => t && t.id === this.initialTab)\n\t\t\t\tif (exists) {\n\t\t\t\t\treturn this.initialTab\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst first = this.tabs[0]\n\t\t\treturn first && typeof first.id === 'string' ? first.id : ''\n\t\t},\n\n\t\t/**\n\t\t * Handle a tab button click. Switches the active tab and\n\t\t * emits `@tab-change` so consumers can react (e.g. persist the\n\t\t * active tab in their preference store, update the URL hash).\n\t\t * (manifest-settings-orchestration REQ-MSO-5.)\n\t\t *\n\t\t * @param {object} tab The clicked tab definition.\n\t\t * @param {number} tabIndex The tab's index in `tabs[]`.\n\t\t */\n\t\tonTabClick(tab, tabIndex) {\n\t\t\tif (!tab || typeof tab.id !== 'string') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.activeTabId === tab.id) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.activeTabId = tab.id\n\t\t\tthis.$emit('tab-change', { tabId: tab.id, tabIndex })\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a widget's `widget-event` (caught by the local\n\t\t * CnSettingsWidgetMount helper) as a top-level `widget-event`\n\t\t * on this page. Consumers wire one `@widget-event` handler at\n\t\t * the CnAppRoot mount point and dispatch by `widgetType` /\n\t\t * `name`.\n\t\t *\n\t\t * @param {object} payload `{ widgetType, widgetIndex, sectionIndex, name, args }`\n\t\t */\n\t\tonWidgetEvent(payload) {\n\t\t\tthis.$emit('widget-event', payload)\n\t\t},\n\n\t\t/**\n\t\t * Save shortly after the last change (`autosave`): a burst of typing\n\t\t * is one request.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tqueueAutosave() {\n\t\t\tclearTimeout(this.autosaveTimer)\n\t\t\tthis.autosaveTimer = setTimeout(() => {\n\t\t\t\tthis.autosaveTimer = null\n\t\t\t\tif (this.dirty && !this.saving) {\n\t\t\t\t\tthis.save()\n\t\t\t\t}\n\t\t\t}, 600)\n\t\t},\n\n\t\treset() {\n\t\t\tthis.formData = this.cloneInitial()\n\t\t\tthis.lastError = null\n\t\t},\n\n\t\tasync save() {\n\t\t\tthis.saving = true\n\t\t\tthis.lastError = null\n\t\t\ttry {\n\t\t\t\tif (this.saveEndpoint) {\n\t\t\t\t\tawait axios.put(prefixUrl(this.saveEndpoint), this.formData)\n\t\t\t\t}\n\t\t\t\tthis.originalData = JSON.parse(JSON.stringify(this.formData))\n\t\t\t\tthis.$emit('save', this.formData)\n\t\t\t} catch (err) {\n\t\t\t\tthis.lastError = err?.response?.data?.message || err?.message || t('nextcloud-vue', 'Save failed')\n\t\t\t\tthis.$emit('error', err)\n\t\t\t} finally {\n\t\t\t\tthis.saving = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* The section wrapper draws no box; the board look makes it the card grid. */\n.cn-settings-page__sections {\n\tdisplay: contents;\n}\n\n.cn-settings-page__header-buttons {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tmargin-inline-start: auto;\n}\n\n.cn-settings-page {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n}\n\n.cn-settings-page__actions {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tgap: 8px;\n}\n\n/*\n * Tab strip for the orchestration shape (manifest-settings-\n * orchestration REQ-MSO-5). Uses Nextcloud CSS variables only — no\n * hex literals, no rgba overrides on the elements themselves.\n */\n.cn-settings-page__tabs {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 4px;\n\tborder-bottom: 1px solid var(--color-border);\n\tpadding-bottom: 0;\n\tmargin-bottom: 8px;\n}\n\n.cn-settings-page__tab {\n\tbackground: transparent;\n\tborder: 0;\n\tborder-bottom: 3px solid transparent;\n\tpadding: 8px 16px;\n\tmargin: 0;\n\tcursor: pointer;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: normal;\n\tborder-radius: var(--border-radius-large) var(--border-radius-large) 0 0;\n\ttransition: background-color 0.1s ease-in-out, color 0.1s ease-in-out, border-color 0.1s ease-in-out;\n}\n\n.cn-settings-page__tab:hover,\n.cn-settings-page__tab:focus-visible {\n\tbackground-color: var(--color-background-hover);\n\tcolor: var(--color-main-text);\n\toutline: none;\n}\n\n.cn-settings-page__tab--active {\n\tcolor: var(--color-primary-element);\n\tborder-bottom-color: var(--color-primary-element);\n\tfont-weight: bold;\n}\n\n@media (max-width: 768px) {\n\t.cn-settings-page__tabs {\n\t\tflex-direction: column;\n\t\tgap: 0;\n\t\tborder-bottom: 0;\n\t}\n\n\t.cn-settings-page__tab {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t}\n\n\t.cn-settings-page__tab--active {\n\t\tborder-bottom-width: 1px;\n\t\tbackground-color: var(--color-background-hover);\n\t}\n}\n\n.cn-settings-page__fields {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-settings-page__field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-settings-page__field-help {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-settings-page__save-bar {\n\tdisplay: flex;\n\tgap: 8px;\n\tmargin-top: 16px;\n}\n\n.cn-settings-page__error {\n\tcolor: var(--color-error);\n\tbackground: var(--color-error-light, var(--color-background-hover));\n\tpadding: 8px 12px;\n\tborder-radius: var(--border-radius);\n}\n</style>\n"],"names":["_renderSlot","_createBlock","_createElementVNode","_createTextVNode","_openBlock","_createElementBlock","_toDisplayString","_Fragment","_renderList","_createVNode"],"mappings":";;;OAiEW,EAAC,kBAAkB;AAAC,EAAA,aA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AAA,CAAA,OAAA,CAAA;gCADbF,WAOS,CAAA,gCAAA,EAAA;;oBALP,SAAS,EAAE,QAAE,CAAA,uBAAA,CAAA,OAAA,CAAA;oBACb,cAAc,EAAE,OAAO,CAAC,KAAK,IAAA,EAAA;oBAC7B,UAAU,EAAE,OAAO,CAAC,SAAQ;AAC5B,oBAAA,YAAQ,EAAA,YAAA;AACT,oBAAA,WAAY,EAAC,CAAA;AACZ,oBAAA,aAAO,EAAA,QAAA,CAAA,aAAA;;AAOA,kBAAA,CAAA,QAAA,CAAA,eAAA,CAAA,OAAA,CAAA,KAAA,SAAA;AACR,qBAAAG,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA;2CAAAJ;wBAEE,GAAG,EAAG,KAAE,CAAA,GAAA;wBACR,SAAS,EAAE,KAAM,CAAA,SAAS;wBAC1B,cAAU,EAAA,KAAA,CAAA,KAAA;wBACV,UAAA,EAAA,KAAA,CAAA,UAAA;AACD,wBAAA,YAAA,EAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import script from './CnUserSettingsDialog.vue2.js';
|
|
|
2
2
|
import { render } from './CnUserSettingsDialog.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-e537e50a";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { translate } from '@nextcloud/l10n';
|
|
2
|
+
import { generateUrl } from '@nextcloud/router';
|
|
2
3
|
import { NcButton } from '@nextcloud/vue';
|
|
3
|
-
import { markRaw } from 'vue';
|
|
4
|
+
import { ref, markRaw, cloneVNode } from 'vue';
|
|
4
5
|
import __sfc_main from '../CnDialog/CnDialog.vue.js';
|
|
6
|
+
import __sfc_main$1 from '../CnIcon/CnIcon.vue.js';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* The key NcAppSettingsSection injects to register itself with its dialog
|
|
@@ -9,20 +11,26 @@ import __sfc_main from '../CnDialog/CnDialog.vue.js';
|
|
|
9
11
|
*/
|
|
10
12
|
const REGISTRATION_KEY = Symbol.for('NcAppSettingsDialog:registration');
|
|
11
13
|
|
|
14
|
+
/** The key NcAppSettingsSection injects for the legacy design flag. */
|
|
15
|
+
const LEGACY_DESIGN_KEY = Symbol.for('NcAppSettingsDialog:legacy');
|
|
16
|
+
|
|
12
17
|
/** Renders a section's icon vnodes as they were registered. */
|
|
13
18
|
const CnVNodes = {
|
|
14
19
|
name: 'CnVNodes',
|
|
15
20
|
props: { vnodes: { type: [Array, Object], default: null } },
|
|
16
21
|
render() {
|
|
17
|
-
|
|
22
|
+
// A section's icon is drawn twice (navigation and heading), so each draw gets its own copy.
|
|
23
|
+
const list = Array.isArray(this.vnodes) ? this.vnodes : [this.vnodes];
|
|
24
|
+
return list.map((vnode) => (vnode && typeof vnode === 'object' ? cloneVNode(vnode) : vnode))
|
|
18
25
|
},
|
|
19
26
|
};
|
|
20
27
|
|
|
21
28
|
/**
|
|
22
29
|
* CnUserSettingsDialog - the user settings dialog in the board look (board
|
|
23
30
|
* PqPersoonlijk): eyebrow, title and subtitle, a left navigation listing the
|
|
24
|
-
* sections with their icons, the
|
|
25
|
-
* note that changes save straight away and
|
|
31
|
+
* sections with their icons, the current section (the others stay mounted
|
|
32
|
+
* but hidden), and a footer with a note that changes save straight away and
|
|
33
|
+
* a Close button.
|
|
26
34
|
*
|
|
27
35
|
* The sections stay the app's: any `NcAppSettingsSection` in the default slot
|
|
28
36
|
* registers itself with this dialog exactly as it does with
|
|
@@ -36,7 +44,7 @@ const CnVNodes = {
|
|
|
36
44
|
var script = {
|
|
37
45
|
name: 'CnUserSettingsDialog',
|
|
38
46
|
|
|
39
|
-
components: { CnDialog: __sfc_main, CnVNodes, NcButton },
|
|
47
|
+
components: { CnDialog: __sfc_main, CnIcon: __sfc_main$1, CnVNodes, NcButton },
|
|
40
48
|
|
|
41
49
|
provide() {
|
|
42
50
|
return {
|
|
@@ -44,6 +52,9 @@ var script = {
|
|
|
44
52
|
registerSection: this.registerSection,
|
|
45
53
|
unregisterSection: this.unregisterSection,
|
|
46
54
|
},
|
|
55
|
+
|
|
56
|
+
// NcAppSettingsSection also asks its dialog whether to use the legacy design.
|
|
57
|
+
[LEGACY_DESIGN_KEY]: ref(false),
|
|
47
58
|
}
|
|
48
59
|
},
|
|
49
60
|
|
|
@@ -56,8 +67,15 @@ var script = {
|
|
|
56
67
|
eyebrow: { type: String, default: () => translate('nextcloud-vue', 'Your account') },
|
|
57
68
|
/** Sentence under the title. */
|
|
58
69
|
subtitle: { type: String, default: () => translate('nextcloud-vue', 'Only for you. Colleagues keep their own settings.') },
|
|
59
|
-
/** The app's name, after the footer note. */
|
|
70
|
+
/** The app's name, after the footer note and as the navigation entry holding its sections. */
|
|
60
71
|
appName: { type: String, default: '' },
|
|
72
|
+
/**
|
|
73
|
+
* Nextcloud's own personal settings, listed first in the navigation as
|
|
74
|
+
* links: `[{ label, section? | href?, icon? }]`. `section` is a
|
|
75
|
+
* personal settings section id (`/settings/user/<section>`). With any,
|
|
76
|
+
* the app's sections sit under one entry named after the app.
|
|
77
|
+
*/
|
|
78
|
+
nextcloudLinks: { type: Array, default: () => [] },
|
|
61
79
|
},
|
|
62
80
|
|
|
63
81
|
emits: ['update:open'],
|
|
@@ -66,11 +84,30 @@ var script = {
|
|
|
66
84
|
return {
|
|
67
85
|
sections: [],
|
|
68
86
|
selected: '',
|
|
87
|
+
/** Ids of the sections whose heading is in the page, for the heading icons. */
|
|
88
|
+
headingTargets: [],
|
|
69
89
|
picked: false,
|
|
70
90
|
}
|
|
71
91
|
},
|
|
72
92
|
|
|
73
93
|
computed: {
|
|
94
|
+
/**
|
|
95
|
+
* The Nextcloud links with their URL.
|
|
96
|
+
*
|
|
97
|
+
* @spec openspec/changes/user-settings-nav-groups/specs/user-settings-board-dialog/spec.md#requirement-the-board-user-settings-navigation-can-list-nextclouds-own-sections-first
|
|
98
|
+
* @return {Array<{key: string, label: string, href: string, icon: string}>}
|
|
99
|
+
*/
|
|
100
|
+
ncLinks() {
|
|
101
|
+
return (Array.isArray(this.nextcloudLinks) ? this.nextcloudLinks : [])
|
|
102
|
+
.filter((link) => link && typeof link === 'object' && typeof link.label === 'string' && link.label !== '' && (link.href || link.section))
|
|
103
|
+
.map((link, index) => ({
|
|
104
|
+
key: String(link.section || link.href || index),
|
|
105
|
+
label: link.label,
|
|
106
|
+
href: link.href || generateUrl('/settings/user/{section}', { section: String(link.section) }),
|
|
107
|
+
icon: typeof link.icon === 'string' ? link.icon : '',
|
|
108
|
+
}))
|
|
109
|
+
},
|
|
110
|
+
|
|
74
111
|
/** @return {object} The board's eyebrow: muted, in sentence case. */
|
|
75
112
|
eyebrowStyle() {
|
|
76
113
|
return { '--cn-dialog-eyebrow-transform': 'none', '--cn-dialog-eyebrow-color': 'var(--color-text-maxcontrast)' }
|
|
@@ -93,6 +130,21 @@ var script = {
|
|
|
93
130
|
},
|
|
94
131
|
},
|
|
95
132
|
|
|
133
|
+
watch: {
|
|
134
|
+
sections() {
|
|
135
|
+
this.$nextTick(() => {
|
|
136
|
+
this.headingTargets = typeof document === 'undefined'
|
|
137
|
+
? []
|
|
138
|
+
: this.sections.filter((section) => section.icon && document.getElementById(`settings-section_${section.id}--label`)).map((section) => section.id);
|
|
139
|
+
this.showSelected();
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
selected() {
|
|
144
|
+
this.$nextTick(() => this.showSelected());
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
|
|
96
148
|
methods: {
|
|
97
149
|
/**
|
|
98
150
|
* Add a section to the navigation, kept in `order`; a section
|
|
@@ -133,9 +185,31 @@ var script = {
|
|
|
133
185
|
selectSection(id) {
|
|
134
186
|
this.picked = true;
|
|
135
187
|
this.selected = id;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
188
|
+
this.$nextTick(() => {
|
|
189
|
+
this.showSelected();
|
|
190
|
+
const heading = typeof document !== 'undefined' ? document.getElementById(`settings-section_${id}--label`) : null;
|
|
191
|
+
if (heading) {
|
|
192
|
+
heading.setAttribute('tabindex', '-1');
|
|
193
|
+
heading.focus();
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Show the current section and hide the others. They stay mounted,
|
|
200
|
+
* so what a reader typed in one survives a switch.
|
|
201
|
+
*
|
|
202
|
+
* @spec openspec/changes/user-settings-one-section/specs/user-settings-board-dialog/spec.md#requirement-the-board-user-settings-dialog-shows-one-section-at-a-time
|
|
203
|
+
*/
|
|
204
|
+
showSelected() {
|
|
205
|
+
if (typeof document === 'undefined') {
|
|
206
|
+
return
|
|
207
|
+
}
|
|
208
|
+
for (const section of this.sections) {
|
|
209
|
+
const el = document.getElementById(`settings-section_${section.id}`);
|
|
210
|
+
if (el) {
|
|
211
|
+
el.hidden = section.id !== this.selected;
|
|
212
|
+
}
|
|
139
213
|
}
|
|
140
214
|
},
|
|
141
215
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnUserSettingsDialog.vue2.js","sources":["../../../../src/components/CnUserSettingsDialog/CnUserSettingsDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<CnDialog\n\t\tclass=\"cn-user-settings-dialog\"\n\t\t:name=\"title\"\n\t\tlook=\"board\"\n\t\twidth=\"wizard\"\n\t\t:eyebrow=\"eyebrow\"\n\t\t:subtitle=\"subtitle\"\n\t\t:open=\"open\"\n\t\t:style=\"eyebrowStyle\"\n\t\tdata-testid=\"cn-user-settings-dialog\"\n\t\t@update:open=\"onUpdateOpen\"\n\t\t@closing=\"close\">\n\t\t<div class=\"cn-user-settings-dialog__body\">\n\t\t\t<nav\n\t\t\t\tv-if=\"sections.length > 0\"\n\t\t\t\tclass=\"cn-user-settings-dialog__nav\"\n\t\t\t\t:aria-label=\"navLabel\"\n\t\t\t\tdata-testid=\"cn-user-settings-nav\">\n\t\t\t\t<ul>\n\t\t\t\t\t<li v-for=\"section in sections\" :key=\"section.id\">\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t:href=\"`#settings-section_${section.id}`\"\n\t\t\t\t\t\t\tclass=\"cn-user-settings-dialog__nav-link\"\n\t\t\t\t\t\t\t:class=\"{ 'cn-user-settings-dialog__nav-link--active': section.id === selected }\"\n\t\t\t\t\t\t\t:aria-current=\"section.id === selected ? 'true' : undefined\"\n\t\t\t\t\t\t\t:data-testid=\"`cn-user-settings-nav-${section.id}`\"\n\t\t\t\t\t\t\t@click.prevent=\"selectSection(section.id)\">\n\t\t\t\t\t\t\t<span v-if=\"section.icon\" class=\"cn-user-settings-dialog__nav-icon\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<CnVNodes :vnodes=\"section.icon\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span>{{ section.name }}</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</nav>\n\t\t\t<div class=\"cn-user-settings-dialog__sections\">\n\t\t\t\t<!-- @slot default NcAppSettingsSection children; each registers itself in the navigation. -->\n\t\t\t\t<slot />\n\t\t\t</div>\n\t\t</div>\n\t\t<template #actions>\n\t\t\t<p class=\"cn-user-settings-dialog__note\" data-testid=\"cn-user-settings-note\">\n\t\t\t\t{{ footerNote }}\n\t\t\t</p>\n\t\t\t<NcButton variant=\"secondary\" data-testid=\"cn-user-settings-close\" @click=\"close\">\n\t\t\t\t{{ closeLabel }}\n\t\t\t</NcButton>\n\t\t</template>\n\t</CnDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton } from '@nextcloud/vue'\nimport { markRaw } from 'vue'\nimport CnDialog from '../CnDialog/CnDialog.vue'\n\n/**\n * The key NcAppSettingsSection injects to register itself with its dialog\n * (`Symbol.for`, so the same symbol `@nextcloud/vue` provides).\n */\nconst REGISTRATION_KEY = Symbol.for('NcAppSettingsDialog:registration')\n\n/** Renders a section's icon vnodes as they were registered. */\nconst CnVNodes = {\n\tname: 'CnVNodes',\n\tprops: { vnodes: { type: [Array, Object], default: null } },\n\trender() {\n\t\treturn this.vnodes\n\t},\n}\n\n/**\n * CnUserSettingsDialog - the user settings dialog in the board look (board\n * PqPersoonlijk): eyebrow, title and subtitle, a left navigation listing the\n * sections with their icons, the sections themselves, and a footer with a\n * note that changes save straight away and a Close button.\n *\n * The sections stay the app's: any `NcAppSettingsSection` in the default slot\n * registers itself with this dialog exactly as it does with\n * `NcAppSettingsDialog`, with its name, order and `#icon` slot. CnAppRoot\n * renders this dialog instead of `NcAppSettingsDialog` under the board look.\n *\n * @spec openspec/changes/user-settings-board-dialog/specs/user-settings-board-dialog/spec.md#requirement-the-user-settings-dialog-takes-the-board-look\n *\n * @event update:open Emitted with `false` when the dialog closes.\n */\nexport default {\n\tname: 'CnUserSettingsDialog',\n\n\tcomponents: { CnDialog, CnVNodes, NcButton },\n\n\tprovide() {\n\t\treturn {\n\t\t\t[REGISTRATION_KEY]: {\n\t\t\t\tregisterSection: this.registerSection,\n\t\t\t\tunregisterSection: this.unregisterSection,\n\t\t\t},\n\t\t}\n\t},\n\n\tprops: {\n\t\t/** Whether the dialog is open. */\n\t\topen: { type: Boolean, default: false },\n\t\t/** Dialog title; also its accessible name. */\n\t\ttitle: { type: String, required: true },\n\t\t/** Context line above the title. */\n\t\teyebrow: { type: String, default: () => t('nextcloud-vue', 'Your account') },\n\t\t/** Sentence under the title. */\n\t\tsubtitle: { type: String, default: () => t('nextcloud-vue', 'Only for you. Colleagues keep their own settings.') },\n\t\t/** The app's name, after the footer note. */\n\t\tappName: { type: String, default: '' },\n\t},\n\n\temits: ['update:open'],\n\n\tdata() {\n\t\treturn {\n\t\t\tsections: [],\n\t\t\tselected: '',\n\t\t\tpicked: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {object} The board's eyebrow: muted, in sentence case. */\n\t\teyebrowStyle() {\n\t\t\treturn { '--cn-dialog-eyebrow-transform': 'none', '--cn-dialog-eyebrow-color': 'var(--color-text-maxcontrast)' }\n\t\t},\n\n\t\t/** @return {string} The navigation's accessible name. */\n\t\tnavLabel() {\n\t\t\treturn t('nextcloud-vue', 'Sections of the settings')\n\t\t},\n\n\t\t/** @return {string} The footer note, with the app's name when known. */\n\t\tfooterNote() {\n\t\t\tconst note = t('nextcloud-vue', 'Changes are saved straight away')\n\t\t\treturn this.appName ? `${note} · ${this.appName}` : note\n\t\t},\n\n\t\t/** @return {string} The Close button label. */\n\t\tcloseLabel() {\n\t\t\treturn t('nextcloud-vue', 'Close')\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Add a section to the navigation, kept in `order`; a section\n\t\t * without one goes last. Until the reader picks one, the first\n\t\t * section is current.\n\t\t *\n\t\t * @param {string} id The section id.\n\t\t * @param {string} name The section name.\n\t\t * @param {number} [order] The section's place.\n\t\t * @param {Array} [icon] The section's icon vnodes.\n\t\t */\n\t\tregisterSection(id, name, order, icon) {\n\t\t\tconst rest = this.sections.filter((section) => section.id !== id)\n\t\t\tconst place = typeof order === 'number' ? order : Math.max(0, ...rest.map((section) => section.order)) + 1\n\t\t\tthis.sections = [...rest, { id, name, order: place, icon: icon ? markRaw(icon) : null }].sort((a, b) => a.order - b.order)\n\t\t\tif (!this.picked) {\n\t\t\t\tthis.selected = this.sections[0].id\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Remove a section from the navigation.\n\t\t *\n\t\t * @param {string} id The section id.\n\t\t */\n\t\tunregisterSection(id) {\n\t\t\tthis.sections = this.sections.filter((section) => section.id !== id)\n\t\t\tif (this.selected === id) {\n\t\t\t\tthis.selected = this.sections.length > 0 ? this.sections[0].id : ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Mark a section current and scroll it into view.\n\t\t *\n\t\t * @param {string} id The section id.\n\t\t */\n\t\tselectSection(id) {\n\t\t\tthis.picked = true\n\t\t\tthis.selected = id\n\t\t\tconst target = typeof document !== 'undefined' ? document.getElementById(`settings-section_${id}`) : null\n\t\t\tif (target && typeof target.scrollIntoView === 'function') {\n\t\t\t\ttarget.scrollIntoView({ behavior: 'smooth', block: 'start' })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Follow NcDialog's own open state.\n\t\t *\n\t\t * @param {boolean} value Whether NcDialog is open.\n\t\t */\n\t\tonUpdateOpen(value) {\n\t\t\tif (!value) {\n\t\t\t\tthis.close()\n\t\t\t}\n\t\t},\n\n\t\t/** Close the dialog. */\n\t\tclose() {\n\t\t\t/**\n\t\t\t * @event update:open Emitted with `false` when the dialog closes (Close button, close icon, Escape).\n\t\t\t */\n\t\t\tthis.$emit('update:open', false)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-user-settings-dialog__body {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 0 24px;\n}\n\n.cn-user-settings-dialog__nav {\n\tflex: 0 0 200px;\n\twidth: 200px;\n\tpadding-top: 18px;\n}\n\n.cn-user-settings-dialog__nav ul {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-user-settings-dialog__nav-link {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tmin-height: 40px;\n\tpadding: 0 12px;\n\tborder-radius: var(--border-radius-element, 8px);\n\tfont-size: 15px;\n\tcolor: var(--color-main-text);\n\ttext-decoration: none;\n}\n\n.cn-user-settings-dialog__nav-link:hover {\n\tbackground: var(--color-background-hover);\n}\n\n.cn-user-settings-dialog__nav-link:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: 2px;\n}\n\n.cn-user-settings-dialog__nav-link--active,\n.cn-user-settings-dialog__nav-link--active:hover {\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n\tfont-weight: 600;\n}\n\n.cn-user-settings-dialog__nav-icon {\n\tdisplay: inline-flex;\n\tflex: none;\n\twidth: 18px;\n\theight: 18px;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.cn-user-settings-dialog__sections {\n\tdisplay: flex;\n\tflex: 1 1 380px;\n\tflex-direction: column;\n\tmin-width: 0;\n}\n\n.cn-user-settings-dialog__sections :deep(.app-settings-section) {\n\tmargin: 0;\n\tpadding: 18px 0;\n\tborder-top: 1px solid var(--color-border);\n}\n\n.cn-user-settings-dialog__sections :deep(.app-settings-section__name) {\n\tmargin: 0 0 12px;\n\tfont-size: 17px;\n\tfont-weight: 700;\n}\n\n.cn-user-settings-dialog__note {\n\tflex: 1 1 auto;\n\tmargin: 0;\n\tfont-size: 14px;\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["CnDialog","t"],"mappings":";;;;;AA8DA;AACC;;;AAGD,MAAM,gBAAiB,GAAE,MAAM,CAAC,GAAG,CAAC,kCAAkC,EAAA;;AAEtE;AACA,MAAM,QAAO,GAAI;AAChB,CAAA,IAAI,EAAE,UAAU;CAChB,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,IAAK,EAAA,EAAG;AAC3D,CAAA,MAAM,GAAG;AACR,EAAA,OAAO,IAAI,CAAC,MAAK;EACjB;AACF,EAAA;;AAEA;AACC;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGD,aAAe;CACd,IAAI,EAAE,sBAAsB;;AAE5B,CAAA,UAAU,EAAE,YAAEA,UAAQ,EAAE,QAAQ,EAAE,UAAU;;AAE5C,CAAA,OAAO,GAAG;AACT,EAAA,OAAO;AACN,GAAA,CAAC,gBAAgB,GAAG;AACnB,IAAA,eA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AE,GAAC;AACnE,IAAA;GACA;;AAED;AACC;AACA;;;AAGD,EAAA,aAAa,CAAC,EAAE,EAAE;AACjB,GAAA,IAAI,CAAC,MAAK,GAAI,KAAG;AACjB,GAAA,IAAI,CAAC,QAAO,GAAI,GAAC;GACjB,MAAM,MAAK,GAAI,OAAO,QAAO,KAAM,WAAY,GAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,IAAI,KAAG;GACxG,IAAI,MAAO,IAAG,OAAO,MAAM,CAAC,cAAe,KAAI,UAAU,EAAE;IAC1D,MAAM,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAM,EAAG,EAAA;AAC7D,IAAA;GACA;;AAED;;AAEC;AACA;;AAED,EAAA,YAAY,CAAC,KAAK,EAAE;GACnB,IAAI,CAAC,KAAK,EAAE;IACX,IAAI,CAAC,KAAK,GAAC;AACZ,IAAA;GACA;;AAED;AACA,EAAA,KAAK,GAAG;AACP;AACC;;AAED,GAAA,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,EAAA;GAC/B;EACD;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"CnUserSettingsDialog.vue2.js","sources":["../../../../src/components/CnUserSettingsDialog/CnUserSettingsDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<CnDialog\n\t\tclass=\"cn-user-settings-dialog\"\n\t\t:name=\"title\"\n\t\tlook=\"board\"\n\t\twidth=\"wizard\"\n\t\t:eyebrow=\"eyebrow\"\n\t\t:subtitle=\"subtitle\"\n\t\t:open=\"open\"\n\t\t:style=\"eyebrowStyle\"\n\t\tdata-testid=\"cn-user-settings-dialog\"\n\t\t@update:open=\"onUpdateOpen\"\n\t\t@closing=\"close\">\n\t\t<div class=\"cn-user-settings-dialog__body\">\n\t\t\t<nav\n\t\t\t\tv-if=\"sections.length > 0\"\n\t\t\t\tclass=\"cn-user-settings-dialog__nav\"\n\t\t\t\t:aria-label=\"navLabel\"\n\t\t\t\tdata-testid=\"cn-user-settings-nav\">\n\t\t\t\t<!-- `nextcloudLinks`: Nextcloud's own personal settings first, as\n\t\t\t\t links, then one entry for this app holding its sections. -->\n\t\t\t\t<ul v-if=\"ncLinks.length > 0\" class=\"cn-user-settings-dialog__nc-links\" data-testid=\"cn-user-settings-nc-links\">\n\t\t\t\t\t<li v-for=\"link in ncLinks\" :key=\"link.key\">\n\t\t\t\t\t\t<a :href=\"link.href\" class=\"cn-user-settings-dialog__nav-link\">\n\t\t\t\t\t\t\t<span v-if=\"link.icon\" class=\"cn-user-settings-dialog__nav-icon\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<CnIcon :name=\"link.icon\" :size=\"18\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span>{{ link.label }}</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<p v-if=\"ncLinks.length > 0 && appName\"\n\t\t\t\t\tclass=\"cn-user-settings-dialog__group\"\n\t\t\t\t\tdata-testid=\"cn-user-settings-app-group\">\n\t\t\t\t\t{{ appName }}\n\t\t\t\t</p>\n\t\t\t\t<ul :class=\"{ 'cn-user-settings-dialog__group-sections': ncLinks.length > 0 }\">\n\t\t\t\t\t<li v-for=\"section in sections\" :key=\"section.id\">\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t:href=\"`#settings-section_${section.id}`\"\n\t\t\t\t\t\t\tclass=\"cn-user-settings-dialog__nav-link\"\n\t\t\t\t\t\t\t:class=\"{ 'cn-user-settings-dialog__nav-link--active': section.id === selected }\"\n\t\t\t\t\t\t\t:aria-current=\"section.id === selected ? 'true' : undefined\"\n\t\t\t\t\t\t\t:data-testid=\"`cn-user-settings-nav-${section.id}`\"\n\t\t\t\t\t\t\t@click.prevent=\"selectSection(section.id)\">\n\t\t\t\t\t\t\t<span v-if=\"section.icon\" class=\"cn-user-settings-dialog__nav-icon\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<CnVNodes :vnodes=\"section.icon\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span>{{ section.name }}</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</nav>\n\t\t\t<div class=\"cn-user-settings-dialog__sections\">\n\t\t\t\t<!-- @slot default NcAppSettingsSection children; each registers itself in the navigation. -->\n\t\t\t\t<slot />\n\t\t\t\t<!-- A section's `#icon` also stands before its heading. -->\n\t\t\t\t<template v-for=\"section in sections\" :key=\"`heading-icon-${section.id}-${section.name}`\">\n\t\t\t\t\t<Teleport v-if=\"section.icon && headingTargets.includes(section.id)\" :to=\"`#settings-section_${section.id}--label`\">\n\t\t\t\t\t\t<span class=\"cn-user-settings-dialog__heading-icon\" aria-hidden=\"true\" :data-testid=\"`cn-user-settings-heading-icon-${section.id}`\">\n\t\t\t\t\t\t\t<CnVNodes :vnodes=\"section.icon\" />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Teleport>\n\t\t\t\t</template>\n\t\t\t</div>\n\t\t</div>\n\t\t<template #actions>\n\t\t\t<p class=\"cn-user-settings-dialog__note\" data-testid=\"cn-user-settings-note\">\n\t\t\t\t{{ footerNote }}\n\t\t\t</p>\n\t\t\t<NcButton variant=\"secondary\" data-testid=\"cn-user-settings-close\" @click=\"close\">\n\t\t\t\t{{ closeLabel }}\n\t\t\t</NcButton>\n\t\t</template>\n\t</CnDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcButton } from '@nextcloud/vue'\nimport { cloneVNode, markRaw, ref } from 'vue'\nimport CnDialog from '../CnDialog/CnDialog.vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\n\n/**\n * The key NcAppSettingsSection injects to register itself with its dialog\n * (`Symbol.for`, so the same symbol `@nextcloud/vue` provides).\n */\nconst REGISTRATION_KEY = Symbol.for('NcAppSettingsDialog:registration')\n\n/** The key NcAppSettingsSection injects for the legacy design flag. */\nconst LEGACY_DESIGN_KEY = Symbol.for('NcAppSettingsDialog:legacy')\n\n/** Renders a section's icon vnodes as they were registered. */\nconst CnVNodes = {\n\tname: 'CnVNodes',\n\tprops: { vnodes: { type: [Array, Object], default: null } },\n\trender() {\n\t\t// A section's icon is drawn twice (navigation and heading), so each draw gets its own copy.\n\t\tconst list = Array.isArray(this.vnodes) ? this.vnodes : [this.vnodes]\n\t\treturn list.map((vnode) => (vnode && typeof vnode === 'object' ? cloneVNode(vnode) : vnode))\n\t},\n}\n\n/**\n * CnUserSettingsDialog - the user settings dialog in the board look (board\n * PqPersoonlijk): eyebrow, title and subtitle, a left navigation listing the\n * sections with their icons, the current section (the others stay mounted\n * but hidden), and a footer with a note that changes save straight away and\n * a Close button.\n *\n * The sections stay the app's: any `NcAppSettingsSection` in the default slot\n * registers itself with this dialog exactly as it does with\n * `NcAppSettingsDialog`, with its name, order and `#icon` slot. CnAppRoot\n * renders this dialog instead of `NcAppSettingsDialog` under the board look.\n *\n * @spec openspec/changes/user-settings-board-dialog/specs/user-settings-board-dialog/spec.md#requirement-the-user-settings-dialog-takes-the-board-look\n *\n * @event update:open Emitted with `false` when the dialog closes.\n */\nexport default {\n\tname: 'CnUserSettingsDialog',\n\n\tcomponents: { CnDialog, CnIcon, CnVNodes, NcButton },\n\n\tprovide() {\n\t\treturn {\n\t\t\t[REGISTRATION_KEY]: {\n\t\t\t\tregisterSection: this.registerSection,\n\t\t\t\tunregisterSection: this.unregisterSection,\n\t\t\t},\n\n\t\t\t// NcAppSettingsSection also asks its dialog whether to use the legacy design.\n\t\t\t[LEGACY_DESIGN_KEY]: ref(false),\n\t\t}\n\t},\n\n\tprops: {\n\t\t/** Whether the dialog is open. */\n\t\topen: { type: Boolean, default: false },\n\t\t/** Dialog title; also its accessible name. */\n\t\ttitle: { type: String, required: true },\n\t\t/** Context line above the title. */\n\t\teyebrow: { type: String, default: () => t('nextcloud-vue', 'Your account') },\n\t\t/** Sentence under the title. */\n\t\tsubtitle: { type: String, default: () => t('nextcloud-vue', 'Only for you. Colleagues keep their own settings.') },\n\t\t/** The app's name, after the footer note and as the navigation entry holding its sections. */\n\t\tappName: { type: String, default: '' },\n\t\t/**\n\t\t * Nextcloud's own personal settings, listed first in the navigation as\n\t\t * links: `[{ label, section? | href?, icon? }]`. `section` is a\n\t\t * personal settings section id (`/settings/user/<section>`). With any,\n\t\t * the app's sections sit under one entry named after the app.\n\t\t */\n\t\tnextcloudLinks: { type: Array, default: () => [] },\n\t},\n\n\temits: ['update:open'],\n\n\tdata() {\n\t\treturn {\n\t\t\tsections: [],\n\t\t\tselected: '',\n\t\t\t/** Ids of the sections whose heading is in the page, for the heading icons. */\n\t\t\theadingTargets: [],\n\t\t\tpicked: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The Nextcloud links with their URL.\n\t\t *\n\t\t * @spec openspec/changes/user-settings-nav-groups/specs/user-settings-board-dialog/spec.md#requirement-the-board-user-settings-navigation-can-list-nextclouds-own-sections-first\n\t\t * @return {Array<{key: string, label: string, href: string, icon: string}>}\n\t\t */\n\t\tncLinks() {\n\t\t\treturn (Array.isArray(this.nextcloudLinks) ? this.nextcloudLinks : [])\n\t\t\t\t.filter((link) => link && typeof link === 'object' && typeof link.label === 'string' && link.label !== '' && (link.href || link.section))\n\t\t\t\t.map((link, index) => ({\n\t\t\t\t\tkey: String(link.section || link.href || index),\n\t\t\t\t\tlabel: link.label,\n\t\t\t\t\thref: link.href || generateUrl('/settings/user/{section}', { section: String(link.section) }),\n\t\t\t\t\ticon: typeof link.icon === 'string' ? link.icon : '',\n\t\t\t\t}))\n\t\t},\n\n\t\t/** @return {object} The board's eyebrow: muted, in sentence case. */\n\t\teyebrowStyle() {\n\t\t\treturn { '--cn-dialog-eyebrow-transform': 'none', '--cn-dialog-eyebrow-color': 'var(--color-text-maxcontrast)' }\n\t\t},\n\n\t\t/** @return {string} The navigation's accessible name. */\n\t\tnavLabel() {\n\t\t\treturn t('nextcloud-vue', 'Sections of the settings')\n\t\t},\n\n\t\t/** @return {string} The footer note, with the app's name when known. */\n\t\tfooterNote() {\n\t\t\tconst note = t('nextcloud-vue', 'Changes are saved straight away')\n\t\t\treturn this.appName ? `${note} · ${this.appName}` : note\n\t\t},\n\n\t\t/** @return {string} The Close button label. */\n\t\tcloseLabel() {\n\t\t\treturn t('nextcloud-vue', 'Close')\n\t\t},\n\t},\n\n\twatch: {\n\t\tsections() {\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.headingTargets = typeof document === 'undefined'\n\t\t\t\t\t? []\n\t\t\t\t\t: this.sections.filter((section) => section.icon && document.getElementById(`settings-section_${section.id}--label`)).map((section) => section.id)\n\t\t\t\tthis.showSelected()\n\t\t\t})\n\t\t},\n\n\t\tselected() {\n\t\t\tthis.$nextTick(() => this.showSelected())\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Add a section to the navigation, kept in `order`; a section\n\t\t * without one goes last. Until the reader picks one, the first\n\t\t * section is current.\n\t\t *\n\t\t * @param {string} id The section id.\n\t\t * @param {string} name The section name.\n\t\t * @param {number} [order] The section's place.\n\t\t * @param {Array} [icon] The section's icon vnodes.\n\t\t */\n\t\tregisterSection(id, name, order, icon) {\n\t\t\tconst rest = this.sections.filter((section) => section.id !== id)\n\t\t\tconst place = typeof order === 'number' ? order : Math.max(0, ...rest.map((section) => section.order)) + 1\n\t\t\tthis.sections = [...rest, { id, name, order: place, icon: icon ? markRaw(icon) : null }].sort((a, b) => a.order - b.order)\n\t\t\tif (!this.picked) {\n\t\t\t\tthis.selected = this.sections[0].id\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Remove a section from the navigation.\n\t\t *\n\t\t * @param {string} id The section id.\n\t\t */\n\t\tunregisterSection(id) {\n\t\t\tthis.sections = this.sections.filter((section) => section.id !== id)\n\t\t\tif (this.selected === id) {\n\t\t\t\tthis.selected = this.sections.length > 0 ? this.sections[0].id : ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Mark a section current and scroll it into view.\n\t\t *\n\t\t * @param {string} id The section id.\n\t\t */\n\t\tselectSection(id) {\n\t\t\tthis.picked = true\n\t\t\tthis.selected = id\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.showSelected()\n\t\t\t\tconst heading = typeof document !== 'undefined' ? document.getElementById(`settings-section_${id}--label`) : null\n\t\t\t\tif (heading) {\n\t\t\t\t\theading.setAttribute('tabindex', '-1')\n\t\t\t\t\theading.focus()\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Show the current section and hide the others. They stay mounted,\n\t\t * so what a reader typed in one survives a switch.\n\t\t *\n\t\t * @spec openspec/changes/user-settings-one-section/specs/user-settings-board-dialog/spec.md#requirement-the-board-user-settings-dialog-shows-one-section-at-a-time\n\t\t */\n\t\tshowSelected() {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tfor (const section of this.sections) {\n\t\t\t\tconst el = document.getElementById(`settings-section_${section.id}`)\n\t\t\t\tif (el) {\n\t\t\t\t\tel.hidden = section.id !== this.selected\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Follow NcDialog's own open state.\n\t\t *\n\t\t * @param {boolean} value Whether NcDialog is open.\n\t\t */\n\t\tonUpdateOpen(value) {\n\t\t\tif (!value) {\n\t\t\t\tthis.close()\n\t\t\t}\n\t\t},\n\n\t\t/** Close the dialog. */\n\t\tclose() {\n\t\t\t/**\n\t\t\t * @event update:open Emitted with `false` when the dialog closes (Close button, close icon, Escape).\n\t\t\t */\n\t\t\tthis.$emit('update:open', false)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-user-settings-dialog__body {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 0 24px;\n}\n\n.cn-user-settings-dialog__nav {\n\tflex: 0 0 200px;\n\twidth: 200px;\n\tpadding-top: 18px;\n}\n\n.cn-user-settings-dialog__nav ul {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 2px;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-user-settings-dialog__nav-link {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tmin-height: 40px;\n\tpadding: 0 12px;\n\tborder-radius: var(--border-radius-element, 8px);\n\tfont-size: 15px;\n\tcolor: var(--color-main-text);\n\ttext-decoration: none;\n}\n\n.cn-user-settings-dialog__nav-link:hover {\n\tbackground: var(--color-background-hover);\n}\n\n.cn-user-settings-dialog__nav-link:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: 2px;\n}\n\n.cn-user-settings-dialog__nav-link--active,\n.cn-user-settings-dialog__nav-link--active:hover {\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n\tfont-weight: 600;\n}\n\n.cn-user-settings-dialog__nav-icon {\n\tdisplay: inline-flex;\n\tflex: none;\n\twidth: 18px;\n\theight: 18px;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.cn-user-settings-dialog__sections {\n\tdisplay: flex;\n\tflex: 1 1 380px;\n\tflex-direction: column;\n\tmin-width: 0;\n}\n\n.cn-user-settings-dialog__sections :deep(.app-settings-section) {\n\tmargin: 0;\n\tpadding: 18px 0;\n\tborder-top: 1px solid var(--color-border);\n}\n\n.cn-user-settings-dialog__sections :deep(.app-settings-section__name) {\n\tmargin: 0 0 12px;\n\tfont-size: 17px;\n\tfont-weight: 700;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n}\n\n.cn-user-settings-dialog__note {\n\tflex: 1 1 auto;\n\tmargin: 0;\n\tfont-size: 14px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-user-settings-dialog__nc-links {\n\tmargin-bottom: 2px;\n}\n\n.cn-user-settings-dialog__group {\n\tmargin: 10px 0 2px;\n\tpadding: 0 12px;\n\tfont-size: 15px;\n\tfont-weight: 600;\n\tcolor: var(--color-main-text);\n}\n\n.cn-user-settings-dialog__group-sections {\n\tpadding-inline-start: 12px;\n}\n\n.cn-user-settings-dialog__heading-icon {\n\tdisplay: inline-flex;\n\torder: -1;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n/* One section at a time: the others are mounted but hidden. */\n.cn-user-settings-dialog__sections :deep(.app-settings-section[hidden]) {\n\tdisplay: none;\n}\n</style>\n"],"names":["CnDialog","CnIcon","t"],"mappings":";;;;;;;AAyFA;AACC;;;AAGD,MAAM,gBAAiB,GAAE,MAAM,CAAC,GAAG,CAAC,kCAAkC,EAAA;;AAEtE;AACA,MAAM,iBAAkB,GAAE,MAAM,CAAC,GAAG,CAAC,4BAA4B,EAAA;;AAEjE;AACA,MAAM,QAAO,GAAI;AAChB,CAAA,IAAI,EAAE,UAAU;CAChB,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,IAAK,EAAA,EAAG;AAC3D,CAAA,MAAM,GAAG;AACR;EACA,MAAM,IAAK,GAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAA,GAAI,IAAI,CAAC,MAAK,GAAI,CAAC,IAAI,CAAC,MAAM,EAAA;AACpE,EAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,MAAM,KAAM,IAAG,OAAO,KAAM,KAAI,QAAO,GAAI,UAAU,CAAC,KAAK,IAAI,KAAK,CAAC,CAAA;EAC3F;AACF,EAAA;;AAEA;AACC;AACA;;;;AAIA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGD,aAAe;CACd,IAAI,EAAE,sBAAsB;;CAE5B,UAAU,EAAE,YAAEA,UAAQ,UAAEC,YAAM,EAAE,QAAQ,EAAE,UAAU;;AAEpD,CAAA,OAAO,GAAG;AACT,EAAA,O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