@conduction/nextcloud-vue 2.56.0-beta.73 → 2.56.0-beta.75

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 (204) hide show
  1. package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +1 -1
  2. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +90 -7
  3. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
  4. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +82 -79
  5. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
  6. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue.js +1 -1
  7. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue2.js +12 -1
  8. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue2.js.map +1 -1
  9. package/dist/esm/components/CnBuildiqEditButton/CnBuildiqEditButton.vue3.js.map +1 -1
  10. package/dist/esm/components/CnCardNotices/CnCardNotices.vue.js +1 -1
  11. package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js +45 -7
  12. package/dist/esm/components/CnCardNotices/CnCardNotices.vue2.js.map +1 -1
  13. package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js +1 -1
  14. package/dist/esm/components/CnCardNotices/CnCardNotices.vue3.js.map +1 -1
  15. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue.js +1 -1
  16. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +10 -8
  17. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
  18. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js +95 -88
  19. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
  20. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
  21. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +40 -1
  22. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
  23. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js +149 -109
  24. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
  25. package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
  26. package/dist/esm/components/CnFilesBrowser/filesBrowserColumns.js.map +1 -1
  27. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue.js +1 -1
  28. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js +86 -8
  29. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js.map +1 -1
  30. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js +137 -121
  31. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js.map +1 -1
  32. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue.js +1 -1
  33. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue2.js +56 -4
  34. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue2.js.map +1 -1
  35. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue3.js +166 -70
  36. package/dist/esm/components/CnFlowDetail/CnFlowDryRunResult.vue3.js.map +1 -1
  37. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue.js +9 -0
  38. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue.js.map +1 -0
  39. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue2.js +123 -0
  40. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue2.js.map +1 -0
  41. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue3.js +268 -0
  42. package/dist/esm/components/CnFlowDetail/CnFlowStepList.vue3.js.map +1 -0
  43. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue.js +9 -0
  44. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue.js.map +1 -0
  45. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue2.js +49 -0
  46. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue2.js.map +1 -0
  47. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue3.js +41 -0
  48. package/dist/esm/components/CnFlowDetail/CnFlowViewSwitch.vue3.js.map +1 -0
  49. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue.js +1 -1
  50. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js +116 -8
  51. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js.map +1 -1
  52. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js +110 -58
  53. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js.map +1 -1
  54. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js +78 -1
  55. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue2.js.map +1 -1
  56. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js +44 -3
  57. package/dist/esm/components/CnFlowsPage/CnFlowEditorPage.vue3.js.map +1 -1
  58. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue.js +1 -1
  59. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js +112 -1
  60. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue2.js.map +1 -1
  61. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js +53 -18
  62. package/dist/esm/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue3.js.map +1 -1
  63. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js +3 -3
  64. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue2.js.map +1 -1
  65. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js +108 -74
  66. package/dist/esm/components/CnIndexPage/CnIndexHeaderMenu.vue3.js.map +1 -1
  67. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +219 -83
  68. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  69. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +92 -58
  70. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  71. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
  72. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +56 -0
  73. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
  74. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js +185 -123
  75. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
  76. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue.js +1 -1
  77. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js +2 -0
  78. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue2.js.map +1 -1
  79. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js +2 -1
  80. package/dist/esm/components/CnObjectSidebar/CnFilesTab.vue3.js.map +1 -1
  81. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  82. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +197 -63
  83. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  84. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +244 -161
  85. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  86. package/dist/esm/components/CnSearchPage/CnSearchPage.vue.js +1 -1
  87. package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js +39 -1
  88. package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js.map +1 -1
  89. package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js +12 -2
  90. package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js.map +1 -1
  91. package/dist/esm/components/CnStepper/CnStepper.vue.js +1 -1
  92. package/dist/esm/components/CnStepper/CnStepper.vue2.js.map +1 -1
  93. package/dist/esm/components/CnStepper/CnStepper.vue3.js.map +1 -1
  94. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue.js +1 -1
  95. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js +51 -2
  96. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue2.js.map +1 -1
  97. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js +49 -11
  98. package/dist/esm/components/CnTaskFormFields/CnTaskFormFields.vue3.js.map +1 -1
  99. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js +9 -0
  100. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue.js.map +1 -0
  101. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js +328 -0
  102. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue2.js.map +1 -0
  103. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js +85 -0
  104. package/dist/esm/components/CnTaskFormWidget/CnTaskFormWidget.vue3.js.map +1 -0
  105. package/dist/esm/components/CnTaskFormWidget/index.js +24 -0
  106. package/dist/esm/components/CnTaskFormWidget/index.js.map +1 -0
  107. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue.js +1 -1
  108. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js +8 -2
  109. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue2.js.map +1 -1
  110. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js +16 -3
  111. package/dist/esm/components/CnTasksWidget/CnTasksWidget.vue3.js.map +1 -1
  112. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  113. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
  114. package/dist/esm/composables/indexSources.js +24 -4
  115. package/dist/esm/composables/indexSources.js.map +1 -1
  116. package/dist/esm/composables/useFlowStore.js +75 -4
  117. package/dist/esm/composables/useFlowStore.js.map +1 -1
  118. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue.js +1 -1
  119. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue2.js +17 -0
  120. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue2.js.map +1 -1
  121. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue3.js +9 -1
  122. package/dist/esm/dialogs/CnFlowEdgeEditModal.vue3.js.map +1 -1
  123. package/dist/esm/dialogs/CnFlowEditModal.vue.js +1 -1
  124. package/dist/esm/dialogs/CnFlowEditModal.vue2.js +15 -0
  125. package/dist/esm/dialogs/CnFlowEditModal.vue2.js.map +1 -1
  126. package/dist/esm/dialogs/CnFlowEditModal.vue3.js +13 -3
  127. package/dist/esm/dialogs/CnFlowEditModal.vue3.js.map +1 -1
  128. package/dist/esm/dialogs/CnFlowStepPickerModal.vue.js +1 -1
  129. package/dist/esm/dialogs/CnFlowStepPickerModal.vue2.js +13 -1
  130. package/dist/esm/dialogs/CnFlowStepPickerModal.vue2.js.map +1 -1
  131. package/dist/esm/dialogs/CnFlowStepPickerModal.vue3.js.map +1 -1
  132. package/dist/esm/index.js +3 -0
  133. package/dist/esm/index.js.map +1 -1
  134. package/dist/esm/l10n/en.json.js +52 -1
  135. package/dist/esm/l10n/en.json.js.map +1 -1
  136. package/dist/esm/l10n/nl.json.js +51 -1
  137. package/dist/esm/l10n/nl.json.js.map +1 -1
  138. package/dist/esm/library-style.js +1 -1
  139. package/dist/esm/nextcloud-vue.css +1203 -812
  140. package/dist/esm/utils/dialogWidths.js +6 -4
  141. package/dist/esm/utils/dialogWidths.js.map +1 -1
  142. package/dist/esm/utils/fieldPill.js +77 -0
  143. package/dist/esm/utils/fieldPill.js.map +1 -0
  144. package/dist/esm/utils/flowCondition.js +177 -0
  145. package/dist/esm/utils/flowCondition.js.map +1 -0
  146. package/dist/esm/utils/flowRunStatus.js +64 -1
  147. package/dist/esm/utils/flowRunStatus.js.map +1 -1
  148. package/dist/esm/utils/flowStepList.js +385 -0
  149. package/dist/esm/utils/flowStepList.js.map +1 -0
  150. package/dist/esm/utils/libraryWidgetKeys.js +1 -0
  151. package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
  152. package/dist/esm/utils/searchRefusal.js +35 -1
  153. package/dist/esm/utils/searchRefusal.js.map +1 -1
  154. package/dist/esm/utils/widgetDispatch.js +1 -1
  155. package/dist/esm/utils/widgetDispatch.js.map +1 -1
  156. package/dist/nextcloud-vue.cjs.js +14837 -11411
  157. package/dist/nextcloud-vue.cjs.js.map +2 -2
  158. package/dist/nextcloud-vue.css +1203 -812
  159. package/l10n/en.json +52 -1
  160. package/l10n/nl.json +51 -1
  161. package/package.json +1 -1
  162. package/src/components/CnActionDialog/CnActionDialog.vue +116 -9
  163. package/src/components/CnBuildiqEditButton/CnBuildiqEditButton.vue +12 -1
  164. package/src/components/CnCardNotices/CnCardNotices.vue +46 -8
  165. package/src/components/CnCellRenderer/CnCellRenderer.vue +8 -0
  166. package/src/components/CnFilesBrowser/CnFilesBrowser.vue +61 -2
  167. package/src/components/CnFilesBrowser/filesBrowserColumns.js +10 -4
  168. package/src/components/CnFlowDetail/CnFlowDetail.vue +110 -12
  169. package/src/components/CnFlowDetail/CnFlowDryRunResult.vue +163 -5
  170. package/src/components/CnFlowDetail/CnFlowStepList.vue +408 -0
  171. package/src/components/CnFlowDetail/CnFlowViewSwitch.vue +117 -0
  172. package/src/components/CnFlowDetail/index.js +2 -0
  173. package/src/components/CnFlowsPage/CnFlowBoard.vue +182 -25
  174. package/src/components/CnFlowsPage/CnFlowEditorPage.vue +101 -3
  175. package/src/components/CnGroupedCardsWidget/CnGroupedCardsWidget.vue +141 -1
  176. package/src/components/CnIndexPage/CnIndexHeaderMenu.vue +22 -4
  177. package/src/components/CnIndexPage/CnIndexPage.vue +172 -13
  178. package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +148 -4
  179. package/src/components/CnObjectSidebar/CnFilesTab.vue +3 -0
  180. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +310 -66
  181. package/src/components/CnSearchPage/CnSearchPage.vue +50 -1
  182. package/src/components/CnStepper/CnStepper.vue +14 -5
  183. package/src/components/CnTaskFormFields/CnTaskFormFields.md +1 -0
  184. package/src/components/CnTaskFormFields/CnTaskFormFields.vue +89 -3
  185. package/src/components/CnTaskFormWidget/CnTaskFormWidget.vue +400 -0
  186. package/src/components/CnTaskFormWidget/index.js +23 -0
  187. package/src/components/CnTasksWidget/CnTasksWidget.vue +17 -3
  188. package/src/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  189. package/src/components/index.js +2 -1
  190. package/src/composables/indexSources.js +24 -4
  191. package/src/composables/useFlowStore.js +75 -4
  192. package/src/css/index-page.css +10 -0
  193. package/src/dialogs/CnFlowEdgeEditModal.vue +28 -0
  194. package/src/dialogs/CnFlowEditModal.vue +26 -6
  195. package/src/dialogs/CnFlowStepPickerModal.vue +13 -1
  196. package/src/index.js +3 -0
  197. package/src/utils/dialogWidths.js +6 -4
  198. package/src/utils/fieldPill.js +73 -0
  199. package/src/utils/flowCondition.js +173 -0
  200. package/src/utils/flowRunStatus.js +63 -0
  201. package/src/utils/flowStepList.js +381 -0
  202. package/src/utils/libraryWidgetKeys.js +1 -0
  203. package/src/utils/searchRefusal.js +33 -0
  204. package/src/utils/widgetDispatch.js +1 -1
@@ -2,7 +2,7 @@ import script from './CnSearchPage.vue2.js';
2
2
  import { render } from './CnSearchPage.vue3.js';
3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-ae9b2ed8";
5
+ script.__scopeId = "data-v-2d4f8d83";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -1,4 +1,7 @@
1
+ import { parseAxiosError } from '../../utils/errors.js';
1
2
  import { labelLang } from '../../utils/manifestTranslate.js';
3
+ import { searchRefusalNotice, readSearchRefusal } from '../../utils/searchRefusal.js';
4
+ import __sfc_main from '../CnCardNotices/CnCardNotices.vue.js';
2
5
 
3
6
  /**
4
7
  * CnSearchPage — Search surface with a query input, a facet
@@ -26,6 +29,8 @@ import { labelLang } from '../../utils/manifestTranslate.js';
26
29
  var script = {
27
30
  name: 'CnSearchPage',
28
31
 
32
+ components: { CnCardNotices: __sfc_main },
33
+
29
34
  inject: {
30
35
  /** The label lookup from CnAppRoot, so manifest labels show in the user's language. */
31
36
  cnTranslate: { default: null },
@@ -97,6 +102,19 @@ var script = {
97
102
  default: (total, shown) => `Showing ${shown} of ${total} results.`,
98
103
  },
99
104
 
105
+ /**
106
+ * The words of a refused search (manifest `config.searchRefusal`):
107
+ * `{ title?, after? }`, the title with `{position}`. A `sources` search
108
+ * the server refuses for its grammar keeps the results it had and says
109
+ * so under the search field.
110
+ *
111
+ * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-the-search-page-says-a-refused-term-under-its-field
112
+ */
113
+ searchRefusal: {
114
+ type: Object,
115
+ default: null,
116
+ },
117
+
100
118
  /**
101
119
  * The lists the page searches itself (manifest `config.sources`). Each
102
120
  * `{ id?, label, register, schema, route?, titleField?, snippetField?,
@@ -123,10 +141,22 @@ var script = {
123
141
  sourceFacets: {},
124
142
  sourceLoading: false,
125
143
  sourceRun: 0,
144
+ // The latest `sources` search the server refused for its grammar.
145
+ refusal: null,
126
146
  }
127
147
  },
128
148
 
129
149
  computed: {
150
+ /**
151
+ * The refused search as a notice under the field, or null.
152
+ *
153
+ * @return {object|null}
154
+ * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-the-search-page-says-a-refused-term-under-its-field
155
+ */
156
+ refusalNotice() {
157
+ return this.refusal ? searchRefusalNotice(this.refusal, this.searchRefusal, (text) => this.shown(text)) : null
158
+ },
159
+
130
160
  /** @return {boolean} Whether the page searches its own `sources`. */
131
161
  searchesSources() {
132
162
  return Array.isArray(this.sources) && this.sources.some((source) => source && source.register && source.schema)
@@ -342,6 +372,7 @@ var script = {
342
372
  * keep what each found. A search started later wins over this one.
343
373
  *
344
374
  * @return {Promise<void>}
375
+ * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-the-search-page-says-a-refused-term-under-its-field
345
376
  */
346
377
  async searchSources() {
347
378
  const run = this.sourceRun + 1;
@@ -360,6 +391,11 @@ var script = {
360
391
  const rows = Array.isArray(data.results) ? data.results : [];
361
392
  return { source, rows, total: typeof data.total === 'number' ? data.total : rows.length }
362
393
  } catch (e) {
394
+ const { status, message, data } = parseAxiosError(e);
395
+ const refused = readSearchRefusal({ status, message, position: data && data.position }, this.localQuery);
396
+ if (refused) {
397
+ return { source, refused }
398
+ }
363
399
  // eslint-disable-next-line no-console
364
400
  console.warn('[CnSearchPage] could not search', source.schema, e);
365
401
  return { source, rows: [], total: 0 }
@@ -368,9 +404,11 @@ var script = {
368
404
  if (run !== this.sourceRun) {
369
405
  return
370
406
  }
407
+ const refusedRun = found.find((entry) => entry.refused);
408
+ this.refusal = refusedRun ? refusedRun.refused : null;
371
409
  const rows = { ...this.sourceRows };
372
410
  const totals = { ...this.sourceTotals };
373
- for (const { source, rows: list, total } of found) {
411
+ for (const { source, rows: list, total } of found.filter((entry) => !entry.refused)) {
374
412
  rows[source.key] = list.map((row) => this.resultOf(source, row));
375
413
  totals[source.key] = total;
376
414
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CnSearchPage.vue2.js","sources":["../../../../src/components/CnSearchPage/CnSearchPage.vue"],"sourcesContent":["<template>\n\t<div class=\"cn-search-page\" data-testid=\"cn-search-page\">\n\t\t<header class=\"cn-search-page__header\">\n\t\t\t<h2 v-if=\"title\" class=\"cn-search-page__title\" :lang=\"langOf(title)\">\n\t\t\t\t{{ shown(title) }}\n\t\t\t</h2>\n\t\t\t<form class=\"cn-search-page__query\" @submit.prevent=\"onQuerySubmit\">\n\t\t\t\t<input\n\t\t\t\t\tv-model=\"localQuery\"\n\t\t\t\t\ttype=\"search\"\n\t\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t\t\tclass=\"cn-search-page__input\"\n\t\t\t\t\tdata-testid=\"cn-search-page-input\"\n\t\t\t\t\t@input=\"onQueryInput\">\n\t\t\t\t<button type=\"submit\" class=\"cn-search-page__submit\">\n\t\t\t\t\t{{ searchLabel }}\n\t\t\t\t</button>\n\t\t\t</form>\n\t\t</header>\n\n\t\t<div class=\"cn-search-page__body\">\n\t\t\t<!-- Facet sidebar. -->\n\t\t\t<aside v-if=\"shownFacets.length > 0\" class=\"cn-search-page__facets\" data-testid=\"cn-search-page-facets\">\n\t\t\t\t<h3 class=\"cn-search-page__facets-title\">\n\t\t\t\t\t{{ facetsTitle }}\n\t\t\t\t</h3>\n\t\t\t\t<div v-for=\"facet in shownFacets\" :key=\"facet.key\" class=\"cn-search-page__facet\">\n\t\t\t\t\t<h4 class=\"cn-search-page__facet-title\">\n\t\t\t\t\t\t{{ shown(facet.label) || facet.key }}\n\t\t\t\t\t</h4>\n\t\t\t\t\t<ul class=\"cn-search-page__facet-options\">\n\t\t\t\t\t\t<li v-for=\"opt in facet.options\"\n\t\t\t\t\t\t\t:key=\"opt.value\"\n\t\t\t\t\t\t\tclass=\"cn-search-page__facet-option\">\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t:model-value=\"isFacetActive(facet.key, opt.value)\"\n\t\t\t\t\t\t\t\t\t:type=\"facet.multiple ? 'checkbox' : 'radio'\"\n\t\t\t\t\t\t\t\t\t:name=\"'facet-' + facet.key\"\n\t\t\t\t\t\t\t\t\t@change=\"toggleFacet(facet.key, opt.value, $event.target.checked, facet.multiple)\">\n\t\t\t\t\t\t\t\t<span>{{ shown(opt.label) || opt.value }}</span>\n\t\t\t\t\t\t\t\t<small v-if=\"typeof opt.count === 'number'\" class=\"cn-search-page__facet-count\">{{ opt.count }}</small>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<button v-if=\"hasActiveFacets\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-search-page__clear-facets\"\n\t\t\t\t\t@click=\"clearFacets\">\n\t\t\t\t\t{{ clearFacetsLabel }}\n\t\t\t\t</button>\n\t\t\t</aside>\n\n\t\t\t<!-- Results pane. -->\n\t\t\t<section class=\"cn-search-page__results\" data-testid=\"cn-search-page-results\">\n\t\t\t\t<div v-if=\"shownLoading\" class=\"cn-search-page__loading\">\n\t\t\t\t\t{{ loadingLabel }}\n\t\t\t\t</div>\n\t\t\t\t<ol v-else-if=\"shownResults.length > 0\" class=\"cn-search-page__list\">\n\t\t\t\t\t<li v-for=\"result in shownResults\"\n\t\t\t\t\t\t:key=\"result.id || (result.schema + ':' + (result.title || ''))\"\n\t\t\t\t\t\tclass=\"cn-search-page__result\"\n\t\t\t\t\t\t:data-result-id=\"result.id\"\n\t\t\t\t\t\t@click=\"onResultClick(result)\">\n\t\t\t\t\t\t<!-- @slot result Per-result body. Scope:\n\t\t\t\t\t\t { result }. Default renders title +\n\t\t\t\t\t\t snippet + schema badge. -->\n\t\t\t\t\t\t<slot name=\"result\" :result=\"result\">\n\t\t\t\t\t\t\t<div class=\"cn-search-page__result-head\">\n\t\t\t\t\t\t\t\t<span class=\"cn-search-page__result-title\">{{ result.title || result.id }}</span>\n\t\t\t\t\t\t\t\t<span v-if=\"result.schema\" class=\"cn-search-page__result-badge\">{{ result.schema }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<p v-if=\"result.snippet\" class=\"cn-search-page__result-snippet\">\n\t\t\t\t\t\t\t\t{{ result.snippet }}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<small v-if=\"result.subtitle\" class=\"cn-search-page__result-subtitle\">{{ result.subtitle }}</small>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</li>\n\t\t\t\t</ol>\n\t\t\t\t<p v-else-if=\"hasSearched\" class=\"cn-search-page__empty\">\n\t\t\t\t\t{{ emptyLabel }}\n\t\t\t\t</p>\n\t\t\t\t<p v-else-if=\"idleLabel\" class=\"cn-search-page__idle\">\n\t\t\t\t\t{{ idleLabel }}\n\t\t\t\t</p>\n\n\t\t\t\t<div v-if=\"shownTotal > 0 && shownTotal > shownResults.length\" class=\"cn-search-page__more\">\n\t\t\t\t\t{{ totalCountLabel(shownTotal, shownResults.length) }}\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { labelLang } from '../../utils/manifestTranslate.js'\n/**\n * CnSearchPage — Search surface with a query input, a facet\n * sidebar, and a results list. Mounted by CnPageRenderer when a\n * manifest page declares `type: 'search'`.\n *\n * The component owns the UI; consumers wire the actual search +\n * facet computation in `@query-change` and `@facets-change` (or use\n * the single `@search` event that fires on both). Cross-schema\n * search, full-text indexing, and facet aggregation are all\n * consumer-side.\n *\n * ```vue\n * <CnSearchPage\n * title=\"Search\"\n * :query=\"q\"\n * :facets=\"facets\"\n * :active-facets=\"activeFacets\"\n * :results=\"results\"\n * :total-count=\"total\"\n * :loading=\"loading\"\n * @search=\"onSearch\" />\n * ```\n */\nexport default {\n\tname: 'CnSearchPage',\n\n\tinject: {\n\t\t/** The label lookup from CnAppRoot, so manifest labels show in the user's language. */\n\t\tcnTranslate: { default: null },\n\t},\n\n\tprops: {\n\t\t/** Optional title rendered above the query input. */\n\t\ttitle: { type: String, default: 'Search' },\n\t\t/**\n\t\t * Controlled query string (v-model style). Falls back to\n\t\t * the local state when omitted; consumers can read the\n\t\t * current value via `@query-change`.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tquery: { type: String, default: '' },\n\t\t/** Query input placeholder. */\n\t\tplaceholder: { type: String, default: 'Search…' },\n\t\t/** Query input aria-label. */\n\t\tariaLabel: { type: String, default: 'Search input' },\n\t\t/** Submit-button label. */\n\t\tsearchLabel: { type: String, default: 'Search' },\n\t\t/**\n\t\t * Facet declarations. Each entry: `{ key, label?,\n\t\t * options: [{value, label?, count?}], multiple? }`.\n\t\t * Empty array hides the facet sidebar.\n\t\t *\n\t\t * @type {Array<{key:string,label?:string,options:Array,multiple?:boolean}>}\n\t\t */\n\t\tfacets: { type: Array, default: () => [] },\n\t\t/**\n\t\t * Controlled active-facets map (`{facetKey: [value, ...]}`).\n\t\t * Consumers persist this + push updates back; the widget\n\t\t * emits `@facets-change` with the new map.\n\t\t *\n\t\t * @type {Record<string,Array<string>>}\n\t\t */\n\t\tactiveFacets: { type: Object, default: () => ({}) },\n\t\t/**\n\t\t * Result entries. Each entry rendered through the `#result`\n\t\t * slot or the default `{title, snippet, schema, subtitle}`\n\t\t * shape.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tresults: { type: Array, default: () => [] },\n\t\t/** Total count of matching results (drives the \"more\" footer). */\n\t\ttotalCount: { type: Number, default: 0 },\n\t\t/** Show the loading state. */\n\t\tloading: { type: Boolean, default: false },\n\t\t/** Empty-state when a search ran but matched nothing. */\n\t\temptyLabel: { type: String, default: 'No matches found.' },\n\t\t/** Idle text shown before any search has run. Empty hides. */\n\t\tidleLabel: { type: String, default: 'Start typing to search.' },\n\t\t/** Loading-state text. */\n\t\tloadingLabel: { type: String, default: 'Searching…' },\n\t\t/** Facets sidebar header. */\n\t\tfacetsTitle: { type: String, default: 'Filters' },\n\t\t/** Clear-facets button label. */\n\t\tclearFacetsLabel: { type: String, default: 'Clear filters' },\n\t\t/**\n\t\t * Formatter for the \"Showing X of Y\" footer. Receives total\n\t\t * + shown counts and returns the rendered string.\n\t\t *\n\t\t * @type {(total:number, shown:number) => string}\n\t\t */\n\t\ttotalCountLabel: {\n\t\t\ttype: Function,\n\t\t\tdefault: (total, shown) => `Showing ${shown} of ${total} results.`,\n\t\t},\n\n\t\t/**\n\t\t * The lists the page searches itself (manifest `config.sources`). Each\n\t\t * `{ id?, label, register, schema, route?, titleField?, snippetField?,\n\t\t * limit? }`: one request per list with `_search`, results in the order\n\t\t * of the lists, and the lists offered as a Type filter with their\n\t\t * totals. `route` names the page a result opens, with its id. Empty\n\t\t * keeps the page controlled: `results` and `facets` come from props.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tsources: { type: Array, default: () => [] },\n\t\t/** The Type filter's heading when the page searches `sources`. */\n\t\ttypeLabel: { type: String, default: 'Type' },\n\t},\n\n\temits: ['facets-change', 'query-change', 'result-click', 'search', 'update:query'],\n\tdata() {\n\t\treturn {\n\t\t\tlocalQuery: this.query,\n\t\t\thasSearched: false,\n\t\t\t// What a `sources` search found, per list, and the filter it keeps.\n\t\t\tsourceRows: {},\n\t\t\tsourceTotals: {},\n\t\t\tsourceFacets: {},\n\t\t\tsourceLoading: false,\n\t\t\tsourceRun: 0,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {boolean} Whether the page searches its own `sources`. */\n\t\tsearchesSources() {\n\t\t\treturn Array.isArray(this.sources) && this.sources.some((source) => source && source.register && source.schema)\n\t\t},\n\n\t\t/** @return {Array<object>} The lists searched, each with its key. */\n\t\tsourceList() {\n\t\t\treturn (this.sources || [])\n\t\t\t\t.filter((source) => source && source.register && source.schema)\n\t\t\t\t.map((source) => ({ ...source, key: source.id || source.schema }))\n\t\t},\n\n\t\t/** @return {Record<string, Array<string>>} The active filter, the page's own when it searches `sources`. */\n\t\teffectiveFacets() {\n\t\t\treturn this.searchesSources ? this.sourceFacets : (this.activeFacets || {})\n\t\t},\n\n\t\t/** @return {Array<object>} The facets shown: the Type filter of the lists, else the `facets` prop. */\n\t\tshownFacets() {\n\t\t\tif (!this.searchesSources) {\n\t\t\t\treturn this.facets\n\t\t\t}\n\t\t\tif (!this.hasSearched) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn [{\n\t\t\t\tkey: 'type',\n\t\t\t\tlabel: this.typeLabel,\n\t\t\t\tmultiple: true,\n\t\t\t\toptions: this.sourceList.map((source) => ({\n\t\t\t\t\tvalue: source.key,\n\t\t\t\t\tlabel: source.label,\n\t\t\t\t\t...(typeof this.sourceTotals[source.key] === 'number' ? { count: this.sourceTotals[source.key] } : {}),\n\t\t\t\t})),\n\t\t\t}]\n\t\t},\n\n\t\t/** @return {Array<object>} The results shown. */\n\t\tshownResults() {\n\t\t\tif (!this.searchesSources) {\n\t\t\t\treturn this.results\n\t\t\t}\n\t\t\treturn this.activeSources.flatMap((source) => this.sourceRows[source.key] || [])\n\t\t},\n\n\t\t/** @return {number} The total of the results shown. */\n\t\tshownTotal() {\n\t\t\tif (!this.searchesSources) {\n\t\t\t\treturn this.totalCount\n\t\t\t}\n\t\t\treturn this.activeSources.reduce((sum, source) => sum + (this.sourceTotals[source.key] || 0), 0)\n\t\t},\n\n\t\t/** @return {boolean} Whether a search is running. */\n\t\tshownLoading() {\n\t\t\treturn this.searchesSources ? this.sourceLoading : this.loading\n\t\t},\n\n\t\t/** @return {Array<object>} The lists the Type filter leaves in, all when none is picked. */\n\t\tactiveSources() {\n\t\t\tconst picked = Array.isArray(this.effectiveFacets.type) ? this.effectiveFacets.type : []\n\t\t\treturn picked.length === 0 ? this.sourceList : this.sourceList.filter((source) => picked.includes(source.key))\n\t\t},\n\n\t\t/**\n\t\t * Whether any facet has at least one active value.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasActiveFacets() {\n\t\t\tfor (const k of Object.keys(this.effectiveFacets)) {\n\t\t\t\tif (Array.isArray(this.effectiveFacets[k]) && this.effectiveFacets[k].length > 0) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t},\n\n\twatch: {\n\t\tquery(next) {\n\t\t\tif (next !== this.localQuery) {\n\t\t\t\tthis.localQuery = next\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * A manifest label through the injected lookup, or as written.\n\t\t *\n\t\t * @param {string} text The label as written.\n\t\t * @return {string} The label in the user's language.\n\t\t */\n\t\tshown(text) {\n\t\t\treturn typeof this.cnTranslate === 'function' && typeof text === 'string' && text !== '' ? this.cnTranslate(text) : text\n\t\t},\n\n\t\t/**\n\t\t * The `lang` of a label that fell back to its written text in another language.\n\t\t *\n\t\t * @param {string} text The label as written.\n\t\t * @return {string|undefined} The source language, or undefined.\n\t\t */\n\t\tlangOf(text) {\n\t\t\treturn labelLang(this.cnTranslate, text) || undefined\n\t\t},\n\n\t\t/**\n\t\t * Whether a (facetKey, value) is currently active.\n\t\t *\n\t\t * @param {string} key Facet key.\n\t\t * @param {string} value Option value.\n\t\t * @return {boolean}\n\t\t */\n\t\tisFacetActive(key, value) {\n\t\t\tconst arr = this.effectiveFacets[key]\n\t\t\treturn Array.isArray(arr) && arr.includes(value)\n\t\t},\n\n\t\t/**\n\t\t * Toggle a facet option on/off and emit the new map.\n\t\t *\n\t\t * @param {string} key Facet key.\n\t\t * @param {string} value Option value.\n\t\t * @param {boolean} checked Checkbox state (radios pass true).\n\t\t * @param {boolean} multiple Whether the facet allows multi-select.\n\t\t * @return {void}\n\t\t */\n\t\ttoggleFacet(key, value, checked, multiple) {\n\t\t\tconst next = { ...this.effectiveFacets }\n\t\t\tif (!multiple) {\n\t\t\t\tnext[key] = checked ? [value] : []\n\t\t\t} else {\n\t\t\t\tconst cur = Array.isArray(next[key]) ? [...next[key]] : []\n\t\t\t\tconst idx = cur.indexOf(value)\n\t\t\t\tif (checked && idx < 0) {\n\t\t\t\t\tcur.push(value)\n\t\t\t\t} else if (!checked && idx >= 0) {\n\t\t\t\t\tcur.splice(idx, 1)\n\t\t\t\t}\n\t\t\t\tnext[key] = cur\n\t\t\t}\n\t\t\tthis.emitFacetsChange(next)\n\t\t},\n\n\t\t/**\n\t\t * Clear every facet.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tclearFacets() {\n\t\t\tthis.emitFacetsChange({})\n\t\t},\n\n\t\temitFacetsChange(next) {\n\t\t\t/**\n\t\t\t * @event facets-change Emitted on any facet toggle / clear.\n\t\t\t * @type {Record<string,Array<string>>}\n\t\t\t */\n\t\t\tthis.$emit('facets-change', next)\n\t\t\tif (this.searchesSources) {\n\t\t\t\tthis.sourceFacets = next\n\t\t\t}\n\t\t\tthis.emitSearch()\n\t\t},\n\n\t\t/**\n\t\t * Submit-button handler — propagates the latest query.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonQuerySubmit() {\n\t\t\tthis.emitQueryChange()\n\t\t\tthis.emitSearch()\n\t\t},\n\n\t\t/**\n\t\t * Live query-input handler — emits each keystroke (consumers\n\t\t * are responsible for debouncing).\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonQueryInput() {\n\t\t\tthis.emitQueryChange()\n\t\t},\n\n\t\temitQueryChange() {\n\t\t\t/**\n\t\t\t * @event query-change Emitted on every query mutation.\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('query-change', this.localQuery)\n\t\t\t/** v-model-friendly alias. */\n\t\t\tthis.$emit('update:query', this.localQuery)\n\t\t},\n\n\t\temitSearch() {\n\t\t\tthis.hasSearched = true\n\t\t\t/**\n\t\t\t * @event search Emitted on Submit or facet change.\n\t\t\t * Combines query + active facets.\n\t\t\t * @type {{ query: string, facets: Record<string,Array<string>> }}\n\t\t\t */\n\t\t\tthis.$emit('search', { query: this.localQuery, facets: { ...this.effectiveFacets } })\n\t\t\tif (this.searchesSources) {\n\t\t\t\tthis.searchSources()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Search the lists the Type filter leaves in, one request each, and\n\t\t * keep what each found. A search started later wins over this one.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync searchSources() {\n\t\t\tconst run = this.sourceRun + 1\n\t\t\tthis.sourceRun = run\n\t\t\tthis.sourceLoading = true\n\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\timport('@nextcloud/router'),\n\t\t\t])\n\t\t\tconst found = await Promise.all(this.activeSources.map(async (source) => {\n\t\t\t\tconst url = generateUrl('/apps/openregister/api/objects/{register}/{schema}', { register: source.register, schema: source.schema })\n\t\t\t\tconst limit = Number(source.limit) > 0 ? Math.floor(Number(source.limit)) : 10\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await axios.get(url, { params: { _search: this.localQuery, _limit: limit } })\n\t\t\t\t\tconst data = response && response.data ? response.data : {}\n\t\t\t\t\tconst rows = Array.isArray(data.results) ? data.results : []\n\t\t\t\t\treturn { source, rows, total: typeof data.total === 'number' ? data.total : rows.length }\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\tconsole.warn('[CnSearchPage] could not search', source.schema, e)\n\t\t\t\t\treturn { source, rows: [], total: 0 }\n\t\t\t\t}\n\t\t\t}))\n\t\t\tif (run !== this.sourceRun) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst rows = { ...this.sourceRows }\n\t\t\tconst totals = { ...this.sourceTotals }\n\t\t\tfor (const { source, rows: list, total } of found) {\n\t\t\t\trows[source.key] = list.map((row) => this.resultOf(source, row))\n\t\t\t\ttotals[source.key] = total\n\t\t\t}\n\t\t\tthis.sourceRows = rows\n\t\t\tthis.sourceTotals = totals\n\t\t\tthis.sourceLoading = false\n\t\t},\n\n\t\t/**\n\t\t * One found object as a result row.\n\t\t *\n\t\t * @param {object} source The list it came from.\n\t\t * @param {object} row The object.\n\t\t * @return {object} `{ id, title, snippet, schema, route }`.\n\t\t */\n\t\tresultOf(source, row) {\n\t\t\tconst id = row && (row.id || row['@self']?.id)\n\t\t\tconst titleField = source.titleField || ''\n\t\t\tconst title = (titleField && row[titleField]) || row.title || row.name || id\n\t\t\tconst snippet = source.snippetField ? row[source.snippetField] : undefined\n\t\t\treturn {\n\t\t\t\tid,\n\t\t\t\ttitle: typeof title === 'string' ? title : String(title ?? ''),\n\t\t\t\t...(typeof snippet === 'string' && snippet !== '' ? { snippet } : {}),\n\t\t\t\tschema: this.shown(source.label) || source.schema,\n\t\t\t\troute: source.route || '',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Forward a result click.\n\t\t *\n\t\t * @param {object} result The clicked result.\n\t\t * @return {void}\n\t\t */\n\t\tonResultClick(result) {\n\t\t\t/**\n\t\t\t * @event result-click Emitted on result-row click.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('result-click', result)\n\t\t\tif (this.searchesSources && result && result.route && result.id && this.$router) {\n\t\t\t\tthis.$router.push({ name: result.route, params: { id: result.id } })\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-search-page {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n\tpadding: 16px;\n}\n\n/* Reserve room for NcAppNavigationToggle (matches CnPageRenderer / CnPageHeader). */\n.cn-search-page__header {\n\tpadding-inline-start: 56px;\n}\n\n.cn-search-page__title {\n\tmargin: 0 0 8px;\n\tfont-size: 1.4em;\n}\n\n.cn-search-page__query {\n\tdisplay: flex;\n\tgap: 8px;\n}\n\n.cn-search-page__input {\n\tflex: 1 1 auto;\n\tpadding: 8px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tbackground: var(--color-main-background);\n\tfont-size: 1em;\n}\n\n.cn-search-page__submit {\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text, #fff);\n\tborder: none;\n\tpadding: 8px 16px;\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n}\n\n.cn-search-page__body {\n\tdisplay: grid;\n\tgrid-template-columns: 240px 1fr;\n\tgap: 16px;\n}\n\n.cn-search-page__body:has(:not(.cn-search-page__facets)) {\n\tgrid-template-columns: 1fr;\n}\n\n.cn-search-page__facets {\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tpadding: 12px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tbackground: var(--color-background-hover);\n}\n\n.cn-search-page__facets-title {\n\tmargin: 0;\n\tfont-size: 1em;\n}\n\n.cn-search-page__facet-title {\n\tmargin: 0 0 4px;\n\tfont-size: 0.9em;\n}\n\n.cn-search-page__facet-options {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-search-page__facet-option {\n\tdisplay: flex;\n\tgap: 4px;\n}\n\n.cn-search-page__facet-option label {\n\tdisplay: flex;\n\tgap: 6px;\n\talign-items: center;\n\tcursor: pointer;\n\tfont-size: 0.9em;\n}\n\n.cn-search-page__facet-count {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-search-page__clear-facets {\n\tbackground: none;\n\tborder: 1px solid var(--color-border);\n\tpadding: 4px 8px;\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n\tfont-size: 0.85em;\n\talign-self: flex-start;\n}\n\n.cn-search-page__list {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-search-page__result {\n\tpadding: 10px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n\tbackground: var(--color-main-background);\n}\n\n.cn-search-page__result:hover {\n\tbackground: var(--color-background-hover);\n}\n\n.cn-search-page__result-head {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tgap: 8px;\n}\n\n.cn-search-page__result-title {\n\tfont-weight: 600;\n}\n\n.cn-search-page__result-badge {\n\tfont-size: 0.75em;\n\tpadding: 1px 8px;\n\tborder-radius: 9999px;\n\tbackground: var(--color-background-hover);\n\tcolor: var(--color-text-maxcontrast);\n\ttext-transform: uppercase;\n\tletter-spacing: 0.05em;\n}\n\n.cn-search-page__result-snippet {\n\tmargin: 4px 0 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-search-page__result-subtitle {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-search-page__empty,\n.cn-search-page__idle,\n.cn-search-page__loading {\n\tcolor: var(--color-text-maxcontrast);\n\tmargin: 24px 0;\n\ttext-align: center;\n\tfont-style: italic;\n}\n\n.cn-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1
+ {"version":3,"file":"CnSearchPage.vue2.js","sources":["../../../../src/components/CnSearchPage/CnSearchPage.vue"],"sourcesContent":["<template>\n\t<div class=\"cn-search-page\" data-testid=\"cn-search-page\">\n\t\t<header class=\"cn-search-page__header\">\n\t\t\t<h2 v-if=\"title\" class=\"cn-search-page__title\" :lang=\"langOf(title)\">\n\t\t\t\t{{ shown(title) }}\n\t\t\t</h2>\n\t\t\t<form class=\"cn-search-page__query\" @submit.prevent=\"onQuerySubmit\">\n\t\t\t\t<input\n\t\t\t\t\tv-model=\"localQuery\"\n\t\t\t\t\ttype=\"search\"\n\t\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t\t\tclass=\"cn-search-page__input\"\n\t\t\t\t\tdata-testid=\"cn-search-page-input\"\n\t\t\t\t\t@input=\"onQueryInput\">\n\t\t\t\t<button type=\"submit\" class=\"cn-search-page__submit\">\n\t\t\t\t\t{{ searchLabel }}\n\t\t\t\t</button>\n\t\t\t</form>\n\t\t\t<!-- A term the server could not read: said under the field, the\n\t\t\t results of the last readable term kept. -->\n\t\t\t<CnCardNotices\n\t\t\t\tv-if=\"refusalNotice\"\n\t\t\t\tclass=\"cn-search-page__refusal\"\n\t\t\t\t:notices=\"[refusalNotice]\"\n\t\t\t\tdata-testid=\"cn-search-page-refusal\" />\n\t\t</header>\n\n\t\t<div class=\"cn-search-page__body\">\n\t\t\t<!-- Facet sidebar. -->\n\t\t\t<aside v-if=\"shownFacets.length > 0\" class=\"cn-search-page__facets\" data-testid=\"cn-search-page-facets\">\n\t\t\t\t<h3 class=\"cn-search-page__facets-title\">\n\t\t\t\t\t{{ facetsTitle }}\n\t\t\t\t</h3>\n\t\t\t\t<div v-for=\"facet in shownFacets\" :key=\"facet.key\" class=\"cn-search-page__facet\">\n\t\t\t\t\t<h4 class=\"cn-search-page__facet-title\">\n\t\t\t\t\t\t{{ shown(facet.label) || facet.key }}\n\t\t\t\t\t</h4>\n\t\t\t\t\t<ul class=\"cn-search-page__facet-options\">\n\t\t\t\t\t\t<li v-for=\"opt in facet.options\"\n\t\t\t\t\t\t\t:key=\"opt.value\"\n\t\t\t\t\t\t\tclass=\"cn-search-page__facet-option\">\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t:model-value=\"isFacetActive(facet.key, opt.value)\"\n\t\t\t\t\t\t\t\t\t:type=\"facet.multiple ? 'checkbox' : 'radio'\"\n\t\t\t\t\t\t\t\t\t:name=\"'facet-' + facet.key\"\n\t\t\t\t\t\t\t\t\t@change=\"toggleFacet(facet.key, opt.value, $event.target.checked, facet.multiple)\">\n\t\t\t\t\t\t\t\t<span>{{ shown(opt.label) || opt.value }}</span>\n\t\t\t\t\t\t\t\t<small v-if=\"typeof opt.count === 'number'\" class=\"cn-search-page__facet-count\">{{ opt.count }}</small>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<button v-if=\"hasActiveFacets\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-search-page__clear-facets\"\n\t\t\t\t\t@click=\"clearFacets\">\n\t\t\t\t\t{{ clearFacetsLabel }}\n\t\t\t\t</button>\n\t\t\t</aside>\n\n\t\t\t<!-- Results pane. -->\n\t\t\t<section class=\"cn-search-page__results\" data-testid=\"cn-search-page-results\">\n\t\t\t\t<div v-if=\"shownLoading\" class=\"cn-search-page__loading\">\n\t\t\t\t\t{{ loadingLabel }}\n\t\t\t\t</div>\n\t\t\t\t<ol v-else-if=\"shownResults.length > 0\" class=\"cn-search-page__list\">\n\t\t\t\t\t<li v-for=\"result in shownResults\"\n\t\t\t\t\t\t:key=\"result.id || (result.schema + ':' + (result.title || ''))\"\n\t\t\t\t\t\tclass=\"cn-search-page__result\"\n\t\t\t\t\t\t:data-result-id=\"result.id\"\n\t\t\t\t\t\t@click=\"onResultClick(result)\">\n\t\t\t\t\t\t<!-- @slot result Per-result body. Scope:\n\t\t\t\t\t\t { result }. Default renders title +\n\t\t\t\t\t\t snippet + schema badge. -->\n\t\t\t\t\t\t<slot name=\"result\" :result=\"result\">\n\t\t\t\t\t\t\t<div class=\"cn-search-page__result-head\">\n\t\t\t\t\t\t\t\t<span class=\"cn-search-page__result-title\">{{ result.title || result.id }}</span>\n\t\t\t\t\t\t\t\t<span v-if=\"result.schema\" class=\"cn-search-page__result-badge\">{{ result.schema }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<p v-if=\"result.snippet\" class=\"cn-search-page__result-snippet\">\n\t\t\t\t\t\t\t\t{{ result.snippet }}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<small v-if=\"result.subtitle\" class=\"cn-search-page__result-subtitle\">{{ result.subtitle }}</small>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</li>\n\t\t\t\t</ol>\n\t\t\t\t<p v-else-if=\"hasSearched\" class=\"cn-search-page__empty\">\n\t\t\t\t\t{{ emptyLabel }}\n\t\t\t\t</p>\n\t\t\t\t<p v-else-if=\"idleLabel\" class=\"cn-search-page__idle\">\n\t\t\t\t\t{{ idleLabel }}\n\t\t\t\t</p>\n\n\t\t\t\t<div v-if=\"shownTotal > 0 && shownTotal > shownResults.length\" class=\"cn-search-page__more\">\n\t\t\t\t\t{{ totalCountLabel(shownTotal, shownResults.length) }}\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { parseAxiosError } from '../../utils/errors.js'\nimport { labelLang } from '../../utils/manifestTranslate.js'\nimport { readSearchRefusal, searchRefusalNotice } from '../../utils/searchRefusal.js'\nimport { CnCardNotices } from '../CnCardNotices/index.js'\n/**\n * CnSearchPage — Search surface with a query input, a facet\n * sidebar, and a results list. Mounted by CnPageRenderer when a\n * manifest page declares `type: 'search'`.\n *\n * The component owns the UI; consumers wire the actual search +\n * facet computation in `@query-change` and `@facets-change` (or use\n * the single `@search` event that fires on both). Cross-schema\n * search, full-text indexing, and facet aggregation are all\n * consumer-side.\n *\n * ```vue\n * <CnSearchPage\n * title=\"Search\"\n * :query=\"q\"\n * :facets=\"facets\"\n * :active-facets=\"activeFacets\"\n * :results=\"results\"\n * :total-count=\"total\"\n * :loading=\"loading\"\n * @search=\"onSearch\" />\n * ```\n */\nexport default {\n\tname: 'CnSearchPage',\n\n\tcomponents: { CnCardNotices },\n\n\tinject: {\n\t\t/** The label lookup from CnAppRoot, so manifest labels show in the user's language. */\n\t\tcnTranslate: { default: null },\n\t},\n\n\tprops: {\n\t\t/** Optional title rendered above the query input. */\n\t\ttitle: { type: String, default: 'Search' },\n\t\t/**\n\t\t * Controlled query string (v-model style). Falls back to\n\t\t * the local state when omitted; consumers can read the\n\t\t * current value via `@query-change`.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tquery: { type: String, default: '' },\n\t\t/** Query input placeholder. */\n\t\tplaceholder: { type: String, default: 'Search…' },\n\t\t/** Query input aria-label. */\n\t\tariaLabel: { type: String, default: 'Search input' },\n\t\t/** Submit-button label. */\n\t\tsearchLabel: { type: String, default: 'Search' },\n\t\t/**\n\t\t * Facet declarations. Each entry: `{ key, label?,\n\t\t * options: [{value, label?, count?}], multiple? }`.\n\t\t * Empty array hides the facet sidebar.\n\t\t *\n\t\t * @type {Array<{key:string,label?:string,options:Array,multiple?:boolean}>}\n\t\t */\n\t\tfacets: { type: Array, default: () => [] },\n\t\t/**\n\t\t * Controlled active-facets map (`{facetKey: [value, ...]}`).\n\t\t * Consumers persist this + push updates back; the widget\n\t\t * emits `@facets-change` with the new map.\n\t\t *\n\t\t * @type {Record<string,Array<string>>}\n\t\t */\n\t\tactiveFacets: { type: Object, default: () => ({}) },\n\t\t/**\n\t\t * Result entries. Each entry rendered through the `#result`\n\t\t * slot or the default `{title, snippet, schema, subtitle}`\n\t\t * shape.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tresults: { type: Array, default: () => [] },\n\t\t/** Total count of matching results (drives the \"more\" footer). */\n\t\ttotalCount: { type: Number, default: 0 },\n\t\t/** Show the loading state. */\n\t\tloading: { type: Boolean, default: false },\n\t\t/** Empty-state when a search ran but matched nothing. */\n\t\temptyLabel: { type: String, default: 'No matches found.' },\n\t\t/** Idle text shown before any search has run. Empty hides. */\n\t\tidleLabel: { type: String, default: 'Start typing to search.' },\n\t\t/** Loading-state text. */\n\t\tloadingLabel: { type: String, default: 'Searching…' },\n\t\t/** Facets sidebar header. */\n\t\tfacetsTitle: { type: String, default: 'Filters' },\n\t\t/** Clear-facets button label. */\n\t\tclearFacetsLabel: { type: String, default: 'Clear filters' },\n\t\t/**\n\t\t * Formatter for the \"Showing X of Y\" footer. Receives total\n\t\t * + shown counts and returns the rendered string.\n\t\t *\n\t\t * @type {(total:number, shown:number) => string}\n\t\t */\n\t\ttotalCountLabel: {\n\t\t\ttype: Function,\n\t\t\tdefault: (total, shown) => `Showing ${shown} of ${total} results.`,\n\t\t},\n\n\t\t/**\n\t\t * The words of a refused search (manifest `config.searchRefusal`):\n\t\t * `{ title?, after? }`, the title with `{position}`. A `sources` search\n\t\t * the server refuses for its grammar keeps the results it had and says\n\t\t * so under the search field.\n\t\t *\n\t\t * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-the-search-page-says-a-refused-term-under-its-field\n\t\t */\n\t\tsearchRefusal: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The lists the page searches itself (manifest `config.sources`). Each\n\t\t * `{ id?, label, register, schema, route?, titleField?, snippetField?,\n\t\t * limit? }`: one request per list with `_search`, results in the order\n\t\t * of the lists, and the lists offered as a Type filter with their\n\t\t * totals. `route` names the page a result opens, with its id. Empty\n\t\t * keeps the page controlled: `results` and `facets` come from props.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tsources: { type: Array, default: () => [] },\n\t\t/** The Type filter's heading when the page searches `sources`. */\n\t\ttypeLabel: { type: String, default: 'Type' },\n\t},\n\n\temits: ['facets-change', 'query-change', 'result-click', 'search', 'update:query'],\n\tdata() {\n\t\treturn {\n\t\t\tlocalQuery: this.query,\n\t\t\thasSearched: false,\n\t\t\t// What a `sources` search found, per list, and the filter it keeps.\n\t\t\tsourceRows: {},\n\t\t\tsourceTotals: {},\n\t\t\tsourceFacets: {},\n\t\t\tsourceLoading: false,\n\t\t\tsourceRun: 0,\n\t\t\t// The latest `sources` search the server refused for its grammar.\n\t\t\trefusal: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The refused search as a notice under the field, or null.\n\t\t *\n\t\t * @return {object|null}\n\t\t * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-the-search-page-says-a-refused-term-under-its-field\n\t\t */\n\t\trefusalNotice() {\n\t\t\treturn this.refusal ? searchRefusalNotice(this.refusal, this.searchRefusal, (text) => this.shown(text)) : null\n\t\t},\n\n\t\t/** @return {boolean} Whether the page searches its own `sources`. */\n\t\tsearchesSources() {\n\t\t\treturn Array.isArray(this.sources) && this.sources.some((source) => source && source.register && source.schema)\n\t\t},\n\n\t\t/** @return {Array<object>} The lists searched, each with its key. */\n\t\tsourceList() {\n\t\t\treturn (this.sources || [])\n\t\t\t\t.filter((source) => source && source.register && source.schema)\n\t\t\t\t.map((source) => ({ ...source, key: source.id || source.schema }))\n\t\t},\n\n\t\t/** @return {Record<string, Array<string>>} The active filter, the page's own when it searches `sources`. */\n\t\teffectiveFacets() {\n\t\t\treturn this.searchesSources ? this.sourceFacets : (this.activeFacets || {})\n\t\t},\n\n\t\t/** @return {Array<object>} The facets shown: the Type filter of the lists, else the `facets` prop. */\n\t\tshownFacets() {\n\t\t\tif (!this.searchesSources) {\n\t\t\t\treturn this.facets\n\t\t\t}\n\t\t\tif (!this.hasSearched) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn [{\n\t\t\t\tkey: 'type',\n\t\t\t\tlabel: this.typeLabel,\n\t\t\t\tmultiple: true,\n\t\t\t\toptions: this.sourceList.map((source) => ({\n\t\t\t\t\tvalue: source.key,\n\t\t\t\t\tlabel: source.label,\n\t\t\t\t\t...(typeof this.sourceTotals[source.key] === 'number' ? { count: this.sourceTotals[source.key] } : {}),\n\t\t\t\t})),\n\t\t\t}]\n\t\t},\n\n\t\t/** @return {Array<object>} The results shown. */\n\t\tshownResults() {\n\t\t\tif (!this.searchesSources) {\n\t\t\t\treturn this.results\n\t\t\t}\n\t\t\treturn this.activeSources.flatMap((source) => this.sourceRows[source.key] || [])\n\t\t},\n\n\t\t/** @return {number} The total of the results shown. */\n\t\tshownTotal() {\n\t\t\tif (!this.searchesSources) {\n\t\t\t\treturn this.totalCount\n\t\t\t}\n\t\t\treturn this.activeSources.reduce((sum, source) => sum + (this.sourceTotals[source.key] || 0), 0)\n\t\t},\n\n\t\t/** @return {boolean} Whether a search is running. */\n\t\tshownLoading() {\n\t\t\treturn this.searchesSources ? this.sourceLoading : this.loading\n\t\t},\n\n\t\t/** @return {Array<object>} The lists the Type filter leaves in, all when none is picked. */\n\t\tactiveSources() {\n\t\t\tconst picked = Array.isArray(this.effectiveFacets.type) ? this.effectiveFacets.type : []\n\t\t\treturn picked.length === 0 ? this.sourceList : this.sourceList.filter((source) => picked.includes(source.key))\n\t\t},\n\n\t\t/**\n\t\t * Whether any facet has at least one active value.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasActiveFacets() {\n\t\t\tfor (const k of Object.keys(this.effectiveFacets)) {\n\t\t\t\tif (Array.isArray(this.effectiveFacets[k]) && this.effectiveFacets[k].length > 0) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t},\n\n\twatch: {\n\t\tquery(next) {\n\t\t\tif (next !== this.localQuery) {\n\t\t\t\tthis.localQuery = next\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * A manifest label through the injected lookup, or as written.\n\t\t *\n\t\t * @param {string} text The label as written.\n\t\t * @return {string} The label in the user's language.\n\t\t */\n\t\tshown(text) {\n\t\t\treturn typeof this.cnTranslate === 'function' && typeof text === 'string' && text !== '' ? this.cnTranslate(text) : text\n\t\t},\n\n\t\t/**\n\t\t * The `lang` of a label that fell back to its written text in another language.\n\t\t *\n\t\t * @param {string} text The label as written.\n\t\t * @return {string|undefined} The source language, or undefined.\n\t\t */\n\t\tlangOf(text) {\n\t\t\treturn labelLang(this.cnTranslate, text) || undefined\n\t\t},\n\n\t\t/**\n\t\t * Whether a (facetKey, value) is currently active.\n\t\t *\n\t\t * @param {string} key Facet key.\n\t\t * @param {string} value Option value.\n\t\t * @return {boolean}\n\t\t */\n\t\tisFacetActive(key, value) {\n\t\t\tconst arr = this.effectiveFacets[key]\n\t\t\treturn Array.isArray(arr) && arr.includes(value)\n\t\t},\n\n\t\t/**\n\t\t * Toggle a facet option on/off and emit the new map.\n\t\t *\n\t\t * @param {string} key Facet key.\n\t\t * @param {string} value Option value.\n\t\t * @param {boolean} checked Checkbox state (radios pass true).\n\t\t * @param {boolean} multiple Whether the facet allows multi-select.\n\t\t * @return {void}\n\t\t */\n\t\ttoggleFacet(key, value, checked, multiple) {\n\t\t\tconst next = { ...this.effectiveFacets }\n\t\t\tif (!multiple) {\n\t\t\t\tnext[key] = checked ? [value] : []\n\t\t\t} else {\n\t\t\t\tconst cur = Array.isArray(next[key]) ? [...next[key]] : []\n\t\t\t\tconst idx = cur.indexOf(value)\n\t\t\t\tif (checked && idx < 0) {\n\t\t\t\t\tcur.push(value)\n\t\t\t\t} else if (!checked && idx >= 0) {\n\t\t\t\t\tcur.splice(idx, 1)\n\t\t\t\t}\n\t\t\t\tnext[key] = cur\n\t\t\t}\n\t\t\tthis.emitFacetsChange(next)\n\t\t},\n\n\t\t/**\n\t\t * Clear every facet.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tclearFacets() {\n\t\t\tthis.emitFacetsChange({})\n\t\t},\n\n\t\temitFacetsChange(next) {\n\t\t\t/**\n\t\t\t * @event facets-change Emitted on any facet toggle / clear.\n\t\t\t * @type {Record<string,Array<string>>}\n\t\t\t */\n\t\t\tthis.$emit('facets-change', next)\n\t\t\tif (this.searchesSources) {\n\t\t\t\tthis.sourceFacets = next\n\t\t\t}\n\t\t\tthis.emitSearch()\n\t\t},\n\n\t\t/**\n\t\t * Submit-button handler — propagates the latest query.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonQuerySubmit() {\n\t\t\tthis.emitQueryChange()\n\t\t\tthis.emitSearch()\n\t\t},\n\n\t\t/**\n\t\t * Live query-input handler — emits each keystroke (consumers\n\t\t * are responsible for debouncing).\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonQueryInput() {\n\t\t\tthis.emitQueryChange()\n\t\t},\n\n\t\temitQueryChange() {\n\t\t\t/**\n\t\t\t * @event query-change Emitted on every query mutation.\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('query-change', this.localQuery)\n\t\t\t/** v-model-friendly alias. */\n\t\t\tthis.$emit('update:query', this.localQuery)\n\t\t},\n\n\t\temitSearch() {\n\t\t\tthis.hasSearched = true\n\t\t\t/**\n\t\t\t * @event search Emitted on Submit or facet change.\n\t\t\t * Combines query + active facets.\n\t\t\t * @type {{ query: string, facets: Record<string,Array<string>> }}\n\t\t\t */\n\t\t\tthis.$emit('search', { query: this.localQuery, facets: { ...this.effectiveFacets } })\n\t\t\tif (this.searchesSources) {\n\t\t\t\tthis.searchSources()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Search the lists the Type filter leaves in, one request each, and\n\t\t * keep what each found. A search started later wins over this one.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-the-search-page-says-a-refused-term-under-its-field\n\t\t */\n\t\tasync searchSources() {\n\t\t\tconst run = this.sourceRun + 1\n\t\t\tthis.sourceRun = run\n\t\t\tthis.sourceLoading = true\n\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\timport('@nextcloud/router'),\n\t\t\t])\n\t\t\tconst found = await Promise.all(this.activeSources.map(async (source) => {\n\t\t\t\tconst url = generateUrl('/apps/openregister/api/objects/{register}/{schema}', { register: source.register, schema: source.schema })\n\t\t\t\tconst limit = Number(source.limit) > 0 ? Math.floor(Number(source.limit)) : 10\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await axios.get(url, { params: { _search: this.localQuery, _limit: limit } })\n\t\t\t\t\tconst data = response && response.data ? response.data : {}\n\t\t\t\t\tconst rows = Array.isArray(data.results) ? data.results : []\n\t\t\t\t\treturn { source, rows, total: typeof data.total === 'number' ? data.total : rows.length }\n\t\t\t\t} catch (e) {\n\t\t\t\t\tconst { status, message, data } = parseAxiosError(e)\n\t\t\t\t\tconst refused = readSearchRefusal({ status, message, position: data && data.position }, this.localQuery)\n\t\t\t\t\tif (refused) {\n\t\t\t\t\t\treturn { source, refused }\n\t\t\t\t\t}\n\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\tconsole.warn('[CnSearchPage] could not search', source.schema, e)\n\t\t\t\t\treturn { source, rows: [], total: 0 }\n\t\t\t\t}\n\t\t\t}))\n\t\t\tif (run !== this.sourceRun) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst refusedRun = found.find((entry) => entry.refused)\n\t\t\tthis.refusal = refusedRun ? refusedRun.refused : null\n\t\t\tconst rows = { ...this.sourceRows }\n\t\t\tconst totals = { ...this.sourceTotals }\n\t\t\tfor (const { source, rows: list, total } of found.filter((entry) => !entry.refused)) {\n\t\t\t\trows[source.key] = list.map((row) => this.resultOf(source, row))\n\t\t\t\ttotals[source.key] = total\n\t\t\t}\n\t\t\tthis.sourceRows = rows\n\t\t\tthis.sourceTotals = totals\n\t\t\tthis.sourceLoading = false\n\t\t},\n\n\t\t/**\n\t\t * One found object as a result row.\n\t\t *\n\t\t * @param {object} source The list it came from.\n\t\t * @param {object} row The object.\n\t\t * @return {object} `{ id, title, snippet, schema, route }`.\n\t\t */\n\t\tresultOf(source, row) {\n\t\t\tconst id = row && (row.id || row['@self']?.id)\n\t\t\tconst titleField = source.titleField || ''\n\t\t\tconst title = (titleField && row[titleField]) || row.title || row.name || id\n\t\t\tconst snippet = source.snippetField ? row[source.snippetField] : undefined\n\t\t\treturn {\n\t\t\t\tid,\n\t\t\t\ttitle: typeof title === 'string' ? title : String(title ?? ''),\n\t\t\t\t...(typeof snippet === 'string' && snippet !== '' ? { snippet } : {}),\n\t\t\t\tschema: this.shown(source.label) || source.schema,\n\t\t\t\troute: source.route || '',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Forward a result click.\n\t\t *\n\t\t * @param {object} result The clicked result.\n\t\t * @return {void}\n\t\t */\n\t\tonResultClick(result) {\n\t\t\t/**\n\t\t\t * @event result-click Emitted on result-row click.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('result-click', result)\n\t\t\tif (this.searchesSources && result && result.route && result.id && this.$router) {\n\t\t\t\tthis.$router.push({ name: result.route, params: { id: result.id } })\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-search-page {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n\tpadding: 16px;\n}\n\n/* Reserve room for NcAppNavigationToggle (matches CnPageRenderer / CnPageHeader). */\n.cn-search-page__header {\n\tpadding-inline-start: 56px;\n}\n\n.cn-search-page__refusal {\n\tmargin-block-start: 8px;\n}\n\n.cn-search-page__title {\n\tmargin: 0 0 8px;\n\tfont-size: 1.4em;\n}\n\n.cn-search-page__query {\n\tdisplay: flex;\n\tgap: 8px;\n}\n\n.cn-search-page__input {\n\tflex: 1 1 auto;\n\tpadding: 8px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tbackground: var(--color-main-background);\n\tfont-size: 1em;\n}\n\n.cn-search-page__submit {\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text, #fff);\n\tborder: none;\n\tpadding: 8px 16px;\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n}\n\n.cn-search-page__body {\n\tdisplay: grid;\n\tgrid-template-columns: 240px 1fr;\n\tgap: 16px;\n}\n\n.cn-search-page__body:has(:not(.cn-search-page__facets)) {\n\tgrid-template-columns: 1fr;\n}\n\n.cn-search-page__facets {\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tpadding: 12px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tbackground: var(--color-background-hover);\n}\n\n.cn-search-page__facets-title {\n\tmargin: 0;\n\tfont-size: 1em;\n}\n\n.cn-search-page__facet-title {\n\tmargin: 0 0 4px;\n\tfont-size: 0.9em;\n}\n\n.cn-search-page__facet-options {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-search-page__facet-option {\n\tdisplay: flex;\n\tgap: 4px;\n}\n\n.cn-search-page__facet-option label {\n\tdisplay: flex;\n\tgap: 6px;\n\talign-items: center;\n\tcursor: pointer;\n\tfont-size: 0.9em;\n}\n\n.cn-search-page__facet-count {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-search-page__clear-facets {\n\tbackground: none;\n\tborder: 1px solid var(--color-border);\n\tpadding: 4px 8px;\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n\tfont-size: 0.85em;\n\talign-self: flex-start;\n}\n\n.cn-search-page__list {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-search-page__result {\n\tpadding: 10px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n\tbackground: var(--color-main-background);\n}\n\n.cn-search-page__result:hover {\n\tbackground: var(--color-background-hover);\n}\n\n.cn-search-page__result-head {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tgap: 8px;\n}\n\n.cn-search-page__result-title {\n\tfont-weight: 600;\n}\n\n.cn-search-page__result-badge {\n\tfont-size: 0.75em;\n\tpadding: 1px 8px;\n\tborder-radius: 9999px;\n\tbackground: var(--color-background-hover);\n\tcolor: var(--color-text-maxcontrast);\n\ttext-transform: uppercase;\n\tletter-spacing: 0.05em;\n}\n\n.cn-search-page__result-snippet {\n\tmargin: 4px 0 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-search-page__result-subtitle {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-search-page__empty,\n.cn-search-page__idle,\n.cn-search-page__loading {\n\tcolor: var(--color-text-maxcontrast);\n\tmargin: 24px 0;\n\ttext-align: center;\n\tfont-style: italic;\n}\n\n.cn-search-page__more {\n\tmargin-top: 12px;\n\tcolor: var(--color-text-maxcontrast);\n\ttext-align: center;\n}\n</style>\n"],"names":["CnCardNotices"],"mappings":";;;;;AA4GA;;;AAGC;AACA;;;;;AAKA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,cAAc;;CAEpB,UAAU,EAAE,iBAAEA,UAAY,EAAG;;AAE7B,CAAA,MAAM,EAAE;AACP;EACA,WAAW,EAAE,EAAE,OAAO,EAAE,IAAG,EAAG;EAC9B;;AAED,CAAA,KAAK,EAAE;AACN;AACA,EAAA,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU;AAC1C;;AAEC;AACA;AACA;;;AAGD,EAAA,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAC,EAAG;;AAEpC,EAAA,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW;;AAEjD,EAAA,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB;;AAEpD,EAAA,WAAW,EAAE,EAAE,IAAI,EA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;IAChF,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAG,EAAA,EAAG,EAAA;AACpE,IAAA;GACA;EACD;AACF;;;;"}
@@ -1,4 +1,4 @@
1
- import { openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, withModifiers, withDirectives, vModelText, Fragment, renderList, renderSlot } from 'vue';
1
+ import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, withModifiers, withDirectives, vModelText, createBlock, Fragment, renderList, renderSlot } from 'vue';
2
2
 
3
3
  const _hoisted_1 = {
4
4
  class: "cn-search-page",
@@ -66,6 +66,8 @@ const _hoisted_24 = {
66
66
  };
67
67
 
68
68
  function render(_ctx, _cache, $props, $setup, $data, $options) {
69
+ const _component_CnCardNotices = resolveComponent("CnCardNotices");
70
+
69
71
  return (openBlock(), createElementBlock("div", _hoisted_1, [
70
72
  createElementVNode("header", _hoisted_2, [
71
73
  ($props.title)
@@ -91,7 +93,15 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
91
93
  [vModelText, $data.localQuery]
92
94
  ]),
93
95
  createElementVNode("button", _hoisted_5, toDisplayString($props.searchLabel), 1 /* TEXT */)
94
- ], 32 /* NEED_HYDRATION */)
96
+ ], 32 /* NEED_HYDRATION */),
97
+ ($options.refusalNotice)
98
+ ? (openBlock(), createBlock(_component_CnCardNotices, {
99
+ key: 1,
100
+ class: "cn-search-page__refusal",
101
+ notices: [$options.refusalNotice],
102
+ "data-testid": "cn-search-page-refusal"
103
+ }, null, 8 /* PROPS */, ["notices"]))
104
+ : createCommentVNode("v-if", true)
95
105
  ]),
96
106
  createElementVNode("div", _hoisted_6, [
97
107
  ($options.shownFacets.length > 0)
@@ -1 +1 @@
1
- {"version":3,"file":"CnSearchPage.vue3.js","sources":["../../../../src/components/CnSearchPage/CnSearchPage.vue?vue&type=template&id=ae9b2ed8&lang.js"],"sourcesContent":["<template>\n\t<div class=\"cn-search-page\" data-testid=\"cn-search-page\">\n\t\t<header class=\"cn-search-page__header\">\n\t\t\t<h2 v-if=\"title\" class=\"cn-search-page__title\" :lang=\"langOf(title)\">\n\t\t\t\t{{ shown(title) }}\n\t\t\t</h2>\n\t\t\t<form class=\"cn-search-page__query\" @submit.prevent=\"onQuerySubmit\">\n\t\t\t\t<input\n\t\t\t\t\tv-model=\"localQuery\"\n\t\t\t\t\ttype=\"search\"\n\t\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t\t\tclass=\"cn-search-page__input\"\n\t\t\t\t\tdata-testid=\"cn-search-page-input\"\n\t\t\t\t\t@input=\"onQueryInput\">\n\t\t\t\t<button type=\"submit\" class=\"cn-search-page__submit\">\n\t\t\t\t\t{{ searchLabel }}\n\t\t\t\t</button>\n\t\t\t</form>\n\t\t</header>\n\n\t\t<div class=\"cn-search-page__body\">\n\t\t\t<!-- Facet sidebar. -->\n\t\t\t<aside v-if=\"shownFacets.length > 0\" class=\"cn-search-page__facets\" data-testid=\"cn-search-page-facets\">\n\t\t\t\t<h3 class=\"cn-search-page__facets-title\">\n\t\t\t\t\t{{ facetsTitle }}\n\t\t\t\t</h3>\n\t\t\t\t<div v-for=\"facet in shownFacets\" :key=\"facet.key\" class=\"cn-search-page__facet\">\n\t\t\t\t\t<h4 class=\"cn-search-page__facet-title\">\n\t\t\t\t\t\t{{ shown(facet.label) || facet.key }}\n\t\t\t\t\t</h4>\n\t\t\t\t\t<ul class=\"cn-search-page__facet-options\">\n\t\t\t\t\t\t<li v-for=\"opt in facet.options\"\n\t\t\t\t\t\t\t:key=\"opt.value\"\n\t\t\t\t\t\t\tclass=\"cn-search-page__facet-option\">\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t:model-value=\"isFacetActive(facet.key, opt.value)\"\n\t\t\t\t\t\t\t\t\t:type=\"facet.multiple ? 'checkbox' : 'radio'\"\n\t\t\t\t\t\t\t\t\t:name=\"'facet-' + facet.key\"\n\t\t\t\t\t\t\t\t\t@change=\"toggleFacet(facet.key, opt.value, $event.target.checked, facet.multiple)\">\n\t\t\t\t\t\t\t\t<span>{{ shown(opt.label) || opt.value }}</span>\n\t\t\t\t\t\t\t\t<small v-if=\"typeof opt.count === 'number'\" class=\"cn-search-page__facet-count\">{{ opt.count }}</small>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<button v-if=\"hasActiveFacets\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-search-page__clear-facets\"\n\t\t\t\t\t@click=\"clearFacets\">\n\t\t\t\t\t{{ clearFacetsLabel }}\n\t\t\t\t</button>\n\t\t\t</aside>\n\n\t\t\t<!-- Results pane. -->\n\t\t\t<section class=\"cn-search-page__results\" data-testid=\"cn-search-page-results\">\n\t\t\t\t<div v-if=\"shownLoading\" class=\"cn-search-page__loading\">\n\t\t\t\t\t{{ loadingLabel }}\n\t\t\t\t</div>\n\t\t\t\t<ol v-else-if=\"shownResults.length > 0\" class=\"cn-search-page__list\">\n\t\t\t\t\t<li v-for=\"result in shownResults\"\n\t\t\t\t\t\t:key=\"result.id || (result.schema + ':' + (result.title || ''))\"\n\t\t\t\t\t\tclass=\"cn-search-page__result\"\n\t\t\t\t\t\t:data-result-id=\"result.id\"\n\t\t\t\t\t\t@click=\"onResultClick(result)\">\n\t\t\t\t\t\t<!-- @slot result Per-result body. Scope:\n\t\t\t\t\t\t { result }. Default renders title +\n\t\t\t\t\t\t snippet + schema badge. -->\n\t\t\t\t\t\t<slot name=\"result\" :result=\"result\">\n\t\t\t\t\t\t\t<div class=\"cn-search-page__result-head\">\n\t\t\t\t\t\t\t\t<span class=\"cn-search-page__result-title\">{{ result.title || result.id }}</span>\n\t\t\t\t\t\t\t\t<span v-if=\"result.schema\" class=\"cn-search-page__result-badge\">{{ result.schema }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<p v-if=\"result.snippet\" class=\"cn-search-page__result-snippet\">\n\t\t\t\t\t\t\t\t{{ result.snippet }}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<small v-if=\"result.subtitle\" class=\"cn-search-page__result-subtitle\">{{ result.subtitle }}</small>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</li>\n\t\t\t\t</ol>\n\t\t\t\t<p v-else-if=\"hasSearched\" class=\"cn-search-page__empty\">\n\t\t\t\t\t{{ emptyLabel }}\n\t\t\t\t</p>\n\t\t\t\t<p v-else-if=\"idleLabel\" class=\"cn-search-page__idle\">\n\t\t\t\t\t{{ idleLabel }}\n\t\t\t\t</p>\n\n\t\t\t\t<div v-if=\"shownTotal > 0 && shownTotal > shownResults.length\" class=\"cn-search-page__more\">\n\t\t\t\t\t{{ totalCountLabel(shownTotal, shownResults.length) }}\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { labelLang } from '../../utils/manifestTranslate.js'\n/**\n * CnSearchPage — Search surface with a query input, a facet\n * sidebar, and a results list. Mounted by CnPageRenderer when a\n * manifest page declares `type: 'search'`.\n *\n * The component owns the UI; consumers wire the actual search +\n * facet computation in `@query-change` and `@facets-change` (or use\n * the single `@search` event that fires on both). Cross-schema\n * search, full-text indexing, and facet aggregation are all\n * consumer-side.\n *\n * ```vue\n * <CnSearchPage\n * title=\"Search\"\n * :query=\"q\"\n * :facets=\"facets\"\n * :active-facets=\"activeFacets\"\n * :results=\"results\"\n * :total-count=\"total\"\n * :loading=\"loading\"\n * @search=\"onSearch\" />\n * ```\n */\nexport default {\n\tname: 'CnSearchPage',\n\n\tinject: {\n\t\t/** The label lookup from CnAppRoot, so manifest labels show in the user's language. */\n\t\tcnTranslate: { default: null },\n\t},\n\n\tprops: {\n\t\t/** Optional title rendered above the query input. */\n\t\ttitle: { type: String, default: 'Search' },\n\t\t/**\n\t\t * Controlled query string (v-model style). Falls back to\n\t\t * the local state when omitted; consumers can read the\n\t\t * current value via `@query-change`.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tquery: { type: String, default: '' },\n\t\t/** Query input placeholder. */\n\t\tplaceholder: { type: String, default: 'Search…' },\n\t\t/** Query input aria-label. */\n\t\tariaLabel: { type: String, default: 'Search input' },\n\t\t/** Submit-button label. */\n\t\tsearchLabel: { type: String, default: 'Search' },\n\t\t/**\n\t\t * Facet declarations. Each entry: `{ key, label?,\n\t\t * options: [{value, label?, count?}], multiple? }`.\n\t\t * Empty array hides the facet sidebar.\n\t\t *\n\t\t * @type {Array<{key:string,label?:string,options:Array,multiple?:boolean}>}\n\t\t */\n\t\tfacets: { type: Array, default: () => [] },\n\t\t/**\n\t\t * Controlled active-facets map (`{facetKey: [value, ...]}`).\n\t\t * Consumers persist this + push updates back; the widget\n\t\t * emits `@facets-change` with the new map.\n\t\t *\n\t\t * @type {Record<string,Array<string>>}\n\t\t */\n\t\tactiveFacets: { type: Object, default: () => ({}) },\n\t\t/**\n\t\t * Result entries. Each entry rendered through the `#result`\n\t\t * slot or the default `{title, snippet, schema, subtitle}`\n\t\t * shape.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tresults: { type: Array, default: () => [] },\n\t\t/** Total count of matching results (drives the \"more\" footer). */\n\t\ttotalCount: { type: Number, default: 0 },\n\t\t/** Show the loading state. */\n\t\tloading: { type: Boolean, default: false },\n\t\t/** Empty-state when a search ran but matched nothing. */\n\t\temptyLabel: { type: String, default: 'No matches found.' },\n\t\t/** Idle text shown before any search has run. Empty hides. */\n\t\tidleLabel: { type: String, default: 'Start typing to search.' },\n\t\t/** Loading-state text. */\n\t\tloadingLabel: { type: String, default: 'Searching…' },\n\t\t/** Facets sidebar header. */\n\t\tfacetsTitle: { type: String, default: 'Filters' },\n\t\t/** Clear-facets button label. */\n\t\tclearFacetsLabel: { type: String, default: 'Clear filters' },\n\t\t/**\n\t\t * Formatter for the \"Showing X of Y\" footer. Receives total\n\t\t * + shown counts and returns the rendered string.\n\t\t *\n\t\t * @type {(total:number, shown:number) => string}\n\t\t */\n\t\ttotalCountLabel: {\n\t\t\ttype: Function,\n\t\t\tdefault: (total, shown) => `Showing ${shown} of ${total} results.`,\n\t\t},\n\n\t\t/**\n\t\t * The lists the page searches itself (manifest `config.sources`). Each\n\t\t * `{ id?, label, register, schema, route?, titleField?, snippetField?,\n\t\t * limit? }`: one request per list with `_search`, results in the order\n\t\t * of the lists, and the lists offered as a Type filter with their\n\t\t * totals. `route` names the page a result opens, with its id. Empty\n\t\t * keeps the page controlled: `results` and `facets` come from props.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tsources: { type: Array, default: () => [] },\n\t\t/** The Type filter's heading when the page searches `sources`. */\n\t\ttypeLabel: { type: String, default: 'Type' },\n\t},\n\n\temits: ['facets-change', 'query-change', 'result-click', 'search', 'update:query'],\n\tdata() {\n\t\treturn {\n\t\t\tlocalQuery: this.query,\n\t\t\thasSearched: false,\n\t\t\t// What a `sources` search found, per list, and the filter it keeps.\n\t\t\tsourceRows: {},\n\t\t\tsourceTotals: {},\n\t\t\tsourceFacets: {},\n\t\t\tsourceLoading: false,\n\t\t\tsourceRun: 0,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {boolean} Whether the page searches its own `sources`. */\n\t\tsearchesSources() {\n\t\t\treturn Array.isArray(this.sources) && this.sources.some((source) => source && source.register && source.schema)\n\t\t},\n\n\t\t/** @return {Array<object>} The lists searched, each with its key. */\n\t\tsourceList() {\n\t\t\treturn (this.sources || [])\n\t\t\t\t.filter((source) => source && source.register && source.schema)\n\t\t\t\t.map((source) => ({ ...source, key: source.id || source.schema }))\n\t\t},\n\n\t\t/** @return {Record<string, Array<string>>} The active filter, the page's own when it searches `sources`. */\n\t\teffectiveFacets() {\n\t\t\treturn this.searchesSources ? this.sourceFacets : (this.activeFacets || {})\n\t\t},\n\n\t\t/** @return {Array<object>} The facets shown: the Type filter of the lists, else the `facets` prop. */\n\t\tshownFacets() {\n\t\t\tif (!this.searchesSources) {\n\t\t\t\treturn this.facets\n\t\t\t}\n\t\t\tif (!this.hasSearched) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn [{\n\t\t\t\tkey: 'type',\n\t\t\t\tlabel: this.typeLabel,\n\t\t\t\tmultiple: true,\n\t\t\t\toptions: this.sourceList.map((source) => ({\n\t\t\t\t\tvalue: source.key,\n\t\t\t\t\tlabel: source.label,\n\t\t\t\t\t...(typeof this.sourceTotals[source.key] === 'number' ? { count: this.sourceTotals[source.key] } : {}),\n\t\t\t\t})),\n\t\t\t}]\n\t\t},\n\n\t\t/** @return {Array<object>} The results shown. */\n\t\tshownResults() {\n\t\t\tif (!this.searchesSources) {\n\t\t\t\treturn this.results\n\t\t\t}\n\t\t\treturn this.activeSources.flatMap((source) => this.sourceRows[source.key] || [])\n\t\t},\n\n\t\t/** @return {number} The total of the results shown. */\n\t\tshownTotal() {\n\t\t\tif (!this.searchesSources) {\n\t\t\t\treturn this.totalCount\n\t\t\t}\n\t\t\treturn this.activeSources.reduce((sum, source) => sum + (this.sourceTotals[source.key] || 0), 0)\n\t\t},\n\n\t\t/** @return {boolean} Whether a search is running. */\n\t\tshownLoading() {\n\t\t\treturn this.searchesSources ? this.sourceLoading : this.loading\n\t\t},\n\n\t\t/** @return {Array<object>} The lists the Type filter leaves in, all when none is picked. */\n\t\tactiveSources() {\n\t\t\tconst picked = Array.isArray(this.effectiveFacets.type) ? this.effectiveFacets.type : []\n\t\t\treturn picked.length === 0 ? this.sourceList : this.sourceList.filter((source) => picked.includes(source.key))\n\t\t},\n\n\t\t/**\n\t\t * Whether any facet has at least one active value.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasActiveFacets() {\n\t\t\tfor (const k of Object.keys(this.effectiveFacets)) {\n\t\t\t\tif (Array.isArray(this.effectiveFacets[k]) && this.effectiveFacets[k].length > 0) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t},\n\n\twatch: {\n\t\tquery(next) {\n\t\t\tif (next !== this.localQuery) {\n\t\t\t\tthis.localQuery = next\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * A manifest label through the injected lookup, or as written.\n\t\t *\n\t\t * @param {string} text The label as written.\n\t\t * @return {string} The label in the user's language.\n\t\t */\n\t\tshown(text) {\n\t\t\treturn typeof this.cnTranslate === 'function' && typeof text === 'string' && text !== '' ? this.cnTranslate(text) : text\n\t\t},\n\n\t\t/**\n\t\t * The `lang` of a label that fell back to its written text in another language.\n\t\t *\n\t\t * @param {string} text The label as written.\n\t\t * @return {string|undefined} The source language, or undefined.\n\t\t */\n\t\tlangOf(text) {\n\t\t\treturn labelLang(this.cnTranslate, text) || undefined\n\t\t},\n\n\t\t/**\n\t\t * Whether a (facetKey, value) is currently active.\n\t\t *\n\t\t * @param {string} key Facet key.\n\t\t * @param {string} value Option value.\n\t\t * @return {boolean}\n\t\t */\n\t\tisFacetActive(key, value) {\n\t\t\tconst arr = this.effectiveFacets[key]\n\t\t\treturn Array.isArray(arr) && arr.includes(value)\n\t\t},\n\n\t\t/**\n\t\t * Toggle a facet option on/off and emit the new map.\n\t\t *\n\t\t * @param {string} key Facet key.\n\t\t * @param {string} value Option value.\n\t\t * @param {boolean} checked Checkbox state (radios pass true).\n\t\t * @param {boolean} multiple Whether the facet allows multi-select.\n\t\t * @return {void}\n\t\t */\n\t\ttoggleFacet(key, value, checked, multiple) {\n\t\t\tconst next = { ...this.effectiveFacets }\n\t\t\tif (!multiple) {\n\t\t\t\tnext[key] = checked ? [value] : []\n\t\t\t} else {\n\t\t\t\tconst cur = Array.isArray(next[key]) ? [...next[key]] : []\n\t\t\t\tconst idx = cur.indexOf(value)\n\t\t\t\tif (checked && idx < 0) {\n\t\t\t\t\tcur.push(value)\n\t\t\t\t} else if (!checked && idx >= 0) {\n\t\t\t\t\tcur.splice(idx, 1)\n\t\t\t\t}\n\t\t\t\tnext[key] = cur\n\t\t\t}\n\t\t\tthis.emitFacetsChange(next)\n\t\t},\n\n\t\t/**\n\t\t * Clear every facet.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tclearFacets() {\n\t\t\tthis.emitFacetsChange({})\n\t\t},\n\n\t\temitFacetsChange(next) {\n\t\t\t/**\n\t\t\t * @event facets-change Emitted on any facet toggle / clear.\n\t\t\t * @type {Record<string,Array<string>>}\n\t\t\t */\n\t\t\tthis.$emit('facets-change', next)\n\t\t\tif (this.searchesSources) {\n\t\t\t\tthis.sourceFacets = next\n\t\t\t}\n\t\t\tthis.emitSearch()\n\t\t},\n\n\t\t/**\n\t\t * Submit-button handler — propagates the latest query.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonQuerySubmit() {\n\t\t\tthis.emitQueryChange()\n\t\t\tthis.emitSearch()\n\t\t},\n\n\t\t/**\n\t\t * Live query-input handler — emits each keystroke (consumers\n\t\t * are responsible for debouncing).\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonQueryInput() {\n\t\t\tthis.emitQueryChange()\n\t\t},\n\n\t\temitQueryChange() {\n\t\t\t/**\n\t\t\t * @event query-change Emitted on every query mutation.\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('query-change', this.localQuery)\n\t\t\t/** v-model-friendly alias. */\n\t\t\tthis.$emit('update:query', this.localQuery)\n\t\t},\n\n\t\temitSearch() {\n\t\t\tthis.hasSearched = true\n\t\t\t/**\n\t\t\t * @event search Emitted on Submit or facet change.\n\t\t\t * Combines query + active facets.\n\t\t\t * @type {{ query: string, facets: Record<string,Array<string>> }}\n\t\t\t */\n\t\t\tthis.$emit('search', { query: this.localQuery, facets: { ...this.effectiveFacets } })\n\t\t\tif (this.searchesSources) {\n\t\t\t\tthis.searchSources()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Search the lists the Type filter leaves in, one request each, and\n\t\t * keep what each found. A search started later wins over this one.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync searchSources() {\n\t\t\tconst run = this.sourceRun + 1\n\t\t\tthis.sourceRun = run\n\t\t\tthis.sourceLoading = true\n\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\timport('@nextcloud/router'),\n\t\t\t])\n\t\t\tconst found = await Promise.all(this.activeSources.map(async (source) => {\n\t\t\t\tconst url = generateUrl('/apps/openregister/api/objects/{register}/{schema}', { register: source.register, schema: source.schema })\n\t\t\t\tconst limit = Number(source.limit) > 0 ? Math.floor(Number(source.limit)) : 10\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await axios.get(url, { params: { _search: this.localQuery, _limit: limit } })\n\t\t\t\t\tconst data = response && response.data ? response.data : {}\n\t\t\t\t\tconst rows = Array.isArray(data.results) ? data.results : []\n\t\t\t\t\treturn { source, rows, total: typeof data.total === 'number' ? data.total : rows.length }\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\tconsole.warn('[CnSearchPage] could not search', source.schema, e)\n\t\t\t\t\treturn { source, rows: [], total: 0 }\n\t\t\t\t}\n\t\t\t}))\n\t\t\tif (run !== this.sourceRun) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst rows = { ...this.sourceRows }\n\t\t\tconst totals = { ...this.sourceTotals }\n\t\t\tfor (const { source, rows: list, total } of found) {\n\t\t\t\trows[source.key] = list.map((row) => this.resultOf(source, row))\n\t\t\t\ttotals[source.key] = total\n\t\t\t}\n\t\t\tthis.sourceRows = rows\n\t\t\tthis.sourceTotals = totals\n\t\t\tthis.sourceLoading = false\n\t\t},\n\n\t\t/**\n\t\t * One found object as a result row.\n\t\t *\n\t\t * @param {object} source The list it came from.\n\t\t * @param {object} row The object.\n\t\t * @return {object} `{ id, title, snippet, schema, route }`.\n\t\t */\n\t\tresultOf(source, row) {\n\t\t\tconst id = row && (row.id || row['@self']?.id)\n\t\t\tconst titleField = source.titleField || ''\n\t\t\tconst title = (titleField && row[titleField]) || row.title || row.name || id\n\t\t\tconst snippet = source.snippetField ? row[source.snippetField] : undefined\n\t\t\treturn {\n\t\t\t\tid,\n\t\t\t\ttitle: typeof title === 'string' ? title : String(title ?? ''),\n\t\t\t\t...(typeof snippet === 'string' && snippet !== '' ? { snippet } : {}),\n\t\t\t\tschema: this.shown(source.label) || source.schema,\n\t\t\t\troute: source.route || '',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Forward a result click.\n\t\t *\n\t\t * @param {object} result The clicked result.\n\t\t * @return {void}\n\t\t */\n\t\tonResultClick(result) {\n\t\t\t/**\n\t\t\t * @event result-click Emitted on result-row click.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('result-click', result)\n\t\t\tif (this.searchesSources && result && result.route && result.id && this.$router) {\n\t\t\t\tthis.$router.push({ name: result.route, params: { id: result.id } })\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-search-page {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n\tpadding: 16px;\n}\n\n/* Reserve room for NcAppNavigationToggle (matches CnPageRenderer / CnPageHeader). */\n.cn-search-page__header {\n\tpadding-inline-start: 56px;\n}\n\n.cn-search-page__title {\n\tmargin: 0 0 8px;\n\tfont-size: 1.4em;\n}\n\n.cn-search-page__query {\n\tdisplay: flex;\n\tgap: 8px;\n}\n\n.cn-search-page__input {\n\tflex: 1 1 auto;\n\tpadding: 8px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tbackground: var(--color-main-background);\n\tfont-size: 1em;\n}\n\n.cn-search-page__submit {\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text, #fff);\n\tborder: none;\n\tpadding: 8px 16px;\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n}\n\n.cn-search-page__body {\n\tdisplay: grid;\n\tgrid-template-columns: 240px 1fr;\n\tgap: 16px;\n}\n\n.cn-search-page__body:has(:not(.cn-search-page__facets)) {\n\tgrid-template-columns: 1fr;\n}\n\n.cn-search-page__facets {\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tpadding: 12px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tbackground: var(--color-background-hover);\n}\n\n.cn-search-page__facets-title {\n\tmargin: 0;\n\tfont-size: 1em;\n}\n\n.cn-search-page__facet-title {\n\tmargin: 0 0 4px;\n\tfont-size: 0.9em;\n}\n\n.cn-search-page__facet-options {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-search-page__facet-option {\n\tdisplay: flex;\n\tgap: 4px;\n}\n\n.cn-search-page__facet-option label {\n\tdisplay: flex;\n\tgap: 6px;\n\talign-items: center;\n\tcursor: pointer;\n\tfont-size: 0.9em;\n}\n\n.cn-search-page__facet-count {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-search-page__clear-facets {\n\tbackground: none;\n\tborder: 1px solid var(--color-border);\n\tpadding: 4px 8px;\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n\tfont-size: 0.85em;\n\talign-self: flex-start;\n}\n\n.cn-search-page__list {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-search-page__result {\n\tpadding: 10px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n\tbackground: var(--color-main-background);\n}\n\n.cn-search-page__result:hover {\n\tbackground: var(--color-background-hover);\n}\n\n.cn-search-page__result-head {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tgap: 8px;\n}\n\n.cn-search-page__result-title {\n\tfont-weight: 600;\n}\n\n.cn-search-page__result-badge {\n\tfont-size: 0.75em;\n\tpadding: 1px 8px;\n\tborder-radius: 9999px;\n\tbackground: var(--color-background-hover);\n\tcolor: var(--color-text-maxcontrast);\n\ttext-transform: uppercase;\n\tletter-spacing: 0.05em;\n}\n\n.cn-search-page__result-snippet {\n\tmargin: 4px 0 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-search-page__result-subtitle {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-search-page__empty,\n.cn-search-page__idle,\n.cn-search-page__loading {\n\tcolor: var(--color-text-maxcontrast);\n\tmargin: 24px 0;\n\ttext-align: center;\n\tfont-style: italic;\n}\n\n.cn-search-page__more {\n\tmargin-top: 12px;\n\tcolor: var(--color-text-maxcontrast);\n\ttext-align: center;\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_Fragment","_renderList","_renderSlot"],"mappings":";;;AACM,EAAA,KAAK,EAAC,gBAAiB;AAAA,EAAA,aAAW,EAAC,gBAAgB;;AAC/C,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAwB,GAAA;;;;AAa5B,EAAA,IAAI,EAAC,QAAS;AAAA,EAAA,KAAK,EAAC,wBAAwB;;AAMjD,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,sBAAsB,GAAA;;;AAEK,EAAA,KAAK,EAAC,wBAAyB;AAAA,EAAA,aAAW,EAAC,uBAAuB;;AAClG,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,8BAA8B,GAAA;AAInC,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,6BAA6B,GAAA;AAGnC,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,+BAA+B,GAAA;;;;AAWM,EAAA,KAAK,EAAC,6BAA6B;;;AAc3E,EAAA,KAAK,EAAC,yBAAwB;AAAE,EAAA,aAAW,EAAC,wBAAwB;;;;AACnD,EAAA,KAAK,EAAC,yBAAyB;;;;AAGhB,EAAA,KAAK,EAAC,sBAAsB;;;AAU5D,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,6BAA6B,GA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AAAE,eAAA,CADC,MAAQ,CAAA,SAAA,CAAA,EAAA,CAAA,YAAA;;AAGD,QAAA,CAAA,QAAA,CAAA,UAAS,GAAS,CAAA,IAAA,QAAA,CAAA,UAAW,GAAE,QAAA,CAAA,YAAY,CAAC,MAAM;0BAA7DF,kBAEK,CAAA,KAAA,EAFL,WAEK,EADDE,eAAA,CAAA,MAAA,CAAA,eAAe,CAAC,QAAU,CAAA,UAAA,EAAE,QAAY,CAAA,YAAA,CAAC,MAAM,CAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;"}
1
+ {"version":3,"file":"CnSearchPage.vue3.js","sources":["../../../../src/components/CnSearchPage/CnSearchPage.vue?vue&type=template&id=2d4f8d83&lang.js"],"sourcesContent":["<template>\n\t<div class=\"cn-search-page\" data-testid=\"cn-search-page\">\n\t\t<header class=\"cn-search-page__header\">\n\t\t\t<h2 v-if=\"title\" class=\"cn-search-page__title\" :lang=\"langOf(title)\">\n\t\t\t\t{{ shown(title) }}\n\t\t\t</h2>\n\t\t\t<form class=\"cn-search-page__query\" @submit.prevent=\"onQuerySubmit\">\n\t\t\t\t<input\n\t\t\t\t\tv-model=\"localQuery\"\n\t\t\t\t\ttype=\"search\"\n\t\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t\t\tclass=\"cn-search-page__input\"\n\t\t\t\t\tdata-testid=\"cn-search-page-input\"\n\t\t\t\t\t@input=\"onQueryInput\">\n\t\t\t\t<button type=\"submit\" class=\"cn-search-page__submit\">\n\t\t\t\t\t{{ searchLabel }}\n\t\t\t\t</button>\n\t\t\t</form>\n\t\t\t<!-- A term the server could not read: said under the field, the\n\t\t\t results of the last readable term kept. -->\n\t\t\t<CnCardNotices\n\t\t\t\tv-if=\"refusalNotice\"\n\t\t\t\tclass=\"cn-search-page__refusal\"\n\t\t\t\t:notices=\"[refusalNotice]\"\n\t\t\t\tdata-testid=\"cn-search-page-refusal\" />\n\t\t</header>\n\n\t\t<div class=\"cn-search-page__body\">\n\t\t\t<!-- Facet sidebar. -->\n\t\t\t<aside v-if=\"shownFacets.length > 0\" class=\"cn-search-page__facets\" data-testid=\"cn-search-page-facets\">\n\t\t\t\t<h3 class=\"cn-search-page__facets-title\">\n\t\t\t\t\t{{ facetsTitle }}\n\t\t\t\t</h3>\n\t\t\t\t<div v-for=\"facet in shownFacets\" :key=\"facet.key\" class=\"cn-search-page__facet\">\n\t\t\t\t\t<h4 class=\"cn-search-page__facet-title\">\n\t\t\t\t\t\t{{ shown(facet.label) || facet.key }}\n\t\t\t\t\t</h4>\n\t\t\t\t\t<ul class=\"cn-search-page__facet-options\">\n\t\t\t\t\t\t<li v-for=\"opt in facet.options\"\n\t\t\t\t\t\t\t:key=\"opt.value\"\n\t\t\t\t\t\t\tclass=\"cn-search-page__facet-option\">\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t:model-value=\"isFacetActive(facet.key, opt.value)\"\n\t\t\t\t\t\t\t\t\t:type=\"facet.multiple ? 'checkbox' : 'radio'\"\n\t\t\t\t\t\t\t\t\t:name=\"'facet-' + facet.key\"\n\t\t\t\t\t\t\t\t\t@change=\"toggleFacet(facet.key, opt.value, $event.target.checked, facet.multiple)\">\n\t\t\t\t\t\t\t\t<span>{{ shown(opt.label) || opt.value }}</span>\n\t\t\t\t\t\t\t\t<small v-if=\"typeof opt.count === 'number'\" class=\"cn-search-page__facet-count\">{{ opt.count }}</small>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t\t<button v-if=\"hasActiveFacets\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-search-page__clear-facets\"\n\t\t\t\t\t@click=\"clearFacets\">\n\t\t\t\t\t{{ clearFacetsLabel }}\n\t\t\t\t</button>\n\t\t\t</aside>\n\n\t\t\t<!-- Results pane. -->\n\t\t\t<section class=\"cn-search-page__results\" data-testid=\"cn-search-page-results\">\n\t\t\t\t<div v-if=\"shownLoading\" class=\"cn-search-page__loading\">\n\t\t\t\t\t{{ loadingLabel }}\n\t\t\t\t</div>\n\t\t\t\t<ol v-else-if=\"shownResults.length > 0\" class=\"cn-search-page__list\">\n\t\t\t\t\t<li v-for=\"result in shownResults\"\n\t\t\t\t\t\t:key=\"result.id || (result.schema + ':' + (result.title || ''))\"\n\t\t\t\t\t\tclass=\"cn-search-page__result\"\n\t\t\t\t\t\t:data-result-id=\"result.id\"\n\t\t\t\t\t\t@click=\"onResultClick(result)\">\n\t\t\t\t\t\t<!-- @slot result Per-result body. Scope:\n\t\t\t\t\t\t { result }. Default renders title +\n\t\t\t\t\t\t snippet + schema badge. -->\n\t\t\t\t\t\t<slot name=\"result\" :result=\"result\">\n\t\t\t\t\t\t\t<div class=\"cn-search-page__result-head\">\n\t\t\t\t\t\t\t\t<span class=\"cn-search-page__result-title\">{{ result.title || result.id }}</span>\n\t\t\t\t\t\t\t\t<span v-if=\"result.schema\" class=\"cn-search-page__result-badge\">{{ result.schema }}</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<p v-if=\"result.snippet\" class=\"cn-search-page__result-snippet\">\n\t\t\t\t\t\t\t\t{{ result.snippet }}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<small v-if=\"result.subtitle\" class=\"cn-search-page__result-subtitle\">{{ result.subtitle }}</small>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</li>\n\t\t\t\t</ol>\n\t\t\t\t<p v-else-if=\"hasSearched\" class=\"cn-search-page__empty\">\n\t\t\t\t\t{{ emptyLabel }}\n\t\t\t\t</p>\n\t\t\t\t<p v-else-if=\"idleLabel\" class=\"cn-search-page__idle\">\n\t\t\t\t\t{{ idleLabel }}\n\t\t\t\t</p>\n\n\t\t\t\t<div v-if=\"shownTotal > 0 && shownTotal > shownResults.length\" class=\"cn-search-page__more\">\n\t\t\t\t\t{{ totalCountLabel(shownTotal, shownResults.length) }}\n\t\t\t\t</div>\n\t\t\t</section>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { parseAxiosError } from '../../utils/errors.js'\nimport { labelLang } from '../../utils/manifestTranslate.js'\nimport { readSearchRefusal, searchRefusalNotice } from '../../utils/searchRefusal.js'\nimport { CnCardNotices } from '../CnCardNotices/index.js'\n/**\n * CnSearchPage — Search surface with a query input, a facet\n * sidebar, and a results list. Mounted by CnPageRenderer when a\n * manifest page declares `type: 'search'`.\n *\n * The component owns the UI; consumers wire the actual search +\n * facet computation in `@query-change` and `@facets-change` (or use\n * the single `@search` event that fires on both). Cross-schema\n * search, full-text indexing, and facet aggregation are all\n * consumer-side.\n *\n * ```vue\n * <CnSearchPage\n * title=\"Search\"\n * :query=\"q\"\n * :facets=\"facets\"\n * :active-facets=\"activeFacets\"\n * :results=\"results\"\n * :total-count=\"total\"\n * :loading=\"loading\"\n * @search=\"onSearch\" />\n * ```\n */\nexport default {\n\tname: 'CnSearchPage',\n\n\tcomponents: { CnCardNotices },\n\n\tinject: {\n\t\t/** The label lookup from CnAppRoot, so manifest labels show in the user's language. */\n\t\tcnTranslate: { default: null },\n\t},\n\n\tprops: {\n\t\t/** Optional title rendered above the query input. */\n\t\ttitle: { type: String, default: 'Search' },\n\t\t/**\n\t\t * Controlled query string (v-model style). Falls back to\n\t\t * the local state when omitted; consumers can read the\n\t\t * current value via `@query-change`.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tquery: { type: String, default: '' },\n\t\t/** Query input placeholder. */\n\t\tplaceholder: { type: String, default: 'Search…' },\n\t\t/** Query input aria-label. */\n\t\tariaLabel: { type: String, default: 'Search input' },\n\t\t/** Submit-button label. */\n\t\tsearchLabel: { type: String, default: 'Search' },\n\t\t/**\n\t\t * Facet declarations. Each entry: `{ key, label?,\n\t\t * options: [{value, label?, count?}], multiple? }`.\n\t\t * Empty array hides the facet sidebar.\n\t\t *\n\t\t * @type {Array<{key:string,label?:string,options:Array,multiple?:boolean}>}\n\t\t */\n\t\tfacets: { type: Array, default: () => [] },\n\t\t/**\n\t\t * Controlled active-facets map (`{facetKey: [value, ...]}`).\n\t\t * Consumers persist this + push updates back; the widget\n\t\t * emits `@facets-change` with the new map.\n\t\t *\n\t\t * @type {Record<string,Array<string>>}\n\t\t */\n\t\tactiveFacets: { type: Object, default: () => ({}) },\n\t\t/**\n\t\t * Result entries. Each entry rendered through the `#result`\n\t\t * slot or the default `{title, snippet, schema, subtitle}`\n\t\t * shape.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tresults: { type: Array, default: () => [] },\n\t\t/** Total count of matching results (drives the \"more\" footer). */\n\t\ttotalCount: { type: Number, default: 0 },\n\t\t/** Show the loading state. */\n\t\tloading: { type: Boolean, default: false },\n\t\t/** Empty-state when a search ran but matched nothing. */\n\t\temptyLabel: { type: String, default: 'No matches found.' },\n\t\t/** Idle text shown before any search has run. Empty hides. */\n\t\tidleLabel: { type: String, default: 'Start typing to search.' },\n\t\t/** Loading-state text. */\n\t\tloadingLabel: { type: String, default: 'Searching…' },\n\t\t/** Facets sidebar header. */\n\t\tfacetsTitle: { type: String, default: 'Filters' },\n\t\t/** Clear-facets button label. */\n\t\tclearFacetsLabel: { type: String, default: 'Clear filters' },\n\t\t/**\n\t\t * Formatter for the \"Showing X of Y\" footer. Receives total\n\t\t * + shown counts and returns the rendered string.\n\t\t *\n\t\t * @type {(total:number, shown:number) => string}\n\t\t */\n\t\ttotalCountLabel: {\n\t\t\ttype: Function,\n\t\t\tdefault: (total, shown) => `Showing ${shown} of ${total} results.`,\n\t\t},\n\n\t\t/**\n\t\t * The words of a refused search (manifest `config.searchRefusal`):\n\t\t * `{ title?, after? }`, the title with `{position}`. A `sources` search\n\t\t * the server refuses for its grammar keeps the results it had and says\n\t\t * so under the search field.\n\t\t *\n\t\t * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-the-search-page-says-a-refused-term-under-its-field\n\t\t */\n\t\tsearchRefusal: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The lists the page searches itself (manifest `config.sources`). Each\n\t\t * `{ id?, label, register, schema, route?, titleField?, snippetField?,\n\t\t * limit? }`: one request per list with `_search`, results in the order\n\t\t * of the lists, and the lists offered as a Type filter with their\n\t\t * totals. `route` names the page a result opens, with its id. Empty\n\t\t * keeps the page controlled: `results` and `facets` come from props.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tsources: { type: Array, default: () => [] },\n\t\t/** The Type filter's heading when the page searches `sources`. */\n\t\ttypeLabel: { type: String, default: 'Type' },\n\t},\n\n\temits: ['facets-change', 'query-change', 'result-click', 'search', 'update:query'],\n\tdata() {\n\t\treturn {\n\t\t\tlocalQuery: this.query,\n\t\t\thasSearched: false,\n\t\t\t// What a `sources` search found, per list, and the filter it keeps.\n\t\t\tsourceRows: {},\n\t\t\tsourceTotals: {},\n\t\t\tsourceFacets: {},\n\t\t\tsourceLoading: false,\n\t\t\tsourceRun: 0,\n\t\t\t// The latest `sources` search the server refused for its grammar.\n\t\t\trefusal: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The refused search as a notice under the field, or null.\n\t\t *\n\t\t * @return {object|null}\n\t\t * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-the-search-page-says-a-refused-term-under-its-field\n\t\t */\n\t\trefusalNotice() {\n\t\t\treturn this.refusal ? searchRefusalNotice(this.refusal, this.searchRefusal, (text) => this.shown(text)) : null\n\t\t},\n\n\t\t/** @return {boolean} Whether the page searches its own `sources`. */\n\t\tsearchesSources() {\n\t\t\treturn Array.isArray(this.sources) && this.sources.some((source) => source && source.register && source.schema)\n\t\t},\n\n\t\t/** @return {Array<object>} The lists searched, each with its key. */\n\t\tsourceList() {\n\t\t\treturn (this.sources || [])\n\t\t\t\t.filter((source) => source && source.register && source.schema)\n\t\t\t\t.map((source) => ({ ...source, key: source.id || source.schema }))\n\t\t},\n\n\t\t/** @return {Record<string, Array<string>>} The active filter, the page's own when it searches `sources`. */\n\t\teffectiveFacets() {\n\t\t\treturn this.searchesSources ? this.sourceFacets : (this.activeFacets || {})\n\t\t},\n\n\t\t/** @return {Array<object>} The facets shown: the Type filter of the lists, else the `facets` prop. */\n\t\tshownFacets() {\n\t\t\tif (!this.searchesSources) {\n\t\t\t\treturn this.facets\n\t\t\t}\n\t\t\tif (!this.hasSearched) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn [{\n\t\t\t\tkey: 'type',\n\t\t\t\tlabel: this.typeLabel,\n\t\t\t\tmultiple: true,\n\t\t\t\toptions: this.sourceList.map((source) => ({\n\t\t\t\t\tvalue: source.key,\n\t\t\t\t\tlabel: source.label,\n\t\t\t\t\t...(typeof this.sourceTotals[source.key] === 'number' ? { count: this.sourceTotals[source.key] } : {}),\n\t\t\t\t})),\n\t\t\t}]\n\t\t},\n\n\t\t/** @return {Array<object>} The results shown. */\n\t\tshownResults() {\n\t\t\tif (!this.searchesSources) {\n\t\t\t\treturn this.results\n\t\t\t}\n\t\t\treturn this.activeSources.flatMap((source) => this.sourceRows[source.key] || [])\n\t\t},\n\n\t\t/** @return {number} The total of the results shown. */\n\t\tshownTotal() {\n\t\t\tif (!this.searchesSources) {\n\t\t\t\treturn this.totalCount\n\t\t\t}\n\t\t\treturn this.activeSources.reduce((sum, source) => sum + (this.sourceTotals[source.key] || 0), 0)\n\t\t},\n\n\t\t/** @return {boolean} Whether a search is running. */\n\t\tshownLoading() {\n\t\t\treturn this.searchesSources ? this.sourceLoading : this.loading\n\t\t},\n\n\t\t/** @return {Array<object>} The lists the Type filter leaves in, all when none is picked. */\n\t\tactiveSources() {\n\t\t\tconst picked = Array.isArray(this.effectiveFacets.type) ? this.effectiveFacets.type : []\n\t\t\treturn picked.length === 0 ? this.sourceList : this.sourceList.filter((source) => picked.includes(source.key))\n\t\t},\n\n\t\t/**\n\t\t * Whether any facet has at least one active value.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasActiveFacets() {\n\t\t\tfor (const k of Object.keys(this.effectiveFacets)) {\n\t\t\t\tif (Array.isArray(this.effectiveFacets[k]) && this.effectiveFacets[k].length > 0) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\t},\n\n\twatch: {\n\t\tquery(next) {\n\t\t\tif (next !== this.localQuery) {\n\t\t\t\tthis.localQuery = next\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * A manifest label through the injected lookup, or as written.\n\t\t *\n\t\t * @param {string} text The label as written.\n\t\t * @return {string} The label in the user's language.\n\t\t */\n\t\tshown(text) {\n\t\t\treturn typeof this.cnTranslate === 'function' && typeof text === 'string' && text !== '' ? this.cnTranslate(text) : text\n\t\t},\n\n\t\t/**\n\t\t * The `lang` of a label that fell back to its written text in another language.\n\t\t *\n\t\t * @param {string} text The label as written.\n\t\t * @return {string|undefined} The source language, or undefined.\n\t\t */\n\t\tlangOf(text) {\n\t\t\treturn labelLang(this.cnTranslate, text) || undefined\n\t\t},\n\n\t\t/**\n\t\t * Whether a (facetKey, value) is currently active.\n\t\t *\n\t\t * @param {string} key Facet key.\n\t\t * @param {string} value Option value.\n\t\t * @return {boolean}\n\t\t */\n\t\tisFacetActive(key, value) {\n\t\t\tconst arr = this.effectiveFacets[key]\n\t\t\treturn Array.isArray(arr) && arr.includes(value)\n\t\t},\n\n\t\t/**\n\t\t * Toggle a facet option on/off and emit the new map.\n\t\t *\n\t\t * @param {string} key Facet key.\n\t\t * @param {string} value Option value.\n\t\t * @param {boolean} checked Checkbox state (radios pass true).\n\t\t * @param {boolean} multiple Whether the facet allows multi-select.\n\t\t * @return {void}\n\t\t */\n\t\ttoggleFacet(key, value, checked, multiple) {\n\t\t\tconst next = { ...this.effectiveFacets }\n\t\t\tif (!multiple) {\n\t\t\t\tnext[key] = checked ? [value] : []\n\t\t\t} else {\n\t\t\t\tconst cur = Array.isArray(next[key]) ? [...next[key]] : []\n\t\t\t\tconst idx = cur.indexOf(value)\n\t\t\t\tif (checked && idx < 0) {\n\t\t\t\t\tcur.push(value)\n\t\t\t\t} else if (!checked && idx >= 0) {\n\t\t\t\t\tcur.splice(idx, 1)\n\t\t\t\t}\n\t\t\t\tnext[key] = cur\n\t\t\t}\n\t\t\tthis.emitFacetsChange(next)\n\t\t},\n\n\t\t/**\n\t\t * Clear every facet.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tclearFacets() {\n\t\t\tthis.emitFacetsChange({})\n\t\t},\n\n\t\temitFacetsChange(next) {\n\t\t\t/**\n\t\t\t * @event facets-change Emitted on any facet toggle / clear.\n\t\t\t * @type {Record<string,Array<string>>}\n\t\t\t */\n\t\t\tthis.$emit('facets-change', next)\n\t\t\tif (this.searchesSources) {\n\t\t\t\tthis.sourceFacets = next\n\t\t\t}\n\t\t\tthis.emitSearch()\n\t\t},\n\n\t\t/**\n\t\t * Submit-button handler — propagates the latest query.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonQuerySubmit() {\n\t\t\tthis.emitQueryChange()\n\t\t\tthis.emitSearch()\n\t\t},\n\n\t\t/**\n\t\t * Live query-input handler — emits each keystroke (consumers\n\t\t * are responsible for debouncing).\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonQueryInput() {\n\t\t\tthis.emitQueryChange()\n\t\t},\n\n\t\temitQueryChange() {\n\t\t\t/**\n\t\t\t * @event query-change Emitted on every query mutation.\n\t\t\t * @type {string}\n\t\t\t */\n\t\t\tthis.$emit('query-change', this.localQuery)\n\t\t\t/** v-model-friendly alias. */\n\t\t\tthis.$emit('update:query', this.localQuery)\n\t\t},\n\n\t\temitSearch() {\n\t\t\tthis.hasSearched = true\n\t\t\t/**\n\t\t\t * @event search Emitted on Submit or facet change.\n\t\t\t * Combines query + active facets.\n\t\t\t * @type {{ query: string, facets: Record<string,Array<string>> }}\n\t\t\t */\n\t\t\tthis.$emit('search', { query: this.localQuery, facets: { ...this.effectiveFacets } })\n\t\t\tif (this.searchesSources) {\n\t\t\t\tthis.searchSources()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Search the lists the Type filter leaves in, one request each, and\n\t\t * keep what each found. A search started later wins over this one.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/search-refusal-notice/specs/index-search-refusal/spec.md#requirement-the-search-page-says-a-refused-term-under-its-field\n\t\t */\n\t\tasync searchSources() {\n\t\t\tconst run = this.sourceRun + 1\n\t\t\tthis.sourceRun = run\n\t\t\tthis.sourceLoading = true\n\t\t\tconst [{ default: axios }, { generateUrl }] = await Promise.all([\n\t\t\t\timport('@nextcloud/axios'),\n\t\t\t\timport('@nextcloud/router'),\n\t\t\t])\n\t\t\tconst found = await Promise.all(this.activeSources.map(async (source) => {\n\t\t\t\tconst url = generateUrl('/apps/openregister/api/objects/{register}/{schema}', { register: source.register, schema: source.schema })\n\t\t\t\tconst limit = Number(source.limit) > 0 ? Math.floor(Number(source.limit)) : 10\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await axios.get(url, { params: { _search: this.localQuery, _limit: limit } })\n\t\t\t\t\tconst data = response && response.data ? response.data : {}\n\t\t\t\t\tconst rows = Array.isArray(data.results) ? data.results : []\n\t\t\t\t\treturn { source, rows, total: typeof data.total === 'number' ? data.total : rows.length }\n\t\t\t\t} catch (e) {\n\t\t\t\t\tconst { status, message, data } = parseAxiosError(e)\n\t\t\t\t\tconst refused = readSearchRefusal({ status, message, position: data && data.position }, this.localQuery)\n\t\t\t\t\tif (refused) {\n\t\t\t\t\t\treturn { source, refused }\n\t\t\t\t\t}\n\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\tconsole.warn('[CnSearchPage] could not search', source.schema, e)\n\t\t\t\t\treturn { source, rows: [], total: 0 }\n\t\t\t\t}\n\t\t\t}))\n\t\t\tif (run !== this.sourceRun) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst refusedRun = found.find((entry) => entry.refused)\n\t\t\tthis.refusal = refusedRun ? refusedRun.refused : null\n\t\t\tconst rows = { ...this.sourceRows }\n\t\t\tconst totals = { ...this.sourceTotals }\n\t\t\tfor (const { source, rows: list, total } of found.filter((entry) => !entry.refused)) {\n\t\t\t\trows[source.key] = list.map((row) => this.resultOf(source, row))\n\t\t\t\ttotals[source.key] = total\n\t\t\t}\n\t\t\tthis.sourceRows = rows\n\t\t\tthis.sourceTotals = totals\n\t\t\tthis.sourceLoading = false\n\t\t},\n\n\t\t/**\n\t\t * One found object as a result row.\n\t\t *\n\t\t * @param {object} source The list it came from.\n\t\t * @param {object} row The object.\n\t\t * @return {object} `{ id, title, snippet, schema, route }`.\n\t\t */\n\t\tresultOf(source, row) {\n\t\t\tconst id = row && (row.id || row['@self']?.id)\n\t\t\tconst titleField = source.titleField || ''\n\t\t\tconst title = (titleField && row[titleField]) || row.title || row.name || id\n\t\t\tconst snippet = source.snippetField ? row[source.snippetField] : undefined\n\t\t\treturn {\n\t\t\t\tid,\n\t\t\t\ttitle: typeof title === 'string' ? title : String(title ?? ''),\n\t\t\t\t...(typeof snippet === 'string' && snippet !== '' ? { snippet } : {}),\n\t\t\t\tschema: this.shown(source.label) || source.schema,\n\t\t\t\troute: source.route || '',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Forward a result click.\n\t\t *\n\t\t * @param {object} result The clicked result.\n\t\t * @return {void}\n\t\t */\n\t\tonResultClick(result) {\n\t\t\t/**\n\t\t\t * @event result-click Emitted on result-row click.\n\t\t\t * @type {object}\n\t\t\t */\n\t\t\tthis.$emit('result-click', result)\n\t\t\tif (this.searchesSources && result && result.route && result.id && this.$router) {\n\t\t\t\tthis.$router.push({ name: result.route, params: { id: result.id } })\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-search-page {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 16px;\n\tpadding: 16px;\n}\n\n/* Reserve room for NcAppNavigationToggle (matches CnPageRenderer / CnPageHeader). */\n.cn-search-page__header {\n\tpadding-inline-start: 56px;\n}\n\n.cn-search-page__refusal {\n\tmargin-block-start: 8px;\n}\n\n.cn-search-page__title {\n\tmargin: 0 0 8px;\n\tfont-size: 1.4em;\n}\n\n.cn-search-page__query {\n\tdisplay: flex;\n\tgap: 8px;\n}\n\n.cn-search-page__input {\n\tflex: 1 1 auto;\n\tpadding: 8px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tbackground: var(--color-main-background);\n\tfont-size: 1em;\n}\n\n.cn-search-page__submit {\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text, #fff);\n\tborder: none;\n\tpadding: 8px 16px;\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n}\n\n.cn-search-page__body {\n\tdisplay: grid;\n\tgrid-template-columns: 240px 1fr;\n\tgap: 16px;\n}\n\n.cn-search-page__body:has(:not(.cn-search-page__facets)) {\n\tgrid-template-columns: 1fr;\n}\n\n.cn-search-page__facets {\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tpadding: 12px;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n\tbackground: var(--color-background-hover);\n}\n\n.cn-search-page__facets-title {\n\tmargin: 0;\n\tfont-size: 1em;\n}\n\n.cn-search-page__facet-title {\n\tmargin: 0 0 4px;\n\tfont-size: 0.9em;\n}\n\n.cn-search-page__facet-options {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-search-page__facet-option {\n\tdisplay: flex;\n\tgap: 4px;\n}\n\n.cn-search-page__facet-option label {\n\tdisplay: flex;\n\tgap: 6px;\n\talign-items: center;\n\tcursor: pointer;\n\tfont-size: 0.9em;\n}\n\n.cn-search-page__facet-count {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-search-page__clear-facets {\n\tbackground: none;\n\tborder: 1px solid var(--color-border);\n\tpadding: 4px 8px;\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n\tfont-size: 0.85em;\n\talign-self: flex-start;\n}\n\n.cn-search-page__list {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-search-page__result {\n\tpadding: 10px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n\tbackground: var(--color-main-background);\n}\n\n.cn-search-page__result:hover {\n\tbackground: var(--color-background-hover);\n}\n\n.cn-search-page__result-head {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tgap: 8px;\n}\n\n.cn-search-page__result-title {\n\tfont-weight: 600;\n}\n\n.cn-search-page__result-badge {\n\tfont-size: 0.75em;\n\tpadding: 1px 8px;\n\tborder-radius: 9999px;\n\tbackground: var(--color-background-hover);\n\tcolor: var(--color-text-maxcontrast);\n\ttext-transform: uppercase;\n\tletter-spacing: 0.05em;\n}\n\n.cn-search-page__result-snippet {\n\tmargin: 4px 0 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-search-page__result-subtitle {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-search-page__empty,\n.cn-search-page__idle,\n.cn-search-page__loading {\n\tcolor: var(--color-text-maxcontrast);\n\tmargin: 24px 0;\n\ttext-align: center;\n\tfont-style: italic;\n}\n\n.cn-search-page__more {\n\tmargin-top: 12px;\n\tcolor: var(--color-text-maxcontrast);\n\ttext-align: center;\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_createBlock","_Fragment","_renderList","_renderSlot"],"mappings":";;;AACM,EAAA,KAAK,EAAC,gBAAiB;AAAA,EAAA,aAAW,EAAC,gBAAgB;;AAC/C,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAwB,GAAA;;;;AAa5B,EAAA,IAAI,EAAC,QAAS;AAAA,EAAA,KAAK,EAAC,wBAAwB;;AAajD,MAAA,UAAA,GAAA,E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AAA,CAAA,MAAM,CAAC,MAAM;AAAzB,6BAAAH,SAAA,EAAA,EAAAC,kBAAA,CAAyF,MAAzF,EAAA,WAAyF,EAAtBE,eAAA,CAAA,MAAM,CAAC,MAAK,CAAA,EAAA,CAAA,YAAA;;;AAEvE,sBAAA,CAAA,MAAM,CAAC,OAAO;AAAvB,2BAAAH,SAAA,EAAA,EAAAC,kBAAA,CAEG,GAFH,EAAA,WAEG,EADCE,eAAA,CAAA,MAAM,CAAC;;AAEE,sBAAA,CAAA,MAAM,CAAC,QAAQ;AAA5B,2BAAAH,SAAA,EAAA,EAAAC,kBAAA,CAAkG,OAAlG,EAAA,WAAkG,EAAzBE,eAAA,CAAA,MAAM,CAAC,QAAS,CAAA,EAAA,CAAA,YAAA;;;;;;eAI9E,KAAW,CAAA,WAAA;8BAAzBF,kBAEG,CAAA,GAAA,EAFH,WAEG,EAAAE,eAAA,CADC,MAAS,CAAA,UAAA,CAAA,EAAA,CAAA,YAAA;iBAEC,MAAS,CAAA,SAAA;gCAAvBF,kBAEG,CAAA,GAAA,EAFH,WAEG,EAAAE,eAAA,CADC,MAAQ,CAAA,SAAA,CAAA,EAAA,CAAA,YAAA;;AAGD,QAAA,CAAA,QAAA,CAAA,UAAS,GAAS,CAAA,IAAA,QAAA,CAAA,UAAW,GAAE,QAAA,CAAA,YAAY,CAAC,MAAM;0BAA7DF,kBAEK,CAAA,KAAA,EAFL,WAEK,EADDE,eAAA,CAAA,MAAA,CAAA,eAAe,CAAC,QAAU,CAAA,UAAA,EAAE,QAAY,CAAA,YAAA,CAAC,MAAM,CAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;"}
@@ -2,7 +2,7 @@ import script from './CnStepper.vue2.js';
2
2
  import { render } from './CnStepper.vue3.js';
3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-2d8e5c55";
5
+ script.__scopeId = "data-v-11ed352e";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -1 +1 @@
1
- {"version":3,"file":"CnStepper.vue2.js","sources":["../../../../src/components/CnStepper/CnStepper.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<ol class=\"cn-stepper cn-wizard-dialog__progress\"\n\t\t:class=\"[{ 'cn-stepper--board': isBoard }, lookClass]\"\n\t\t:aria-label=\"ariaLabel\"\n\t\tdata-testid=\"cn-stepper\">\n\t\t<li v-for=\"(step, idx) in steps\"\n\t\t\t:key=\"step.id\"\n\t\t\tclass=\"cn-stepper__item cn-wizard-dialog__progress-item\"\n\t\t\t:class=\"{\n\t\t\t\t'cn-stepper__item--done': idx < currentIndex,\n\t\t\t\t'cn-stepper__item--current': idx === currentIndex,\n\t\t\t\t'cn-stepper__item--upcoming': idx > currentIndex,\n\t\t\t\t'cn-wizard-dialog__progress-item--active': idx === currentIndex,\n\t\t\t\t'cn-wizard-dialog__progress-item--done': idx < currentIndex,\n\t\t\t\t'cn-wizard-dialog__progress-item--clickable': isJumpable(idx),\n\t\t\t}\"\n\t\t\t:aria-current=\"idx === currentIndex ? 'step' : undefined\"\n\t\t\t:data-step-id=\"step.id\">\n\t\t\t<component :is=\"isJumpable(idx) ? 'button' : 'span'\"\n\t\t\t\tclass=\"cn-stepper__step\"\n\t\t\t\t:type=\"isJumpable(idx) ? 'button' : undefined\"\n\t\t\t\t@click=\"isJumpable(idx) ? onJump(step.id) : null\">\n\t\t\t\t<span class=\"cn-stepper__dot cn-wizard-dialog__progress-dot\" aria-hidden=\"true\">\n\t\t\t\t\t<template v-if=\"idx < currentIndex\">\n\t\t\t\t\t\t<Check v-if=\"isBoard\"\n\t\t\t\t\t\t\tclass=\"cn-stepper__check cn-wizard-dialog__progress-check\"\n\t\t\t\t\t\t\t:size=\"16\" />\n\t\t\t\t\t\t<span v-else class=\"cn-wizard-dialog__progress-check\">✓</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<span v-else>{{ idx + 1 }}</span>\n\t\t\t\t</span>\n\t\t\t\t<span class=\"cn-stepper__label cn-wizard-dialog__progress-label\">{{ step.label }}</span>\n\t\t\t\t<span v-if=\"idx < currentIndex\" class=\"cn-stepper__sr\">{{ ', ' + completedLabel }}</span>\n\t\t\t</component>\n\t\t\t<span v-if=\"idx < steps.length - 1\"\n\t\t\t\tclass=\"cn-stepper__connector cn-wizard-dialog__progress-connector\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'cn-stepper__connector--done': idx < currentIndex,\n\t\t\t\t\t'cn-wizard-dialog__progress-connector--done': idx < currentIndex,\n\t\t\t\t}\"\n\t\t\t\taria-hidden=\"true\" />\n\t\t</li>\n\t</ol>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport { useLook } from '../../composables/useLook.js'\n\n/**\n * CnStepper - the step indicator of a wizard: an ordered list, the\n * current step marked with `aria-current=\"step\"`, finished steps as real\n * buttons only when `allowJumpBack` is set.\n *\n * In the board look (`look=\"board\"`, else the injected `cnLook`) it draws 28px\n * circles with the label beside them, a green check on a finished step, a\n * filled circle on the current one, an outlined circle on the rest and a 2px\n * connector coloured by state. In the Nextcloud look it draws the stacked\n * stepper CnWizardDialog always had, with the same class names.\n *\n * @spec openspec/changes/screens-wizard-parity/specs/wizard-dialog/spec.md#requirement-the-board-stepper\n * @event jump Emitted with a finished step's id when its button is pressed.\n *\n * @event jump Emitted with the step id when a finished step button is pressed.\n */\nexport default {\n\tname: 'CnStepper',\n\n\tcomponents: { Check },\n\n\tprops: {\n\t\t/** The steps: `{ id, label }`. */\n\t\tsteps: { type: Array, required: true },\n\t\t/** Index of the current step. */\n\t\tcurrentIndex: { type: Number, default: 0 },\n\t\t/** Let a finished step be pressed to go back to it. */\n\t\tallowJumpBack: { type: Boolean, default: false },\n\t\t/**\n\t\t * With `allowJumpBack`, the furthest step already reached: every step\n\t\t * up to it other than the current one can be pressed. Unset, only the\n\t\t * finished steps can.\n\t\t */\n\t\treachableIndex: { type: Number, default: -1 },\n\t\t/** The look; unset follows the injected `cnLook`. */\n\t\tlook: { type: String, default: undefined },\n\t\t/** Accessible name of the list. */\n\t\tariaLabel: { type: String, default: () => t('nextcloud-vue', 'Steps') },\n\t\t/** Visually hidden text after a finished step's label. */\n\t\tcompletedLabel: { type: String, default: () => t('nextcloud-vue', 'completed') },\n\t},\n\n\temits: ['jump'],\n\n\tsetup(props) {\n\t\tconst { isBoard, lookClass } = useLook(props)\n\t\treturn { isBoard, lookClass }\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward a press on a finished step.\n\t\t *\n\t\t * @param {string} id The step id.\n\t\t */\n\t\tonJump(id) {\n\t\t\t/**\n\t\t\t * @event jump Emitted with the step id when a finished step button is pressed.\n\t\t\t */\n\t\t\tthis.$emit('jump', id)\n\t\t},\n\n\t\t/**\n\t\t * Whether a step is drawn as a button.\n\t\t *\n\t\t * @param {number} idx The step index.\n\t\t * @return {boolean} True for a finished or already reached step.\n\t\t * @spec openspec/changes/stepper-export-reachable/specs/wizard-dialog/spec.md#requirement-the-stepper-can-reach-ahead-to-a-step-already-filled-in\n\t\t */\n\t\tisJumpable(idx) {\n\t\t\tif (!this.allowJumpBack || idx === this.currentIndex) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn idx < this.currentIndex || idx <= this.reachableIndex\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* The Nextcloud look: the stacked stepper, unchanged. */\n.cn-stepper {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tjustify-content: center;\n\tgap: 0;\n\tpadding: 8px 0 4px;\n\tmargin: 0 0 20px;\n\tlist-style: none;\n}\n\n.cn-stepper__item {\n\tposition: relative;\n\tflex: 1 1 0;\n\tmin-width: 0;\n\tmax-width: 180px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.8125rem;\n}\n\n.cn-stepper__step {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 6px;\n\tmax-width: 100%;\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tbackground: none;\n\tcolor: inherit;\n\tfont: inherit;\n}\n\n/* Nextcloud's server.css gives every plain button a 3px margin and the\n clickable-area height (`button:not(.button-vue, …):not(…)`, 0,2,1), which\n made a done step 40px tall around its 28px circle. Two classes outrank it. */\n.cn-stepper button.cn-stepper__step {\n\tmargin: 0;\n\tmin-height: 0;\n}\n\nbutton.cn-stepper__step {\n\tcursor: pointer;\n}\n\n.cn-stepper__dot {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 34px;\n\theight: 34px;\n\tborder-radius: 50%;\n\tborder: 2px solid var(--color-border-dark);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 14px;\n\tfont-weight: 600;\n\ttransition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;\n\tz-index: 1;\n}\n\n.cn-wizard-dialog__progress-check {\n\tfont-size: 16px;\n\tline-height: 1;\n}\n\n.cn-stepper__label {\n\tmax-width: 100%;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-stepper__connector {\n\tposition: absolute;\n\ttop: 17px;\n\tleft: calc(50% + 21px);\n\tright: calc(-50% + 21px);\n\theight: 2px;\n\tbackground: var(--color-border-dark);\n}\n\n.cn-stepper__connector--done {\n\tbackground: var(--color-primary-element);\n}\n\n.cn-stepper__item--current .cn-stepper__dot,\n.cn-stepper__item--done .cn-stepper__dot {\n\tborder-color: var(--color-primary-element);\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text, #fff);\n}\n\n.cn-stepper__item--current .cn-stepper__label {\n\tcolor: var(--color-main-text);\n\tfont-weight: 600;\n}\n\n.cn-stepper__item--done .cn-stepper__label {\n\tcolor: var(--color-main-text);\n}\n\n.cn-stepper__item--done button.cn-stepper__step:hover .cn-stepper__label {\n\tcolor: var(--color-primary-element);\n}\n\n.cn-stepper__sr {\n\tposition: absolute;\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tclip-path: inset(50%);\n\twhite-space: nowrap;\n}\n\n/* The board look: one row, 28px circles, the label beside the circle. */\n/* The board leaves 16px between the stepper and the step's body (DqInstellen). */\n.cn-stepper--board {\n\tflex-wrap: wrap;\n\talign-items: center;\n\tjustify-content: flex-start;\n\tgap: 8px;\n\tpadding: 0;\n\tmargin: 0 0 16px;\n}\n\n.cn-stepper--board .cn-stepper__item {\n\tflex: 0 1 auto;\n\tflex-direction: row;\n\talign-items: center;\n\tgap: 8px;\n\tmax-width: none;\n\tfont-size: 14px;\n}\n\n.cn-stepper--board .cn-stepper__item:not(:last-child) {\n\tflex: 1 1 auto;\n}\n\n.cn-stepper--board .cn-stepper__step {\n\tflex-direction: row;\n\tgap: 8px;\n}\n\n.cn-stepper--board .cn-stepper__dot {\n\tflex: 0 0 auto;\n\tbox-sizing: border-box;\n\twidth: 28px;\n\theight: 28px;\n\tfont-size: 14px;\n}\n\n.cn-stepper--board .cn-stepper__label {\n\toverflow: visible;\n\ttext-overflow: clip;\n\twhite-space: nowrap;\n\tfont-size: 14px;\n}\n\n.cn-stepper--board .cn-stepper__connector {\n\tposition: static;\n\tflex: 1 1 24px;\n\tmin-width: 16px;\n\theight: 2px;\n\tbackground: var(--color-border);\n}\n\n.cn-stepper--board .cn-stepper__connector--done {\n\tbackground: var(--color-success);\n}\n\n/* Done: filled success circle without an edge, 16px white check, label in\n the main text. */\n.cn-stepper--board .cn-stepper__item--done .cn-stepper__dot {\n\tborder-width: 0;\n\tbackground: var(--color-success);\n\t/* A white check on the green, as the board draws it (DqInstellen); the\n\t theme's success text tone is a dark green meant for a light ground. */\n\tcolor: var(--color-primary-element-text, #fff);\n}\n\n.cn-stepper--board .cn-stepper__item--done .cn-stepper__label {\n\tcolor: var(--color-main-text);\n\tfont-weight: 400;\n}\n\n/* Current: filled primary without an edge, number 14/700, label 14/700 in\n the main text colour. */\n.cn-stepper--board .cn-stepper__item--current .cn-stepper__dot {\n\tborder-width: 0;\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text, #fff);\n\tfont-weight: 700;\n}\n\n.cn-stepper--board .cn-stepper__item--current .cn-stepper__label {\n\tcolor: var(--color-main-text);\n\tfont-weight: 700;\n}\n\n/* Upcoming: 2px outline, number 14/700, label in the max-contrast tone. */\n.cn-stepper--board .cn-stepper__item--upcoming .cn-stepper__dot {\n\tborder: 2px solid var(--color-border-dark);\n\tbackground: transparent;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: 700;\n}\n\n.cn-stepper--board .cn-stepper__item--upcoming .cn-stepper__label {\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["t"],"mappings":";;;;AAsDA;;AAEC;AACA;AACA;AACA;;;;;AAKA;;;AAGA;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,WAAW;;AAEjB,CAAA,UAAU,EAAE,EAAE,OAAO;;AAErB,CAAA,KAAK,EAAE;;AAEN,EAAA,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM;;AAEtC,EAAA,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG;AAC1C;AACA,EAAA,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;AAChD;;;AAGC;;AAED,EAAA,cAAc,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG;AAC7C;AACA,EAAA,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW;;AAE1C,EAAA,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAMA,SAAC,CAAC,eAAe,EAAE,OAAO,CAAA,EAAG;;AAEvE,EAAA,cAAc,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAMA,SAAC,CAAC,eAAe,EAAE,WAAW,GAAG;EAChF;;AAED,CAAA,KAAK,EAAE,CAAC,MAAM,CAAC;;CAEf,KAAK,CAAC,KAAK,EAAE;AACZ,EAAA,MAAM,EAAE,OAAO,EAAE,SAAU,EAAA,GAAI,OAAO,CAAC,KAAK,EAAA;EAC5C,OAAO,EAAE,OAAO,EAAE,SAAU,EAAA;EAC5B;;AAED,CAAA,OAAO,EAAE;AACR;;AAEC;;;EAGD,MAAM,CAAC,EAAE,EAAE;AACV;AACC;;AAED,GAAA,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAA;GACrB;;AAED;;AAEC;AACA;;AAEA;;AAED,EAAA,UAAU,CAAC,GAAG,EAAE;GACf,IAAI,CAAC,IAAI,CAAC,aAAY,IAAK,GAAE,KAAM,IAAI,CAAC,YAAY,EAAE;IACrD,OAAO,KAAI;AACZ,IAAA;GACA,OAAO,GAAI,GAAE,IAAI,CAAC,gBAAgB,GAAE,IAAK,IAAI,CAAC,cAAa;GAC3D;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnStepper.vue2.js","sources":["../../../../src/components/CnStepper/CnStepper.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<ol class=\"cn-stepper cn-wizard-dialog__progress\"\n\t\t:class=\"[{ 'cn-stepper--board': isBoard }, lookClass]\"\n\t\t:aria-label=\"ariaLabel\"\n\t\tdata-testid=\"cn-stepper\">\n\t\t<li v-for=\"(step, idx) in steps\"\n\t\t\t:key=\"step.id\"\n\t\t\tclass=\"cn-stepper__item cn-wizard-dialog__progress-item\"\n\t\t\t:class=\"{\n\t\t\t\t'cn-stepper__item--done': idx < currentIndex,\n\t\t\t\t'cn-stepper__item--current': idx === currentIndex,\n\t\t\t\t'cn-stepper__item--upcoming': idx > currentIndex,\n\t\t\t\t'cn-wizard-dialog__progress-item--active': idx === currentIndex,\n\t\t\t\t'cn-wizard-dialog__progress-item--done': idx < currentIndex,\n\t\t\t\t'cn-wizard-dialog__progress-item--clickable': isJumpable(idx),\n\t\t\t}\"\n\t\t\t:aria-current=\"idx === currentIndex ? 'step' : undefined\"\n\t\t\t:data-step-id=\"step.id\">\n\t\t\t<component :is=\"isJumpable(idx) ? 'button' : 'span'\"\n\t\t\t\tclass=\"cn-stepper__step\"\n\t\t\t\t:type=\"isJumpable(idx) ? 'button' : undefined\"\n\t\t\t\t@click=\"isJumpable(idx) ? onJump(step.id) : null\">\n\t\t\t\t<span class=\"cn-stepper__dot cn-wizard-dialog__progress-dot\" aria-hidden=\"true\">\n\t\t\t\t\t<template v-if=\"idx < currentIndex\">\n\t\t\t\t\t\t<Check v-if=\"isBoard\"\n\t\t\t\t\t\t\tclass=\"cn-stepper__check cn-wizard-dialog__progress-check\"\n\t\t\t\t\t\t\t:size=\"16\" />\n\t\t\t\t\t\t<span v-else class=\"cn-wizard-dialog__progress-check\">✓</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<span v-else>{{ idx + 1 }}</span>\n\t\t\t\t</span>\n\t\t\t\t<span class=\"cn-stepper__label cn-wizard-dialog__progress-label\">{{ step.label }}</span>\n\t\t\t\t<span v-if=\"idx < currentIndex\" class=\"cn-stepper__sr\">{{ ', ' + completedLabel }}</span>\n\t\t\t</component>\n\t\t\t<span v-if=\"idx < steps.length - 1\"\n\t\t\t\tclass=\"cn-stepper__connector cn-wizard-dialog__progress-connector\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'cn-stepper__connector--done': idx < currentIndex,\n\t\t\t\t\t'cn-wizard-dialog__progress-connector--done': idx < currentIndex,\n\t\t\t\t}\"\n\t\t\t\taria-hidden=\"true\" />\n\t\t</li>\n\t</ol>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport { useLook } from '../../composables/useLook.js'\n\n/**\n * CnStepper - the step indicator of a wizard: an ordered list, the\n * current step marked with `aria-current=\"step\"`, finished steps as real\n * buttons only when `allowJumpBack` is set.\n *\n * In the board look (`look=\"board\"`, else the injected `cnLook`) it draws 28px\n * circles with the label beside them, a green check on a finished step, a\n * filled circle on the current one, an outlined circle on the rest and a 2px\n * connector coloured by state. In the Nextcloud look it draws the stacked\n * stepper CnWizardDialog always had, with the same class names.\n *\n * @spec openspec/changes/screens-wizard-parity/specs/wizard-dialog/spec.md#requirement-the-board-stepper\n * @event jump Emitted with a finished step's id when its button is pressed.\n *\n * @event jump Emitted with the step id when a finished step button is pressed.\n */\nexport default {\n\tname: 'CnStepper',\n\n\tcomponents: { Check },\n\n\tprops: {\n\t\t/** The steps: `{ id, label }`. */\n\t\tsteps: { type: Array, required: true },\n\t\t/** Index of the current step. */\n\t\tcurrentIndex: { type: Number, default: 0 },\n\t\t/** Let a finished step be pressed to go back to it. */\n\t\tallowJumpBack: { type: Boolean, default: false },\n\t\t/**\n\t\t * With `allowJumpBack`, the furthest step already reached: every step\n\t\t * up to it other than the current one can be pressed. Unset, only the\n\t\t * finished steps can.\n\t\t */\n\t\treachableIndex: { type: Number, default: -1 },\n\t\t/** The look; unset follows the injected `cnLook`. */\n\t\tlook: { type: String, default: undefined },\n\t\t/** Accessible name of the list. */\n\t\tariaLabel: { type: String, default: () => t('nextcloud-vue', 'Steps') },\n\t\t/** Visually hidden text after a finished step's label. */\n\t\tcompletedLabel: { type: String, default: () => t('nextcloud-vue', 'completed') },\n\t},\n\n\temits: ['jump'],\n\n\tsetup(props) {\n\t\tconst { isBoard, lookClass } = useLook(props)\n\t\treturn { isBoard, lookClass }\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward a press on a finished step.\n\t\t *\n\t\t * @param {string} id The step id.\n\t\t */\n\t\tonJump(id) {\n\t\t\t/**\n\t\t\t * @event jump Emitted with the step id when a finished step button is pressed.\n\t\t\t */\n\t\t\tthis.$emit('jump', id)\n\t\t},\n\n\t\t/**\n\t\t * Whether a step is drawn as a button.\n\t\t *\n\t\t * @param {number} idx The step index.\n\t\t * @return {boolean} True for a finished or already reached step.\n\t\t * @spec openspec/changes/stepper-export-reachable/specs/wizard-dialog/spec.md#requirement-the-stepper-can-reach-ahead-to-a-step-already-filled-in\n\t\t */\n\t\tisJumpable(idx) {\n\t\t\tif (!this.allowJumpBack || idx === this.currentIndex) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn idx < this.currentIndex || idx <= this.reachableIndex\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* The Nextcloud look: the stacked stepper, unchanged. */\n.cn-stepper {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tjustify-content: center;\n\tgap: 0;\n\tpadding: 8px 0 4px;\n\tmargin: 0 0 20px;\n\tlist-style: none;\n}\n\n.cn-stepper__item {\n\tposition: relative;\n\tflex: 1 1 0;\n\tmin-width: 0;\n\tmax-width: 180px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.8125rem;\n}\n\n.cn-stepper__step {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 6px;\n\tmax-width: 100%;\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tbackground: none;\n\tcolor: inherit;\n\tfont: inherit;\n}\n\n/* Nextcloud's server.css gives every plain button a 3px margin and the\n clickable-area height (`button:not(.button-vue, …):not(…)`, 0,2,1), which\n made a done step 40px tall around its 28px circle. Two classes outrank it. */\n.cn-stepper button.cn-stepper__step {\n\tmargin: 0;\n\tmin-height: 0;\n}\n\nbutton.cn-stepper__step {\n\tcursor: pointer;\n}\n\n.cn-stepper__dot {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 34px;\n\theight: 34px;\n\tborder-radius: 50%;\n\tborder: 2px solid var(--color-border-dark);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 14px;\n\tfont-weight: 600;\n\ttransition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;\n\tz-index: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n\t.cn-stepper__dot { transition: none; }\n}\n\n.cn-wizard-dialog__progress-check {\n\tfont-size: 16px;\n\tline-height: 1;\n}\n\n.cn-stepper__label {\n\tmax-width: 100%;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-stepper__connector {\n\tposition: absolute;\n\ttop: 17px;\n\tleft: calc(50% + 21px);\n\tright: calc(-50% + 21px);\n\theight: 2px;\n\tbackground: var(--color-border-dark);\n}\n\n.cn-stepper__connector--done {\n\tbackground: var(--color-primary-element);\n}\n\n.cn-stepper__item--current .cn-stepper__dot,\n.cn-stepper__item--done .cn-stepper__dot {\n\tborder-color: var(--color-primary-element);\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text, #fff);\n}\n\n.cn-stepper__item--current .cn-stepper__label {\n\tcolor: var(--color-main-text);\n\tfont-weight: 600;\n}\n\n.cn-stepper__item--done .cn-stepper__label {\n\tcolor: var(--color-main-text);\n}\n\n.cn-stepper__item--done button.cn-stepper__step:hover .cn-stepper__label {\n\tcolor: var(--color-primary-element);\n}\n\n.cn-stepper__sr {\n\tposition: absolute;\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tclip-path: inset(50%);\n\twhite-space: nowrap;\n}\n\n/* The board look: one row, 28px circles, the label beside the circle. */\n/* The board leaves 16px between the stepper and the step's body (DqInstellen).\n The row never wraps: in a narrow dialog the connectors shrink first, then\n the labels truncate. */\n.cn-stepper--board {\n\tflex-wrap: nowrap;\n\toverflow: hidden;\n\talign-items: center;\n\tjustify-content: flex-start;\n\tgap: 8px;\n\tpadding: 0;\n\tmargin: 0 0 16px;\n}\n\n.cn-stepper--board .cn-stepper__item {\n\tflex: 0 1 auto;\n\tflex-direction: row;\n\talign-items: center;\n\tgap: 8px;\n\tmin-width: 0;\n\tmax-width: none;\n\tfont-size: 14px;\n}\n\n.cn-stepper--board .cn-stepper__item:not(:last-child) {\n\tflex: 1 1 auto;\n}\n\n.cn-stepper--board .cn-stepper__step {\n\tflex-direction: row;\n\tgap: 8px;\n\tmin-width: 0;\n}\n\n.cn-stepper--board .cn-stepper__dot {\n\tflex: 0 0 auto;\n\tbox-sizing: border-box;\n\twidth: 28px;\n\theight: 28px;\n\tfont-size: 14px;\n}\n\n.cn-stepper--board .cn-stepper__label {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\tfont-size: 14px;\n}\n\n.cn-stepper--board .cn-stepper__connector {\n\tposition: static;\n\tflex: 1 1 24px;\n\tmin-width: 8px;\n\theight: 2px;\n\tbackground: var(--color-border);\n}\n\n.cn-stepper--board .cn-stepper__connector--done {\n\tbackground: var(--color-success);\n}\n\n/* Done: filled success circle without an edge, 16px white check, label in\n the main text. */\n.cn-stepper--board .cn-stepper__item--done .cn-stepper__dot {\n\tborder-width: 0;\n\tbackground: var(--color-success);\n\t/* A white check on the green, as the board draws it (DqInstellen); the\n\t theme's success text tone is a dark green meant for a light ground. */\n\tcolor: var(--color-primary-element-text, #fff);\n}\n\n.cn-stepper--board .cn-stepper__item--done .cn-stepper__label {\n\tcolor: var(--color-main-text);\n\tfont-weight: 400;\n}\n\n/* Current: filled primary without an edge, number 14/700, label 14/700 in\n the main text colour. */\n.cn-stepper--board .cn-stepper__item--current .cn-stepper__dot {\n\tborder-width: 0;\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text, #fff);\n\tfont-weight: 700;\n}\n\n.cn-stepper--board .cn-stepper__item--current .cn-stepper__label {\n\tcolor: var(--color-main-text);\n\tfont-weight: 700;\n}\n\n/* Upcoming: 2px outline, number 14/700, label in the max-contrast tone. */\n.cn-stepper--board .cn-stepper__item--upcoming .cn-stepper__dot {\n\tborder: 2px solid var(--color-border-dark);\n\tbackground: transparent;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: 700;\n}\n\n.cn-stepper--board .cn-stepper__item--upcoming .cn-stepper__label {\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["t"],"mappings":";;;;AAsDA;;AAEC;AACA;AACA;AACA;;;;;AAKA;;;AAGA;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,WAAW;;AAEjB,CAAA,UAAU,EAAE,EAAE,OAAO;;AAErB,CAAA,KAAK,EAAE;;AAEN,EAAA,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM;;AAEtC,EAAA,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG;AAC1C;AACA,EAAA,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;AAChD;;;AAGC;;AAED,EAAA,cAAc,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG;AAC7C;AACA,EAAA,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW;;AAE1C,EAAA,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAMA,SAAC,CAAC,eAAe,EAAE,OAAO,CAAA,EAAG;;AAEvE,EAAA,cAAc,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAMA,SAAC,CAAC,eAAe,EAAE,WAAW,GAAG;EAChF;;AAED,CAAA,KAAK,EAAE,CAAC,MAAM,CAAC;;CAEf,KAAK,CAAC,KAAK,EAAE;AACZ,EAAA,MAAM,EAAE,OAAO,EAAE,SAAU,EAAA,GAAI,OAAO,CAAC,KAAK,EAAA;EAC5C,OAAO,EAAE,OAAO,EAAE,SAAU,EAAA;EAC5B;;AAED,CAAA,OAAO,EAAE;AACR;;AAEC;;;EAGD,MAAM,CAAC,EAAE,EAAE;AACV;AACC;;AAED,GAAA,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAA;GACrB;;AAED;;AAEC;AACA;;AAEA;;AAED,EAAA,UAAU,CAAC,GAAG,EAAE;GACf,IAAI,CAAC,IAAI,CAAC,aAAY,IAAK,GAAE,KAAM,IAAI,CAAC,YAAY,EAAE;IACrD,OAAO,KAAI;AACZ,IAAA;GACA,OAAO,GAAI,GAAE,IAAI,CAAC,gBAAgB,GAAE,IAAK,IAAI,CAAC,cAAa;GAC3D;EACD;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CnStepper.vue3.js","sources":["../../../../src/components/CnStepper/CnStepper.vue?vue&type=template&id=2d8e5c55&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<ol class=\"cn-stepper cn-wizard-dialog__progress\"\n\t\t:class=\"[{ 'cn-stepper--board': isBoard }, lookClass]\"\n\t\t:aria-label=\"ariaLabel\"\n\t\tdata-testid=\"cn-stepper\">\n\t\t<li v-for=\"(step, idx) in steps\"\n\t\t\t:key=\"step.id\"\n\t\t\tclass=\"cn-stepper__item cn-wizard-dialog__progress-item\"\n\t\t\t:class=\"{\n\t\t\t\t'cn-stepper__item--done': idx < currentIndex,\n\t\t\t\t'cn-stepper__item--current': idx === currentIndex,\n\t\t\t\t'cn-stepper__item--upcoming': idx > currentIndex,\n\t\t\t\t'cn-wizard-dialog__progress-item--active': idx === currentIndex,\n\t\t\t\t'cn-wizard-dialog__progress-item--done': idx < currentIndex,\n\t\t\t\t'cn-wizard-dialog__progress-item--clickable': isJumpable(idx),\n\t\t\t}\"\n\t\t\t:aria-current=\"idx === currentIndex ? 'step' : undefined\"\n\t\t\t:data-step-id=\"step.id\">\n\t\t\t<component :is=\"isJumpable(idx) ? 'button' : 'span'\"\n\t\t\t\tclass=\"cn-stepper__step\"\n\t\t\t\t:type=\"isJumpable(idx) ? 'button' : undefined\"\n\t\t\t\t@click=\"isJumpable(idx) ? onJump(step.id) : null\">\n\t\t\t\t<span class=\"cn-stepper__dot cn-wizard-dialog__progress-dot\" aria-hidden=\"true\">\n\t\t\t\t\t<template v-if=\"idx < currentIndex\">\n\t\t\t\t\t\t<Check v-if=\"isBoard\"\n\t\t\t\t\t\t\tclass=\"cn-stepper__check cn-wizard-dialog__progress-check\"\n\t\t\t\t\t\t\t:size=\"16\" />\n\t\t\t\t\t\t<span v-else class=\"cn-wizard-dialog__progress-check\">✓</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<span v-else>{{ idx + 1 }}</span>\n\t\t\t\t</span>\n\t\t\t\t<span class=\"cn-stepper__label cn-wizard-dialog__progress-label\">{{ step.label }}</span>\n\t\t\t\t<span v-if=\"idx < currentIndex\" class=\"cn-stepper__sr\">{{ ', ' + completedLabel }}</span>\n\t\t\t</component>\n\t\t\t<span v-if=\"idx < steps.length - 1\"\n\t\t\t\tclass=\"cn-stepper__connector cn-wizard-dialog__progress-connector\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'cn-stepper__connector--done': idx < currentIndex,\n\t\t\t\t\t'cn-wizard-dialog__progress-connector--done': idx < currentIndex,\n\t\t\t\t}\"\n\t\t\t\taria-hidden=\"true\" />\n\t\t</li>\n\t</ol>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport { useLook } from '../../composables/useLook.js'\n\n/**\n * CnStepper - the step indicator of a wizard: an ordered list, the\n * current step marked with `aria-current=\"step\"`, finished steps as real\n * buttons only when `allowJumpBack` is set.\n *\n * In the board look (`look=\"board\"`, else the injected `cnLook`) it draws 28px\n * circles with the label beside them, a green check on a finished step, a\n * filled circle on the current one, an outlined circle on the rest and a 2px\n * connector coloured by state. In the Nextcloud look it draws the stacked\n * stepper CnWizardDialog always had, with the same class names.\n *\n * @spec openspec/changes/screens-wizard-parity/specs/wizard-dialog/spec.md#requirement-the-board-stepper\n * @event jump Emitted with a finished step's id when its button is pressed.\n *\n * @event jump Emitted with the step id when a finished step button is pressed.\n */\nexport default {\n\tname: 'CnStepper',\n\n\tcomponents: { Check },\n\n\tprops: {\n\t\t/** The steps: `{ id, label }`. */\n\t\tsteps: { type: Array, required: true },\n\t\t/** Index of the current step. */\n\t\tcurrentIndex: { type: Number, default: 0 },\n\t\t/** Let a finished step be pressed to go back to it. */\n\t\tallowJumpBack: { type: Boolean, default: false },\n\t\t/**\n\t\t * With `allowJumpBack`, the furthest step already reached: every step\n\t\t * up to it other than the current one can be pressed. Unset, only the\n\t\t * finished steps can.\n\t\t */\n\t\treachableIndex: { type: Number, default: -1 },\n\t\t/** The look; unset follows the injected `cnLook`. */\n\t\tlook: { type: String, default: undefined },\n\t\t/** Accessible name of the list. */\n\t\tariaLabel: { type: String, default: () => t('nextcloud-vue', 'Steps') },\n\t\t/** Visually hidden text after a finished step's label. */\n\t\tcompletedLabel: { type: String, default: () => t('nextcloud-vue', 'completed') },\n\t},\n\n\temits: ['jump'],\n\n\tsetup(props) {\n\t\tconst { isBoard, lookClass } = useLook(props)\n\t\treturn { isBoard, lookClass }\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward a press on a finished step.\n\t\t *\n\t\t * @param {string} id The step id.\n\t\t */\n\t\tonJump(id) {\n\t\t\t/**\n\t\t\t * @event jump Emitted with the step id when a finished step button is pressed.\n\t\t\t */\n\t\t\tthis.$emit('jump', id)\n\t\t},\n\n\t\t/**\n\t\t * Whether a step is drawn as a button.\n\t\t *\n\t\t * @param {number} idx The step index.\n\t\t * @return {boolean} True for a finished or already reached step.\n\t\t * @spec openspec/changes/stepper-export-reachable/specs/wizard-dialog/spec.md#requirement-the-stepper-can-reach-ahead-to-a-step-already-filled-in\n\t\t */\n\t\tisJumpable(idx) {\n\t\t\tif (!this.allowJumpBack || idx === this.currentIndex) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn idx < this.currentIndex || idx <= this.reachableIndex\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* The Nextcloud look: the stacked stepper, unchanged. */\n.cn-stepper {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tjustify-content: center;\n\tgap: 0;\n\tpadding: 8px 0 4px;\n\tmargin: 0 0 20px;\n\tlist-style: none;\n}\n\n.cn-stepper__item {\n\tposition: relative;\n\tflex: 1 1 0;\n\tmin-width: 0;\n\tmax-width: 180px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.8125rem;\n}\n\n.cn-stepper__step {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 6px;\n\tmax-width: 100%;\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tbackground: none;\n\tcolor: inherit;\n\tfont: inherit;\n}\n\n/* Nextcloud's server.css gives every plain button a 3px margin and the\n clickable-area height (`button:not(.button-vue, …):not(…)`, 0,2,1), which\n made a done step 40px tall around its 28px circle. Two classes outrank it. */\n.cn-stepper button.cn-stepper__step {\n\tmargin: 0;\n\tmin-height: 0;\n}\n\nbutton.cn-stepper__step {\n\tcursor: pointer;\n}\n\n.cn-stepper__dot {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 34px;\n\theight: 34px;\n\tborder-radius: 50%;\n\tborder: 2px solid var(--color-border-dark);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 14px;\n\tfont-weight: 600;\n\ttransition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;\n\tz-index: 1;\n}\n\n.cn-wizard-dialog__progress-check {\n\tfont-size: 16px;\n\tline-height: 1;\n}\n\n.cn-stepper__label {\n\tmax-width: 100%;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-stepper__connector {\n\tposition: absolute;\n\ttop: 17px;\n\tleft: calc(50% + 21px);\n\tright: calc(-50% + 21px);\n\theight: 2px;\n\tbackground: var(--color-border-dark);\n}\n\n.cn-stepper__connector--done {\n\tbackground: var(--color-primary-element);\n}\n\n.cn-stepper__item--current .cn-stepper__dot,\n.cn-stepper__item--done .cn-stepper__dot {\n\tborder-color: var(--color-primary-element);\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text, #fff);\n}\n\n.cn-stepper__item--current .cn-stepper__label {\n\tcolor: var(--color-main-text);\n\tfont-weight: 600;\n}\n\n.cn-stepper__item--done .cn-stepper__label {\n\tcolor: var(--color-main-text);\n}\n\n.cn-stepper__item--done button.cn-stepper__step:hover .cn-stepper__label {\n\tcolor: var(--color-primary-element);\n}\n\n.cn-stepper__sr {\n\tposition: absolute;\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tclip-path: inset(50%);\n\twhite-space: nowrap;\n}\n\n/* The board look: one row, 28px circles, the label beside the circle. */\n/* The board leaves 16px between the stepper and the step's body (DqInstellen). */\n.cn-stepper--board {\n\tflex-wrap: wrap;\n\talign-items: center;\n\tjustify-content: flex-start;\n\tgap: 8px;\n\tpadding: 0;\n\tmargin: 0 0 16px;\n}\n\n.cn-stepper--board .cn-stepper__item {\n\tflex: 0 1 auto;\n\tflex-direction: row;\n\talign-items: center;\n\tgap: 8px;\n\tmax-width: none;\n\tfont-size: 14px;\n}\n\n.cn-stepper--board .cn-stepper__item:not(:last-child) {\n\tflex: 1 1 auto;\n}\n\n.cn-stepper--board .cn-stepper__step {\n\tflex-direction: row;\n\tgap: 8px;\n}\n\n.cn-stepper--board .cn-stepper__dot {\n\tflex: 0 0 auto;\n\tbox-sizing: border-box;\n\twidth: 28px;\n\theight: 28px;\n\tfont-size: 14px;\n}\n\n.cn-stepper--board .cn-stepper__label {\n\toverflow: visible;\n\ttext-overflow: clip;\n\twhite-space: nowrap;\n\tfont-size: 14px;\n}\n\n.cn-stepper--board .cn-stepper__connector {\n\tposition: static;\n\tflex: 1 1 24px;\n\tmin-width: 16px;\n\theight: 2px;\n\tbackground: var(--color-border);\n}\n\n.cn-stepper--board .cn-stepper__connector--done {\n\tbackground: var(--color-success);\n}\n\n/* Done: filled success circle without an edge, 16px white check, label in\n the main text. */\n.cn-stepper--board .cn-stepper__item--done .cn-stepper__dot {\n\tborder-width: 0;\n\tbackground: var(--color-success);\n\t/* A white check on the green, as the board draws it (DqInstellen); the\n\t theme's success text tone is a dark green meant for a light ground. */\n\tcolor: var(--color-primary-element-text, #fff);\n}\n\n.cn-stepper--board .cn-stepper__item--done .cn-stepper__label {\n\tcolor: var(--color-main-text);\n\tfont-weight: 400;\n}\n\n/* Current: filled primary without an edge, number 14/700, label 14/700 in\n the main text colour. */\n.cn-stepper--board .cn-stepper__item--current .cn-stepper__dot {\n\tborder-width: 0;\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text, #fff);\n\tfont-weight: 700;\n}\n\n.cn-stepper--board .cn-stepper__item--current .cn-stepper__label {\n\tcolor: var(--color-main-text);\n\tfont-weight: 700;\n}\n\n/* Upcoming: 2px outline, number 14/700, label in the max-contrast tone. */\n.cn-stepper--board .cn-stepper__item--upcoming .cn-stepper__dot {\n\tborder: 2px solid var(--color-border-dark);\n\tbackground: transparent;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: 700;\n}\n\n.cn-stepper--board .cn-stepper__item--upcoming .cn-stepper__label {\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["_normalizeClass","_openBlock","_createElementBlock","_renderList","_createBlock","_resolveDynamicComponent","_Fragment","_createElementVNode","_toDisplayString"],"mappings":";;;;;AA8BU,EAAA,KAAK,EAAC,gDAAG;AAAA,EAAA,aAAA,EAAA,MAAA;;;;AAKA,EAAA,KAAK,EAAC,kCAAkC;;;AAIjD,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,oDAAoD,GAAA;;;AACxD,EAAA,KAAA,EAAA,gBAAA;;;;;;;AA/BN,IAAA,KA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,cAAA,CAAA,GAAG,GAAG,MAAY,CAAA,YAAA;kDAKvB,CAAAC,QAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA;qBAJD,MAAA,CAAA,OAAA;sCAATF,WAEI,CAAA,gBAAA,EAAA;;AADH,0BAAA,KAAK,EAAC,oDAAwB;AAC7B,0BAAA,IAAE,EAAA,EAAA;;sCACJF,kBAA8D,CAAA,MAAA,EAA9D,UAA8D,EAAR,GAAC,CAAA,CAAA;;AAExD,mBAAAD,SAAA,EAAA,EAAAC,kBAAA,CAAS,oCAAA,GAAA,GAAA,CAAA,CAAA,EAAA,CAAA,YAAA,CAAA;;AAEV,YAAAK,kBAAA,CAAiE,MAAjE,EAAA,UAAiE,EAAAC,eAAA,CAAA,IAAA,CAAA,KAAA,CAAA,EAAA,CAAA,YAAA;AACzD,YAAA,CAAA,GAAA,GAAA,MAAA,CAAA,YAAA;8BAARN,kBAAQ,CAAA,MAAA,EAAR,UAAQ,EAAAM,eAAA,CAAA,IAAA,GAAA,MAAA,CAAA,cAAA,CAAA,EAAA,CAAA,YAAA;;;;;SAEG,GAAG,GAAG,MAAK,CAAA,KAAA,CAAC,MAAM,GAAA,CAAA;;;AAC7B,cAAA,KAAC,kBAAA,4DAAA,EAAA;AACmB,KAAA,6BAAA,EAAA,GAAA,GAAA,MAAA,CAAA,YAAA;AAAA,KAAA,4CAAA,EAAA,GAAA,GAAA,MAAA,CAAA,YAAA;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnStepper.vue3.js","sources":["../../../../src/components/CnStepper/CnStepper.vue?vue&type=template&id=11ed352e&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<ol class=\"cn-stepper cn-wizard-dialog__progress\"\n\t\t:class=\"[{ 'cn-stepper--board': isBoard }, lookClass]\"\n\t\t:aria-label=\"ariaLabel\"\n\t\tdata-testid=\"cn-stepper\">\n\t\t<li v-for=\"(step, idx) in steps\"\n\t\t\t:key=\"step.id\"\n\t\t\tclass=\"cn-stepper__item cn-wizard-dialog__progress-item\"\n\t\t\t:class=\"{\n\t\t\t\t'cn-stepper__item--done': idx < currentIndex,\n\t\t\t\t'cn-stepper__item--current': idx === currentIndex,\n\t\t\t\t'cn-stepper__item--upcoming': idx > currentIndex,\n\t\t\t\t'cn-wizard-dialog__progress-item--active': idx === currentIndex,\n\t\t\t\t'cn-wizard-dialog__progress-item--done': idx < currentIndex,\n\t\t\t\t'cn-wizard-dialog__progress-item--clickable': isJumpable(idx),\n\t\t\t}\"\n\t\t\t:aria-current=\"idx === currentIndex ? 'step' : undefined\"\n\t\t\t:data-step-id=\"step.id\">\n\t\t\t<component :is=\"isJumpable(idx) ? 'button' : 'span'\"\n\t\t\t\tclass=\"cn-stepper__step\"\n\t\t\t\t:type=\"isJumpable(idx) ? 'button' : undefined\"\n\t\t\t\t@click=\"isJumpable(idx) ? onJump(step.id) : null\">\n\t\t\t\t<span class=\"cn-stepper__dot cn-wizard-dialog__progress-dot\" aria-hidden=\"true\">\n\t\t\t\t\t<template v-if=\"idx < currentIndex\">\n\t\t\t\t\t\t<Check v-if=\"isBoard\"\n\t\t\t\t\t\t\tclass=\"cn-stepper__check cn-wizard-dialog__progress-check\"\n\t\t\t\t\t\t\t:size=\"16\" />\n\t\t\t\t\t\t<span v-else class=\"cn-wizard-dialog__progress-check\">✓</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<span v-else>{{ idx + 1 }}</span>\n\t\t\t\t</span>\n\t\t\t\t<span class=\"cn-stepper__label cn-wizard-dialog__progress-label\">{{ step.label }}</span>\n\t\t\t\t<span v-if=\"idx < currentIndex\" class=\"cn-stepper__sr\">{{ ', ' + completedLabel }}</span>\n\t\t\t</component>\n\t\t\t<span v-if=\"idx < steps.length - 1\"\n\t\t\t\tclass=\"cn-stepper__connector cn-wizard-dialog__progress-connector\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'cn-stepper__connector--done': idx < currentIndex,\n\t\t\t\t\t'cn-wizard-dialog__progress-connector--done': idx < currentIndex,\n\t\t\t\t}\"\n\t\t\t\taria-hidden=\"true\" />\n\t\t</li>\n\t</ol>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport { useLook } from '../../composables/useLook.js'\n\n/**\n * CnStepper - the step indicator of a wizard: an ordered list, the\n * current step marked with `aria-current=\"step\"`, finished steps as real\n * buttons only when `allowJumpBack` is set.\n *\n * In the board look (`look=\"board\"`, else the injected `cnLook`) it draws 28px\n * circles with the label beside them, a green check on a finished step, a\n * filled circle on the current one, an outlined circle on the rest and a 2px\n * connector coloured by state. In the Nextcloud look it draws the stacked\n * stepper CnWizardDialog always had, with the same class names.\n *\n * @spec openspec/changes/screens-wizard-parity/specs/wizard-dialog/spec.md#requirement-the-board-stepper\n * @event jump Emitted with a finished step's id when its button is pressed.\n *\n * @event jump Emitted with the step id when a finished step button is pressed.\n */\nexport default {\n\tname: 'CnStepper',\n\n\tcomponents: { Check },\n\n\tprops: {\n\t\t/** The steps: `{ id, label }`. */\n\t\tsteps: { type: Array, required: true },\n\t\t/** Index of the current step. */\n\t\tcurrentIndex: { type: Number, default: 0 },\n\t\t/** Let a finished step be pressed to go back to it. */\n\t\tallowJumpBack: { type: Boolean, default: false },\n\t\t/**\n\t\t * With `allowJumpBack`, the furthest step already reached: every step\n\t\t * up to it other than the current one can be pressed. Unset, only the\n\t\t * finished steps can.\n\t\t */\n\t\treachableIndex: { type: Number, default: -1 },\n\t\t/** The look; unset follows the injected `cnLook`. */\n\t\tlook: { type: String, default: undefined },\n\t\t/** Accessible name of the list. */\n\t\tariaLabel: { type: String, default: () => t('nextcloud-vue', 'Steps') },\n\t\t/** Visually hidden text after a finished step's label. */\n\t\tcompletedLabel: { type: String, default: () => t('nextcloud-vue', 'completed') },\n\t},\n\n\temits: ['jump'],\n\n\tsetup(props) {\n\t\tconst { isBoard, lookClass } = useLook(props)\n\t\treturn { isBoard, lookClass }\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward a press on a finished step.\n\t\t *\n\t\t * @param {string} id The step id.\n\t\t */\n\t\tonJump(id) {\n\t\t\t/**\n\t\t\t * @event jump Emitted with the step id when a finished step button is pressed.\n\t\t\t */\n\t\t\tthis.$emit('jump', id)\n\t\t},\n\n\t\t/**\n\t\t * Whether a step is drawn as a button.\n\t\t *\n\t\t * @param {number} idx The step index.\n\t\t * @return {boolean} True for a finished or already reached step.\n\t\t * @spec openspec/changes/stepper-export-reachable/specs/wizard-dialog/spec.md#requirement-the-stepper-can-reach-ahead-to-a-step-already-filled-in\n\t\t */\n\t\tisJumpable(idx) {\n\t\t\tif (!this.allowJumpBack || idx === this.currentIndex) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn idx < this.currentIndex || idx <= this.reachableIndex\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* The Nextcloud look: the stacked stepper, unchanged. */\n.cn-stepper {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tjustify-content: center;\n\tgap: 0;\n\tpadding: 8px 0 4px;\n\tmargin: 0 0 20px;\n\tlist-style: none;\n}\n\n.cn-stepper__item {\n\tposition: relative;\n\tflex: 1 1 0;\n\tmin-width: 0;\n\tmax-width: 180px;\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 0.8125rem;\n}\n\n.cn-stepper__step {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tgap: 6px;\n\tmax-width: 100%;\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tbackground: none;\n\tcolor: inherit;\n\tfont: inherit;\n}\n\n/* Nextcloud's server.css gives every plain button a 3px margin and the\n clickable-area height (`button:not(.button-vue, …):not(…)`, 0,2,1), which\n made a done step 40px tall around its 28px circle. Two classes outrank it. */\n.cn-stepper button.cn-stepper__step {\n\tmargin: 0;\n\tmin-height: 0;\n}\n\nbutton.cn-stepper__step {\n\tcursor: pointer;\n}\n\n.cn-stepper__dot {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 34px;\n\theight: 34px;\n\tborder-radius: 50%;\n\tborder: 2px solid var(--color-border-dark);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 14px;\n\tfont-weight: 600;\n\ttransition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;\n\tz-index: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n\t.cn-stepper__dot { transition: none; }\n}\n\n.cn-wizard-dialog__progress-check {\n\tfont-size: 16px;\n\tline-height: 1;\n}\n\n.cn-stepper__label {\n\tmax-width: 100%;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-stepper__connector {\n\tposition: absolute;\n\ttop: 17px;\n\tleft: calc(50% + 21px);\n\tright: calc(-50% + 21px);\n\theight: 2px;\n\tbackground: var(--color-border-dark);\n}\n\n.cn-stepper__connector--done {\n\tbackground: var(--color-primary-element);\n}\n\n.cn-stepper__item--current .cn-stepper__dot,\n.cn-stepper__item--done .cn-stepper__dot {\n\tborder-color: var(--color-primary-element);\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text, #fff);\n}\n\n.cn-stepper__item--current .cn-stepper__label {\n\tcolor: var(--color-main-text);\n\tfont-weight: 600;\n}\n\n.cn-stepper__item--done .cn-stepper__label {\n\tcolor: var(--color-main-text);\n}\n\n.cn-stepper__item--done button.cn-stepper__step:hover .cn-stepper__label {\n\tcolor: var(--color-primary-element);\n}\n\n.cn-stepper__sr {\n\tposition: absolute;\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\toverflow: hidden;\n\tclip-path: inset(50%);\n\twhite-space: nowrap;\n}\n\n/* The board look: one row, 28px circles, the label beside the circle. */\n/* The board leaves 16px between the stepper and the step's body (DqInstellen).\n The row never wraps: in a narrow dialog the connectors shrink first, then\n the labels truncate. */\n.cn-stepper--board {\n\tflex-wrap: nowrap;\n\toverflow: hidden;\n\talign-items: center;\n\tjustify-content: flex-start;\n\tgap: 8px;\n\tpadding: 0;\n\tmargin: 0 0 16px;\n}\n\n.cn-stepper--board .cn-stepper__item {\n\tflex: 0 1 auto;\n\tflex-direction: row;\n\talign-items: center;\n\tgap: 8px;\n\tmin-width: 0;\n\tmax-width: none;\n\tfont-size: 14px;\n}\n\n.cn-stepper--board .cn-stepper__item:not(:last-child) {\n\tflex: 1 1 auto;\n}\n\n.cn-stepper--board .cn-stepper__step {\n\tflex-direction: row;\n\tgap: 8px;\n\tmin-width: 0;\n}\n\n.cn-stepper--board .cn-stepper__dot {\n\tflex: 0 0 auto;\n\tbox-sizing: border-box;\n\twidth: 28px;\n\theight: 28px;\n\tfont-size: 14px;\n}\n\n.cn-stepper--board .cn-stepper__label {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\tfont-size: 14px;\n}\n\n.cn-stepper--board .cn-stepper__connector {\n\tposition: static;\n\tflex: 1 1 24px;\n\tmin-width: 8px;\n\theight: 2px;\n\tbackground: var(--color-border);\n}\n\n.cn-stepper--board .cn-stepper__connector--done {\n\tbackground: var(--color-success);\n}\n\n/* Done: filled success circle without an edge, 16px white check, label in\n the main text. */\n.cn-stepper--board .cn-stepper__item--done .cn-stepper__dot {\n\tborder-width: 0;\n\tbackground: var(--color-success);\n\t/* A white check on the green, as the board draws it (DqInstellen); the\n\t theme's success text tone is a dark green meant for a light ground. */\n\tcolor: var(--color-primary-element-text, #fff);\n}\n\n.cn-stepper--board .cn-stepper__item--done .cn-stepper__label {\n\tcolor: var(--color-main-text);\n\tfont-weight: 400;\n}\n\n/* Current: filled primary without an edge, number 14/700, label 14/700 in\n the main text colour. */\n.cn-stepper--board .cn-stepper__item--current .cn-stepper__dot {\n\tborder-width: 0;\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text, #fff);\n\tfont-weight: 700;\n}\n\n.cn-stepper--board .cn-stepper__item--current .cn-stepper__label {\n\tcolor: var(--color-main-text);\n\tfont-weight: 700;\n}\n\n/* Upcoming: 2px outline, number 14/700, label in the max-contrast tone. */\n.cn-stepper--board .cn-stepper__item--upcoming .cn-stepper__dot {\n\tborder: 2px solid var(--color-border-dark);\n\tbackground: transparent;\n\tcolor: var(--color-text-maxcontrast);\n\tfont-weight: 700;\n}\n\n.cn-stepper--board .cn-stepper__item--upcoming .cn-stepper__label {\n\tcolor: var(--color-text-maxcontrast);\n}\n</style>\n"],"names":["_normalizeClass","_openBlock","_createElementBlock","_renderList","_createBlock","_resolveDynamicComponent","_Fragment","_createElementVNode","_toDisplayString"],"mappings":";;;;;AA8BU,EAAA,KAAK,EAAC,gDAAG;AAAA,EAAA,aAAA,EAAA,MAAA;;;;AAKA,EAAA,KAAK,EAAC,kCAAkC;;;AAIjD,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,oDAAoD,GAAA;;;AACxD,EAAA,KAAA,EAAA,gBAAA;;;;;;;AA/BN,IAAA,KAAI,EAACA,cAAA,CAAA,CAAA,uCAAsB,EACjB,CAAA,EAAA,mBAAA,EAAA,MAAA,CAAA,OAAA,IAAA,MAAA,CAAA,SAAA,CAAA,CAAA,CAAA;AACb,IAAA,YAAU,EAAE,MAAS,CAAA,SAAA;AACrB,IAAA,aAAQ,EAAA,YAAA;;AACP,KAAAC,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA,SAAwB,EAAA,IAAA,EAAAC,UAAA,CAAA,MAAA,CAAA,KAAI,EAAlB,CAAA,IAAI,EAAE,GAAG,KAAA;2BAAnBD;QACA,GAAG,EAAE,IAAI,CAAC,EAAE;AACZ,QAAA,KAAI,kBAAC,kDAA2C,EAAA;AACT,IAAA,wBAAA,EAAA,GAAI,GAAE,MAAY,CAAA,YAAA;AAAM,IAAA,2BAAA,EAAA,GAAA,KAAA,MAAA,CAAA,YAAA;A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A,MAAA,CAAA,YAAA;8BAARN,kBAAQ,CAAA,MAAA,EAAR,UAAQ,EAAAM,eAAA,CAAA,IAAA,GAAA,MAAA,CAAA,cAAA,CAAA,EAAA,CAAA,YAAA;;;;;SAEG,GAAG,GAAG,MAAK,CAAA,KAAA,CAAC,MAAM,GAAA,CAAA;;;AAC7B,cAAA,KAAC,kBAAA,4DAAA,EAAA;AACmB,KAAA,6BAAA,EAAA,GAAA,GAAA,MAAA,CAAA,YAAA;AAAA,KAAA,4CAAA,EAAA,GAAA,GAAA,MAAA,CAAA,YAAA;;;;;;;;;;;;"}
@@ -3,7 +3,7 @@ export { taskFieldUnavailableReason } from './CnTaskFormFields.vue2.js';
3
3
  import { render } from './CnTaskFormFields.vue3.js';
4
4
 
5
5
  script.render = render;
6
- script.__scopeId = "data-v-0fd98114";
6
+ script.__scopeId = "data-v-0043be0c";
7
7
  const __sfc_main = script;
8
8
 
9
9
  export { __sfc_main as default };