@cosmicdrift/kumiko-framework 0.406.0 → 0.410.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 (212) hide show
  1. package/AGENTS.md +4 -2
  2. package/agents/api/framework-db.md +1 -0
  3. package/agents/api/framework-engine.md +17 -2
  4. package/agents/api/framework-ui-types.md +15 -0
  5. package/agents/api/renderer-web.md +156 -2
  6. package/agents/api/types.md +113 -71
  7. package/agents/api.md +4 -4
  8. package/agents/boot-rules.md +744 -0
  9. package/agents/examples/anonymous-access.md +23 -1
  10. package/agents/examples/contact.md +173 -0
  11. package/agents/examples/delivery-notifications.md +34 -1
  12. package/agents/examples/record-detail-layout.md +13 -2
  13. package/agents/examples/search.md +65 -3
  14. package/agents/examples/secrets-demo.md +96 -2
  15. package/agents/examples/tenant-inactivity.md +138 -0
  16. package/agents/examples.md +2 -0
  17. package/agents/features-index.md +4 -0
  18. package/agents/features.md +25 -1
  19. package/agents/widgets.md +12 -1
  20. package/dist/api/export/export-rows.js +1 -0
  21. package/dist/compliance/index.d.ts +1 -1
  22. package/dist/db/event-store-executor-read-where.js +15 -5
  23. package/dist/db/index.d.ts +1 -1
  24. package/dist/db/index.js +1 -1
  25. package/dist/db/migrate-generator.js +3 -1
  26. package/dist/db/queries/event-consumer.js +11 -7
  27. package/dist/db/queries/event-store.d.ts +2 -1
  28. package/dist/db/queries/event-store.js +25 -6
  29. package/dist/db/queries/rls-boot-catalog.js +3 -1
  30. package/dist/db/queries/session-advisory-lock.d.ts +7 -0
  31. package/dist/db/queries/session-advisory-lock.js +23 -0
  32. package/dist/db/query.js +7 -10
  33. package/dist/db/row-level-security-connection.js +4 -2
  34. package/dist/engine/access.js +5 -1
  35. package/dist/engine/active-membership.js +1 -0
  36. package/dist/engine/boot-validator/access-declarations.js +76 -33
  37. package/dist/engine/boot-validator/action-wiring.js +8 -6
  38. package/dist/engine/boot-validator/agent-effect-rules.d.ts +12 -0
  39. package/dist/engine/boot-validator/agent-effect-rules.js +12 -0
  40. package/dist/engine/boot-validator/agent-effect.d.ts +2 -0
  41. package/dist/engine/boot-validator/agent-effect.js +20 -0
  42. package/dist/engine/boot-validator/boot-context.js +5 -1
  43. package/dist/engine/boot-validator/boot-environment-rules.d.ts +12 -0
  44. package/dist/engine/boot-validator/boot-environment-rules.js +12 -0
  45. package/dist/engine/boot-validator/boot-phases-app.js +5 -1
  46. package/dist/engine/boot-validator/boot-phases.js +3 -1
  47. package/dist/engine/boot-validator/boot-rules.d.ts +2624 -0
  48. package/dist/engine/boot-validator/boot-rules.js +58 -0
  49. package/dist/engine/boot-validator/bundled-lists-table.js +23 -9
  50. package/dist/engine/boot-validator/config-deps.js +71 -23
  51. package/dist/engine/boot-validator/config-edit-action-rules.d.ts +17 -0
  52. package/dist/engine/boot-validator/config-edit-action-rules.js +17 -0
  53. package/dist/engine/boot-validator/config-key-rules.d.ts +117 -0
  54. package/dist/engine/boot-validator/config-key-rules.js +117 -0
  55. package/dist/engine/boot-validator/custom-screen-write-qns.js +6 -2
  56. package/dist/engine/boot-validator/derived-sql-fields-rules.d.ts +77 -0
  57. package/dist/engine/boot-validator/derived-sql-fields-rules.js +77 -0
  58. package/dist/engine/boot-validator/derived-sql-fields.js +53 -17
  59. package/dist/engine/boot-validator/detail-screens.js +10 -4
  60. package/dist/engine/boot-validator/entity-declaration-rules.d.ts +92 -0
  61. package/dist/engine/boot-validator/entity-declaration-rules.js +92 -0
  62. package/dist/engine/boot-validator/entity-handler-access-rules.d.ts +102 -0
  63. package/dist/engine/boot-validator/entity-handler-access-rules.js +102 -0
  64. package/dist/engine/boot-validator/entity-handler.d.ts +0 -7
  65. package/dist/engine/boot-validator/entity-handler.js +259 -355
  66. package/dist/engine/boot-validator/entity-image-variants.d.ts +2 -0
  67. package/dist/engine/boot-validator/entity-image-variants.js +91 -0
  68. package/dist/engine/boot-validator/entity-list-aggregate-options.js +8 -2
  69. package/dist/engine/boot-validator/entity-reference-embedded-rules.d.ts +117 -0
  70. package/dist/engine/boot-validator/entity-reference-embedded-rules.js +117 -0
  71. package/dist/engine/boot-validator/entity-select-image-rules.d.ts +122 -0
  72. package/dist/engine/boot-validator/entity-select-image-rules.js +122 -0
  73. package/dist/engine/boot-validator/entity-select.d.ts +8 -0
  74. package/dist/engine/boot-validator/entity-select.js +197 -0
  75. package/dist/engine/boot-validator/entity-structure-rules.d.ts +107 -0
  76. package/dist/engine/boot-validator/entity-structure-rules.js +107 -0
  77. package/dist/engine/boot-validator/field-conditions-rules.d.ts +92 -0
  78. package/dist/engine/boot-validator/field-conditions-rules.js +92 -0
  79. package/dist/engine/boot-validator/field-conditions.js +67 -22
  80. package/dist/engine/boot-validator/form-derivations-rules.d.ts +77 -0
  81. package/dist/engine/boot-validator/form-derivations-rules.js +77 -0
  82. package/dist/engine/boot-validator/form-derivations.js +52 -18
  83. package/dist/engine/boot-validator/global-tenancy.js +13 -7
  84. package/dist/engine/boot-validator/handler-declaration-rules.d.ts +77 -0
  85. package/dist/engine/boot-validator/handler-declaration-rules.js +77 -0
  86. package/dist/engine/boot-validator/handler-field-references-rules.d.ts +22 -0
  87. package/dist/engine/boot-validator/handler-field-references-rules.js +22 -0
  88. package/dist/engine/boot-validator/handler-field-references.js +14 -6
  89. package/dist/engine/boot-validator/list-bulk-actions-rules.d.ts +42 -0
  90. package/dist/engine/boot-validator/list-bulk-actions-rules.js +42 -0
  91. package/dist/engine/boot-validator/list-bulk-actions.js +29 -11
  92. package/dist/engine/boot-validator/list-column-layout.js +22 -10
  93. package/dist/engine/boot-validator/list-query-rules.d.ts +107 -0
  94. package/dist/engine/boot-validator/list-query-rules.js +107 -0
  95. package/dist/engine/boot-validator/list-table-aggregate-options.js +43 -15
  96. package/dist/engine/boot-validator/list-table-aggregate-query.js +7 -3
  97. package/dist/engine/boot-validator/list-table-aggregate-rules.d.ts +82 -0
  98. package/dist/engine/boot-validator/list-table-aggregate-rules.js +82 -0
  99. package/dist/engine/boot-validator/list-table-export-options.js +19 -7
  100. package/dist/engine/boot-validator/list-table-options.js +33 -13
  101. package/dist/engine/boot-validator/list-table-reject-unknown-keys.js +6 -2
  102. package/dist/engine/boot-validator/list-table-rules.d.ts +132 -0
  103. package/dist/engine/boot-validator/list-table-rules.js +132 -0
  104. package/dist/engine/boot-validator/nav-rules.d.ts +42 -0
  105. package/dist/engine/boot-validator/nav-rules.js +42 -0
  106. package/dist/engine/boot-validator/nav.js +33 -17
  107. package/dist/engine/boot-validator/ownership-rules.d.ts +27 -0
  108. package/dist/engine/boot-validator/ownership-rules.js +27 -0
  109. package/dist/engine/boot-validator/ownership.js +28 -12
  110. package/dist/engine/boot-validator/parent-ref.js +32 -20
  111. package/dist/engine/boot-validator/projection-list-screens.js +76 -35
  112. package/dist/engine/boot-validator/query-output-columns.js +9 -3
  113. package/dist/engine/boot-validator/query-refs.js +20 -10
  114. package/dist/engine/boot-validator/query-rules.d.ts +37 -0
  115. package/dist/engine/boot-validator/query-rules.js +37 -0
  116. package/dist/engine/boot-validator/read-gate.js +14 -10
  117. package/dist/engine/boot-validator/record-owned.js +5 -1
  118. package/dist/engine/boot-validator/related-list-table-rules.js +17 -7
  119. package/dist/engine/boot-validator/screens-actions-rules.d.ts +185 -0
  120. package/dist/engine/boot-validator/screens-actions-rules.js +185 -0
  121. package/dist/engine/boot-validator/screens-actions.js +169 -93
  122. package/dist/engine/boot-validator/screens-dashboard-chart-rules.d.ts +87 -0
  123. package/dist/engine/boot-validator/screens-dashboard-chart-rules.js +87 -0
  124. package/dist/engine/boot-validator/screens-dashboard-rules.d.ts +227 -0
  125. package/dist/engine/boot-validator/screens-dashboard-rules.js +227 -0
  126. package/dist/engine/boot-validator/screens-dashboard.js +222 -85
  127. package/dist/engine/boot-validator/screens-forms-layout-rules.d.ts +122 -0
  128. package/dist/engine/boot-validator/screens-forms-layout-rules.js +122 -0
  129. package/dist/engine/boot-validator/screens-forms-rules.d.ts +152 -0
  130. package/dist/engine/boot-validator/screens-forms-rules.js +152 -0
  131. package/dist/engine/boot-validator/screens-forms.js +240 -112
  132. package/dist/engine/boot-validator/screens-kind-config-edit.js +72 -16
  133. package/dist/engine/boot-validator/screens-kind-entity-edit.js +15 -7
  134. package/dist/engine/boot-validator/screens-kind-entity-list.js +57 -32
  135. package/dist/engine/boot-validator/screens-kind-projection-detail-rules.d.ts +92 -0
  136. package/dist/engine/boot-validator/screens-kind-projection-detail-rules.js +92 -0
  137. package/dist/engine/boot-validator/screens-kind-projection-detail.js +85 -47
  138. package/dist/engine/boot-validator/screens-kind-rules.d.ts +137 -0
  139. package/dist/engine/boot-validator/screens-kind-rules.js +137 -0
  140. package/dist/engine/boot-validator/screens-kind-secret-mint.js +18 -8
  141. package/dist/engine/boot-validator/screens-kind-shared.js +40 -22
  142. package/dist/engine/boot-validator/screens-lists-rules.d.ts +82 -0
  143. package/dist/engine/boot-validator/screens-lists-rules.js +82 -0
  144. package/dist/engine/boot-validator/screens-lists.js +90 -45
  145. package/dist/engine/boot-validator/screens-rules.d.ts +57 -0
  146. package/dist/engine/boot-validator/screens-rules.js +57 -0
  147. package/dist/engine/boot-validator/screens.js +17 -12
  148. package/dist/engine/boot-validator/transaction-phases.js +12 -4
  149. package/dist/engine/boot-validator/transfer-graph.js +17 -11
  150. package/dist/engine/boot-validator/url-prefill-fields.js +9 -5
  151. package/dist/engine/boot-validator/workspaces.js +11 -5
  152. package/dist/engine/boot-validator/zod-shape.js +6 -2
  153. package/dist/engine/entity-handlers.d.ts +1 -0
  154. package/dist/engine/entity-handlers.js +3 -0
  155. package/dist/engine/entity-list-runtime-options.js +23 -29
  156. package/dist/engine/extensions/tenant-data.d.ts +3 -0
  157. package/dist/engine/factories.d.ts +1 -1
  158. package/dist/engine/factories.js +4 -3
  159. package/dist/engine/index.d.ts +4 -2
  160. package/dist/engine/index.js +2 -0
  161. package/dist/engine/project-app-schema-for-roles.js +29 -14
  162. package/dist/engine/registry-facade.js +7 -8
  163. package/dist/engine/registry-validate.js +5 -1
  164. package/dist/engine/soft-delete-cleanup.d.ts +1 -0
  165. package/dist/engine/soft-delete-cleanup.js +5 -0
  166. package/dist/engine/steps/describe-workflow-step-error.js +1 -0
  167. package/dist/es-ops/operations-schema.d.ts +1 -1
  168. package/dist/event-store/ensure-dead-letter-table.d.ts +2 -0
  169. package/dist/event-store/ensure-dead-letter-table.js +10 -0
  170. package/dist/event-store/rebuild-dead-letter.js +2 -8
  171. package/dist/event-store/upcaster-dead-letter.js +2 -8
  172. package/dist/files/copy-pending-file-refs-to-tenant.d.ts +28 -0
  173. package/dist/files/copy-pending-file-refs-to-tenant.js +87 -0
  174. package/dist/files/file-routes.d.ts +1 -1
  175. package/dist/files/file-routes.js +21 -6
  176. package/dist/files/index.d.ts +2 -0
  177. package/dist/files/index.js +1 -0
  178. package/dist/i18n/required-surface-keys.js +1 -0
  179. package/dist/jobs/job-runner-helpers.js +1 -0
  180. package/dist/jobs/job-runner.js +7 -12
  181. package/dist/logging/utils.js +30 -60
  182. package/dist/observability/metrics-handle.js +10 -21
  183. package/dist/pipeline/cascade-handler.js +7 -6
  184. package/dist/pipeline/dispatch-query.js +18 -5
  185. package/dist/pipeline/dispatch-shared.d.ts +1 -0
  186. package/dist/pipeline/dispatch-shared.js +3 -1
  187. package/dist/pipeline/dispatch-write.js +10 -12
  188. package/dist/pipeline/dispatcher.js +12 -14
  189. package/dist/pipeline/event-dispatcher-admin.js +9 -8
  190. package/dist/pipeline/event-dispatcher-delivery.d.ts +19 -1
  191. package/dist/pipeline/event-dispatcher-delivery.js +121 -29
  192. package/dist/pipeline/event-dispatcher.d.ts +5 -1
  193. package/dist/pipeline/event-dispatcher.js +28 -21
  194. package/dist/pipeline/handler-context-phase-denials.js +2 -0
  195. package/dist/pipeline/multi-stream-apply-context.js +12 -20
  196. package/dist/pipeline/system-hooks.d.ts +4 -1
  197. package/dist/pipeline/system-hooks.js +79 -6
  198. package/dist/pipeline/system-identity-switch.js +10 -7
  199. package/dist/search/build-search-snippet.d.ts +9 -0
  200. package/dist/search/build-search-snippet.js +40 -0
  201. package/dist/search/index.d.ts +1 -0
  202. package/dist/search/index.js +1 -0
  203. package/dist/search/meilisearch-adapter.d.ts +32 -0
  204. package/dist/search/meilisearch-adapter.js +153 -56
  205. package/dist/search/meilisearch-chunking.d.ts +21 -0
  206. package/dist/search/meilisearch-chunking.js +96 -0
  207. package/dist/search/reindex-entity.d.ts +1 -0
  208. package/dist/search/reindex-entity.js +97 -52
  209. package/dist/ui-types/index.d.ts +1 -1
  210. package/dist/upgrade-cli.js +3 -14
  211. package/package.json +3 -3
  212. package/src/changes.json +79 -0
@@ -0,0 +1,87 @@
1
+ export const DASHBOARD_CHART_RULES = {
2
+ chartFromTodayUnreachable: {
3
+ id: "dashboard/chart-from-today-unreachable",
4
+ summary: 'A chart with initialWindow "from-today" has ranges or brush.',
5
+ fix: "Add ranges or brush, or change initialWindow.",
6
+ },
7
+ chartFlagNonBoolean: {
8
+ id: "dashboard/chart-flag-non-boolean",
9
+ summary: "Chart flags (scrollable, brush, legendTotals, markerLabels) are booleans.",
10
+ fix: "Use true or false.",
11
+ },
12
+ chartStackedAreaOnly: {
13
+ id: "dashboard/chart-stacked-area-only",
14
+ summary: 'Stacked-area chart props are only set on a "stacked-area" chart.',
15
+ fix: 'Remove the props or use chart "stacked-area".',
16
+ },
17
+ chartUnitTimeseriesOnly: {
18
+ id: "dashboard/chart-unit-timeseries-only",
19
+ summary: 'A chart unit is only set on a "timeseries" chart.',
20
+ fix: 'Remove unit or use chart "timeseries".',
21
+ },
22
+ chartColorInvalid: {
23
+ id: "dashboard/chart-color-invalid",
24
+ summary: "Chart series and marker colors are non-empty CSS colors.",
25
+ fix: "Set a non-empty CSS color.",
26
+ },
27
+ chartEnumPropInvalid: {
28
+ id: "dashboard/chart-enum-prop-invalid",
29
+ summary: "Stacked-area dateFormat, initialWindow and markerLegend use an allowed value.",
30
+ fix: "Set the prop to one of the allowed values.",
31
+ },
32
+ chartMarkerLookMissing: {
33
+ id: "dashboard/chart-marker-look-missing",
34
+ summary: "A chart marker kind sets a tone or a color.",
35
+ fix: "Set tone or color.",
36
+ },
37
+ chartMarkerToneInvalid: {
38
+ id: "dashboard/chart-marker-tone-invalid",
39
+ summary: "A chart marker tone is a known dashboard tone.",
40
+ fix: "Use positive, negative, active or neutral.",
41
+ },
42
+ chartMarkerLabelInvalid: {
43
+ id: "dashboard/chart-marker-label-invalid",
44
+ summary: "A chart marker label is a non-empty i18n key.",
45
+ fix: "Set a non-empty i18n key or remove label.",
46
+ },
47
+ chartRangesOptionsEmpty: {
48
+ id: "dashboard/chart-ranges-options-empty",
49
+ summary: "Chart ranges declare at least one option.",
50
+ fix: "Add an option to ranges.options.",
51
+ },
52
+ chartRangesOptionIncomplete: {
53
+ id: "dashboard/chart-ranges-option-incomplete",
54
+ summary: "Every chart range option has a non-empty value and label.",
55
+ fix: "Give every option a value and a label.",
56
+ },
57
+ chartRangesOptionDuplicate: {
58
+ id: "dashboard/chart-ranges-option-duplicate",
59
+ summary: "Chart range option values are unique.",
60
+ fix: "Use each option value once.",
61
+ },
62
+ chartRangesMonthsInvalid: {
63
+ id: "dashboard/chart-ranges-months-invalid",
64
+ summary: "A chart range option's months is a positive integer.",
65
+ fix: "Set months to a positive integer or remove it.",
66
+ },
67
+ chartRangesDefaultUnknown: {
68
+ id: "dashboard/chart-ranges-default-unknown",
69
+ summary: "ranges.default is one of the option values.",
70
+ fix: "Set default to one of the options.",
71
+ },
72
+ valueFormatKind: {
73
+ id: "dashboard/value-format-kind",
74
+ summary: "A valueFormat kind is allowed for the panel type.",
75
+ fix: "Use an allowed kind for this panel type.",
76
+ },
77
+ valueFormatCurrency: {
78
+ id: "dashboard/value-format-currency",
79
+ summary: "A currency valueFormat uses a 3-letter uppercase ISO currency code.",
80
+ fix: 'Set currency to an ISO 4217 code such as "EUR".',
81
+ },
82
+ valueFormatFractionDigits: {
83
+ id: "dashboard/value-format-fraction-digits",
84
+ summary: "valueFormat.fractionDigits is an integer from 0 to the maximum.",
85
+ fix: "Set fractionDigits to an integer within range.",
86
+ },
87
+ };
@@ -0,0 +1,227 @@
1
+ export declare const DASHBOARD_RULES: {
2
+ readonly emptyPanels: {
3
+ readonly id: "dashboard/empty-panels";
4
+ readonly summary: "A dashboard declares at least one panel.";
5
+ readonly fix: "Add a panel to panels.";
6
+ };
7
+ readonly duplicatePanelId: {
8
+ readonly id: "dashboard/duplicate-panel-id";
9
+ readonly summary: "Panel ids (including stat-group children) are unique within a dashboard.";
10
+ readonly fix: "Give each panel a unique id.";
11
+ };
12
+ readonly actionRowClick: {
13
+ readonly id: "dashboard/action-row-click";
14
+ readonly summary: "A dashboard action does not set rowClick.";
15
+ readonly fix: "Remove rowClick from the action.";
16
+ };
17
+ readonly actionDrawer: {
18
+ readonly id: "dashboard/action-drawer";
19
+ readonly summary: "A dashboard action is not a drawer action.";
20
+ readonly fix: "Use a navigate, writeHandler or clientAction action.";
21
+ };
22
+ readonly actionRedirect: {
23
+ readonly id: "dashboard/action-redirect";
24
+ readonly summary: "A dashboard writeHandler action does not set redirect.";
25
+ readonly fix: "Remove redirect from the action.";
26
+ };
27
+ readonly actionsWithoutRecord: {
28
+ readonly id: "dashboard/actions-without-record";
29
+ readonly summary: "A dashboard with actions declares a record binding.";
30
+ readonly fix: "Add record: { param } or remove actions.";
31
+ };
32
+ readonly recordParamEmpty: {
33
+ readonly id: "dashboard/record-param-empty";
34
+ readonly summary: "record.param is a non-empty string.";
35
+ readonly fix: "Name the URL search param carrying the record id.";
36
+ };
37
+ readonly recordPayloadKeyEmpty: {
38
+ readonly id: "dashboard/record-payload-key-empty";
39
+ readonly summary: "record.payloadKey is non-empty when set.";
40
+ readonly fix: "Omit payloadKey to reuse record.param, or name a key.";
41
+ };
42
+ readonly recordQueryEmpty: {
43
+ readonly id: "dashboard/record-query-empty";
44
+ readonly summary: "record.query is non-empty when set.";
45
+ readonly fix: "Set a registered query name or omit record.query.";
46
+ };
47
+ readonly recordTitleFieldUnusable: {
48
+ readonly id: "dashboard/record-title-field-unusable";
49
+ readonly summary: "record.titleField needs record.query and a non-empty field name.";
50
+ readonly fix: "Add record.query and name a field, or remove titleField.";
51
+ };
52
+ readonly recordParamCollision: {
53
+ readonly id: "dashboard/record-param-collision";
54
+ readonly summary: "record.param and payloadKey differ from the filter and timeRange ids.";
55
+ readonly fix: "Use a different name for the record param or the filter/timeRange id.";
56
+ };
57
+ readonly refreshSecondsAndField: {
58
+ readonly id: "dashboard/refresh-seconds-and-field";
59
+ readonly summary: "A dashboard refresh sets either seconds or field, not both.";
60
+ readonly fix: "Keep exactly one of seconds and field.";
61
+ };
62
+ readonly refreshSecondsTooShort: {
63
+ readonly id: "dashboard/refresh-seconds-too-short";
64
+ readonly summary: "refresh.seconds is a number of at least DASHBOARD_MIN_REFRESH_SECONDS.";
65
+ readonly fix: "Raise refresh.seconds to the minimum or more.";
66
+ };
67
+ readonly refreshFieldEmpty: {
68
+ readonly id: "dashboard/refresh-field-empty";
69
+ readonly summary: "refresh.field is non-empty.";
70
+ readonly fix: "Name the record field holding the seconds.";
71
+ };
72
+ readonly refreshFieldWithoutRecordQuery: {
73
+ readonly id: "dashboard/refresh-field-without-record-query";
74
+ readonly summary: "A field-driven refresh has a record.query to read the seconds from.";
75
+ readonly fix: "Add record: { param, query } or use refresh: { seconds }.";
76
+ };
77
+ readonly timeRangeIdEmpty: {
78
+ readonly id: "dashboard/time-range-id-empty";
79
+ readonly summary: "The dashboard timeRange has a non-empty id.";
80
+ readonly fix: "Set a non-empty timeRange.id.";
81
+ };
82
+ readonly timeRangeIdCollidesFilter: {
83
+ readonly id: "dashboard/time-range-id-collides-filter";
84
+ readonly summary: "The timeRange id differs from the filter id.";
85
+ readonly fix: "Use a timeRange.id different from the filter id.";
86
+ };
87
+ readonly timeRangeOptionsEmpty: {
88
+ readonly id: "dashboard/time-range-options-empty";
89
+ readonly summary: "The timeRange declares at least one option.";
90
+ readonly fix: "Add an option to timeRange.options.";
91
+ };
92
+ readonly timeRangeOptionIncomplete: {
93
+ readonly id: "dashboard/time-range-option-incomplete";
94
+ readonly summary: "Every timeRange option has a non-empty value and label.";
95
+ readonly fix: "Give every option a value and a label.";
96
+ };
97
+ readonly timeRangeOptionDuplicate: {
98
+ readonly id: "dashboard/time-range-option-duplicate";
99
+ readonly summary: "timeRange option values are unique.";
100
+ readonly fix: "Use each option value once.";
101
+ };
102
+ readonly timeRangeDefaultUnknown: {
103
+ readonly id: "dashboard/time-range-default-unknown";
104
+ readonly summary: "timeRange.default is one of the option values.";
105
+ readonly fix: "Set default to one of the options.";
106
+ };
107
+ readonly embeddedScreenUnresolved: {
108
+ readonly id: "dashboard/embedded-screen-unresolved";
109
+ readonly summary: "A screen panel's screen and fallback resolve to registered screens.";
110
+ readonly fix: 'Use a same-feature short id or a cross-feature QN "<feature>:screen:<id>".';
111
+ };
112
+ readonly embeddedScreenType: {
113
+ readonly id: "dashboard/embedded-screen-type";
114
+ readonly summary: "A screen panel embeds only an embeddable screen type.";
115
+ readonly fix: "Embed a projectionList, projectionDetail, actionForm, secretMint, configEdit or secretsEdit screen, or use a custom panel.";
116
+ };
117
+ readonly embeddedDetailWithoutRecord: {
118
+ readonly id: "dashboard/embedded-detail-without-record";
119
+ readonly summary: "Embedding a projectionDetail needs a record binding on the host dashboard.";
120
+ readonly fix: "Add record: { param } to the dashboard or embed another screen type.";
121
+ };
122
+ readonly embeddedFormNavigates: {
123
+ readonly id: "dashboard/embedded-form-navigates";
124
+ readonly summary: "An embedded actionForm or secretMint sets neither redirect nor a cancelTarget.";
125
+ readonly fix: "Embed a screen without redirect and with cancelTarget: false (or omitted).";
126
+ };
127
+ readonly panelFallbackWithoutVisibleWhen: {
128
+ readonly id: "dashboard/panel-fallback-without-visible-when";
129
+ readonly summary: "A screen panel with a fallback also declares visibleWhen.";
130
+ readonly fix: "Add visibleWhen or remove fallback.";
131
+ };
132
+ readonly panelFallbackGated: {
133
+ readonly id: "dashboard/panel-fallback-gated";
134
+ readonly summary: "A panel fallback screen has no visibleWhen of its own.";
135
+ readonly fix: "Embed a fallback screen without visibleWhen.";
136
+ };
137
+ readonly textPanelEmpty: {
138
+ readonly id: "dashboard/text-panel-empty";
139
+ readonly summary: "A text panel declares at least one block.";
140
+ readonly fix: "Add at least one block.";
141
+ };
142
+ readonly textListBlockEmpty: {
143
+ readonly id: "dashboard/text-list-block-empty";
144
+ readonly summary: "A text list block has items.";
145
+ readonly fix: "Add items or remove the block.";
146
+ };
147
+ readonly textLinkUnresolved: {
148
+ readonly id: "dashboard/text-link-unresolved";
149
+ readonly summary: "A text link block's screen resolves to a registered screen.";
150
+ readonly fix: 'Use a same-feature short id or a cross-feature QN "<feature>:screen:<id>".';
151
+ };
152
+ readonly textLinkRolesEmpty: {
153
+ readonly id: "dashboard/text-link-roles-empty";
154
+ readonly summary: "A text link block's roles list is non-empty when set.";
155
+ readonly fix: "List the roles or omit roles.";
156
+ };
157
+ readonly panelVisibleWhenIncomplete: {
158
+ readonly id: "dashboard/panel-visible-when-incomplete";
159
+ readonly summary: "A panel's visibleWhen names a non-empty query and field.";
160
+ readonly fix: "Set both visibleWhen.query and visibleWhen.field.";
161
+ };
162
+ readonly panelSpanInvalid: {
163
+ readonly id: "dashboard/panel-span-invalid";
164
+ readonly summary: 'A panel\'s span is "half" or "full".';
165
+ readonly fix: 'Set span to "half" or "full".';
166
+ };
167
+ readonly statGroupEmpty: {
168
+ readonly id: "dashboard/stat-group-empty";
169
+ readonly summary: "A stat-group declares at least one stat.";
170
+ readonly fix: "Add at least one stat.";
171
+ };
172
+ readonly statGroupSubtitleWithoutLabel: {
173
+ readonly id: "dashboard/stat-group-subtitle-without-label";
174
+ readonly summary: "A stat-group with a subtitle also has a label.";
175
+ readonly fix: "Set a label or remove subtitle.";
176
+ };
177
+ readonly statGroupChildVisibleWhen: {
178
+ readonly id: "dashboard/stat-group-child-visible-when";
179
+ readonly summary: "Stat-group children do not set visibleWhen.";
180
+ readonly fix: "Gate the whole group with visibleWhen instead.";
181
+ };
182
+ readonly panelQueryEmpty: {
183
+ readonly id: "dashboard/panel-query-empty";
184
+ readonly summary: "A stat, stat-group child and query panel names a non-empty query string.";
185
+ readonly fix: "Set query to a registered query name.";
186
+ };
187
+ readonly statValueFieldEmpty: {
188
+ readonly id: "dashboard/stat-value-field-empty";
189
+ readonly summary: "A stat panel and stat-group child has a non-empty valueField.";
190
+ readonly fix: "Set valueField to a field of the query result.";
191
+ };
192
+ readonly customPanelNoComponent: {
193
+ readonly id: "dashboard/custom-panel-no-component";
194
+ readonly summary: "A custom panel declares a react or native component.";
195
+ readonly fix: "Declare a react/native component marker.";
196
+ };
197
+ readonly listPanelColumnsEmpty: {
198
+ readonly id: "dashboard/list-panel-columns-empty";
199
+ readonly summary: "A list panel declares at least one column.";
200
+ readonly fix: "Add at least one column.";
201
+ };
202
+ readonly filterIdEmpty: {
203
+ readonly id: "dashboard/filter-id-empty";
204
+ readonly summary: "The dashboard filter has a non-empty id.";
205
+ readonly fix: "Set a non-empty filter.id.";
206
+ };
207
+ readonly filterLabelEmpty: {
208
+ readonly id: "dashboard/filter-label-empty";
209
+ readonly summary: "The dashboard filter has a non-empty label.";
210
+ readonly fix: "Set a non-empty filter.label.";
211
+ };
212
+ readonly filterOptionsXor: {
213
+ readonly id: "dashboard/filter-options-xor";
214
+ readonly summary: "The dashboard filter sets exactly one of options and optionsQuery.";
215
+ readonly fix: "Keep either options or optionsQuery.";
216
+ };
217
+ readonly filterOptionsEmpty: {
218
+ readonly id: "dashboard/filter-options-empty";
219
+ readonly summary: "Static filter options are non-empty.";
220
+ readonly fix: "Declare at least one option or use optionsQuery.";
221
+ };
222
+ readonly filterOptionsQueryEmpty: {
223
+ readonly id: "dashboard/filter-options-query-empty";
224
+ readonly summary: "filter.optionsQuery is non-empty when set.";
225
+ readonly fix: "Set optionsQuery to a query name or remove it.";
226
+ };
227
+ };
@@ -0,0 +1,227 @@
1
+ export const DASHBOARD_RULES = {
2
+ emptyPanels: {
3
+ id: "dashboard/empty-panels",
4
+ summary: "A dashboard declares at least one panel.",
5
+ fix: "Add a panel to panels.",
6
+ },
7
+ duplicatePanelId: {
8
+ id: "dashboard/duplicate-panel-id",
9
+ summary: "Panel ids (including stat-group children) are unique within a dashboard.",
10
+ fix: "Give each panel a unique id.",
11
+ },
12
+ actionRowClick: {
13
+ id: "dashboard/action-row-click",
14
+ summary: "A dashboard action does not set rowClick.",
15
+ fix: "Remove rowClick from the action.",
16
+ },
17
+ actionDrawer: {
18
+ id: "dashboard/action-drawer",
19
+ summary: "A dashboard action is not a drawer action.",
20
+ fix: "Use a navigate, writeHandler or clientAction action.",
21
+ },
22
+ actionRedirect: {
23
+ id: "dashboard/action-redirect",
24
+ summary: "A dashboard writeHandler action does not set redirect.",
25
+ fix: "Remove redirect from the action.",
26
+ },
27
+ actionsWithoutRecord: {
28
+ id: "dashboard/actions-without-record",
29
+ summary: "A dashboard with actions declares a record binding.",
30
+ fix: "Add record: { param } or remove actions.",
31
+ },
32
+ recordParamEmpty: {
33
+ id: "dashboard/record-param-empty",
34
+ summary: "record.param is a non-empty string.",
35
+ fix: "Name the URL search param carrying the record id.",
36
+ },
37
+ recordPayloadKeyEmpty: {
38
+ id: "dashboard/record-payload-key-empty",
39
+ summary: "record.payloadKey is non-empty when set.",
40
+ fix: "Omit payloadKey to reuse record.param, or name a key.",
41
+ },
42
+ recordQueryEmpty: {
43
+ id: "dashboard/record-query-empty",
44
+ summary: "record.query is non-empty when set.",
45
+ fix: "Set a registered query name or omit record.query.",
46
+ },
47
+ recordTitleFieldUnusable: {
48
+ id: "dashboard/record-title-field-unusable",
49
+ summary: "record.titleField needs record.query and a non-empty field name.",
50
+ fix: "Add record.query and name a field, or remove titleField.",
51
+ },
52
+ recordParamCollision: {
53
+ id: "dashboard/record-param-collision",
54
+ summary: "record.param and payloadKey differ from the filter and timeRange ids.",
55
+ fix: "Use a different name for the record param or the filter/timeRange id.",
56
+ },
57
+ refreshSecondsAndField: {
58
+ id: "dashboard/refresh-seconds-and-field",
59
+ summary: "A dashboard refresh sets either seconds or field, not both.",
60
+ fix: "Keep exactly one of seconds and field.",
61
+ },
62
+ refreshSecondsTooShort: {
63
+ id: "dashboard/refresh-seconds-too-short",
64
+ summary: "refresh.seconds is a number of at least DASHBOARD_MIN_REFRESH_SECONDS.",
65
+ fix: "Raise refresh.seconds to the minimum or more.",
66
+ },
67
+ refreshFieldEmpty: {
68
+ id: "dashboard/refresh-field-empty",
69
+ summary: "refresh.field is non-empty.",
70
+ fix: "Name the record field holding the seconds.",
71
+ },
72
+ refreshFieldWithoutRecordQuery: {
73
+ id: "dashboard/refresh-field-without-record-query",
74
+ summary: "A field-driven refresh has a record.query to read the seconds from.",
75
+ fix: "Add record: { param, query } or use refresh: { seconds }.",
76
+ },
77
+ timeRangeIdEmpty: {
78
+ id: "dashboard/time-range-id-empty",
79
+ summary: "The dashboard timeRange has a non-empty id.",
80
+ fix: "Set a non-empty timeRange.id.",
81
+ },
82
+ timeRangeIdCollidesFilter: {
83
+ id: "dashboard/time-range-id-collides-filter",
84
+ summary: "The timeRange id differs from the filter id.",
85
+ fix: "Use a timeRange.id different from the filter id.",
86
+ },
87
+ timeRangeOptionsEmpty: {
88
+ id: "dashboard/time-range-options-empty",
89
+ summary: "The timeRange declares at least one option.",
90
+ fix: "Add an option to timeRange.options.",
91
+ },
92
+ timeRangeOptionIncomplete: {
93
+ id: "dashboard/time-range-option-incomplete",
94
+ summary: "Every timeRange option has a non-empty value and label.",
95
+ fix: "Give every option a value and a label.",
96
+ },
97
+ timeRangeOptionDuplicate: {
98
+ id: "dashboard/time-range-option-duplicate",
99
+ summary: "timeRange option values are unique.",
100
+ fix: "Use each option value once.",
101
+ },
102
+ timeRangeDefaultUnknown: {
103
+ id: "dashboard/time-range-default-unknown",
104
+ summary: "timeRange.default is one of the option values.",
105
+ fix: "Set default to one of the options.",
106
+ },
107
+ embeddedScreenUnresolved: {
108
+ id: "dashboard/embedded-screen-unresolved",
109
+ summary: "A screen panel's screen and fallback resolve to registered screens.",
110
+ fix: 'Use a same-feature short id or a cross-feature QN "<feature>:screen:<id>".',
111
+ },
112
+ embeddedScreenType: {
113
+ id: "dashboard/embedded-screen-type",
114
+ summary: "A screen panel embeds only an embeddable screen type.",
115
+ fix: "Embed a projectionList, projectionDetail, actionForm, secretMint, configEdit or secretsEdit screen, or use a custom panel.",
116
+ },
117
+ embeddedDetailWithoutRecord: {
118
+ id: "dashboard/embedded-detail-without-record",
119
+ summary: "Embedding a projectionDetail needs a record binding on the host dashboard.",
120
+ fix: "Add record: { param } to the dashboard or embed another screen type.",
121
+ },
122
+ embeddedFormNavigates: {
123
+ id: "dashboard/embedded-form-navigates",
124
+ summary: "An embedded actionForm or secretMint sets neither redirect nor a cancelTarget.",
125
+ fix: "Embed a screen without redirect and with cancelTarget: false (or omitted).",
126
+ },
127
+ panelFallbackWithoutVisibleWhen: {
128
+ id: "dashboard/panel-fallback-without-visible-when",
129
+ summary: "A screen panel with a fallback also declares visibleWhen.",
130
+ fix: "Add visibleWhen or remove fallback.",
131
+ },
132
+ panelFallbackGated: {
133
+ id: "dashboard/panel-fallback-gated",
134
+ summary: "A panel fallback screen has no visibleWhen of its own.",
135
+ fix: "Embed a fallback screen without visibleWhen.",
136
+ },
137
+ textPanelEmpty: {
138
+ id: "dashboard/text-panel-empty",
139
+ summary: "A text panel declares at least one block.",
140
+ fix: "Add at least one block.",
141
+ },
142
+ textListBlockEmpty: {
143
+ id: "dashboard/text-list-block-empty",
144
+ summary: "A text list block has items.",
145
+ fix: "Add items or remove the block.",
146
+ },
147
+ textLinkUnresolved: {
148
+ id: "dashboard/text-link-unresolved",
149
+ summary: "A text link block's screen resolves to a registered screen.",
150
+ fix: 'Use a same-feature short id or a cross-feature QN "<feature>:screen:<id>".',
151
+ },
152
+ textLinkRolesEmpty: {
153
+ id: "dashboard/text-link-roles-empty",
154
+ summary: "A text link block's roles list is non-empty when set.",
155
+ fix: "List the roles or omit roles.",
156
+ },
157
+ panelVisibleWhenIncomplete: {
158
+ id: "dashboard/panel-visible-when-incomplete",
159
+ summary: "A panel's visibleWhen names a non-empty query and field.",
160
+ fix: "Set both visibleWhen.query and visibleWhen.field.",
161
+ },
162
+ panelSpanInvalid: {
163
+ id: "dashboard/panel-span-invalid",
164
+ summary: 'A panel\'s span is "half" or "full".',
165
+ fix: 'Set span to "half" or "full".',
166
+ },
167
+ statGroupEmpty: {
168
+ id: "dashboard/stat-group-empty",
169
+ summary: "A stat-group declares at least one stat.",
170
+ fix: "Add at least one stat.",
171
+ },
172
+ statGroupSubtitleWithoutLabel: {
173
+ id: "dashboard/stat-group-subtitle-without-label",
174
+ summary: "A stat-group with a subtitle also has a label.",
175
+ fix: "Set a label or remove subtitle.",
176
+ },
177
+ statGroupChildVisibleWhen: {
178
+ id: "dashboard/stat-group-child-visible-when",
179
+ summary: "Stat-group children do not set visibleWhen.",
180
+ fix: "Gate the whole group with visibleWhen instead.",
181
+ },
182
+ panelQueryEmpty: {
183
+ id: "dashboard/panel-query-empty",
184
+ summary: "A stat, stat-group child and query panel names a non-empty query string.",
185
+ fix: "Set query to a registered query name.",
186
+ },
187
+ statValueFieldEmpty: {
188
+ id: "dashboard/stat-value-field-empty",
189
+ summary: "A stat panel and stat-group child has a non-empty valueField.",
190
+ fix: "Set valueField to a field of the query result.",
191
+ },
192
+ customPanelNoComponent: {
193
+ id: "dashboard/custom-panel-no-component",
194
+ summary: "A custom panel declares a react or native component.",
195
+ fix: "Declare a react/native component marker.",
196
+ },
197
+ listPanelColumnsEmpty: {
198
+ id: "dashboard/list-panel-columns-empty",
199
+ summary: "A list panel declares at least one column.",
200
+ fix: "Add at least one column.",
201
+ },
202
+ filterIdEmpty: {
203
+ id: "dashboard/filter-id-empty",
204
+ summary: "The dashboard filter has a non-empty id.",
205
+ fix: "Set a non-empty filter.id.",
206
+ },
207
+ filterLabelEmpty: {
208
+ id: "dashboard/filter-label-empty",
209
+ summary: "The dashboard filter has a non-empty label.",
210
+ fix: "Set a non-empty filter.label.",
211
+ },
212
+ filterOptionsXor: {
213
+ id: "dashboard/filter-options-xor",
214
+ summary: "The dashboard filter sets exactly one of options and optionsQuery.",
215
+ fix: "Keep either options or optionsQuery.",
216
+ },
217
+ filterOptionsEmpty: {
218
+ id: "dashboard/filter-options-empty",
219
+ summary: "Static filter options are non-empty.",
220
+ fix: "Declare at least one option or use optionsQuery.",
221
+ },
222
+ filterOptionsQueryEmpty: {
223
+ id: "dashboard/filter-options-query-empty",
224
+ summary: "filter.optionsQuery is non-empty when set.",
225
+ fix: "Set optionsQuery to a query name or remove it.",
226
+ },
227
+ };