@conduction/nextcloud-vue 2.61.0 β†’ 2.63.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.
Files changed (186) hide show
  1. package/dist/esm/components/CnAdminActionCard/CnAdminActionCard.vue.js +10 -0
  2. package/dist/esm/components/CnAdminActionCard/CnAdminActionCard.vue.js.map +1 -0
  3. package/dist/esm/components/CnAdminActionCard/CnAdminActionCard.vue2.js +189 -0
  4. package/dist/esm/components/CnAdminActionCard/CnAdminActionCard.vue2.js.map +1 -0
  5. package/dist/esm/components/CnAdminActionCard/CnAdminActionCard.vue3.js +72 -0
  6. package/dist/esm/components/CnAdminActionCard/CnAdminActionCard.vue3.js.map +1 -0
  7. package/dist/esm/components/CnAppNav/CnAppNav.vue2.js +394 -27
  8. package/dist/esm/components/CnAppNav/CnAppNav.vue2.js.map +1 -1
  9. package/dist/esm/components/CnAppNav/CnAppNav.vue3.js.map +1 -1
  10. package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js +99 -9
  11. package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js.map +1 -1
  12. package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js +39 -18
  13. package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js.map +1 -1
  14. package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue2.js +79 -2
  15. package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue2.js.map +1 -1
  16. package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue3.js +38 -25
  17. package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue3.js.map +1 -1
  18. package/dist/esm/components/CnBrandStripe/CnBrandStripe.vue2.js +21 -1
  19. package/dist/esm/components/CnBrandStripe/CnBrandStripe.vue2.js.map +1 -1
  20. package/dist/esm/components/CnBrandStripe/CnBrandStripe.vue3.js +4 -1
  21. package/dist/esm/components/CnBrandStripe/CnBrandStripe.vue3.js.map +1 -1
  22. package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue2.js.map +1 -1
  23. package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue3.js +53 -37
  24. package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue3.js.map +1 -1
  25. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +30 -6
  26. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  27. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +2 -2
  28. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  29. package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue.js +10 -0
  30. package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue.js.map +1 -0
  31. package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue2.js +293 -0
  32. package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue2.js.map +1 -0
  33. package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue3.js +189 -0
  34. package/dist/esm/components/CnDataTable/CnColumnFilterPopover.vue3.js.map +1 -0
  35. package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +256 -23
  36. package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
  37. package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +119 -51
  38. package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
  39. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
  40. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js +2 -1
  41. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
  42. package/dist/esm/components/CnFieldHelper/CnFieldHelper.vue2.js +3 -1
  43. package/dist/esm/components/CnFieldHelper/CnFieldHelper.vue2.js.map +1 -1
  44. package/dist/esm/components/CnFieldHelper/CnFieldHelper.vue3.js +1 -1
  45. package/dist/esm/components/CnFieldHelper/CnFieldHelper.vue3.js.map +1 -1
  46. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js +234 -9
  47. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
  48. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js +96 -57
  49. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
  50. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +51 -2
  51. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  52. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +5 -1
  53. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  54. package/dist/esm/components/CnIndexPage/selfModeActions.js +3 -3
  55. package/dist/esm/components/CnIndexPage/selfModeActions.js.map +1 -1
  56. package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue2.js.map +1 -1
  57. package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue3.js.map +1 -1
  58. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js +36 -1
  59. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
  60. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js +4 -1
  61. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
  62. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +53 -0
  63. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
  64. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +22 -5
  65. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
  66. package/dist/esm/components/CnReportsPage/CnReportsPage.vue2.js.map +1 -1
  67. package/dist/esm/components/CnReportsPage/CnReportsPage.vue3.js.map +1 -1
  68. package/dist/esm/components/CnResourceSelect/CnResourceSelect.vue2.js +121 -12
  69. package/dist/esm/components/CnResourceSelect/CnResourceSelect.vue2.js.map +1 -1
  70. package/dist/esm/components/CnResourceSelect/CnResourceSelect.vue3.js +3 -1
  71. package/dist/esm/components/CnResourceSelect/CnResourceSelect.vue3.js.map +1 -1
  72. package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue2.js +326 -1
  73. package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue2.js.map +1 -1
  74. package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue3.js +112 -26
  75. package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue3.js.map +1 -1
  76. package/dist/esm/components/CnStorePage/CnStorePage.vue2.js.map +1 -1
  77. package/dist/esm/components/CnStorePage/CnStorePage.vue3.js.map +1 -1
  78. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue.js +10 -0
  79. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue.js.map +1 -0
  80. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue2.js +337 -0
  81. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue2.js.map +1 -0
  82. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue3.js +102 -0
  83. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue3.js.map +1 -0
  84. package/dist/esm/components/CnTimelineWidget/dashboardRegistration.js +34 -0
  85. package/dist/esm/components/CnTimelineWidget/dashboardRegistration.js.map +1 -0
  86. package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue2.js +131 -8
  87. package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue2.js.map +1 -1
  88. package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue3.js +40 -38
  89. package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue3.js.map +1 -1
  90. package/dist/esm/components/CnWidgetGrid/builtInWidgets.js +8 -6
  91. package/dist/esm/components/CnWidgetGrid/builtInWidgets.js.map +1 -1
  92. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  93. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
  94. package/dist/esm/components/CnWikiPage/CnWikiPage.vue2.js.map +1 -1
  95. package/dist/esm/components/CnWikiPage/CnWikiPage.vue3.js.map +1 -1
  96. package/dist/esm/components/CnWizardDialog/CnWizardDialog.vue2.js +19 -0
  97. package/dist/esm/components/CnWizardDialog/CnWizardDialog.vue2.js.map +1 -1
  98. package/dist/esm/components/CnWizardDialog/CnWizardDialog.vue3.js +1 -1
  99. package/dist/esm/components/CnWizardDialog/CnWizardDialog.vue3.js.map +1 -1
  100. package/dist/esm/composables/useDependencyCheck.js +65 -0
  101. package/dist/esm/composables/useDependencyCheck.js.map +1 -0
  102. package/dist/esm/composables/useWalkthrough.js +218 -6
  103. package/dist/esm/composables/useWalkthrough.js.map +1 -1
  104. package/dist/esm/index.js +2 -0
  105. package/dist/esm/index.js.map +1 -1
  106. package/dist/esm/l10n/en.json.js +48 -0
  107. package/dist/esm/l10n/en.json.js.map +1 -1
  108. package/dist/esm/l10n/nl.json.js +48 -0
  109. package/dist/esm/l10n/nl.json.js.map +1 -1
  110. package/dist/esm/nextcloud-vue.css +557 -9
  111. package/dist/esm/store/useObjectStore.js +8 -0
  112. package/dist/esm/store/useObjectStore.js.map +1 -1
  113. package/dist/esm/utils/columnFilters.js +311 -0
  114. package/dist/esm/utils/columnFilters.js.map +1 -0
  115. package/dist/esm/utils/groupAutocomplete.js +123 -0
  116. package/dist/esm/utils/groupAutocomplete.js.map +1 -0
  117. package/dist/esm/utils/libraryWidgetKeys.js +2 -0
  118. package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
  119. package/dist/esm/utils/pickerOptions.js +198 -0
  120. package/dist/esm/utils/pickerOptions.js.map +1 -0
  121. package/dist/esm/utils/schema.js +83 -7
  122. package/dist/esm/utils/schema.js.map +1 -1
  123. package/dist/esm/utils/timelineEvents.js +174 -0
  124. package/dist/esm/utils/timelineEvents.js.map +1 -0
  125. package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
  126. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  127. package/dist/esm/utils/walkthroughSignals.js +88 -0
  128. package/dist/esm/utils/walkthroughSignals.js.map +1 -0
  129. package/dist/nextcloud-vue.cjs.js +9779 -5236
  130. package/dist/nextcloud-vue.cjs.js.map +2 -2
  131. package/dist/nextcloud-vue.css +557 -9
  132. package/l10n/en.json +48 -0
  133. package/l10n/nl.json +48 -0
  134. package/package.json +3 -2
  135. package/scripts/manifest-schema-hash.js +41 -0
  136. package/scripts/record-manifest-schema-hash.js +52 -0
  137. package/src/components/CnAdminActionCard/CnAdminActionCard.vue +234 -0
  138. package/src/components/CnAdminActionCard/index.js +4 -0
  139. package/src/components/CnAppNav/CnAppNav.vue +394 -27
  140. package/src/components/CnAppRoot/CnAppRoot.vue +129 -15
  141. package/src/components/CnBannerWidget/CnBannerWidget.vue +113 -2
  142. package/src/components/CnBrandStripe/CnBrandStripe.md +16 -0
  143. package/src/components/CnBrandStripe/CnBrandStripe.vue +58 -5
  144. package/src/components/CnChoiceCards/CnChoiceCards.vue +56 -31
  145. package/src/components/CnDashboardPage/CnDashboardPage.vue +32 -8
  146. package/src/components/CnDataTable/CnColumnFilterPopover.vue +524 -0
  147. package/src/components/CnDataTable/CnDataTable.md +4 -1
  148. package/src/components/CnDataTable/CnDataTable.vue +302 -21
  149. package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +2 -2
  150. package/src/components/CnFieldHelper/CnFieldHelper.vue +4 -2
  151. package/src/components/CnFormDialog/CnFormDialog.vue +290 -31
  152. package/src/components/CnIndexPage/CnIndexPage.vue +55 -2
  153. package/src/components/CnIndexPage/selfModeActions.js +3 -3
  154. package/src/components/CnLinkCardsPage/CnLinkCardsPage.vue +35 -2
  155. package/src/components/CnObjectListWidget/CnObjectListWidget.vue +39 -1
  156. package/src/components/CnObjectSidebar/CnFilesTab.vue +65 -0
  157. package/src/components/CnReportsPage/CnReportsPage.vue +7 -0
  158. package/src/components/CnResourceSelect/CnResourceSelect.vue +123 -12
  159. package/src/components/CnSetupWizard/CnSetupWizard.vue +392 -3
  160. package/src/components/CnStorePage/CnStorePage.vue +7 -0
  161. package/src/components/CnTimelineWidget/CnTimelineWidget.vue +477 -0
  162. package/src/components/CnTimelineWidget/dashboardRegistration.js +32 -0
  163. package/src/components/CnTimelineWidget/index.js +4 -0
  164. package/src/components/CnWalkthrough/CnWalkthrough.vue +143 -10
  165. package/src/components/CnWidgetGrid/builtInWidgets.js +2 -0
  166. package/src/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  167. package/src/components/CnWikiPage/CnWikiPage.vue +7 -0
  168. package/src/components/CnWizardDialog/CnWizardDialog.vue +20 -1
  169. package/src/components/index.js +2 -0
  170. package/src/composables/useDependencyCheck.js +61 -0
  171. package/src/composables/useWalkthrough.js +217 -5
  172. package/src/css/dashboard.css +49 -0
  173. package/src/css/detail-page.css +19 -0
  174. package/src/css/table.css +82 -2
  175. package/src/index.js +2 -0
  176. package/src/public/index.js +5 -0
  177. package/src/schemas/app-manifest-v2.schema.json +23 -1
  178. package/src/store/useObjectStore.js +8 -0
  179. package/src/utils/columnFilters.js +324 -0
  180. package/src/utils/groupAutocomplete.js +119 -0
  181. package/src/utils/libraryWidgetKeys.js +2 -0
  182. package/src/utils/pickerOptions.js +194 -0
  183. package/src/utils/schema.js +83 -7
  184. package/src/utils/timelineEvents.js +171 -0
  185. package/src/utils/validateManifestV2.compiled.js +2 -2
  186. package/src/utils/walkthroughSignals.js +94 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CnSetupWizard.vue3.js","sources":["../../../../src/components/CnSetupWizard/CnSetupWizard.vue?vue&type=template&id=75b2078b&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=\"initialStepId\"\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<!-- 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<!-- @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<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<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<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</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<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 { translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcCheckboxRadioSwitch, NcLoadingIcon, NcNoteCard, NcSelect, NcTextField } from '@nextcloud/vue'\nimport CnChoiceCards from '../CnChoiceCards/CnChoiceCards.vue'\nimport CnWizardDialog from '../CnWizardDialog/CnWizardDialog.vue'\nimport { useSetupStatus } from '../../composables/useSetupStatus.js'\nimport { fieldsFromSchema } from '../../utils/schema.js'\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\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},\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\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 wantsSource = (props.steps || []).some((s) => s && s.optionsSource)\n\t\tif (!wantsSource) {\n\t\t\treturn {}\n\t\t}\n\t\tconst { status, loading } = useSetupStatus(props.appId, { setup: { steps: props.steps } })\n\t\treturn { 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}\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\tsetupSteps() {\n\t\t\treturn (this.steps || []).filter((s) => s && s.id && s.type)\n\t\t},\n\n\t\twizardSteps() {\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\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\tvalue = this.fieldsFor(step)\n\t\t\t\t\t\t\t.map((f) => `${f.label}: ${this.configModel[f.key] !== null && this.configModel[f.key] !== undefined ? this.configModel[f.key] : ''}`)\n\t\t\t\t\t\t\t.join(', ')\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},\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\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\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 * 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__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-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","_renderList","_renderSlot","_mergeProps","_createTextVNode","_toDisplayString","_createElementBlock","_Fragment","_openBlock","_createVNode","_createElementVNode","_normalizeClass"],"mappings":";;;;;AA6GkC,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;;;;;;;;;;;;;uBAvIPA;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,EAAE,QAAY,CAAA,YAAA;AACtB,IAAA,WAAW,EAAE,MAAW,CAAA,WAAA;AACxB,IAAA,WAAW,EAAE,QAAG,CAAA,aAAA;AAChB,IAAA,YAAU,EAAE,QAAG,CAAA,YAAA;AACf,IAAA,QAAM,EAAC,QAAS,CAAA,QAAA;WACX,EAAE,QAAO,CAAA,OAAA;;AAOU,IAAAC,UAAA,CAAA,QAAA,CAAA,UAAU,GAAlB,IAAI,KAAA;;AAAiB,QAAA,IAAA,EAAA,QAAA,CAAA,QAAQ,CAAC,IAAI,CAAA;qBAAK,KAAK,KAAA;0CAsHtD,CAAA,KAAA,EAAA;YArHA,KAAK,IAAI,CAAC,EAAE;AAAE,YAA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AAA,EAAA,EAAA;AAdK,4BAAA,CAAA,IAAA,CAAA,IAAA;8CAAZP,WAEG,CAAA,qBAAA,EAAA;;AAFS,kCAAA,IAAA,EAAA,MAAA;;mDACX,MAAoB;AAAjB,oCAAAI,eAAA,CAAAC,eAAA,CAAA,QAAA,CAAA,QAAQ,CAAC,IAAI,CAAA,CAAA,EAAA,CAAA,YAAA;;;;;+CAYd,gBAAA,EAAA;kEADG,CAAAE,QAAA,EAAA,IAAA,EAAAN,UAAA,CAPW,QAAY,CAAA,YAAA,EAAA,CAApB,IAAI,KAAA;uEAOP,CAAA,IAAA,EAAA;kCANH,GAAG,EAAE,IAAI,CAAC,EAAE;kCACb,KAAI,EAAAU,cAAA,CAAA,CAAE,wBAAwB,EACY,EAAA,8BAAA,EAAA,IAAI,CAAC,IAAK,EAAA,iCAAA,EAAQ,IAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;AAC5D,kCAAAD,kBAAA,CAAuE,MAAvE,EAAA,UAAuE,EAA/BL,eAAA,CAAA,IAAI,CAAC,IAAI,GAAA,GAAA,GAAA,GAAA,CAAA,EAAA,CAAA,YAAA;AACjD,kCAAAK,kBAAA,CAAG,MAAH,EAAA,UAAG,EAAAL,eAAA,CAAA,IAAA,CAAA,KAAA,CAAA,EAAA,CAAA,YAAA;AACD,kCAAA,CAAA,IAAA,CAAA,KAAA;AAAF,uCAAAG,SAAA,EAAA,EAAAF,kBAAA,CAAE,MAAF,EAAA,UAAE,EAAAD,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=75b2078b&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<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<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</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<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 { loadState } from '@nextcloud/initial-state'\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 } from '../../composables/useDependencyCheck.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 wantsSource = (props.steps || []).some((s) => s && s.optionsSource)\n\t\tif (!wantsSource) {\n\t\t\treturn {}\n\t\t}\n\t\tconst { status, loading } = useSetupStatus(props.appId, { setup: { steps: props.steps } })\n\t\treturn { 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 */\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 = checkDependencies(step.requires, this.serverAppStatuses)\n\t\t\t\t\t\t.map((row) => known[row.id] || row)\n\t\t\t\t\t\t.filter((row) => !isDependencyResolved(row))\n\t\t\t\t\t\t.map((row) => 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\ttry {\n\t\t\t\treturn loadState(this.appId, 'dependency_statuses', {}) || {}\n\t\t\t} catch {\n\t\t\t\treturn {}\n\t\t\t}\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\tvalue = this.fieldsFor(step)\n\t\t\t\t\t\t\t.map((f) => `${f.label}: ${this.configModel[f.key] !== null && this.configModel[f.key] !== undefined ? this.configModel[f.key] : ''}`)\n\t\t\t\t\t\t\t.join(', ')\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\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__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","_normalizeClass","_openBlock","_createElementVNode"],"mappings":";;;AA6BQ,EAAA,KAAK,EAAC,eAAc;AAAE,EAAA,gBAAC,EAAA,cAAA;AAAA,EAAA,aAAA,EAAA,uBAAA;;;;;AAmIG,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;;;;;;;;;;;;;;uBA1LPA;AACA,IAAA,GAAG,EAAC,QAAQ;AACX,IAAA,KAA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J,eAAA,CAAA,IAAA,CAAA,KAAA,CAAA,EAAA,CAAA,YAAA;AACD,kCAAA,CAAA,IAAA,CAAA,KAAA;AAAF,uCAAAG,SAAA,EAAA,EAAAP,kBAAA,CAAE,MAAF,EAAA,UAAE,EAAAI,eAAA,CAAA,IAAA,CAAA,KAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CnStorePage.vue2.js","sources":["../../../../src/components/CnStorePage/CnStorePage.vue"],"sourcesContent":["<!--\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n\n CnStorePage β€” browse a remote OpenRegister registry for shareable content,\n and install an item into this instance.\n\n The `store` page type (ADR-080, ADR-114 Decision 4). Promoted out of dossiq's\n app-local StoreGallery, which was the fleet's only implementation and was\n about to be copied fifteen times (ADR-012).\n\n WHAT IS APP-SPECIFIC, AND WHAT IS NOT.\n --------------------------------------\n Everything on this page is generic except three things, and all three arrive\n as props rather than being written into the component:\n\n `app` the app id, which is the only thing in the request URL\n `builtIn` the items this app ships itself, for the no-registry case\n `description` the lead paragraph, because a store of case types and a\n store of connector adapters are not selling the same thing\n\n DISCOVERY IS NOT IMPLEMENTED HERE, ON PURPOSE.\n ----------------------------------------------\n This calls `/apps/<app>/api/store/items`, which is a thin action over\n OpenRegister's `GenericStoreService` (ADR-080 Decision 2). The SSRF guard,\n the redirect refusal, the timeouts and the registry token all stay\n server-side in the engine, and no leaf app ever builds a registry URL.\n\n Install is deliberately NOT generalised (ADR-080 Decision 3): cloning an\n application template, enabling a connector adapter and instantiating an agent\n template are different operations with different authorization. Each app owns\n `POST /api/store/items/{slug}/install`; this component only calls it and\n renders what it reports.\n\n WHO SEES INSTALL AND PUBLISH IS THE APP'S ANSWER, NOT THIS PAGE'S.\n -----------------------------------------------------------------\n `canInstall` and `canPublish` carry a boolean the app resolved (learniq reads\n its ADR-023 action matrix). `null`, the default, falls back to administrators\n only, which is what every store page did before the props existed. Publish\n appears only when the app also names a `publishRoute`: publishing is the\n app's own surface, like install. Both props hide a button and nothing more;\n the app's endpoints enforce the same rule.\n\n A LOCAL-ONLY CARD GRID IS NOT A STORE (ADR-080 Decision 4). With no registry\n configured the engine answers `not_configured` WITHOUT a network call, and\n this page then renders `builtIn`. That fallback is the only reason a surface\n may carry the word Store at all.\n-->\n<template>\n\t<div class=\"cn-store-page\" data-testid=\"store-page\">\n\t\t<div class=\"cn-store-page__header\">\n\t\t\t<div class=\"cn-store-page__heading\">\n\t\t\t\t<h2 class=\"cn-store-page__title\">\n\t\t\t\t\t{{ resolvedTitle }}\n\t\t\t\t</h2>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showPublish\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tdata-testid=\"store-publish\"\n\t\t\t\t\t:to=\"publishTarget\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Publish') }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<p v-if=\"resolvedDescription\" class=\"cn-store-page__intro\">\n\t\t\t\t{{ resolvedDescription }}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<div class=\"cn-store-page__controls\">\n\t\t\t<NcTextField\n\t\t\t\tv-model=\"query\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Search the store')\"\n\t\t\t\t:disabled=\"offline\"\n\t\t\t\tdata-testid=\"store-search\"\n\t\t\t\t@update:modelValue=\"onSearchInput\" />\n\n\t\t\t<div\n\t\t\t\tclass=\"cn-store-page__kinds\"\n\t\t\t\trole=\"group\"\n\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Filter by kind')\">\n\t\t\t\t<NcButton\n\t\t\t\t\tv-for=\"option in kindOptions\"\n\t\t\t\t\t:key=\"option.value\"\n\t\t\t\t\t:variant=\"option.value === kind ? 'primary' : 'secondary'\"\n\t\t\t\t\t:disabled=\"offline\"\n\t\t\t\t\t@click=\"selectKind(option.value)\">\n\t\t\t\t\t{{ option.label }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<NcLoadingIcon v-if=\"loading\" :size=\"44\" class=\"cn-store-page__loading\" />\n\n\t\t<NcNoteCard\n\t\t\tv-else-if=\"offline\"\n\t\t\ttype=\"info\"\n\t\t\tdata-testid=\"store-not-configured\">\n\t\t\t{{ notConfiguredMessage }}\n\t\t</NcNoteCard>\n\n\t\t<NcNoteCard\n\t\t\tv-else-if=\"unreachable\"\n\t\t\ttype=\"warning\"\n\t\t\tdata-testid=\"store-unreachable\">\n\t\t\t{{ unreachableMessage }}\n\t\t</NcNoteCard>\n\n\t\t<NcEmptyContent\n\t\t\tv-else-if=\"cards.length === 0\"\n\t\t\t:name=\"t('nextcloud-vue', 'Nothing matches that search')\"\n\t\t\t:description=\"\n\t\t\t\tt('nextcloud-vue', 'Try a different term, or clear the kind filter.')\n\t\t\t\" />\n\n\t\t<ul\n\t\t\tv-if=\"!loading && cards.length > 0\"\n\t\t\tclass=\"cn-store-page__grid\"\n\t\t\tdata-testid=\"store-results\">\n\t\t\t<li v-for=\"card in cards\" :key=\"card.slug\" class=\"cn-store-page__card\">\n\t\t\t\t<h3 class=\"cn-store-page__card-title\">\n\t\t\t\t\t{{ card.title || card.slug }}\n\t\t\t\t</h3>\n\t\t\t\t<p v-if=\"card.typeName || card.kind\" class=\"cn-store-page__card-kind\">\n\t\t\t\t\t{{ card.typeName || card.kind }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"cn-store-page__card-description\">\n\t\t\t\t\t{{ card.description }}\n\t\t\t\t</p>\n\t\t\t\t<div class=\"cn-store-page__card-footer\">\n\t\t\t\t\t<span v-if=\"card.publisher\" class=\"cn-store-page__card-publisher\">\n\t\t\t\t\t\t{{ card.publisher }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span v-if=\"card.version\" class=\"cn-store-page__card-version\">\n\t\t\t\t\t\t{{ card.version }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tv-if=\"showInstall\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tdata-testid=\"store-install\"\n\t\t\t\t\t\t:disabled=\"installing === card.slug\"\n\t\t\t\t\t\t@click=\"install(card)\">\n\t\t\t\t\t\t{{\n\t\t\t\t\t\t\tinstalling === card.slug\n\t\t\t\t\t\t\t\t? t('nextcloud-vue', 'Installing…')\n\t\t\t\t\t\t\t\t: t('nextcloud-vue', 'Install')\n\t\t\t\t\t\t}}\n\t\t\t\t\t</NcButton>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t</ul>\n\n\t\t<div\n\t\t\tv-if=\"!loading && visibleBuiltIn.length > 0\"\n\t\t\tclass=\"cn-store-page__builtin\">\n\t\t\t<h3 class=\"cn-store-page__builtin-title\">\n\t\t\t\t{{ builtInHeading }}\n\t\t\t</h3>\n\t\t\t<ul class=\"cn-store-page__grid\" data-testid=\"store-builtin\">\n\t\t\t\t<li\n\t\t\t\t\tv-for=\"item in visibleBuiltIn\"\n\t\t\t\t\t:key=\"item.slug\"\n\t\t\t\t\tclass=\"cn-store-page__card\">\n\t\t\t\t\t<h4 class=\"cn-store-page__card-title\">\n\t\t\t\t\t\t{{ item.title || item.slug }}\n\t\t\t\t\t</h4>\n\t\t\t\t\t<p class=\"cn-store-page__card-description\">\n\t\t\t\t\t\t{{ item.description }}\n\t\t\t\t\t</p>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\n\t\t<NcNoteCard\n\t\t\tv-if=\"report\"\n\t\t\t:type=\"report.type\"\n\t\t\tdata-testid=\"store-install-report\">\n\t\t\t{{ report.message }}\n\t\t</NcNoteCard>\n\t</div>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { showError, showSuccess } from '@nextcloud/dialogs'\nimport { t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport {\n\tNcButton,\n\tNcEmptyContent,\n\tNcLoadingIcon,\n\tNcNoteCard,\n\tNcTextField,\n} from '@nextcloud/vue'\n\n/**\n * The kind vocabulary from ADR-080 Decision 5. A `kind` names what installing\n * an item DOES, which is what lets one registry serve several apps from one\n * schema. An app whose items are a different shape passes its own `kinds`.\n */\nexport const DEFAULT_STORE_KINDS = [\n\t'app-template',\n\t'adapter',\n\t'source-template',\n\t'configuration-template',\n\t'agent-template',\n]\n\nexport default {\n\tname: 'CnStorePage',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcEmptyContent,\n\t\tNcLoadingIcon,\n\t\tNcNoteCard,\n\t\tNcTextField,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The manifest page.\n\t\t *\n\t\t * ⚠️ CnPageRenderer does NOT pass this. `resolvedProps()` returns\n\t\t * `{ ...topLevel, ...normalizedConfig, ...params }` and has no `page`\n\t\t * key, so a dispatched `type: \"store\"` page arrives with the flattened\n\t\t * props below and this default `{}`. Reading `page.config` here would\n\t\t * render an empty store forever, which is exactly what happened to\n\t\t * CnReportsPage before #897. Kept only so a host rendering this\n\t\t * component directly can still hand it a whole page; the flattened\n\t\t * props win.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tpage: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * The app id. The ONLY app-specific value in the request URL, and the\n\t\t * reason this component is shared rather than copied.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tapp: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Page title, flattened out of `config` or lifted from the page.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The lead paragraph. A store of case types and a store of connector\n\t\t * adapters are not offering the same thing, so the app says what its\n\t\t * store is for.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Kind quick-filters. Defaults to the ADR-080 Decision 5 vocabulary.\n\t\t *\n\t\t * @type {Array<string>}\n\t\t */\n\t\tkinds: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => DEFAULT_STORE_KINDS,\n\t\t},\n\n\t\t/**\n\t\t * The items this app ships itself, rendered when the engine reports\n\t\t * `not_configured` or the registry does not answer.\n\t\t *\n\t\t * ADR-080 Decision 4 makes this the price of the word Store: a surface\n\t\t * that goes blank without a registry was never a store, and a surface\n\t\t * that only ever shows these is a Templates page.\n\t\t *\n\t\t * @type {Array<{slug: string, title: string, description: string}>}\n\t\t */\n\t\tbuiltIn: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Whether the signed-in user sees Install, as the app resolved it\n\t\t * (learniq: its ADR-023 matrix). `true` shows it on every remote\n\t\t * card, `false` hides it from everyone, administrators included.\n\t\t * `null` (the default) keeps the rule from before this prop:\n\t\t * administrators only. Presentation only: the app's install endpoint\n\t\t * must enforce the same rule.\n\t\t *\n\t\t * @type {boolean|null}\n\t\t */\n\t\tcanInstall: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Whether the signed-in user sees Publish, as the app resolved it.\n\t\t * `null` (the default) falls back to administrators only. Publish\n\t\t * renders only when `publishRoute` is set as well. Presentation\n\t\t * only: the app's publish endpoint must enforce the same rule.\n\t\t *\n\t\t * @type {boolean|null}\n\t\t */\n\t\tcanPublish: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Where Publish takes the user: a route name (string) or a route\n\t\t * location (object). Publishing is the app's own surface, so this\n\t\t * page never sends anything to a registry itself. Empty means no\n\t\t * Publish button, whatever `canPublish` says, so an app that never\n\t\t * sets it renders what it rendered before.\n\t\t *\n\t\t * @type {string|object}\n\t\t */\n\t\tpublishRoute: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tloading: true,\n\t\t\toutcome: null,\n\t\t\tcards: [],\n\t\t\tquery: '',\n\t\t\tkind: '',\n\t\t\tinstalling: null,\n\t\t\treport: null,\n\t\t\tsearchTimer: null,\n\t\t\t// The kinds the ENGINE served, from the app's `store` manifest\n\t\t\t// block. Null until the first response, so \"not asked yet\" stays\n\t\t\t// distinguishable from \"the app declares none\".\n\t\t\tservedKinds: null,\n\t\t\t// The built-in items the ENGINE served, from the app's `store`\n\t\t\t// manifest block. Null until the first response, so \"not asked\n\t\t\t// yet\" stays distinguishable from \"the app declares none\".\n\t\t\tservedBuiltIn: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The page title, preferring the flattened prop over the page object.\n\t\t *\n\t\t * @return {string} The heading to render.\n\t\t */\n\t\tresolvedTitle() {\n\t\t\treturn this.title || this.page?.title || t('nextcloud-vue', 'Store')\n\t\t},\n\n\t\t/**\n\t\t * The lead paragraph, preferring the flattened prop.\n\t\t *\n\t\t * @return {string} The intro copy, or an empty string.\n\t\t */\n\t\tresolvedDescription() {\n\t\t\treturn this.description || this.page?.config?.description || ''\n\t\t},\n\n\t\t/**\n\t\t * The app id, preferring the flattened prop.\n\t\t *\n\t\t * @return {string} The app id used to address the store endpoints.\n\t\t */\n\t\tresolvedApp() {\n\t\t\treturn this.app || this.page?.config?.app || ''\n\t\t},\n\n\t\t/**\n\t\t * No registry configured. The engine reported this WITHOUT making a\n\t\t * network call, which is the ADR-080 Decision 4 fallback.\n\t\t *\n\t\t * @return {boolean} True when no registry is connected.\n\t\t */\n\t\toffline() {\n\t\t\treturn this.outcome === 'not_configured'\n\t\t},\n\n\t\t/**\n\t\t * The registry is configured but did not answer usefully.\n\t\t *\n\t\t * @return {boolean} True when the registry errored.\n\t\t */\n\t\tunreachable() {\n\t\t\treturn (\n\t\t\t\tthis.outcome === 'store_unreachable'\n\t\t\t\t|| this.outcome === 'store_invalid_response'\n\t\t\t)\n\t\t},\n\n\t\t/**\n\t\t * Whether the current user is an administrator: the fallback for both\n\t\t * actions when the app did not say.\n\t\t *\n\t\t * @return {boolean} True when the current user is an administrator.\n\t\t *\n\t\t * @spec openspec/changes/store-page-action-visibility/specs/store-page/spec.md#requirement-req-stp-1-the-consuming-app-decides-who-sees-install\n\t\t */\n\t\tisAdmin() {\n\t\t\treturn getCurrentUser()?.isAdmin === true\n\t\t},\n\n\t\t/**\n\t\t * Whether Install shows. The app's answer wins; without one only an\n\t\t * administrator installs, because what an install writes is the shape\n\t\t * of the work every handler then operates against. The server\n\t\t * enforces this too; hiding the button keeps a user from discovering\n\t\t * a refusal as a 403.\n\t\t *\n\t\t * @return {boolean} True when the Install buttons render.\n\t\t *\n\t\t * @spec openspec/changes/store-page-action-visibility/specs/store-page/spec.md#requirement-req-stp-1-the-consuming-app-decides-who-sees-install\n\t\t */\n\t\tshowInstall() {\n\t\t\tif (typeof this.canInstall === 'boolean') {\n\t\t\t\treturn this.canInstall\n\t\t\t}\n\n\t\t\treturn this.isAdmin\n\t\t},\n\n\t\t/**\n\t\t * Where Publish navigates, or null when the app named no destination.\n\t\t * A string is a route NAME, the way manifest menu entries name routes.\n\t\t *\n\t\t * @return {object|null} A vue-router location, or null.\n\t\t *\n\t\t * @spec openspec/changes/store-page-action-visibility/specs/store-page/spec.md#requirement-req-stp-2-the-consuming-app-decides-who-sees-publish-and-where-it-leads\n\t\t */\n\t\tpublishTarget() {\n\t\t\tif (typeof this.publishRoute === 'string') {\n\t\t\t\treturn this.publishRoute === '' ? null : { name: this.publishRoute }\n\t\t\t}\n\n\t\t\tif (this.publishRoute !== null && typeof this.publishRoute === 'object') {\n\t\t\t\treturn this.publishRoute\n\t\t\t}\n\n\t\t\treturn null\n\t\t},\n\n\t\t/**\n\t\t * Whether Publish shows: a destination is named AND the app allows it\n\t\t * (or, without an answer, the user is an administrator). No\n\t\t * destination means no button, because a button that goes nowhere\n\t\t * is worse than none.\n\t\t *\n\t\t * @return {boolean} True when the Publish button renders.\n\t\t *\n\t\t * @spec openspec/changes/store-page-action-visibility/specs/store-page/spec.md#requirement-req-stp-2-the-consuming-app-decides-who-sees-publish-and-where-it-leads\n\t\t */\n\t\tshowPublish() {\n\t\t\tif (this.publishTarget === null) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tif (typeof this.canPublish === 'boolean') {\n\t\t\t\treturn this.canPublish\n\t\t\t}\n\n\t\t\treturn this.isAdmin\n\t\t},\n\n\t\t/**\n\t\t * The kind quick-filters, with an \"all\" entry first.\n\t\t *\n\t\t * @return {Array<{value: string, label: string}>} The filter options.\n\t\t */\n\t\tkindOptions() {\n\t\t\treturn [\n\t\t\t\t{ value: '', label: t('nextcloud-vue', 'All kinds') },\n\t\t\t\t...this.effectiveKinds.map((value) => ({ value, label: value })),\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * The kinds to offer, preferring what the ENGINE served.\n\t\t *\n\t\t * An app declares its kinds in the `store` block of its manifest, next\n\t\t * to the schema allowlist, and the engine returns them with the cards.\n\t\t * That is the single place an app says what its store sells; the\n\t\t * `kinds` PROP remains for a host rendering this component directly and\n\t\t * as the pre-response value, and DEFAULT_STORE_KINDS is the floor.\n\t\t *\n\t\t * A served EMPTY list means the app declared none, which is not the\n\t\t * same as not having asked yet β€” hence `servedKinds` starts null.\n\t\t *\n\t\t * @return {Array<string>} The kind filter values.\n\t\t */\n\t\teffectiveKinds() {\n\t\t\tif (Array.isArray(this.servedKinds) && this.servedKinds.length > 0) {\n\t\t\t\treturn this.servedKinds\n\t\t\t}\n\n\t\t\treturn this.kinds\n\t\t},\n\n\t\t/**\n\t\t * The app's own items, shown whenever the remote list is not carrying\n\t\t * the page. Not a network call, and not a Store on their own.\n\t\t *\n\t\t * πŸ”΄ AN EMPTY ANSWER IS STILL AN EMPTY PAGE. This used to hide the\n\t\t * built-ins whenever the engine answered at all, checking only\n\t\t * `not_configured` and the error outcomes. A federated store that\n\t\t * answers `ok` with zero cards β€” a configured registry that has\n\t\t * published nothing yet β€” then rendered a heading, a search box and\n\t\t * nothing else, while the app shipped four items it could have shown.\n\t\t * Measured on decidiq, whose store returns `ok` with 0 cards and 4\n\t\t * built-ins declared.\n\t\t *\n\t\t * ADR-080 Decision 4 is explicit that a surface which goes blank was\n\t\t * never a store, so the test is what the reader can SEE, not which\n\t\t * outcome the engine reported.\n\t\t *\n\t\t * @return {Array<object>} The built-in items to render.\n\t\t */\n\t\tvisibleBuiltIn() {\n\t\t\tif (this.offline === false && this.unreachable === false && this.cards.length > 0) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\treturn this.effectiveBuiltIn\n\t\t},\n\n\t\t/**\n\t\t * The app's own items, preferring what the ENGINE served over the page\n\t\t * config.\n\t\t *\n\t\t * An app declares these ONCE, in its `store` manifest block beside the\n\t\t * allowlist, which is where the schema documents them. The `builtIn`\n\t\t * PROP is a second place to write the same list, and an app that\n\t\t * declared them only in the manifest used to render nothing: the\n\t\t * engine parsed them and never sent them.\n\t\t *\n\t\t * Mirrors `effectiveKinds` exactly, for the same reason.\n\t\t *\n\t\t * @return {Array<object>} The items to render.\n\t\t */\n\t\teffectiveBuiltIn() {\n\t\t\tif (Array.isArray(this.servedBuiltIn) && this.servedBuiltIn.length > 0) {\n\t\t\t\treturn this.servedBuiltIn\n\t\t\t}\n\n\t\t\treturn this.builtIn\n\t\t},\n\n\t\t/**\n\t\t * Heading above the app's own items.\n\t\t *\n\t\t * @return {string} The built-in section heading.\n\t\t */\n\t\tbuiltInHeading() {\n\t\t\treturn this.resolvedApp\n\t\t\t\t? t('nextcloud-vue', 'Included with {app}', { app: this.resolvedApp })\n\t\t\t\t: t('nextcloud-vue', 'Included with this app')\n\t\t},\n\n\t\t/**\n\t\t * The no-registry message, which names the built-in fallback only when\n\t\t * there is one. Promising templates below when the list is empty is\n\t\t * how an empty page reads as a broken one.\n\t\t *\n\t\t * @return {string} The not-configured note.\n\t\t */\n\t\tnotConfiguredMessage() {\n\t\t\tconst base = t(\n\t\t\t\t'nextcloud-vue',\n\t\t\t\t'No store registry is configured, so nothing was requested from the network. An administrator can connect one under Administration settings.',\n\t\t\t)\n\n\t\t\treturn this.builtIn.length > 0\n\t\t\t\t? `${base} ${t('nextcloud-vue', 'The items below ship with this app.')}`\n\t\t\t\t: base\n\t\t},\n\n\t\t/**\n\t\t * The registry-error message, on the same rule as above.\n\t\t *\n\t\t * @return {string} The unreachable note.\n\t\t */\n\t\tunreachableMessage() {\n\t\t\tconst base = t('nextcloud-vue', 'The store registry did not answer.')\n\n\t\t\treturn this.builtIn.length > 0\n\t\t\t\t? `${base} ${t('nextcloud-vue', 'The items below ship with this app.')}`\n\t\t\t\t: base\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.search()\n\t},\n\n\t/**\n\t * Cancel a pending debounced search.\n\t *\n\t * @return {void}\n\t */\n\tbeforeUnmount() {\n\t\tif (this.searchTimer !== null) {\n\t\t\tclearTimeout(this.searchTimer)\n\t\t}\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Debounce the search so typing does not fire one remote request per\n\t\t * keystroke against somebody else's registry.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonSearchInput() {\n\t\t\tif (this.searchTimer !== null) {\n\t\t\t\tclearTimeout(this.searchTimer)\n\t\t\t}\n\n\t\t\tthis.searchTimer = setTimeout(() => {\n\t\t\t\tthis.search()\n\t\t\t}, 400)\n\t\t},\n\n\t\t/**\n\t\t * Select a kind filter and re-search.\n\t\t *\n\t\t * @param {string} value The kind, or an empty string for all kinds.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tselectKind(value) {\n\t\t\tthis.kind = value\n\t\t\tthis.search()\n\t\t},\n\n\t\t/**\n\t\t * Fetch the current page of store cards.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync search() {\n\t\t\t// An unconfigured `app` cannot address any endpoint. Reporting\n\t\t\t// not_configured is the honest outcome and costs no request; the\n\t\t\t// alternative is a fetch to /apps//api/... which 404s and reads to\n\t\t\t// the user as a registry that is down.\n\t\t\tif (this.resolvedApp === '') {\n\t\t\t\tthis.outcome = 'not_configured'\n\t\t\t\tthis.cards = []\n\t\t\t\tthis.loading = false\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst params = new URLSearchParams()\n\t\t\t\tif (this.query) {\n\t\t\t\t\tparams.set('q', this.query)\n\t\t\t\t}\n\t\t\t\tif (this.kind) {\n\t\t\t\t\tparams.set('kind', this.kind)\n\t\t\t\t}\n\n\t\t\t\tconst suffix = params.toString() ? `?${params.toString()}` : ''\n\t\t\t\tconst response = await fetch(\n\t\t\t\t\tgenerateUrl(`/apps/${this.resolvedApp}/api/store/items${suffix}`),\n\t\t\t\t\t{\n\t\t\t\t\t\theaders: { requesttoken: window.OC?.requestToken },\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t\tconst body = await response.json()\n\n\t\t\t\tthis.outcome = body.outcome ?? 'store_invalid_response'\n\t\t\t\tthis.cards = Array.isArray(body.cards) ? body.cards : []\n\t\t\t\t// Present on every arm the engine answers, including\n\t\t\t\t// not_configured and store_unreachable, so the filters survive\n\t\t\t\t// a registry that is down.\n\t\t\t\tthis.servedKinds = Array.isArray(body.kinds) ? body.kinds : null\n\t\t\t\t// Same contract as `kinds`: present on every arm the engine\n\t\t\t\t// answers, so an app's own items survive a registry that is\n\t\t\t\t// down β€” which is exactly when they are all there is to show.\n\t\t\t\tthis.servedBuiltIn = Array.isArray(body.builtIn) ? body.builtIn : null\n\t\t\t} catch {\n\t\t\t\tthis.outcome = 'store_unreachable'\n\t\t\t\tthis.cards = []\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Install one item, and report per component.\n\t\t *\n\t\t * A partial install is a real outcome rather than a failure: an item\n\t\t * carrying both configuration and records installs the configuration\n\t\t * and names the records it refused.\n\t\t *\n\t\t * @param {{slug: string, title: string}} card The card to install.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync install(card) {\n\t\t\tthis.installing = card.slug\n\t\t\tthis.report = null\n\n\t\t\ttry {\n\t\t\t\tconst response = await fetch(\n\t\t\t\t\tgenerateUrl(`/apps/${this.resolvedApp}/api/store/items/${encodeURIComponent(card.slug)}/install`),\n\t\t\t\t\t{\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\t\t\trequesttoken: window.OC?.requestToken,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t\tconst body = await response.json()\n\n\t\t\t\tif (response.ok !== true) {\n\t\t\t\t\tshowError(body.message\n\t\t\t\t\t\t?? t('nextcloud-vue', 'The item could not be installed.'))\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tconst refused = (body.components ?? []).filter((c) => c.status !== 'installed')\n\t\t\t\tif (refused.length === 0) {\n\t\t\t\t\tshowSuccess(t('nextcloud-vue', 'Installed.'))\n\t\t\t\t\tthis.report = null\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.report = {\n\t\t\t\t\ttype: body.success === true ? 'info' : 'warning',\n\t\t\t\t\tmessage: t(\n\t\t\t\t\t\t'nextcloud-vue',\n\t\t\t\t\t\t'Some parts were not installed: {schemas}',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tschemas: refused.map((c) => c.schema).join(', '),\n\t\t\t\t\t\t},\n\t\t\t\t\t),\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\tshowError(t('nextcloud-vue', 'The item could not be installed.'))\n\t\t\t} finally {\n\t\t\t\tthis.installing = null\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-store-page {\n\tpadding: 16px;\n\tmax-width: 1200px;\n}\n\n.cn-store-page__heading {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 12px;\n\tmargin: 0 0 4px;\n}\n\n.cn-store-page__title {\n\tmargin: 0;\n}\n\n.cn-store-page__intro {\n\tcolor: var(--color-text-maxcontrast);\n\tmargin: 0 0 16px;\n}\n\n.cn-store-page__controls {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 12px;\n\talign-items: flex-end;\n\tmargin-bottom: 16px;\n}\n\n.cn-store-page__kinds {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 8px;\n}\n\n.cn-store-page__loading {\n\tmargin: 32px auto;\n}\n\n.cn-store-page__grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fill, minmax(260px, 1fr));\n\tgap: 16px;\n\tlist-style: none;\n\tpadding: 0;\n\tmargin: 16px 0 0;\n}\n\n.cn-store-page__card {\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-large);\n\tbackground-color: var(--color-main-background);\n\tpadding: 16px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n}\n\n.cn-store-page__card-title {\n\tmargin: 0;\n\tfont-size: 1rem;\n}\n\n.cn-store-page__card-kind {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.85rem;\n}\n\n.cn-store-page__card-description {\n\tmargin: 0;\n\tflex: 1;\n}\n\n.cn-store-page__card-footer {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 8px;\n}\n\n.cn-store-page__card-version {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.85rem;\n}\n\n/* Who published a configuration set matters more than its version does, since\n installing one applies somebody else's schemas and flows to this instance. */\n.cn-store-page__card-publisher {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.85rem;\n\tmargin-inline-end: auto;\n}\n\n.cn-store-page__builtin-title {\n\tmargin: 24px 0 0;\n}\n</style>\n"],"names":[],"mappings":";;;;;;AAkMA;AACC;;;;AA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AA,eAAe;AACf,MAAA,0CAA0C;AAC1C,MAAA;AACC,OAAA,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;OAChD;MACD;AACF,MAAA;AACD,IAAA,CAAE,MAAM;IACP,SAAS,CAAC,CAAC,CAAC,eAAe,EAAE,kCAAkC,CAAC,EAAA;AACjE,IAAA,SAAU;AACT,IAAA,IAAI,CAAC,aAAa,KAAG;AACtB,IAAA;GACA;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnStorePage.vue2.js","sources":["../../../../src/components/CnStorePage/CnStorePage.vue"],"sourcesContent":["<!--\n SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>\n SPDX-License-Identifier: EUPL-1.2\n\n CnStorePage β€” browse a remote OpenRegister registry for shareable content,\n and install an item into this instance.\n\n The `store` page type (ADR-080, ADR-114 Decision 4). Promoted out of dossiq's\n app-local StoreGallery, which was the fleet's only implementation and was\n about to be copied fifteen times (ADR-012).\n\n WHAT IS APP-SPECIFIC, AND WHAT IS NOT.\n --------------------------------------\n Everything on this page is generic except three things, and all three arrive\n as props rather than being written into the component:\n\n `app` the app id, which is the only thing in the request URL\n `builtIn` the items this app ships itself, for the no-registry case\n `description` the lead paragraph, because a store of case types and a\n store of connector adapters are not selling the same thing\n\n DISCOVERY IS NOT IMPLEMENTED HERE, ON PURPOSE.\n ----------------------------------------------\n This calls `/apps/<app>/api/store/items`, which is a thin action over\n OpenRegister's `GenericStoreService` (ADR-080 Decision 2). The SSRF guard,\n the redirect refusal, the timeouts and the registry token all stay\n server-side in the engine, and no leaf app ever builds a registry URL.\n\n Install is deliberately NOT generalised (ADR-080 Decision 3): cloning an\n application template, enabling a connector adapter and instantiating an agent\n template are different operations with different authorization. Each app owns\n `POST /api/store/items/{slug}/install`; this component only calls it and\n renders what it reports.\n\n WHO SEES INSTALL AND PUBLISH IS THE APP'S ANSWER, NOT THIS PAGE'S.\n -----------------------------------------------------------------\n `canInstall` and `canPublish` carry a boolean the app resolved (learniq reads\n its ADR-023 action matrix). `null`, the default, falls back to administrators\n only, which is what every store page did before the props existed. Publish\n appears only when the app also names a `publishRoute`: publishing is the\n app's own surface, like install. Both props hide a button and nothing more;\n the app's endpoints enforce the same rule.\n\n A LOCAL-ONLY CARD GRID IS NOT A STORE (ADR-080 Decision 4). With no registry\n configured the engine answers `not_configured` WITHOUT a network call, and\n this page then renders `builtIn`. That fallback is the only reason a surface\n may carry the word Store at all.\n-->\n<template>\n\t<div class=\"cn-store-page\" data-testid=\"store-page\">\n\t\t<div class=\"cn-store-page__header\">\n\t\t\t<div class=\"cn-store-page__heading\">\n\t\t\t\t<h2 class=\"cn-store-page__title\">\n\t\t\t\t\t{{ resolvedTitle }}\n\t\t\t\t</h2>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showPublish\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tdata-testid=\"store-publish\"\n\t\t\t\t\t:to=\"publishTarget\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Publish') }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<p v-if=\"resolvedDescription\" class=\"cn-store-page__intro\">\n\t\t\t\t{{ resolvedDescription }}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<div class=\"cn-store-page__controls\">\n\t\t\t<NcTextField\n\t\t\t\tv-model=\"query\"\n\t\t\t\t:label=\"t('nextcloud-vue', 'Search the store')\"\n\t\t\t\t:disabled=\"offline\"\n\t\t\t\tdata-testid=\"store-search\"\n\t\t\t\t@update:modelValue=\"onSearchInput\" />\n\n\t\t\t<div\n\t\t\t\tclass=\"cn-store-page__kinds\"\n\t\t\t\trole=\"group\"\n\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Filter by kind')\">\n\t\t\t\t<NcButton\n\t\t\t\t\tv-for=\"option in kindOptions\"\n\t\t\t\t\t:key=\"option.value\"\n\t\t\t\t\t:variant=\"option.value === kind ? 'primary' : 'secondary'\"\n\t\t\t\t\t:disabled=\"offline\"\n\t\t\t\t\t@click=\"selectKind(option.value)\">\n\t\t\t\t\t{{ option.label }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<NcLoadingIcon v-if=\"loading\" :size=\"44\" class=\"cn-store-page__loading\" />\n\n\t\t<NcNoteCard\n\t\t\tv-else-if=\"offline\"\n\t\t\ttype=\"info\"\n\t\t\tdata-testid=\"store-not-configured\">\n\t\t\t{{ notConfiguredMessage }}\n\t\t</NcNoteCard>\n\n\t\t<NcNoteCard\n\t\t\tv-else-if=\"unreachable\"\n\t\t\ttype=\"warning\"\n\t\t\tdata-testid=\"store-unreachable\">\n\t\t\t{{ unreachableMessage }}\n\t\t</NcNoteCard>\n\n\t\t<NcEmptyContent\n\t\t\tv-else-if=\"cards.length === 0\"\n\t\t\t:name=\"t('nextcloud-vue', 'Nothing matches that search')\"\n\t\t\t:description=\"\n\t\t\t\tt('nextcloud-vue', 'Try a different term, or clear the kind filter.')\n\t\t\t\" />\n\n\t\t<ul\n\t\t\tv-if=\"!loading && cards.length > 0\"\n\t\t\tclass=\"cn-store-page__grid\"\n\t\t\tdata-testid=\"store-results\">\n\t\t\t<li v-for=\"card in cards\" :key=\"card.slug\" class=\"cn-store-page__card\">\n\t\t\t\t<h3 class=\"cn-store-page__card-title\">\n\t\t\t\t\t{{ card.title || card.slug }}\n\t\t\t\t</h3>\n\t\t\t\t<p v-if=\"card.typeName || card.kind\" class=\"cn-store-page__card-kind\">\n\t\t\t\t\t{{ card.typeName || card.kind }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"cn-store-page__card-description\">\n\t\t\t\t\t{{ card.description }}\n\t\t\t\t</p>\n\t\t\t\t<div class=\"cn-store-page__card-footer\">\n\t\t\t\t\t<span v-if=\"card.publisher\" class=\"cn-store-page__card-publisher\">\n\t\t\t\t\t\t{{ card.publisher }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span v-if=\"card.version\" class=\"cn-store-page__card-version\">\n\t\t\t\t\t\t{{ card.version }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<NcButton\n\t\t\t\t\t\tv-if=\"showInstall\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tdata-testid=\"store-install\"\n\t\t\t\t\t\t:disabled=\"installing === card.slug\"\n\t\t\t\t\t\t@click=\"install(card)\">\n\t\t\t\t\t\t{{\n\t\t\t\t\t\t\tinstalling === card.slug\n\t\t\t\t\t\t\t\t? t('nextcloud-vue', 'Installing…')\n\t\t\t\t\t\t\t\t: t('nextcloud-vue', 'Install')\n\t\t\t\t\t\t}}\n\t\t\t\t\t</NcButton>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t</ul>\n\n\t\t<div\n\t\t\tv-if=\"!loading && visibleBuiltIn.length > 0\"\n\t\t\tclass=\"cn-store-page__builtin\">\n\t\t\t<h3 class=\"cn-store-page__builtin-title\">\n\t\t\t\t{{ builtInHeading }}\n\t\t\t</h3>\n\t\t\t<ul class=\"cn-store-page__grid\" data-testid=\"store-builtin\">\n\t\t\t\t<li\n\t\t\t\t\tv-for=\"item in visibleBuiltIn\"\n\t\t\t\t\t:key=\"item.slug\"\n\t\t\t\t\tclass=\"cn-store-page__card\">\n\t\t\t\t\t<h4 class=\"cn-store-page__card-title\">\n\t\t\t\t\t\t{{ item.title || item.slug }}\n\t\t\t\t\t</h4>\n\t\t\t\t\t<p class=\"cn-store-page__card-description\">\n\t\t\t\t\t\t{{ item.description }}\n\t\t\t\t\t</p>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\n\t\t<NcNoteCard\n\t\t\tv-if=\"report\"\n\t\t\t:type=\"report.type\"\n\t\t\tdata-testid=\"store-install-report\">\n\t\t\t{{ report.message }}\n\t\t</NcNoteCard>\n\t</div>\n</template>\n\n<script>\nimport { getCurrentUser } from '@nextcloud/auth'\nimport { showError, showSuccess } from '@nextcloud/dialogs'\nimport { t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport {\n\tNcButton,\n\tNcEmptyContent,\n\tNcLoadingIcon,\n\tNcNoteCard,\n\tNcTextField,\n} from '@nextcloud/vue'\n\n/**\n * The kind vocabulary from ADR-080 Decision 5. A `kind` names what installing\n * an item DOES, which is what lets one registry serve several apps from one\n * schema. An app whose items are a different shape passes its own `kinds`.\n */\nexport const DEFAULT_STORE_KINDS = [\n\t'app-template',\n\t'adapter',\n\t'source-template',\n\t'configuration-template',\n\t'agent-template',\n]\n\nexport default {\n\tname: 'CnStorePage',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcEmptyContent,\n\t\tNcLoadingIcon,\n\t\tNcNoteCard,\n\t\tNcTextField,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The manifest page.\n\t\t *\n\t\t * ⚠️ CnPageRenderer does NOT pass this. `resolvedProps()` returns\n\t\t * `{ ...topLevel, ...normalizedConfig, ...params }` and has no `page`\n\t\t * key, so a dispatched `type: \"store\"` page arrives with the flattened\n\t\t * props below and this default `{}`. Reading `page.config` here would\n\t\t * render an empty store forever, which is exactly what happened to\n\t\t * CnReportsPage before #897. Kept only so a host rendering this\n\t\t * component directly can still hand it a whole page; the flattened\n\t\t * props win.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tpage: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * The app id. The ONLY app-specific value in the request URL, and the\n\t\t * reason this component is shared rather than copied.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tapp: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Page title, flattened out of `config` or lifted from the page.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * The lead paragraph. A store of case types and a store of connector\n\t\t * adapters are not offering the same thing, so the app says what its\n\t\t * store is for.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Kind quick-filters. Defaults to the ADR-080 Decision 5 vocabulary.\n\t\t *\n\t\t * @type {Array<string>}\n\t\t */\n\t\tkinds: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => DEFAULT_STORE_KINDS,\n\t\t},\n\n\t\t/**\n\t\t * The items this app ships itself, rendered when the engine reports\n\t\t * `not_configured` or the registry does not answer.\n\t\t *\n\t\t * ADR-080 Decision 4 makes this the price of the word Store: a surface\n\t\t * that goes blank without a registry was never a store, and a surface\n\t\t * that only ever shows these is a Templates page.\n\t\t *\n\t\t * @type {Array<{slug: string, title: string, description: string}>}\n\t\t */\n\t\tbuiltIn: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Whether the signed-in user sees Install, as the app resolved it\n\t\t * (learniq: its ADR-023 matrix). `true` shows it on every remote\n\t\t * card, `false` hides it from everyone, administrators included.\n\t\t * `null` (the default) keeps the rule from before this prop:\n\t\t * administrators only. Presentation only: the app's install endpoint\n\t\t * must enforce the same rule.\n\t\t *\n\t\t * @type {boolean|null}\n\t\t */\n\t\tcanInstall: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Whether the signed-in user sees Publish, as the app resolved it.\n\t\t * `null` (the default) falls back to administrators only. Publish\n\t\t * renders only when `publishRoute` is set as well. Presentation\n\t\t * only: the app's publish endpoint must enforce the same rule.\n\t\t *\n\t\t * @type {boolean|null}\n\t\t */\n\t\tcanPublish: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Where Publish takes the user: a route name (string) or a route\n\t\t * location (object). Publishing is the app's own surface, so this\n\t\t * page never sends anything to a registry itself. Empty means no\n\t\t * Publish button, whatever `canPublish` says, so an app that never\n\t\t * sets it renders what it rendered before.\n\t\t *\n\t\t * @type {string|object}\n\t\t */\n\t\tpublishRoute: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tloading: true,\n\t\t\toutcome: null,\n\t\t\tcards: [],\n\t\t\tquery: '',\n\t\t\tkind: '',\n\t\t\tinstalling: null,\n\t\t\treport: null,\n\t\t\tsearchTimer: null,\n\t\t\t// The kinds the ENGINE served, from the app's `store` manifest\n\t\t\t// block. Null until the first response, so \"not asked yet\" stays\n\t\t\t// distinguishable from \"the app declares none\".\n\t\t\tservedKinds: null,\n\t\t\t// The built-in items the ENGINE served, from the app's `store`\n\t\t\t// manifest block. Null until the first response, so \"not asked\n\t\t\t// yet\" stays distinguishable from \"the app declares none\".\n\t\t\tservedBuiltIn: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The page title, preferring the flattened prop over the page object.\n\t\t *\n\t\t * @return {string} The heading to render.\n\t\t */\n\t\tresolvedTitle() {\n\t\t\treturn this.title || this.page?.title || t('nextcloud-vue', 'Store')\n\t\t},\n\n\t\t/**\n\t\t * The lead paragraph, preferring the flattened prop.\n\t\t *\n\t\t * @return {string} The intro copy, or an empty string.\n\t\t */\n\t\tresolvedDescription() {\n\t\t\treturn this.description || this.page?.config?.description || ''\n\t\t},\n\n\t\t/**\n\t\t * The app id, preferring the flattened prop.\n\t\t *\n\t\t * @return {string} The app id used to address the store endpoints.\n\t\t */\n\t\tresolvedApp() {\n\t\t\treturn this.app || this.page?.config?.app || ''\n\t\t},\n\n\t\t/**\n\t\t * No registry configured. The engine reported this WITHOUT making a\n\t\t * network call, which is the ADR-080 Decision 4 fallback.\n\t\t *\n\t\t * @return {boolean} True when no registry is connected.\n\t\t */\n\t\toffline() {\n\t\t\treturn this.outcome === 'not_configured'\n\t\t},\n\n\t\t/**\n\t\t * The registry is configured but did not answer usefully.\n\t\t *\n\t\t * @return {boolean} True when the registry errored.\n\t\t */\n\t\tunreachable() {\n\t\t\treturn (\n\t\t\t\tthis.outcome === 'store_unreachable'\n\t\t\t\t|| this.outcome === 'store_invalid_response'\n\t\t\t)\n\t\t},\n\n\t\t/**\n\t\t * Whether the current user is an administrator: the fallback for both\n\t\t * actions when the app did not say.\n\t\t *\n\t\t * @return {boolean} True when the current user is an administrator.\n\t\t *\n\t\t * @spec openspec/changes/store-page-action-visibility/specs/store-page/spec.md#requirement-req-stp-1-the-consuming-app-decides-who-sees-install\n\t\t */\n\t\tisAdmin() {\n\t\t\treturn getCurrentUser()?.isAdmin === true\n\t\t},\n\n\t\t/**\n\t\t * Whether Install shows. The app's answer wins; without one only an\n\t\t * administrator installs, because what an install writes is the shape\n\t\t * of the work every handler then operates against. The server\n\t\t * enforces this too; hiding the button keeps a user from discovering\n\t\t * a refusal as a 403.\n\t\t *\n\t\t * @return {boolean} True when the Install buttons render.\n\t\t *\n\t\t * @spec openspec/changes/store-page-action-visibility/specs/store-page/spec.md#requirement-req-stp-1-the-consuming-app-decides-who-sees-install\n\t\t */\n\t\tshowInstall() {\n\t\t\tif (typeof this.canInstall === 'boolean') {\n\t\t\t\treturn this.canInstall\n\t\t\t}\n\n\t\t\treturn this.isAdmin\n\t\t},\n\n\t\t/**\n\t\t * Where Publish navigates, or null when the app named no destination.\n\t\t * A string is a route NAME, the way manifest menu entries name routes.\n\t\t *\n\t\t * @return {object|null} A vue-router location, or null.\n\t\t *\n\t\t * @spec openspec/changes/store-page-action-visibility/specs/store-page/spec.md#requirement-req-stp-2-the-consuming-app-decides-who-sees-publish-and-where-it-leads\n\t\t */\n\t\tpublishTarget() {\n\t\t\tif (typeof this.publishRoute === 'string') {\n\t\t\t\treturn this.publishRoute === '' ? null : { name: this.publishRoute }\n\t\t\t}\n\n\t\t\tif (this.publishRoute !== null && typeof this.publishRoute === 'object') {\n\t\t\t\treturn this.publishRoute\n\t\t\t}\n\n\t\t\treturn null\n\t\t},\n\n\t\t/**\n\t\t * Whether Publish shows: a destination is named AND the app allows it\n\t\t * (or, without an answer, the user is an administrator). No\n\t\t * destination means no button, because a button that goes nowhere\n\t\t * is worse than none.\n\t\t *\n\t\t * @return {boolean} True when the Publish button renders.\n\t\t *\n\t\t * @spec openspec/changes/store-page-action-visibility/specs/store-page/spec.md#requirement-req-stp-2-the-consuming-app-decides-who-sees-publish-and-where-it-leads\n\t\t */\n\t\tshowPublish() {\n\t\t\tif (this.publishTarget === null) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tif (typeof this.canPublish === 'boolean') {\n\t\t\t\treturn this.canPublish\n\t\t\t}\n\n\t\t\treturn this.isAdmin\n\t\t},\n\n\t\t/**\n\t\t * The kind quick-filters, with an \"all\" entry first.\n\t\t *\n\t\t * @return {Array<{value: string, label: string}>} The filter options.\n\t\t */\n\t\tkindOptions() {\n\t\t\treturn [\n\t\t\t\t{ value: '', label: t('nextcloud-vue', 'All kinds') },\n\t\t\t\t...this.effectiveKinds.map((value) => ({ value, label: value })),\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * The kinds to offer, preferring what the ENGINE served.\n\t\t *\n\t\t * An app declares its kinds in the `store` block of its manifest, next\n\t\t * to the schema allowlist, and the engine returns them with the cards.\n\t\t * That is the single place an app says what its store sells; the\n\t\t * `kinds` PROP remains for a host rendering this component directly and\n\t\t * as the pre-response value, and DEFAULT_STORE_KINDS is the floor.\n\t\t *\n\t\t * A served EMPTY list means the app declared none, which is not the\n\t\t * same as not having asked yet β€” hence `servedKinds` starts null.\n\t\t *\n\t\t * @return {Array<string>} The kind filter values.\n\t\t */\n\t\teffectiveKinds() {\n\t\t\tif (Array.isArray(this.servedKinds) && this.servedKinds.length > 0) {\n\t\t\t\treturn this.servedKinds\n\t\t\t}\n\n\t\t\treturn this.kinds\n\t\t},\n\n\t\t/**\n\t\t * The app's own items, shown whenever the remote list is not carrying\n\t\t * the page. Not a network call, and not a Store on their own.\n\t\t *\n\t\t * πŸ”΄ AN EMPTY ANSWER IS STILL AN EMPTY PAGE. This used to hide the\n\t\t * built-ins whenever the engine answered at all, checking only\n\t\t * `not_configured` and the error outcomes. A federated store that\n\t\t * answers `ok` with zero cards β€” a configured registry that has\n\t\t * published nothing yet β€” then rendered a heading, a search box and\n\t\t * nothing else, while the app shipped four items it could have shown.\n\t\t * Measured on decidiq, whose store returns `ok` with 0 cards and 4\n\t\t * built-ins declared.\n\t\t *\n\t\t * ADR-080 Decision 4 is explicit that a surface which goes blank was\n\t\t * never a store, so the test is what the reader can SEE, not which\n\t\t * outcome the engine reported.\n\t\t *\n\t\t * @return {Array<object>} The built-in items to render.\n\t\t */\n\t\tvisibleBuiltIn() {\n\t\t\tif (this.offline === false && this.unreachable === false && this.cards.length > 0) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\treturn this.effectiveBuiltIn\n\t\t},\n\n\t\t/**\n\t\t * The app's own items, preferring what the ENGINE served over the page\n\t\t * config.\n\t\t *\n\t\t * An app declares these ONCE, in its `store` manifest block beside the\n\t\t * allowlist, which is where the schema documents them. The `builtIn`\n\t\t * PROP is a second place to write the same list, and an app that\n\t\t * declared them only in the manifest used to render nothing: the\n\t\t * engine parsed them and never sent them.\n\t\t *\n\t\t * Mirrors `effectiveKinds` exactly, for the same reason.\n\t\t *\n\t\t * @return {Array<object>} The items to render.\n\t\t */\n\t\teffectiveBuiltIn() {\n\t\t\tif (Array.isArray(this.servedBuiltIn) && this.servedBuiltIn.length > 0) {\n\t\t\t\treturn this.servedBuiltIn\n\t\t\t}\n\n\t\t\treturn this.builtIn\n\t\t},\n\n\t\t/**\n\t\t * Heading above the app's own items.\n\t\t *\n\t\t * @return {string} The built-in section heading.\n\t\t */\n\t\tbuiltInHeading() {\n\t\t\treturn this.resolvedApp\n\t\t\t\t? t('nextcloud-vue', 'Included with {app}', { app: this.resolvedApp })\n\t\t\t\t: t('nextcloud-vue', 'Included with this app')\n\t\t},\n\n\t\t/**\n\t\t * The no-registry message, which names the built-in fallback only when\n\t\t * there is one. Promising templates below when the list is empty is\n\t\t * how an empty page reads as a broken one.\n\t\t *\n\t\t * @return {string} The not-configured note.\n\t\t */\n\t\tnotConfiguredMessage() {\n\t\t\tconst base = t(\n\t\t\t\t'nextcloud-vue',\n\t\t\t\t'No store registry is configured, so nothing was requested from the network. An administrator can connect one under Administration settings.',\n\t\t\t)\n\n\t\t\treturn this.builtIn.length > 0\n\t\t\t\t? `${base} ${t('nextcloud-vue', 'The items below ship with this app.')}`\n\t\t\t\t: base\n\t\t},\n\n\t\t/**\n\t\t * The registry-error message, on the same rule as above.\n\t\t *\n\t\t * @return {string} The unreachable note.\n\t\t */\n\t\tunreachableMessage() {\n\t\t\tconst base = t('nextcloud-vue', 'The store registry did not answer.')\n\n\t\t\treturn this.builtIn.length > 0\n\t\t\t\t? `${base} ${t('nextcloud-vue', 'The items below ship with this app.')}`\n\t\t\t\t: base\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.search()\n\t},\n\n\t/**\n\t * Cancel a pending debounced search.\n\t *\n\t * @return {void}\n\t */\n\tbeforeUnmount() {\n\t\tif (this.searchTimer !== null) {\n\t\t\tclearTimeout(this.searchTimer)\n\t\t}\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Debounce the search so typing does not fire one remote request per\n\t\t * keystroke against somebody else's registry.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonSearchInput() {\n\t\t\tif (this.searchTimer !== null) {\n\t\t\t\tclearTimeout(this.searchTimer)\n\t\t\t}\n\n\t\t\tthis.searchTimer = setTimeout(() => {\n\t\t\t\tthis.search()\n\t\t\t}, 400)\n\t\t},\n\n\t\t/**\n\t\t * Select a kind filter and re-search.\n\t\t *\n\t\t * @param {string} value The kind, or an empty string for all kinds.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tselectKind(value) {\n\t\t\tthis.kind = value\n\t\t\tthis.search()\n\t\t},\n\n\t\t/**\n\t\t * Fetch the current page of store cards.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync search() {\n\t\t\t// An unconfigured `app` cannot address any endpoint. Reporting\n\t\t\t// not_configured is the honest outcome and costs no request; the\n\t\t\t// alternative is a fetch to /apps//api/... which 404s and reads to\n\t\t\t// the user as a registry that is down.\n\t\t\tif (this.resolvedApp === '') {\n\t\t\t\tthis.outcome = 'not_configured'\n\t\t\t\tthis.cards = []\n\t\t\t\tthis.loading = false\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst params = new URLSearchParams()\n\t\t\t\tif (this.query) {\n\t\t\t\t\tparams.set('q', this.query)\n\t\t\t\t}\n\t\t\t\tif (this.kind) {\n\t\t\t\t\tparams.set('kind', this.kind)\n\t\t\t\t}\n\n\t\t\t\tconst suffix = params.toString() ? `?${params.toString()}` : ''\n\t\t\t\tconst response = await fetch(\n\t\t\t\t\tgenerateUrl(`/apps/${this.resolvedApp}/api/store/items${suffix}`),\n\t\t\t\t\t{\n\t\t\t\t\t\theaders: { requesttoken: window.OC?.requestToken },\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t\tconst body = await response.json()\n\n\t\t\t\tthis.outcome = body.outcome ?? 'store_invalid_response'\n\t\t\t\tthis.cards = Array.isArray(body.cards) ? body.cards : []\n\t\t\t\t// Present on every arm the engine answers, including\n\t\t\t\t// not_configured and store_unreachable, so the filters survive\n\t\t\t\t// a registry that is down.\n\t\t\t\tthis.servedKinds = Array.isArray(body.kinds) ? body.kinds : null\n\t\t\t\t// Same contract as `kinds`: present on every arm the engine\n\t\t\t\t// answers, so an app's own items survive a registry that is\n\t\t\t\t// down β€” which is exactly when they are all there is to show.\n\t\t\t\tthis.servedBuiltIn = Array.isArray(body.builtIn) ? body.builtIn : null\n\t\t\t} catch {\n\t\t\t\tthis.outcome = 'store_unreachable'\n\t\t\t\tthis.cards = []\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Install one item, and report per component.\n\t\t *\n\t\t * A partial install is a real outcome rather than a failure: an item\n\t\t * carrying both configuration and records installs the configuration\n\t\t * and names the records it refused.\n\t\t *\n\t\t * @param {{slug: string, title: string}} card The card to install.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync install(card) {\n\t\t\tthis.installing = card.slug\n\t\t\tthis.report = null\n\n\t\t\ttry {\n\t\t\t\tconst response = await fetch(\n\t\t\t\t\tgenerateUrl(`/apps/${this.resolvedApp}/api/store/items/${encodeURIComponent(card.slug)}/install`),\n\t\t\t\t\t{\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\t\t\trequesttoken: window.OC?.requestToken,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t)\n\t\t\t\tconst body = await response.json()\n\n\t\t\t\tif (response.ok !== true) {\n\t\t\t\t\tshowError(body.message\n\t\t\t\t\t\t?? t('nextcloud-vue', 'The item could not be installed.'))\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tconst refused = (body.components ?? []).filter((c) => c.status !== 'installed')\n\t\t\t\tif (refused.length === 0) {\n\t\t\t\t\tshowSuccess(t('nextcloud-vue', 'Installed.'))\n\t\t\t\t\tthis.report = null\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.report = {\n\t\t\t\t\ttype: body.success === true ? 'info' : 'warning',\n\t\t\t\t\tmessage: t(\n\t\t\t\t\t\t'nextcloud-vue',\n\t\t\t\t\t\t'Some parts were not installed: {schemas}',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tschemas: refused.map((c) => c.schema).join(', '),\n\t\t\t\t\t\t},\n\t\t\t\t\t),\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\tshowError(t('nextcloud-vue', 'The item could not be installed.'))\n\t\t\t} finally {\n\t\t\t\tthis.installing = null\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-store-page {\n\tpadding: 16px;\n\tmax-width: 1200px;\n}\n\n/* Clear the Nextcloud navigation toggle button (44px wide, absolutely\n positioned at the left edge of .app-content) plus 12px breathing room, as\n CnPageHeader does. Only the header shifts; the body keeps the full width. */\n.cn-store-page__header {\n\tpadding-inline-start: 56px;\n}\n\n.cn-store-page__heading {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 12px;\n\tmargin: 0 0 4px;\n}\n\n.cn-store-page__title {\n\tmargin: 0;\n}\n\n.cn-store-page__intro {\n\tcolor: var(--color-text-maxcontrast);\n\tmargin: 0 0 16px;\n}\n\n.cn-store-page__controls {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 12px;\n\talign-items: flex-end;\n\tmargin-bottom: 16px;\n}\n\n.cn-store-page__kinds {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 8px;\n}\n\n.cn-store-page__loading {\n\tmargin: 32px auto;\n}\n\n.cn-store-page__grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fill, minmax(260px, 1fr));\n\tgap: 16px;\n\tlist-style: none;\n\tpadding: 0;\n\tmargin: 16px 0 0;\n}\n\n.cn-store-page__card {\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-large);\n\tbackground-color: var(--color-main-background);\n\tpadding: 16px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n}\n\n.cn-store-page__card-title {\n\tmargin: 0;\n\tfont-size: 1rem;\n}\n\n.cn-store-page__card-kind {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.85rem;\n}\n\n.cn-store-page__card-description {\n\tmargin: 0;\n\tflex: 1;\n}\n\n.cn-store-page__card-footer {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 8px;\n}\n\n.cn-store-page__card-version {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.85rem;\n}\n\n/* Who published a configuration set matters more than its version does, since\n installing one applies somebody else's schemas and flows to this instance. */\n.cn-store-page__card-publisher {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.85rem;\n\tmargin-inline-end: auto;\n}\n\n.cn-store-page__builtin-title {\n\tmargin: 24px 0 0;\n}\n</style>\n"],"names":[],"mappings":";;;;;;AAkMA;AACC;;;;AAIU,MAAE,sBAAsB;AAClC,CAAA,cAAc;AACd,CAAA,SAAS;AACT,CAAA,iBAAiB;CACjB,wBAAwB;AACxB,CAAA,gBAAgB;AACjB,EAAA;;AAEA,aAAe;AACd,CAAA,IAAI,EAAE,aAAa;;CAEnB,UAAU,EAAE;AACX,EAAA,QAAQ;AACR,EAAA,cAAc;EACd,aAAa;EACb,UAAU;EACV,WAAW;EACX;;AAED,CAAA,KAAK,EAAE;AACN;AACC;AACA;;;;;;;;AAQA;AACA;;;EAGD,IAAI,EAAE;GACL,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,OAAO,EAAE,CAAC;GACnB;;AAED;;AAEC;AACA;;;EAGD,GAAG,EAAE;GACJ,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;;AAED;;AAEC;;;AAGD,EAAA,KAAK,EAAE;GACN,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;;AAED;;;;AAIC;;;EAGD,WAAW,EAAE;GACZ,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;;AAED;;AAEC;AACA;;AAED,EAAA,KAAK,EAAE;GACN,IAAI,EAAE,KAAK;AACX,GAAA,OAAO,EAAE,MAAM,mBAAmB;GAClC;;AAED;;AAEC;AACA;;;AAGA;AACA;;;AAGD,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,KAAK;AACX,GAAA,OAAO,EAAE,MAAM,EAAE;GACjB;;AAED;;;;;;;AAOC;AACA;;EAED,UAAU,EAAE;GACX,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,I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