@conduction/nextcloud-vue 2.165.0 → 2.166.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 (161) hide show
  1. package/dist/esm/components/CnActionButtons/CnActionButtons.vue.js +1 -1
  2. package/dist/esm/components/CnActionButtons/CnActionButtons.vue2.js +7 -0
  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/CnAuditTrailCard/CnAuditTrailCard.vue.js +1 -1
  6. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js +10 -0
  7. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js.map +1 -1
  8. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue3.js +1 -1
  9. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue3.js.map +1 -1
  10. package/dist/esm/components/CnChipListManager/CnChipListManager.vue.js +1 -1
  11. package/dist/esm/components/CnChipListManager/CnChipListManager.vue2.js.map +1 -1
  12. package/dist/esm/components/CnChipListManager/CnChipListManager.vue3.js.map +1 -1
  13. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue.js +1 -1
  14. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js +50 -7
  15. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js.map +1 -1
  16. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js.map +1 -1
  17. package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +13 -0
  18. package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
  19. package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +1 -0
  20. package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
  21. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +39 -4
  22. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  23. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +2 -1
  24. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  25. package/dist/esm/components/CnExpandableRow/CnExpandableRow.vue.js +1 -1
  26. package/dist/esm/components/CnExpandableRow/CnExpandableRow.vue2.js.map +1 -1
  27. package/dist/esm/components/CnExpandableRow/CnExpandableRow.vue3.js.map +1 -1
  28. package/dist/esm/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue.js +9 -0
  29. package/dist/esm/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue.js.map +1 -0
  30. package/dist/esm/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue2.js +232 -0
  31. package/dist/esm/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue2.js.map +1 -0
  32. package/dist/esm/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue3.js +61 -0
  33. package/dist/esm/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue3.js.map +1 -0
  34. package/dist/esm/components/CnFieldGroupsWidget/index.js +28 -0
  35. package/dist/esm/components/CnFieldGroupsWidget/index.js.map +1 -0
  36. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue.js +1 -1
  37. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js +80 -6
  38. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js.map +1 -1
  39. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js +361 -289
  40. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js.map +1 -1
  41. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue.js +1 -1
  42. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js +9 -0
  43. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue2.js.map +1 -1
  44. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js +2 -1
  45. package/dist/esm/components/CnFlowDetail/CnFlowDetail.vue3.js.map +1 -1
  46. package/dist/esm/components/CnFlowDetail/CnFlowRunSummary.vue.js +1 -1
  47. package/dist/esm/components/CnFlowDetail/CnFlowRunSummary.vue2.js +21 -0
  48. package/dist/esm/components/CnFlowDetail/CnFlowRunSummary.vue2.js.map +1 -1
  49. package/dist/esm/components/CnFlowDetail/CnFlowRunSummary.vue3.js +12 -2
  50. package/dist/esm/components/CnFlowDetail/CnFlowRunSummary.vue3.js.map +1 -1
  51. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue.js +1 -1
  52. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js +17 -0
  53. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue2.js.map +1 -1
  54. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js +6 -3
  55. package/dist/esm/components/CnFlowsPage/CnFlowBoard.vue3.js.map +1 -1
  56. package/dist/esm/components/CnGraphCanvas/CnGraphCanvas.vue2.js +33 -2
  57. package/dist/esm/components/CnGraphCanvas/CnGraphCanvas.vue2.js.map +1 -1
  58. package/dist/esm/components/CnGraphCanvas/CnGraphCanvas.vue3.js +2 -2
  59. package/dist/esm/components/CnGraphCanvas/CnGraphCanvas.vue3.js.map +1 -1
  60. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +83 -8
  61. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  62. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +2 -1
  63. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  64. package/dist/esm/components/CnObjectLinksWidget/CnObjectLinkDialog.vue.js +9 -0
  65. package/dist/esm/components/CnObjectLinksWidget/CnObjectLinkDialog.vue.js.map +1 -0
  66. package/dist/esm/components/CnObjectLinksWidget/CnObjectLinkDialog.vue2.js +187 -0
  67. package/dist/esm/components/CnObjectLinksWidget/CnObjectLinkDialog.vue2.js.map +1 -0
  68. package/dist/esm/components/CnObjectLinksWidget/CnObjectLinkDialog.vue3.js +106 -0
  69. package/dist/esm/components/CnObjectLinksWidget/CnObjectLinkDialog.vue3.js.map +1 -0
  70. package/dist/esm/components/CnObjectLinksWidget/CnObjectLinksWidget.vue.js +9 -0
  71. package/dist/esm/components/CnObjectLinksWidget/CnObjectLinksWidget.vue.js.map +1 -0
  72. package/dist/esm/components/CnObjectLinksWidget/CnObjectLinksWidget.vue2.js +421 -0
  73. package/dist/esm/components/CnObjectLinksWidget/CnObjectLinksWidget.vue2.js.map +1 -0
  74. package/dist/esm/components/CnObjectLinksWidget/CnObjectLinksWidget.vue3.js +131 -0
  75. package/dist/esm/components/CnObjectLinksWidget/CnObjectLinksWidget.vue3.js.map +1 -0
  76. package/dist/esm/components/CnObjectLinksWidget/index.js +29 -0
  77. package/dist/esm/components/CnObjectLinksWidget/index.js.map +1 -0
  78. package/dist/esm/components/CnObjectLinksWidget/objectLinks.js +22 -0
  79. package/dist/esm/components/CnObjectLinksWidget/objectLinks.js.map +1 -0
  80. package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue.js +1 -1
  81. package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue2.js +48 -13
  82. package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue2.js.map +1 -1
  83. package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue3.js +44 -20
  84. package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue3.js.map +1 -1
  85. package/dist/esm/components/CnPagination/CnPagination.vue2.js +26 -0
  86. package/dist/esm/components/CnPagination/CnPagination.vue2.js.map +1 -1
  87. package/dist/esm/components/CnPagination/CnPagination.vue3.js +40 -37
  88. package/dist/esm/components/CnPagination/CnPagination.vue3.js.map +1 -1
  89. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +2 -0
  90. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
  91. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue.js +1 -1
  92. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js +4 -0
  93. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js.map +1 -1
  94. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue3.js.map +1 -1
  95. package/dist/esm/index.js +2 -0
  96. package/dist/esm/index.js.map +1 -1
  97. package/dist/esm/l10n/en.json.js +18 -1
  98. package/dist/esm/l10n/en.json.js.map +1 -1
  99. package/dist/esm/l10n/nl.json.js +18 -1
  100. package/dist/esm/l10n/nl.json.js.map +1 -1
  101. package/dist/esm/library-style.js +1 -1
  102. package/dist/esm/nextcloud-vue.css +635 -329
  103. package/dist/esm/utils/actionsDispatcher.js +9 -5
  104. package/dist/esm/utils/actionsDispatcher.js.map +1 -1
  105. package/dist/esm/utils/libraryWidgetKeys.js +2 -0
  106. package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
  107. package/dist/esm/utils/objectParties.js +68 -1
  108. package/dist/esm/utils/objectParties.js.map +1 -1
  109. package/dist/esm/utils/overlayInset.js +60 -0
  110. package/dist/esm/utils/overlayInset.js.map +1 -0
  111. package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
  112. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  113. package/dist/esm/utils/widgetDispatch.js +4 -1
  114. package/dist/esm/utils/widgetDispatch.js.map +1 -1
  115. package/dist/nextcloud-vue.cjs.js +8444 -6584
  116. package/dist/nextcloud-vue.cjs.js.map +2 -2
  117. package/dist/nextcloud-vue.css +635 -329
  118. package/l10n/en.json +18 -1
  119. package/l10n/nl.json +18 -1
  120. package/package.json +1 -1
  121. package/src/components/CnActionButtons/CnActionButtons.vue +7 -0
  122. package/src/components/CnAuditTrailCard/CnAuditTrailCard.vue +11 -1
  123. package/src/components/CnChipListManager/CnChipListManager.vue +4 -1
  124. package/src/components/CnDashboardGrid/CnDashboardGrid.vue +50 -7
  125. package/src/components/CnDataTable/CnDataTable.md +1 -0
  126. package/src/components/CnDataTable/CnDataTable.vue +14 -0
  127. package/src/components/CnDetailPage/CnDetailPage.md +1 -0
  128. package/src/components/CnDetailPage/CnDetailPage.vue +40 -4
  129. package/src/components/CnExpandableRow/CnExpandableRow.vue +7 -4
  130. package/src/components/CnFieldGroupsWidget/CnFieldGroupsWidget.vue +287 -0
  131. package/src/components/CnFieldGroupsWidget/index.js +27 -0
  132. package/src/components/CnFieldListWidget/CnFieldListWidget.vue +162 -7
  133. package/src/components/CnFlowDetail/CnFlowDetail.vue +10 -0
  134. package/src/components/CnFlowDetail/CnFlowRunSummary.vue +26 -1
  135. package/src/components/CnFlowsPage/CnFlowBoard.vue +90 -4
  136. package/src/components/CnGraphCanvas/CnGraphCanvas.vue +35 -4
  137. package/src/components/CnIndexPage/CnIndexPage.md +1 -1
  138. package/src/components/CnIndexPage/CnIndexPage.vue +83 -7
  139. package/src/components/CnObjectLinksWidget/CnObjectLinkDialog.vue +267 -0
  140. package/src/components/CnObjectLinksWidget/CnObjectLinksWidget.vue +532 -0
  141. package/src/components/CnObjectLinksWidget/index.js +28 -0
  142. package/src/components/CnObjectLinksWidget/objectLinks.js +19 -0
  143. package/src/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue +65 -15
  144. package/src/components/CnPagination/CnPagination.md +1 -0
  145. package/src/components/CnPagination/CnPagination.vue +27 -1
  146. package/src/components/CnWidgetGrid/registerDashboardWidgets.js +2 -0
  147. package/src/components/CnWidgetObjectTable/CnWidgetObjectTable.vue +4 -0
  148. package/src/components/index.js +2 -0
  149. package/src/css/dialog.css +25 -3
  150. package/src/css/index-page.css +22 -8
  151. package/src/css/look-board-detail.css +41 -0
  152. package/src/css/look-board-index.css +52 -1
  153. package/src/css/look-board.css +17 -0
  154. package/src/index.js +2 -0
  155. package/src/schemas/app-manifest-v2.schema.json +3 -3
  156. package/src/utils/actionsDispatcher.js +9 -5
  157. package/src/utils/libraryWidgetKeys.js +2 -0
  158. package/src/utils/objectParties.js +67 -0
  159. package/src/utils/overlayInset.js +57 -0
  160. package/src/utils/validateManifestV2.compiled.js +2 -2
  161. package/src/utils/widgetDispatch.js +4 -1
@@ -0,0 +1,27 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: 2026 Conduction B.V.
3
+ * SPDX-License-Identifier: EUPL-1.2
4
+ *
5
+ * CnFieldGroupsWidget: self-registers the `field-groups` widget type
6
+ * (several list fields of the current object in one card, as label and value
7
+ * pairs, with one Add menu) into the shared dashboardWidgetRegistry at module
8
+ * load. Renderer only: declared in the manifest.
9
+ */
10
+
11
+ import CnFieldGroupsWidget from './CnFieldGroupsWidget.vue'
12
+ import { registerDashboardWidget } from '../CnWidgetGrid/dashboardWidgetRegistry.js'
13
+
14
+ registerDashboardWidget('field-groups', {
15
+ renderer: CnFieldGroupsWidget,
16
+ form: null,
17
+ defaultContent: {
18
+ groups: [],
19
+ readOnly: false,
20
+ },
21
+ displayName: 'Field groups',
22
+ icon: 'CardAccountPhoneOutline',
23
+ surfaces: ['detail-page'],
24
+ })
25
+
26
+ export { CnFieldGroupsWidget }
27
+ export default CnFieldGroupsWidget
@@ -73,7 +73,52 @@
73
73
  <p v-if="lead" class="cn-field-list-widget__lead" data-testid="cn-field-list-lead">
74
74
  {{ lead }}
75
75
  </p>
76
- <p v-if="rows.length === 0" class="cn-field-list-widget__empty" data-testid="cn-field-list-empty">
76
+ <!-- `variant: "pairs"`: a label and a value per entry, as a side card lists contact channels. -->
77
+ <dl v-if="isPairs" class="cn-field-list-widget__pairs" data-testid="cn-field-list-pairs">
78
+ <div
79
+ v-for="row in rows"
80
+ :key="row.key"
81
+ class="cn-field-list-widget__pair"
82
+ :data-testid="`cn-field-list-pair-${row.key}`">
83
+ <dt class="cn-field-list-widget__pair-label">
84
+ {{ row.label }}
85
+ </dt>
86
+ <dd class="cn-field-list-widget__pair-value">
87
+ <a
88
+ v-if="row.href"
89
+ class="cn-field-list-widget__pair-text"
90
+ :href="row.href"
91
+ v-bind="row.external ? { target: '_blank', rel: 'noopener noreferrer' } : {}">{{ row.pairText }}</a>
92
+ <span v-else class="cn-field-list-widget__pair-text">{{ row.pairText }}</span>
93
+ <NcActions
94
+ v-if="pairMenuItems(row).length > 0"
95
+ :forceMenu="true"
96
+ :disabled="busy !== ''"
97
+ :ariaLabel="`${tr('More actions')}: ${row.title}`"
98
+ :data-testid="`cn-field-list-menu-${row.key}`">
99
+ <NcActionButton
100
+ v-for="item in pairMenuItems(row)"
101
+ :key="item.id"
102
+ :data-testid="`cn-field-list-menu-${item.id}-${row.key}`"
103
+ @click="item.run">
104
+ {{ item.label }}
105
+ </NcActionButton>
106
+ </NcActions>
107
+ </dd>
108
+ </div>
109
+ <div
110
+ v-if="rows.length === 0 && pairsEmptyLabel"
111
+ class="cn-field-list-widget__pair"
112
+ data-testid="cn-field-list-pair-empty">
113
+ <dt class="cn-field-list-widget__pair-label">
114
+ {{ pairsEmptyLabel }}
115
+ </dt>
116
+ <dd class="cn-field-list-widget__pair-value cn-field-list-widget__pair-value--empty">
117
+ {{ emptyLabel }}
118
+ </dd>
119
+ </div>
120
+ </dl>
121
+ <p v-else-if="rows.length === 0" class="cn-field-list-widget__empty" data-testid="cn-field-list-empty">
77
122
  {{ emptyLabel }}
78
123
  </p>
79
124
  <div v-else-if="isTable" class="cn-field-list-widget__table-wrap">
@@ -430,6 +475,8 @@ export default {
430
475
  * - `add.fields[].type: 'checkbox'`; `add.exclusive` — flags only one entry holds; `add.requireOneOf` (+ `requireOneOfMessage`) — keys of which one must be filled.
431
476
  * - `row.href` may be `{ path, scheme: 'mailto'|'tel' }`.
432
477
  * - `afterSave` — `{ url, method?, body?, failureText? }`: called after every save that went through, with `@objectId` / `@object.<field>` tokens; when it fails the save stands and `failureText` shows.
478
+ * - `variant: 'pairs'`: each entry a label (`row.label`: a literal or a list of parts, a string part a literal and `{ path, map? }` a value, joined with ", ") beside its value (`row.title`, then the `row.meta` parts, joined with ", "; a link with `row.href`); edit and remove go in a "..." menu; an empty list shows `emptyLabel` beside the empty text, or nothing without one.
479
+ * - `mirror`: `{ field, path, prefer? }`: every save also writes `field` with the `path` of the entry flagged `prefer` (else the first entry, else ''), in the same PATCH.
433
480
  *
434
481
  * @type {object}
435
482
  */
@@ -514,10 +561,7 @@ export default {
514
561
  ? { ...item, ...(this.live[key] || {}) }
515
562
  : { value: item, ...(this.live[key] || {}) }
516
563
  const title = this.text(entry, spec.title) || this.text(entry, spec.titleFallback) || (typeof item === 'string' ? item : key)
517
- const meta = (Array.isArray(spec.meta) ? spec.meta : [])
518
- .map((part) => this.text(entry, part))
519
- .filter((part) => part !== '')
520
- .join(' · ')
564
+ const meta = this.metaParts(entry, spec.meta).join(' · ')
521
565
  const href = spec.href ? rowHref(entry, spec.href) : ''
522
566
  return {
523
567
  key,
@@ -525,6 +569,8 @@ export default {
525
569
  item,
526
570
  entry,
527
571
  title,
572
+ label: this.isPairs ? this.pairLabelOf(entry, spec.label) : '',
573
+ pairText: this.isPairs ? [title, ...this.metaParts(entry, spec.meta)].join(', ') : '',
528
574
  href,
529
575
  external: /^https?:\/\//i.test(href),
530
576
  initials: spec.avatar ? this.initials(title) : '',
@@ -540,6 +586,16 @@ export default {
540
586
  })
541
587
  },
542
588
 
589
+ /** Whether the rows are drawn as label and value pairs (`variant: 'pairs'`). */
590
+ isPairs() {
591
+ return this.content.variant === 'pairs'
592
+ },
593
+
594
+ /** The label an empty pairs list shows beside its empty text (`emptyLabel`), '' for none. */
595
+ pairsEmptyLabel() {
596
+ return this.tr(this.content.emptyLabel || '')
597
+ },
598
+
543
599
  /** Whether the rows are drawn as framed options (`variant: 'options'`): a grip, the name, a code chip. */
544
600
  isOptions() {
545
601
  return this.content.variant === 'options'
@@ -757,7 +813,7 @@ export default {
757
813
  * placed in the band, then remove.
758
814
  *
759
815
  * @param {object} row The row.
760
- * @return {Array<{id: string, label: string, run: Function}>}
816
+ * @return {Array<{id: string, label: string, run: () => void}>}
761
817
  */
762
818
  menuItems(row) {
763
819
  const items = row.actions
@@ -786,6 +842,69 @@ export default {
786
842
  * @param {number} index Its position.
787
843
  * @return {string}
788
844
  */
845
+ /**
846
+ * The filled meta parts of an entry, empty ones left out.
847
+ *
848
+ * @param {object} entry The entry.
849
+ * @param {Array|undefined} meta The `row.meta` config.
850
+ * @return {string[]}
851
+ */
852
+ metaParts(entry, meta) {
853
+ return (Array.isArray(meta) ? meta : [])
854
+ .map((part) => this.text(entry, part))
855
+ .filter((part) => part !== '')
856
+ },
857
+
858
+ /**
859
+ * The label of a pair: `row.label` as one literal or a list of parts, a
860
+ * string part a literal and an object part a value off the entry
861
+ * (`{ path, map? }`), the filled parts joined with ", " ("E-mail, privé").
862
+ *
863
+ * @spec openspec/changes/contact-side-cards-generic/specs/contact-side-cards-generic/spec.md#requirement-a-field-list-draws-its-entries-as-label-and-value-pairs
864
+ * @param {object} entry The entry.
865
+ * @param {string|Array|undefined} label The `row.label` config.
866
+ * @return {string}
867
+ */
868
+ pairLabelOf(entry, label) {
869
+ const parts = Array.isArray(label) ? label : [label]
870
+ return parts
871
+ .map((part) => (typeof part === 'string' ? this.tr(part) : this.text(entry, part)))
872
+ .filter((part) => typeof part === 'string' && part !== '')
873
+ .join(', ')
874
+ },
875
+
876
+ /**
877
+ * The "..." menu of a pair: edit and remove.
878
+ *
879
+ * @param {object} row The row.
880
+ * @return {Array<{id: string, label: string, run: Function}>}
881
+ */
882
+ pairMenuItems(row) {
883
+ return [
884
+ ...(this.canEdit ? [{ id: 'edit', label: this.editLabel, run: () => this.startEdit(row) }] : []),
885
+ ...(this.canRemove ? [{ id: 'remove', label: this.removeLabel, run: () => this.remove(row) }] : []),
886
+ ]
887
+ },
888
+
889
+ /**
890
+ * The plain field `mirror` keeps in step with the list: the `path` of the
891
+ * entry flagged `prefer`, else of the first entry, else ''.
892
+ *
893
+ * @spec openspec/changes/contact-side-cards-generic/specs/contact-side-cards-generic/spec.md#requirement-a-field-list-keeps-a-plain-field-in-step-with-its-preferred-entry
894
+ * @param {Array} list The list about to be saved.
895
+ * @return {object} `{ [mirror.field]: value }`, or `{}` without a mirror.
896
+ */
897
+ mirrorOf(list) {
898
+ const mirror = this.content.mirror
899
+ if (!mirror || typeof mirror.field !== 'string' || mirror.field === '' || typeof mirror.path !== 'string') {
900
+ return {}
901
+ }
902
+ const entries = list.filter((entry) => entry && typeof entry === 'object')
903
+ const chosen = (mirror.prefer && entries.find((entry) => entry[mirror.prefer] === true)) || entries[0]
904
+ const value = chosen ? readPath(chosen, mirror.path) : ''
905
+ return { [mirror.field]: value === undefined || value === null ? '' : value }
906
+ },
907
+
789
908
  keyOf(item, index) {
790
909
  if (item === null || typeof item !== 'object') {
791
910
  return String(item)
@@ -1153,7 +1272,7 @@ export default {
1153
1272
  const { data: stored } = await axios.get(prefixUrl(this.objectUrl))
1154
1273
  const current = readPath(stored || {}, this.content.field)
1155
1274
  const next = change(Array.isArray(current) ? current : [])
1156
- const { data } = await axios.patch(prefixUrl(this.objectUrl), { [this.content.field]: next })
1275
+ const { data } = await axios.patch(prefixUrl(this.objectUrl), { [this.content.field]: next, ...this.mirrorOf(next) })
1157
1276
  const written = readPath(data || {}, this.content.field)
1158
1277
  this.saved = Array.isArray(written) ? written : next
1159
1278
  /**
@@ -1504,6 +1623,42 @@ export default {
1504
1623
  font-weight: bold;
1505
1624
  }
1506
1625
 
1626
+ .cn-field-list-widget__pairs {
1627
+ display: grid;
1628
+ grid-template-columns: max-content minmax(0, 1fr);
1629
+ gap: 8px 16px;
1630
+ margin: 0;
1631
+ padding: 0;
1632
+ font-size: 14px;
1633
+ }
1634
+
1635
+ .cn-field-list-widget__pair {
1636
+ display: contents;
1637
+ }
1638
+
1639
+ .cn-field-list-widget__pair-label {
1640
+ width: auto;
1641
+ margin: 0;
1642
+ padding: 0;
1643
+ text-align: start;
1644
+ color: var(--color-text-maxcontrast);
1645
+ white-space: normal;
1646
+ }
1647
+
1648
+ .cn-field-list-widget__pair-value {
1649
+ display: flex;
1650
+ align-items: center;
1651
+ gap: 4px;
1652
+ min-width: 0;
1653
+ margin: 0;
1654
+ padding: 0;
1655
+ overflow-wrap: anywhere;
1656
+ }
1657
+
1658
+ .cn-field-list-widget__pair-value--empty {
1659
+ color: var(--color-text-maxcontrast);
1660
+ }
1661
+
1507
1662
  .cn-field-list-widget__rows {
1508
1663
  list-style: none;
1509
1664
  margin: 0;
@@ -210,6 +210,7 @@
210
210
  :minZoom="minZoom"
211
211
  :maxZoom="maxZoom"
212
212
  :fitMaxZoom="fitMaxZoom"
213
+ :fitInset="fitInset"
213
214
  @zoomChange="zoom = $event"
214
215
  @nodeSelect="onNodeSelect"
215
216
  @nodeActivate="onNodeActivate"
@@ -489,6 +490,15 @@ export default {
489
490
  default: 0,
490
491
  },
491
492
 
493
+ /**
494
+ * Pixels per side that the host's chrome covers over the canvas, or a
495
+ * function returning them; passed to CnGraphCanvas `fitInset`.
496
+ */
497
+ fitInset: {
498
+ type: [Object, Function],
499
+ default: null,
500
+ },
501
+
492
502
  /**
493
503
  * Draw each step as a card: its name, then the pill this function
494
504
  * returns for the step (`{ label, variant }`, or null for none), in
@@ -9,7 +9,11 @@
9
9
  <template>
10
10
  <section class="cn-flow-run-summary" data-testid="flow-run-summary">
11
11
  <header class="cn-flow-run-summary__head">
12
- <CnStatusBadge :label="statusLabel" :variant="statusVariant" />
12
+ <CnStatusBadge :label="statusLabel" :variant="statusVariant">
13
+ <template v-if="statusIcon" #icon>
14
+ <component :is="statusIconComponent" :size="16" />
15
+ </template>
16
+ </CnStatusBadge>
13
17
  <h3 class="cn-flow-run-summary__title">
14
18
  {{ t('nextcloud-vue', 'Run {id}', { id: runLabel }) }}
15
19
  </h3>
@@ -75,7 +79,10 @@
75
79
  <script>
76
80
  import { translate as t } from '@nextcloud/l10n'
77
81
  import { NcButton } from '@nextcloud/vue'
82
+ import AlertCircleOutline from 'vue-material-design-icons/AlertCircleOutline.vue'
78
83
  import ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'
84
+ import CheckCircle from 'vue-material-design-icons/CheckCircle.vue'
85
+ import InformationOutline from 'vue-material-design-icons/InformationOutline.vue'
79
86
  import OpenInNew from 'vue-material-design-icons/OpenInNew.vue'
80
87
  import Replay from 'vue-material-design-icons/Replay.vue'
81
88
  import { formatRelativeDate } from '../../utils/boardDate.js'
@@ -132,6 +139,14 @@ export default {
132
139
  type: Boolean,
133
140
  default: false,
134
141
  },
142
+
143
+ /**
144
+ * Draw the status pill with an icon for its tone (PqFlowRun).
145
+ */
146
+ statusIcon: {
147
+ type: Boolean,
148
+ default: false,
149
+ },
135
150
  },
136
151
 
137
152
  emits: ['back', 'retry'],
@@ -158,6 +173,16 @@ export default {
158
173
  return (this.status && this.status.variant) || 'default'
159
174
  },
160
175
 
176
+ /**
177
+ * @return {object} The status pill's icon for its tone.
178
+ */
179
+ statusIconComponent() {
180
+ if (this.statusVariant === 'success') {
181
+ return CheckCircle
182
+ }
183
+ return ['error', 'warning'].includes(this.statusVariant) ? AlertCircleOutline : InformationOutline
184
+ },
185
+
161
186
  /**
162
187
  * @return {string} The run's name.
163
188
  */
@@ -214,6 +214,7 @@
214
214
  :run="run"
215
215
  :layoutDirection="flowDirection === 'down' ? 'down' : 'right'"
216
216
  :fitMaxZoom="flowDirection === 'down' ? 1 : 0"
217
+ :fitInset="canvasLayout ? canvasChromeInset : null"
217
218
  :nodeBadge="nodeLook === 'card' ? nodeBadge : null"
218
219
  :toolbarActions="false"
219
220
  :addStep="!showPalette"
@@ -252,6 +253,7 @@
252
253
  :title="validity.text"
253
254
  data-testid="flow-board-validity-pill" />
254
255
  <NcButton variant="tertiary"
256
+ class="cn-flow-board__panel-toggle"
255
257
  :aria-label="t('nextcloud-vue', 'Side panel')"
256
258
  :aria-pressed="inspectorShown ? 'true' : 'false'"
257
259
  :title="t('nextcloud-vue', 'Side panel')"
@@ -265,6 +267,8 @@
265
267
  </CnFlowDetail>
266
268
  <CnFlowRunSummary v-if="canvasLayout && store.inRunView"
267
269
  class="cn-flow-board__run-card"
270
+ :class="`cn-flow-board__run-card--${runStatus.variant}`"
271
+ statusIcon
268
272
  :run="runRecord"
269
273
  :stepsTotal="store.nodes.length"
270
274
  :canRetry="canRetry"
@@ -546,6 +550,7 @@ import { formatRelativeDate } from '../../utils/boardDate.js'
546
550
  import { flowOutcomeLevels, flowRunDurationMs, flowRunLogLines, flowRunName, flowRunSteps, formatFlowDuration } from '../../utils/flowRunLog.js'
547
551
  import { flowRunStatuses } from '../../utils/flowRunStatus.js'
548
552
  import { appDisplayNames } from '../../utils/nextcloudApps.js'
553
+ import { overlayInset } from '../../utils/overlayInset.js'
549
554
  import { normaliseSelectOptions } from '../../utils/selectOptions.js'
550
555
  import { CnStatusBadge } from '../CnStatusBadge/index.js'
551
556
 
@@ -1199,6 +1204,22 @@ export default {
1199
1204
  },
1200
1205
 
1201
1206
  methods: {
1207
+ /**
1208
+ * How far the chrome floating over the canvas (toolbar, run card, side
1209
+ * panel) reaches into it, measured when the canvas fits.
1210
+ *
1211
+ * @return {{top: number, right: number, bottom: number, left: number}} Pixels per side.
1212
+ */
1213
+ canvasChromeInset() {
1214
+ const root = this.$el
1215
+ const frame = root?.querySelector?.('.cn-flow-board__canvas')
1216
+ if (!frame) {
1217
+ return overlayInset(null, [])
1218
+ }
1219
+ const chrome = root.querySelectorAll('.cn-flow-detail__toolbar, .cn-flow-board__run-card, .cn-flow-board__inspector')
1220
+ return overlayInset(frame.getBoundingClientRect(), Array.from(chrome, (el) => el.getBoundingClientRect()))
1221
+ },
1222
+
1202
1223
  /**
1203
1224
  * Load the choices of the selected step's select fields that name a
1204
1225
  * url (`optionsFrom`), once per url.
@@ -1881,9 +1902,12 @@ export default {
1881
1902
  min-height: 640px;
1882
1903
  }
1883
1904
 
1905
+ /* The canvas fills the body: a definite box, so the graph canvas inside
1906
+ (height: 100%) and Vue Flow's pane measure a real height instead of
1907
+ collapsing to their minimum. */
1884
1908
  .cn-flow-board--canvas .cn-flow-board__canvas {
1885
- height: 100%;
1886
- min-height: 640px;
1909
+ position: absolute;
1910
+ inset: 0;
1887
1911
  border: 0;
1888
1912
  border-radius: 0;
1889
1913
  background: transparent;
@@ -2050,11 +2074,73 @@ export default {
2050
2074
  z-index: 11;
2051
2075
  width: min(746px, 100%);
2052
2076
  box-sizing: border-box;
2053
- padding: 16px;
2077
+ gap: 10px;
2078
+ padding: 12px 18px 12px 22px;
2054
2079
  border: 1px solid var(--color-border);
2055
2080
  border-radius: 12px;
2056
2081
  background: var(--color-main-background);
2057
- box-shadow: 0 4px 16px rgba(27, 28, 29, 0.12);
2082
+ box-shadow: inset 4px 0 0 var(--cn-flow-run-tone, var(--color-border-dark)), 0 4px 16px rgba(27, 28, 29, 0.12);
2083
+ }
2084
+
2085
+ /* The run card's stripe takes the run's tone (PqFlowRun). */
2086
+ .cn-flow-board__run-card--success {
2087
+ --cn-flow-run-tone: var(--color-success, #1e6b2a);
2088
+ }
2089
+
2090
+ .cn-flow-board__run-card--warning {
2091
+ --cn-flow-run-tone: var(--color-warning, #a37200);
2092
+ }
2093
+
2094
+ .cn-flow-board__run-card--error {
2095
+ --cn-flow-run-tone: var(--color-error, #c00);
2096
+ }
2097
+
2098
+ .cn-flow-board__run-card--info {
2099
+ --cn-flow-run-tone: var(--color-info, var(--color-primary-element));
2100
+ }
2101
+
2102
+ .cn-flow-board__run-card :deep(.cn-flow-run-summary__head .cn-status-badge) {
2103
+ gap: 4px;
2104
+ min-height: 25px;
2105
+ box-sizing: border-box;
2106
+ font-size: 14px;
2107
+ font-weight: 700;
2108
+ }
2109
+
2110
+ .cn-flow-board__run-card :deep(.cn-flow-run-summary__title) {
2111
+ font-size: 15px;
2112
+ font-weight: 700;
2113
+ line-height: 18px;
2114
+ }
2115
+
2116
+ /* The facts in one row, each label over its value, from the start. */
2117
+ .cn-flow-board__run-card :deep(.cn-flow-run-summary__facts) {
2118
+ display: flex;
2119
+ flex-wrap: wrap;
2120
+ gap: 4px 28px;
2121
+ }
2122
+
2123
+ .cn-flow-board__run-card :deep(.cn-flow-run-summary__fact) {
2124
+ display: flex;
2125
+ flex-direction: column;
2126
+ gap: 2px;
2127
+ text-align: start;
2128
+ }
2129
+
2130
+ .cn-flow-board__run-card :deep(.cn-flow-run-summary__fact dt) {
2131
+ font-size: 12px;
2132
+ line-height: 16px;
2133
+ }
2134
+
2135
+ .cn-flow-board__run-card :deep(.cn-flow-run-summary__fact dd) {
2136
+ font-size: 14px;
2137
+ line-height: 18px;
2138
+ }
2139
+
2140
+ /* The side panel toggle, pressed while the panel is open: tonal. */
2141
+ .cn-flow-board .cn-flow-board__panel-toggle[aria-pressed='true'] {
2142
+ background-color: var(--color-primary-element-light);
2143
+ color: var(--color-primary-element-light-text);
2058
2144
  }
2059
2145
 
2060
2146
  /* The canvas inspector (PqFlow): the kind over the name with the close beside
@@ -9,7 +9,7 @@
9
9
  :edges="edges"
10
10
  :minZoom="minZoom"
11
11
  :maxZoom="maxZoom"
12
- :fitViewOnInit="fitView && !fitMaxZoom"
12
+ :fitViewOnInit="fitOnInit"
13
13
  :snapToGrid="snapToGrid"
14
14
  :snapGrid="snapGrid"
15
15
  :nodesDraggable="interactive"
@@ -126,7 +126,7 @@
126
126
  class="cn-graph-canvas__control"
127
127
  :aria-label="t('nextcloud-vue', 'Fit the whole flow in view')"
128
128
  :title="t('nextcloud-vue', 'Fit the whole flow in view')"
129
- @click="fitViewNow()">
129
+ @click="fitToView()">
130
130
  <FitToScreenOutline :size="20" />
131
131
  </button>
132
132
  </div>
@@ -142,6 +142,7 @@ import Minus from 'vue-material-design-icons/Minus.vue'
142
142
  import Plus from 'vue-material-design-icons/Plus.vue'
143
143
  import CnFlowEdge from './CnFlowEdge.vue'
144
144
  import CnFlowNode from './CnFlowNode.vue'
145
+ import { fitPaddingFor } from '../../utils/overlayInset.js'
145
146
 
146
147
  /**
147
148
  * A graph canvas built on Vue Flow — the library n8n runs.
@@ -222,6 +223,16 @@ export default {
222
223
  default: 0,
223
224
  },
224
225
 
226
+ /**
227
+ * Pixels per side (`{ top, right, bottom, left }`) that chrome floating
228
+ * over the canvas covers, or a function returning them when the canvas
229
+ * fits. Every fit keeps the graph clear of them.
230
+ */
231
+ fitInset: {
232
+ type: [Object, Function],
233
+ default: null,
234
+ },
235
+
225
236
  /** Snap dragged nodes to the grid. */
226
237
  snapToGrid: {
227
238
  type: Boolean,
@@ -317,6 +328,14 @@ export default {
317
328
  },
318
329
 
319
330
  computed: {
331
+ /**
332
+ * @return {boolean} Whether Vue Flow frames the graph itself on init;
333
+ * a cap or an inset frames it in onNodesInitialized instead.
334
+ */
335
+ fitOnInit() {
336
+ return this.fitView && !this.fitMaxZoom && !this.fitInset
337
+ },
338
+
320
339
  /**
321
340
  * @return {boolean} Whether the canvas accepts interaction at all.
322
341
  */
@@ -346,11 +365,23 @@ export default {
346
365
  * @return {void}
347
366
  */
348
367
  onNodesInitialized() {
349
- if (!this.fitView || !this.fitMaxZoom || this.framedOnce) {
368
+ if (!this.fitView || (!this.fitMaxZoom && !this.fitInset) || this.framedOnce) {
350
369
  return
351
370
  }
352
371
  this.framedOnce = true
353
- this.fitViewNow({ maxZoom: this.fitMaxZoom, padding: 0.1 })
372
+ const inset = typeof this.fitInset === 'function' ? this.fitInset() : this.fitInset
373
+ const padding = fitPaddingFor(inset)
374
+ this.fitViewNow(this.fitMaxZoom ? { maxZoom: this.fitMaxZoom, padding } : { padding })
375
+ },
376
+
377
+ /**
378
+ * Frame the whole graph, clear of `fitInset`.
379
+ *
380
+ * @return {void}
381
+ */
382
+ fitToView() {
383
+ const inset = typeof this.fitInset === 'function' ? this.fitInset() : this.fitInset
384
+ this.fitViewNow({ padding: fitPaddingFor(inset) })
354
385
  },
355
386
 
356
387
  /**
@@ -1156,7 +1156,7 @@ columns are right.
1156
1156
 
1157
1157
  ## Board look
1158
1158
 
1159
- With `look: "board"` (the page's `look` prop, `config.look`, or the app's) the index page takes the DqZaken setup: a header with the count line from `countText` (`{shown}`, `{total}`), the buttons Download, Actions, the buildiq square and the primary one in that order, a two-row toolbar (saved-view chips, Filter with a count and the view switch; then search and active filter chips), a bulk band between toolbar and table (`bulkHint`), the table as a white card with one menu button per row, and a footer inside the card (`footerNote`). `cardFields` names the facts of each card in the cards view, and `cardLayout` draws each card as a record instead: a pill and the number on the head row, the title, a meta line, and a footer with a pill and a date, every part from a field (`{ headPill: { field, colorMap, labels }, number, title, meta: [...], footerPill, footerDate: { field, label } }`). A chip with `each` draws one pill per entry of a list field (`{ field: 'stages', each: 'name' }`, or a template per entry), and a meta part `{ template }` is a line filled from the record (`'{stages|count} stages'`). Without the look nothing changes.
1159
+ With `look: "board"` (the page's `look` prop, `config.look`, or the app's) the index page takes the DqZaken setup: a header with the count line from `countText` (`{shown}`, `{total}`; `count-text-filtered` is the line while a filter narrows the list, in either look), the buttons Download, Actions, the buildiq square and the primary one in that order, a two-row toolbar (saved-view chips, Filter with a count and the view switch; then search and active filter chips), a bulk band between toolbar and table (`bulkHint`), the table as a white card with one menu button per row, and a footer inside the card (`footerNote`). `cardFields` names the facts of each card in the cards view, and `cardLayout` draws each card as a record instead: a pill and the number on the head row, the title, a meta line, and a footer with a pill and a date, every part from a field (`{ headPill: { field, colorMap, labels }, number, title, meta: [...], footerPill, footerDate: { field, label } }`). A chip with `each` draws one pill per entry of a list field (`{ field: 'stages', each: 'name' }`, or a template per entry), and a meta part `{ template }` is a line filled from the record (`'{stages|count} stages'`). Without the look nothing changes.
1160
1160
 
1161
1161
  `bulkBandAlways` (`config.bulkBandAlways`) draws the board bulk band before a selection too, its buttons
1162
1162
  disabled until rows are selected (DqZaken, DqWerkbord).