@conduction/nextcloud-vue 2.83.0 → 2.85.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 (246) hide show
  1. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue.js +1 -1
  2. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js +131 -3
  3. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js.map +1 -1
  4. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js +54 -18
  5. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js.map +1 -1
  6. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue.js +1 -1
  7. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js +1 -1
  8. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js.map +1 -1
  9. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue3.js.map +1 -1
  10. package/dist/esm/components/CnBoardView/CnBoardView.vue.js +1 -1
  11. package/dist/esm/components/CnBoardView/CnBoardView.vue2.js +232 -4
  12. package/dist/esm/components/CnBoardView/CnBoardView.vue2.js.map +1 -1
  13. package/dist/esm/components/CnBoardView/CnBoardView.vue3.js +95 -51
  14. package/dist/esm/components/CnBoardView/CnBoardView.vue3.js.map +1 -1
  15. package/dist/esm/components/CnBodySections/CnBodySections.vue.js +1 -1
  16. package/dist/esm/components/CnBodySections/CnBodySections.vue2.js +22 -1
  17. package/dist/esm/components/CnBodySections/CnBodySections.vue2.js.map +1 -1
  18. package/dist/esm/components/CnBodySections/CnBodySections.vue3.js.map +1 -1
  19. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue.js +1 -1
  20. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js +47 -4
  21. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js.map +1 -1
  22. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue3.js.map +1 -1
  23. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue.js +1 -1
  24. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js +239 -3
  25. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js.map +1 -1
  26. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js +5 -5
  27. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js.map +1 -1
  28. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
  29. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +50 -0
  30. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  31. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +22 -12
  32. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  33. package/dist/esm/components/CnDeltaWidget/CnDeltaWidget.vue.js +1 -1
  34. package/dist/esm/components/CnDeltaWidget/CnDeltaWidget.vue2.js +1 -1
  35. package/dist/esm/components/CnDeltaWidget/CnDeltaWidget.vue2.js.map +1 -1
  36. package/dist/esm/components/CnDeltaWidget/CnDeltaWidget.vue3.js.map +1 -1
  37. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +226 -8
  38. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  39. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  40. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
  41. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js +3 -1
  42. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
  43. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
  44. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
  45. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +18 -5
  46. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
  47. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
  48. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue.js +1 -1
  49. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js +38 -1
  50. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js.map +1 -1
  51. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js +45 -5
  52. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js.map +1 -1
  53. package/dist/esm/components/CnGaugeWidget/CnGaugeWidget.vue.js +1 -1
  54. package/dist/esm/components/CnGaugeWidget/CnGaugeWidget.vue2.js +1 -1
  55. package/dist/esm/components/CnGaugeWidget/CnGaugeWidget.vue2.js.map +1 -1
  56. package/dist/esm/components/CnGaugeWidget/CnGaugeWidget.vue3.js.map +1 -1
  57. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +548 -77
  58. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  59. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +191 -82
  60. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  61. package/dist/esm/components/CnIndexPage/useSelfFetchList.js +11 -2
  62. package/dist/esm/components/CnIndexPage/useSelfFetchList.js.map +1 -1
  63. package/dist/esm/components/CnInteractionFormWidget/CnInteractionFormWidget.vue2.js +29 -6
  64. package/dist/esm/components/CnInteractionFormWidget/CnInteractionFormWidget.vue2.js.map +1 -1
  65. package/dist/esm/components/CnInteractionFormWidget/CnInteractionFormWidget.vue3.js.map +1 -1
  66. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
  67. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +126 -2
  68. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
  69. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js +24 -2
  70. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
  71. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  72. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +106 -3
  73. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  74. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  75. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue.js +1 -1
  76. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue2.js +67 -5
  77. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue2.js.map +1 -1
  78. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue3.js +181 -124
  79. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue3.js.map +1 -1
  80. package/dist/esm/components/CnReportsPage/CnReportsPage.vue.js +1 -1
  81. package/dist/esm/components/CnReportsPage/CnReportsPage.vue2.js +135 -2
  82. package/dist/esm/components/CnReportsPage/CnReportsPage.vue2.js.map +1 -1
  83. package/dist/esm/components/CnReportsPage/CnReportsPage.vue3.js +95 -43
  84. package/dist/esm/components/CnReportsPage/CnReportsPage.vue3.js.map +1 -1
  85. package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue.js +1 -1
  86. package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue2.js +5 -1
  87. package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue2.js.map +1 -1
  88. package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue3.js.map +1 -1
  89. package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue.js +1 -1
  90. package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue2.js +72 -5
  91. package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue2.js.map +1 -1
  92. package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue3.js +33 -8
  93. package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue3.js.map +1 -1
  94. package/dist/esm/components/CnStatWidget/CnStatWidget.vue.js +1 -1
  95. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +135 -11
  96. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
  97. package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js +6 -2
  98. package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
  99. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue.js +1 -1
  100. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue2.js +17 -2
  101. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue2.js.map +1 -1
  102. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue3.js +1 -1
  103. package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue3.js.map +1 -1
  104. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
  105. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js +39 -6
  106. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
  107. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
  108. package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue.js +1 -1
  109. package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue2.js +140 -7
  110. package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue2.js.map +1 -1
  111. package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue3.js.map +1 -1
  112. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue.js +1 -1
  113. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue2.js +37 -9
  114. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue2.js.map +1 -1
  115. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue3.js +6 -5
  116. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue3.js.map +1 -1
  117. package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue.js +1 -1
  118. package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue2.js +16 -0
  119. package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue2.js.map +1 -1
  120. package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue3.js.map +1 -1
  121. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue.js +1 -1
  122. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue2.js +2 -1
  123. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue2.js.map +1 -1
  124. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue3.js.map +1 -1
  125. package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue2.js +53 -1
  126. package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue2.js.map +1 -1
  127. package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue3.js +3 -2
  128. package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue3.js.map +1 -1
  129. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue.js +1 -1
  130. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js +135 -0
  131. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js.map +1 -1
  132. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue3.js.map +1 -1
  133. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue.js +1 -1
  134. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue2.js +19 -0
  135. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue2.js.map +1 -1
  136. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue3.js +37 -19
  137. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue3.js.map +1 -1
  138. package/dist/esm/composables/useListView.js +21 -0
  139. package/dist/esm/composables/useListView.js.map +1 -1
  140. package/dist/esm/dialogs/CnTransitionInputDialog.vue.js +1 -1
  141. package/dist/esm/dialogs/CnTransitionInputDialog.vue2.js +68 -6
  142. package/dist/esm/dialogs/CnTransitionInputDialog.vue2.js.map +1 -1
  143. package/dist/esm/dialogs/CnTransitionInputDialog.vue3.js +133 -105
  144. package/dist/esm/dialogs/CnTransitionInputDialog.vue3.js.map +1 -1
  145. package/dist/esm/index.js +1 -0
  146. package/dist/esm/index.js.map +1 -1
  147. package/dist/esm/l10n/en.json.js +38 -1
  148. package/dist/esm/l10n/en.json.js.map +1 -1
  149. package/dist/esm/l10n/nl.json.js +78 -1
  150. package/dist/esm/l10n/nl.json.js.map +1 -1
  151. package/dist/esm/library-style.js +1 -1
  152. package/dist/esm/nextcloud-vue.css +1030 -533
  153. package/dist/esm/store/useObjectStore.js +16 -2
  154. package/dist/esm/store/useObjectStore.js.map +1 -1
  155. package/dist/esm/utils/boardColumns.js +8 -1
  156. package/dist/esm/utils/boardColumns.js.map +1 -1
  157. package/dist/esm/utils/boardReferenceColumns.js +278 -0
  158. package/dist/esm/utils/boardReferenceColumns.js.map +1 -0
  159. package/dist/esm/utils/buildManifest.js +41 -4
  160. package/dist/esm/utils/buildManifest.js.map +1 -1
  161. package/dist/esm/utils/detailWidgetVisibility.js +149 -0
  162. package/dist/esm/utils/detailWidgetVisibility.js.map +1 -0
  163. package/dist/esm/utils/formatMetric.js +39 -3
  164. package/dist/esm/utils/formatMetric.js.map +1 -1
  165. package/dist/esm/utils/gridStack.js +40 -1
  166. package/dist/esm/utils/gridStack.js.map +1 -1
  167. package/dist/esm/utils/humaniseKey.js +41 -0
  168. package/dist/esm/utils/humaniseKey.js.map +1 -0
  169. package/dist/esm/utils/notificationRuleLabel.js +6 -23
  170. package/dist/esm/utils/notificationRuleLabel.js.map +1 -1
  171. package/dist/esm/utils/resolveManifestTokens.js +1 -0
  172. package/dist/esm/utils/resolveManifestTokens.js.map +1 -1
  173. package/dist/esm/utils/sentinelTokens.js +9 -0
  174. package/dist/esm/utils/sentinelTokens.js.map +1 -1
  175. package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
  176. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  177. package/dist/esm/utils/widgetDispatch.js +8 -2
  178. package/dist/esm/utils/widgetDispatch.js.map +1 -1
  179. package/dist/nextcloud-vue.cjs.js +17159 -13422
  180. package/dist/nextcloud-vue.cjs.js.map +2 -2
  181. package/dist/nextcloud-vue.css +1030 -533
  182. package/l10n/en.json +38 -1
  183. package/l10n/nl.json +78 -1
  184. package/package.json +1 -1
  185. package/src/components/CnAdminSettingsShell/CnAdminSettingsShell.vue +160 -8
  186. package/src/components/CnAuditTrailCard/CnAuditTrailCard.vue +1 -1
  187. package/src/components/CnBoardView/CnBoardView.vue +262 -6
  188. package/src/components/CnBodySections/CnBodySections.vue +22 -1
  189. package/src/components/CnCountdownWidget/CnCountdownWidget.vue +47 -4
  190. package/src/components/CnDashboardGrid/CnDashboardGrid.vue +244 -8
  191. package/src/components/CnDashboardPage/CnDashboardPage.vue +62 -2
  192. package/src/components/CnDeltaWidget/CnDeltaWidget.vue +1 -1
  193. package/src/components/CnDetailPage/CnDetailPage.md +3 -1
  194. package/src/components/CnDetailPage/CnDetailPage.vue +226 -8
  195. package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +3 -1
  196. package/src/components/CnFactsWidget/CnFactsWidget.vue +18 -5
  197. package/src/components/CnFieldListWidget/CnFieldListWidget.vue +63 -1
  198. package/src/components/CnGaugeWidget/CnGaugeWidget.vue +1 -1
  199. package/src/components/CnIndexPage/CnIndexPage.vue +586 -25
  200. package/src/components/CnIndexPage/useSelfFetchList.js +10 -1
  201. package/src/components/CnInteractionFormWidget/CnInteractionFormWidget.vue +29 -6
  202. package/src/components/CnObjectDataWidget/CnObjectDataWidget.md +1 -1
  203. package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +154 -5
  204. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +106 -3
  205. package/src/components/CnRegisterMapping/CnRegisterMapping.md +5 -0
  206. package/src/components/CnRegisterMapping/CnRegisterMapping.vue +231 -96
  207. package/src/components/CnReportsPage/CnReportsPage.vue +179 -1
  208. package/src/components/CnSettingsPage/CnSettingsPage.vue +5 -1
  209. package/src/components/CnStagesWidget/CnStagesWidget.vue +103 -6
  210. package/src/components/CnStatWidget/CnStatWidget.vue +137 -12
  211. package/src/components/CnStatsBlockWidget/CnStatsBlockWidget.vue +34 -3
  212. package/src/components/CnTabsWidget/CnTabsWidget.vue +39 -6
  213. package/src/components/CnToggleTableWidget/CnToggleTableWidget.vue +140 -7
  214. package/src/components/CnVersionInfoCard/CnVersionInfoCard.md +2 -1
  215. package/src/components/CnVersionInfoCard/CnVersionInfoCard.vue +42 -13
  216. package/src/components/CnWalkthrough/CnWalkthrough.vue +16 -0
  217. package/src/components/CnWeekStripWidget/CnWeekStripWidget.vue +2 -1
  218. package/src/components/CnWidgetCardGrid/CnWidgetCardGrid.vue +55 -2
  219. package/src/components/CnWidgetObjectTable/CnWidgetObjectTable.vue +135 -0
  220. package/src/components/CnWidgetWrapper/CnWidgetWrapper.md +10 -0
  221. package/src/components/CnWidgetWrapper/CnWidgetWrapper.vue +44 -1
  222. package/src/composables/useListView.js +21 -0
  223. package/src/css/board.css +65 -4
  224. package/src/css/dialog.css +4 -2
  225. package/src/css/form-field.css +14 -0
  226. package/src/css/form-widget.css +11 -0
  227. package/src/css/index-page.css +49 -0
  228. package/src/css/kpi-card.css +13 -0
  229. package/src/css/look-board-reports.css +58 -0
  230. package/src/css/look-board.css +108 -7
  231. package/src/dialogs/CnTransitionInputDialog.vue +87 -7
  232. package/src/index.js +2 -0
  233. package/src/schemas/app-manifest-v2.schema.json +137 -6
  234. package/src/store/useObjectStore.js +16 -2
  235. package/src/utils/boardColumns.js +8 -1
  236. package/src/utils/boardReferenceColumns.js +274 -0
  237. package/src/utils/buildManifest.js +40 -3
  238. package/src/utils/detailWidgetVisibility.js +145 -0
  239. package/src/utils/formatMetric.js +38 -2
  240. package/src/utils/gridStack.js +39 -0
  241. package/src/utils/humaniseKey.js +38 -0
  242. package/src/utils/notificationRuleLabel.js +5 -23
  243. package/src/utils/resolveManifestTokens.js +1 -0
  244. package/src/utils/sentinelTokens.js +9 -0
  245. package/src/utils/validateManifestV2.compiled.js +3 -3
  246. package/src/utils/widgetDispatch.js +8 -2
@@ -1 +1 @@
1
- {"version":3,"file":"CnReportsPage.vue3.js","sources":["../../../../src/components/CnReportsPage/CnReportsPage.vue?vue&type=template&id=7629715a&lang.js"],"sourcesContent":["<!--\n CnReportsPage — Manifest-driven Reports surface.\n\n v2 manifest page primitive for `type: \"reports\"`. One page holding every\n report an app offers, as cards, instead of a Reports SUBMENU with one entry\n per report.\n\n WHY THIS IS A PAGE AND NOT A MENU BRANCH. A submenu grows one entry per\n report and never shrinks. shillinq reached 96 report types; as menu children\n that is a scroll, not a navigation. Cards carry what a menu item cannot — a\n description, a category, a count — and a category filter turns 96 into a\n short list. shillinq proved the shape in `ReportingComplianceOverview`; this\n is that shape with the app-specific parts taken out, so every app declares it\n rather than copying 600 lines of Vue.\n\n Declare it as:\n\n { \"id\": \"Reports\", \"route\": \"/reports\", \"type\": \"reports\",\n \"config\": {\n \"categories\": { \"operational\": \"Operational\" },\n \"cards\": [\n { \"id\": \"Throughput\", \"label\": \"Processing time\",\n \"description\": \"How long cases take, by type.\",\n \"icon\": \"ChartLine\", \"category\": \"operational\",\n \"route\": \"Doorlooptijd\" }\n ]\n } }\n\n A card names a ROUTE by name, never a path: a path is editable per app and a\n card pointing at a stale one is a dead end that still looks like a report.\n\n Spec: hydra openspec/architecture/adr-112-reports-are-one-page.md (ConductionNL/hydra#640).\n-->\n<template>\n\t<div class=\"cn-reports-page\" :class=\"{ 'cn-reports-page--board': isBoard }\">\n\t\t<div class=\"cn-reports-page__header\">\n\t\t\t<h2 class=\"cn-reports-page__title\">\n\t\t\t\t{{ resolvedTitle }}\n\t\t\t</h2>\n\t\t\t<p v-if=\"resolvedDescription\" class=\"cn-reports-page__description\">\n\t\t\t\t{{ resolvedDescription }}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<!-- The board look (board DcRapportages): one section per category,\n\t\t headed by its label, instead of the category filter; each card\n\t\t draws its icon in a tile. -->\n\t\t<template v-if=\"isBoard\">\n\t\t\t<p v-if=\"resolvedCards.length === 0\"\n\t\t\t\tclass=\"cn-reports-page__empty\"\n\t\t\t\tdata-testid=\"cn-reports-empty\">\n\t\t\t\t{{ resolvedEmptyLabel }}\n\t\t\t</p>\n\t\t\t<section v-for=\"section in boardSections\"\n\t\t\t\t:key=\"section.key\"\n\t\t\t\tclass=\"cn-reports-page__section\"\n\t\t\t\tdata-testid=\"cn-reports-section\">\n\t\t\t\t<h3 v-if=\"section.label\" class=\"cn-reports-page__section-title\">\n\t\t\t\t\t{{ section.label }}\n\t\t\t\t</h3>\n\t\t\t\t<ul class=\"cn-reports-page__grid\" data-testid=\"cn-reports-grid\">\n\t\t\t\t\t<li v-for=\"card in section.cards\" :key=\"card.id\" class=\"cn-reports-page__cell\">\n\t\t\t\t\t\t<a class=\"cn-reports-page__card\"\n\t\t\t\t\t\t\tdata-testid=\"cn-report-card\"\n\t\t\t\t\t\t\t:href=\"hrefFor(card)\"\n\t\t\t\t\t\t\t@click=\"open(card, $event)\">\n\t\t\t\t\t\t\t<span v-if=\"card.icon\" class=\"cn-reports-page__card-icon\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<CnIcon :name=\"card.icon\" :size=\"22\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class=\"cn-reports-page__card-text\">\n\t\t\t\t\t\t\t\t<span class=\"cn-reports-page__card-title\">{{ card.label }}</span>\n\t\t\t\t\t\t\t\t<span v-if=\"card.description\" class=\"cn-reports-page__card-description\">\n\t\t\t\t\t\t\t\t\t{{ card.description }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\t\t</template>\n\n\t\t<div v-if=\"!isBoard && categoryOptions.length > 1\" class=\"cn-reports-page__filter\">\n\t\t\t<label class=\"cn-reports-page__filter-label\" :for=\"filterId\">\n\t\t\t\t{{ resolvedCategoryLabel }}\n\t\t\t</label>\n\t\t\t<select :id=\"filterId\"\n\t\t\t\tv-model=\"activeCategory\"\n\t\t\t\tclass=\"cn-reports-page__filter-select\"\n\t\t\t\tdata-testid=\"cn-reports-category\">\n\t\t\t\t<option v-for=\"option in categoryOptions\"\n\t\t\t\t\t:key=\"option.value\"\n\t\t\t\t\t:value=\"option.value\">\n\t\t\t\t\t{{ option.label }}\n\t\t\t\t</option>\n\t\t\t</select>\n\t\t</div>\n\n\t\t<p v-if=\"!isBoard && visibleCards.length === 0\"\n\t\t\tclass=\"cn-reports-page__empty\"\n\t\t\tdata-testid=\"cn-reports-empty\">\n\t\t\t{{ resolvedEmptyLabel }}\n\t\t</p>\n\n\t\t<ul v-else-if=\"!isBoard\" class=\"cn-reports-page__grid\" data-testid=\"cn-reports-grid\">\n\t\t\t<li v-for=\"card in visibleCards\" :key=\"card.id\" class=\"cn-reports-page__cell\">\n\t\t\t\t<a class=\"cn-reports-page__card\"\n\t\t\t\t\tdata-testid=\"cn-report-card\"\n\t\t\t\t\t:href=\"hrefFor(card)\"\n\t\t\t\t\t@click=\"open(card, $event)\">\n\t\t\t\t\t<span class=\"cn-reports-page__card-title\">{{ card.label }}</span>\n\t\t\t\t\t<span v-if=\"card.description\" class=\"cn-reports-page__card-description\">\n\t\t\t\t\t\t{{ card.description }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span v-if=\"categoryName(card)\" class=\"cn-reports-page__card-category\">\n\t\t\t\t\t\t{{ categoryName(card) }}\n\t\t\t\t\t</span>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n\n\t\t<!-- `widgets` + `layout`: a grid of dashboard widgets under the cards,\n\t\t such as a highlighted report with stat tiles and a chart. -->\n\t\t<div v-if=\"sectionWidgets.length > 0\" class=\"cn-reports-page__widgets\" data-testid=\"cn-reports-widgets\">\n\t\t\t<CnDashboardPage\n\t\t\t\t:widgets=\"sectionWidgets\"\n\t\t\t\t:layout=\"sectionLayout\"\n\t\t\t\t:showHeader=\"false\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\n/**\n * The Reports page: one surface listing an app's reports as cards.\n */\nimport { translate as t } from '@nextcloud/l10n'\nimport { defineAsyncComponent } from 'vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport { useLook } from '../../composables/useLook.js'\nimport { followLinkClick } from '../../utils/linkNavigation.js'\n\nexport default {\n\tname: 'CnReportsPage',\n\n\tcomponents: {\n\t\t// Loaded only for a page that declares widgets: a cards-only reports\n\t\t// page does not pull the dashboard in.\n\t\tCnDashboardPage: defineAsyncComponent(() => import('../CnDashboardPage/CnDashboardPage.vue').then((m) => m.default)),\n\t\tCnIcon,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * The consuming app's translate function, provided by CnAppRoot.\n\t\t * Defaults to identity so the page still renders outside one.\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\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: \"reports\"` page arrived here with the\n\t\t * default `{}` — `config` resolved to `{}`, `cards` to `[]`, and every\n\t\t * reports page in the fleet rendered its empty state while its manifest\n\t\t * declared cards. Kept because a host that renders this component\n\t\t * directly can still hand it the whole page; the flattened props below\n\t\t * are what the renderer actually supplies, and they win.\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 report cards, as CnPageRenderer flattens them out of `config`.\n\t\t *\n\t\t * @type {Array<object>|null}\n\t\t */\n\t\tcards: {\n\t\t\ttype: Array,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Category key/label pairs, flattened out of `config`.\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tcategories: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The lead paragraph, flattened out of `config` or lifted from the page.\n\t\t *\n\t\t * @type {string|null}\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The heading, lifted from the page by the renderer.\n\t\t *\n\t\t * @type {string|null}\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Label for the \"all categories\" filter option.\n\t\t *\n\t\t * @type {string|null}\n\t\t */\n\t\tallCategoriesLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Label for the category filter control.\n\t\t *\n\t\t * @type {string|null}\n\t\t */\n\t\tcategoryLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Text shown when the active filter admits no card.\n\t\t *\n\t\t * @type {string|null}\n\t\t */\n\t\temptyLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Dashboard widgets drawn under the report cards (`config.widgets`),\n\t\t * placed by `layout`, as on a `type: \"dashboard\"` page.\n\t\t *\n\t\t * @type {Array<object>|null}\n\t\t */\n\t\twidgets: {\n\t\t\ttype: Array,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Grid placement of `widgets` (`config.layout`): `{ id, widgetId,\n\t\t * gridX, gridY, gridWidth, gridHeight }` per widget. Without it each\n\t\t * widget takes a full row in the order declared.\n\t\t *\n\t\t * @type {Array<object>|null}\n\t\t */\n\t\tlayout: {\n\t\t\ttype: Array,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The look to draw in: `board` or `nextcloud`. Absent: the look\n\t\t * CnAppRoot provides (`cnLook`), else `nextcloud`.\n\t\t *\n\t\t * @type {string|null}\n\t\t */\n\t\tlook: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Translate function. Falls back to injected `cnTranslate`.\n\t\t *\n\t\t * @type {((key: string) => string)|null}\n\t\t */\n\t\ttranslate: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\tconst { isBoard } = useLook(props)\n\t\treturn { isBoard }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tactiveCategory: 'all',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The translate function actually in force.\n\t\t *\n\t\t * @return {(key: string) => string} The translator.\n\t\t */\n\t\teffectiveTranslate() {\n\t\t\treturn this.translate ?? this.cnTranslate\n\t\t},\n\n\t\t/**\n\t\t * The declared config, always an object, from whichever direction it\n\t\t * arrived.\n\t\t *\n\t\t * TWO CALLERS, TWO SHAPES. CnPageRenderer flattens `page.config.*` into\n\t\t * individual props and passes NO `page`, so under the renderer the keys\n\t\t * arrive as props. A host that mounts this component itself hands it the\n\t\t * whole `page`. Reading only `page.config` is what made every dispatched\n\t\t * reports page render empty.\n\t\t *\n\t\t * Props win where both are present: they are the nearer declaration, and\n\t\t * the renderer has already resolved route sentinels in them.\n\t\t *\n\t\t * @return {object} The config.\n\t\t */\n\t\tconfig() {\n\t\t\tconst fromPage = (this.page && this.page.config) || {}\n\t\t\tconst fromProps = {}\n\t\t\tfor (const key of [\n\t\t\t\t'cards',\n\t\t\t\t'categories',\n\t\t\t\t'description',\n\t\t\t\t'title',\n\t\t\t\t'allCategoriesLabel',\n\t\t\t\t'categoryLabel',\n\t\t\t\t'emptyLabel',\n\t\t\t\t'widgets',\n\t\t\t\t'layout',\n\t\t\t]) {\n\t\t\t\tif (this[key] !== null && this[key] !== undefined) {\n\t\t\t\t\tfromProps[key] = this[key]\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn { ...fromPage, ...fromProps }\n\t\t},\n\n\t\t/**\n\t\t * The widgets under the cards.\n\t\t *\n\t\t * @return {Array<object>} The declared widgets, or none.\n\t\t * @spec openspec/changes/screens-reports-page-widgets/specs/reports-page/spec.md\n\t\t */\n\t\tsectionWidgets() {\n\t\t\tconst widgets = this.config.widgets\n\t\t\treturn Array.isArray(widgets) ? widgets.filter((w) => w && typeof w === 'object' && w.id) : []\n\t\t},\n\n\t\t/**\n\t\t * Where the widgets go: the declared `layout`, else one full row per\n\t\t * widget in the order declared.\n\t\t *\n\t\t * @return {Array<object>} The placements.\n\t\t * @spec openspec/changes/screens-reports-page-widgets/specs/reports-page/spec.md\n\t\t */\n\t\tsectionLayout() {\n\t\t\tif (Array.isArray(this.config.layout) && this.config.layout.length > 0) {\n\t\t\t\treturn this.config.layout\n\t\t\t}\n\t\t\tlet y = 0\n\t\t\treturn this.sectionWidgets.map((widget, index) => {\n\t\t\t\tconst placement = { id: String(index + 1), widgetId: widget.id, gridX: 0, gridY: y, gridWidth: 12, gridHeight: 4 }\n\t\t\t\ty += 4\n\t\t\t\treturn placement\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The heading.\n\t\t *\n\t\t * @return {string} The title.\n\t\t */\n\t\tresolvedTitle() {\n\t\t\tconst declared = this.config.title || (this.page && this.page.title)\n\n\t\t\treturn declared ? this.tr(declared) : t('nextcloud-vue', 'Reports')\n\t\t},\n\n\t\t/**\n\t\t * The optional lead paragraph.\n\t\t *\n\t\t * @return {string} The description.\n\t\t */\n\t\tresolvedDescription() {\n\t\t\treturn this.tr(this.config.description || '')\n\t\t},\n\n\t\t/**\n\t\t * The declared cards, ignoring any that name no route.\n\t\t *\n\t\t * A card with no route is a card that cannot be opened. Rendering it\n\t\t * would put a report on the page that silently does nothing, which is\n\t\t * worse than leaving it off.\n\t\t *\n\t\t * @return {Array<object>} The usable cards.\n\t\t */\n\t\tresolvedCards() {\n\t\t\tconst declared = this.config.cards\n\t\t\tif (!Array.isArray(declared)) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\treturn declared\n\t\t\t\t.filter((card) => card && card.route && card.label)\n\t\t\t\t.map((card) => ({\n\t\t\t\t\t...card,\n\t\t\t\t\tlabel: this.tr(card.label),\n\t\t\t\t\tdescription: this.tr(card.description || ''),\n\t\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Category value/label pairs, offered only for categories that hold a\n\t\t * card. A filter listing empty categories teaches the reader that the\n\t\t * app has reports it does not have.\n\t\t *\n\t\t * @return {Array<object>} The options.\n\t\t */\n\t\tcategoryOptions() {\n\t\t\tconst declared = this.config.categories || {}\n\t\t\tconst used = new Set(this.resolvedCards.map((card) => card.category).filter(Boolean))\n\t\t\tconst options = [{ value: 'all', label: this.allLabel }]\n\n\t\t\tObject.keys(declared)\n\t\t\t\t.filter((key) => used.has(key))\n\t\t\t\t.forEach((key) => options.push({ value: key, label: this.tr(declared[key]) }))\n\n\t\t\treturn options\n\t\t},\n\n\t\t/**\n\t\t * The board look's sections: the cards without a category first, under\n\t\t * no heading, then one section per declared category that holds a\n\t\t * card, in the declared order, headed by its label.\n\t\t *\n\t\t * @spec openspec/changes/screens-reports-page-board-look/specs/reports-page/spec.md#requirement-the-reports-page-takes-the-board-look\n\t\t * @return {Array<{key: string, label: string, cards: Array<object>}>} The sections.\n\t\t */\n\t\tboardSections() {\n\t\t\tconst declared = this.config.categories || {}\n\t\t\tconst sections = []\n\t\t\tconst loose = this.resolvedCards.filter((card) => !card.category || !Object.hasOwn(declared, card.category))\n\t\t\tif (loose.length > 0) {\n\t\t\t\tsections.push({ key: '__none', label: '', cards: loose })\n\t\t\t}\n\t\t\tfor (const key of Object.keys(declared)) {\n\t\t\t\tconst cards = this.resolvedCards.filter((card) => card.category === key)\n\t\t\t\tif (cards.length > 0) {\n\t\t\t\t\tsections.push({ key, label: this.tr(declared[key]), cards })\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn sections\n\t\t},\n\n\t\t/**\n\t\t * The cards the active filter admits.\n\t\t *\n\t\t * @return {Array<object>} The visible cards.\n\t\t */\n\t\tvisibleCards() {\n\t\t\tif (this.activeCategory === 'all') {\n\t\t\t\treturn this.resolvedCards\n\t\t\t}\n\n\t\t\treturn this.resolvedCards.filter((card) => card.category === this.activeCategory)\n\t\t},\n\n\t\t/**\n\t\t * A stable id for the filter control's label association.\n\t\t *\n\t\t * @return {string} The id.\n\t\t */\n\t\tfilterId() {\n\t\t\treturn `cn-reports-category-${(this.page && this.page.id) || 'page'}`\n\t\t},\n\n\t\t/**\n\t\t * @return {string} The \"all categories\" option label.\n\t\t */\n\t\tallLabel() {\n\t\t\treturn this.config.allCategoriesLabel\n\t\t\t\t? this.tr(this.config.allCategoriesLabel)\n\t\t\t\t: t('nextcloud-vue', 'All categories')\n\t\t},\n\n\t\t/**\n\t\t * @return {string} The filter's label.\n\t\t */\n\t\tresolvedCategoryLabel() {\n\t\t\treturn this.config.categoryLabel\n\t\t\t\t? this.tr(this.config.categoryLabel)\n\t\t\t\t: t('nextcloud-vue', 'Category')\n\t\t},\n\n\t\t/**\n\t\t * @return {string} The empty-state text.\n\t\t */\n\t\tresolvedEmptyLabel() {\n\t\t\treturn this.config.emptyLabel\n\t\t\t\t? this.tr(this.config.emptyLabel)\n\t\t\t\t: t('nextcloud-vue', 'No reports in this category.')\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Translate a manifest-declared string through the app's own\n\t\t * translate function.\n\t\t *\n\t\t * The manifest is data the renderer walks, not source the extractor\n\t\t * reads, so every string it carries has to be handed to the app's\n\t\t * translator explicitly. A card rendered straight from the manifest\n\t\t * shows its source language whatever locale the reader is in.\n\t\t *\n\t\t * @param {string} value The declared string.\n\t\t * @return {string} The translated string, or the input unchanged.\n\t\t */\n\t\ttr(value) {\n\t\t\tif (typeof value !== 'string' || value === '') {\n\t\t\t\treturn value\n\t\t\t}\n\n\t\t\treturn this.effectiveTranslate(value)\n\t\t},\n\n\t\t/**\n\t\t * The human label for a card's category, if it has one.\n\t\t *\n\t\t * @param {object} card The card.\n\t\t * @return {string} The label, or an empty string.\n\t\t */\n\t\tcategoryName(card) {\n\t\t\tconst declared = this.config.categories || {}\n\n\t\t\treturn this.tr((card.category && declared[card.category]) || '')\n\t\t},\n\n\t\t/**\n\t\t * A real href for the card, so it is a link a reader can middle-click\n\t\t * or open in a new tab rather than a div that only answers to a click.\n\t\t *\n\t\t * @param {object} card The card.\n\t\t * @return {string} The href.\n\t\t */\n\t\threfFor(card) {\n\t\t\tif (!this.$router) {\n\t\t\t\treturn '#'\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\treturn this.$router.resolve({ name: card.route }).href\n\t\t\t} catch {\n\t\t\t\treturn '#'\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Navigate by route NAME on a plain click; a modified or middle click\n\t\t * is left to the browser so it can open the card's href elsewhere.\n\t\t *\n\t\t * @param {object} card The card.\n\t\t * @param {MouseEvent} event The click.\n\t\t * @return {void}\n\t\t */\n\t\topen(card, event) {\n\t\t\tfollowLinkClick(event, { name: card.route }, this.$router)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-reports-page {\n\tpadding: 16px;\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-reports-page__header {\n\tpadding-inline-start: 56px;\n}\n\n.cn-reports-page__title {\n\tmargin: 0 0 4px;\n}\n\n.cn-reports-page__description {\n\tmargin: 0 0 16px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-reports-page__filter {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tmargin-bottom: 16px;\n}\n\n.cn-reports-page__filter-select {\n\tmin-width: 220px;\n}\n\n.cn-reports-page__grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fill, minmax(240px, 1fr));\n\tgap: 12px;\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-reports-page__card {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\theight: 100%;\n\tpadding: 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-large);\n\tcolor: inherit;\n\ttext-decoration: none;\n}\n\n.cn-reports-page__card:hover,\n.cn-reports-page__card:focus {\n\tbackground-color: var(--color-background-hover);\n}\n\n.cn-reports-page__card-title {\n\tfont-weight: bold;\n}\n\n.cn-reports-page__card-description,\n.cn-reports-page__card-category {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.9em;\n}\n\n.cn-reports-page__empty {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-reports-page__widgets {\n\tmargin-top: 20px;\n}\n</style>\n"],"names":["_createElementBlock","_normalizeClass","_createElementVNode","_toDisplayString","_Fragment","_renderList","_openBlock","_createVNode"],"mappings":";;AAoEO,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,yBAAA,GAAA;AACN,MAAA,UAAA,GAAA,EAAA,KAAM,EAAA,wBAAwB,GAAA;;;AAGP,EAAA,KAAA,EAAA,8BAAA;;;;AAU1B,EAAA,KAAI,EAAE,wBAAwB;AAC9B,EAAA,aAAW,EAAC,kBAAc;;;;AAOP,EAAA,KAAA,EAAA,gCAAA;;;AAGf,EAAA,KAAI,EAAA,uBAAA;AAAA,EAAA,aAAA,EAAA,iBAAA;;;;;AAMkB,EAAA,KAAG,EAAA,4BAAA;AAAA,EAAA,aAAA,EAAA,MAAA;;;AAInB,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,6BAA6B,GAAA;;;AACX,EAAA,KAAK,EAAC,mCAAmC;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AAA,QAAA;;AAEF,YAAA,KAAK,EAAC,gCAAgC;yBAC3B,EAAE,qBAAoB;;8BACjCF,kBAIS,CAAAI,QAAA,EAAA,IAAA,EAAAC,UAAA,CAJgB,QAAe,CAAA,eAAA,EAAA,CAAzB,MAAM,KAAA;mCAArBL,kBAIS,CAAA,QAAA,EAAA;gBAHP,GAAG,EAAE,MAAM,CAAC,KAAA;gBACZ,KAAK,EAAE,MAAM,CAAC,KAAK;AACjB,eAAA,EAAAG,eAAA,CAAA,MAAM,CAAC,KAAK,CAAA,EAAA,CAAA,oBAAA,WAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnReportsPage.vue3.js","sources":["../../../../src/components/CnReportsPage/CnReportsPage.vue?vue&type=template&id=327b60f8&lang.js"],"sourcesContent":["<!--\n CnReportsPage — Manifest-driven Reports surface.\n\n v2 manifest page primitive for `type: \"reports\"`. One page holding every\n report an app offers, as cards, instead of a Reports SUBMENU with one entry\n per report.\n\n WHY THIS IS A PAGE AND NOT A MENU BRANCH. A submenu grows one entry per\n report and never shrinks. shillinq reached 96 report types; as menu children\n that is a scroll, not a navigation. Cards carry what a menu item cannot — a\n description, a category, a count — and a category filter turns 96 into a\n short list. shillinq proved the shape in `ReportingComplianceOverview`; this\n is that shape with the app-specific parts taken out, so every app declares it\n rather than copying 600 lines of Vue.\n\n Declare it as:\n\n { \"id\": \"Reports\", \"route\": \"/reports\", \"type\": \"reports\",\n \"config\": {\n \"categories\": { \"operational\": \"Operational\" },\n \"cards\": [\n { \"id\": \"Throughput\", \"label\": \"Processing time\",\n \"description\": \"How long cases take, by type.\",\n \"icon\": \"ChartLine\", \"category\": \"operational\",\n \"route\": \"Doorlooptijd\" }\n ]\n } }\n\n A card names a ROUTE by name, never a path: a path is editable per app and a\n card pointing at a stale one is a dead end that still looks like a report.\n\n Spec: hydra openspec/architecture/adr-112-reports-are-one-page.md (ConductionNL/hydra#640).\n-->\n<template>\n\t<div class=\"cn-reports-page\" :class=\"{ 'cn-reports-page--board': isBoard }\">\n\t\t<div class=\"cn-reports-page__header\">\n\t\t\t<!-- The header buttons (`headerButtons`) beside the title, as the\n\t\t\t board's \"Downloaden\" and the buildiq square (board DcRapportages).\n\t\t\t Without them, and outside the board look, the title stands alone\n\t\t\t as before. -->\n\t\t\t<div v-if=\"headerButtonsRow.length > 0\" class=\"cn-reports-page__heading-row\">\n\t\t\t\t<h2 class=\"cn-reports-page__title\">\n\t\t\t\t\t{{ resolvedTitle }}\n\t\t\t\t</h2>\n\t\t\t\t<div class=\"cn-reports-page__header-buttons\" data-testid=\"cn-reports-header-buttons\">\n\t\t\t\t\t<template v-for=\"button in headerButtonsRow\" :key=\"button.key\">\n\t\t\t\t\t\t<CnBuildiqEditButton v-if=\"button.action === '__buildiq'\" />\n\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\tv-else\n\t\t\t\t\t\t\t:variant=\"button.variant\"\n\t\t\t\t\t\t\t:data-testid=\"`cn-reports-header-button-${button.key}`\"\n\t\t\t\t\t\t\t@click=\"onHeaderButton(button)\">\n\t\t\t\t\t\t\t<template v-if=\"button.icon\" #icon>\n\t\t\t\t\t\t\t\t<CnIcon :name=\"button.icon\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ button.label }}\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</template>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<h2 v-else class=\"cn-reports-page__title\">\n\t\t\t\t{{ resolvedTitle }}\n\t\t\t</h2>\n\t\t\t<p v-if=\"resolvedDescription\" class=\"cn-reports-page__description\">\n\t\t\t\t{{ resolvedDescription }}\n\t\t\t</p>\n\t\t</div>\n\n\t\t<!-- The board look (board DcRapportages): one section per category,\n\t\t headed by its label, instead of the category filter; each card\n\t\t draws its icon in a tile. -->\n\t\t<template v-if=\"isBoard\">\n\t\t\t<p v-if=\"resolvedCards.length === 0\"\n\t\t\t\tclass=\"cn-reports-page__empty\"\n\t\t\t\tdata-testid=\"cn-reports-empty\">\n\t\t\t\t{{ resolvedEmptyLabel }}\n\t\t\t</p>\n\t\t\t<section v-for=\"section in boardSections\"\n\t\t\t\t:key=\"section.key\"\n\t\t\t\tclass=\"cn-reports-page__section\"\n\t\t\t\tdata-testid=\"cn-reports-section\">\n\t\t\t\t<h3 v-if=\"section.label\" class=\"cn-reports-page__section-title\">\n\t\t\t\t\t{{ section.label }}\n\t\t\t\t</h3>\n\t\t\t\t<ul class=\"cn-reports-page__grid\" data-testid=\"cn-reports-grid\">\n\t\t\t\t\t<li v-for=\"card in section.cards\" :key=\"card.id\" class=\"cn-reports-page__cell\">\n\t\t\t\t\t\t<a class=\"cn-reports-page__card\"\n\t\t\t\t\t\t\tdata-testid=\"cn-report-card\"\n\t\t\t\t\t\t\t:href=\"hrefFor(card)\"\n\t\t\t\t\t\t\t@click=\"open(card, $event)\">\n\t\t\t\t\t\t\t<span v-if=\"card.icon\" class=\"cn-reports-page__card-icon\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t<CnIcon :name=\"card.icon\" :size=\"22\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class=\"cn-reports-page__card-text\">\n\t\t\t\t\t\t\t\t<span class=\"cn-reports-page__card-title\">{{ card.label }}</span>\n\t\t\t\t\t\t\t\t<span v-if=\"card.description\" class=\"cn-reports-page__card-description\">\n\t\t\t\t\t\t\t\t\t{{ card.description }}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\t\t</template>\n\n\t\t<div v-if=\"!isBoard && categoryOptions.length > 1\" class=\"cn-reports-page__filter\">\n\t\t\t<label class=\"cn-reports-page__filter-label\" :for=\"filterId\">\n\t\t\t\t{{ resolvedCategoryLabel }}\n\t\t\t</label>\n\t\t\t<select :id=\"filterId\"\n\t\t\t\tv-model=\"activeCategory\"\n\t\t\t\tclass=\"cn-reports-page__filter-select\"\n\t\t\t\tdata-testid=\"cn-reports-category\">\n\t\t\t\t<option v-for=\"option in categoryOptions\"\n\t\t\t\t\t:key=\"option.value\"\n\t\t\t\t\t:value=\"option.value\">\n\t\t\t\t\t{{ option.label }}\n\t\t\t\t</option>\n\t\t\t</select>\n\t\t</div>\n\n\t\t<p v-if=\"!isBoard && visibleCards.length === 0\"\n\t\t\tclass=\"cn-reports-page__empty\"\n\t\t\tdata-testid=\"cn-reports-empty\">\n\t\t\t{{ resolvedEmptyLabel }}\n\t\t</p>\n\n\t\t<ul v-else-if=\"!isBoard\" class=\"cn-reports-page__grid\" data-testid=\"cn-reports-grid\">\n\t\t\t<li v-for=\"card in visibleCards\" :key=\"card.id\" class=\"cn-reports-page__cell\">\n\t\t\t\t<a class=\"cn-reports-page__card\"\n\t\t\t\t\tdata-testid=\"cn-report-card\"\n\t\t\t\t\t:href=\"hrefFor(card)\"\n\t\t\t\t\t@click=\"open(card, $event)\">\n\t\t\t\t\t<span class=\"cn-reports-page__card-title\">{{ card.label }}</span>\n\t\t\t\t\t<span v-if=\"card.description\" class=\"cn-reports-page__card-description\">\n\t\t\t\t\t\t{{ card.description }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<span v-if=\"categoryName(card)\" class=\"cn-reports-page__card-category\">\n\t\t\t\t\t\t{{ categoryName(card) }}\n\t\t\t\t\t</span>\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t</ul>\n\n\t\t<!-- `widgets` + `layout`: a grid of dashboard widgets under the cards,\n\t\t such as a highlighted report with stat tiles and a chart. -->\n\t\t<div v-if=\"sectionWidgets.length > 0\" class=\"cn-reports-page__widgets\" data-testid=\"cn-reports-widgets\">\n\t\t\t<CnDashboardPage\n\t\t\t\t:widgets=\"sectionWidgets\"\n\t\t\t\t:layout=\"sectionLayout\"\n\t\t\t\t:showHeader=\"false\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\n/**\n * The Reports page: one surface listing an app's reports as cards.\n */\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton } from '@nextcloud/vue'\nimport { defineAsyncComponent } from 'vue'\nimport CnBuildiqEditButton from '../CnBuildiqEditButton/CnBuildiqEditButton.vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport { useLook } from '../../composables/useLook.js'\nimport { resolveRegisteredHandler } from '../../utils/actionsDispatcher.js'\nimport { followLinkClick } from '../../utils/linkNavigation.js'\n\nexport default {\n\tname: 'CnReportsPage',\n\n\tcomponents: {\n\t\t// Loaded only for a page that declares widgets: a cards-only reports\n\t\t// page does not pull the dashboard in.\n\t\tCnDashboardPage: defineAsyncComponent(() => import('../CnDashboardPage/CnDashboardPage.vue').then((m) => m.default)),\n\t\tCnBuildiqEditButton,\n\t\tCnIcon,\n\t\tNcButton,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * The v2 registry and the legacy customComponents map, provided by\n\t\t * CnAppRoot: a header action's named handler resolves against them.\n\t\t */\n\t\tcnRegistry: { default: () => ({}) },\n\t\tcnCustomComponents: { default: () => ({}) },\n\t\t/**\n\t\t * The consuming app's translate function, provided by CnAppRoot.\n\t\t * Defaults to identity so the page still renders outside one.\n\t\t */\n\t\tcnTranslate: { default: () => (key) => key },\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: \"reports\"` page arrived here with the\n\t\t * default `{}` — `config` resolved to `{}`, `cards` to `[]`, and every\n\t\t * reports page in the fleet rendered its empty state while its manifest\n\t\t * declared cards. Kept because a host that renders this component\n\t\t * directly can still hand it the whole page; the flattened props below\n\t\t * are what the renderer actually supplies, and they win.\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 report cards, as CnPageRenderer flattens them out of `config`.\n\t\t *\n\t\t * @type {Array<object>|null}\n\t\t */\n\t\tcards: {\n\t\t\ttype: Array,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Category key/label pairs, flattened out of `config`.\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tcategories: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The lead paragraph, flattened out of `config` or lifted from the page.\n\t\t *\n\t\t * @type {string|null}\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The heading, lifted from the page by the renderer.\n\t\t *\n\t\t * @type {string|null}\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Label for the \"all categories\" filter option.\n\t\t *\n\t\t * @type {string|null}\n\t\t */\n\t\tallCategoriesLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Label for the category filter control.\n\t\t *\n\t\t * @type {string|null}\n\t\t */\n\t\tcategoryLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Text shown when the active filter admits no card.\n\t\t *\n\t\t * @type {string|null}\n\t\t */\n\t\temptyLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Dashboard widgets drawn under the report cards (`config.widgets`),\n\t\t * placed by `layout`, as on a `type: \"dashboard\"` page.\n\t\t *\n\t\t * @type {Array<object>|null}\n\t\t */\n\t\twidgets: {\n\t\t\ttype: Array,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Grid placement of `widgets` (`config.layout`): `{ id, widgetId,\n\t\t * gridX, gridY, gridWidth, gridHeight }` per widget. Without it each\n\t\t * widget takes a full row in the order declared.\n\t\t *\n\t\t * @type {Array<object>|null}\n\t\t */\n\t\tlayout: {\n\t\t\ttype: Array,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Buttons beside the title (`config.headerButtons`), as the board's\n\t\t * \"Downloaden\". Each is `{ label, action, variant?, icon?, id? }`:\n\t\t * `action` is the id of a `headerActions` entry, which says what the\n\t\t * click does. Under the board look the buildiq square sits between the\n\t\t * secondary buttons and the primary one. Empty (the default) changes\n\t\t * nothing.\n\t\t *\n\t\t * @spec openspec/changes/screens-reports-header-buttons/specs/reports-page/spec.md#requirement-a-reports-page-carries-header-buttons\n\t\t * @type {Array<{label: string, action: string, variant?: ('primary'|'secondary'), icon?: string, id?: string}>|null}\n\t\t */\n\t\theaderButtons: {\n\t\t\ttype: Array,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The page's header actions (`config.headerActions`), in the shape of\n\t\t * an index page's: a header button names one by id. `handler` is a\n\t\t * function, `navigate` (with `route`, and `params`), `emit`, `none`,\n\t\t * or a registry name; `type: \"navigate\"` with a `target` URL opens\n\t\t * that URL in a new tab. Every click also emits `header-action`\n\t\t * `{ action, id }`, except for `handler: \"none\"`.\n\t\t *\n\t\t * @spec openspec/changes/screens-reports-header-buttons/specs/reports-page/spec.md#requirement-a-reports-page-carries-header-buttons\n\t\t * @type {Array<object>|null}\n\t\t */\n\t\theaderActions: {\n\t\t\ttype: Array,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The look to draw in: `board` or `nextcloud`. Absent: the look\n\t\t * CnAppRoot provides (`cnLook`), else `nextcloud`.\n\t\t *\n\t\t * @type {string|null}\n\t\t */\n\t\tlook: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Translate function. Falls back to injected `cnTranslate`.\n\t\t *\n\t\t * @type {((key: string) => string)|null}\n\t\t */\n\t\ttranslate: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['header-action'],\n\n\tsetup(props) {\n\t\tconst { isBoard } = useLook(props)\n\t\treturn { isBoard }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tactiveCategory: 'all',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The translate function actually in force.\n\t\t *\n\t\t * @return {(key: string) => string} The translator.\n\t\t */\n\t\teffectiveTranslate() {\n\t\t\treturn this.translate ?? this.cnTranslate\n\t\t},\n\n\t\t/**\n\t\t * The declared config, always an object, from whichever direction it\n\t\t * arrived.\n\t\t *\n\t\t * TWO CALLERS, TWO SHAPES. CnPageRenderer flattens `page.config.*` into\n\t\t * individual props and passes NO `page`, so under the renderer the keys\n\t\t * arrive as props. A host that mounts this component itself hands it the\n\t\t * whole `page`. Reading only `page.config` is what made every dispatched\n\t\t * reports page render empty.\n\t\t *\n\t\t * Props win where both are present: they are the nearer declaration, and\n\t\t * the renderer has already resolved route sentinels in them.\n\t\t *\n\t\t * @return {object} The config.\n\t\t */\n\t\tconfig() {\n\t\t\tconst fromPage = (this.page && this.page.config) || {}\n\t\t\tconst fromProps = {}\n\t\t\tfor (const key of [\n\t\t\t\t'cards',\n\t\t\t\t'categories',\n\t\t\t\t'description',\n\t\t\t\t'title',\n\t\t\t\t'allCategoriesLabel',\n\t\t\t\t'categoryLabel',\n\t\t\t\t'emptyLabel',\n\t\t\t\t'widgets',\n\t\t\t\t'layout',\n\t\t\t\t'headerButtons',\n\t\t\t\t'headerActions',\n\t\t\t]) {\n\t\t\t\tif (this[key] !== null && this[key] !== undefined) {\n\t\t\t\t\tfromProps[key] = this[key]\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn { ...fromPage, ...fromProps }\n\t\t},\n\n\t\t/**\n\t\t * The widgets under the cards.\n\t\t *\n\t\t * @return {Array<object>} The declared widgets, or none.\n\t\t * @spec openspec/changes/screens-reports-page-widgets/specs/reports-page/spec.md\n\t\t */\n\t\tsectionWidgets() {\n\t\t\tconst widgets = this.config.widgets\n\t\t\treturn Array.isArray(widgets) ? widgets.filter((w) => w && typeof w === 'object' && w.id) : []\n\t\t},\n\n\t\t/**\n\t\t * Where the widgets go: the declared `layout`, else one full row per\n\t\t * widget in the order declared.\n\t\t *\n\t\t * @return {Array<object>} The placements.\n\t\t * @spec openspec/changes/screens-reports-page-widgets/specs/reports-page/spec.md\n\t\t */\n\t\tsectionLayout() {\n\t\t\tif (Array.isArray(this.config.layout) && this.config.layout.length > 0) {\n\t\t\t\treturn this.config.layout\n\t\t\t}\n\t\t\tlet y = 0\n\t\t\treturn this.sectionWidgets.map((widget, index) => {\n\t\t\t\tconst placement = { id: String(index + 1), widgetId: widget.id, gridX: 0, gridY: y, gridWidth: 12, gridHeight: 4 }\n\t\t\t\ty += 4\n\t\t\t\treturn placement\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The declared header buttons that have a label and an action,\n\t\t * translated, each with a stable key and a variant.\n\t\t *\n\t\t * @spec openspec/changes/screens-reports-header-buttons/specs/reports-page/spec.md#requirement-a-reports-page-carries-header-buttons\n\t\t * @return {Array<{key: string, label: string, action: string, variant: string, icon: string}>} The buttons.\n\t\t */\n\t\tresolvedHeaderButtons() {\n\t\t\tconst declared = Array.isArray(this.config.headerButtons) ? this.config.headerButtons : []\n\t\t\treturn declared\n\t\t\t\t.filter((button) => button && typeof button === 'object'\n\t\t\t\t\t&& typeof button.action === 'string' && button.action !== ''\n\t\t\t\t\t&& typeof button.label === 'string' && button.label !== '')\n\t\t\t\t.map((button) => ({\n\t\t\t\t\tkey: String(button.id || button.action),\n\t\t\t\t\tlabel: this.tr(button.label),\n\t\t\t\t\taction: button.action,\n\t\t\t\t\tvariant: button.variant === 'primary' ? 'primary' : 'secondary',\n\t\t\t\t\ticon: typeof button.icon === 'string' ? button.icon : '',\n\t\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * The header row in the order it renders. Without the board look:\n\t\t * the declared buttons in the declared order. Under the board look:\n\t\t * the secondary buttons, the buildiq square, then the primary ones,\n\t\t * as the board draws \"Downloaden\" and the square. No declared button\n\t\t * leaves the header as it was, without the square.\n\t\t *\n\t\t * @spec openspec/changes/screens-reports-header-buttons/specs/reports-page/spec.md#requirement-a-reports-page-carries-header-buttons\n\t\t * @return {Array<object>} The buttons; the square is `{ key: '__buildiq', action: '__buildiq' }`.\n\t\t */\n\t\theaderButtonsRow() {\n\t\t\tconst buttons = this.resolvedHeaderButtons\n\t\t\tif (buttons.length === 0 || !this.isBoard) {\n\t\t\t\treturn buttons\n\t\t\t}\n\t\t\tconst square = { key: '__buildiq', action: '__buildiq', variant: 'secondary', label: '', icon: '' }\n\t\t\treturn [\n\t\t\t\t...buttons.filter((button) => button.variant !== 'primary'),\n\t\t\t\tsquare,\n\t\t\t\t...buttons.filter((button) => button.variant === 'primary'),\n\t\t\t]\n\t\t},\n\n\t\t/**\n\t\t * The heading.\n\t\t *\n\t\t * @return {string} The title.\n\t\t */\n\t\tresolvedTitle() {\n\t\t\tconst declared = this.config.title || (this.page && this.page.title)\n\n\t\t\treturn declared ? this.tr(declared) : t('nextcloud-vue', 'Reports')\n\t\t},\n\n\t\t/**\n\t\t * The optional lead paragraph.\n\t\t *\n\t\t * @return {string} The description.\n\t\t */\n\t\tresolvedDescription() {\n\t\t\treturn this.tr(this.config.description || '')\n\t\t},\n\n\t\t/**\n\t\t * The declared cards, ignoring any that name no route.\n\t\t *\n\t\t * A card with no route is a card that cannot be opened. Rendering it\n\t\t * would put a report on the page that silently does nothing, which is\n\t\t * worse than leaving it off.\n\t\t *\n\t\t * @return {Array<object>} The usable cards.\n\t\t */\n\t\tresolvedCards() {\n\t\t\tconst declared = this.config.cards\n\t\t\tif (!Array.isArray(declared)) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\treturn declared\n\t\t\t\t.filter((card) => card && card.route && card.label)\n\t\t\t\t.map((card) => ({\n\t\t\t\t\t...card,\n\t\t\t\t\tlabel: this.tr(card.label),\n\t\t\t\t\tdescription: this.tr(card.description || ''),\n\t\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Category value/label pairs, offered only for categories that hold a\n\t\t * card. A filter listing empty categories teaches the reader that the\n\t\t * app has reports it does not have.\n\t\t *\n\t\t * @return {Array<object>} The options.\n\t\t */\n\t\tcategoryOptions() {\n\t\t\tconst declared = this.config.categories || {}\n\t\t\tconst used = new Set(this.resolvedCards.map((card) => card.category).filter(Boolean))\n\t\t\tconst options = [{ value: 'all', label: this.allLabel }]\n\n\t\t\tObject.keys(declared)\n\t\t\t\t.filter((key) => used.has(key))\n\t\t\t\t.forEach((key) => options.push({ value: key, label: this.tr(declared[key]) }))\n\n\t\t\treturn options\n\t\t},\n\n\t\t/**\n\t\t * The board look's sections: the cards without a category first, under\n\t\t * no heading, then one section per declared category that holds a\n\t\t * card, in the declared order, headed by its label.\n\t\t *\n\t\t * @spec openspec/changes/screens-reports-page-board-look/specs/reports-page/spec.md#requirement-the-reports-page-takes-the-board-look\n\t\t * @return {Array<{key: string, label: string, cards: Array<object>}>} The sections.\n\t\t */\n\t\tboardSections() {\n\t\t\tconst declared = this.config.categories || {}\n\t\t\tconst sections = []\n\t\t\tconst loose = this.resolvedCards.filter((card) => !card.category || !Object.hasOwn(declared, card.category))\n\t\t\tif (loose.length > 0) {\n\t\t\t\tsections.push({ key: '__none', label: '', cards: loose })\n\t\t\t}\n\t\t\tfor (const key of Object.keys(declared)) {\n\t\t\t\tconst cards = this.resolvedCards.filter((card) => card.category === key)\n\t\t\t\tif (cards.length > 0) {\n\t\t\t\t\tsections.push({ key, label: this.tr(declared[key]), cards })\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn sections\n\t\t},\n\n\t\t/**\n\t\t * The cards the active filter admits.\n\t\t *\n\t\t * @return {Array<object>} The visible cards.\n\t\t */\n\t\tvisibleCards() {\n\t\t\tif (this.activeCategory === 'all') {\n\t\t\t\treturn this.resolvedCards\n\t\t\t}\n\n\t\t\treturn this.resolvedCards.filter((card) => card.category === this.activeCategory)\n\t\t},\n\n\t\t/**\n\t\t * A stable id for the filter control's label association.\n\t\t *\n\t\t * @return {string} The id.\n\t\t */\n\t\tfilterId() {\n\t\t\treturn `cn-reports-category-${(this.page && this.page.id) || 'page'}`\n\t\t},\n\n\t\t/**\n\t\t * @return {string} The \"all categories\" option label.\n\t\t */\n\t\tallLabel() {\n\t\t\treturn this.config.allCategoriesLabel\n\t\t\t\t? this.tr(this.config.allCategoriesLabel)\n\t\t\t\t: t('nextcloud-vue', 'All categories')\n\t\t},\n\n\t\t/**\n\t\t * @return {string} The filter's label.\n\t\t */\n\t\tresolvedCategoryLabel() {\n\t\t\treturn this.config.categoryLabel\n\t\t\t\t? this.tr(this.config.categoryLabel)\n\t\t\t\t: t('nextcloud-vue', 'Category')\n\t\t},\n\n\t\t/**\n\t\t * @return {string} The empty-state text.\n\t\t */\n\t\tresolvedEmptyLabel() {\n\t\t\treturn this.config.emptyLabel\n\t\t\t\t? this.tr(this.config.emptyLabel)\n\t\t\t\t: t('nextcloud-vue', 'No reports in this category.')\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Translate a manifest-declared string through the app's own\n\t\t * translate function.\n\t\t *\n\t\t * The manifest is data the renderer walks, not source the extractor\n\t\t * reads, so every string it carries has to be handed to the app's\n\t\t * translator explicitly. A card rendered straight from the manifest\n\t\t * shows its source language whatever locale the reader is in.\n\t\t *\n\t\t * @param {string} value The declared string.\n\t\t * @return {string} The translated string, or the input unchanged.\n\t\t */\n\t\ttr(value) {\n\t\t\tif (typeof value !== 'string' || value === '') {\n\t\t\t\treturn value\n\t\t\t}\n\n\t\t\treturn this.effectiveTranslate(value)\n\t\t},\n\n\t\t/**\n\t\t * The human label for a card's category, if it has one.\n\t\t *\n\t\t * @param {object} card The card.\n\t\t * @return {string} The label, or an empty string.\n\t\t */\n\t\tcategoryName(card) {\n\t\t\tconst declared = this.config.categories || {}\n\n\t\t\treturn this.tr((card.category && declared[card.category]) || '')\n\t\t},\n\n\t\t/**\n\t\t * A real href for the card, so it is a link a reader can middle-click\n\t\t * or open in a new tab rather than a div that only answers to a click.\n\t\t *\n\t\t * @param {object} card The card.\n\t\t * @return {string} The href.\n\t\t */\n\t\threfFor(card) {\n\t\t\tif (!this.$router) {\n\t\t\t\treturn '#'\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\treturn this.$router.resolve({ name: card.route }).href\n\t\t\t} catch {\n\t\t\t\treturn '#'\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * A header button was clicked: run the `headerActions` entry it names\n\t\t * and emit `header-action`, as an index page's header button does.\n\t\t *\n\t\t * @spec openspec/changes/screens-reports-header-buttons/specs/reports-page/spec.md#requirement-a-reports-page-carries-header-buttons\n\t\t * @param {{action: string}} button The resolved button.\n\t\t * @return {void}\n\t\t */\n\t\tonHeaderButton(button) {\n\t\t\tconst id = button.action\n\t\t\tconst actions = Array.isArray(this.config.headerActions) ? this.config.headerActions : []\n\t\t\tconst entry = actions.find((action) => action && action.id === id) || null\n\t\t\tconst handler = entry ? entry.handler : undefined\n\t\t\tif (handler === 'none') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (typeof handler === 'function') {\n\t\t\t\thandler({ actionId: id })\n\t\t\t} else if (handler === 'navigate' && entry.route) {\n\t\t\t\tconst params = (entry.params && typeof entry.params === 'object') ? entry.params : null\n\t\t\t\tif (this.$router && typeof this.$router.push === 'function') {\n\t\t\t\t\tthis.$router.push(params ? { name: entry.route, params } : { name: entry.route })\n\t\t\t\t}\n\t\t\t} else if (entry && entry.type === 'navigate' && typeof entry.target === 'string' && entry.target !== '') {\n\t\t\t\twindow.open(entry.target, '_blank', 'noopener,noreferrer')\n\t\t\t} else if (typeof handler === 'string' && handler !== 'emit') {\n\t\t\t\tconst resolved = resolveRegisteredHandler(handler, this.cnRegistry, this.cnCustomComponents)\n\t\t\t\tif (typeof resolved === 'function') {\n\t\t\t\t\tresolved({ actionId: id })\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t * A header button was clicked (`headerButtons`), after its\n\t\t\t * `headerActions` entry ran; not for `handler: \"none\"`.\n\t\t\t *\n\t\t\t * @event header-action\n\t\t\t * @property {{action: string, id: string}} payload The id of the `headerActions` entry the button names, as `action` and `id`.\n\t\t\t */\n\t\t\tthis.$emit('header-action', { action: id, id })\n\t\t},\n\n\t\t/**\n\t\t * Navigate by route NAME on a plain click; a modified or middle click\n\t\t * is left to the browser so it can open the card's href elsewhere.\n\t\t *\n\t\t * @param {object} card The card.\n\t\t * @param {MouseEvent} event The click.\n\t\t * @return {void}\n\t\t */\n\t\topen(card, event) {\n\t\t\tfollowLinkClick(event, { name: card.route }, this.$router)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-reports-page {\n\tpadding: 16px;\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-reports-page__header {\n\tpadding-inline-start: 56px;\n}\n\n.cn-reports-page__title {\n\tmargin: 0 0 4px;\n}\n\n.cn-reports-page__heading-row {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: flex-start;\n\tjustify-content: space-between;\n\tgap: 12px 24px;\n}\n\n.cn-reports-page__heading-row .cn-reports-page__title {\n\tflex: 1 1 320px;\n\tmin-width: 0;\n}\n\n.cn-reports-page__header-buttons {\n\tdisplay: flex;\n\tflex: none;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 10px;\n}\n\n.cn-reports-page__description {\n\tmargin: 0 0 16px;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-reports-page__filter {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tmargin-bottom: 16px;\n}\n\n.cn-reports-page__filter-select {\n\tmin-width: 220px;\n}\n\n.cn-reports-page__grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fill, minmax(240px, 1fr));\n\tgap: 12px;\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-reports-page__card {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\theight: 100%;\n\tpadding: 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-large);\n\tcolor: inherit;\n\ttext-decoration: none;\n}\n\n.cn-reports-page__card:hover,\n.cn-reports-page__card:focus {\n\tbackground-color: var(--color-background-hover);\n}\n\n.cn-reports-page__card-title {\n\tfont-weight: bold;\n}\n\n.cn-reports-page__card-description,\n.cn-reports-page__card-category {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.9em;\n}\n\n.cn-reports-page__empty {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-reports-page__widgets {\n\tmargin-top: 20px;\n}\n</style>\n"],"names":["_createElementVNode","_toDisplayString","_createElementBlock","_Fragment","_renderList","_createBlock","_createVNode","_openBlock"],"mappings":";;AAoEO,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,yBAAyB,GAAA;;;AAKL,EAAA,KAAA,EAAA,8BAAA;;AACzB,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAoB,GAAA;;AAGzB,EAAA,KAAK,EAAC,iCAA4B;AAAA,EAAA,aAAA,EAAA,2BAAA;;;;AAgB7B,EAAA,KAAK,EAAC,wBAAwB;;;;AAGd,EAAA,KAAA,EAAA,8BAAA;;;;AAU1B,EAAA,KAAI,EAAE,wBAAwB;AAC9B,EAAA,aAAW,EAAC,kBAAc;;;;AAOP,EAAA,KAAA,EAAA,gCAAA;;;AAGf,EAAA,KAAI,EAAA,uBAAA;AAAA,EAAA,aAAA,EAAA,iBAAA;;;;;AAMkB,EAAA,KAAG,EAAA,4BAAA;AAAA,EAAA,aAAA,EAAA,MAAA;;;AAInB,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,6BAA6B,GAAA;;;AACX,EAAA,KAAK,EAAC,mCAAmC;;;;AAUlD,EAAA,KAAA,EAAA,yBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import script from './CnSettingsPage.vue2.js';
2
2
  import { render } from './CnSettingsPage.vue3.js';
3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-1c7a70aa";
5
+ script.__scopeId = "data-v-04e49f77";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -4,6 +4,7 @@ import { NcButton, NcCheckboxRadioSwitch, NcLoadingIcon, NcSelect, NcTextField }
4
4
  import ContentSave from 'vue-material-design-icons/ContentSave.vue';
5
5
  import __sfc_main from '../CnBuildiqEditButton/CnBuildiqEditButton.vue.js';
6
6
  import __sfc_main$5 from '../CnRegisterMapping/CnRegisterMapping.vue.js';
7
+ import __sfc_main$6 from '../CnToggleTableWidget/CnToggleTableWidget.vue.js';
7
8
  import __sfc_main$4 from '../CnVersionInfoCard/CnVersionInfoCard.vue.js';
8
9
  import { useLook } from '../../composables/useLook.js';
9
10
  import { prefixUrl } from '../../utils/headers.js';
@@ -41,6 +42,8 @@ const COMPONENT_DISCRIMINATOR = Symbol('cn-settings-component-widget');
41
42
  const BUILTIN_SETTINGS_WIDGETS = Object.freeze({
42
43
  'version-info': __sfc_main$4,
43
44
  'register-mapping': __sfc_main$5,
45
+ // Rows with a switch: objects (`bind.mode: 'each'`) or a config map (`'map'`).
46
+ 'toggle-table': __sfc_main$6,
44
47
  component: COMPONENT_DISCRIMINATOR,
45
48
  });
46
49
 
@@ -68,7 +71,8 @@ const BUILTIN_SETTINGS_WIDGETS = Object.freeze({
68
71
  * - `widgets[]` — ordered list of widgets. Each entry has a `type`
69
72
  * string and optional `props`. Built-in widget types resolve
70
73
  * first (`version-info` → `CnVersionInfoCard`, `register-mapping`
71
- * → `CnRegisterMapping`); unknown types fall back to the
74
+ * → `CnRegisterMapping`, `toggle-table` → `CnToggleTableWidget`);
75
+ * unknown types fall back to the
72
76
  * `customComponents` registry.
73
77
  *
74
78
  * Widget events (e.g. CnRegisterMapping's `@save`, CnVersionInfoCard's
@@ -1 +1 @@
1
- {"version":3,"file":"CnSettingsPage.vue2.js","sources":["../../../../src/components/CnSettingsPage/CnSettingsPage.vue"],"sourcesContent":["<!--\n CnSettingsPage — Admin / config surface.\n\n Renders manifest-driven config sections. The page MAY declare\n EITHER a flat `sections[]` array (back-compat) OR a `tabs[]` array\n (each tab owns its own `sections[]`) — XOR, never both. See\n manifest-settings-orchestration spec.\n\n Each section is a CnSettingsCard wrapping a CnSettingsSection.\n A section MUST declare exactly one of three body kinds:\n\n 1. `fields[]` — flat form fields (back-compat, default)\n 2. `component` — registry-resolved component as the section body\n 3. `widgets[]` — ordered list of widgets (built-in + customComponents)\n\n Built-in widget types (resolved BEFORE the customComponents registry):\n - `version-info` → CnVersionInfoCard\n - `register-mapping` → CnRegisterMapping\n - `component` → discriminator; `widget.componentName`\n resolves against customComponents\n\n Saves via `axios.put(saveEndpoint, formData)` with the consumer's\n settings controller URL. Widget events bubble up through\n `@widget-event` so consumers wire one page-level handler that\n dispatches by `widgetType` + event `name` (the manifest can't carry\n inline JS).\n\n Supports the same `headerComponent` / `actionsComponent` / generic\n `slots` overrides that the other built-in page types do — the\n CnPageRenderer wires them via the `#header`, `#actions`, and named\n `slots[]` slots exposed here.\n-->\n<template>\n\t<div class=\"cn-settings-page\" data-testid=\"cn-settings-page\">\n\t\t<!-- Header — overridable via #header slot. CnPageHeader renders whenever\n\t\t there is a title: `visuallyHidden` keeps the <h1> in the\n\t\t accessibility tree (and out of the visual layout) when showTitle is\n\t\t false, so <main> is never left with no heading at all\n\t\t (WCAG 2.4.6 / 1.3.1). -->\n\t\t<slot\n\t\t\tname=\"header\"\n\t\t\t:title=\"title\"\n\t\t\t:description=\"description\"\n\t\t\t:icon=\"icon\">\n\t\t\t<CnPageHeader\n\t\t\t\tv-if=\"title\"\n\t\t\t\t:title=\"title\"\n\t\t\t\t:description=\"resolvedDescription\"\n\t\t\t\t:icon=\"icon\"\n\t\t\t\t:visuallyHidden=\"!showTitle\">\n\t\t\t\t<!-- Board look: the buildiq square, then the page Save as the\n\t\t\t\t last header button. -->\n\t\t\t\t<template v-if=\"headerButtonsInHeader\" #extra>\n\t\t\t\t\t<div class=\"cn-settings-page__header-buttons\" data-testid=\"cn-settings-page-header-buttons\">\n\t\t\t\t\t\t<CnBuildiqEditButton v-if=\"isBoard\" />\n\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\tv-if=\"pageSave\"\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\t\t\t\tdata-testid=\"cn-settings-page-save\"\n\t\t\t\t\t\t\t@click=\"save\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ saveLabel }}\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</CnPageHeader>\n\t\t</slot>\n\n\t\t<!-- The same buttons when the header itself is hidden or replaced. -->\n\t\t<div\n\t\t\tv-if=\"headerButtonsOutside\"\n\t\t\tclass=\"cn-settings-page__header-buttons\"\n\t\t\tdata-testid=\"cn-settings-page-header-buttons\">\n\t\t\t<CnBuildiqEditButton v-if=\"isBoard\" />\n\t\t\t<NcButton\n\t\t\t\tv-if=\"pageSave\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\tdata-testid=\"cn-settings-page-save\"\n\t\t\t\t@click=\"save\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ saveLabel }}\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<!-- The Changes card of a page that saves in its header. -->\n\t\t<div\n\t\t\tv-if=\"pageSave && changedFields.length > 0\"\n\t\t\tclass=\"cn-settings-page__changes\"\n\t\t\tdata-testid=\"cn-settings-page-changes\">\n\t\t\t<h2 class=\"cn-settings-page__changes-title\">\n\t\t\t\t{{ changesLabel }}\n\t\t\t</h2>\n\t\t\t<ul>\n\t\t\t\t<li v-for=\"field in changedFields\" :key=\"field.key\">\n\t\t\t\t\t{{ field.label }}\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\n\t\t<!-- Actions slot for save / discard / reset overrides -->\n\t\t<div v-if=\"$slots.actions || $slots.actions\" class=\"cn-settings-page__actions\">\n\t\t\t<slot name=\"actions\" />\n\t\t</div>\n\n\t\t<!-- Tab strip — only rendered when `tabs[]` is set\n\t\t\t (manifest-settings-orchestration REQ-MSO-5). Built with\n\t\t\t native <button role=\"tab\"> + ARIA wiring; uses Nextcloud\n\t\t\t CSS variables only (no hex literals). -->\n\t\t<div\n\t\t\tv-if=\"hasTabs\"\n\t\t\tclass=\"cn-settings-page__tabs\"\n\t\t\trole=\"tablist\"\n\t\t\tdata-testid=\"cn-settings-page-tabs\">\n\t\t\t<button\n\t\t\t\tv-for=\"(tab, tabIndex) in tabs\"\n\t\t\t\t:key=\"`tab-${tab.id}`\"\n\t\t\t\trole=\"tab\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-settings-page__tab\"\n\t\t\t\t:class=\"{ 'cn-settings-page__tab--active': activeTabId === tab.id }\"\n\t\t\t\t:aria-selected=\"activeTabId === tab.id ? 'true' : 'false'\"\n\t\t\t\t:aria-controls=\"`cn-settings-tab-panel-${tab.id}`\"\n\t\t\t\t:data-testid=\"`cn-settings-page-tab-${tab.id}`\"\n\t\t\t\t@click=\"onTabClick(tab, tabIndex)\">\n\t\t\t\t{{ resolveLabel(tab.label) }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<!-- Sections — rendered for the active tab when `tabs[]` is\n\t\t\t set, otherwise the flat `sections[]` (back-compat). The wrapper\n\t\t\t draws no box of its own (`display: contents`); the board look\n\t\t\t turns it into the card grid. -->\n\t\t<div class=\"cn-settings-page__sections\">\n\t\t\t<CnSettingsCard\n\t\t\t\tv-for=\"(section, sectionIndex) in activeSections\"\n\t\t\t\t:key=\"`section-${activeTabId || 'flat'}-${sectionIndex}`\"\n\t\t\t\t:title=\"resolveLabel(section.title)\"\n\t\t\t\t:icon=\"section.icon || ''\"\n\t\t\t\t:collapsible=\"section.collapsible || false\">\n\t\t\t\t<!--\n\t\t\t\t\tBody resolution — see `sectionBodyKind(section)` in the\n\t\t\t\t\tscript: returns 'fields' (default + back-compat),\n\t\t\t\t\t'component', or 'widgets'.\n\t\t\t\t-->\n\n\t\t\t\t<!-- Body: bare fields[] (back-compat). Wrapped in a\n\t\t\t\t\t CnSettingsSection mirroring the pre-rich-sections layout. -->\n\t\t\t\t<CnSettingsSection\n\t\t\t\t\tv-if=\"sectionBodyKind(section) === 'fields'\"\n\t\t\t\t\t:name=\"resolveLabel(section.title)\"\n\t\t\t\t\t:description=\"resolveLabel(section.description)\"\n\t\t\t\t\t:docUrl=\"section.docUrl || ''\"\n\t\t\t\t\t:wide=\"Boolean(section.wide)\">\n\t\t\t\t\t<div class=\"cn-settings-page__fields\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tv-for=\"field in section.fields\"\n\t\t\t\t\t\t\t:key=\"field.key\"\n\t\t\t\t\t\t\tclass=\"cn-settings-page__field\">\n\t\t\t\t\t\t\t<!-- Per-field slot — `field-<key>` lets a consumer override the input entirely. -->\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:name=\"`field-${field.key}`\"\n\t\t\t\t\t\t\t\t:field=\"field\"\n\t\t\t\t\t\t\t\t:value=\"formData[field.key]\"\n\t\t\t\t\t\t\t\t:onInput=\"(v) => updateField(field.key, v)\">\n\t\t\t\t\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\t\t\t\t\tv-if=\"field.type === 'boolean'\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"!!formData[field.key]\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event)\">\n\t\t\t\t\t\t\t\t\t{{ resolveLabel(field.label) }}\n\t\t\t\t\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\t\t\tv-else-if=\"field.type === 'number'\"\n\t\t\t\t\t\t\t\t\t:label=\"resolveLabel(field.label)\"\n\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"String(fieldValue(field.key, ''))\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event === '' ? null : Number($event))\" />\n\t\t\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\t\t\tv-else-if=\"field.type === 'password'\"\n\t\t\t\t\t\t\t\t\t:label=\"resolveLabel(field.label)\"\n\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"fieldValue(field.key, '')\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event)\" />\n\t\t\t\t\t\t\t\t<NcSelect\n\t\t\t\t\t\t\t\t\tv-else-if=\"field.type === 'enum' && Array.isArray(field.options)\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"selectedOption(field)\"\n\t\t\t\t\t\t\t\t\t:options=\"field.options\"\n\t\t\t\t\t\t\t\t\t:inputLabel=\"resolveLabel(field.label)\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, optionValue($event))\" />\n\t\t\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\t\t\tv-else\n\t\t\t\t\t\t\t\t\t:label=\"resolveLabel(field.label)\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"fieldValue(field.key, '')\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event)\" />\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t<small\n\t\t\t\t\t\t\t\tv-if=\"field.help\"\n\t\t\t\t\t\t\t\tclass=\"cn-settings-page__field-help\">\n\t\t\t\t\t\t\t\t{{ resolveLabel(field.help) }}\n\t\t\t\t\t\t\t</small>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<template v-if=\"sectionSave\" #footer>\n\t\t\t\t\t\t<div class=\"cn-settings-section__save\" data-testid=\"cn-settings-section-save\">\n\t\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\t\t\t\t\t@click=\"save\">\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t{{ saveLabel }}\n\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</template>\n\t\t\t\t</CnSettingsSection>\n\n\t\t\t\t<!-- Body: a single registry-resolved component. The\n\t\t\t\t\t component is responsible for its own chrome — we do\n\t\t\t\t\t NOT wrap it in CnSettingsSection because the existing\n\t\t\t\t\t widget shape (CnVersionInfoCard, CnRegisterMapping)\n\t\t\t\t\t already wraps itself. Custom components are expected\n\t\t\t\t\t to do the same OR opt in by adding their own section\n\t\t\t\t\t wrapper.\n\n\t\t\t\t\t Wrapped in CnSettingsWidgetMount so the child's $emit\n\t\t\t\t\t is intercepted and re-emitted as @widget-event on this\n\t\t\t\t\t page (manifests can't carry inline JS). -->\n\t\t\t\t<CnSettingsWidgetMount\n\t\t\t\t\tv-else-if=\"sectionBodyKind(section) === 'component' && resolveSectionComponent(section)\"\n\t\t\t\t\t:component=\"resolveSectionComponent(section)\"\n\t\t\t\t\t:componentProps=\"section.props || {}\"\n\t\t\t\t\t:widgetType=\"section.component\"\n\t\t\t\t\t:sectionIndex=\"sectionIndex\"\n\t\t\t\t\t:widgetIndex=\"0\"\n\t\t\t\t\t@widgetEvent=\"onWidgetEvent\" />\n\n\t\t\t\t<!-- Body: ordered list of widgets. Each widget is its own\n\t\t\t\t\t mounted component with v-bind props + bubbled events\n\t\t\t\t\t via CnSettingsWidgetMount. Built-ins (version-info,\n\t\t\t\t\t register-mapping) wrap themselves in CnSettingsSection;\n\t\t\t\t\t custom widgets are expected to do the same. -->\n\t\t\t\t<template v-else-if=\"sectionBodyKind(section) === 'widgets'\">\n\t\t\t\t\t<CnSettingsWidgetMount\n\t\t\t\t\t\tv-for=\"entry in resolvedWidgetEntries(section, sectionIndex)\"\n\t\t\t\t\t\t:key=\"entry.key\"\n\t\t\t\t\t\t:component=\"entry.component\"\n\t\t\t\t\t\t:componentProps=\"entry.props\"\n\t\t\t\t\t\t:widgetType=\"entry.widgetType\"\n\t\t\t\t\t\t:sectionIndex=\"sectionIndex\"\n\t\t\t\t\t\t:widgetIndex=\"entry.widgetIndex\"\n\t\t\t\t\t\t@widgetEvent=\"onWidgetEvent\" />\n\t\t\t\t</template>\n\t\t\t</CnSettingsCard>\n\t\t</div>\n\n\t\t<!-- Save bar -->\n\t\t<div v-if=\"showSaveBar && !saveMode && !autosave\" class=\"cn-settings-page__save-bar\">\n\t\t\t<NcButton\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\t@click=\"save\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ saveLabel }}\n\t\t\t</NcButton>\n\t\t\t<NcButton\n\t\t\t\tv-if=\"dirty\"\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t:disabled=\"saving\"\n\t\t\t\t@click=\"reset\">\n\t\t\t\t{{ resetLabel }}\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<!-- Error -->\n\t\t<div v-if=\"lastError\" class=\"cn-settings-page__error\">\n\t\t\t{{ lastError }}\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { translate as t } from '@nextcloud/l10n'\nimport {\n\tNcButton,\n\tNcCheckboxRadioSwitch,\n\tNcLoadingIcon,\n\tNcSelect,\n\tNcTextField,\n} from '@nextcloud/vue'\nimport ContentSave from 'vue-material-design-icons/ContentSave.vue'\nimport CnBuildiqEditButton from '../CnBuildiqEditButton/CnBuildiqEditButton.vue'\nimport CnRegisterMapping from '../CnRegisterMapping/CnRegisterMapping.vue'\nimport CnVersionInfoCard from '../CnVersionInfoCard/CnVersionInfoCard.vue'\nimport { useLook } from '../../composables/useLook.js'\nimport { prefixUrl } from '../../utils/headers.js'\nimport { CnPageHeader } from '../CnPageHeader/index.js'\nimport { CnSettingsCard } from '../CnSettingsCard/index.js'\nimport { CnSettingsSection } from '../CnSettingsSection/index.js'\nimport CnSettingsWidgetMount from './CnSettingsWidgetMount.js'\n\n/**\n * Sentinel value used in the built-in widget registry to mark the\n * `'component'` discriminator (manifest-settings-orchestration\n * REQ-MSO-6). The discriminator does NOT resolve to a fixed\n * component — instead, the resolver detects this sentinel and looks\n * up `widget.componentName` in the customComponents registry.\n */\nconst COMPONENT_DISCRIMINATOR = Symbol('cn-settings-component-widget')\n\n/**\n * Built-in widget registry. Used by `CnSettingsPage` to resolve\n * `widgets[].type` to a component BEFORE consulting the\n * consumer-provided customComponents registry.\n *\n * The order matters — built-ins win on collision so consumers can't\n * accidentally shadow `version-info` with their own component. If a\n * consumer needs to truly replace one of these, they can render their\n * own component via `section.component` or\n * `{ type: \"component\", componentName: <name> }` instead of `widgets[]`.\n *\n * Spec:\n * - REQ-MSRS-2 (manifest-settings-rich-sections) — fixed-component\n * built-ins (`version-info`, `register-mapping`).\n * - REQ-MSO-6 (manifest-settings-orchestration) — `'component'`\n * discriminator (sentinel value, resolved via componentName).\n */\nconst BUILTIN_SETTINGS_WIDGETS = Object.freeze({\n\t'version-info': CnVersionInfoCard,\n\t'register-mapping': CnRegisterMapping,\n\tcomponent: COMPONENT_DISCRIMINATOR,\n})\n\n/**\n * CnSettingsPage — Manifest-driven settings page.\n *\n * Reads `sections[]` from `pages[].config` and renders one\n * `CnSettingsCard` per section. Each section declares EXACTLY ONE of\n * three body kinds:\n *\n * - `fields[]` — flat form fields (back-compat default).\n * Each field's `type` controls which input renders:\n * - `boolean` → NcCheckboxRadioSwitch\n * - `number` → NcTextField (type=number)\n * - `string` → NcTextField (default)\n * - `password` → NcTextField (type=password)\n * - `enum` → NcSelect (requires `options: string[]`)\n * Per-field `#field-<key>` slots are exposed so consumers can drop\n * in their own widget.\n *\n * - `component` — registry-resolved component as the section body.\n * `section.props` is v-bind'd to it. Useful when a whole section\n * is one bespoke widget the library doesn't know about.\n *\n * - `widgets[]` — ordered list of widgets. Each entry has a `type`\n * string and optional `props`. Built-in widget types resolve\n * first (`version-info` → `CnVersionInfoCard`, `register-mapping`\n * → `CnRegisterMapping`); unknown types fall back to the\n * `customComponents` registry.\n *\n * Widget events (e.g. CnRegisterMapping's `@save`, CnVersionInfoCard's\n * `@update`) bubble up as a single `@widget-event` event on the page,\n * with payload `{ widgetType, widgetIndex, sectionIndex, name, args }`.\n * Consumers wire one handler at the CnAppRoot level and dispatch by\n * `widgetType` / `name` — the manifest can't carry inline JS, so this\n * is the documented event-wiring escape hatch.\n *\n * Saves via `axios.put(saveEndpoint, formData)`. The `saveEndpoint`\n * default is `/index.php/apps/{appId}/api/settings` — consumers should\n * pass a fully-qualified URL via the manifest (or `saveEndpoint` prop)\n * because the library has no knowledge of the consumer's app id at\n * import time.\n *\n * Slots:\n * - `#header` — Replaces the CnPageHeader.\n * - `#actions` — Right-aligned actions area (the renderer fills this\n * via `pages[].actionsComponent`).\n * - `#field-<key>` — Replaces the input for a specific field within\n * a `fields[]` section. Scope: `{ field, value, onInput }`.\n *\n * Events:\n * - `@save` — Emitted on successful save. Payload: the form data.\n * - `@error` — Emitted when save fails. Payload: the error.\n * - `@input` — Emitted on every field change. Payload: `{ key, value }`.\n * - `@widget-event` — Emitted when a widget mounted via `widgets[]`\n * or `component` re-emits one of its own events. Payload:\n * `{ widgetType, widgetIndex, sectionIndex, name, args }`.\n */\nexport default {\n\tname: 'CnSettingsPage',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcLoadingIcon,\n\t\tNcSelect,\n\t\tNcTextField,\n\t\tContentSave,\n\t\tCnBuildiqEditButton,\n\t\tCnSettingsCard,\n\t\tCnSettingsSection,\n\t\tCnPageHeader,\n\t\tCnSettingsWidgetMount,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * Custom-component registry injected from CnAppRoot. Used to\n\t\t * resolve `section.component` and to fall back when a\n\t\t * `widgets[].type` isn't in the built-in widget map. Defaults\n\t\t * to an empty object when the page is mounted standalone.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tcnCustomComponents: { default: () => ({}) },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The look the page is drawn in: `board` or `nextcloud`. Empty follows\n\t\t * the `cnLook` that CnAppRoot (or the page's `config.look`) provides.\n\t\t *\n\t\t * @spec openspec/changes/screens-chrome-parity/specs/app-look/spec.md#requirement-an-app-can-take-the-board-look\n\t\t */\n\t\tlook: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Where the page saves (`config.saveMode`): `section` ends each section\n\t\t * that has fields in its own Save button, `page` draws one Save as the\n\t\t * last header button and a Changes card, and empty keeps the save bar\n\t\t * under the last section. Never both a section and a page save.\n\t\t *\n\t\t * @spec openspec/changes/screens-chrome-parity/specs/settings-board-look/spec.md#requirement-a-settings-page-saves-in-one-declared-place\n\t\t * @type {'section'|'page'|''}\n\t\t */\n\t\tsaveMode: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t\tvalidator: (value) => ['', 'section', 'page'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * The page saves on change (`config.autosave`): no save button at all,\n\t\t * and the description ends with \"Changes are saved automatically.\"\n\t\t *\n\t\t * @spec openspec/changes/screens-chrome-parity/specs/settings-board-look/spec.md#requirement-a-settings-page-saves-in-one-declared-place\n\t\t */\n\t\tautosave: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Page title. */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Settings'),\n\t\t},\n\n\t\t/** Description shown under the title when `showTitle` is set. */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether to render the inline page header VISIBLY. When false the\n\t\t * `<h1>` is still rendered visually-hidden, so the `<main>` landmark\n\t\t * always has an accessible heading (WCAG 2.4.6 / 1.3.1).\n\t\t */\n\t\tshowTitle: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** MDI icon name for the header. */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Section definitions (flat shape — back-compat). Each section\n\t\t * MUST declare EXACTLY ONE of:\n\t\t * - `fields: Array<Field>` (back-compat flat-field body)\n\t\t * - `component: <registry-name>` + optional `props`\n\t\t * - `widgets: Array<{ type, props?, componentName? }>`\n\t\t *\n\t\t * Common keys: `{ title, description?, icon?, collapsible?, docUrl? }`.\n\t\t *\n\t\t * Mutually exclusive with `tabs[]` (XOR — see\n\t\t * manifest-settings-orchestration REQ-MSO-1).\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tsections: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Tab definitions (orchestration shape — manifest-settings-\n\t\t * orchestration REQ-MSO-2). When set, CnSettingsPage renders\n\t\t * a tab strip above the section area; the active tab's\n\t\t * `sections[]` flow into the same renderer used by the flat\n\t\t * shape. Mutually exclusive with `sections[]`.\n\t\t *\n\t\t * Each tab MUST be `{ id: string, label: string,\n\t\t * icon?: string, sections: array<Section> }`.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\ttabs: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Optional ID of the tab to activate on mount. When empty AND\n\t\t * `tabs[]` is non-empty, the first tab is active by default.\n\t\t * Unknown IDs fall back to the first tab.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tinitialTab: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Initial values keyed by `field.key`. Defaults to an empty\n\t\t * object; in practice the consumer passes the current\n\t\t * IAppConfig snapshot loaded from their settings controller.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tinitialValues: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Endpoint that receives the PUT on save. Pass a fully-qualified\n\t\t * URL — the library has no knowledge of the consumer's app id.\n\t\t * When empty, no PUT is issued and `@save` is emitted with the\n\t\t * form data so the consumer can persist it themselves.\n\t\t */\n\t\tsaveEndpoint: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Whether to render the built-in save/reset bar. */\n\t\tshowSaveBar: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Label for the save button. */\n\t\tsaveLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Save'),\n\t\t},\n\n\t\t/** Label for the reset (discard) button. */\n\t\tresetLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Discard changes'),\n\t\t},\n\n\t\t/**\n\t\t * Optional translation function. When provided, applied to\n\t\t * section titles, field labels, and other i18n-key strings\n\t\t * declared in the manifest. Defaults to the identity function.\n\t\t *\n\t\t * @type {((key: string) => string)|null}\n\t\t */\n\t\ttranslate: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Optional explicit custom-component registry. When set, takes\n\t\t * precedence over the injected `cnCustomComponents`. Use this\n\t\t * when mounting CnSettingsPage outside a CnAppRoot tree (or\n\t\t * when test-mounting with a stub registry).\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tcustomComponents: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['save', 'error', 'input', 'widget-event', 'tab-change'],\n\n\tsetup(props) {\n\t\tconst { isBoard } = useLook(props)\n\t\treturn { isBoard }\n\t},\n\n\tdata() {\n\t\t// Resolve the initial active-tab id synchronously so the very\n\t\t// first render has the correct tab active (otherwise tests\n\t\t// that mount + assert without an `await tick` see the empty\n\t\t// default). Mirrors the logic in `resolveInitialTabId` (the\n\t\t// watcher path); keep them aligned.\n\t\tlet activeTabId = ''\n\t\tconst tabs = Array.isArray(this.tabs) ? this.tabs : []\n\t\tif (tabs.length > 0) {\n\t\t\tif (typeof this.initialTab === 'string' && this.initialTab.length > 0\n\t\t\t\t&& tabs.some((t) => t && t.id === this.initialTab)) {\n\t\t\t\tactiveTabId = this.initialTab\n\t\t\t} else if (tabs[0] && typeof tabs[0].id === 'string') {\n\t\t\t\tactiveTabId = tabs[0].id\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tformData: this.cloneInitial(),\n\t\t\toriginalData: this.cloneInitial(),\n\t\t\tsaving: false,\n\t\t\tlastError: null,\n\t\t\tactiveTabId,\n\t\t\tautosaveTimer: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {boolean} The page saves from its header (`saveMode: \"page\"`, not autosave). */\n\t\tpageSave() {\n\t\t\treturn this.saveMode === 'page' && !this.autosave\n\t\t},\n\n\t\t/** @return {boolean} Each section with fields saves on its own (`saveMode: \"section\"`). */\n\t\tsectionSave() {\n\t\t\treturn this.saveMode === 'section' && !this.autosave\n\t\t},\n\n\t\t/**\n\t\t * The description, with the autosave note appended when the page saves\n\t\t * on change.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedDescription() {\n\t\t\tif (!this.autosave) {\n\t\t\t\treturn this.description\n\t\t\t}\n\t\t\tconst note = t('nextcloud-vue', 'Changes are saved automatically.')\n\t\t\treturn this.description ? `${this.description} ${note}` : note\n\t\t},\n\n\t\t/** @return {boolean} The header buttons render inside the visible page header. */\n\t\theaderButtonsInHeader() {\n\t\t\treturn Boolean(this.title && this.showTitle && !this.$slots.header && (this.isBoard || this.pageSave))\n\t\t},\n\n\t\t/** @return {boolean} The header buttons need a row of their own (header hidden or replaced). */\n\t\theaderButtonsOutside() {\n\t\t\treturn Boolean((this.isBoard || this.pageSave) && !this.headerButtonsInHeader)\n\t\t},\n\n\t\t/** @return {string} Title of the Changes card. */\n\t\tchangesLabel() {\n\t\t\treturn t('nextcloud-vue', 'Changes')\n\t\t},\n\n\t\t/**\n\t\t * The fields that differ from their saved value, across every section,\n\t\t * labelled for the Changes card.\n\t\t *\n\t\t * @return {Array<{key: string, label: string}>}\n\t\t */\n\t\tchangedFields() {\n\t\t\tconst labels = {}\n\t\t\tconst sections = [...(this.sections || [])]\n\t\t\tfor (const tab of this.tabs || []) {\n\t\t\t\tif (tab && Array.isArray(tab.sections)) {\n\t\t\t\t\tsections.push(...tab.sections)\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const section of sections) {\n\t\t\t\tfor (const field of (section && section.fields) || []) {\n\t\t\t\t\tlabels[field.key] = this.resolveLabel(field.label) || field.key\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst keys = new Set([...Object.keys(this.formData), ...Object.keys(this.originalData)])\n\t\t\treturn [...keys]\n\t\t\t\t.filter((key) => JSON.stringify(this.formData[key]) !== JSON.stringify(this.originalData[key]))\n\t\t\t\t.map((key) => ({ key, label: labels[key] || key }))\n\t\t},\n\n\t\t/** Whether any field has changed since load. */\n\t\tdirty() {\n\t\t\treturn JSON.stringify(this.formData) !== JSON.stringify(this.originalData)\n\t\t},\n\n\t\t/**\n\t\t * Effective custom-component registry. Explicit prop wins over\n\t\t * the injected value (mirrors CnPageRenderer's resolution\n\t\t * order).\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\teffectiveCustomComponents() {\n\t\t\treturn this.customComponents ?? this.cnCustomComponents ?? {}\n\t\t},\n\n\t\t/**\n\t\t * Whether the page is in tabs orchestration mode. True when\n\t\t * `tabs[]` is non-empty — drives the tab-strip render gate\n\t\t * (manifest-settings-orchestration REQ-MSO-5).\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasTabs() {\n\t\t\treturn Array.isArray(this.tabs) && this.tabs.length > 0\n\t\t},\n\n\t\t/**\n\t\t * The sections to render right now. In flat mode, this is the\n\t\t * `sections` prop directly. In tabs mode, this is the\n\t\t * `sections[]` array of the currently active tab. Centralising\n\t\t * this in one computed keeps the template's `v-for` simple\n\t\t * and decouples it from the body kind dispatcher (which\n\t\t * applies per-section, not per-mode).\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tactiveSections() {\n\t\t\tif (!this.hasTabs) {\n\t\t\t\treturn this.sections || []\n\t\t\t}\n\t\t\tconst active = this.tabs.find((t) => t && t.id === this.activeTabId)\n\t\t\tif (active && Array.isArray(active.sections)) {\n\t\t\t\treturn active.sections\n\t\t\t}\n\t\t\t// Defensive fallback — should not happen because\n\t\t\t// `resolveInitialTabId` always lands on a known tab.\n\t\t\tconst first = this.tabs[0]\n\t\t\treturn first && Array.isArray(first.sections) ? first.sections : []\n\t\t},\n\t},\n\n\twatch: {\n\t\tinitialValues: {\n\t\t\tdeep: true,\n\t\t\thandler() {\n\t\t\t\tthis.formData = this.cloneInitial()\n\t\t\t\tthis.originalData = this.cloneInitial()\n\t\t\t},\n\t\t},\n\n\t\t// When `tabs[]` changes (e.g. consumer swaps manifests at\n\t\t// runtime), re-resolve the active tab so the page doesn't get\n\t\t// stuck on a removed id.\n\t\ttabs: {\n\t\t\thandler() {\n\t\t\t\tthis.activeTabId = this.resolveInitialTabId()\n\t\t\t},\n\t\t},\n\n\t\t// When `initialTab` changes (consumer-controlled tab\n\t\t// activation), follow it.\n\t\tinitialTab(next) {\n\t\t\tif (typeof next === 'string' && next.length > 0) {\n\t\t\t\tconst exists = this.tabs.some((t) => t && t.id === next)\n\t\t\t\tif (exists) {\n\t\t\t\t\tthis.activeTabId = next\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n\n\tbeforeUnmount() {\n\t\tclearTimeout(this.autosaveTimer)\n\t},\n\n\tmethods: {\n\t\t// Coalesce a field value to a fallback when null / undefined.\n\t\t// Used in template bindings instead of `formData[key] ?? ''` because\n\t\t// vue-template-es2015-compiler (the Rollup VuePlugin's parser) does\n\t\t// not accept ES2020 nullish-coalescing inside template expressions.\n\t\tfieldValue(key, fallback) {\n\t\t\tconst v = this.formData[key]\n\t\t\treturn (v === null || v === undefined) ? fallback : v\n\t\t},\n\n\t\t// Resolve the currently-selected option for an enum field.\n\t\t// `field.options` may be an array of strings/numbers OR an array\n\t\t// of `{ label, value }`-shaped objects. NcSelect needs the actual\n\t\t// option entry (not the bare value) to render the selection\n\t\t// correctly, so this resolver looks up the matching object form\n\t\t// when a primitive value is stored. Returns `null` when nothing\n\t\t// is selected so NcSelect renders the empty state instead of\n\t\t// emitting a Vue warning about an undefined `value` prop.\n\t\tselectedOption(field) {\n\t\t\tconst v = this.formData[field.key]\n\t\t\tif (v === null || v === undefined) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (!Array.isArray(field.options)) {\n\t\t\t\treturn v\n\t\t\t}\n\t\t\tfor (const opt of field.options) {\n\t\t\t\tif (opt && typeof opt === 'object') {\n\t\t\t\t\tif (opt.value === v) {\n\t\t\t\t\t\treturn opt\n\t\t\t\t\t}\n\t\t\t\t} else if (opt === v) {\n\t\t\t\t\treturn opt\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn v\n\t\t},\n\n\t\t// Inverse of `selectedOption` — extract the storable value from\n\t\t// whatever NcSelect emits. NcSelect emits the full option entry\n\t\t// when options are objects, the primitive when options are\n\t\t// primitives, or `null` on clear.\n\t\toptionValue(emitted) {\n\t\t\tif (emitted === null || emitted === undefined) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (typeof emitted === 'object' && 'value' in emitted) {\n\t\t\t\treturn emitted.value\n\t\t\t}\n\t\t\treturn emitted\n\t\t},\n\n\t\tcloneInitial() {\n\t\t\tconst merged = { ...(this.initialValues || {}) }\n\t\t\t// Collect every section across both modes (flat\n\t\t\t// `sections[]` AND `tabs[].sections[]`) so default values\n\t\t\t// are applied regardless of orchestration shape.\n\t\t\t// Only flat-field sections contribute defaults; component\n\t\t\t// and widgets sections own their own state.\n\t\t\tconst allSections = []\n\t\t\tfor (const section of this.sections || []) {\n\t\t\t\tallSections.push(section)\n\t\t\t}\n\t\t\tfor (const tab of this.tabs || []) {\n\t\t\t\tif (tab && Array.isArray(tab.sections)) {\n\t\t\t\t\tfor (const section of tab.sections) {\n\t\t\t\t\t\tallSections.push(section)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const section of allSections) {\n\t\t\t\tif (!section || !Array.isArray(section.fields)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tfor (const field of section.fields) {\n\t\t\t\t\tif (field.default !== undefined && merged[field.key] === undefined) {\n\t\t\t\t\t\tmerged[field.key] = field.default\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn merged\n\t\t},\n\n\t\tresolveLabel(value) {\n\t\t\tif (!value) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (this.translate) {\n\t\t\t\treturn this.translate(value)\n\t\t\t}\n\t\t\treturn value\n\t\t},\n\n\t\tupdateField(key, value) {\n\t\t\tthis.formData[key] = value\n\t\t\tthis.$emit('input', { key, value })\n\t\t\tif (this.autosave) {\n\t\t\t\tthis.queueAutosave()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Determine which body kind a section declares. Returns\n\t\t * `'fields'` (default + back-compat), `'component'`, or\n\t\t * `'widgets'`. The validator (`validateManifest`) enforces\n\t\t * exactly-one at parse time; this method is the runtime\n\t\t * equivalent and is permissive when one of the keys is set\n\t\t * (last-defined wins in the rare case of an unvalidated\n\t\t * manifest).\n\t\t *\n\t\t * @param {object} section A section entry from `sections[]`.\n\t\t * @return {'fields' | 'component' | 'widgets'}\n\t\t */\n\t\tsectionBodyKind(section) {\n\t\t\tif (Array.isArray(section.widgets) && section.widgets.length > 0) {\n\t\t\t\treturn 'widgets'\n\t\t\t}\n\t\t\tif (typeof section.component === 'string' && section.component.length > 0) {\n\t\t\t\treturn 'component'\n\t\t\t}\n\t\t\treturn 'fields'\n\t\t},\n\n\t\t/**\n\t\t * Resolve a `section.component` registry name to a Vue\n\t\t * component via `effectiveCustomComponents`. Returns `null`\n\t\t * (and warns) when the registry has no entry.\n\t\t *\n\t\t * @param {object} section A section entry.\n\t\t * @return {object|null} Vue component or null.\n\t\t */\n\t\tresolveSectionComponent(section) {\n\t\t\tconst name = section.component\n\t\t\tif (!name) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst resolved = this.effectiveCustomComponents[name]\n\t\t\tif (!resolved) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn(`[CnSettingsPage] Section component \"${name}\" not found in customComponents registry. Section body will be empty.`)\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn resolved\n\t\t},\n\n\t\t/**\n\t\t * Resolve a single `widgets[]` entry to a concrete Vue\n\t\t * component. Lookup order:\n\t\t *\n\t\t * 1. Built-in widget map (`version-info`, `register-mapping`).\n\t\t * 2. `'component'` discriminator (REQ-MSO-6) — resolves\n\t\t * `widget.componentName` against `effectiveCustomComponents`.\n\t\t * 3. Legacy fallback — looks up `widget.type` against\n\t\t * `effectiveCustomComponents`. Kept for back-compat with\n\t\t * manifest-settings-rich-sections consumers; flagged as\n\t\t * deprecated in JSDoc — manifest authors should migrate to\n\t\t * the explicit `{ type: \"component\", componentName }` shape.\n\t\t *\n\t\t * Returns `null` (and warns) when nothing resolves. Built-ins\n\t\t * win on collision so consumers can't accidentally shadow them.\n\t\t *\n\t\t * @param {object} widget A `widgets[]` entry, e.g. `{ type, props?, componentName? }`.\n\t\t * @return {object|null} Vue component or null.\n\t\t */\n\t\tresolveWidgetComponent(widget) {\n\t\t\tconst type = widget && typeof widget.type === 'string' ? widget.type : ''\n\t\t\tif (!type) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (Object.hasOwn(BUILTIN_SETTINGS_WIDGETS, type)) {\n\t\t\t\tconst builtin = BUILTIN_SETTINGS_WIDGETS[type]\n\t\t\t\tif (builtin === COMPONENT_DISCRIMINATOR) {\n\t\t\t\t\t// REQ-MSO-6: discriminator — look up `componentName`.\n\t\t\t\t\tconst name = widget.componentName\n\t\t\t\t\tif (typeof name !== 'string' || name.length === 0) {\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.warn('[CnSettingsPage] Widget {type:\"component\"} requires a non-empty `componentName`. Widget will be skipped.')\n\t\t\t\t\t\treturn null\n\t\t\t\t\t}\n\t\t\t\t\tconst resolved = this.effectiveCustomComponents[name]\n\t\t\t\t\tif (!resolved) {\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.warn(`[CnSettingsPage] Widget component \"${name}\" not found in customComponents registry. Widget will be skipped.`)\n\t\t\t\t\t\treturn null\n\t\t\t\t\t}\n\t\t\t\t\treturn resolved\n\t\t\t\t}\n\t\t\t\treturn builtin\n\t\t\t}\n\t\t\t// Legacy fallback (manifest-settings-rich-sections REQ-MSRS-2).\n\t\t\t// Deprecated — manifest authors should migrate to\n\t\t\t// `{ type: \"component\", componentName: <X> }`. Kept here so\n\t\t\t// existing consumers continue working unchanged.\n\t\t\tconst resolved = this.effectiveCustomComponents[type]\n\t\t\tif (!resolved) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn(`[CnSettingsPage] Widget type \"${type}\" not found in built-in widgets or customComponents registry. Widget will be skipped.`)\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn resolved\n\t\t},\n\n\t\t/**\n\t\t * Build the list of widget mount entries for a `widgets[]`\n\t\t * section. Filters out entries whose `widget.type` doesn't\n\t\t * resolve (built-in OR customComponents) — `resolveWidgetComponent`\n\t\t * has already logged a warn. The filter happens here so the\n\t\t * template can use a clean `v-for` without nested `v-if`.\n\t\t *\n\t\t * The `widgetType` carried on the bubbled `@widget-event`\n\t\t * payload is the widget's `componentName` (when the\n\t\t * discriminator is `'component'`) or `widget.type` otherwise —\n\t\t * giving consumers a stable identifier for the dispatch.\n\t\t *\n\t\t * @param {object} section A section entry with `widgets[]`.\n\t\t * @param {number} sectionIndex Index in `sections[]`.\n\t\t * @return {Array<{key: string, component: object, props: object, widgetType: string, widgetIndex: number}>}\n\t\t */\n\t\tresolvedWidgetEntries(section, sectionIndex) {\n\t\t\tconst entries = []\n\t\t\tconst widgets = Array.isArray(section.widgets) ? section.widgets : []\n\t\t\tfor (let widgetIndex = 0; widgetIndex < widgets.length; widgetIndex++) {\n\t\t\t\tconst widget = widgets[widgetIndex] || {}\n\t\t\t\tconst component = this.resolveWidgetComponent(widget)\n\t\t\t\tif (!component) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst widgetType = widget.type === 'component' && typeof widget.componentName === 'string'\n\t\t\t\t\t? widget.componentName\n\t\t\t\t\t: widget.type\n\t\t\t\tentries.push({\n\t\t\t\t\tkey: `widget-${sectionIndex}-${widgetIndex}`,\n\t\t\t\t\tcomponent,\n\t\t\t\t\tprops: widget.props || {},\n\t\t\t\t\twidgetType,\n\t\t\t\t\twidgetIndex,\n\t\t\t\t})\n\t\t\t}\n\t\t\treturn entries\n\t\t},\n\n\t\t/**\n\t\t * Resolve the active-tab id on mount / when `tabs[]` changes.\n\t\t * Lookup order: explicit `initialTab` prop → first tab in\n\t\t * `tabs[]` → empty string. Unknown `initialTab` values fall\n\t\t * back to the first tab so the page never gets stuck.\n\t\t * (manifest-settings-orchestration REQ-MSO-5.)\n\t\t *\n\t\t * @return {string} The resolved tab id (empty in flat mode).\n\t\t */\n\t\tresolveInitialTabId() {\n\t\t\tif (!this.hasTabs) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (typeof this.initialTab === 'string' && this.initialTab.length > 0) {\n\t\t\t\tconst exists = this.tabs.some((t) => t && t.id === this.initialTab)\n\t\t\t\tif (exists) {\n\t\t\t\t\treturn this.initialTab\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst first = this.tabs[0]\n\t\t\treturn first && typeof first.id === 'string' ? first.id : ''\n\t\t},\n\n\t\t/**\n\t\t * Handle a tab button click. Switches the active tab and\n\t\t * emits `@tab-change` so consumers can react (e.g. persist the\n\t\t * active tab in their preference store, update the URL hash).\n\t\t * (manifest-settings-orchestration REQ-MSO-5.)\n\t\t *\n\t\t * @param {object} tab The clicked tab definition.\n\t\t * @param {number} tabIndex The tab's index in `tabs[]`.\n\t\t */\n\t\tonTabClick(tab, tabIndex) {\n\t\t\tif (!tab || typeof tab.id !== 'string') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.activeTabId === tab.id) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.activeTabId = tab.id\n\t\t\tthis.$emit('tab-change', { tabId: tab.id, tabIndex })\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a widget's `widget-event` (caught by the local\n\t\t * CnSettingsWidgetMount helper) as a top-level `widget-event`\n\t\t * on this page. Consumers wire one `@widget-event` handler at\n\t\t * the CnAppRoot mount point and dispatch by `widgetType` /\n\t\t * `name`.\n\t\t *\n\t\t * @param {object} payload `{ widgetType, widgetIndex, sectionIndex, name, args }`\n\t\t */\n\t\tonWidgetEvent(payload) {\n\t\t\tthis.$emit('widget-event', payload)\n\t\t},\n\n\t\t/**\n\t\t * Save shortly after the last change (`autosave`): a burst of typing\n\t\t * is one request.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tqueueAutosave() {\n\t\t\tclearTimeout(this.autosaveTimer)\n\t\t\tthis.autosaveTimer = setTimeout(() => {\n\t\t\t\tthis.autosaveTimer = null\n\t\t\t\tif (this.dirty && !this.saving) {\n\t\t\t\t\tthis.save()\n\t\t\t\t}\n\t\t\t}, 600)\n\t\t},\n\n\t\treset() {\n\t\t\tthis.formData = this.cloneInitial()\n\t\t\tthis.lastError = null\n\t\t},\n\n\t\tasync save() {\n\t\t\tthis.saving = true\n\t\t\tthis.lastError = null\n\t\t\ttry {\n\t\t\t\tif (this.saveEndpoint) {\n\t\t\t\t\tawait axios.put(prefixUrl(this.saveEndpoint), this.formData)\n\t\t\t\t}\n\t\t\t\tthis.originalData = JSON.parse(JSON.stringify(this.formData))\n\t\t\t\tthis.$emit('save', this.formData)\n\t\t\t} catch (err) {\n\t\t\t\tthis.lastError = err?.response?.data?.message || err?.message || t('nextcloud-vue', 'Save failed')\n\t\t\t\tthis.$emit('error', err)\n\t\t\t} finally {\n\t\t\t\tthis.saving = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* The section wrapper draws no box; the board look makes it the card grid. */\n.cn-settings-page__sections {\n\tdisplay: contents;\n}\n\n.cn-settings-page__header-buttons {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tmargin-inline-start: auto;\n}\n\n.cn-settings-page {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n}\n\n.cn-settings-page__actions {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tgap: 8px;\n}\n\n/*\n * Tab strip for the orchestration shape (manifest-settings-\n * orchestration REQ-MSO-5). Uses Nextcloud CSS variables only — no\n * hex literals, no rgba overrides on the elements themselves.\n */\n.cn-settings-page__tabs {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 4px;\n\tborder-bottom: 1px solid var(--color-border);\n\tpadding-bottom: 0;\n\tmargin-bottom: 8px;\n}\n\n.cn-settings-page__tab {\n\tbackground: transparent;\n\tborder: 0;\n\tborder-bottom: 3px solid transparent;\n\tpadding: 8px 16px;\n\tmargin: 0;\n\tcursor: pointer;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: normal;\n\tborder-radius: var(--border-radius-large) var(--border-radius-large) 0 0;\n\ttransition: background-color 0.1s ease-in-out, color 0.1s ease-in-out, border-color 0.1s ease-in-out;\n}\n\n.cn-settings-page__tab:hover,\n.cn-settings-page__tab:focus-visible {\n\tbackground-color: var(--color-background-hover);\n\tcolor: var(--color-main-text);\n\toutline: none;\n}\n\n.cn-settings-page__tab--active {\n\tcolor: var(--color-primary-element);\n\tborder-bottom-color: var(--color-primary-element);\n\tfont-weight: bold;\n}\n\n@media (max-width: 768px) {\n\t.cn-settings-page__tabs {\n\t\tflex-direction: column;\n\t\tgap: 0;\n\t\tborder-bottom: 0;\n\t}\n\n\t.cn-settings-page__tab {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t}\n\n\t.cn-settings-page__tab--active {\n\t\tborder-bottom-width: 1px;\n\t\tbackground-color: var(--color-background-hover);\n\t}\n}\n\n.cn-settings-page__fields {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-settings-page__field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-settings-page__field-help {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-settings-page__save-bar {\n\tdisplay: flex;\n\tgap: 8px;\n\tmargin-top: 16px;\n}\n\n.cn-settings-page__error {\n\tcolor: var(--color-error);\n\tbackground: var(--color-error-light, var(--color-background-hover));\n\tpadding: 8px 12px;\n\tborder-radius: var(--border-radius);\n}\n</style>\n"],"names":["CnVersionInfoCard","CnRegisterMapping","CnBuildiqEditButton","CnSettingsCard","CnSettingsSection","CnPageHeader","t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A,EAAE,GAAG,EAAA;GACN;;AAED,EAAA,KAAK,GAAG;AACP,GAAA,IAAI,CAAC,QAAO,GAAI,IAAI,CAAC,YAAY,GAAC;AAClC,GAAA,IAAI,CAAC,SAAQ,GAAI,KAAG;GACpB;;EAED,MAAM,IAAI,GAAG;AACZ,GAAA,IAAI,CAAC,MAAK,GAAI,KAAG;AACjB,GAAA,IAAI,CAAC,SAAQ,GAAI,KAAG;AACpB,GAAA,IAAI;AACH,IAAA,IAAI,IAAI,CAAC,YAAY,EAAE;KACtB,MAAMC,cAAK,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAA;AAC5D,KAAA;IACA,IAAI,CAAC,YAAW,GAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAA;AAC5D,IAAA,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAA;IAC/B,CAAA,OAAO,GAAG,EAAE;AACb,IAAA,IAAI,CAAC,SAAU,GAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAQ,IAAG,GAAG,EAAE,OAAQ,IAAGD,SAAC,CAAC,eAAe,EAAE,aAAa,EAAA;IACjG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAA;AACxB,IAAA,SAAU;AACT,IAAA,IAAI,CAAC,MAAO,GAAE,MAAI;AACnB,IAAA;GACA;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnSettingsPage.vue2.js","sources":["../../../../src/components/CnSettingsPage/CnSettingsPage.vue"],"sourcesContent":["<!--\n CnSettingsPage — Admin / config surface.\n\n Renders manifest-driven config sections. The page MAY declare\n EITHER a flat `sections[]` array (back-compat) OR a `tabs[]` array\n (each tab owns its own `sections[]`) — XOR, never both. See\n manifest-settings-orchestration spec.\n\n Each section is a CnSettingsCard wrapping a CnSettingsSection.\n A section MUST declare exactly one of three body kinds:\n\n 1. `fields[]` — flat form fields (back-compat, default)\n 2. `component` — registry-resolved component as the section body\n 3. `widgets[]` — ordered list of widgets (built-in + customComponents)\n\n Built-in widget types (resolved BEFORE the customComponents registry):\n - `version-info` → CnVersionInfoCard\n - `register-mapping` → CnRegisterMapping\n - `component` → discriminator; `widget.componentName`\n resolves against customComponents\n\n Saves via `axios.put(saveEndpoint, formData)` with the consumer's\n settings controller URL. Widget events bubble up through\n `@widget-event` so consumers wire one page-level handler that\n dispatches by `widgetType` + event `name` (the manifest can't carry\n inline JS).\n\n Supports the same `headerComponent` / `actionsComponent` / generic\n `slots` overrides that the other built-in page types do — the\n CnPageRenderer wires them via the `#header`, `#actions`, and named\n `slots[]` slots exposed here.\n-->\n<template>\n\t<div class=\"cn-settings-page\" data-testid=\"cn-settings-page\">\n\t\t<!-- Header — overridable via #header slot. CnPageHeader renders whenever\n\t\t there is a title: `visuallyHidden` keeps the <h1> in the\n\t\t accessibility tree (and out of the visual layout) when showTitle is\n\t\t false, so <main> is never left with no heading at all\n\t\t (WCAG 2.4.6 / 1.3.1). -->\n\t\t<slot\n\t\t\tname=\"header\"\n\t\t\t:title=\"title\"\n\t\t\t:description=\"description\"\n\t\t\t:icon=\"icon\">\n\t\t\t<CnPageHeader\n\t\t\t\tv-if=\"title\"\n\t\t\t\t:title=\"title\"\n\t\t\t\t:description=\"resolvedDescription\"\n\t\t\t\t:icon=\"icon\"\n\t\t\t\t:visuallyHidden=\"!showTitle\">\n\t\t\t\t<!-- Board look: the buildiq square, then the page Save as the\n\t\t\t\t last header button. -->\n\t\t\t\t<template v-if=\"headerButtonsInHeader\" #extra>\n\t\t\t\t\t<div class=\"cn-settings-page__header-buttons\" data-testid=\"cn-settings-page-header-buttons\">\n\t\t\t\t\t\t<CnBuildiqEditButton v-if=\"isBoard\" />\n\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\tv-if=\"pageSave\"\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\t\t\t\tdata-testid=\"cn-settings-page-save\"\n\t\t\t\t\t\t\t@click=\"save\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ saveLabel }}\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</CnPageHeader>\n\t\t</slot>\n\n\t\t<!-- The same buttons when the header itself is hidden or replaced. -->\n\t\t<div\n\t\t\tv-if=\"headerButtonsOutside\"\n\t\t\tclass=\"cn-settings-page__header-buttons\"\n\t\t\tdata-testid=\"cn-settings-page-header-buttons\">\n\t\t\t<CnBuildiqEditButton v-if=\"isBoard\" />\n\t\t\t<NcButton\n\t\t\t\tv-if=\"pageSave\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\tdata-testid=\"cn-settings-page-save\"\n\t\t\t\t@click=\"save\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ saveLabel }}\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<!-- The Changes card of a page that saves in its header. -->\n\t\t<div\n\t\t\tv-if=\"pageSave && changedFields.length > 0\"\n\t\t\tclass=\"cn-settings-page__changes\"\n\t\t\tdata-testid=\"cn-settings-page-changes\">\n\t\t\t<h2 class=\"cn-settings-page__changes-title\">\n\t\t\t\t{{ changesLabel }}\n\t\t\t</h2>\n\t\t\t<ul>\n\t\t\t\t<li v-for=\"field in changedFields\" :key=\"field.key\">\n\t\t\t\t\t{{ field.label }}\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\n\t\t<!-- Actions slot for save / discard / reset overrides -->\n\t\t<div v-if=\"$slots.actions || $slots.actions\" class=\"cn-settings-page__actions\">\n\t\t\t<slot name=\"actions\" />\n\t\t</div>\n\n\t\t<!-- Tab strip — only rendered when `tabs[]` is set\n\t\t\t (manifest-settings-orchestration REQ-MSO-5). Built with\n\t\t\t native <button role=\"tab\"> + ARIA wiring; uses Nextcloud\n\t\t\t CSS variables only (no hex literals). -->\n\t\t<div\n\t\t\tv-if=\"hasTabs\"\n\t\t\tclass=\"cn-settings-page__tabs\"\n\t\t\trole=\"tablist\"\n\t\t\tdata-testid=\"cn-settings-page-tabs\">\n\t\t\t<button\n\t\t\t\tv-for=\"(tab, tabIndex) in tabs\"\n\t\t\t\t:key=\"`tab-${tab.id}`\"\n\t\t\t\trole=\"tab\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-settings-page__tab\"\n\t\t\t\t:class=\"{ 'cn-settings-page__tab--active': activeTabId === tab.id }\"\n\t\t\t\t:aria-selected=\"activeTabId === tab.id ? 'true' : 'false'\"\n\t\t\t\t:aria-controls=\"`cn-settings-tab-panel-${tab.id}`\"\n\t\t\t\t:data-testid=\"`cn-settings-page-tab-${tab.id}`\"\n\t\t\t\t@click=\"onTabClick(tab, tabIndex)\">\n\t\t\t\t{{ resolveLabel(tab.label) }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<!-- Sections — rendered for the active tab when `tabs[]` is\n\t\t\t set, otherwise the flat `sections[]` (back-compat). The wrapper\n\t\t\t draws no box of its own (`display: contents`); the board look\n\t\t\t turns it into the card grid. -->\n\t\t<div class=\"cn-settings-page__sections\">\n\t\t\t<CnSettingsCard\n\t\t\t\tv-for=\"(section, sectionIndex) in activeSections\"\n\t\t\t\t:key=\"`section-${activeTabId || 'flat'}-${sectionIndex}`\"\n\t\t\t\t:title=\"resolveLabel(section.title)\"\n\t\t\t\t:icon=\"section.icon || ''\"\n\t\t\t\t:collapsible=\"section.collapsible || false\">\n\t\t\t\t<!--\n\t\t\t\t\tBody resolution — see `sectionBodyKind(section)` in the\n\t\t\t\t\tscript: returns 'fields' (default + back-compat),\n\t\t\t\t\t'component', or 'widgets'.\n\t\t\t\t-->\n\n\t\t\t\t<!-- Body: bare fields[] (back-compat). Wrapped in a\n\t\t\t\t\t CnSettingsSection mirroring the pre-rich-sections layout. -->\n\t\t\t\t<CnSettingsSection\n\t\t\t\t\tv-if=\"sectionBodyKind(section) === 'fields'\"\n\t\t\t\t\t:name=\"resolveLabel(section.title)\"\n\t\t\t\t\t:description=\"resolveLabel(section.description)\"\n\t\t\t\t\t:docUrl=\"section.docUrl || ''\"\n\t\t\t\t\t:wide=\"Boolean(section.wide)\">\n\t\t\t\t\t<div class=\"cn-settings-page__fields\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tv-for=\"field in section.fields\"\n\t\t\t\t\t\t\t:key=\"field.key\"\n\t\t\t\t\t\t\tclass=\"cn-settings-page__field\">\n\t\t\t\t\t\t\t<!-- Per-field slot — `field-<key>` lets a consumer override the input entirely. -->\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:name=\"`field-${field.key}`\"\n\t\t\t\t\t\t\t\t:field=\"field\"\n\t\t\t\t\t\t\t\t:value=\"formData[field.key]\"\n\t\t\t\t\t\t\t\t:onInput=\"(v) => updateField(field.key, v)\">\n\t\t\t\t\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\t\t\t\t\tv-if=\"field.type === 'boolean'\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"!!formData[field.key]\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event)\">\n\t\t\t\t\t\t\t\t\t{{ resolveLabel(field.label) }}\n\t\t\t\t\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\t\t\tv-else-if=\"field.type === 'number'\"\n\t\t\t\t\t\t\t\t\t:label=\"resolveLabel(field.label)\"\n\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"String(fieldValue(field.key, ''))\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event === '' ? null : Number($event))\" />\n\t\t\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\t\t\tv-else-if=\"field.type === 'password'\"\n\t\t\t\t\t\t\t\t\t:label=\"resolveLabel(field.label)\"\n\t\t\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"fieldValue(field.key, '')\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event)\" />\n\t\t\t\t\t\t\t\t<NcSelect\n\t\t\t\t\t\t\t\t\tv-else-if=\"field.type === 'enum' && Array.isArray(field.options)\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"selectedOption(field)\"\n\t\t\t\t\t\t\t\t\t:options=\"field.options\"\n\t\t\t\t\t\t\t\t\t:inputLabel=\"resolveLabel(field.label)\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, optionValue($event))\" />\n\t\t\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\t\t\tv-else\n\t\t\t\t\t\t\t\t\t:label=\"resolveLabel(field.label)\"\n\t\t\t\t\t\t\t\t\t:modelValue=\"fieldValue(field.key, '')\"\n\t\t\t\t\t\t\t\t\t@update:modelValue=\"updateField(field.key, $event)\" />\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t<small\n\t\t\t\t\t\t\t\tv-if=\"field.help\"\n\t\t\t\t\t\t\t\tclass=\"cn-settings-page__field-help\">\n\t\t\t\t\t\t\t\t{{ resolveLabel(field.help) }}\n\t\t\t\t\t\t\t</small>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<template v-if=\"sectionSave\" #footer>\n\t\t\t\t\t\t<div class=\"cn-settings-section__save\" data-testid=\"cn-settings-section-save\">\n\t\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\t\t\t\t\t@click=\"save\">\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t{{ saveLabel }}\n\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</template>\n\t\t\t\t</CnSettingsSection>\n\n\t\t\t\t<!-- Body: a single registry-resolved component. The\n\t\t\t\t\t component is responsible for its own chrome — we do\n\t\t\t\t\t NOT wrap it in CnSettingsSection because the existing\n\t\t\t\t\t widget shape (CnVersionInfoCard, CnRegisterMapping)\n\t\t\t\t\t already wraps itself. Custom components are expected\n\t\t\t\t\t to do the same OR opt in by adding their own section\n\t\t\t\t\t wrapper.\n\n\t\t\t\t\t Wrapped in CnSettingsWidgetMount so the child's $emit\n\t\t\t\t\t is intercepted and re-emitted as @widget-event on this\n\t\t\t\t\t page (manifests can't carry inline JS). -->\n\t\t\t\t<CnSettingsWidgetMount\n\t\t\t\t\tv-else-if=\"sectionBodyKind(section) === 'component' && resolveSectionComponent(section)\"\n\t\t\t\t\t:component=\"resolveSectionComponent(section)\"\n\t\t\t\t\t:componentProps=\"section.props || {}\"\n\t\t\t\t\t:widgetType=\"section.component\"\n\t\t\t\t\t:sectionIndex=\"sectionIndex\"\n\t\t\t\t\t:widgetIndex=\"0\"\n\t\t\t\t\t@widgetEvent=\"onWidgetEvent\" />\n\n\t\t\t\t<!-- Body: ordered list of widgets. Each widget is its own\n\t\t\t\t\t mounted component with v-bind props + bubbled events\n\t\t\t\t\t via CnSettingsWidgetMount. Built-ins (version-info,\n\t\t\t\t\t register-mapping) wrap themselves in CnSettingsSection;\n\t\t\t\t\t custom widgets are expected to do the same. -->\n\t\t\t\t<template v-else-if=\"sectionBodyKind(section) === 'widgets'\">\n\t\t\t\t\t<CnSettingsWidgetMount\n\t\t\t\t\t\tv-for=\"entry in resolvedWidgetEntries(section, sectionIndex)\"\n\t\t\t\t\t\t:key=\"entry.key\"\n\t\t\t\t\t\t:component=\"entry.component\"\n\t\t\t\t\t\t:componentProps=\"entry.props\"\n\t\t\t\t\t\t:widgetType=\"entry.widgetType\"\n\t\t\t\t\t\t:sectionIndex=\"sectionIndex\"\n\t\t\t\t\t\t:widgetIndex=\"entry.widgetIndex\"\n\t\t\t\t\t\t@widgetEvent=\"onWidgetEvent\" />\n\t\t\t\t</template>\n\t\t\t</CnSettingsCard>\n\t\t</div>\n\n\t\t<!-- Save bar -->\n\t\t<div v-if=\"showSaveBar && !saveMode && !autosave\" class=\"cn-settings-page__save-bar\">\n\t\t\t<NcButton\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t:disabled=\"saving || !dirty\"\n\t\t\t\t@click=\"save\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcLoadingIcon v-if=\"saving\" :size=\"20\" />\n\t\t\t\t\t<ContentSave v-else :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ saveLabel }}\n\t\t\t</NcButton>\n\t\t\t<NcButton\n\t\t\t\tv-if=\"dirty\"\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t:disabled=\"saving\"\n\t\t\t\t@click=\"reset\">\n\t\t\t\t{{ resetLabel }}\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<!-- Error -->\n\t\t<div v-if=\"lastError\" class=\"cn-settings-page__error\">\n\t\t\t{{ lastError }}\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { translate as t } from '@nextcloud/l10n'\nimport {\n\tNcButton,\n\tNcCheckboxRadioSwitch,\n\tNcLoadingIcon,\n\tNcSelect,\n\tNcTextField,\n} from '@nextcloud/vue'\nimport ContentSave from 'vue-material-design-icons/ContentSave.vue'\nimport CnBuildiqEditButton from '../CnBuildiqEditButton/CnBuildiqEditButton.vue'\nimport CnRegisterMapping from '../CnRegisterMapping/CnRegisterMapping.vue'\nimport CnToggleTableWidget from '../CnToggleTableWidget/CnToggleTableWidget.vue'\nimport CnVersionInfoCard from '../CnVersionInfoCard/CnVersionInfoCard.vue'\nimport { useLook } from '../../composables/useLook.js'\nimport { prefixUrl } from '../../utils/headers.js'\nimport { CnPageHeader } from '../CnPageHeader/index.js'\nimport { CnSettingsCard } from '../CnSettingsCard/index.js'\nimport { CnSettingsSection } from '../CnSettingsSection/index.js'\nimport CnSettingsWidgetMount from './CnSettingsWidgetMount.js'\n\n/**\n * Sentinel value used in the built-in widget registry to mark the\n * `'component'` discriminator (manifest-settings-orchestration\n * REQ-MSO-6). The discriminator does NOT resolve to a fixed\n * component — instead, the resolver detects this sentinel and looks\n * up `widget.componentName` in the customComponents registry.\n */\nconst COMPONENT_DISCRIMINATOR = Symbol('cn-settings-component-widget')\n\n/**\n * Built-in widget registry. Used by `CnSettingsPage` to resolve\n * `widgets[].type` to a component BEFORE consulting the\n * consumer-provided customComponents registry.\n *\n * The order matters — built-ins win on collision so consumers can't\n * accidentally shadow `version-info` with their own component. If a\n * consumer needs to truly replace one of these, they can render their\n * own component via `section.component` or\n * `{ type: \"component\", componentName: <name> }` instead of `widgets[]`.\n *\n * Spec:\n * - REQ-MSRS-2 (manifest-settings-rich-sections) — fixed-component\n * built-ins (`version-info`, `register-mapping`).\n * - REQ-MSO-6 (manifest-settings-orchestration) — `'component'`\n * discriminator (sentinel value, resolved via componentName).\n */\nconst BUILTIN_SETTINGS_WIDGETS = Object.freeze({\n\t'version-info': CnVersionInfoCard,\n\t'register-mapping': CnRegisterMapping,\n\t// Rows with a switch: objects (`bind.mode: 'each'`) or a config map (`'map'`).\n\t'toggle-table': CnToggleTableWidget,\n\tcomponent: COMPONENT_DISCRIMINATOR,\n})\n\n/**\n * CnSettingsPage — Manifest-driven settings page.\n *\n * Reads `sections[]` from `pages[].config` and renders one\n * `CnSettingsCard` per section. Each section declares EXACTLY ONE of\n * three body kinds:\n *\n * - `fields[]` — flat form fields (back-compat default).\n * Each field's `type` controls which input renders:\n * - `boolean` → NcCheckboxRadioSwitch\n * - `number` → NcTextField (type=number)\n * - `string` → NcTextField (default)\n * - `password` → NcTextField (type=password)\n * - `enum` → NcSelect (requires `options: string[]`)\n * Per-field `#field-<key>` slots are exposed so consumers can drop\n * in their own widget.\n *\n * - `component` — registry-resolved component as the section body.\n * `section.props` is v-bind'd to it. Useful when a whole section\n * is one bespoke widget the library doesn't know about.\n *\n * - `widgets[]` — ordered list of widgets. Each entry has a `type`\n * string and optional `props`. Built-in widget types resolve\n * first (`version-info` → `CnVersionInfoCard`, `register-mapping`\n * → `CnRegisterMapping`, `toggle-table` → `CnToggleTableWidget`);\n * unknown types fall back to the\n * `customComponents` registry.\n *\n * Widget events (e.g. CnRegisterMapping's `@save`, CnVersionInfoCard's\n * `@update`) bubble up as a single `@widget-event` event on the page,\n * with payload `{ widgetType, widgetIndex, sectionIndex, name, args }`.\n * Consumers wire one handler at the CnAppRoot level and dispatch by\n * `widgetType` / `name` — the manifest can't carry inline JS, so this\n * is the documented event-wiring escape hatch.\n *\n * Saves via `axios.put(saveEndpoint, formData)`. The `saveEndpoint`\n * default is `/index.php/apps/{appId}/api/settings` — consumers should\n * pass a fully-qualified URL via the manifest (or `saveEndpoint` prop)\n * because the library has no knowledge of the consumer's app id at\n * import time.\n *\n * Slots:\n * - `#header` — Replaces the CnPageHeader.\n * - `#actions` — Right-aligned actions area (the renderer fills this\n * via `pages[].actionsComponent`).\n * - `#field-<key>` — Replaces the input for a specific field within\n * a `fields[]` section. Scope: `{ field, value, onInput }`.\n *\n * Events:\n * - `@save` — Emitted on successful save. Payload: the form data.\n * - `@error` — Emitted when save fails. Payload: the error.\n * - `@input` — Emitted on every field change. Payload: `{ key, value }`.\n * - `@widget-event` — Emitted when a widget mounted via `widgets[]`\n * or `component` re-emits one of its own events. Payload:\n * `{ widgetType, widgetIndex, sectionIndex, name, args }`.\n */\nexport default {\n\tname: 'CnSettingsPage',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcLoadingIcon,\n\t\tNcSelect,\n\t\tNcTextField,\n\t\tContentSave,\n\t\tCnBuildiqEditButton,\n\t\tCnSettingsCard,\n\t\tCnSettingsSection,\n\t\tCnPageHeader,\n\t\tCnSettingsWidgetMount,\n\t},\n\n\tinject: {\n\t\t/**\n\t\t * Custom-component registry injected from CnAppRoot. Used to\n\t\t * resolve `section.component` and to fall back when a\n\t\t * `widgets[].type` isn't in the built-in widget map. Defaults\n\t\t * to an empty object when the page is mounted standalone.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tcnCustomComponents: { default: () => ({}) },\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The look the page is drawn in: `board` or `nextcloud`. Empty follows\n\t\t * the `cnLook` that CnAppRoot (or the page's `config.look`) provides.\n\t\t *\n\t\t * @spec openspec/changes/screens-chrome-parity/specs/app-look/spec.md#requirement-an-app-can-take-the-board-look\n\t\t */\n\t\tlook: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Where the page saves (`config.saveMode`): `section` ends each section\n\t\t * that has fields in its own Save button, `page` draws one Save as the\n\t\t * last header button and a Changes card, and empty keeps the save bar\n\t\t * under the last section. Never both a section and a page save.\n\t\t *\n\t\t * @spec openspec/changes/screens-chrome-parity/specs/settings-board-look/spec.md#requirement-a-settings-page-saves-in-one-declared-place\n\t\t * @type {'section'|'page'|''}\n\t\t */\n\t\tsaveMode: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t\tvalidator: (value) => ['', 'section', 'page'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * The page saves on change (`config.autosave`): no save button at all,\n\t\t * and the description ends with \"Changes are saved automatically.\"\n\t\t *\n\t\t * @spec openspec/changes/screens-chrome-parity/specs/settings-board-look/spec.md#requirement-a-settings-page-saves-in-one-declared-place\n\t\t */\n\t\tautosave: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Page title. */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Settings'),\n\t\t},\n\n\t\t/** Description shown under the title when `showTitle` is set. */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Whether to render the inline page header VISIBLY. When false the\n\t\t * `<h1>` is still rendered visually-hidden, so the `<main>` landmark\n\t\t * always has an accessible heading (WCAG 2.4.6 / 1.3.1).\n\t\t */\n\t\tshowTitle: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** MDI icon name for the header. */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Section definitions (flat shape — back-compat). Each section\n\t\t * MUST declare EXACTLY ONE of:\n\t\t * - `fields: Array<Field>` (back-compat flat-field body)\n\t\t * - `component: <registry-name>` + optional `props`\n\t\t * - `widgets: Array<{ type, props?, componentName? }>`\n\t\t *\n\t\t * Common keys: `{ title, description?, icon?, collapsible?, docUrl? }`.\n\t\t *\n\t\t * Mutually exclusive with `tabs[]` (XOR — see\n\t\t * manifest-settings-orchestration REQ-MSO-1).\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tsections: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Tab definitions (orchestration shape — manifest-settings-\n\t\t * orchestration REQ-MSO-2). When set, CnSettingsPage renders\n\t\t * a tab strip above the section area; the active tab's\n\t\t * `sections[]` flow into the same renderer used by the flat\n\t\t * shape. Mutually exclusive with `sections[]`.\n\t\t *\n\t\t * Each tab MUST be `{ id: string, label: string,\n\t\t * icon?: string, sections: array<Section> }`.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\ttabs: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Optional ID of the tab to activate on mount. When empty AND\n\t\t * `tabs[]` is non-empty, the first tab is active by default.\n\t\t * Unknown IDs fall back to the first tab.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tinitialTab: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Initial values keyed by `field.key`. Defaults to an empty\n\t\t * object; in practice the consumer passes the current\n\t\t * IAppConfig snapshot loaded from their settings controller.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tinitialValues: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/**\n\t\t * Endpoint that receives the PUT on save. Pass a fully-qualified\n\t\t * URL — the library has no knowledge of the consumer's app id.\n\t\t * When empty, no PUT is issued and `@save` is emitted with the\n\t\t * form data so the consumer can persist it themselves.\n\t\t */\n\t\tsaveEndpoint: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Whether to render the built-in save/reset bar. */\n\t\tshowSaveBar: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Label for the save button. */\n\t\tsaveLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Save'),\n\t\t},\n\n\t\t/** Label for the reset (discard) button. */\n\t\tresetLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Discard changes'),\n\t\t},\n\n\t\t/**\n\t\t * Optional translation function. When provided, applied to\n\t\t * section titles, field labels, and other i18n-key strings\n\t\t * declared in the manifest. Defaults to the identity function.\n\t\t *\n\t\t * @type {((key: string) => string)|null}\n\t\t */\n\t\ttranslate: {\n\t\t\ttype: Function,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Optional explicit custom-component registry. When set, takes\n\t\t * precedence over the injected `cnCustomComponents`. Use this\n\t\t * when mounting CnSettingsPage outside a CnAppRoot tree (or\n\t\t * when test-mounting with a stub registry).\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tcustomComponents: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['save', 'error', 'input', 'widget-event', 'tab-change'],\n\n\tsetup(props) {\n\t\tconst { isBoard } = useLook(props)\n\t\treturn { isBoard }\n\t},\n\n\tdata() {\n\t\t// Resolve the initial active-tab id synchronously so the very\n\t\t// first render has the correct tab active (otherwise tests\n\t\t// that mount + assert without an `await tick` see the empty\n\t\t// default). Mirrors the logic in `resolveInitialTabId` (the\n\t\t// watcher path); keep them aligned.\n\t\tlet activeTabId = ''\n\t\tconst tabs = Array.isArray(this.tabs) ? this.tabs : []\n\t\tif (tabs.length > 0) {\n\t\t\tif (typeof this.initialTab === 'string' && this.initialTab.length > 0\n\t\t\t\t&& tabs.some((t) => t && t.id === this.initialTab)) {\n\t\t\t\tactiveTabId = this.initialTab\n\t\t\t} else if (tabs[0] && typeof tabs[0].id === 'string') {\n\t\t\t\tactiveTabId = tabs[0].id\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tformData: this.cloneInitial(),\n\t\t\toriginalData: this.cloneInitial(),\n\t\t\tsaving: false,\n\t\t\tlastError: null,\n\t\t\tactiveTabId,\n\t\t\tautosaveTimer: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {boolean} The page saves from its header (`saveMode: \"page\"`, not autosave). */\n\t\tpageSave() {\n\t\t\treturn this.saveMode === 'page' && !this.autosave\n\t\t},\n\n\t\t/** @return {boolean} Each section with fields saves on its own (`saveMode: \"section\"`). */\n\t\tsectionSave() {\n\t\t\treturn this.saveMode === 'section' && !this.autosave\n\t\t},\n\n\t\t/**\n\t\t * The description, with the autosave note appended when the page saves\n\t\t * on change.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedDescription() {\n\t\t\tif (!this.autosave) {\n\t\t\t\treturn this.description\n\t\t\t}\n\t\t\tconst note = t('nextcloud-vue', 'Changes are saved automatically.')\n\t\t\treturn this.description ? `${this.description} ${note}` : note\n\t\t},\n\n\t\t/** @return {boolean} The header buttons render inside the visible page header. */\n\t\theaderButtonsInHeader() {\n\t\t\treturn Boolean(this.title && this.showTitle && !this.$slots.header && (this.isBoard || this.pageSave))\n\t\t},\n\n\t\t/** @return {boolean} The header buttons need a row of their own (header hidden or replaced). */\n\t\theaderButtonsOutside() {\n\t\t\treturn Boolean((this.isBoard || this.pageSave) && !this.headerButtonsInHeader)\n\t\t},\n\n\t\t/** @return {string} Title of the Changes card. */\n\t\tchangesLabel() {\n\t\t\treturn t('nextcloud-vue', 'Changes')\n\t\t},\n\n\t\t/**\n\t\t * The fields that differ from their saved value, across every section,\n\t\t * labelled for the Changes card.\n\t\t *\n\t\t * @return {Array<{key: string, label: string}>}\n\t\t */\n\t\tchangedFields() {\n\t\t\tconst labels = {}\n\t\t\tconst sections = [...(this.sections || [])]\n\t\t\tfor (const tab of this.tabs || []) {\n\t\t\t\tif (tab && Array.isArray(tab.sections)) {\n\t\t\t\t\tsections.push(...tab.sections)\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const section of sections) {\n\t\t\t\tfor (const field of (section && section.fields) || []) {\n\t\t\t\t\tlabels[field.key] = this.resolveLabel(field.label) || field.key\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst keys = new Set([...Object.keys(this.formData), ...Object.keys(this.originalData)])\n\t\t\treturn [...keys]\n\t\t\t\t.filter((key) => JSON.stringify(this.formData[key]) !== JSON.stringify(this.originalData[key]))\n\t\t\t\t.map((key) => ({ key, label: labels[key] || key }))\n\t\t},\n\n\t\t/** Whether any field has changed since load. */\n\t\tdirty() {\n\t\t\treturn JSON.stringify(this.formData) !== JSON.stringify(this.originalData)\n\t\t},\n\n\t\t/**\n\t\t * Effective custom-component registry. Explicit prop wins over\n\t\t * the injected value (mirrors CnPageRenderer's resolution\n\t\t * order).\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\teffectiveCustomComponents() {\n\t\t\treturn this.customComponents ?? this.cnCustomComponents ?? {}\n\t\t},\n\n\t\t/**\n\t\t * Whether the page is in tabs orchestration mode. True when\n\t\t * `tabs[]` is non-empty — drives the tab-strip render gate\n\t\t * (manifest-settings-orchestration REQ-MSO-5).\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasTabs() {\n\t\t\treturn Array.isArray(this.tabs) && this.tabs.length > 0\n\t\t},\n\n\t\t/**\n\t\t * The sections to render right now. In flat mode, this is the\n\t\t * `sections` prop directly. In tabs mode, this is the\n\t\t * `sections[]` array of the currently active tab. Centralising\n\t\t * this in one computed keeps the template's `v-for` simple\n\t\t * and decouples it from the body kind dispatcher (which\n\t\t * applies per-section, not per-mode).\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tactiveSections() {\n\t\t\tif (!this.hasTabs) {\n\t\t\t\treturn this.sections || []\n\t\t\t}\n\t\t\tconst active = this.tabs.find((t) => t && t.id === this.activeTabId)\n\t\t\tif (active && Array.isArray(active.sections)) {\n\t\t\t\treturn active.sections\n\t\t\t}\n\t\t\t// Defensive fallback — should not happen because\n\t\t\t// `resolveInitialTabId` always lands on a known tab.\n\t\t\tconst first = this.tabs[0]\n\t\t\treturn first && Array.isArray(first.sections) ? first.sections : []\n\t\t},\n\t},\n\n\twatch: {\n\t\tinitialValues: {\n\t\t\tdeep: true,\n\t\t\thandler() {\n\t\t\t\tthis.formData = this.cloneInitial()\n\t\t\t\tthis.originalData = this.cloneInitial()\n\t\t\t},\n\t\t},\n\n\t\t// When `tabs[]` changes (e.g. consumer swaps manifests at\n\t\t// runtime), re-resolve the active tab so the page doesn't get\n\t\t// stuck on a removed id.\n\t\ttabs: {\n\t\t\thandler() {\n\t\t\t\tthis.activeTabId = this.resolveInitialTabId()\n\t\t\t},\n\t\t},\n\n\t\t// When `initialTab` changes (consumer-controlled tab\n\t\t// activation), follow it.\n\t\tinitialTab(next) {\n\t\t\tif (typeof next === 'string' && next.length > 0) {\n\t\t\t\tconst exists = this.tabs.some((t) => t && t.id === next)\n\t\t\t\tif (exists) {\n\t\t\t\t\tthis.activeTabId = next\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n\n\tbeforeUnmount() {\n\t\tclearTimeout(this.autosaveTimer)\n\t},\n\n\tmethods: {\n\t\t// Coalesce a field value to a fallback when null / undefined.\n\t\t// Used in template bindings instead of `formData[key] ?? ''` because\n\t\t// vue-template-es2015-compiler (the Rollup VuePlugin's parser) does\n\t\t// not accept ES2020 nullish-coalescing inside template expressions.\n\t\tfieldValue(key, fallback) {\n\t\t\tconst v = this.formData[key]\n\t\t\treturn (v === null || v === undefined) ? fallback : v\n\t\t},\n\n\t\t// Resolve the currently-selected option for an enum field.\n\t\t// `field.options` may be an array of strings/numbers OR an array\n\t\t// of `{ label, value }`-shaped objects. NcSelect needs the actual\n\t\t// option entry (not the bare value) to render the selection\n\t\t// correctly, so this resolver looks up the matching object form\n\t\t// when a primitive value is stored. Returns `null` when nothing\n\t\t// is selected so NcSelect renders the empty state instead of\n\t\t// emitting a Vue warning about an undefined `value` prop.\n\t\tselectedOption(field) {\n\t\t\tconst v = this.formData[field.key]\n\t\t\tif (v === null || v === undefined) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (!Array.isArray(field.options)) {\n\t\t\t\treturn v\n\t\t\t}\n\t\t\tfor (const opt of field.options) {\n\t\t\t\tif (opt && typeof opt === 'object') {\n\t\t\t\t\tif (opt.value === v) {\n\t\t\t\t\t\treturn opt\n\t\t\t\t\t}\n\t\t\t\t} else if (opt === v) {\n\t\t\t\t\treturn opt\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn v\n\t\t},\n\n\t\t// Inverse of `selectedOption` — extract the storable value from\n\t\t// whatever NcSelect emits. NcSelect emits the full option entry\n\t\t// when options are objects, the primitive when options are\n\t\t// primitives, or `null` on clear.\n\t\toptionValue(emitted) {\n\t\t\tif (emitted === null || emitted === undefined) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (typeof emitted === 'object' && 'value' in emitted) {\n\t\t\t\treturn emitted.value\n\t\t\t}\n\t\t\treturn emitted\n\t\t},\n\n\t\tcloneInitial() {\n\t\t\tconst merged = { ...(this.initialValues || {}) }\n\t\t\t// Collect every section across both modes (flat\n\t\t\t// `sections[]` AND `tabs[].sections[]`) so default values\n\t\t\t// are applied regardless of orchestration shape.\n\t\t\t// Only flat-field sections contribute defaults; component\n\t\t\t// and widgets sections own their own state.\n\t\t\tconst allSections = []\n\t\t\tfor (const section of this.sections || []) {\n\t\t\t\tallSections.push(section)\n\t\t\t}\n\t\t\tfor (const tab of this.tabs || []) {\n\t\t\t\tif (tab && Array.isArray(tab.sections)) {\n\t\t\t\t\tfor (const section of tab.sections) {\n\t\t\t\t\t\tallSections.push(section)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const section of allSections) {\n\t\t\t\tif (!section || !Array.isArray(section.fields)) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tfor (const field of section.fields) {\n\t\t\t\t\tif (field.default !== undefined && merged[field.key] === undefined) {\n\t\t\t\t\t\tmerged[field.key] = field.default\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn merged\n\t\t},\n\n\t\tresolveLabel(value) {\n\t\t\tif (!value) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (this.translate) {\n\t\t\t\treturn this.translate(value)\n\t\t\t}\n\t\t\treturn value\n\t\t},\n\n\t\tupdateField(key, value) {\n\t\t\tthis.formData[key] = value\n\t\t\tthis.$emit('input', { key, value })\n\t\t\tif (this.autosave) {\n\t\t\t\tthis.queueAutosave()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Determine which body kind a section declares. Returns\n\t\t * `'fields'` (default + back-compat), `'component'`, or\n\t\t * `'widgets'`. The validator (`validateManifest`) enforces\n\t\t * exactly-one at parse time; this method is the runtime\n\t\t * equivalent and is permissive when one of the keys is set\n\t\t * (last-defined wins in the rare case of an unvalidated\n\t\t * manifest).\n\t\t *\n\t\t * @param {object} section A section entry from `sections[]`.\n\t\t * @return {'fields' | 'component' | 'widgets'}\n\t\t */\n\t\tsectionBodyKind(section) {\n\t\t\tif (Array.isArray(section.widgets) && section.widgets.length > 0) {\n\t\t\t\treturn 'widgets'\n\t\t\t}\n\t\t\tif (typeof section.component === 'string' && section.component.length > 0) {\n\t\t\t\treturn 'component'\n\t\t\t}\n\t\t\treturn 'fields'\n\t\t},\n\n\t\t/**\n\t\t * Resolve a `section.component` registry name to a Vue\n\t\t * component via `effectiveCustomComponents`. Returns `null`\n\t\t * (and warns) when the registry has no entry.\n\t\t *\n\t\t * @param {object} section A section entry.\n\t\t * @return {object|null} Vue component or null.\n\t\t */\n\t\tresolveSectionComponent(section) {\n\t\t\tconst name = section.component\n\t\t\tif (!name) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst resolved = this.effectiveCustomComponents[name]\n\t\t\tif (!resolved) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn(`[CnSettingsPage] Section component \"${name}\" not found in customComponents registry. Section body will be empty.`)\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn resolved\n\t\t},\n\n\t\t/**\n\t\t * Resolve a single `widgets[]` entry to a concrete Vue\n\t\t * component. Lookup order:\n\t\t *\n\t\t * 1. Built-in widget map (`version-info`, `register-mapping`).\n\t\t * 2. `'component'` discriminator (REQ-MSO-6) — resolves\n\t\t * `widget.componentName` against `effectiveCustomComponents`.\n\t\t * 3. Legacy fallback — looks up `widget.type` against\n\t\t * `effectiveCustomComponents`. Kept for back-compat with\n\t\t * manifest-settings-rich-sections consumers; flagged as\n\t\t * deprecated in JSDoc — manifest authors should migrate to\n\t\t * the explicit `{ type: \"component\", componentName }` shape.\n\t\t *\n\t\t * Returns `null` (and warns) when nothing resolves. Built-ins\n\t\t * win on collision so consumers can't accidentally shadow them.\n\t\t *\n\t\t * @param {object} widget A `widgets[]` entry, e.g. `{ type, props?, componentName? }`.\n\t\t * @return {object|null} Vue component or null.\n\t\t */\n\t\tresolveWidgetComponent(widget) {\n\t\t\tconst type = widget && typeof widget.type === 'string' ? widget.type : ''\n\t\t\tif (!type) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (Object.hasOwn(BUILTIN_SETTINGS_WIDGETS, type)) {\n\t\t\t\tconst builtin = BUILTIN_SETTINGS_WIDGETS[type]\n\t\t\t\tif (builtin === COMPONENT_DISCRIMINATOR) {\n\t\t\t\t\t// REQ-MSO-6: discriminator — look up `componentName`.\n\t\t\t\t\tconst name = widget.componentName\n\t\t\t\t\tif (typeof name !== 'string' || name.length === 0) {\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.warn('[CnSettingsPage] Widget {type:\"component\"} requires a non-empty `componentName`. Widget will be skipped.')\n\t\t\t\t\t\treturn null\n\t\t\t\t\t}\n\t\t\t\t\tconst resolved = this.effectiveCustomComponents[name]\n\t\t\t\t\tif (!resolved) {\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.warn(`[CnSettingsPage] Widget component \"${name}\" not found in customComponents registry. Widget will be skipped.`)\n\t\t\t\t\t\treturn null\n\t\t\t\t\t}\n\t\t\t\t\treturn resolved\n\t\t\t\t}\n\t\t\t\treturn builtin\n\t\t\t}\n\t\t\t// Legacy fallback (manifest-settings-rich-sections REQ-MSRS-2).\n\t\t\t// Deprecated — manifest authors should migrate to\n\t\t\t// `{ type: \"component\", componentName: <X> }`. Kept here so\n\t\t\t// existing consumers continue working unchanged.\n\t\t\tconst resolved = this.effectiveCustomComponents[type]\n\t\t\tif (!resolved) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn(`[CnSettingsPage] Widget type \"${type}\" not found in built-in widgets or customComponents registry. Widget will be skipped.`)\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn resolved\n\t\t},\n\n\t\t/**\n\t\t * Build the list of widget mount entries for a `widgets[]`\n\t\t * section. Filters out entries whose `widget.type` doesn't\n\t\t * resolve (built-in OR customComponents) — `resolveWidgetComponent`\n\t\t * has already logged a warn. The filter happens here so the\n\t\t * template can use a clean `v-for` without nested `v-if`.\n\t\t *\n\t\t * The `widgetType` carried on the bubbled `@widget-event`\n\t\t * payload is the widget's `componentName` (when the\n\t\t * discriminator is `'component'`) or `widget.type` otherwise —\n\t\t * giving consumers a stable identifier for the dispatch.\n\t\t *\n\t\t * @param {object} section A section entry with `widgets[]`.\n\t\t * @param {number} sectionIndex Index in `sections[]`.\n\t\t * @return {Array<{key: string, component: object, props: object, widgetType: string, widgetIndex: number}>}\n\t\t */\n\t\tresolvedWidgetEntries(section, sectionIndex) {\n\t\t\tconst entries = []\n\t\t\tconst widgets = Array.isArray(section.widgets) ? section.widgets : []\n\t\t\tfor (let widgetIndex = 0; widgetIndex < widgets.length; widgetIndex++) {\n\t\t\t\tconst widget = widgets[widgetIndex] || {}\n\t\t\t\tconst component = this.resolveWidgetComponent(widget)\n\t\t\t\tif (!component) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst widgetType = widget.type === 'component' && typeof widget.componentName === 'string'\n\t\t\t\t\t? widget.componentName\n\t\t\t\t\t: widget.type\n\t\t\t\tentries.push({\n\t\t\t\t\tkey: `widget-${sectionIndex}-${widgetIndex}`,\n\t\t\t\t\tcomponent,\n\t\t\t\t\tprops: widget.props || {},\n\t\t\t\t\twidgetType,\n\t\t\t\t\twidgetIndex,\n\t\t\t\t})\n\t\t\t}\n\t\t\treturn entries\n\t\t},\n\n\t\t/**\n\t\t * Resolve the active-tab id on mount / when `tabs[]` changes.\n\t\t * Lookup order: explicit `initialTab` prop → first tab in\n\t\t * `tabs[]` → empty string. Unknown `initialTab` values fall\n\t\t * back to the first tab so the page never gets stuck.\n\t\t * (manifest-settings-orchestration REQ-MSO-5.)\n\t\t *\n\t\t * @return {string} The resolved tab id (empty in flat mode).\n\t\t */\n\t\tresolveInitialTabId() {\n\t\t\tif (!this.hasTabs) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (typeof this.initialTab === 'string' && this.initialTab.length > 0) {\n\t\t\t\tconst exists = this.tabs.some((t) => t && t.id === this.initialTab)\n\t\t\t\tif (exists) {\n\t\t\t\t\treturn this.initialTab\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst first = this.tabs[0]\n\t\t\treturn first && typeof first.id === 'string' ? first.id : ''\n\t\t},\n\n\t\t/**\n\t\t * Handle a tab button click. Switches the active tab and\n\t\t * emits `@tab-change` so consumers can react (e.g. persist the\n\t\t * active tab in their preference store, update the URL hash).\n\t\t * (manifest-settings-orchestration REQ-MSO-5.)\n\t\t *\n\t\t * @param {object} tab The clicked tab definition.\n\t\t * @param {number} tabIndex The tab's index in `tabs[]`.\n\t\t */\n\t\tonTabClick(tab, tabIndex) {\n\t\t\tif (!tab || typeof tab.id !== 'string') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.activeTabId === tab.id) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.activeTabId = tab.id\n\t\t\tthis.$emit('tab-change', { tabId: tab.id, tabIndex })\n\t\t},\n\n\t\t/**\n\t\t * Re-emit a widget's `widget-event` (caught by the local\n\t\t * CnSettingsWidgetMount helper) as a top-level `widget-event`\n\t\t * on this page. Consumers wire one `@widget-event` handler at\n\t\t * the CnAppRoot mount point and dispatch by `widgetType` /\n\t\t * `name`.\n\t\t *\n\t\t * @param {object} payload `{ widgetType, widgetIndex, sectionIndex, name, args }`\n\t\t */\n\t\tonWidgetEvent(payload) {\n\t\t\tthis.$emit('widget-event', payload)\n\t\t},\n\n\t\t/**\n\t\t * Save shortly after the last change (`autosave`): a burst of typing\n\t\t * is one request.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tqueueAutosave() {\n\t\t\tclearTimeout(this.autosaveTimer)\n\t\t\tthis.autosaveTimer = setTimeout(() => {\n\t\t\t\tthis.autosaveTimer = null\n\t\t\t\tif (this.dirty && !this.saving) {\n\t\t\t\t\tthis.save()\n\t\t\t\t}\n\t\t\t}, 600)\n\t\t},\n\n\t\treset() {\n\t\t\tthis.formData = this.cloneInitial()\n\t\t\tthis.lastError = null\n\t\t},\n\n\t\tasync save() {\n\t\t\tthis.saving = true\n\t\t\tthis.lastError = null\n\t\t\ttry {\n\t\t\t\tif (this.saveEndpoint) {\n\t\t\t\t\tawait axios.put(prefixUrl(this.saveEndpoint), this.formData)\n\t\t\t\t}\n\t\t\t\tthis.originalData = JSON.parse(JSON.stringify(this.formData))\n\t\t\t\tthis.$emit('save', this.formData)\n\t\t\t} catch (err) {\n\t\t\t\tthis.lastError = err?.response?.data?.message || err?.message || t('nextcloud-vue', 'Save failed')\n\t\t\t\tthis.$emit('error', err)\n\t\t\t} finally {\n\t\t\t\tthis.saving = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* The section wrapper draws no box; the board look makes it the card grid. */\n.cn-settings-page__sections {\n\tdisplay: contents;\n}\n\n.cn-settings-page__header-buttons {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\tmargin-inline-start: auto;\n}\n\n.cn-settings-page {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n}\n\n.cn-settings-page__actions {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\tgap: 8px;\n}\n\n/*\n * Tab strip for the orchestration shape (manifest-settings-\n * orchestration REQ-MSO-5). Uses Nextcloud CSS variables only — no\n * hex literals, no rgba overrides on the elements themselves.\n */\n.cn-settings-page__tabs {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 4px;\n\tborder-bottom: 1px solid var(--color-border);\n\tpadding-bottom: 0;\n\tmargin-bottom: 8px;\n}\n\n.cn-settings-page__tab {\n\tbackground: transparent;\n\tborder: 0;\n\tborder-bottom: 3px solid transparent;\n\tpadding: 8px 16px;\n\tmargin: 0;\n\tcursor: pointer;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: normal;\n\tborder-radius: var(--border-radius-large) var(--border-radius-large) 0 0;\n\ttransition: background-color 0.1s ease-in-out, color 0.1s ease-in-out, border-color 0.1s ease-in-out;\n}\n\n.cn-settings-page__tab:hover,\n.cn-settings-page__tab:focus-visible {\n\tbackground-color: var(--color-background-hover);\n\tcolor: var(--color-main-text);\n\toutline: none;\n}\n\n.cn-settings-page__tab--active {\n\tcolor: var(--color-primary-element);\n\tborder-bottom-color: var(--color-primary-element);\n\tfont-weight: bold;\n}\n\n@media (max-width: 768px) {\n\t.cn-settings-page__tabs {\n\t\tflex-direction: column;\n\t\tgap: 0;\n\t\tborder-bottom: 0;\n\t}\n\n\t.cn-settings-page__tab {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t\tborder-radius: 0;\n\t\ttext-align: left;\n\t}\n\n\t.cn-settings-page__tab--active {\n\t\tborder-bottom-width: 1px;\n\t\tbackground-color: var(--color-background-hover);\n\t}\n}\n\n.cn-settings-page__fields {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-settings-page__field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n}\n\n.cn-settings-page__field-help {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-settings-page__save-bar {\n\tdisplay: flex;\n\tgap: 8px;\n\tmargin-top: 16px;\n}\n\n.cn-settings-page__error {\n\tcolor: var(--color-error);\n\tbackground: var(--color-error-light, var(--color-background-hover));\n\tpadding: 8px 12px;\n\tborder-radius: var(--border-radius);\n}\n</style>\n"],"names":["CnVersionInfoCard","CnRegisterMapping","CnToggleTableWidget","CnBuildiqEditButton","CnSettingsCard","CnSettingsSection","CnPageHeader","t","axios"],"mappings":";;;;;;;;;;;;;;;AA0TA;;;;;;;AAOA,MAAM,uBAAsB,GAAI,MAAM,CAAC,8BAA8B,EAAA;;AAErE;;;AAGC;AACA;;;;AAIA;AACA;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