@elementumai/edk 0.11.0 → 0.12.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/README.md +38 -6
- package/dist-sdk/src/core/triggers/on-demand.d.ts +2 -0
- package/dist-sdk/src/core/triggers/on-demand.js +3 -0
- package/dist-sdk/src/engine/coverage-gaps.d.ts +5 -0
- package/dist-sdk/src/engine/coverage-gaps.js +9 -0
- package/dist-sdk/src/engine/ei/run.d.ts +20 -1
- package/dist-sdk/src/engine/ei/run.js +102 -14
- package/dist-sdk/src/engine/pull/ref-only.d.ts +18 -0
- package/dist-sdk/src/engine/pull/ref-only.js +52 -0
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +2 -1
- package/dist-sdk/src/entities/access-policy/from-tf.js +7 -1
- package/dist-sdk/src/entities/access-policy/module.js +5 -0
- package/dist-sdk/src/entities/app/build.d.ts +1 -1
- package/dist-sdk/src/entities/app/build.js +79 -4
- package/dist-sdk/src/entities/app/from-tf.js +1 -2
- package/dist-sdk/src/entities/app/stage-keys.d.ts +18 -3
- package/dist-sdk/src/entities/app/stage-keys.js +40 -6
- package/dist-sdk/src/entities/app/to-tf.js +1 -0
- package/dist-sdk/src/entities/automation/build.d.ts +50 -24
- package/dist-sdk/src/entities/automation/build.js +16 -6
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +32 -3
- package/dist-sdk/src/entities/automation/from-tf.d.ts +13 -2
- package/dist-sdk/src/entities/automation/from-tf.js +269 -63
- package/dist-sdk/src/entities/automation/index.d.ts +1 -1
- package/dist-sdk/src/entities/automation/module.js +1 -1
- package/dist-sdk/src/entities/automation/run-target.d.ts +2 -0
- package/dist-sdk/src/entities/automation/run-target.js +5 -0
- package/dist-sdk/src/entities/automation/script-code.d.ts +2 -1
- package/dist-sdk/src/entities/automation/script-code.js +82 -1
- package/dist-sdk/src/entities/automation/script-lint.d.ts +13 -0
- package/dist-sdk/src/entities/automation/script-lint.js +418 -0
- package/dist-sdk/src/entities/automation/task-output-labels.d.ts +1 -1
- package/dist-sdk/src/entities/automation/task-output-labels.js +9 -1
- package/dist-sdk/src/entities/automation/tasks.d.ts +47 -14
- package/dist-sdk/src/entities/automation/tasks.js +18 -4
- package/dist-sdk/src/entities/automation/to-tf.js +256 -28
- package/dist-sdk/src/entities/automation/triggers.d.ts +48 -15
- package/dist-sdk/src/entities/automation/triggers.js +9 -9
- package/dist-sdk/src/entities/chart/build.d.ts +9 -1
- package/dist-sdk/src/entities/chart/from-tf.d.ts +2 -2
- package/dist-sdk/src/entities/chart/from-tf.js +25 -1
- package/dist-sdk/src/entities/chart/index.d.ts +1 -1
- package/dist-sdk/src/entities/chart/printer.js +5 -2
- package/dist-sdk/src/entities/chart/to-tf.js +19 -1
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +1 -0
- package/dist-sdk/src/entities/dynamic-layout/condition-keys.d.ts +48 -0
- package/dist-sdk/src/entities/dynamic-layout/condition-keys.js +261 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +1 -1
- package/dist-sdk/src/entities/dynamic-layout/module.js +2 -1
- package/dist-sdk/src/entities/element/to-tf.js +1 -0
- package/dist-sdk/src/entities/field/module.js +8 -2
- package/dist-sdk/src/entities/field/to-tf.d.ts +8 -2
- package/dist-sdk/src/entities/field/to-tf.js +57 -34
- package/dist-sdk/src/entities/org/role.js +5 -0
- package/dist-sdk/src/entities/service-account/module.js +5 -0
- package/dist-sdk/src/entities/service-account/role-fidelity.d.ts +5 -5
- package/dist-sdk/src/entities/service-account/role-fidelity.js +21 -13
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +2 -0
- package/dist-sdk/src/entities/shared/types/field-types.d.ts +6 -3
- package/dist-sdk/src/entities/shared/types/field-types.js +3 -1
- package/dist-sdk/src/entities/skill/module.js +2 -0
- package/dist-sdk/src/entities/task/to-tf.js +1 -0
- package/dist-sdk/src/entities/view/from-tf.d.ts +8 -4
- package/dist-sdk/src/entities/view/from-tf.js +3 -5
- package/dist-sdk/src/entities/view/module.js +5 -0
- package/dist-sdk/src/entities/widget/from-tf.js +2 -2
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +5 -3
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
- package/dist-sdk/src/graph/index.d.ts +15 -2
- package/dist-sdk/src/graph/index.js +12 -0
- package/dist-sdk/src/graph/types.d.ts +38 -0
- package/package.json +1 -1
|
@@ -462,7 +462,7 @@ function lostStageRefs(block, owner, where) {
|
|
|
462
462
|
continue;
|
|
463
463
|
const pulled = pulledStageHandle(index, owner.stageHandles);
|
|
464
464
|
if (pulled.kind === "lost")
|
|
465
|
-
lost.push({ where: ref.where, index, handle: pulled.handle, owner: pulled.owner });
|
|
465
|
+
lost.push({ where: ref.where, index, handle: pulled.handle, owner: pulled.owner, ...(pulled.fallback === true && { fallback: true }) });
|
|
466
466
|
}
|
|
467
467
|
return lost;
|
|
468
468
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { restoreLayoutConditionKeys } from "./condition-keys.js";
|
|
1
2
|
import { NO_CANVAS, NO_CATALOG, NO_DATA, NO_LIFECYCLE } from "../../graph/types.js";
|
|
2
3
|
export const DYNAMIC_LAYOUT_RESOURCE_TYPE = "elementum_dynamic_layout";
|
|
3
4
|
export const dynamicLayoutModule = {
|
|
@@ -8,7 +9,7 @@ export const dynamicLayoutModule = {
|
|
|
8
9
|
{ parent: "app", child: "dynamic-layout" },
|
|
9
10
|
{ parent: "element", child: "dynamic-layout" },
|
|
10
11
|
],
|
|
11
|
-
resource: { shape: "single", resourceType: DYNAMIC_LAYOUT_RESOURCE_TYPE, adoptable: true },
|
|
12
|
+
resource: { shape: "single", resourceType: DYNAMIC_LAYOUT_RESOURCE_TYPE, adoptable: true, alignWithState: restoreLayoutConditionKeys },
|
|
12
13
|
data: NO_DATA,
|
|
13
14
|
lifecycle: NO_LIFECYCLE,
|
|
14
15
|
canvas: NO_CANVAS,
|
|
@@ -184,6 +184,7 @@ export function elementToTf(entity, ctx) {
|
|
|
184
184
|
const field = fieldToTf(typeKey, inner, {
|
|
185
185
|
ownerTfLabel: ctx.appTfLabel,
|
|
186
186
|
appRefName: ctx.appRefName,
|
|
187
|
+
...(payload.name !== undefined && { ownerName: payload.name }),
|
|
187
188
|
scope: "element",
|
|
188
189
|
objectId,
|
|
189
190
|
diagnostics: ctx.diagnostics,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { asNamedRef, namedFactoryEntry } from "../../catalog/render-helpers.js";
|
|
3
3
|
import { NO_CANVAS, NO_CATALOG, NO_DATA, NO_LIFECYCLE } from "../../graph/types.js";
|
|
4
4
|
import { managedFieldOrderStateAdoption } from "./order.js";
|
|
5
|
-
import { FIELD_SUB_TYPES, MANAGED_FIELD_ORDER_RESOURCE_TYPE } from "./types.js";
|
|
5
|
+
import { FIELD_RESOURCE_TYPES, FIELD_SUB_TYPES, MANAGED_FIELD_ORDER_RESOURCE_TYPE } from "./types.js";
|
|
6
6
|
export const FIELD_DATA_RESOURCE_TYPE = "elementum_field";
|
|
7
7
|
export const fieldModule = {
|
|
8
8
|
kind: "field",
|
|
@@ -76,7 +76,13 @@ export const fieldModule = {
|
|
|
76
76
|
// A filter on a foreign record's field: the build interpolates the
|
|
77
77
|
// field's lookup (`record.${data.elementum_field.<x>.id}`), the export
|
|
78
78
|
// inlines the field's id (#1701).
|
|
79
|
-
|
|
79
|
+
// A field read off a record found in a sibling app/element
|
|
80
|
+
// (`{{task name="record.<field-id>" …}}`) has its lookup declared but not
|
|
81
|
+
// read in state, so the id comes from the managed field (#1839).
|
|
82
|
+
stateResolvedDataLookups: [{
|
|
83
|
+
dataType: FIELD_DATA_RESOURCE_TYPE,
|
|
84
|
+
managedFallback: { resourceTypes: FIELD_RESOURCE_TYPES, matchAttributes: ["name"], ownerAttribute: "object_id" },
|
|
85
|
+
}],
|
|
80
86
|
},
|
|
81
87
|
};
|
|
82
88
|
/**
|
|
@@ -6,8 +6,12 @@
|
|
|
6
6
|
* module never names the owner's resource type.
|
|
7
7
|
*
|
|
8
8
|
* Unsupported authoring shapes degrade through `diagnostics` — reported,
|
|
9
|
-
* never silent
|
|
10
|
-
* non-canonical bag key
|
|
9
|
+
* never silent (plan §4.3). Two shapes are hard errors instead: a
|
|
10
|
+
* non-canonical bag key (it has no well-defined terraform address), and a
|
|
11
|
+
* dynamic Dropdown or Multi-Select `filter` that can't be built (#2309):
|
|
12
|
+
* dropping it would leave the whole field resource out and the plan would
|
|
13
|
+
* destroy the field, so `buildDynamicPicklistConfigAttr` throws (see its
|
|
14
|
+
* `failClosed`).
|
|
11
15
|
*/
|
|
12
16
|
import { type OrgRefLookup, type WorkspaceAspect } from "../../engine/build/context.js";
|
|
13
17
|
import { type ChildResourceScope, type FieldOwnerScope, type TfBlock, type TfExpr, type TfValue } from "../../engine/tf/index.js";
|
|
@@ -128,6 +132,8 @@ export interface FieldToTfOptions {
|
|
|
128
132
|
readonly ownerTfLabel: string;
|
|
129
133
|
/** The owning stream root's refName — needed to detect a self-targeting RELATION field. */
|
|
130
134
|
readonly appRefName: string;
|
|
135
|
+
/** The owning stream root's display name, for errors in the #1780 shape; falls back to `appRefName`. */
|
|
136
|
+
readonly ownerName?: string;
|
|
131
137
|
/** App children use `apps_<ns>_<ns>_`, element children `elements_<ns>_<ns>_`, task children `tasks_<ns>_<ns>_` (edk#1464). */
|
|
132
138
|
readonly scope?: FieldOwnerScope;
|
|
133
139
|
/** The owner's id reference, e.g. `elementum_app.<ns>.id` — computed by the owner's to-tf. */
|
|
@@ -6,8 +6,12 @@
|
|
|
6
6
|
* module never names the owner's resource type.
|
|
7
7
|
*
|
|
8
8
|
* Unsupported authoring shapes degrade through `diagnostics` — reported,
|
|
9
|
-
* never silent
|
|
10
|
-
* non-canonical bag key
|
|
9
|
+
* never silent (plan §4.3). Two shapes are hard errors instead: a
|
|
10
|
+
* non-canonical bag key (it has no well-defined terraform address), and a
|
|
11
|
+
* dynamic Dropdown or Multi-Select `filter` that can't be built (#2309):
|
|
12
|
+
* dropping it would leave the whole field resource out and the plan would
|
|
13
|
+
* destroy the field, so `buildDynamicPicklistConfigAttr` throws (see its
|
|
14
|
+
* `failClosed`).
|
|
11
15
|
*/
|
|
12
16
|
import { EntityTfError } from "../../engine/entity.js";
|
|
13
17
|
import { typedCoverageGap } from "../../engine/coverage-gaps.js";
|
|
@@ -271,7 +275,7 @@ function stageOrgRefs(real) {
|
|
|
271
275
|
* and committed only once the ENTIRE config resolves — an early `undefined`
|
|
272
276
|
* return anywhere below leaves no orphaned `data.tf` block behind.
|
|
273
277
|
*/
|
|
274
|
-
function buildDynamicPicklistConfigAttr(cfg, opts, where, typeKey) {
|
|
278
|
+
function buildDynamicPicklistConfigAttr(cfg, opts, where, typeKey, field) {
|
|
275
279
|
if (cfg.relatedAspectId === undefined || cfg.relatedLabelFieldId === undefined) {
|
|
276
280
|
opts.diagnostics.push(`${where}: dynamic picklist config requires relatedAspectId and relatedLabelFieldId; dropped`);
|
|
277
281
|
return undefined;
|
|
@@ -335,6 +339,23 @@ function buildDynamicPicklistConfigAttr(cfg, opts, where, typeKey) {
|
|
|
335
339
|
if (cfg.valuesRenderType !== undefined)
|
|
336
340
|
attrs["values_render_type"] = cfg.valuesRenderType;
|
|
337
341
|
if (cfg.filter !== undefined) {
|
|
342
|
+
// A filter build can't resolve fails the build instead of dropping the
|
|
343
|
+
// whole dynamic config (#2309): without it the field resource is left
|
|
344
|
+
// out and plan destroys the field (the #1978 rule). Pull never prints
|
|
345
|
+
// such a filter: it blocks a filter it can't reconstruct
|
|
346
|
+
// (field/from-tf.ts blockReplaceForcingDrop) and keeps an unextracted
|
|
347
|
+
// field as its platform id.
|
|
348
|
+
const diagnosticsBefore = opts.diagnostics.length;
|
|
349
|
+
const failClosed = (reason) => {
|
|
350
|
+
const resolverNotes = opts.diagnostics.slice(diagnosticsBefore).map((note) => `\n - ${note.replace(/; dropped$/, "")}`).join("");
|
|
351
|
+
// Same shape as the authoring error (#1780): owner kind and name,
|
|
352
|
+
// `fields.<key>`, display name and type; build adds the source file.
|
|
353
|
+
throw new EntityTfError(`${opts.scope ?? "app"} ${JSON.stringify(opts.ownerName ?? opts.appRefName)} fields.${field.bagKey} ` +
|
|
354
|
+
`(${JSON.stringify(field.name)}, dynamic ${typeKey === "multiPicklist" ? "Multi-Select" : "Dropdown"}): ` +
|
|
355
|
+
`config.dynamic.filter ${reason}.${resolverNotes}\n` +
|
|
356
|
+
"Building would drop this field's dynamic config and the plan would destroy the field; " +
|
|
357
|
+
"fix or remove the filter's ref (#2309).");
|
|
358
|
+
};
|
|
338
359
|
let unresolvedField = false;
|
|
339
360
|
const owner = {
|
|
340
361
|
value: opts.objectId,
|
|
@@ -343,40 +364,42 @@ function buildDynamicPicklistConfigAttr(cfg, opts, where, typeKey) {
|
|
|
343
364
|
target: { kind: opts.scope ?? "app", tfLabel: opts.ownerTfLabel },
|
|
344
365
|
fieldOwnership: opts.fieldOwnership,
|
|
345
366
|
};
|
|
367
|
+
const filter = cfg.filter;
|
|
368
|
+
const buildFilter = () => filterWireToTfCodec(filter, {
|
|
369
|
+
recordField: (token) => {
|
|
370
|
+
const value = resolveFieldOnObject(token, owner, opts_, where, "filter record field");
|
|
371
|
+
if (value === undefined) {
|
|
372
|
+
unresolvedField = true;
|
|
373
|
+
return "";
|
|
374
|
+
}
|
|
375
|
+
return value;
|
|
376
|
+
},
|
|
377
|
+
recordFieldOwner: () => opts.objectId,
|
|
378
|
+
field: (token) => {
|
|
379
|
+
const value = resolveFieldOnObject(token, resolvedObject, opts_, where, "filter field");
|
|
380
|
+
if (value === undefined) {
|
|
381
|
+
// resolveFieldOnObject already pushed a diagnostic — this
|
|
382
|
+
// placeholder only satisfies the codec's TfValue return type
|
|
383
|
+
// long enough to unwind via the unresolvedField check below.
|
|
384
|
+
unresolvedField = true;
|
|
385
|
+
return "";
|
|
386
|
+
}
|
|
387
|
+
return value;
|
|
388
|
+
},
|
|
389
|
+
reference: () => {
|
|
390
|
+
throw new EntityTfError(`${where}: dynamic picklist filter does not support value references`);
|
|
391
|
+
},
|
|
392
|
+
});
|
|
393
|
+
let filterValue;
|
|
346
394
|
try {
|
|
347
|
-
|
|
348
|
-
recordField: (token) => {
|
|
349
|
-
const value = resolveFieldOnObject(token, owner, opts_, where, "filter record field");
|
|
350
|
-
if (value === undefined) {
|
|
351
|
-
unresolvedField = true;
|
|
352
|
-
return "";
|
|
353
|
-
}
|
|
354
|
-
return value;
|
|
355
|
-
},
|
|
356
|
-
recordFieldOwner: () => opts.objectId,
|
|
357
|
-
field: (token) => {
|
|
358
|
-
const value = resolveFieldOnObject(token, resolvedObject, opts_, where, "filter field");
|
|
359
|
-
if (value === undefined) {
|
|
360
|
-
// resolveFieldOnObject already pushed a diagnostic — this
|
|
361
|
-
// placeholder only satisfies the codec's TfValue return type
|
|
362
|
-
// long enough to unwind via the unresolvedField check below.
|
|
363
|
-
unresolvedField = true;
|
|
364
|
-
return "";
|
|
365
|
-
}
|
|
366
|
-
return value;
|
|
367
|
-
},
|
|
368
|
-
reference: () => {
|
|
369
|
-
throw new EntityTfError(`${where}: dynamic picklist filter does not support value references`);
|
|
370
|
-
},
|
|
371
|
-
});
|
|
372
|
-
if (unresolvedField)
|
|
373
|
-
return undefined;
|
|
374
|
-
attrs["filter"] = filterValue;
|
|
395
|
+
filterValue = buildFilter();
|
|
375
396
|
}
|
|
376
397
|
catch (e) {
|
|
377
|
-
|
|
378
|
-
return undefined;
|
|
398
|
+
failClosed(`can't be built: ${e instanceof Error ? e.message : String(e)}`);
|
|
379
399
|
}
|
|
400
|
+
if (unresolvedField)
|
|
401
|
+
failClosed("names a field build can't resolve");
|
|
402
|
+
attrs["filter"] = filterValue;
|
|
380
403
|
}
|
|
381
404
|
if (cfg.sort !== undefined) {
|
|
382
405
|
const sort = resolveDynamicPicklistSort(cfg.sort, resolvedObject, opts, where);
|
|
@@ -649,7 +672,7 @@ export function fieldToTf(typeKey, inner, opts) {
|
|
|
649
672
|
}
|
|
650
673
|
if (subType.hasOptions === true && inner.config?.dynamic !== undefined) {
|
|
651
674
|
const where = `field "${name}"`;
|
|
652
|
-
const dynamicConfig = buildDynamicPicklistConfigAttr(inner.config.dynamic, opts, where, typeKey);
|
|
675
|
+
const dynamicConfig = buildDynamicPicklistConfigAttr(inner.config.dynamic, opts, where, typeKey, { bagKey, name });
|
|
653
676
|
if (dynamicConfig === undefined)
|
|
654
677
|
return undefined;
|
|
655
678
|
attrs["dynamic_config"] = dynamicConfig;
|
|
@@ -20,5 +20,10 @@ export const roleModule = {
|
|
|
20
20
|
lifecycle: NO_LIFECYCLE,
|
|
21
21
|
canvas: NO_CANVAS,
|
|
22
22
|
catalog: NO_CATALOG,
|
|
23
|
+
roundtrip: {
|
|
24
|
+
referenceAliases: [],
|
|
25
|
+
// Provider set attributes (edk#2437): order carries no meaning.
|
|
26
|
+
unorderedListAttributes: ["user_ids", "group_ids", "service_account_ids"],
|
|
27
|
+
},
|
|
23
28
|
};
|
|
24
29
|
export const ROLE_RESOURCE_TYPE = "elementum_role";
|
|
@@ -19,6 +19,11 @@ export const serviceAccountModule = {
|
|
|
19
19
|
lifecycle: NO_LIFECYCLE,
|
|
20
20
|
canvas: NO_CANVAS,
|
|
21
21
|
catalog: NO_CATALOG,
|
|
22
|
+
roundtrip: {
|
|
23
|
+
referenceAliases: [],
|
|
24
|
+
// Provider set attributes (edk#2437): order carries no meaning.
|
|
25
|
+
unorderedListAttributes: ["role_ids", "user_ids", "group_ids"],
|
|
26
|
+
},
|
|
22
27
|
// The platform's own policy names the account's creator, a user, so it is
|
|
23
28
|
// always dropped; a group-only policy is kept when every group is mapped.
|
|
24
29
|
portable: {
|
|
@@ -18,8 +18,8 @@ interface ExtractedServiceAccountRoles {
|
|
|
18
18
|
readonly roles?: readonly ServiceAccountRole[];
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Order-
|
|
22
|
-
* `role_ids` with the roles written into source. Named roles compare by
|
|
21
|
+
* Order-insensitive comparison (`role_ids` is a set, edk#2437) of each owned
|
|
22
|
+
* service account's export `role_ids` with the roles written into source. Named roles compare by
|
|
23
23
|
* display name; raw ids compare by platform id. A value the printer cannot
|
|
24
24
|
* represent is a disagreement, not a quiet omission.
|
|
25
25
|
*/
|
|
@@ -36,9 +36,9 @@ export interface RebuiltServiceAccountRoleLookup {
|
|
|
36
36
|
readonly resourceRoleNames: ReadonlyMap<string, string>;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* Same
|
|
40
|
-
*
|
|
41
|
-
*
|
|
39
|
+
* Same membership rule, against service-account blocks rebuilt from the
|
|
40
|
+
* pulled `.ts`. A printer or to-tf that drops or changes a raw id disagrees
|
|
41
|
+
* here even when extract mirrored the export.
|
|
42
42
|
* When `lookup` is set, rebuilt refs resolve through it. Export refs still
|
|
43
43
|
* use `ctx` and the export blocks.
|
|
44
44
|
*/
|
|
@@ -72,16 +72,24 @@ function mismatchLine(where, index, exported, generated, sourceFile, key) {
|
|
|
72
72
|
return `${SERVICE_ACCOUNT_ROLE_MISMATCH_PREFIX} ${where}.role_ids[${index}] export ${identityText(exported)} vs generated ${identityText(generated)}; ${nextStep(sourceFile, key, index)}`;
|
|
73
73
|
}
|
|
74
74
|
function compareRoleLists(where, key, sourceFile, exported, generated, out) {
|
|
75
|
+
// `role_ids` is a set in the provider (edk#2437), so compare membership,
|
|
76
|
+
// not position: each role pairs with one equal role on the other side, and
|
|
77
|
+
// an unpaired role on either side is a disagreement. A duplicate still shows.
|
|
75
78
|
if (exported.length === 0 && generated.length === 0)
|
|
76
79
|
return;
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
const paired = new Set();
|
|
81
|
+
exported.forEach((left, index) => {
|
|
82
|
+
const match = generated.findIndex((right, at) => !paired.has(at) && sameIdentity(left, right));
|
|
83
|
+
if (match >= 0) {
|
|
84
|
+
paired.add(match);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
out.push(mismatchLine(where, index, left, undefined, sourceFile, key));
|
|
88
|
+
});
|
|
89
|
+
generated.forEach((right, index) => {
|
|
90
|
+
if (!paired.has(index))
|
|
91
|
+
out.push(mismatchLine(where, index, undefined, right, sourceFile, key));
|
|
92
|
+
});
|
|
85
93
|
}
|
|
86
94
|
function roleListFromRebuild(value, dataQueues, resourceRoleNames) {
|
|
87
95
|
if (value === undefined)
|
|
@@ -123,8 +131,8 @@ function describedRoleIds(value) {
|
|
|
123
131
|
return value.map((item) => describeRoleValue(item)).join(", ");
|
|
124
132
|
}
|
|
125
133
|
/**
|
|
126
|
-
* Order-
|
|
127
|
-
* `role_ids` with the roles written into source. Named roles compare by
|
|
134
|
+
* Order-insensitive comparison (`role_ids` is a set, edk#2437) of each owned
|
|
135
|
+
* service account's export `role_ids` with the roles written into source. Named roles compare by
|
|
128
136
|
* display name; raw ids compare by platform id. A value the printer cannot
|
|
129
137
|
* represent is a disagreement, not a quiet omission.
|
|
130
138
|
*/
|
|
@@ -132,9 +140,9 @@ export function serviceAccountRoleIdMismatches(blocks, accounts, owner, ctx) {
|
|
|
132
140
|
return compareServiceAccountRoleIds(blocks, accounts, owner, ctx);
|
|
133
141
|
}
|
|
134
142
|
/**
|
|
135
|
-
* Same
|
|
136
|
-
*
|
|
137
|
-
*
|
|
143
|
+
* Same membership rule, against service-account blocks rebuilt from the
|
|
144
|
+
* pulled `.ts`. A printer or to-tf that drops or changes a raw id disagrees
|
|
145
|
+
* here even when extract mirrored the export.
|
|
138
146
|
* When `lookup` is set, rebuilt refs resolve through it. Export refs still
|
|
139
147
|
* use `ctx` and the export blocks.
|
|
140
148
|
*/
|
|
@@ -122,6 +122,8 @@ export interface GroupRefAst {
|
|
|
122
122
|
readonly groupKey: string;
|
|
123
123
|
/** The group's display name — the lookup value. */
|
|
124
124
|
readonly name: string;
|
|
125
|
+
/** False when org.ts doesn't carry the group: printed as `groupRef({ name })`, not `org.groups.<key>` (edk#2241). */
|
|
126
|
+
readonly inOrgCatalog?: false;
|
|
125
127
|
}
|
|
126
128
|
/** Reference to a sub-automation via the app's `automations` bag. */
|
|
127
129
|
export interface AutomationRefAst {
|
|
@@ -25,6 +25,7 @@ export type WorkflowFieldType = "TEXT" | "HANDLE" | "NUMBER" | "DECIMAL" | "BOOL
|
|
|
25
25
|
*
|
|
26
26
|
* `userId` follows the same rule: the provider's attribute spells USER_ID as
|
|
27
27
|
* a bare "user", so to-tf maps USER_ID -> "user" and from-tf maps it back.
|
|
28
|
+
* So does `groupId` (GROUP_ID, the provider's "group"; #2204).
|
|
28
29
|
*/
|
|
29
30
|
export declare const FIELD_TYPE_MAP: {
|
|
30
31
|
readonly text: "TEXT";
|
|
@@ -35,6 +36,7 @@ export declare const FIELD_TYPE_MAP: {
|
|
|
35
36
|
readonly datetime: "DATETIME";
|
|
36
37
|
readonly user: "USER";
|
|
37
38
|
readonly userId: "USER_ID";
|
|
39
|
+
readonly groupId: "GROUP_ID";
|
|
38
40
|
readonly json: "JSON";
|
|
39
41
|
readonly object: "OBJECT";
|
|
40
42
|
readonly attachmentId: "ATTACHMENT_ID";
|
|
@@ -60,12 +62,13 @@ export type TriggerFieldTypeAlias = Exclude<FieldTypeAlias, "user">;
|
|
|
60
62
|
* Subset of {@link TriggerFieldTypeAlias} that an `onDemand` input may
|
|
61
63
|
* declare. Mirrors the provider's `elementum_on_demand_trigger`
|
|
62
64
|
* `parameters[].type` enum (text, number, decimal, boolean, date, datetime,
|
|
63
|
-
* user, group, attachment, record)
|
|
65
|
+
* user, group, attachment, record), with USER_ID, GROUP_ID and ATTACHMENT_ID
|
|
66
|
+
* authored as `userId`, `groupId` and `attachmentId`: `json` and `object` have no provider
|
|
64
67
|
* spelling, so OpenTofu rejects the generated config at plan time (#1415).
|
|
65
68
|
*/
|
|
66
69
|
export type OnDemandParamTypeAlias = Exclude<TriggerFieldTypeAlias, "json" | "object">;
|
|
67
70
|
/** Runtime list of {@link OnDemandParamTypeAlias} values. */
|
|
68
|
-
export declare const ON_DEMAND_PARAM_TYPES: readonly ["text", "number", "decimal", "boolean", "date", "datetime", "userId", "attachmentId", "record"];
|
|
71
|
+
export declare const ON_DEMAND_PARAM_TYPES: readonly ["text", "number", "decimal", "boolean", "date", "datetime", "userId", "groupId", "attachmentId", "record"];
|
|
69
72
|
/**
|
|
70
73
|
* Maps a user-friendly FieldTypeAlias to the TypeScript type it represents.
|
|
71
74
|
* Used to derive the phantom T in Ref<T> for trigger inputs.
|
|
@@ -75,4 +78,4 @@ export declare const ON_DEMAND_PARAM_TYPES: readonly ["text", "number", "decimal
|
|
|
75
78
|
* Used when generating app definitions from Hydra's field metadata.
|
|
76
79
|
*/
|
|
77
80
|
export declare const ASPECT_FIELD_TYPE_NAME_TO_WORKFLOW_FIELD_TYPE: Record<string, WorkflowFieldType>;
|
|
78
|
-
export type FieldTypeToTS<A extends FieldTypeAlias> = A extends "text" ? string : A extends "number" | "decimal" ? number : A extends "boolean" ? boolean : A extends "date" | "datetime" ? string : A extends "user" ? string : A extends "userId" ? CalculationTypedValue<string, "user"> : A extends "attachmentId" ? string : A extends "json" | "object" ? unknown : A extends "record" ? RecordShape<AppOrElementRef> : unknown;
|
|
81
|
+
export type FieldTypeToTS<A extends FieldTypeAlias> = A extends "text" ? string : A extends "number" | "decimal" ? number : A extends "boolean" ? boolean : A extends "date" | "datetime" ? string : A extends "user" ? string : A extends "userId" ? CalculationTypedValue<string, "user"> : A extends "attachmentId" ? string : A extends "groupId" ? string : A extends "json" | "object" ? unknown : A extends "record" ? RecordShape<AppOrElementRef> : unknown;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* `userId` follows the same rule: the provider's attribute spells USER_ID as
|
|
15
15
|
* a bare "user", so to-tf maps USER_ID -> "user" and from-tf maps it back.
|
|
16
|
+
* So does `groupId` (GROUP_ID, the provider's "group"; #2204).
|
|
16
17
|
*/
|
|
17
18
|
export const FIELD_TYPE_MAP = {
|
|
18
19
|
text: "TEXT",
|
|
@@ -23,6 +24,7 @@ export const FIELD_TYPE_MAP = {
|
|
|
23
24
|
datetime: "DATETIME",
|
|
24
25
|
user: "USER",
|
|
25
26
|
userId: "USER_ID",
|
|
27
|
+
groupId: "GROUP_ID",
|
|
26
28
|
json: "JSON",
|
|
27
29
|
object: "OBJECT",
|
|
28
30
|
attachmentId: "ATTACHMENT_ID",
|
|
@@ -34,7 +36,7 @@ export function isOnDemandRecordType(type) {
|
|
|
34
36
|
}
|
|
35
37
|
/** Runtime list of {@link OnDemandParamTypeAlias} values. */
|
|
36
38
|
export const ON_DEMAND_PARAM_TYPES = [
|
|
37
|
-
"text", "number", "decimal", "boolean", "date", "datetime", "userId", "attachmentId", "record",
|
|
39
|
+
"text", "number", "decimal", "boolean", "date", "datetime", "userId", "groupId", "attachmentId", "record",
|
|
38
40
|
];
|
|
39
41
|
/**
|
|
40
42
|
* Maps a user-friendly FieldTypeAlias to the TypeScript type it represents.
|
|
@@ -142,6 +142,8 @@ export const skillModule = {
|
|
|
142
142
|
},
|
|
143
143
|
roundtrip: {
|
|
144
144
|
referenceAliases: [],
|
|
145
|
+
// Provider set attributes (edk#2437): order carries no meaning.
|
|
146
|
+
unorderedListAttributes: ["user_ids", "group_ids"],
|
|
145
147
|
stringSuffixAliases: [
|
|
146
148
|
{
|
|
147
149
|
attribute: "instructions",
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { type FromTfContext } from "../../engine/pull/context.js";
|
|
9
9
|
import { type ChildResourceScope, type TfBlock, type TfValue } from "../../engine/tf/index.js";
|
|
10
|
+
import { type StageHandleIndex } from "../app/stage-keys.js";
|
|
10
11
|
import { type NormalizedManagedViewSort } from "./build.js";
|
|
11
12
|
import type { NormalizedAgentView, NormalizedCalendarView, NormalizedCustomView, NormalizedDashboardView, NormalizedKanbanView, NormalizedLayout, NormalizedListView } from "../app/deserializer/normalize.js";
|
|
12
13
|
/** Report every attribute key not in `known` as dialect growth — shared by all four view/section passes below. */
|
|
@@ -19,10 +20,13 @@ export interface ViewOwner {
|
|
|
19
20
|
readonly ownerTfLabel: string;
|
|
20
21
|
/** App vs element scope for prefix stripping. */
|
|
21
22
|
readonly scope?: ChildResourceScope;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
/**
|
|
24
|
+
* The owning app's full stage-handle index: real stage keys (used when ei
|
|
25
|
+
* exports a raw stage UUID), handles → real keys (#1136) and stages whose
|
|
26
|
+
* only fallback handle another stage holds (#1767). One field, so a caller
|
|
27
|
+
* cannot pass the keys and handles without the fallback losses.
|
|
28
|
+
*/
|
|
29
|
+
readonly stageHandles?: StageHandleIndex;
|
|
26
30
|
/**
|
|
27
31
|
* Keys of the fields pull extracted for this owner. A field reference whose
|
|
28
32
|
* field is not among them keeps its platform id instead of a key that
|
|
@@ -409,11 +409,9 @@ function layoutFromTf(block, owner, ctx) {
|
|
|
409
409
|
// it as the bag key so build re-emits the same address; build still maps
|
|
410
410
|
// the handle back to the real key for stage_id.
|
|
411
411
|
const labelHandle = tsLabelToTfLabel(labelStageKey);
|
|
412
|
-
const
|
|
412
|
+
const stageHandles = owner.stageHandles;
|
|
413
|
+
const labelStageOwner = stageHandles?.byHandle.get(labelHandle);
|
|
413
414
|
const labelIsStageHandle = stageIndex !== undefined && labelStageOwner === stageIndex;
|
|
414
|
-
const stageHandles = owner.stageKeyByHandle !== undefined && owner.stageKeys !== undefined
|
|
415
|
-
? { byHandle: owner.stageKeyByHandle, keys: owner.stageKeys }
|
|
416
|
-
: undefined;
|
|
417
415
|
// Never write a handle that build maps to another stage: a stage whose only
|
|
418
416
|
// handle is another stage's own key (`pre-approval` next to `pre_approval`)
|
|
419
417
|
// keeps its live layout unmanaged, with a warning (#1136).
|
|
@@ -436,7 +434,7 @@ function layoutFromTf(block, owner, ctx) {
|
|
|
436
434
|
if (stageIndex !== undefined && stageHandle !== undefined && labelStageOwner !== undefined && labelStageOwner !== stageIndex) {
|
|
437
435
|
ctx.diagnostics.push(`${where}: the layout's label "${labelHandle}" is a handle of stage "${labelStageOwner}", but it belongs to stage "${stageIndex}"; it is re-addressed under "${stageHandle}", so the next plan destroys and recreates it (#1136)`);
|
|
438
436
|
}
|
|
439
|
-
const canInferStageKey = typeof attrs["stage_id"] === "string" && owner.
|
|
437
|
+
const canInferStageKey = typeof attrs["stage_id"] === "string" && owner.stageHandles?.keys.has(labelStageKey) === true;
|
|
440
438
|
if (stageIndex !== undefined && stageKey === undefined) {
|
|
441
439
|
ctx.diagnostics.push(`${where}: stage key ${JSON.stringify(stageIndex)} has no terraform label handle; using the layout's own label "${label}" as the stage key`);
|
|
442
440
|
}
|
|
@@ -56,6 +56,11 @@ export const viewModule = {
|
|
|
56
56
|
stubRef: (refName, parent) => ({ __kind: "view", refName, name: refName, parent }),
|
|
57
57
|
refFromAuthoring: () => undefined,
|
|
58
58
|
},
|
|
59
|
+
roundtrip: {
|
|
60
|
+
referenceAliases: [],
|
|
61
|
+
// Provider set attributes (edk#2437): view sharing order carries no meaning.
|
|
62
|
+
unorderedListAttributes: ["user_ids", "group_ids"],
|
|
63
|
+
},
|
|
59
64
|
portable: {
|
|
60
65
|
leaveOut: [
|
|
61
66
|
{ resourceType: LIST_VIEW_RESOURCE_TYPE, select: selectPlatformDefaultViews, reason: "the platform creates it with its app or element" },
|
|
@@ -275,8 +275,8 @@ function recordIdentityTarget(resourceType, target) {
|
|
|
275
275
|
* A run-automation widget keeps a raw automation id as is. Pull warns, naming
|
|
276
276
|
* the widget and the automation, and continues (#1877) only when the
|
|
277
277
|
* automation is known to be dropped: the export listed it in
|
|
278
|
-
* omitted-automations.json (deleted, DISABLED or unrepresentable),
|
|
279
|
-
* no id at all. Any other raw id is a valid reference to an automation this
|
|
278
|
+
* omitted-automations.json (deleted, DISABLED, no draft, or unrepresentable),
|
|
279
|
+
* or wrote no id at all. Any other raw id is a valid reference to an automation this
|
|
280
280
|
* pull does not export, such as another app's, which build emits as is, so
|
|
281
281
|
* it stays silent. Unlike an unextracted field reference (#1978), a dropped
|
|
282
282
|
* automation does not fail the pull.
|
|
@@ -102,7 +102,7 @@ export type PanesBlockProps = {
|
|
|
102
102
|
/**
|
|
103
103
|
* Customer-facing name: List controls
|
|
104
104
|
* Customer-facing description: Search, filters, grouping, and sort controls that sit above a list.
|
|
105
|
-
* Internal authoring guidance: Toolbar of search, quick filters, filter popover, group-by, and sort. Prefer a `kind: "filters"` list. `kind: "statusGroups"` is legacyStatusGroups: Open/Closed only, with no All chip. If a spec already has legacyStatusGroups or filterPreset and the user is changing filters, rewrite them into one `kind: "filters"` list. Put a preset filter on the chips that should include it. Do not leave filterPreset beside that list. Bind quickFilterValue to $bindState: "/query/statusGroup". Bind filterJson to $bindState: "/query/filter". When a view has more than one App, bind every App to /query/filter/<aspectId> and /query/statusGroup/<aspectId>. A view with one App keeps the shared paths. filterJson is the menu filter the list uses, besides the managed filter. A kind: "filters" chip writes its filter there. legacyStatusGroups writes the preset and Open/Closed there together. A preset alone fills the menu when there is no chip list. The All chip and a cleared filter menu do not return to this preset. The block applies the managed filter at query time and does not store it in filterJson. This block writes that JSON; self-fetching siblings on the same App bound to the same path refetch from it. Looks like list chrome above a collection, not the results themselves. `field` is the aspect field id, not the display name. A picklist value is { "type": "TEXT", "value": "<id>" }. Do not use `UUID` for that id. A dynamic id is the related record id `aspectId:handle`, still `TEXT`. `AspectPicklistField` uses `EQUALS`. `AspectMultiPicklistField` uses `CONTAINS` with one `TEXT` value. Open/Closed chips are statusGroup with filter omitted: { id, label, statusGroup: "open" | "closed" }. The toolbar builds that clause from the STATUS field and every CLOSED picklist tag and writes it into filterJson. Open is status not in those values. Closed is status in those values. Do not author that tree, do not use the STAGE field, and do not use the words "open" or "closed" as values. A specific status such as Pending is a normal chip filter: STATUS field id, value id from findPicklistValue, EQUALS, TEXT value. All is filter null and no statusGroup, only when the admin asks. Mix All, statusGroup chips, and named chips in one `kind: "filters"` list. A chip that already has `filter` uses that tree. Put the admin default on sortPreset as a Sort document with aspect field ids in orders[].field. Bind sortJson to $bindState: "/query/sort". ListControls writes the live sort and /query/sortAspectId from filterAspectId. Keep sort out of filterJson. The menu offers system fields by semantic tag. Restore copies sortPreset back into sortJson during the visit.
|
|
105
|
+
* Internal authoring guidance: Toolbar of search, quick filters, filter popover, group-by, and sort. Prefer a `kind: "filters"` list. `kind: "statusGroups"` is legacyStatusGroups: Open/Closed only, with no All chip. If a spec already has legacyStatusGroups or filterPreset and the user is changing filters, rewrite them into one `kind: "filters"` list. Put a preset filter on the chips that should include it. Do not leave filterPreset beside that list. Bind quickFilterValue to $bindState: "/query/statusGroup". Bind filterJson to $bindState: "/query/filter". When a view has more than one App, bind every App to /query/filter/<aspectId> and /query/statusGroup/<aspectId>. A view with one App keeps the shared paths. filterJson is the menu filter the list uses, besides the managed filter. A kind: "filters" chip writes its filter there. legacyStatusGroups writes the preset and Open/Closed there together. A preset alone fills the menu when there is no chip list. The All chip and a cleared filter menu do not return to this preset. The block applies the managed filter at query time and does not store it in filterJson. This block writes that JSON; self-fetching siblings on the same App bound to the same path refetch from it. Looks like list chrome above a collection, not the results themselves. `field` is the aspect field id, not the display name. A picklist value is { "type": "TEXT", "value": "<id>" }. Do not use `UUID` for that id. A dynamic id is the related record id `aspectId:handle`, still `TEXT`. `AspectPicklistField` uses `EQUALS`. `AspectMultiPicklistField` uses `CONTAINS` with one `TEXT` value. Open/Closed chips are statusGroup with filter omitted: { id, label, statusGroup: "open" | "closed" }. The toolbar builds that clause from the STATUS field and every CLOSED picklist tag and writes it into filterJson. Open is status not in those values. Closed is status in those values. Do not author that tree, do not use the STAGE field, and do not use the words "open" or "closed" as values. A specific status such as Pending is a normal chip filter: STATUS field id, value id from findPicklistValue, EQUALS, TEXT value. All is filter null and no statusGroup, only when the admin asks. Mix All, statusGroup chips, and named chips in one `kind: "filters"` list. A chip that already has `filter` uses that tree. Put the admin default on sortPreset as a Sort document with aspect field ids in orders[].field. orders may contain more than one key: the first key orders records, each later key orders ties, and direction is set per key. Put the same sortPreset on ListControlsBlock and on the ListCollectionBlock or DataTableBlock that owns the default. Bind sortJson to $bindState: "/query/sort" on both. When a view has more than one App, bind each App’s ListControlsBlock and ListCollectionBlock or DataTableBlock to /query/sort/<aspectId>, matching the filter and quick-filter paths. ListControls writes the live sort and /query/sortAspectId from filterAspectId. Keep sort out of filterJson. The menu offers system fields by semantic tag, then custom text, number, decimal, date, datetime, checkbox, single picklist, user, and group fields; it omits multi-picklist, attachment, and JSON fields. Restore copies sortPreset back into sortJson during the visit.
|
|
106
106
|
*/
|
|
107
107
|
export type ListControlsBlockElement = {
|
|
108
108
|
readonly type: "ListControlsBlock";
|
|
@@ -167,7 +167,7 @@ export type ListControlsOption = {
|
|
|
167
167
|
/**
|
|
168
168
|
* Customer-facing name: Record list
|
|
169
169
|
* Customer-facing description: A compact stacked list of records with titles and status pills. Use it for queues and pickers.
|
|
170
|
-
* Internal authoring guidance: Dual presentational/self-fetching selectable stacked list with title, identifier, pills, and optional collapsible groups. Place every ListCollectionBlock under a root PanesBlock so clicks can support secondary/detail panes. Use items for authored content, or aspectId/search/filter props for live records; self-fetching falls back to the runtime default aspect. Optional density: "compact" | "standard" | "comfortable" (List View names); omit to keep today’s spacing. Live lists show a matching record count in the collection footer. Optional fields is an ordered string[] of real aspect field ids shown as
|
|
170
|
+
* Internal authoring guidance: Dual presentational/self-fetching selectable stacked list with title, identifier, pills, and optional collapsible groups. Place every ListCollectionBlock under a root PanesBlock so clicks can support secondary/detail panes. Use items for authored content, or aspectId/search/filter props for live records; self-fetching falls back to the runtime default aspect. Optional density: "compact" | "standard" | "comfortable" (List View names); omit to keep today’s spacing. Live lists show a matching record count in the collection footer. Set showExport: true to show Export in the top-right of the collection; omit or false keeps Export hidden. Optional fields is an ordered string[] of real aspect field ids shown as labeled attribute chips beside each title (user/group avatars, picklist color, locale dates, number/currency). Omit fields to keep today’s fixed system pills; when fields is set, do not also expect those pills. Never invent field UUIDs; resolve ids from Owning App fields when the admin asks in plain language (for example "show Team and Priority on each row"). To share a ListControls filter, bind filterJson and use the same filterPreset on this list; state changes refetch it. When a view has more than one App, bind every App to /query/filter/<aspectId> and /query/statusGroup/<aspectId>. A view with one App keeps the shared paths. Use filterPreset without that binding only for an independent list seed. Looks like a ticket queue, not a spreadsheet. Prefer DataTableBlock for dense columns.
|
|
171
171
|
*/
|
|
172
172
|
export type ListCollectionBlockElement = {
|
|
173
173
|
readonly type: "ListCollectionBlock";
|
|
@@ -243,6 +243,7 @@ export type ListCollectionBlockSelfFetchingProps = {
|
|
|
243
243
|
}) | (PropExpression);
|
|
244
244
|
readonly pageSize?: (((25) | (PropExpression)) | ((50) | (PropExpression)) | ((100) | (PropExpression))) | (PropExpression);
|
|
245
245
|
readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
|
|
246
|
+
readonly showExport?: (boolean) | (PropExpression);
|
|
246
247
|
readonly fields?: (ReadonlyArray<string>) | (PropExpression);
|
|
247
248
|
};
|
|
248
249
|
/**
|
|
@@ -419,7 +420,7 @@ export type CardBlockProps = {
|
|
|
419
420
|
/**
|
|
420
421
|
* Customer-facing name: Data table
|
|
421
422
|
* Customer-facing description: A spreadsheet-style table with typed columns for structured rows.
|
|
422
|
-
* Internal authoring guidance: Dual presentational/self-fetching data table with typed columns, row selection, optional nested children, and loading/empty/error states. Use rows or object columns for authored data, or aspectId with record columns for live records; self-fetching falls back to the runtime default aspect. Optional density: "compact" | "standard" | "comfortable" (List View names); omit to keep today’s spacing. Self-fetching columns are registered system keys (handle, title, status, priority, assignee, assignmentGroup, createdBy, createdTime, updatedAt, stage) and/or real aspect field ids - never invent field UUIDs - as strings, or { key, width?, minWidth?, maxWidth? } for admin default widths (key is the same system key or field id). Prefer semantic system keys when they exist. Optional columnHeaders maps the same column string to a display label; omit to use i18n/system headers or the field name from aspect metadata. Object columns with header/type/align select the presentational branch. Live tables show a matching record count in the collection footer; CMV users may resize columns (browser-local, not written back to Spec). Presentational rows may set href (absolute https:// opens a new tab, "/path" navigates inside Elementum) so the primary title cell renders as a link; same rules as ActionCardBlock. Per-cell links use a cell-hint object with href. To share a ListControls filter, bind filterJson and use the same filterPreset on this table; state changes refetch it. When a view has more than one App, bind every App to /query/filter/<aspectId> and /query/statusGroup/<aspectId>. A view with one App keeps the shared paths. Use filterPreset without that binding only for an independent table seed. Looks like a spreadsheet-style grid; wrap in CardBlock with padding "none". Prefer ListCollectionBlock for compact record queues.
|
|
423
|
+
* Internal authoring guidance: Dual presentational/self-fetching data table with typed columns, row selection, optional nested children, and loading/empty/error states. Use rows or object columns for authored data, or aspectId with record columns for live records; self-fetching falls back to the runtime default aspect. Optional density: "compact" | "standard" | "comfortable" (List View names); omit to keep today’s spacing. Self-fetching columns are registered system keys (handle, title, status, priority, assignee, assignmentGroup, createdBy, createdTime, updatedAt, stage) and/or real aspect field ids - never invent field UUIDs - as strings, or { key, width?, minWidth?, maxWidth? } for admin default widths (key is the same system key or field id). Prefer semantic system keys when they exist. Optional columnHeaders maps the same column string to a display label; omit to use i18n/system headers or the field name from aspect metadata. Object columns with header/type/align select the presentational branch. Live tables show a matching record count in the collection footer; CMV users may resize columns (browser-local, not written back to Spec). Set showExport: true to show Export in the top-right of the collection; omit or false keeps Export hidden. Presentational rows may set href (absolute https:// opens a new tab, "/path" navigates inside Elementum) so the primary title cell renders as a link; same rules as ActionCardBlock. Per-cell links use a cell-hint object with href. To share a ListControls filter, bind filterJson and use the same filterPreset on this table; state changes refetch it. When a view has more than one App, bind every App to /query/filter/<aspectId> and /query/statusGroup/<aspectId>. A view with one App keeps the shared paths. Use filterPreset without that binding only for an independent table seed. Looks like a spreadsheet-style grid; wrap in CardBlock with padding "none". Prefer ListCollectionBlock for compact record queues.
|
|
423
424
|
*/
|
|
424
425
|
export type DataTableBlockElement = {
|
|
425
426
|
readonly type: "DataTableBlock";
|
|
@@ -506,6 +507,7 @@ export type DataTableBlockSelfFetchingProps = {
|
|
|
506
507
|
readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
|
|
507
508
|
readonly selectedAspectId?: ((string) | (PropExpression)) | (null);
|
|
508
509
|
readonly selectedHandle?: ((string) | (PropExpression)) | (null);
|
|
510
|
+
readonly showExport?: (boolean) | (PropExpression);
|
|
509
511
|
};
|
|
510
512
|
export type DataTableSelfFetchingColumn = (string) | ({
|
|
511
513
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Generated by `npm run generate:ragnarok` — do not edit. Refresh with `npm run refresh:ragnarok`.
|
|
2
|
-
// Source: urn:elementum:elementum-blocks:spec:v1 version 1.
|
|
3
|
-
// Schema sha256:
|
|
2
|
+
// Source: urn:elementum:elementum-blocks:spec:v1 version 1.42.1
|
|
3
|
+
// Schema sha256: f00541d39820c1807cd2b7342863bb79cdad2f734a4785b54380109656a47e01
|
|
4
4
|
// Generator revision: 2
|
|
5
5
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Public graph barrel: KIND_MODULES + derived views for pull/build/canvas.
|
|
3
3
|
*/
|
|
4
|
-
import { type CatalogRenderArgs, type CatalogRenderResult, type EntityKindModule, type KindId, type ParentEdge, type PortableEmptiedList, type PortableLeaveOut, type PortablePrincipals, type StateScopedPlatformEntry, type TaskOutputReference, matchType } from "./types.js";
|
|
5
|
-
export type { AdoptionAddressAlias, AuthoringFacet, CanvasComponentId, CanvasFacet, CanvasView, CatalogAuthoringArgs, CatalogFacet, CatalogRenderArgs, CatalogRenderResult, CatalogRoot, DataFacet, DataFacetCatalogKind, EntityKindId, EntityKindModule, KindId, LifecycleFacet, OrgIdentityBag, ParentEdge, ParentageFacet, ResourceFacet, StateScopedPlatformEntry, StreamFacet, StreamMatch, StreamPartition, StreamRootExtractResult, TaskOutputReference, ToTfResult, } from "./types.js";
|
|
4
|
+
import { type CatalogRenderArgs, type CatalogRenderResult, type EntityKindModule, type KindId, type ParentEdge, type PortableEmptiedList, type PortableLeaveOut, type PortablePrincipals, type StateAlignment, type StateScopedPlatformEntry, type TaskOutputReference, matchType } from "./types.js";
|
|
5
|
+
export type { AdoptionAddressAlias, AuthoringFacet, CanvasComponentId, CanvasFacet, CanvasView, CatalogAuthoringArgs, CatalogFacet, CatalogRenderArgs, CatalogRenderResult, CatalogRoot, DataFacet, DataFacetCatalogKind, EntityKindId, EntityKindModule, KindId, LifecycleFacet, OrgIdentityBag, ParentEdge, ParentageFacet, ResourceFacet, StateAlignment, StateReferenceResolver, StateScopedPlatformEntry, StreamFacet, StreamMatch, StreamPartition, StreamRootExtractResult, TaskOutputReference, ToTfResult, } from "./types.js";
|
|
6
6
|
export type { ReferenceLookupStrategy } from "./types.js";
|
|
7
7
|
export { NO_CANVAS, NO_CATALOG, NO_DATA, NO_LIFECYCLE, defaultMatchResourceType, implementedResourceTypes, isResourceAdoptable, isTfLive, knownResourceTypes, matchType, singleResourceType, } from "./types.js";
|
|
8
8
|
export { KIND_MODULES } from "./modules.js";
|
|
@@ -119,6 +119,13 @@ export declare const BUILD_VS_EXPORT_STATE_BOUND_REFERENCES: {
|
|
|
119
119
|
readonly referenceTypes: readonly string[];
|
|
120
120
|
}[];
|
|
121
121
|
export declare const BUILD_VS_EXPORT_STATE_RESOLVED_DATA_LOOKUPS: ReadonlySet<string>;
|
|
122
|
+
export interface StateResolvedDataLookupFallback {
|
|
123
|
+
readonly resourceTypes: ReadonlySet<string>;
|
|
124
|
+
readonly matchAttributes: readonly string[];
|
|
125
|
+
readonly ownerAttribute: string;
|
|
126
|
+
}
|
|
127
|
+
/** Data type → how its lookup's id is read off a managed resource when state holds no `data:` row for it. */
|
|
128
|
+
export declare const BUILD_VS_EXPORT_STATE_RESOLVED_DATA_LOOKUP_FALLBACKS: ReadonlyMap<string, StateResolvedDataLookupFallback>;
|
|
122
129
|
export declare const BUILD_VS_EXPORT_TASK_OUTPUT_REFERENCES: ReadonlyMap<string, ReadonlyMap<string, TaskOutputReference>>;
|
|
123
130
|
/** Kind id → module. */
|
|
124
131
|
export declare const KIND_BY_ID: ReadonlyMap<KindId, EntityKindModule>;
|
|
@@ -160,6 +167,8 @@ export declare const UNREADABLE_ATTRIBUTES_BY_RESOURCE_TYPE: ReadonlyMap<string,
|
|
|
160
167
|
*/
|
|
161
168
|
export declare const STATE_SCOPED_MAP_ATTRIBUTES_BY_RESOURCE_TYPE: ReadonlyMap<string, readonly string[]>;
|
|
162
169
|
export declare const STATE_SCOPED_PLATFORM_ENTRIES_BY_RESOURCE_TYPE: ReadonlyMap<string, readonly StateScopedPlatformEntry[]>;
|
|
170
|
+
/** Resource type → the kind's own re-pull alignment, as each single-resource kind declares it. */
|
|
171
|
+
export declare const STATE_ALIGNMENTS_BY_RESOURCE_TYPE: ReadonlyMap<string, StateAlignment>;
|
|
163
172
|
/** Every kind's `--portable` leave-out rules (edk#1894). */
|
|
164
173
|
export declare const PORTABLE_LEAVE_OUT: readonly PortableLeaveOut[];
|
|
165
174
|
/** Every kind's `--portable` emptied-list rules (edk#1894). */
|
|
@@ -178,6 +187,10 @@ export declare const BUILD_VS_EXPORT_NORMALIZATIONS: {
|
|
|
178
187
|
suffix: string;
|
|
179
188
|
blockType: string;
|
|
180
189
|
}[];
|
|
190
|
+
readonly unorderedListAttributes: {
|
|
191
|
+
blockType: string;
|
|
192
|
+
attribute: string;
|
|
193
|
+
}[];
|
|
181
194
|
};
|
|
182
195
|
/** Own-file children of a parent kind (build discovery + pull print paths). */
|
|
183
196
|
export declare function ownFileChildrenOf(parent: KindId): readonly EntityKindModule[];
|