@cosmicdrift/kumiko-types 0.414.0 → 0.415.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 +3 -0
- package/dist/config.js +10 -1
- package/dist/handler-context-services.d.ts +1 -2
- package/dist/handlers.d.ts +1 -0
- package/dist/multi-stream-apply-context-types.d.ts +3 -1
- package/dist/named-list-filters.d.ts +16 -3
- package/dist/nav-icon.js +1 -1
- package/dist/projection.d.ts +2 -1
- package/dist/screen-entity-list.d.ts +13 -5
- package/dist/screen-list-table.d.ts +26 -0
- package/dist/screen-list-table.js +27 -0
- package/dist/screen-projection.d.ts +12 -2
- package/dist/screen-record-guidance.d.ts +8 -0
- package/dist/screen.d.ts +2 -2
- package/dist/screen.js +1 -1
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -164,6 +164,8 @@ export type MaxPerTenantOptions = {
|
|
|
164
164
|
readonly onLimit: "skip" | "defer";
|
|
165
165
|
readonly deferMs?: number | undefined;
|
|
166
166
|
};
|
|
167
|
+
export declare const IRREVERSIBLE_WITHOUT_ENTRY_HANDLER_CASES: readonly ["rebuildable-derived-data", "high-risk-or-cron-pipeline", "per-dispatch-record-key"];
|
|
168
|
+
export type IrreversibleWithoutEntryHandler = (typeof IRREVERSIBLE_WITHOUT_ENTRY_HANDLER_CASES)[number];
|
|
167
169
|
export type JobDefinition = {
|
|
168
170
|
readonly name: string;
|
|
169
171
|
readonly handler: JobHandlerFn;
|
|
@@ -189,6 +191,7 @@ export type JobDefinition = {
|
|
|
189
191
|
readonly tenantVisibleRun?: {
|
|
190
192
|
readonly subjectFields?: readonly string[] | undefined;
|
|
191
193
|
} | undefined;
|
|
194
|
+
readonly irreversibleWithoutEntryHandler?: IrreversibleWithoutEntryHandler | undefined;
|
|
192
195
|
};
|
|
193
196
|
export type NotificationRecipientFn = (result: import("./hooks.ts").SaveContext) => string | readonly string[] | {
|
|
194
197
|
readonly tenant: string;
|
package/dist/config.js
CHANGED
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
// The only pipelines allowed to call an irreversible primitive (forget, hard delete, kms.eraseKey,
|
|
2
|
+
// readAsInstruction write) without a directly dispatched entry handler. A new case is a framework change.
|
|
3
|
+
// rebuildable-derived-data deletes derived data that is re-created from a reversible source
|
|
4
|
+
// high-risk-or-cron-pipeline runs behind a risk "high" handler or as a cron scan of expired data
|
|
5
|
+
// per-dispatch-record-key the step-dispatcher erasing its per-dispatch record key
|
|
6
|
+
export const IRREVERSIBLE_WITHOUT_ENTRY_HANDLER_CASES = [
|
|
7
|
+
"rebuildable-derived-data",
|
|
8
|
+
"high-risk-or-cron-pipeline",
|
|
9
|
+
"per-dispatch-record-key",
|
|
10
|
+
];
|
|
@@ -6,7 +6,7 @@ import type { EntityCache } from "./entity-cache.ts";
|
|
|
6
6
|
import type { EnvelopeCipher } from "./envelope-cipher-types.ts";
|
|
7
7
|
import type { FileContext } from "./file-handle-types.ts";
|
|
8
8
|
import type { FileProviderResolver } from "./file-provider-resolver-types.ts";
|
|
9
|
-
import type {
|
|
9
|
+
import type { DeliveryAttemptLogFn, EscapeHatchAuditSink, JobRunnerRef, NotifyFactory, NotifyFn, SessionUser, TenantWriteTarget } from "./handlers.ts";
|
|
10
10
|
import type { TenantId } from "./identifiers.ts";
|
|
11
11
|
import type { KmsAdapter } from "./kms-adapter-types.ts";
|
|
12
12
|
import type { RateLimitResolver } from "./rate-limit-types.ts";
|
|
@@ -44,7 +44,6 @@ export type ContextServices = {
|
|
|
44
44
|
readonly _notifyFactory?: NotifyFactory;
|
|
45
45
|
readonly _notifyInTransactionFactory?: (user: SessionUser, tenantId: TenantId) => NotifyFn;
|
|
46
46
|
readonly _notifyAfterCommitFactory?: (user: SessionUser, tenantId: TenantId) => NotifyFn;
|
|
47
|
-
readonly _deliveryAttemptLogFactory?: DeliveryAttemptLogFactory;
|
|
48
47
|
readonly _logOwnDeliveryAttempt?: DeliveryAttemptLogFn;
|
|
49
48
|
readonly _escapeHatchAuditSink?: EscapeHatchAuditSink;
|
|
50
49
|
readonly extensions: Readonly<Record<string, unknown>>;
|
package/dist/handlers.d.ts
CHANGED
|
@@ -143,6 +143,7 @@ export type JobRunnerRef = {
|
|
|
143
143
|
readonly priority?: number;
|
|
144
144
|
readonly jobId?: string;
|
|
145
145
|
}): Promise<unknown>;
|
|
146
|
+
isJobPending?(jobName: string, jobId: string): Promise<boolean>;
|
|
146
147
|
};
|
|
147
148
|
export type DispatchWriteRef = {
|
|
148
149
|
readonly write: (user: SessionUser, qn: string, payload: unknown, inheritedOrigin?: WriteOrigin) => Promise<WriteResult>;
|
|
@@ -8,7 +8,9 @@ import type { AppendEventFn, UnsafeAppendEventFn } from "./handlers.ts";
|
|
|
8
8
|
import type { SecretsContext } from "./secrets-types.ts";
|
|
9
9
|
export type MultiStreamApplyContext<TMap extends object = KumikoEventTypeMap> = {
|
|
10
10
|
readonly appendEvent: AppendEventFn<TMap>;
|
|
11
|
-
readonly unsafeAppendEvent: UnsafeAppendEventFn
|
|
11
|
+
readonly unsafeAppendEvent: (args: Parameters<UnsafeAppendEventFn>[0] & {
|
|
12
|
+
readonly expectedVersion?: number;
|
|
13
|
+
}) => Promise<void>;
|
|
12
14
|
readonly loadAggregate: (aggregateId: string, options?: {
|
|
13
15
|
readonly asOf?: Temporal.Instant;
|
|
14
16
|
}) => Promise<readonly StoredEvent[]>;
|
|
@@ -31,19 +31,32 @@ export type NamedListFilterRef = {
|
|
|
31
31
|
readonly label: string;
|
|
32
32
|
/** Order while this filter is active and the URL carries no sort of its own; wins over `defaultSort`. */
|
|
33
33
|
readonly sort?: ListSortSpec;
|
|
34
|
-
/**
|
|
34
|
+
/** Select display: draws a divider line below this entry in the dropdown. */
|
|
35
|
+
readonly separatorAfter?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Shown instead of the generic "no matches" text when this filter yields an empty list and no
|
|
38
|
+
* search term is set; `title` and `description` are i18n keys. `paramsQuery` (a registered query
|
|
39
|
+
* QN, called without payload) runs only while the empty state is on screen; its result object
|
|
40
|
+
* becomes the translation params of `description`. Without data (loading, error, no result) the
|
|
41
|
+
* description is not rendered.
|
|
42
|
+
*/
|
|
35
43
|
readonly emptyState?: {
|
|
36
44
|
readonly title: string;
|
|
37
45
|
readonly description?: string;
|
|
46
|
+
readonly paramsQuery?: string;
|
|
38
47
|
};
|
|
39
|
-
/** Set by the framework from the entity filter's
|
|
40
|
-
readonly
|
|
48
|
+
/** Set by the framework from the entity filter's access rule; the client offers the chip only where `isUiAccessGranted` allows it. */
|
|
49
|
+
readonly access?: AccessRule;
|
|
41
50
|
};
|
|
42
51
|
/** How the named filters appear in the toolbar: toggle chips (default) or one single-choice select. */
|
|
43
52
|
export type NamedFilterFacetOptions = {
|
|
44
53
|
readonly display?: "chips" | "select";
|
|
45
54
|
/** Ask the list query for each filter's hit count and show it next to the label. */
|
|
46
55
|
readonly showCounts?: boolean;
|
|
56
|
+
/** Select entries with zero hits are left out (the active one and "all" stay). Asks for the counts like `showCounts` does, without showing the number unless `showCounts` is set. */
|
|
57
|
+
readonly hideEmpty?: boolean;
|
|
58
|
+
/** "behind-filter": the select opens behind the filter icon next to the search field instead of standing as a pill. Only below `sm`; otherwise it stays a pill. */
|
|
59
|
+
readonly narrowPlacement?: "behind-filter";
|
|
47
60
|
/** i18n key for the select's label, e.g. "To do". */
|
|
48
61
|
readonly label?: string;
|
|
49
62
|
};
|
package/dist/nav-icon.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// versa.
|
|
11
11
|
//
|
|
12
12
|
// Declared as a runtime tuple (not just a type) so callers that sit outside
|
|
13
|
-
// this repo's
|
|
13
|
+
// this repo's typecheck project graph (e.g. samples, external consumers
|
|
14
14
|
// resolving from a stale published type) still get a runtime-checkable
|
|
15
15
|
// vocabulary — the boot-validator's validateActionHasIcon checks a declared
|
|
16
16
|
// icon against NAV_ICON_KEYS instead of trusting "not undefined".
|
package/dist/projection.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RunIn } from "./config.ts";
|
|
1
|
+
import type { IrreversibleWithoutEntryHandler, RunIn } from "./config.ts";
|
|
2
2
|
import type { StoredEvent } from "./event-store-types.ts";
|
|
3
3
|
import type { ExecutorManagedRunner } from "./executor-brand.ts";
|
|
4
4
|
import type { EntityDefinition } from "./fields.ts";
|
|
@@ -38,4 +38,5 @@ export type MultiStreamProjectionDefinition = {
|
|
|
38
38
|
readonly runIn?: RunIn;
|
|
39
39
|
readonly delivery?: "shared" | "per-instance";
|
|
40
40
|
readonly startFrom?: "beginning" | "now";
|
|
41
|
+
readonly irreversibleWithoutEntryHandler?: IrreversibleWithoutEntryHandler;
|
|
41
42
|
};
|
|
@@ -9,7 +9,7 @@ import type { ListEmptyStateSpec } from "./screen-entity-edit.ts";
|
|
|
9
9
|
import type { EntityListExpandableRow } from "./screen-expandable-row.ts";
|
|
10
10
|
import type { ScreenFallback } from "./screen-fallback.ts";
|
|
11
11
|
import type { ListBulkAction } from "./screen-list-bulk.ts";
|
|
12
|
-
import type { ListColumnPin, ListNarrowFacets, ListTableOptions } from "./screen-list-table.ts";
|
|
12
|
+
import type { ListColumnPin, ListNarrowFacets, ListTableOptions, ListToolbarActionsPlacement } from "./screen-list-table.ts";
|
|
13
13
|
export type ListColumnSpec = string | {
|
|
14
14
|
readonly field: string;
|
|
15
15
|
readonly renderer?: FieldRenderer;
|
|
@@ -59,6 +59,8 @@ export type ListColumnSpec = string | {
|
|
|
59
59
|
/** Counterpart of `hideOnNarrow`: the column shows only in the compact card layout and not in the table.
|
|
60
60
|
* Not combinable with `hideOnNarrow`, `hidden` or `pinned`. */
|
|
61
61
|
readonly showOnNarrowOnly?: true;
|
|
62
|
+
/** In the compact card, consecutive `narrowInline` columns stand side by side on one line (12px gap, no separator) instead of one line each. */
|
|
63
|
+
readonly narrowInline?: true;
|
|
62
64
|
/** Start state for the column picker: the column begins hidden and the
|
|
63
65
|
* user can show it. Only valid together with `table.columnPicker`. */
|
|
64
66
|
readonly hidden?: boolean;
|
|
@@ -98,6 +100,8 @@ export type ListColumnHint = {
|
|
|
98
100
|
readonly detailField?: string;
|
|
99
101
|
/** Row field shown as the detail line below `sm` instead of `detailField` (a shorter line, e.g. "5 days · Anna Schneider"). Needs `detailField`. */
|
|
100
102
|
readonly narrowDetailField?: string;
|
|
103
|
+
/** Row field shown as the sentence on the phone card instead of the column's own value (a shorter sentence); the table keeps the column value. An empty value falls back to it. */
|
|
104
|
+
readonly narrowField?: string;
|
|
101
105
|
/** Row field holding a SelectOptionTone; defaults to the screen's `rowToneField`. Tone `neutral` draws the sentence muted and not bold, like `emptyLabel`, and no stripe on the phone card. */
|
|
102
106
|
readonly toneField?: string;
|
|
103
107
|
/** Row field with a longer reason, shown behind a "Why?" toggle in the cell. */
|
|
@@ -111,7 +115,7 @@ export type ListColumnHint = {
|
|
|
111
115
|
/** The sentence keeps the normal text color (still bold); the tone stays on the row stripe, a badge and the detail line. */
|
|
112
116
|
readonly plainSentence?: true;
|
|
113
117
|
};
|
|
114
|
-
/** Computed fields for the loaded rows:
|
|
118
|
+
/** Computed fields for the loaded rows: `query` calls with `{ ...params, ids }`, answering `{ rows: [{ id, ...fields }] }`. Fields are merged into the rows and win over same-named row fields. The ids go out in batches of the first page size (later pages send only the newly loaded ids; a reload re-asks all loaded rows batch by batch), so `ids.max` must cover at least the page size; a failing call shows plain rows. */
|
|
115
119
|
export type ListRowDecoration = {
|
|
116
120
|
readonly query: string;
|
|
117
121
|
readonly params?: Readonly<Record<string, unknown>>;
|
|
@@ -153,7 +157,7 @@ export type RowActionDisplay = "button" | "link" | "icon" | "responsive";
|
|
|
153
157
|
* stay inline. `"inline"`: every action inline, no kebab. `"menu"`: every
|
|
154
158
|
* action in the kebab menu at the row end, none inline, the row opener
|
|
155
159
|
* (`rowClick: true`) included as an entry, so every row has a kebab; phone
|
|
156
|
-
* cards draw no kebab. */
|
|
160
|
+
* cards draw no kebab when the row opens, a card without a row target keeps it. */
|
|
157
161
|
export type RowActionMode = "adaptive" | "inline" | "menu";
|
|
158
162
|
export type RowAction = RowActionWriteHandler | RowActionNavigate | RowActionDrawer | RowActionClientAction;
|
|
159
163
|
export type RowActionWriteHandler = {
|
|
@@ -411,6 +415,8 @@ export type EntityListFacetExtraOption = {
|
|
|
411
415
|
readonly values: readonly string[];
|
|
412
416
|
/** Where the chip sits relative to the field's own options. Default "start". */
|
|
413
417
|
readonly position?: "start" | "end";
|
|
418
|
+
/** Draws a divider line below this choice in the select dropdown (e.g. after a "needs action" bundle). */
|
|
419
|
+
readonly separatorAfter?: boolean;
|
|
414
420
|
};
|
|
415
421
|
export type EntityListFacetConfig = {
|
|
416
422
|
/** `"select"` (default): dropdown with checkboxes. `"chips"`: one toggle
|
|
@@ -425,6 +431,8 @@ export type EntityListFacetConfig = {
|
|
|
425
431
|
* `showCounts`'s requests even when the number itself is not shown. */
|
|
426
432
|
readonly hideEmpty?: boolean;
|
|
427
433
|
readonly extraOptions?: readonly EntityListFacetExtraOption[];
|
|
434
|
+
/** "behind-filter": the facet opens behind the filter icon next to the search field instead of standing as a pill. Only below `sm`; otherwise it stays a pill. The remaining facets follow the usual phone rules and share the toggle panel. */
|
|
435
|
+
readonly narrowPlacement?: "behind-filter";
|
|
428
436
|
};
|
|
429
437
|
export type EntityListScreenDefinition = {
|
|
430
438
|
readonly id: string;
|
|
@@ -509,14 +517,14 @@ export type EntityListScreenDefinition = {
|
|
|
509
517
|
readonly emptyState?: ListEmptyStateSpec;
|
|
510
518
|
/** i18n key for the primary create button label (default `kumiko.actions.create`). */
|
|
511
519
|
readonly createLabel?: string;
|
|
512
|
-
/** "toolbar": from `
|
|
520
|
+
/** "toolbar": from `md` up (below md the compact header keeps its "+") the create button ends the filter row instead of standing in the header. Default "header". Needs a create button (no `allowCreate: false`). */
|
|
513
521
|
readonly createPlacement?: "header" | "toolbar";
|
|
514
522
|
/** From `sm` up, a "Sorted by" select in the filter row (same options as the narrow sort control); column headers stay sortable. */
|
|
515
523
|
readonly toolbarSort?: true;
|
|
516
524
|
/** "pills": below `sm` the select facets render as rounded pill triggers with a stronger border; from `sm` up unchanged. */
|
|
517
525
|
readonly narrowFacets?: ListNarrowFacets;
|
|
518
526
|
/** "toolbar": from `md` up the `toolbarActions` end the filter row, after the "Sorted by" select and the create button, instead of standing in the page header. Below `md` they stay in the header. Default "header". Needs `toolbarActions`. */
|
|
519
|
-
readonly toolbarActionsPlacement?:
|
|
527
|
+
readonly toolbarActionsPlacement?: ListToolbarActionsPlacement;
|
|
520
528
|
/** i18n key of the plural noun for the list size in the phone sort line (`{count}` pluralised). Default `<feature>:entity:<entity>:noun`. */
|
|
521
529
|
readonly itemNounKey?: string;
|
|
522
530
|
/** i18n key for the search field placeholder (default `kumiko.list.search-placeholder`). */
|
|
@@ -8,9 +8,34 @@ export type ListColumnPin = (typeof LIST_COLUMN_PINS)[number];
|
|
|
8
8
|
export declare const LIST_TABLE_OPTION_KEYS: readonly ["rememberState", "resetAll", "columnPicker", "density", "pinning", "resizing", "keyboardNavigation", "export", "grouping", "totals", "summaryRow", "compactHeader", "frame"];
|
|
9
9
|
export declare const LIST_TABLE_FRAMES: readonly ["card"];
|
|
10
10
|
export type ListTableFrame = (typeof LIST_TABLE_FRAMES)[number];
|
|
11
|
+
export declare const LIST_TOOLBAR_ACTIONS_PLACEMENTS: readonly ["header", "toolbar"];
|
|
12
|
+
export type ListToolbarActionsPlacement = (typeof LIST_TOOLBAR_ACTIONS_PLACEMENTS)[number];
|
|
11
13
|
export declare const LIST_NARROW_FACETS: readonly ["pills"];
|
|
12
14
|
export type ListNarrowFacets = (typeof LIST_NARROW_FACETS)[number];
|
|
13
15
|
export declare const LIST_TABLE_SUMMARY_ROW_KEYS: readonly ["query", "params"];
|
|
16
|
+
export type ListPayloadCapabilities = {
|
|
17
|
+
readonly searchable: boolean;
|
|
18
|
+
readonly filters: boolean;
|
|
19
|
+
readonly namedFilters: boolean;
|
|
20
|
+
readonly screenFilter: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function listPayloadKeysSent(capabilities: ListPayloadCapabilities): readonly string[];
|
|
23
|
+
type FlaggedFields = {
|
|
24
|
+
readonly fields: Readonly<Record<string, object>>;
|
|
25
|
+
} | undefined;
|
|
26
|
+
/** True when the entity has a `filterable` field; the facet dropdowns and the `filters` payload key rest on it. */
|
|
27
|
+
export declare function entityHasFilterableFields(entity: FlaggedFields): boolean;
|
|
28
|
+
/** An explicit `searchable` wins, otherwise a searchable field turns search on. The renderer additionally needs a search adapter. */
|
|
29
|
+
export declare function entityListDeclaresSearch(screen: {
|
|
30
|
+
readonly searchable?: boolean;
|
|
31
|
+
}, entity: FlaggedFields): boolean;
|
|
32
|
+
/** Whether an entityList can send `filters`: filterable fields, default filters or a range facet. */
|
|
33
|
+
export declare function entityListDeclaresFilters(screen: {
|
|
34
|
+
readonly defaultFilters?: object;
|
|
35
|
+
readonly facets?: Readonly<Record<string, false | {
|
|
36
|
+
readonly display?: string;
|
|
37
|
+
}>>;
|
|
38
|
+
}, entity: FlaggedFields): boolean;
|
|
14
39
|
export declare const LIST_TABLE_GROUPING_KEYS: readonly ["field", "label", "labels", "collapsedWhen", "userChoice", "fields"];
|
|
15
40
|
export declare const LIST_TABLE_TOTAL_KEYS: readonly ["field", "kind"];
|
|
16
41
|
export declare const LIST_TABLE_EXPORT_KEYS: readonly ["xlsx", "maxRows"];
|
|
@@ -90,3 +115,4 @@ export type BundledListsOptions = {
|
|
|
90
115
|
/** Pins the first column left on every bundled list where no column is pinned. Needs `table.pinning: true`. */
|
|
91
116
|
readonly pinFirstColumn?: boolean;
|
|
92
117
|
};
|
|
118
|
+
export {};
|
|
@@ -18,8 +18,35 @@ export const LIST_TABLE_OPTION_KEYS = [
|
|
|
18
18
|
"frame",
|
|
19
19
|
];
|
|
20
20
|
export const LIST_TABLE_FRAMES = ["card"];
|
|
21
|
+
export const LIST_TOOLBAR_ACTIONS_PLACEMENTS = ["header", "toolbar"];
|
|
21
22
|
export const LIST_NARROW_FACETS = ["pills"];
|
|
22
23
|
export const LIST_TABLE_SUMMARY_ROW_KEYS = ["query", "params"];
|
|
24
|
+
// The optional list-query keys a list screen sends for what it declares, in one place so the boot
|
|
25
|
+
// validator (summary-row schema check) and the renderer's payload tests agree on them.
|
|
26
|
+
export function listPayloadKeysSent(capabilities) {
|
|
27
|
+
return [
|
|
28
|
+
...(capabilities.searchable ? ["search"] : []),
|
|
29
|
+
...(capabilities.filters ? ["filters"] : []),
|
|
30
|
+
...(capabilities.namedFilters ? ["namedFilter"] : []),
|
|
31
|
+
...(capabilities.screenFilter ? ["filter"] : []),
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
function someFieldFlagged(entity, flag) {
|
|
35
|
+
return Object.values(entity?.fields ?? {}).some((field) => Reflect.get(field, flag) === true);
|
|
36
|
+
}
|
|
37
|
+
/** True when the entity has a `filterable` field; the facet dropdowns and the `filters` payload key rest on it. */
|
|
38
|
+
export function entityHasFilterableFields(entity) {
|
|
39
|
+
return someFieldFlagged(entity, "filterable");
|
|
40
|
+
}
|
|
41
|
+
/** An explicit `searchable` wins, otherwise a searchable field turns search on. The renderer additionally needs a search adapter. */
|
|
42
|
+
export function entityListDeclaresSearch(screen, entity) {
|
|
43
|
+
return screen.searchable ?? someFieldFlagged(entity, "searchable");
|
|
44
|
+
}
|
|
45
|
+
/** Whether an entityList can send `filters`: filterable fields, default filters or a range facet. */
|
|
46
|
+
export function entityListDeclaresFilters(screen, entity) {
|
|
47
|
+
const hasRangeFacet = Object.values(screen.facets ?? {}).some((facet) => facet !== false && facet.display === "range");
|
|
48
|
+
return entityHasFilterableFields(entity) || screen.defaultFilters !== undefined || hasRangeFacet;
|
|
49
|
+
}
|
|
23
50
|
export const LIST_TABLE_GROUPING_KEYS = [
|
|
24
51
|
"field",
|
|
25
52
|
"label",
|
|
@@ -8,12 +8,14 @@ import type { EditLayout, ListEmptyStateSpec } from "./screen-entity-edit.ts";
|
|
|
8
8
|
import type { ListColumnSpec, ListPaginationMode, ListRowDecoration, ListSortOption, ListSortSpec, RowAction, RowActionMode, RowFieldExtractor, ScreenFilter, ToolbarAction } from "./screen-entity-list.ts";
|
|
9
9
|
import type { ScreenFallback } from "./screen-fallback.ts";
|
|
10
10
|
import type { ListBulkAction } from "./screen-list-bulk.ts";
|
|
11
|
-
import type { ListNarrowFacets, ListTableOptions } from "./screen-list-table.ts";
|
|
11
|
+
import type { ListNarrowFacets, ListTableOptions, ListToolbarActionsPlacement } from "./screen-list-table.ts";
|
|
12
12
|
import type { RecordBannerSpec, RecordBreadcrumbSpec, RecordProgressSpec, RecordStepsSpec, RecordSummarySpec } from "./screen-record-guidance.ts";
|
|
13
13
|
export type ListFacetSpec = {
|
|
14
14
|
readonly field: string;
|
|
15
15
|
readonly type: "select";
|
|
16
16
|
readonly label: string;
|
|
17
|
+
/** Below `sm` the facet opens behind the filter icon next to the search field. */
|
|
18
|
+
readonly narrowPlacement?: "behind-filter";
|
|
17
19
|
readonly options: readonly {
|
|
18
20
|
readonly value: string;
|
|
19
21
|
readonly label: string;
|
|
@@ -22,12 +24,16 @@ export type ListFacetSpec = {
|
|
|
22
24
|
readonly field: string;
|
|
23
25
|
readonly type: "boolean";
|
|
24
26
|
readonly label: string;
|
|
27
|
+
/** Below `sm` the facet opens behind the filter icon next to the search field. */
|
|
28
|
+
readonly narrowPlacement?: "behind-filter";
|
|
25
29
|
readonly trueLabel: string;
|
|
26
30
|
readonly falseLabel: string;
|
|
27
31
|
} | {
|
|
28
32
|
readonly field: string;
|
|
29
33
|
readonly type: "reference";
|
|
30
34
|
readonly label: string;
|
|
35
|
+
/** Below `sm` the facet opens behind the filter icon next to the search field. */
|
|
36
|
+
readonly narrowPlacement?: "behind-filter";
|
|
31
37
|
/** Entity name (same feature) or `feature:entity` (cross-feature), same
|
|
32
38
|
* convention as `ListColumnSpec.refEntity`. Options load at render time. */
|
|
33
39
|
readonly entity: string;
|
|
@@ -84,7 +90,7 @@ export type ProjectionListScreenDefinition = {
|
|
|
84
90
|
readonly bulkActions?: readonly ListBulkAction[];
|
|
85
91
|
readonly toolbarActions?: readonly ToolbarAction[];
|
|
86
92
|
/** "toolbar": from `md` up the `toolbarActions` end the filter row, after the "Sorted by" select, instead of standing in the page header. Below `md` they stay in the header. Default "header". Needs `toolbarActions`. */
|
|
87
|
-
readonly toolbarActionsPlacement?:
|
|
93
|
+
readonly toolbarActionsPlacement?: ListToolbarActionsPlacement;
|
|
88
94
|
/** From `sm` up, a "Sorted by" select in the filter row (same options as the narrow sort control); column headers stay sortable. Needs `sortOptions`. */
|
|
89
95
|
readonly toolbarSort?: true;
|
|
90
96
|
/** "pills": below `sm` the select facets render as rounded pill triggers with a stronger border; from `sm` up unchanged. */
|
|
@@ -140,6 +146,8 @@ export type RecordHeaderSubtitlePart = string | {
|
|
|
140
146
|
readonly navigate?: MetricNavigate;
|
|
141
147
|
/** Formats the raw field value (e.g. `timestamp`); an empty value is still dropped. */
|
|
142
148
|
readonly format?: FormatSpec;
|
|
149
|
+
/** i18n key of a text before the value ("Owner "); it stays plain text, a `navigate` link covers only the value. Dropped with an empty value. */
|
|
150
|
+
readonly prefix?: string;
|
|
143
151
|
};
|
|
144
152
|
export type RecordHeaderSpec = {
|
|
145
153
|
readonly title: string;
|
|
@@ -190,6 +198,8 @@ export type MetricSpec = {
|
|
|
190
198
|
readonly toneField?: string;
|
|
191
199
|
/** Record field of the detail query shown as a small line under the value; the value stays the number. Same name as `DashboardStatPanel.subField`. */
|
|
192
200
|
readonly subField?: string;
|
|
201
|
+
/** Record field shown instead of `subField` below `sm` ("of 2,850 €" instead of "0 of 2,850.00 €"). */
|
|
202
|
+
readonly subFieldNarrow?: string;
|
|
193
203
|
/** Icon chip of the tile; only drawn with `metricsStyle: "tiles"`. */
|
|
194
204
|
readonly icon?: NavIconKey;
|
|
195
205
|
/** Formats the displayed value (e.g. `date`, `enumOption`); the tone still resolves on the raw value. */
|
|
@@ -18,12 +18,18 @@ export type RecordGuidanceAction = RowAction & {
|
|
|
18
18
|
export type RecordNotice = {
|
|
19
19
|
readonly title: string;
|
|
20
20
|
readonly text?: string;
|
|
21
|
+
/** Shown instead of `title` below `sm`. */
|
|
22
|
+
readonly narrowTitle?: string;
|
|
23
|
+
/** Shown instead of `text` below `sm`. */
|
|
24
|
+
readonly narrowText?: string;
|
|
21
25
|
readonly tone?: SelectOptionTone;
|
|
22
26
|
readonly [field: string]: unknown;
|
|
23
27
|
};
|
|
24
28
|
export type RecordStep = {
|
|
25
29
|
readonly id: string;
|
|
26
30
|
readonly title: string;
|
|
31
|
+
/** Shown instead of `title` below `sm`. */
|
|
32
|
+
readonly narrowTitle?: string;
|
|
27
33
|
readonly detail?: string;
|
|
28
34
|
/** Shown instead of `detail` below `sm`. */
|
|
29
35
|
readonly narrowDetail?: string;
|
|
@@ -64,6 +70,8 @@ export type RecordStepsSpec = {
|
|
|
64
70
|
readonly emptyLabel?: string;
|
|
65
71
|
/** Below `sm` only the first n steps show; the rest sits behind a "k more steps" toggle. */
|
|
66
72
|
readonly narrowLimit?: number;
|
|
73
|
+
/** 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
|
+
readonly narrowMoreLabel?: string;
|
|
67
75
|
readonly actions?: readonly RecordGuidanceAction[];
|
|
68
76
|
};
|
|
69
77
|
export type RecordProgressStep = {
|
package/dist/screen.d.ts
CHANGED
|
@@ -130,7 +130,7 @@ export type { ScreenFallback, ScreenFallbackByReason, ScreenFallbackReason, } fr
|
|
|
130
130
|
export { fallbackTargetFor, fallbackTargets, SCREEN_FALLBACK_REASONS } from "./screen-fallback.ts";
|
|
131
131
|
export type { ListBulkAction } from "./screen-list-bulk.ts";
|
|
132
132
|
export { LIST_BULK_ACTION_KEYS, MAX_BULK_SELECTION } from "./screen-list-bulk.ts";
|
|
133
|
-
export type { BundledListsOptions, ListColumnPin, ListNarrowFacets, ListTableDensity, ListTableExportOptions, ListTableFrame, ListTableGrouping, ListTableOptions, ListTableSummaryRow, ListTableTotal, } from "./screen-list-table.ts";
|
|
134
|
-
export { DEFAULT_EXPORT_MAX_ROWS, 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, MAX_EXPORT_MAX_ROWS, } from "./screen-list-table.ts";
|
|
133
|
+
export type { BundledListsOptions, ListColumnPin, ListNarrowFacets, ListPayloadCapabilities, ListTableDensity, ListTableExportOptions, ListTableFrame, ListTableGrouping, ListTableOptions, ListTableSummaryRow, ListTableTotal, ListToolbarActionsPlacement, } from "./screen-list-table.ts";
|
|
134
|
+
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
135
|
export type { ListFacetSpec, MetricNavigate, MetricSpec, ProjectionDetailScreenDefinition, ProjectionListScreenDefinition, RecordHeaderSpec, RecordHeaderSubtitlePart, } from "./screen-projection.ts";
|
|
136
136
|
export type { RecordBannerSpec, RecordBreadcrumbItem, RecordBreadcrumbSpec, RecordNotice, RecordProgress, RecordProgressSpec, RecordProgressStep, RecordStep, RecordStepsSpec, RecordSummarySpec, } from "./screen-record-guidance.ts";
|
package/dist/screen.js
CHANGED
|
@@ -2,4 +2,4 @@ export { DASHBOARD_MIN_REFRESH_SECONDS, DASHBOARD_STAT_TONES } from "./screen-da
|
|
|
2
2
|
export { relatedListGroupHeaderLabel, relatedListGroupKey } from "./screen-entity-edit.js";
|
|
3
3
|
export { fallbackTargetFor, fallbackTargets, SCREEN_FALLBACK_REASONS } from "./screen-fallback.js";
|
|
4
4
|
export { LIST_BULK_ACTION_KEYS, MAX_BULK_SELECTION } from "./screen-list-bulk.js";
|
|
5
|
-
export { DEFAULT_EXPORT_MAX_ROWS, 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, MAX_EXPORT_MAX_ROWS, } from "./screen-list-table.js";
|
|
5
|
+
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.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.415.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>",
|