@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.
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue.js +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js +20 -2
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js.map +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue3.js.map +1 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue.js +1 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +10 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js +3 -2
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue.js +1 -1
- package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue2.js +2 -2
- package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTimelineWidget/CnTimelineWidget.vue3.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +81 -81
- package/dist/esm/utils/auditEntries.js +25 -1
- package/dist/esm/utils/auditEntries.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +60 -8
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +81 -81
- package/package.json +1 -1
- package/src/components/CnAuditTrailCard/CnAuditTrailCard.vue +20 -2
- package/src/components/CnStatWidget/CnStatWidget.vue +10 -1
- package/src/components/CnTabsWidget/CnTabsWidget.vue +3 -2
- package/src/components/CnTimelineWidget/CnTimelineWidget.vue +2 -2
- package/src/utils/auditEntries.js +24 -0
|
@@ -43,3 +43,27 @@ export function keepAuditEntries(entries, { excludeActions = [], excludeActors =
|
|
|
43
43
|
&& !actors.includes(String(entry.user || '').toLowerCase())
|
|
44
44
|
&& !isEmptyUpdate(entry))
|
|
45
45
|
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The trail query parameters that leave the excluded actions and actors out
|
|
49
|
+
* on the server (`action[notIn]`, `user[notIn]`), so a page read from the
|
|
50
|
+
* trail holds what a history shows. `keepAuditEntries` still filters what
|
|
51
|
+
* comes back. Empty when nothing is left out.
|
|
52
|
+
*
|
|
53
|
+
* @param {{excludeActions?: Array<string>, excludeActors?: Array<string>}} [options] What to leave out.
|
|
54
|
+
* @return {Object<string, string>} The parameters.
|
|
55
|
+
* @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
|
|
56
|
+
*/
|
|
57
|
+
export function auditExclusionParams({ excludeActions = [], excludeActors = [] } = {}) {
|
|
58
|
+
const list = (values) => (Array.isArray(values) ? values : []).map(String).filter(Boolean)
|
|
59
|
+
const params = {}
|
|
60
|
+
const actions = list(excludeActions)
|
|
61
|
+
const actors = list(excludeActors)
|
|
62
|
+
if (actions.length > 0) {
|
|
63
|
+
params['action[notIn]'] = actions.join(',')
|
|
64
|
+
}
|
|
65
|
+
if (actors.length > 0) {
|
|
66
|
+
params['user[notIn]'] = actors.join(',')
|
|
67
|
+
}
|
|
68
|
+
return params
|
|
69
|
+
}
|