@conduction/nextcloud-vue 2.100.0 → 2.102.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/CnActionsBar/CnActionsBar.vue2.js +22 -0
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue2.js.map +1 -1
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue3.js +8 -6
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue3.js.map +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue.js +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js +29 -4
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue3.js +9 -1
- package/dist/esm/components/CnChartWidget/CnChartWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue.js +1 -1
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue2.js +22 -1
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue2.js.map +1 -1
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue3.js +26 -16
- package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +70 -6
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +105 -74
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnExportsWidget/CnExportsWidget.vue.js +9 -0
- package/dist/esm/components/CnExportsWidget/CnExportsWidget.vue.js.map +1 -0
- package/dist/esm/components/CnExportsWidget/CnExportsWidget.vue2.js +139 -0
- package/dist/esm/components/CnExportsWidget/CnExportsWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnExportsWidget/CnExportsWidget.vue3.js +76 -0
- package/dist/esm/components/CnExportsWidget/CnExportsWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +160 -2
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +206 -94
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/filesReview.js +61 -0
- package/dist/esm/components/CnFilesBrowser/filesReview.js.map +1 -0
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue.js +9 -0
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue.js.map +1 -0
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js +279 -0
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js +122 -0
- package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnGroupedCardsWidget/index.js +29 -0
- package/dist/esm/components/CnGroupedCardsWidget/index.js.map +1 -0
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +320 -74
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +323 -213
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/useNamedSource.js +30 -3
- package/dist/esm/components/CnIndexPage/useNamedSource.js.map +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue.js +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js +15 -0
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnMapWidget/CnMapWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnMenuWidget/CnMenuWidget.vue.js +1 -1
- package/dist/esm/components/CnMenuWidget/CnMenuWidget.vue2.js +25 -1
- package/dist/esm/components/CnMenuWidget/CnMenuWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnMenuWidget/CnMenuWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js +14 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js +14 -6
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue.js +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +10 -0
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +6 -1
- package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
- package/dist/esm/components/CnOrderedListField/CnOrderedListField.vue.js +1 -1
- package/dist/esm/components/CnOrderedListField/CnOrderedListField.vue2.js +91 -4
- package/dist/esm/components/CnOrderedListField/CnOrderedListField.vue2.js.map +1 -1
- package/dist/esm/components/CnOrderedListField/CnOrderedListField.vue3.js +63 -38
- package/dist/esm/components/CnOrderedListField/CnOrderedListField.vue3.js.map +1 -1
- package/dist/esm/components/CnQuickFilterBar/CnQuickFilterBar.vue.js +1 -1
- package/dist/esm/components/CnQuickFilterBar/CnQuickFilterBar.vue2.js +106 -4
- package/dist/esm/components/CnQuickFilterBar/CnQuickFilterBar.vue2.js.map +1 -1
- package/dist/esm/components/CnQuickFilterBar/CnQuickFilterBar.vue3.js +70 -25
- package/dist/esm/components/CnQuickFilterBar/CnQuickFilterBar.vue3.js.map +1 -1
- package/dist/esm/components/CnSavedViewAlertWidget/CnSavedViewAlertWidget.vue.js +9 -0
- package/dist/esm/components/CnSavedViewAlertWidget/CnSavedViewAlertWidget.vue.js.map +1 -0
- package/dist/esm/components/CnSavedViewAlertWidget/CnSavedViewAlertWidget.vue2.js +175 -0
- package/dist/esm/components/CnSavedViewAlertWidget/CnSavedViewAlertWidget.vue2.js.map +1 -0
- package/dist/esm/components/CnSavedViewAlertWidget/CnSavedViewAlertWidget.vue3.js +77 -0
- package/dist/esm/components/CnSavedViewAlertWidget/CnSavedViewAlertWidget.vue3.js.map +1 -0
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue.js +1 -1
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue2.js +35 -2
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue2.js.map +1 -1
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetGrid/builtInWidgets.js +4 -0
- package/dist/esm/components/CnWidgetGrid/builtInWidgets.js.map +1 -1
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
- package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue.js +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js +2 -23
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js.map +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue3.js.map +1 -1
- package/dist/esm/composables/indexSources.js +176 -20
- package/dist/esm/composables/indexSources.js.map +1 -1
- package/dist/esm/composables/useEndpointSource.js +28 -6
- package/dist/esm/composables/useEndpointSource.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +41 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +39 -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 +939 -376
- package/dist/esm/utils/builtInFormatters.js +24 -4
- package/dist/esm/utils/builtInFormatters.js.map +1 -1
- package/dist/esm/utils/languageMapText.js +50 -0
- package/dist/esm/utils/languageMapText.js.map +1 -0
- package/dist/esm/utils/libraryWidgetKeys.js +3 -0
- package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
- package/dist/esm/utils/mapList.js +71 -0
- package/dist/esm/utils/mapList.js.map +1 -0
- package/dist/esm/utils/rowClassRules.js +43 -0
- package/dist/esm/utils/rowClassRules.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/visibleWhen.js +19 -2
- package/dist/esm/utils/visibleWhen.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +9681 -7136
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +939 -376
- package/l10n/en.json +41 -1
- package/l10n/nl.json +39 -1
- package/package.json +1 -1
- package/src/components/CnActionsBar/CnActionsBar.md +1 -0
- package/src/components/CnActionsBar/CnActionsBar.vue +31 -4
- package/src/components/CnChartWidget/CnChartWidget.md +3 -2
- package/src/components/CnChartWidget/CnChartWidget.vue +42 -4
- package/src/components/CnChoiceCards/CnChoiceCards.md +39 -0
- package/src/components/CnChoiceCards/CnChoiceCards.vue +93 -16
- package/src/components/CnDashboardPage/CnDashboardPage.vue +110 -21
- package/src/components/CnExportsWidget/CnExportsWidget.vue +233 -0
- package/src/components/CnExportsWidget/index.js +7 -0
- package/src/components/CnFilesBrowser/CnFilesBrowser.vue +324 -0
- package/src/components/CnFilesBrowser/filesReview.js +57 -0
- package/src/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue +433 -0
- package/src/components/CnGroupedCardsWidget/index.js +28 -0
- package/src/components/CnIndexPage/CnIndexPage.md +5 -1
- package/src/components/CnIndexPage/CnIndexPage.vue +313 -9
- package/src/components/CnIndexPage/useNamedSource.js +30 -3
- package/src/components/CnMapWidget/CnMapWidget.vue +37 -0
- package/src/components/CnMenuWidget/CnMenuWidget.vue +25 -1
- package/src/components/CnObjectListWidget/CnObjectListWidget.vue +29 -1
- package/src/components/CnObjectSidebar/CnFilesTab.vue +15 -0
- package/src/components/CnOrderedListField/CnOrderedListField.vue +151 -5
- package/src/components/CnQuickFilterBar/CnQuickFilterBar.md +1 -0
- package/src/components/CnQuickFilterBar/CnQuickFilterBar.vue +159 -5
- package/src/components/CnSavedViewAlertWidget/CnSavedViewAlertWidget.vue +272 -0
- package/src/components/CnSavedViewAlertWidget/index.js +7 -0
- package/src/components/CnSetupWizard/CnSetupWizard.vue +35 -2
- package/src/components/CnWidgetGrid/builtInWidgets.js +4 -0
- package/src/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
- package/src/components/CnWidgetObjectTable/CnWidgetObjectTable.vue +2 -23
- package/src/components/index.js +3 -0
- package/src/composables/indexSources.js +175 -19
- package/src/composables/useEndpointSource.js +28 -6
- package/src/css/index-page.css +117 -0
- package/src/css/look-board-index.css +10 -0
- package/src/css/look-board.css +44 -0
- package/src/index.js +1 -0
- package/src/schemas/app-manifest-v2.schema.json +85 -3
- package/src/utils/builtInFormatters.js +24 -4
- package/src/utils/languageMapText.js +46 -0
- package/src/utils/libraryWidgetKeys.js +3 -0
- package/src/utils/mapList.js +67 -0
- package/src/utils/rowClassRules.js +39 -0
- package/src/utils/validateManifestV2.compiled.js +3 -3
- package/src/utils/visibleWhen.js +19 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnSetupWizard.vue3.js","sources":["../../../../src/components/CnSetupWizard/CnSetupWizard.vue?vue&type=template&id=32874a44&lang.js"],"sourcesContent":["<!-- SPDX-License-Identifier: EUPL-1.2 -->\n<!-- SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl> -->\n<template>\n\t<CnWizardDialog\n\t\tref=\"wizard\"\n\t\t:steps=\"wizardSteps\"\n\t\t:dialogTitle=\"resolvedDialogTitle\"\n\t\t:submitLabel=\"submitLabel\"\n\t\t:cancelLabel=\"cancelLabel\"\n\t\t:nextLabel=\"nextLabel\"\n\t\t:backLabel=\"backLabel\"\n\t\t:successText=\"successText\"\n\t\t:validate=\"validateStep\"\n\t\t:cancellable=\"cancellable\"\n\t\t:initialStep=\"dependencyBlocked ? '' : initialStepId\"\n\t\t:nextDisabled=\"dependencyBlocked\"\n\t\t@stepChange=\"onStepChange\"\n\t\t@submit=\"onSubmit\"\n\t\t@close=\"onClose\">\n\t\t<!-- This `<template v-for>` defines dynamic SLOTS, not a rendered list.\n\t\t `@vue/compiler-sfc` DISCARDS a `:key` on a slot-defining\n\t\t `<template>` (verified against the generated `createSlots` call)\n\t\t and honours it only on the child, so the rule's advice is inverted\n\t\t here — moving the key up would throw it away. -->\n\t\t<!-- A required app is missing: this is the only step, and Next stays\n\t\t disabled until the app is there. -->\n\t\t<template v-if=\"dependencyBlocked\" #[dependencyStepSlot]>\n\t\t\t<div class=\"cn-setup-step\" data-step-type=\"dependencies\" data-testid=\"cn-setup-dependencies\">\n\t\t\t\t<NcNoteCard type=\"warning\">\n\t\t\t\t\t{{ dependencyBlockedText }}\n\t\t\t\t</NcNoteCard>\n\t\t\t\t<CnLeafDependencySettings\n\t\t\t\t\t:appId=\"appId\"\n\t\t\t\t\t:dependencies=\"dependencyEntries\"\n\t\t\t\t\t:isAdmin=\"isAdmin\"\n\t\t\t\t\t:sectionName=\"dependencySectionName\"\n\t\t\t\t\tsectionDescription=\"\"\n\t\t\t\t\t@installed=\"onDependencyInstalled\" />\n\t\t\t</div>\n\t\t</template>\n\t\t<!-- eslint-disable vue/no-v-for-template-key-on-child -->\n\t\t<template v-for=\"step in setupSteps\" #[stepSlot(step)]=\"scope\">\n\t\t\t<div :key=\"step.id\" class=\"cn-setup-step\" :data-step-type=\"step.type\">\n\t\t\t\t<!-- Optional apps that are missing never block, but the admin\n\t\t\t\t reads about them once, on the first step. -->\n\t\t\t\t<NcNoteCard\n\t\t\t\t\tv-if=\"step.id === firstStepId && missingOptional.length > 0\"\n\t\t\t\t\ttype=\"info\"\n\t\t\t\t\tdata-testid=\"cn-setup-optional-dependencies\">\n\t\t\t\t\t{{ optionalMissingText }}\n\t\t\t\t</NcNoteCard>\n\t\t\t\t<!-- @slot step-{id} Override a step's body (for `component` steps or\n\t\t\t\t any bespoke step). Scope: the CnWizardDialog step scope plus\n\t\t\t\t `{ step, runAction, saveConfig }`. -->\n\t\t\t\t<slot\n\t\t\t\t\tv-if=\"hasCustomSlot(step.id)\"\n\t\t\t\t\t:name=\"stepSlot(step)\"\n\t\t\t\t\tv-bind=\"scope\"\n\t\t\t\t\t:step=\"step\"\n\t\t\t\t\t:runAction=\"() => runAction(step)\"\n\t\t\t\t\t:saveConfig=\"(patch) => saveConfig(patch)\" />\n\n\t\t\t\t<!-- info -->\n\t\t\t\t<template v-else-if=\"step.type === 'info'\">\n\t\t\t\t\t<NcNoteCard type=\"info\" :heading=\"stepTitle(step)\">\n\t\t\t\t\t\t{{ stepBody(step) }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t</template>\n\n\t\t\t\t<!-- choice -->\n\t\t\t\t<template v-else-if=\"step.type === 'choice'\">\n\t\t\t\t\t<!-- The board sets the intro as a plain paragraph above the\n\t\t\t\t\t cards (DqInstellen); the Nextcloud look keeps the note. -->\n\t\t\t\t\t<p v-if=\"step.body && isBoard\" class=\"cn-setup-step__intro\" data-testid=\"cn-setup-step-intro\">\n\t\t\t\t\t\t{{ stepBody(step) }}\n\t\t\t\t\t</p>\n\t\t\t\t\t<NcNoteCard v-else-if=\"step.body\" type=\"info\">\n\t\t\t\t\t\t{{ stepBody(step) }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t\t<CnChoiceCards\n\t\t\t\t\t\tv-if=\"isCardChoice(step)\"\n\t\t\t\t\t\t:label=\"stepTitle(step)\"\n\t\t\t\t\t\t:options=\"optionsFor(step)\"\n\t\t\t\t\t\t:multiple=\"step.multiple === true\"\n\t\t\t\t\t\t:disabled=\"isChoiceDisabled(step)\"\n\t\t\t\t\t\t:loading=\"isOptionsLoading(step)\"\n\t\t\t\t\t\t:modelValue=\"cardModel(step)\"\n\t\t\t\t\t\t@update:modelValue=\"(v) => onChoice(step, v)\">\n\t\t\t\t\t\t<!-- `loadAction`: every dataset card except \"none\" loads\n\t\t\t\t\t\t itself, so no separate run-action step is needed. -->\n\t\t\t\t\t\t<template v-if=\"step.loadAction\" #option-actions=\"{ option }\">\n\t\t\t\t\t\t\t<template v-if=\"isLoadableOption(step, option)\">\n\t\t\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t:disabled=\"isDatasetLoading(step, option)\"\n\t\t\t\t\t\t\t\t\t:aria-label=\"loadAriaLabel(option)\"\n\t\t\t\t\t\t\t\t\tdata-testid=\"cn-setup-load-dataset\"\n\t\t\t\t\t\t\t\t\t@click=\"loadDataset(step, option)\">\n\t\t\t\t\t\t\t\t\t<template v-if=\"isDatasetLoading(step, option)\" #icon>\n\t\t\t\t\t\t\t\t\t\t<NcLoadingIcon :size=\"20\" />\n\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t\t{{ loadButtonLabel(step, option) }}\n\t\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t\t\t<p\n\t\t\t\t\t\t\t\t\tv-if=\"datasetResultFor(step, option)\"\n\t\t\t\t\t\t\t\t\trole=\"status\"\n\t\t\t\t\t\t\t\t\tclass=\"cn-setup-load-result\"\n\t\t\t\t\t\t\t\t\t:class=\"datasetResultFor(step, option).success ? 'cn-setup-load-result--success' : 'cn-setup-load-result--error'\"\n\t\t\t\t\t\t\t\t\tdata-testid=\"cn-setup-load-result\">\n\t\t\t\t\t\t\t\t\t{{ datasetResultFor(step, option).message }}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</CnChoiceCards>\n\t\t\t\t\t<NcSelect\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\t:inputLabel=\"stepTitle(step)\"\n\t\t\t\t\t\t:options=\"optionsFor(step)\"\n\t\t\t\t\t\t:multiple=\"step.multiple === true\"\n\t\t\t\t\t\t:disabled=\"isChoiceDisabled(step)\"\n\t\t\t\t\t\tlabel=\"label\"\n\t\t\t\t\t\t:modelValue=\"choiceModel[step.id]\"\n\t\t\t\t\t\t@update:modelValue=\"(v) => onChoice(step, v)\" />\n\t\t\t\t\t<NcNoteCard v-if=\"isChoiceDisabled(step)\" type=\"warning\">\n\t\t\t\t\t\t{{ dependsOnHint(step) }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t\t<p v-if=\"stepNote(step)\" class=\"cn-setup-step__note\" data-testid=\"cn-setup-step-note\">\n\t\t\t\t\t\t{{ stepNote(step) }}\n\t\t\t\t\t</p>\n\t\t\t\t</template>\n\n\t\t\t\t<!-- config-fields -->\n\t\t\t\t<template v-else-if=\"step.type === 'config-fields'\">\n\t\t\t\t\t<!-- The step's intro, drawn like choice and run-action steps.\n\t\t\t\t\t It was left out here, so pipelinq's organisation step\n\t\t\t\t\t (\"Your organisation details…\") showed fields with no\n\t\t\t\t\t word about what they were for. -->\n\t\t\t\t\t<NcNoteCard v-if=\"step.body\" type=\"info\" data-testid=\"cn-setup-step-intro\">\n\t\t\t\t\t\t{{ stepBody(step) }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-for=\"field in fieldsFor(step)\"\n\t\t\t\t\t\t:key=\"field.key\"\n\t\t\t\t\t\tclass=\"cn-setup-field\">\n\t\t\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\t\t\tv-if=\"field.widget === 'checkbox'\"\n\t\t\t\t\t\t\t:modelValue=\"!!configModel[field.key]\"\n\t\t\t\t\t\t\t@update:modelValue=\"(v) => configModel[field.key] = v\">\n\t\t\t\t\t\t\t{{ field.label }}\n\t\t\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t\t\t<NcSelect\n\t\t\t\t\t\t\tv-else-if=\"field.widget === 'select'\"\n\t\t\t\t\t\t\t:inputLabel=\"field.label\"\n\t\t\t\t\t\t\t:options=\"field.enum || []\"\n\t\t\t\t\t\t\t:modelValue=\"configModel[field.key]\"\n\t\t\t\t\t\t\t@update:modelValue=\"(v) => configModel[field.key] = v\" />\n\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\tv-else\n\t\t\t\t\t\t\t:label=\"field.label\"\n\t\t\t\t\t\t\t:type=\"field.widget === 'number' ? 'number' : 'text'\"\n\t\t\t\t\t\t\t:modelValue=\"configModel[field.key] != null ? String(configModel[field.key]) : ''\"\n\t\t\t\t\t\t\t@update:modelValue=\"(v) => configModel[field.key] = v\" />\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\n\t\t\t\t<!-- run-action -->\n\t\t\t\t<template v-else-if=\"step.type === 'run-action'\">\n\t\t\t\t\t<NcNoteCard v-if=\"step.body\" type=\"info\">\n\t\t\t\t\t\t{{ stepBody(step) }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t\t<!-- The action starts automatically on entering this step\n\t\t\t\t\t (see `maybeAutoRunStep`), so the default state is the\n\t\t\t\t\t spinner, not an idle button. -->\n\t\t\t\t\t<div v-if=\"running[step.id]\" class=\"cn-setup-step__running\">\n\t\t\t\t\t\t<NcLoadingIcon :size=\"20\" />\n\t\t\t\t\t\t<span>{{ runningLabel }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t<NcNoteCard\n\t\t\t\t\t\t\tv-if=\"actionResult[step.id]\"\n\t\t\t\t\t\t\t:type=\"actionResult[step.id].success ? 'success' : 'error'\">\n\t\t\t\t\t\t\t{{ actionResult[step.id].message }}\n\t\t\t\t\t\t</NcNoteCard>\n\t\t\t\t\t\t<div class=\"cn-setup-step__nav\">\n\t\t\t\t\t\t\t<NcButton :variant=\"actionResult[step.id] ? 'secondary' : 'primary'\" @click=\"runAction(step)\">\n\t\t\t\t\t\t\t\t{{ actionResult[step.id] ? rerunLabel : runLabel }}\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</template>\n\n\t\t\t\t<!-- summary -->\n\t\t\t\t<template v-else-if=\"step.type === 'summary'\">\n\t\t\t\t\t<NcNoteCard v-if=\"step.body\" type=\"info\">\n\t\t\t\t\t\t{{ stepBody(step) }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t\t<ul class=\"cn-setup-summary\">\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\tv-for=\"item in summaryItems\"\n\t\t\t\t\t\t\t:key=\"item.id\"\n\t\t\t\t\t\t\tclass=\"cn-setup-summary__item\"\n\t\t\t\t\t\t\t:class=\"{ 'cn-setup-summary__item--done': item.done, 'cn-setup-summary__item--not-run': item.notRun }\">\n\t\t\t\t\t\t\t<span class=\"cn-setup-summary__mark\">{{ item.done ? '✓' : '○' }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-setup-summary__label\">{{ item.title }}</span>\n\t\t\t\t\t\t\t<span v-if=\"item.value\" class=\"cn-setup-summary__value\">{{ item.value }}</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</template>\n\t\t\t</div>\n\t\t</template>\n\t\t<!-- eslint-enable vue/no-v-for-template-key-on-child -->\n\t</CnWizardDialog>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcCheckboxRadioSwitch, NcLoadingIcon, NcNoteCard, NcSelect, NcTextField } from '@nextcloud/vue'\nimport CnChoiceCards from '../CnChoiceCards/CnChoiceCards.vue'\nimport CnLeafDependencySettings from '../CnLeafDependencySettings/CnLeafDependencySettings.vue'\nimport CnWizardDialog from '../CnWizardDialog/CnWizardDialog.vue'\nimport { checkDependencies, isDependencyResolved, missingRequiredApps, readServerAppStatuses } from '../../composables/useDependencyCheck.js'\nimport { useLook } from '../../composables/useLook.js'\nimport { useSetupStatus } from '../../composables/useSetupStatus.js'\nimport { fieldsFromSchema } from '../../utils/schema.js'\n\n/** Id of the synthetic step shown while a required app is missing. */\nconst DEPENDENCY_STEP_ID = 'cn-setup-dependencies'\n\n/** The dataset value that means \"seed nothing\"; it never gets a Load button. */\nconst NONE_DATASET = 'none'\n\n/**\n * CnSetupWizard — abstract, manifest-driven first-time setup wizard (ADR-042).\n *\n * Wraps {@link CnWizardDialog} and renders a `manifest.setup.steps[]` array by\n * each step's `type`: `info` (note), `config-fields` (fields from a JSON Schema\n * via `fieldsFromSchema`, the same field shapes the admin pages use), `choice`\n * (`NcSelect` persisting to an app-config key), `run-action` (POST a privileged\n * server action), `summary` (recap), and `component` (a parent-provided\n * `#step-<id>` slot). It NEVER writes OpenRegister objects from the browser —\n * all persistence goes through the per-app setup contract\n * (`POST /apps/{appId}/api/setup/config` and `/api/setup/action/{actionId}`).\n *\n * Mount it gated by `CnAppRoot`'s setup phase, or open it on demand from\n * `CnAdminSettingsShell`.\n *\n * ```vue\n * <CnSetupWizard\n * :app-id=\"'procest'\"\n * :steps=\"manifest.setup.steps\"\n * @complete=\"onSetupComplete\"\n * @close=\"showWizard = false\" />\n * ```\n */\nexport default {\n\tname: 'CnSetupWizard',\n\n\tcomponents: {\n\t\tCnWizardDialog,\n\t\tCnChoiceCards,\n\t\tCnLeafDependencySettings,\n\t\tNcButton,\n\t\tNcNoteCard,\n\t\tNcSelect,\n\t\tNcTextField,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcLoadingIcon,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * Consumer translation function, provided by CnAppRoot as\n\t\t * `cnTranslate: this.translate` (bound to the host app's id). Step field\n\t\t * labels come from schema property titles, authored in English as the\n\t\t * canonical source; the visible label is resolved through this function\n\t\t * so it follows the user's language. Defaults to identity when used\n\t\t * standalone (no CnAppRoot ancestor).\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\n\t\t/**\n\t\t * The app manifest, provided by CnAppRoot. Read only for its\n\t\t * `dependencies` when the `dependencies` prop is empty.\n\t\t */\n\t\tcnManifest: { default: null },\n\t},\n\n\tprops: {\n\t\t/** The Nextcloud app id; used to build the `/apps/{appId}/api/setup/*` URLs. */\n\t\tappId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** The `manifest.setup.steps` array to render. */\n\t\tsteps: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** Dialog title. Overridden by `appName` when that prop is set. */\n\t\tdialogTitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Set up this app'),\n\t\t},\n\n\t\t/**\n\t\t * The app's human-readable display name. When set, the dialog title\n\t\t * becomes \"Set up {appName}\" instead of the generic `dialogTitle`\n\t\t * default — pass the same display name CnAppRoot already resolves\n\t\t * (`appDisplayName || manifest.name || appId`).\n\t\t */\n\t\tappName: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Final-step submit button label. */\n\t\tsubmitLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Finish'),\n\t\t},\n\n\t\t/** Cancel button label. */\n\t\tcancelLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Cancel'),\n\t\t},\n\n\t\t/** Next button label. */\n\t\tnextLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Next'),\n\t\t},\n\n\t\t/** Back button label. */\n\t\tbackLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Back'),\n\t\t},\n\n\t\t/** Run-action button label (shown before the first automatic run). */\n\t\trunLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Run'),\n\t\t},\n\n\t\t/** Run-action button label offered after a run already finished. */\n\t\trerunLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Run again'),\n\t\t},\n\n\t\t/** Label shown next to the spinner while a run-action step is running. */\n\t\trunningLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Loading…'),\n\t\t},\n\n\t\t/** Result-phase success text. */\n\t\tsuccessText: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Setup complete.'),\n\t\t},\n\n\t\t/**\n\t\t * Whether the wizard can be dismissed before finishing (Cancel\n\t\t * button, ESC, backdrop click). Pass `false` when a REQUIRED step\n\t\t * is unmet and the host is gating its shell behind this wizard\n\t\t * (ADR-042) — an offered-but-non-functional Cancel would be\n\t\t * misleading. Optional-only setup stays cancellable (default).\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tcancellable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Ids of steps the SERVER already reports as done (e.g.\n\t\t * `useSetupStatus(...).steps` filtered to `done === true`), passed by\n\t\t * the host so a freshly (re)mounted wizard doesn't re-ask something\n\t\t * already persisted in an earlier session — this component's own\n\t\t * `localDone`/`choiceModel` only track the CURRENT session and reset\n\t\t * blank on every mount. Drives both the initial step (`initialStepId`)\n\t\t * and the summary page's done markers.\n\t\t *\n\t\t * @type {Array<string>}\n\t\t */\n\t\tcompletedStepIds: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * The app's dependencies, in the manifest's own shape (app-id strings\n\t\t * or `{ id, name?, required? }`). Falls back to the injected manifest's\n\t\t * `dependencies`. A missing REQUIRED one replaces every step with the\n\t\t * dependency list and disables Next; a missing optional one is listed\n\t\t * on the first step and does not block.\n\t\t *\n\t\t * @type {Array<string|object>}\n\t\t * @spec openspec/changes/setup-wizard-card-load-and-dependency-gate/specs/cn-setup-wizard/spec.md#requirement-the-wizard-checks-dependencies-before-any-step\n\t\t */\n\t\tdependencies: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** Load button label on a dataset card (`loadAction`). */\n\t\tloadLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Load'),\n\t\t},\n\n\t\t/** Load button label once that dataset loaded in this session. */\n\t\treloadLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Load again'),\n\t\t},\n\t},\n\n\temits: ['complete', 'close', 'step-change', 'action-result'],\n\n\t/**\n\t * Live option lists come from the app's own setup status document, so a\n\t * step that offers a choice of things the SERVER ships never has to\n\t * restate them in the manifest. `useSetupStatus` caches per app id, so the\n\t * host's own status fetch (CnAppRoot's setup gate) is the one that runs —\n\t * this reads the same refs rather than asking again.\n\t *\n\t * Only called when a step actually declares `optionsSource`: a wizard with\n\t * none must not start making requests it never made before.\n\t *\n\t * @param {object} props The component props.\n\t * @return {object} `setupStatus` / `setupStatusLoading` for the option resolver.\n\t */\n\tsetup(props) {\n\t\tconst { isBoard } = useLook()\n\t\tconst wantsSource = (props.steps || []).some((s) => s && s.optionsSource)\n\t\tif (!wantsSource) {\n\t\t\treturn { isBoard }\n\t\t}\n\t\tconst { status, loading } = useSetupStatus(props.appId, { setup: { steps: props.steps } })\n\t\treturn { isBoard, setupStatus: status, setupStatusLoading: loading }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tchoiceModel: {},\n\t\t\tchoiceValues: {},\n\t\t\tconfigModel: {},\n\t\t\trunning: {},\n\t\t\tactionResult: {},\n\t\t\tlocalDone: {},\n\t\t\tuserTouched: {},\n\t\t\t// Per-card load state for `loadAction` steps, keyed by `loadKey()`.\n\t\t\tdatasetRunning: {},\n\t\t\tdatasetResult: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The title actually rendered by CnWizardDialog: \"Set up {appName}\"\n\t\t * when a display name was passed, otherwise whatever `dialogTitle`\n\t\t * resolves to (a caller override, or its own generic default).\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedDialogTitle() {\n\t\t\treturn this.appName\n\t\t\t\t? t('nextcloud-vue', 'Set up {app}', { app: this.appName })\n\t\t\t\t: this.dialogTitle\n\t\t},\n\n\t\t/**\n\t\t * Every well-formed step, before `requires` is applied.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tdeclaredSteps() {\n\t\t\treturn (this.steps || []).filter((s) => s && s.id && s.type)\n\t\t},\n\n\t\t/**\n\t\t * Steps that declare `requires` on an app that is not installed and\n\t\t * enabled. They are not offered; the summary names them as skipped.\n\t\t *\n\t\t * @return {Array<{ step: object, missing: Array<string> }>}\n\t\t * @spec openspec/changes/setup-wizard-card-load-and-dependency-gate/specs/cn-setup-wizard/spec.md#requirement-the-wizard-checks-dependencies-before-any-step\n\t\t * @spec openspec/changes/optional-step-requires/specs/cn-setup-wizard/spec.md#requirement-a-step-whose-required-apps-are-absent-is-not-applicable\n\t\t */\n\t\tskippedSteps() {\n\t\t\treturn this.declaredSteps\n\t\t\t\t.filter((s) => Array.isArray(s.requires) && s.requires.length > 0)\n\t\t\t\t.map((step) => {\n\t\t\t\t\tconst known = Object.fromEntries(this.dependencyRows.map((d) => [d.id, d]))\n\t\t\t\t\tconst missing = missingRequiredApps(step.requires, this.serverAppStatuses)\n\t\t\t\t\t\t.map((row) => (known[row.id] || row).name || row.id)\n\t\t\t\t\treturn { step, missing }\n\t\t\t\t})\n\t\t\t\t.filter((entry) => entry.missing.length > 0)\n\t\t},\n\n\t\tsetupSteps() {\n\t\t\tconst skipped = new Set(this.skippedSteps.map((entry) => entry.step.id))\n\t\t\treturn this.declaredSteps.filter((s) => !skipped.has(s.id))\n\t\t},\n\n\t\t/**\n\t\t * Id of the first offered step: where the optional-apps note shows.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tfirstStepId() {\n\t\t\treturn this.setupSteps.length > 0 ? this.setupSteps[0].id : ''\n\t\t},\n\n\t\t/**\n\t\t * The dependency declarations to check: the prop, else the manifest's.\n\t\t *\n\t\t * @return {Array<string|object>}\n\t\t */\n\t\tdependencyEntries() {\n\t\t\tif (Array.isArray(this.dependencies) && this.dependencies.length > 0) {\n\t\t\t\treturn this.dependencies\n\t\t\t}\n\t\t\tconst fromManifest = this.cnManifest && this.cnManifest.dependencies\n\t\t\treturn Array.isArray(fromManifest) ? fromManifest : []\n\t\t},\n\n\t\t/**\n\t\t * The `dependency_statuses` initial state an app may inject from PHP.\n\t\t * Same source CnAppRoot reads; `{}` when the app injects none.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tserverAppStatuses() {\n\t\t\treturn readServerAppStatuses(this.appId)\n\t\t},\n\n\t\t/**\n\t\t * The declared dependencies with their live status.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tdependencyRows() {\n\t\t\treturn checkDependencies(this.dependencyEntries, this.serverAppStatuses)\n\t\t},\n\n\t\t/** @return {Array<object>} Required dependencies that are missing or disabled. */\n\t\tmissingRequired() {\n\t\t\treturn this.dependencyRows.filter((d) => d.required && !isDependencyResolved(d))\n\t\t},\n\n\t\t/** @return {Array<object>} Optional dependencies that are missing or disabled. */\n\t\tmissingOptional() {\n\t\t\treturn this.dependencyRows.filter((d) => !d.required && !isDependencyResolved(d))\n\t\t},\n\n\t\t/**\n\t\t * Whether a required app is missing, so the wizard shows the\n\t\t * dependency list instead of its steps and refuses to continue.\n\t\t *\n\t\t * @return {boolean}\n\t\t * @spec openspec/changes/setup-wizard-card-load-and-dependency-gate/specs/cn-setup-wizard/spec.md#requirement-the-wizard-checks-dependencies-before-any-step\n\t\t */\n\t\tdependencyBlocked() {\n\t\t\treturn this.missingRequired.length > 0\n\t\t},\n\n\t\tdependencyStepSlot() {\n\t\t\treturn 'step-' + DEPENDENCY_STEP_ID\n\t\t},\n\n\t\tdependencySectionName() {\n\t\t\treturn t('nextcloud-vue', 'Apps this app needs')\n\t\t},\n\n\t\tdependencyBlockedText() {\n\t\t\treturn t('nextcloud-vue', 'Setup can start once these apps are installed and enabled: {apps}.', {\n\t\t\t\tapps: this.missingRequired.map((d) => d.name).join(', '),\n\t\t\t})\n\t\t},\n\n\t\toptionalMissingText() {\n\t\t\treturn t('nextcloud-vue', 'Optional, not installed: {apps}. You can add them later.', {\n\t\t\t\tapps: this.missingOptional.map((d) => d.name).join(', '),\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Whether the current user is a Nextcloud admin; only admins get the\n\t\t * install and enable buttons.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisAdmin() {\n\t\t\ttry {\n\t\t\t\tconst user = getCurrentUser()\n\t\t\t\treturn !!(user && user.isAdmin)\n\t\t\t} catch {\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\n\t\twizardSteps() {\n\t\t\tif (this.dependencyBlocked) {\n\t\t\t\treturn [{\n\t\t\t\t\tid: DEPENDENCY_STEP_ID,\n\t\t\t\t\tlabel: t('nextcloud-vue', 'Required apps'),\n\t\t\t\t\toptional: false,\n\t\t\t\t}]\n\t\t\t}\n\t\t\treturn this.setupSteps.map((s) => ({\n\t\t\t\tid: s.id,\n\t\t\t\tlabel: this.stepTitle(s),\n\t\t\t\toptional: s.required !== true,\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Recap rows for the `summary` step — one per non-summary step, with\n\t\t * the value the user selected (choice label / config field values) and\n\t\t * a done marker (info steps always done; choice steps done when picked;\n\t\t * run-action steps done when the action succeeded).\n\t\t *\n\t\t * An on-demand step (`onDemand: true`) is the exception: it is done\n\t\t * only when its action succeeded in THIS session. Apps report such a\n\t\t * step as `done` on purpose so it never auto-runs (learniq's \"Remove\n\t\t * the example data\"), and reading that flag here ticked a removal\n\t\t * nobody ran. When it did not run it gets `notRun: true` and the value\n\t\t * \"Not run\" instead.\n\t\t *\n\t\t * @return {Array<{ id: string, title: string, value: string, done: boolean, notRun: boolean }>}\n\t\t */\n\t\tsummaryItems() {\n\t\t\tconst skipped = this.skippedSteps\n\t\t\t\t.filter((entry) => entry.step.type !== 'summary' && entry.step.type !== 'info')\n\t\t\t\t.map((entry) => ({\n\t\t\t\t\tid: entry.step.id,\n\t\t\t\t\ttitle: this.stepTitle(entry.step),\n\t\t\t\t\tvalue: t('nextcloud-vue', 'Skipped, needs {apps}', { apps: entry.missing.join(', ') }),\n\t\t\t\t\tdone: false,\n\t\t\t\t\tnotRun: true,\n\t\t\t\t}))\n\t\t\treturn this.setupSteps\n\t\t\t\t.filter((s) => s.type !== 'summary')\n\t\t\t\t.map((step) => {\n\t\t\t\t\tlet value = ''\n\t\t\t\t\tif (step.type === 'choice') {\n\t\t\t\t\t\tconst raw = this.choiceModel[step.id]\n\t\t\t\t\t\tif (Array.isArray(raw)) {\n\t\t\t\t\t\t\tvalue = raw.map((o) => this.choiceLabel(step, o)).join(', ')\n\t\t\t\t\t\t} else if (raw !== null && raw !== undefined && raw !== '') {\n\t\t\t\t\t\t\tvalue = this.choiceLabel(step, raw)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (step.type === 'config-fields') {\n\t\t\t\t\t\t// Only the fields the reader filled in: a row of empty\n\t\t\t\t\t\t// \"Name: , KvK: ,\" reads as broken, not as \"not set\".\n\t\t\t\t\t\tvalue = this.fieldsFor(step)\n\t\t\t\t\t\t\t.filter((f) => {\n\t\t\t\t\t\t\t\tconst v = this.configModel[f.key]\n\t\t\t\t\t\t\t\treturn v !== null && v !== undefined && String(v).trim() !== ''\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.map((f) => `${f.label}: ${this.configModel[f.key]}`)\n\t\t\t\t\t\t\t.join(', ') || t('nextcloud-vue', 'Not set')\n\t\t\t\t\t}\n\t\t\t\t\tif (this.isOnDemand(step)) {\n\t\t\t\t\t\tconst ran = this.ranThisSession(step.id)\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid: step.id,\n\t\t\t\t\t\t\ttitle: this.stepTitle(step),\n\t\t\t\t\t\t\tvalue: ran ? '' : t('nextcloud-vue', 'Not run'),\n\t\t\t\t\t\t\tdone: ran,\n\t\t\t\t\t\t\tnotRun: !ran,\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlet done\n\t\t\t\t\tif (step.type === 'info') {\n\t\t\t\t\t\tdone = true\n\t\t\t\t\t} else if (step.type === 'choice') {\n\t\t\t\t\t\tdone = this.hasChoice(step) || this.isServerDone(step.id)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdone = this.isStepDone(step.id)\n\t\t\t\t\t}\n\t\t\t\t\treturn { id: step.id, title: this.stepTitle(step), value, done, notRun: false }\n\t\t\t\t})\n\t\t\t\t.concat(skipped)\n\t\t},\n\n\t\t/**\n\t\t * Id of the step the wizard should open on when RESUMING: the first\n\t\t * non-`info`/`summary` step not already done, per the CURRENT session's\n\t\t * local state OR the server-reported `completedStepIds` (a prior\n\t\t * session). Falls back to `''` (CnWizardDialog's own first-step default)\n\t\t * on a fresh setup and when every actionable step is already done.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tinitialStepId() {\n\t\t\t// Fresh setup — nothing done anywhere yet, so there is nothing to\n\t\t\t// resume past. Start at step one so a leading `info`/welcome step is\n\t\t\t// actually seen; resuming is only for returning sessions.\n\t\t\tif (this.completedStepIds.length === 0) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\t// An on-demand step is never outstanding work, so it is never the\n\t\t\t// step to resume on.\n\t\t\tconst actionable = this.setupSteps.filter((s) => s.type !== 'info' && s.type !== 'summary' && !this.isOnDemand(s))\n\t\t\tconst firstUnmetIndex = actionable.findIndex((s) => {\n\t\t\t\tif (s.type === 'choice') {\n\t\t\t\t\treturn !(this.hasChoice(s) || this.isServerDone(s.id))\n\t\t\t\t}\n\t\t\t\treturn !this.isStepDone(s.id)\n\t\t\t})\n\t\t\t// Done is not the same as seen: an app that pre-satisfies a step at\n\t\t\t// install time (buildiq seeds templates from a repair step) reports it\n\t\t\t// done before anyone opens the wizard. Only finished work BEFORE the\n\t\t\t// outstanding step means there is something to resume past.\n\t\t\tif (firstUnmetIndex <= 0) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn actionable[firstUnmetIndex].id\n\t\t},\n\t},\n\n\tmounted() {\n\t\t// Covers a RESUMED wizard opening straight onto its run-action step\n\t\t// (`initialStepId`) — `onStepChange` only fires on later navigation,\n\t\t// so a step already active at mount time needs its own trigger.\n\t\tthis.maybeAutoRunStep(this.initialStepId || (this.setupSteps[0] && this.setupSteps[0].id))\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Start a `run-action` step's action automatically the moment it\n\t\t * becomes current, instead of waiting for a manual \"Run\" click —\n\t\t * the step has nothing else for the user to decide by then (the\n\t\t * choice it acts on was already made on an earlier step), so\n\t\t * requiring a click before showing progress just adds a stall.\n\t\t * No-ops for any other step type, or one already run/running, and\n\t\t * never fires an on-demand step (`onDemand: true`): those run only\n\t\t * when the user clicks Run.\n\t\t *\n\t\t * @param {string} stepId The step id becoming current.\n\t\t * @return {void}\n\t\t */\n\t\tmaybeAutoRunStep(stepId) {\n\t\t\t// Nothing runs while a required app is missing: every action\n\t\t\t// would fail with an error that does not name the app.\n\t\t\tif (this.dependencyBlocked) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst step = this.setupSteps.find((s) => s.id === stepId)\n\t\t\tif (step && step.type === 'run-action' && !this.isOnDemand(step) && !this.isStepDone(step.id) && !this.running[step.id]) {\n\t\t\t\tthis.runAction(step)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The visible title for a step, resolved through the host app's\n\t\t * translation function.\n\t\t *\n\t\t * `manifest.setup.steps[].title` is authored in English as the\n\t\t * canonical source, exactly like the schema property titles this\n\t\t * component already routes through `cnTranslate` for field labels\n\t\t * (see `fieldsFromSchema` below). The step titles were the one\n\t\t * remaining place rendering the manifest string verbatim, so an\n\t\t * nl-locale user saw a wizard whose field labels were translated and\n\t\t * whose step headings were not.\n\t\t *\n\t\t * Falls back to the step id when a step declares no title, which is\n\t\t * the same fallback the raw bindings used.\n\t\t *\n\t\t * @param {object} step A `manifest.setup.steps[]` entry.\n\t\t * @return {string} The translated title, or the step id.\n\t\t */\n\t\tstepTitle(step) {\n\t\t\tconst raw = (step && step.title) || (step && step.id) || ''\n\t\t\treturn raw === '' ? '' : this.cnTranslate(raw)\n\t\t},\n\n\t\t/**\n\t\t * The visible body for a step, resolved through the host app's\n\t\t * translation function.\n\t\t *\n\t\t * 🔴 THIS USED TO RENDER THE MANIFEST STRING VERBATIM, IN FOUR PLACES.\n\t\t * `stepTitle()` was routed through `cnTranslate` and the body was not,\n\t\t * so a wizard on a Dutch instance showed a translated heading over an\n\t\t * English paragraph, with translated Cancel/Next buttons underneath.\n\t\t * That reads as a bug rather than as a missing string, and the app could\n\t\t * not fix it: decidiq shipped correct Dutch for its setup copy in\n\t\t * `l10n/nl.json`, and the component never asked for it.\n\t\t *\n\t\t * @param {object} step The step declaration.\n\t\t * @return {string} The translated body, or ''.\n\t\t */\n\t\tstepBody(step) {\n\t\t\tconst raw = (step && step.body) || ''\n\t\t\treturn raw === '' ? '' : this.cnTranslate(raw)\n\t\t},\n\n\t\t/**\n\t\t * The footnote under a choice step's options, from the step's `note`\n\t\t * (or `footnote`), translated like the body.\n\t\t *\n\t\t * @param {object} step The step declaration.\n\t\t * @return {string} The translated footnote, or ''.\n\t\t */\n\t\tstepNote(step) {\n\t\t\tconst raw = (step && (step.note || step.footnote)) || ''\n\t\t\treturn raw === '' ? '' : this.cnTranslate(raw)\n\t\t},\n\n\t\tstepSlot(step) {\n\t\t\treturn 'step-' + step.id\n\t\t},\n\n\t\thasCustomSlot(id) {\n\t\t\treturn !!this.$slots['step-' + id] || !!this.$slots['step-' + id]\n\t\t},\n\n\t\tfieldsFor(step) {\n\t\t\tif (step.schema && typeof step.schema === 'object') {\n\t\t\t\treturn fieldsFromSchema(step.schema, { translate: this.cnTranslate })\n\t\t\t}\n\t\t\t// Fallback: a plain text field per declared config key.\n\t\t\treturn (step.configKeys || []).map((key) => ({ key, label: key, widget: 'text' }))\n\t\t},\n\n\t\t/**\n\t\t * Options for a `choice` step. When the step declares `dependsOn`\n\t\t * (a parent step's configKey) + `optionsByParent`, the option list\n\t\t * is the entry keyed by the parent's currently-selected value — this\n\t\t * is the country → organisation-type cascade. Otherwise the static\n\t\t * `options` array.\n\t\t *\n\t\t * @param {object} step The choice step definition.\n\t\t * @return {Array} The option list to render.\n\t\t */\n\t\toptionsFor(step) {\n\t\t\tlet options = step.options || []\n\t\t\tif (step.optionsSource) {\n\t\t\t\toptions = this.sourcedOptions(step)\n\t\t\t} else if (step.dependsOn && step.optionsByParent) {\n\t\t\t\tconst parentValue = this.choiceValues[step.dependsOn]\n\t\t\t\toptions = (parentValue === null || parentValue === undefined || parentValue === '')\n\t\t\t\t\t? []\n\t\t\t\t\t: (step.optionsByParent[parentValue] || [])\n\t\t\t}\n\t\t\t// The LABEL is translated, the VALUE never is. `scalarChoice()` reads\n\t\t\t// `.value` and that is what reaches `POST /api/setup/config`, so a\n\t\t\t// translated label cannot change what gets stored — while an\n\t\t\t// untranslated one leaves the choice itself in English on a\n\t\t\t// localised instance, which is the half-translated screen this fix\n\t\t\t// exists to remove.\n\t\t\treturn options.map((option) => {\n\t\t\t\tif (!option || typeof option !== 'object' || !option.label) {\n\t\t\t\t\treturn option\n\t\t\t\t}\n\t\t\t\tconst translated = { ...option, label: this.cnTranslate(option.label) }\n\t\t\t\tif (option.description) {\n\t\t\t\t\ttranslated.description = this.cnTranslate(option.description)\n\t\t\t\t}\n\t\t\t\treturn translated\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The option list a `choice` step declares `optionsSource` for, read\n\t\t * from the setup status document the app already serves.\n\t\t *\n\t\t * `optionsSource` names a key in that document (dots walk into nested\n\t\t * objects), and the entries are normalised to the option shape: `id` is\n\t\t * accepted for `value`, `name` for `label`, and a bare `objectCount`\n\t\t * becomes the one stat a card shows. A server that already sends\n\t\t * `stats` keeps them.\n\t\t *\n\t\t * @param {object} step The choice step declaring `optionsSource`.\n\t\t * @return {Array<object>} The options, or [] while the status is loading.\n\t\t */\n\t\tsourcedOptions(step) {\n\t\t\tlet node = this.setupStatus\n\t\t\tfor (const key of String(step.optionsSource).split('.')) {\n\t\t\t\tif (node === null || node === undefined || typeof node !== 'object') {\n\t\t\t\t\treturn []\n\t\t\t\t}\n\t\t\t\tnode = node[key]\n\t\t\t}\n\t\t\tif (!Array.isArray(node)) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn node\n\t\t\t\t.filter((entry) => entry && typeof entry === 'object')\n\t\t\t\t.map((entry) => {\n\t\t\t\t\tconst value = entry.value !== undefined ? entry.value : entry.id\n\t\t\t\t\tconst option = {\n\t\t\t\t\t\t...entry,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tlabel: entry.label || entry.name || String(value),\n\t\t\t\t\t}\n\t\t\t\t\tif (!option.stats && typeof entry.objectCount === 'number' && entry.objectCount > 0) {\n\t\t\t\t\t\toption.stats = [{ label: t('nextcloud-vue', 'Objects'), value: entry.objectCount }]\n\t\t\t\t\t}\n\t\t\t\t\treturn option\n\t\t\t\t})\n\t\t\t\t.filter((option) => option.value !== undefined)\n\t\t},\n\n\t\t/**\n\t\t * Whether a choice step renders as a card grid rather than a dropdown.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @return {boolean} True for `display: \"cards\"`.\n\t\t */\n\t\tisCardChoice(step) {\n\t\t\treturn step.display === 'cards'\n\t\t},\n\n\t\t/**\n\t\t * Whether this step is still waiting for its live option list.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @return {boolean} True while the status document is in flight.\n\t\t */\n\t\tisOptionsLoading(step) {\n\t\t\treturn !!step.optionsSource && this.setupStatusLoading === true\n\t\t},\n\n\t\t/**\n\t\t * The card grid's model: plain values, not the option objects NcSelect\n\t\t * binds. `scalarChoice` already reduces either shape to values, so both\n\t\t * renderers can share one `choiceModel` entry.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @return {unknown} The selected value, or [] / null when nothing is picked.\n\t\t */\n\t\tcardModel(step) {\n\t\t\tconst value = this.scalarChoice(step)\n\t\t\tif (step.multiple === true) {\n\t\t\t\treturn Array.isArray(value) ? value : []\n\t\t\t}\n\t\t\treturn value === undefined ? null : value\n\t\t},\n\n\t\tisChoiceDisabled(step) {\n\t\t\tif (!step.dependsOn) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst parentValue = this.choiceValues[step.dependsOn]\n\t\t\treturn parentValue === null || parentValue === undefined || parentValue === ''\n\t\t},\n\n\t\tdependsOnHint(step) {\n\t\t\tconst parent = this.setupSteps.find((s) => s.configKey === step.dependsOn)\n\t\t\tconst label = parent ? (parent.title || parent.id) : step.dependsOn\n\t\t\treturn t('nextcloud-vue', 'Select \"{step}\" first.', { step: label })\n\t\t},\n\n\t\t/**\n\t\t * The visible label for one selected choice entry.\n\t\t *\n\t\t * A card grid stores plain VALUES where NcSelect stores option objects,\n\t\t * so the recap looked one up and printed the other: the summary read\n\t\t * \"municipality\" instead of \"Municipality\". Resolves a bare value back\n\t\t * to its option, and falls back to the value when the option list is\n\t\t * not (yet) available.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @param {unknown} entry One selected entry: an option object or a value.\n\t\t * @return {string} The label to show.\n\t\t */\n\t\tchoiceLabel(step, entry) {\n\t\t\tif (entry && typeof entry === 'object' && entry.label) {\n\t\t\t\treturn entry.label\n\t\t\t}\n\t\t\tconst match = this.optionsFor(step).find((o) => o && String(o.value) === String(entry))\n\t\t\treturn (match && match.label) ? match.label : String(entry)\n\t\t},\n\n\t\thasChoice(step) {\n\t\t\tconst v = this.choiceModel[step.id]\n\t\t\tif (step.multiple === true) {\n\t\t\t\treturn Array.isArray(v) && v.length > 0\n\t\t\t}\n\t\t\treturn v !== null && v !== undefined && v !== ''\n\t\t},\n\n\t\tscalarChoice(step) {\n\t\t\tconst raw = this.choiceModel[step.id]\n\t\t\tif (step.multiple === true) {\n\t\t\t\treturn (raw || []).map((o) => (o && o.value !== undefined ? o.value : o))\n\t\t\t}\n\t\t\treturn raw && raw.value !== undefined ? raw.value : raw\n\t\t},\n\n\t\tonChoice(step, value) {\n\t\t\tthis.userTouched[step.id] = true\n\t\t\tthis.choiceModel[step.id] = value\n\t\t\tif (step.configKey) {\n\t\t\t\tthis.choiceValues[step.configKey] = this.scalarChoice(step)\n\t\t\t}\n\t\t\t// Reset any dependent child choices when the parent changes.\n\t\t\tfor (const child of this.setupSteps) {\n\t\t\t\tif (child.dependsOn && child.dependsOn === step.configKey) {\n\t\t\t\t\tthis.choiceModel[child.id] = child.multiple === true ? [] : null\n\t\t\t\t\tthis.userTouched[child.id] = false\n\t\t\t\t\tif (child.configKey) {\n\t\t\t\t\t\tthis.choiceValues[child.configKey] = ''\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Re-apply auto-suggestions for steps that derive a default from this one.\n\t\t\tfor (const dep of this.setupSteps) {\n\t\t\t\tif (dep.suggestFrom && dep.suggestFrom === step.configKey) {\n\t\t\t\t\tthis.applySuggestion(dep)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Auto-fill a `choice` step's suggested default from an earlier choice\n\t\t * (its `suggestFrom` configKey → `suggestMap[parentValue]`). No-op once\n\t\t * the user has manually picked here, so a suggestion never clobbers an\n\t\t * explicit choice.\n\t\t *\n\t\t * @param {object} step The dependent choice step.\n\t\t * @return {void}\n\t\t */\n\t\tapplySuggestion(step) {\n\t\t\tif (this.userTouched[step.id] === true) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst parentValue = this.choiceValues[step.suggestFrom]\n\t\t\tif (parentValue === null || parentValue === undefined || parentValue === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst wanted = (step.suggestMap || {})[parentValue]\n\t\t\tif (wanted === null || wanted === undefined) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst opt = this.optionsFor(step).find((o) => o.value === wanted) || { value: wanted, label: String(wanted) }\n\t\t\tthis.choiceModel[step.id] = opt\n\t\t\tif (step.configKey) {\n\t\t\t\tthis.choiceValues[step.configKey] = wanted\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * CnWizardDialog `validate` hook — intercepts Next/Submit to persist\n\t\t * the active step before advancing. `choice`/`config-fields` steps\n\t\t * POST their value via the setup contract; required `choice` steps\n\t\t * block advance until a value is picked; required `run-action` steps\n\t\t * block until the action has succeeded. Returns `true` to advance or\n\t\t * an error string to surface above the step and block navigation.\n\t\t *\n\t\t * @param {string} stepId The active step id.\n\t\t * @return {Promise<boolean|string>} True to advance, or an error message.\n\t\t */\n\t\tasync validateStep(stepId) {\n\t\t\tconst step = this.setupSteps.find((s) => s.id === stepId)\n\t\t\tif (!step) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (step.type === 'choice') {\n\t\t\t\tif (!this.hasChoice(step)) {\n\t\t\t\t\t// Already persisted server-side and the user only back-navigated\n\t\t\t\t\t// onto it — `choiceModel` is blank because it's session-local, not\n\t\t\t\t\t// because nothing is set. Don't force a re-pick, and don't re-POST.\n\t\t\t\t\tif (this.isServerDone(step.id)) {\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t\treturn step.required === true\n\t\t\t\t\t\t? t('nextcloud-vue', 'Please make a selection to continue.')\n\t\t\t\t\t\t: true\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tawait this.saveConfig({ [step.configKey]: this.scalarChoice(step) })\n\t\t\t\t\tthis.localDone[step.id] = true\n\t\t\t\t\treturn true\n\t\t\t\t} catch (err) {\n\t\t\t\t\treturn this.errorMessage(err)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (step.type === 'config-fields') {\n\t\t\t\ttry {\n\t\t\t\t\tconst patch = {}\n\t\t\t\t\tfor (const field of this.fieldsFor(step)) {\n\t\t\t\t\t\tpatch[field.key] = this.configModel[field.key]\n\t\t\t\t\t}\n\t\t\t\t\tawait this.saveConfig(patch)\n\t\t\t\t\tthis.localDone[step.id] = true\n\t\t\t\t\treturn true\n\t\t\t\t} catch (err) {\n\t\t\t\t\treturn this.errorMessage(err)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (step.type === 'run-action' && step.required === true && !this.isStepDone(step.id)) {\n\t\t\t\treturn t('nextcloud-vue', 'Please run this step before continuing.')\n\t\t\t}\n\t\t\treturn true\n\t\t},\n\n\t\t/**\n\t\t * Persist one or more app-config values via the setup contract.\n\t\t *\n\t\t * @param {object} patch `{ <configKey>: value }` to write.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync saveConfig(patch) {\n\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\timport('@nextcloud/router'),\n\t\t\t])\n\t\t\tawait axios.post(generateUrl(`/apps/${this.appId}/api/setup/config`), patch)\n\t\t},\n\n\t\tasync runAction(step) {\n\t\t\tthis.running[step.id] = true\n\t\t\tthis.actionResult[step.id] = null\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst { data } = await axios.post(generateUrl(`/apps/${this.appId}/api/setup/action/${step.action}`))\n\t\t\t\tconst result = {\n\t\t\t\t\tsuccess: data && data.success !== false,\n\t\t\t\t\tmessage: (data && data.message) || t('nextcloud-vue', 'Done.'),\n\t\t\t\t}\n\t\t\t\tthis.actionResult[step.id] = result\n\t\t\t\tif (result.success) {\n\t\t\t\t\tthis.localDone[step.id] = true\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * @event action-result Emitted when a `run-action` step finishes.\n\t\t\t\t * @type {{ stepId: string, action: string, success: boolean, message: string }}\n\t\t\t\t */\n\t\t\t\tthis.$emit('action-result', { stepId: step.id, action: step.action, ...result })\n\t\t\t} catch (err) {\n\t\t\t\tthis.actionResult[step.id] = { success: false, message: this.errorMessage(err) }\n\t\t\t\tthis.$emit('action-result', { stepId: step.id, action: step.action, success: false, message: this.errorMessage(err) })\n\t\t\t} finally {\n\t\t\t\tthis.running[step.id] = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Key for one card's load state.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @param {object} option The card's option.\n\t\t * @return {string}\n\t\t */\n\t\tloadKey(step, option) {\n\t\t\treturn step.id + '::' + String(option && option.value)\n\t\t},\n\n\t\t/**\n\t\t * Whether a card gets a Load button: the step declares `loadAction`\n\t\t * and the option is not the \"seed nothing\" answer.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @param {object} option The card's option.\n\t\t * @return {boolean}\n\t\t * @spec openspec/changes/setup-wizard-card-load-and-dependency-gate/specs/cn-setup-wizard/spec.md#requirement-a-dataset-card-loads-itself\n\t\t */\n\t\tisLoadableOption(step, option) {\n\t\t\treturn !!(step && step.loadAction) && !!option && String(option.value) !== NONE_DATASET\n\t\t},\n\n\t\tisDatasetLoading(step, option) {\n\t\t\treturn this.datasetRunning[this.loadKey(step, option)] === true\n\t\t},\n\n\t\tdatasetResultFor(step, option) {\n\t\t\treturn this.datasetResult[this.loadKey(step, option)] || null\n\t\t},\n\n\t\tloadButtonLabel(step, option) {\n\t\t\tif (this.isDatasetLoading(step, option)) {\n\t\t\t\treturn this.runningLabel\n\t\t\t}\n\t\t\tconst result = this.datasetResultFor(step, option)\n\t\t\treturn (result && result.success) ? this.reloadLabel : this.loadLabel\n\t\t},\n\n\t\tloadAriaLabel(option) {\n\t\t\treturn t('nextcloud-vue', 'Load {name}', { name: option.label })\n\t\t},\n\n\t\t/**\n\t\t * Load one dataset from its card: POST `{ dataset }` to the step's\n\t\t * `loadAction`, spinner on the button while it runs, the result on the\n\t\t * card after. A successful load also selects the card, so the summary\n\t\t * and the stored choice name what was loaded.\n\t\t *\n\t\t * @param {object} step The choice step declaring `loadAction`.\n\t\t * @param {object} option The card's option.\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/setup-wizard-card-load-and-dependency-gate/specs/cn-setup-wizard/spec.md#requirement-a-dataset-card-loads-itself\n\t\t */\n\t\tasync loadDataset(step, option) {\n\t\t\tif (!this.isLoadableOption(step, option) || this.isDatasetLoading(step, option)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst key = this.loadKey(step, option)\n\t\t\tthis.datasetRunning[key] = true\n\t\t\tthis.datasetResult[key] = null\n\t\t\tlet result\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst { data } = await axios.post(\n\t\t\t\t\tgenerateUrl(`/apps/${this.appId}/api/setup/action/${step.loadAction}`),\n\t\t\t\t\t{ dataset: option.value },\n\t\t\t\t)\n\t\t\t\tresult = {\n\t\t\t\t\tsuccess: !!data && data.success !== false,\n\t\t\t\t\tmessage: (data && data.message) || t('nextcloud-vue', 'Loaded.'),\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tresult = { success: false, message: this.errorMessage(err) }\n\t\t\t} finally {\n\t\t\t\tthis.datasetRunning[key] = false\n\t\t\t}\n\t\t\tthis.datasetResult[key] = result\n\t\t\tif (result.success) {\n\t\t\t\tthis.selectLoadedOption(step, option)\n\t\t\t\tthis.localDone[step.id] = true\n\t\t\t}\n\t\t\tthis.$emit('action-result', {\n\t\t\t\tstepId: step.id,\n\t\t\t\taction: step.loadAction,\n\t\t\t\tdataset: option.value,\n\t\t\t\t...result,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Select a card that just loaded, adding to (never replacing) the\n\t\t * selection of a `multiple` step.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @param {object} option The loaded option.\n\t\t * @return {void}\n\t\t */\n\t\tselectLoadedOption(step, option) {\n\t\t\tif (step.multiple === true) {\n\t\t\t\tconst current = this.cardModel(step)\n\t\t\t\tif (current.some((v) => String(v) === String(option.value))) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.onChoice(step, current.concat([option.value]))\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.onChoice(step, option.value)\n\t\t},\n\n\t\t/**\n\t\t * A required app was installed from the dependency list. A new app's\n\t\t * scripts and its `OC.appswebroots` entry exist only after a full page\n\t\t * load, and `useAppStatus` caches per page, so reload.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonDependencyInstalled() {\n\t\t\twindow.location.reload()\n\t\t},\n\n\t\t/**\n\t\t * Whether a step is marked on-demand (`onDemand: true`): it runs only\n\t\t * when the user asks, never automatically, and the summary ticks it\n\t\t * only when it ran in this session.\n\t\t *\n\t\t * @param {object} step The manifest step.\n\t\t * @return {boolean}\n\t\t */\n\t\tisOnDemand(step) {\n\t\t\treturn !!step && step.onDemand === true\n\t\t},\n\n\t\t/**\n\t\t * Whether a step's action succeeded in the CURRENT session, ignoring\n\t\t * whatever the server reports.\n\t\t *\n\t\t * @param {string} id Step id.\n\t\t * @return {boolean}\n\t\t */\n\t\tranThisSession(id) {\n\t\t\treturn !!(this.actionResult[id] && this.actionResult[id].success)\n\t\t},\n\n\t\tisStepDone(id) {\n\t\t\treturn this.isServerDone(id) || this.localDone[id] === true || (this.actionResult[id] && this.actionResult[id].success)\n\t\t},\n\n\t\t/**\n\t\t * Whether the server already reported this step done in a prior\n\t\t * session, via the `completedStepIds` prop.\n\t\t *\n\t\t * @param {string} id Step id.\n\t\t * @return {boolean}\n\t\t */\n\t\tisServerDone(id) {\n\t\t\treturn this.completedStepIds.includes(id)\n\t\t},\n\n\t\tonSubmit() {\n\t\t\tif (this.$refs.wizard && this.$refs.wizard.setResult) {\n\t\t\t\tthis.$refs.wizard.setResult({ success: true, message: this.successText })\n\t\t\t}\n\t\t\t/**\n\t\t\t * @event complete Emitted when the last step is submitted (setup finished).\n\t\t\t */\n\t\t\tthis.$emit('complete')\n\t\t},\n\n\t\tonStepChange(payload) {\n\t\t\t// Pre-fill a suggested default when entering a step that derives one.\n\t\t\tconst step = this.setupSteps.find((s) => s.id === payload.stepId)\n\t\t\tif (step && step.suggestFrom) {\n\t\t\t\tthis.applySuggestion(step)\n\t\t\t}\n\t\t\tthis.maybeAutoRunStep(payload.stepId)\n\t\t\t/**\n\t\t\t * @event step-change Emitted when the active step changes.\n\t\t\t * @type {{ stepId: string, stepIndex: number, direction: string }}\n\t\t\t */\n\t\t\tthis.$emit('step-change', payload)\n\t\t},\n\n\t\tonClose() {\n\t\t\t/**\n\t\t\t * @event close Emitted when the dialog should close.\n\t\t\t */\n\t\t\tthis.$emit('close')\n\t\t},\n\n\t\terrorMessage(err) {\n\t\t\tconst data = err && err.response && err.response.data\n\t\t\tif (data && (data.message || data.error)) {\n\t\t\t\treturn data.message || data.error\n\t\t\t}\n\t\t\treturn (err && err.message) || t('nextcloud-vue', 'Something went wrong.')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-setup-step {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-setup-step__intro {\n\tmargin: 0;\n\tfont-size: 15px;\n\tline-height: 1.5;\n}\n\n.cn-setup-step__note {\n\tmargin: 0;\n\tfont-size: 13px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-setup-step__nav {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tgap: 8px;\n\tmargin-top: 8px;\n}\n\n.cn-setup-step__running {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 8px;\n\tpadding: 24px 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-setup-load-result {\n\tmargin: 0;\n\tfont-size: var(--font-size-small, 13px);\n}\n\n.cn-setup-load-result--success {\n\tcolor: var(--color-success-text, var(--color-success));\n}\n\n.cn-setup-load-result--error {\n\tcolor: var(--color-error-text, var(--color-error));\n}\n\n.cn-setup-field {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.cn-setup-summary {\n\tlist-style: none;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.cn-setup-summary__item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 4px 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-setup-summary__item--done {\n\tcolor: var(--color-main-text);\n}\n\n.cn-setup-summary__mark {\n\tfont-weight: bold;\n\tcolor: var(--color-success);\n}\n\n.cn-setup-summary__label {\n\tflex: 0 0 auto;\n}\n\n.cn-setup-summary__value {\n\tmargin-inline-start: auto;\n\tfont-weight: 600;\n\tcolor: var(--color-main-text);\n}\n\n/* An on-demand step that did not run says so quietly: it is a choice the\n user did not make, not a failure. */\n.cn-setup-summary__item--not-run .cn-setup-summary__value {\n\tfont-weight: normal;\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["_createBlock","_createVNode","_renderList","_withCtx","_createElementBlock","_renderSlot","_mergeProps","_createTextVNode","_toDisplayString","_Fragment","_openBlock","_normalizeClass","_createElementVNode"],"mappings":";;;AA6BQ,EAAA,KAAK,EAAC,eAAc;AAAE,EAAA,gBAAC,EAAA,cAAA;AAAA,EAAA,aAAA,EAAA,uBAAA;;;;;AA8CvB,EAAA,KAAA,EAAA,sBAAA;AAAA,EAAA,aAAA,EAAA,qBAAA;;;;AAqDA,EAAA,KAAA,EAAA,qBAAA;AAAA,EAAA,aAAA,EAAA,oBAAA;;;;AA+C0B,EAAA,KAAE,EAAA,wBAAA;;AAUzB,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,oBAAoB,GAAA;AAa5B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,kBAAkB,GAAA;AAMpB,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAwB,GAAA;AACjC,MA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AA,CAAA,IAAA,CAAA,IAAA,KAAA,SAAA;wCAAnBJ,kBAeM,CAAAK,QAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA;AAdK,4BAAA,CAAA,IAAA,CAAA,IAAA;8CAAZT,WAEG,CAAA,qBAAA,EAAA;;AAFS,kCAAA,IAAA,EAAA,MAAA;;mDACX,MAAoB;AAAjB,oCAAAO,eAAA,CAAAC,eAAA,CAAA,QAAA,CAAA,QAAQ,CAAC,IAAI,CAAA,CAAA,EAAA,CAAA,YAAA;;;;;+CAYd,gBAAA,EAAA;kEADG,CAAAC,QAAA,EAAA,IAAA,EAAAP,UAAA,CAPW,QAAY,CAAA,YAAA,EAAA,CAApB,IAAI,KAAA;uEAOP,CAAA,IAAA,EAAA;kCANH,GAAG,EAAE,IAAI,CAAC,EAAE;kCACb,KAAI,EAAAS,cAAA,CAAA,CAAE,wBAAwB,EACY,EAAA,8BAAA,EAAA,IAAI,CAAC,IAAK,EAAA,iCAAA,EAAQ,IAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;AAC5D,kCAAAC,kBAAA,CAAuE,MAAvE,EAAA,UAAuE,EAA/BJ,eAAA,CAAA,IAAI,CAAC,IAAI,GAAA,GAAA,GAAA,GAAA,CAAA,EAAA,CAAA,YAAA;AACjD,kCAAAI,kBAAA,CAAG,MAAH,EAAA,UAAG,EAAAJ,eAAA,CAAA,IAAA,CAAA,KAAA,CAAA,EAAA,CAAA,YAAA;AACD,kCAAA,CAAA,IAAA,CAAA,KAAA;AAAF,uCAAAE,SAAA,EAAA,EAAAN,kBAAA,CAAE,MAAF,EAAA,WAAE,EAAAI,eAAA,CAAA,IAAA,CAAA,KAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"CnSetupWizard.vue3.js","sources":["../../../../src/components/CnSetupWizard/CnSetupWizard.vue?vue&type=template&id=44988d3d&lang.js"],"sourcesContent":["<!-- SPDX-License-Identifier: EUPL-1.2 -->\n<!-- SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl> -->\n<template>\n\t<CnWizardDialog\n\t\tref=\"wizard\"\n\t\t:steps=\"wizardSteps\"\n\t\t:dialogTitle=\"resolvedDialogTitle\"\n\t\t:submitLabel=\"submitLabel\"\n\t\t:cancelLabel=\"cancelLabel\"\n\t\t:nextLabel=\"nextLabel\"\n\t\t:backLabel=\"backLabel\"\n\t\t:successText=\"successText\"\n\t\t:validate=\"validateStep\"\n\t\t:cancellable=\"cancellable\"\n\t\t:initialStep=\"dependencyBlocked ? '' : initialStepId\"\n\t\t:nextDisabled=\"dependencyBlocked\"\n\t\t@stepChange=\"onStepChange\"\n\t\t@submit=\"onSubmit\"\n\t\t@close=\"onClose\">\n\t\t<!-- This `<template v-for>` defines dynamic SLOTS, not a rendered list.\n\t\t `@vue/compiler-sfc` DISCARDS a `:key` on a slot-defining\n\t\t `<template>` (verified against the generated `createSlots` call)\n\t\t and honours it only on the child, so the rule's advice is inverted\n\t\t here — moving the key up would throw it away. -->\n\t\t<!-- A required app is missing: this is the only step, and Next stays\n\t\t disabled until the app is there. -->\n\t\t<template v-if=\"dependencyBlocked\" #[dependencyStepSlot]>\n\t\t\t<div class=\"cn-setup-step\" data-step-type=\"dependencies\" data-testid=\"cn-setup-dependencies\">\n\t\t\t\t<NcNoteCard type=\"warning\">\n\t\t\t\t\t{{ dependencyBlockedText }}\n\t\t\t\t</NcNoteCard>\n\t\t\t\t<CnLeafDependencySettings\n\t\t\t\t\t:appId=\"appId\"\n\t\t\t\t\t:dependencies=\"dependencyEntries\"\n\t\t\t\t\t:isAdmin=\"isAdmin\"\n\t\t\t\t\t:sectionName=\"dependencySectionName\"\n\t\t\t\t\tsectionDescription=\"\"\n\t\t\t\t\t@installed=\"onDependencyInstalled\" />\n\t\t\t</div>\n\t\t</template>\n\t\t<!-- eslint-disable vue/no-v-for-template-key-on-child -->\n\t\t<template v-for=\"step in setupSteps\" #[stepSlot(step)]=\"scope\">\n\t\t\t<div :key=\"step.id\" class=\"cn-setup-step\" :data-step-type=\"step.type\">\n\t\t\t\t<!-- Optional apps that are missing never block, but the admin\n\t\t\t\t reads about them once, on the first step. -->\n\t\t\t\t<NcNoteCard\n\t\t\t\t\tv-if=\"step.id === firstStepId && missingOptional.length > 0\"\n\t\t\t\t\ttype=\"info\"\n\t\t\t\t\tdata-testid=\"cn-setup-optional-dependencies\">\n\t\t\t\t\t{{ optionalMissingText }}\n\t\t\t\t</NcNoteCard>\n\t\t\t\t<!-- @slot step-{id} Override a step's body (for `component` steps or\n\t\t\t\t any bespoke step). Scope: the CnWizardDialog step scope plus\n\t\t\t\t `{ step, runAction, saveConfig }`. -->\n\t\t\t\t<slot\n\t\t\t\t\tv-if=\"hasCustomSlot(step.id)\"\n\t\t\t\t\t:name=\"stepSlot(step)\"\n\t\t\t\t\tv-bind=\"scope\"\n\t\t\t\t\t:step=\"step\"\n\t\t\t\t\t:runAction=\"() => runAction(step)\"\n\t\t\t\t\t:saveConfig=\"(patch) => saveConfig(patch)\" />\n\n\t\t\t\t<!-- info -->\n\t\t\t\t<template v-else-if=\"step.type === 'info'\">\n\t\t\t\t\t<NcNoteCard type=\"info\" :heading=\"stepTitle(step)\">\n\t\t\t\t\t\t{{ stepBody(step) }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t</template>\n\n\t\t\t\t<!-- choice -->\n\t\t\t\t<template v-else-if=\"step.type === 'choice'\">\n\t\t\t\t\t<!-- The board sets the intro as a plain paragraph above the\n\t\t\t\t\t cards (DqInstellen); the Nextcloud look keeps the note. -->\n\t\t\t\t\t<p v-if=\"step.body && isBoard\" class=\"cn-setup-step__intro\" data-testid=\"cn-setup-step-intro\">\n\t\t\t\t\t\t{{ stepBody(step) }}\n\t\t\t\t\t</p>\n\t\t\t\t\t<NcNoteCard v-else-if=\"step.body\" type=\"info\">\n\t\t\t\t\t\t{{ stepBody(step) }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t\t<CnChoiceCards\n\t\t\t\t\t\tv-if=\"isCardChoice(step)\"\n\t\t\t\t\t\t:label=\"stepTitle(step)\"\n\t\t\t\t\t\t:options=\"optionsFor(step)\"\n\t\t\t\t\t\t:multiple=\"step.multiple === true\"\n\t\t\t\t\t\t:disabled=\"isChoiceDisabled(step)\"\n\t\t\t\t\t\t:loading=\"isOptionsLoading(step)\"\n\t\t\t\t\t\t:modelValue=\"cardModel(step)\"\n\t\t\t\t\t\t@update:modelValue=\"(v) => onChoice(step, v)\">\n\t\t\t\t\t\t<!-- `loadAction`: every dataset card except \"none\" loads\n\t\t\t\t\t\t itself, so no separate run-action step is needed. -->\n\t\t\t\t\t\t<template v-if=\"step.loadAction\" #option-actions=\"{ option }\">\n\t\t\t\t\t\t\t<template v-if=\"isLoadableOption(step, option)\">\n\t\t\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t:disabled=\"isDatasetLoading(step, option)\"\n\t\t\t\t\t\t\t\t\t:aria-label=\"loadAriaLabel(option)\"\n\t\t\t\t\t\t\t\t\tdata-testid=\"cn-setup-load-dataset\"\n\t\t\t\t\t\t\t\t\t@click=\"loadDataset(step, option)\">\n\t\t\t\t\t\t\t\t\t<template v-if=\"isDatasetLoading(step, option)\" #icon>\n\t\t\t\t\t\t\t\t\t\t<NcLoadingIcon :size=\"20\" />\n\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t\t{{ loadButtonLabel(step, option) }}\n\t\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t\t\t<p\n\t\t\t\t\t\t\t\t\tv-if=\"datasetResultFor(step, option)\"\n\t\t\t\t\t\t\t\t\trole=\"status\"\n\t\t\t\t\t\t\t\t\tclass=\"cn-setup-load-result\"\n\t\t\t\t\t\t\t\t\t:class=\"datasetResultFor(step, option).success ? 'cn-setup-load-result--success' : 'cn-setup-load-result--error'\"\n\t\t\t\t\t\t\t\t\tdata-testid=\"cn-setup-load-result\">\n\t\t\t\t\t\t\t\t\t{{ datasetResultFor(step, option).message }}\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</CnChoiceCards>\n\t\t\t\t\t<NcSelect\n\t\t\t\t\t\tv-else\n\t\t\t\t\t\t:inputLabel=\"stepTitle(step)\"\n\t\t\t\t\t\t:options=\"optionsFor(step)\"\n\t\t\t\t\t\t:multiple=\"step.multiple === true\"\n\t\t\t\t\t\t:disabled=\"isChoiceDisabled(step)\"\n\t\t\t\t\t\tlabel=\"label\"\n\t\t\t\t\t\t:modelValue=\"choiceModel[step.id]\"\n\t\t\t\t\t\t@update:modelValue=\"(v) => onChoice(step, v)\" />\n\t\t\t\t\t<NcNoteCard v-if=\"isChoiceDisabled(step)\" type=\"warning\">\n\t\t\t\t\t\t{{ dependsOnHint(step) }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t\t<p v-if=\"stepNote(step)\" class=\"cn-setup-step__note\" data-testid=\"cn-setup-step-note\">\n\t\t\t\t\t\t{{ stepNote(step) }}\n\t\t\t\t\t</p>\n\t\t\t\t</template>\n\n\t\t\t\t<!-- config-fields -->\n\t\t\t\t<template v-else-if=\"step.type === 'config-fields'\">\n\t\t\t\t\t<!-- The step's intro, drawn like choice and run-action steps.\n\t\t\t\t\t It was left out here, so pipelinq's organisation step\n\t\t\t\t\t (\"Your organisation details…\") showed fields with no\n\t\t\t\t\t word about what they were for. -->\n\t\t\t\t\t<NcNoteCard v-if=\"step.body\" type=\"info\" data-testid=\"cn-setup-step-intro\">\n\t\t\t\t\t\t{{ stepBody(step) }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-for=\"field in fieldsFor(step)\"\n\t\t\t\t\t\t:key=\"field.key\"\n\t\t\t\t\t\tclass=\"cn-setup-field\">\n\t\t\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\t\t\tv-if=\"field.widget === 'checkbox'\"\n\t\t\t\t\t\t\t:modelValue=\"!!configModel[field.key]\"\n\t\t\t\t\t\t\t@update:modelValue=\"(v) => configModel[field.key] = v\">\n\t\t\t\t\t\t\t{{ field.label }}\n\t\t\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t\t\t<NcSelect\n\t\t\t\t\t\t\tv-else-if=\"field.widget === 'select'\"\n\t\t\t\t\t\t\t:inputLabel=\"field.label\"\n\t\t\t\t\t\t\t:options=\"field.enum || []\"\n\t\t\t\t\t\t\t:modelValue=\"configModel[field.key]\"\n\t\t\t\t\t\t\t@update:modelValue=\"(v) => configModel[field.key] = v\" />\n\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\tv-else\n\t\t\t\t\t\t\t:label=\"field.label\"\n\t\t\t\t\t\t\t:type=\"field.widget === 'number' ? 'number' : 'text'\"\n\t\t\t\t\t\t\t:modelValue=\"configModel[field.key] != null ? String(configModel[field.key]) : ''\"\n\t\t\t\t\t\t\t@update:modelValue=\"(v) => configModel[field.key] = v\" />\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\n\t\t\t\t<!-- run-action -->\n\t\t\t\t<template v-else-if=\"step.type === 'run-action'\">\n\t\t\t\t\t<NcNoteCard v-if=\"step.body\" type=\"info\">\n\t\t\t\t\t\t{{ stepBody(step) }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t\t<!-- The action starts automatically on entering this step\n\t\t\t\t\t (see `maybeAutoRunStep`), so the default state is the\n\t\t\t\t\t spinner, not an idle button. -->\n\t\t\t\t\t<div v-if=\"running[step.id]\" class=\"cn-setup-step__running\">\n\t\t\t\t\t\t<NcLoadingIcon :size=\"20\" />\n\t\t\t\t\t\t<span>{{ runningLabel }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t<NcNoteCard\n\t\t\t\t\t\t\tv-if=\"actionResult[step.id]\"\n\t\t\t\t\t\t\t:type=\"actionResult[step.id].success ? 'success' : 'error'\">\n\t\t\t\t\t\t\t{{ actionResult[step.id].message }}\n\t\t\t\t\t\t</NcNoteCard>\n\t\t\t\t\t\t<div class=\"cn-setup-step__nav\">\n\t\t\t\t\t\t\t<NcButton :variant=\"actionResult[step.id] ? 'secondary' : 'primary'\" @click=\"runAction(step)\">\n\t\t\t\t\t\t\t\t{{ actionResult[step.id] ? rerunLabel : runLabel }}\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</template>\n\n\t\t\t\t<!-- summary -->\n\t\t\t\t<template v-else-if=\"step.type === 'summary'\">\n\t\t\t\t\t<NcNoteCard v-if=\"step.body\" type=\"info\">\n\t\t\t\t\t\t{{ stepBody(step) }}\n\t\t\t\t\t</NcNoteCard>\n\t\t\t\t\t<ul class=\"cn-setup-summary\">\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\tv-for=\"item in summaryItems\"\n\t\t\t\t\t\t\t:key=\"item.id\"\n\t\t\t\t\t\t\tclass=\"cn-setup-summary__item\"\n\t\t\t\t\t\t\t:class=\"{ 'cn-setup-summary__item--done': item.done, 'cn-setup-summary__item--not-run': item.notRun }\">\n\t\t\t\t\t\t\t<span class=\"cn-setup-summary__mark\">{{ item.done ? '✓' : '○' }}</span>\n\t\t\t\t\t\t\t<span class=\"cn-setup-summary__label\">{{ item.title }}</span>\n\t\t\t\t\t\t\t<span v-if=\"item.value\" class=\"cn-setup-summary__value\">{{ item.value }}</span>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</template>\n\t\t\t</div>\n\t\t</template>\n\t\t<!-- eslint-enable vue/no-v-for-template-key-on-child -->\n\t</CnWizardDialog>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcCheckboxRadioSwitch, NcLoadingIcon, NcNoteCard, NcSelect, NcTextField } from '@nextcloud/vue'\nimport CnChoiceCards from '../CnChoiceCards/CnChoiceCards.vue'\nimport CnLeafDependencySettings from '../CnLeafDependencySettings/CnLeafDependencySettings.vue'\nimport CnWizardDialog from '../CnWizardDialog/CnWizardDialog.vue'\nimport { checkDependencies, isDependencyResolved, missingRequiredApps, readServerAppStatuses } from '../../composables/useDependencyCheck.js'\nimport { useLook } from '../../composables/useLook.js'\nimport { useSetupStatus } from '../../composables/useSetupStatus.js'\nimport { fieldsFromSchema } from '../../utils/schema.js'\n\n/** Id of the synthetic step shown while a required app is missing. */\nconst DEPENDENCY_STEP_ID = 'cn-setup-dependencies'\n\n/** The dataset value that means \"seed nothing\"; it never gets a Load button. */\nconst NONE_DATASET = 'none'\n\n/**\n * CnSetupWizard — abstract, manifest-driven first-time setup wizard (ADR-042).\n *\n * Wraps {@link CnWizardDialog} and renders a `manifest.setup.steps[]` array by\n * each step's `type`: `info` (note), `config-fields` (fields from a JSON Schema\n * via `fieldsFromSchema`, the same field shapes the admin pages use), `choice`\n * (`NcSelect` persisting to an app-config key), `run-action` (POST a privileged\n * server action), `summary` (recap), and `component` (a parent-provided\n * `#step-<id>` slot). It NEVER writes OpenRegister objects from the browser —\n * all persistence goes through the per-app setup contract\n * (`POST /apps/{appId}/api/setup/config` and `/api/setup/action/{actionId}`).\n *\n * Mount it gated by `CnAppRoot`'s setup phase, or open it on demand from\n * `CnAdminSettingsShell`.\n *\n * ```vue\n * <CnSetupWizard\n * :app-id=\"'procest'\"\n * :steps=\"manifest.setup.steps\"\n * @complete=\"onSetupComplete\"\n * @close=\"showWizard = false\" />\n * ```\n */\nexport default {\n\tname: 'CnSetupWizard',\n\n\tcomponents: {\n\t\tCnWizardDialog,\n\t\tCnChoiceCards,\n\t\tCnLeafDependencySettings,\n\t\tNcButton,\n\t\tNcNoteCard,\n\t\tNcSelect,\n\t\tNcTextField,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcLoadingIcon,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * Consumer translation function, provided by CnAppRoot as\n\t\t * `cnTranslate: this.translate` (bound to the host app's id). Step field\n\t\t * labels come from schema property titles, authored in English as the\n\t\t * canonical source; the visible label is resolved through this function\n\t\t * so it follows the user's language. Defaults to identity when used\n\t\t * standalone (no CnAppRoot ancestor).\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\n\t\t/**\n\t\t * The app manifest, provided by CnAppRoot. Read only for its\n\t\t * `dependencies` when the `dependencies` prop is empty.\n\t\t */\n\t\tcnManifest: { default: null },\n\t},\n\n\tprops: {\n\t\t/** The Nextcloud app id; used to build the `/apps/{appId}/api/setup/*` URLs. */\n\t\tappId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** The `manifest.setup.steps` array to render. */\n\t\tsteps: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** Dialog title. Overridden by `appName` when that prop is set. */\n\t\tdialogTitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Set up this app'),\n\t\t},\n\n\t\t/**\n\t\t * The app's human-readable display name. When set, the dialog title\n\t\t * becomes \"Set up {appName}\" instead of the generic `dialogTitle`\n\t\t * default — pass the same display name CnAppRoot already resolves\n\t\t * (`appDisplayName || manifest.name || appId`).\n\t\t */\n\t\tappName: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Final-step submit button label. */\n\t\tsubmitLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Finish'),\n\t\t},\n\n\t\t/** Cancel button label. */\n\t\tcancelLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Cancel'),\n\t\t},\n\n\t\t/** Next button label. */\n\t\tnextLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Next'),\n\t\t},\n\n\t\t/** Back button label. */\n\t\tbackLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Back'),\n\t\t},\n\n\t\t/** Run-action button label (shown before the first automatic run). */\n\t\trunLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Run'),\n\t\t},\n\n\t\t/** Run-action button label offered after a run already finished. */\n\t\trerunLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Run again'),\n\t\t},\n\n\t\t/** Label shown next to the spinner while a run-action step is running. */\n\t\trunningLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Loading…'),\n\t\t},\n\n\t\t/** Result-phase success text. */\n\t\tsuccessText: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Setup complete.'),\n\t\t},\n\n\t\t/**\n\t\t * Whether the wizard can be dismissed before finishing (Cancel\n\t\t * button, ESC, backdrop click). Pass `false` when a REQUIRED step\n\t\t * is unmet and the host is gating its shell behind this wizard\n\t\t * (ADR-042) — an offered-but-non-functional Cancel would be\n\t\t * misleading. Optional-only setup stays cancellable (default).\n\t\t *\n\t\t * @type {boolean}\n\t\t */\n\t\tcancellable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Ids of steps the SERVER already reports as done (e.g.\n\t\t * `useSetupStatus(...).steps` filtered to `done === true`), passed by\n\t\t * the host so a freshly (re)mounted wizard doesn't re-ask something\n\t\t * already persisted in an earlier session — this component's own\n\t\t * `localDone`/`choiceModel` only track the CURRENT session and reset\n\t\t * blank on every mount. Drives both the initial step (`initialStepId`)\n\t\t * and the summary page's done markers.\n\t\t *\n\t\t * @type {Array<string>}\n\t\t */\n\t\tcompletedStepIds: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * The app's dependencies, in the manifest's own shape (app-id strings\n\t\t * or `{ id, name?, required? }`). Falls back to the injected manifest's\n\t\t * `dependencies`. A missing REQUIRED one replaces every step with the\n\t\t * dependency list and disables Next; a missing optional one is listed\n\t\t * on the first step and does not block.\n\t\t *\n\t\t * @type {Array<string|object>}\n\t\t * @spec openspec/changes/setup-wizard-card-load-and-dependency-gate/specs/cn-setup-wizard/spec.md#requirement-the-wizard-checks-dependencies-before-any-step\n\t\t */\n\t\tdependencies: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** Load button label on a dataset card (`loadAction`). */\n\t\tloadLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Load'),\n\t\t},\n\n\t\t/** Load button label once that dataset loaded in this session. */\n\t\treloadLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Load again'),\n\t\t},\n\t},\n\n\temits: ['complete', 'close', 'step-change', 'action-result'],\n\n\t/**\n\t * Live option lists come from the app's own setup status document, so a\n\t * step that offers a choice of things the SERVER ships never has to\n\t * restate them in the manifest. `useSetupStatus` caches per app id, so the\n\t * host's own status fetch (CnAppRoot's setup gate) is the one that runs —\n\t * this reads the same refs rather than asking again.\n\t *\n\t * Only called when a step actually declares `optionsSource`: a wizard with\n\t * none must not start making requests it never made before.\n\t *\n\t * @param {object} props The component props.\n\t * @return {object} `setupStatus` / `setupStatusLoading` for the option resolver.\n\t */\n\tsetup(props) {\n\t\tconst { isBoard } = useLook()\n\t\tconst wantsSource = (props.steps || []).some((s) => s && (s.optionsSource || s.visibleWhen))\n\t\tif (!wantsSource) {\n\t\t\treturn { isBoard }\n\t\t}\n\t\tconst { status, loading } = useSetupStatus(props.appId, { setup: { steps: props.steps } })\n\t\treturn { isBoard, setupStatus: status, setupStatusLoading: loading }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tchoiceModel: {},\n\t\t\tchoiceValues: {},\n\t\t\tconfigModel: {},\n\t\t\trunning: {},\n\t\t\tactionResult: {},\n\t\t\tlocalDone: {},\n\t\t\tuserTouched: {},\n\t\t\t// Per-card load state for `loadAction` steps, keyed by `loadKey()`.\n\t\t\tdatasetRunning: {},\n\t\t\tdatasetResult: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The title actually rendered by CnWizardDialog: \"Set up {appName}\"\n\t\t * when a display name was passed, otherwise whatever `dialogTitle`\n\t\t * resolves to (a caller override, or its own generic default).\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedDialogTitle() {\n\t\t\treturn this.appName\n\t\t\t\t? t('nextcloud-vue', 'Set up {app}', { app: this.appName })\n\t\t\t\t: this.dialogTitle\n\t\t},\n\n\t\t/**\n\t\t * Every well-formed step, before `requires` is applied.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tdeclaredSteps() {\n\t\t\treturn (this.steps || []).filter((s) => s && s.id && s.type)\n\t\t},\n\n\t\t/**\n\t\t * Steps that declare `requires` on an app that is not installed and\n\t\t * enabled. They are not offered; the summary names them as skipped.\n\t\t *\n\t\t * @return {Array<{ step: object, missing: Array<string> }>}\n\t\t * @spec openspec/changes/setup-wizard-card-load-and-dependency-gate/specs/cn-setup-wizard/spec.md#requirement-the-wizard-checks-dependencies-before-any-step\n\t\t * @spec openspec/changes/optional-step-requires/specs/cn-setup-wizard/spec.md#requirement-a-step-whose-required-apps-are-absent-is-not-applicable\n\t\t */\n\t\tskippedSteps() {\n\t\t\treturn this.declaredSteps\n\t\t\t\t.filter((s) => Array.isArray(s.requires) && s.requires.length > 0)\n\t\t\t\t.map((step) => {\n\t\t\t\t\tconst known = Object.fromEntries(this.dependencyRows.map((d) => [d.id, d]))\n\t\t\t\t\tconst missing = missingRequiredApps(step.requires, this.serverAppStatuses)\n\t\t\t\t\t\t.map((row) => (known[row.id] || row).name || row.id)\n\t\t\t\t\treturn { step, missing }\n\t\t\t\t})\n\t\t\t\t.filter((entry) => entry.missing.length > 0)\n\t\t},\n\n\t\tsetupSteps() {\n\t\t\tconst skipped = new Set(this.skippedSteps.map((entry) => entry.step.id))\n\t\t\treturn this.declaredSteps.filter((s) => !skipped.has(s.id) && this.stepConditionHolds(s))\n\t\t},\n\n\t\t/**\n\t\t * Id of the first offered step: where the optional-apps note shows.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tfirstStepId() {\n\t\t\treturn this.setupSteps.length > 0 ? this.setupSteps[0].id : ''\n\t\t},\n\n\t\t/**\n\t\t * The dependency declarations to check: the prop, else the manifest's.\n\t\t *\n\t\t * @return {Array<string|object>}\n\t\t */\n\t\tdependencyEntries() {\n\t\t\tif (Array.isArray(this.dependencies) && this.dependencies.length > 0) {\n\t\t\t\treturn this.dependencies\n\t\t\t}\n\t\t\tconst fromManifest = this.cnManifest && this.cnManifest.dependencies\n\t\t\treturn Array.isArray(fromManifest) ? fromManifest : []\n\t\t},\n\n\t\t/**\n\t\t * The `dependency_statuses` initial state an app may inject from PHP.\n\t\t * Same source CnAppRoot reads; `{}` when the app injects none.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tserverAppStatuses() {\n\t\t\treturn readServerAppStatuses(this.appId)\n\t\t},\n\n\t\t/**\n\t\t * The declared dependencies with their live status.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tdependencyRows() {\n\t\t\treturn checkDependencies(this.dependencyEntries, this.serverAppStatuses)\n\t\t},\n\n\t\t/** @return {Array<object>} Required dependencies that are missing or disabled. */\n\t\tmissingRequired() {\n\t\t\treturn this.dependencyRows.filter((d) => d.required && !isDependencyResolved(d))\n\t\t},\n\n\t\t/** @return {Array<object>} Optional dependencies that are missing or disabled. */\n\t\tmissingOptional() {\n\t\t\treturn this.dependencyRows.filter((d) => !d.required && !isDependencyResolved(d))\n\t\t},\n\n\t\t/**\n\t\t * Whether a required app is missing, so the wizard shows the\n\t\t * dependency list instead of its steps and refuses to continue.\n\t\t *\n\t\t * @return {boolean}\n\t\t * @spec openspec/changes/setup-wizard-card-load-and-dependency-gate/specs/cn-setup-wizard/spec.md#requirement-the-wizard-checks-dependencies-before-any-step\n\t\t */\n\t\tdependencyBlocked() {\n\t\t\treturn this.missingRequired.length > 0\n\t\t},\n\n\t\tdependencyStepSlot() {\n\t\t\treturn 'step-' + DEPENDENCY_STEP_ID\n\t\t},\n\n\t\tdependencySectionName() {\n\t\t\treturn t('nextcloud-vue', 'Apps this app needs')\n\t\t},\n\n\t\tdependencyBlockedText() {\n\t\t\treturn t('nextcloud-vue', 'Setup can start once these apps are installed and enabled: {apps}.', {\n\t\t\t\tapps: this.missingRequired.map((d) => d.name).join(', '),\n\t\t\t})\n\t\t},\n\n\t\toptionalMissingText() {\n\t\t\treturn t('nextcloud-vue', 'Optional, not installed: {apps}. You can add them later.', {\n\t\t\t\tapps: this.missingOptional.map((d) => d.name).join(', '),\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Whether the current user is a Nextcloud admin; only admins get the\n\t\t * install and enable buttons.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisAdmin() {\n\t\t\ttry {\n\t\t\t\tconst user = getCurrentUser()\n\t\t\t\treturn !!(user && user.isAdmin)\n\t\t\t} catch {\n\t\t\t\treturn false\n\t\t\t}\n\t\t},\n\n\t\twizardSteps() {\n\t\t\tif (this.dependencyBlocked) {\n\t\t\t\treturn [{\n\t\t\t\t\tid: DEPENDENCY_STEP_ID,\n\t\t\t\t\tlabel: t('nextcloud-vue', 'Required apps'),\n\t\t\t\t\toptional: false,\n\t\t\t\t}]\n\t\t\t}\n\t\t\treturn this.setupSteps.map((s) => ({\n\t\t\t\tid: s.id,\n\t\t\t\tlabel: this.stepTitle(s),\n\t\t\t\toptional: s.required !== true,\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Recap rows for the `summary` step — one per non-summary step, with\n\t\t * the value the user selected (choice label / config field values) and\n\t\t * a done marker (info steps always done; choice steps done when picked;\n\t\t * run-action steps done when the action succeeded).\n\t\t *\n\t\t * An on-demand step (`onDemand: true`) is the exception: it is done\n\t\t * only when its action succeeded in THIS session. Apps report such a\n\t\t * step as `done` on purpose so it never auto-runs (learniq's \"Remove\n\t\t * the example data\"), and reading that flag here ticked a removal\n\t\t * nobody ran. When it did not run it gets `notRun: true` and the value\n\t\t * \"Not run\" instead.\n\t\t *\n\t\t * @return {Array<{ id: string, title: string, value: string, done: boolean, notRun: boolean }>}\n\t\t */\n\t\tsummaryItems() {\n\t\t\tconst skipped = this.skippedSteps\n\t\t\t\t.filter((entry) => entry.step.type !== 'summary' && entry.step.type !== 'info')\n\t\t\t\t.map((entry) => ({\n\t\t\t\t\tid: entry.step.id,\n\t\t\t\t\ttitle: this.stepTitle(entry.step),\n\t\t\t\t\tvalue: t('nextcloud-vue', 'Skipped, needs {apps}', { apps: entry.missing.join(', ') }),\n\t\t\t\t\tdone: false,\n\t\t\t\t\tnotRun: true,\n\t\t\t\t}))\n\t\t\treturn this.setupSteps\n\t\t\t\t.filter((s) => s.type !== 'summary')\n\t\t\t\t.map((step) => {\n\t\t\t\t\tlet value = ''\n\t\t\t\t\tif (step.type === 'choice') {\n\t\t\t\t\t\tconst raw = this.choiceModel[step.id]\n\t\t\t\t\t\tif (Array.isArray(raw)) {\n\t\t\t\t\t\t\tvalue = raw.map((o) => this.choiceLabel(step, o)).join(', ')\n\t\t\t\t\t\t} else if (raw !== null && raw !== undefined && raw !== '') {\n\t\t\t\t\t\t\tvalue = this.choiceLabel(step, raw)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (step.type === 'config-fields') {\n\t\t\t\t\t\t// Only the fields the reader filled in: a row of empty\n\t\t\t\t\t\t// \"Name: , KvK: ,\" reads as broken, not as \"not set\".\n\t\t\t\t\t\tvalue = this.fieldsFor(step)\n\t\t\t\t\t\t\t.filter((f) => {\n\t\t\t\t\t\t\t\tconst v = this.configModel[f.key]\n\t\t\t\t\t\t\t\treturn v !== null && v !== undefined && String(v).trim() !== ''\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t.map((f) => `${f.label}: ${this.configModel[f.key]}`)\n\t\t\t\t\t\t\t.join(', ') || t('nextcloud-vue', 'Not set')\n\t\t\t\t\t}\n\t\t\t\t\tif (this.isOnDemand(step)) {\n\t\t\t\t\t\tconst ran = this.ranThisSession(step.id)\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid: step.id,\n\t\t\t\t\t\t\ttitle: this.stepTitle(step),\n\t\t\t\t\t\t\tvalue: ran ? '' : t('nextcloud-vue', 'Not run'),\n\t\t\t\t\t\t\tdone: ran,\n\t\t\t\t\t\t\tnotRun: !ran,\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlet done\n\t\t\t\t\tif (step.type === 'info') {\n\t\t\t\t\t\tdone = true\n\t\t\t\t\t} else if (step.type === 'choice') {\n\t\t\t\t\t\tdone = this.hasChoice(step) || this.isServerDone(step.id)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdone = this.isStepDone(step.id)\n\t\t\t\t\t}\n\t\t\t\t\treturn { id: step.id, title: this.stepTitle(step), value, done, notRun: false }\n\t\t\t\t})\n\t\t\t\t.concat(skipped)\n\t\t},\n\n\t\t/**\n\t\t * Id of the step the wizard should open on when RESUMING: the first\n\t\t * non-`info`/`summary` step not already done, per the CURRENT session's\n\t\t * local state OR the server-reported `completedStepIds` (a prior\n\t\t * session). Falls back to `''` (CnWizardDialog's own first-step default)\n\t\t * on a fresh setup and when every actionable step is already done.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tinitialStepId() {\n\t\t\t// Fresh setup — nothing done anywhere yet, so there is nothing to\n\t\t\t// resume past. Start at step one so a leading `info`/welcome step is\n\t\t\t// actually seen; resuming is only for returning sessions.\n\t\t\tif (this.completedStepIds.length === 0) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\t// An on-demand step is never outstanding work, so it is never the\n\t\t\t// step to resume on.\n\t\t\tconst actionable = this.setupSteps.filter((s) => s.type !== 'info' && s.type !== 'summary' && !this.isOnDemand(s))\n\t\t\tconst firstUnmetIndex = actionable.findIndex((s) => {\n\t\t\t\tif (s.type === 'choice') {\n\t\t\t\t\treturn !(this.hasChoice(s) || this.isServerDone(s.id))\n\t\t\t\t}\n\t\t\t\treturn !this.isStepDone(s.id)\n\t\t\t})\n\t\t\t// Done is not the same as seen: an app that pre-satisfies a step at\n\t\t\t// install time (buildiq seeds templates from a repair step) reports it\n\t\t\t// done before anyone opens the wizard. Only finished work BEFORE the\n\t\t\t// outstanding step means there is something to resume past.\n\t\t\tif (firstUnmetIndex <= 0) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn actionable[firstUnmetIndex].id\n\t\t},\n\t},\n\n\tmounted() {\n\t\t// Covers a RESUMED wizard opening straight onto its run-action step\n\t\t// (`initialStepId`) — `onStepChange` only fires on later navigation,\n\t\t// so a step already active at mount time needs its own trigger.\n\t\tthis.maybeAutoRunStep(this.initialStepId || (this.setupSteps[0] && this.setupSteps[0].id))\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Start a `run-action` step's action automatically the moment it\n\t\t * becomes current, instead of waiting for a manual \"Run\" click —\n\t\t * the step has nothing else for the user to decide by then (the\n\t\t * choice it acts on was already made on an earlier step), so\n\t\t * requiring a click before showing progress just adds a stall.\n\t\t * No-ops for any other step type, or one already run/running, and\n\t\t * never fires an on-demand step (`onDemand: true`): those run only\n\t\t * when the user clicks Run.\n\t\t *\n\t\t * @param {string} stepId The step id becoming current.\n\t\t * @return {void}\n\t\t */\n\t\tmaybeAutoRunStep(stepId) {\n\t\t\t// Nothing runs while a required app is missing: every action\n\t\t\t// would fail with an error that does not name the app.\n\t\t\tif (this.dependencyBlocked) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst step = this.setupSteps.find((s) => s.id === stepId)\n\t\t\tif (step && step.type === 'run-action' && !this.isOnDemand(step) && !this.isStepDone(step.id) && !this.running[step.id]) {\n\t\t\t\tthis.runAction(step)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The visible title for a step, resolved through the host app's\n\t\t * translation function.\n\t\t *\n\t\t * `manifest.setup.steps[].title` is authored in English as the\n\t\t * canonical source, exactly like the schema property titles this\n\t\t * component already routes through `cnTranslate` for field labels\n\t\t * (see `fieldsFromSchema` below). The step titles were the one\n\t\t * remaining place rendering the manifest string verbatim, so an\n\t\t * nl-locale user saw a wizard whose field labels were translated and\n\t\t * whose step headings were not.\n\t\t *\n\t\t * Falls back to the step id when a step declares no title, which is\n\t\t * the same fallback the raw bindings used.\n\t\t *\n\t\t * @param {object} step A `manifest.setup.steps[]` entry.\n\t\t * @return {string} The translated title, or the step id.\n\t\t */\n\t\tstepTitle(step) {\n\t\t\tconst raw = (step && step.title) || (step && step.id) || ''\n\t\t\treturn raw === '' ? '' : this.cnTranslate(raw)\n\t\t},\n\n\t\t/**\n\t\t * The visible body for a step, resolved through the host app's\n\t\t * translation function.\n\t\t *\n\t\t * 🔴 THIS USED TO RENDER THE MANIFEST STRING VERBATIM, IN FOUR PLACES.\n\t\t * `stepTitle()` was routed through `cnTranslate` and the body was not,\n\t\t * so a wizard on a Dutch instance showed a translated heading over an\n\t\t * English paragraph, with translated Cancel/Next buttons underneath.\n\t\t * That reads as a bug rather than as a missing string, and the app could\n\t\t * not fix it: decidiq shipped correct Dutch for its setup copy in\n\t\t * `l10n/nl.json`, and the component never asked for it.\n\t\t *\n\t\t * @param {object} step The step declaration.\n\t\t * @return {string} The translated body, or ''.\n\t\t */\n\t\tstepBody(step) {\n\t\t\tconst raw = (step && step.body) || ''\n\t\t\treturn raw === '' ? '' : this.cnTranslate(raw)\n\t\t},\n\n\t\t/**\n\t\t * The footnote under a choice step's options, from the step's `note`\n\t\t * (or `footnote`), translated like the body.\n\t\t *\n\t\t * @param {object} step The step declaration.\n\t\t * @return {string} The translated footnote, or ''.\n\t\t */\n\t\tstepNote(step) {\n\t\t\tconst raw = (step && (step.note || step.footnote)) || ''\n\t\t\treturn raw === '' ? '' : this.cnTranslate(raw)\n\t\t},\n\n\t\tstepSlot(step) {\n\t\t\treturn 'step-' + step.id\n\t\t},\n\n\t\thasCustomSlot(id) {\n\t\t\treturn !!this.$slots['step-' + id] || !!this.$slots['step-' + id]\n\t\t},\n\n\t\tfieldsFor(step) {\n\t\t\tif (step.schema && typeof step.schema === 'object') {\n\t\t\t\treturn fieldsFromSchema(step.schema, { translate: this.cnTranslate })\n\t\t\t}\n\t\t\t// Fallback: a plain text field per declared config key.\n\t\t\treturn (step.configKeys || []).map((key) => ({ key, label: key, widget: 'text' }))\n\t\t},\n\n\t\t/**\n\t\t * Options for a `choice` step. When the step declares `dependsOn`\n\t\t * (a parent step's configKey) + `optionsByParent`, the option list\n\t\t * is the entry keyed by the parent's currently-selected value — this\n\t\t * is the country → organisation-type cascade. Otherwise the static\n\t\t * `options` array.\n\t\t *\n\t\t * @param {object} step The choice step definition.\n\t\t * @return {Array} The option list to render.\n\t\t */\n\t\toptionsFor(step) {\n\t\t\tlet options = step.options || []\n\t\t\tif (step.optionsSource) {\n\t\t\t\toptions = this.sourcedOptions(step)\n\t\t\t} else if (step.dependsOn && step.optionsByParent) {\n\t\t\t\tconst parentValue = this.choiceValues[step.dependsOn]\n\t\t\t\toptions = (parentValue === null || parentValue === undefined || parentValue === '')\n\t\t\t\t\t? []\n\t\t\t\t\t: (step.optionsByParent[parentValue] || [])\n\t\t\t}\n\t\t\t// The LABEL is translated, the VALUE never is. `scalarChoice()` reads\n\t\t\t// `.value` and that is what reaches `POST /api/setup/config`, so a\n\t\t\t// translated label cannot change what gets stored — while an\n\t\t\t// untranslated one leaves the choice itself in English on a\n\t\t\t// localised instance, which is the half-translated screen this fix\n\t\t\t// exists to remove.\n\t\t\treturn options.map((option) => {\n\t\t\t\tif (!option || typeof option !== 'object' || !option.label) {\n\t\t\t\t\treturn option\n\t\t\t\t}\n\t\t\t\tconst translated = { ...option, label: this.cnTranslate(option.label) }\n\t\t\t\tif (option.description) {\n\t\t\t\t\ttranslated.description = this.cnTranslate(option.description)\n\t\t\t\t}\n\t\t\t\treturn translated\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Whether a step's `visibleWhen` holds: the value at that path in the\n\t\t * setup status (`\"flags.hasPayouts\"`, dots walk into objects) is truthy,\n\t\t * or equals `equals` when the step gives `{ path, equals }`. A step\n\t\t * without `visibleWhen` always shows; one with it stays hidden until the\n\t\t * status says so, also while the status loads (DqInstellen: the dwangsom\n\t\t * step only when the app pays penalties).\n\t\t *\n\t\t * @param {object} step The step declaration.\n\t\t * @return {boolean}\n\t\t */\n\t\tstepConditionHolds(step) {\n\t\t\tconst when = step && step.visibleWhen\n\t\t\tif (when === undefined || when === null || when === '') {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tconst path = typeof when === 'string' ? when : when.path\n\t\t\tif (typeof path !== 'string' || path === '') {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tlet node = this.setupStatus\n\t\t\tfor (const key of path.split('.')) {\n\t\t\t\tif (node === null || node === undefined || typeof node !== 'object') {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\tnode = node[key]\n\t\t\t}\n\t\t\tif (typeof when === 'object' && Object.hasOwn(when, 'equals')) {\n\t\t\t\treturn node === when.equals\n\t\t\t}\n\t\t\treturn Boolean(node)\n\t\t},\n\n\t\t/**\n\t\t * The option list a `choice` step declares `optionsSource` for, read\n\t\t * from the setup status document the app already serves.\n\t\t *\n\t\t * `optionsSource` names a key in that document (dots walk into nested\n\t\t * objects), and the entries are normalised to the option shape: `id` is\n\t\t * accepted for `value`, `name` for `label`, and a bare `objectCount`\n\t\t * becomes the one stat a card shows. A server that already sends\n\t\t * `stats` keeps them.\n\t\t *\n\t\t * @param {object} step The choice step declaring `optionsSource`.\n\t\t * @return {Array<object>} The options, or [] while the status is loading.\n\t\t */\n\t\tsourcedOptions(step) {\n\t\t\tlet node = this.setupStatus\n\t\t\tfor (const key of String(step.optionsSource).split('.')) {\n\t\t\t\tif (node === null || node === undefined || typeof node !== 'object') {\n\t\t\t\t\treturn []\n\t\t\t\t}\n\t\t\t\tnode = node[key]\n\t\t\t}\n\t\t\tif (!Array.isArray(node)) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn node\n\t\t\t\t.filter((entry) => entry && typeof entry === 'object')\n\t\t\t\t.map((entry) => {\n\t\t\t\t\tconst value = entry.value !== undefined ? entry.value : entry.id\n\t\t\t\t\tconst option = {\n\t\t\t\t\t\t...entry,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tlabel: entry.label || entry.name || String(value),\n\t\t\t\t\t}\n\t\t\t\t\tif (!option.stats && typeof entry.objectCount === 'number' && entry.objectCount > 0) {\n\t\t\t\t\t\toption.stats = [{ label: t('nextcloud-vue', 'Objects'), value: entry.objectCount }]\n\t\t\t\t\t}\n\t\t\t\t\treturn option\n\t\t\t\t})\n\t\t\t\t.filter((option) => option.value !== undefined)\n\t\t},\n\n\t\t/**\n\t\t * Whether a choice step renders as a card grid rather than a dropdown.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @return {boolean} True for `display: \"cards\"`.\n\t\t */\n\t\tisCardChoice(step) {\n\t\t\treturn step.display === 'cards'\n\t\t},\n\n\t\t/**\n\t\t * Whether this step is still waiting for its live option list.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @return {boolean} True while the status document is in flight.\n\t\t */\n\t\tisOptionsLoading(step) {\n\t\t\treturn !!step.optionsSource && this.setupStatusLoading === true\n\t\t},\n\n\t\t/**\n\t\t * The card grid's model: plain values, not the option objects NcSelect\n\t\t * binds. `scalarChoice` already reduces either shape to values, so both\n\t\t * renderers can share one `choiceModel` entry.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @return {unknown} The selected value, or [] / null when nothing is picked.\n\t\t */\n\t\tcardModel(step) {\n\t\t\tconst value = this.scalarChoice(step)\n\t\t\tif (step.multiple === true) {\n\t\t\t\treturn Array.isArray(value) ? value : []\n\t\t\t}\n\t\t\treturn value === undefined ? null : value\n\t\t},\n\n\t\tisChoiceDisabled(step) {\n\t\t\tif (!step.dependsOn) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tconst parentValue = this.choiceValues[step.dependsOn]\n\t\t\treturn parentValue === null || parentValue === undefined || parentValue === ''\n\t\t},\n\n\t\tdependsOnHint(step) {\n\t\t\tconst parent = this.setupSteps.find((s) => s.configKey === step.dependsOn)\n\t\t\tconst label = parent ? (parent.title || parent.id) : step.dependsOn\n\t\t\treturn t('nextcloud-vue', 'Select \"{step}\" first.', { step: label })\n\t\t},\n\n\t\t/**\n\t\t * The visible label for one selected choice entry.\n\t\t *\n\t\t * A card grid stores plain VALUES where NcSelect stores option objects,\n\t\t * so the recap looked one up and printed the other: the summary read\n\t\t * \"municipality\" instead of \"Municipality\". Resolves a bare value back\n\t\t * to its option, and falls back to the value when the option list is\n\t\t * not (yet) available.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @param {unknown} entry One selected entry: an option object or a value.\n\t\t * @return {string} The label to show.\n\t\t */\n\t\tchoiceLabel(step, entry) {\n\t\t\tif (entry && typeof entry === 'object' && entry.label) {\n\t\t\t\treturn entry.label\n\t\t\t}\n\t\t\tconst match = this.optionsFor(step).find((o) => o && String(o.value) === String(entry))\n\t\t\treturn (match && match.label) ? match.label : String(entry)\n\t\t},\n\n\t\thasChoice(step) {\n\t\t\tconst v = this.choiceModel[step.id]\n\t\t\tif (step.multiple === true) {\n\t\t\t\treturn Array.isArray(v) && v.length > 0\n\t\t\t}\n\t\t\treturn v !== null && v !== undefined && v !== ''\n\t\t},\n\n\t\tscalarChoice(step) {\n\t\t\tconst raw = this.choiceModel[step.id]\n\t\t\tif (step.multiple === true) {\n\t\t\t\treturn (raw || []).map((o) => (o && o.value !== undefined ? o.value : o))\n\t\t\t}\n\t\t\treturn raw && raw.value !== undefined ? raw.value : raw\n\t\t},\n\n\t\tonChoice(step, value) {\n\t\t\tthis.userTouched[step.id] = true\n\t\t\tthis.choiceModel[step.id] = value\n\t\t\tif (step.configKey) {\n\t\t\t\tthis.choiceValues[step.configKey] = this.scalarChoice(step)\n\t\t\t}\n\t\t\t// Reset any dependent child choices when the parent changes.\n\t\t\tfor (const child of this.setupSteps) {\n\t\t\t\tif (child.dependsOn && child.dependsOn === step.configKey) {\n\t\t\t\t\tthis.choiceModel[child.id] = child.multiple === true ? [] : null\n\t\t\t\t\tthis.userTouched[child.id] = false\n\t\t\t\t\tif (child.configKey) {\n\t\t\t\t\t\tthis.choiceValues[child.configKey] = ''\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Re-apply auto-suggestions for steps that derive a default from this one.\n\t\t\tfor (const dep of this.setupSteps) {\n\t\t\t\tif (dep.suggestFrom && dep.suggestFrom === step.configKey) {\n\t\t\t\t\tthis.applySuggestion(dep)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Auto-fill a `choice` step's suggested default from an earlier choice\n\t\t * (its `suggestFrom` configKey → `suggestMap[parentValue]`). No-op once\n\t\t * the user has manually picked here, so a suggestion never clobbers an\n\t\t * explicit choice.\n\t\t *\n\t\t * @param {object} step The dependent choice step.\n\t\t * @return {void}\n\t\t */\n\t\tapplySuggestion(step) {\n\t\t\tif (this.userTouched[step.id] === true) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst parentValue = this.choiceValues[step.suggestFrom]\n\t\t\tif (parentValue === null || parentValue === undefined || parentValue === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst wanted = (step.suggestMap || {})[parentValue]\n\t\t\tif (wanted === null || wanted === undefined) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst opt = this.optionsFor(step).find((o) => o.value === wanted) || { value: wanted, label: String(wanted) }\n\t\t\tthis.choiceModel[step.id] = opt\n\t\t\tif (step.configKey) {\n\t\t\t\tthis.choiceValues[step.configKey] = wanted\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * CnWizardDialog `validate` hook — intercepts Next/Submit to persist\n\t\t * the active step before advancing. `choice`/`config-fields` steps\n\t\t * POST their value via the setup contract; required `choice` steps\n\t\t * block advance until a value is picked; required `run-action` steps\n\t\t * block until the action has succeeded. Returns `true` to advance or\n\t\t * an error string to surface above the step and block navigation.\n\t\t *\n\t\t * @param {string} stepId The active step id.\n\t\t * @return {Promise<boolean|string>} True to advance, or an error message.\n\t\t */\n\t\tasync validateStep(stepId) {\n\t\t\tconst step = this.setupSteps.find((s) => s.id === stepId)\n\t\t\tif (!step) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tif (step.type === 'choice') {\n\t\t\t\tif (!this.hasChoice(step)) {\n\t\t\t\t\t// Already persisted server-side and the user only back-navigated\n\t\t\t\t\t// onto it — `choiceModel` is blank because it's session-local, not\n\t\t\t\t\t// because nothing is set. Don't force a re-pick, and don't re-POST.\n\t\t\t\t\tif (this.isServerDone(step.id)) {\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t\treturn step.required === true\n\t\t\t\t\t\t? t('nextcloud-vue', 'Please make a selection to continue.')\n\t\t\t\t\t\t: true\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tawait this.saveConfig({ [step.configKey]: this.scalarChoice(step) })\n\t\t\t\t\tthis.localDone[step.id] = true\n\t\t\t\t\treturn true\n\t\t\t\t} catch (err) {\n\t\t\t\t\treturn this.errorMessage(err)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (step.type === 'config-fields') {\n\t\t\t\ttry {\n\t\t\t\t\tconst patch = {}\n\t\t\t\t\tfor (const field of this.fieldsFor(step)) {\n\t\t\t\t\t\tpatch[field.key] = this.configModel[field.key]\n\t\t\t\t\t}\n\t\t\t\t\tawait this.saveConfig(patch)\n\t\t\t\t\tthis.localDone[step.id] = true\n\t\t\t\t\treturn true\n\t\t\t\t} catch (err) {\n\t\t\t\t\treturn this.errorMessage(err)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (step.type === 'run-action' && step.required === true && !this.isStepDone(step.id)) {\n\t\t\t\treturn t('nextcloud-vue', 'Please run this step before continuing.')\n\t\t\t}\n\t\t\treturn true\n\t\t},\n\n\t\t/**\n\t\t * Persist one or more app-config values via the setup contract.\n\t\t *\n\t\t * @param {object} patch `{ <configKey>: value }` to write.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync saveConfig(patch) {\n\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\timport('@nextcloud/router'),\n\t\t\t])\n\t\t\tawait axios.post(generateUrl(`/apps/${this.appId}/api/setup/config`), patch)\n\t\t},\n\n\t\tasync runAction(step) {\n\t\t\tthis.running[step.id] = true\n\t\t\tthis.actionResult[step.id] = null\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst { data } = await axios.post(generateUrl(`/apps/${this.appId}/api/setup/action/${step.action}`))\n\t\t\t\tconst result = {\n\t\t\t\t\tsuccess: data && data.success !== false,\n\t\t\t\t\tmessage: (data && data.message) || t('nextcloud-vue', 'Done.'),\n\t\t\t\t}\n\t\t\t\tthis.actionResult[step.id] = result\n\t\t\t\tif (result.success) {\n\t\t\t\t\tthis.localDone[step.id] = true\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * @event action-result Emitted when a `run-action` step finishes.\n\t\t\t\t * @type {{ stepId: string, action: string, success: boolean, message: string }}\n\t\t\t\t */\n\t\t\t\tthis.$emit('action-result', { stepId: step.id, action: step.action, ...result })\n\t\t\t} catch (err) {\n\t\t\t\tthis.actionResult[step.id] = { success: false, message: this.errorMessage(err) }\n\t\t\t\tthis.$emit('action-result', { stepId: step.id, action: step.action, success: false, message: this.errorMessage(err) })\n\t\t\t} finally {\n\t\t\t\tthis.running[step.id] = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Key for one card's load state.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @param {object} option The card's option.\n\t\t * @return {string}\n\t\t */\n\t\tloadKey(step, option) {\n\t\t\treturn step.id + '::' + String(option && option.value)\n\t\t},\n\n\t\t/**\n\t\t * Whether a card gets a Load button: the step declares `loadAction`\n\t\t * and the option is not the \"seed nothing\" answer.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @param {object} option The card's option.\n\t\t * @return {boolean}\n\t\t * @spec openspec/changes/setup-wizard-card-load-and-dependency-gate/specs/cn-setup-wizard/spec.md#requirement-a-dataset-card-loads-itself\n\t\t */\n\t\tisLoadableOption(step, option) {\n\t\t\treturn !!(step && step.loadAction) && !!option && String(option.value) !== NONE_DATASET\n\t\t},\n\n\t\tisDatasetLoading(step, option) {\n\t\t\treturn this.datasetRunning[this.loadKey(step, option)] === true\n\t\t},\n\n\t\tdatasetResultFor(step, option) {\n\t\t\treturn this.datasetResult[this.loadKey(step, option)] || null\n\t\t},\n\n\t\tloadButtonLabel(step, option) {\n\t\t\tif (this.isDatasetLoading(step, option)) {\n\t\t\t\treturn this.runningLabel\n\t\t\t}\n\t\t\tconst result = this.datasetResultFor(step, option)\n\t\t\treturn (result && result.success) ? this.reloadLabel : this.loadLabel\n\t\t},\n\n\t\tloadAriaLabel(option) {\n\t\t\treturn t('nextcloud-vue', 'Load {name}', { name: option.label })\n\t\t},\n\n\t\t/**\n\t\t * Load one dataset from its card: POST `{ dataset }` to the step's\n\t\t * `loadAction`, spinner on the button while it runs, the result on the\n\t\t * card after. A successful load also selects the card, so the summary\n\t\t * and the stored choice name what was loaded.\n\t\t *\n\t\t * @param {object} step The choice step declaring `loadAction`.\n\t\t * @param {object} option The card's option.\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/setup-wizard-card-load-and-dependency-gate/specs/cn-setup-wizard/spec.md#requirement-a-dataset-card-loads-itself\n\t\t */\n\t\tasync loadDataset(step, option) {\n\t\t\tif (!this.isLoadableOption(step, option) || this.isDatasetLoading(step, option)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst key = this.loadKey(step, option)\n\t\t\tthis.datasetRunning[key] = true\n\t\t\tthis.datasetResult[key] = null\n\t\t\tlet result\n\t\t\ttry {\n\t\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\t\timport('@nextcloud/router'),\n\t\t\t\t])\n\t\t\t\tconst { data } = await axios.post(\n\t\t\t\t\tgenerateUrl(`/apps/${this.appId}/api/setup/action/${step.loadAction}`),\n\t\t\t\t\t{ dataset: option.value },\n\t\t\t\t)\n\t\t\t\tresult = {\n\t\t\t\t\tsuccess: !!data && data.success !== false,\n\t\t\t\t\tmessage: (data && data.message) || t('nextcloud-vue', 'Loaded.'),\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tresult = { success: false, message: this.errorMessage(err) }\n\t\t\t} finally {\n\t\t\t\tthis.datasetRunning[key] = false\n\t\t\t}\n\t\t\tthis.datasetResult[key] = result\n\t\t\tif (result.success) {\n\t\t\t\tthis.selectLoadedOption(step, option)\n\t\t\t\tthis.localDone[step.id] = true\n\t\t\t}\n\t\t\tthis.$emit('action-result', {\n\t\t\t\tstepId: step.id,\n\t\t\t\taction: step.loadAction,\n\t\t\t\tdataset: option.value,\n\t\t\t\t...result,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Select a card that just loaded, adding to (never replacing) the\n\t\t * selection of a `multiple` step.\n\t\t *\n\t\t * @param {object} step The choice step.\n\t\t * @param {object} option The loaded option.\n\t\t * @return {void}\n\t\t */\n\t\tselectLoadedOption(step, option) {\n\t\t\tif (step.multiple === true) {\n\t\t\t\tconst current = this.cardModel(step)\n\t\t\t\tif (current.some((v) => String(v) === String(option.value))) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.onChoice(step, current.concat([option.value]))\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.onChoice(step, option.value)\n\t\t},\n\n\t\t/**\n\t\t * A required app was installed from the dependency list. A new app's\n\t\t * scripts and its `OC.appswebroots` entry exist only after a full page\n\t\t * load, and `useAppStatus` caches per page, so reload.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonDependencyInstalled() {\n\t\t\twindow.location.reload()\n\t\t},\n\n\t\t/**\n\t\t * Whether a step is marked on-demand (`onDemand: true`): it runs only\n\t\t * when the user asks, never automatically, and the summary ticks it\n\t\t * only when it ran in this session.\n\t\t *\n\t\t * @param {object} step The manifest step.\n\t\t * @return {boolean}\n\t\t */\n\t\tisOnDemand(step) {\n\t\t\treturn !!step && step.onDemand === true\n\t\t},\n\n\t\t/**\n\t\t * Whether a step's action succeeded in the CURRENT session, ignoring\n\t\t * whatever the server reports.\n\t\t *\n\t\t * @param {string} id Step id.\n\t\t * @return {boolean}\n\t\t */\n\t\tranThisSession(id) {\n\t\t\treturn !!(this.actionResult[id] && this.actionResult[id].success)\n\t\t},\n\n\t\tisStepDone(id) {\n\t\t\treturn this.isServerDone(id) || this.localDone[id] === true || (this.actionResult[id] && this.actionResult[id].success)\n\t\t},\n\n\t\t/**\n\t\t * Whether the server already reported this step done in a prior\n\t\t * session, via the `completedStepIds` prop.\n\t\t *\n\t\t * @param {string} id Step id.\n\t\t * @return {boolean}\n\t\t */\n\t\tisServerDone(id) {\n\t\t\treturn this.completedStepIds.includes(id)\n\t\t},\n\n\t\tonSubmit() {\n\t\t\tif (this.$refs.wizard && this.$refs.wizard.setResult) {\n\t\t\t\tthis.$refs.wizard.setResult({ success: true, message: this.successText })\n\t\t\t}\n\t\t\t/**\n\t\t\t * @event complete Emitted when the last step is submitted (setup finished).\n\t\t\t */\n\t\t\tthis.$emit('complete')\n\t\t},\n\n\t\tonStepChange(payload) {\n\t\t\t// Pre-fill a suggested default when entering a step that derives one.\n\t\t\tconst step = this.setupSteps.find((s) => s.id === payload.stepId)\n\t\t\tif (step && step.suggestFrom) {\n\t\t\t\tthis.applySuggestion(step)\n\t\t\t}\n\t\t\tthis.maybeAutoRunStep(payload.stepId)\n\t\t\t/**\n\t\t\t * @event step-change Emitted when the active step changes.\n\t\t\t * @type {{ stepId: string, stepIndex: number, direction: string }}\n\t\t\t */\n\t\t\tthis.$emit('step-change', payload)\n\t\t},\n\n\t\tonClose() {\n\t\t\t/**\n\t\t\t * @event close Emitted when the dialog should close.\n\t\t\t */\n\t\t\tthis.$emit('close')\n\t\t},\n\n\t\terrorMessage(err) {\n\t\t\tconst data = err && err.response && err.response.data\n\t\t\tif (data && (data.message || data.error)) {\n\t\t\t\treturn data.message || data.error\n\t\t\t}\n\t\t\treturn (err && err.message) || t('nextcloud-vue', 'Something went wrong.')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-setup-step {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-setup-step__intro {\n\tmargin: 0;\n\tfont-size: 15px;\n\tline-height: 1.5;\n}\n\n.cn-setup-step__note {\n\tmargin: 0;\n\tfont-size: 13px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-setup-step__nav {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tgap: 8px;\n\tmargin-top: 8px;\n}\n\n.cn-setup-step__running {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgap: 8px;\n\tpadding: 24px 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-setup-load-result {\n\tmargin: 0;\n\tfont-size: var(--font-size-small, 13px);\n}\n\n.cn-setup-load-result--success {\n\tcolor: var(--color-success-text, var(--color-success));\n}\n\n.cn-setup-load-result--error {\n\tcolor: var(--color-error-text, var(--color-error));\n}\n\n.cn-setup-field {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\n.cn-setup-summary {\n\tlist-style: none;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.cn-setup-summary__item {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 4px 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-setup-summary__item--done {\n\tcolor: var(--color-main-text);\n}\n\n.cn-setup-summary__mark {\n\tfont-weight: bold;\n\tcolor: var(--color-success);\n}\n\n.cn-setup-summary__label {\n\tflex: 0 0 auto;\n}\n\n.cn-setup-summary__value {\n\tmargin-inline-start: auto;\n\tfont-weight: 600;\n\tcolor: var(--color-main-text);\n}\n\n/* An on-demand step that did not run says so quietly: it is a choice the\n user did not make, not a failure. */\n.cn-setup-summary__item--not-run .cn-setup-summary__value {\n\tfont-weight: normal;\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["_createBlock","_createVNode","_renderList","_withCtx","_createElementBlock","_renderSlot","_mergeProps","_createTextVNode","_toDisplayString","_Fragment","_openBlock","_normalizeClass","_createElementVNode"],"mappings":";;;AA6BQ,EAAA,KAAK,EAAC,eAAc;AAAE,EAAA,gBAAC,EAAA,cAAA;AAAA,EAAA,aAAA,EAAA,uBAAA;;;;;AA8CvB,EAAA,KAAA,EAAA,sBAAA;AAAA,EAAA,aAAA,EAAA,qBAAA;;;;AAqDA,EAAA,KAAA,EAAA,qBAAA;AAAA,EAAA,aAAA,EAAA,oBAAA;;;;AA+C0B,EAAA,KAAE,EAAA,wBAAA;;AAUzB,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,oBAAoB,GAAA;AAa5B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,kBAAkB,GAAA;AAMpB,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAwB,GAAA;AACjC,MAAA,UAAA,GAAA,EAAA,KAAA,EAAA,yBAAA,GAAA;;;AACD,EAAA,KAAA,EAAA,yBAAA;;;;;;;;;;;;;;uBAzMPA;AACA,IAAA,GAAG,EAAC,QAAQ;AACX,IAAA,KAAK,EAAE,QAAW,CAAA,WAAA;AAClB,IAAA,WAAW,EAAE,QAAW,CAAA,mBAAA;AACxB,IAAA,WAAW,EAAE,MAAO,CAAA,WAAA;AACpB,IAAA,WAAW,EAAE,MAAO,CAAA,WAAA;AACpB,IAAA,SAAS,EAAE,MAAS,CAAA,SAAA;AACpB,IAAA,SAAS,EAAE,MAAS,CAAA,SAAA;AACpB,IAAA,WAAW,EAAE,MAAW,CAAA,WAAA;AACxB,IAAA,QAAQ,EAA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EAOP,CAAA,IAAA,EAAA;kCANH,GAAG,EAAE,IAAI,CAAC,EAAE;kCACb,KAAI,EAAAS,cAAA,CAAA,CAAE,wBAAwB,EACY,EAAA,8BAAA,EAAA,IAAI,CAAC,IAAK,EAAA,iCAAA,EAAQ,IAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;AAC5D,kCAAAC,kBAAA,CAAuE,MAAvE,EAAA,UAAuE,EAA/BJ,eAAA,CAAA,IAAI,CAAC,IAAI,GAAA,GAAA,GAAA,GAAA,CAAA,EAAA,CAAA,YAAA;AACjD,kCAAAI,kBAAA,CAAG,MAAH,EAAA,UAAG,EAAAJ,eAAA,CAAA,IAAA,CAAA,KAAA,CAAA,EAAA,CAAA,YAAA;AACD,kCAAA,CAAA,IAAA,CAAA,KAAA;AAAF,uCAAAE,SAAA,EAAA,EAAAN,kBAAA,CAAE,MAAF,EAAA,WAAE,EAAAI,eAAA,CAAA,IAAA,CAAA,KAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import __sfc_main$b from '../CnAuditTrailWidget/CnAuditTrailWidget.vue.js';
|
|
2
2
|
import __sfc_main$a from '../CnBannerWidget/CnBannerWidget.vue.js';
|
|
3
3
|
import __sfc_main$f from '../CnDividerWidget/CnDividerWidget.vue.js';
|
|
4
|
+
import __sfc_main$h from '../CnExportsWidget/CnExportsWidget.vue.js';
|
|
4
5
|
import __sfc_main$d from '../CnHeaderWidget/CnHeaderWidget.vue.js';
|
|
5
6
|
import __sfc_main$9 from '../CnIntegrationWidget/CnIntegrationWidget.vue.js';
|
|
6
7
|
import __sfc_main$5 from '../CnNavCardGrid/CnNavCardGrid.vue.js';
|
|
@@ -8,6 +9,7 @@ import __sfc_main$6 from '../CnObjectDataWidget/CnObjectDataWidget.vue.js';
|
|
|
8
9
|
import __sfc_main$3 from '../CnObjectGeoWidget/CnObjectGeoWidget.vue.js';
|
|
9
10
|
import __sfc_main$7 from '../CnObjectMetadataWidget/CnObjectMetadataWidget.vue.js';
|
|
10
11
|
import __sfc_main$8 from '../CnRelatedObjectsWidget/CnRelatedObjectsWidget.vue.js';
|
|
12
|
+
import __sfc_main$g from '../CnSavedViewAlertWidget/CnSavedViewAlertWidget.vue.js';
|
|
11
13
|
import __sfc_main$e from '../CnTextWidget/CnTextWidget.vue.js';
|
|
12
14
|
import __sfc_main$c from '../CnTimelineWidget/CnTimelineWidget.vue.js';
|
|
13
15
|
import __sfc_main$4 from '../CnWidgetCardGrid/CnWidgetCardGrid.vue.js';
|
|
@@ -90,6 +92,8 @@ const BUILT_IN_WIDGETS = {
|
|
|
90
92
|
header: __sfc_main$d,
|
|
91
93
|
text: __sfc_main$e,
|
|
92
94
|
divider: __sfc_main$f,
|
|
95
|
+
'saved-view-alert': __sfc_main$g,
|
|
96
|
+
exports: __sfc_main$h,
|
|
93
97
|
};
|
|
94
98
|
|
|
95
99
|
export { BUILT_IN_WIDGETS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builtInWidgets.js","sources":["../../../../src/components/CnWidgetGrid/builtInWidgets.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Conduction B.V.\n * SPDX-License-Identifier: EUPL-1.2\n *\n * builtInWidgets — internal registry of the library's built-in v2 widget components.\n *\n * Keys are the `widgetKey` values used in v2 manifests.\n * Values are the Vue component definitions.\n *\n * CnWidgetGrid resolves widget keys first against this registry, then against\n * the consumer-supplied `cnRegistry` inject. A consumer can override a built-in\n * by registering a custom component with the same key in `cnRegistry`.\n *\n * Spec: REQ-MVR-005 (manifest-v2-renderer) — widget key resolution\n */\n\nimport CnAuditTrailWidget from '../CnAuditTrailWidget/CnAuditTrailWidget.vue'\nimport CnBannerWidget from '../CnBannerWidget/CnBannerWidget.vue'\nimport CnDividerWidget from '../CnDividerWidget/CnDividerWidget.vue'\nimport CnHeaderWidget from '../CnHeaderWidget/CnHeaderWidget.vue'\nimport CnIntegrationWidget from '../CnIntegrationWidget/CnIntegrationWidget.vue'\nimport CnNavCardGrid from '../CnNavCardGrid/CnNavCardGrid.vue'\nimport CnObjectDataWidget from '../CnObjectDataWidget/CnObjectDataWidget.vue'\nimport CnObjectGeoWidget from '../CnObjectGeoWidget/CnObjectGeoWidget.vue'\nimport CnObjectMetadataWidget from '../CnObjectMetadataWidget/CnObjectMetadataWidget.vue'\nimport CnRelatedObjectsWidget from '../CnRelatedObjectsWidget/CnRelatedObjectsWidget.vue'\nimport CnTextWidget from '../CnTextWidget/CnTextWidget.vue'\nimport CnTimelineWidget from '../CnTimelineWidget/CnTimelineWidget.vue'\nimport CnWidgetCardGrid from '../CnWidgetCardGrid/CnWidgetCardGrid.vue'\nimport CnWidgetFormRenderer from '../CnWidgetFormRenderer/CnWidgetFormRenderer.vue'\nimport CnWidgetMapViewer from '../CnWidgetMapViewer/CnWidgetMapViewer.vue'\nimport CnWidgetObjectTable from '../CnWidgetObjectTable/CnWidgetObjectTable.vue'\n\n/**\n * Built-in widget registry.\n *\n * The `data` and `metadata` keys are the canonical object-detail widgets:\n * a manifest `type:\"detail\"` page that places `widgetKey:\"data\"` /\n * `widgetKey:\"metadata\"` gets the object's editable property grid /\n * read-only `@self` metadata respectively. Both need the loaded object —\n * `CnPageRenderer` loads it for the detail page and `CnWidgetGrid` merges\n * `{ objectData, schema, objectType, objectId, register, store }` into each\n * widget's props (see CnWidgetGrid.resolvedWidgets), so the manifest entry\n * needs no per-widget `props`.\n *\n * The `integration` key places an OpenRegister integration leaf\n * (`CnIntegrationWidget`) on the page — e.g. Integriq's `sync-contract`\n * (\"Synced from\"). Pick the leaf with `props.only: \"<integrationId>\"`; the\n * object's `register` / `objectId` arrive via the detail-context merge, and\n * the manifest should set `props.schema` to the schema slug (the merged\n * context `schema` is the schema *object*, so an explicit slug prop wins).\n *\n * The `banner` key places a declarative notice banner (CnBannerWidget):\n * `props { variant, text, visibleWhen?, route? }` — see the component for\n * the visibleWhen predicate shape.\n *\n * The `audit-trail` key places the object change-log card\n * (CnAuditTrailWidget) — a detail-page widget whose register / schema /\n * objectId arrive via the detail-context merge (or explicit `props`).\n *\n * The `header` / `text` / `divider` keys reuse the dashboard catalog's\n * content-only presentation widgets on v2 pages: each takes a single\n * `props.content` object with the same shape their dashboard `content`\n * blob uses (see the components' docblocks).\n *\n * The `nav-card-grid` key (ADR-044 §4 cards-collapse) places CnNavCardGrid:\n * a grid of arbitrary navigation-link cards from `props.entries` (the\n * navCardEntry shape). Unlike `card-grid` (CnWidgetCardGrid, which renders\n * OpenRegister objects as CnObjectCard), `nav-card-grid` renders links, not\n * data — the intended remedy for a deep menu group collapsed into one\n * top-level entry via `menu-layout.json` relocations.\n *\n * @type {Record<string, import('vue').Component>}\n */\nexport const BUILT_IN_WIDGETS = {\n\t'object-table': CnWidgetObjectTable,\n\t'form-renderer': CnWidgetFormRenderer,\n\t'map-viewer': CnWidgetMapViewer,\n\t'object-geo': CnObjectGeoWidget,\n\t'card-grid': CnWidgetCardGrid,\n\t'nav-card-grid': CnNavCardGrid,\n\tdata: CnObjectDataWidget,\n\tmetadata: CnObjectMetadataWidget,\n\trelated: CnRelatedObjectsWidget,\n\tintegration: CnIntegrationWidget,\n\tbanner: CnBannerWidget,\n\t'audit-trail': CnAuditTrailWidget,\n\ttimeline: CnTimelineWidget,\n\theader: CnHeaderWidget,\n\ttext: CnTextWidget,\n\tdivider: CnDividerWidget,\n}\n"],"names":["CnWidgetObjectTable","CnWidgetFormRenderer","CnWidgetMapViewer","CnObjectGeoWidget","CnWidgetCardGrid","CnNavCardGrid","CnObjectDataWidget","CnObjectMetadataWidget","CnRelatedObjectsWidget","CnIntegrationWidget","CnBannerWidget","CnAuditTrailWidget","CnTimelineWidget","CnHeaderWidget","CnTextWidget","CnDividerWidget"],"mappings":"
|
|
1
|
+
{"version":3,"file":"builtInWidgets.js","sources":["../../../../src/components/CnWidgetGrid/builtInWidgets.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Conduction B.V.\n * SPDX-License-Identifier: EUPL-1.2\n *\n * builtInWidgets — internal registry of the library's built-in v2 widget components.\n *\n * Keys are the `widgetKey` values used in v2 manifests.\n * Values are the Vue component definitions.\n *\n * CnWidgetGrid resolves widget keys first against this registry, then against\n * the consumer-supplied `cnRegistry` inject. A consumer can override a built-in\n * by registering a custom component with the same key in `cnRegistry`.\n *\n * Spec: REQ-MVR-005 (manifest-v2-renderer) — widget key resolution\n */\n\nimport CnAuditTrailWidget from '../CnAuditTrailWidget/CnAuditTrailWidget.vue'\nimport CnBannerWidget from '../CnBannerWidget/CnBannerWidget.vue'\nimport CnDividerWidget from '../CnDividerWidget/CnDividerWidget.vue'\nimport CnExportsWidget from '../CnExportsWidget/CnExportsWidget.vue'\nimport CnHeaderWidget from '../CnHeaderWidget/CnHeaderWidget.vue'\nimport CnIntegrationWidget from '../CnIntegrationWidget/CnIntegrationWidget.vue'\nimport CnNavCardGrid from '../CnNavCardGrid/CnNavCardGrid.vue'\nimport CnObjectDataWidget from '../CnObjectDataWidget/CnObjectDataWidget.vue'\nimport CnObjectGeoWidget from '../CnObjectGeoWidget/CnObjectGeoWidget.vue'\nimport CnObjectMetadataWidget from '../CnObjectMetadataWidget/CnObjectMetadataWidget.vue'\nimport CnRelatedObjectsWidget from '../CnRelatedObjectsWidget/CnRelatedObjectsWidget.vue'\nimport CnSavedViewAlertWidget from '../CnSavedViewAlertWidget/CnSavedViewAlertWidget.vue'\nimport CnTextWidget from '../CnTextWidget/CnTextWidget.vue'\nimport CnTimelineWidget from '../CnTimelineWidget/CnTimelineWidget.vue'\nimport CnWidgetCardGrid from '../CnWidgetCardGrid/CnWidgetCardGrid.vue'\nimport CnWidgetFormRenderer from '../CnWidgetFormRenderer/CnWidgetFormRenderer.vue'\nimport CnWidgetMapViewer from '../CnWidgetMapViewer/CnWidgetMapViewer.vue'\nimport CnWidgetObjectTable from '../CnWidgetObjectTable/CnWidgetObjectTable.vue'\n\n/**\n * Built-in widget registry.\n *\n * The `data` and `metadata` keys are the canonical object-detail widgets:\n * a manifest `type:\"detail\"` page that places `widgetKey:\"data\"` /\n * `widgetKey:\"metadata\"` gets the object's editable property grid /\n * read-only `@self` metadata respectively. Both need the loaded object —\n * `CnPageRenderer` loads it for the detail page and `CnWidgetGrid` merges\n * `{ objectData, schema, objectType, objectId, register, store }` into each\n * widget's props (see CnWidgetGrid.resolvedWidgets), so the manifest entry\n * needs no per-widget `props`.\n *\n * The `integration` key places an OpenRegister integration leaf\n * (`CnIntegrationWidget`) on the page — e.g. Integriq's `sync-contract`\n * (\"Synced from\"). Pick the leaf with `props.only: \"<integrationId>\"`; the\n * object's `register` / `objectId` arrive via the detail-context merge, and\n * the manifest should set `props.schema` to the schema slug (the merged\n * context `schema` is the schema *object*, so an explicit slug prop wins).\n *\n * The `banner` key places a declarative notice banner (CnBannerWidget):\n * `props { variant, text, visibleWhen?, route? }` — see the component for\n * the visibleWhen predicate shape.\n *\n * The `audit-trail` key places the object change-log card\n * (CnAuditTrailWidget) — a detail-page widget whose register / schema /\n * objectId arrive via the detail-context merge (or explicit `props`).\n *\n * The `header` / `text` / `divider` keys reuse the dashboard catalog's\n * content-only presentation widgets on v2 pages: each takes a single\n * `props.content` object with the same shape their dashboard `content`\n * blob uses (see the components' docblocks).\n *\n * The `nav-card-grid` key (ADR-044 §4 cards-collapse) places CnNavCardGrid:\n * a grid of arbitrary navigation-link cards from `props.entries` (the\n * navCardEntry shape). Unlike `card-grid` (CnWidgetCardGrid, which renders\n * OpenRegister objects as CnObjectCard), `nav-card-grid` renders links, not\n * data — the intended remedy for a deep menu group collapsed into one\n * top-level entry via `menu-layout.json` relocations.\n *\n * @type {Record<string, import('vue').Component>}\n */\nexport const BUILT_IN_WIDGETS = {\n\t'object-table': CnWidgetObjectTable,\n\t'form-renderer': CnWidgetFormRenderer,\n\t'map-viewer': CnWidgetMapViewer,\n\t'object-geo': CnObjectGeoWidget,\n\t'card-grid': CnWidgetCardGrid,\n\t'nav-card-grid': CnNavCardGrid,\n\tdata: CnObjectDataWidget,\n\tmetadata: CnObjectMetadataWidget,\n\trelated: CnRelatedObjectsWidget,\n\tintegration: CnIntegrationWidget,\n\tbanner: CnBannerWidget,\n\t'audit-trail': CnAuditTrailWidget,\n\ttimeline: CnTimelineWidget,\n\theader: CnHeaderWidget,\n\ttext: CnTextWidget,\n\tdivider: CnDividerWidget,\n\t'saved-view-alert': CnSavedViewAlertWidget,\n\texports: CnExportsWidget,\n}\n"],"names":["CnWidgetObjectTable","CnWidgetFormRenderer","CnWidgetMapViewer","CnObjectGeoWidget","CnWidgetCardGrid","CnNavCardGrid","CnObjectDataWidget","CnObjectMetadataWidget","CnRelatedObjectsWidget","CnIntegrationWidget","CnBannerWidget","CnAuditTrailWidget","CnTimelineWidget","CnHeaderWidget","CnTextWidget","CnDividerWidget","CnSavedViewAlertWidget","CnExportsWidget"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,gBAAgB,GAAG;AAChC,CAAC,cAAc,EAAEA,UAAmB;AACpC,CAAC,eAAe,EAAEC,YAAoB;AACtC,CAAC,YAAY,EAAEC,YAAiB;AAChC,CAAC,YAAY,EAAEC,YAAiB;AAChC,CAAC,WAAW,EAAEC,YAAgB;AAC9B,CAAC,eAAe,EAAEC,YAAa;AAC/B,CAAC,IAAI,EAAEC,YAAkB;AACzB,CAAC,QAAQ,EAAEC,YAAsB;AACjC,CAAC,OAAO,EAAEC,YAAsB;AAChC,CAAC,WAAW,EAAEC,YAAmB;AACjC,CAAC,MAAM,EAAEC,YAAc;AACvB,CAAC,aAAa,EAAEC,YAAkB;AAClC,CAAC,QAAQ,EAAEC,YAAgB;AAC3B,CAAC,MAAM,EAAEC,YAAc;AACvB,CAAC,IAAI,EAAEC,YAAY;AACnB,CAAC,OAAO,EAAEC,YAAe;AACzB,CAAC,kBAAkB,EAAEC,YAAsB;AAC3C,CAAC,OAAO,EAAEC,YAAe;AACzB;;;;"}
|
|
@@ -51,6 +51,7 @@ import '../CnTasksWidget/index.js';
|
|
|
51
51
|
import '../CnSectionsWidget/index.js';
|
|
52
52
|
import '../CnFactsWidget/index.js';
|
|
53
53
|
import '../CnDeviceFramesWidget/index.js';
|
|
54
|
+
import '../CnGroupedCardsWidget/index.js';
|
|
54
55
|
import '../CnChecklistRunWidget/index.js';
|
|
55
56
|
import '../CnWorkingCalendarWidget/index.js';
|
|
56
57
|
import '../CnPartyActionsWidget/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerDashboardWidgets.js","sources":["../../../../src/components/CnWidgetGrid/registerDashboardWidgets.js"],"sourcesContent":["/**\n * Side-effect aggregator for the cn-widget-library dashboard widget catalog.\n *\n * Importing this module imports every migrated widget's `index.js`, each of\n * which self-registers its `{ renderer, form, defaultContent, displayName,\n * icon }` into `dashboardWidgetRegistry` at load time. The library barrel\n * imports this module so the catalog is populated whenever a consuming app\n * imports `@conduction/nextcloud-vue`; `CnWidgetGrid` then resolves widgets by\n * type key and `CnAddWidgetModal` lists the addable types.\n *\n * The individual widget components are intentionally NOT public exports — they\n * are resolved by their registry type key (the whole point of the registry),\n * so consumers reference them via the manifest `widgetKey`, not by import.\n *\n * @module components/CnWidgetGrid/registerDashboardWidgets\n */\n\nimport CnChartWidget from '../CnChartWidget/CnChartWidget.vue'\nimport CnChartWidgetForm from '../CnChartWidgetForm/CnChartWidgetForm.vue'\nimport CnConversationWidget from '../CnConversationThread/CnConversationWidget.vue'\nimport CnCountdownWidget from '../CnCountdownWidget/CnCountdownWidget.vue'\nimport CnCountdownWidgetForm from '../CnCountdownWidgetForm/CnCountdownWidgetForm.vue'\nimport CnDocumentReviewWidget from '../CnDocumentReviewList/CnDocumentReviewWidget.vue'\nimport CnMapWidget from '../CnMapWidget/CnMapWidget.vue'\nimport CnMapWidgetForm from '../CnMapWidgetForm/CnMapWidgetForm.vue'\nimport CnMarkdownWidget2 from '../CnMarkdownWidget/CnMarkdownWidget.vue'\nimport CnMarkdownWidgetForm2 from '../CnMarkdownWidgetForm/CnMarkdownWidgetForm.vue'\nimport CnNextStepWidget from '../CnNextStepCard/CnNextStepWidget.vue'\nimport CnObjectListWidget2 from '../CnObjectListWidget/CnObjectListWidget.vue'\nimport CnObjectListWidgetForm2 from '../CnObjectListWidgetForm/CnObjectListWidgetForm.vue'\nimport CnRelatedObjectsWidget from '../CnRelatedObjectsWidget/CnRelatedObjectsWidget.vue'\nimport CnRelatedObjectsWidgetForm from '../CnRelatedObjectsWidgetForm/CnRelatedObjectsWidgetForm.vue'\nimport CnSavedViewWidget2 from '../CnSavedViewWidget/CnSavedViewWidget.vue'\nimport CnSavedViewWidgetForm2 from '../CnSavedViewWidgetForm/CnSavedViewWidgetForm.vue'\nimport CnStackedBarWidget from '../CnStackedBarWidget/CnStackedBarWidget.vue'\nimport CnStackedBarWidgetForm from '../CnStackedBarWidgetForm/CnStackedBarWidgetForm.vue'\nimport CnStagesWidget from '../CnStagesWidget/CnStagesWidget.vue'\nimport CnStagesWidgetForm from '../CnStagesWidgetForm/CnStagesWidgetForm.vue'\nimport CnStatsBlockWidget from '../CnStatsBlockWidget/CnStatsBlockWidget.vue'\nimport CnStatsBlockWidgetForm from '../CnStatsBlockWidgetForm/CnStatsBlockWidgetForm.vue'\nimport CnTabsWidget from '../CnTabsWidget/CnTabsWidget.vue'\nimport CnTabsWidgetForm from '../CnTabsWidgetForm/CnTabsWidgetForm.vue'\nimport CnWeekStripWidget from '../CnWeekStripWidget/CnWeekStripWidget.vue'\nimport CnWeekStripWidgetForm from '../CnWeekStripWidgetForm/CnWeekStripWidgetForm.vue'\n// Typed widgets registered with an explicit renderer + config FORM. chart /\n// stats-block render through CnDashboardPage's own isChart()/isStatsBlock()\n// branches and `related` through CnDetailPage's isRelatedWidget() branch — the\n// registry entry exists so the cog editor + Add-widget picker get a form (and,\n// for `related`, the detail-page surface). `table` aliases the object-list\n// renderer/form for legacy manifests using type:'table'.\nimport { registerDashboardWidget } from './dashboardWidgetRegistry.js'\n\nimport '../CnLabelWidget/index.js'\nimport '../CnTextWidget/index.js'\nimport '../CnImageWidget/index.js'\nimport '../CnLinkButtonWidget/index.js'\nimport '../CnDividerWidget/index.js'\nimport '../CnHeaderWidget/index.js'\nimport '../CnQuicklinksWidget/index.js'\nimport '../CnVideoWidget/index.js'\nimport '../CnDashTileWidget/index.js'\nimport '../CnLinksWidget/index.js'\nimport '../CnMenuWidget/index.js'\nimport '../CnContainerWidget/index.js'\nimport '../CnFilesWidget/index.js'\nimport '../CnPeopleWidget/index.js'\nimport '../CnCalendarWidget/index.js'\nimport '../CnNcWidgetWidget/index.js'\nimport '../CnSpendAnalyticsWidget/index.js'\nimport '../CnStatWidget/index.js'\nimport '../CnDeltaWidget/index.js'\nimport '../CnGaugeWidget/index.js'\nimport '../CnFlowRunsWidget/index.js'\nimport '../CnTasksWidget/index.js'\nimport '../CnSectionsWidget/index.js'\nimport '../CnFactsWidget/index.js'\nimport '../CnDeviceFramesWidget/index.js'\nimport '../CnChecklistRunWidget/index.js'\nimport '../CnWorkingCalendarWidget/index.js'\nimport '../CnPartyActionsWidget/index.js'\nimport '../CnFieldListWidget/index.js'\nimport '../CnSettingsFormWidget/index.js'\nimport '../CnSwitchRowsWidget/index.js'\nimport '../CnRadioCardsWidget/index.js'\nimport '../CnChipsFieldWidget/index.js'\nimport '../CnToggleTableWidget/index.js'\nimport '../CnChoicePickerWidget/index.js'\nimport '../CnRecordListWidget/index.js'\nimport '../CnSavedViewsWidget/index.js'\nimport '../CnNotepadWidget/index.js'\nimport '../CnObjectDataWidget/dashboardRegistration.js'\nimport '../CnObjectGeoWidget/dashboardRegistration.js'\nimport '../CnWidgetObjectTable/dashboardRegistration.js'\nimport '../CnAuditTrailWidget/dashboardRegistration.js'\nimport '../CnTimelineWidget/dashboardRegistration.js'\nimport '../CnKbSearchWidget/index.js'\nimport '../CnInteractionFormWidget/index.js'\nimport '../CnBannerWidget/index.js'\nimport '../CnWorkspaceFilterWidget/index.js'\n\nregisterDashboardWidget('chart', {\n\trenderer: CnChartWidget,\n\tform: CnChartWidgetForm,\n\tdefaultContent: {\n\t\tchartKind: 'area',\n\t\tdataSource: { register: '', schema: '', filter: {}, bucket: { field: '', interval: 'month', metric: 'count', metricField: '' } },\n\t},\n\tdisplayName: 'Chart',\n\ticon: 'ChartLine',\n})\n\nregisterDashboardWidget('stats-block', {\n\trenderer: CnStatsBlockWidget,\n\tform: CnStatsBlockWidgetForm,\n\tdefaultContent: {\n\t\ttitle: '',\n\t\tprops: { countLabel: '', variant: 'default', iconClass: '' },\n\t\tdataSource: { register: '', schema: '', metric: 'count', field: '', filter: {} },\n\t},\n\tdisplayName: 'Statistic card',\n\ticon: 'ChartBar',\n\t// Card family (docs/architecture/cards-and-widgets.md), like `stat` and\n\t// `delta`: the tile headlines itself with its own title, so the wrapper\n\t// renders no header of its own and would otherwise show the title twice.\n\tcard: true,\n})\n\n// `table` and `object-list` (below) are legacy aliases of `object-table` — same\n// config form (CnObjectListWidgetForm), same job. They stay registered so\n// existing placements keep rendering, but are hidden from every Add-widget\n// picker via a sentinel surface no picker queries (see widgetTypeAllowsSurface):\n// `object-table` is the one to add now. Rendering resolves through\n// getWidgetTypeEntry, which ignores `surfaces`, so hidden ≠ broken.\nregisterDashboardWidget('table', {\n\trenderer: CnObjectListWidget2,\n\tform: CnObjectListWidgetForm2,\n\tdefaultContent: {\n\t\tregister: '',\n\t\tschema: '',\n\t\tfilter: {},\n\t\tsort: { field: '', dir: 'asc' },\n\t\tlimit: 10,\n\t\tcolumns: [],\n\t},\n\tdisplayName: 'Table',\n\ticon: 'ClipboardList',\n\tsurfaces: ['legacy'],\n})\n\n// `object-list` is registered HERE and only here. Registering it from\n// CnObjectListWidget/index.js instead is not enough: package.json declares\n// `sideEffects: [\"**/*.css\"]` (ADR-061 tree-shaking), which lets\n// rollup/webpack legally DROP bare imports of side-effect-free JS modules —\n// the dist bundle shipped without the object-list registration and every\n// manifest `type:\"object-list\"` widget rendered blank. Inline calls in this\n// module survive because consumers import live bindings from the registry.\n//\n// That index.js ALSO self-registered, with a divergent entry (limit 5, no\n// `surfaces`), so both ran in a consumer's build — components/index.js\n// re-exports it, so it was never tree-shaken — and last-registration-wins\n// decided whether this legacy alias stayed hidden from the Add-widget picker.\n// The self-registration is gone; this entry is the one that already won.\nregisterDashboardWidget('object-list', {\n\trenderer: CnObjectListWidget2,\n\tform: CnObjectListWidgetForm2,\n\tdefaultContent: {\n\t\tregister: '',\n\t\tschema: '',\n\t\tfilter: {},\n\t\tsort: { field: '', dir: 'asc' },\n\t\tlimit: 25,\n\t\tcolumns: [],\n\t},\n\tdisplayName: 'Object list',\n\ticon: 'ClipboardList',\n\tsurfaces: ['legacy'],\n})\n\n// `saved-view`: a list driven by one of the reader's saved views. The only data\n// widget a user may add themselves, because the view carries the register and\n// schema a user would otherwise have to name. Registered inline for the same\n// tree-shaking reason as `object-list` above.\n// @spec openspec/changes/a-saved-view-drives-a-widget/tasks.md#task-1.1\nregisterDashboardWidget('saved-view', {\n\trenderer: CnSavedViewWidget2,\n\tform: CnSavedViewWidgetForm2,\n\tdefaultContent: { viewId: '', limit: 10 },\n\tdisplayName: 'Saved view',\n\ticon: 'ClipboardList',\n\tuserAddable: true,\n})\n\n// `markdown`: prose inside a grid page, through the one shared renderer. The\n// only catalog widget a PUBLIC host may mount so far: every other entry is\n// `public: false` until its author opts in deliberately.\n// @spec openspec/changes/widget-registry-public-flag/tasks.md#task-4\nregisterDashboardWidget('markdown', {\n\trenderer: CnMarkdownWidget2,\n\tform: CnMarkdownWidgetForm2,\n\tdefaultContent: { markdown: '' },\n\tdisplayName: 'Markdown',\n\ticon: 'FormatTitle',\n\tpublic: true,\n})\n\nregisterDashboardWidget('related', {\n\trenderer: CnRelatedObjectsWidget,\n\tform: CnRelatedObjectsWidgetForm,\n\tdefaultContent: { title: '', groups: [], hideSingleTabTitle: true, showTotalCount: true },\n\tdisplayName: 'Object relations',\n\ticon: 'FileTreeOutline',\n\tsurfaces: ['detail-page'],\n\townsTitle: true,\n})\n\n// `map` is registered here for the same tree-shaking reason as `object-list`\n// above — a bare `import '../CnMapWidget/index.js'` is a side-effect-free JS module\n// as far as the bundler is concerned, so it may legally be dropped and the widget\n// would silently never appear in Add Widget. CnMapWidget/index.js carried a\n// byte-identical copy of this entry, which only produced a duplicate-registration\n// warning on every consumer's boot; it no longer registers.\nregisterDashboardWidget('map', {\n\trenderer: CnMapWidget,\n\tform: CnMapWidgetForm,\n\tdefaultContent: {\n\t\tregister: '',\n\t\tschema: '',\n\t\t// The Netherlands, roughly — only visible until autoFit frames the objects.\n\t\tcenter: [52.13, 5.29],\n\t\tzoom: 7,\n\t\theight: '400px',\n\t\tpopupField: '',\n\t\tclustering: false,\n\t\tautoFit: true,\n\t\t// A map with no tile layer renders as a grey box. `basemaps` is opt-in and\n\t\t// empty by default (so consumers declaring a `tile` entry in `layers` are\n\t\t// unaffected), which meant a freshly-placed Map widget had NO background at\n\t\t// all. Ship OpenStreetMap — the Nextcloud CSP already allows *.tile.openstreetmap.org.\n\t\tbasemaps: [\n\t\t\t{\n\t\t\t\tname: 'OpenStreetMap',\n\t\t\t\turl: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',\n\t\t\t\tattribution: '© OpenStreetMap contributors',\n\t\t\t\toptions: { maxZoom: 19 },\n\t\t\t},\n\t\t],\n\t\tmarkers: {\n\t\t\tdataSource: { register: '', schema: '' },\n\t\t\tpopupField: '',\n\t\t\tclustering: false,\n\t\t},\n\t},\n\tdisplayName: 'Map',\n\ticon: 'Map',\n})\n\nregisterDashboardWidget('countdown', {\n\trenderer: CnCountdownWidget,\n\tform: CnCountdownWidgetForm,\n\tdefaultContent: {\n\t\tlabel: '',\n\t\tfield: '',\n\t\ticon: 'ClockOutline',\n\t\tthresholds: {},\n\t\tshowDate: true,\n\t},\n\tdisplayName: 'Countdown',\n\ticon: 'ClockOutline',\n\t// Card family: the tile headlines itself, so the wrapper draws no header.\n\tcard: true,\n\t// It reads a date off the BOUND RECORD, which only a detail page has.\n\tsurfaces: ['detail-page'],\n})\n\n// The case surfaces (detail-action-model-and-case-surfaces). Each reads the\n// BOUND RECORD, which only a detail page has, and none has a config form yet,\n// so `form: null` keeps them out of the Add-widget picker: they are placed\n// from the manifest. Registered inline for the same tree-shaking reason as\n// `map` above.\nregisterDashboardWidget('next-step', {\n\trenderer: CnNextStepWidget,\n\tform: null,\n\tdefaultContent: { field: 'status', stages: {} },\n\tdisplayName: 'Next step',\n\ticon: 'CheckCircleOutline',\n\tsurfaces: ['detail-page'],\n\townsTitle: true,\n})\n\nregisterDashboardWidget('document-review', {\n\trenderer: CnDocumentReviewWidget,\n\tform: null,\n\tdefaultContent: { field: 'documents', statusField: 'reviewStatus', statuses: [] },\n\tdisplayName: 'Document review',\n\ticon: 'FileDocumentCheckOutline',\n\tsurfaces: ['detail-page'],\n\townsTitle: true,\n})\n\nregisterDashboardWidget('conversation', {\n\trenderer: CnConversationWidget,\n\tform: null,\n\tdefaultContent: { field: 'messages', endpoint: '' },\n\tdisplayName: 'Conversation',\n\ticon: 'ForumOutline',\n\tsurfaces: ['detail-page'],\n\townsTitle: true,\n})\n\n// The record's stages, where clicking a stage moves the record there.\n// Registered inline for the same tree-shaking reason as `map` above.\nregisterDashboardWidget('stages', {\n\trenderer: CnStagesWidget,\n\tform: CnStagesWidgetForm,\n\tdefaultContent: {\n\t\tcurrentField: 'status',\n\t\torientation: 'horizontal',\n\t\tsize: 'medium',\n\t\tstagesEndpoint: { url: '', path: '' },\n\t\t// The LIFECYCLE, not a record write. OpenRegister decides what is\n\t\t// reachable and re-validates the move; a field write has neither.\n\t\ttransition: { kind: 'lifecycle' },\n\t},\n\tdisplayName: 'Stages',\n\ticon: 'Timeline',\n\t// Card family on the detail grid: a titled wrapper around a self-contained\n\t// strip, like the KPI tiles it usually sits beside.\n\tcard: true,\n\t// It reads and moves the BOUND RECORD, which only a detail page has.\n\tsurfaces: ['detail-page'],\n})\n\nregisterDashboardWidget('tabs', {\n\trenderer: CnTabsWidget,\n\tform: CnTabsWidgetForm,\n\tdefaultContent: {\n\t\ttabs: [],\n\t\tariaLabel: '',\n\t},\n\tdisplayName: 'Tabs',\n\ticon: 'TabPlus',\n\t// Renders OTHER widgets, so CnDetailWidgetHost hands it the surface's\n\t// sibling definitions and the context its children will need.\n\tcontainer: true,\n\t// The strip's labels ARE the titles, so a card header above them would name\n\t// the group twice.\n\townsTitle: true,\n\tsurfaces: ['detail-page'],\n})\n\n// The current week as day columns, with the dated items under each day.\n// Registered inline for the same tree-shaking reason as `map` above.\nregisterDashboardWidget('week-strip', {\n\trenderer: CnWeekStripWidget,\n\tform: CnWeekStripWidgetForm,\n\tdefaultContent: {\n\t\tsource: { register: '', schema: '', filter: {} },\n\t\tdateField: '',\n\t\ttitleField: '',\n\t\tmetaFields: [],\n\t\tdays: 5,\n\t\titemRoute: '',\n\t\temptyText: '',\n\t},\n\tdisplayName: 'Week strip',\n\ticon: 'Calendar',\n})\n\n// One segmented bar with a legend that carries the numbers.\nregisterDashboardWidget('stacked-bar', {\n\trenderer: CnStackedBarWidget,\n\tform: CnStackedBarWidgetForm,\n\tdefaultContent: {\n\t\tsource: { register: '', schema: '', groupBy: '', filter: {} },\n\t\torder: [],\n\t\tlabels: {},\n\t\temptyText: '',\n\t},\n\tdisplayName: 'Stacked bar',\n\ticon: 'ChartBar',\n})\n\n/**\n * Explicit no-op that guarantees this module (and therefore every widget's\n * self-registration side effect) is evaluated. Now optional: `CnDashboardPage`\n * and `CnDetailPage` import this module themselves, and a second call changes\n * nothing because the module body runs once.\n *\n * @return {void}\n */\nexport function registerBuiltinDashboardWidgets() {}\n"],"names":["CnChartWidget","CnChartWidgetForm","CnStatsBlockWidget","CnStatsBlockWidgetForm","CnObjectListWidget2","CnObjectListWidgetForm2","CnSavedViewWidget2","CnSavedViewWidgetForm2","CnMarkdownWidget2","CnMarkdownWidgetForm2","CnRelatedObjectsWidget","CnRelatedObjectsWidgetForm","CnMapWidget","CnMapWidgetForm","CnCountdownWidget","CnCountdownWidgetForm","CnNextStepWidget","CnDocumentReviewWidget","CnConversationWidget","CnStagesWidget","CnStagesWidgetForm","CnTabsWidget","CnTabsWidgetForm","CnWeekStripWidget","CnWeekStripWidgetForm","CnStackedBarWidget","CnStackedBarWidgetForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAmFA;AACA,uBAAuB,CAAC,OAAO,EAAE;AACjC,CAAC,QAAQ,EAAEA,UAAa;AACxB,CAAC,IAAI,EAAEC,YAAiB;AACxB,CAAC,cAAc,EAAE;AACjB,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE;AAClI,EAAE;AACF,CAAC,WAAW,EAAE,OAAO;AACrB,CAAC,IAAI,EAAE,WAAW;AAClB,CAAC,EAAC;AACF;AACA,uBAAuB,CAAC,aAAa,EAAE;AACvC,CAAC,QAAQ,EAAEC,YAAkB;AAC7B,CAAC,IAAI,EAAEC,YAAsB;AAC7B,CAAC,cAAc,EAAE;AACjB,EAAE,KAAK,EAAE,EAAE;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AE,IAAI,EAAE,CAAC;AACT,EAAE,SAAS,EAAE,EAAE;AACf,EAAE,SAAS,EAAE,EAAE;AACf,EAAE;AACF,CAAC,WAAW,EAAE,YAAY;AAC1B,CAAC,IAAI,EAAE,UAAU;AACjB,CAAC,EAAC;AACF;AACA;AACA,uBAAuB,CAAC,aAAa,EAAE;AACvC,CAAC,QAAQ,EAAEC,YAAkB;AAC7B,CAAC,IAAI,EAAEC,YAAsB;AAC7B,CAAC,cAAc,EAAE;AACjB,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;AAC/D,EAAE,KAAK,EAAE,EAAE;AACX,EAAE,MAAM,EAAE,EAAE;AACZ,EAAE,SAAS,EAAE,EAAE;AACf,EAAE;AACF,CAAC,WAAW,EAAE,aAAa;AAC3B,CAAC,IAAI,EAAE,UAAU;AACjB,CAAC,EAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,+BAA+B,GAAG;;;;"}
|
|
1
|
+
{"version":3,"file":"registerDashboardWidgets.js","sources":["../../../../src/components/CnWidgetGrid/registerDashboardWidgets.js"],"sourcesContent":["/**\n * Side-effect aggregator for the cn-widget-library dashboard widget catalog.\n *\n * Importing this module imports every migrated widget's `index.js`, each of\n * which self-registers its `{ renderer, form, defaultContent, displayName,\n * icon }` into `dashboardWidgetRegistry` at load time. The library barrel\n * imports this module so the catalog is populated whenever a consuming app\n * imports `@conduction/nextcloud-vue`; `CnWidgetGrid` then resolves widgets by\n * type key and `CnAddWidgetModal` lists the addable types.\n *\n * The individual widget components are intentionally NOT public exports — they\n * are resolved by their registry type key (the whole point of the registry),\n * so consumers reference them via the manifest `widgetKey`, not by import.\n *\n * @module components/CnWidgetGrid/registerDashboardWidgets\n */\n\nimport CnChartWidget from '../CnChartWidget/CnChartWidget.vue'\nimport CnChartWidgetForm from '../CnChartWidgetForm/CnChartWidgetForm.vue'\nimport CnConversationWidget from '../CnConversationThread/CnConversationWidget.vue'\nimport CnCountdownWidget from '../CnCountdownWidget/CnCountdownWidget.vue'\nimport CnCountdownWidgetForm from '../CnCountdownWidgetForm/CnCountdownWidgetForm.vue'\nimport CnDocumentReviewWidget from '../CnDocumentReviewList/CnDocumentReviewWidget.vue'\nimport CnMapWidget from '../CnMapWidget/CnMapWidget.vue'\nimport CnMapWidgetForm from '../CnMapWidgetForm/CnMapWidgetForm.vue'\nimport CnMarkdownWidget2 from '../CnMarkdownWidget/CnMarkdownWidget.vue'\nimport CnMarkdownWidgetForm2 from '../CnMarkdownWidgetForm/CnMarkdownWidgetForm.vue'\nimport CnNextStepWidget from '../CnNextStepCard/CnNextStepWidget.vue'\nimport CnObjectListWidget2 from '../CnObjectListWidget/CnObjectListWidget.vue'\nimport CnObjectListWidgetForm2 from '../CnObjectListWidgetForm/CnObjectListWidgetForm.vue'\nimport CnRelatedObjectsWidget from '../CnRelatedObjectsWidget/CnRelatedObjectsWidget.vue'\nimport CnRelatedObjectsWidgetForm from '../CnRelatedObjectsWidgetForm/CnRelatedObjectsWidgetForm.vue'\nimport CnSavedViewWidget2 from '../CnSavedViewWidget/CnSavedViewWidget.vue'\nimport CnSavedViewWidgetForm2 from '../CnSavedViewWidgetForm/CnSavedViewWidgetForm.vue'\nimport CnStackedBarWidget from '../CnStackedBarWidget/CnStackedBarWidget.vue'\nimport CnStackedBarWidgetForm from '../CnStackedBarWidgetForm/CnStackedBarWidgetForm.vue'\nimport CnStagesWidget from '../CnStagesWidget/CnStagesWidget.vue'\nimport CnStagesWidgetForm from '../CnStagesWidgetForm/CnStagesWidgetForm.vue'\nimport CnStatsBlockWidget from '../CnStatsBlockWidget/CnStatsBlockWidget.vue'\nimport CnStatsBlockWidgetForm from '../CnStatsBlockWidgetForm/CnStatsBlockWidgetForm.vue'\nimport CnTabsWidget from '../CnTabsWidget/CnTabsWidget.vue'\nimport CnTabsWidgetForm from '../CnTabsWidgetForm/CnTabsWidgetForm.vue'\nimport CnWeekStripWidget from '../CnWeekStripWidget/CnWeekStripWidget.vue'\nimport CnWeekStripWidgetForm from '../CnWeekStripWidgetForm/CnWeekStripWidgetForm.vue'\n// Typed widgets registered with an explicit renderer + config FORM. chart /\n// stats-block render through CnDashboardPage's own isChart()/isStatsBlock()\n// branches and `related` through CnDetailPage's isRelatedWidget() branch — the\n// registry entry exists so the cog editor + Add-widget picker get a form (and,\n// for `related`, the detail-page surface). `table` aliases the object-list\n// renderer/form for legacy manifests using type:'table'.\nimport { registerDashboardWidget } from './dashboardWidgetRegistry.js'\n\nimport '../CnLabelWidget/index.js'\nimport '../CnTextWidget/index.js'\nimport '../CnImageWidget/index.js'\nimport '../CnLinkButtonWidget/index.js'\nimport '../CnDividerWidget/index.js'\nimport '../CnHeaderWidget/index.js'\nimport '../CnQuicklinksWidget/index.js'\nimport '../CnVideoWidget/index.js'\nimport '../CnDashTileWidget/index.js'\nimport '../CnLinksWidget/index.js'\nimport '../CnMenuWidget/index.js'\nimport '../CnContainerWidget/index.js'\nimport '../CnFilesWidget/index.js'\nimport '../CnPeopleWidget/index.js'\nimport '../CnCalendarWidget/index.js'\nimport '../CnNcWidgetWidget/index.js'\nimport '../CnSpendAnalyticsWidget/index.js'\nimport '../CnStatWidget/index.js'\nimport '../CnDeltaWidget/index.js'\nimport '../CnGaugeWidget/index.js'\nimport '../CnFlowRunsWidget/index.js'\nimport '../CnTasksWidget/index.js'\nimport '../CnSectionsWidget/index.js'\nimport '../CnFactsWidget/index.js'\nimport '../CnDeviceFramesWidget/index.js'\nimport '../CnGroupedCardsWidget/index.js'\nimport '../CnChecklistRunWidget/index.js'\nimport '../CnWorkingCalendarWidget/index.js'\nimport '../CnPartyActionsWidget/index.js'\nimport '../CnFieldListWidget/index.js'\nimport '../CnSettingsFormWidget/index.js'\nimport '../CnSwitchRowsWidget/index.js'\nimport '../CnRadioCardsWidget/index.js'\nimport '../CnChipsFieldWidget/index.js'\nimport '../CnToggleTableWidget/index.js'\nimport '../CnChoicePickerWidget/index.js'\nimport '../CnRecordListWidget/index.js'\nimport '../CnSavedViewsWidget/index.js'\nimport '../CnNotepadWidget/index.js'\nimport '../CnObjectDataWidget/dashboardRegistration.js'\nimport '../CnObjectGeoWidget/dashboardRegistration.js'\nimport '../CnWidgetObjectTable/dashboardRegistration.js'\nimport '../CnAuditTrailWidget/dashboardRegistration.js'\nimport '../CnTimelineWidget/dashboardRegistration.js'\nimport '../CnKbSearchWidget/index.js'\nimport '../CnInteractionFormWidget/index.js'\nimport '../CnBannerWidget/index.js'\nimport '../CnWorkspaceFilterWidget/index.js'\n\nregisterDashboardWidget('chart', {\n\trenderer: CnChartWidget,\n\tform: CnChartWidgetForm,\n\tdefaultContent: {\n\t\tchartKind: 'area',\n\t\tdataSource: { register: '', schema: '', filter: {}, bucket: { field: '', interval: 'month', metric: 'count', metricField: '' } },\n\t},\n\tdisplayName: 'Chart',\n\ticon: 'ChartLine',\n})\n\nregisterDashboardWidget('stats-block', {\n\trenderer: CnStatsBlockWidget,\n\tform: CnStatsBlockWidgetForm,\n\tdefaultContent: {\n\t\ttitle: '',\n\t\tprops: { countLabel: '', variant: 'default', iconClass: '' },\n\t\tdataSource: { register: '', schema: '', metric: 'count', field: '', filter: {} },\n\t},\n\tdisplayName: 'Statistic card',\n\ticon: 'ChartBar',\n\t// Card family (docs/architecture/cards-and-widgets.md), like `stat` and\n\t// `delta`: the tile headlines itself with its own title, so the wrapper\n\t// renders no header of its own and would otherwise show the title twice.\n\tcard: true,\n})\n\n// `table` and `object-list` (below) are legacy aliases of `object-table` — same\n// config form (CnObjectListWidgetForm), same job. They stay registered so\n// existing placements keep rendering, but are hidden from every Add-widget\n// picker via a sentinel surface no picker queries (see widgetTypeAllowsSurface):\n// `object-table` is the one to add now. Rendering resolves through\n// getWidgetTypeEntry, which ignores `surfaces`, so hidden ≠ broken.\nregisterDashboardWidget('table', {\n\trenderer: CnObjectListWidget2,\n\tform: CnObjectListWidgetForm2,\n\tdefaultContent: {\n\t\tregister: '',\n\t\tschema: '',\n\t\tfilter: {},\n\t\tsort: { field: '', dir: 'asc' },\n\t\tlimit: 10,\n\t\tcolumns: [],\n\t},\n\tdisplayName: 'Table',\n\ticon: 'ClipboardList',\n\tsurfaces: ['legacy'],\n})\n\n// `object-list` is registered HERE and only here. Registering it from\n// CnObjectListWidget/index.js instead is not enough: package.json declares\n// `sideEffects: [\"**/*.css\"]` (ADR-061 tree-shaking), which lets\n// rollup/webpack legally DROP bare imports of side-effect-free JS modules —\n// the dist bundle shipped without the object-list registration and every\n// manifest `type:\"object-list\"` widget rendered blank. Inline calls in this\n// module survive because consumers import live bindings from the registry.\n//\n// That index.js ALSO self-registered, with a divergent entry (limit 5, no\n// `surfaces`), so both ran in a consumer's build — components/index.js\n// re-exports it, so it was never tree-shaken — and last-registration-wins\n// decided whether this legacy alias stayed hidden from the Add-widget picker.\n// The self-registration is gone; this entry is the one that already won.\nregisterDashboardWidget('object-list', {\n\trenderer: CnObjectListWidget2,\n\tform: CnObjectListWidgetForm2,\n\tdefaultContent: {\n\t\tregister: '',\n\t\tschema: '',\n\t\tfilter: {},\n\t\tsort: { field: '', dir: 'asc' },\n\t\tlimit: 25,\n\t\tcolumns: [],\n\t},\n\tdisplayName: 'Object list',\n\ticon: 'ClipboardList',\n\tsurfaces: ['legacy'],\n})\n\n// `saved-view`: a list driven by one of the reader's saved views. The only data\n// widget a user may add themselves, because the view carries the register and\n// schema a user would otherwise have to name. Registered inline for the same\n// tree-shaking reason as `object-list` above.\n// @spec openspec/changes/a-saved-view-drives-a-widget/tasks.md#task-1.1\nregisterDashboardWidget('saved-view', {\n\trenderer: CnSavedViewWidget2,\n\tform: CnSavedViewWidgetForm2,\n\tdefaultContent: { viewId: '', limit: 10 },\n\tdisplayName: 'Saved view',\n\ticon: 'ClipboardList',\n\tuserAddable: true,\n})\n\n// `markdown`: prose inside a grid page, through the one shared renderer. The\n// only catalog widget a PUBLIC host may mount so far: every other entry is\n// `public: false` until its author opts in deliberately.\n// @spec openspec/changes/widget-registry-public-flag/tasks.md#task-4\nregisterDashboardWidget('markdown', {\n\trenderer: CnMarkdownWidget2,\n\tform: CnMarkdownWidgetForm2,\n\tdefaultContent: { markdown: '' },\n\tdisplayName: 'Markdown',\n\ticon: 'FormatTitle',\n\tpublic: true,\n})\n\nregisterDashboardWidget('related', {\n\trenderer: CnRelatedObjectsWidget,\n\tform: CnRelatedObjectsWidgetForm,\n\tdefaultContent: { title: '', groups: [], hideSingleTabTitle: true, showTotalCount: true },\n\tdisplayName: 'Object relations',\n\ticon: 'FileTreeOutline',\n\tsurfaces: ['detail-page'],\n\townsTitle: true,\n})\n\n// `map` is registered here for the same tree-shaking reason as `object-list`\n// above — a bare `import '../CnMapWidget/index.js'` is a side-effect-free JS module\n// as far as the bundler is concerned, so it may legally be dropped and the widget\n// would silently never appear in Add Widget. CnMapWidget/index.js carried a\n// byte-identical copy of this entry, which only produced a duplicate-registration\n// warning on every consumer's boot; it no longer registers.\nregisterDashboardWidget('map', {\n\trenderer: CnMapWidget,\n\tform: CnMapWidgetForm,\n\tdefaultContent: {\n\t\tregister: '',\n\t\tschema: '',\n\t\t// The Netherlands, roughly — only visible until autoFit frames the objects.\n\t\tcenter: [52.13, 5.29],\n\t\tzoom: 7,\n\t\theight: '400px',\n\t\tpopupField: '',\n\t\tclustering: false,\n\t\tautoFit: true,\n\t\t// A map with no tile layer renders as a grey box. `basemaps` is opt-in and\n\t\t// empty by default (so consumers declaring a `tile` entry in `layers` are\n\t\t// unaffected), which meant a freshly-placed Map widget had NO background at\n\t\t// all. Ship OpenStreetMap — the Nextcloud CSP already allows *.tile.openstreetmap.org.\n\t\tbasemaps: [\n\t\t\t{\n\t\t\t\tname: 'OpenStreetMap',\n\t\t\t\turl: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',\n\t\t\t\tattribution: '© OpenStreetMap contributors',\n\t\t\t\toptions: { maxZoom: 19 },\n\t\t\t},\n\t\t],\n\t\tmarkers: {\n\t\t\tdataSource: { register: '', schema: '' },\n\t\t\tpopupField: '',\n\t\t\tclustering: false,\n\t\t},\n\t},\n\tdisplayName: 'Map',\n\ticon: 'Map',\n})\n\nregisterDashboardWidget('countdown', {\n\trenderer: CnCountdownWidget,\n\tform: CnCountdownWidgetForm,\n\tdefaultContent: {\n\t\tlabel: '',\n\t\tfield: '',\n\t\ticon: 'ClockOutline',\n\t\tthresholds: {},\n\t\tshowDate: true,\n\t},\n\tdisplayName: 'Countdown',\n\ticon: 'ClockOutline',\n\t// Card family: the tile headlines itself, so the wrapper draws no header.\n\tcard: true,\n\t// It reads a date off the BOUND RECORD, which only a detail page has.\n\tsurfaces: ['detail-page'],\n})\n\n// The case surfaces (detail-action-model-and-case-surfaces). Each reads the\n// BOUND RECORD, which only a detail page has, and none has a config form yet,\n// so `form: null` keeps them out of the Add-widget picker: they are placed\n// from the manifest. Registered inline for the same tree-shaking reason as\n// `map` above.\nregisterDashboardWidget('next-step', {\n\trenderer: CnNextStepWidget,\n\tform: null,\n\tdefaultContent: { field: 'status', stages: {} },\n\tdisplayName: 'Next step',\n\ticon: 'CheckCircleOutline',\n\tsurfaces: ['detail-page'],\n\townsTitle: true,\n})\n\nregisterDashboardWidget('document-review', {\n\trenderer: CnDocumentReviewWidget,\n\tform: null,\n\tdefaultContent: { field: 'documents', statusField: 'reviewStatus', statuses: [] },\n\tdisplayName: 'Document review',\n\ticon: 'FileDocumentCheckOutline',\n\tsurfaces: ['detail-page'],\n\townsTitle: true,\n})\n\nregisterDashboardWidget('conversation', {\n\trenderer: CnConversationWidget,\n\tform: null,\n\tdefaultContent: { field: 'messages', endpoint: '' },\n\tdisplayName: 'Conversation',\n\ticon: 'ForumOutline',\n\tsurfaces: ['detail-page'],\n\townsTitle: true,\n})\n\n// The record's stages, where clicking a stage moves the record there.\n// Registered inline for the same tree-shaking reason as `map` above.\nregisterDashboardWidget('stages', {\n\trenderer: CnStagesWidget,\n\tform: CnStagesWidgetForm,\n\tdefaultContent: {\n\t\tcurrentField: 'status',\n\t\torientation: 'horizontal',\n\t\tsize: 'medium',\n\t\tstagesEndpoint: { url: '', path: '' },\n\t\t// The LIFECYCLE, not a record write. OpenRegister decides what is\n\t\t// reachable and re-validates the move; a field write has neither.\n\t\ttransition: { kind: 'lifecycle' },\n\t},\n\tdisplayName: 'Stages',\n\ticon: 'Timeline',\n\t// Card family on the detail grid: a titled wrapper around a self-contained\n\t// strip, like the KPI tiles it usually sits beside.\n\tcard: true,\n\t// It reads and moves the BOUND RECORD, which only a detail page has.\n\tsurfaces: ['detail-page'],\n})\n\nregisterDashboardWidget('tabs', {\n\trenderer: CnTabsWidget,\n\tform: CnTabsWidgetForm,\n\tdefaultContent: {\n\t\ttabs: [],\n\t\tariaLabel: '',\n\t},\n\tdisplayName: 'Tabs',\n\ticon: 'TabPlus',\n\t// Renders OTHER widgets, so CnDetailWidgetHost hands it the surface's\n\t// sibling definitions and the context its children will need.\n\tcontainer: true,\n\t// The strip's labels ARE the titles, so a card header above them would name\n\t// the group twice.\n\townsTitle: true,\n\tsurfaces: ['detail-page'],\n})\n\n// The current week as day columns, with the dated items under each day.\n// Registered inline for the same tree-shaking reason as `map` above.\nregisterDashboardWidget('week-strip', {\n\trenderer: CnWeekStripWidget,\n\tform: CnWeekStripWidgetForm,\n\tdefaultContent: {\n\t\tsource: { register: '', schema: '', filter: {} },\n\t\tdateField: '',\n\t\ttitleField: '',\n\t\tmetaFields: [],\n\t\tdays: 5,\n\t\titemRoute: '',\n\t\temptyText: '',\n\t},\n\tdisplayName: 'Week strip',\n\ticon: 'Calendar',\n})\n\n// One segmented bar with a legend that carries the numbers.\nregisterDashboardWidget('stacked-bar', {\n\trenderer: CnStackedBarWidget,\n\tform: CnStackedBarWidgetForm,\n\tdefaultContent: {\n\t\tsource: { register: '', schema: '', groupBy: '', filter: {} },\n\t\torder: [],\n\t\tlabels: {},\n\t\temptyText: '',\n\t},\n\tdisplayName: 'Stacked bar',\n\ticon: 'ChartBar',\n})\n\n/**\n * Explicit no-op that guarantees this module (and therefore every widget's\n * self-registration side effect) is evaluated. Now optional: `CnDashboardPage`\n * and `CnDetailPage` import this module themselves, and a second call changes\n * nothing because the module body runs once.\n *\n * @return {void}\n */\nexport function registerBuiltinDashboardWidgets() {}\n"],"names":["CnChartWidget","CnChartWidgetForm","CnStatsBlockWidget","CnStatsBlockWidgetForm","CnObjectListWidget2","CnObjectListWidgetForm2","CnSavedViewWidget2","CnSavedViewWidgetForm2","CnMarkdownWidget2","CnMarkdownWidgetForm2","CnRelatedObjectsWidget","CnRelatedObjectsWidgetForm","CnMapWidget","CnMapWidgetForm","CnCountdownWidget","CnCountdownWidgetForm","CnNextStepWidget","CnDocumentReviewWidget","CnConversationWidget","CnStagesWidget","CnStagesWidgetForm","CnTabsWidget","CnTabsWidgetForm","CnWeekStripWidget","CnWeekStripWidgetForm","CnStackedBarWidget","CnStackedBarWidgetForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAoFA;AACA,uBAAuB,CAAC,OAAO,EAAE;AACjC,CAAC,QAAQ,EAAEA,UAAa;AACxB,CAAC,IAAI,EAAEC,YAAiB;AACxB,CAAC,cAAc,EAAE;AACjB,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,EAAE;AAClI,EAAE;AACF,CAAC,WAAW,EAAE,OAAO;AACrB,CAAC,IAAI,EAAE,WAAW;AAClB,CAAC,EAAC;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,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;AAClD,EAAE,SAAS,EAAE,EAAE;AACf,EAAE,UAAU,EAAE,EAAE;AAChB,EAAE,UAAU,EAAE,EAAE;AAChB,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,SAAS,EAAE,EAAE;AACf,EAAE,SAAS,EAAE,EAAE;AACf,EAAE;AACF,CAAC,WAAW,EAAE,YAAY;AAC1B,CAAC,IAAI,EAAE,UAAU;AACjB,CAAC,EAAC;AACF;AACA;AACA,uBAAuB,CAAC,aAAa,EAAE;AACvC,CAAC,QAAQ,EAAEC,YAAkB;AAC7B,CAAC,IAAI,EAAEC,YAAsB;AAC7B,CAAC,cAAc,EAAE;AACjB,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;AAC/D,EAAE,KAAK,EAAE,EAAE;AACX,EAAE,MAAM,EAAE,EAAE;AACZ,EAAE,SAAS,EAAE,EAAE;AACf,EAAE;AACF,CAAC,WAAW,EAAE,aAAa;AAC3B,CAAC,IAAI,EAAE,UAAU;AACjB,CAAC,EAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,+BAA+B,GAAG;;;;"}
|
|
@@ -2,7 +2,7 @@ import script from './CnWidgetObjectTable.vue2.js';
|
|
|
2
2
|
import { render } from './CnWidgetObjectTable.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-dfdcad2a";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -9,8 +9,8 @@ import { dispatchAction, resolveObjectOpType } from '../../utils/actionsDispatch
|
|
|
9
9
|
import { resolveObjectTokenContext } from '../../utils/detailObjectContext.js';
|
|
10
10
|
import { pageFilter, pageSort } from '../../utils/pageControls.js';
|
|
11
11
|
import { dropOptionalUnresolved, resolveFilterTokens, hasUnresolvedTokens } from '../../utils/resolveFilterTokens.js';
|
|
12
|
+
import { compileRowClass } from '../../utils/rowClassRules.js';
|
|
12
13
|
import { fieldsFromSchema } from '../../utils/schema.js';
|
|
13
|
-
import { readVisibleWhenPath, compareVisibleWhen } from '../../utils/visibleWhen.js';
|
|
14
14
|
import __sfc_main$3 from '../CnIcon/CnIcon.vue.js';
|
|
15
15
|
import __sfc_main$2 from '../CnRowActions/CnRowActions.vue.js';
|
|
16
16
|
import __sfc_main$1 from '../CnWidgetWrapper/CnWidgetWrapper.vue.js';
|
|
@@ -681,28 +681,7 @@ var script = {
|
|
|
681
681
|
* @return {?(row: object) => string} The row-class function, or null.
|
|
682
682
|
*/
|
|
683
683
|
compiledRowClass() {
|
|
684
|
-
|
|
685
|
-
if (typeof rc === 'function') {
|
|
686
|
-
return rc
|
|
687
|
-
}
|
|
688
|
-
if (!Array.isArray(rc) || rc.length === 0) {
|
|
689
|
-
return null
|
|
690
|
-
}
|
|
691
|
-
const rules = rc;
|
|
692
|
-
return (row) => {
|
|
693
|
-
const classes = [];
|
|
694
|
-
for (const rule of rules) {
|
|
695
|
-
if (!rule || !rule.class) {
|
|
696
|
-
continue
|
|
697
|
-
}
|
|
698
|
-
const when = rule.when || {};
|
|
699
|
-
const actual = readVisibleWhenPath(row, when.field);
|
|
700
|
-
if (compareVisibleWhen(actual, when.op || 'eq', when.value)) {
|
|
701
|
-
classes.push(rule.class);
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
return classes.join(' ')
|
|
705
|
-
}
|
|
684
|
+
return compileRowClass(this.rowClass)
|
|
706
685
|
},
|
|
707
686
|
|
|
708
687
|
/**
|