@cosmicdrift/kumiko-framework 0.406.0 → 0.409.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/api/framework-db.md +1 -0
- package/agents/api/framework-engine.md +15 -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 +743 -0
- package/agents/examples/contact.md +167 -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 +24 -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/active-membership.js +1 -0
- package/dist/engine/boot-validator/access-declarations.js +57 -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 +2619 -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 +72 -0
- package/dist/engine/boot-validator/handler-declaration-rules.js +72 -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 +29 -15
- 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 +73 -0
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { isEncryptedAtRest } from "../config-helpers.js";
|
|
2
2
|
import { isExtensionEditSection, normalizeEditField, sectionFieldSpecs, } from "../screen-helpers.js";
|
|
3
|
+
import { bootRuleError } from "./boot-rule.js";
|
|
4
|
+
import { CONFIG_EDIT_ACTION_RULES } from "./config-edit-action-rules.js";
|
|
3
5
|
import { isWriteOnlyField, validateConfigEditSecretField, validateFieldsXorGroups, validateFormSelectOptions, validateWizardLayout, } from "./screens-forms.js";
|
|
6
|
+
import { SCREEN_KIND_RULES } from "./screens-kind-rules.js";
|
|
4
7
|
import { assertExtensionSectionHasComponent, rejectEmptySections, rejectProjectionDetailOnlySection, } from "./screens-kind-shared.js";
|
|
5
8
|
function validateConfigEditFields(featureName, screenId, screen, fieldNames) {
|
|
6
9
|
if (fieldNames.size === 0) {
|
|
7
|
-
throw
|
|
8
|
-
`
|
|
10
|
+
throw bootRuleError(SCREEN_KIND_RULES.configEditFieldsEmpty, {
|
|
11
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (configEdit) has empty fields map — ` +
|
|
12
|
+
`declare at least one field.`,
|
|
13
|
+
});
|
|
9
14
|
}
|
|
10
15
|
for (const [fname, fdef] of Object.entries(screen.fields)) {
|
|
11
16
|
const fieldType = fdef.type;
|
|
12
17
|
if (typeof fieldType !== "string" || fieldType.length === 0) {
|
|
13
|
-
throw
|
|
14
|
-
|
|
18
|
+
throw bootRuleError(SCREEN_KIND_RULES.configEditFieldTypeMissing, {
|
|
19
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (configEdit) field "${fname}" has no ` +
|
|
20
|
+
`\`type\` set. Each field must declare a type (e.g. "text", "number", "select").`,
|
|
21
|
+
});
|
|
15
22
|
}
|
|
16
23
|
validateFormSelectOptions(featureName, screenId, "configEdit", fname, fdef, fieldNames);
|
|
17
24
|
}
|
|
@@ -22,8 +29,10 @@ function validateConfigEditFieldsSection(featureName, screenId, fieldNames, sect
|
|
|
22
29
|
for (const fieldSpec of sectionFieldSpecs(section)) {
|
|
23
30
|
const normalized = normalizeEditField(fieldSpec);
|
|
24
31
|
if (!fieldNames.has(normalized.field)) {
|
|
25
|
-
throw
|
|
26
|
-
`
|
|
32
|
+
throw bootRuleError(SCREEN_KIND_RULES.configEditLayoutUnknownField, {
|
|
33
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (configEdit) layout references unknown ` +
|
|
34
|
+
`field "${normalized.field}". Known fields: ${[...fieldNames].sort().join(", ")}`,
|
|
35
|
+
});
|
|
27
36
|
}
|
|
28
37
|
}
|
|
29
38
|
}
|
|
@@ -50,20 +59,64 @@ function validateConfigKeyMapping(ctx, screenId, screen, fname) {
|
|
|
50
59
|
const featureName = ctx.feature.name;
|
|
51
60
|
const qualified = screen.configKeys[fname];
|
|
52
61
|
if (qualified === undefined) {
|
|
53
|
-
throw
|
|
54
|
-
`
|
|
55
|
-
|
|
62
|
+
throw bootRuleError(SCREEN_KIND_RULES.configEditFieldWithoutConfigKey, {
|
|
63
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (configEdit) field "${fname}" has ` +
|
|
64
|
+
`no entry in the configKeys map. Every declared field needs a mapping to a ` +
|
|
65
|
+
`qualified config key (\`<feature>:config:<short>\`). Add one to configKeys.`,
|
|
66
|
+
});
|
|
56
67
|
}
|
|
57
68
|
const configKeyDef = ctx.configKeyDefsByQn.get(qualified);
|
|
58
69
|
if (configKeyDef === undefined) {
|
|
59
|
-
throw
|
|
60
|
-
`
|
|
61
|
-
|
|
70
|
+
throw bootRuleError(SCREEN_KIND_RULES.configEditConfigKeyUnknown, {
|
|
71
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (configEdit) field "${fname}" → ` +
|
|
72
|
+
`Config key "${qualified}" is not declared in any feature registry. Typo? ` +
|
|
73
|
+
`Expected format: "<feature>:config:<short>". Known keys: ${[...ctx.configKeyDefsByQn.keys()].sort().join(", ") || "(none)"}`,
|
|
74
|
+
});
|
|
62
75
|
}
|
|
63
76
|
if (isWriteOnlyField(screen.fields[fname]) && !isEncryptedAtRest(configKeyDef)) {
|
|
64
|
-
throw
|
|
65
|
-
`
|
|
66
|
-
|
|
77
|
+
throw bootRuleError(SCREEN_KIND_RULES.configEditWriteOnlyNotEncrypted, {
|
|
78
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (configEdit) field "${fname}" declares writeOnly ` +
|
|
79
|
+
`but config key "${qualified}" is not encrypted at rest — writeOnly on a configEdit field ` +
|
|
80
|
+
`only hides a stored secret (declare the key with encrypted: true or backing: "secrets").`,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function layoutFieldNames(screen) {
|
|
85
|
+
const names = new Set();
|
|
86
|
+
for (const section of screen.layout.sections) {
|
|
87
|
+
if (isExtensionEditSection(section) ||
|
|
88
|
+
section.kind === "relatedList" ||
|
|
89
|
+
section.kind === "writeForm") {
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
for (const spec of sectionFieldSpecs(section))
|
|
93
|
+
names.add(normalizeEditField(spec).field);
|
|
94
|
+
}
|
|
95
|
+
return names;
|
|
96
|
+
}
|
|
97
|
+
function validateConfigEditActions(ctx, screenId, screen) {
|
|
98
|
+
const where = `[Feature ${ctx.feature.name}] Screen "${screenId}" (configEdit) action`;
|
|
99
|
+
const inLayout = layoutFieldNames(screen);
|
|
100
|
+
const seen = new Set();
|
|
101
|
+
for (const action of screen.actions ?? []) {
|
|
102
|
+
if (seen.has(action.id)) {
|
|
103
|
+
throw bootRuleError(CONFIG_EDIT_ACTION_RULES.duplicateId, {
|
|
104
|
+
message: `${where} id "${action.id}" is declared twice — ids must be unique.`,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
seen.add(action.id);
|
|
108
|
+
if (!ctx.allWriteHandlerQns.has(action.handler)) {
|
|
109
|
+
throw bootRuleError(CONFIG_EDIT_ACTION_RULES.unknownHandler, {
|
|
110
|
+
message: `${where} "${action.id}" → handler "${action.handler}" is not a registered write handler ` +
|
|
111
|
+
`(expected "<feature>:write:<handler>").`,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
if (!inLayout.has(action.afterField)) {
|
|
115
|
+
throw bootRuleError(CONFIG_EDIT_ACTION_RULES.unknownAfterField, {
|
|
116
|
+
message: `${where} "${action.id}" afterField "${action.afterField}" is not a field of the layout. ` +
|
|
117
|
+
`Known fields: ${[...inLayout].sort().join(", ")}`,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
67
120
|
}
|
|
68
121
|
}
|
|
69
122
|
// Validate configEdit layout and fields like actionForm, then verify that
|
|
@@ -79,10 +132,13 @@ export function validateConfigEditScreen(ctx, screenId, screen) {
|
|
|
79
132
|
validateWizardLayout(featureName, screenId, "configEdit", screen.layout, ctx.featureMap);
|
|
80
133
|
for (const fname of Object.keys(screen.secretKeys ?? {})) {
|
|
81
134
|
if (!fieldNames.has(fname)) {
|
|
82
|
-
throw
|
|
135
|
+
throw bootRuleError(SCREEN_KIND_RULES.configEditSecretKeyUnknownField, {
|
|
136
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (configEdit) secretKeys names unknown field "${fname}".`,
|
|
137
|
+
});
|
|
83
138
|
}
|
|
84
139
|
}
|
|
85
140
|
for (const fname of fieldNames) {
|
|
86
141
|
validateConfigEditFieldKey(ctx, screenId, screen, fname);
|
|
87
142
|
}
|
|
143
|
+
validateConfigEditActions(ctx, screenId, screen);
|
|
88
144
|
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { isExtensionEditSection, normalizeEditField, sectionFieldSpecs, } from "../screen-helpers.js";
|
|
2
|
+
import { bootRuleError } from "./boot-rule.js";
|
|
2
3
|
import { validateRedirectTarget } from "./screens-actions.js";
|
|
3
4
|
import { validateEditFieldExtras, validateFieldFormRefs, validateFieldsXorGroups, validateFillActionTarget, validateNoWidgetRequiredField, validateWizardLayout, } from "./screens-forms.js";
|
|
5
|
+
import { SCREEN_KIND_RULES } from "./screens-kind-rules.js";
|
|
4
6
|
import { assertExtensionSectionHasComponent, buildUnknownFieldMessage, rejectEmptySections, rejectProjectionDetailOnlySection, resolveScreenEntity, validateRecordHeaderAction, validateRecordSectionActions, } from "./screens-kind-shared.js";
|
|
5
7
|
function validateEntityEditField(featureName, screenId, entityName, entityDef, fieldNames, fieldSpec) {
|
|
6
8
|
const normalized = normalizeEditField(fieldSpec);
|
|
7
9
|
if (!fieldNames.has(normalized.field)) {
|
|
8
|
-
throw
|
|
10
|
+
throw bootRuleError(SCREEN_KIND_RULES.unknownFieldReference, {
|
|
11
|
+
message: buildUnknownFieldMessage(featureName, screenId, normalized.field, entityName, fieldNames),
|
|
12
|
+
});
|
|
9
13
|
}
|
|
10
14
|
validateNoWidgetRequiredField(featureName, screenId, entityDef, normalized);
|
|
11
15
|
validateEditFieldExtras(featureName, screenId, entityDef, normalized);
|
|
@@ -40,14 +44,18 @@ export function validateEntityEditScreen(ctx, screenId, screen) {
|
|
|
40
44
|
validateRecordHeaderAction(ctx, screenId, "entityEdit", screen.entity, action);
|
|
41
45
|
}
|
|
42
46
|
if (screen.recordTitleField !== undefined && !fieldNames.has(screen.recordTitleField)) {
|
|
43
|
-
throw
|
|
44
|
-
`
|
|
45
|
-
|
|
47
|
+
throw bootRuleError(SCREEN_KIND_RULES.entityEditRecordTitleFieldUnknown, {
|
|
48
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (entityEdit) recordTitleField ` +
|
|
49
|
+
`"${screen.recordTitleField}" is not a field of entity "${screen.entity}" ` +
|
|
50
|
+
`(known: ${[...fieldNames].sort().join(", ")}).`,
|
|
51
|
+
});
|
|
46
52
|
}
|
|
47
53
|
if (typeof screen.readOnly === "object" && !fieldNames.has(screen.readOnly.field)) {
|
|
48
|
-
throw
|
|
49
|
-
`"${
|
|
50
|
-
|
|
54
|
+
throw bootRuleError(SCREEN_KIND_RULES.entityEditReadOnlyFieldUnknown, {
|
|
55
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (entityEdit) readOnly condition field ` +
|
|
56
|
+
`"${screen.readOnly.field}" is not a field of entity "${screen.entity}" ` +
|
|
57
|
+
`(known: ${[...fieldNames].sort().join(", ")}).`,
|
|
58
|
+
});
|
|
51
59
|
}
|
|
52
60
|
if (screen.redirect !== undefined) {
|
|
53
61
|
validateRedirectTarget(ctx.feature, screenId, "entityEdit", screen.redirect, ctx);
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { isListFilterAllowed } from "../../db/entity-field-encryption.js";
|
|
2
2
|
import { rowMetaFieldNames } from "../../db/table-builder.js";
|
|
3
|
-
import { qualifyEntityName } from "../qualified-name.js";
|
|
4
3
|
import { getAllowedFilterOps, isFieldFilterable } from "../screen-filter-ops.js";
|
|
5
4
|
import { normalizeListColumn } from "../screen-helpers.js";
|
|
5
|
+
import { bootRuleError } from "./boot-rule.js";
|
|
6
6
|
import { isSortableSqlDerivedField } from "./derived-sql-fields.js";
|
|
7
7
|
import { validateEntityListAggregateOptions } from "./entity-list-aggregate-options.js";
|
|
8
8
|
import { LIST_ROW_META_COLUMN_NAMES } from "./entity-list-screens.js";
|
|
9
|
+
import { ENTITY_LIST_RULES } from "./entity-list-screens-rules.js";
|
|
9
10
|
import { validateListBulkActions } from "./list-bulk-actions.js";
|
|
10
11
|
import { validateListTableOptions } from "./list-table-options.js";
|
|
11
|
-
import { assertWriteHandlerRegistered, rejectRedirectOnListRowAction, resolveRowActionNavigateTarget, validateActionFieldRefs, validateAtMostOneRowClick, validateDrawerTargetAction, validateRowActionNavigateParams, } from "./screens-actions.js";
|
|
12
|
+
import { assertWriteHandlerRegistered, rejectRedirectOnListRowAction, resolveRowActionNavigateTarget, resolveScreenTargetQn, validateActionFieldRefs, validateAtMostOneRowClick, validateDrawerTargetAction, validateRowActionNavigateParams, } from "./screens-actions.js";
|
|
13
|
+
import { SCREEN_ACTION_RULES } from "./screens-actions-rules.js";
|
|
12
14
|
import { validateDashboardPanelVisibleWhen } from "./screens-dashboard.js";
|
|
15
|
+
import { SCREEN_KIND_RULES } from "./screens-kind-rules.js";
|
|
13
16
|
import { buildUnknownFieldMessage, listActionContext, rejectEmptyColumns, rejectNonArrayInFilter, resolveScreenEntity, validateListColumnRendering, } from "./screens-kind-shared.js";
|
|
14
17
|
import { validateRelatedListSection, validateRowActionTarget } from "./screens-lists.js";
|
|
15
18
|
function resolveEntityListFields(ctx, screenId, entityName) {
|
|
@@ -45,7 +48,9 @@ function validateEntityListColumns(ctx, screenId, screen, fields) {
|
|
|
45
48
|
if (!fields.columnFieldNames.has(normalized.field) &&
|
|
46
49
|
!LIST_ROW_META_COLUMN_NAMES.has(normalized.field) &&
|
|
47
50
|
!(normalized.label !== undefined && normalized.renderer !== undefined)) {
|
|
48
|
-
throw
|
|
51
|
+
throw bootRuleError(SCREEN_KIND_RULES.unknownFieldReference, {
|
|
52
|
+
message: buildUnknownFieldMessage(featureName, screenId, normalized.field, screen.entity, fields.columnFieldNames),
|
|
53
|
+
});
|
|
49
54
|
}
|
|
50
55
|
validateListColumnRendering(ctx, screenId, "entityList", normalized);
|
|
51
56
|
}
|
|
@@ -54,8 +59,10 @@ function validateEntityListDefaultSort(featureName, screenId, defaultSort, field
|
|
|
54
59
|
const sortField = defaultSort.field;
|
|
55
60
|
const sortsOnDerived = isSortableSqlDerivedField(fields.entityDef, sortField);
|
|
56
61
|
if (!fields.fieldNames.has(sortField) && !sortsOnDerived) {
|
|
57
|
-
throw
|
|
58
|
-
`
|
|
62
|
+
throw bootRuleError(SCREEN_KIND_RULES.defaultSortUnknownField, {
|
|
63
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (entityList) defaultSort references unknown ` +
|
|
64
|
+
`field "${sortField}". Known fields: ${[...fields.fieldNames].sort().join(", ")}`,
|
|
65
|
+
});
|
|
59
66
|
}
|
|
60
67
|
// `sortable: true` is required so the UI never sorts on a column that has
|
|
61
68
|
// no server-side DB index or that the schema deliberately keeps unsortable
|
|
@@ -68,8 +75,10 @@ function validateEntityListDefaultSort(featureName, screenId, defaultSort, field
|
|
|
68
75
|
const isSortable = sortsOnDerived ||
|
|
69
76
|
(fieldDef !== undefined && "sortable" in fieldDef && fieldDef.sortable === true);
|
|
70
77
|
if (!isSortable) {
|
|
71
|
-
throw
|
|
72
|
-
`
|
|
78
|
+
throw bootRuleError(ENTITY_LIST_RULES.defaultSortNotSortable, {
|
|
79
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (entityList) defaultSort.field "${sortField}" ` +
|
|
80
|
+
`is not sortable. Set sortable: true on the field definition or pick another field.`,
|
|
81
|
+
});
|
|
73
82
|
}
|
|
74
83
|
}
|
|
75
84
|
// Screen filters are checked in three layers:
|
|
@@ -83,27 +92,35 @@ function validateEntityListDefaultSort(featureName, screenId, defaultSort, field
|
|
|
83
92
|
function validateEntityListFilter(featureName, screenId, filter, fields) {
|
|
84
93
|
const filterField = filter.field;
|
|
85
94
|
if (!fields.fieldNames.has(filterField)) {
|
|
86
|
-
throw
|
|
87
|
-
`
|
|
95
|
+
throw bootRuleError(SCREEN_KIND_RULES.filterUnknownField, {
|
|
96
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (entityList) filter references unknown ` +
|
|
97
|
+
`field "${filterField}". Known fields: ${[...fields.fieldNames].sort().join(", ")}`,
|
|
98
|
+
});
|
|
88
99
|
}
|
|
89
100
|
if (!isListFilterAllowed(fields.entityDef, filterField, filter)) {
|
|
90
|
-
throw
|
|
91
|
-
`"${
|
|
92
|
-
|
|
93
|
-
|
|
101
|
+
throw bootRuleError(SCREEN_KIND_RULES.filterFieldNotAllowed, {
|
|
102
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (entityList) filter references field ` +
|
|
103
|
+
`"${filterField}" which is encrypted, personal or secret, so the list handler rejects ` +
|
|
104
|
+
`this filter at runtime. Only op "eq" works on a personal field with find: "exact" or ` +
|
|
105
|
+
`"fuzzy"; otherwise drop the filter or filter on another field.`,
|
|
106
|
+
});
|
|
94
107
|
}
|
|
95
108
|
const fieldDef = fields.entityDef.fields[filterField];
|
|
96
109
|
if (fieldDef !== undefined && !isFieldFilterable(fieldDef)) {
|
|
97
|
-
throw
|
|
98
|
-
`"${
|
|
99
|
-
|
|
110
|
+
throw bootRuleError(SCREEN_KIND_RULES.filterFieldNotFilterable, {
|
|
111
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (entityList) filter references field ` +
|
|
112
|
+
`"${filterField}" which is not filterable. Set filterable: true on the field ` +
|
|
113
|
+
`definition or pick another field.`,
|
|
114
|
+
});
|
|
100
115
|
}
|
|
101
116
|
if (fieldDef !== undefined) {
|
|
102
117
|
const allowedOps = getAllowedFilterOps(fieldDef);
|
|
103
118
|
if (!allowedOps.includes(filter.op)) {
|
|
104
|
-
throw
|
|
105
|
-
`
|
|
106
|
-
|
|
119
|
+
throw bootRuleError(SCREEN_KIND_RULES.filterOpNotAllowed, {
|
|
120
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (entityList) filter.op ` +
|
|
121
|
+
`"${filter.op}" is not allowed on field "${filterField}" ` +
|
|
122
|
+
`(type "${fieldDef.type}"). Allowed ops: ${allowedOps.join(", ") || "(none)"}.`,
|
|
123
|
+
});
|
|
107
124
|
}
|
|
108
125
|
}
|
|
109
126
|
rejectNonArrayInFilter(featureName, screenId, "entityList", filter);
|
|
@@ -121,11 +138,13 @@ function rejectCrossFeatureEditTargetWithoutEntityId(featureName, screenId, acti
|
|
|
121
138
|
target.featureName !== featureName &&
|
|
122
139
|
target.screen.type === "entityEdit" &&
|
|
123
140
|
action.entityId === undefined) {
|
|
124
|
-
throw
|
|
125
|
-
`
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
141
|
+
throw bootRuleError(SCREEN_KIND_RULES.crossFeatureEditNeedsEntityId, {
|
|
142
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (entityList) rowAction "${action.id}" ` +
|
|
143
|
+
`navigates cross-feature to entityEdit screen "${action.screen}" (feature ` +
|
|
144
|
+
`"${target.featureName}") without an explicit entityId field — the renderer's ` +
|
|
145
|
+
`same-feature row["id"] fallback does not apply across features. Set entityId to ` +
|
|
146
|
+
`the row field that names the target entity's id.`,
|
|
147
|
+
});
|
|
129
148
|
}
|
|
130
149
|
}
|
|
131
150
|
// Pin rowActions at boot: a navigate target must exist and a writeHandler QN
|
|
@@ -161,10 +180,12 @@ function validateEntityListToolbarAction(ctx, screenId, fields, action) {
|
|
|
161
180
|
const featureName = ctx.feature.name;
|
|
162
181
|
validateDashboardPanelVisibleWhen(`[Feature ${featureName}] Screen "${screenId}" (entityList) toolbarAction "${action.id}"`, action.visibleWhen);
|
|
163
182
|
if (action.kind === "navigate") {
|
|
164
|
-
const candidateQn =
|
|
183
|
+
const candidateQn = resolveScreenTargetQn(featureName, action.screen);
|
|
165
184
|
if (!ctx.allScreenQns.has(candidateQn) && !ctx.navTargetShortIds.has(action.screen)) {
|
|
166
|
-
throw
|
|
167
|
-
`
|
|
185
|
+
throw bootRuleError(SCREEN_ACTION_RULES.navigateTargetUnresolved, {
|
|
186
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (entityList) toolbarAction "${action.id}" ` +
|
|
187
|
+
`navigate-target "${action.screen}" does not resolve to a registered screen in any feature. Use "<feature>:screen:<id>" of an existing screen.`,
|
|
188
|
+
});
|
|
168
189
|
}
|
|
169
190
|
if (action.tab !== undefined) {
|
|
170
191
|
resolveRowActionNavigateTarget(featureName, screenId, "entityList", "toolbarAction", action, ctx.allScreenQns, ctx.navTargetShortIds, ctx.screensByShortId, ctx.detailForScreens);
|
|
@@ -205,8 +226,10 @@ export function validateEntityListScreen(ctx, screenId, screen) {
|
|
|
205
226
|
// Validate pagination, sorting, and search at boot so authoring errors
|
|
206
227
|
// fail before runtime debugging of empty or incorrectly sorted lists.
|
|
207
228
|
if (screen.pageSize !== undefined && screen.pageSize <= 0) {
|
|
208
|
-
throw
|
|
209
|
-
`
|
|
229
|
+
throw bootRuleError(SCREEN_KIND_RULES.pageSizeInvalid, {
|
|
230
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (entityList) has pageSize=${screen.pageSize} — ` +
|
|
231
|
+
`must be a positive integer.`,
|
|
232
|
+
});
|
|
210
233
|
}
|
|
211
234
|
const where = `[Feature ${featureName}] Screen "${screenId}" (entityList)`;
|
|
212
235
|
validateListTableOptions(where, screen.table, screen.columns, true);
|
|
@@ -216,9 +239,11 @@ export function validateEntityListScreen(ctx, screenId, screen) {
|
|
|
216
239
|
}
|
|
217
240
|
if (screen.createScreen !== undefined &&
|
|
218
241
|
!Object.hasOwn(ctx.feature.screens, screen.createScreen)) {
|
|
219
|
-
throw
|
|
220
|
-
`"${
|
|
221
|
-
|
|
242
|
+
throw bootRuleError(SCREEN_KIND_RULES.createScreenUnresolved, {
|
|
243
|
+
message: `[Feature ${featureName}] Screen "${screenId}" (entityList) createScreen ` +
|
|
244
|
+
`"${screen.createScreen}" does not resolve to a registered screen in this feature. ` +
|
|
245
|
+
`Known screens in this feature: ${Object.keys(ctx.feature.screens).sort().join(", ") || "(none)"}.`,
|
|
246
|
+
});
|
|
222
247
|
}
|
|
223
248
|
if (screen.filter !== undefined) {
|
|
224
249
|
validateEntityListFilter(featureName, screenId, screen.filter, fields);
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export declare const PROJECTION_DETAIL_RULES: {
|
|
2
|
+
readonly singletonWithIdParam: {
|
|
3
|
+
readonly id: "projection-detail/singleton-with-id-param";
|
|
4
|
+
readonly summary: "A singleton projectionDetail sets no idParam.";
|
|
5
|
+
readonly fix: "Remove idParam.";
|
|
6
|
+
};
|
|
7
|
+
readonly singletonWithDetailFor: {
|
|
8
|
+
readonly id: "projection-detail/singleton-with-detail-for";
|
|
9
|
+
readonly summary: "A singleton projectionDetail sets no detailFor.";
|
|
10
|
+
readonly fix: "Remove detailFor, or declare an explicit edit action.";
|
|
11
|
+
};
|
|
12
|
+
readonly headerWithRecordTitleField: {
|
|
13
|
+
readonly id: "projection-detail/header-with-record-title-field";
|
|
14
|
+
readonly summary: "A projectionDetail with a header sets no recordTitleField.";
|
|
15
|
+
readonly fix: "Drop recordTitleField; header.title names the record.";
|
|
16
|
+
};
|
|
17
|
+
readonly tabsSectionGroupsAndActions: {
|
|
18
|
+
readonly id: "projection-detail/tabs-section-groups-and-actions";
|
|
19
|
+
readonly summary: "A tabs-mode section declares groups or actions, not both.";
|
|
20
|
+
readonly fix: "Move the actions onto one group's title, or drop groups.";
|
|
21
|
+
};
|
|
22
|
+
readonly metricNavigateTabUnknown: {
|
|
23
|
+
readonly id: "projection-detail/metric-navigate-tab-unknown";
|
|
24
|
+
readonly summary: "A metric navigate.tab names a section id of the screen.";
|
|
25
|
+
readonly fix: "Navigate to an existing section id or remove navigate.tab.";
|
|
26
|
+
};
|
|
27
|
+
readonly metricLabelMissing: {
|
|
28
|
+
readonly id: "projection-detail/metric-label-missing";
|
|
29
|
+
readonly summary: "Every metric has an i18n label key.";
|
|
30
|
+
readonly fix: "Set label on the metric.";
|
|
31
|
+
};
|
|
32
|
+
readonly statusToneInvalid: {
|
|
33
|
+
readonly id: "projection-detail/status-tone-invalid";
|
|
34
|
+
readonly summary: "header.statusTones values are known select option tones.";
|
|
35
|
+
readonly fix: "Use one of SELECT_OPTION_TONES.";
|
|
36
|
+
};
|
|
37
|
+
readonly statusFormatWithoutStatus: {
|
|
38
|
+
readonly id: "projection-detail/status-format-without-status";
|
|
39
|
+
readonly summary: "header.statusFormat is only set together with header.status.";
|
|
40
|
+
readonly fix: "Set header.status or remove statusFormat.";
|
|
41
|
+
};
|
|
42
|
+
readonly subtitleHrefWithMultiPart: {
|
|
43
|
+
readonly id: "projection-detail/subtitle-href-with-multi-part";
|
|
44
|
+
readonly summary: "header.subtitleHref is only set with the string form of header.subtitle.";
|
|
45
|
+
readonly fix: "Use a single-field subtitle or remove subtitleHref.";
|
|
46
|
+
};
|
|
47
|
+
readonly subtitlePartDuplicate: {
|
|
48
|
+
readonly id: "projection-detail/subtitle-part-duplicate";
|
|
49
|
+
readonly summary: "Each field appears once in header.subtitle.";
|
|
50
|
+
readonly fix: "List each field once.";
|
|
51
|
+
};
|
|
52
|
+
readonly subtitlePartNavigateTargetMissing: {
|
|
53
|
+
readonly id: "projection-detail/subtitle-part-navigate-target-missing";
|
|
54
|
+
readonly summary: "A header.subtitle part navigate names a screen or an entity.";
|
|
55
|
+
readonly fix: "Set screen or entity on the part's navigate.";
|
|
56
|
+
};
|
|
57
|
+
readonly extensionContributesToFormSubmit: {
|
|
58
|
+
readonly id: "projection-detail/extension-contributes-to-form-submit";
|
|
59
|
+
readonly summary: "A projectionDetail extension section does not set contributesToFormSubmit.";
|
|
60
|
+
readonly fix: "Omit contributesToFormSubmit and persist through the extension's own dispatcher writes.";
|
|
61
|
+
};
|
|
62
|
+
readonly extensionEntityNameMissing: {
|
|
63
|
+
readonly id: "projection-detail/extension-entity-name-missing";
|
|
64
|
+
readonly summary: "A projectionDetail extension section declares entityName.";
|
|
65
|
+
readonly fix: "Set entityName to the domain entity the extension persists against.";
|
|
66
|
+
};
|
|
67
|
+
readonly wizardRelatedList: {
|
|
68
|
+
readonly id: "projection-detail/wizard-related-list";
|
|
69
|
+
readonly summary: "A wizard-mode layout has no relatedList section.";
|
|
70
|
+
readonly fix: 'Remove mode: "wizard" or drop the relatedList section.';
|
|
71
|
+
};
|
|
72
|
+
readonly writeFormFieldDefsEmpty: {
|
|
73
|
+
readonly id: "projection-detail/write-form-field-defs-empty";
|
|
74
|
+
readonly summary: "A writeForm section declares at least one fieldDefs entry.";
|
|
75
|
+
readonly fix: "Declare at least one field type.";
|
|
76
|
+
};
|
|
77
|
+
readonly writeFormFieldsEmpty: {
|
|
78
|
+
readonly id: "projection-detail/write-form-fields-empty";
|
|
79
|
+
readonly summary: "A writeForm section lists at least one field.";
|
|
80
|
+
readonly fix: "Drop the section or add fields.";
|
|
81
|
+
};
|
|
82
|
+
readonly writeFormFieldWithoutDef: {
|
|
83
|
+
readonly id: "projection-detail/write-form-field-without-def";
|
|
84
|
+
readonly summary: "Every rendered writeForm field has a fieldDefs entry.";
|
|
85
|
+
readonly fix: "Add the field to fieldDefs.";
|
|
86
|
+
};
|
|
87
|
+
readonly wizardWriteForm: {
|
|
88
|
+
readonly id: "projection-detail/wizard-write-form";
|
|
89
|
+
readonly summary: "A wizard-mode layout has no writeForm section.";
|
|
90
|
+
readonly fix: 'Remove mode: "wizard" or drop the writeForm section.';
|
|
91
|
+
};
|
|
92
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export const PROJECTION_DETAIL_RULES = {
|
|
2
|
+
singletonWithIdParam: {
|
|
3
|
+
id: "projection-detail/singleton-with-id-param",
|
|
4
|
+
summary: "A singleton projectionDetail sets no idParam.",
|
|
5
|
+
fix: "Remove idParam.",
|
|
6
|
+
},
|
|
7
|
+
singletonWithDetailFor: {
|
|
8
|
+
id: "projection-detail/singleton-with-detail-for",
|
|
9
|
+
summary: "A singleton projectionDetail sets no detailFor.",
|
|
10
|
+
fix: "Remove detailFor, or declare an explicit edit action.",
|
|
11
|
+
},
|
|
12
|
+
headerWithRecordTitleField: {
|
|
13
|
+
id: "projection-detail/header-with-record-title-field",
|
|
14
|
+
summary: "A projectionDetail with a header sets no recordTitleField.",
|
|
15
|
+
fix: "Drop recordTitleField; header.title names the record.",
|
|
16
|
+
},
|
|
17
|
+
tabsSectionGroupsAndActions: {
|
|
18
|
+
id: "projection-detail/tabs-section-groups-and-actions",
|
|
19
|
+
summary: "A tabs-mode section declares groups or actions, not both.",
|
|
20
|
+
fix: "Move the actions onto one group's title, or drop groups.",
|
|
21
|
+
},
|
|
22
|
+
metricNavigateTabUnknown: {
|
|
23
|
+
id: "projection-detail/metric-navigate-tab-unknown",
|
|
24
|
+
summary: "A metric navigate.tab names a section id of the screen.",
|
|
25
|
+
fix: "Navigate to an existing section id or remove navigate.tab.",
|
|
26
|
+
},
|
|
27
|
+
metricLabelMissing: {
|
|
28
|
+
id: "projection-detail/metric-label-missing",
|
|
29
|
+
summary: "Every metric has an i18n label key.",
|
|
30
|
+
fix: "Set label on the metric.",
|
|
31
|
+
},
|
|
32
|
+
statusToneInvalid: {
|
|
33
|
+
id: "projection-detail/status-tone-invalid",
|
|
34
|
+
summary: "header.statusTones values are known select option tones.",
|
|
35
|
+
fix: "Use one of SELECT_OPTION_TONES.",
|
|
36
|
+
},
|
|
37
|
+
statusFormatWithoutStatus: {
|
|
38
|
+
id: "projection-detail/status-format-without-status",
|
|
39
|
+
summary: "header.statusFormat is only set together with header.status.",
|
|
40
|
+
fix: "Set header.status or remove statusFormat.",
|
|
41
|
+
},
|
|
42
|
+
subtitleHrefWithMultiPart: {
|
|
43
|
+
id: "projection-detail/subtitle-href-with-multi-part",
|
|
44
|
+
summary: "header.subtitleHref is only set with the string form of header.subtitle.",
|
|
45
|
+
fix: "Use a single-field subtitle or remove subtitleHref.",
|
|
46
|
+
},
|
|
47
|
+
subtitlePartDuplicate: {
|
|
48
|
+
id: "projection-detail/subtitle-part-duplicate",
|
|
49
|
+
summary: "Each field appears once in header.subtitle.",
|
|
50
|
+
fix: "List each field once.",
|
|
51
|
+
},
|
|
52
|
+
subtitlePartNavigateTargetMissing: {
|
|
53
|
+
id: "projection-detail/subtitle-part-navigate-target-missing",
|
|
54
|
+
summary: "A header.subtitle part navigate names a screen or an entity.",
|
|
55
|
+
fix: "Set screen or entity on the part's navigate.",
|
|
56
|
+
},
|
|
57
|
+
extensionContributesToFormSubmit: {
|
|
58
|
+
id: "projection-detail/extension-contributes-to-form-submit",
|
|
59
|
+
summary: "A projectionDetail extension section does not set contributesToFormSubmit.",
|
|
60
|
+
fix: "Omit contributesToFormSubmit and persist through the extension's own dispatcher writes.",
|
|
61
|
+
},
|
|
62
|
+
extensionEntityNameMissing: {
|
|
63
|
+
id: "projection-detail/extension-entity-name-missing",
|
|
64
|
+
summary: "A projectionDetail extension section declares entityName.",
|
|
65
|
+
fix: "Set entityName to the domain entity the extension persists against.",
|
|
66
|
+
},
|
|
67
|
+
wizardRelatedList: {
|
|
68
|
+
id: "projection-detail/wizard-related-list",
|
|
69
|
+
summary: "A wizard-mode layout has no relatedList section.",
|
|
70
|
+
fix: 'Remove mode: "wizard" or drop the relatedList section.',
|
|
71
|
+
},
|
|
72
|
+
writeFormFieldDefsEmpty: {
|
|
73
|
+
id: "projection-detail/write-form-field-defs-empty",
|
|
74
|
+
summary: "A writeForm section declares at least one fieldDefs entry.",
|
|
75
|
+
fix: "Declare at least one field type.",
|
|
76
|
+
},
|
|
77
|
+
writeFormFieldsEmpty: {
|
|
78
|
+
id: "projection-detail/write-form-fields-empty",
|
|
79
|
+
summary: "A writeForm section lists at least one field.",
|
|
80
|
+
fix: "Drop the section or add fields.",
|
|
81
|
+
},
|
|
82
|
+
writeFormFieldWithoutDef: {
|
|
83
|
+
id: "projection-detail/write-form-field-without-def",
|
|
84
|
+
summary: "Every rendered writeForm field has a fieldDefs entry.",
|
|
85
|
+
fix: "Add the field to fieldDefs.",
|
|
86
|
+
},
|
|
87
|
+
wizardWriteForm: {
|
|
88
|
+
id: "projection-detail/wizard-write-form",
|
|
89
|
+
summary: "A wizard-mode layout has no writeForm section.",
|
|
90
|
+
fix: 'Remove mode: "wizard" or drop the writeForm section.',
|
|
91
|
+
},
|
|
92
|
+
};
|