@conduction/nextcloud-vue 2.162.0 → 2.163.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/esm/components/CnChipListManager/CnChipListManager.vue.js +9 -0
  2. package/dist/esm/components/CnChipListManager/CnChipListManager.vue.js.map +1 -0
  3. package/dist/esm/components/CnChipListManager/CnChipListManager.vue2.js +304 -0
  4. package/dist/esm/components/CnChipListManager/CnChipListManager.vue2.js.map +1 -0
  5. package/dist/esm/components/CnChipListManager/CnChipListManager.vue3.js +161 -0
  6. package/dist/esm/components/CnChipListManager/CnChipListManager.vue3.js.map +1 -0
  7. package/dist/esm/components/CnFilesBrowser/openRegisterSource.js +2 -1
  8. package/dist/esm/components/CnFilesBrowser/openRegisterSource.js.map +1 -1
  9. package/dist/esm/components/CnFilterRowsEditor/CnFilterRowsEditor.vue.js +1 -1
  10. package/dist/esm/components/CnFilterRowsEditor/CnFilterRowsEditor.vue2.js +4 -0
  11. package/dist/esm/components/CnFilterRowsEditor/CnFilterRowsEditor.vue2.js.map +1 -1
  12. package/dist/esm/components/CnFilterRowsEditor/CnFilterRowsEditor.vue3.js.map +1 -1
  13. package/dist/esm/components/CnFormDialog/CnFormDialog.vue.js +1 -1
  14. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js +2 -2
  15. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
  16. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
  17. package/dist/esm/components/CnIconPicker/CnIconPicker.vue.js +1 -1
  18. package/dist/esm/components/CnIconPicker/CnIconPicker.vue2.js +4 -3
  19. package/dist/esm/components/CnIconPicker/CnIconPicker.vue2.js.map +1 -1
  20. package/dist/esm/components/CnIconPicker/CnIconPicker.vue3.js.map +1 -1
  21. package/dist/esm/components/CnIconPicker/iconCatalogues.js +16 -3
  22. package/dist/esm/components/CnIconPicker/iconCatalogues.js.map +1 -1
  23. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +76 -8
  24. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  25. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +2 -2
  26. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  27. package/dist/esm/components/CnLinksWidgetForm/CnLinksWidgetForm.vue.js +1 -1
  28. package/dist/esm/components/CnLinksWidgetForm/CnLinksWidgetForm.vue2.js +2 -1
  29. package/dist/esm/components/CnLinksWidgetForm/CnLinksWidgetForm.vue2.js.map +1 -1
  30. package/dist/esm/components/CnLinksWidgetForm/CnLinksWidgetForm.vue3.js.map +1 -1
  31. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue.js +1 -1
  32. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue2.js +6 -1
  33. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue2.js.map +1 -1
  34. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue3.js.map +1 -1
  35. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue.js +1 -1
  36. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js +1 -1
  37. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
  38. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
  39. package/dist/esm/components/CnObjectListWidgetForm/CnObjectListWidgetForm.vue.js +1 -1
  40. package/dist/esm/components/CnObjectListWidgetForm/CnObjectListWidgetForm.vue2.js +4 -0
  41. package/dist/esm/components/CnObjectListWidgetForm/CnObjectListWidgetForm.vue2.js.map +1 -1
  42. package/dist/esm/components/CnObjectListWidgetForm/CnObjectListWidgetForm.vue3.js.map +1 -1
  43. package/dist/esm/components/CnPageTreeNode/CnPageTreeRow.vue.js +1 -1
  44. package/dist/esm/components/CnPageTreeNode/CnPageTreeRow.vue2.js +10 -1
  45. package/dist/esm/components/CnPageTreeNode/CnPageTreeRow.vue2.js.map +1 -1
  46. package/dist/esm/components/CnPageTreeNode/CnPageTreeRow.vue3.js.map +1 -1
  47. package/dist/esm/components/CnSchemaFormDialog/CnSchemaPropertyActions.vue2.js +22 -0
  48. package/dist/esm/components/CnSchemaFormDialog/CnSchemaPropertyActions.vue2.js.map +1 -1
  49. package/dist/esm/components/CnSchemaFormDialog/CnSchemaPropertyActions.vue3.js.map +1 -1
  50. package/dist/esm/components/CnStagesWidgetForm/CnStagesWidgetForm.vue.js +1 -1
  51. package/dist/esm/components/CnStagesWidgetForm/CnStagesWidgetForm.vue2.js +4 -0
  52. package/dist/esm/components/CnStagesWidgetForm/CnStagesWidgetForm.vue2.js.map +1 -1
  53. package/dist/esm/components/CnStagesWidgetForm/CnStagesWidgetForm.vue3.js.map +1 -1
  54. package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue.js +1 -1
  55. package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue2.js +1 -1
  56. package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue2.js.map +1 -1
  57. package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue3.js.map +1 -1
  58. package/dist/esm/composables/indexSources.js +30 -2
  59. package/dist/esm/composables/indexSources.js.map +1 -1
  60. package/dist/esm/index.js +1 -0
  61. package/dist/esm/index.js.map +1 -1
  62. package/dist/esm/integrations/builtin/analytics/CnAnalyticsCard.vue.js +1 -1
  63. package/dist/esm/integrations/builtin/analytics/CnAnalyticsCard.vue2.js +2 -1
  64. package/dist/esm/integrations/builtin/analytics/CnAnalyticsCard.vue2.js.map +1 -1
  65. package/dist/esm/integrations/builtin/analytics/CnAnalyticsCard.vue3.js.map +1 -1
  66. package/dist/esm/integrations/builtin/analytics/CnAnalyticsTab.vue.js +1 -1
  67. package/dist/esm/integrations/builtin/analytics/CnAnalyticsTab.vue2.js +3 -2
  68. package/dist/esm/integrations/builtin/analytics/CnAnalyticsTab.vue2.js.map +1 -1
  69. package/dist/esm/integrations/builtin/analytics/CnAnalyticsTab.vue3.js.map +1 -1
  70. package/dist/esm/integrations/builtin/photos/CnPhotosCard.vue.js +1 -1
  71. package/dist/esm/integrations/builtin/photos/CnPhotosCard.vue2.js +2 -1
  72. package/dist/esm/integrations/builtin/photos/CnPhotosCard.vue2.js.map +1 -1
  73. package/dist/esm/integrations/builtin/photos/CnPhotosCard.vue3.js.map +1 -1
  74. package/dist/esm/integrations/builtin/photos/CnPhotosTab.vue.js +1 -1
  75. package/dist/esm/integrations/builtin/photos/CnPhotosTab.vue2.js +2 -1
  76. package/dist/esm/integrations/builtin/photos/CnPhotosTab.vue2.js.map +1 -1
  77. package/dist/esm/integrations/builtin/photos/CnPhotosTab.vue3.js.map +1 -1
  78. package/dist/esm/integrations/builtin/xwiki/CnXwikiCard.vue.js +1 -1
  79. package/dist/esm/integrations/builtin/xwiki/CnXwikiCard.vue2.js +2 -6
  80. package/dist/esm/integrations/builtin/xwiki/CnXwikiCard.vue2.js.map +1 -1
  81. package/dist/esm/integrations/builtin/xwiki/CnXwikiCard.vue3.js.map +1 -1
  82. package/dist/esm/integrations/builtin/xwiki/CnXwikiTab.vue.js +1 -1
  83. package/dist/esm/integrations/builtin/xwiki/CnXwikiTab.vue2.js +2 -6
  84. package/dist/esm/integrations/builtin/xwiki/CnXwikiTab.vue2.js.map +1 -1
  85. package/dist/esm/integrations/builtin/xwiki/CnXwikiTab.vue3.js.map +1 -1
  86. package/dist/esm/integrations/utils/marker.js +35 -6
  87. package/dist/esm/integrations/utils/marker.js.map +1 -1
  88. package/dist/esm/l10n/en.json.js +8 -0
  89. package/dist/esm/l10n/en.json.js.map +1 -1
  90. package/dist/esm/l10n/nl.json.js +8 -0
  91. package/dist/esm/l10n/nl.json.js.map +1 -1
  92. package/dist/esm/library-style.js +1 -1
  93. package/dist/esm/nextcloud-vue.css +478 -334
  94. package/dist/esm/utils/fillTemplate.js +3 -0
  95. package/dist/esm/utils/fillTemplate.js.map +1 -1
  96. package/dist/esm/utils/htmlToText.js +36 -0
  97. package/dist/esm/utils/htmlToText.js.map +1 -0
  98. package/dist/esm/utils/prototypeKeys.js +20 -0
  99. package/dist/esm/utils/prototypeKeys.js.map +1 -0
  100. package/dist/esm/utils/toastUiRawHtmlGuard.js +166 -0
  101. package/dist/esm/utils/toastUiRawHtmlGuard.js.map +1 -0
  102. package/dist/nextcloud-vue.cjs.js +11501 -10640
  103. package/dist/nextcloud-vue.cjs.js.map +2 -2
  104. package/dist/nextcloud-vue.css +478 -334
  105. package/l10n/en.json +8 -0
  106. package/l10n/nl.json +8 -0
  107. package/package.json +1 -1
  108. package/src/components/CnChipListManager/CnChipListManager.vue +504 -0
  109. package/src/components/CnChipListManager/index.js +4 -0
  110. package/src/components/CnFilesBrowser/openRegisterSource.js +2 -1
  111. package/src/components/CnFilterRowsEditor/CnFilterRowsEditor.vue +4 -0
  112. package/src/components/CnFormDialog/CnFormDialog.vue +2 -2
  113. package/src/components/CnIconPicker/CnIconPicker.vue +4 -3
  114. package/src/components/CnIconPicker/iconCatalogues.js +16 -3
  115. package/src/components/CnIndexPage/CnIndexPage.vue +78 -10
  116. package/src/components/CnLinksWidgetForm/CnLinksWidgetForm.vue +2 -1
  117. package/src/components/CnMarkdownEditor/CnMarkdownEditor.vue +6 -1
  118. package/src/components/CnObjectListWidget/CnObjectListWidget.vue +1 -1
  119. package/src/components/CnObjectListWidgetForm/CnObjectListWidgetForm.vue +4 -0
  120. package/src/components/CnPageTreeNode/CnPageTreeRow.vue +10 -1
  121. package/src/components/CnSchemaFormDialog/CnSchemaPropertyActions.vue +22 -0
  122. package/src/components/CnStagesWidgetForm/CnStagesWidgetForm.vue +4 -0
  123. package/src/components/CnWalkthrough/CnWalkthrough.vue +1 -1
  124. package/src/components/index.js +1 -0
  125. package/src/composables/indexSources.js +30 -2
  126. package/src/css/look-board-detail.css +6 -4
  127. package/src/css/look-board.css +46 -1
  128. package/src/index.js +1 -0
  129. package/src/integrations/builtin/analytics/CnAnalyticsCard.vue +2 -1
  130. package/src/integrations/builtin/analytics/CnAnalyticsTab.vue +3 -2
  131. package/src/integrations/builtin/photos/CnPhotosCard.vue +2 -1
  132. package/src/integrations/builtin/photos/CnPhotosTab.vue +2 -1
  133. package/src/integrations/builtin/xwiki/CnXwikiCard.vue +2 -6
  134. package/src/integrations/builtin/xwiki/CnXwikiTab.vue +2 -6
  135. package/src/integrations/utils/marker.js +35 -6
  136. package/src/utils/fillTemplate.js +3 -0
  137. package/src/utils/htmlToText.js +33 -0
  138. package/src/utils/prototypeKeys.js +17 -0
  139. package/src/utils/toastUiRawHtmlGuard.js +162 -0
@@ -449,7 +449,7 @@
449
449
  :key="`${field.key}-${val}`"
450
450
  :modelValue="isFilterActive(field.key, val)"
451
451
  @update:modelValue="toggleFilter(field.key, val)">
452
- {{ val }}
452
+ {{ activeFilterValueLabel(field.key, val) }}
453
453
  </NcActionCheckbox>
454
454
  </template>
455
455
  </NcActions>
@@ -964,7 +964,7 @@
964
964
  :key="`${field.key}-${val}`"
965
965
  :modelValue="isFilterActive(field.key, val)"
966
966
  @update:modelValue="toggleFilter(field.key, val)">
967
- {{ val }}
967
+ {{ activeFilterValueLabel(field.key, val) }}
968
968
  </NcActionCheckbox>
969
969
  </template>
970
970
  </NcActions>
@@ -4301,6 +4301,22 @@ export default {
4301
4301
  default: false,
4302
4302
  },
4303
4303
 
4304
+ /**
4305
+ * Filter menu entries with no column behind them (manifest
4306
+ * `config.filterMenuFields`): `[{ key, label?, values?, referenceType? }]`.
4307
+ * Each lists its values, else the schema's enum or options, else the
4308
+ * API's facet buckets, else a named source's `facets()`, each value
4309
+ * named as the Active chip names it. `referenceType: "nextcloud-user"`
4310
+ * names a user id by its display name (PqContracten "Eigenaar").
4311
+ *
4312
+ * @type {Array<{key: string, label?: string, values?: string[], referenceType?: string}>}
4313
+ * @spec openspec/changes/filter-menu-fields/specs/filter-menu-fields/spec.md#requirement-a-filter-menu-entry-needs-no-column
4314
+ */
4315
+ filterMenuFields: {
4316
+ type: Array,
4317
+ default: () => [],
4318
+ },
4319
+
4304
4320
  /**
4305
4321
  * Show a column menu (columns button) in the table header, above the
4306
4322
  * row-actions column. Its menu lists every governed column as a toggleable
@@ -8029,6 +8045,16 @@ export default {
8029
8045
  out.push({ key, label: this.cnTranslate(colObj.label || def.title || key), values: values.map((v) => String(v)) })
8030
8046
  }
8031
8047
  }
8048
+ const taken = new Set(out.map((field) => field.key))
8049
+ for (const entry of (Array.isArray(this.filterMenuFields) ? this.filterMenuFields : [])) {
8050
+ if (!entry || typeof entry.key !== 'string' || entry.key === '' || taken.has(entry.key)) {
8051
+ continue
8052
+ }
8053
+ const values = this.filterMenuValuesOf(entry)
8054
+ if (values.length > 0) {
8055
+ out.push({ key: entry.key, label: this.cnTranslate(entry.label || props[entry.key]?.title || entry.key), values })
8056
+ }
8057
+ }
8032
8058
  return out
8033
8059
  },
8034
8060
 
@@ -11767,26 +11793,37 @@ export default {
11767
11793
 
11768
11794
  /**
11769
11795
  * The field an Active chip names: the page's `filterLabels` label, the
11770
- * schema property's title, the sidebar field's title, else the key.
11796
+ * schema property's title, the sidebar field's title, the column's
11797
+ * label, else the key. An operator key (`address[like]`) names its
11798
+ * field (`address`) unless `filterLabels` names the whole key.
11771
11799
  *
11772
11800
  * @param {string} key The filter key.
11773
11801
  * @return {string} The translated field name.
11774
11802
  * @spec openspec/changes/index-filter-labels/specs/active-filter-line-board-look/spec.md#requirement-a-page-names-its-filters
11775
11803
  */
11776
11804
  activeFilterFieldLabel(key) {
11777
- const named = this.filterLabels && this.filterLabels[key]
11805
+ const whole = this.filterLabels && this.filterLabels[key]
11806
+ if (whole && typeof whole.label === 'string' && whole.label !== '') {
11807
+ return this.cnTranslate(whole.label)
11808
+ }
11809
+ const field = /^(.+)\[[a-z]+\]$/.exec(key)?.[1] ?? key
11810
+ const named = this.filterLabels && this.filterLabels[field]
11778
11811
  if (named && typeof named.label === 'string' && named.label !== '') {
11779
11812
  return this.cnTranslate(named.label)
11780
11813
  }
11781
- const prop = this.effectiveSchema?.properties?.[key]
11814
+ const prop = this.effectiveSchema?.properties?.[field]
11782
11815
  if (prop && typeof prop.title === 'string' && prop.title !== '') {
11783
11816
  return this.cnTranslate(prop.title)
11784
11817
  }
11785
- const field = declaredFilterFields({ sidebar: this.sidebar, sourceConfig: this.sourceConfig })[key]
11786
- if (field && typeof field.title === 'string' && field.title !== '') {
11787
- return this.cnTranslate(field.title)
11818
+ const declared = declaredFilterFields({ sidebar: this.sidebar, sourceConfig: this.sourceConfig })[field]
11819
+ if (declared && typeof declared.title === 'string' && declared.title !== '') {
11820
+ return this.cnTranslate(declared.title)
11821
+ }
11822
+ const column = (Array.isArray(this.columns) ? this.columns : []).find((col) => col && typeof col === 'object' && col.key === field)
11823
+ if (column && typeof column.label === 'string' && column.label !== '') {
11824
+ return this.cnTranslate(column.label)
11788
11825
  }
11789
- return this.cnTranslate(key)
11826
+ return this.cnTranslate(field)
11790
11827
  },
11791
11828
 
11792
11829
  /**
@@ -12038,9 +12075,14 @@ export default {
12038
12075
  }
12039
12076
  const prop = this.effectiveSchema?.properties?.[key]
12040
12077
  // The reader on a user filter is "me" (DqFilterInMenu "Behandelaar: ik").
12041
- if (prop && prop.referenceType === 'nextcloud-user' && id === (getCurrentUser()?.uid ?? '')) {
12078
+ const menuField = (Array.isArray(this.filterMenuFields) ? this.filterMenuFields : []).find((entry) => entry && entry.key === key)
12079
+ const userField = (prop && prop.referenceType === 'nextcloud-user') || (menuField && menuField.referenceType === 'nextcloud-user')
12080
+ if (userField && id === (getCurrentUser()?.uid ?? '')) {
12042
12081
  return t('nextcloud-vue', 'me')
12043
12082
  }
12083
+ if (userField) {
12084
+ return userDisplayName(id) || id
12085
+ }
12044
12086
  if (prop && prop.referenceType === 'nextcloud-group') {
12045
12087
  const name = groupDisplayName(id)
12046
12088
  if (name === null) {
@@ -12709,6 +12751,32 @@ export default {
12709
12751
  * @param {string} val The enum value to toggle.
12710
12752
  * @return {void}
12711
12753
  */
12754
+ /**
12755
+ * The values a column-less filter menu entry offers: its own, else the
12756
+ * schema's enum or options, else the API's facet buckets, else the
12757
+ * named source's `facets()`.
12758
+ *
12759
+ * @param {{key: string, values?: Array}} entry The `filterMenuFields` entry.
12760
+ * @return {string[]} The values.
12761
+ * @spec openspec/changes/filter-menu-fields/specs/filter-menu-fields/spec.md#requirement-a-filter-menu-entry-needs-no-column
12762
+ */
12763
+ filterMenuValuesOf(entry) {
12764
+ const valueOf = (bucket) => (bucket && typeof bucket === 'object' ? bucket.value : bucket)
12765
+ const def = this.effectiveSchema?.properties?.[entry.key] || {}
12766
+ const sourceFacets = this.isNamedSource && this.namedSource && typeof this.namedSource.facets === 'function'
12767
+ ? (this.namedSource.facets() || {})[entry.key]
12768
+ : null
12769
+ const candidates = [
12770
+ entry.values,
12771
+ def.enum,
12772
+ Array.isArray(def.oneOf) ? def.oneOf.map((option) => option && option.const) : null,
12773
+ this.effectiveFacetData?.[entry.key]?.values,
12774
+ sourceFacets,
12775
+ ]
12776
+ const found = candidates.find((list) => Array.isArray(list) && list.length > 0) || []
12777
+ return [...new Set(found.map(valueOf).filter((value) => value !== null && value !== undefined && value !== '').map(String))]
12778
+ },
12779
+
12712
12780
  toggleFilter(key, val) {
12713
12781
  const current = Array.isArray(this.effectiveActiveFilters[key]) ? this.effectiveActiveFilters[key] : []
12714
12782
  const values = current.includes(val) ? current.filter((v) => v !== val) : [...current, val]
@@ -187,6 +187,7 @@
187
187
  <script>
188
188
  import { translate as t } from '@nextcloud/l10n'
189
189
  import CnIconBrowser from '../CnIconBrowser/CnIconBrowser.vue'
190
+ import { isPrototypeKey } from '../../utils/prototypeKeys.js'
190
191
 
191
192
  const VALID_LAYOUTS = Object.freeze(['card', 'inline', 'icon-only'])
192
193
  const VALID_SIZES = Object.freeze(['small', 'medium', 'large'])
@@ -488,7 +489,7 @@ export default {
488
489
  return
489
490
  }
490
491
  const link = section.links[linkIndex]
491
- if (!link) {
492
+ if (!link || isPrototypeKey(field)) {
492
493
  return
493
494
  }
494
495
  link[field] = value
@@ -60,6 +60,7 @@
60
60
  <script>
61
61
  import { translate as t } from '@nextcloud/l10n'
62
62
  import { cnRenderMarkdown } from '../../composables/cnRenderMarkdown.js'
63
+ import { guardedToastUiEditorClass } from '../../utils/toastUiRawHtmlGuard.js'
63
64
  import { toastUiSanitizer } from '../../utils/toastUiSanitizer.js'
64
65
 
65
66
  /**
@@ -394,7 +395,11 @@ export default {
394
395
  if (!el) {
395
396
  return
396
397
  }
397
- this.toastEditor = new Editor({
398
+ // customHTMLSanitizer does not reach Toast UI's raw HTML
399
+ // converters, paste or setHTML; the guarded class routes those
400
+ // through DOMPurify 3 as well (see utils/toastUiRawHtmlGuard.js).
401
+ const GuardedEditor = guardedToastUiEditorClass(Editor)
402
+ this.toastEditor = new GuardedEditor({
398
403
  el,
399
404
  ...this.wysiwygOptions,
400
405
  initialValue: this.localValue,
@@ -903,7 +903,7 @@ export default {
903
903
  // `secondary` (a second, muted line under the cell) rides
904
904
  // along too: the table draws it, and dropping it here took the
905
905
  // list rows' second line away (zuiddrecht-pixel-gaps-3).
906
- for (const k of ['format', 'widget', 'widgetProps', 'formatter', 'formatterOptions', 'align', 'width', 'type', 'enum', 'enumLabels', 'sortable', 'secondary', 'colorMap', 'grow', 'cellClass', 'emptyValue', 'emptyValueBy', 'emptyLabel', 'firstOf', 'secondaryLabels', 'secondaryRefs']) {
906
+ for (const k of ['format', 'widget', 'widgetProps', 'formatter', 'formatterOptions', 'align', 'width', 'type', 'enum', 'enumLabels', 'sortable', 'secondary', 'colorMap', 'grow', 'cellClass', 'filterable', 'filterField', 'emptyValue', 'emptyValueBy', 'emptyLabel', 'firstOf', 'secondaryLabels', 'secondaryRefs']) {
907
907
  if (c[k] !== undefined) {
908
908
  out[k] = c[k]
909
909
  }
@@ -89,6 +89,7 @@ import CnFieldPicker from '../CnFieldPicker/CnFieldPicker.vue'
89
89
  import CnFilterRowsEditor from '../CnFilterRowsEditor/CnFilterRowsEditor.vue'
90
90
  import CnRegisterSchemaSelect from '../CnRegisterSchemaSelect/CnRegisterSchemaSelect.vue'
91
91
  import { fetchSchemaProperties } from '../../utils/fetchSchemaProperties.js'
92
+ import { isPrototypeKey } from '../../utils/prototypeKeys.js'
92
93
  import { filterToRows, rowsToFilter } from '../CnFilterRowsEditor/filterRows.js'
93
94
 
94
95
  const DEFAULT_CONTENT = Object.freeze({
@@ -302,6 +303,9 @@ export default {
302
303
  * @return {void}
303
304
  */
304
305
  updateColumn(i, cell, value) {
306
+ if (isPrototypeKey(cell)) {
307
+ return
308
+ }
305
309
  const col = this.columns[i]
306
310
  if (cell === 'key') {
307
311
  // Auto-fill the header label from the property key when the user
@@ -462,7 +462,16 @@ export default {
462
462
  * @return {void}
463
463
  */
464
464
  commitSlug() {
465
- const next = String(this.slugDraft || '').trim().toLowerCase().replace(/[^a-z0-9-]+/g, '-').replace(/^-+|-+$/g, '')
465
+ const dashed = String(this.slugDraft || '').trim().toLowerCase().replace(/[^a-z0-9-]+/g, '-')
466
+ let start = 0
467
+ let end = dashed.length
468
+ while (start < end && dashed[start] === '-') {
469
+ start++
470
+ }
471
+ while (end > start && dashed[end - 1] === '-') {
472
+ end--
473
+ }
474
+ const next = dashed.slice(start, end)
466
475
  if (!next || next === this.page.id) {
467
476
  this.slugDraft = this.page.id
468
477
  return
@@ -536,6 +536,7 @@ import Close from 'vue-material-design-icons/Close.vue'
536
536
  import ContentCopy from 'vue-material-design-icons/ContentCopy.vue'
537
537
  import Plus from 'vue-material-design-icons/Plus.vue'
538
538
  import TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'
539
+ import { isPrototypeKey } from '../../utils/prototypeKeys.js'
539
540
 
540
541
  /**
541
542
  * CnSchemaPropertyActions — NcActions dropdown for a single schema property.
@@ -685,6 +686,9 @@ export default {
685
686
  // --- Property setting updates ---
686
687
 
687
688
  updatePropertySetting(key, setting, value) {
689
+ if (isPrototypeKey(key) || isPrototypeKey(setting)) {
690
+ return
691
+ }
688
692
  if (this.schema.properties[key]) {
689
693
  const settingValue = typeof value === 'object' && value?.id ? value.id : value
690
694
  this.schema.properties[key][setting] = settingValue
@@ -693,6 +697,9 @@ export default {
693
697
  },
694
698
 
695
699
  updatePropertyRequired(key, isRequired) {
700
+ if (isPrototypeKey(key)) {
701
+ return
702
+ }
696
703
  if (this.schema.properties[key]) {
697
704
  if (isRequired) {
698
705
  this.schema.properties[key].required = true
@@ -1322,6 +1329,9 @@ export default {
1322
1329
  },
1323
1330
 
1324
1331
  updateFilePropertySetting(key, setting, value) {
1332
+ if (isPrototypeKey(key) || isPrototypeKey(setting)) {
1333
+ return
1334
+ }
1325
1335
  if (this.schema.properties[key]) {
1326
1336
  if (this.schema.properties[key].type === 'file') {
1327
1337
  this.schema.properties[key][setting] = value
@@ -1332,6 +1342,9 @@ export default {
1332
1342
  },
1333
1343
 
1334
1344
  updateFileProperty(key, setting, value) {
1345
+ if (isPrototypeKey(key) || isPrototypeKey(setting)) {
1346
+ return
1347
+ }
1335
1348
  if (this.schema.properties[key]) {
1336
1349
  if (['allowedTypes', 'allowedTags', 'autoTags'].includes(setting)) {
1337
1350
  const arrayValue = value ? value.split(',').map((item) => item.trim()).filter((item) => item !== '') : []
@@ -1371,6 +1384,9 @@ export default {
1371
1384
  },
1372
1385
 
1373
1386
  updateFilePropertyTags(key, setting, selectedOptions) {
1387
+ if (isPrototypeKey(key) || isPrototypeKey(setting)) {
1388
+ return
1389
+ }
1374
1390
  if (this.schema.properties[key]) {
1375
1391
  const tags = selectedOptions ? selectedOptions.map((option) => option.id || option) : []
1376
1392
 
@@ -1396,6 +1412,9 @@ export default {
1396
1412
  },
1397
1413
 
1398
1414
  updatePropertyTableSetting(key, setting, value) {
1415
+ if (isPrototypeKey(key) || isPrototypeKey(setting)) {
1416
+ return
1417
+ }
1399
1418
  if (!this.schema.properties[key]) {
1400
1419
  return
1401
1420
  }
@@ -1551,6 +1570,9 @@ export default {
1551
1570
  },
1552
1571
 
1553
1572
  updatePropertyGroupPermission(key, groupId, action, hasPermission) {
1573
+ if (isPrototypeKey(key) || isPrototypeKey(action)) {
1574
+ return
1575
+ }
1554
1576
  if (!this.schema.properties[key]) {
1555
1577
  return
1556
1578
  }
@@ -191,6 +191,7 @@ import { translate as t } from '@nextcloud/l10n'
191
191
  import { NcSelect, NcTextField } from '@nextcloud/vue'
192
192
  import CnFilterRowsEditor from '../CnFilterRowsEditor/CnFilterRowsEditor.vue'
193
193
  import CnRegisterSchemaSelect from '../CnRegisterSchemaSelect/CnRegisterSchemaSelect.vue'
194
+ import { isPrototypeKey } from '../../utils/prototypeKeys.js'
194
195
  import { filterToRows, rowsToFilter } from '../CnFilterRowsEditor/filterRows.js'
195
196
 
196
197
  /**
@@ -385,6 +386,9 @@ export default {
385
386
  */
386
387
  setPath(path, value) {
387
388
  const keys = path.split('.')
389
+ if (keys.some(isPrototypeKey)) {
390
+ return
391
+ }
388
392
  const last = keys.pop()
389
393
  let target = this.draft
390
394
  for (const key of keys) {
@@ -789,7 +789,7 @@ export default {
789
789
  return null
790
790
  }
791
791
  }
792
- const esc = (v) => (window.CSS && CSS.escape ? CSS.escape(v) : String(v).replace(/"/g, '\\"'))
792
+ const esc = (v) => (window.CSS && CSS.escape ? CSS.escape(v) : String(v).replace(/["\\]/g, '\\$&'))
793
793
  if (tgt.kind === 'selector' && tgt.selector) {
794
794
  return q(tgt.selector)
795
795
  }
@@ -276,6 +276,7 @@ export { CnSettingsFormWidget } from './CnSettingsFormWidget/index.js'
276
276
  export { CnSwitchRowsWidget } from './CnSwitchRowsWidget/index.js'
277
277
  export { CnRadioCardsWidget } from './CnRadioCardsWidget/index.js'
278
278
  export { CnChipsFieldWidget } from './CnChipsFieldWidget/index.js'
279
+ export { CnChipListManager } from './CnChipListManager/index.js'
279
280
  export { CnToggleTableWidget } from './CnToggleTableWidget/index.js'
280
281
  export { CnChoicePickerWidget } from './CnChoicePickerWidget/index.js'
281
282
  export { CnRecordListWidget } from './CnRecordListWidget/index.js'
@@ -114,7 +114,7 @@ export function flowTriggerCell(flow, catalog = []) {
114
114
  */
115
115
  function flowsSource() {
116
116
  const store = useFlowStore()
117
- const view = reactive({ state: 'all', runsRoute: '/flow-runs', flowsRoute: '/flows' })
117
+ const view = reactive({ state: 'all', owners: [], runsRoute: '/flow-runs', flowsRoute: '/flows' })
118
118
  const statuses = flowRunStatuses()
119
119
 
120
120
  /**
@@ -175,6 +175,7 @@ function flowsSource() {
175
175
  */
176
176
  load: async (config) => {
177
177
  view.state = filters[config?.state] ? config.state : 'all'
178
+ view.owners = [].concat(config?.owner ?? []).map(String).filter((owner) => owner !== '')
178
179
  view.runsRoute = config?.runsRoute || '/flow-runs'
179
180
  view.flowsRoute = config?.flowsRoute || '/flows'
180
181
  await store.load({ app: config?.app })
@@ -184,7 +185,34 @@ function flowsSource() {
184
185
  /**
185
186
  * @return {Array<object>} The rows of the active tab.
186
187
  */
187
- rows: () => allRows().filter(filters[view.state] || filters.all),
188
+ rows: () => allRows()
189
+ .filter(filters[view.state] || filters.all)
190
+ .filter((row) => view.owners.length === 0 || view.owners.includes(String(row.owner ?? ''))),
191
+
192
+ /**
193
+ * The owner filter (a page's `filterMenuFields` entry on `owner`)
194
+ * reaches `load` as `owner`.
195
+ */
196
+ searchFields: {
197
+ owner: { param: 'owner' },
198
+ },
199
+
200
+ /**
201
+ * The owners of the loaded flows with how many each owns, for the
202
+ * owner filter's values.
203
+ *
204
+ * @return {{owner: Array<{value: string, count: number}>}} The buckets.
205
+ */
206
+ facets: () => {
207
+ const counts = new Map()
208
+ for (const flow of (store.flows || [])) {
209
+ const owner = String(flow?.owner ?? '')
210
+ if (owner !== '') {
211
+ counts.set(owner, (counts.get(owner) || 0) + 1)
212
+ }
213
+ }
214
+ return { owner: [...counts].map(([value, count]) => ({ value, count })) }
215
+ },
188
216
 
189
217
  /**
190
218
  * @return {boolean} Whether a load is in flight.
@@ -686,8 +686,9 @@
686
686
  }
687
687
 
688
688
  /* The reply box under a conversation (DqZaakContact): a hairline and 16px
689
- above it, 10px between its parts, the field 10px 12px at 15px/1.5 with
690
- room for two lines (67px), the option at 14px.
689
+ above it, 10px between its parts, the field 10px 12px at 15px on the
690
+ normal line, two lines high (58px) and growing with its text, the option
691
+ at 14px.
691
692
  @spec openspec/changes/board-conversation-reply-box/specs/board-conversation-reply-box/spec.md#requirement-the-board-reply-box */
692
693
  .cn-look-board .cn-conversation-thread__reply:not(.cn-look-nextcloud *) {
693
694
  gap: 10px;
@@ -696,10 +697,11 @@
696
697
  }
697
698
 
698
699
  .cn-look-board .cn-conversation-thread__input:not(.cn-look-nextcloud *) {
699
- min-height: calc(3em + 22px);
700
+ field-sizing: content;
701
+ min-height: calc(2lh + 22px);
700
702
  padding: 10px 12px;
701
703
  font-size: 15px;
702
- line-height: 1.5;
704
+ line-height: normal;
703
705
  }
704
706
 
705
707
  .cn-look-board .cn-conversation-thread__reply-option:not(.cn-look-nextcloud *) {
@@ -482,6 +482,47 @@
482
482
  background-color: transparent !important;
483
483
  }
484
484
 
485
+ /* A checkbox in a board settings section is the boards' native box, as a
486
+ board dialog's is (dialog.css): an 18px square with a 2px corner and a grey
487
+ 1px edge while open, filled in the primary colour with a white tick once
488
+ checked, the glyph hidden, the label on the regular weight (PqBeheer
489
+ Verkoop, Kassa, Producten drew the 20px primary glyph and a 600 label).
490
+ @spec openspec/changes/board-settings-checkbox-native-box/specs/board-settings-checkbox-native-box/spec.md */
491
+ .cn-look-board .settings-section .checkbox-radio-switch-checkbox:not(.checkbox-radio-switch--button-variant):not(.cn-look-nextcloud *) .checkbox-content__icon,
492
+ .cn-look-board .cn-settings-section .checkbox-radio-switch-checkbox:not(.checkbox-radio-switch--button-variant):not(.cn-look-nextcloud *) .checkbox-content__icon {
493
+ position: relative;
494
+ flex: none;
495
+ width: 18px;
496
+ height: 18px;
497
+ }
498
+
499
+ .cn-look-board .settings-section .checkbox-radio-switch-checkbox:not(.checkbox-radio-switch--button-variant):not(.cn-look-nextcloud *) .checkbox-content__icon svg,
500
+ .cn-look-board .cn-settings-section .checkbox-radio-switch-checkbox:not(.checkbox-radio-switch--button-variant):not(.cn-look-nextcloud *) .checkbox-content__icon svg {
501
+ visibility: hidden;
502
+ }
503
+
504
+ .cn-look-board .settings-section .checkbox-radio-switch-checkbox:not(.checkbox-radio-switch--button-variant):not(.cn-look-nextcloud *) .checkbox-content__icon::before,
505
+ .cn-look-board .cn-settings-section .checkbox-radio-switch-checkbox:not(.checkbox-radio-switch--button-variant):not(.cn-look-nextcloud *) .checkbox-content__icon::before {
506
+ position: absolute;
507
+ inset: 0;
508
+ box-sizing: border-box;
509
+ border: 1px solid var(--color-border-maxcontrast);
510
+ border-radius: 2px;
511
+ background: var(--color-main-background);
512
+ content: '';
513
+ }
514
+
515
+ .cn-look-board .settings-section .checkbox-radio-switch-checkbox.checkbox-radio-switch--checked:not(.checkbox-radio-switch--button-variant):not(.cn-look-nextcloud *) .checkbox-content__icon::before,
516
+ .cn-look-board .cn-settings-section .checkbox-radio-switch-checkbox.checkbox-radio-switch--checked:not(.checkbox-radio-switch--button-variant):not(.cn-look-nextcloud *) .checkbox-content__icon::before {
517
+ border-color: var(--color-primary-element);
518
+ background: var(--color-primary-element) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z'/%3E%3C/svg%3E") center / 14px no-repeat;
519
+ }
520
+
521
+ .cn-look-board .settings-section .checkbox-radio-switch-checkbox:not(.checkbox-radio-switch--button-variant):not(.cn-look-nextcloud *) .checkbox-content__text,
522
+ .cn-look-board .cn-settings-section .checkbox-radio-switch-checkbox:not(.checkbox-radio-switch--button-variant):not(.cn-look-nextcloud *) .checkbox-content__text {
523
+ font-weight: 400;
524
+ }
525
+
485
526
  /* ---- A dashboard's page filters ---------------------------------------- */
486
527
  /* The boards draw a dashboard's page filters 36px tall (DqProcesanalyse,
487
528
  DqDoorlooptijd "Filteren op zaaktype", "Periode"); NcInputField, also
@@ -2134,8 +2175,12 @@ body:has(.cn-look-board):not(:has(.cn-look-nextcloud)) .vs__dropdown-menu:has(.c
2134
2175
  boards draw them (56 board textareas; NcTextArea took the browser's
2135
2176
  leading, ~1.13). The padding carries `!important` because a theme sets
2136
2177
  every textarea to 5px 12px with `!important` (r33: 124.5px, board 130.5).
2137
- @spec openspec/changes/board-settings-textarea-leading/specs/board-settings-textarea-leading/spec.md#requirement-a-board-settings-text-area-sets-its-lines-at-15 */
2178
+ It is a block: inline, it sat on a text line whose descender left 7px
2179
+ under it, so the hint stood that much lower than drawn.
2180
+ @spec openspec/changes/board-settings-textarea-leading/specs/board-settings-textarea-leading/spec.md#requirement-a-board-settings-text-area-sets-its-lines-at-15
2181
+ @spec openspec/changes/board-settings-textarea-leading/specs/board-settings-textarea-leading/spec.md#requirement-a-board-settings-text-area-leaves-no-line-gap-under-it */
2138
2182
  .cn-look-board .settings-section:not(.cn-look-nextcloud *) .textarea__input {
2183
+ display: block;
2139
2184
  box-sizing: border-box;
2140
2185
  padding: 8px 12px !important;
2141
2186
  font-size: 15px;
package/src/index.js CHANGED
@@ -71,6 +71,7 @@ export {
71
71
  CnChecklistRunWidget,
72
72
  CnChecklistWidget,
73
73
  CnChildRecordsField,
74
+ CnChipListManager,
74
75
  CnChipsFieldWidget,
75
76
  CnChoiceCards,
76
77
  CnChoicePickerWidget,
@@ -123,6 +123,7 @@ import TableIcon from 'vue-material-design-icons/Table.vue'
123
123
  import ViewDashboard from 'vue-material-design-icons/ViewDashboard.vue'
124
124
  import CnDetailCard from '../../../components/CnDetailCard/CnDetailCard.vue'
125
125
  import { buildHeaders, prefixUrl, safeHref } from '../../../utils/index.js'
126
+ import { stripMarker } from '../../utils/marker.js'
126
127
 
127
128
  const VALID_SURFACES = ['user-dashboard', 'app-dashboard', 'detail-page', 'single-entity']
128
129
  const COMPACT_LIMIT = 5
@@ -246,7 +247,7 @@ export default {
246
247
 
247
248
  reportTitle(report) {
248
249
  const raw = (report && (report.title || report.name || report.data?.name)) || ''
249
- return String(raw).replace(/\s*\[or:[^\]]+\]\s*/g, ' ').trim() || t('nextcloud-vue', 'Untitled report')
250
+ return stripMarker(raw) || t('nextcloud-vue', 'Untitled report')
250
251
  },
251
252
 
252
253
  reportType(report) {
@@ -178,6 +178,7 @@ import CnAnalyticsReportPicker from '../../../components/CnAnalyticsReportPicker
178
178
  import CnStatusBadge from '../../../components/CnStatusBadge/CnStatusBadge.vue'
179
179
  import { buildHeaders, prefixUrl, safeHref } from '../../../utils/index.js'
180
180
  import { userLocale } from '../../../utils/userLocale.js'
181
+ import { stripMarker } from '../../utils/marker.js'
181
182
 
182
183
  /**
183
184
  * CnAnalyticsTab — bespoke dataset list for the `analytics` integration.
@@ -292,7 +293,7 @@ export default {
292
293
  */
293
294
  reportTitle(report) {
294
295
  const raw = (report && (report.reportTitle || report.title || report.name || report.data?.name)) || ''
295
- return String(raw).replace(/\s*\[or:[^\]]+\]\s*/g, ' ').trim() || t('nextcloud-vue', 'Untitled report')
296
+ return stripMarker(raw) || t('nextcloud-vue', 'Untitled report')
296
297
  },
297
298
 
298
299
  /**
@@ -305,7 +306,7 @@ export default {
305
306
  */
306
307
  reportSubheader(report) {
307
308
  const raw = report?.subheader ?? report?.dataSource ?? report?.data?.subheader ?? ''
308
- return String(raw).replace(/\s*\[or:[^\]]+\]\s*/g, ' ').trim()
309
+ return stripMarker(raw)
309
310
  },
310
311
 
311
312
  reportType(report) {
@@ -129,6 +129,7 @@ import ImageIcon from 'vue-material-design-icons/Image.vue'
129
129
  import ImageMultiple from 'vue-material-design-icons/ImageMultiple.vue'
130
130
  import CnDetailCard from '../../../components/CnDetailCard/CnDetailCard.vue'
131
131
  import { buildHeaders, prefixUrl, safeHref } from '../../../utils/index.js'
132
+ import { stripMarker } from '../../utils/marker.js'
132
133
 
133
134
  const VALID_SURFACES = ['user-dashboard', 'app-dashboard', 'detail-page', 'single-entity']
134
135
  const COMPACT_LIMIT = 4
@@ -261,7 +262,7 @@ export default {
261
262
 
262
263
  albumName(album) {
263
264
  const raw = (album && (album.title || album.name || album.data?.name)) || ''
264
- return String(raw).replace(/\s*\[or:[^\]]+\]\s*/g, ' ').trim() || t('nextcloud-vue', 'Untitled album')
265
+ return stripMarker(raw) || t('nextcloud-vue', 'Untitled album')
265
266
  },
266
267
 
267
268
  albumUrl(album) {
@@ -155,6 +155,7 @@ import CnPhotoAlbumCreate from '../../../components/CnPhotoAlbumCreate/CnPhotoAl
155
155
  import CnPhotoAlbumPicker from '../../../components/CnPhotoAlbumPicker/CnPhotoAlbumPicker.vue'
156
156
  import { buildHeaders, prefixUrl, safeHref } from '../../../utils/index.js'
157
157
  import { userLocale } from '../../../utils/userLocale.js'
158
+ import { stripMarker } from '../../utils/marker.js'
158
159
 
159
160
  /**
160
161
  * CnPhotosTab — bespoke album grid for the `photos` integration.
@@ -258,7 +259,7 @@ export default {
258
259
  */
259
260
  albumName(album) {
260
261
  const raw = (album && (album.albumName || album.title || album.name || album.data?.name)) || ''
261
- return String(raw).replace(/\s*\[or:[^\]]+\]\s*/g, ' ').trim() || t('nextcloud-vue', 'Untitled album')
262
+ return stripMarker(raw) || t('nextcloud-vue', 'Untitled album')
262
263
  },
263
264
 
264
265
  albumUrl(album) {
@@ -138,6 +138,7 @@ import { translatePlural as n, translate as t } from '@nextcloud/l10n'
138
138
  import { NcLoadingIcon } from '@nextcloud/vue'
139
139
  import FileDocumentMultiple from 'vue-material-design-icons/FileDocumentMultiple.vue'
140
140
  import CnDetailCard from '../../../components/CnDetailCard/CnDetailCard.vue'
141
+ import { htmlToText } from '../../../utils/htmlToText.js'
141
142
  import { buildHeaders, prefixUrl, safeHref } from '../../../utils/index.js'
142
143
 
143
144
  const VALID_SURFACES = ['user-dashboard', 'app-dashboard', 'detail-page', 'single-entity']
@@ -357,12 +358,7 @@ export default {
357
358
  if (raw === '') {
358
359
  return ''
359
360
  }
360
- let text = raw
361
- .replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi, '')
362
- .replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi, '')
363
- .replace(/<[^>]+>/g, ' ')
364
- .replace(/\s+/g, ' ')
365
- .trim()
361
+ let text = htmlToText(raw)
366
362
  if (text.length > PREVIEW_MAX_CHARS) {
367
363
  text = text.slice(0, PREVIEW_MAX_CHARS).trimEnd() + '…'
368
364
  }
@@ -179,6 +179,7 @@ import OpenInNew from 'vue-material-design-icons/OpenInNew.vue'
179
179
  import Plus from 'vue-material-design-icons/Plus.vue'
180
180
  import CnXwikiPageCreate from '../../../components/CnXwikiPageCreate/CnXwikiPageCreate.vue'
181
181
  import CnXwikiPagePicker from '../../../components/CnXwikiPagePicker/CnXwikiPagePicker.vue'
182
+ import { htmlToText } from '../../../utils/htmlToText.js'
182
183
  import { buildHeaders, prefixUrl, safeHref } from '../../../utils/index.js'
183
184
 
184
185
  const EXCERPT_MAX_CHARS = 140
@@ -428,12 +429,7 @@ export default {
428
429
  if (str === '') {
429
430
  return ''
430
431
  }
431
- let text = str
432
- .replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi, '')
433
- .replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi, '')
434
- .replace(/<[^>]+>/g, ' ')
435
- .replace(/\s+/g, ' ')
436
- .trim()
432
+ let text = htmlToText(str)
437
433
  if (text.length > EXCERPT_MAX_CHARS) {
438
434
  text = text.slice(0, EXCERPT_MAX_CHARS).trimEnd() + '…'
439
435
  }