@conduction/nextcloud-vue 2.145.0 → 2.146.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 (71) hide show
  1. package/dist/esm/components/CnAiCompanion/CnAiChatPanel.vue2.js.map +1 -1
  2. package/dist/esm/components/CnAiCompanion/CnAiChatPanel.vue3.js.map +1 -1
  3. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue.js +1 -1
  4. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js.map +1 -1
  5. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js.map +1 -1
  6. package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +12 -2
  7. package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
  8. package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +42 -30
  9. package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
  10. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +22 -0
  11. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  12. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +2 -1
  13. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  14. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue.js +1 -1
  15. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue2.js.map +1 -1
  16. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue3.js.map +1 -1
  17. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
  18. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +46 -8
  19. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
  20. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js +3 -3
  21. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
  22. package/dist/esm/components/CnNotesCard/CnNotesCard.vue.js +1 -1
  23. package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js.map +1 -1
  24. package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js +1 -0
  25. package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js.map +1 -1
  26. package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue.js +1 -1
  27. package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue2.js +21 -2
  28. package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue2.js.map +1 -1
  29. package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue3.js.map +1 -1
  30. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  31. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  32. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  33. package/dist/esm/components/CnRetentionWidget/CnRetentionWidget.vue.js +1 -1
  34. package/dist/esm/components/CnRetentionWidget/CnRetentionWidget.vue2.js.map +1 -1
  35. package/dist/esm/components/CnRetentionWidget/CnRetentionWidget.vue3.js.map +1 -1
  36. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
  37. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
  38. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
  39. package/dist/esm/library-style.js +1 -1
  40. package/dist/esm/nextcloud-vue.css +601 -280
  41. package/dist/esm/utils/detailObjectContext.js +7 -2
  42. package/dist/esm/utils/detailObjectContext.js.map +1 -1
  43. package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
  44. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  45. package/dist/esm/utils/visibleWhen.js +6 -0
  46. package/dist/esm/utils/visibleWhen.js.map +1 -1
  47. package/dist/nextcloud-vue.cjs.js +175 -63
  48. package/dist/nextcloud-vue.cjs.js.map +2 -2
  49. package/dist/nextcloud-vue.css +601 -280
  50. package/package.json +1 -1
  51. package/src/components/CnAiCompanion/CnAiChatPanel.vue +3 -0
  52. package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +4 -2
  53. package/src/components/CnDataTable/CnDataTable.vue +19 -2
  54. package/src/components/CnDetailPage/CnDetailPage.md +1 -0
  55. package/src/components/CnDetailPage/CnDetailPage.vue +23 -0
  56. package/src/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue +1 -0
  57. package/src/components/CnFactsWidget/CnFactsWidget.vue +74 -9
  58. package/src/components/CnNotesCard/CnNotesCard.vue +7 -2
  59. package/src/components/CnNotificationMatrix/CnNotificationMatrix.vue +21 -2
  60. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +1 -0
  61. package/src/components/CnRetentionWidget/CnRetentionWidget.vue +2 -0
  62. package/src/components/CnTabsWidget/CnTabsWidget.vue +6 -1
  63. package/src/css/dialog.css +7 -0
  64. package/src/css/look-board-detail.css +152 -8
  65. package/src/css/look-board-index.css +78 -0
  66. package/src/css/look-board.css +33 -3
  67. package/src/css/table.css +9 -0
  68. package/src/schemas/app-manifest-v2.schema.json +2 -2
  69. package/src/utils/detailObjectContext.js +7 -2
  70. package/src/utils/validateManifestV2.compiled.js +2 -2
  71. package/src/utils/visibleWhen.js +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/nextcloud-vue",
3
- "version": "2.145.0",
3
+ "version": "2.146.0",
4
4
  "description": "Shared Vue component library for Conduction Nextcloud apps — complements @nextcloud/vue with higher-level components, OpenRegister integration, and NL Design System support",
5
5
  "homepage": "https://github.com/ConductionNL/nextcloud-vue#readme",
6
6
  "bugs": {
@@ -1584,11 +1584,14 @@ export default {
1584
1584
  border-radius: 10px;
1585
1585
  background: var(--color-primary-element-light, #eaf0f7);
1586
1586
  color: var(--color-primary-element-light-text, #234a78);
1587
+ font-size: 14px;
1587
1588
  line-height: 1.5;
1588
1589
  }
1589
1590
 
1591
+ /* The icon font's own align-self: center would centre it on a long note. */
1590
1592
  .cn-ai-chat-window__note-icon {
1591
1593
  flex: none;
1594
+ align-self: flex-start;
1592
1595
  margin-top: 1px;
1593
1596
  }
1594
1597
 
@@ -1204,6 +1204,7 @@ export default {
1204
1204
  .cn-checklist-run__help {
1205
1205
  color: var(--color-text-maxcontrast);
1206
1206
  font-size: 14px;
1207
+ line-height: 1.2;
1207
1208
  margin: 0;
1208
1209
  }
1209
1210
 
@@ -1215,13 +1216,14 @@ export default {
1215
1216
  font-size: 15px;
1216
1217
  font-weight: 400;
1217
1218
  gap: 10px;
1218
- min-height: 34px;
1219
+ min-height: 24px;
1219
1220
  }
1220
1221
 
1222
+ /* The board draws the radio with the browser's own 3px 3px 0 5px margin. */
1221
1223
  .cn-checklist-run__choice input {
1222
1224
  accent-color: var(--color-primary-element);
1223
1225
  height: 20px;
1224
- margin: 0;
1226
+ margin: 3px 3px 0 5px;
1225
1227
  width: 20px;
1226
1228
  }
1227
1229
 
@@ -307,6 +307,13 @@
307
307
  customising their own data, not opting out of being told
308
308
  the record is locked. It renders nothing when unlocked,
309
309
  so an unlocked table is byte-for-byte what it was. -->
310
+ <!-- A reorderable row shows where to take hold of it, before its name. -->
311
+ <span v-if="reorderable && colIndex === 0"
312
+ class="cn-table-row__handle"
313
+ aria-hidden="true"
314
+ data-testid="cn-row-reorder-handle">
315
+ <DragVertical :size="16" />
316
+ </span>
310
317
  <CnUnreadMarker
311
318
  v-if="colIndex === titleColumnIndex && isUnreadRow(row)" />
312
319
  <CnLockIndicator
@@ -475,6 +482,7 @@ import { generateUrl } from '@nextcloud/router'
475
482
  import { NcCheckboxRadioSwitch, NcLoadingIcon } from '@nextcloud/vue'
476
483
  import ChevronDown from 'vue-material-design-icons/ChevronDown.vue'
477
484
  import ChevronUp from 'vue-material-design-icons/ChevronUp.vue'
485
+ import DragVertical from 'vue-material-design-icons/DragVertical.vue'
478
486
  import FilterOutline from 'vue-material-design-icons/FilterOutline.vue'
479
487
  import CnPagination from '../CnPagination/CnPagination.vue'
480
488
  import CnColumnFilterPopover from './CnColumnFilterPopover.vue'
@@ -585,6 +593,7 @@ export default {
585
593
  CnPagination,
586
594
  CnUnreadMarker,
587
595
  ChevronDown,
596
+ DragVertical,
588
597
  ChevronUp,
589
598
  FilterOutline,
590
599
  },
@@ -630,7 +639,10 @@ export default {
630
639
  * `link: true` makes that column the one that names the row: it carries
631
640
  * the row link and the title look. Without it the first column does.
632
641
  *
633
- * @type {Array<{key: string, label: string, description: string, sortable: boolean, width: string, class: string, cellClass: string, link: boolean, secondary: (string|((row: object) => string)), secondaryLabels: object}|string>}
642
+ * `emptyValue` is what a row without a value holds in that column, so a
643
+ * `badge` column draws a pill on every row.
644
+ *
645
+ * @type {Array<{key: string, label: string, description: string, sortable: boolean, width: string, class: string, cellClass: string, link: boolean, secondary: (string|((row: object) => string)), secondaryLabels: object, emptyValue: unknown}|string>}
634
646
  */
635
647
  columns: {
636
648
  type: Array,
@@ -2225,7 +2237,12 @@ export default {
2225
2237
  }
2226
2238
  return v
2227
2239
  }
2228
- return this.getCellValue(row, this.columnValueField(col))
2240
+ const value = this.getCellValue(row, this.columnValueField(col))
2241
+ // `emptyValue`: what a row without a value holds, so a badge column draws one for every row.
2242
+ if ((value === null || value === undefined || value === '') && col && Object.hasOwn(col, 'emptyValue')) {
2243
+ return col.emptyValue
2244
+ }
2245
+ return value
2229
2246
  },
2230
2247
 
2231
2248
  /**
@@ -181,6 +181,7 @@ export default {
181
181
  |------|------|---------|-------------|
182
182
  | `icon` | String | `''` | Optional MDI icon name rendered in the header via `CnIcon` |
183
183
  | `iconSize` | Number | `28` | Icon size in pixels |
184
+ | `gridFloat` | Boolean | `true` | GridStack's `float` for the body grid (manifest `config.gridFloat`). False packs widgets upward, so a size-to-content widget ends at its content (DqHandhaving). |
184
185
  | `loadingLabel` | String | `'Loading...'` | Message shown below the spinner during loading |
185
186
  | `band` | Array | `[]` | A row of widgets across the whole page, above the body and the side column (manifest `config.band`). Each entry is a widget id from `widgets`, a widget definition, or `{ widgetId, span, chrome }`: `span` is the entry's share of the row in twelfths (default 12), and `chrome` is `card` or `bare` (a banner defaults to bare). Each entry follows its `visibleWhen`. |
186
187
  | `recordLastChange` | Boolean | `false` | Read who changed the record last (as `headerMetaLastChange` does) for the widgets on the page: a facts card reads it as `_lastChange.userName` / `_lastChange.created` (DqContact "Historie"). |
@@ -911,6 +911,7 @@
911
911
  :editable="section.editable"
912
912
  :columns="12"
913
913
  :columnOpts="bodyColumnOpts"
914
+ :float="gridFloat"
914
915
  class="cn-detail-page__grid"
915
916
  @layoutChange="section.view ? onViewLayoutChange($event) : onBodyLayoutChange($event)">
916
917
  <template #widget="{ item }">
@@ -1842,6 +1843,18 @@ export default {
1842
1843
  default: '',
1843
1844
  },
1844
1845
 
1846
+ /**
1847
+ * GridStack's `float` for the body grid (manifest `config.gridFloat`).
1848
+ * True (the default) keeps every widget on its authored row; false
1849
+ * packs widgets upward, so a size-to-content widget ends at its content
1850
+ * and the one below closes up (DqHandhaving: the violation card sits
1851
+ * 20px under the matrix).
1852
+ */
1853
+ gridFloat: {
1854
+ type: Boolean,
1855
+ default: true,
1856
+ },
1857
+
1845
1858
  /**
1846
1859
  * How tall the labelled buttons in the page's card title rows stand in
1847
1860
  * the board look: `compact` (34px, setting and case-type pages) or
@@ -5745,6 +5758,15 @@ export default {
5745
5758
  },
5746
5759
  },
5747
5760
 
5761
+ // Header actions gate on `@context.<name>` through the object context.
5762
+ visibilityRows() {
5763
+ this.syncObjectContext()
5764
+ },
5765
+
5766
+ visibilityRowsPending() {
5767
+ this.syncObjectContext()
5768
+ },
5769
+
5748
5770
  // Endpoint and source conditions on grid widgets are asked once per record.
5749
5771
  remoteWidgetConditionsKey: {
5750
5772
  immediate: true,
@@ -7887,6 +7909,7 @@ export default {
7887
7909
  object: this.currentObject || null,
7888
7910
  register: resolved.register || this.register || this.sidebarProps?.register || '',
7889
7911
  schema: resolved.schema || this.schema || this.resolvedObjectType || this.sidebarProps?.schema || '',
7912
+ context: this.visibilityRowsPending ? null : (this.visibilityRows || null),
7890
7913
  setObject: (object) => this.setCurrentObject(object),
7891
7914
  }
7892
7915
  },
@@ -86,6 +86,7 @@ export default {
86
86
  font-size: 13px;
87
87
  font-weight: 700;
88
88
  gap: 6px;
89
+ margin: 0;
89
90
  min-height: 32px;
90
91
  padding: 0 14px;
91
92
  white-space: nowrap;
@@ -41,11 +41,12 @@
41
41
  <dl
42
42
  v-if="block.kind === 'rows'"
43
43
  class="cn-facts-widget__rows"
44
- :class="{ 'cn-facts-widget__rows--columns': twoColumns }">
44
+ :class="{ 'cn-facts-widget__rows--columns': twoColumns, 'cn-facts-widget__rows--stacked': stacked }">
45
45
  <div
46
46
  v-for="row in block.rows"
47
47
  :key="row.key"
48
48
  class="cn-facts-widget__row"
49
+ :class="{ 'cn-facts-widget__row--inline': row.inline }"
49
50
  :data-testid="`cn-fact-${row.key}`">
50
51
  <dt class="cn-facts-widget__label" :class="{ 'cn-facts-widget__label--icon': row.icon }">
51
52
  <CnIcon
@@ -232,7 +233,7 @@
232
233
  import { getCurrentUser } from '@nextcloud/auth'
233
234
  import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
234
235
  import { formatFileSize } from '@nextcloud/files'
235
- import { translate as t } from '@nextcloud/l10n'
236
+ import { translatePlural as n, translate as t } from '@nextcloud/l10n'
236
237
  import { generateUrl } from '@nextcloud/router'
237
238
  import { NcLoadingIcon, NcNoteCard } from '@nextcloud/vue'
238
239
  import Check from 'vue-material-design-icons/Check.vue'
@@ -251,6 +252,7 @@ import { parseDateValue } from '../../utils/dateVariant.js'
251
252
  import { fetchListTotal } from '../../utils/fetchFilterCounts.js'
252
253
  import { fillTemplate, formatLongDate } from '../../utils/fillTemplate.js'
253
254
  import { formatMoney, metricLocale, unwrapAppConfig } from '../../utils/formatMetric.js'
255
+ import { groupDisplayName, loadGroupDisplayName } from '../../utils/groupAutocomplete.js'
254
256
  import { readPath } from '../../utils/readPath.js'
255
257
  import { hasUnresolvedDeepTokens, resolveDeepTokens } from '../../utils/resolveFilterTokens.js'
256
258
  import { userDisplayName } from '../../utils/userDisplayName.js'
@@ -424,16 +426,17 @@ export default {
424
426
  /**
425
427
  * The widget configuration.
426
428
  *
427
- * - `fields` — the entries, in order. Each is `{ path, label?, as?, from?, format?, map?, itemPath?, parts?, separator?, route?, variant?, variantMap?, colorMap?, icon?, copy?, reveal?, text?, title?, subtitle?, initialsPath?, tone? }`.
429
+ * - `fields` — the entries, in order. Each is `{ path, label?, as?, from?, format?, map?, itemPath?, parts?, separator?, route?, variant?, variantMap?, colorMap?, icon?, copy?, reveal?, inline?, text?, title?, subtitle?, initialsPath?, tone? }`.
428
430
  * `as` is `row` (default when `label` or `icon` is set), `title`, `line`, `text` (a line in the normal ink), `lead` (an icon tile or initials beside `title` and `subtitle`), `pill` or `meter`.
429
431
  * `countFrom` (`{ register, schema, filter? }`, `@objectId` / `@object.<field>` in the filter) shows how many records that list holds ("Lopende zaken 43"); the row is left out while the count cannot be read.
430
432
  * A `meter` shows the amount at `path` against the limit at `limitPath` (or a constant `limit`) as "12 of 50" with a bar; past the limit the bar turns red and the text says "over the limit"; without a positive limit it shows the amount and no bar.
433
+ * A row with `inline: true` spans both columns as one line, the label, the value and its buttons side by side (a masked BSN with Show).
431
434
  * A row's `format` may also be `email`, `phone` or `url` (a link) or `masked` (the last four characters; `reveal: true` adds Show, which unmasks the record's value; `reveal: { url, path? }` makes Show ask the server for the value at `url` (tokens resolved), read at `path` (else the entry's path), so a server that answers the mask can check and record the reveal). `copy: true` adds a copy button; `icon` replaces the label.
432
435
  * A part may be `{ text }`, a constant; a `line` or `text` entry without `path` or `parts` shows its `text`.
433
436
  * `resolve: { register, schema, labelField? }` on an entry or a part turns a value that is a reference (an id, or a list of ids) into the label of the referenced object (`labelField`, else `title`, then `name`): the case type or status of a task shows its name, not its uuid. The ids are fetched once per register and schema through the object store and shared by every facts widget on the page; the entry stays empty until its label is known, and when no label can be read. A resolved value works as a pill too: `map` is applied to the resolved label, and `variantMap` / `colorMap` look the tone up by the value of `resolve.toneField` on the referenced object when that is set (a status named by its `name`, coloured by its `state`), then by the resolved label, then by the stored value.
434
437
  * `route` (`{ name, params?, query? }`, `@source.<path>` in a param) on a `title` or a `row` links its value to that route; a param that does not fill leaves it plain.
435
438
  * `format: 'user'` shows a Nextcloud user id as the user's display name, read once per id; the entry stays empty until the name is known.
436
- * `template` ("{available} {unit}") fills its `{path}` placeholders from the record instead of reading `path`; it is empty when every placeholder is. `suffix` (" kg") is added to a value that is not empty.
439
+ * `template` ("{available} {unit}") fills its `{path}` placeholders from the record instead of reading `path`; it is empty when every placeholder is. `suffix` (" kg") is added to a value that is not empty, its words translated.
437
440
  * `labelPath` ("@context.caseType.handlerLabel") names a value on the record or the page's `@context` records that labels the row when it holds text; `label` is the fallback.
438
441
  * `emptyValue` ("No") is shown, translated, when the entry has no value, so the entry stays drawn whatever `hideEmpty` says (an override that was never set reads "No").
439
442
  * - `action` — an action drawn as a button under the facts; `headerAction` — one drawn in the card header (reported through the `header` event).
@@ -441,14 +444,14 @@ export default {
441
444
  * - `rowsPath` — a path to a list of `{ label, value }` the record holds, drawn as rows after `fields` (a preview the server builds).
442
445
  * - `headerPill` — a status pill in the card header (reported through the `header` event): `{ path?, text?, map?, variant?, variantMap?, colorMap? }`, read from the record like a `pill` entry (DqBezwaar "Advies ontvangen"); nothing shows while the value is empty.
443
446
  * - `notice` — `{ text, variant? }`, a note band inside the card under the facts (`info` by default; `success`, `warning` or `error`); the text is translated.
444
- * `format` is `text` (default), `date` (board short date), `date-long` (always with the year), `longdate` (the month written out, the year only outside this year: "3 oktober"), `list` (an array joined by ", ", each item read at `itemPath`), `bytes` (a size, "1.5 MB"), `number` (in the reader's language, `decimals` fraction digits when set) or `currency` (a money amount in the reader's language, "€ 1.234,50": the code in `currency`, else the record's `currencyField`, else the app's reporting currency, else EUR; `decimals` defaults to 2).
447
+ * `format` is `text` (default), `date` (board short date), `date-long` (always with the year), `longdate` (the month written out, the year only outside this year: "3 oktober"), `list` (an array joined by ", ", each item read at `itemPath` and written in `itemFormat`), `group` (a Nextcloud group by its display name), `bytes` (a size, "1.5 MB"), `number` (in the reader's language, `decimals` fraction digits when set), `months` (a number of months in words, whole years as years: 240 is "20 jaar") or `currency` (a money amount in the reader's language, "€ 1.234,50": the code in `currency`, else the record's `currencyField`, else the app's reporting currency, else EUR; `decimals` defaults to 2).
445
448
  * `map` turns a raw value into a label (translated). `parts` (on a `line`) lists paths, or `{ path, label?, format? }`, joined by `separator` (default " · "); empty parts are dropped.
446
449
  * - `source` — `{ register, schema, id }` or `{ url }`; omitted = the current object. `{ register, schema, filter, sort? }` without `id` reads the first object that matches `filter` in `sort` order (`{ field, dir }`): the latest count of a shift. An entry with `from: "object"` reads the current object even then (a client card that also shows the ticket's channel).
447
450
  * - `endpointSource` — `{ url, method?, params?, responsePath? }`, the block a stat or chart takes: the facts read an app endpoint, shared and cached like those.
448
451
  * - `emptyWhen` — a path; when the record's value there is truthy the card shows `emptyText` (an endpoint that answers `empty: true`).
449
452
  * - `link` — `{ label, route? | href? }` at the foot. `{ label, icon?, sidebarTab }` instead opens the page's object sidebar on that tab (no link without a sidebar).
450
453
  * - `hideEmpty` — drop an entry whose value is empty (default true).
451
- * - `columns` — `2` lays the rows out in two columns with the label above the value (board DqContact); a row with `parts` joins them like a line (an address on one row).
454
+ * - `columns` — `2` lays the rows out in two columns with the label above the value (board DqContact); a row with `parts` joins them like a line (an address on one row). `1` stacks each label above its value in one column, for a narrow card with long labels (board DqHandhaving "Afwijking en definitief").
452
455
  * - `emptyText` — shown when no entry has a value.
453
456
  *
454
457
  * @type {{fields?: Array<object>, source?: object, link?: object, hideEmpty?: boolean, emptyText?: string}}
@@ -510,6 +513,15 @@ export default {
510
513
  return Number(this.content?.columns) === 2
511
514
  },
512
515
 
516
+ /**
517
+ * Whether the rows stack in one column, label above value.
518
+ *
519
+ * @return {boolean}
520
+ */
521
+ stacked() {
522
+ return Number(this.content?.columns) === 1
523
+ },
524
+
513
525
  /**
514
526
  * The token context: the detail object (prop, else the injected context)
515
527
  * and the page workspace.
@@ -725,7 +737,7 @@ export default {
725
737
  }
726
738
  if (kind === 'row') {
727
739
  const last = out[out.length - 1]
728
- const row = { key, label: this.labelOf(record, field), value, ...this.rowExtras(record, field, value) }
740
+ const row = { key, label: this.labelOf(record, field), value, inline: field.inline === true, ...this.rowExtras(record, field, value) }
729
741
  if (field.route && !row.href) {
730
742
  row.to = this.resolveRoute(field.route, record)
731
743
  }
@@ -1130,7 +1142,12 @@ export default {
1130
1142
  if (value === '') {
1131
1143
  return typeof field.emptyValue === 'string' && field.emptyValue !== '' ? this.tr(field.emptyValue) : ''
1132
1144
  }
1133
- return typeof field.suffix === 'string' ? `${value}${field.suffix}` : value
1145
+ if (typeof field.suffix !== 'string') {
1146
+ return value
1147
+ }
1148
+ // The words of a suffix are translated; its leading space stays as written.
1149
+ const lead = field.suffix.match(/^\s*/)[0]
1150
+ return `${value}${lead}${this.tr(field.suffix.slice(lead.length))}`
1134
1151
  },
1135
1152
 
1136
1153
  /**
@@ -1798,7 +1815,7 @@ export default {
1798
1815
  if (format === 'list' || Array.isArray(raw)) {
1799
1816
  const items = (Array.isArray(raw) ? raw : [raw])
1800
1817
  .map((item) => (spec.itemPath && item && typeof item === 'object' ? readPath(item, spec.itemPath) : item))
1801
- .map((item) => this.format(item, { ...spec, format: 'text' }))
1818
+ .map((item) => this.format(item, { ...spec, format: spec.itemFormat || 'text' }))
1802
1819
  .filter((item) => item !== '')
1803
1820
  return items.join(', ')
1804
1821
  }
@@ -1816,6 +1833,16 @@ export default {
1816
1833
  ? formatBoardDate(date, new Date(date.getFullYear() + 1, 0, 1))
1817
1834
  : formatBoardDate(date)
1818
1835
  }
1836
+ // A number of months in words: whole years as years ("20 jaar"), else months.
1837
+ if (format === 'months') {
1838
+ const months = Number(raw)
1839
+ if (typeof raw === 'object' || !Number.isInteger(months) || months < 0) {
1840
+ return typeof raw === 'object' ? '' : String(raw)
1841
+ }
1842
+ return months > 0 && months % 12 === 0
1843
+ ? n('nextcloud-vue', '%n year', '%n years', months / 12)
1844
+ : n('nextcloud-vue', '%n month', '%n months', months)
1845
+ }
1819
1846
  if (format === 'bytes') {
1820
1847
  const bytes = Number(raw)
1821
1848
  return Number.isFinite(bytes) && bytes >= 0 ? formatFileSize(bytes) : ''
@@ -1823,6 +1850,18 @@ export default {
1823
1850
  if (format === 'user') {
1824
1851
  return userDisplayName(raw)
1825
1852
  }
1853
+ // A Nextcloud group by its display name; the id until the name is known.
1854
+ if (format === 'group') {
1855
+ if (typeof raw === 'object') {
1856
+ return ''
1857
+ }
1858
+ const name = groupDisplayName(String(raw))
1859
+ if (name === null) {
1860
+ loadGroupDisplayName(String(raw))
1861
+ return String(raw)
1862
+ }
1863
+ return name
1864
+ }
1826
1865
  if (format === 'number') {
1827
1866
  const number = Number(raw)
1828
1867
  if (typeof raw === 'object' || !Number.isFinite(number)) {
@@ -1938,6 +1977,21 @@ export default {
1938
1977
  display: contents;
1939
1978
  }
1940
1979
 
1980
+ .cn-facts-widget__row--inline {
1981
+ display: flex;
1982
+ grid-column: 1 / -1;
1983
+ flex-wrap: wrap;
1984
+ align-items: center;
1985
+ gap: 10px;
1986
+ }
1987
+
1988
+ .cn-facts-widget__row--inline .cn-facts-widget__value {
1989
+ display: flex;
1990
+ flex-wrap: wrap;
1991
+ align-items: center;
1992
+ gap: 10px;
1993
+ }
1994
+
1941
1995
  /* Nextcloud core styles `dt` and `dd` (text-align end, 12px padding, a
1942
1996
  130px-wide `dt`), which pushed the label to the right of its column, added
1943
1997
  12px around both and widened the label column to 130px. The class is
@@ -2203,6 +2257,17 @@ export default {
2203
2257
  font-size: 13px;
2204
2258
  }
2205
2259
 
2260
+ /* One column, label above value: 2px under its label, 10px to the next
2261
+ label, so a long label never squeezes its value (DqHandhaving). */
2262
+ .cn-facts-widget__rows--stacked {
2263
+ grid-template-columns: minmax(0, 1fr);
2264
+ gap: 2px 0;
2265
+ }
2266
+
2267
+ .cn-facts-widget__rows--stacked .cn-facts-widget__value.cn-facts-widget__value {
2268
+ margin-bottom: 8px;
2269
+ }
2270
+
2206
2271
  @media (max-width: 640px) {
2207
2272
  .cn-facts-widget__rows--columns {
2208
2273
  grid-template-columns: minmax(0, 1fr);
@@ -128,6 +128,7 @@
128
128
  </p>
129
129
  <NcButton
130
130
  v-if="canReply"
131
+ class="cn-notes-card__reply-btn"
131
132
  variant="tertiary"
132
133
  size="small"
133
134
  :aria-label="replyAria(row.note)"
@@ -915,7 +916,10 @@ export default {
915
916
  padding-right: 32px;
916
917
  }
917
918
 
918
- .cn-notes-card__delete-btn {
919
+ /* The note's own class leads so the position outranks NcButton's
920
+ `position: relative`, which loads later at the same weight and put the
921
+ button in the flow under the note. */
922
+ .cn-notes-card__note > .cn-notes-card__delete-btn {
919
923
  position: absolute;
920
924
  top: 8px;
921
925
  right: -4px;
@@ -923,7 +927,8 @@ export default {
923
927
  transition: opacity 0.15s ease;
924
928
  }
925
929
 
926
- .cn-notes-card__note:hover .cn-notes-card__delete-btn {
930
+ .cn-notes-card__note:hover > .cn-notes-card__delete-btn,
931
+ .cn-notes-card__note:focus-within > .cn-notes-card__delete-btn {
927
932
  opacity: 1;
928
933
  }
929
934
 
@@ -331,6 +331,23 @@ import {
331
331
  * @event {object} digest-change — A channel's digest was set. Payload: `{ channelId, mode, timeOfDay }`.
332
332
  * @event {object} test-send — A test was asked for. Payload: `{ channelId }`.
333
333
  */
334
+ /**
335
+ * An event's shipped default in one channel: one boolean for every channel,
336
+ * or the channel's own entry when the default differs per channel.
337
+ *
338
+ * @param {object} event The event.
339
+ * @param {object} channel The channel.
340
+ * @return {boolean} The default.
341
+ * @spec openspec/changes/notification-matrix-default-per-channel/specs/notification-matrix/spec.md
342
+ */
343
+ function appDefaultFor(event, channel) {
344
+ const value = event?.appDefault
345
+ if (value !== null && typeof value === 'object') {
346
+ return value[channel?.id] === true
347
+ }
348
+ return value === true
349
+ }
350
+
334
351
  export default {
335
352
  name: 'CnNotificationMatrix',
336
353
 
@@ -342,7 +359,9 @@ export default {
342
359
  props: {
343
360
  /**
344
361
  * The events, each `{ id, label, group, groupLabel, immediate,
345
- * appDefault }`. From the host's catalogue.
362
+ * appDefault }`. From the host's catalogue. `appDefault` is one
363
+ * boolean for every channel, or `{ [channelId]: boolean }` when the
364
+ * default differs per channel (an opt-in e-mail is off by default).
346
365
  */
347
366
  events: {
348
367
  type: Array,
@@ -607,7 +626,7 @@ export default {
607
626
  })
608
627
 
609
628
  return resolvePreference({
610
- appDefault: event?.appDefault === true,
629
+ appDefault: appDefaultFor(event, channel),
611
630
  groupValue: this.at(this.groupValues, event, channel),
612
631
  personalValue: narrow.value === null
613
632
  ? this.at(this.personalValues, event, channel)
@@ -3413,6 +3413,7 @@ export default {
3413
3413
  font-weight: 600;
3414
3414
  height: 34px;
3415
3415
  justify-content: center;
3416
+ margin: 0;
3416
3417
  padding: 0 14px;
3417
3418
  text-decoration: none;
3418
3419
  }
@@ -604,6 +604,7 @@ export default {
604
604
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
605
605
  gap: 12px 24px;
606
606
  margin: 0;
607
+ padding: 0;
607
608
  }
608
609
 
609
610
  /* The server draws every dt as a 130px right-aligned inline block and pads
@@ -621,6 +622,7 @@ export default {
621
622
  padding: 0;
622
623
  color: var(--color-text-maxcontrast);
623
624
  font-size: 13px;
625
+ line-height: 1.2;
624
626
  }
625
627
 
626
628
  .cn-retention__fact dd {
@@ -1566,12 +1566,17 @@ export default {
1566
1566
 
1567
1567
  .cn-tabs-widget__panel-heading-text {
1568
1568
  display: flex;
1569
- flex: 1 1 260px;
1570
1569
  flex-direction: column;
1571
1570
  gap: 4px;
1572
1571
  min-width: 0;
1573
1572
  }
1574
1573
 
1574
+ /* The 260px basis is a width in the actions row; in the column heading it
1575
+ would be a height. */
1576
+ .cn-tabs-widget__panel-heading--actions > .cn-tabs-widget__panel-heading-text {
1577
+ flex: 1 1 260px;
1578
+ }
1579
+
1575
1580
  .cn-tabs-widget__panel-actions {
1576
1581
  display: flex;
1577
1582
  justify-content: flex-end;
@@ -277,6 +277,13 @@ body:has(.cn-look-board):not(:has(.cn-look-nextcloud)) .modal-mask {
277
277
  border-top: 1px solid var(--color-border);
278
278
  }
279
279
 
280
+ /* NcDialog's scoped `.dialog__actions[data-v-…]` margin (6px 0 12px) has the
281
+ rule above's specificity and, loaded later, put the footer 6px low under the
282
+ body (DqVolgendeStap). This one outranks it. */
283
+ .cn-dialog-board .dialog .dialog__actions {
284
+ margin: 0;
285
+ }
286
+
280
287
  .cn-dialog-board .dialog__actions .button-vue,
281
288
  .cn-dialog-board .dialog__actions button {
282
289
  min-height: var(--cn-board-control-height, 40px);