@conduction/nextcloud-vue 2.160.0 → 2.161.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 (29) hide show
  1. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue.js +1 -1
  2. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js +20 -2
  3. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js.map +1 -1
  4. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue3.js.map +1 -1
  5. package/dist/esm/components/CnStatWidget/CnStatWidget.vue.js +1 -1
  6. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +10 -1
  7. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
  8. package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
  9. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
  10. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js +3 -2
  11. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
  12. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
  13. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue.js +1 -1
  14. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue2.js +2 -2
  15. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue2.js.map +1 -1
  16. package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue3.js.map +1 -1
  17. package/dist/esm/library-style.js +1 -1
  18. package/dist/esm/nextcloud-vue.css +81 -81
  19. package/dist/esm/utils/auditEntries.js +25 -1
  20. package/dist/esm/utils/auditEntries.js.map +1 -1
  21. package/dist/nextcloud-vue.cjs.js +60 -8
  22. package/dist/nextcloud-vue.cjs.js.map +2 -2
  23. package/dist/nextcloud-vue.css +81 -81
  24. package/package.json +1 -1
  25. package/src/components/CnAuditTrailCard/CnAuditTrailCard.vue +20 -2
  26. package/src/components/CnStatWidget/CnStatWidget.vue +10 -1
  27. package/src/components/CnTabsWidget/CnTabsWidget.vue +3 -2
  28. package/src/components/CnTimelineWidget/CnTimelineWidget.vue +2 -2
  29. package/src/utils/auditEntries.js +24 -0
@@ -100793,6 +100793,30 @@ function keepAuditEntries(entries, { excludeActions = [], excludeActors = [] } =
100793
100793
  && !isEmptyUpdate(entry))
100794
100794
  }
100795
100795
 
100796
+ /**
100797
+ * The trail query parameters that leave the excluded actions and actors out
100798
+ * on the server (`action[notIn]`, `user[notIn]`), so a page read from the
100799
+ * trail holds what a history shows. `keepAuditEntries` still filters what
100800
+ * comes back. Empty when nothing is left out.
100801
+ *
100802
+ * @param {{excludeActions?: Array<string>, excludeActors?: Array<string>}} [options] What to leave out.
100803
+ * @return {Object<string, string>} The parameters.
100804
+ * @spec openspec/changes/audit-card-exclusions-in-the-query/specs/audit-trail/spec.md#requirement-a-timeline-and-a-tab-count-ask-the-trail-to-leave-out-what-they-hide
100805
+ */
100806
+ function auditExclusionParams({ excludeActions = [], excludeActors = [] } = {}) {
100807
+ const list = (values) => (Array.isArray(values) ? values : []).map(String).filter(Boolean);
100808
+ const params = {};
100809
+ const actions = list(excludeActions);
100810
+ const actors = list(excludeActors);
100811
+ if (actions.length > 0) {
100812
+ params['action[notIn]'] = actions.join(',');
100813
+ }
100814
+ if (actors.length > 0) {
100815
+ params['user[notIn]'] = actors.join(',');
100816
+ }
100817
+ return params
100818
+ }
100819
+
100796
100820
  /**
100797
100821
  * SPDX-FileCopyrightText: 2026 Conduction B.V.
100798
100822
  * SPDX-License-Identifier: EUPL-1.2
@@ -101208,6 +101232,7 @@ var script$7M = {
101208
101232
  if (!this.register || !this.schema || !this.objectId) {
101209
101233
  return ''
101210
101234
  }
101235
+ this.addExclusions(params);
101211
101236
  return `${this.apiBase}/objects/${this.register}/${this.schema}/${this.objectId}/audit-trails?${params.toString()}`
101212
101237
  },
101213
101238
  },
@@ -101224,6 +101249,21 @@ var script$7M = {
101224
101249
  },
101225
101250
 
101226
101251
  methods: {
101252
+ /**
101253
+ * Ask an object trail to leave out the excluded actions and actors in
101254
+ * the query (`action[notIn]`, `user[notIn]`), so its pages hold what the
101255
+ * card shows. `keepAuditEntries` still filters what comes back.
101256
+ *
101257
+ * @param {URLSearchParams} params The trail query, changed in place.
101258
+ * @return {void}
101259
+ * @spec openspec/changes/audit-card-exclusions-in-the-query/specs/audit-trail/spec.md#requirement-a-history-card-asks-the-trail-to-leave-out-what-it-hides
101260
+ */
101261
+ addExclusions(params) {
101262
+ for (const [key, value] of Object.entries(auditExclusionParams({ excludeActions: this.excludeActions, excludeActors: this.excludeActors }))) {
101263
+ params.set(key, value);
101264
+ }
101265
+ },
101266
+
101227
101267
  /**
101228
101268
  * Read the entries from `fetchUrl`. The readable feed answers
101229
101269
  * `{ rows, nextCursor }`, the object trail `{ results }`.
@@ -101331,7 +101371,9 @@ var script$7M = {
101331
101371
  }
101332
101372
  const objects = await read(`${this.apiBase}/objects/${source.register}/${source.schema}?${params.toString()}`);
101333
101373
  const ids = objects.map((object) => object?.id || object?.['@self']?.id || object?.uuid).filter(Boolean);
101334
- const trails = await Promise.all(ids.map((id) => read(`${this.apiBase}/objects/${source.register}/${source.schema}/${id}/audit-trails?limit=${limit}`).catch(() => [])));
101374
+ const trailParams = new URLSearchParams({ limit: String(limit) });
101375
+ this.addExclusions(trailParams);
101376
+ const trails = await Promise.all(ids.map((id) => read(`${this.apiBase}/objects/${source.register}/${source.schema}/${id}/audit-trails?${trailParams.toString()}`).catch(() => [])));
101335
101377
  return trails.flat().map((entry) => ({ ...entry, relatedAs: source.as || source.schema }))
101336
101378
  } catch {
101337
101379
  return []
@@ -101601,7 +101643,7 @@ function render$7L(_ctx, _cache, $props, $setup, $data, $options) {
101601
101643
  }
101602
101644
 
101603
101645
  script$7M.render = render$7L;
101604
- script$7M.__scopeId = "data-v-c8572210";
101646
+ script$7M.__scopeId = "data-v-3b6d70f7";
101605
101647
  const __sfc_main$7G = script$7M;
101606
101648
 
101607
101649
  // SPDX-FileCopyrightText: 2026 Conduction B.V.
@@ -179858,12 +179900,17 @@ var script$5$ = {
179858
179900
  * placeholder in the source string and can move it within the sentence —
179859
179901
  * the same contract as Nextcloud's own `t()` parameters.
179860
179902
  *
179903
+ * `@object.<field>`, `@objectId`, `@workspace.<key>` and `@config.<key>`
179904
+ * read the page's contexts as a source's tokens do, so a register-counted
179905
+ * tile can name its record's own figure ("of @object.capacity places").
179906
+ *
179861
179907
  * A token with no matching field resolves to the empty string rather
179862
179908
  * than being left as `{levelName}` on screen: a caption is decoration,
179863
179909
  * and showing a reader a raw token is worse than showing them less.
179864
179910
  *
179865
179911
  * @return {string}
179866
179912
  * @spec openspec/changes/stat-caption-formats/specs/stat-widget/spec.md#requirement-a-stat-caption-token-can-carry-a-format
179913
+ * @spec openspec/changes/stat-caption-object-token/specs/stat-caption-object-token/spec.md#requirement-a-stat-caption-can-name-a-field-of-the-pages-record
179867
179914
  */
179868
179915
  resolvedCaption() {
179869
179916
  const override = this.activeOverride;
@@ -179882,7 +179929,11 @@ var script$5$ = {
179882
179929
  const zero = count !== null && this.content.captionSource.zeroText;
179883
179930
  return typeof zero === 'string' && zero !== '' ? this.effectiveTranslate(zero) : ''
179884
179931
  }
179885
- const translated = this.effectiveTranslate(caption);
179932
+ // `@object.<field>` names a field of the page's record (PqEvenement
179933
+ // "van @object.capacity plaatsen" on a register-counted tile).
179934
+ const translated = caption.indexOf('@') === -1
179935
+ ? this.effectiveTranslate(caption)
179936
+ : this.interpolateTokens(this.effectiveTranslate(caption)).replace(/\s{2,}/g, ' ').trim();
179886
179937
  if (translated.indexOf('{') === -1) {
179887
179938
  return translated
179888
179939
  }
@@ -181614,7 +181665,7 @@ function render$5_(_ctx, _cache, $props, $setup, $data, $options) {
181614
181665
  }
181615
181666
 
181616
181667
  script$5$.render = render$5_;
181617
- script$5$.__scopeId = "data-v-08db5586";
181668
+ script$5$.__scopeId = "data-v-4c29c40f";
181618
181669
  const __sfc_main$5V = script$5$;
181619
181670
 
181620
181671
  /**
@@ -197366,7 +197417,7 @@ var script$5A = {
197366
197417
  });
197367
197418
 
197368
197419
  if (this.content.auditTrail === true) {
197369
- jobs.push(axios.get(generateUrl(`${base}/audit-trails`), { params: { limit: this.content.auditLimit || 50 } })
197420
+ jobs.push(axios.get(generateUrl(`${base}/audit-trails`), { params: { limit: this.content.auditLimit || 50, ...auditExclusionParams(this.content) } })
197370
197421
  .then((r) => {
197371
197422
  const data = r && r.data;
197372
197423
  this.auditEntries = (data && (data.results || data)) || [];
@@ -197671,7 +197722,7 @@ function render$5z(_ctx, _cache, $props, $setup, $data, $options) {
197671
197722
  }
197672
197723
 
197673
197724
  script$5A.render = render$5z;
197674
- script$5A.__scopeId = "data-v-afb256e8";
197725
+ script$5A.__scopeId = "data-v-b5aa88b8";
197675
197726
  const __sfc_main$5u = script$5A;
197676
197727
 
197677
197728
  const ACCENT_VARIANTS = ['success', 'warning', 'error', 'info', 'primary'];
@@ -209134,7 +209185,8 @@ var script$5k = {
209134
209185
  return null
209135
209186
  }
209136
209187
  try {
209137
- const response = await fetch(prefixUrl(`/apps/openregister/api/objects/${register}/${schema}/${this.objectId}/audit-trails?limit=100`), { headers: buildHeaders() });
209188
+ const query = new URLSearchParams({ limit: '100', ...auditExclusionParams(source) });
209189
+ const response = await fetch(prefixUrl(`/apps/openregister/api/objects/${register}/${schema}/${this.objectId}/audit-trails?${query.toString()}`), { headers: buildHeaders() });
209138
209190
  if (!response.ok) {
209139
209191
  return null
209140
209192
  }
@@ -209579,7 +209631,7 @@ function render$5j(_ctx, _cache, $props, $setup, $data, $options) {
209579
209631
  }
209580
209632
 
209581
209633
  script$5k.render = render$5j;
209582
- script$5k.__scopeId = "data-v-2d3fcf85";
209634
+ script$5k.__scopeId = "data-v-67dcb812";
209583
209635
  const __sfc_main$5e = script$5k;
209584
209636
 
209585
209637
  /**
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/nextcloud-vue.cjs.js.map
3
- size: 51500760 bytes
4
- sha256: 6feff2284dc6b61fbebf84af5d1eb6072988d00f691716478bd0f204adc4265b
3
+ size: 51506972 bytes
4
+ sha256: ce0553a95534a50e724696c28e34bccb3b059a33349311446f880ef4dcf00603