@cosmicdrift/kumiko-types 0.415.0 → 0.416.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/dist/config.d.ts +2 -0
- package/dist/fields.d.ts +8 -2
- package/dist/screen-action-form.d.ts +29 -5
- package/dist/screen-dashboard.d.ts +11 -1
- package/dist/screen-entity-edit.d.ts +90 -2
- package/dist/screen-entity-list.d.ts +13 -3
- package/dist/screen-projection.d.ts +13 -0
- package/dist/screen-record-guidance.d.ts +8 -0
- package/dist/screen.d.ts +16 -3
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -83,6 +83,8 @@ export type ConfigMask = {
|
|
|
83
83
|
readonly description?: string;
|
|
84
84
|
readonly icon?: NavIconKey;
|
|
85
85
|
readonly order?: number;
|
|
86
|
+
/** Shows the value on the generated settings screen without an input; a read-only key cannot also be `required`. */
|
|
87
|
+
readonly readOnly?: boolean;
|
|
86
88
|
};
|
|
87
89
|
export type ConfigDefinition = {
|
|
88
90
|
readonly keys: Readonly<Record<string, ConfigKeyDefinition>>;
|
package/dist/fields.d.ts
CHANGED
|
@@ -227,8 +227,8 @@ export type MultiSelectFieldDef<TOptions extends readonly string[] = readonly st
|
|
|
227
227
|
readonly access?: FieldAccess;
|
|
228
228
|
/** Renderer metadata: `"checkboxes"` renders every option as a visible
|
|
229
229
|
* checkbox with a select-all toggle. Default (omitted) stays the combobox
|
|
230
|
-
* dropdown. */
|
|
231
|
-
readonly display?: "checkboxes" | "dropdown";
|
|
230
|
+
* dropdown; `"chips"` renders toggle chips with a check mark on the chosen ones. */
|
|
231
|
+
readonly display?: "checkboxes" | "chips" | "dropdown";
|
|
232
232
|
/** Renderer metadata: column count for the `"checkboxes"` grid at the widest
|
|
233
233
|
* breakpoint; narrow viewports always collapse to one column. Omitted =
|
|
234
234
|
* the renderer picks a sensible count. Ignored unless
|
|
@@ -830,4 +830,10 @@ export type EntityDefinition<F extends FieldsMap = FieldsMap, T extends EntityTe
|
|
|
830
830
|
/** Attached files are readable only through the record's detail query: the files feature's
|
|
831
831
|
* privilegedRoles do not bypass it, the uploader check stays. */
|
|
832
832
|
readonly attachedFileAccess?: "record-only";
|
|
833
|
+
/** Files of this entity may be read from another tenant when `query`, run with `{ id: <entityId> }`
|
|
834
|
+
* as the requesting user, returns the record with that id. Read only: delete stays with the owning tenant. */
|
|
835
|
+
readonly crossTenantFileRead?: {
|
|
836
|
+
readonly query: string;
|
|
837
|
+
readonly reason: string;
|
|
838
|
+
};
|
|
833
839
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { FormFieldDefinition } from "./fields.ts";
|
|
1
|
+
import type { FormFieldDefinition, SelectOptionTone } from "./fields.ts";
|
|
2
2
|
import type { AccessRule, AgentScreenHints } from "./handlers.ts";
|
|
3
3
|
import type { IconKey } from "./nav-icon.ts";
|
|
4
4
|
import type { ScreenNavSugar, ScreenSlots } from "./screen.ts";
|
|
5
5
|
import type { ScreenVisibility } from "./screen-dashboard.ts";
|
|
6
|
-
import type { EditLayout } from "./screen-entity-edit.ts";
|
|
6
|
+
import type { EditLayout, FieldTextRef } from "./screen-entity-edit.ts";
|
|
7
7
|
import type { ScreenFallback } from "./screen-fallback.ts";
|
|
8
8
|
/** A form field computed from other fields of the same form. `listSum` adds one
|
|
9
9
|
* numeric cell over all rows of an embedded list field; its `whenEmpty`
|
|
@@ -70,7 +70,7 @@ export type ActionFormScreenDefinition = {
|
|
|
70
70
|
readonly layout: EditLayout;
|
|
71
71
|
/** Per-field label i18n key override, same type/semantics as
|
|
72
72
|
* `EntityEditScreenDefinition.fieldLabels`. Falls back to the convention when absent. */
|
|
73
|
-
readonly fieldLabels?: Readonly<Record<string,
|
|
73
|
+
readonly fieldLabels?: Readonly<Record<string, FieldTextRef>>;
|
|
74
74
|
/** i18n key for the submit button. Default: the renderer's i18n default
|
|
75
75
|
* (typically "actions.submit"). */
|
|
76
76
|
readonly submitLabel?: string;
|
|
@@ -87,7 +87,22 @@ export type ActionFormScreenDefinition = {
|
|
|
87
87
|
readonly title: string;
|
|
88
88
|
readonly subtitle?: string;
|
|
89
89
|
readonly params?: Readonly<Record<string, string>>;
|
|
90
|
+
/** Fields of the `load` result that fill `{name}` placeholders too (static `params` win). Needs `load`. */
|
|
91
|
+
readonly paramsFromLoad?: readonly string[];
|
|
90
92
|
};
|
|
93
|
+
/** Help text under a field (field name -> i18n key). */
|
|
94
|
+
readonly fieldDescriptions?: Readonly<Record<string, FieldTextRef>>;
|
|
95
|
+
/** i18n key of a short note in a banner above the fields, with a sparkles icon (e.g. "the AI
|
|
96
|
+
* prepared everything, read the text, then send"). */
|
|
97
|
+
readonly infoBand?: string;
|
|
98
|
+
/** Badge next to a field's label (field name -> `{ label: i18n key, tone }`), e.g. "price
|
|
99
|
+
* source open" in `warn`. */
|
|
100
|
+
readonly fieldBadges?: Readonly<Record<string, {
|
|
101
|
+
readonly label: string;
|
|
102
|
+
readonly tone: SelectOptionTone;
|
|
103
|
+
}>>;
|
|
104
|
+
/** Shows a failed submit's error banner above the fields instead of below them. */
|
|
105
|
+
readonly formErrorOnTop?: boolean;
|
|
91
106
|
/** Visual style of the submit button. "danger" renders it red — for a form
|
|
92
107
|
* whose handler is destructive (terminate, revoke, delete), so the warning
|
|
93
108
|
* isn't lost on the way from the calling screen to this one. Default "primary". */
|
|
@@ -181,11 +196,16 @@ export type ActionFormRedirect = {
|
|
|
181
196
|
* Only used when the target screen type carries an id (`entityEdit`,
|
|
182
197
|
* `projectionDetail`); a non-string or missing value navigates without
|
|
183
198
|
* an id, same as a payload without `id` does today. */
|
|
184
|
-
readonly idFrom
|
|
199
|
+
readonly idFrom?: string;
|
|
185
200
|
/** Section id to open on the target `projectionDetail` with `layout.mode:
|
|
186
201
|
* "tabs"` (the `tab` search param, same as `ToolbarAction` navigate `tab`).
|
|
187
202
|
* Boot rejects other targets and unknown section ids. */
|
|
188
203
|
readonly tab?: string;
|
|
204
|
+
/** URL search params of the target, each read from a flat success-payload
|
|
205
|
+
* field (`{ cmd: "threadId" }` opens `?cmd=<threadId>`). Lets a redirect
|
|
206
|
+
* reach a custom screen that is driven by search params instead of a
|
|
207
|
+
* record id; a missing or non-string field leaves its param out. */
|
|
208
|
+
readonly searchParams?: Readonly<Record<string, string>>;
|
|
189
209
|
};
|
|
190
210
|
export type ActionFormLoad = {
|
|
191
211
|
/** Query QN that returns the record. */
|
|
@@ -197,6 +217,10 @@ export type ActionFormLoad = {
|
|
|
197
217
|
* (same semantics as `ProjectionDetailScreenDefinition.singleton`). Boot
|
|
198
218
|
* rejects declaring `idParam` alongside it. */
|
|
199
219
|
readonly singleton?: boolean;
|
|
220
|
+
/** Sends the values a drawer opens the form with (row-action params, e.g. `vehicleId`) in the
|
|
221
|
+
* load payload next to `idParam`, so the query can pre-fill for the chosen item. The query's
|
|
222
|
+
* schema must accept them. */
|
|
223
|
+
readonly passPrefill?: boolean;
|
|
200
224
|
};
|
|
201
225
|
/** One key figure of the success box, read from the handler's success payload. */
|
|
202
226
|
export type ActionFormSuccessFact = {
|
|
@@ -217,7 +241,7 @@ export type ActionFormSuccessItems = {
|
|
|
217
241
|
readonly link?: ActionFormSuccessLink;
|
|
218
242
|
};
|
|
219
243
|
/** A redirect target rendered as a link in the success box. */
|
|
220
|
-
export type ActionFormSuccessLink = Omit<ActionFormRedirect, "idFrom"> & {
|
|
244
|
+
export type ActionFormSuccessLink = Omit<ActionFormRedirect, "idFrom" | "searchParams"> & {
|
|
221
245
|
/** Success-payload field carrying the navigation id. Required for a record
|
|
222
246
|
* target (`entityEdit`, `projectionDetail`); omit it for a list, dashboard
|
|
223
247
|
* or form target, which opens without an id. */
|
|
@@ -59,11 +59,17 @@ export type DashboardPanelGate = {
|
|
|
59
59
|
};
|
|
60
60
|
/** Phone layout switch shared by every panel kind. */
|
|
61
61
|
export type DashboardPanelNarrow = {
|
|
62
|
-
/** Leaves the panel out below the `sm` breakpoint (phone).
|
|
62
|
+
/** Leaves the panel out below the `sm` breakpoint (phone). On a stat-group child it drops that stat from the group on a phone; not every child may hide. */
|
|
63
63
|
readonly hideOnNarrow?: true;
|
|
64
64
|
/** Position below `sm`, like CSS `order`: panels are laid out by ascending value, a panel without one counts as 0, equal values keep the declared order. Integer ≥ 0. Desktop keeps the declared order. */
|
|
65
65
|
readonly narrowOrder?: number;
|
|
66
|
+
/** "side" puts the panel in the narrow right column of a `layout: "main-side"` dashboard, "top" in a full-width block above both columns; panels without it fill the main column. Not valid on a stat-group child or without that layout. */
|
|
67
|
+
readonly column?: DashboardPanelColumn;
|
|
66
68
|
};
|
|
69
|
+
/** "top" spans both columns above the main and side column, in declared order. */
|
|
70
|
+
export type DashboardPanelColumn = "side" | "top";
|
|
71
|
+
/** "main-side": from `lg` up the main column (2/3) stacks every panel without `column`, the side column (1/3) every `column: "side"` panel, each with its own heights; `column: "top"` panels span both columns above them; below `lg` they stack, below `sm` by `narrowOrder`. Default: one 12-column grid. Panel `span` is ignored in this layout. */
|
|
72
|
+
export type DashboardLayout = "main-side";
|
|
67
73
|
export type DashboardPanelSpan = "half" | "full" | "third" | "two-thirds";
|
|
68
74
|
export type DashboardPanelEmptyState = {
|
|
69
75
|
readonly span?: DashboardPanelSpan;
|
|
@@ -356,6 +362,8 @@ export type DashboardTextPanel = DashboardPanelGate & DashboardPanelQueryOptions
|
|
|
356
362
|
readonly id: string;
|
|
357
363
|
/** Panel title (i18n key). */
|
|
358
364
|
readonly label?: string;
|
|
365
|
+
/** Icon shown before the text blocks (resolved like `DashboardStatGroupPanel.icon`). */
|
|
366
|
+
readonly icon?: PlatformComponent;
|
|
359
367
|
readonly span?: DashboardPanelSpan;
|
|
360
368
|
/** Query answering `{ blocks: DashboardTextBlock[] }`; its blocks replace the static ones.
|
|
361
369
|
* Static blocks show while it loads, on error and when it answers empty. It may add
|
|
@@ -459,6 +467,8 @@ export type DashboardScreenDefinition = {
|
|
|
459
467
|
/** Same-feature short id or cross-feature QN `<feature>:screen:<id>` shown when `visibleWhen` is unmet (default: standard notice). */
|
|
460
468
|
readonly fallback?: ScreenFallback;
|
|
461
469
|
readonly panels: readonly DashboardPanelDefinition[];
|
|
470
|
+
/** Panel arrangement, see DashboardLayout. */
|
|
471
|
+
readonly layout?: DashboardLayout;
|
|
462
472
|
/** Binds the dashboard to one record via a URL search param, see DashboardRecordBinding. */
|
|
463
473
|
readonly record?: DashboardRecordBinding;
|
|
464
474
|
/** Header actions on the bound record (writeHandler, navigate, clientAction).
|
|
@@ -44,6 +44,13 @@ export type EditFieldSpec = string | {
|
|
|
44
44
|
* the value can only come from the suggestion. Only for single-line
|
|
45
45
|
* text and number inputs; other kinds ignore it. */
|
|
46
46
|
readonly fillAction?: FieldFillAction;
|
|
47
|
+
/** Helper under a `text` or `longText` input: stackable chips and an optional free
|
|
48
|
+
* instruction call a query and write its `resultField` into the field. */
|
|
49
|
+
readonly aiAssist?: FieldAiAssist;
|
|
50
|
+
/** Quick-pick chips under a `number`, `decimal`, `bigInt` or `money` input; a chip sets
|
|
51
|
+
* the field to its value. The values come from another field of the same form that
|
|
52
|
+
* holds an array of numbers (e.g. hidden and `submit: false`, seeded by prefill). */
|
|
53
|
+
readonly valueChips?: FieldValueChips;
|
|
47
54
|
/** Marks this field as a reference lookup instead of a plain value —
|
|
48
55
|
* for projectionDetail fields, which have no `EntityDefinition` to
|
|
49
56
|
* carry a real `reference` field type. Same target convention as
|
|
@@ -69,6 +76,41 @@ export type EditFieldSpec = string | {
|
|
|
69
76
|
export type FieldAffix = string | {
|
|
70
77
|
readonly field: string;
|
|
71
78
|
};
|
|
79
|
+
/** A label or help text: an i18n key, or a key whose `{placeholder}`s are filled from form values.
|
|
80
|
+
* `params` maps each placeholder to the name of a form field (hidden fields count). */
|
|
81
|
+
export type FieldTextRef = string | {
|
|
82
|
+
readonly key: string;
|
|
83
|
+
readonly params: Readonly<Record<string, string>>;
|
|
84
|
+
};
|
|
85
|
+
/** One toggle chip: while active, its `params` are merged into the query payload. */
|
|
86
|
+
export type FieldAiAssistChip = {
|
|
87
|
+
/** i18n key of the chip label. */
|
|
88
|
+
readonly label: string;
|
|
89
|
+
readonly params: Readonly<Record<string, string | number | boolean>>;
|
|
90
|
+
};
|
|
91
|
+
export type FieldAiAssist = {
|
|
92
|
+
/** Qualified query name, run with the form's context payload (the `load` id of an actionForm,
|
|
93
|
+
* else the drawer row's prefill values) plus the `params` of the active chips. */
|
|
94
|
+
readonly query: string;
|
|
95
|
+
/** Key in the query result written into the field; the value must be a string. */
|
|
96
|
+
readonly resultField: string;
|
|
97
|
+
/** Key in the query result with a short note for the user (e.g. "could not rewrite, draft unchanged"). Shown as a quiet line under the field until the next result without one. */
|
|
98
|
+
readonly noteField?: string;
|
|
99
|
+
/** Other fields of the same form whose current values are sent in the payload (under their
|
|
100
|
+
* field names). Changing one of them runs the query again and replaces the text. */
|
|
101
|
+
readonly contextFields?: readonly string[];
|
|
102
|
+
readonly chips?: readonly FieldAiAssistChip[];
|
|
103
|
+
/** Adds an input where the user types a free instruction; it is sent under `param`. */
|
|
104
|
+
readonly prompt?: {
|
|
105
|
+
readonly param: string;
|
|
106
|
+
/** i18n key of the input's placeholder. */
|
|
107
|
+
readonly placeholder?: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
export type FieldValueChips = {
|
|
111
|
+
/** Name of a field of the same form whose value is an array of numbers. For `money`, major units. */
|
|
112
|
+
readonly from: string;
|
|
113
|
+
};
|
|
72
114
|
export type FieldFillAction = {
|
|
73
115
|
/** i18n key (falls back to the literal) of the button label. */
|
|
74
116
|
readonly label: string;
|
|
@@ -96,11 +138,15 @@ export type EditFieldPrefill = {
|
|
|
96
138
|
readonly kind: "currentUser";
|
|
97
139
|
readonly property: "displayName" | "email" | "id";
|
|
98
140
|
};
|
|
99
|
-
export type EditSectionSpec = EditFieldsSection | EditExtensionSection | EditRelatedListSection | EditWriteFormSection;
|
|
141
|
+
export type EditSectionSpec = EditFieldsSection | EditExtensionSection | EditRelatedListSection | EditWriteFormSection | EditStepListSection;
|
|
100
142
|
type EditFieldsSectionBase = {
|
|
101
143
|
/** Kebab-case tab id, used as the `?tab=` value. Required by the
|
|
102
144
|
* boot-validator when the enclosing `EditLayout.mode` is "tabs". */
|
|
103
145
|
readonly id?: string;
|
|
146
|
+
/** projectionDetail only: shows the section (and its tab) only while the loaded record matches,
|
|
147
|
+
* same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`. `field` must be an
|
|
148
|
+
* output field of the detail query. */
|
|
149
|
+
readonly visibleWhen?: Exclude<FieldCondition, boolean>;
|
|
104
150
|
readonly kind?: "fields";
|
|
105
151
|
/** Optional. Without a title the section only renders its fields (no h3
|
|
106
152
|
* heading) — for flat forms (card title + fields directly, a single
|
|
@@ -152,10 +198,34 @@ export type EditFieldsSection = EditFieldsSectionBase & ({
|
|
|
152
198
|
* here still need to exist. */
|
|
153
199
|
readonly groups: readonly EditFieldGroup[];
|
|
154
200
|
});
|
|
201
|
+
/** One step of an `EditStepListSection`; `status` renders as a pill in `statusTone`. */
|
|
202
|
+
export type StepListItem = {
|
|
203
|
+
readonly title: string;
|
|
204
|
+
readonly status?: string;
|
|
205
|
+
readonly statusTone?: SelectOptionTone;
|
|
206
|
+
readonly description?: string;
|
|
207
|
+
};
|
|
208
|
+
/** Vertical numbered step list (circles joined by a line), fed from one field of the detail
|
|
209
|
+
* query. Only supported on projectionDetail. Several sections sharing one `id` stack inside one
|
|
210
|
+
* tab, e.g. fields, relatedList and stepList under "Overview". */
|
|
211
|
+
export type EditStepListSection = {
|
|
212
|
+
readonly id?: string;
|
|
213
|
+
readonly visibleWhen?: Exclude<FieldCondition, boolean>;
|
|
214
|
+
readonly kind: "stepList";
|
|
215
|
+
readonly title?: string;
|
|
216
|
+
/** Output field of the detail query holding a `StepListItem[]`. */
|
|
217
|
+
readonly field: string;
|
|
218
|
+
/** Present only so section-actions readers accept the union; a step list has no title-row actions. */
|
|
219
|
+
readonly actions?: undefined;
|
|
220
|
+
};
|
|
155
221
|
export type EditExtensionSection = {
|
|
156
222
|
/** Kebab-case tab id, used as the `?tab=` value. Required by the
|
|
157
223
|
* boot-validator when the enclosing `EditLayout.mode` is "tabs". */
|
|
158
224
|
readonly id?: string;
|
|
225
|
+
/** projectionDetail only: shows the section (and its tab) only while the loaded record matches,
|
|
226
|
+
* same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`. `field` must be an
|
|
227
|
+
* output field of the detail query. */
|
|
228
|
+
readonly visibleWhen?: Exclude<FieldCondition, boolean>;
|
|
159
229
|
readonly kind: "extension";
|
|
160
230
|
readonly title: string;
|
|
161
231
|
/** Wizard layouts only: intro text above the step, same slot as `EditFieldsSection.description`. */
|
|
@@ -212,6 +282,10 @@ export type EditRelatedListSection = {
|
|
|
212
282
|
/** Kebab-case tab id, used as the `?tab=` value. Required by the
|
|
213
283
|
* boot-validator when the enclosing `EditLayout.mode` is "tabs". */
|
|
214
284
|
readonly id?: string;
|
|
285
|
+
/** projectionDetail only: shows the section (and its tab) only while the loaded record matches,
|
|
286
|
+
* same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`. `field` must be an
|
|
287
|
+
* output field of the detail query. */
|
|
288
|
+
readonly visibleWhen?: Exclude<FieldCondition, boolean>;
|
|
215
289
|
readonly kind: "relatedList";
|
|
216
290
|
readonly title: string;
|
|
217
291
|
/** Rows are aggregates or other values with no record of their own, so they lead nowhere on
|
|
@@ -322,6 +396,14 @@ export type EditRelatedListSection = {
|
|
|
322
396
|
* ("kumiko.list.no-entries") applies. `action`'s icon must resolve, same
|
|
323
397
|
* as `actions` above. */
|
|
324
398
|
readonly emptyState?: RelatedListEmptyStateSpec;
|
|
399
|
+
/** Draws the rows as a tile grid of images instead of a table. Each tile shows the file in
|
|
400
|
+
* `imageField` and the row's `rowActions` underneath; `columns` only name the row fields. */
|
|
401
|
+
readonly photoGrid?: {
|
|
402
|
+
/** Row field holding a FileRef id (or an id array, the first shows). */
|
|
403
|
+
readonly imageField: string;
|
|
404
|
+
/** Row field printed under the image. */
|
|
405
|
+
readonly captionField?: string;
|
|
406
|
+
};
|
|
325
407
|
};
|
|
326
408
|
/** Empty-state text for one parent-record state, e.g. "still running" vs. "finished without rows". */
|
|
327
409
|
export type RelatedListEmptyStateVariant = {
|
|
@@ -338,6 +420,10 @@ export type EditWriteFormSection = {
|
|
|
338
420
|
/** Kebab-case tab id, used as the `?tab=` value. Required by the
|
|
339
421
|
* boot-validator when the enclosing `EditLayout.mode` is "tabs". */
|
|
340
422
|
readonly id?: string;
|
|
423
|
+
/** projectionDetail only: shows the section (and its tab) only while the loaded record matches,
|
|
424
|
+
* same `{ field, eq | ne | in | notIn }` syntax as a field's `visibleWhen`. `field` must be an
|
|
425
|
+
* output field of the detail query. */
|
|
426
|
+
readonly visibleWhen?: Exclude<FieldCondition, boolean>;
|
|
341
427
|
readonly kind: "writeForm";
|
|
342
428
|
readonly title?: string;
|
|
343
429
|
readonly description?: string;
|
|
@@ -388,6 +474,8 @@ export type EditLayout = {
|
|
|
388
474
|
readonly variant?: "form" | "settings-list";
|
|
389
475
|
/** Hides the asterisk after required field labels. Default false (shown). */
|
|
390
476
|
readonly hideRequiredMarker?: boolean;
|
|
477
|
+
/** `false` switches off the "all fields are required" hint when every field is required; each label then carries its own asterisk. */
|
|
478
|
+
readonly allRequiredHint?: false;
|
|
391
479
|
/** Persists in-progress wizard state as a resumable draft instead of
|
|
392
480
|
* discarding it on navigation away. */
|
|
393
481
|
readonly draft?: boolean;
|
|
@@ -509,7 +597,7 @@ export type EntityEditScreenDefinition = {
|
|
|
509
597
|
* natural field namespace — the settings hub injects the config key's
|
|
510
598
|
* `mask.title` label here. A missing entry falls back to the
|
|
511
599
|
* convention. */
|
|
512
|
-
readonly fieldLabels?: Readonly<Record<string,
|
|
600
|
+
readonly fieldLabels?: Readonly<Record<string, FieldTextRef>>;
|
|
513
601
|
/** Record actions. Reuses `RowAction` — analogous to
|
|
514
602
|
* `ProjectionDetailScreenDefinition.actions` (the loaded record stands
|
|
515
603
|
* in for the "row"). `rowClick` has no target here and is rejected by
|
|
@@ -81,10 +81,17 @@ export type ListColumnSpec = string | {
|
|
|
81
81
|
* entityList or projectionList table is a rowAction with display "button" (boot-rejected
|
|
82
82
|
* on columns there). Other list renderers ignore `display`. */
|
|
83
83
|
readonly display?: ListColumnDisplay;
|
|
84
|
+
/** `"primary"` draws a `display: "button"` link as a filled primary button instead of the outline default (dashboard list panels only). Needs `display: "button"`. */
|
|
85
|
+
readonly variant?: "primary";
|
|
84
86
|
/** Row field naming the badge tone; only with `display: "badge"`. */
|
|
85
87
|
readonly badgeToneField?: string;
|
|
86
88
|
/** `false` draws the badge pill without its leading dot; only with `display: "badge"`. */
|
|
87
89
|
readonly badgeDot?: false;
|
|
90
|
+
/** Row field holding a second label, drawn as a pill next to the cell's own value
|
|
91
|
+
* (e.g. a vehicle name with a "free" pill). Not combinable with `display` or `hint`. */
|
|
92
|
+
readonly pillField?: string;
|
|
93
|
+
/** Row field naming the tone of the `pillField` pill (a `ListBadgeTone`). Needs `pillField`. */
|
|
94
|
+
readonly pillToneField?: string;
|
|
88
95
|
/** Row field holding a screen QN (`<feature>:screen:<id>`): the cell links
|
|
89
96
|
* to that screen when the row sets it and the user may open it. For
|
|
90
97
|
* query-backed lists (projectionList, relatedList), whose rows can point
|
|
@@ -159,7 +166,10 @@ export type RowActionDisplay = "button" | "link" | "icon" | "responsive";
|
|
|
159
166
|
* (`rowClick: true`) included as an entry, so every row has a kebab; phone
|
|
160
167
|
* cards draw no kebab when the row opens, a card without a row target keeps it. */
|
|
161
168
|
export type RowActionMode = "adaptive" | "inline" | "menu";
|
|
162
|
-
export type RowAction = RowActionWriteHandler | RowActionNavigate | RowActionDrawer | RowActionClientAction
|
|
169
|
+
export type RowAction = (RowActionWriteHandler | RowActionNavigate | RowActionDrawer | RowActionClientAction) & {
|
|
170
|
+
/** projectionDetail `footerActions` only: "start" sets the button apart on the left of the footer. */
|
|
171
|
+
readonly align?: "start";
|
|
172
|
+
};
|
|
163
173
|
export type RowActionWriteHandler = {
|
|
164
174
|
/** Default for RowActions without an explicitly set `kind` —
|
|
165
175
|
* backwards-compatible form. Can also be set explicitly. */
|
|
@@ -322,8 +332,8 @@ export type RowActionClientAction = {
|
|
|
322
332
|
/** Inline render form in the row-action column — see `RowActionDisplay`. */
|
|
323
333
|
readonly display?: RowActionDisplay;
|
|
324
334
|
/** i18n key of the toast shown after the handler reported `{ ok: true }`
|
|
325
|
-
* (default `kumiko.clientAction.success`). */
|
|
326
|
-
readonly successMessage?: string;
|
|
335
|
+
* (default `kumiko.clientAction.success`); `false` shows no toast. */
|
|
336
|
+
readonly successMessage?: string | false;
|
|
327
337
|
};
|
|
328
338
|
export type ToolbarAction = ({
|
|
329
339
|
readonly kind: "navigate";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FieldCondition } from "./field-state-conditions.ts";
|
|
1
2
|
import type { SelectOptionTone } from "./fields.ts";
|
|
2
3
|
import type { AccessRule, AgentScreenHints } from "./handlers.ts";
|
|
3
4
|
import type { NamedFilterFacetOptions, NamedListFilterRef } from "./named-list-filters.ts";
|
|
@@ -295,9 +296,21 @@ export type ProjectionDetailScreenDefinition = {
|
|
|
295
296
|
* collapses into the menu. Same id rules as `primaryAction`; the phone header keeps
|
|
296
297
|
* its single icon button. */
|
|
297
298
|
readonly inlineActions?: readonly string[];
|
|
299
|
+
/** Ids of `actions` shown in the pinned footer bar instead of the header, in declaration order.
|
|
300
|
+
* Style "primary" marks the main button. An id must not also be `primaryAction` or in `inlineActions`. */
|
|
301
|
+
readonly footerActions?: readonly string[];
|
|
302
|
+
/** i18n key of a note on the left of the footer bar ("Changes go out with the release"); hidden below `sm`. Needs `footerActions`. */
|
|
303
|
+
readonly footerHint?: string;
|
|
304
|
+
/** Tab that opens first when the URL names none: the first rule whose condition holds on the record wins, else the first visible tab. Needs `layout.mode: "tabs"`; every tab stays visible. */
|
|
305
|
+
readonly initialTab?: readonly ProjectionDetailInitialTab[];
|
|
298
306
|
/** How head fields render. Default "text" — plain text instead of a
|
|
299
307
|
* disabled Input, since every field on this screen type is forced
|
|
300
308
|
* readOnly anyway (there is no write path, see the shim doc above).
|
|
301
309
|
* Set "form" to opt back into the disabled-Input look. */
|
|
302
310
|
readonly valueDisplay?: "form" | "text";
|
|
303
311
|
};
|
|
312
|
+
/** One `initialTab` rule: `tab` is a section id of the layout. */
|
|
313
|
+
export type ProjectionDetailInitialTab = {
|
|
314
|
+
readonly when: Exclude<FieldCondition, boolean>;
|
|
315
|
+
readonly tab: string;
|
|
316
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { FieldCondition } from "./field-state-conditions.ts";
|
|
1
2
|
import type { SelectOptionTone } from "./fields.ts";
|
|
3
|
+
import type { IconKey } from "./nav-icon.ts";
|
|
2
4
|
import type { RowAction } from "./screen-entity-list.ts";
|
|
3
5
|
export type RecordBreadcrumbItem = {
|
|
4
6
|
readonly label: string;
|
|
@@ -53,6 +55,8 @@ export type RecordSummarySpec = {
|
|
|
53
55
|
readonly toneField?: string;
|
|
54
56
|
/** Row field with a shorter sentence shown instead of `field` below `sm`. */
|
|
55
57
|
readonly narrowField?: string;
|
|
58
|
+
/** Draws the sentence as plain text led by this icon (e.g. "sparkles" for an AI statement) instead of the bordered box. */
|
|
59
|
+
readonly icon?: IconKey;
|
|
56
60
|
};
|
|
57
61
|
export type RecordBannerSpec = {
|
|
58
62
|
/** Holds `RecordNotice | null`; null shows no banner. */
|
|
@@ -72,6 +76,10 @@ export type RecordStepsSpec = {
|
|
|
72
76
|
readonly narrowLimit?: number;
|
|
73
77
|
/** Plural base key for the toggle of the hidden rest: define `<key>.one` and `<key>.other` (the latter with `{count}`). Default `kumiko.detail.steps.more`. */
|
|
74
78
|
readonly narrowMoreLabel?: string;
|
|
79
|
+
/** i18n key of a short label before each step's further actions ("Clarify first?"). */
|
|
80
|
+
readonly moreActionsLabel?: string;
|
|
81
|
+
/** The whole panel is drawn only while the condition holds on the record. Default: always. */
|
|
82
|
+
readonly visibleWhen?: Exclude<FieldCondition, boolean>;
|
|
75
83
|
readonly actions?: readonly RecordGuidanceAction[];
|
|
76
84
|
};
|
|
77
85
|
export type RecordProgressStep = {
|
package/dist/screen.d.ts
CHANGED
|
@@ -29,10 +29,23 @@ export interface FieldFormatRegistry {
|
|
|
29
29
|
/** IANA zone id (e.g. "Europe/Berlin"). Default: the runtime's zone. */
|
|
30
30
|
readonly timeZone?: string;
|
|
31
31
|
};
|
|
32
|
+
/** Epoch ms or ISO timestamp, shown as "5 minutes ago" at render time (a table cell does not tick).
|
|
33
|
+
* `style: "short"` gives "5 min. ago"; `withTime` adds the clock time to "yesterday" and to the absolute date;
|
|
34
|
+
* from `absoluteAfterDays` days on the absolute date ("29 Oct 2026") replaces the relative text. */
|
|
35
|
+
relativeTime: {
|
|
36
|
+
readonly locale?: string;
|
|
37
|
+
readonly style?: "long" | "short" | "narrow";
|
|
38
|
+
readonly absoluteAfterDays?: number;
|
|
39
|
+
readonly withTime?: boolean;
|
|
40
|
+
/** IANA zone id for the clock time and the day boundary. Default: the runtime's zone. */
|
|
41
|
+
readonly timeZone?: string;
|
|
42
|
+
};
|
|
32
43
|
date: {
|
|
33
44
|
readonly locale?: string;
|
|
34
45
|
readonly dateStyle?: "full" | "long" | "medium" | "short";
|
|
35
46
|
};
|
|
47
|
+
/** Telephone number shown as a `tel:` link in list cells, like a read-only `format: "phone"` field. */
|
|
48
|
+
phone: Record<never, never>;
|
|
36
49
|
boolean: {
|
|
37
50
|
readonly trueLabel?: string;
|
|
38
51
|
readonly falseLabel?: string;
|
|
@@ -120,9 +133,9 @@ export type ScreenDefinition = EntityListScreenDefinition | ProjectionListScreen
|
|
|
120
133
|
export type { NamedFilterFacetOptions } from "./named-list-filters.ts";
|
|
121
134
|
export type { ActionFormFooterAction, ActionFormLoad, ActionFormRedirect, ActionFormScreenDefinition, ActionFormSuccessFact, ActionFormSuccessItems, ActionFormSuccessLink, FormFieldDerivation, FormFieldDerivationWithoutList, SecretMintConfirmStep, SecretMintScreenDefinition, SecretReveal, SecretRevealField, } from "./screen-action-form.ts";
|
|
122
135
|
export type { ConfigEditAction, ConfigEditScreenDefinition, CustomScreenDefinition, CustomScreenRoute, SecretsEditScreenDefinition, SecretsEditSection, } from "./screen-custom-config.ts";
|
|
123
|
-
export type { DashboardChartKind, DashboardChartMarkerKind, DashboardChartPanel, DashboardChartRangeOption, DashboardChartRanges, DashboardChartTone, DashboardCurrencyFormat, DashboardCustomPanel, DashboardDateParam, DashboardFeedPanel, DashboardFilterDefinition, DashboardI18nText, DashboardListFooterLink, DashboardListNarrow, DashboardListPanel, DashboardListRowLink, DashboardListRowToneMarker, DashboardMoneyParam, DashboardPanelDefinition, DashboardPanelEmptyState, DashboardPanelGate, DashboardPanelNarrow, DashboardPanelQueryOptions, DashboardPanelSpan, DashboardPanelVisibility, DashboardProgressListPanel, DashboardProgressTone, DashboardRecordBinding, DashboardRefresh, DashboardRelativeTimeFormat, DashboardRelativeTimeParam, DashboardScopeDefinition, DashboardScreenDefinition, DashboardScreenPanel, DashboardStatGroupLayout, DashboardStatGroupLink, DashboardStatGroupNarrow, DashboardStatGroupPanel, DashboardStatPanel, DashboardStatTone, DashboardText, DashboardTextBlock, DashboardTextPanel, DashboardTextParam, DashboardTimeRangeDefinition, DashboardValueFormat, ScreenVisibility, } from "./screen-dashboard.ts";
|
|
136
|
+
export type { DashboardChartKind, DashboardChartMarkerKind, DashboardChartPanel, DashboardChartRangeOption, DashboardChartRanges, DashboardChartTone, DashboardCurrencyFormat, DashboardCustomPanel, DashboardDateParam, DashboardFeedPanel, DashboardFilterDefinition, DashboardI18nText, DashboardLayout, DashboardListFooterLink, DashboardListNarrow, DashboardListPanel, DashboardListRowLink, DashboardListRowToneMarker, DashboardMoneyParam, DashboardPanelColumn, DashboardPanelDefinition, DashboardPanelEmptyState, DashboardPanelGate, DashboardPanelNarrow, DashboardPanelQueryOptions, DashboardPanelSpan, DashboardPanelVisibility, DashboardProgressListPanel, DashboardProgressTone, DashboardRecordBinding, DashboardRefresh, DashboardRelativeTimeFormat, DashboardRelativeTimeParam, DashboardScopeDefinition, DashboardScreenDefinition, DashboardScreenPanel, DashboardStatGroupLayout, DashboardStatGroupLink, DashboardStatGroupNarrow, DashboardStatGroupPanel, DashboardStatPanel, DashboardStatTone, DashboardText, DashboardTextBlock, DashboardTextPanel, DashboardTextParam, DashboardTimeRangeDefinition, DashboardValueFormat, ScreenVisibility, } from "./screen-dashboard.ts";
|
|
124
137
|
export { DASHBOARD_MIN_REFRESH_SECONDS, DASHBOARD_STAT_TONES } from "./screen-dashboard.ts";
|
|
125
|
-
export type { EditExtensionSection, EditFieldGroup, EditFieldPrefill, EditFieldSpec, EditFieldsSection, EditLayout, EditRelatedListSection, EditSectionSpec, EditWriteFormSection, EmbeddedListEditSpec, EntityEditAction, EntityEditActionPlacement, EntityEditScreenDefinition, EntityWriteExcludedFields, FieldAffix, FieldFillAction, FormWidth, ListEmptyStateSpec, RelatedListEmptyStateSpec, RelatedListEmptyStateVariant, RelatedListRowTone, } from "./screen-entity-edit.ts";
|
|
138
|
+
export type { EditExtensionSection, EditFieldGroup, EditFieldPrefill, EditFieldSpec, EditFieldsSection, EditLayout, EditRelatedListSection, EditSectionSpec, EditStepListSection, EditWriteFormSection, EmbeddedListEditSpec, EntityEditAction, EntityEditActionPlacement, EntityEditScreenDefinition, EntityWriteExcludedFields, FieldAffix, FieldAiAssist, FieldAiAssistChip, FieldFillAction, FieldTextRef, FieldValueChips, FormWidth, ListEmptyStateSpec, RelatedListEmptyStateSpec, RelatedListEmptyStateVariant, RelatedListRowTone, StepListItem, } from "./screen-entity-edit.ts";
|
|
126
139
|
export { relatedListGroupHeaderLabel, relatedListGroupKey } from "./screen-entity-edit.ts";
|
|
127
140
|
export type { EntityListFacetConfig, EntityListFacetExtraOption, EntityListScreenDefinition, ListBadgeTone, ListColumnDisplay, ListColumnHint, ListColumnSpec, ListPaginationMode, ListRowDecoration, ListSortDir, ListSortOption, ListSortSpec, RelatedListToolbarAction, RowAction, RowActionClientAction, RowActionDisplay, RowActionDrawer, RowActionMode, RowActionNavigate, RowActionNavigateBase, RowActionWriteHandler, RowFieldExtractor, ScreenFilter, ScreenFilterOp, ToolbarAction, } from "./screen-entity-list.ts";
|
|
128
141
|
export type { EntityListExpandableRow, ExpandableRowGrouping } from "./screen-expandable-row.ts";
|
|
@@ -132,5 +145,5 @@ export type { ListBulkAction } from "./screen-list-bulk.ts";
|
|
|
132
145
|
export { LIST_BULK_ACTION_KEYS, MAX_BULK_SELECTION } from "./screen-list-bulk.ts";
|
|
133
146
|
export type { BundledListsOptions, ListColumnPin, ListNarrowFacets, ListPayloadCapabilities, ListTableDensity, ListTableExportOptions, ListTableFrame, ListTableGrouping, ListTableOptions, ListTableSummaryRow, ListTableTotal, ListToolbarActionsPlacement, } from "./screen-list-table.ts";
|
|
134
147
|
export { DEFAULT_EXPORT_MAX_ROWS, entityHasFilterableFields, entityListDeclaresFilters, entityListDeclaresSearch, LIST_COLUMN_MAX_WIDTH_PX, LIST_COLUMN_PINS, LIST_NARROW_FACETS, LIST_TABLE_DENSITIES, LIST_TABLE_DENSITY_KEYS, LIST_TABLE_EXPORT_KEYS, LIST_TABLE_FRAMES, LIST_TABLE_GROUPING_KEYS, LIST_TABLE_OPTION_KEYS, LIST_TABLE_SUMMARY_ROW_KEYS, LIST_TABLE_TOTAL_KEYS, LIST_TOOLBAR_ACTIONS_PLACEMENTS, listPayloadKeysSent, MAX_EXPORT_MAX_ROWS, } from "./screen-list-table.ts";
|
|
135
|
-
export type { ListFacetSpec, MetricNavigate, MetricSpec, ProjectionDetailScreenDefinition, ProjectionListScreenDefinition, RecordHeaderSpec, RecordHeaderSubtitlePart, } from "./screen-projection.ts";
|
|
148
|
+
export type { ListFacetSpec, MetricNavigate, MetricSpec, ProjectionDetailInitialTab, ProjectionDetailScreenDefinition, ProjectionListScreenDefinition, RecordHeaderSpec, RecordHeaderSubtitlePart, } from "./screen-projection.ts";
|
|
136
149
|
export type { RecordBannerSpec, RecordBreadcrumbItem, RecordBreadcrumbSpec, RecordNotice, RecordProgress, RecordProgressSpec, RecordProgressStep, RecordStep, RecordStepsSpec, RecordSummarySpec, } from "./screen-record-guidance.ts";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.416.0",
|
|
4
4
|
"description": "Framework-Type-Definitions für Kumiko — FeatureDefinition, BootCheck-Types und die reinen Engine-Types. Erlaubt Downstream-Konsumenten, gegen die Type-Contracts zu bauen, ohne das ganze Framework-Package zu importieren. Enthaelt keine identitaets-sensitiven Runtime-Werte mehr (Error-Klassen leben seit #1629 in kumiko-framework, Brand-Symbole nutzen Symbol.for) und ist deshalb eine plain dependency, keine peerDependency.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|