@conduction/nextcloud-vue 2.64.0 → 2.65.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 (51) hide show
  1. package/dist/esm/components/CnAppNav/CnAppNav.vue2.js +99 -3
  2. package/dist/esm/components/CnAppNav/CnAppNav.vue2.js.map +1 -1
  3. package/dist/esm/components/CnAppNav/CnAppNav.vue3.js +23 -7
  4. package/dist/esm/components/CnAppNav/CnAppNav.vue3.js.map +1 -1
  5. package/dist/esm/components/CnBreadcrumbs/CnBreadcrumbs.vue2.js +13 -0
  6. package/dist/esm/components/CnBreadcrumbs/CnBreadcrumbs.vue2.js.map +1 -1
  7. package/dist/esm/components/CnBreadcrumbs/CnBreadcrumbs.vue3.js +2 -1
  8. package/dist/esm/components/CnBreadcrumbs/CnBreadcrumbs.vue3.js.map +1 -1
  9. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +26 -2
  10. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  11. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +6 -3
  12. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  13. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +64 -5
  14. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  15. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +66 -28
  16. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  17. package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue2.js +22 -5
  18. package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue2.js.map +1 -1
  19. package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue3.js +1 -1
  20. package/dist/esm/components/CnHeaderWidget/CnHeaderWidget.vue3.js.map +1 -1
  21. package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue2.js.map +1 -1
  22. package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue3.js.map +1 -1
  23. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +22 -3
  24. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
  25. package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js +10 -3
  26. package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
  27. package/dist/esm/nextcloud-vue.css +164 -0
  28. package/dist/esm/store/useObjectStore.js +118 -33
  29. package/dist/esm/store/useObjectStore.js.map +1 -1
  30. package/dist/esm/utils/actionsDispatcher.js +14 -0
  31. package/dist/esm/utils/actionsDispatcher.js.map +1 -1
  32. package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
  33. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  34. package/dist/nextcloud-vue.cjs.js +488 -96
  35. package/dist/nextcloud-vue.cjs.js.map +2 -2
  36. package/dist/nextcloud-vue.css +164 -0
  37. package/package.json +1 -1
  38. package/src/components/CnAppNav/CnAppNav.vue +148 -7
  39. package/src/components/CnBreadcrumbs/CnBreadcrumbs.vue +14 -0
  40. package/src/components/CnDashboardPage/CnDashboardPage.vue +29 -2
  41. package/src/components/CnDetailPage/CnDetailPage.md +5 -1
  42. package/src/components/CnDetailPage/CnDetailPage.vue +114 -6
  43. package/src/components/CnHeaderWidget/CnHeaderWidget.vue +34 -6
  44. package/src/components/CnStagesWidget/CnStagesWidget.vue +9 -0
  45. package/src/components/CnStatWidget/CnStatWidget.vue +33 -5
  46. package/src/css/detail-page.css +22 -0
  47. package/src/css/kpi-card.css +47 -0
  48. package/src/schemas/app-manifest-v2.schema.json +23 -2
  49. package/src/store/useObjectStore.js +118 -33
  50. package/src/utils/actionsDispatcher.js +14 -0
  51. package/src/utils/validateManifestV2.compiled.js +2 -2
@@ -1112,11 +1112,14 @@ var script = {
1112
1112
  * A breadcrumb line above the header (manifest `config.breadcrumb`):
1113
1113
  * `{ label, route?, params?, href? }` names the list the record
1114
1114
  * belongs to; the record's display name follows as the current
1115
- * crumb. `label` goes through the host translate function. Null (the
1116
- * default) draws no trail.
1115
+ * crumb. `label` goes through the host translate function and shows
1116
+ * as text; `icon` (an MDI name, e.g. `Home`) draws that icon instead,
1117
+ * with the label as its accessible name. Null (the default) draws no
1118
+ * trail.
1117
1119
  *
1118
1120
  * @spec openspec/changes/zuiddrecht-pixel-gaps/specs/zuiddrecht-pixel-gaps/spec.md#requirement-a-detail-page-drops-its-eyebrow-and-shows-a-breadcrumb
1119
- * @type {{label: string, route?: string, params?: object, href?: string}|null}
1121
+ * @spec openspec/changes/zuiddrecht-pixel-gaps-2/specs/zuiddrecht-pixel-gaps-2/spec.md#requirement-a-declared-breadcrumb-label-shows-as-text
1122
+ * @type {{label: string, route?: string, params?: object, href?: string, icon?: string}|null}
1120
1123
  */
1121
1124
  breadcrumb: {
1122
1125
  type: Object,
@@ -1138,6 +1141,33 @@ var script = {
1138
1141
  default: () => [],
1139
1142
  },
1140
1143
 
1144
+ /**
1145
+ * Draw the header as a card (manifest `config.headerCard: true`): the
1146
+ * pills, the title and the actions on the page's surface colour inside
1147
+ * a bordered, rounded box, as the board's case header. Off by default,
1148
+ * which keeps the header on the page ground.
1149
+ *
1150
+ * @spec openspec/changes/zuiddrecht-pixel-gaps-2/specs/zuiddrecht-pixel-gaps-2/spec.md#requirement-a-detail-header-can-be-a-card-that-holds-a-widget
1151
+ */
1152
+ headerCard: {
1153
+ type: Boolean,
1154
+ default: false,
1155
+ },
1156
+
1157
+ /**
1158
+ * The id of a widget declared in `widgets` to render inside the header,
1159
+ * on its own row under the title and the actions (manifest
1160
+ * `config.headerWidget`), e.g. the stages bars. It renders without a
1161
+ * card of its own and leaves the body grid. Empty (the default), or an
1162
+ * id that names no widget, renders nothing extra.
1163
+ *
1164
+ * @spec openspec/changes/zuiddrecht-pixel-gaps-2/specs/zuiddrecht-pixel-gaps-2/spec.md#requirement-a-detail-header-can-be-a-card-that-holds-a-widget
1165
+ */
1166
+ headerWidget: {
1167
+ type: String,
1168
+ default: '',
1169
+ },
1170
+
1141
1171
  /**
1142
1172
  * Whether the current user administers this instance. Shows the
1143
1173
  * `adminOnly` header actions. `null` (the default) reads it from
@@ -1677,6 +1707,21 @@ var script = {
1677
1707
  .filter(Boolean)
1678
1708
  },
1679
1709
 
1710
+ /**
1711
+ * The widget the header holds (`headerWidget`): the definition in
1712
+ * `widgets` with that id, or null without the key or a match.
1713
+ *
1714
+ * @spec openspec/changes/zuiddrecht-pixel-gaps-2/specs/zuiddrecht-pixel-gaps-2/spec.md#requirement-a-detail-header-can-be-a-card-that-holds-a-widget
1715
+ * @return {object|null} The widget definition, or null.
1716
+ */
1717
+ headerWidgetDef() {
1718
+ if (!this.headerWidget) {
1719
+ return null
1720
+ }
1721
+ const declared = Array.isArray(this.widgets) ? this.widgets : [];
1722
+ return declared.find((widget) => widget && widget.id === this.headerWidget) || null
1723
+ },
1724
+
1680
1725
  /**
1681
1726
  * The side column's widget definitions. A string names a widget
1682
1727
  * declared in `widgets`; an object is a definition of its own.
@@ -2249,10 +2294,12 @@ var script = {
2249
2294
  /**
2250
2295
  * The breadcrumb trail: the declared crumb (a router target from
2251
2296
  * `route` + `params`, or an `href`), then the record's display name
2252
- * as the current crumb. Empty without a `breadcrumb` label.
2297
+ * as the current crumb. Empty without a `breadcrumb` label. The first
2298
+ * crumb carries `icon` only when the manifest declares one.
2253
2299
  *
2254
2300
  * @spec openspec/changes/zuiddrecht-pixel-gaps/specs/zuiddrecht-pixel-gaps/spec.md#requirement-a-detail-page-drops-its-eyebrow-and-shows-a-breadcrumb
2255
- * @return {Array<{label: string, to?: object, href?: string}>}
2301
+ * @spec openspec/changes/zuiddrecht-pixel-gaps-2/specs/zuiddrecht-pixel-gaps-2/spec.md#requirement-a-declared-breadcrumb-label-shows-as-text
2302
+ * @return {Array<{label: string, to?: object, href?: string, icon?: string}>}
2256
2303
  */
2257
2304
  breadcrumbCrumbs() {
2258
2305
  const crumb = this.breadcrumb;
@@ -2260,6 +2307,9 @@ var script = {
2260
2307
  return []
2261
2308
  }
2262
2309
  const first = { label: this.effectiveTranslate(crumb.label) };
2310
+ if (typeof crumb.icon === 'string' && crumb.icon !== '') {
2311
+ first.icon = crumb.icon;
2312
+ }
2263
2313
  if (crumb.route) {
2264
2314
  first.to = { name: crumb.route, ...(crumb.params ? { params: crumb.params } : {}) };
2265
2315
  } else if (crumb.href) {
@@ -3719,6 +3769,10 @@ var script = {
3719
3769
  * it — CnPageRenderer's split pane forwards no slots, which is exactly
3720
3770
  * that fault and wants fixing, not concealing.
3721
3771
  *
3772
+ * The widget the header holds (`headerWidget`) draws nothing here
3773
+ * either: it is already drawn in the header.
3774
+ *
3775
+ * @spec openspec/changes/zuiddrecht-pixel-gaps-2/specs/zuiddrecht-pixel-gaps-2/spec.md#requirement-a-detail-header-can-be-a-card-that-holds-a-widget
3722
3776
  * @param {object} item A layout item.
3723
3777
  * @return {boolean} False only when the item provably draws nothing.
3724
3778
  */
@@ -3729,6 +3783,11 @@ var script = {
3729
3783
  if (this.editingBody) {
3730
3784
  return true
3731
3785
  }
3786
+ // The widget the header holds (`headerWidget`) is drawn there, so
3787
+ // its grid cell would be the same widget twice.
3788
+ if (this.headerWidgetDef !== null && item.widgetId === this.headerWidgetDef.id) {
3789
+ return false
3790
+ }
3732
3791
  const widget = this.findWidget(item);
3733
3792
  if (!widget) {
3734
3793
  return true