@conduction/nextcloud-vue 2.148.0 → 2.150.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 (111) hide show
  1. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue.js +1 -1
  2. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js +24 -7
  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/CnAuditTrailWidget/CnAuditTrailWidget.vue.js +1 -1
  6. package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue2.js +12 -1
  7. package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue2.js.map +1 -1
  8. package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue3.js +2 -1
  9. package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue3.js.map +1 -1
  10. package/dist/esm/components/CnChartWidget/CnChartWidget.vue.js +1 -1
  11. package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js +12 -0
  12. package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js.map +1 -1
  13. package/dist/esm/components/CnChartWidget/CnChartWidget.vue3.js.map +1 -1
  14. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue.js +1 -1
  15. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js +23 -1
  16. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js.map +1 -1
  17. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js +1 -1
  18. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js.map +1 -1
  19. package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +34 -1
  20. package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
  21. package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
  22. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue.js +1 -1
  23. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue2.js.map +1 -1
  24. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue3.js.map +1 -1
  25. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue.js +1 -1
  26. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue2.js.map +1 -1
  27. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue3.js.map +1 -1
  28. package/dist/esm/components/CnDuplicateWarning/CnDuplicateWarning.vue.js +1 -1
  29. package/dist/esm/components/CnDuplicateWarning/CnDuplicateWarning.vue2.js +64 -8
  30. package/dist/esm/components/CnDuplicateWarning/CnDuplicateWarning.vue2.js.map +1 -1
  31. package/dist/esm/components/CnDuplicateWarning/CnDuplicateWarning.vue3.js +14 -4
  32. package/dist/esm/components/CnDuplicateWarning/CnDuplicateWarning.vue3.js.map +1 -1
  33. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
  34. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +26 -3
  35. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
  36. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js +10 -2
  37. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
  38. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue.js +1 -1
  39. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js +84 -1
  40. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js.map +1 -1
  41. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js +61 -33
  42. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js.map +1 -1
  43. package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue.js +1 -1
  44. package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue2.js +49 -2
  45. package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue2.js.map +1 -1
  46. package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue3.js +90 -59
  47. package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue3.js.map +1 -1
  48. package/dist/esm/components/CnFollowingWidgetHost/CnFollowingWidgetHost.vue2.js +3 -1
  49. package/dist/esm/components/CnFollowingWidgetHost/CnFollowingWidgetHost.vue2.js.map +1 -1
  50. package/dist/esm/components/CnFollowingWidgetHost/CnFollowingWidgetHost.vue3.js.map +1 -1
  51. package/dist/esm/components/CnNotesCard/CnNotesCard.vue.js +1 -1
  52. package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js +10 -0
  53. package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js.map +1 -1
  54. package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js.map +1 -1
  55. package/dist/esm/components/CnObjectCard/CnObjectCard.vue.js +1 -1
  56. package/dist/esm/components/CnObjectCard/CnObjectCard.vue2.js +11 -0
  57. package/dist/esm/components/CnObjectCard/CnObjectCard.vue2.js.map +1 -1
  58. package/dist/esm/components/CnObjectCard/CnObjectCard.vue3.js +28 -21
  59. package/dist/esm/components/CnObjectCard/CnObjectCard.vue3.js.map +1 -1
  60. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue.js +1 -1
  61. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js +1 -1
  62. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
  63. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
  64. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  65. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +3 -15
  66. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  67. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +123 -115
  68. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  69. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue.js +1 -1
  70. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue2.js +4 -0
  71. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue2.js.map +1 -1
  72. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue3.js.map +1 -1
  73. package/dist/esm/l10n/en.json.js +2 -1
  74. package/dist/esm/l10n/en.json.js.map +1 -1
  75. package/dist/esm/l10n/nl.json.js +2 -1
  76. package/dist/esm/l10n/nl.json.js.map +1 -1
  77. package/dist/esm/library-style.js +1 -1
  78. package/dist/esm/nextcloud-vue.css +761 -520
  79. package/dist/esm/utils/fillTemplate.js +19 -2
  80. package/dist/esm/utils/fillTemplate.js.map +1 -1
  81. package/dist/nextcloud-vue.cjs.js +1368 -945
  82. package/dist/nextcloud-vue.cjs.js.map +2 -2
  83. package/dist/nextcloud-vue.css +761 -520
  84. package/l10n/en.json +2 -1
  85. package/l10n/nl.json +2 -1
  86. package/package.json +1 -1
  87. package/src/components/CnAuditTrailCard/CnAuditTrailCard.vue +24 -7
  88. package/src/components/CnAuditTrailWidget/CnAuditTrailWidget.vue +13 -1
  89. package/src/components/CnChartWidget/CnChartWidget.md +1 -1
  90. package/src/components/CnChartWidget/CnChartWidget.vue +12 -0
  91. package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +29 -2
  92. package/src/components/CnDataTable/CnDataTable.vue +34 -1
  93. package/src/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue +6 -1
  94. package/src/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue +1 -0
  95. package/src/components/CnDuplicateWarning/CnDuplicateWarning.vue +74 -10
  96. package/src/components/CnFactsWidget/CnFactsWidget.vue +35 -3
  97. package/src/components/CnFieldListWidget/CnFieldListWidget.vue +131 -3
  98. package/src/components/CnFlowRunsWidget/CnFlowRunsWidget.vue +103 -5
  99. package/src/components/CnFollowingWidgetHost/CnFollowingWidgetHost.vue +3 -1
  100. package/src/components/CnNotesCard/CnNotesCard.vue +10 -0
  101. package/src/components/CnObjectCard/CnObjectCard.vue +16 -0
  102. package/src/components/CnObjectListWidget/CnObjectListWidget.vue +1 -1
  103. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +19 -19
  104. package/src/components/CnRegisterMapping/CnRegisterMapping.vue +4 -0
  105. package/src/css/board.css +2 -0
  106. package/src/css/dialog.css +17 -0
  107. package/src/css/look-board-detail.css +52 -3
  108. package/src/css/look-board-index.css +42 -2
  109. package/src/css/look-board.css +45 -5
  110. package/src/css/table.css +5 -2
  111. package/src/utils/fillTemplate.js +19 -2
@@ -1 +1 @@
1
- {"version":3,"file":"CnAuditTrailWidget.vue3.js","sources":["../../../../src/components/CnAuditTrailWidget/CnAuditTrailWidget.vue?vue&type=template&id=87ba40b4&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div\n\t\tv-if=\"resolvedScope === 'app' || resolvedSource || resolvedEndpoint || (resolvedRegister && resolvedSchema && resolvedObjectId)\"\n\t\tclass=\"cn-audit-trail-widget\">\n\t\t<CnAuditTrailCard\n\t\t\t:source=\"resolvedSource\"\n\t\t\t:endpoint=\"resolvedEndpoint\"\n\t\t\t:register=\"resolvedRegister\"\n\t\t\t:schema=\"resolvedSchema\"\n\t\t\t:objectId=\"resolvedObjectId\"\n\t\t\t:scope=\"resolvedScope\"\n\t\t\t:title=\"resolvedTitle\"\n\t\t\t:maxDisplay=\"resolvedMaxDisplay\"\n\t\t\t:layout=\"content && typeof content.layout === 'string' ? content.layout : ''\"\n\t\t\t:excludeActions=\"resolvedExcludeActions\"\n\t\t\t:actionLabels=\"actionLabels\"\n\t\t\t:valueLabels=\"valueLabels\"\n\t\t\t:changeLabels=\"changeLabels\"\n\t\t\t:object=\"ctx.object || ctx.objectData || null\"\n\t\t\t:relatedSources=\"relatedSources\"\n\t\t\t:footnote=\"footnote\"\n\t\t\tv-bind=\"emptyText ? { noEntriesLabel: emptyText } : {}\" />\n\t</div>\n</template>\n\n<script>\nimport CnAuditTrailCard from '../CnAuditTrailCard/CnAuditTrailCard.vue'\nimport { fillTemplate } from '../../utils/fillTemplate.js'\n\n/**\n * CnAuditTrailWidget — thin built-in widget wrapping CnAuditTrailCard with\n * unified object-context resolution (`audit-trail` widget key, Wave 1 of\n * nextcloud-vue#91).\n *\n * CnAuditTrailCard needs explicit `register` / `schema` / `objectId` props,\n * but the detail render paths surface the current object differently:\n * CnDetailPage's config grid provides a `cnObjectContext` inject, while\n * CnPageRenderer's slot CnWidgetGrid spreads the detail object context as\n * props, and CnDashboardPage's registry branch hands a stored `content`\n * blob. This widget reads whichever is present — explicit props win, then\n * the injects, then `content` — so the single `audit-trail` key works on\n * every surface. It replaces the three identical per-app adapters\n * (procest / zaakafhandelapp / scholiq).\n *\n * Registered in BOTH the v2 grid's BUILT_IN_WIDGETS and (detail-page\n * surface, like the `data` widget) the shared dashboardWidgetRegistry —\n * see `dashboardRegistration.js`.\n */\nexport default {\n\tname: 'CnAuditTrailWidget',\n\n\tcomponents: { CnAuditTrailCard },\n\n\tinject: {\n\t\t/** The host app's translate function, for `content.emptyText`. */\n\t\tcnTranslate: { default: () => (key) => key },\n\t\t/**\n\t\t * Detail-page object context (`{ objectId, object, register, schema }`)\n\t\t * provided by CnDetailPage (raw object or `{ value }` holder).\n\t\t */\n\t\tcnObjectContext: { default: null },\n\t\t/**\n\t\t * Detail object context holder (`{ value: { objectData, schema,\n\t\t * objectType, objectId, register, store } | null }`) provided by\n\t\t * CnPageRenderer for the v2 slot grid.\n\t\t */\n\t\tcnDetailObjectContext: { default: null },\n\t},\n\n\tprops: {\n\t\t/** OpenRegister register slug/id — object context spread as props by CnWidgetGrid (slot path). */\n\t\tregister: { type: String, default: '' },\n\t\t/**\n\t\t * OpenRegister schema — a slug string, or the schema OBJECT the\n\t\t * detail-context merge supplies (its slug/name/id is used).\n\t\t *\n\t\t * @type {string|object}\n\t\t */\n\t\tschema: { type: [String, Object], default: '' },\n\t\t/** The audited object's id — object context spread as props by CnWidgetGrid (slot path). */\n\t\tobjectId: { type: String, default: '' },\n\t\t/** Optional card title override (defaults to the card's translated label). */\n\t\ttitle: { type: String, default: '' },\n\t\t/** Maximum audit rows to render (0 falls back to the card default). */\n\t\tmaxDisplay: { type: Number, default: 0 },\n\t\t/**\n\t\t * `app` lists the app-wide feed (every object the caller may read,\n\t\t * narrowed to `register` / `schema` when set) and needs no object;\n\t\t * `object` (the default) is one object's trail. Also read from\n\t\t * `content.scope`.\n\t\t *\n\t\t * @spec openspec/changes/zuiddrecht-pixel-gaps/specs/zuiddrecht-pixel-gaps/spec.md#requirement-the-audit-trail-widget-reads-the-app-wide-feed\n\t\t */\n\t\tscope: { type: String, default: '' },\n\t\t/** Read the trail of something that is not an object (`{ kind: 'flow-task', id? }`); also read from `content.source`. */\n\t\tsource: { type: Object, default: null },\n\t\t/** A trail URL of its own; also read from `content.endpoint`. */\n\t\tendpoint: { type: String, default: '' },\n\t\t/** Actions to leave out (`['read']`); also read from `content.excludeActions`. */\n\t\texcludeActions: { type: Array, default: () => [] },\n\t\t/** Stored widget content blob (CnDashboardPage registry branch): `{ title, maxDisplay, register?, schema?, objectId?, source?, endpoint?, emptyText?, excludeActions?, actionLabels?, footnote? }`. */\n\t\t/** Stored widget content blob (CnDashboardPage registry branch): `{ title, maxDisplay, register?, schema?, objectId?, source?, endpoint?, emptyText?, excludeActions?, actionLabels?, valueLabels? }`. */\n\t\t/** Stored widget content blob (CnDashboardPage registry branch): `{ title, maxDisplay, register?, schema?, objectId?, source?, endpoint?, emptyText?, excludeActions?, actionLabels?, valueLabels?, relatedSources? }`. */\n\t\tcontent: { type: Object, default: () => ({}) },\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The resolved object-context bag from either inject shape, or {}.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tctx() {\n\t\t\tconst inj = this.cnObjectContext && (this.cnObjectContext.value || this.cnObjectContext)\n\t\t\tconst holder = this.cnDetailObjectContext && this.cnDetailObjectContext.value\n\t\t\treturn inj || holder || {}\n\t\t},\n\n\t\t/**\n\t\t * The audited object's id: explicit prop → inject context → content.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedObjectId() {\n\t\t\treturn this.objectId || this.ctx.objectId || this.content.objectId || ''\n\t\t},\n\n\t\t/**\n\t\t * The register slug/id: explicit prop → inject context → content.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedRegister() {\n\t\t\treturn this.register || this.ctx.register || this.content.register || ''\n\t\t},\n\n\t\t/**\n\t\t * The schema SLUG: explicit prop → inject context → content; a\n\t\t * schema object collapses to its slug/name/id.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedSchema() {\n\t\t\tconst s = this.schema || this.ctx.schema || this.content.schema || ''\n\t\t\treturn typeof s === 'string' ? s : (s && (s.slug || s.name || s.id)) || ''\n\t\t},\n\n\t\t/**\n\t\t * The feed scope: explicit prop → content → `object`.\n\t\t *\n\t\t * @spec openspec/changes/zuiddrecht-pixel-gaps/specs/zuiddrecht-pixel-gaps/spec.md#requirement-the-audit-trail-widget-reads-the-app-wide-feed\n\t\t * @return {('object'|'app')}\n\t\t */\n\t\tresolvedScope() {\n\t\t\tconst s = this.scope || this.content.scope\n\t\t\treturn s === 'app' ? 'app' : 'object'\n\t\t},\n\n\t\t/**\n\t\t * The card title: explicit prop → content → '' (card default).\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\t/** @return {object|null} The non-object anchor, from the prop or the content. */\n\t\tresolvedSource() {\n\t\t\tconst source = this.source || this.content.source\n\t\t\treturn source && typeof source === 'object' ? source : null\n\t\t},\n\n\t\t/** @return {string} The trail URL of its own, from the prop or the content. */\n\t\tresolvedEndpoint() {\n\t\t\treturn this.endpoint || (typeof this.content.endpoint === 'string' ? this.content.endpoint : '')\n\t\t},\n\n\t\t/** @return {string} The empty line the content names, through the host's translate, or ''. */\n\t\t/**\n\t\t * `content.actionLabels`, each label through the app's translate.\n\t\t *\n\t\t * @return {Object<string, string>|null}\n\t\t * @spec openspec/changes/audit-trail-action-labels/specs/audit-trail/spec.md#requirement-a-trail-can-say-what-happened-in-words\n\t\t */\n\t\tactionLabels() {\n\t\t\tconst labels = this.content.actionLabels\n\t\t\tif (!labels || typeof labels !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (text) => text\n\t\t\treturn Object.fromEntries(Object.entries(labels)\n\t\t\t\t.filter(([, text]) => typeof text === 'string' && text !== '')\n\t\t\t\t.map(([key, text]) => [key, translate(text)]))\n\t\t},\n\n\t\t/**\n\t\t * `content.changeLabels`, each rule's label through the app's translate.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tchangeLabels() {\n\t\t\tconst rules = this.content.changeLabels\n\t\t\tif (!Array.isArray(rules)) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (text) => text\n\t\t\treturn rules\n\t\t\t\t.filter((rule) => rule && typeof rule.label === 'string' && rule.label !== '')\n\t\t\t\t.map((rule) => ({ ...rule, label: translate(rule.label) }))\n\t\t},\n\n\t\t/**\n\t\t * `content.footnote`, a muted line under the trail with the record's\n\t\t * fields filled in (\"Reference {identifier}\"); '' when a field is empty.\n\t\t *\n\t\t * @return {string}\n\t\t * @spec openspec/changes/audit-trail-footnote/specs/audit-trail/spec.md#requirement-a-history-card-can-end-in-a-line-about-the-record\n\t\t */\n\t\tfootnote() {\n\t\t\tconst note = this.content.footnote\n\t\t\tif (typeof note !== 'string' || note === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (text) => text\n\t\t\treturn fillTemplate(translate(note), this.ctx.object || this.ctx.objectData || null)\n\t\t},\n\n\t\t/**\n\t\t * `content.valueLabels`, each word through the app's translate.\n\t\t *\n\t\t * @return {{[key: string]: {[value: string]: string}}|null}\n\t\t * @spec openspec/changes/audit-label-changed-values/specs/audit-trail/spec.md#requirement-a-trail-label-can-quote-what-the-entry-recorded\n\t\t */\n\t\tvalueLabels() {\n\t\t\tconst labels = this.content.valueLabels\n\t\t\tif (!labels || typeof labels !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (text) => text\n\t\t\treturn Object.fromEntries(Object.entries(labels)\n\t\t\t\t.filter(([, words]) => words && typeof words === 'object')\n\t\t\t\t.map(([key, words]) => [key, Object.fromEntries(Object.entries(words)\n\t\t\t\t\t.filter(([, text]) => typeof text === 'string' && text !== '')\n\t\t\t\t\t.map(([value, text]) => [value, translate(text)]))]))\n\t\t},\n\n\t\t/**\n\t\t * `content.relatedSources`: records beside the object whose events\n\t\t * join its history (see CnAuditTrailCard).\n\t\t *\n\t\t * @return {Array<object>}\n\t\t * @spec openspec/changes/audit-trail-related-sources/specs/audit-trail/spec.md#requirement-an-objects-history-can-include-the-events-of-records-beside-it\n\t\t */\n\t\trelatedSources() {\n\t\t\treturn Array.isArray(this.content.relatedSources) ? this.content.relatedSources : []\n\t\t},\n\n\t\temptyText() {\n\t\t\tconst text = this.content.emptyText\n\t\t\tif (typeof text !== 'string' || text === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn typeof this.cnTranslate === 'function' ? this.cnTranslate(text) : text\n\t\t},\n\n\t\t/**\n\t\t * The actions to leave out: explicit prop → content → none.\n\t\t *\n\t\t * @spec openspec/changes/audit-trail-exclude-actions/specs/audit-trail/spec.md#requirement-a-history-card-can-leave-out-events-by-action\n\t\t * @return {Array<string>}\n\t\t */\n\t\tresolvedExcludeActions() {\n\t\t\tif (this.excludeActions.length > 0) {\n\t\t\t\treturn this.excludeActions\n\t\t\t}\n\t\t\tconst fromContent = this.content.excludeActions\n\t\t\treturn Array.isArray(fromContent) ? fromContent.filter((action) => typeof action === 'string' && action !== '') : []\n\t\t},\n\n\t\tresolvedTitle() {\n\t\t\treturn this.title || this.content.title || ''\n\t\t},\n\n\t\t/**\n\t\t * The row cap: explicit prop → content → the card's own default (5).\n\t\t *\n\t\t * @return {number}\n\t\t */\n\t\tresolvedMaxDisplay() {\n\t\t\tif (this.maxDisplay > 0) {\n\t\t\t\treturn this.maxDisplay\n\t\t\t}\n\t\t\tconst fromContent = Number(this.content.maxDisplay)\n\t\t\treturn Number.isFinite(fromContent) && fromContent > 0 ? fromContent : 5\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* The card keeps its own box, footnote included. */\n.cn-audit-trail-widget {\n\tdisplay: contents;\n}\n</style>\n"],"names":[],"mappings":";;;;OAaO,EAAC,uBAAkB;;;;;;UADlB,QAAa,CAAA,aAAA,KAAA,KAAA,IAAS,uBAAA,IAAA,QAAA,CAAA,gBAAA,KAAA,QAAA,CAAA,gBAAA,IAAA,QAAA,CAAA,cAAA,IAAA,QAAA,CAAA,gBAAA,CAAA;;;AAG1B,UAAA,MAAM,EAAE,QAAY,CAAA,cAAA;AACpB,UAAA,QAAQ,EAAE,QAAU,CAAA,gBAAA;AACpB,UAAA,QAAQ,EAAE,QAAgB,CAAA,gBAAA;AAC1B,UAAA,MAAM,EAAE,QAAc,CAAA,cAAA;AACtB,UAAA,QAAQ,EAAE,QAAgB,CAAA,gBAAA;AAC1B,UAAA,KAAK,EAAE,QAAa,CAAA,aAAA;AACpB,UAAA,KAAK,EAAE,QAAa,CAAA,aAAA;AACpB,UAAA,UAAU,EAAE,QAAc,CAAA,kBAAA;UAC1B,MAAM,EAAE,cAAO,IAAW,OAAA,MAAA,CAAA,OAAO,CAAC,MAAM,KAAA,QAAA,GAAI,MAAA,CAAA,OAAA,CAAA,MAAA,GAAA,EAAA;AAC5C,UAAA,cAAc,EAAE,QAAc,CAAA,sBAAA;AAC9B,UAAA,YAAY,EAAE,QAAI,CAAA,YAAA;AAClB,UAAA,WAAW,EAAE,QAAW,CAAA,WAAA;AACxB,UAAA,YAAE,EAAA,QAAA,CAAA,YAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnAuditTrailWidget.vue3.js","sources":["../../../../src/components/CnAuditTrailWidget/CnAuditTrailWidget.vue?vue&type=template&id=99c9557e&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div\n\t\tv-if=\"resolvedScope === 'app' || resolvedSource || resolvedEndpoint || (resolvedRegister && resolvedSchema && resolvedObjectId)\"\n\t\tclass=\"cn-audit-trail-widget\">\n\t\t<CnAuditTrailCard\n\t\t\t:source=\"resolvedSource\"\n\t\t\t:endpoint=\"resolvedEndpoint\"\n\t\t\t:register=\"resolvedRegister\"\n\t\t\t:schema=\"resolvedSchema\"\n\t\t\t:objectId=\"resolvedObjectId\"\n\t\t\t:scope=\"resolvedScope\"\n\t\t\t:title=\"resolvedTitle\"\n\t\t\t:maxDisplay=\"resolvedMaxDisplay\"\n\t\t\t:layout=\"content && typeof content.layout === 'string' ? content.layout : ''\"\n\t\t\t:excludeActions=\"resolvedExcludeActions\"\n\t\t\t:excludeActors=\"resolvedExcludeActors\"\n\t\t\t:actionLabels=\"actionLabels\"\n\t\t\t:valueLabels=\"valueLabels\"\n\t\t\t:changeLabels=\"changeLabels\"\n\t\t\t:object=\"ctx.object || ctx.objectData || null\"\n\t\t\t:relatedSources=\"relatedSources\"\n\t\t\t:footnote=\"footnote\"\n\t\t\tv-bind=\"emptyText ? { noEntriesLabel: emptyText } : {}\" />\n\t</div>\n</template>\n\n<script>\nimport CnAuditTrailCard from '../CnAuditTrailCard/CnAuditTrailCard.vue'\nimport { fillTemplate } from '../../utils/fillTemplate.js'\n\n/**\n * CnAuditTrailWidget — thin built-in widget wrapping CnAuditTrailCard with\n * unified object-context resolution (`audit-trail` widget key, Wave 1 of\n * nextcloud-vue#91).\n *\n * CnAuditTrailCard needs explicit `register` / `schema` / `objectId` props,\n * but the detail render paths surface the current object differently:\n * CnDetailPage's config grid provides a `cnObjectContext` inject, while\n * CnPageRenderer's slot CnWidgetGrid spreads the detail object context as\n * props, and CnDashboardPage's registry branch hands a stored `content`\n * blob. This widget reads whichever is present — explicit props win, then\n * the injects, then `content` — so the single `audit-trail` key works on\n * every surface. It replaces the three identical per-app adapters\n * (procest / zaakafhandelapp / scholiq).\n *\n * Registered in BOTH the v2 grid's BUILT_IN_WIDGETS and (detail-page\n * surface, like the `data` widget) the shared dashboardWidgetRegistry —\n * see `dashboardRegistration.js`.\n */\nexport default {\n\tname: 'CnAuditTrailWidget',\n\n\tcomponents: { CnAuditTrailCard },\n\n\tinject: {\n\t\t/** The host app's translate function, for `content.emptyText`. */\n\t\tcnTranslate: { default: () => (key) => key },\n\t\t/**\n\t\t * Detail-page object context (`{ objectId, object, register, schema }`)\n\t\t * provided by CnDetailPage (raw object or `{ value }` holder).\n\t\t */\n\t\tcnObjectContext: { default: null },\n\t\t/**\n\t\t * Detail object context holder (`{ value: { objectData, schema,\n\t\t * objectType, objectId, register, store } | null }`) provided by\n\t\t * CnPageRenderer for the v2 slot grid.\n\t\t */\n\t\tcnDetailObjectContext: { default: null },\n\t},\n\n\tprops: {\n\t\t/** OpenRegister register slug/id — object context spread as props by CnWidgetGrid (slot path). */\n\t\tregister: { type: String, default: '' },\n\t\t/**\n\t\t * OpenRegister schema — a slug string, or the schema OBJECT the\n\t\t * detail-context merge supplies (its slug/name/id is used).\n\t\t *\n\t\t * @type {string|object}\n\t\t */\n\t\tschema: { type: [String, Object], default: '' },\n\t\t/** The audited object's id — object context spread as props by CnWidgetGrid (slot path). */\n\t\tobjectId: { type: String, default: '' },\n\t\t/** Optional card title override (defaults to the card's translated label). */\n\t\ttitle: { type: String, default: '' },\n\t\t/** Maximum audit rows to render (0 falls back to the card default). */\n\t\tmaxDisplay: { type: Number, default: 0 },\n\t\t/**\n\t\t * `app` lists the app-wide feed (every object the caller may read,\n\t\t * narrowed to `register` / `schema` when set) and needs no object;\n\t\t * `object` (the default) is one object's trail. Also read from\n\t\t * `content.scope`.\n\t\t *\n\t\t * @spec openspec/changes/zuiddrecht-pixel-gaps/specs/zuiddrecht-pixel-gaps/spec.md#requirement-the-audit-trail-widget-reads-the-app-wide-feed\n\t\t */\n\t\tscope: { type: String, default: '' },\n\t\t/** Read the trail of something that is not an object (`{ kind: 'flow-task', id? }`); also read from `content.source`. */\n\t\tsource: { type: Object, default: null },\n\t\t/** A trail URL of its own; also read from `content.endpoint`. */\n\t\tendpoint: { type: String, default: '' },\n\t\t/** Actions to leave out (`['read']`); also read from `content.excludeActions`. */\n\t\texcludeActions: { type: Array, default: () => [] },\n\t\t/** Stored widget content blob (CnDashboardPage registry branch): `{ title, maxDisplay, register?, schema?, objectId?, source?, endpoint?, emptyText?, excludeActions?, actionLabels?, footnote? }`. */\n\t\t/** Stored widget content blob (CnDashboardPage registry branch): `{ title, maxDisplay, register?, schema?, objectId?, source?, endpoint?, emptyText?, excludeActions?, actionLabels?, valueLabels? }`. */\n\t\t/** Stored widget content blob (CnDashboardPage registry branch): `{ title, maxDisplay, register?, schema?, objectId?, source?, endpoint?, emptyText?, excludeActions?, actionLabels?, valueLabels?, relatedSources?, excludeActors? }`. */\n\t\tcontent: { type: Object, default: () => ({}) },\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The resolved object-context bag from either inject shape, or {}.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tctx() {\n\t\t\tconst inj = this.cnObjectContext && (this.cnObjectContext.value || this.cnObjectContext)\n\t\t\tconst holder = this.cnDetailObjectContext && this.cnDetailObjectContext.value\n\t\t\treturn inj || holder || {}\n\t\t},\n\n\t\t/**\n\t\t * The audited object's id: explicit prop → inject context → content.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedObjectId() {\n\t\t\treturn this.objectId || this.ctx.objectId || this.content.objectId || ''\n\t\t},\n\n\t\t/**\n\t\t * The register slug/id: explicit prop → inject context → content.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedRegister() {\n\t\t\treturn this.register || this.ctx.register || this.content.register || ''\n\t\t},\n\n\t\t/**\n\t\t * The schema SLUG: explicit prop → inject context → content; a\n\t\t * schema object collapses to its slug/name/id.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedSchema() {\n\t\t\tconst s = this.schema || this.ctx.schema || this.content.schema || ''\n\t\t\treturn typeof s === 'string' ? s : (s && (s.slug || s.name || s.id)) || ''\n\t\t},\n\n\t\t/**\n\t\t * The feed scope: explicit prop → content → `object`.\n\t\t *\n\t\t * @spec openspec/changes/zuiddrecht-pixel-gaps/specs/zuiddrecht-pixel-gaps/spec.md#requirement-the-audit-trail-widget-reads-the-app-wide-feed\n\t\t * @return {('object'|'app')}\n\t\t */\n\t\tresolvedScope() {\n\t\t\tconst s = this.scope || this.content.scope\n\t\t\treturn s === 'app' ? 'app' : 'object'\n\t\t},\n\n\t\t/**\n\t\t * The card title: explicit prop → content → '' (card default).\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\t/** @return {object|null} The non-object anchor, from the prop or the content. */\n\t\tresolvedSource() {\n\t\t\tconst source = this.source || this.content.source\n\t\t\treturn source && typeof source === 'object' ? source : null\n\t\t},\n\n\t\t/** @return {string} The trail URL of its own, from the prop or the content. */\n\t\tresolvedEndpoint() {\n\t\t\treturn this.endpoint || (typeof this.content.endpoint === 'string' ? this.content.endpoint : '')\n\t\t},\n\n\t\t/** @return {string} The empty line the content names, through the host's translate, or ''. */\n\t\t/**\n\t\t * `content.actionLabels`, each label through the app's translate.\n\t\t *\n\t\t * @return {Object<string, string>|null}\n\t\t * @spec openspec/changes/audit-trail-action-labels/specs/audit-trail/spec.md#requirement-a-trail-can-say-what-happened-in-words\n\t\t */\n\t\tactionLabels() {\n\t\t\tconst labels = this.content.actionLabels\n\t\t\tif (!labels || typeof labels !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (text) => text\n\t\t\treturn Object.fromEntries(Object.entries(labels)\n\t\t\t\t.filter(([, text]) => typeof text === 'string' && text !== '')\n\t\t\t\t.map(([key, text]) => [key, translate(text)]))\n\t\t},\n\n\t\t/**\n\t\t * `content.changeLabels`, each rule's label through the app's translate.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tchangeLabels() {\n\t\t\tconst rules = this.content.changeLabels\n\t\t\tif (!Array.isArray(rules)) {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (text) => text\n\t\t\treturn rules\n\t\t\t\t.filter((rule) => rule && typeof rule.label === 'string' && rule.label !== '')\n\t\t\t\t.map((rule) => ({ ...rule, label: translate(rule.label) }))\n\t\t},\n\n\t\t/**\n\t\t * `content.footnote`, a muted line under the trail with the record's\n\t\t * fields filled in (\"Reference {identifier}\"); '' when a field is empty.\n\t\t *\n\t\t * @return {string}\n\t\t * @spec openspec/changes/audit-trail-footnote/specs/audit-trail/spec.md#requirement-a-history-card-can-end-in-a-line-about-the-record\n\t\t */\n\t\tfootnote() {\n\t\t\tconst note = this.content.footnote\n\t\t\tif (typeof note !== 'string' || note === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (text) => text\n\t\t\treturn fillTemplate(translate(note), this.ctx.object || this.ctx.objectData || null)\n\t\t},\n\n\t\t/**\n\t\t * `content.valueLabels`, each word through the app's translate.\n\t\t *\n\t\t * @return {{[key: string]: {[value: string]: string}}|null}\n\t\t * @spec openspec/changes/audit-label-changed-values/specs/audit-trail/spec.md#requirement-a-trail-label-can-quote-what-the-entry-recorded\n\t\t */\n\t\tvalueLabels() {\n\t\t\tconst labels = this.content.valueLabels\n\t\t\tif (!labels || typeof labels !== 'object') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst translate = typeof this.cnTranslate === 'function' ? this.cnTranslate : (text) => text\n\t\t\treturn Object.fromEntries(Object.entries(labels)\n\t\t\t\t.filter(([, words]) => words && typeof words === 'object')\n\t\t\t\t.map(([key, words]) => [key, Object.fromEntries(Object.entries(words)\n\t\t\t\t\t.filter(([, text]) => typeof text === 'string' && text !== '')\n\t\t\t\t\t.map(([value, text]) => [value, translate(text)]))]))\n\t\t},\n\n\t\t/**\n\t\t * `content.relatedSources`: records beside the object whose events\n\t\t * join its history (see CnAuditTrailCard).\n\t\t *\n\t\t * @return {Array<object>}\n\t\t * @spec openspec/changes/audit-trail-related-sources/specs/audit-trail/spec.md#requirement-an-objects-history-can-include-the-events-of-records-beside-it\n\t\t */\n\t\trelatedSources() {\n\t\t\treturn Array.isArray(this.content.relatedSources) ? this.content.relatedSources : []\n\t\t},\n\n\t\temptyText() {\n\t\t\tconst text = this.content.emptyText\n\t\t\tif (typeof text !== 'string' || text === '') {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn typeof this.cnTranslate === 'function' ? this.cnTranslate(text) : text\n\t\t},\n\n\t\t/**\n\t\t * The actions to leave out: explicit prop → content → none.\n\t\t *\n\t\t * @spec openspec/changes/audit-trail-exclude-actions/specs/audit-trail/spec.md#requirement-a-history-card-can-leave-out-events-by-action\n\t\t * @return {Array<string>}\n\t\t */\n\t\tresolvedExcludeActions() {\n\t\t\tif (this.excludeActions.length > 0) {\n\t\t\t\treturn this.excludeActions\n\t\t\t}\n\t\t\tconst fromContent = this.content.excludeActions\n\t\t\treturn Array.isArray(fromContent) ? fromContent.filter((action) => typeof action === 'string' && action !== '') : []\n\t\t},\n\n\t\t/**\n\t\t * The actors to leave out, from `content.excludeActors`.\n\t\t *\n\t\t * @spec openspec/changes/audit-card-exclude-actors/specs/audit-trail/spec.md#requirement-a-history-card-can-leave-out-entries-by-actor\n\t\t * @return {Array<string>}\n\t\t */\n\t\tresolvedExcludeActors() {\n\t\t\tconst fromContent = this.content.excludeActors\n\t\t\treturn Array.isArray(fromContent) ? fromContent.filter((actor) => typeof actor === 'string' && actor !== '') : []\n\t\t},\n\n\t\tresolvedTitle() {\n\t\t\treturn this.title || this.content.title || ''\n\t\t},\n\n\t\t/**\n\t\t * The row cap: explicit prop → content → the card's own default (5).\n\t\t *\n\t\t * @return {number}\n\t\t */\n\t\tresolvedMaxDisplay() {\n\t\t\tif (this.maxDisplay > 0) {\n\t\t\t\treturn this.maxDisplay\n\t\t\t}\n\t\t\tconst fromContent = Number(this.content.maxDisplay)\n\t\t\treturn Number.isFinite(fromContent) && fromContent > 0 ? fromContent : 5\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n/* The card keeps its own box, footnote included. */\n.cn-audit-trail-widget {\n\tdisplay: contents;\n}\n</style>\n"],"names":[],"mappings":";;;;OAaO,EAAC,uBAAkB;;;;;;UADlB,QAAa,CAAA,aAAA,KAAA,KAAA,IAAS,uBAAA,IAAA,QAAA,CAAA,gBAAA,KAAA,QAAA,CAAA,gBAAA,IAAA,QAAA,CAAA,cAAA,IAAA,QAAA,CAAA,gBAAA,CAAA;;;AAG1B,UAAA,MAAM,EAAE,QAAY,CAAA,cAAA;AACpB,UAAA,QAAQ,EAAE,QAAU,CAAA,gBAAA;AACpB,UAAA,QAAQ,EAAE,QAAgB,CAAA,gBAAA;AAC1B,UAAA,MAAM,EAAE,QAAc,CAAA,cAAA;AACtB,UAAA,QAAQ,EAAE,QAAgB,CAAA,gBAAA;AAC1B,UAAA,KAAK,EAAE,QAAa,CAAA,aAAA;AACpB,UAAA,KAAK,EAAE,QAAa,CAAA,aAAA;AACpB,UAAA,UAAU,EAAE,QAAY,CAAA,kBAAA;UACxB,MAAM,EAAE,cAAO,IAAW,OAAA,MAAA,CAAA,OAAA,CAAA,MAAA,KAAA,QAAA,GAAA,MAAA,CAAA,OAAA,CAAA,MAAA,GAAA,EAAA;AAC1B,UAAA,cAAc,EAAE,QAAsB,CAAA,sBAAA;AACtC,UAAA,aAAa,EAAE,QAAe,CAAA,qBAAA;AAC9B,UAAA,YAAY,EAAE,QAAI,CAAA,YAAA;AAClB,UAAA,WAAW,EAAE,QAAW,CAAA,WAAA;AACxB,UAAA,YAAE,EAAA,QAAA,CAAA,YAAA;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import script from './CnChartWidget.vue2.js';
2
2
  import { render } from './CnChartWidget.vue3.js';
3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-b6e600c4";
5
+ script.__scopeId = "data-v-37644514";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -848,6 +848,9 @@ var script = {
848
848
  aggregateData: null,
849
849
  // The `cellSource` matrix, laid out (`{ series, categories, columnKeys }`), or null.
850
850
  cellData: null,
851
+ // The record a `cellSource` with `cellsPath` read its cells from, for
852
+ // `@source.<field>` in the notice.
853
+ cellRecord: null,
851
854
  // Active `views[]` switcher key (null = the first view). Local
852
855
  // UI state only — never persisted.
853
856
  activeViewKey: null,
@@ -1492,6 +1495,14 @@ var script = {
1492
1495
  }
1493
1496
  const declared = def.values && typeof def.values === 'object' ? def.values : {};
1494
1497
  const resolved = resolveFilterTokens(declared, this.chartTokenCtx());
1498
+ // `@source.<field>`: a field of the record the matrix read its cells
1499
+ // from (the matrix's name and version on an enforcement advice).
1500
+ for (const [name, token] of Object.entries(declared)) {
1501
+ if (typeof token === 'string' && token.startsWith('@source.')) {
1502
+ const value = token.slice('@source.'.length).split('.').reduce((at, key) => (at && typeof at === 'object' ? at[key] : undefined), this.cellRecord);
1503
+ resolved[name] = value === undefined ? null : value;
1504
+ }
1505
+ }
1495
1506
  const source = this.cellSource && typeof this.cellSource === 'object' ? this.cellSource : {};
1496
1507
  const maps = { rows: source.rowLabels, columns: source.columnLabels, values: source.valueLabels };
1497
1508
  const words = {};
@@ -2220,6 +2231,7 @@ var script = {
2220
2231
  if (this._cellRequest !== key) {
2221
2232
  return
2222
2233
  }
2234
+ this.cellRecord = this.cellSource.cellsPath ? (records[0] || null) : null;
2223
2235
  if (this.cellSource.cellsPath) {
2224
2236
  const { cells, config } = cellsFromRecord(records[0] || null, this.cellSource, cellFilter);
2225
2237
  this.cellData = pivotCells(cells, config);