@cosmicdrift/kumiko-types 0.330.2 → 0.332.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 +10 -0
- package/dist/feature.d.ts +8 -3
- package/dist/fields.d.ts +7 -0
- package/dist/nav-icon.d.ts +1 -1
- package/dist/nav-icon.js +1 -0
- package/dist/screen.d.ts +26 -2
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { EscapeHatchDeclaration, JobContext } from "./handlers.js";
|
|
|
7
7
|
import type { PostDeleteHookFn, PostSaveHookFn, PreDeleteHookFn, PreQueryHookFn, PreSaveHookFn } from "./hooks.js";
|
|
8
8
|
import type { TenantId } from "./identifiers.js";
|
|
9
9
|
import type { NavIconKey } from "./nav-icon.js";
|
|
10
|
+
import type { DashboardCustomPanel, DashboardScreenPanel } from "./screen.js";
|
|
10
11
|
import type { TenantDb } from "./tenant-db-types.js";
|
|
11
12
|
export type ConfigKeyAccess = {
|
|
12
13
|
readonly read: readonly string[];
|
|
@@ -44,6 +45,13 @@ export type ConfigKeyDefinition<T extends ConfigKeyType = ConfigKeyType> = {
|
|
|
44
45
|
* `encrypted` (kumiko-platform#231/#459). */
|
|
45
46
|
readonly piiEncrypted?: boolean;
|
|
46
47
|
readonly options?: readonly string[];
|
|
48
|
+
/** Only on `type: "select"`: loads the options from this query (QN), contract
|
|
49
|
+
* `{ rows: { value, label }[] }`, labels shown verbatim. Mutually exclusive with
|
|
50
|
+
* `options` and `allowPerRequest`. The write side does not check the value against
|
|
51
|
+
* the query result; the consuming feature validates it where it uses it. */
|
|
52
|
+
readonly optionsQuery?: string;
|
|
53
|
+
/** Static payload sent with every `optionsQuery` call. Requires `optionsQuery`. */
|
|
54
|
+
readonly optionsQueryPayload?: Readonly<Record<string, string | number | boolean>>;
|
|
47
55
|
readonly bounds?: ConfigBounds;
|
|
48
56
|
readonly pattern?: {
|
|
49
57
|
readonly regex: string;
|
|
@@ -206,9 +214,11 @@ export type RegistrarExtensionRegistration = {
|
|
|
206
214
|
readonly options?: Record<string, unknown> | undefined;
|
|
207
215
|
readonly featureName?: string;
|
|
208
216
|
};
|
|
217
|
+
export type ExtensionSelectorPanel = DashboardCustomPanel | Omit<DashboardScreenPanel, "label">;
|
|
209
218
|
export type ExtensionSelectorDef = {
|
|
210
219
|
readonly extensionName: string;
|
|
211
220
|
readonly qualifiedKey: string;
|
|
221
|
+
readonly panels?: readonly ExtensionSelectorPanel[];
|
|
212
222
|
};
|
|
213
223
|
export type ReferenceDataDef = {
|
|
214
224
|
readonly entityName: string;
|
package/dist/feature.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as z from "zod";
|
|
2
2
|
import type { ZodType } from "zod";
|
|
3
|
-
import type { ConfigKeyDefinition, ConfigKeyHandle, ConfigKeyType, ConfigSeedDef, ExtensionSelectorDef, JobDefinition, JobHandlerFn, NotificationDataFn, NotificationDefinition, NotificationRecipientFn, NotificationTemplateFn, ReferenceDataDef, RegistrarExtensionDef, RegistrarExtensionRegistration, TranslationKeys, TranslationsDef } from "./config.js";
|
|
3
|
+
import type { ConfigKeyDefinition, ConfigKeyHandle, ConfigKeyType, ConfigSeedDef, ExtensionSelectorDef, ExtensionSelectorPanel, JobDefinition, JobHandlerFn, NotificationDataFn, NotificationDefinition, NotificationRecipientFn, NotificationTemplateFn, ReferenceDataDef, RegistrarExtensionDef, RegistrarExtensionRegistration, TranslationKeys, TranslationsDef } from "./config.js";
|
|
4
4
|
import type { QueryHandlerDefinition, StreamHandlerDefinition, WriteHandlerDefinition } from "./define-handler.js";
|
|
5
5
|
import type { RegisterEntityCrudOptions } from "./entity-handlers.js";
|
|
6
6
|
import type { EntityTableMeta } from "./entity-table-meta-types.js";
|
|
@@ -327,11 +327,15 @@ export type FeatureRegistrar<TFeature extends string = string> = {
|
|
|
327
327
|
* Settings-Hub render one tenant dashboard for the owner: the selector as a
|
|
328
328
|
* select of the mounted plugin ids, the selected plugin's config and secrets
|
|
329
329
|
* as panels, and plugin features lose their own tenant nav. `config:write:set`
|
|
330
|
-
* rejects unknown plugin ids (`""` clears).
|
|
330
|
+
* rejects unknown plugin ids (`""` clears). `options.panels` adds the owner's own
|
|
331
|
+
* `custom`/`screen` panels to that dashboard, after the selection and before the
|
|
332
|
+
* plugin panels (a short `screen` id means a screen of the declaring feature).
|
|
331
333
|
*/
|
|
332
334
|
extensionSelector(extensionName: string, key: {
|
|
333
335
|
readonly name: string;
|
|
334
|
-
} | string
|
|
336
|
+
} | string, options?: {
|
|
337
|
+
readonly panels?: readonly ExtensionSelectorPanel[];
|
|
338
|
+
}): void;
|
|
335
339
|
/**
|
|
336
340
|
* Marker-Deklaration: dieses Feature stellt eine Cross-Feature-API
|
|
337
341
|
* unter dem genannten Namen bereit. Die eigentliche Implementation
|
|
@@ -489,6 +493,7 @@ export type Registry = {
|
|
|
489
493
|
getExtension(name: string): RegistrarExtensionDef | undefined;
|
|
490
494
|
getExtensionUsages(extensionName: string): readonly RegistrarExtensionRegistration[];
|
|
491
495
|
getAllExtensionSelectors(): ReadonlyMap<string, string>;
|
|
496
|
+
getExtensionSelectorPanels(extensionName: string): readonly ExtensionSelectorPanel[];
|
|
492
497
|
getAllNotifications(): ReadonlyMap<string, NotificationDefinition>;
|
|
493
498
|
getAllReferenceData(): readonly ReferenceDataDef[];
|
|
494
499
|
getProjectionsForSource(entityName: string): readonly ProjectionDefinition[];
|
package/dist/fields.d.ts
CHANGED
|
@@ -180,6 +180,13 @@ export type SelectFieldDef<TOptions extends readonly string[] = readonly string[
|
|
|
180
180
|
readonly optionTones?: {
|
|
181
181
|
readonly [K in TOptions[number]]?: SelectOptionTone;
|
|
182
182
|
};
|
|
183
|
+
/** Loads the options from this query (QN). Contract: `{ rows: { value, label }[] }`,
|
|
184
|
+
* labels are shown verbatim (not translated). `options` must be empty when set.
|
|
185
|
+
* Only valid on configEdit/actionForm screen fields and config keys, not on entity
|
|
186
|
+
* fields: the stored value would not be checked against the query result. */
|
|
187
|
+
readonly optionsQuery?: string;
|
|
188
|
+
/** Static payload sent with every `optionsQuery` call. */
|
|
189
|
+
readonly optionsQueryPayload?: Readonly<Record<string, string | number | boolean>>;
|
|
183
190
|
} & ResolvedPiiFlags;
|
|
184
191
|
export type MultiSelectFieldDef<TOptions extends readonly string[] = readonly string[]> = {
|
|
185
192
|
readonly type: "multiSelect";
|
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", "calculator", "wallet", "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-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", "calculator", "wallet", "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"];
|
|
2
2
|
export type NavIconKey = (typeof NAV_ICON_KEYS)[number];
|
|
3
3
|
export type IconKey = NavIconKey;
|
package/dist/nav-icon.js
CHANGED
package/dist/screen.d.ts
CHANGED
|
@@ -314,6 +314,11 @@ export type RelatedListToolbarAction = (Extract<ToolbarAction, {
|
|
|
314
314
|
}> & {
|
|
315
315
|
readonly visible?: FieldCondition;
|
|
316
316
|
});
|
|
317
|
+
/** Expandable area of an `entityList` row: a relatedList of the row's record.
|
|
318
|
+
* `id` (tab id) and `countField` (tab badge) have no meaning outside a tabs
|
|
319
|
+
* layout and are therefore omitted. `kind` stays the discriminator so further
|
|
320
|
+
* expansion kinds can be added without a breaking change. */
|
|
321
|
+
export type EntityListExpandableRow = Omit<EditRelatedListSection, "id" | "countField">;
|
|
317
322
|
export type EntityListScreenDefinition = {
|
|
318
323
|
readonly id: string;
|
|
319
324
|
readonly type: "entityList";
|
|
@@ -343,6 +348,11 @@ export type EntityListScreenDefinition = {
|
|
|
343
348
|
* etc. — neben "+ Neu" wenn vorhanden. Reihenfolge im Array = UI-
|
|
344
349
|
* Reihenfolge, primary-style links. */
|
|
345
350
|
readonly toolbarActions?: readonly ToolbarAction[];
|
|
351
|
+
/** Expandable area under each row: a relatedList of the row's record
|
|
352
|
+
* (parentId = the row's `id`). Rows get a toggle button; several rows can
|
|
353
|
+
* be open at once. Its own row actions run against the sub-list rows, and
|
|
354
|
+
* a successful write also reloads this list. */
|
|
355
|
+
readonly expandableRow?: EntityListExpandableRow;
|
|
346
356
|
/** Server-side Filter, fest am Screen — drei Buckets derselben
|
|
347
357
|
* Entity ohne Custom-Pages (z.B. "Upcoming" / "Active" / "Past"
|
|
348
358
|
* Maintenance). User-side q-Search läuft AUF dem gefilterten Set
|
|
@@ -452,13 +462,20 @@ export type ProjectionListScreenDefinition = {
|
|
|
452
462
|
readonly slots?: ScreenSlots;
|
|
453
463
|
readonly access?: AccessRule;
|
|
454
464
|
};
|
|
465
|
+
export type RecordHeaderSubtitlePart = string | {
|
|
466
|
+
readonly field: string;
|
|
467
|
+
readonly navigate?: MetricNavigate;
|
|
468
|
+
};
|
|
455
469
|
export type RecordHeaderSpec = {
|
|
456
470
|
readonly title: string;
|
|
457
|
-
|
|
471
|
+
/** Field name, or several parts (field name or `{ field, navigate }`)
|
|
472
|
+
* joined by a separator; parts with an empty value are dropped. */
|
|
473
|
+
readonly subtitle?: string | readonly RecordHeaderSubtitlePart[];
|
|
458
474
|
readonly status?: string;
|
|
459
475
|
/** Record field holding an absolute http(s) URL. When present and the
|
|
460
476
|
* field's value is such a URL, the subtitle renders as an external link
|
|
461
|
-
* (`target="_blank"`) instead of plain text.
|
|
477
|
+
* (`target="_blank"`) instead of plain text. Only valid with the string
|
|
478
|
+
* form of `subtitle`. */
|
|
462
479
|
readonly subtitleHref?: string;
|
|
463
480
|
/** Badge tone per `status` field value; unlisted values fall back to the value heuristic. */
|
|
464
481
|
readonly statusTones?: {
|
|
@@ -822,6 +839,13 @@ export type EditRelatedListSection = {
|
|
|
822
839
|
readonly field: string;
|
|
823
840
|
};
|
|
824
841
|
readonly columns: readonly ListColumnSpec[];
|
|
842
|
+
/** Entity the query's rows belong to: an entity name (same feature) or
|
|
843
|
+
* `feature:entity`. Columns that name one of its fields render like an
|
|
844
|
+
* entityList column of that field (select as a status badge with the
|
|
845
|
+
* translated option label, dates locale-formatted, default header from the
|
|
846
|
+
* field's label key). The column's own `sortable` still decides the
|
|
847
|
+
* header sort. Without it every column renders as plain text. */
|
|
848
|
+
readonly entity?: string;
|
|
825
849
|
/** i18n key for the one-line hint at the left of the tab toolbar. */
|
|
826
850
|
readonly description?: string;
|
|
827
851
|
/** i18n key holding plural forms for the footer count ("1 Position",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.332.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": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|