@conduction/nextcloud-vue 2.111.0 → 2.113.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 (153) hide show
  1. package/dist/esm/components/CnActionButtons/CnActionButtons.vue.js +1 -1
  2. package/dist/esm/components/CnActionButtons/CnActionButtons.vue2.js +4 -6
  3. package/dist/esm/components/CnActionButtons/CnActionButtons.vue2.js.map +1 -1
  4. package/dist/esm/components/CnActionButtons/CnActionButtons.vue3.js.map +1 -1
  5. package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +1 -1
  6. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +3 -2
  7. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
  8. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +4 -2
  9. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
  10. package/dist/esm/components/CnAssignDialog/CnAssignDialog.vue.js +1 -1
  11. package/dist/esm/components/CnAssignDialog/CnAssignDialog.vue2.js +3 -2
  12. package/dist/esm/components/CnAssignDialog/CnAssignDialog.vue2.js.map +1 -1
  13. package/dist/esm/components/CnAssignDialog/CnAssignDialog.vue3.js +2 -1
  14. package/dist/esm/components/CnAssignDialog/CnAssignDialog.vue3.js.map +1 -1
  15. package/dist/esm/components/CnBoardView/CnBoardView.vue.js +1 -1
  16. package/dist/esm/components/CnBoardView/CnBoardView.vue2.js +54 -5
  17. package/dist/esm/components/CnBoardView/CnBoardView.vue2.js.map +1 -1
  18. package/dist/esm/components/CnBoardView/CnBoardView.vue3.js +16 -2
  19. package/dist/esm/components/CnBoardView/CnBoardView.vue3.js.map +1 -1
  20. package/dist/esm/components/CnCardGrid/CnCardGrid.vue.js +1 -1
  21. package/dist/esm/components/CnCardGrid/CnCardGrid.vue2.js +10 -0
  22. package/dist/esm/components/CnCardGrid/CnCardGrid.vue2.js.map +1 -1
  23. package/dist/esm/components/CnCardGrid/CnCardGrid.vue3.js +2 -1
  24. package/dist/esm/components/CnCardGrid/CnCardGrid.vue3.js.map +1 -1
  25. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue.js +1 -1
  26. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +22 -2
  27. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
  28. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js +17 -3
  29. package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
  30. package/dist/esm/components/CnChartWidget/CnChartWidget.vue.js +1 -1
  31. package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js.map +1 -1
  32. package/dist/esm/components/CnChartWidget/CnChartWidget.vue3.js.map +1 -1
  33. package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue.js +1 -1
  34. package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue2.js.map +1 -1
  35. package/dist/esm/components/CnChoiceCards/CnChoiceCards.vue3.js.map +1 -1
  36. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
  37. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +18 -3
  38. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  39. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +2 -2
  40. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  41. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +52 -13
  42. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  43. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +31 -3
  44. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  45. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
  46. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js +48 -11
  47. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
  48. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js +160 -97
  49. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
  50. package/dist/esm/components/CnFormDialog/CnFormDialog.vue.js +1 -1
  51. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
  52. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js +2 -2
  53. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
  54. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +222 -15
  55. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  56. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +24 -7
  57. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  58. package/dist/esm/components/CnNcDashboardList/CnNcDashboardList.vue.js +1 -1
  59. package/dist/esm/components/CnNcDashboardList/CnNcDashboardList.vue2.js +21 -1
  60. package/dist/esm/components/CnNcDashboardList/CnNcDashboardList.vue2.js.map +1 -1
  61. package/dist/esm/components/CnNcDashboardList/CnNcDashboardList.vue3.js.map +1 -1
  62. package/dist/esm/components/CnObjectCard/CnObjectCard.vue.js +1 -1
  63. package/dist/esm/components/CnObjectCard/CnObjectCard.vue2.js +36 -2
  64. package/dist/esm/components/CnObjectCard/CnObjectCard.vue2.js.map +1 -1
  65. package/dist/esm/components/CnObjectCard/CnObjectCard.vue3.js +44 -5
  66. package/dist/esm/components/CnObjectCard/CnObjectCard.vue3.js.map +1 -1
  67. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue.js +1 -0
  68. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue.js.map +1 -1
  69. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue2.js +22 -2
  70. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue2.js.map +1 -1
  71. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue3.js +36 -16
  72. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue3.js.map +1 -1
  73. package/dist/esm/components/CnReportsPage/CnReportsPage.vue.js +1 -1
  74. package/dist/esm/components/CnReportsPage/CnReportsPage.vue2.js +29 -12
  75. package/dist/esm/components/CnReportsPage/CnReportsPage.vue2.js.map +1 -1
  76. package/dist/esm/components/CnReportsPage/CnReportsPage.vue3.js +3 -1
  77. package/dist/esm/components/CnReportsPage/CnReportsPage.vue3.js.map +1 -1
  78. package/dist/esm/components/CnSearchSelect/CnSearchSelect.vue.js +1 -1
  79. package/dist/esm/components/CnSearchSelect/CnSearchSelect.vue2.js.map +1 -1
  80. package/dist/esm/components/CnSearchSelect/CnSearchSelect.vue3.js.map +1 -1
  81. package/dist/esm/composables/useRefLabels.js +26 -6
  82. package/dist/esm/composables/useRefLabels.js.map +1 -1
  83. package/dist/esm/integrations/registry.js +4 -0
  84. package/dist/esm/integrations/registry.js.map +1 -1
  85. package/dist/esm/l10n/en.json.js +3 -1
  86. package/dist/esm/l10n/en.json.js.map +1 -1
  87. package/dist/esm/l10n/nl.json.js +3 -1
  88. package/dist/esm/l10n/nl.json.js.map +1 -1
  89. package/dist/esm/library-style.js +1 -1
  90. package/dist/esm/nextcloud-vue.css +680 -449
  91. package/dist/esm/store/plugins/liveUpdates.js +3 -1
  92. package/dist/esm/store/plugins/liveUpdates.js.map +1 -1
  93. package/dist/esm/store/plugins/logs.js +2 -1
  94. package/dist/esm/store/plugins/logs.js.map +1 -1
  95. package/dist/esm/utils/actionLink.js +104 -1
  96. package/dist/esm/utils/actionLink.js.map +1 -1
  97. package/dist/esm/utils/detailActionModel.js +28 -1
  98. package/dist/esm/utils/detailActionModel.js.map +1 -1
  99. package/dist/esm/utils/fillTemplate.js +13 -5
  100. package/dist/esm/utils/fillTemplate.js.map +1 -1
  101. package/dist/esm/utils/headerFieldChips.js +21 -2
  102. package/dist/esm/utils/headerFieldChips.js.map +1 -1
  103. package/dist/esm/utils/mapList.js +26 -11
  104. package/dist/esm/utils/mapList.js.map +1 -1
  105. package/dist/esm/utils/savedViewMenu.js +12 -5
  106. package/dist/esm/utils/savedViewMenu.js.map +1 -1
  107. package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
  108. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  109. package/dist/nextcloud-vue.cjs.js +2800 -1933
  110. package/dist/nextcloud-vue.cjs.js.map +2 -2
  111. package/dist/nextcloud-vue.css +680 -449
  112. package/l10n/en.json +3 -1
  113. package/l10n/nl.json +3 -1
  114. package/package.json +1 -1
  115. package/src/components/CnActionButtons/CnActionButtons.vue +4 -6
  116. package/src/components/CnActionDialog/CnActionDialog.vue +32 -9
  117. package/src/components/CnAssignDialog/CnAssignDialog.vue +4 -2
  118. package/src/components/CnBoardView/CnBoardView.vue +58 -5
  119. package/src/components/CnCardGrid/CnCardGrid.md +1 -0
  120. package/src/components/CnCardGrid/CnCardGrid.vue +11 -0
  121. package/src/components/CnCellRenderer/CnCellRenderer.vue +27 -3
  122. package/src/components/CnChartWidget/CnChartWidget.vue +6 -0
  123. package/src/components/CnChoiceCards/CnChoiceCards.vue +0 -3
  124. package/src/components/CnDashboardPage/CnDashboardPage.vue +20 -5
  125. package/src/components/CnDetailPage/CnDetailPage.vue +62 -14
  126. package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +100 -5
  127. package/src/components/CnFormDialog/CnFormDialog.vue +1 -1
  128. package/src/components/CnIndexPage/CnIndexPage.vue +233 -18
  129. package/src/components/CnNcDashboardList/CnNcDashboardList.vue +21 -1
  130. package/src/components/CnObjectCard/CnObjectCard.md +1 -0
  131. package/src/components/CnObjectCard/CnObjectCard.vue +51 -5
  132. package/src/components/CnPartyPicker/CnPartyPicker.vue +62 -16
  133. package/src/components/CnReportsPage/CnReportsPage.vue +31 -12
  134. package/src/components/CnSearchSelect/CnSearchSelect.vue +8 -0
  135. package/src/composables/useRefLabels.js +25 -5
  136. package/src/css/badge.css +15 -13
  137. package/src/css/board.css +0 -1
  138. package/src/css/dialog.css +53 -3
  139. package/src/css/index-page.css +26 -1
  140. package/src/css/look-board-detail.css +36 -15
  141. package/src/css/look-board-index.css +67 -15
  142. package/src/css/look-board.css +32 -18
  143. package/src/integrations/registry.js +4 -0
  144. package/src/schemas/app-manifest-v2.schema.json +61 -13
  145. package/src/store/plugins/liveUpdates.js +3 -1
  146. package/src/store/plugins/logs.js +2 -1
  147. package/src/utils/actionLink.js +103 -0
  148. package/src/utils/detailActionModel.js +27 -0
  149. package/src/utils/fillTemplate.js +13 -5
  150. package/src/utils/headerFieldChips.js +21 -2
  151. package/src/utils/mapList.js +26 -11
  152. package/src/utils/savedViewMenu.js +12 -5
  153. package/src/utils/validateManifestV2.compiled.js +3 -3
@@ -44,10 +44,11 @@ import { useObjectSubscription } from '../../composables/useObjectSubscription.j
44
44
  import { createRefLabelResolver } from '../../composables/useRefLabels.js';
45
45
  import { gridLayout } from '../../mixins/gridLayout.js';
46
46
  import { pageViews } from '../../mixins/pageViews.js';
47
+ import { headerActionAsLink } from '../../utils/actionLink.js';
47
48
  import { isAppInstalled } from '../../utils/appInstalled.js';
48
49
  import { compactLayoutRows } from '../../utils/dashboardPlacement.js';
49
50
  import { defaultDetailGrid } from '../../utils/defaultDetailGrid.js';
50
- import { stageOf, normalisePinnedAction, stageEntry, MAX_QUICK_ACTIONS, groupMenuEntries, resolveNextStep, pillCountSource, resolveCountPill, resolvePill } from '../../utils/detailActionModel.js';
51
+ import { stageOf, normalisePinnedAction, stageEntry, MAX_QUICK_ACTIONS, groupMenuEntries, resolveNextStep, pillCountSource, resolveCountPill, resolvePill, pillLook } from '../../utils/detailActionModel.js';
51
52
  import { visibilityContextRefs, widgetConditionData, fetchVisibilityRows, detailWidgetVisible } from '../../utils/detailWidgetVisibility.js';
52
53
  import { reportBindingProblems } from '../../utils/diagnostics.js';
53
54
  import { fetchListTotal } from '../../utils/fetchFilterCounts.js';
@@ -986,6 +987,11 @@ var script = {
986
987
  * `@objectId` / `@object.<field>` token + local-predicate resolution.
987
988
  * Empty (the default) renders nothing.
988
989
  *
990
+ * An entry with `href` is a link, never dispatched: an absolute
991
+ * `http(s)`, `mailto:`, `tel:` or `//host/...` URL as written, or an instance path
992
+ * (leading `/`) through `generateUrl()`, opening in place unless
993
+ * `target` is `'_blank'`.
994
+ *
989
995
  * The menu, not a row of buttons: that is what the manifest schema has
990
996
  * always said this key is, and what CnIndexPage already does with it.
991
997
  * The two surfaces had drifted, and on a dossiq case — twelve actions —
@@ -1273,9 +1279,12 @@ var script = {
1273
1279
  * `field`: `text`, a constant ("Inwoner"), or `countFrom`
1274
1280
  * (`{ register, schema, filter? }`) with `countLabel` (`{ one, other }`
1275
1281
  * with `{count}`), a count of a related list ("1 lopende zaak") that
1276
- * shows nothing at 0.
1282
+ * shows nothing at 0. With `resolve: { register, schema, labelField?,
1283
+ * colorField?, iconField? }` the pill shows the referenced record's
1284
+ * label, takes its tone from that record's colour (an NL Design System
1285
+ * hue such as `red`, or a badge role) and shows its icon.
1277
1286
  *
1278
- * @type {{field?: string, text?: string, countFrom?: object, countLabel?: object, colorMap?: object, labels?: object, variant?: string}|null}
1287
+ * @type {{field?: string, text?: string, countFrom?: object, countLabel?: object, colorMap?: object, labels?: object, variant?: string, resolve?: object}|null}
1279
1288
  */
1280
1289
  typePill: {
1281
1290
  type: Object,
@@ -1716,6 +1725,8 @@ var script = {
1716
1725
  pillCountSeq: 0,
1717
1726
  /** The labels of the records pills with `resolve` point at, by pill key. */
1718
1727
  pillRefLabels: {},
1728
+ /** The colour and icon names read off the records pills with `resolve` point at, by pill key. */
1729
+ pillRefLooks: {},
1719
1730
  /** Sequence of the last pill label lookup, so a late answer for another record is dropped. */
1720
1731
  pillRefSeq: 0,
1721
1732
  /** `register/schema/id` the read-state call was last made for, so it is sent once per load. */
@@ -2264,10 +2275,11 @@ var script = {
2264
2275
  // `resolve`: the referenced record's label replaces the id, and
2265
2276
  // keys the colour too ("Woo-verzoek", not a uuid).
2266
2277
  const resolved = this.pillRefLabels[key];
2278
+ const look = pillLook(this.pillRefLooks[key]);
2267
2279
  if (typeof resolved === 'string' && resolved !== '') {
2268
- return { ...pill, key, label: this.effectiveTranslate(resolved), colorKey: resolved }
2280
+ return { ...pill, ...look, key, label: this.effectiveTranslate(resolved), colorKey: resolved }
2269
2281
  }
2270
- return { ...pill, key, label: this.effectiveTranslate(pill.label) }
2282
+ return { ...pill, ...look, key, label: this.effectiveTranslate(pill.label) }
2271
2283
  })
2272
2284
  .filter(Boolean)
2273
2285
  },
@@ -2302,7 +2314,8 @@ var script = {
2302
2314
  .filter(([, config]) => config && config.resolve && config.resolve.register && config.resolve.schema && typeof config.field === 'string')
2303
2315
  .map(([key, config]) => {
2304
2316
  const pill = resolvePill({ field: config.field }, this.resolvedObject);
2305
- return pill ? [key, config.resolve.register, config.resolve.schema, config.resolve.labelField || '', pill.colorKey] : null
2317
+ const { register, schema, labelField, colorField, iconField } = config.resolve;
2318
+ return pill ? [key, register, schema, labelField || '', pill.colorKey, colorField || '', iconField || ''] : null
2306
2319
  })
2307
2320
  .filter(Boolean)
2308
2321
  },
@@ -2701,6 +2714,7 @@ var script = {
2701
2714
  * in. Edit goes LAST so it reads after the app's own actions in the
2702
2715
  * Actions menu — the page's affordance yields to the app's.
2703
2716
  *
2717
+ * @spec openspec/changes/header-action-href/specs/header-action-href/spec.md#requirement-a-header-action-with-href-is-a-link-that-runs-and-emits-nothing
2704
2718
  * @return {Array<object>} The action descriptors.
2705
2719
  */
2706
2720
  effectiveHeaderActions() {
@@ -2709,12 +2723,16 @@ var script = {
2709
2723
  // written out in place) join the list CnActionButtons dispatches,
2710
2724
  // so they get the same dialogs, toasts and `visibleWhen` gating as
2711
2725
  // any header action. An id that is already declared is not added
2712
- // twice. With nothing pinned inline this is `headerActions` itself.
2726
+ // twice. With nothing pinned inline and no `href` entry this is
2727
+ // `headerActions` itself.
2713
2728
  const known = new Set(authored.map((action) => action && action.id));
2714
2729
  const inline = [this.stagePrimary, ...this.pinnedQuickActions]
2715
2730
  .filter((pinned) => pinned && pinned.inline && !known.has(pinned.id))
2716
2731
  .map((pinned) => pinned.inline);
2717
- const declared = inline.length > 0 ? [...authored, ...inline] : authored;
2732
+ const combined = inline.length > 0 ? [...authored, ...inline] : authored;
2733
+ // An entry (or child) with `href` becomes a link CnActionButtons renders as an anchor.
2734
+ const linked = combined.map(headerActionAsLink);
2735
+ const declared = linked.some((action, index) => action !== combined[index]) ? linked : combined;
2718
2736
  if (!(this.foldsEditIntoActions && this.canEditRecord)) {
2719
2737
  return declared
2720
2738
  }
@@ -3958,12 +3976,13 @@ var script = {
3958
3976
  *
3959
3977
  * A stage's action is dispatched the way a header action is, through
3960
3978
  * the `run()` CnActionButtons bound for it, and announced to the host
3961
- * with its declaration. A link action is left to the browser. Without
3962
- * a stage action this is the page's `primaryAction`, announced as
3963
- * before.
3979
+ * with its declaration. A link action is left to the browser and
3980
+ * announces nothing. Without a stage action this is the page's
3981
+ * `primaryAction`, announced as before.
3964
3982
  *
3965
3983
  * @return {void}
3966
3984
  * @spec openspec/changes/detail-action-model-and-case-surfaces/specs/detail-action-model/spec.md#requirement-primary-action-follows-the-stage
3985
+ * @spec openspec/changes/header-action-href/specs/header-action-href/spec.md#requirement-a-header-action-with-href-is-a-link-that-runs-and-emits-nothing
3967
3986
  */
3968
3987
  onPrimaryActionClick() {
3969
3988
  const entry = this.stagePrimaryEntry;
@@ -3971,6 +3990,9 @@ var script = {
3971
3990
  this.$emit('primary-action', this.primaryAction);
3972
3991
  return
3973
3992
  }
3993
+ if (entry.href) {
3994
+ return
3995
+ }
3974
3996
  this.$emit('primary-action', this.headerActionsById[entry.id] || { id: entry.id, label: entry.label });
3975
3997
  this.onPinnedActionClick(entry);
3976
3998
  },
@@ -4116,6 +4138,7 @@ var script = {
4116
4138
  const seq = ++this.pillRefSeq;
4117
4139
  if (targets.length === 0) {
4118
4140
  this.pillRefLabels = {};
4141
+ this.pillRefLooks = {};
4119
4142
  return
4120
4143
  }
4121
4144
  if (!this._pillRefResolver) {
@@ -4128,14 +4151,30 @@ var script = {
4128
4151
  });
4129
4152
  }
4130
4153
  const labels = {};
4131
- await Promise.all(targets.map(async ([key, register, schema, labelField, id]) => {
4132
- const found = await this._pillRefResolver.resolve(register, schema, [id], labelField).catch(() => ({}));
4154
+ const looks = {};
4155
+ const field = async (register, schema, id, name) => {
4156
+ if (!name) {
4157
+ return null
4158
+ }
4159
+ const found = await this._pillRefResolver.resolve(register, schema, [id], name, { strict: true }).catch(() => ({}));
4160
+ return found && typeof found[id] === 'string' ? found[id] : null
4161
+ };
4162
+ await Promise.all(targets.map(async ([key, register, schema, labelField, id, colorField, iconField]) => {
4163
+ const [found, color, icon] = await Promise.all([
4164
+ this._pillRefResolver.resolve(register, schema, [id], labelField).catch(() => ({})),
4165
+ field(register, schema, id, colorField),
4166
+ field(register, schema, id, iconField),
4167
+ ]);
4133
4168
  if (found && typeof found[id] === 'string') {
4134
4169
  labels[key] = found[id];
4135
4170
  }
4171
+ if (color || icon) {
4172
+ looks[key] = { color, icon };
4173
+ }
4136
4174
  }));
4137
4175
  if (seq === this.pillRefSeq) {
4138
4176
  this.pillRefLabels = labels;
4177
+ this.pillRefLooks = looks;
4139
4178
  }
4140
4179
  },
4141
4180