@conduction/nextcloud-vue 2.56.0-beta.76 → 2.56.0-beta.77

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.
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/nextcloud-vue.cjs.js.map
3
- size: 53914415 bytes
4
- sha256: bb41d35998a672c3caeed3e048731d0627aa9395acb43b71369a81be882ec51d
3
+ size: 53925881 bytes
4
+ sha256: 61c0ea5ad0cdb06543a9a70b72c4214028fc1330e3531b6fd41fd65946881b0a
@@ -52590,18 +52590,25 @@ to {
52590
52590
  }
52591
52591
 
52592
52592
 
52593
- .cn-flow-step-outcomes[data-v-1b31a476] {
52593
+ .cn-flow-step-outcomes[data-v-b8932606] {
52594
52594
  margin: 4px 0 0;
52595
52595
  font-size: 0.9em;
52596
52596
  }
52597
- .cn-flow-step-outcomes__list[data-v-1b31a476] {
52597
+ .cn-flow-step-outcomes__title[data-v-b8932606] {
52598
+ margin: 4px 0 0;
52599
+ font-weight: bold;
52600
+ text-transform: uppercase;
52601
+ font-size: 0.85em;
52602
+ color: var(--color-text-maxcontrast);
52603
+ }
52604
+ .cn-flow-step-outcomes__list[data-v-b8932606] {
52598
52605
  margin: 0;
52599
52606
  padding: 0;
52600
52607
  }
52601
52608
 
52602
52609
  /* Stacked, name over value: the run sidebar is narrow, and a side-by-side
52603
52610
  row wrapped mid-list. The host's dt/dd margins and alignment are reset. */
52604
- .cn-flow-step-outcomes__row[data-v-1b31a476] {
52611
+ .cn-flow-step-outcomes__row[data-v-b8932606] {
52605
52612
  display: block;
52606
52613
  margin-block: 4px;
52607
52614
  padding-block: 2px;
@@ -52609,16 +52616,16 @@ to {
52609
52616
  border-inline-start: 3px solid var(--color-border);
52610
52617
  text-align: start;
52611
52618
  }
52612
- .cn-flow-step-outcomes__row--success[data-v-1b31a476] {
52619
+ .cn-flow-step-outcomes__row--success[data-v-b8932606] {
52613
52620
  border-inline-start-color: var(--color-success);
52614
52621
  }
52615
- .cn-flow-step-outcomes__row--warning[data-v-1b31a476] {
52622
+ .cn-flow-step-outcomes__row--warning[data-v-b8932606] {
52616
52623
  border-inline-start-color: var(--color-warning);
52617
52624
  }
52618
- .cn-flow-step-outcomes__row--error[data-v-1b31a476] {
52625
+ .cn-flow-step-outcomes__row--error[data-v-b8932606] {
52619
52626
  border-inline-start-color: var(--color-error);
52620
52627
  }
52621
- .cn-flow-step-outcomes__name[data-v-1b31a476] {
52628
+ .cn-flow-step-outcomes__name[data-v-b8932606] {
52622
52629
  display: block;
52623
52630
  white-space: normal;
52624
52631
  overflow-wrap: anywhere;
@@ -52627,7 +52634,7 @@ to {
52627
52634
  font-weight: bold;
52628
52635
  text-align: start;
52629
52636
  }
52630
- .cn-flow-step-outcomes__value[data-v-1b31a476] {
52637
+ .cn-flow-step-outcomes__value[data-v-b8932606] {
52631
52638
  display: block;
52632
52639
  white-space: normal;
52633
52640
  margin: 0;
@@ -52636,50 +52643,50 @@ to {
52636
52643
  color: var(--color-main-text);
52637
52644
  overflow-wrap: anywhere;
52638
52645
  }
52639
- .cn-flow-step-outcomes__truncated[data-v-1b31a476] {
52646
+ .cn-flow-step-outcomes__truncated[data-v-b8932606] {
52640
52647
  margin: 4px 0 0;
52641
52648
  color: var(--color-text-maxcontrast);
52642
52649
  }
52643
52650
 
52644
52651
 
52645
- .cn-run-sidebar[data-v-9f3603dc] {
52652
+ .cn-run-sidebar[data-v-4fc51f96] {
52646
52653
  display: flex;
52647
52654
  flex-direction: column;
52648
52655
  gap: 12px;
52649
52656
  padding: 12px;
52650
52657
  }
52651
- .cn-run-sidebar__head[data-v-9f3603dc] {
52658
+ .cn-run-sidebar__head[data-v-4fc51f96] {
52652
52659
  display: flex;
52653
52660
  }
52654
- .cn-run-sidebar__title[data-v-9f3603dc] {
52661
+ .cn-run-sidebar__title[data-v-4fc51f96] {
52655
52662
  display: flex;
52656
52663
  align-items: center;
52657
52664
  gap: 8px;
52658
52665
  margin: 0;
52659
52666
  }
52660
- .cn-run-sidebar__when[data-v-9f3603dc] {
52667
+ .cn-run-sidebar__when[data-v-4fc51f96] {
52661
52668
  color: var(--color-text-maxcontrast);
52662
52669
  font-weight: normal;
52663
52670
  font-size: 0.9em;
52664
52671
  font-variant-numeric: tabular-nums;
52665
52672
  }
52666
- .cn-run-sidebar__error[data-v-9f3603dc] {
52673
+ .cn-run-sidebar__error[data-v-4fc51f96] {
52667
52674
  color: var(--color-error-text, var(--color-error));
52668
52675
  }
52669
- .cn-run-sidebar__hint[data-v-9f3603dc] {
52676
+ .cn-run-sidebar__hint[data-v-4fc51f96] {
52670
52677
  color: var(--color-text-maxcontrast);
52671
52678
  }
52672
- .cn-run-sidebar__group[data-v-9f3603dc] {
52679
+ .cn-run-sidebar__group[data-v-4fc51f96] {
52673
52680
  margin: 8px 0 0;
52674
52681
  color: var(--color-text-maxcontrast);
52675
52682
  font-weight: bold;
52676
52683
  }
52677
- .cn-run-sidebar__tabs[data-v-9f3603dc] {
52684
+ .cn-run-sidebar__tabs[data-v-4fc51f96] {
52678
52685
  display: flex;
52679
52686
  gap: 4px;
52680
52687
  border-block-end: 1px solid var(--color-border);
52681
52688
  }
52682
- .cn-run-sidebar__tab[data-v-9f3603dc] {
52689
+ .cn-run-sidebar__tab[data-v-4fc51f96] {
52683
52690
  border: none;
52684
52691
  background: none;
52685
52692
  padding: 8px 12px;
@@ -52687,13 +52694,13 @@ to {
52687
52694
  color: var(--color-main-text);
52688
52695
  border-block-end: 2px solid transparent;
52689
52696
  }
52690
- .cn-run-sidebar__tab--active[data-v-9f3603dc] {
52697
+ .cn-run-sidebar__tab--active[data-v-4fc51f96] {
52691
52698
  border-block-end-color: var(--color-primary-element);
52692
52699
  font-weight: bold;
52693
52700
  }
52694
- .cn-run-sidebar__list[data-v-9f3603dc],
52695
- .cn-run-sidebar__touched[data-v-9f3603dc],
52696
- .cn-run-sidebar__steps[data-v-9f3603dc] {
52701
+ .cn-run-sidebar__list[data-v-4fc51f96],
52702
+ .cn-run-sidebar__touched[data-v-4fc51f96],
52703
+ .cn-run-sidebar__steps[data-v-4fc51f96] {
52697
52704
  margin: 0;
52698
52705
  padding-inline-start: 0;
52699
52706
  list-style: none;
@@ -52701,11 +52708,11 @@ to {
52701
52708
  flex-direction: column;
52702
52709
  gap: 6px;
52703
52710
  }
52704
- .cn-run-sidebar__steps[data-v-9f3603dc] {
52711
+ .cn-run-sidebar__steps[data-v-4fc51f96] {
52705
52712
  list-style: decimal;
52706
52713
  padding-inline-start: 20px;
52707
52714
  }
52708
- .cn-run-sidebar__row[data-v-9f3603dc] {
52715
+ .cn-run-sidebar__row[data-v-4fc51f96] {
52709
52716
  display: flex;
52710
52717
  gap: 8px;
52711
52718
  align-items: center;
@@ -52714,7 +52721,7 @@ to {
52714
52721
  border-radius: var(--border-radius-large, 12px);
52715
52722
  background: var(--color-background-hover);
52716
52723
  }
52717
- .cn-run-sidebar__touched-uuid[data-v-9f3603dc] {
52724
+ .cn-run-sidebar__touched-uuid[data-v-4fc51f96] {
52718
52725
  font-family: monospace;
52719
52726
  font-size: 0.9em;
52720
52727
  }
@@ -52722,7 +52729,7 @@ to {
52722
52729
  /* A uuid is long and the sidebar is narrow, so a row wraps rather than
52723
52730
  pushing the panel wider. The gap keeps the parts apart on the line the
52724
52731
  separators already keep apart in the text. */
52725
- .cn-run-sidebar__touched li[data-v-9f3603dc] {
52732
+ .cn-run-sidebar__touched li[data-v-4fc51f96] {
52726
52733
  display: flex;
52727
52734
  flex-wrap: wrap;
52728
52735
  align-items: baseline;
package/l10n/en.json CHANGED
@@ -411,6 +411,13 @@
411
411
  "Create {title}": "Create {title}",
412
412
  "Created": "Created",
413
413
  "Created:": "Created:",
414
+ "Fetched": "Fetched",
415
+ "Invalid": "Invalid",
416
+ "Swept": "Swept",
417
+ "Fetch": "Fetch",
418
+ "Decision": "Decision",
419
+ "Write": "Write",
420
+ "Sweep": "Sweep",
414
421
  "Current enum values ({count})": "Current enum values ({count})",
415
422
  "Custom value": "Custom value",
416
423
  "Custom value…": "Custom value…",
package/l10n/nl.json CHANGED
@@ -436,6 +436,13 @@
436
436
  "Create {title}": "{title} aanmaken",
437
437
  "Created": "Aangemaakt",
438
438
  "Created:": "Aangemaakt:",
439
+ "Fetched": "Opgehaald",
440
+ "Invalid": "Ongeldig",
441
+ "Swept": "Opgeschoond",
442
+ "Fetch": "Ophalen",
443
+ "Decision": "Beslissing",
444
+ "Write": "Schrijven",
445
+ "Sweep": "Opschonen",
439
446
  "Current enum values ({count})": "Huidige opsommingswaarden ({count})",
440
447
  "Custom value": "Aangepaste waarde",
441
448
  "Custom value…": "Aangepaste waarde…",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/nextcloud-vue",
3
- "version": "2.56.0-beta.76",
3
+ "version": "2.56.0-beta.77",
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": {
@@ -226,10 +226,17 @@
226
226
  <strong>{{ step.transition }}</strong>
227
227
  <span class="cn-run-sidebar__hint"> · {{ step.status }}</span>
228
228
  <span v-if="step.error" class="cn-run-sidebar__error"> · {{ step.error }}</span>
229
- <!-- A send step's outcome lists, by name: who got it, who
230
- opted out, who the opt-out check could not answer for. -->
231
- <CnFlowStepOutcomes v-if="step.report && step.report.messaging"
232
- :report="step.report.messaging" />
229
+ <!-- Every bucket a node reported on this hop: a send step's
230
+ `messaging` (who got it, who opted out, ...), a sync
231
+ step's own tally (`fetch`, `contract`, `write`, `sweep` —
232
+ objects fetched, create/update/skip/invalid, created/
233
+ updated, swept). One node writes one key in practice, but
234
+ nothing here assumes that. -->
235
+ <CnFlowStepOutcomes v-for="block in reportBlocks(step)"
236
+ :key="block.key"
237
+ :report="block.value"
238
+ :hideZero="block.key === 'messaging'"
239
+ :label="blockLabel(block.key)" />
233
240
  </li>
234
241
  </ol>
235
242
  </component>
@@ -430,6 +437,57 @@ export default {
430
437
  taskUrl(uuid) {
431
438
  return generateUrl(`/apps/openregister/flow-tasks/${uuid}`)
432
439
  },
440
+
441
+ /**
442
+ * A step's report, as the named blocks `CnFlowStepOutcomes` renders.
443
+ *
444
+ * `step.report` is a map of named summaries (`messaging`, `fetch`,
445
+ * `contract`, `write`, `sweep`, ...) — whatever node(s) on this hop
446
+ * wrote one, keyed per {@see FlowStepReport::put()} on the server. Each
447
+ * value is itself a bucket map (`{count, sample}` per bucket), the
448
+ * shape `CnFlowStepOutcomes` already knows how to draw.
449
+ *
450
+ * @param {object} step The log entry.
451
+ * @return {Array<{key: string, value: object}>} One entry per report key.
452
+ */
453
+ reportBlocks(step) {
454
+ const report = step && step.report
455
+ if (!report || typeof report !== 'object') {
456
+ return []
457
+ }
458
+
459
+ return Object.keys(report)
460
+ .filter((key) => report[key] && typeof report[key] === 'object')
461
+ .map((key) => ({ key, value: report[key] }))
462
+ },
463
+
464
+ /**
465
+ * What a report block is a tally of, for `CnFlowStepOutcomes`'
466
+ * `label` prop — its visible caption and accessible name.
467
+ *
468
+ * `null` for `messaging`: that block keeps the component's own
469
+ * send-specific default ("Who this step reached") and no caption,
470
+ * since a step writes at most one messaging block, so it needs
471
+ * neither a caption to tell it apart from a sibling nor a different
472
+ * accessible name.
473
+ *
474
+ * @param {string} key The report block's key.
475
+ * @return {string|null} The label, or `null` for `messaging`.
476
+ */
477
+ blockLabel(key) {
478
+ if (key === 'messaging') {
479
+ return null
480
+ }
481
+
482
+ const labels = {
483
+ fetch: this.t('nextcloud-vue', 'Fetch'),
484
+ contract: this.t('nextcloud-vue', 'Decision'),
485
+ write: this.t('nextcloud-vue', 'Write'),
486
+ sweep: this.t('nextcloud-vue', 'Sweep'),
487
+ }
488
+
489
+ return labels[key] || key
490
+ },
433
491
  },
434
492
  }
435
493
  </script>
@@ -1,22 +1,34 @@
1
1
  <!--
2
- CnFlowStepOutcomes: who a send step reached, and who it did not, by name.
2
+ CnFlowStepOutcomes: a step's own tally, by named bucket.
3
3
 
4
4
  A messaging step (send email, send notification, post to Talk) writes its
5
5
  per-recipient outcome onto its run-log entry as `report.messaging`: one
6
6
  bucket per outcome, each `{count, sample}`. Nothing rendered it, so the run
7
7
  log could not show that a person was skipped because they opted out, or
8
- because the opt-out check did not answer.
8
+ because the opt-out check did not answer. A sync pipeline's steps write the
9
+ same shape for their own counts (`report.fetch`, `report.contract`,
10
+ `report.write`, `report.sweep` — objects fetched, create/update/skip/invalid,
11
+ created/updated, swept).
9
12
 
10
- Only buckets with someone in them are listed. A bucket this component does
11
- not know is still shown, under its own key made readable, so a new outcome
12
- on the server is never hidden by an older library.
13
+ Only buckets with someone in them are listed, UNLESS `hideZero` is false.
14
+ Messaging wants zero-suppression: "delivered: 0, optedOut: 0, failed: 0" on
15
+ every ordinary send is noise nobody reads. A count step does not: "swept: 0"
16
+ is the answer, not a blank where a row should be, and hiding it would read
17
+ as "this step reported nothing" when it reported zero. A bucket this
18
+ component does not know is still shown, under its own key made readable, so
19
+ a new outcome on the server is never hidden by an older library.
13
20
 
14
21
  SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl>
15
22
  SPDX-License-Identifier: EUPL-1.2
16
23
  -->
17
24
  <template>
18
25
  <div v-if="rows.length" class="cn-flow-step-outcomes" data-testid="flow-step-outcomes">
19
- <dl class="cn-flow-step-outcomes__list" :aria-label="t('nextcloud-vue', 'Who this step reached')">
26
+ <p v-if="label"
27
+ class="cn-flow-step-outcomes__title"
28
+ data-testid="flow-step-outcomes-title">
29
+ {{ label }}
30
+ </p>
31
+ <dl class="cn-flow-step-outcomes__list" :aria-label="label || t('nextcloud-vue', 'Who this step reached')">
20
32
  <div v-for="row in rows"
21
33
  :key="row.key"
22
34
  class="cn-flow-step-outcomes__row"
@@ -56,6 +68,14 @@ const KNOWN_BUCKETS = [
56
68
  { key: 'refusedRecipients', tone: 'warning' },
57
69
  { key: 'unknownRecipients', tone: 'warning' },
58
70
  { key: 'failed', tone: 'error' },
71
+ // A sync step's own tally (`report.fetch`/`contract`/`write`/`sweep`):
72
+ // create/update/skip/invalid per item, then created/updated/swept counts.
73
+ { key: 'fetched', tone: 'neutral' },
74
+ { key: 'created', tone: 'success' },
75
+ { key: 'updated', tone: 'success' },
76
+ { key: 'skipped', tone: 'neutral' },
77
+ { key: 'invalid', tone: 'warning' },
78
+ { key: 'swept', tone: 'neutral' },
59
79
  ]
60
80
 
61
81
  /** Report keys that are facts about the send, not outcome buckets. */
@@ -66,9 +86,10 @@ export default {
66
86
 
67
87
  props: {
68
88
  /**
69
- * A step's messaging report: the run-log entry's `report.messaging`.
70
- * Each outcome bucket is `{count, sample}`; a `refusedRecipients`
71
- * sample entry is `{recipient, reason}`. `null` renders nothing.
89
+ * One named block of a step's run-log report, e.g. `report.messaging`
90
+ * or a sync step's `report.write`. Each outcome bucket is
91
+ * `{count, sample}`; a `refusedRecipients` sample entry is
92
+ * `{recipient, reason}`. `null` renders nothing.
72
93
  */
73
94
  report: {
74
95
  type: Object,
@@ -83,6 +104,31 @@ export default {
83
104
  type: Object,
84
105
  default: () => ({}),
85
106
  },
107
+
108
+ /**
109
+ * Drop a bucket whose count is zero. True for messaging (a long,
110
+ * mostly-zero outcome list is noise); false for a step whose buckets
111
+ * are the whole point of reading it, where zero is itself the answer.
112
+ */
113
+ hideZero: {
114
+ type: Boolean,
115
+ default: true,
116
+ },
117
+
118
+ /**
119
+ * What this list is a tally of, e.g. "Write" for a `report.write`
120
+ * block. Used as the visible caption above the list AND the list's
121
+ * accessible name, replacing the default "Who this step reached" —
122
+ * which is wrong for anything that is not a send, and leaves two
123
+ * adjacent blocks on one step (`fetch` + `write`) unlabelled and
124
+ * indistinguishable to a screen reader. `null` (the default, and what
125
+ * a messaging block passes) keeps the original behaviour: no caption,
126
+ * the send-specific accessible name.
127
+ */
128
+ label: {
129
+ type: String,
130
+ default: null,
131
+ },
86
132
  },
87
133
 
88
134
  computed: {
@@ -107,12 +153,12 @@ export default {
107
153
 
108
154
  return ordered
109
155
  .map(({ key, tone }) => ({ key, tone, bucket: report[key] }))
110
- .filter(({ bucket }) => bucket && typeof bucket === 'object' && Number(bucket.count) > 0)
156
+ .filter(({ bucket }) => bucket && typeof bucket === 'object' && (this.hideZero === false || Number(bucket.count) > 0))
111
157
  .map(({ key, tone, bucket }) => ({
112
158
  key,
113
159
  tone,
114
160
  label: this.labelFor(key),
115
- count: Number(bucket.count),
161
+ count: Number(bucket.count) || 0,
116
162
  sample: (Array.isArray(bucket.sample) ? bucket.sample : []).map((entry) => this.describeEntry(entry)),
117
163
  }))
118
164
  },
@@ -143,6 +189,12 @@ export default {
143
189
  refusedRecipients: t('nextcloud-vue', 'Refused by the step’s address rule'),
144
190
  unknownRecipients: t('nextcloud-vue', 'Not a known user or group'),
145
191
  failed: t('nextcloud-vue', 'Failed'),
192
+ fetched: t('nextcloud-vue', 'Fetched'),
193
+ created: t('nextcloud-vue', 'Created'),
194
+ updated: t('nextcloud-vue', 'Updated'),
195
+ skipped: t('nextcloud-vue', 'Skipped'),
196
+ invalid: t('nextcloud-vue', 'Invalid'),
197
+ swept: t('nextcloud-vue', 'Swept'),
146
198
  }
147
199
  if (builtIn[key]) {
148
200
  return builtIn[key]
@@ -195,6 +247,14 @@ export default {
195
247
  font-size: 0.9em;
196
248
  }
197
249
 
250
+ .cn-flow-step-outcomes__title {
251
+ margin: 4px 0 0;
252
+ font-weight: bold;
253
+ text-transform: uppercase;
254
+ font-size: 0.85em;
255
+ color: var(--color-text-maxcontrast);
256
+ }
257
+
198
258
  .cn-flow-step-outcomes__list {
199
259
  margin: 0;
200
260
  padding: 0;