@cosmicdrift/kumiko-types 0.419.0 → 0.420.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/nav-icon.d.ts +1 -1
- package/dist/nav-icon.js +1 -0
- package/dist/screen-action-form.d.ts +6 -3
- package/dist/screen-entity-edit.d.ts +34 -0
- package/dist/screen-entity-list.d.ts +3 -1
- package/dist/screen-expandable-row.d.ts +1 -1
- package/dist/screen-projection.d.ts +3 -1
- package/dist/screen.d.ts +1 -1
- package/package.json +1 -1
package/dist/nav-icon.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const NAV_ICON_KEYS: readonly ["dashboard", "layout-grid", "book-open", "clipboard-list", "package", "gauge", "list", "table", "layers", "building", "warehouse", "calculator", "wallet", "euro", "coins", "credit-card", "piggy-bank", "receipt", "chart", "bar-chart", "trending", "sparkles", "wand", "calendar", "file", "folder", "folder-open", "home", "bell", "shield", "shield-check", "send", "settings", "users", "user", "search", "tag", "key", "link", "palette", "share", "server", "mail", "lock", "hash", "download", "upload", "rocket", "plus", "languages", "trash", "x", "check", "arrow-left", "arrow-right", "copy", "pencil", "eye", "eye-off", "filter", "refresh", "more-horizontal", "more-vertical", "external-link", "chevron-down", "chevron-up", "chevron-left", "chevron-right", "save", "undo", "archive", "star", "flag", "clock", "map-pin", "phone", "printer", "alert-triangle", "info", "check-circle", "x-circle", "loader", "mic", "circle-stop", "image", "camera", "headphones"];
|
|
1
|
+
export declare const NAV_ICON_KEYS: readonly ["dashboard", "layout-grid", "book-open", "clipboard-list", "package", "gauge", "list", "table", "layers", "building", "warehouse", "calculator", "wallet", "euro", "coins", "credit-card", "piggy-bank", "receipt", "chart", "bar-chart", "trending", "sparkles", "wand", "calendar", "file", "folder", "folder-open", "home", "bell", "shield", "shield-check", "send", "settings", "users", "user", "search", "tag", "key", "link", "palette", "share", "server", "mail", "lock", "hash", "download", "upload", "rocket", "plus", "languages", "trash", "x", "check", "arrow-left", "arrow-right", "copy", "pencil", "eye", "eye-off", "filter", "refresh", "more-horizontal", "more-vertical", "external-link", "chevron-down", "chevron-up", "chevron-left", "chevron-right", "save", "undo", "archive", "star", "flag", "clock", "map-pin", "phone", "printer", "alert-triangle", "info", "check-circle", "help-circle", "x-circle", "loader", "mic", "circle-stop", "image", "camera", "headphones"];
|
|
2
2
|
export type NavIconKey = (typeof NAV_ICON_KEYS)[number];
|
|
3
3
|
export type IconKey = NavIconKey;
|
package/dist/nav-icon.js
CHANGED
|
@@ -251,8 +251,10 @@ export type ActionFormPreview = {
|
|
|
251
251
|
readonly query: string;
|
|
252
252
|
/** Form fields sent to the query; they also trigger a rerun when they change. Default: all fields. */
|
|
253
253
|
readonly fields?: readonly string[];
|
|
254
|
-
/** Panel title (i18n key). */
|
|
254
|
+
/** Panel title (i18n key). Without it the panel has no title row. */
|
|
255
255
|
readonly title?: string;
|
|
256
|
+
/** Id of a layout section: the panel renders at the end of that section instead of below the form. */
|
|
257
|
+
readonly section?: string;
|
|
256
258
|
/** Key figures from the query result, shown like the success box facts. */
|
|
257
259
|
readonly facts?: readonly ActionFormSuccessFact[];
|
|
258
260
|
/** Table of rows from the query result. */
|
|
@@ -266,8 +268,9 @@ export type ActionFormSuccessFact = {
|
|
|
266
268
|
readonly field: string;
|
|
267
269
|
/** Label (i18n key). */
|
|
268
270
|
readonly label: string;
|
|
269
|
-
/** Format of the value (a money object, a date string, a number); default `text`. Used by the preview facts and the success box alike.
|
|
270
|
-
|
|
271
|
+
/** Format of the value (a money object, a date string, a number); default `text`. Used by the preview facts and the success box alike.
|
|
272
|
+
* `file`: a FileRef id or an array of them, shown with name, download link and PDF preview. */
|
|
273
|
+
readonly type?: ActionFormValueType | "file";
|
|
271
274
|
};
|
|
272
275
|
/** Per-entry hints of the success box, read from an array in the handler's success payload. */
|
|
273
276
|
export type ActionFormSuccessItems = {
|
|
@@ -47,6 +47,10 @@ export type EditFieldSpec = string | {
|
|
|
47
47
|
/** Helper under a `text` or `longText` input: stackable chips and an optional free
|
|
48
48
|
* instruction call a query and write its `resultField` into the field. */
|
|
49
49
|
readonly aiAssist?: FieldAiAssist;
|
|
50
|
+
/** `longText` fields only: edits the value with the rich-text editor registered for
|
|
51
|
+
* "document" (the value is an HTML string) instead of a textarea. Without a registered
|
|
52
|
+
* editor the textarea shows. With `aiAssist`, the assist text is inserted as paragraphs and `contextFields` naming this field send its plain text. */
|
|
53
|
+
readonly editor?: "document";
|
|
50
54
|
/** Quick-pick chips under a `number`, `decimal`, `bigInt` or `money` input; a chip sets
|
|
51
55
|
* the field to its value. The values come from another field of the same form that
|
|
52
56
|
* holds an array of numbers (e.g. hidden and `submit: false`, seeded by prefill). */
|
|
@@ -118,6 +122,8 @@ export type FieldAiAssist = {
|
|
|
118
122
|
/** Other fields of the same form whose current values are sent in the payload (under their
|
|
119
123
|
* field names). Changing one of them runs the query again and replaces the text. */
|
|
120
124
|
readonly contextFields?: readonly string[];
|
|
125
|
+
/** Default `true`: a change of a `contextFields` field re-runs the query while the field is empty or AI-written. `false`: the context values are only sent along; just a chip or the typed instruction runs the query. */
|
|
126
|
+
readonly autoRun?: boolean;
|
|
121
127
|
readonly chips?: readonly FieldAiAssistChip[];
|
|
122
128
|
/** Adds an input where the user types a free instruction; it is sent under `param`. */
|
|
123
129
|
readonly prompt?: {
|
|
@@ -193,6 +199,9 @@ type EditFieldsSectionBase = EditSectionPresentation & {
|
|
|
193
199
|
/** i18n key of a short text shown instead of `description` below `sm`. */
|
|
194
200
|
readonly descriptionNarrow?: string;
|
|
195
201
|
readonly columns?: number;
|
|
202
|
+
/** Screen forms and drawers lay fields out as a flow: each field is sized by its type and
|
|
203
|
+
* `columns` is ignored. `flow: false` switches the section to a grid of `columns` equal cells. */
|
|
204
|
+
readonly flow?: boolean;
|
|
196
205
|
/** Rendered left of the section title, `text-muted-foreground` — closed
|
|
197
206
|
* IconKey vocabulary into the ICONS registry (renderer/web), analogous
|
|
198
207
|
* to EditFieldSpec.icon. No title → no icon, and no heuristic derives
|
|
@@ -303,6 +312,29 @@ export declare function relatedListGroupHeaderLabel(grouping: Pick<ListTableGrou
|
|
|
303
312
|
export type RelatedListRowTone = Exclude<FieldCondition, boolean> & {
|
|
304
313
|
readonly tone: SelectOptionTone;
|
|
305
314
|
};
|
|
315
|
+
/** Explains every option of one select field (typically a status). The sentence of an option is the i18n key
|
|
316
|
+
* `<option label key>:help`, owned by the feature of the entity. `entity` defaults to the screen entity on an
|
|
317
|
+
* entityList and the section entity on a relatedList; it is required on a projectionDetail, which has no entity of
|
|
318
|
+
* its own. A qualified name `<feature>:<entity>` points at an entity of another feature. */
|
|
319
|
+
export type PageHelpStatusSection = {
|
|
320
|
+
readonly kind: "status";
|
|
321
|
+
readonly field: string;
|
|
322
|
+
readonly entity?: string;
|
|
323
|
+
/** i18n key of the card heading. Default: the tab title for a relatedList section, else the screen title. */
|
|
324
|
+
readonly title?: string;
|
|
325
|
+
};
|
|
326
|
+
/** Free help text; `title` and `text` are i18n keys. */
|
|
327
|
+
export type PageHelpTextSection = {
|
|
328
|
+
readonly kind: "text";
|
|
329
|
+
readonly title: string;
|
|
330
|
+
readonly text: string;
|
|
331
|
+
};
|
|
332
|
+
export type PageHelpSection = PageHelpStatusSection | PageHelpTextSection;
|
|
333
|
+
/** General help of a page: a question-mark button at the end of the shell header actions opens a drawer with one card per section.
|
|
334
|
+
* The sections of relatedList sections join the help of the screen around them, after its own sections. */
|
|
335
|
+
export type PageHelpSpec = {
|
|
336
|
+
readonly sections: readonly PageHelpSection[];
|
|
337
|
+
};
|
|
306
338
|
/** Replacement for the default "no rows" box of a list. `title`/`description`
|
|
307
339
|
* are i18n keys. `action` is a record action evaluated against an empty
|
|
308
340
|
* record on list screens (the parent record on a relatedList); its icon must
|
|
@@ -323,6 +355,8 @@ export type EditRelatedListSection = EditSectionPresentation & {
|
|
|
323
355
|
readonly visibleWhen?: Exclude<FieldCondition, boolean>;
|
|
324
356
|
readonly kind: "relatedList";
|
|
325
357
|
readonly title: string;
|
|
358
|
+
/** Joins the help of the surrounding screen; a status section's entity defaults to `entity` of this section. */
|
|
359
|
+
readonly pageHelp?: PageHelpSpec;
|
|
326
360
|
/** Rows are aggregates or other values with no record of their own, so they lead nowhere on
|
|
327
361
|
* purpose. Declares that to the screen-conventions guard; with `rowClick`/`rowActions` it is a
|
|
328
362
|
* boot error. */
|
|
@@ -5,7 +5,7 @@ import type { IconKey } from "./nav-icon.ts";
|
|
|
5
5
|
import type { FieldRenderer, PlatformComponent, ScreenNavSugar, ScreenSlots } from "./screen.ts";
|
|
6
6
|
import type { ActionFormRedirect } from "./screen-action-form.ts";
|
|
7
7
|
import type { DashboardPanelVisibility, ScreenVisibility } from "./screen-dashboard.ts";
|
|
8
|
-
import type { ListEmptyStateSpec } from "./screen-entity-edit.ts";
|
|
8
|
+
import type { ListEmptyStateSpec, PageHelpSpec } 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";
|
|
@@ -558,6 +558,8 @@ export type EntityListScreenDefinition = {
|
|
|
558
558
|
readonly narrowFacets?: ListNarrowFacets;
|
|
559
559
|
/** "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`. */
|
|
560
560
|
readonly toolbarActionsPlacement?: ListToolbarActionsPlacement;
|
|
561
|
+
/** General help of the page: a question-mark button in the shell header opens a drawer with the sections. */
|
|
562
|
+
readonly pageHelp?: PageHelpSpec;
|
|
561
563
|
/** i18n key of the plural noun for the list size in the phone sort line (`{count}` pluralised). Default `<feature>:entity:<entity>:noun`. */
|
|
562
564
|
readonly itemNounKey?: string;
|
|
563
565
|
/** i18n key for the search field placeholder (default `kumiko.list.search-placeholder`). */
|
|
@@ -9,7 +9,7 @@ export type ExpandableRowGrouping = Omit<ListTableGrouping, "field" | "userChoic
|
|
|
9
9
|
* layout and are therefore omitted. `kind` stays the discriminator so further
|
|
10
10
|
* expansion kinds can be added without a breaking change. `table` takes only
|
|
11
11
|
* `grouping`; the other table options belong on the entityList itself. */
|
|
12
|
-
export type EntityListExpandableRow = Omit<EditRelatedListSection, "id" | "countField" | "count" | "table" | "bulkActions"> & {
|
|
12
|
+
export type EntityListExpandableRow = Omit<EditRelatedListSection, "id" | "countField" | "count" | "table" | "bulkActions" | "pageHelp"> & {
|
|
13
13
|
readonly table?: {
|
|
14
14
|
readonly grouping?: ExpandableRowGrouping;
|
|
15
15
|
};
|
|
@@ -5,7 +5,7 @@ import type { NamedFilterFacetOptions, NamedListFilterRef } from "./named-list-f
|
|
|
5
5
|
import type { NavIconKey } from "./nav-icon.ts";
|
|
6
6
|
import type { FormatSpec, PlatformComponent, ScreenNavSugar, ScreenSlots } from "./screen.ts";
|
|
7
7
|
import type { DashboardStatTone, ScreenVisibility } from "./screen-dashboard.ts";
|
|
8
|
-
import type { EditLayout, EntityEditAction, ListEmptyStateSpec } from "./screen-entity-edit.ts";
|
|
8
|
+
import type { EditLayout, EntityEditAction, ListEmptyStateSpec, PageHelpSpec } from "./screen-entity-edit.ts";
|
|
9
9
|
import type { ListColumnSpec, ListPaginationMode, ListRowDecoration, ListSortOption, ListSortSpec, RowAction, RowActionMode, RowFieldExtractor, ScreenFilter, ToolbarAction } from "./screen-entity-list.ts";
|
|
10
10
|
import type { ScreenFallback } from "./screen-fallback.ts";
|
|
11
11
|
import type { ListBulkAction } from "./screen-list-bulk.ts";
|
|
@@ -292,6 +292,8 @@ export type ProjectionDetailScreenDefinition = {
|
|
|
292
292
|
readonly listScreenId?: string;
|
|
293
293
|
readonly slots?: ScreenSlots;
|
|
294
294
|
readonly access?: AccessRule;
|
|
295
|
+
/** General help of the page, plus the help sections of its relatedList sections; a status section needs `entity` here. */
|
|
296
|
+
readonly pageHelp?: PageHelpSpec;
|
|
295
297
|
/** Header action buttons. Reuses `RowAction` — the screen's single
|
|
296
298
|
* displayed record stands in for the "row", so `pick`/`map`, `visible`,
|
|
297
299
|
* `confirm`/`confirmLabel` and `style` keep their meaning unchanged.
|
package/dist/screen.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export type { ActionFormFooterAction, ActionFormLoad, ActionFormPreview, ActionF
|
|
|
135
135
|
export type { ConfigEditAction, ConfigEditScreenDefinition, CustomScreenDefinition, CustomScreenRoute, SecretsEditScreenDefinition, SecretsEditSection, } from "./screen-custom-config.ts";
|
|
136
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";
|
|
137
137
|
export { DASHBOARD_MIN_REFRESH_SECONDS, DASHBOARD_STAT_TONES } from "./screen-dashboard.ts";
|
|
138
|
-
export type { EditExtensionSection, EditFieldGroup, EditFieldPrefill, EditFieldSpec, EditFieldsSection, EditLayout, EditRelatedListSection, EditSectionSpec, EditStepListSection, EditWriteFormSection, EmbeddedListEditSpec, EntityEditAction, EntityEditActionPlacement, EntityEditScreenDefinition, EntityWriteExcludedFields, FieldAffix, FieldAiAssist, FieldAiAssistChip, FieldBadge, FieldFillAction, FieldTextRef, FieldValueChips, FormWidth, ListEmptyStateSpec, RelatedListEmptyStateSpec, RelatedListEmptyStateVariant, RelatedListRowTone, StepListItem, } 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, FieldBadge, FieldFillAction, FieldTextRef, FieldValueChips, FormWidth, ListEmptyStateSpec, PageHelpSection, PageHelpSpec, PageHelpStatusSection, PageHelpTextSection, RelatedListEmptyStateSpec, RelatedListEmptyStateVariant, RelatedListRowTone, StepListItem, } from "./screen-entity-edit.ts";
|
|
139
139
|
export { relatedListGroupHeaderLabel, relatedListGroupKey } from "./screen-entity-edit.ts";
|
|
140
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";
|
|
141
141
|
export type { EntityListExpandableRow, ExpandableRowGrouping } from "./screen-expandable-row.ts";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.420.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>",
|