@conduction/nextcloud-vue 2.84.0 → 2.85.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 (166) hide show
  1. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue.js +1 -1
  2. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js +131 -3
  3. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js.map +1 -1
  4. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js +54 -18
  5. package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js.map +1 -1
  6. package/dist/esm/components/CnBoardView/CnBoardView.vue.js +1 -1
  7. package/dist/esm/components/CnBoardView/CnBoardView.vue2.js +232 -4
  8. package/dist/esm/components/CnBoardView/CnBoardView.vue2.js.map +1 -1
  9. package/dist/esm/components/CnBoardView/CnBoardView.vue3.js +95 -51
  10. package/dist/esm/components/CnBoardView/CnBoardView.vue3.js.map +1 -1
  11. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue.js +1 -1
  12. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js +114 -0
  13. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js.map +1 -1
  14. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js +2 -2
  15. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js.map +1 -1
  16. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
  17. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +45 -0
  18. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  19. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +22 -12
  20. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  21. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +23 -4
  22. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  23. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  24. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
  25. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js +3 -1
  26. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
  27. package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
  28. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
  29. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +18 -5
  30. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
  31. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
  32. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +548 -77
  33. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  34. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +191 -82
  35. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  36. package/dist/esm/components/CnIndexPage/useSelfFetchList.js +11 -2
  37. package/dist/esm/components/CnIndexPage/useSelfFetchList.js.map +1 -1
  38. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
  39. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +95 -0
  40. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
  41. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js +24 -2
  42. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
  43. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  44. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +70 -2
  45. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  46. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  47. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue.js +1 -1
  48. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue2.js +67 -5
  49. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue2.js.map +1 -1
  50. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue3.js +181 -124
  51. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue3.js.map +1 -1
  52. package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue.js +1 -1
  53. package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue2.js +5 -1
  54. package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue2.js.map +1 -1
  55. package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue3.js.map +1 -1
  56. package/dist/esm/components/CnStatWidget/CnStatWidget.vue.js +1 -1
  57. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +134 -10
  58. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
  59. package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js +6 -2
  60. package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
  61. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
  62. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js +6 -3
  63. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
  64. package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
  65. package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue.js +1 -1
  66. package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue2.js +140 -7
  67. package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue2.js.map +1 -1
  68. package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue3.js.map +1 -1
  69. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue.js +1 -1
  70. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue2.js +37 -9
  71. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue2.js.map +1 -1
  72. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue3.js +6 -5
  73. package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue3.js.map +1 -1
  74. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue.js +1 -1
  75. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue2.js +2 -1
  76. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue2.js.map +1 -1
  77. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue3.js.map +1 -1
  78. package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue2.js +53 -1
  79. package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue2.js.map +1 -1
  80. package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue3.js +3 -2
  81. package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue3.js.map +1 -1
  82. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue.js +1 -1
  83. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js +135 -0
  84. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js.map +1 -1
  85. package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue3.js.map +1 -1
  86. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue.js +1 -1
  87. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue2.js +19 -0
  88. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue2.js.map +1 -1
  89. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue3.js +37 -19
  90. package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue3.js.map +1 -1
  91. package/dist/esm/composables/useListView.js +21 -0
  92. package/dist/esm/composables/useListView.js.map +1 -1
  93. package/dist/esm/index.js +1 -0
  94. package/dist/esm/index.js.map +1 -1
  95. package/dist/esm/l10n/en.json.js +23 -1
  96. package/dist/esm/l10n/en.json.js.map +1 -1
  97. package/dist/esm/l10n/nl.json.js +41 -1
  98. package/dist/esm/l10n/nl.json.js.map +1 -1
  99. package/dist/esm/library-style.js +1 -1
  100. package/dist/esm/nextcloud-vue.css +742 -397
  101. package/dist/esm/store/useObjectStore.js +16 -2
  102. package/dist/esm/store/useObjectStore.js.map +1 -1
  103. package/dist/esm/utils/boardColumns.js +8 -1
  104. package/dist/esm/utils/boardColumns.js.map +1 -1
  105. package/dist/esm/utils/boardReferenceColumns.js +278 -0
  106. package/dist/esm/utils/boardReferenceColumns.js.map +1 -0
  107. package/dist/esm/utils/buildManifest.js +4 -1
  108. package/dist/esm/utils/buildManifest.js.map +1 -1
  109. package/dist/esm/utils/gridStack.js +40 -1
  110. package/dist/esm/utils/gridStack.js.map +1 -1
  111. package/dist/esm/utils/humaniseKey.js +41 -0
  112. package/dist/esm/utils/humaniseKey.js.map +1 -0
  113. package/dist/esm/utils/notificationRuleLabel.js +6 -23
  114. package/dist/esm/utils/notificationRuleLabel.js.map +1 -1
  115. package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
  116. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  117. package/dist/esm/utils/widgetDispatch.js +8 -2
  118. package/dist/esm/utils/widgetDispatch.js.map +1 -1
  119. package/dist/nextcloud-vue.cjs.js +15075 -12590
  120. package/dist/nextcloud-vue.cjs.js.map +2 -2
  121. package/dist/nextcloud-vue.css +742 -397
  122. package/l10n/en.json +23 -1
  123. package/l10n/nl.json +41 -1
  124. package/package.json +1 -1
  125. package/src/components/CnAdminSettingsShell/CnAdminSettingsShell.vue +160 -8
  126. package/src/components/CnBoardView/CnBoardView.vue +262 -6
  127. package/src/components/CnDashboardGrid/CnDashboardGrid.vue +116 -2
  128. package/src/components/CnDashboardPage/CnDashboardPage.vue +57 -2
  129. package/src/components/CnDetailPage/CnDetailPage.md +1 -1
  130. package/src/components/CnDetailPage/CnDetailPage.vue +23 -4
  131. package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +3 -1
  132. package/src/components/CnFactsWidget/CnFactsWidget.vue +18 -5
  133. package/src/components/CnIndexPage/CnIndexPage.vue +586 -25
  134. package/src/components/CnIndexPage/useSelfFetchList.js +10 -1
  135. package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +123 -3
  136. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +70 -2
  137. package/src/components/CnRegisterMapping/CnRegisterMapping.md +5 -0
  138. package/src/components/CnRegisterMapping/CnRegisterMapping.vue +231 -96
  139. package/src/components/CnSettingsPage/CnSettingsPage.vue +5 -1
  140. package/src/components/CnStatWidget/CnStatWidget.vue +136 -11
  141. package/src/components/CnTabsWidget/CnTabsWidget.vue +6 -3
  142. package/src/components/CnToggleTableWidget/CnToggleTableWidget.vue +140 -7
  143. package/src/components/CnVersionInfoCard/CnVersionInfoCard.md +2 -1
  144. package/src/components/CnVersionInfoCard/CnVersionInfoCard.vue +42 -13
  145. package/src/components/CnWeekStripWidget/CnWeekStripWidget.vue +2 -1
  146. package/src/components/CnWidgetCardGrid/CnWidgetCardGrid.vue +55 -2
  147. package/src/components/CnWidgetObjectTable/CnWidgetObjectTable.vue +135 -0
  148. package/src/components/CnWidgetWrapper/CnWidgetWrapper.md +10 -0
  149. package/src/components/CnWidgetWrapper/CnWidgetWrapper.vue +44 -1
  150. package/src/composables/useListView.js +21 -0
  151. package/src/css/board.css +65 -4
  152. package/src/css/dialog.css +4 -2
  153. package/src/css/index-page.css +49 -0
  154. package/src/css/kpi-card.css +13 -0
  155. package/src/css/look-board.css +96 -7
  156. package/src/index.js +2 -0
  157. package/src/schemas/app-manifest-v2.schema.json +115 -5
  158. package/src/store/useObjectStore.js +16 -2
  159. package/src/utils/boardColumns.js +8 -1
  160. package/src/utils/boardReferenceColumns.js +274 -0
  161. package/src/utils/buildManifest.js +4 -1
  162. package/src/utils/gridStack.js +39 -0
  163. package/src/utils/humaniseKey.js +38 -0
  164. package/src/utils/notificationRuleLabel.js +5 -23
  165. package/src/utils/validateManifestV2.compiled.js +3 -3
  166. package/src/utils/widgetDispatch.js +8 -2
@@ -9,6 +9,7 @@ import { dispatchAction, resolveObjectOpType } from '../../utils/actionsDispatch
9
9
  import { resolveObjectTokenContext } from '../../utils/detailObjectContext.js';
10
10
  import { pageFilter, pageSort } from '../../utils/pageControls.js';
11
11
  import { dropOptionalUnresolved, resolveFilterTokens, hasUnresolvedTokens } from '../../utils/resolveFilterTokens.js';
12
+ import { fieldsFromSchema } from '../../utils/schema.js';
12
13
  import { readVisibleWhenPath, compareVisibleWhen } from '../../utils/visibleWhen.js';
13
14
  import __sfc_main$3 from '../CnIcon/CnIcon.vue.js';
14
15
  import __sfc_main$2 from '../CnRowActions/CnRowActions.vue.js';
@@ -150,6 +151,12 @@ var script = {
150
151
  * the object form (`{ key, label, sortable, width, cellClass,
151
152
  * formatter, widget, format, aggregate }`) both pass straight through.
152
153
  *
154
+ * A column that holds a reference shows the referenced object's label
155
+ * with `labelField` (the property to show) and/or `resolve`
156
+ * (`{ register, schema, labelField? }`, where the reference points).
157
+ * Without `resolve` the target is read off the source schema's `$ref`
158
+ * for that property. Such a column renders as an `fkResolve` cell.
159
+ *
153
160
  * @type {Array<object|string>}
154
161
  */
155
162
  columns: {
@@ -388,6 +395,8 @@ var script = {
388
395
  confirmAction: null,
389
396
  /** @type {object|null} The row the pending confirm-gated action targets. */
390
397
  confirmRow: null,
398
+ /** Where each label column's references point, read off the source schema, by column key. */
399
+ refTargets: {},
391
400
  }
392
401
  },
393
402
 
@@ -557,6 +566,57 @@ var script = {
557
566
  return params
558
567
  },
559
568
 
569
+ /**
570
+ * Columns that ask for the label of the object they reference
571
+ * (`labelField` or `resolve`) and draw no cell widget of their own.
572
+ *
573
+ * @return {Array<object>}
574
+ * @spec openspec/changes/dashboard-table-reference-labels/specs/dashboard-page/spec.md#requirement-a-dashboard-table-shows-a-referenced-objects-label
575
+ */
576
+ refLabelColumns() {
577
+ return (this.columns || []).filter((col) => col && typeof col === 'object' && !col.widget
578
+ && ((typeof col.labelField === 'string' && col.labelField !== '') || (col.resolve && typeof col.resolve === 'object')))
579
+ },
580
+
581
+ /**
582
+ * The columns handed to CnDataTable: a label column whose target is
583
+ * known renders as an `fkResolve` cell; every other column as given.
584
+ *
585
+ * @return {Array<object|string>}
586
+ * @spec openspec/changes/dashboard-table-reference-labels/specs/dashboard-page/spec.md#requirement-a-dashboard-table-shows-a-referenced-objects-label
587
+ */
588
+ renderedColumns() {
589
+ if (this.refLabelColumns.length === 0) {
590
+ return this.columns
591
+ }
592
+ return this.columns.map((col) => {
593
+ if (!this.refLabelColumns.includes(col)) {
594
+ return col
595
+ }
596
+ const target = this.refTargetOf(col);
597
+ if (!target) {
598
+ return col
599
+ }
600
+ const labelField = (col.resolve && typeof col.resolve.labelField === 'string' && col.resolve.labelField) || col.labelField || 'name';
601
+ return { ...col, widget: 'fkResolve', widgetProps: { ...(col.widgetProps || {}), register: target.register, schema: target.schema, labelField } }
602
+ })
603
+ },
604
+
605
+ /**
606
+ * The label columns whose target has to be read off the source schema.
607
+ *
608
+ * @return {string[]} Their keys.
609
+ */
610
+ schemaRefKeys() {
611
+ return this.refLabelColumns.filter((col) => !this.explicitTarget(col)).map((col) => col.key)
612
+ },
613
+
614
+ /** @return {string} The label columns to look up and the source schema, to read again when either changes. */
615
+ refTargetsKey() {
616
+ const src = this.source || {};
617
+ return `${src.register || ''}/${src.schema || ''}:${this.schemaRefKeys.join('|')}`
618
+ },
619
+
560
620
  /**
561
621
  * `$props` minus the chrome props (`title`, `documentationUrl`,
562
622
  * `widgetId`, `hideWrapper`) and the widget-only props (`source`,
@@ -588,6 +648,9 @@ var script = {
588
648
  if (this.compiledRowClass) {
589
649
  inner.rowClass = this.compiledRowClass;
590
650
  }
651
+ if (this.refLabelColumns.length > 0) {
652
+ inner.columns = this.renderedColumns;
653
+ }
591
654
  if (this.selfFetchActive) {
592
655
  inner.register = this.source.register;
593
656
  inner.schemaId = this.source.schema;
@@ -723,6 +786,16 @@ var script = {
723
786
  },
724
787
  },
725
788
 
789
+ watch: {
790
+ refTargetsKey() {
791
+ this.loadRefTargets();
792
+ },
793
+ },
794
+
795
+ mounted() {
796
+ this.loadRefTargets();
797
+ },
798
+
726
799
  methods: {
727
800
  /**
728
801
  * Entry point for every declarative action trigger (row menu or
@@ -833,6 +906,68 @@ var script = {
833
906
  }
834
907
  },
835
908
 
909
+ /**
910
+ * Where a label column's references point when the column says so
911
+ * itself (`resolve.register` and `resolve.schema`).
912
+ *
913
+ * @param {object} col The column.
914
+ * @return {{register: string, schema: string}|null}
915
+ */
916
+ explicitTarget(col) {
917
+ const r = col && col.resolve;
918
+ if (r && typeof r === 'object' && typeof r.register === 'string' && r.register !== '' && typeof r.schema === 'string' && r.schema !== '') {
919
+ return { register: r.register, schema: r.schema }
920
+ }
921
+ return null
922
+ },
923
+
924
+ /**
925
+ * Where a label column's references point: the column's `resolve`, else
926
+ * the source schema's `$ref` for the property, else null (the column
927
+ * then shows the raw value).
928
+ *
929
+ * @param {object} col The column.
930
+ * @return {{register: string, schema: string}|null}
931
+ */
932
+ refTargetOf(col) {
933
+ return this.explicitTarget(col) || this.refTargets[col.key] || null
934
+ },
935
+
936
+ /**
937
+ * Read the source schema once and note, for each label column without a
938
+ * `resolve`, the register and schema its property's `$ref` names. A
939
+ * failed or missing schema leaves those columns showing raw values.
940
+ *
941
+ * @return {Promise<void>}
942
+ * @spec openspec/changes/dashboard-table-reference-labels/specs/dashboard-page/spec.md#requirement-a-dashboard-table-shows-a-referenced-objects-label
943
+ */
944
+ async loadRefTargets() {
945
+ const keys = this.schemaRefKeys;
946
+ const src = this.source;
947
+ if (keys.length === 0 || !src || typeof src.register !== 'string' || src.register === '' || src.register.startsWith('@') || typeof src.schema !== 'string' || src.schema === '') {
948
+ return
949
+ }
950
+ const store = this.getObjectStore();
951
+ if (!store || typeof store.fetchSchema !== 'function') {
952
+ return
953
+ }
954
+ const type = resolveObjectOpType(store, { register: src.register, schema: src.schema }, { exactSchema: true });
955
+ const schema = await store.fetchSchema(type).catch(() => null);
956
+ if (!schema || typeof schema !== 'object') {
957
+ return
958
+ }
959
+ const fields = fieldsFromSchema(schema, { includeReadOnly: true });
960
+ const found = {};
961
+ for (const key of keys) {
962
+ const field = fields.find((f) => f.key === key);
963
+ const ref = field && field.reference;
964
+ if (ref && ref.schema !== undefined && ref.schema !== null) {
965
+ found[key] = { register: ref.register || src.register, schema: String(ref.schema) };
966
+ }
967
+ }
968
+ this.refTargets = { ...this.refTargets, ...found };
969
+ },
970
+
836
971
  /**
837
972
  * The shared object store instance, or null when no Pinia is active
838
973
  * (`dispatchAction` then warns and no-ops).
@@ -1 +1 @@
1
- {"version":3,"file":"CnWidgetObjectTable.vue2.js","sources":["../../../../src/components/CnWidgetObjectTable/CnWidgetObjectTable.vue"],"sourcesContent":["<!--\n CnWidgetObjectTable — built-in v2 widget wrapping CnDataTable.\n\n Referenced in v2 manifests via `widgetKey: \"object-table\"`. Renders the\n table on the shared CnWidgetWrapper chrome (title + standard overflow\n Actions menu: Refresh / Documentation / Request a feature) and forwards\n all data props to CnDataTable so the table itself is a transparent\n pass-through.\n\n ADR-049 enrichment: a declarative token-resolved `source` drives\n CnDataTable's existing self-fetch (externally supplied `rows` always win),\n the compact-list surface (hideHeader / borderless / rowRoute /\n viewAllRoute / emptyText / rowIcon / #footer) passes straight through,\n and a declarative `actions[]` renders row-scoped actions via CnRowActions\n plus widget-scoped `object-op` create affordances in the footer.\n\n Spec: REQ-MVR-006 (manifest-v2-renderer) — built-in widget: object-table\n Spec: openspec/changes/list-widget-enrichment/specs/manifest-v2-renderer/spec.md\n-->\n<template>\n\t<!-- `refreshing` mirrors the endpoint fetch so the chrome's Refresh\n\t action spins (and stays disabled) for the real duration of an\n\t in-flight refetch. -->\n\t<component\n\t\t:is=\"hideWrapper ? 'CnWidgetHostShell' : 'CnWidgetWrapper'\"\n\t\tv-bind=\"hideWrapper ? {} : { title, widgetId, documentationUrl, flush: true, refreshing: epLoading }\">\n\t\t<div class=\"cn-widget-object-table\">\n\t\t\t<CnDataTable ref=\"dataTable\" v-bind=\"{ ...innerProps, ...$attrs }\">\n\t\t\t\t<!-- Forward every host-supplied CnDataTable scoped slot verbatim\n\t\t\t\t (#footer { total, shown }, #empty, #column-<key>, …). The\n\t\t\t\t #row-actions slot is NOT forwarded while the widget renders\n\t\t\t\t its own declarative actions[] menu. -->\n\t\t\t\t<template v-for=\"(_, name) in forwardedScopedSlots\" #[name]=\"slotData\">\n\t\t\t\t\t<!-- @slot Any CnDataTable scoped slot, forwarded verbatim — e.g. #footer ({ total, shown }), #empty, #column-<key>. #row-actions is withheld while the declarative actions[] menu renders. -->\n\t\t\t\t\t<slot :name=\"name\" v-bind=\"slotData\" />\n\t\t\t\t</template>\n\t\t\t\t<template v-if=\"rowScopedActions.length > 0\" #row-actions=\"{ row }\">\n\t\t\t\t\t<CnRowActions :actions=\"mappedRowActions\" :row=\"row\" />\n\t\t\t\t</template>\n\t\t\t</CnDataTable>\n\n\t\t\t<!-- Widget-scoped object-op create affordance: `create` has no row\n\t\t\t to mutate, so it renders in the list footer, never inside the\n\t\t\t per-row actions menu (ADR-049 / list-widget-enrichment). -->\n\t\t\t<div v-if=\"createActions.length > 0\" class=\"cn-widget-object-table__footer\">\n\t\t\t\t<NcButton\n\t\t\t\t\tv-for=\"action in createActions\"\n\t\t\t\t\t:key=\"action.id || action.label\"\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t:data-testid=\"`cn-widget-create-${action.id || 'action'}`\"\n\t\t\t\t\t@click=\"onActionTriggered(action, null)\">\n\t\t\t\t\t<template v-if=\"action.icon\" #icon>\n\t\t\t\t\t\t<CnIcon :name=\"action.icon\" :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ action.label }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\n\t\t\t<!-- A rejected write (OpenRegister RBAC) surfaces here — local row\n\t\t\t state is never mutated on failure (the store only writes its\n\t\t\t caches on success). -->\n\t\t\t<p v-if=\"opError\" class=\"cn-widget-object-table__error\" data-testid=\"cn-widget-object-table-error\">\n\t\t\t\t{{ opError }}\n\t\t\t</p>\n\n\t\t\t<CnConfirmDialog\n\t\t\t\tv-if=\"confirmAction\"\n\t\t\t\tref=\"confirmDialog\"\n\t\t\t\t:dialogTitle=\"confirmAction.label\"\n\t\t\t\t:message=\"confirmMessage\"\n\t\t\t\t:variant=\"confirmAction.op === 'delete' ? 'error' : 'primary'\"\n\t\t\t\t:confirmLabel=\"confirmAction.label\"\n\t\t\t\t@confirm=\"onConfirmConfirmed\"\n\t\t\t\t@close=\"closeConfirm\" />\n\t\t</div>\n\t</component>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton } from '@nextcloud/vue'\nimport { inject, ref } from 'vue'\nimport CnConfirmDialog from '../../dialogs/CnConfirmDialog.vue'\nimport CnDataTable from '../CnDataTable/CnDataTable.vue'\nimport { useEndpointSource } from '../../composables/useEndpointSource.js'\nimport { useObjectStore } from '../../store/useObjectStore.js'\nimport { dispatchAction, resolveObjectOpType } from '../../utils/actionsDispatcher.js'\nimport { resolveObjectTokenContext } from '../../utils/detailObjectContext.js'\nimport { pageFilter, pageSort } from '../../utils/pageControls.js'\nimport { dropOptionalUnresolved, hasUnresolvedTokens, resolveFilterTokens } from '../../utils/resolveFilterTokens.js'\nimport { compareVisibleWhen, readVisibleWhenPath } from '../../utils/visibleWhen.js'\nimport { CnIcon } from '../CnIcon/index.js'\nimport { CnRowActions } from '../CnRowActions/index.js'\nimport { CnWidgetWrapper } from '../CnWidgetWrapper/index.js'\n// Chrome-less pass-through used when `hideWrapper` is set (see hostShell.js\n// for why it lives in its own module).\nimport { CnWidgetHostShell } from './hostShell.js'\n\n/**\n * CnWidgetObjectTable — built-in v2 widget wrapping CnDataTable.\n *\n * Renders a data table on the shared CnWidgetWrapper chrome, which supplies\n * the widget title and the standard overflow Actions menu (Refresh /\n * Documentation / Request a feature). All data props are forwarded to the\n * inner CnDataTable; the chrome props (`title`, `documentationUrl`,\n * `widgetId`) are consumed by the wrapper and not passed down.\n *\n * A declarative `source` makes the widget self-fetch from OpenRegister:\n * `source.filter` is token-resolved with the shared `resolveFilterTokens`\n * grammar (`@me`, `@today`, `@workspace.*`, `?`-optional clauses dropped\n * when unresolved via `dropOptionalUnresolved`), `source.order` /\n * `source.limit` drive the fetch, and an `@resolve:` register sentinel is\n * passed through unexpanded (resolution is the host loader's job).\n * Externally supplied `rows` always win — the pre-existing pass-through\n * interface is unchanged.\n *\n * Wave 2 (#91): a declarative `endpointSource` (`{ url, method?, params?,\n * responsePath? }`) is the alternative to the OpenRegister `source` — rows\n * come from an app REST endpoint's payload at `responsePath`, fetched by the\n * shared `useEndpointSource` engine (token-resolved params, request dedup +\n * short-TTL cache, `cn:page:refresh` / `cn:widget:refresh` subscription).\n * Exactly one of `source` | `endpointSource`; columns / formatters /\n * `rowRoute` / `actions` apply unchanged on top of endpoint rows.\n *\n * A declarative `actions[]` array renders `patch` / `delete` `object-op`\n * actions (and reused `handler` / `open-modal` / `open-page` / `navigate`\n * actions) per row through `CnRowActions`; an `object-op` `create` action\n * renders as a widget-scoped footer affordance. `delete` is ALWAYS\n * confirm-gated through `CnConfirmDialog`; `patch` / `create` confirm only\n * on `confirm: true`. Mutations dispatch via the shared object store —\n * the manifest declares intent only, OpenRegister RBAC is the authority,\n * and a rejected write surfaces as an error without local mutation.\n *\n * A declarative `rowClass` (#91) — `[{ when: { field, op?, value }, class }]` reusing\n * the shared `visibleWhen` predicate grammar — is compiled into CnDataTable's\n * `rowClass` function so overdue / at-risk rows can be highlighted from the manifest\n * (a host-supplied `rowClass` FUNCTION still passes straight through).\n */\nexport default {\n\tname: 'CnWidgetObjectTable',\n\n\tcomponents: { CnDataTable, CnWidgetWrapper, CnWidgetHostShell, CnRowActions, CnIcon, NcButton, CnConfirmDialog },\n\n\tinject: {\n\t\t/**\n\t\t * Detail-page object context (`{ objectId, object, register, schema }`)\n\t\t * provided by CnDetailPage — enables `@objectId` / `@object.<field>`\n\t\t * tokens in `source.filter`. Null on dashboards.\n\t\t */\n\t\tcnObjectContext: { default: null },\n\t\t/**\n\t\t * v2 slot-grid detail context holder (`{ value: { objectData, schema,\n\t\t * objectType, objectId, register, store } | null }`) provided by\n\t\t * CnPageRenderer — backfills the object token context so\n\t\t * `@objectId` / `@object.<field>` resolve on detail surfaces where\n\t\t * CnDetailPage is not an ancestor (#91 Wave 3).\n\t\t */\n\t\tcnDetailObjectContext: { default: null },\n\t\t/**\n\t\t * Page-level workspace context (reactive `ref({})`) provided by\n\t\t * CnDashboardPage — enables `@workspace.<key>` tokens in\n\t\t * `source.filter`. Null on pages that don't provide it.\n\t\t */\n\t\tcnWorkspaceContext: { default: null },\n\t\t/**\n\t\t * Pre-bound `dispatchAction` provided by CnPageRenderer (router,\n\t\t * registry, handlers, openModal already wired). Used for the reused\n\t\t * non-mutating action types; falls back to a direct `dispatchAction`\n\t\t * call when mounted outside a CnPageRenderer tree.\n\t\t */\n\t\tcnDispatchAction: { default: null },\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Widget title shown in the CnWidgetWrapper header.\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Table'),\n\t\t},\n\n\t\t/**\n\t\t * Documentation link surfaced in the widget's overflow Actions menu.\n\t\t * Empty (the default) hides the Documentation item; the Refresh and\n\t\t * Request-a-feature items always render.\n\t\t */\n\t\tdocumentationUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Stable id forwarded to the widget chrome for the Refresh /\n\t\t * Request-a-feature payloads.\n\t\t */\n\t\twidgetId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Render content-only, WITHOUT the widget's own CnWidgetWrapper\n\t\t * chrome. Set by hosts that already provide the card chrome — e.g.\n\t\t * CnDashboardPage's dashboard widget grid, whose registry branch\n\t\t * wraps every catalog widget in its own CnWidgetWrapper (a naive\n\t\t * mount would double-card). Default `false` keeps the pre-existing\n\t\t * self-chromed v2 rendering byte-for-byte.\n\t\t */\n\t\thideWrapper: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Register slug. Forwarded to CnDataTable. */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Schema slug. Forwarded to CnDataTable. */\n\t\tschema: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Column definitions. Forwarded to CnDataTable — bare string keys OR\n\t\t * the object form (`{ key, label, sortable, width, cellClass,\n\t\t * formatter, widget, format, aggregate }`) both pass straight through.\n\t\t *\n\t\t * @type {Array<object|string>}\n\t\t */\n\t\tcolumns: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** Rows array. Forwarded to CnDataTable. External rows always win over `source`. */\n\t\trows: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** Loading state. Forwarded to CnDataTable. */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Declarative self-fetch source (ADR-049). When set and no external\n\t\t * `rows` are supplied, the widget resolves `filter` @-tokens and\n\t\t * drives CnDataTable's existing self-fetch with the resolved filter,\n\t\t * `order`, and `limit`. `register` MAY carry an `@resolve:` sentinel —\n\t\t * it is passed through unexpanded. `extend` (#91 Wave 3) forwards\n\t\t * OpenRegister `_extend[]` values (e.g. `[\"calculations\"]`) on the\n\t\t * fetch so virtual/declarative calc fields ride along and render as\n\t\t * ordinary columns. Default `null` keeps the pre-existing\n\t\t * pass-through behaviour byte-for-byte.\n\t\t *\n\t\t * @type {{register?: string, schema?: string, filter?: object, order?: object, limit?: number, extend?: string[]}|null}\n\t\t */\n\t\tsource: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Endpoint data binding (Wave 2, #91) — the alternative to the\n\t\t * OpenRegister `source` for rows an app REST endpoint computes (e.g. a\n\t\t * per-source performance report). Rows come from the payload at\n\t\t * `responsePath` (a dot-path; the plucked value must be an array —\n\t\t * anything else renders as empty). `params` values use the shared\n\t\t * filter-token grammar (`@workspace.dateFrom?`, `@me`, `@today±Nd`, …)\n\t\t * and re-resolve + refetch when the page context changes. Requests are\n\t\t * deduped + short-TTL cached per (url+params) by the shared\n\t\t * `useEndpointSource` engine, which also subscribes to\n\t\t * `cn:page:refresh` / `cn:widget:refresh`. Exactly one of `source` |\n\t\t * `endpointSource` (validator-enforced); external `rows` still win\n\t\t * over both. `columns` / formatters / `rowRoute` / `actions` apply\n\t\t * unchanged on top of endpoint rows.\n\t\t *\n\t\t * @type {{url: string, method?: string, params?: object, responsePath?: string}|null}\n\t\t */\n\t\tendpointSource: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Declarative actions (unified manifest action shape — `handler` |\n\t\t * `open-modal` | `open-page` | `navigate` | `object-op`). `object-op`\n\t\t * `patch` / `delete` (and every non-mutating type) render per row via\n\t\t * CnRowActions; `object-op` `create` renders as a widget-scoped footer\n\t\t * affordance. `delete` always confirms; `patch` / `create` confirm on\n\t\t * `confirm: true`. Authorization-shaped fields on an action have no\n\t\t * effect — OpenRegister RBAC is the only authority.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tactions: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Hide the column-header row. Forwarded to CnDataTable — the compact\n\t\t * dashboard-list surface.\n\t\t */\n\t\thideHeader: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Drop CnDataTable's card chrome (border, radius, shadow) so the table\n\t\t * sits flush inside the widget card. Forwarded to CnDataTable.\n\t\t */\n\t\tborderless: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Fit the table to the tile: the title column (a column's `grow: true`,\n\t\t * else `title` or `name`, else the first) shrinks and ends in an\n\t\t * ellipsis so the trailing columns stay visible. On by default; pass\n\t\t * `false` for the table's own auto layout. Forwarded to CnDataTable.\n\t\t *\n\t\t * @spec openspec/changes/narrow-object-table-widgets/specs/narrow-object-table-widgets/spec.md#requirement-a-narrow-object-table-keeps-its-trailing-columns-in-view\n\t\t */\n\t\tfitWidth: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Route NAME for row-click navigation. Mapped onto CnDataTable's\n\t\t * `rowClickRoute` as `{ name: rowRoute, params: { id } }` with the\n\t\t * row's `id` (or `@self.id`). Empty (the default) = no navigation.\n\t\t */\n\t\trowRoute: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Client-side row cap, forwarded to CnDataTable (`0` = all rows).\n\t\t * This is what makes `viewAllRoute` reachable for `endpointSource`\n\t\t * tables: the endpoint's full payload stays the `totalRowCount`\n\t\t * while CnDataTable renders only the first `limit` rows, so the\n\t\t * \"View all\" footer condition (total > shown) can finally hold.\n\t\t * The OpenRegister `source` mode keeps using `source.limit` (an\n\t\t * explicit assignment that wins over this passthrough).\n\t\t */\n\t\tlimit: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * vue-router route object for the \"View all\" footer link. Forwarded\n\t\t * to CnDataTable (footer shows when the rows are a `limit`-ed subset).\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tviewAllRoute: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Pre-translated \"View all\" footer label. Forwarded to CnDataTable. */\n\t\tviewAllLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/** Text shown when there are no rows. Forwarded to CnDataTable. */\n\t\temptyText: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * App wording for an unavailable personal lens (a `source.filter._recent`\n\t\t * tile on an instance that does not log reads), keyed `<lens>.<reason>`\n\t\t * or `<reason>`. Forwarded to CnDataTable, which shows the library's\n\t\t * object-neutral text without it.\n\t\t *\n\t\t * @spec openspec/changes/lens-says-why-it-is-empty/specs/personal-lens-availability/spec.md#requirement-an-unavailable-lens-explains-its-empty-page\n\t\t */\n\t\tlensReasonTexts: {\n\t\t\ttype: Object,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Leading per-row icon: a static MDI icon name string, or a function\n\t\t * `(row) => iconName`. Forwarded to CnDataTable.\n\t\t *\n\t\t * @type {string|((row: object) => string)|null}\n\t\t */\n\t\trowIcon: {\n\t\t\ttype: [String, Function],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Per-row CSS class binding (#91). Two forms:\n\t\t * - a FUNCTION `(row) => string` — passed straight through to\n\t\t * CnDataTable's `rowClass` (the pre-existing host-supplied contract).\n\t\t * - an ARRAY of declarative rules `[{ when: { field, op?, value }, class }]`\n\t\t * compiled here into that function. Each rule adds its `class` to a\n\t\t * row when the shared `visibleWhen` predicate holds against the row:\n\t\t * `field` is a dot-path into the row, `op` is `eq|neq|gt|gte|lt|lte`\n\t\t * (default `eq`), `value` is the literal right-hand side. Rules are\n\t\t * evaluated in order and every matching `class` is space-joined, so an\n\t\t * overdue / at-risk row can be highlighted declaratively from a\n\t\t * manifest with no bespoke function. Default `null` = no row class.\n\t\t *\n\t\t * @type {((row: object) => string)|Array<{when: {field: string, op?: string, value: unknown}, class: string}>|null}\n\t\t */\n\t\trowClass: {\n\t\t\ttype: [Function, Array],\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['object-op'],\n\n\tsetup(props) {\n\t\t// Endpoint binding (Wave 2, #91): the shared useEndpointSource engine\n\t\t// owns token resolution, request dedup + TTL caching, and the\n\t\t// cn:page:refresh / cn:widget:refresh subscriptions (the widget's own\n\t\t// `widgetId` is matched against widget-scoped refresh payloads).\n\t\t// No-op while `endpointSource` is null, so the OpenRegister `source`\n\t\t// self-fetch path is untouched. Injects re-read in setup (same\n\t\t// resolution as the Options `inject` block).\n\t\tconst objectCtxRaw = inject('cnObjectContext', null)\n\t\tconst detailCtxRaw = inject('cnDetailObjectContext', null)\n\t\tconst workspaceRaw = inject('cnWorkspaceContext', ref(null))\n\t\tconst appConfigRaw = inject('cnAppConfig', ref({}))\n\t\tconst unwrap = (v) => ((v && typeof v === 'object' && 'value' in v) ? v.value : v)\n\t\t// External rows always win — and suppress the request entirely (the\n\t\t// pre-existing \"when rows are provided, no API calls are made\"\n\t\t// contract), so the getter resolves to null while `rows` are supplied.\n\t\tconst { data, loading, error, refetch } = useEndpointSource(\n\t\t\t() => ((props.rows && props.rows.length > 0) ? null : props.endpointSource),\n\t\t\t{\n\t\t\t\tctx: () => ({\n\t\t\t\t\t...(resolveObjectTokenContext(objectCtxRaw, detailCtxRaw) || {}),\n\t\t\t\t\tworkspace: unwrap(workspaceRaw) || {},\n\t\t\t\t\tconfig: unwrap(appConfigRaw) || {},\n\t\t\t\t}),\n\t\t\t\twidgetId: () => props.widgetId,\n\t\t\t},\n\t\t)\n\t\treturn { epData: data, epLoading: loading, epError: error, epRefetch: refetch }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** Error message from the last rejected object-op write ('' = none). */\n\t\t\topError: '',\n\t\t\t/** @type {object|null} The object-op action awaiting confirmation (null = no dialog). */\n\t\t\tconfirmAction: null,\n\t\t\t/** @type {object|null} The row the pending confirm-gated action targets. */\n\t\t\tconfirmRow: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The merged detail-page object context for token resolution — both\n\t\t * detail-surface injects, holder fields backfilling (#91 Wave 3) —\n\t\t * or null on surfaces (dashboards) that don't provide one.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tobjectCtx() {\n\t\t\treturn resolveObjectTokenContext(this.cnObjectContext, this.cnDetailObjectContext)\n\t\t},\n\n\t\t/**\n\t\t * The unwrapped workspace context bag (or null). Vue 2.7 inject may\n\t\t * hand back a raw ref; unwrap `.value` for token resolution.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tworkspaceCtx() {\n\t\t\tconst c = this.cnWorkspaceContext\n\t\t\tif (!c) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn (typeof c === 'object' && 'value' in c) ? c.value : c\n\t\t},\n\n\t\t/**\n\t\t * Token-resolution context merged from the detail-page object context\n\t\t * and the page-level workspace bag (`@workspace.<key>`).\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\ttokenCtx() {\n\t\t\tconst base = this.objectCtx ? { ...this.objectCtx } : {}\n\t\t\tbase.workspace = this.workspaceCtx || {}\n\t\t\treturn base\n\t\t},\n\n\t\t/**\n\t\t * `source.filter` with every @-token resolved against `tokenCtx`, then\n\t\t * with any UNRESOLVED OPTIONAL clause (`@workspace.<key>?`) dropped —\n\t\t * an optional clause simply shows all rows until its context is set.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tresolvedFilter() {\n\t\t\tconst filter = pageFilter(this.source && this.source.pageControls, this.workspaceCtx, this.source && this.source.filter)\n\t\t\treturn dropOptionalUnresolved(resolveFilterTokens(filter, this.tokenCtx))\n\t\t},\n\n\t\t/**\n\t\t * Whether a REQUIRED context token in `source.filter` is still\n\t\t * unresolved — the widget then skips the fetch instead of querying the\n\t\t * whole register.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\twaitingForContext() {\n\t\t\treturn !!this.source && hasUnresolvedTokens(this.resolvedFilter)\n\t\t},\n\n\t\t/**\n\t\t * Whether the Wave-2 `endpointSource` drives the rows: a usable\n\t\t * endpoint config and no external rows (external rows always win).\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tendpointActive() {\n\t\t\treturn !!(this.endpointSource && this.endpointSource.url)\n\t\t\t\t&& (!this.rows || this.rows.length === 0)\n\t\t},\n\n\t\t/**\n\t\t * Rows resolved from the endpoint payload. The payload (after the\n\t\t * `responsePath` pluck the shared engine applies) must be an ARRAY;\n\t\t * anything else renders as an empty table rather than crashing the\n\t\t * column renderer.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tendpointRows() {\n\t\t\treturn Array.isArray(this.epData) ? this.epData : []\n\t\t},\n\n\t\t/**\n\t\t * Whether the declarative `source` drives a self-fetch: a usable\n\t\t * source, no external rows (external rows always win), no active\n\t\t * endpoint binding (exactly-one-of — endpointSource wins when both\n\t\t * slip past the validator), and no unresolved required token.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tselfFetchActive() {\n\t\t\treturn !!(this.source && this.source.register && this.source.schema)\n\t\t\t\t&& (!this.rows || this.rows.length === 0)\n\t\t\t\t&& !this.endpointActive\n\t\t\t\t&& !this.waitingForContext\n\t\t},\n\n\t\t/**\n\t\t * Query params handed to CnDataTable's self-fetch: the resolved filter\n\t\t * as direct field params (OpenRegister object-search shape),\n\t\t * `_order[field]` entries from `source.order`, and — when\n\t\t * `source.limit` is set — `_limit` of limit + 1 so CnDataTable's\n\t\t * View-all footer can detect that more rows exist while the display\n\t\t * caps at `limit`.\n\t\t *\n\t\t * IN-lists: an ARRAY filter value (either directly on the field or via\n\t\t * the `{ in: [...] }` operator form) is emitted as the bare field with\n\t\t * the array value, which axios serializes as repeated bracket params\n\t\t * (`field[]=a&field[]=b`) — the same shape `buildQueryString` /\n\t\t * `useObjectStore` send and the only IN form OpenRegister parses (a\n\t\t * `field[in]`-style key is NOT understood server-side). Empty arrays\n\t\t * are skipped (no constraint).\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tresolvedFetchParams() {\n\t\t\tconst src = this.source || {}\n\t\t\tconst params = {}\n\t\t\t// A page sort control (`source.pageControls.sort`) replaces the order.\n\t\t\t// An entry with `rank` (a sort by an enum's rank) is the record list's:\n\t\t\t// this table pages, and a rank order over pages needs the server.\n\t\t\tconst picked = pageSort(src.pageControls, this.workspaceCtx, null)\n\t\t\tconst chosen = picked && !Array.isArray(picked.rank) ? picked : null\n\t\t\tconst order = chosen ? { [chosen.field]: chosen.dir } : (src.order || {})\n\t\t\tfor (const [field, dir] of Object.entries(order)) {\n\t\t\t\tparams[`_order[${field}]`] = dir === 'desc' ? 'desc' : 'asc'\n\t\t\t}\n\t\t\tif (typeof src.limit === 'number' && src.limit > 0) {\n\t\t\t\tparams._limit = src.limit + 1\n\t\t\t}\n\t\t\t// `source.extend` (#91 Wave 3): forwarded as OR's repeated\n\t\t\t// `_extend[]` param so virtual/declarative fields (e.g.\n\t\t\t// `calculations` — procest daysOverdue) ride the fetch and are\n\t\t\t// displayable as ordinary columns. Serialized by the shared\n\t\t\t// query builder (array value → repeated `key[]`).\n\t\t\tif (Array.isArray(src.extend) && src.extend.length > 0) {\n\t\t\t\tparams._extend = src.extend.filter((e) => typeof e === 'string' && e !== '')\n\t\t\t}\n\t\t\tconst filter = this.resolvedFilter\n\t\t\tif (filter && typeof filter === 'object') {\n\t\t\t\tfor (const [k, v] of Object.entries(filter)) {\n\t\t\t\t\tif (Array.isArray(v)) {\n\t\t\t\t\t\tif (v.length > 0) {\n\t\t\t\t\t\t\tparams[k] = v\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (v && typeof v === 'object') {\n\t\t\t\t\t\tfor (const [op, ov] of Object.entries(v)) {\n\t\t\t\t\t\t\tif (op === 'in' && Array.isArray(ov)) {\n\t\t\t\t\t\t\t\t// OR's IN form is the bare repeated field param.\n\t\t\t\t\t\t\t\tif (ov.length > 0) {\n\t\t\t\t\t\t\t\t\tparams[k] = ov\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tparams[`${k}[${op}]`] = ov\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (v !== '' && v !== null && v !== undefined) {\n\t\t\t\t\t\tparams[k] = v\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn params\n\t\t},\n\n\t\t/**\n\t\t * `$props` minus the chrome props (`title`, `documentationUrl`,\n\t\t * `widgetId`, `hideWrapper`) and the widget-only props (`source`,\n\t\t * `endpointSource`, `actions`, `rowRoute`), so they are consumed here\n\t\t * and never forwarded to the inner CnDataTable. `undefined` values are\n\t\t * dropped so CnDataTable's own prop defaults apply. When the\n\t\t * declarative `source` is active it supplies `register` / `schemaId` /\n\t\t * `fetchParams` / `limit`; an `@resolve:` register sentinel passes\n\t\t * through unexpanded. When the Wave-2 `endpointSource` is active it\n\t\t * supplies the resolved `rows` + `loading` instead — columns,\n\t\t * formatters, and row navigation apply unchanged on top.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tinnerProps() {\n\t\t\tconst { title, documentationUrl, widgetId, hideWrapper, source, endpointSource, actions, rowRoute, rowClass, schema, ...rest } = this.$props\n\t\t\tconst inner = {}\n\t\t\tfor (const [k, v] of Object.entries(rest)) {\n\t\t\t\tif (v !== undefined) {\n\t\t\t\t\tinner[k] = v\n\t\t\t\t}\n\t\t\t}\n\t\t\t// This widget's `schema` is a slug, while CnDataTable's `schema` is a\n\t\t\t// schema object, so it is not forwarded. Nor is it mapped to `schemaId`:\n\t\t\t// that would turn on CnDataTable's unscoped self-fetch whenever the\n\t\t\t// widget's own rows are empty. Self-fetch comes from `source` alone.\n\t\t\t// `rowClass` is consumed here (function or declarative rules[]) and\n\t\t\t// forwarded to CnDataTable as a compiled `(row) => class` function.\n\t\t\tif (this.compiledRowClass) {\n\t\t\t\tinner.rowClass = this.compiledRowClass\n\t\t\t}\n\t\t\tif (this.selfFetchActive) {\n\t\t\t\tinner.register = this.source.register\n\t\t\t\tinner.schemaId = this.source.schema\n\t\t\t\tinner.fetchParams = this.resolvedFetchParams\n\t\t\t\tif (typeof this.source.limit === 'number' && this.source.limit > 0) {\n\t\t\t\t\tinner.limit = this.source.limit\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.endpointActive) {\n\t\t\t\tinner.rows = this.endpointRows\n\t\t\t\tinner.loading = this.epLoading || this.loading\n\t\t\t}\n\t\t\tif (this.rowRoute) {\n\t\t\t\tinner.rowClickRoute = this.rowRouteFn\n\t\t\t}\n\t\t\treturn inner\n\t\t},\n\n\t\t/**\n\t\t * The effective `rowClass` function forwarded to CnDataTable. A\n\t\t * host-supplied FUNCTION passes straight through; a declarative\n\t\t * rules[] array is compiled into a `(row) => string` that space-joins\n\t\t * every rule whose shared `visibleWhen` predicate holds against the\n\t\t * row (`field` dot-path + `op` + `value`). Null when `rowClass` is\n\t\t * unset or an empty array — the widget then forwards nothing so\n\t\t * CnDataTable's own default applies.\n\t\t *\n\t\t * @return {?(row: object) => string} The row-class function, or null.\n\t\t */\n\t\tcompiledRowClass() {\n\t\t\tconst rc = this.rowClass\n\t\t\tif (typeof rc === 'function') {\n\t\t\t\treturn rc\n\t\t\t}\n\t\t\tif (!Array.isArray(rc) || rc.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst rules = rc\n\t\t\treturn (row) => {\n\t\t\t\tconst classes = []\n\t\t\t\tfor (const rule of rules) {\n\t\t\t\t\tif (!rule || !rule.class) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tconst when = rule.when || {}\n\t\t\t\t\tconst actual = readVisibleWhenPath(row, when.field)\n\t\t\t\t\tif (compareVisibleWhen(actual, when.op || 'eq', when.value)) {\n\t\t\t\t\t\tclasses.push(rule.class)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn classes.join(' ')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Row-click navigation function derived from the `rowRoute` route\n\t\t * name (CnDataTable's `rowClickRoute` shape).\n\t\t *\n\t\t * @return {(row: object) => (object|null)} A vue-router location, or null for a row with no id.\n\t\t */\n\t\trowRouteFn() {\n\t\t\treturn (row) => {\n\t\t\t\tconst id = row && (row.id || (row['@self'] && row['@self'].id))\n\t\t\t\treturn id ? { name: this.rowRoute, params: { id: String(id) } } : null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Actions rendered per row: every non-`object-op` type plus\n\t\t * `object-op` `patch` / `delete` (they mutate THAT row's object).\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\trowScopedActions() {\n\t\t\treturn (this.actions || []).filter((a) => a && (a.type !== 'object-op' || a.op === 'patch' || a.op === 'delete'))\n\t\t},\n\n\t\t/**\n\t\t * `object-op` `create` actions — widget-scoped (no row to mutate), so\n\t\t * they render in the list footer, never in the row menu.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tcreateActions() {\n\t\t\treturn (this.actions || []).filter((a) => a && a.type === 'object-op' && a.op === 'create')\n\t\t},\n\n\t\t/**\n\t\t * Row-scoped actions mapped onto the CnRowActions shape: label + icon\n\t\t * pass through, `object-op` `delete` renders destructive, and the\n\t\t * handler routes back through the widget's confirm-gated dispatcher.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tmappedRowActions() {\n\t\t\treturn this.rowScopedActions.map((action) => ({\n\t\t\t\tlabel: action.label,\n\t\t\t\ticon: action.icon,\n\t\t\t\tdestructive: action.type === 'object-op' && action.op === 'delete',\n\t\t\t\thandler: (row) => this.onActionTriggered(action, row),\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Host-supplied CnDataTable scoped slots to forward (keys only). The\n\t\t * `row-actions` slot is withheld while the widget renders its own\n\t\t * declarative actions menu.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tforwardedScopedSlots() {\n\t\t\tconst out = {}\n\t\t\tfor (const name of Object.keys(this.$slots || {})) {\n\t\t\t\tif (name === 'row-actions' && this.rowScopedActions.length > 0) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tout[name] = true\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/**\n\t\t * Confirmation question for the pending confirm-gated action —\n\t\t * destructive copy for `delete`, a generic confirm otherwise.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tconfirmMessage() {\n\t\t\tif (this.confirmAction && this.confirmAction.op === 'delete') {\n\t\t\t\treturn t('nextcloud-vue', 'Are you sure you want to delete this item? This action cannot be undone.')\n\t\t\t}\n\t\t\treturn t('nextcloud-vue', 'Are you sure you want to continue?')\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Entry point for every declarative action trigger (row menu or\n\t\t * footer create button). `object-op` `delete` ALWAYS confirms;\n\t\t * `patch` / `create` confirm only when the action sets\n\t\t * `confirm: true`; everything else dispatches immediately.\n\t\t *\n\t\t * @param {object} action The manifest action.\n\t\t * @param {object|null} row The row for row-scoped actions (null for create).\n\t\t * @return {Promise<void>|void}\n\t\t */\n\t\tonActionTriggered(action, row) {\n\t\t\tif (action && action.type === 'object-op' && (action.op === 'delete' || action.confirm === true)) {\n\t\t\t\tthis.confirmAction = action\n\t\t\t\tthis.confirmRow = row\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn this.runAction(action, row)\n\t\t},\n\n\t\t/**\n\t\t * Confirm-dialog primary button: run the pending action and report\n\t\t * the outcome back into the dialog's result phase.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onConfirmConfirmed() {\n\t\t\tconst outcome = await this.runAction(this.confirmAction, this.confirmRow)\n\t\t\tconst dialog = this.$refs.confirmDialog\n\t\t\tif (dialog) {\n\t\t\t\tdialog.setResult(outcome.ok ? { success: true } : { error: outcome.error })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Close/cancel the confirm dialog and clear the pending action.\n\t\t */\n\t\tcloseConfirm() {\n\t\t\tthis.confirmAction = null\n\t\t\tthis.confirmRow = null\n\t\t},\n\n\t\t/**\n\t\t * Dispatch an action. Non-mutating types go through the page's\n\t\t * pre-bound `cnDispatchAction` (falling back to a bare\n\t\t * `dispatchAction`); for `handler` actions the row is appended as the\n\t\t * final handler argument so row context reaches the registry function.\n\t\t * `object-op` actions dispatch via the shared object store — a\n\t\t * rejected (RBAC) write surfaces `opError` and mutates NO local state;\n\t\t * a success clears the error and refreshes the self-fetched rows.\n\t\t *\n\t\t * @param {object} action The manifest action.\n\t\t * @param {object|null} row The target row (null for create).\n\t\t * @return {Promise<{ok: boolean, error?: string}>}\n\t\t */\n\t\tasync runAction(action, row) {\n\t\t\tif (!action) {\n\t\t\t\treturn { ok: false, error: '' }\n\t\t\t}\n\t\t\tif (action.type !== 'object-op') {\n\t\t\t\tconst wrapped = (!action.type || action.type === 'handler')\n\t\t\t\t\t? { ...action, args: [...(action.args || []), row] }\n\t\t\t\t\t: action\n\t\t\t\tif (typeof this.cnDispatchAction === 'function') {\n\t\t\t\t\tthis.cnDispatchAction(wrapped)\n\t\t\t\t} else {\n\t\t\t\t\tdispatchAction(wrapped, { router: this.$router || null })\n\t\t\t\t}\n\t\t\t\treturn { ok: true }\n\t\t\t}\n\n\t\t\tconst store = this.getObjectStore()\n\t\t\tconst result = await dispatchAction(action, {\n\t\t\t\tobjectStore: store,\n\t\t\t\tsource: this.source,\n\t\t\t\trow,\n\t\t\t})\n\t\t\tconst ok = !(result === null || result === false || result === undefined)\n\t\t\tif (!ok) {\n\t\t\t\tconst error = this.readStoreError(store)\n\t\t\t\tthis.opError = error\n\t\t\t\treturn { ok: false, error }\n\t\t\t}\n\t\t\tthis.opError = ''\n\t\t\tthis.refresh()\n\t\t\t/**\n\t\t\t * @event object-op Emitted after a successful declarative mutation\n\t\t\t * so a host that supplies external `rows` can refetch them.\n\t\t\t * @type {{action: object, row: (object|null), result: unknown}}\n\t\t\t */\n\t\t\tthis.$emit('object-op', { action, row, result })\n\t\t\treturn { ok: true }\n\t\t},\n\n\t\t/**\n\t\t * Re-run the active fetch: the endpoint binding (force-refetch past\n\t\t * the shared cache) or the inner CnDataTable's self-fetch. No-op when\n\t\t * the widget is fed external rows.\n\t\t */\n\t\trefresh() {\n\t\t\tif (this.endpointActive) {\n\t\t\t\tthis.epRefetch()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst table = this.$refs.dataTable\n\t\t\tif (this.selfFetchActive && table && typeof table.fetchData === 'function') {\n\t\t\t\ttable.fetchData()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * The shared object store instance, or null when no Pinia is active\n\t\t * (`dispatchAction` then warns and no-ops).\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tgetObjectStore() {\n\t\t\ttry {\n\t\t\t\treturn useObjectStore()\n\t\t\t} catch {\n\t\t\t\treturn null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Human-readable message for the last store error on this widget's\n\t\t * source type (RBAC rejection, network failure, …).\n\t\t *\n\t\t * @param {object|null} store The object store used for the dispatch.\n\t\t * @return {string}\n\t\t */\n\t\treadStoreError(store) {\n\t\t\ttry {\n\t\t\t\tif (store && this.source) {\n\t\t\t\t\tconst type = resolveObjectOpType(store, this.source)\n\t\t\t\t\tconst err = store.errors && store.errors[type]\n\t\t\t\t\tif (err && err.message) {\n\t\t\t\t\t\treturn err.message\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// fall through to the generic message\n\t\t\t}\n\t\t\treturn t('nextcloud-vue', 'The operation was rejected')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-widget-object-table {\n\twidth: 100%;\n}\n\n.cn-widget-object-table__footer {\n\tdisplay: flex;\n\tgap: 4px;\n\tpadding: 4px 8px;\n\tborder-top: 1px solid var(--color-border);\n}\n\n.cn-widget-object-table__error {\n\tcolor: var(--color-text-error, var(--color-error-text));\n\tfont-size: 0.85em;\n\tmargin: 4px 8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MAAM,EAAE,GAAG,EAAE,QAAQ,EAAA;AAC/C,GAAA,OAAO,EAAE,EAAE,EAAE,IAAK,EAAA;GAClB;;AAED;;;;;AAKA,EAAA,OAAO,GAAG;GACT,IAAI,IAAI,CAAC,cAAc,EAAE;AACxB,IAAA,IAAI,CAAC,SAAS,GAAC;IACf,MAAK;AACN,IAAA;AACA,GAAA,MAAM,KAAM,GAAE,IAAI,CAAC,KAAK,CAAC,UAAQ;AACjC,GAAA,IAAI,IAAI,CAAC,eAAgB,IAAG,KAAI,IAAK,OAAO,KAAK,CAAC,SAAU,KAAI,UAAU,EAAE;AAC3E,IAAA,KAAK,CAAC,SAAS,GAAC;AACjB,IAAA;GACA;;AAED;;AAEC;AACA;AACA;;AAED,EAAA,cAAc,GAAG;AAChB,GAAA,IAAI;AACH,IAAA,OAAO,cAAc,EAAC;AACvB,IAAA,CAAE,MAAM;AACP,IAAA,OAAO,IAAG;AACX,IAAA;GACA;;AAED;;AAEC;AACA;;AAEA;;AAED,EAAA,cAAc,CAAC,KAAK,EAAE;AACrB,GAAA,IAAI;IACH,IAAI,KAAI,IAAK,IAAI,CAAC,MAAM,EAAE;KACzB,MAAM,OAAO,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAA;AACnD,KAAA,MAAM,GAAI,GAAE,KAAK,CAAC,MAAO,IAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAA;AAC7C,KAAA,IAAI,GAAI,IAAG,GAAG,CAAC,OAAO,EAAE;AACvB,MAAA,OAAO,GAAG,CAAC,OAAM;AAClB,MAAA;AACD,KAAA;AACD,IAAA,CAAE,MAAM;AACP;AACD,IAAA;GACA,OAAOA,SAAC,CAAC,eAAe,EAAE,4BAA4B,CAAA;GACtD;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnWidgetObjectTable.vue2.js","sources":["../../../../src/components/CnWidgetObjectTable/CnWidgetObjectTable.vue"],"sourcesContent":["<!--\n CnWidgetObjectTable — built-in v2 widget wrapping CnDataTable.\n\n Referenced in v2 manifests via `widgetKey: \"object-table\"`. Renders the\n table on the shared CnWidgetWrapper chrome (title + standard overflow\n Actions menu: Refresh / Documentation / Request a feature) and forwards\n all data props to CnDataTable so the table itself is a transparent\n pass-through.\n\n ADR-049 enrichment: a declarative token-resolved `source` drives\n CnDataTable's existing self-fetch (externally supplied `rows` always win),\n the compact-list surface (hideHeader / borderless / rowRoute /\n viewAllRoute / emptyText / rowIcon / #footer) passes straight through,\n and a declarative `actions[]` renders row-scoped actions via CnRowActions\n plus widget-scoped `object-op` create affordances in the footer.\n\n Spec: REQ-MVR-006 (manifest-v2-renderer) — built-in widget: object-table\n Spec: openspec/changes/list-widget-enrichment/specs/manifest-v2-renderer/spec.md\n-->\n<template>\n\t<!-- `refreshing` mirrors the endpoint fetch so the chrome's Refresh\n\t action spins (and stays disabled) for the real duration of an\n\t in-flight refetch. -->\n\t<component\n\t\t:is=\"hideWrapper ? 'CnWidgetHostShell' : 'CnWidgetWrapper'\"\n\t\tv-bind=\"hideWrapper ? {} : { title, widgetId, documentationUrl, flush: true, refreshing: epLoading }\">\n\t\t<div class=\"cn-widget-object-table\">\n\t\t\t<CnDataTable ref=\"dataTable\" v-bind=\"{ ...innerProps, ...$attrs }\">\n\t\t\t\t<!-- Forward every host-supplied CnDataTable scoped slot verbatim\n\t\t\t\t (#footer { total, shown }, #empty, #column-<key>, …). The\n\t\t\t\t #row-actions slot is NOT forwarded while the widget renders\n\t\t\t\t its own declarative actions[] menu. -->\n\t\t\t\t<template v-for=\"(_, name) in forwardedScopedSlots\" #[name]=\"slotData\">\n\t\t\t\t\t<!-- @slot Any CnDataTable scoped slot, forwarded verbatim — e.g. #footer ({ total, shown }), #empty, #column-<key>. #row-actions is withheld while the declarative actions[] menu renders. -->\n\t\t\t\t\t<slot :name=\"name\" v-bind=\"slotData\" />\n\t\t\t\t</template>\n\t\t\t\t<template v-if=\"rowScopedActions.length > 0\" #row-actions=\"{ row }\">\n\t\t\t\t\t<CnRowActions :actions=\"mappedRowActions\" :row=\"row\" />\n\t\t\t\t</template>\n\t\t\t</CnDataTable>\n\n\t\t\t<!-- Widget-scoped object-op create affordance: `create` has no row\n\t\t\t to mutate, so it renders in the list footer, never inside the\n\t\t\t per-row actions menu (ADR-049 / list-widget-enrichment). -->\n\t\t\t<div v-if=\"createActions.length > 0\" class=\"cn-widget-object-table__footer\">\n\t\t\t\t<NcButton\n\t\t\t\t\tv-for=\"action in createActions\"\n\t\t\t\t\t:key=\"action.id || action.label\"\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t:data-testid=\"`cn-widget-create-${action.id || 'action'}`\"\n\t\t\t\t\t@click=\"onActionTriggered(action, null)\">\n\t\t\t\t\t<template v-if=\"action.icon\" #icon>\n\t\t\t\t\t\t<CnIcon :name=\"action.icon\" :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ action.label }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\n\t\t\t<!-- A rejected write (OpenRegister RBAC) surfaces here — local row\n\t\t\t state is never mutated on failure (the store only writes its\n\t\t\t caches on success). -->\n\t\t\t<p v-if=\"opError\" class=\"cn-widget-object-table__error\" data-testid=\"cn-widget-object-table-error\">\n\t\t\t\t{{ opError }}\n\t\t\t</p>\n\n\t\t\t<CnConfirmDialog\n\t\t\t\tv-if=\"confirmAction\"\n\t\t\t\tref=\"confirmDialog\"\n\t\t\t\t:dialogTitle=\"confirmAction.label\"\n\t\t\t\t:message=\"confirmMessage\"\n\t\t\t\t:variant=\"confirmAction.op === 'delete' ? 'error' : 'primary'\"\n\t\t\t\t:confirmLabel=\"confirmAction.label\"\n\t\t\t\t@confirm=\"onConfirmConfirmed\"\n\t\t\t\t@close=\"closeConfirm\" />\n\t\t</div>\n\t</component>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcButton } from '@nextcloud/vue'\nimport { inject, ref } from 'vue'\nimport CnConfirmDialog from '../../dialogs/CnConfirmDialog.vue'\nimport CnDataTable from '../CnDataTable/CnDataTable.vue'\nimport { useEndpointSource } from '../../composables/useEndpointSource.js'\nimport { useObjectStore } from '../../store/useObjectStore.js'\nimport { dispatchAction, resolveObjectOpType } from '../../utils/actionsDispatcher.js'\nimport { resolveObjectTokenContext } from '../../utils/detailObjectContext.js'\nimport { pageFilter, pageSort } from '../../utils/pageControls.js'\nimport { dropOptionalUnresolved, hasUnresolvedTokens, resolveFilterTokens } from '../../utils/resolveFilterTokens.js'\nimport { fieldsFromSchema } from '../../utils/schema.js'\nimport { compareVisibleWhen, readVisibleWhenPath } from '../../utils/visibleWhen.js'\nimport { CnIcon } from '../CnIcon/index.js'\nimport { CnRowActions } from '../CnRowActions/index.js'\nimport { CnWidgetWrapper } from '../CnWidgetWrapper/index.js'\n// Chrome-less pass-through used when `hideWrapper` is set (see hostShell.js\n// for why it lives in its own module).\nimport { CnWidgetHostShell } from './hostShell.js'\n\n/**\n * CnWidgetObjectTable — built-in v2 widget wrapping CnDataTable.\n *\n * Renders a data table on the shared CnWidgetWrapper chrome, which supplies\n * the widget title and the standard overflow Actions menu (Refresh /\n * Documentation / Request a feature). All data props are forwarded to the\n * inner CnDataTable; the chrome props (`title`, `documentationUrl`,\n * `widgetId`) are consumed by the wrapper and not passed down.\n *\n * A declarative `source` makes the widget self-fetch from OpenRegister:\n * `source.filter` is token-resolved with the shared `resolveFilterTokens`\n * grammar (`@me`, `@today`, `@workspace.*`, `?`-optional clauses dropped\n * when unresolved via `dropOptionalUnresolved`), `source.order` /\n * `source.limit` drive the fetch, and an `@resolve:` register sentinel is\n * passed through unexpanded (resolution is the host loader's job).\n * Externally supplied `rows` always win — the pre-existing pass-through\n * interface is unchanged.\n *\n * Wave 2 (#91): a declarative `endpointSource` (`{ url, method?, params?,\n * responsePath? }`) is the alternative to the OpenRegister `source` — rows\n * come from an app REST endpoint's payload at `responsePath`, fetched by the\n * shared `useEndpointSource` engine (token-resolved params, request dedup +\n * short-TTL cache, `cn:page:refresh` / `cn:widget:refresh` subscription).\n * Exactly one of `source` | `endpointSource`; columns / formatters /\n * `rowRoute` / `actions` apply unchanged on top of endpoint rows.\n *\n * A declarative `actions[]` array renders `patch` / `delete` `object-op`\n * actions (and reused `handler` / `open-modal` / `open-page` / `navigate`\n * actions) per row through `CnRowActions`; an `object-op` `create` action\n * renders as a widget-scoped footer affordance. `delete` is ALWAYS\n * confirm-gated through `CnConfirmDialog`; `patch` / `create` confirm only\n * on `confirm: true`. Mutations dispatch via the shared object store —\n * the manifest declares intent only, OpenRegister RBAC is the authority,\n * and a rejected write surfaces as an error without local mutation.\n *\n * A declarative `rowClass` (#91) — `[{ when: { field, op?, value }, class }]` reusing\n * the shared `visibleWhen` predicate grammar — is compiled into CnDataTable's\n * `rowClass` function so overdue / at-risk rows can be highlighted from the manifest\n * (a host-supplied `rowClass` FUNCTION still passes straight through).\n */\nexport default {\n\tname: 'CnWidgetObjectTable',\n\n\tcomponents: { CnDataTable, CnWidgetWrapper, CnWidgetHostShell, CnRowActions, CnIcon, NcButton, CnConfirmDialog },\n\n\tinject: {\n\t\t/**\n\t\t * Detail-page object context (`{ objectId, object, register, schema }`)\n\t\t * provided by CnDetailPage — enables `@objectId` / `@object.<field>`\n\t\t * tokens in `source.filter`. Null on dashboards.\n\t\t */\n\t\tcnObjectContext: { default: null },\n\t\t/**\n\t\t * v2 slot-grid detail context holder (`{ value: { objectData, schema,\n\t\t * objectType, objectId, register, store } | null }`) provided by\n\t\t * CnPageRenderer — backfills the object token context so\n\t\t * `@objectId` / `@object.<field>` resolve on detail surfaces where\n\t\t * CnDetailPage is not an ancestor (#91 Wave 3).\n\t\t */\n\t\tcnDetailObjectContext: { default: null },\n\t\t/**\n\t\t * Page-level workspace context (reactive `ref({})`) provided by\n\t\t * CnDashboardPage — enables `@workspace.<key>` tokens in\n\t\t * `source.filter`. Null on pages that don't provide it.\n\t\t */\n\t\tcnWorkspaceContext: { default: null },\n\t\t/**\n\t\t * Pre-bound `dispatchAction` provided by CnPageRenderer (router,\n\t\t * registry, handlers, openModal already wired). Used for the reused\n\t\t * non-mutating action types; falls back to a direct `dispatchAction`\n\t\t * call when mounted outside a CnPageRenderer tree.\n\t\t */\n\t\tcnDispatchAction: { default: null },\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Widget title shown in the CnWidgetWrapper header.\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: () => t('nextcloud-vue', 'Table'),\n\t\t},\n\n\t\t/**\n\t\t * Documentation link surfaced in the widget's overflow Actions menu.\n\t\t * Empty (the default) hides the Documentation item; the Refresh and\n\t\t * Request-a-feature items always render.\n\t\t */\n\t\tdocumentationUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Stable id forwarded to the widget chrome for the Refresh /\n\t\t * Request-a-feature payloads.\n\t\t */\n\t\twidgetId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Render content-only, WITHOUT the widget's own CnWidgetWrapper\n\t\t * chrome. Set by hosts that already provide the card chrome — e.g.\n\t\t * CnDashboardPage's dashboard widget grid, whose registry branch\n\t\t * wraps every catalog widget in its own CnWidgetWrapper (a naive\n\t\t * mount would double-card). Default `false` keeps the pre-existing\n\t\t * self-chromed v2 rendering byte-for-byte.\n\t\t */\n\t\thideWrapper: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Register slug. Forwarded to CnDataTable. */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Schema slug. Forwarded to CnDataTable. */\n\t\tschema: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Column definitions. Forwarded to CnDataTable — bare string keys OR\n\t\t * the object form (`{ key, label, sortable, width, cellClass,\n\t\t * formatter, widget, format, aggregate }`) both pass straight through.\n\t\t *\n\t\t * A column that holds a reference shows the referenced object's label\n\t\t * with `labelField` (the property to show) and/or `resolve`\n\t\t * (`{ register, schema, labelField? }`, where the reference points).\n\t\t * Without `resolve` the target is read off the source schema's `$ref`\n\t\t * for that property. Such a column renders as an `fkResolve` cell.\n\t\t *\n\t\t * @type {Array<object|string>}\n\t\t */\n\t\tcolumns: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** Rows array. Forwarded to CnDataTable. External rows always win over `source`. */\n\t\trows: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** Loading state. Forwarded to CnDataTable. */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Declarative self-fetch source (ADR-049). When set and no external\n\t\t * `rows` are supplied, the widget resolves `filter` @-tokens and\n\t\t * drives CnDataTable's existing self-fetch with the resolved filter,\n\t\t * `order`, and `limit`. `register` MAY carry an `@resolve:` sentinel —\n\t\t * it is passed through unexpanded. `extend` (#91 Wave 3) forwards\n\t\t * OpenRegister `_extend[]` values (e.g. `[\"calculations\"]`) on the\n\t\t * fetch so virtual/declarative calc fields ride along and render as\n\t\t * ordinary columns. Default `null` keeps the pre-existing\n\t\t * pass-through behaviour byte-for-byte.\n\t\t *\n\t\t * @type {{register?: string, schema?: string, filter?: object, order?: object, limit?: number, extend?: string[]}|null}\n\t\t */\n\t\tsource: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Endpoint data binding (Wave 2, #91) — the alternative to the\n\t\t * OpenRegister `source` for rows an app REST endpoint computes (e.g. a\n\t\t * per-source performance report). Rows come from the payload at\n\t\t * `responsePath` (a dot-path; the plucked value must be an array —\n\t\t * anything else renders as empty). `params` values use the shared\n\t\t * filter-token grammar (`@workspace.dateFrom?`, `@me`, `@today±Nd`, …)\n\t\t * and re-resolve + refetch when the page context changes. Requests are\n\t\t * deduped + short-TTL cached per (url+params) by the shared\n\t\t * `useEndpointSource` engine, which also subscribes to\n\t\t * `cn:page:refresh` / `cn:widget:refresh`. Exactly one of `source` |\n\t\t * `endpointSource` (validator-enforced); external `rows` still win\n\t\t * over both. `columns` / formatters / `rowRoute` / `actions` apply\n\t\t * unchanged on top of endpoint rows.\n\t\t *\n\t\t * @type {{url: string, method?: string, params?: object, responsePath?: string}|null}\n\t\t */\n\t\tendpointSource: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Declarative actions (unified manifest action shape — `handler` |\n\t\t * `open-modal` | `open-page` | `navigate` | `object-op`). `object-op`\n\t\t * `patch` / `delete` (and every non-mutating type) render per row via\n\t\t * CnRowActions; `object-op` `create` renders as a widget-scoped footer\n\t\t * affordance. `delete` always confirms; `patch` / `create` confirm on\n\t\t * `confirm: true`. Authorization-shaped fields on an action have no\n\t\t * effect — OpenRegister RBAC is the only authority.\n\t\t *\n\t\t * @type {Array<object>}\n\t\t */\n\t\tactions: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * Hide the column-header row. Forwarded to CnDataTable — the compact\n\t\t * dashboard-list surface.\n\t\t */\n\t\thideHeader: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Drop CnDataTable's card chrome (border, radius, shadow) so the table\n\t\t * sits flush inside the widget card. Forwarded to CnDataTable.\n\t\t */\n\t\tborderless: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Fit the table to the tile: the title column (a column's `grow: true`,\n\t\t * else `title` or `name`, else the first) shrinks and ends in an\n\t\t * ellipsis so the trailing columns stay visible. On by default; pass\n\t\t * `false` for the table's own auto layout. Forwarded to CnDataTable.\n\t\t *\n\t\t * @spec openspec/changes/narrow-object-table-widgets/specs/narrow-object-table-widgets/spec.md#requirement-a-narrow-object-table-keeps-its-trailing-columns-in-view\n\t\t */\n\t\tfitWidth: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Route NAME for row-click navigation. Mapped onto CnDataTable's\n\t\t * `rowClickRoute` as `{ name: rowRoute, params: { id } }` with the\n\t\t * row's `id` (or `@self.id`). Empty (the default) = no navigation.\n\t\t */\n\t\trowRoute: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Client-side row cap, forwarded to CnDataTable (`0` = all rows).\n\t\t * This is what makes `viewAllRoute` reachable for `endpointSource`\n\t\t * tables: the endpoint's full payload stays the `totalRowCount`\n\t\t * while CnDataTable renders only the first `limit` rows, so the\n\t\t * \"View all\" footer condition (total > shown) can finally hold.\n\t\t * The OpenRegister `source` mode keeps using `source.limit` (an\n\t\t * explicit assignment that wins over this passthrough).\n\t\t */\n\t\tlimit: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * vue-router route object for the \"View all\" footer link. Forwarded\n\t\t * to CnDataTable (footer shows when the rows are a `limit`-ed subset).\n\t\t *\n\t\t * @type {object|null}\n\t\t */\n\t\tviewAllRoute: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** Pre-translated \"View all\" footer label. Forwarded to CnDataTable. */\n\t\tviewAllLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/** Text shown when there are no rows. Forwarded to CnDataTable. */\n\t\temptyText: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * App wording for an unavailable personal lens (a `source.filter._recent`\n\t\t * tile on an instance that does not log reads), keyed `<lens>.<reason>`\n\t\t * or `<reason>`. Forwarded to CnDataTable, which shows the library's\n\t\t * object-neutral text without it.\n\t\t *\n\t\t * @spec openspec/changes/lens-says-why-it-is-empty/specs/personal-lens-availability/spec.md#requirement-an-unavailable-lens-explains-its-empty-page\n\t\t */\n\t\tlensReasonTexts: {\n\t\t\ttype: Object,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * Leading per-row icon: a static MDI icon name string, or a function\n\t\t * `(row) => iconName`. Forwarded to CnDataTable.\n\t\t *\n\t\t * @type {string|((row: object) => string)|null}\n\t\t */\n\t\trowIcon: {\n\t\t\ttype: [String, Function],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Per-row CSS class binding (#91). Two forms:\n\t\t * - a FUNCTION `(row) => string` — passed straight through to\n\t\t * CnDataTable's `rowClass` (the pre-existing host-supplied contract).\n\t\t * - an ARRAY of declarative rules `[{ when: { field, op?, value }, class }]`\n\t\t * compiled here into that function. Each rule adds its `class` to a\n\t\t * row when the shared `visibleWhen` predicate holds against the row:\n\t\t * `field` is a dot-path into the row, `op` is `eq|neq|gt|gte|lt|lte`\n\t\t * (default `eq`), `value` is the literal right-hand side. Rules are\n\t\t * evaluated in order and every matching `class` is space-joined, so an\n\t\t * overdue / at-risk row can be highlighted declaratively from a\n\t\t * manifest with no bespoke function. Default `null` = no row class.\n\t\t *\n\t\t * @type {((row: object) => string)|Array<{when: {field: string, op?: string, value: unknown}, class: string}>|null}\n\t\t */\n\t\trowClass: {\n\t\t\ttype: [Function, Array],\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\temits: ['object-op'],\n\n\tsetup(props) {\n\t\t// Endpoint binding (Wave 2, #91): the shared useEndpointSource engine\n\t\t// owns token resolution, request dedup + TTL caching, and the\n\t\t// cn:page:refresh / cn:widget:refresh subscriptions (the widget's own\n\t\t// `widgetId` is matched against widget-scoped refresh payloads).\n\t\t// No-op while `endpointSource` is null, so the OpenRegister `source`\n\t\t// self-fetch path is untouched. Injects re-read in setup (same\n\t\t// resolution as the Options `inject` block).\n\t\tconst objectCtxRaw = inject('cnObjectContext', null)\n\t\tconst detailCtxRaw = inject('cnDetailObjectContext', null)\n\t\tconst workspaceRaw = inject('cnWorkspaceContext', ref(null))\n\t\tconst appConfigRaw = inject('cnAppConfig', ref({}))\n\t\tconst unwrap = (v) => ((v && typeof v === 'object' && 'value' in v) ? v.value : v)\n\t\t// External rows always win — and suppress the request entirely (the\n\t\t// pre-existing \"when rows are provided, no API calls are made\"\n\t\t// contract), so the getter resolves to null while `rows` are supplied.\n\t\tconst { data, loading, error, refetch } = useEndpointSource(\n\t\t\t() => ((props.rows && props.rows.length > 0) ? null : props.endpointSource),\n\t\t\t{\n\t\t\t\tctx: () => ({\n\t\t\t\t\t...(resolveObjectTokenContext(objectCtxRaw, detailCtxRaw) || {}),\n\t\t\t\t\tworkspace: unwrap(workspaceRaw) || {},\n\t\t\t\t\tconfig: unwrap(appConfigRaw) || {},\n\t\t\t\t}),\n\t\t\t\twidgetId: () => props.widgetId,\n\t\t\t},\n\t\t)\n\t\treturn { epData: data, epLoading: loading, epError: error, epRefetch: refetch }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** Error message from the last rejected object-op write ('' = none). */\n\t\t\topError: '',\n\t\t\t/** @type {object|null} The object-op action awaiting confirmation (null = no dialog). */\n\t\t\tconfirmAction: null,\n\t\t\t/** @type {object|null} The row the pending confirm-gated action targets. */\n\t\t\tconfirmRow: null,\n\t\t\t/** Where each label column's references point, read off the source schema, by column key. */\n\t\t\trefTargets: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The merged detail-page object context for token resolution — both\n\t\t * detail-surface injects, holder fields backfilling (#91 Wave 3) —\n\t\t * or null on surfaces (dashboards) that don't provide one.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tobjectCtx() {\n\t\t\treturn resolveObjectTokenContext(this.cnObjectContext, this.cnDetailObjectContext)\n\t\t},\n\n\t\t/**\n\t\t * The unwrapped workspace context bag (or null). Vue 2.7 inject may\n\t\t * hand back a raw ref; unwrap `.value` for token resolution.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tworkspaceCtx() {\n\t\t\tconst c = this.cnWorkspaceContext\n\t\t\tif (!c) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn (typeof c === 'object' && 'value' in c) ? c.value : c\n\t\t},\n\n\t\t/**\n\t\t * Token-resolution context merged from the detail-page object context\n\t\t * and the page-level workspace bag (`@workspace.<key>`).\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\ttokenCtx() {\n\t\t\tconst base = this.objectCtx ? { ...this.objectCtx } : {}\n\t\t\tbase.workspace = this.workspaceCtx || {}\n\t\t\treturn base\n\t\t},\n\n\t\t/**\n\t\t * `source.filter` with every @-token resolved against `tokenCtx`, then\n\t\t * with any UNRESOLVED OPTIONAL clause (`@workspace.<key>?`) dropped —\n\t\t * an optional clause simply shows all rows until its context is set.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tresolvedFilter() {\n\t\t\tconst filter = pageFilter(this.source && this.source.pageControls, this.workspaceCtx, this.source && this.source.filter)\n\t\t\treturn dropOptionalUnresolved(resolveFilterTokens(filter, this.tokenCtx))\n\t\t},\n\n\t\t/**\n\t\t * Whether a REQUIRED context token in `source.filter` is still\n\t\t * unresolved — the widget then skips the fetch instead of querying the\n\t\t * whole register.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\twaitingForContext() {\n\t\t\treturn !!this.source && hasUnresolvedTokens(this.resolvedFilter)\n\t\t},\n\n\t\t/**\n\t\t * Whether the Wave-2 `endpointSource` drives the rows: a usable\n\t\t * endpoint config and no external rows (external rows always win).\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tendpointActive() {\n\t\t\treturn !!(this.endpointSource && this.endpointSource.url)\n\t\t\t\t&& (!this.rows || this.rows.length === 0)\n\t\t},\n\n\t\t/**\n\t\t * Rows resolved from the endpoint payload. The payload (after the\n\t\t * `responsePath` pluck the shared engine applies) must be an ARRAY;\n\t\t * anything else renders as an empty table rather than crashing the\n\t\t * column renderer.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tendpointRows() {\n\t\t\treturn Array.isArray(this.epData) ? this.epData : []\n\t\t},\n\n\t\t/**\n\t\t * Whether the declarative `source` drives a self-fetch: a usable\n\t\t * source, no external rows (external rows always win), no active\n\t\t * endpoint binding (exactly-one-of — endpointSource wins when both\n\t\t * slip past the validator), and no unresolved required token.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tselfFetchActive() {\n\t\t\treturn !!(this.source && this.source.register && this.source.schema)\n\t\t\t\t&& (!this.rows || this.rows.length === 0)\n\t\t\t\t&& !this.endpointActive\n\t\t\t\t&& !this.waitingForContext\n\t\t},\n\n\t\t/**\n\t\t * Query params handed to CnDataTable's self-fetch: the resolved filter\n\t\t * as direct field params (OpenRegister object-search shape),\n\t\t * `_order[field]` entries from `source.order`, and — when\n\t\t * `source.limit` is set — `_limit` of limit + 1 so CnDataTable's\n\t\t * View-all footer can detect that more rows exist while the display\n\t\t * caps at `limit`.\n\t\t *\n\t\t * IN-lists: an ARRAY filter value (either directly on the field or via\n\t\t * the `{ in: [...] }` operator form) is emitted as the bare field with\n\t\t * the array value, which axios serializes as repeated bracket params\n\t\t * (`field[]=a&field[]=b`) — the same shape `buildQueryString` /\n\t\t * `useObjectStore` send and the only IN form OpenRegister parses (a\n\t\t * `field[in]`-style key is NOT understood server-side). Empty arrays\n\t\t * are skipped (no constraint).\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tresolvedFetchParams() {\n\t\t\tconst src = this.source || {}\n\t\t\tconst params = {}\n\t\t\t// A page sort control (`source.pageControls.sort`) replaces the order.\n\t\t\t// An entry with `rank` (a sort by an enum's rank) is the record list's:\n\t\t\t// this table pages, and a rank order over pages needs the server.\n\t\t\tconst picked = pageSort(src.pageControls, this.workspaceCtx, null)\n\t\t\tconst chosen = picked && !Array.isArray(picked.rank) ? picked : null\n\t\t\tconst order = chosen ? { [chosen.field]: chosen.dir } : (src.order || {})\n\t\t\tfor (const [field, dir] of Object.entries(order)) {\n\t\t\t\tparams[`_order[${field}]`] = dir === 'desc' ? 'desc' : 'asc'\n\t\t\t}\n\t\t\tif (typeof src.limit === 'number' && src.limit > 0) {\n\t\t\t\tparams._limit = src.limit + 1\n\t\t\t}\n\t\t\t// `source.extend` (#91 Wave 3): forwarded as OR's repeated\n\t\t\t// `_extend[]` param so virtual/declarative fields (e.g.\n\t\t\t// `calculations` — procest daysOverdue) ride the fetch and are\n\t\t\t// displayable as ordinary columns. Serialized by the shared\n\t\t\t// query builder (array value → repeated `key[]`).\n\t\t\tif (Array.isArray(src.extend) && src.extend.length > 0) {\n\t\t\t\tparams._extend = src.extend.filter((e) => typeof e === 'string' && e !== '')\n\t\t\t}\n\t\t\tconst filter = this.resolvedFilter\n\t\t\tif (filter && typeof filter === 'object') {\n\t\t\t\tfor (const [k, v] of Object.entries(filter)) {\n\t\t\t\t\tif (Array.isArray(v)) {\n\t\t\t\t\t\tif (v.length > 0) {\n\t\t\t\t\t\t\tparams[k] = v\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (v && typeof v === 'object') {\n\t\t\t\t\t\tfor (const [op, ov] of Object.entries(v)) {\n\t\t\t\t\t\t\tif (op === 'in' && Array.isArray(ov)) {\n\t\t\t\t\t\t\t\t// OR's IN form is the bare repeated field param.\n\t\t\t\t\t\t\t\tif (ov.length > 0) {\n\t\t\t\t\t\t\t\t\tparams[k] = ov\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tparams[`${k}[${op}]`] = ov\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (v !== '' && v !== null && v !== undefined) {\n\t\t\t\t\t\tparams[k] = v\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn params\n\t\t},\n\n\t\t/**\n\t\t * Columns that ask for the label of the object they reference\n\t\t * (`labelField` or `resolve`) and draw no cell widget of their own.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t * @spec openspec/changes/dashboard-table-reference-labels/specs/dashboard-page/spec.md#requirement-a-dashboard-table-shows-a-referenced-objects-label\n\t\t */\n\t\trefLabelColumns() {\n\t\t\treturn (this.columns || []).filter((col) => col && typeof col === 'object' && !col.widget\n\t\t\t\t&& ((typeof col.labelField === 'string' && col.labelField !== '') || (col.resolve && typeof col.resolve === 'object')))\n\t\t},\n\n\t\t/**\n\t\t * The columns handed to CnDataTable: a label column whose target is\n\t\t * known renders as an `fkResolve` cell; every other column as given.\n\t\t *\n\t\t * @return {Array<object|string>}\n\t\t * @spec openspec/changes/dashboard-table-reference-labels/specs/dashboard-page/spec.md#requirement-a-dashboard-table-shows-a-referenced-objects-label\n\t\t */\n\t\trenderedColumns() {\n\t\t\tif (this.refLabelColumns.length === 0) {\n\t\t\t\treturn this.columns\n\t\t\t}\n\t\t\treturn this.columns.map((col) => {\n\t\t\t\tif (!this.refLabelColumns.includes(col)) {\n\t\t\t\t\treturn col\n\t\t\t\t}\n\t\t\t\tconst target = this.refTargetOf(col)\n\t\t\t\tif (!target) {\n\t\t\t\t\treturn col\n\t\t\t\t}\n\t\t\t\tconst labelField = (col.resolve && typeof col.resolve.labelField === 'string' && col.resolve.labelField) || col.labelField || 'name'\n\t\t\t\treturn { ...col, widget: 'fkResolve', widgetProps: { ...(col.widgetProps || {}), register: target.register, schema: target.schema, labelField } }\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The label columns whose target has to be read off the source schema.\n\t\t *\n\t\t * @return {string[]} Their keys.\n\t\t */\n\t\tschemaRefKeys() {\n\t\t\treturn this.refLabelColumns.filter((col) => !this.explicitTarget(col)).map((col) => col.key)\n\t\t},\n\n\t\t/** @return {string} The label columns to look up and the source schema, to read again when either changes. */\n\t\trefTargetsKey() {\n\t\t\tconst src = this.source || {}\n\t\t\treturn `${src.register || ''}/${src.schema || ''}:${this.schemaRefKeys.join('|')}`\n\t\t},\n\n\t\t/**\n\t\t * `$props` minus the chrome props (`title`, `documentationUrl`,\n\t\t * `widgetId`, `hideWrapper`) and the widget-only props (`source`,\n\t\t * `endpointSource`, `actions`, `rowRoute`), so they are consumed here\n\t\t * and never forwarded to the inner CnDataTable. `undefined` values are\n\t\t * dropped so CnDataTable's own prop defaults apply. When the\n\t\t * declarative `source` is active it supplies `register` / `schemaId` /\n\t\t * `fetchParams` / `limit`; an `@resolve:` register sentinel passes\n\t\t * through unexpanded. When the Wave-2 `endpointSource` is active it\n\t\t * supplies the resolved `rows` + `loading` instead — columns,\n\t\t * formatters, and row navigation apply unchanged on top.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tinnerProps() {\n\t\t\tconst { title, documentationUrl, widgetId, hideWrapper, source, endpointSource, actions, rowRoute, rowClass, schema, ...rest } = this.$props\n\t\t\tconst inner = {}\n\t\t\tfor (const [k, v] of Object.entries(rest)) {\n\t\t\t\tif (v !== undefined) {\n\t\t\t\t\tinner[k] = v\n\t\t\t\t}\n\t\t\t}\n\t\t\t// This widget's `schema` is a slug, while CnDataTable's `schema` is a\n\t\t\t// schema object, so it is not forwarded. Nor is it mapped to `schemaId`:\n\t\t\t// that would turn on CnDataTable's unscoped self-fetch whenever the\n\t\t\t// widget's own rows are empty. Self-fetch comes from `source` alone.\n\t\t\t// `rowClass` is consumed here (function or declarative rules[]) and\n\t\t\t// forwarded to CnDataTable as a compiled `(row) => class` function.\n\t\t\tif (this.compiledRowClass) {\n\t\t\t\tinner.rowClass = this.compiledRowClass\n\t\t\t}\n\t\t\tif (this.refLabelColumns.length > 0) {\n\t\t\t\tinner.columns = this.renderedColumns\n\t\t\t}\n\t\t\tif (this.selfFetchActive) {\n\t\t\t\tinner.register = this.source.register\n\t\t\t\tinner.schemaId = this.source.schema\n\t\t\t\tinner.fetchParams = this.resolvedFetchParams\n\t\t\t\tif (typeof this.source.limit === 'number' && this.source.limit > 0) {\n\t\t\t\t\tinner.limit = this.source.limit\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.endpointActive) {\n\t\t\t\tinner.rows = this.endpointRows\n\t\t\t\tinner.loading = this.epLoading || this.loading\n\t\t\t}\n\t\t\tif (this.rowRoute) {\n\t\t\t\tinner.rowClickRoute = this.rowRouteFn\n\t\t\t}\n\t\t\treturn inner\n\t\t},\n\n\t\t/**\n\t\t * The effective `rowClass` function forwarded to CnDataTable. A\n\t\t * host-supplied FUNCTION passes straight through; a declarative\n\t\t * rules[] array is compiled into a `(row) => string` that space-joins\n\t\t * every rule whose shared `visibleWhen` predicate holds against the\n\t\t * row (`field` dot-path + `op` + `value`). Null when `rowClass` is\n\t\t * unset or an empty array — the widget then forwards nothing so\n\t\t * CnDataTable's own default applies.\n\t\t *\n\t\t * @return {?(row: object) => string} The row-class function, or null.\n\t\t */\n\t\tcompiledRowClass() {\n\t\t\tconst rc = this.rowClass\n\t\t\tif (typeof rc === 'function') {\n\t\t\t\treturn rc\n\t\t\t}\n\t\t\tif (!Array.isArray(rc) || rc.length === 0) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tconst rules = rc\n\t\t\treturn (row) => {\n\t\t\t\tconst classes = []\n\t\t\t\tfor (const rule of rules) {\n\t\t\t\t\tif (!rule || !rule.class) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\t\t\t\t\tconst when = rule.when || {}\n\t\t\t\t\tconst actual = readVisibleWhenPath(row, when.field)\n\t\t\t\t\tif (compareVisibleWhen(actual, when.op || 'eq', when.value)) {\n\t\t\t\t\t\tclasses.push(rule.class)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn classes.join(' ')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Row-click navigation function derived from the `rowRoute` route\n\t\t * name (CnDataTable's `rowClickRoute` shape).\n\t\t *\n\t\t * @return {(row: object) => (object|null)} A vue-router location, or null for a row with no id.\n\t\t */\n\t\trowRouteFn() {\n\t\t\treturn (row) => {\n\t\t\t\tconst id = row && (row.id || (row['@self'] && row['@self'].id))\n\t\t\t\treturn id ? { name: this.rowRoute, params: { id: String(id) } } : null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Actions rendered per row: every non-`object-op` type plus\n\t\t * `object-op` `patch` / `delete` (they mutate THAT row's object).\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\trowScopedActions() {\n\t\t\treturn (this.actions || []).filter((a) => a && (a.type !== 'object-op' || a.op === 'patch' || a.op === 'delete'))\n\t\t},\n\n\t\t/**\n\t\t * `object-op` `create` actions — widget-scoped (no row to mutate), so\n\t\t * they render in the list footer, never in the row menu.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tcreateActions() {\n\t\t\treturn (this.actions || []).filter((a) => a && a.type === 'object-op' && a.op === 'create')\n\t\t},\n\n\t\t/**\n\t\t * Row-scoped actions mapped onto the CnRowActions shape: label + icon\n\t\t * pass through, `object-op` `delete` renders destructive, and the\n\t\t * handler routes back through the widget's confirm-gated dispatcher.\n\t\t *\n\t\t * @return {Array<object>}\n\t\t */\n\t\tmappedRowActions() {\n\t\t\treturn this.rowScopedActions.map((action) => ({\n\t\t\t\tlabel: action.label,\n\t\t\t\ticon: action.icon,\n\t\t\t\tdestructive: action.type === 'object-op' && action.op === 'delete',\n\t\t\t\thandler: (row) => this.onActionTriggered(action, row),\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Host-supplied CnDataTable scoped slots to forward (keys only). The\n\t\t * `row-actions` slot is withheld while the widget renders its own\n\t\t * declarative actions menu.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\tforwardedScopedSlots() {\n\t\t\tconst out = {}\n\t\t\tfor (const name of Object.keys(this.$slots || {})) {\n\t\t\t\tif (name === 'row-actions' && this.rowScopedActions.length > 0) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tout[name] = true\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/**\n\t\t * Confirmation question for the pending confirm-gated action —\n\t\t * destructive copy for `delete`, a generic confirm otherwise.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tconfirmMessage() {\n\t\t\tif (this.confirmAction && this.confirmAction.op === 'delete') {\n\t\t\t\treturn t('nextcloud-vue', 'Are you sure you want to delete this item? This action cannot be undone.')\n\t\t\t}\n\t\t\treturn t('nextcloud-vue', 'Are you sure you want to continue?')\n\t\t},\n\t},\n\n\twatch: {\n\t\trefTargetsKey() {\n\t\t\tthis.loadRefTargets()\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.loadRefTargets()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Entry point for every declarative action trigger (row menu or\n\t\t * footer create button). `object-op` `delete` ALWAYS confirms;\n\t\t * `patch` / `create` confirm only when the action sets\n\t\t * `confirm: true`; everything else dispatches immediately.\n\t\t *\n\t\t * @param {object} action The manifest action.\n\t\t * @param {object|null} row The row for row-scoped actions (null for create).\n\t\t * @return {Promise<void>|void}\n\t\t */\n\t\tonActionTriggered(action, row) {\n\t\t\tif (action && action.type === 'object-op' && (action.op === 'delete' || action.confirm === true)) {\n\t\t\t\tthis.confirmAction = action\n\t\t\t\tthis.confirmRow = row\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn this.runAction(action, row)\n\t\t},\n\n\t\t/**\n\t\t * Confirm-dialog primary button: run the pending action and report\n\t\t * the outcome back into the dialog's result phase.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync onConfirmConfirmed() {\n\t\t\tconst outcome = await this.runAction(this.confirmAction, this.confirmRow)\n\t\t\tconst dialog = this.$refs.confirmDialog\n\t\t\tif (dialog) {\n\t\t\t\tdialog.setResult(outcome.ok ? { success: true } : { error: outcome.error })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Close/cancel the confirm dialog and clear the pending action.\n\t\t */\n\t\tcloseConfirm() {\n\t\t\tthis.confirmAction = null\n\t\t\tthis.confirmRow = null\n\t\t},\n\n\t\t/**\n\t\t * Dispatch an action. Non-mutating types go through the page's\n\t\t * pre-bound `cnDispatchAction` (falling back to a bare\n\t\t * `dispatchAction`); for `handler` actions the row is appended as the\n\t\t * final handler argument so row context reaches the registry function.\n\t\t * `object-op` actions dispatch via the shared object store — a\n\t\t * rejected (RBAC) write surfaces `opError` and mutates NO local state;\n\t\t * a success clears the error and refreshes the self-fetched rows.\n\t\t *\n\t\t * @param {object} action The manifest action.\n\t\t * @param {object|null} row The target row (null for create).\n\t\t * @return {Promise<{ok: boolean, error?: string}>}\n\t\t */\n\t\tasync runAction(action, row) {\n\t\t\tif (!action) {\n\t\t\t\treturn { ok: false, error: '' }\n\t\t\t}\n\t\t\tif (action.type !== 'object-op') {\n\t\t\t\tconst wrapped = (!action.type || action.type === 'handler')\n\t\t\t\t\t? { ...action, args: [...(action.args || []), row] }\n\t\t\t\t\t: action\n\t\t\t\tif (typeof this.cnDispatchAction === 'function') {\n\t\t\t\t\tthis.cnDispatchAction(wrapped)\n\t\t\t\t} else {\n\t\t\t\t\tdispatchAction(wrapped, { router: this.$router || null })\n\t\t\t\t}\n\t\t\t\treturn { ok: true }\n\t\t\t}\n\n\t\t\tconst store = this.getObjectStore()\n\t\t\tconst result = await dispatchAction(action, {\n\t\t\t\tobjectStore: store,\n\t\t\t\tsource: this.source,\n\t\t\t\trow,\n\t\t\t})\n\t\t\tconst ok = !(result === null || result === false || result === undefined)\n\t\t\tif (!ok) {\n\t\t\t\tconst error = this.readStoreError(store)\n\t\t\t\tthis.opError = error\n\t\t\t\treturn { ok: false, error }\n\t\t\t}\n\t\t\tthis.opError = ''\n\t\t\tthis.refresh()\n\t\t\t/**\n\t\t\t * @event object-op Emitted after a successful declarative mutation\n\t\t\t * so a host that supplies external `rows` can refetch them.\n\t\t\t * @type {{action: object, row: (object|null), result: unknown}}\n\t\t\t */\n\t\t\tthis.$emit('object-op', { action, row, result })\n\t\t\treturn { ok: true }\n\t\t},\n\n\t\t/**\n\t\t * Re-run the active fetch: the endpoint binding (force-refetch past\n\t\t * the shared cache) or the inner CnDataTable's self-fetch. No-op when\n\t\t * the widget is fed external rows.\n\t\t */\n\t\trefresh() {\n\t\t\tif (this.endpointActive) {\n\t\t\t\tthis.epRefetch()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst table = this.$refs.dataTable\n\t\t\tif (this.selfFetchActive && table && typeof table.fetchData === 'function') {\n\t\t\t\ttable.fetchData()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Where a label column's references point when the column says so\n\t\t * itself (`resolve.register` and `resolve.schema`).\n\t\t *\n\t\t * @param {object} col The column.\n\t\t * @return {{register: string, schema: string}|null}\n\t\t */\n\t\texplicitTarget(col) {\n\t\t\tconst r = col && col.resolve\n\t\t\tif (r && typeof r === 'object' && typeof r.register === 'string' && r.register !== '' && typeof r.schema === 'string' && r.schema !== '') {\n\t\t\t\treturn { register: r.register, schema: r.schema }\n\t\t\t}\n\t\t\treturn null\n\t\t},\n\n\t\t/**\n\t\t * Where a label column's references point: the column's `resolve`, else\n\t\t * the source schema's `$ref` for the property, else null (the column\n\t\t * then shows the raw value).\n\t\t *\n\t\t * @param {object} col The column.\n\t\t * @return {{register: string, schema: string}|null}\n\t\t */\n\t\trefTargetOf(col) {\n\t\t\treturn this.explicitTarget(col) || this.refTargets[col.key] || null\n\t\t},\n\n\t\t/**\n\t\t * Read the source schema once and note, for each label column without a\n\t\t * `resolve`, the register and schema its property's `$ref` names. A\n\t\t * failed or missing schema leaves those columns showing raw values.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/dashboard-table-reference-labels/specs/dashboard-page/spec.md#requirement-a-dashboard-table-shows-a-referenced-objects-label\n\t\t */\n\t\tasync loadRefTargets() {\n\t\t\tconst keys = this.schemaRefKeys\n\t\t\tconst src = this.source\n\t\t\tif (keys.length === 0 || !src || typeof src.register !== 'string' || src.register === '' || src.register.startsWith('@') || typeof src.schema !== 'string' || src.schema === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst store = this.getObjectStore()\n\t\t\tif (!store || typeof store.fetchSchema !== 'function') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst type = resolveObjectOpType(store, { register: src.register, schema: src.schema }, { exactSchema: true })\n\t\t\tconst schema = await store.fetchSchema(type).catch(() => null)\n\t\t\tif (!schema || typeof schema !== 'object') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst fields = fieldsFromSchema(schema, { includeReadOnly: true })\n\t\t\tconst found = {}\n\t\t\tfor (const key of keys) {\n\t\t\t\tconst field = fields.find((f) => f.key === key)\n\t\t\t\tconst ref = field && field.reference\n\t\t\t\tif (ref && ref.schema !== undefined && ref.schema !== null) {\n\t\t\t\t\tfound[key] = { register: ref.register || src.register, schema: String(ref.schema) }\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.refTargets = { ...this.refTargets, ...found }\n\t\t},\n\n\t\t/**\n\t\t * The shared object store instance, or null when no Pinia is active\n\t\t * (`dispatchAction` then warns and no-ops).\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tgetObjectStore() {\n\t\t\ttry {\n\t\t\t\treturn useObjectStore()\n\t\t\t} catch {\n\t\t\t\treturn null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Human-readable message for the last store error on this widget's\n\t\t * source type (RBAC rejection, network failure, …).\n\t\t *\n\t\t * @param {object|null} store The object store used for the dispatch.\n\t\t * @return {string}\n\t\t */\n\t\treadStoreError(store) {\n\t\t\ttry {\n\t\t\t\tif (store && this.source) {\n\t\t\t\t\tconst type = resolveObjectOpType(store, this.source)\n\t\t\t\t\tconst err = store.errors && store.errors[type]\n\t\t\t\t\tif (err && err.message) {\n\t\t\t\t\t\treturn err.message\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// fall through to the generic message\n\t\t\t}\n\t\t\treturn t('nextcloud-vue', 'The operation was rejected')\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-widget-object-table {\n\twidth: 100%;\n}\n\n.cn-widget-object-table__footer {\n\tdisplay: flex;\n\tgap: 4px;\n\tpadding: 4px 8px;\n\tborder-top: 1px solid var(--color-border);\n}\n\n.cn-widget-object-table__error {\n\tcolor: var(--color-text-error, var(--color-error-text));\n\tfont-size: 0.85em;\n\tmargin: 4px 8px 0;\n}\n</style>\n"],"names":["CnDataTable","CnWidgetWrapper","CnRowActions","CnIcon","CnConfirmDialog","t"],"mappings":";;;;;;;;;;;;;;;;;;AAmGA;;AAEC;AACA;;;;;AAKA;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;;;;AAIA;AACA;AACA;AACA;;;AAGD,aAAe;CACd,IAAI,EAAE,qBAAqB;;CAE3B,UAAU,EAAE,eAAEA,UAAW,mBAAEC,YAAe,EAAE,iBAAiB,gBAAEC,YAAY,UAAEC,YAAM,EAAE,QAAQ,mBAAEC,YAAc,EAAG;;AAEhH,CAAA,MAAM,EAAE;AACP;;;AAGC;;AAED,EAAA,eAAe,EAAE,EAAE,OAAO,EAAE,IAAG,EAAG;AAClC;;;;;AAKC;;AAED,EAAA,qBAAqB,EAAE,EAAE,OAAO,EAAE,MAAM;AACxC;;;;;AAKA,EAAA,kBAAkB,EAAE,EAAE,OAAO,EAAE,MAAM;AACrC;;;;AAIC;;AAED,EAAA,gBAAgB,EAAE,EAAE,OAAO,EAAE,MAAM;EACnC;;AAED,CAAA,YAAY,EAAE,KAAK;;AAEnB,CAAA,KAAK,EAAE;AACN;AACC;;AAED,EAAA,KAAK,EAAE;GACN,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,MAAMC,SAAC,CAAC,eAAe,EAAE,OAAO,CAAC;GAC1C;;AAED;;;AAGC;;AAED,EAAA,gBAAgB,EAAE;GACjB,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;;AAED;;;;AAIA,EAAA,QAAQ,EAAE;GACT,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;;AAED;;;;;;AAMC;;EAED,WAAW,EAAE;GACZ,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;;AAED;AACA,EAAA,QAAQ,EAAE;GACT,IA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