@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.
- package/AGENTS.md +4 -2
- package/agents/api/framework-db.md +1 -0
- package/agents/api/framework-engine.md +17 -2
- package/agents/api/framework-ui-types.md +15 -0
- package/agents/api/renderer-web.md +156 -2
- package/agents/api/types.md +113 -71
- package/agents/api.md +4 -4
- package/agents/boot-rules.md +744 -0
- package/agents/examples/anonymous-access.md +23 -1
- package/agents/examples/contact.md +173 -0
- package/agents/examples/delivery-notifications.md +34 -1
- package/agents/examples/record-detail-layout.md +13 -2
- package/agents/examples/search.md +65 -3
- package/agents/examples/secrets-demo.md +96 -2
- package/agents/examples/tenant-inactivity.md +138 -0
- package/agents/examples.md +2 -0
- package/agents/features-index.md +4 -0
- package/agents/features.md +25 -1
- package/agents/widgets.md +12 -1
- package/dist/api/export/export-rows.js +1 -0
- package/dist/compliance/index.d.ts +1 -1
- package/dist/db/event-store-executor-read-where.js +15 -5
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.js +1 -1
- package/dist/db/migrate-generator.js +3 -1
- package/dist/db/queries/event-consumer.js +11 -7
- package/dist/db/queries/event-store.d.ts +2 -1
- package/dist/db/queries/event-store.js +25 -6
- package/dist/db/queries/rls-boot-catalog.js +3 -1
- package/dist/db/queries/session-advisory-lock.d.ts +7 -0
- package/dist/db/queries/session-advisory-lock.js +23 -0
- package/dist/db/query.js +7 -10
- package/dist/db/row-level-security-connection.js +4 -2
- package/dist/engine/access.js +5 -1
- package/dist/engine/active-membership.js +1 -0
- package/dist/engine/boot-validator/access-declarations.js +76 -33
- package/dist/engine/boot-validator/action-wiring.js +8 -6
- package/dist/engine/boot-validator/agent-effect-rules.d.ts +12 -0
- package/dist/engine/boot-validator/agent-effect-rules.js +12 -0
- package/dist/engine/boot-validator/agent-effect.d.ts +2 -0
- package/dist/engine/boot-validator/agent-effect.js +20 -0
- package/dist/engine/boot-validator/boot-context.js +5 -1
- package/dist/engine/boot-validator/boot-environment-rules.d.ts +12 -0
- package/dist/engine/boot-validator/boot-environment-rules.js +12 -0
- package/dist/engine/boot-validator/boot-phases-app.js +5 -1
- package/dist/engine/boot-validator/boot-phases.js +3 -1
- package/dist/engine/boot-validator/boot-rules.d.ts +2624 -0
- package/dist/engine/boot-validator/boot-rules.js +58 -0
- package/dist/engine/boot-validator/bundled-lists-table.js +23 -9
- package/dist/engine/boot-validator/config-deps.js +71 -23
- package/dist/engine/boot-validator/config-edit-action-rules.d.ts +17 -0
- package/dist/engine/boot-validator/config-edit-action-rules.js +17 -0
- package/dist/engine/boot-validator/config-key-rules.d.ts +117 -0
- package/dist/engine/boot-validator/config-key-rules.js +117 -0
- package/dist/engine/boot-validator/custom-screen-write-qns.js +6 -2
- package/dist/engine/boot-validator/derived-sql-fields-rules.d.ts +77 -0
- package/dist/engine/boot-validator/derived-sql-fields-rules.js +77 -0
- package/dist/engine/boot-validator/derived-sql-fields.js +53 -17
- package/dist/engine/boot-validator/detail-screens.js +10 -4
- package/dist/engine/boot-validator/entity-declaration-rules.d.ts +92 -0
- package/dist/engine/boot-validator/entity-declaration-rules.js +92 -0
- package/dist/engine/boot-validator/entity-handler-access-rules.d.ts +102 -0
- package/dist/engine/boot-validator/entity-handler-access-rules.js +102 -0
- package/dist/engine/boot-validator/entity-handler.d.ts +0 -7
- package/dist/engine/boot-validator/entity-handler.js +259 -355
- package/dist/engine/boot-validator/entity-image-variants.d.ts +2 -0
- package/dist/engine/boot-validator/entity-image-variants.js +91 -0
- package/dist/engine/boot-validator/entity-list-aggregate-options.js +8 -2
- package/dist/engine/boot-validator/entity-reference-embedded-rules.d.ts +117 -0
- package/dist/engine/boot-validator/entity-reference-embedded-rules.js +117 -0
- package/dist/engine/boot-validator/entity-select-image-rules.d.ts +122 -0
- package/dist/engine/boot-validator/entity-select-image-rules.js +122 -0
- package/dist/engine/boot-validator/entity-select.d.ts +8 -0
- package/dist/engine/boot-validator/entity-select.js +197 -0
- package/dist/engine/boot-validator/entity-structure-rules.d.ts +107 -0
- package/dist/engine/boot-validator/entity-structure-rules.js +107 -0
- package/dist/engine/boot-validator/field-conditions-rules.d.ts +92 -0
- package/dist/engine/boot-validator/field-conditions-rules.js +92 -0
- package/dist/engine/boot-validator/field-conditions.js +67 -22
- package/dist/engine/boot-validator/form-derivations-rules.d.ts +77 -0
- package/dist/engine/boot-validator/form-derivations-rules.js +77 -0
- package/dist/engine/boot-validator/form-derivations.js +52 -18
- package/dist/engine/boot-validator/global-tenancy.js +13 -7
- package/dist/engine/boot-validator/handler-declaration-rules.d.ts +77 -0
- package/dist/engine/boot-validator/handler-declaration-rules.js +77 -0
- package/dist/engine/boot-validator/handler-field-references-rules.d.ts +22 -0
- package/dist/engine/boot-validator/handler-field-references-rules.js +22 -0
- package/dist/engine/boot-validator/handler-field-references.js +14 -6
- package/dist/engine/boot-validator/list-bulk-actions-rules.d.ts +42 -0
- package/dist/engine/boot-validator/list-bulk-actions-rules.js +42 -0
- package/dist/engine/boot-validator/list-bulk-actions.js +29 -11
- package/dist/engine/boot-validator/list-column-layout.js +22 -10
- package/dist/engine/boot-validator/list-query-rules.d.ts +107 -0
- package/dist/engine/boot-validator/list-query-rules.js +107 -0
- package/dist/engine/boot-validator/list-table-aggregate-options.js +43 -15
- package/dist/engine/boot-validator/list-table-aggregate-query.js +7 -3
- package/dist/engine/boot-validator/list-table-aggregate-rules.d.ts +82 -0
- package/dist/engine/boot-validator/list-table-aggregate-rules.js +82 -0
- package/dist/engine/boot-validator/list-table-export-options.js +19 -7
- package/dist/engine/boot-validator/list-table-options.js +33 -13
- package/dist/engine/boot-validator/list-table-reject-unknown-keys.js +6 -2
- package/dist/engine/boot-validator/list-table-rules.d.ts +132 -0
- package/dist/engine/boot-validator/list-table-rules.js +132 -0
- package/dist/engine/boot-validator/nav-rules.d.ts +42 -0
- package/dist/engine/boot-validator/nav-rules.js +42 -0
- package/dist/engine/boot-validator/nav.js +33 -17
- package/dist/engine/boot-validator/ownership-rules.d.ts +27 -0
- package/dist/engine/boot-validator/ownership-rules.js +27 -0
- package/dist/engine/boot-validator/ownership.js +28 -12
- package/dist/engine/boot-validator/parent-ref.js +32 -20
- package/dist/engine/boot-validator/projection-list-screens.js +76 -35
- package/dist/engine/boot-validator/query-output-columns.js +9 -3
- package/dist/engine/boot-validator/query-refs.js +20 -10
- package/dist/engine/boot-validator/query-rules.d.ts +37 -0
- package/dist/engine/boot-validator/query-rules.js +37 -0
- package/dist/engine/boot-validator/read-gate.js +14 -10
- package/dist/engine/boot-validator/record-owned.js +5 -1
- package/dist/engine/boot-validator/related-list-table-rules.js +17 -7
- package/dist/engine/boot-validator/screens-actions-rules.d.ts +185 -0
- package/dist/engine/boot-validator/screens-actions-rules.js +185 -0
- package/dist/engine/boot-validator/screens-actions.js +169 -93
- package/dist/engine/boot-validator/screens-dashboard-chart-rules.d.ts +87 -0
- package/dist/engine/boot-validator/screens-dashboard-chart-rules.js +87 -0
- package/dist/engine/boot-validator/screens-dashboard-rules.d.ts +227 -0
- package/dist/engine/boot-validator/screens-dashboard-rules.js +227 -0
- package/dist/engine/boot-validator/screens-dashboard.js +222 -85
- package/dist/engine/boot-validator/screens-forms-layout-rules.d.ts +122 -0
- package/dist/engine/boot-validator/screens-forms-layout-rules.js +122 -0
- package/dist/engine/boot-validator/screens-forms-rules.d.ts +152 -0
- package/dist/engine/boot-validator/screens-forms-rules.js +152 -0
- package/dist/engine/boot-validator/screens-forms.js +240 -112
- package/dist/engine/boot-validator/screens-kind-config-edit.js +72 -16
- package/dist/engine/boot-validator/screens-kind-entity-edit.js +15 -7
- package/dist/engine/boot-validator/screens-kind-entity-list.js +57 -32
- package/dist/engine/boot-validator/screens-kind-projection-detail-rules.d.ts +92 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail-rules.js +92 -0
- package/dist/engine/boot-validator/screens-kind-projection-detail.js +85 -47
- package/dist/engine/boot-validator/screens-kind-rules.d.ts +137 -0
- package/dist/engine/boot-validator/screens-kind-rules.js +137 -0
- package/dist/engine/boot-validator/screens-kind-secret-mint.js +18 -8
- package/dist/engine/boot-validator/screens-kind-shared.js +40 -22
- package/dist/engine/boot-validator/screens-lists-rules.d.ts +82 -0
- package/dist/engine/boot-validator/screens-lists-rules.js +82 -0
- package/dist/engine/boot-validator/screens-lists.js +90 -45
- package/dist/engine/boot-validator/screens-rules.d.ts +57 -0
- package/dist/engine/boot-validator/screens-rules.js +57 -0
- package/dist/engine/boot-validator/screens.js +17 -12
- package/dist/engine/boot-validator/transaction-phases.js +12 -4
- package/dist/engine/boot-validator/transfer-graph.js +17 -11
- package/dist/engine/boot-validator/url-prefill-fields.js +9 -5
- package/dist/engine/boot-validator/workspaces.js +11 -5
- package/dist/engine/boot-validator/zod-shape.js +6 -2
- package/dist/engine/entity-handlers.d.ts +1 -0
- package/dist/engine/entity-handlers.js +3 -0
- package/dist/engine/entity-list-runtime-options.js +23 -29
- package/dist/engine/extensions/tenant-data.d.ts +3 -0
- package/dist/engine/factories.d.ts +1 -1
- package/dist/engine/factories.js +4 -3
- package/dist/engine/index.d.ts +4 -2
- package/dist/engine/index.js +2 -0
- package/dist/engine/project-app-schema-for-roles.js +29 -14
- package/dist/engine/registry-facade.js +7 -8
- package/dist/engine/registry-validate.js +5 -1
- package/dist/engine/soft-delete-cleanup.d.ts +1 -0
- package/dist/engine/soft-delete-cleanup.js +5 -0
- package/dist/engine/steps/describe-workflow-step-error.js +1 -0
- package/dist/es-ops/operations-schema.d.ts +1 -1
- package/dist/event-store/ensure-dead-letter-table.d.ts +2 -0
- package/dist/event-store/ensure-dead-letter-table.js +10 -0
- package/dist/event-store/rebuild-dead-letter.js +2 -8
- package/dist/event-store/upcaster-dead-letter.js +2 -8
- package/dist/files/copy-pending-file-refs-to-tenant.d.ts +28 -0
- package/dist/files/copy-pending-file-refs-to-tenant.js +87 -0
- package/dist/files/file-routes.d.ts +1 -1
- package/dist/files/file-routes.js +21 -6
- package/dist/files/index.d.ts +2 -0
- package/dist/files/index.js +1 -0
- package/dist/i18n/required-surface-keys.js +1 -0
- package/dist/jobs/job-runner-helpers.js +1 -0
- package/dist/jobs/job-runner.js +7 -12
- package/dist/logging/utils.js +30 -60
- package/dist/observability/metrics-handle.js +10 -21
- package/dist/pipeline/cascade-handler.js +7 -6
- package/dist/pipeline/dispatch-query.js +18 -5
- package/dist/pipeline/dispatch-shared.d.ts +1 -0
- package/dist/pipeline/dispatch-shared.js +3 -1
- package/dist/pipeline/dispatch-write.js +10 -12
- package/dist/pipeline/dispatcher.js +12 -14
- package/dist/pipeline/event-dispatcher-admin.js +9 -8
- package/dist/pipeline/event-dispatcher-delivery.d.ts +19 -1
- package/dist/pipeline/event-dispatcher-delivery.js +121 -29
- package/dist/pipeline/event-dispatcher.d.ts +5 -1
- package/dist/pipeline/event-dispatcher.js +28 -21
- package/dist/pipeline/handler-context-phase-denials.js +2 -0
- package/dist/pipeline/multi-stream-apply-context.js +12 -20
- package/dist/pipeline/system-hooks.d.ts +4 -1
- package/dist/pipeline/system-hooks.js +79 -6
- package/dist/pipeline/system-identity-switch.js +10 -7
- package/dist/search/build-search-snippet.d.ts +9 -0
- package/dist/search/build-search-snippet.js +40 -0
- package/dist/search/index.d.ts +1 -0
- package/dist/search/index.js +1 -0
- package/dist/search/meilisearch-adapter.d.ts +32 -0
- package/dist/search/meilisearch-adapter.js +153 -56
- package/dist/search/meilisearch-chunking.d.ts +21 -0
- package/dist/search/meilisearch-chunking.js +96 -0
- package/dist/search/reindex-entity.d.ts +1 -0
- package/dist/search/reindex-entity.js +97 -52
- package/dist/ui-types/index.d.ts +1 -1
- package/dist/upgrade-cli.js +3 -14
- package/package.json +3 -3
- package/src/changes.json +79 -0
|
@@ -4,6 +4,8 @@ import { isListAggregateGroupable, isListAggregateMeasureSupported, } from "../.
|
|
|
4
4
|
import { holdsCiphertextOrSecret } from "../../db/entity-field-encryption.js";
|
|
5
5
|
import { normalizeListColumn } from "../screen-helpers.js";
|
|
6
6
|
import { LIST_TABLE_GROUPING_KEYS, LIST_TABLE_TOTAL_KEYS, } from "../types/screen.js";
|
|
7
|
+
import { bootRuleError } from "./boot-rule.js";
|
|
8
|
+
import { LIST_TABLE_AGGREGATE_RULES } from "./list-table-aggregate-rules.js";
|
|
7
9
|
import { rejectUnknownKeys } from "./list-table-reject-unknown-keys.js";
|
|
8
10
|
function isStringArray(value) {
|
|
9
11
|
return Array.isArray(value) && value.every((entry) => typeof entry === "string");
|
|
@@ -18,8 +20,10 @@ function requireScreenColumn(where, path, field, columnFields) {
|
|
|
18
20
|
// skip: the field is a column, nothing to report
|
|
19
21
|
if (columnFields.has(field))
|
|
20
22
|
return;
|
|
21
|
-
throw
|
|
22
|
-
|
|
23
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.aggregateFieldNotColumn, {
|
|
24
|
+
message: `${where} ${path} "${field}" is not a column of this screen. ` +
|
|
25
|
+
`Columns: ${[...columnFields].join(", ")}.`,
|
|
26
|
+
});
|
|
23
27
|
}
|
|
24
28
|
const GROUPING_VALUE_CHECKS = [
|
|
25
29
|
{ key: "field", isValid: (v) => typeof v === "string", expected: "must be a string" },
|
|
@@ -37,7 +41,9 @@ function validateGroupingValueTypes(where, grouping) {
|
|
|
37
41
|
for (const check of GROUPING_VALUE_CHECKS) {
|
|
38
42
|
const value = grouping[check.key];
|
|
39
43
|
if (value !== undefined && !check.isValid(value)) {
|
|
40
|
-
throw
|
|
44
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.groupingValueInvalid, {
|
|
45
|
+
message: `${where} table.grouping.${check.key} ${check.expected}.`,
|
|
46
|
+
});
|
|
41
47
|
}
|
|
42
48
|
}
|
|
43
49
|
}
|
|
@@ -45,15 +51,21 @@ function validateGroupingFieldChoice(where, grouping) {
|
|
|
45
51
|
const { field, fields, userChoice } = grouping;
|
|
46
52
|
const offered = isStringArray(fields) ? fields : [];
|
|
47
53
|
if (field === undefined && (userChoice !== true || offered.length === 0)) {
|
|
48
|
-
throw
|
|
54
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.groupingNoField, {
|
|
55
|
+
message: `${where} table.grouping has no field. Set field, or userChoice: true with at least one entry in fields.`,
|
|
56
|
+
});
|
|
49
57
|
}
|
|
50
58
|
if (fields !== undefined && userChoice !== true) {
|
|
51
|
-
throw
|
|
59
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.groupingFieldsWithoutUserChoice, {
|
|
60
|
+
message: `${where} table.grouping.fields needs userChoice: true, or the user could never pick them.`,
|
|
61
|
+
});
|
|
52
62
|
}
|
|
53
63
|
}
|
|
54
64
|
function validateGroupingShape(where, grouping, columnFields) {
|
|
55
65
|
if (!isPlainObject(grouping)) {
|
|
56
|
-
throw
|
|
66
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.groupingNotObject, {
|
|
67
|
+
message: `${where} table.grouping must be an object like { field: "status" }.`,
|
|
68
|
+
});
|
|
57
69
|
}
|
|
58
70
|
rejectUnknownKeys(where, "table.grouping", grouping, LIST_TABLE_GROUPING_KEYS);
|
|
59
71
|
validateGroupingValueTypes(where, grouping);
|
|
@@ -64,17 +76,25 @@ function validateGroupingShape(where, grouping, columnFields) {
|
|
|
64
76
|
}
|
|
65
77
|
function validateTotalsShape(where, totals, columnFields) {
|
|
66
78
|
if (!Array.isArray(totals) || totals.length === 0) {
|
|
67
|
-
throw
|
|
79
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.totalsNotArray, {
|
|
80
|
+
message: `${where} table.totals must be a non-empty array like [{ field: "amount", kind: "sum" }].`,
|
|
81
|
+
});
|
|
68
82
|
}
|
|
69
83
|
for (const [i, entry] of totals.entries()) {
|
|
70
84
|
if (!isPlainObject(entry))
|
|
71
|
-
throw
|
|
85
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.totalEntryNotObject, {
|
|
86
|
+
message: `${where} table.totals[${i}] must be an object.`,
|
|
87
|
+
});
|
|
72
88
|
rejectUnknownKeys(where, `table.totals[${i}]`, entry, LIST_TABLE_TOTAL_KEYS);
|
|
73
89
|
if (typeof entry["field"] !== "string") {
|
|
74
|
-
throw
|
|
90
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.totalFieldNotString, {
|
|
91
|
+
message: `${where} table.totals[${i}].field must be a field name.`,
|
|
92
|
+
});
|
|
75
93
|
}
|
|
76
94
|
if (!isOneOf(LIST_AGGREGATE_MEASURE_KINDS, entry["kind"])) {
|
|
77
|
-
throw
|
|
95
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.totalKindInvalid, {
|
|
96
|
+
message: `${where} table.totals[${i}].kind must be one of ${LIST_AGGREGATE_MEASURE_KINDS.join(", ")}.`,
|
|
97
|
+
});
|
|
78
98
|
}
|
|
79
99
|
requireScreenColumn(where, `table.totals[${i}].field`, entry["field"], columnFields);
|
|
80
100
|
}
|
|
@@ -96,7 +116,9 @@ function rejectSecret(where, path, field, info) {
|
|
|
96
116
|
// skip: only secret fields are rejected here
|
|
97
117
|
if (!info.secret)
|
|
98
118
|
return;
|
|
99
|
-
throw
|
|
119
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.aggregateFieldSecret, {
|
|
120
|
+
message: `${where} ${path} "${field}" is encrypted, personal or secret and cannot be grouped or summed.`,
|
|
121
|
+
});
|
|
100
122
|
}
|
|
101
123
|
/**
|
|
102
124
|
* `lookup` answers undefined for a field it does not know. With `strict` (an entity
|
|
@@ -106,7 +128,9 @@ export function validateListTableAggregateFieldTypes(where, table, lookup, stric
|
|
|
106
128
|
const resolve = (path, field) => {
|
|
107
129
|
const info = lookup(field);
|
|
108
130
|
if (info === undefined && strict) {
|
|
109
|
-
throw
|
|
131
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.aggregateFieldNotOnEntity, {
|
|
132
|
+
message: `${where} ${path} "${field}" is not a field of the entity behind this list.`,
|
|
133
|
+
});
|
|
110
134
|
}
|
|
111
135
|
return info;
|
|
112
136
|
};
|
|
@@ -116,7 +140,9 @@ export function validateListTableAggregateFieldTypes(where, table, lookup, stric
|
|
|
116
140
|
continue;
|
|
117
141
|
rejectSecret(where, "table.grouping field", field, info);
|
|
118
142
|
if (!isListAggregateGroupable(info.type, info.multiple)) {
|
|
119
|
-
throw
|
|
143
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.groupingFieldNotGroupable, {
|
|
144
|
+
message: `${where} table.grouping field "${field}" (${info.type}) cannot be grouped by.`,
|
|
145
|
+
});
|
|
120
146
|
}
|
|
121
147
|
}
|
|
122
148
|
for (const [i, total] of (table.totals ?? []).entries()) {
|
|
@@ -126,8 +152,10 @@ export function validateListTableAggregateFieldTypes(where, table, lookup, stric
|
|
|
126
152
|
continue;
|
|
127
153
|
rejectSecret(where, `${path}.field`, total.field, info);
|
|
128
154
|
if (!isListAggregateMeasureSupported(total.kind, info.type)) {
|
|
129
|
-
throw
|
|
130
|
-
|
|
155
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.totalKindUnsupported, {
|
|
156
|
+
message: `${where} ${path}: "${total.kind}" is not supported on ${info.type} field "${total.field}". ` +
|
|
157
|
+
`sum and avg need number, decimal, money or bigInt; min and max also take date and timestamp.`,
|
|
158
|
+
});
|
|
131
159
|
}
|
|
132
160
|
}
|
|
133
161
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { resolveEntityBehindListQuery } from "../entity-list-searchability.js";
|
|
2
2
|
import { findEntity } from "../find-entity.js";
|
|
3
3
|
import { normalizeListColumn } from "../screen-helpers.js";
|
|
4
|
+
import { bootRuleError } from "./boot-rule.js";
|
|
4
5
|
import { entityAggregateFieldLookup, validateListTableAggregateFieldTypes, } from "./list-table-aggregate-options.js";
|
|
6
|
+
import { LIST_TABLE_AGGREGATE_RULES } from "./list-table-aggregate-rules.js";
|
|
5
7
|
import { getZodObjectShape } from "./zod-shape.js";
|
|
6
8
|
function columnValueTypeLookup(columns) {
|
|
7
9
|
const valueTypes = new Map(columns
|
|
@@ -21,9 +23,11 @@ export function validateListTableAggregateQuery(args) {
|
|
|
21
23
|
return;
|
|
22
24
|
const shape = getZodObjectShape(handler?.schema);
|
|
23
25
|
if (shape === undefined || !("aggregate" in shape)) {
|
|
24
|
-
throw
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
throw bootRuleError(LIST_TABLE_AGGREGATE_RULES.aggregateParamMissing, {
|
|
27
|
+
message: `${prefix}: table.grouping/table.totals need query "${query}" to accept "aggregate" — ` +
|
|
28
|
+
`reuse entityListSchema (or listAggregatePayloadSchema) in the handler's schema and answer it ` +
|
|
29
|
+
`with answerListAggregate, or remove grouping and totals.`,
|
|
30
|
+
});
|
|
27
31
|
}
|
|
28
32
|
const entity = resolveEntityBehindListQuery(query, handler, (name) => findEntity(args.featureMap, name));
|
|
29
33
|
const lookup = entity === undefined ? columnValueTypeLookup(args.columns) : entityAggregateFieldLookup(entity);
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export declare const LIST_TABLE_AGGREGATE_RULES: {
|
|
2
|
+
readonly groupingNotObject: {
|
|
3
|
+
readonly id: "list-table/grouping-not-object";
|
|
4
|
+
readonly summary: "table.grouping is an object.";
|
|
5
|
+
readonly fix: 'Write table.grouping as { field: "status" }.';
|
|
6
|
+
};
|
|
7
|
+
readonly groupingValueInvalid: {
|
|
8
|
+
readonly id: "list-table/grouping-value-invalid";
|
|
9
|
+
readonly summary: "Each table.grouping option has the value type its schema expects.";
|
|
10
|
+
readonly fix: "Change the option to the type named in the message.";
|
|
11
|
+
};
|
|
12
|
+
readonly groupingNoField: {
|
|
13
|
+
readonly id: "list-table/grouping-no-field";
|
|
14
|
+
readonly summary: "table.grouping names a field, or offers fields with userChoice: true.";
|
|
15
|
+
readonly fix: "Set field, or userChoice: true with at least one entry in fields.";
|
|
16
|
+
};
|
|
17
|
+
readonly groupingFieldsWithoutUserChoice: {
|
|
18
|
+
readonly id: "list-table/grouping-fields-without-user-choice";
|
|
19
|
+
readonly summary: "table.grouping.fields comes with userChoice: true, otherwise the user cannot pick them.";
|
|
20
|
+
readonly fix: "Set userChoice: true or remove fields.";
|
|
21
|
+
};
|
|
22
|
+
readonly totalsNotArray: {
|
|
23
|
+
readonly id: "list-table/totals-not-array";
|
|
24
|
+
readonly summary: "table.totals is a non-empty array.";
|
|
25
|
+
readonly fix: 'Write table.totals as [{ field: "amount", kind: "sum" }] or remove it.';
|
|
26
|
+
};
|
|
27
|
+
readonly totalEntryNotObject: {
|
|
28
|
+
readonly id: "list-table/total-entry-not-object";
|
|
29
|
+
readonly summary: "Every table.totals entry is an object.";
|
|
30
|
+
readonly fix: "Write each entry as { field, kind }.";
|
|
31
|
+
};
|
|
32
|
+
readonly totalFieldNotString: {
|
|
33
|
+
readonly id: "list-table/total-field-not-string";
|
|
34
|
+
readonly summary: "A table.totals entry names its field as a string.";
|
|
35
|
+
readonly fix: "Set field to a field name.";
|
|
36
|
+
};
|
|
37
|
+
readonly totalKindInvalid: {
|
|
38
|
+
readonly id: "list-table/total-kind-invalid";
|
|
39
|
+
readonly summary: "A table.totals entry uses a supported aggregate kind.";
|
|
40
|
+
readonly fix: "Use one of the listed kinds.";
|
|
41
|
+
};
|
|
42
|
+
readonly aggregateFieldNotColumn: {
|
|
43
|
+
readonly id: "list-table/aggregate-field-not-column";
|
|
44
|
+
readonly summary: "Fields used by table.grouping and table.totals are columns of the screen.";
|
|
45
|
+
readonly fix: "Add the field to the screen's columns or use a listed column.";
|
|
46
|
+
};
|
|
47
|
+
readonly aggregateFieldNotOnEntity: {
|
|
48
|
+
readonly id: "list-table/aggregate-field-not-on-entity";
|
|
49
|
+
readonly summary: "Fields used by table.grouping and table.totals exist on the entity behind the list.";
|
|
50
|
+
readonly fix: "Use a field of the entity.";
|
|
51
|
+
};
|
|
52
|
+
readonly aggregateFieldSecret: {
|
|
53
|
+
readonly id: "list-table/aggregate-field-secret";
|
|
54
|
+
readonly summary: "table.grouping and table.totals skip encrypted, personal and secret fields.";
|
|
55
|
+
readonly fix: "Pick a field that is not encrypted, personal or secret.";
|
|
56
|
+
};
|
|
57
|
+
readonly groupingFieldNotGroupable: {
|
|
58
|
+
readonly id: "list-table/grouping-field-not-groupable";
|
|
59
|
+
readonly summary: "table.grouping uses only field types that can be grouped by.";
|
|
60
|
+
readonly fix: "Group by a groupable field.";
|
|
61
|
+
};
|
|
62
|
+
readonly totalKindUnsupported: {
|
|
63
|
+
readonly id: "list-table/total-kind-unsupported";
|
|
64
|
+
readonly summary: "A table.totals kind is supported on the type of its field.";
|
|
65
|
+
readonly fix: "Use sum or avg on number, decimal, money or bigInt fields; min and max also take date and timestamp.";
|
|
66
|
+
};
|
|
67
|
+
readonly aggregateParamMissing: {
|
|
68
|
+
readonly id: "list-table/aggregate-param-missing";
|
|
69
|
+
readonly summary: "A list with table.grouping or table.totals binds a query that accepts aggregate.";
|
|
70
|
+
readonly fix: "Reuse entityListSchema or listAggregatePayloadSchema, answer it with answerListAggregate, or remove grouping and totals.";
|
|
71
|
+
};
|
|
72
|
+
readonly rangeFacetFieldType: {
|
|
73
|
+
readonly id: "list-table/range-facet-field-type";
|
|
74
|
+
readonly summary: 'A facet with display "range" is on a number, decimal, money or bigInt field.';
|
|
75
|
+
readonly fix: "Use another facet display or a numeric field.";
|
|
76
|
+
};
|
|
77
|
+
readonly rangeFacetNotFilterable: {
|
|
78
|
+
readonly id: "list-table/range-facet-not-filterable";
|
|
79
|
+
readonly summary: 'A facet with display "range" is on a filterable field that is not encrypted, personal or secret.';
|
|
80
|
+
readonly fix: "Set filterable: true on the field or drop the range facet.";
|
|
81
|
+
};
|
|
82
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export const LIST_TABLE_AGGREGATE_RULES = {
|
|
2
|
+
groupingNotObject: {
|
|
3
|
+
id: "list-table/grouping-not-object",
|
|
4
|
+
summary: "table.grouping is an object.",
|
|
5
|
+
fix: 'Write table.grouping as { field: "status" }.',
|
|
6
|
+
},
|
|
7
|
+
groupingValueInvalid: {
|
|
8
|
+
id: "list-table/grouping-value-invalid",
|
|
9
|
+
summary: "Each table.grouping option has the value type its schema expects.",
|
|
10
|
+
fix: "Change the option to the type named in the message.",
|
|
11
|
+
},
|
|
12
|
+
groupingNoField: {
|
|
13
|
+
id: "list-table/grouping-no-field",
|
|
14
|
+
summary: "table.grouping names a field, or offers fields with userChoice: true.",
|
|
15
|
+
fix: "Set field, or userChoice: true with at least one entry in fields.",
|
|
16
|
+
},
|
|
17
|
+
groupingFieldsWithoutUserChoice: {
|
|
18
|
+
id: "list-table/grouping-fields-without-user-choice",
|
|
19
|
+
summary: "table.grouping.fields comes with userChoice: true, otherwise the user cannot pick them.",
|
|
20
|
+
fix: "Set userChoice: true or remove fields.",
|
|
21
|
+
},
|
|
22
|
+
totalsNotArray: {
|
|
23
|
+
id: "list-table/totals-not-array",
|
|
24
|
+
summary: "table.totals is a non-empty array.",
|
|
25
|
+
fix: 'Write table.totals as [{ field: "amount", kind: "sum" }] or remove it.',
|
|
26
|
+
},
|
|
27
|
+
totalEntryNotObject: {
|
|
28
|
+
id: "list-table/total-entry-not-object",
|
|
29
|
+
summary: "Every table.totals entry is an object.",
|
|
30
|
+
fix: "Write each entry as { field, kind }.",
|
|
31
|
+
},
|
|
32
|
+
totalFieldNotString: {
|
|
33
|
+
id: "list-table/total-field-not-string",
|
|
34
|
+
summary: "A table.totals entry names its field as a string.",
|
|
35
|
+
fix: "Set field to a field name.",
|
|
36
|
+
},
|
|
37
|
+
totalKindInvalid: {
|
|
38
|
+
id: "list-table/total-kind-invalid",
|
|
39
|
+
summary: "A table.totals entry uses a supported aggregate kind.",
|
|
40
|
+
fix: "Use one of the listed kinds.",
|
|
41
|
+
},
|
|
42
|
+
aggregateFieldNotColumn: {
|
|
43
|
+
id: "list-table/aggregate-field-not-column",
|
|
44
|
+
summary: "Fields used by table.grouping and table.totals are columns of the screen.",
|
|
45
|
+
fix: "Add the field to the screen's columns or use a listed column.",
|
|
46
|
+
},
|
|
47
|
+
aggregateFieldNotOnEntity: {
|
|
48
|
+
id: "list-table/aggregate-field-not-on-entity",
|
|
49
|
+
summary: "Fields used by table.grouping and table.totals exist on the entity behind the list.",
|
|
50
|
+
fix: "Use a field of the entity.",
|
|
51
|
+
},
|
|
52
|
+
aggregateFieldSecret: {
|
|
53
|
+
id: "list-table/aggregate-field-secret",
|
|
54
|
+
summary: "table.grouping and table.totals skip encrypted, personal and secret fields.",
|
|
55
|
+
fix: "Pick a field that is not encrypted, personal or secret.",
|
|
56
|
+
},
|
|
57
|
+
groupingFieldNotGroupable: {
|
|
58
|
+
id: "list-table/grouping-field-not-groupable",
|
|
59
|
+
summary: "table.grouping uses only field types that can be grouped by.",
|
|
60
|
+
fix: "Group by a groupable field.",
|
|
61
|
+
},
|
|
62
|
+
totalKindUnsupported: {
|
|
63
|
+
id: "list-table/total-kind-unsupported",
|
|
64
|
+
summary: "A table.totals kind is supported on the type of its field.",
|
|
65
|
+
fix: "Use sum or avg on number, decimal, money or bigInt fields; min and max also take date and timestamp.",
|
|
66
|
+
},
|
|
67
|
+
aggregateParamMissing: {
|
|
68
|
+
id: "list-table/aggregate-param-missing",
|
|
69
|
+
summary: "A list with table.grouping or table.totals binds a query that accepts aggregate.",
|
|
70
|
+
fix: "Reuse entityListSchema or listAggregatePayloadSchema, answer it with answerListAggregate, or remove grouping and totals.",
|
|
71
|
+
},
|
|
72
|
+
rangeFacetFieldType: {
|
|
73
|
+
id: "list-table/range-facet-field-type",
|
|
74
|
+
summary: 'A facet with display "range" is on a number, decimal, money or bigInt field.',
|
|
75
|
+
fix: "Use another facet display or a numeric field.",
|
|
76
|
+
},
|
|
77
|
+
rangeFacetNotFilterable: {
|
|
78
|
+
id: "list-table/range-facet-not-filterable",
|
|
79
|
+
summary: 'A facet with display "range" is on a filterable field that is not encrypted, personal or secret.',
|
|
80
|
+
fix: "Set filterable: true on the field or drop the range facet.",
|
|
81
|
+
},
|
|
82
|
+
};
|
|
@@ -1,27 +1,39 @@
|
|
|
1
1
|
import { isPlainObject } from "@cosmicdrift/kumiko-types/type-guards";
|
|
2
2
|
import { LIST_TABLE_EXPORT_KEYS, MAX_EXPORT_MAX_ROWS } from "../types/screen.js";
|
|
3
|
+
import { bootRuleError } from "./boot-rule.js";
|
|
3
4
|
import { rejectUnknownKeys } from "./list-table-reject-unknown-keys.js";
|
|
5
|
+
import { LIST_TABLE_RULES } from "./list-table-rules.js";
|
|
4
6
|
export function validateExportOptions(where, value, allowed) {
|
|
5
7
|
if (!allowed) {
|
|
6
|
-
throw
|
|
8
|
+
throw bootRuleError(LIST_TABLE_RULES.exportNotAllowed, {
|
|
9
|
+
message: `${where} table.export is only available on entityList and projectionList screens. Remove it here.`,
|
|
10
|
+
});
|
|
7
11
|
}
|
|
8
12
|
if (!isPlainObject(value)) {
|
|
9
|
-
throw
|
|
13
|
+
throw bootRuleError(LIST_TABLE_RULES.exportNotObject, {
|
|
14
|
+
message: `${where} table.export must be an object like { xlsx: true, maxRows: 5000 }.`,
|
|
15
|
+
});
|
|
10
16
|
}
|
|
11
17
|
rejectUnknownKeys(where, "table.export", value, LIST_TABLE_EXPORT_KEYS);
|
|
12
18
|
if (value["xlsx"] !== true) {
|
|
13
|
-
throw
|
|
19
|
+
throw bootRuleError(LIST_TABLE_RULES.exportXlsxNotTrue, {
|
|
20
|
+
message: `${where} table.export.xlsx must be true (the only export format).`,
|
|
21
|
+
});
|
|
14
22
|
}
|
|
15
23
|
if (value["maxRows"] !== undefined)
|
|
16
24
|
validateMaxRows(where, value["maxRows"]);
|
|
17
25
|
}
|
|
18
26
|
function validateMaxRows(where, maxRows) {
|
|
19
27
|
if (typeof maxRows !== "number" || !Number.isInteger(maxRows) || maxRows < 1) {
|
|
20
|
-
throw
|
|
21
|
-
|
|
28
|
+
throw bootRuleError(LIST_TABLE_RULES.exportMaxRowsInvalid, {
|
|
29
|
+
message: `${where} table.export.maxRows is ${JSON.stringify(maxRows)} — must be an integer >= 1. ` +
|
|
30
|
+
`Set a positive row limit or remove maxRows to use the default.`,
|
|
31
|
+
});
|
|
22
32
|
}
|
|
23
33
|
if (maxRows > MAX_EXPORT_MAX_ROWS) {
|
|
24
|
-
throw
|
|
25
|
-
|
|
34
|
+
throw bootRuleError(LIST_TABLE_RULES.exportMaxRowsTooLarge, {
|
|
35
|
+
message: `${where} table.export.maxRows is ${maxRows} — must be at most ${MAX_EXPORT_MAX_ROWS} ` +
|
|
36
|
+
`(the workbook is built in memory). Lower maxRows.`,
|
|
37
|
+
});
|
|
26
38
|
}
|
|
27
39
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { isOneOf, isPlainObject } from "@cosmicdrift/kumiko-types/type-guards";
|
|
2
2
|
import { normalizeListColumn } from "../screen-helpers.js";
|
|
3
3
|
import { LIST_TABLE_DENSITIES, LIST_TABLE_DENSITY_KEYS, LIST_TABLE_OPTION_KEYS, } from "../types/screen.js";
|
|
4
|
+
import { bootRuleError } from "./boot-rule.js";
|
|
4
5
|
import { validateColumnLayout } from "./list-column-layout.js";
|
|
5
6
|
import { validateListTableAggregateShape } from "./list-table-aggregate-options.js";
|
|
6
7
|
import { validateExportOptions } from "./list-table-export-options.js";
|
|
7
8
|
import { rejectUnknownKeys } from "./list-table-reject-unknown-keys.js";
|
|
9
|
+
import { LIST_TABLE_RULES } from "./list-table-rules.js";
|
|
8
10
|
const BOOLEAN_OPTION_KEYS = [
|
|
9
11
|
"rememberState",
|
|
10
12
|
"resetAll",
|
|
@@ -15,26 +17,36 @@ const BOOLEAN_OPTION_KEYS = [
|
|
|
15
17
|
];
|
|
16
18
|
function validateDensity(where, density) {
|
|
17
19
|
if (!isPlainObject(density)) {
|
|
18
|
-
throw
|
|
20
|
+
throw bootRuleError(LIST_TABLE_RULES.densityNotObject, {
|
|
21
|
+
message: `${where} table.density must be an object like { default: "compact", userChoice: true }.`,
|
|
22
|
+
});
|
|
19
23
|
}
|
|
20
24
|
rejectUnknownKeys(where, "table.density", density, LIST_TABLE_DENSITY_KEYS);
|
|
21
25
|
if (Object.keys(density).length === 0) {
|
|
22
|
-
throw
|
|
23
|
-
|
|
26
|
+
throw bootRuleError(LIST_TABLE_RULES.densityEmpty, {
|
|
27
|
+
message: `${where} table.density is empty. Set default (${LIST_TABLE_DENSITIES.join(" | ")}) ` +
|
|
28
|
+
`and/or userChoice, or remove table.density.`,
|
|
29
|
+
});
|
|
24
30
|
}
|
|
25
31
|
if (density["default"] !== undefined && !isOneOf(LIST_TABLE_DENSITIES, density["default"])) {
|
|
26
|
-
throw
|
|
27
|
-
|
|
32
|
+
throw bootRuleError(LIST_TABLE_RULES.densityDefaultInvalid, {
|
|
33
|
+
message: `${where} table.density.default is ${JSON.stringify(density["default"])} — ` +
|
|
34
|
+
`must be one of ${LIST_TABLE_DENSITIES.map((d) => `"${d}"`).join(", ")}.`,
|
|
35
|
+
});
|
|
28
36
|
}
|
|
29
37
|
if (density["userChoice"] !== undefined && typeof density["userChoice"] !== "boolean") {
|
|
30
|
-
throw
|
|
38
|
+
throw bootRuleError(LIST_TABLE_RULES.densityUserChoiceNotBoolean, {
|
|
39
|
+
message: `${where} table.density.userChoice must be a boolean.`,
|
|
40
|
+
});
|
|
31
41
|
}
|
|
32
42
|
}
|
|
33
43
|
function validateHiddenColumns(where, columnPickerOn, columns) {
|
|
34
44
|
const normalized = columns.map(normalizeListColumn);
|
|
35
45
|
for (const col of normalized) {
|
|
36
46
|
if (col.hidden !== undefined && typeof col.hidden !== "boolean") {
|
|
37
|
-
throw
|
|
47
|
+
throw bootRuleError(LIST_TABLE_RULES.hiddenNotBoolean, {
|
|
48
|
+
message: `${where} column "${col.field}" has a non-boolean "hidden".`,
|
|
49
|
+
});
|
|
38
50
|
}
|
|
39
51
|
}
|
|
40
52
|
const hidden = normalized.filter((col) => col.hidden === true);
|
|
@@ -42,11 +54,15 @@ function validateHiddenColumns(where, columnPickerOn, columns) {
|
|
|
42
54
|
if (hidden.length === 0)
|
|
43
55
|
return;
|
|
44
56
|
if (!columnPickerOn) {
|
|
45
|
-
throw
|
|
46
|
-
|
|
57
|
+
throw bootRuleError(LIST_TABLE_RULES.hiddenWithoutColumnPicker, {
|
|
58
|
+
message: `${where} column "${hidden[0]?.field}" is hidden but table.columnPicker is not enabled, ` +
|
|
59
|
+
`so the user could never show it. Set table: { columnPicker: true } or remove "hidden".`,
|
|
60
|
+
});
|
|
47
61
|
}
|
|
48
62
|
if (hidden.length === normalized.length) {
|
|
49
|
-
throw
|
|
63
|
+
throw bootRuleError(LIST_TABLE_RULES.hidesEveryColumn, {
|
|
64
|
+
message: `${where} hides every column. At least one column must start visible — remove "hidden" from one.`,
|
|
65
|
+
});
|
|
50
66
|
}
|
|
51
67
|
}
|
|
52
68
|
/** `where` is the full message prefix, e.g. `[Feature x] Screen "y" (entityList)`. */
|
|
@@ -58,13 +74,17 @@ export function validateListTableOptions(where, table, columns, exportAllowed =
|
|
|
58
74
|
return;
|
|
59
75
|
}
|
|
60
76
|
if (!isPlainObject(table)) {
|
|
61
|
-
throw
|
|
62
|
-
|
|
77
|
+
throw bootRuleError(LIST_TABLE_RULES.notObject, {
|
|
78
|
+
message: `${where} table must be an object like { rememberState: true }. ` +
|
|
79
|
+
`Allowed keys: ${LIST_TABLE_OPTION_KEYS.join(", ")}.`,
|
|
80
|
+
});
|
|
63
81
|
}
|
|
64
82
|
rejectUnknownKeys(where, "table", table, LIST_TABLE_OPTION_KEYS);
|
|
65
83
|
for (const key of BOOLEAN_OPTION_KEYS) {
|
|
66
84
|
if (table[key] !== undefined && typeof table[key] !== "boolean") {
|
|
67
|
-
throw
|
|
85
|
+
throw bootRuleError(LIST_TABLE_RULES.optionNotBoolean, {
|
|
86
|
+
message: `${where} table.${key} must be a boolean, got ${typeof table[key]}.`,
|
|
87
|
+
});
|
|
68
88
|
}
|
|
69
89
|
}
|
|
70
90
|
if (table["density"] !== undefined)
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { bootRuleError } from "./boot-rule.js";
|
|
2
|
+
import { LIST_TABLE_RULES } from "./list-table-rules.js";
|
|
1
3
|
export function rejectUnknownKeys(where, block, value, allowed) {
|
|
2
4
|
const unknown = Object.keys(value).filter((key) => !allowed.includes(key));
|
|
3
5
|
if (unknown.length > 0) {
|
|
4
|
-
throw
|
|
5
|
-
|
|
6
|
+
throw bootRuleError(LIST_TABLE_RULES.unknownKeys, {
|
|
7
|
+
message: `${where} ${block} has unknown key(s) ${unknown.map((k) => `"${k}"`).join(", ")}. ` +
|
|
8
|
+
`Allowed keys: ${allowed.join(", ")}.`,
|
|
9
|
+
});
|
|
6
10
|
}
|
|
7
11
|
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
export declare const LIST_TABLE_RULES: {
|
|
2
|
+
readonly notObject: {
|
|
3
|
+
readonly id: "list-table/not-object";
|
|
4
|
+
readonly summary: "A list's table option is an object.";
|
|
5
|
+
readonly fix: "Write table as an object such as { rememberState: true } using only the allowed keys.";
|
|
6
|
+
};
|
|
7
|
+
readonly unknownKeys: {
|
|
8
|
+
readonly id: "list-table/unknown-keys";
|
|
9
|
+
readonly summary: "A table option block uses only the keys its schema allows.";
|
|
10
|
+
readonly fix: "Remove the unknown keys or rename them to one of the allowed keys.";
|
|
11
|
+
};
|
|
12
|
+
readonly optionNotBoolean: {
|
|
13
|
+
readonly id: "list-table/option-not-boolean";
|
|
14
|
+
readonly summary: "The boolean table switches (rememberState, columnPicker, pinning, ...) are booleans.";
|
|
15
|
+
readonly fix: "Set the table option to true or false.";
|
|
16
|
+
};
|
|
17
|
+
readonly densityNotObject: {
|
|
18
|
+
readonly id: "list-table/density-not-object";
|
|
19
|
+
readonly summary: "table.density is an object.";
|
|
20
|
+
readonly fix: 'Write table.density as { default: "compact", userChoice: true }.';
|
|
21
|
+
};
|
|
22
|
+
readonly densityEmpty: {
|
|
23
|
+
readonly id: "list-table/density-empty";
|
|
24
|
+
readonly summary: "table.density sets default and/or userChoice.";
|
|
25
|
+
readonly fix: "Set default and/or userChoice, or remove table.density.";
|
|
26
|
+
};
|
|
27
|
+
readonly densityDefaultInvalid: {
|
|
28
|
+
readonly id: "list-table/density-default-invalid";
|
|
29
|
+
readonly summary: "table.density.default is one of the known densities.";
|
|
30
|
+
readonly fix: "Use one of the listed density values.";
|
|
31
|
+
};
|
|
32
|
+
readonly densityUserChoiceNotBoolean: {
|
|
33
|
+
readonly id: "list-table/density-user-choice-not-boolean";
|
|
34
|
+
readonly summary: "table.density.userChoice is a boolean.";
|
|
35
|
+
readonly fix: "Set userChoice to true or false.";
|
|
36
|
+
};
|
|
37
|
+
readonly hiddenNotBoolean: {
|
|
38
|
+
readonly id: "list-table/hidden-not-boolean";
|
|
39
|
+
readonly summary: "A column's hidden flag is a boolean.";
|
|
40
|
+
readonly fix: "Set hidden to true or remove it.";
|
|
41
|
+
};
|
|
42
|
+
readonly hiddenWithoutColumnPicker: {
|
|
43
|
+
readonly id: "list-table/hidden-without-column-picker";
|
|
44
|
+
readonly summary: "Hidden columns need table.columnPicker, otherwise the user can never show them.";
|
|
45
|
+
readonly fix: "Set table: { columnPicker: true } or remove hidden from the column.";
|
|
46
|
+
};
|
|
47
|
+
readonly hidesEveryColumn: {
|
|
48
|
+
readonly id: "list-table/hides-every-column";
|
|
49
|
+
readonly summary: "At least one list column starts visible.";
|
|
50
|
+
readonly fix: "Remove hidden from one column.";
|
|
51
|
+
};
|
|
52
|
+
readonly exportNotAllowed: {
|
|
53
|
+
readonly id: "list-table/export-not-allowed";
|
|
54
|
+
readonly summary: "table.export is only declared on entityList and projectionList screens.";
|
|
55
|
+
readonly fix: "Remove table.export from this screen or section.";
|
|
56
|
+
};
|
|
57
|
+
readonly exportNotObject: {
|
|
58
|
+
readonly id: "list-table/export-not-object";
|
|
59
|
+
readonly summary: "table.export is an object.";
|
|
60
|
+
readonly fix: "Write table.export as { xlsx: true, maxRows: 5000 }.";
|
|
61
|
+
};
|
|
62
|
+
readonly exportXlsxNotTrue: {
|
|
63
|
+
readonly id: "list-table/export-xlsx-not-true";
|
|
64
|
+
readonly summary: "table.export.xlsx is true, the only export format.";
|
|
65
|
+
readonly fix: "Set xlsx: true.";
|
|
66
|
+
};
|
|
67
|
+
readonly exportMaxRowsInvalid: {
|
|
68
|
+
readonly id: "list-table/export-max-rows-invalid";
|
|
69
|
+
readonly summary: "table.export.maxRows is an integer of at least 1.";
|
|
70
|
+
readonly fix: "Set a positive integer row limit or remove maxRows to use the default.";
|
|
71
|
+
};
|
|
72
|
+
readonly exportMaxRowsTooLarge: {
|
|
73
|
+
readonly id: "list-table/export-max-rows-too-large";
|
|
74
|
+
readonly summary: "table.export.maxRows stays within the in-memory workbook limit.";
|
|
75
|
+
readonly fix: "Lower maxRows to the allowed maximum.";
|
|
76
|
+
};
|
|
77
|
+
readonly columnPinnedInvalid: {
|
|
78
|
+
readonly id: "list-table/column-pinned-invalid";
|
|
79
|
+
readonly summary: "A column's pinned value is one of the known pin sides.";
|
|
80
|
+
readonly fix: "Use one of the listed pin values.";
|
|
81
|
+
};
|
|
82
|
+
readonly columnPinnedWithoutPinning: {
|
|
83
|
+
readonly id: "list-table/column-pinned-without-pinning";
|
|
84
|
+
readonly summary: "A pinned column needs table.pinning, otherwise the pin has no effect.";
|
|
85
|
+
readonly fix: "Set table: { pinning: true } or remove pinned from the column.";
|
|
86
|
+
};
|
|
87
|
+
readonly columnWidthInvalid: {
|
|
88
|
+
readonly id: "list-table/column-width-invalid";
|
|
89
|
+
readonly summary: "A column's width and minWidth are finite pixel counts greater than 0.";
|
|
90
|
+
readonly fix: "Set a positive finite number or remove the option.";
|
|
91
|
+
};
|
|
92
|
+
readonly columnWidthWithoutResizing: {
|
|
93
|
+
readonly id: "list-table/column-width-without-resizing";
|
|
94
|
+
readonly summary: "A column's width or minWidth needs table.resizing, otherwise it has no effect.";
|
|
95
|
+
readonly fix: "Set table: { resizing: true } or remove width and minWidth from the column.";
|
|
96
|
+
};
|
|
97
|
+
readonly columnMinWidthExceedsWidth: {
|
|
98
|
+
readonly id: "list-table/column-min-width-exceeds-width";
|
|
99
|
+
readonly summary: "A column's minWidth is not greater than its width.";
|
|
100
|
+
readonly fix: "Lower minWidth or raise width.";
|
|
101
|
+
};
|
|
102
|
+
readonly bundledListsNotObject: {
|
|
103
|
+
readonly id: "bundled-lists/not-object";
|
|
104
|
+
readonly summary: "The bundledLists option is an object.";
|
|
105
|
+
readonly fix: "Write bundledLists as an object such as { table: { columnPicker: true } }.";
|
|
106
|
+
};
|
|
107
|
+
readonly bundledListsUnknownKey: {
|
|
108
|
+
readonly id: "bundled-lists/unknown-key";
|
|
109
|
+
readonly summary: "bundledLists uses only the allowed keys.";
|
|
110
|
+
readonly fix: "Remove the unknown keys or rename them to one of the allowed keys.";
|
|
111
|
+
};
|
|
112
|
+
readonly bundledListsTableNotObject: {
|
|
113
|
+
readonly id: "bundled-lists/table-not-object";
|
|
114
|
+
readonly summary: "bundledLists.table is an object.";
|
|
115
|
+
readonly fix: "Write bundledLists.table as an object such as { columnPicker: true }.";
|
|
116
|
+
};
|
|
117
|
+
readonly bundledListsScreenOnlyKey: {
|
|
118
|
+
readonly id: "bundled-lists/screen-only-table-key";
|
|
119
|
+
readonly summary: "bundledLists.table leaves out grouping and totals, which depend on one list's fields.";
|
|
120
|
+
readonly fix: "Set grouping and totals in the table block of the individual screen.";
|
|
121
|
+
};
|
|
122
|
+
readonly bundledListsPinFirstColumnNotBoolean: {
|
|
123
|
+
readonly id: "bundled-lists/pin-first-column-not-boolean";
|
|
124
|
+
readonly summary: "bundledLists.pinFirstColumn is a boolean.";
|
|
125
|
+
readonly fix: "Set pinFirstColumn to true or false.";
|
|
126
|
+
};
|
|
127
|
+
readonly bundledListsPinFirstColumnWithoutPinning: {
|
|
128
|
+
readonly id: "bundled-lists/pin-first-column-without-pinning";
|
|
129
|
+
readonly summary: "bundledLists.pinFirstColumn needs bundledLists.table.pinning.";
|
|
130
|
+
readonly fix: "Set bundledLists.table.pinning: true or remove pinFirstColumn.";
|
|
131
|
+
};
|
|
132
|
+
};
|