@elementumai/edk 0.9.17 → 0.9.19
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 +8 -3
- package/dist-sdk/src/catalog/factories.d.ts +11 -0
- package/dist-sdk/src/catalog/factories.js +6 -0
- package/dist-sdk/src/catalog/index.d.ts +2 -2
- package/dist-sdk/src/catalog/index.js +2 -2
- package/dist-sdk/src/catalog/org.d.ts +39 -1
- package/dist-sdk/src/catalog/org.js +460 -50
- package/dist-sdk/src/catalog/types.d.ts +12 -2
- package/dist-sdk/src/catalog/types.js +2 -0
- package/dist-sdk/src/engine/pull/ref-only.js +54 -20
- package/dist-sdk/src/engine/pull/result-output.d.ts +2 -0
- package/dist-sdk/src/engine/pull/result-output.js +1 -1
- package/dist-sdk/src/engine/tf/expr.js +38 -13
- package/dist-sdk/src/engine/tf/index.d.ts +2 -2
- package/dist-sdk/src/engine/tf/index.js +2 -2
- package/dist-sdk/src/engine/tf/labels.d.ts +2 -0
- package/dist-sdk/src/engine/tf/labels.js +4 -0
- package/dist-sdk/src/engine/tf/parse.d.ts +19 -0
- package/dist-sdk/src/engine/tf/parse.js +105 -6
- package/dist-sdk/src/engine/workspace/loader.js +49 -12
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +11 -1
- package/dist-sdk/src/entities/access-policy/from-tf.js +6 -1
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +11 -0
- package/dist-sdk/src/entities/access-policy/to-tf.js +11 -4
- package/dist-sdk/src/entities/agent-tool/to-tf.js +2 -1
- package/dist-sdk/src/entities/app/build.d.ts +10 -0
- package/dist-sdk/src/entities/app/build.js +0 -13
- package/dist-sdk/src/entities/app/deserializer/normalize.d.ts +6 -1
- package/dist-sdk/src/entities/app/from-tf.js +4 -3
- package/dist-sdk/src/entities/app/index.d.ts +2 -0
- package/dist-sdk/src/entities/app/index.js +1 -0
- package/dist-sdk/src/entities/app/module.js +13 -0
- package/dist-sdk/src/entities/app/to-tf.js +2 -0
- package/dist-sdk/src/entities/automation/build.d.ts +2 -1
- package/dist-sdk/src/entities/automation/build.js +27 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +6 -0
- package/dist-sdk/src/entities/automation/from-tf.js +156 -26
- package/dist-sdk/src/entities/automation/index.d.ts +1 -1
- package/dist-sdk/src/entities/automation/module.d.ts +2 -0
- package/dist-sdk/src/entities/automation/module.js +56 -0
- package/dist-sdk/src/entities/automation/output-field-types.d.ts +5 -4
- package/dist-sdk/src/entities/automation/output-field-types.js +23 -5
- package/dist-sdk/src/entities/automation/system-ref-name.d.ts +16 -0
- package/dist-sdk/src/entities/automation/system-ref-name.js +44 -0
- package/dist-sdk/src/entities/automation/task-output-labels.d.ts +15 -0
- package/dist-sdk/src/entities/automation/task-output-labels.js +38 -0
- package/dist-sdk/src/entities/automation/tasks.d.ts +37 -5
- package/dist-sdk/src/entities/automation/tasks.js +23 -1
- package/dist-sdk/src/entities/automation/to-tf.js +158 -84
- package/dist-sdk/src/entities/automation/types.js +1 -0
- package/dist-sdk/src/entities/chart/from-tf.js +33 -17
- package/dist-sdk/src/entities/chart/module.js +3 -1
- package/dist-sdk/src/entities/chart/printer.d.ts +1 -0
- package/dist-sdk/src/entities/chart/printer.js +26 -16
- package/dist-sdk/src/entities/chart/rebind-owner.d.ts +3 -0
- package/dist-sdk/src/entities/chart/rebind-owner.js +42 -0
- package/dist-sdk/src/entities/chart/to-tf.js +12 -10
- package/dist-sdk/src/entities/dashboard/build.d.ts +4 -0
- package/dist-sdk/src/entities/dashboard/from-tf.js +15 -4
- package/dist-sdk/src/entities/dashboard/to-tf.d.ts +2 -0
- package/dist-sdk/src/entities/dashboard/to-tf.js +13 -0
- package/dist-sdk/src/entities/dashboard-widget/module.js +4 -0
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +51 -2
- package/dist-sdk/src/entities/dynamic-layout/dialect.d.ts +3 -0
- package/dist-sdk/src/entities/dynamic-layout/dialect.js +5 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.d.ts +9 -6
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +188 -26
- package/dist-sdk/src/entities/dynamic-layout/module.js +4 -1
- package/dist-sdk/src/entities/dynamic-layout/to-tf.d.ts +5 -1
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +254 -23
- package/dist-sdk/src/entities/element/build.d.ts +8 -0
- package/dist-sdk/src/entities/element/build.js +1 -0
- package/dist-sdk/src/entities/element/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/element/from-tf.js +6 -2
- package/dist-sdk/src/entities/element/index.d.ts +1 -0
- package/dist-sdk/src/entities/element/index.js +1 -0
- package/dist-sdk/src/entities/element/module.js +2 -0
- package/dist-sdk/src/entities/element/to-tf.js +12 -0
- package/dist-sdk/src/entities/field/from-tf.d.ts +2 -0
- package/dist-sdk/src/entities/field/from-tf.js +11 -0
- package/dist-sdk/src/entities/field/to-tf.js +13 -9
- package/dist-sdk/src/entities/relationship/from-tf.d.ts +8 -1
- package/dist-sdk/src/entities/relationship/from-tf.js +53 -10
- package/dist-sdk/src/entities/relationship/to-tf.d.ts +8 -0
- package/dist-sdk/src/entities/relationship/to-tf.js +19 -10
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +7 -2
- package/dist-sdk/src/entities/shared/filters/index.d.ts +23 -2
- package/dist-sdk/src/entities/shared/filters/index.js +24 -1
- package/dist-sdk/src/entities/shared/filters/print.js +22 -4
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +23 -3
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +60 -18
- package/dist-sdk/src/entities/shared/filters/types.d.ts +13 -4
- package/dist-sdk/src/entities/shared/foreign-ref.d.ts +16 -0
- package/dist-sdk/src/entities/shared/foreign-ref.js +17 -1
- package/dist-sdk/src/entities/shared/tool-field-ref.js +6 -9
- package/dist-sdk/src/entities/skill/access-policy.d.ts +17 -0
- package/dist-sdk/src/entities/skill/access-policy.js +101 -0
- package/dist-sdk/src/entities/skill/build.d.ts +3 -0
- package/dist-sdk/src/entities/skill/build.js +3 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +4 -1
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +21 -0
- package/dist-sdk/src/entities/skill/from-tf.d.ts +2 -0
- package/dist-sdk/src/entities/skill/from-tf.js +4 -9
- package/dist-sdk/src/entities/skill/index.d.ts +2 -0
- package/dist-sdk/src/entities/skill/index.js +1 -0
- package/dist-sdk/src/entities/skill/module.js +1 -0
- package/dist-sdk/src/entities/skill/to-tf.d.ts +2 -2
- package/dist-sdk/src/entities/skill/to-tf.js +5 -2
- package/dist-sdk/src/entities/skill-tool/to-tf.js +2 -1
- package/dist-sdk/src/entities/table/to-tf.js +3 -3
- package/dist-sdk/src/entities/view/agent-view-layout-from-tf.d.ts +49 -0
- package/dist-sdk/src/entities/view/agent-view-layout-from-tf.js +224 -0
- package/dist-sdk/src/entities/view/agent-view-layout-to-tf.d.ts +36 -0
- package/dist-sdk/src/entities/view/agent-view-layout-to-tf.js +288 -0
- package/dist-sdk/src/entities/view/agent-view-layout.d.ts +121 -0
- package/dist-sdk/src/entities/view/agent-view-layout.js +21 -0
- package/dist-sdk/src/entities/view/from-tf.d.ts +3 -1
- package/dist-sdk/src/entities/view/from-tf.js +42 -7
- package/dist-sdk/src/entities/view/ragnarok.d.ts +7 -0
- package/dist-sdk/src/entities/view/ragnarok.js +1 -0
- package/dist-sdk/src/entities/view/to-tf.d.ts +10 -1
- package/dist-sdk/src/entities/view/to-tf.js +30 -1
- package/dist-sdk/src/entities/view/types.js +2 -0
- package/dist-sdk/src/entities/widget/to-tf.js +2 -2
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +815 -0
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +5 -0
- package/dist-sdk/src/graph/index.d.ts +43 -0
- package/dist-sdk/src/graph/index.js +9 -0
- package/dist-sdk/src/graph/types.d.ts +78 -0
- package/package.json +11 -1
|
@@ -0,0 +1,815 @@
|
|
|
1
|
+
export type ElementumBlocksSpec = {
|
|
2
|
+
readonly root: string;
|
|
3
|
+
readonly elements: ElementumBlocks;
|
|
4
|
+
readonly state?: JsonSafeState;
|
|
5
|
+
};
|
|
6
|
+
export type ElementumBlocks = {
|
|
7
|
+
readonly [key: string]: ElementumBlocksElement;
|
|
8
|
+
};
|
|
9
|
+
export type ElementumBlocksElement = (StackBlockElement) | (RowBlockElement) | (PanesBlockElement) | (ListControlsBlockElement) | (ListCollectionBlockElement) | (HeaderBlockElement) | (BodyBlockElement) | (BulletsBlockElement) | (DetailsListBlockElement) | (DetailsFieldsBlockElement) | (DividerBlockElement) | (SpacerBlockElement) | (CardBlockElement) | (DataTableBlockElement) | (ActionCardBlockElement) | (ChartBlockElement) | (MetricsRowBlockElement) | (PageHeaderBlockElement) | (ButtonBlockElement);
|
|
10
|
+
/**
|
|
11
|
+
* Customer-facing name: Stack
|
|
12
|
+
* Customer-facing description: Stacks blocks from top to bottom with even spacing. Valid as the page root for simple portal or report layouts, and as a vertical section under Panes for process and list-to-record views.
|
|
13
|
+
* Internal authoring guidance: Nested vertical column that stacks child blocks top-to-bottom with a consistent gap and a 16px default inset. Set padding "none" for a flush stack. Looks like an unstyled layout container (no card chrome or borders). Valid as the Spec root for simple portal or report single-column layouts. For process or list-to-record views, nest it under PanesBlock. Not for side-by-side layout; use RowBlock for KPI tiles or other equal-width columns.
|
|
14
|
+
*/
|
|
15
|
+
export type StackBlockElement = {
|
|
16
|
+
readonly type: "StackBlock";
|
|
17
|
+
readonly props: StackBlockProps;
|
|
18
|
+
readonly children?: ReadonlyArray<string>;
|
|
19
|
+
readonly visible?: VisibilityCondition;
|
|
20
|
+
readonly repeat?: RepeatConfig;
|
|
21
|
+
readonly on?: ElementOn;
|
|
22
|
+
readonly watch?: ElementWatch;
|
|
23
|
+
readonly validation?: ElementValidation;
|
|
24
|
+
};
|
|
25
|
+
export type StackBlockProps = {
|
|
26
|
+
readonly gap?: ("none" | "sm" | "md" | "lg") | (PropExpression);
|
|
27
|
+
readonly padding?: ("none" | "sm" | "md" | "lg") | (PropExpression);
|
|
28
|
+
};
|
|
29
|
+
export type PropExpression = ({
|
|
30
|
+
readonly $state: string;
|
|
31
|
+
}) | ({
|
|
32
|
+
readonly $item: string;
|
|
33
|
+
}) | ({
|
|
34
|
+
readonly $index: true;
|
|
35
|
+
}) | ({
|
|
36
|
+
readonly $bindState: string;
|
|
37
|
+
}) | ({
|
|
38
|
+
readonly $bindItem: string;
|
|
39
|
+
}) | ({
|
|
40
|
+
readonly $cond: VisibilityCondition;
|
|
41
|
+
readonly $then: PropExpressionValue;
|
|
42
|
+
readonly $else: PropExpressionValue;
|
|
43
|
+
}) | ({
|
|
44
|
+
readonly $computed: string;
|
|
45
|
+
readonly args?: {
|
|
46
|
+
readonly [key: string]: PropExpressionValue;
|
|
47
|
+
};
|
|
48
|
+
}) | ({
|
|
49
|
+
readonly $template: string;
|
|
50
|
+
});
|
|
51
|
+
export type VisibilityCondition = OpaqueJson;
|
|
52
|
+
export type OpaqueJson = (string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
|
|
53
|
+
readonly [key: string]: OpaqueJson;
|
|
54
|
+
});
|
|
55
|
+
export type PropExpressionValue = (string) | (number) | (boolean) | (null) | (ReadonlyArray<PropExpressionValue>) | (PropExpression) | ({
|
|
56
|
+
readonly [key: string]: PropExpressionValue;
|
|
57
|
+
});
|
|
58
|
+
export type RepeatConfig = {
|
|
59
|
+
readonly statePath: string;
|
|
60
|
+
readonly key?: string;
|
|
61
|
+
};
|
|
62
|
+
export type ElementOn = OpaqueJson;
|
|
63
|
+
export type ElementWatch = OpaqueJson;
|
|
64
|
+
export type ElementValidation = OpaqueJson;
|
|
65
|
+
/**
|
|
66
|
+
* Customer-facing name: Row
|
|
67
|
+
* Customer-facing description: Places blocks side by side at equal width. Use inside a stack for tiles or columns.
|
|
68
|
+
* Internal authoring guidance: Responsive row that stretches child blocks equally across four desktop, two tablet, or one mobile column with a 12px default gap. Looks like an unstyled layout container (no card chrome or borders). Best used inside a StackBlock for KPI tiles or other side-by-side sections. Prefer StackBlock for top-to-bottom page layout. Do not use ActionCardBlock to fake a KPI row.
|
|
69
|
+
*/
|
|
70
|
+
export type RowBlockElement = {
|
|
71
|
+
readonly type: "RowBlock";
|
|
72
|
+
readonly props: RowBlockProps;
|
|
73
|
+
readonly children?: ReadonlyArray<string>;
|
|
74
|
+
readonly visible?: VisibilityCondition;
|
|
75
|
+
readonly repeat?: RepeatConfig;
|
|
76
|
+
readonly on?: ElementOn;
|
|
77
|
+
readonly watch?: ElementWatch;
|
|
78
|
+
readonly validation?: ElementValidation;
|
|
79
|
+
};
|
|
80
|
+
export type RowBlockProps = {
|
|
81
|
+
readonly gap?: ("none" | "sm" | "md" | "lg") | (PropExpression);
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Customer-facing name: Panes
|
|
85
|
+
* Customer-facing description: A full-height main column with up to three extra side panes. Use this when a record details pane should sit beside the main view.
|
|
86
|
+
* Internal authoring guidance: Preferred root for managed-view Specs, including single-pane layouts. Provide at least one default-slot child; children map in order to panes (max 4), typically one nested StackBlock for the main pane. Any clickable or selectable list, including ListCollectionBlock, must be under a root PanesBlock so secondary/detail panes can be supported. Additional panes are optional. The host may append record details after authored children; do not author that pane or nest PanesBlock.
|
|
87
|
+
*/
|
|
88
|
+
export type PanesBlockElement = {
|
|
89
|
+
readonly type: "PanesBlock";
|
|
90
|
+
readonly props: PanesBlockProps;
|
|
91
|
+
readonly children?: ReadonlyArray<string>;
|
|
92
|
+
readonly visible?: VisibilityCondition;
|
|
93
|
+
readonly repeat?: RepeatConfig;
|
|
94
|
+
readonly on?: ElementOn;
|
|
95
|
+
readonly watch?: ElementWatch;
|
|
96
|
+
readonly validation?: ElementValidation;
|
|
97
|
+
};
|
|
98
|
+
export type PanesBlockProps = {
|
|
99
|
+
readonly panelState?: ("open" | "closed" | "full") | (PropExpression);
|
|
100
|
+
readonly contentWidth?: ("full" | "reader") | (PropExpression);
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Customer-facing name: List controls
|
|
104
|
+
* Customer-facing description: Search, filters, grouping, and sort controls that sit above a list.
|
|
105
|
+
* Internal authoring guidance: Toolbar of search, Open/Closed quick filters, filter popover, group-by, and sort. For a shared view filter, put filterPreset here as the optional seed and bind filterJson to $bindState: "/query/filter"; this block owns FormFilters, writes the composed/applied JSON back to that path, and self-fetching siblings bound to it refetch automatically. Keep quickFilterValue separate as the Open/Closed status control. Looks like list chrome above a collection, not the results themselves.
|
|
106
|
+
*/
|
|
107
|
+
export type ListControlsBlockElement = {
|
|
108
|
+
readonly type: "ListControlsBlock";
|
|
109
|
+
readonly props: ListControlsBlockProps;
|
|
110
|
+
readonly children?: ReadonlyArray<string>;
|
|
111
|
+
readonly visible?: VisibilityCondition;
|
|
112
|
+
readonly repeat?: RepeatConfig;
|
|
113
|
+
readonly on?: ElementOn;
|
|
114
|
+
readonly watch?: ElementWatch;
|
|
115
|
+
readonly validation?: ElementValidation;
|
|
116
|
+
};
|
|
117
|
+
export type ListControlsBlockProps = {
|
|
118
|
+
readonly searchValue?: (string) | (PropExpression);
|
|
119
|
+
readonly filterJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
|
|
120
|
+
readonly [key: string]: OpaqueJson;
|
|
121
|
+
}))) | (PropExpression)) | (null);
|
|
122
|
+
readonly filterPreset?: ((("createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned") | (PropExpression)) | ((ReadonlyArray<"createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned">) | (PropExpression))) | (PropExpression);
|
|
123
|
+
readonly filterFields?: (ReadonlyArray<JsonSafeState>) | (PropExpression);
|
|
124
|
+
readonly filterAspectId?: (string) | (PropExpression);
|
|
125
|
+
readonly quickFilters?: (ListControlsQuickFilters) | (PropExpression);
|
|
126
|
+
readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
|
|
127
|
+
readonly groupByValue?: ((string) | (PropExpression)) | (null);
|
|
128
|
+
readonly groupByOptions?: (ReadonlyArray<ListControlsOption>) | (PropExpression);
|
|
129
|
+
readonly sortByValue?: ((string) | (PropExpression)) | (null);
|
|
130
|
+
readonly sortByDirection?: ("ASC" | "DESC") | (PropExpression);
|
|
131
|
+
readonly sortByOptions?: (ReadonlyArray<ListControlsOption>) | (PropExpression);
|
|
132
|
+
};
|
|
133
|
+
export type JsonSafeState = OpaqueJson;
|
|
134
|
+
export type ListControlsQuickFilters = {
|
|
135
|
+
readonly kind?: ("statusGroups") | (PropExpression);
|
|
136
|
+
readonly groups?: (ReadonlyArray<"open" | "closed">) | (PropExpression);
|
|
137
|
+
readonly defaultValue?: ("open" | "closed") | (PropExpression);
|
|
138
|
+
};
|
|
139
|
+
export type ListControlsOption = {
|
|
140
|
+
readonly value: string;
|
|
141
|
+
readonly label: string;
|
|
142
|
+
readonly disabled?: boolean;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Customer-facing name: Record list
|
|
146
|
+
* Customer-facing description: A compact stacked list of records with titles and status pills. Use it for queues and pickers.
|
|
147
|
+
* 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. To share a ListControls filter, bind filterJson and use the same filterPreset on this list; state changes refetch it. Use filterPreset without that binding only for an independent list seed. Looks like a ticket queue, not a spreadsheet. Prefer DataTableBlock for dense columns.
|
|
148
|
+
*/
|
|
149
|
+
export type ListCollectionBlockElement = {
|
|
150
|
+
readonly type: "ListCollectionBlock";
|
|
151
|
+
readonly props: ListCollectionBlockProps;
|
|
152
|
+
readonly children?: ReadonlyArray<string>;
|
|
153
|
+
readonly visible?: VisibilityCondition;
|
|
154
|
+
readonly repeat?: RepeatConfig;
|
|
155
|
+
readonly on?: ElementOn;
|
|
156
|
+
readonly watch?: ElementWatch;
|
|
157
|
+
readonly validation?: ElementValidation;
|
|
158
|
+
};
|
|
159
|
+
export type ListCollectionBlockProps = (ListCollectionBlockPresentationalProps) | (ListCollectionBlockSelfFetchingProps);
|
|
160
|
+
export type ListCollectionBlockPresentationalProps = {
|
|
161
|
+
readonly selectedId?: ((string) | (PropExpression)) | (null);
|
|
162
|
+
readonly selectedAspectId?: ((string) | (PropExpression)) | (null);
|
|
163
|
+
readonly selectedHandle?: ((string) | (PropExpression)) | (null);
|
|
164
|
+
readonly groupBy?: ((string) | (PropExpression)) | (null);
|
|
165
|
+
readonly sortBy?: ((string) | (PropExpression)) | (null);
|
|
166
|
+
readonly sortDirection?: ("ASC" | "DESC") | (PropExpression);
|
|
167
|
+
readonly status?: ("idle" | "loading" | "error") | (PropExpression);
|
|
168
|
+
readonly loadingMessage?: (string) | (PropExpression);
|
|
169
|
+
readonly errorMessage?: (string) | (PropExpression);
|
|
170
|
+
readonly emptyMessage?: (string) | (PropExpression);
|
|
171
|
+
readonly items?: (ReadonlyArray<ListCollectionItem>) | (PropExpression);
|
|
172
|
+
};
|
|
173
|
+
export type ListCollectionItem = {
|
|
174
|
+
readonly id: string;
|
|
175
|
+
readonly title: string;
|
|
176
|
+
readonly identifier?: (string) | (null);
|
|
177
|
+
readonly group?: (string) | (null);
|
|
178
|
+
readonly pills?: ReadonlyArray<ListCollectionPill>;
|
|
179
|
+
};
|
|
180
|
+
export type ListCollectionPill = {
|
|
181
|
+
readonly id: string;
|
|
182
|
+
readonly label: string;
|
|
183
|
+
readonly tone?: "neutral" | "info" | "warning" | "danger";
|
|
184
|
+
readonly visual?: ({
|
|
185
|
+
readonly type: "icon";
|
|
186
|
+
readonly semantic: "priority" | "sla" | "updated";
|
|
187
|
+
}) | ({
|
|
188
|
+
readonly type: "avatar";
|
|
189
|
+
readonly name: string;
|
|
190
|
+
readonly imageUrl?: string;
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
export type ListCollectionBlockSelfFetchingProps = {
|
|
194
|
+
readonly selectedId?: ((string) | (PropExpression)) | (null);
|
|
195
|
+
readonly selectedAspectId?: ((string) | (PropExpression)) | (null);
|
|
196
|
+
readonly selectedHandle?: ((string) | (PropExpression)) | (null);
|
|
197
|
+
readonly groupBy?: ((string) | (PropExpression)) | (null);
|
|
198
|
+
readonly sortBy?: ((string) | (PropExpression)) | (null);
|
|
199
|
+
readonly sortDirection?: ("ASC" | "DESC") | (PropExpression);
|
|
200
|
+
readonly status?: ("idle" | "loading" | "error") | (PropExpression);
|
|
201
|
+
readonly loadingMessage?: (string) | (PropExpression);
|
|
202
|
+
readonly errorMessage?: (string) | (PropExpression);
|
|
203
|
+
readonly emptyMessage?: (string) | (PropExpression);
|
|
204
|
+
readonly aspectId?: (string) | (PropExpression);
|
|
205
|
+
readonly searchValue?: (string) | (PropExpression);
|
|
206
|
+
readonly filterJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
|
|
207
|
+
readonly [key: string]: OpaqueJson;
|
|
208
|
+
}))) | (PropExpression)) | (null);
|
|
209
|
+
readonly filterPreset?: ((("createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned") | (PropExpression)) | ((ReadonlyArray<"createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned">) | (PropExpression))) | (PropExpression);
|
|
210
|
+
readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Customer-facing name: Header
|
|
214
|
+
* Customer-facing description: A section title with a heading level and color.
|
|
215
|
+
* Internal authoring guidance: A semantic heading with a fixed typography treatment for each numeric level 1–6 and a constrained semantic tone: primary organization branding, default foreground, or muted foreground. Best used for section titles and headings. Set level to choose both the semantic h1–h6 element and its closed design-system typography. Prefer BodyBlock for paragraph copy.
|
|
216
|
+
*/
|
|
217
|
+
export type HeaderBlockElement = {
|
|
218
|
+
readonly type: "HeaderBlock";
|
|
219
|
+
readonly props: HeaderBlockProps;
|
|
220
|
+
readonly children?: ReadonlyArray<string>;
|
|
221
|
+
readonly visible?: VisibilityCondition;
|
|
222
|
+
readonly repeat?: RepeatConfig;
|
|
223
|
+
readonly on?: ElementOn;
|
|
224
|
+
readonly watch?: ElementWatch;
|
|
225
|
+
readonly validation?: ElementValidation;
|
|
226
|
+
};
|
|
227
|
+
export type HeaderBlockProps = {
|
|
228
|
+
readonly text?: (string) | (PropExpression);
|
|
229
|
+
readonly level?: (1 | 2 | 3 | 4 | 5 | 6) | (PropExpression);
|
|
230
|
+
readonly tone?: ("primary" | "default" | "muted") | (PropExpression);
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* Customer-facing name: Body
|
|
234
|
+
* Customer-facing description: A paragraph for body copy, helper text, and short descriptions.
|
|
235
|
+
* Internal authoring guidance: A fixed-width semantic paragraph with prototype-aligned 14px typography and 1.6 line height. Best used for body, helper, description, and subtitle copy. Use tone muted for secondary paragraph copy; typography and measure remain fixed. Prefer HeaderBlock for titles and BulletsBlock for lists.
|
|
236
|
+
*/
|
|
237
|
+
export type BodyBlockElement = {
|
|
238
|
+
readonly type: "BodyBlock";
|
|
239
|
+
readonly props: BodyBlockProps;
|
|
240
|
+
readonly children?: ReadonlyArray<string>;
|
|
241
|
+
readonly visible?: VisibilityCondition;
|
|
242
|
+
readonly repeat?: RepeatConfig;
|
|
243
|
+
readonly on?: ElementOn;
|
|
244
|
+
readonly watch?: ElementWatch;
|
|
245
|
+
readonly validation?: ElementValidation;
|
|
246
|
+
};
|
|
247
|
+
export type BodyBlockProps = {
|
|
248
|
+
readonly text?: (string) | (PropExpression);
|
|
249
|
+
readonly tone?: ("default" | "muted") | (PropExpression);
|
|
250
|
+
};
|
|
251
|
+
/**
|
|
252
|
+
* Customer-facing name: Bullets
|
|
253
|
+
* Customer-facing description: A list of short facts, checks, or next steps.
|
|
254
|
+
* Internal authoring guidance: A branded semantic unordered list with prototype-aligned 14px typography, 48rem measure, and 8px row spacing. Best used for concise facts, checks, or next steps. Provide item text only; the browser supplies the standard bullet marker. Prefer BodyBlock for prose.
|
|
255
|
+
*/
|
|
256
|
+
export type BulletsBlockElement = {
|
|
257
|
+
readonly type: "BulletsBlock";
|
|
258
|
+
readonly props: BulletsBlockProps;
|
|
259
|
+
readonly children?: ReadonlyArray<string>;
|
|
260
|
+
readonly visible?: VisibilityCondition;
|
|
261
|
+
readonly repeat?: RepeatConfig;
|
|
262
|
+
readonly on?: ElementOn;
|
|
263
|
+
readonly watch?: ElementWatch;
|
|
264
|
+
readonly validation?: ElementValidation;
|
|
265
|
+
};
|
|
266
|
+
export type BulletsBlockProps = {
|
|
267
|
+
readonly items?: (ReadonlyArray<string>) | (PropExpression);
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* Customer-facing name: Details list
|
|
271
|
+
* Customer-facing description: A list of authored label and value rows.
|
|
272
|
+
* Internal authoring guidance: Bordered stack of ordered 14px label/value rows with a one-third/two-thirds split. Best for custom explanatory details authored as complete display-ready strings. Use DetailsFieldsBlock instead when the host is projecting already-resolved record fields. This block never accepts record identity or fetch props.
|
|
273
|
+
*/
|
|
274
|
+
export type DetailsListBlockElement = {
|
|
275
|
+
readonly type: "DetailsListBlock";
|
|
276
|
+
readonly props: DetailsListBlockProps;
|
|
277
|
+
readonly children?: ReadonlyArray<string>;
|
|
278
|
+
readonly visible?: VisibilityCondition;
|
|
279
|
+
readonly repeat?: RepeatConfig;
|
|
280
|
+
readonly on?: ElementOn;
|
|
281
|
+
readonly watch?: ElementWatch;
|
|
282
|
+
readonly validation?: ElementValidation;
|
|
283
|
+
};
|
|
284
|
+
export type DetailsListBlockProps = {
|
|
285
|
+
readonly items: (ReadonlyArray<DetailsListItem>) | (PropExpression);
|
|
286
|
+
};
|
|
287
|
+
export type DetailsListItem = {
|
|
288
|
+
/**
|
|
289
|
+
* Required nonblank label for this authored detail.
|
|
290
|
+
*/
|
|
291
|
+
readonly label: string;
|
|
292
|
+
/**
|
|
293
|
+
* Required nonblank display-ready string value.
|
|
294
|
+
*/
|
|
295
|
+
readonly value: string;
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
298
|
+
* Customer-facing name: Record fields
|
|
299
|
+
* Customer-facing description: A grid of field labels and values for the selected record.
|
|
300
|
+
* Internal authoring guidance: Responsive one-to-four-column field grid with 12px muted labels and 14px values. Best for selected record-field metadata whose field IDs, labels, and display-ready string values were already resolved by the host. fieldId is stable render identity only; never use this block to fetch or look up a record. Use DetailsListBlock for generic authored explanatory details.
|
|
301
|
+
*/
|
|
302
|
+
export type DetailsFieldsBlockElement = {
|
|
303
|
+
readonly type: "DetailsFieldsBlock";
|
|
304
|
+
readonly props: DetailsFieldsBlockProps;
|
|
305
|
+
readonly children?: ReadonlyArray<string>;
|
|
306
|
+
readonly visible?: VisibilityCondition;
|
|
307
|
+
readonly repeat?: RepeatConfig;
|
|
308
|
+
readonly on?: ElementOn;
|
|
309
|
+
readonly watch?: ElementWatch;
|
|
310
|
+
readonly validation?: ElementValidation;
|
|
311
|
+
};
|
|
312
|
+
export type DetailsFieldsBlockProps = {
|
|
313
|
+
readonly fields: (ReadonlyArray<DetailsField>) | (PropExpression);
|
|
314
|
+
};
|
|
315
|
+
export type DetailsField = {
|
|
316
|
+
/**
|
|
317
|
+
* Required stable field identity supplied by the host. Used only as render identity; it never triggers a lookup or fetch.
|
|
318
|
+
*/
|
|
319
|
+
readonly fieldId: string;
|
|
320
|
+
/**
|
|
321
|
+
* Required nonblank display label already resolved by the host.
|
|
322
|
+
*/
|
|
323
|
+
readonly label: string;
|
|
324
|
+
/**
|
|
325
|
+
* Required nonblank display-ready string value already resolved by the host.
|
|
326
|
+
*/
|
|
327
|
+
readonly value: string;
|
|
328
|
+
};
|
|
329
|
+
/**
|
|
330
|
+
* Customer-facing name: Divider
|
|
331
|
+
* Customer-facing description: A horizontal line that separates related sections.
|
|
332
|
+
* Internal authoring guidance: Decorative horizontal separator with fixed semantic theme styling and internal spacing. Best used as a quiet boundary between related content regions; use SpacerBlock when an invisible gap is intended.
|
|
333
|
+
*/
|
|
334
|
+
export type DividerBlockElement = {
|
|
335
|
+
readonly type: "DividerBlock";
|
|
336
|
+
readonly props: DividerBlockProps;
|
|
337
|
+
readonly children?: ReadonlyArray<string>;
|
|
338
|
+
readonly visible?: VisibilityCondition;
|
|
339
|
+
readonly repeat?: RepeatConfig;
|
|
340
|
+
readonly on?: ElementOn;
|
|
341
|
+
readonly watch?: ElementWatch;
|
|
342
|
+
readonly validation?: ElementValidation;
|
|
343
|
+
};
|
|
344
|
+
export type DividerBlockProps = {
|
|
345
|
+
readonly [key: string]: never;
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* Customer-facing name: Spacing
|
|
349
|
+
* Customer-facing description: Adds empty vertical space between sections. It is not a visible divider.
|
|
350
|
+
* Internal authoring guidance: Invisible vertical empty space between blocks (aria-hidden; not a visible divider). Best used between major page sections. Prefer StackBlock gap for tight spacing inside a section.
|
|
351
|
+
*/
|
|
352
|
+
export type SpacerBlockElement = {
|
|
353
|
+
readonly type: "SpacerBlock";
|
|
354
|
+
readonly props: SpacerBlockProps;
|
|
355
|
+
readonly children?: ReadonlyArray<string>;
|
|
356
|
+
readonly visible?: VisibilityCondition;
|
|
357
|
+
readonly repeat?: RepeatConfig;
|
|
358
|
+
readonly on?: ElementOn;
|
|
359
|
+
readonly watch?: ElementWatch;
|
|
360
|
+
readonly validation?: ElementValidation;
|
|
361
|
+
};
|
|
362
|
+
export type SpacerBlockProps = {
|
|
363
|
+
readonly size?: ("sm" | "md" | "lg") | (PropExpression);
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* Customer-facing name: Card
|
|
367
|
+
* Customer-facing description: A bordered panel that groups related content. Use it to frame a section.
|
|
368
|
+
* Internal authoring guidance: Bordered, rounded card surface that wraps child blocks. Looks like a panel with default inner padding; padding "none" makes a flush list/table shell. Best used to group a section. Not a clickable service tile. Use ActionCardBlock for that.
|
|
369
|
+
*/
|
|
370
|
+
export type CardBlockElement = {
|
|
371
|
+
readonly type: "CardBlock";
|
|
372
|
+
readonly props: CardBlockProps;
|
|
373
|
+
readonly children?: ReadonlyArray<string>;
|
|
374
|
+
readonly visible?: VisibilityCondition;
|
|
375
|
+
readonly repeat?: RepeatConfig;
|
|
376
|
+
readonly on?: ElementOn;
|
|
377
|
+
readonly watch?: ElementWatch;
|
|
378
|
+
readonly validation?: ElementValidation;
|
|
379
|
+
};
|
|
380
|
+
export type CardBlockProps = {
|
|
381
|
+
readonly padding?: ("none") | (PropExpression);
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* Customer-facing name: Data table
|
|
385
|
+
* Customer-facing description: A spreadsheet-style table with typed columns for structured rows.
|
|
386
|
+
* 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/record columns for live records; self-fetching falls back to the runtime default aspect. 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. 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.
|
|
387
|
+
*/
|
|
388
|
+
export type DataTableBlockElement = {
|
|
389
|
+
readonly type: "DataTableBlock";
|
|
390
|
+
readonly props: DataTableBlockProps;
|
|
391
|
+
readonly children?: ReadonlyArray<string>;
|
|
392
|
+
readonly visible?: VisibilityCondition;
|
|
393
|
+
readonly repeat?: RepeatConfig;
|
|
394
|
+
readonly on?: ElementOn;
|
|
395
|
+
readonly watch?: ElementWatch;
|
|
396
|
+
readonly validation?: ElementValidation;
|
|
397
|
+
};
|
|
398
|
+
export type DataTableBlockProps = (DataTableBlockPresentationalProps) | (DataTableBlockSelfFetchingProps);
|
|
399
|
+
export type DataTableBlockPresentationalProps = {
|
|
400
|
+
readonly selectedId?: ((string) | (PropExpression)) | (null);
|
|
401
|
+
readonly showHeader?: (boolean) | (PropExpression);
|
|
402
|
+
readonly loadingMessage?: (string) | (PropExpression);
|
|
403
|
+
readonly errorMessage?: (string) | (PropExpression);
|
|
404
|
+
readonly emptyMessage?: (string) | (PropExpression);
|
|
405
|
+
readonly rows?: (ReadonlyArray<DataTableRow>) | (PropExpression);
|
|
406
|
+
readonly columns?: (ReadonlyArray<DataTableColumn>) | (PropExpression);
|
|
407
|
+
readonly presentation?: ("popularArticles" | "announcements") | (PropExpression);
|
|
408
|
+
readonly bordered?: (boolean) | (PropExpression);
|
|
409
|
+
readonly defaultExpanded?: (boolean) | (PropExpression);
|
|
410
|
+
readonly childrenPageSize?: (number) | (PropExpression);
|
|
411
|
+
readonly messages?: (DataTableMessages) | (PropExpression);
|
|
412
|
+
readonly status?: ("idle" | "loading" | "error") | (PropExpression);
|
|
413
|
+
};
|
|
414
|
+
export type DataTableRow = {
|
|
415
|
+
readonly id: string;
|
|
416
|
+
/**
|
|
417
|
+
* Navigation target for the row primary cell. Use an absolute http(s) URL or a root-relative /path. Same rules as ActionCardBlock card href.
|
|
418
|
+
*/
|
|
419
|
+
readonly href?: string;
|
|
420
|
+
readonly children?: ReadonlyArray<DataTableRow>;
|
|
421
|
+
} & {
|
|
422
|
+
readonly [key: string]: unknown;
|
|
423
|
+
};
|
|
424
|
+
export type DataTableColumn = {
|
|
425
|
+
readonly key: string;
|
|
426
|
+
readonly header?: string;
|
|
427
|
+
readonly type?: "text" | "number" | "currency" | "badge" | "variance" | "progress" | "tags";
|
|
428
|
+
readonly align?: "start" | "center" | "end";
|
|
429
|
+
readonly bold?: boolean;
|
|
430
|
+
readonly width?: (string) | (number);
|
|
431
|
+
readonly minWidth?: (string) | (number);
|
|
432
|
+
readonly maxWidth?: (string) | (number);
|
|
433
|
+
};
|
|
434
|
+
export type DataTableMessages = {
|
|
435
|
+
readonly expandRow?: (string) | (PropExpression);
|
|
436
|
+
readonly collapseRow?: (string) | (PropExpression);
|
|
437
|
+
readonly loading?: (string) | (PropExpression);
|
|
438
|
+
readonly retry?: (string) | (PropExpression);
|
|
439
|
+
readonly empty?: (string) | (PropExpression);
|
|
440
|
+
readonly loadMore?: (string) | (PropExpression);
|
|
441
|
+
};
|
|
442
|
+
export type DataTableBlockSelfFetchingProps = {
|
|
443
|
+
readonly selectedId?: ((string) | (PropExpression)) | (null);
|
|
444
|
+
readonly showHeader?: (boolean) | (PropExpression);
|
|
445
|
+
readonly loadingMessage?: (string) | (PropExpression);
|
|
446
|
+
readonly errorMessage?: (string) | (PropExpression);
|
|
447
|
+
readonly emptyMessage?: (string) | (PropExpression);
|
|
448
|
+
readonly aspectId?: (string) | (PropExpression);
|
|
449
|
+
readonly columns?: (ReadonlyArray<"handle" | "title" | "status" | "priority" | "assignee" | "assignmentGroup" | "createdBy" | "createdTime" | "updatedAt" | "stage">) | (PropExpression);
|
|
450
|
+
readonly searchValue?: (string) | (PropExpression);
|
|
451
|
+
readonly filterJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
|
|
452
|
+
readonly [key: string]: OpaqueJson;
|
|
453
|
+
}))) | (PropExpression)) | (null);
|
|
454
|
+
readonly filterPreset?: ((("createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned") | (PropExpression)) | ((ReadonlyArray<"createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned">) | (PropExpression))) | (PropExpression);
|
|
455
|
+
readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
|
|
456
|
+
readonly selectedAspectId?: ((string) | (PropExpression)) | (null);
|
|
457
|
+
readonly selectedHandle?: ((string) | (PropExpression)) | (null);
|
|
458
|
+
};
|
|
459
|
+
/**
|
|
460
|
+
* Customer-facing name: Action cards
|
|
461
|
+
* Customer-facing description: Clickable tiles with an icon, title, and short description. Use them to choose a topic or action.
|
|
462
|
+
* Internal authoring guidance: Responsive grid of clickable tiles with a tinted icon well, title, short description, and hover arrow. Looks like a service/topic picker (typically 1–3 columns). Best used for choosing a category or action. Give a card an href to navigate (absolute https:// opens a new tab, "/path" navigates inside Elementum); omit href to make it a selection tile that writes selectedId. Do not simulate with CardBlock plus generic text or emoji icons. Empty props render one default card.
|
|
463
|
+
*/
|
|
464
|
+
export type ActionCardBlockElement = {
|
|
465
|
+
readonly type: "ActionCardBlock";
|
|
466
|
+
readonly props: ActionCardBlockProps;
|
|
467
|
+
readonly children?: ReadonlyArray<string>;
|
|
468
|
+
readonly visible?: VisibilityCondition;
|
|
469
|
+
readonly repeat?: RepeatConfig;
|
|
470
|
+
readonly on?: ElementOn;
|
|
471
|
+
readonly watch?: ElementWatch;
|
|
472
|
+
readonly validation?: ElementValidation;
|
|
473
|
+
};
|
|
474
|
+
export type ActionCardBlockProps = {
|
|
475
|
+
readonly cards?: (ReadonlyArray<ActionCardItem>) | (PropExpression);
|
|
476
|
+
readonly selectedId?: ((string) | (PropExpression)) | (null);
|
|
477
|
+
};
|
|
478
|
+
export type ActionCardItem = {
|
|
479
|
+
readonly id: string;
|
|
480
|
+
readonly title?: string;
|
|
481
|
+
readonly description?: string;
|
|
482
|
+
/**
|
|
483
|
+
* Lucide icon name for the tinted icon well. Omit for no icon.
|
|
484
|
+
*/
|
|
485
|
+
readonly icon?: string;
|
|
486
|
+
readonly disabled?: boolean;
|
|
487
|
+
/**
|
|
488
|
+
* Navigation target. Use an absolute http(s) URL or a root-relative /path.
|
|
489
|
+
*/
|
|
490
|
+
readonly href?: string;
|
|
491
|
+
};
|
|
492
|
+
/**
|
|
493
|
+
* Customer-facing name: Chart
|
|
494
|
+
* Customer-facing description: A bar, line, or donut chart in a card. Use it to compare values or show a trend.
|
|
495
|
+
* Internal authoring guidance: Plot-only report chart in a card with optional title, metric, and caption, branded primary default palette, and no download. Use live grouped count fetch (aspectId + stable groupByFieldId) for useful bar, line, or donut category charts; bar and line share the same grouped dataset. Grouped count supports uncalculated single-value picklist/text fields plus filterJson/filterPreset and named quickFilterValue, ANDed with the block filter. Bind filterJson and use the same filterPreset as ListControls when the chart shares the view filter; omit that binding and give the chart its own filterPreset/filterJson when it should measure a different slice. Use date series (aspectId + stable dateFieldId, saved bucket day/week/month, and YYYY-MM-DD/YYYY-MM-DD range) for a bar or line trend. The range is sent as a BETWEEN on that date field; plot the returned points in order, including zeros the API already filled. A blank range draws the empty plot. There is no runtime bucket switch. Use scalar fetch (aggregation + aspectId, optional fieldId/filterJson/filterPreset/quickFilterValue) only for one observation; prefer MetricsRowBlock for a single KPI and never present one scalar line point as a trend. Nonempty filterJson wins; a preset is only a seed. Never mix fetch and embedded data. Use embedded data for preview or when the agent already owns the complete dataset. Grouped numeric sum/avg/min/max is not supported by this count-shaped API. Pair charts with DataTableBlock/ListCollectionBlock and MetricsRowBlock to build dashboards.
|
|
496
|
+
*/
|
|
497
|
+
export type ChartBlockElement = {
|
|
498
|
+
readonly type: "ChartBlock";
|
|
499
|
+
readonly props: ChartBlockProps;
|
|
500
|
+
readonly children?: ReadonlyArray<string>;
|
|
501
|
+
readonly visible?: VisibilityCondition;
|
|
502
|
+
readonly repeat?: RepeatConfig;
|
|
503
|
+
readonly on?: ElementOn;
|
|
504
|
+
readonly watch?: ElementWatch;
|
|
505
|
+
readonly validation?: ElementValidation;
|
|
506
|
+
};
|
|
507
|
+
export type ChartBlockProps = (ChartBlockPresentationalProps) | (ChartBlockFetchProps) | (ChartBlockGroupedFetchProps) | (ChartBlockDateSeriesProps);
|
|
508
|
+
export type ChartBlockPresentationalProps = {
|
|
509
|
+
readonly variant: ("bar" | "line" | "donut") | (PropExpression);
|
|
510
|
+
readonly height?: ("sm" | "md" | "lg") | (PropExpression);
|
|
511
|
+
readonly colorStyle?: ("gradient" | "flat") | (PropExpression);
|
|
512
|
+
readonly title?: (string) | (PropExpression);
|
|
513
|
+
readonly metric?: (string) | (PropExpression);
|
|
514
|
+
readonly caption?: (string) | (PropExpression);
|
|
515
|
+
readonly data?: (ReadonlyArray<ChartBlockPoint>) | (PropExpression);
|
|
516
|
+
};
|
|
517
|
+
export type ChartBlockPoint = {
|
|
518
|
+
readonly label: string;
|
|
519
|
+
readonly value: number;
|
|
520
|
+
readonly series?: string;
|
|
521
|
+
};
|
|
522
|
+
export type ChartBlockFetchProps = {
|
|
523
|
+
readonly variant: ("bar" | "line" | "donut") | (PropExpression);
|
|
524
|
+
readonly height?: ("sm" | "md" | "lg") | (PropExpression);
|
|
525
|
+
readonly colorStyle?: ("gradient" | "flat") | (PropExpression);
|
|
526
|
+
readonly title?: (string) | (PropExpression);
|
|
527
|
+
readonly metric?: (string) | (PropExpression);
|
|
528
|
+
readonly caption?: (string) | (PropExpression);
|
|
529
|
+
readonly aggregation: ("count" | "sum" | "avg" | "min" | "max") | (PropExpression);
|
|
530
|
+
readonly aspectId: (string) | (PropExpression);
|
|
531
|
+
readonly fieldId?: (string) | (PropExpression);
|
|
532
|
+
readonly filterJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
|
|
533
|
+
readonly [key: string]: OpaqueJson;
|
|
534
|
+
}))) | (PropExpression)) | (null);
|
|
535
|
+
readonly filterPreset?: ((("createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned") | (PropExpression)) | ((ReadonlyArray<"createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned">) | (PropExpression))) | (PropExpression);
|
|
536
|
+
readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
|
|
537
|
+
};
|
|
538
|
+
export type ChartBlockGroupedFetchProps = {
|
|
539
|
+
readonly variant: ("bar" | "line" | "donut") | (PropExpression);
|
|
540
|
+
readonly height?: ("sm" | "md" | "lg") | (PropExpression);
|
|
541
|
+
readonly colorStyle?: ("gradient" | "flat") | (PropExpression);
|
|
542
|
+
readonly title?: (string) | (PropExpression);
|
|
543
|
+
readonly metric?: (string) | (PropExpression);
|
|
544
|
+
readonly caption?: (string) | (PropExpression);
|
|
545
|
+
readonly aspectId: (string) | (PropExpression);
|
|
546
|
+
readonly groupByFieldId: (string) | (PropExpression);
|
|
547
|
+
readonly filterJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
|
|
548
|
+
readonly [key: string]: OpaqueJson;
|
|
549
|
+
}))) | (PropExpression)) | (null);
|
|
550
|
+
readonly filterPreset?: ((("createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned") | (PropExpression)) | ((ReadonlyArray<"createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned">) | (PropExpression))) | (PropExpression);
|
|
551
|
+
readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
|
|
552
|
+
};
|
|
553
|
+
export type ChartBlockDateSeriesProps = {
|
|
554
|
+
readonly variant: ("bar" | "line") | (PropExpression);
|
|
555
|
+
readonly height?: ("sm" | "md" | "lg") | (PropExpression);
|
|
556
|
+
readonly colorStyle?: ("gradient" | "flat") | (PropExpression);
|
|
557
|
+
readonly title?: (string) | (PropExpression);
|
|
558
|
+
readonly metric?: (string) | (PropExpression);
|
|
559
|
+
readonly caption?: (string) | (PropExpression);
|
|
560
|
+
readonly aspectId: (string) | (PropExpression);
|
|
561
|
+
readonly dateFieldId: (string) | (PropExpression);
|
|
562
|
+
readonly bucket?: ("day" | "week" | "month") | (PropExpression);
|
|
563
|
+
readonly range?: (string) | (PropExpression);
|
|
564
|
+
readonly filterJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
|
|
565
|
+
readonly [key: string]: OpaqueJson;
|
|
566
|
+
}))) | (PropExpression)) | (null);
|
|
567
|
+
readonly filterPreset?: ((("createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned") | (PropExpression)) | ((ReadonlyArray<"createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned">) | (PropExpression))) | (PropExpression);
|
|
568
|
+
readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
|
|
569
|
+
};
|
|
570
|
+
/**
|
|
571
|
+
* Customer-facing name: Metrics
|
|
572
|
+
* Customer-facing description: A single KPI tile with a caption and prominent value.
|
|
573
|
+
* Internal authoring guidance: Single read-only KPI tile with a caption, prominent value, and optional static subtext below successful results. Use formattedValue for a complete display-ready metric, or calc for live Aspect.calculation data with optional explicit aspectId (otherwise the managed-view default), filterJson/filterPreset, quickFilterValue, number format, empty copy, and color/colorRules limited to default, primary organization theme, muted, error, success, or warning. Bind filterJson and use the same filterPreset as ListControls when the KPI should share its view filter; give the metric its own filterPreset/filterJson without that binding when it should measure a different slice. Each MetricsRowBlock renders exactly one KPI; compose several independent tiles in RowBlock. Prefer ChartBlock when the result needs a bar, line, donut, category comparison, or trend.
|
|
574
|
+
*/
|
|
575
|
+
export type MetricsRowBlockElement = {
|
|
576
|
+
readonly type: "MetricsRowBlock";
|
|
577
|
+
readonly props: MetricsRowBlockProps;
|
|
578
|
+
readonly children?: ReadonlyArray<string>;
|
|
579
|
+
readonly visible?: VisibilityCondition;
|
|
580
|
+
readonly repeat?: RepeatConfig;
|
|
581
|
+
readonly on?: ElementOn;
|
|
582
|
+
readonly watch?: ElementWatch;
|
|
583
|
+
readonly validation?: ElementValidation;
|
|
584
|
+
};
|
|
585
|
+
export type MetricsRowBlockProps = (MetricsRowPresentationalProps) | (MetricsRowSelfFetchProps);
|
|
586
|
+
export type MetricsRowPresentationalProps = {
|
|
587
|
+
readonly title?: (string) | (PropExpression);
|
|
588
|
+
readonly subtext?: (string) | (PropExpression);
|
|
589
|
+
readonly color?: ("default" | "primary" | "muted" | "error" | "success" | "warning") | (PropExpression);
|
|
590
|
+
readonly colorRules?: (ReadonlyArray<{
|
|
591
|
+
readonly when: ("negative" | "positive" | "zero") | ({
|
|
592
|
+
readonly op: "lt" | "lte" | "gt" | "gte" | "eq";
|
|
593
|
+
readonly value: number;
|
|
594
|
+
});
|
|
595
|
+
readonly color: "default" | "primary" | "muted" | "error" | "success" | "warning";
|
|
596
|
+
}>) | (PropExpression);
|
|
597
|
+
readonly format?: ({
|
|
598
|
+
readonly style?: ("decimal" | "currency" | "percent") | (PropExpression);
|
|
599
|
+
readonly minimumFractionDigits?: (number) | (PropExpression);
|
|
600
|
+
readonly maximumFractionDigits?: (number) | (PropExpression);
|
|
601
|
+
readonly currency?: (string) | (PropExpression);
|
|
602
|
+
}) | (PropExpression);
|
|
603
|
+
readonly formattedValue: (string) | (PropExpression);
|
|
604
|
+
};
|
|
605
|
+
export type MetricsRowSelfFetchProps = {
|
|
606
|
+
readonly title?: (string) | (PropExpression);
|
|
607
|
+
readonly subtext?: (string) | (PropExpression);
|
|
608
|
+
readonly color?: ("default" | "primary" | "muted" | "error" | "success" | "warning") | (PropExpression);
|
|
609
|
+
readonly colorRules?: (ReadonlyArray<{
|
|
610
|
+
readonly when: ("negative" | "positive" | "zero") | ({
|
|
611
|
+
readonly op: "lt" | "lte" | "gt" | "gte" | "eq";
|
|
612
|
+
readonly value: number;
|
|
613
|
+
});
|
|
614
|
+
readonly color: "default" | "primary" | "muted" | "error" | "success" | "warning";
|
|
615
|
+
}>) | (PropExpression);
|
|
616
|
+
readonly format?: ({
|
|
617
|
+
readonly style?: ("decimal" | "currency" | "percent") | (PropExpression);
|
|
618
|
+
readonly minimumFractionDigits?: (number) | (PropExpression);
|
|
619
|
+
readonly maximumFractionDigits?: (number) | (PropExpression);
|
|
620
|
+
readonly currency?: (string) | (PropExpression);
|
|
621
|
+
}) | (PropExpression);
|
|
622
|
+
readonly calc: (string) | (PropExpression);
|
|
623
|
+
readonly aspectId?: (string) | (PropExpression);
|
|
624
|
+
readonly filterJson?: (((JsonSafeState) & ((string) | (number) | (boolean) | (null) | (ReadonlyArray<OpaqueJson>) | ({
|
|
625
|
+
readonly [key: string]: OpaqueJson;
|
|
626
|
+
}))) | (PropExpression)) | (null);
|
|
627
|
+
readonly filterPreset?: ((("createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned") | (PropExpression)) | ((ReadonlyArray<"createdByCurrentUser" | "createdInLast24Hours" | "createdInLast7Days" | "createdInLast30Days" | "createdInLast90Days" | "createdInLastYear" | "closedInLast24Hours" | "closedInLast7Days" | "closedInLast30Days" | "closedInLast90Days" | "closedInLastYear" | "assignedToCurrentUser" | "unassigned">) | (PropExpression))) | (PropExpression);
|
|
628
|
+
readonly quickFilterValue?: ((string) | (PropExpression)) | (null);
|
|
629
|
+
readonly emptyMessage?: (string) | (PropExpression);
|
|
630
|
+
};
|
|
631
|
+
/**
|
|
632
|
+
* Customer-facing name: Page header
|
|
633
|
+
* Customer-facing description: A compact heading with a short description and actions at the top of a page.
|
|
634
|
+
* Internal authoring guidance: Compact page-level heading with supporting description, icon badge, and primary or outline actions. Best used once at the top of a page or managed view as a child of a StackBlock. Give an action an href to navigate (absolute https:// opens a new tab, "/path" navigates inside Elementum); omit href to make it a press action that writes selectedActionId and emits actionPress. Handle actionPress with any host action the view supports, such as createRecord or triggerAutomation. Use DataTableBlock or ListCollectionBlock for collection content and HeaderBlock or BodyBlock for headings inside a detail section.
|
|
635
|
+
*/
|
|
636
|
+
export type PageHeaderBlockElement = {
|
|
637
|
+
readonly type: "PageHeaderBlock";
|
|
638
|
+
readonly props: PageHeaderBlockProps;
|
|
639
|
+
readonly children?: ReadonlyArray<string>;
|
|
640
|
+
readonly visible?: VisibilityCondition;
|
|
641
|
+
readonly repeat?: RepeatConfig;
|
|
642
|
+
readonly on?: ElementOn;
|
|
643
|
+
readonly watch?: ElementWatch;
|
|
644
|
+
readonly validation?: ElementValidation;
|
|
645
|
+
};
|
|
646
|
+
export type PageHeaderBlockProps = {
|
|
647
|
+
readonly title?: ((string) | (PropExpression)) | (null);
|
|
648
|
+
readonly description?: ((string) | (PropExpression)) | (null);
|
|
649
|
+
readonly icon?: ((string) | (PropExpression)) | (null);
|
|
650
|
+
readonly actions?: ((ReadonlyArray<PageHeaderAction>) | (PropExpression)) | (null);
|
|
651
|
+
readonly selectedActionId?: ((string) | (PropExpression)) | (null);
|
|
652
|
+
};
|
|
653
|
+
export type PageHeaderAction = {
|
|
654
|
+
readonly id: string;
|
|
655
|
+
readonly label: string;
|
|
656
|
+
readonly variant?: "primary" | "outline";
|
|
657
|
+
readonly disabled?: boolean;
|
|
658
|
+
/**
|
|
659
|
+
* Navigation target. Use an absolute http(s) URL or a root-relative /path. Same rules as ActionCardBlock card href.
|
|
660
|
+
*/
|
|
661
|
+
readonly href?: string;
|
|
662
|
+
};
|
|
663
|
+
/**
|
|
664
|
+
* Customer-facing name: Buttons
|
|
665
|
+
* Customer-facing description: A row of buttons that link to pages or run actions.
|
|
666
|
+
* Internal authoring guidance: A responsive row of buttons. Each item is a link (href, optional viewId), an action (onPress), or a static button (neither); never set both href and onPress. Omitted emphasis defaults to primary for onPress buttons and secondary for links. Set it explicitly for tertiary alternates or destructive actions. A createRecord onPress opens the host create-record dialog for that App. A triggerAutomation onPress runs one on-demand automation from a literal automationId. Host actions such as createRecord and triggerAutomation also work on PageHeaderBlock via actionPress. The row stacks in narrow panes. Use PageHeaderBlock actions for page-level heading buttons.
|
|
667
|
+
*/
|
|
668
|
+
export type ButtonBlockElement = {
|
|
669
|
+
readonly type: "ButtonBlock";
|
|
670
|
+
readonly props: ButtonBlockProps;
|
|
671
|
+
readonly children?: ReadonlyArray<string>;
|
|
672
|
+
readonly visible?: VisibilityCondition;
|
|
673
|
+
readonly repeat?: RepeatConfig;
|
|
674
|
+
readonly on?: ElementOn;
|
|
675
|
+
readonly watch?: ElementWatch;
|
|
676
|
+
readonly validation?: ElementValidation;
|
|
677
|
+
};
|
|
678
|
+
export type ButtonBlockProps = {
|
|
679
|
+
readonly buttons: (ReadonlyArray<ButtonBlockItem>) | (PropExpression);
|
|
680
|
+
};
|
|
681
|
+
export type ButtonBlockItem = (ButtonBlockLinkItem) | (ButtonBlockActionItem) | (ButtonBlockStaticItem);
|
|
682
|
+
export type ButtonBlockLinkItem = {
|
|
683
|
+
/**
|
|
684
|
+
* Visible text. Icon-only buttons use it as the accessible name.
|
|
685
|
+
*/
|
|
686
|
+
readonly label: string;
|
|
687
|
+
/**
|
|
688
|
+
* Visual weight and row order. Defaults to primary for an onPress item, otherwise secondary.
|
|
689
|
+
*/
|
|
690
|
+
readonly emphasis?: "primary" | "secondary" | "tertiary" | "destructive";
|
|
691
|
+
/**
|
|
692
|
+
* icon renders only the icon; label becomes aria-label.
|
|
693
|
+
*/
|
|
694
|
+
readonly size?: "default" | "icon";
|
|
695
|
+
/**
|
|
696
|
+
* Lucide icon name, e.g. trash-2.
|
|
697
|
+
*/
|
|
698
|
+
readonly icon?: string;
|
|
699
|
+
readonly disabled?: boolean;
|
|
700
|
+
/**
|
|
701
|
+
* Navigation target. Absolute http(s) URL or root-relative /path. For managed views and portal pages, use the href a tool returned verbatim; never build route segments.
|
|
702
|
+
*/
|
|
703
|
+
readonly href: string;
|
|
704
|
+
/**
|
|
705
|
+
* Managed view id this href targets (from the same tool result as href); saved as an AspectView dependency.
|
|
706
|
+
*/
|
|
707
|
+
readonly viewId?: string;
|
|
708
|
+
};
|
|
709
|
+
export type ButtonBlockActionItem = {
|
|
710
|
+
/**
|
|
711
|
+
* Visible text. Icon-only buttons use it as the accessible name.
|
|
712
|
+
*/
|
|
713
|
+
readonly label: string;
|
|
714
|
+
/**
|
|
715
|
+
* Visual weight and row order. Defaults to primary for an onPress item, otherwise secondary.
|
|
716
|
+
*/
|
|
717
|
+
readonly emphasis?: "primary" | "secondary" | "tertiary" | "destructive";
|
|
718
|
+
/**
|
|
719
|
+
* icon renders only the icon; label becomes aria-label.
|
|
720
|
+
*/
|
|
721
|
+
readonly size?: "default" | "icon";
|
|
722
|
+
/**
|
|
723
|
+
* Lucide icon name, e.g. trash-2.
|
|
724
|
+
*/
|
|
725
|
+
readonly icon?: string;
|
|
726
|
+
readonly disabled?: boolean;
|
|
727
|
+
/**
|
|
728
|
+
* Non-navigation action, such as createRecord with an aspectId parameter or triggerAutomation with an automationId. Do not set href on the same item.
|
|
729
|
+
*/
|
|
730
|
+
readonly onPress: {
|
|
731
|
+
readonly action: string;
|
|
732
|
+
readonly params?: {
|
|
733
|
+
readonly [key: string]: (string) | (number) | (boolean) | (null) | ({
|
|
734
|
+
readonly $state: string;
|
|
735
|
+
} & {
|
|
736
|
+
readonly [key: string]: unknown;
|
|
737
|
+
});
|
|
738
|
+
};
|
|
739
|
+
readonly confirm?: {
|
|
740
|
+
readonly title: string;
|
|
741
|
+
readonly message: string;
|
|
742
|
+
readonly confirmLabel?: string;
|
|
743
|
+
readonly cancelLabel?: string;
|
|
744
|
+
readonly variant?: "default" | "danger";
|
|
745
|
+
} & {
|
|
746
|
+
readonly [key: string]: unknown;
|
|
747
|
+
};
|
|
748
|
+
readonly onSuccess?: ({
|
|
749
|
+
readonly navigate: string;
|
|
750
|
+
} & {
|
|
751
|
+
readonly [key: string]: unknown;
|
|
752
|
+
}) | ({
|
|
753
|
+
readonly set: {
|
|
754
|
+
readonly [key: string]: unknown;
|
|
755
|
+
};
|
|
756
|
+
} & {
|
|
757
|
+
readonly [key: string]: unknown;
|
|
758
|
+
}) | ({
|
|
759
|
+
readonly action: string;
|
|
760
|
+
readonly params?: {
|
|
761
|
+
readonly [key: string]: (string) | (number) | (boolean) | (null) | ({
|
|
762
|
+
readonly $state: string;
|
|
763
|
+
} & {
|
|
764
|
+
readonly [key: string]: unknown;
|
|
765
|
+
});
|
|
766
|
+
};
|
|
767
|
+
} & {
|
|
768
|
+
readonly [key: string]: unknown;
|
|
769
|
+
});
|
|
770
|
+
readonly onError?: ({
|
|
771
|
+
readonly set: {
|
|
772
|
+
readonly [key: string]: unknown;
|
|
773
|
+
};
|
|
774
|
+
} & {
|
|
775
|
+
readonly [key: string]: unknown;
|
|
776
|
+
}) | ({
|
|
777
|
+
readonly action: string;
|
|
778
|
+
readonly params?: {
|
|
779
|
+
readonly [key: string]: (string) | (number) | (boolean) | (null) | ({
|
|
780
|
+
readonly $state: string;
|
|
781
|
+
} & {
|
|
782
|
+
readonly [key: string]: unknown;
|
|
783
|
+
});
|
|
784
|
+
};
|
|
785
|
+
} & {
|
|
786
|
+
readonly [key: string]: unknown;
|
|
787
|
+
});
|
|
788
|
+
readonly preventDefault?: boolean;
|
|
789
|
+
} & {
|
|
790
|
+
readonly [key: string]: unknown;
|
|
791
|
+
};
|
|
792
|
+
};
|
|
793
|
+
export type ButtonBlockStaticItem = {
|
|
794
|
+
/**
|
|
795
|
+
* Visible text. Icon-only buttons use it as the accessible name.
|
|
796
|
+
*/
|
|
797
|
+
readonly label: string;
|
|
798
|
+
/**
|
|
799
|
+
* Visual weight and row order. Defaults to primary for an onPress item, otherwise secondary.
|
|
800
|
+
*/
|
|
801
|
+
readonly emphasis?: "primary" | "secondary" | "tertiary" | "destructive";
|
|
802
|
+
/**
|
|
803
|
+
* icon renders only the icon; label becomes aria-label.
|
|
804
|
+
*/
|
|
805
|
+
readonly size?: "default" | "icon";
|
|
806
|
+
/**
|
|
807
|
+
* Lucide icon name, e.g. trash-2.
|
|
808
|
+
*/
|
|
809
|
+
readonly icon?: string;
|
|
810
|
+
readonly disabled?: boolean;
|
|
811
|
+
/**
|
|
812
|
+
* Managed view id this href targets (from the same tool result as href); saved as an AspectView dependency.
|
|
813
|
+
*/
|
|
814
|
+
readonly viewId?: string;
|
|
815
|
+
};
|