@atscript/ui 0.1.147 → 0.1.149

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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { TAtscriptAnnotatedType, TAtscriptDataType, TSerializedAnnotatedType, TValidatorOptions, TValidatorPlugin } from "@atscript/typescript/utils";
2
- import { Client, TCrudOp, TCrudPermissions, TCrudPermissions as TCrudPermissions$1, TDbActionInfo, TDbActionInfo as TDbActionInfo$1, TDbActionIntent, TDbActionLevel, TDbActionProcessor } from "@atscript/db-client";
2
+ import { Client, FilterExpr, TCrudOp, TCrudPermissions, TCrudPermissions as TCrudPermissions$1, TDbActionInfo, TDbActionInfo as TDbActionInfo$1, TDbActionIntent, TDbActionLevel, TDbActionProcessor } from "@atscript/db-client";
3
3
 
4
4
  //#region src/shared/annotation-keys.d.ts
5
5
  declare const UI_TYPE: "ui.type";
@@ -103,6 +103,16 @@ interface ValueHelpInfo {
103
103
  * This is the value committed to the FK field when the user picks a row.
104
104
  */
105
105
  targetField: string;
106
+ /**
107
+ * Static dictionary scope from `@ui.valueHelp`'s filter — AND'd into every
108
+ * picker query. Since 0.1.148.
109
+ */
110
+ filter?: FilterExpr;
111
+ /**
112
+ * Target fields the filter pins with `=` — constant in the picker, hidden
113
+ * from its columns. Since 0.1.148.
114
+ */
115
+ pinned?: string[];
106
116
  }
107
117
  //#endregion
108
118
  //#region src/form/types.d.ts
@@ -395,6 +405,18 @@ interface ValueHelpSearchOptions {
395
405
  limit?: number;
396
406
  /** Override the computed select fields. */
397
407
  select?: string[];
408
+ /**
409
+ * Static dictionary scope (`ValueHelpInfo.filter`) — AND'd with the search
410
+ * filter and with `$search`. Since 0.1.148.
411
+ */
412
+ filter?: FilterExpr;
413
+ /**
414
+ * The target field the picker commits (`ValueHelpInfo.targetField`). It is
415
+ * selected, and it is the exact-match key of a non-searchable search — a
416
+ * composite-key dictionary's `primaryKeys[0]` is not the value. Default:
417
+ * `primaryKeys[0]`. Since 0.1.148.
418
+ */
419
+ valueField?: string;
398
420
  }
399
421
  interface ValueHelpResult {
400
422
  items: Record<string, unknown>[];
@@ -429,6 +451,16 @@ declare class ValueHelpClient {
429
451
  declare function valueHelpDictPaths(resolved: ResolvedValueHelp): Set<string>;
430
452
  //#endregion
431
453
  //#region src/value-help/extract-literals.d.ts
454
+ /**
455
+ * One literal of a union: `key` / `label` are the string forms the UI keys
456
+ * on; `value` is the typed literal (`true`, `3`, `'a'`) — what a filter or a
457
+ * form must send to the server. `value` since 0.1.148.
458
+ */
459
+ interface LiteralOption {
460
+ key: string;
461
+ label: string;
462
+ value: string | number | boolean;
463
+ }
432
464
  /**
433
465
  * Extracts options from a union of literal types (e.g. 'a' | 'b' | 'c').
434
466
  * Returns undefined if the type is not a pure union of literals.
@@ -437,17 +469,22 @@ declare function valueHelpDictPaths(resolved: ResolvedValueHelp): Set<string>;
437
469
  * into union items and produces synthetic unions containing both individual
438
470
  * literals and the original union type as nested items.
439
471
  */
440
- declare function extractLiteralOptions(prop: TAtscriptAnnotatedType): {
441
- key: string;
442
- label: string;
443
- }[] | undefined;
472
+ declare function extractLiteralOptions(prop: TAtscriptAnnotatedType, outer?: TAtscriptAnnotatedType): LiteralOption[] | undefined;
473
+ /**
474
+ * The literal options of a field: a literal union's, or those of an array of one
475
+ * (`tags: Tag[]`), where the array prop's own `@ui.literalLabel` labels win over the
476
+ * element type's. `undefined` when the field is neither. Since 0.1.148.
477
+ */
478
+ declare function extractFieldLiteralOptions(prop: TAtscriptAnnotatedType): LiteralOption[] | undefined;
444
479
  /** Returns true when the annotated type is a union composed entirely of literal values. */
445
480
  declare function isPureLiteralUnion(prop: TAtscriptAnnotatedType): boolean;
446
481
  //#endregion
447
482
  //#region src/value-help/extract-ref.d.ts
448
483
  /**
449
484
  * Synchronous probe. Returns `{ url, targetField }` for the first link of the
450
- * reference chain starting at `prop` that satisfies all three conditions:
485
+ * reference chain starting at `prop` that carries a `@ui.valueHelp` binding
486
+ * (since 0.1.148 — an explicit binding beats `@db.rel.FK`, and also supplies
487
+ * the static `filter` / `pinned` fields), or that satisfies all three conditions:
451
488
  *
452
489
  * 1. the link carries `@db.rel.FK`,
453
490
  * 2. the link has a `.ref`,
@@ -480,6 +517,19 @@ declare function extractValueHelp(prop: TAtscriptAnnotatedType): ValueHelpInfo |
480
517
  declare function optKey(opt: TFormEntryOptions): string;
481
518
  /** Extracts the display label from an option entry. */
482
519
  declare function optLabel(opt: TFormEntryOptions): string;
520
+ /**
521
+ * The display label of a literal-union column's option (`@ui.literalLabel`) for
522
+ * `value` — `undefined` when the column has no options or none matches. Map-backed
523
+ * per options array, so rendering a table does not scan the options per cell.
524
+ * The one lookup behind the table cell, the filter chips, export and a custom cell.
525
+ * Since 0.1.148.
526
+ */
527
+ declare function optionLabel(column: {
528
+ options?: {
529
+ key: string;
530
+ label: string;
531
+ }[];
532
+ }, value: unknown): string | undefined;
483
533
  /**
484
534
  * Converts raw option annotation value to a normalized array.
485
535
  */
@@ -493,6 +543,43 @@ declare function parseStaticOptions(raw: unknown): TFormEntryOptions[];
493
543
  */
494
544
  declare function resolveOptions(prop: TAtscriptAnnotatedType, scope: Record<string, unknown>): TFormEntryOptions[] | undefined;
495
545
  //#endregion
546
+ //#region src/value-help/distinct-client.d.ts
547
+ interface DistinctValuesOptions {
548
+ /** Search text: a case-insensitive prefix match for strings, an exact match for numbers. */
549
+ text?: string;
550
+ /** Page size. Default: 50. */
551
+ limit?: number;
552
+ /**
553
+ * Rows to skip (the next page of a scrolled picker). Distinct values are only
554
+ * stable across pages when ordered, so a caller pages only with `sortable`.
555
+ */
556
+ skip?: number;
557
+ /** Send `$sort` on the grouped field — only when the server lists it as sortable. */
558
+ sortable?: boolean;
559
+ /** The field stores numbers: search is an exact match and non-numeric text finds nothing. */
560
+ numeric?: boolean;
561
+ /** Extra scope AND'd into the query (e.g. the table's `forceFilters`). */
562
+ filter?: FilterExpr;
563
+ }
564
+ /**
565
+ * `true` for a 4xx answer — the server declined this picker (gate, ARBAC, unknown field).
566
+ * @internal Shared with `@atscript/vue-table`.
567
+ */
568
+ declare function isPickerDeclined(err: unknown): boolean;
569
+ /**
570
+ * Distinct values of one column of the table behind `client`, via
571
+ * `/query?$groupBy=<field>`. All server gates (hidden field, ARBAC `$groupBy`
572
+ * control, row scope, write-only, encrypted) apply as for any grouped read; a
573
+ * 4xx rejects with a `ClientError` — see {@link isPickerDeclined}.
574
+ * `hasMore` tells whether another page follows.
575
+ *
576
+ * @internal Backs the distinct-values picker of `@atscript/vue-table`.
577
+ */
578
+ declare function fetchDistinctValues(client: Pick<Client, "aggregate">, field: string, opts?: DistinctValuesOptions): Promise<{
579
+ items: unknown[];
580
+ hasMore: boolean;
581
+ }>;
582
+ //#endregion
496
583
  //#region src/form/path-utils.d.ts
497
584
  /**
498
585
  * Joins a dot-separated path prefix with a segment. Empty-safe on both
@@ -1082,6 +1169,19 @@ interface FieldMeta {
1082
1169
  * fields (`CreateFormDefOptions.metaFields`). Since 0.1.147.
1083
1170
  */
1084
1171
  computed?: boolean;
1172
+ /**
1173
+ * Display-only value the controller computes (`@DbDecorations`,
1174
+ * `@atscript/moost-db` 0.1.148+): selectable, never filterable, sortable or
1175
+ * groupable. `createTableDef` turns it into a column from
1176
+ * `MetaResponse.decorations`. Since 0.1.148.
1177
+ */
1178
+ decoration?: boolean;
1179
+ /**
1180
+ * `$groupBy` on this field passes the server's gate (`@atscript/moost-db`
1181
+ * 0.1.148+). Together with `filterable` and `@ui.valueHelp.distinct` it
1182
+ * enables the distinct-values picker. Since 0.1.148.
1183
+ */
1184
+ groupable?: boolean;
1085
1185
  }
1086
1186
  /** Meta response from moost-db `/meta` endpoint. */
1087
1187
  interface MetaResponse {
@@ -1110,6 +1210,11 @@ interface MetaResponse {
1110
1210
  relations: RelationInfo[];
1111
1211
  fields: Record<string, FieldMeta>;
1112
1212
  type: TSerializedAnnotatedType;
1213
+ /**
1214
+ * The controller's declared display-only fields (`@DbDecorations`) as a
1215
+ * serialized plain interface. Absent on older servers. Since 0.1.148.
1216
+ */
1217
+ decorations?: TSerializedAnnotatedType;
1113
1218
  }
1114
1219
  /**
1115
1220
  * Server-declared actions grouped by `level`. Built by `createTableDef` from
@@ -1170,6 +1275,13 @@ interface TableDef {
1170
1275
  searchIndexes: SearchIndexInfo[];
1171
1276
  relations: RelationInfo[];
1172
1277
  }
1278
+ /**
1279
+ * Scalar storage kind of a column's value — what the server's filter guard
1280
+ * checks. `string` / `date` / `isoDate` are `string`, `string.date` and
1281
+ * `string.isoDate`; `timestamp` is `number.timestamp` (epoch ms).
1282
+ * Since 0.1.148.
1283
+ */
1284
+ type ColumnValueKind = "string" | "date" | "isoDate" | "number" | "integer" | "decimal" | "timestamp" | "boolean";
1173
1285
  /** A single column definition — built from field metadata + annotations. */
1174
1286
  interface ColumnDef {
1175
1287
  /** Field path in dot-notation (e.g. 'address.city'). */
@@ -1178,6 +1290,14 @@ interface ColumnDef {
1178
1290
  label: string;
1179
1291
  /** Display type — from @ui.table.type, then @ui.type, then inferred from designType. */
1180
1292
  type: string;
1293
+ /**
1294
+ * Scalar storage kind of the column's value, derived from the atscript type
1295
+ * (a union of one kind counts; arrays, objects, JSON and mixed unions have
1296
+ * none). Filter UIs and the query builder read it to pick the filter kind
1297
+ * and to encode values the way the server's filter guard expects.
1298
+ * Since 0.1.148.
1299
+ */
1300
+ valueKind?: ColumnValueKind;
1181
1301
  /** Named component override from @ui.table.component — looked up in the table components map. */
1182
1302
  component?: string;
1183
1303
  /**
@@ -1209,13 +1329,29 @@ interface ColumnDef {
1209
1329
  maxLen?: number;
1210
1330
  /** Initial column ordering from @ui.table.order (lower = first). */
1211
1331
  order: number;
1212
- /** Enumerated options for union literal types (e.g. 'a' | 'b' | 'c'). */
1332
+ /**
1333
+ * Enumerated options for union literal types (e.g. 'a' | 'b' | 'c'). `value` is
1334
+ * the typed literal (`true`, `3`) — what a filter sends to the server; the
1335
+ * `key` is its string form. `createTableDef` always sets it (since 0.1.148);
1336
+ * a hand-built column may omit it, and the string `key` is used.
1337
+ */
1213
1338
  options?: {
1214
1339
  key: string;
1215
1340
  label: string;
1341
+ value?: string | number | boolean;
1216
1342
  }[];
1217
1343
  /** Value-help info for FK columns (from extractValueHelp). */
1218
1344
  valueHelpInfo?: ValueHelpInfo;
1345
+ /**
1346
+ * Distinct-values picker (`@ui.valueHelp.distinct`): the table's own controller
1347
+ * (`url`) answers the values of `field` via `$groupBy`. Set only when the server
1348
+ * lists the field `filterable` and `groupable` and no dictionary help or literal
1349
+ * options apply — independent of `valueHelpInfo`. Since 0.1.148.
1350
+ */
1351
+ distinct?: {
1352
+ url: string;
1353
+ field: string;
1354
+ };
1219
1355
  /** Literal currency code from `@db.amount.currency 'EUR'`. */
1220
1356
  currencyCode?: string;
1221
1357
  /** Sibling field path from `@db.amount.currency.ref 'fieldName'`. */
@@ -1272,6 +1408,18 @@ interface TableQueryState {
1272
1408
  */
1273
1409
  declare function createTableDef(meta: MetaResponse, preDeserializedType?: TAtscriptAnnotatedType): TableDef;
1274
1410
  //#endregion
1411
+ //#region src/table/value-kind.d.ts
1412
+ /** Storage kinds that hold plain numbers (a `timestamp` is epoch ms, but filters treat it as a date). */
1413
+ declare const NUMERIC_VALUE_KINDS: ReadonlySet<ColumnValueKind>;
1414
+ /**
1415
+ * The typed value of one of a column's `options` — the literal itself
1416
+ * (`true`, `3`, `'a'`), falling back to the string `key` for a hand-built
1417
+ * column that has no `value`.
1418
+ *
1419
+ * @internal Shared with `@atscript/vue-table`.
1420
+ */
1421
+ declare function optionValue(option: NonNullable<ColumnDef["options"]>[number]): string | number | boolean;
1422
+ //#endregion
1275
1423
  //#region src/client-factory.d.ts
1276
1424
  /**
1277
1425
  * Factory that creates a `Client` for a given URL.
@@ -1317,6 +1465,8 @@ declare function getMetaEntry(url: string, factory?: ClientFactory): MetaCacheEn
1317
1465
  declare function resetMetaCache(): void;
1318
1466
  //#endregion
1319
1467
  //#region src/shared/str.d.ts
1468
+ /** Escape special regex characters in user input for safe embedding in a `$regex` filter. */
1469
+ declare function escapeRegex(input: string): string;
1320
1470
  /** Safely convert an unknown value to a string without triggering no-base-to-string lint errors. */
1321
1471
  declare function str(value: unknown): string;
1322
1472
  //#endregion
@@ -1386,4 +1536,4 @@ interface TModelRoute {
1386
1536
  */
1387
1537
  declare function buildModelRoutes(models: readonly TAtscriptAnnotatedType[]): TModelRoute[];
1388
1538
  //#endregion
1389
- export { type ClientFactory, type CloneUnwrap, type ColumnDef, type CreateFormDefOptions, type CurrencyDisplay, DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, type DecimalParts, EXPECT_MAX_LENGTH, type FieldMeta, type FieldResolver, type FormActionInfo, type FormArrayFieldDef, type FormDef, type FormDiffOptions, type FormDiffResult, type FormFieldChange, type FormFieldDef, type FormObjectFieldDef, type FormRebaseOptions, type FormRebaseResult, type FormTupleFieldDef, type FormUnionFieldDef, type FormUnionVariant, type FormatDecimalOptions, type GridSpanArgs, type GridSpec, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, type MeasurementInfo, type MetaCacheEntry, type MetaResponse, type PaginationControl, type RelationInfo, type ResolvedValueHelp, type SearchIndexInfo, type SortControl, StaticFieldResolver, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TFieldValidatorOptions, type TFormAction, type TFormEntryOptions, type TFormValidatorCallOptions, type TFormValueResolver, type TModelRoute, type TResolveOptions, type TableActionsModel, type TableDef, type TableQueryState, UI_DICT_ATTR, UI_DICT_DESCR, UI_DICT_FILTERABLE, UI_DICT_LABEL, UI_DICT_SEARCHABLE, UI_DICT_SORTABLE, UI_FORM_ACTION, UI_FORM_ATTR, UI_FORM_AUTOCOMPLETE, UI_FORM_CLASSES, UI_FORM_COMPONENT, UI_FORM_DISABLED, UI_FORM_FN_ATTR, UI_FORM_FN_CLASSES, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_DISABLED, UI_FORM_FN_HIDDEN, UI_FORM_FN_HINT, UI_FORM_FN_LABEL, UI_FORM_FN_OPTIONS, UI_FORM_FN_PLACEHOLDER, UI_FORM_FN_PREFIX, UI_FORM_FN_READONLY, UI_FORM_FN_STYLES, UI_FORM_FN_SUBMIT_DISABLED, UI_FORM_FN_SUBMIT_TEXT, UI_FORM_FN_TITLE, UI_FORM_FN_VALUE, UI_FORM_GRID_COL_SPAN, UI_FORM_GRID_ROW_SPAN, UI_FORM_HIDDEN, UI_FORM_HINT, UI_FORM_LABEL_SINGULAR, UI_FORM_OPTIONS, UI_FORM_ORDER, UI_FORM_PLACEHOLDER, UI_FORM_PREFIX, UI_FORM_PREFIX_ICON, UI_FORM_PREFIX_REF, UI_FORM_STYLES, UI_FORM_SUBMIT_TEXT, UI_FORM_SUFFIX, UI_FORM_SUFFIX_ICON, UI_FORM_SUFFIX_REF, UI_FORM_TYPE, UI_FORM_VALIDATE, UI_NAV_GROUP, UI_NAV_HIDDEN, UI_NAV_ORDER, UI_TABLE_ATTR, UI_TABLE_CLASSES, UI_TABLE_COMPONENT, UI_TABLE_EXCLUDE, UI_TABLE_FN_ATTR, UI_TABLE_FN_CLASSES, UI_TABLE_FN_PREFIX, UI_TABLE_FN_STYLES, UI_TABLE_ORDER, UI_TABLE_SELECT_WITH, UI_TABLE_STYLES, UI_TABLE_TYPE, UI_TABLE_WIDTH, UI_TYPE, ValueHelpClient, type ValueHelpInfo, type ValueHelpResult, type ValueHelpSearchOptions, WF_ACTION_WITH_DATA, applyFormChanges, asArray, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, buildGridClasses, buildModelRoutes, buildUnionVariants, collectDirtyPaths, createFieldValidator, createFormData, createFormDef, createFormValueResolver, createTableDef, deepClone, deepEqual, defaultResolver, deleteByPath, detectUnionVariant, enforceScale, extractLiteralOptions, extractMeasurement, extractValueHelp, formatDecimalForDisplay, getByPath, getColumn, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getDeclaredFormActions, getDefaultClientFactory, getDefaultValidatorPlugins, getFieldMeta, getFilterableColumns, getFormValidator, getMetaEntry, getResolver, getSortableColumns, getThousandsSeparator, groupInteger, hasComputedAnnotations, hasFieldMeta, isArrayField, isFieldHidden, isObjectField, isPathDirty, isPureLiteralUnion, isTupleField, isUnionField, iteratePathAncestors, joinDecimalString, joinPath, mergeErrorMaps, navigateHrefFor, omitPaths, optKey, optLabel, parseColSpan, parseDecimalInput, parseRowSpan, parseStaticAttrs, parseStaticOptions, resetDefaultClientFactory, resetMetaCache, resetValueHelpCache, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptions, resolveSingularLabel, resolveStatic, resolveValueHelp, setByPath, setDefaultClientFactory, setDefaultValidatorPlugins, setResolver, splitDecimalString, str, unionVariantChanged, valueHelpDictPaths };
1539
+ export { type ClientFactory, type CloneUnwrap, type ColumnDef, type ColumnValueKind, type CreateFormDefOptions, type CurrencyDisplay, DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, type DecimalParts, EXPECT_MAX_LENGTH, type FieldMeta, type FieldResolver, type FormActionInfo, type FormArrayFieldDef, type FormDef, type FormDiffOptions, type FormDiffResult, type FormFieldChange, type FormFieldDef, type FormObjectFieldDef, type FormRebaseOptions, type FormRebaseResult, type FormTupleFieldDef, type FormUnionFieldDef, type FormUnionVariant, type FormatDecimalOptions, type GridSpanArgs, type GridSpec, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, type MeasurementInfo, type MetaCacheEntry, type MetaResponse, NUMERIC_VALUE_KINDS, type PaginationControl, type RelationInfo, type ResolvedValueHelp, type SearchIndexInfo, type SortControl, StaticFieldResolver, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TFieldValidatorOptions, type TFormAction, type TFormEntryOptions, type TFormValidatorCallOptions, type TFormValueResolver, type TModelRoute, type TResolveOptions, type TableActionsModel, type TableDef, type TableQueryState, UI_DICT_ATTR, UI_DICT_DESCR, UI_DICT_FILTERABLE, UI_DICT_LABEL, UI_DICT_SEARCHABLE, UI_DICT_SORTABLE, UI_FORM_ACTION, UI_FORM_ATTR, UI_FORM_AUTOCOMPLETE, UI_FORM_CLASSES, UI_FORM_COMPONENT, UI_FORM_DISABLED, UI_FORM_FN_ATTR, UI_FORM_FN_CLASSES, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_DISABLED, UI_FORM_FN_HIDDEN, UI_FORM_FN_HINT, UI_FORM_FN_LABEL, UI_FORM_FN_OPTIONS, UI_FORM_FN_PLACEHOLDER, UI_FORM_FN_PREFIX, UI_FORM_FN_READONLY, UI_FORM_FN_STYLES, UI_FORM_FN_SUBMIT_DISABLED, UI_FORM_FN_SUBMIT_TEXT, UI_FORM_FN_TITLE, UI_FORM_FN_VALUE, UI_FORM_GRID_COL_SPAN, UI_FORM_GRID_ROW_SPAN, UI_FORM_HIDDEN, UI_FORM_HINT, UI_FORM_LABEL_SINGULAR, UI_FORM_OPTIONS, UI_FORM_ORDER, UI_FORM_PLACEHOLDER, UI_FORM_PREFIX, UI_FORM_PREFIX_ICON, UI_FORM_PREFIX_REF, UI_FORM_STYLES, UI_FORM_SUBMIT_TEXT, UI_FORM_SUFFIX, UI_FORM_SUFFIX_ICON, UI_FORM_SUFFIX_REF, UI_FORM_TYPE, UI_FORM_VALIDATE, UI_NAV_GROUP, UI_NAV_HIDDEN, UI_NAV_ORDER, UI_TABLE_ATTR, UI_TABLE_CLASSES, UI_TABLE_COMPONENT, UI_TABLE_EXCLUDE, UI_TABLE_FN_ATTR, UI_TABLE_FN_CLASSES, UI_TABLE_FN_PREFIX, UI_TABLE_FN_STYLES, UI_TABLE_ORDER, UI_TABLE_SELECT_WITH, UI_TABLE_STYLES, UI_TABLE_TYPE, UI_TABLE_WIDTH, UI_TYPE, ValueHelpClient, type ValueHelpInfo, type ValueHelpResult, type ValueHelpSearchOptions, WF_ACTION_WITH_DATA, applyFormChanges, asArray, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, buildGridClasses, buildModelRoutes, buildUnionVariants, collectDirtyPaths, createFieldValidator, createFormData, createFormDef, createFormValueResolver, createTableDef, deepClone, deepEqual, defaultResolver, deleteByPath, detectUnionVariant, enforceScale, escapeRegex, extractFieldLiteralOptions, extractLiteralOptions, extractMeasurement, extractValueHelp, fetchDistinctValues, formatDecimalForDisplay, getByPath, getColumn, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getDeclaredFormActions, getDefaultClientFactory, getDefaultValidatorPlugins, getFieldMeta, getFilterableColumns, getFormValidator, getMetaEntry, getResolver, getSortableColumns, getThousandsSeparator, groupInteger, hasComputedAnnotations, hasFieldMeta, isArrayField, isFieldHidden, isObjectField, isPathDirty, isPickerDeclined, isPureLiteralUnion, isTupleField, isUnionField, iteratePathAncestors, joinDecimalString, joinPath, mergeErrorMaps, navigateHrefFor, omitPaths, optKey, optLabel, optionLabel, optionValue, parseColSpan, parseDecimalInput, parseRowSpan, parseStaticAttrs, parseStaticOptions, resetDefaultClientFactory, resetMetaCache, resetValueHelpCache, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptions, resolveSingularLabel, resolveStatic, resolveValueHelp, setByPath, setDefaultClientFactory, setDefaultValidatorPlugins, setResolver, splitDecimalString, str, unionVariantChanged, valueHelpDictPaths };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { TAtscriptAnnotatedType, TAtscriptDataType, TSerializedAnnotatedType, TValidatorOptions, TValidatorPlugin } from "@atscript/typescript/utils";
2
- import { Client, TCrudOp, TCrudPermissions, TCrudPermissions as TCrudPermissions$1, TDbActionInfo, TDbActionInfo as TDbActionInfo$1, TDbActionIntent, TDbActionLevel, TDbActionProcessor } from "@atscript/db-client";
2
+ import { Client, FilterExpr, TCrudOp, TCrudPermissions, TCrudPermissions as TCrudPermissions$1, TDbActionInfo, TDbActionInfo as TDbActionInfo$1, TDbActionIntent, TDbActionLevel, TDbActionProcessor } from "@atscript/db-client";
3
3
 
4
4
  //#region src/shared/annotation-keys.d.ts
5
5
  declare const UI_TYPE: "ui.type";
@@ -103,6 +103,16 @@ interface ValueHelpInfo {
103
103
  * This is the value committed to the FK field when the user picks a row.
104
104
  */
105
105
  targetField: string;
106
+ /**
107
+ * Static dictionary scope from `@ui.valueHelp`'s filter — AND'd into every
108
+ * picker query. Since 0.1.148.
109
+ */
110
+ filter?: FilterExpr;
111
+ /**
112
+ * Target fields the filter pins with `=` — constant in the picker, hidden
113
+ * from its columns. Since 0.1.148.
114
+ */
115
+ pinned?: string[];
106
116
  }
107
117
  //#endregion
108
118
  //#region src/form/types.d.ts
@@ -395,6 +405,18 @@ interface ValueHelpSearchOptions {
395
405
  limit?: number;
396
406
  /** Override the computed select fields. */
397
407
  select?: string[];
408
+ /**
409
+ * Static dictionary scope (`ValueHelpInfo.filter`) — AND'd with the search
410
+ * filter and with `$search`. Since 0.1.148.
411
+ */
412
+ filter?: FilterExpr;
413
+ /**
414
+ * The target field the picker commits (`ValueHelpInfo.targetField`). It is
415
+ * selected, and it is the exact-match key of a non-searchable search — a
416
+ * composite-key dictionary's `primaryKeys[0]` is not the value. Default:
417
+ * `primaryKeys[0]`. Since 0.1.148.
418
+ */
419
+ valueField?: string;
398
420
  }
399
421
  interface ValueHelpResult {
400
422
  items: Record<string, unknown>[];
@@ -429,6 +451,16 @@ declare class ValueHelpClient {
429
451
  declare function valueHelpDictPaths(resolved: ResolvedValueHelp): Set<string>;
430
452
  //#endregion
431
453
  //#region src/value-help/extract-literals.d.ts
454
+ /**
455
+ * One literal of a union: `key` / `label` are the string forms the UI keys
456
+ * on; `value` is the typed literal (`true`, `3`, `'a'`) — what a filter or a
457
+ * form must send to the server. `value` since 0.1.148.
458
+ */
459
+ interface LiteralOption {
460
+ key: string;
461
+ label: string;
462
+ value: string | number | boolean;
463
+ }
432
464
  /**
433
465
  * Extracts options from a union of literal types (e.g. 'a' | 'b' | 'c').
434
466
  * Returns undefined if the type is not a pure union of literals.
@@ -437,17 +469,22 @@ declare function valueHelpDictPaths(resolved: ResolvedValueHelp): Set<string>;
437
469
  * into union items and produces synthetic unions containing both individual
438
470
  * literals and the original union type as nested items.
439
471
  */
440
- declare function extractLiteralOptions(prop: TAtscriptAnnotatedType): {
441
- key: string;
442
- label: string;
443
- }[] | undefined;
472
+ declare function extractLiteralOptions(prop: TAtscriptAnnotatedType, outer?: TAtscriptAnnotatedType): LiteralOption[] | undefined;
473
+ /**
474
+ * The literal options of a field: a literal union's, or those of an array of one
475
+ * (`tags: Tag[]`), where the array prop's own `@ui.literalLabel` labels win over the
476
+ * element type's. `undefined` when the field is neither. Since 0.1.148.
477
+ */
478
+ declare function extractFieldLiteralOptions(prop: TAtscriptAnnotatedType): LiteralOption[] | undefined;
444
479
  /** Returns true when the annotated type is a union composed entirely of literal values. */
445
480
  declare function isPureLiteralUnion(prop: TAtscriptAnnotatedType): boolean;
446
481
  //#endregion
447
482
  //#region src/value-help/extract-ref.d.ts
448
483
  /**
449
484
  * Synchronous probe. Returns `{ url, targetField }` for the first link of the
450
- * reference chain starting at `prop` that satisfies all three conditions:
485
+ * reference chain starting at `prop` that carries a `@ui.valueHelp` binding
486
+ * (since 0.1.148 — an explicit binding beats `@db.rel.FK`, and also supplies
487
+ * the static `filter` / `pinned` fields), or that satisfies all three conditions:
451
488
  *
452
489
  * 1. the link carries `@db.rel.FK`,
453
490
  * 2. the link has a `.ref`,
@@ -480,6 +517,19 @@ declare function extractValueHelp(prop: TAtscriptAnnotatedType): ValueHelpInfo |
480
517
  declare function optKey(opt: TFormEntryOptions): string;
481
518
  /** Extracts the display label from an option entry. */
482
519
  declare function optLabel(opt: TFormEntryOptions): string;
520
+ /**
521
+ * The display label of a literal-union column's option (`@ui.literalLabel`) for
522
+ * `value` — `undefined` when the column has no options or none matches. Map-backed
523
+ * per options array, so rendering a table does not scan the options per cell.
524
+ * The one lookup behind the table cell, the filter chips, export and a custom cell.
525
+ * Since 0.1.148.
526
+ */
527
+ declare function optionLabel(column: {
528
+ options?: {
529
+ key: string;
530
+ label: string;
531
+ }[];
532
+ }, value: unknown): string | undefined;
483
533
  /**
484
534
  * Converts raw option annotation value to a normalized array.
485
535
  */
@@ -493,6 +543,43 @@ declare function parseStaticOptions(raw: unknown): TFormEntryOptions[];
493
543
  */
494
544
  declare function resolveOptions(prop: TAtscriptAnnotatedType, scope: Record<string, unknown>): TFormEntryOptions[] | undefined;
495
545
  //#endregion
546
+ //#region src/value-help/distinct-client.d.ts
547
+ interface DistinctValuesOptions {
548
+ /** Search text: a case-insensitive prefix match for strings, an exact match for numbers. */
549
+ text?: string;
550
+ /** Page size. Default: 50. */
551
+ limit?: number;
552
+ /**
553
+ * Rows to skip (the next page of a scrolled picker). Distinct values are only
554
+ * stable across pages when ordered, so a caller pages only with `sortable`.
555
+ */
556
+ skip?: number;
557
+ /** Send `$sort` on the grouped field — only when the server lists it as sortable. */
558
+ sortable?: boolean;
559
+ /** The field stores numbers: search is an exact match and non-numeric text finds nothing. */
560
+ numeric?: boolean;
561
+ /** Extra scope AND'd into the query (e.g. the table's `forceFilters`). */
562
+ filter?: FilterExpr;
563
+ }
564
+ /**
565
+ * `true` for a 4xx answer — the server declined this picker (gate, ARBAC, unknown field).
566
+ * @internal Shared with `@atscript/vue-table`.
567
+ */
568
+ declare function isPickerDeclined(err: unknown): boolean;
569
+ /**
570
+ * Distinct values of one column of the table behind `client`, via
571
+ * `/query?$groupBy=<field>`. All server gates (hidden field, ARBAC `$groupBy`
572
+ * control, row scope, write-only, encrypted) apply as for any grouped read; a
573
+ * 4xx rejects with a `ClientError` — see {@link isPickerDeclined}.
574
+ * `hasMore` tells whether another page follows.
575
+ *
576
+ * @internal Backs the distinct-values picker of `@atscript/vue-table`.
577
+ */
578
+ declare function fetchDistinctValues(client: Pick<Client, "aggregate">, field: string, opts?: DistinctValuesOptions): Promise<{
579
+ items: unknown[];
580
+ hasMore: boolean;
581
+ }>;
582
+ //#endregion
496
583
  //#region src/form/path-utils.d.ts
497
584
  /**
498
585
  * Joins a dot-separated path prefix with a segment. Empty-safe on both
@@ -1082,6 +1169,19 @@ interface FieldMeta {
1082
1169
  * fields (`CreateFormDefOptions.metaFields`). Since 0.1.147.
1083
1170
  */
1084
1171
  computed?: boolean;
1172
+ /**
1173
+ * Display-only value the controller computes (`@DbDecorations`,
1174
+ * `@atscript/moost-db` 0.1.148+): selectable, never filterable, sortable or
1175
+ * groupable. `createTableDef` turns it into a column from
1176
+ * `MetaResponse.decorations`. Since 0.1.148.
1177
+ */
1178
+ decoration?: boolean;
1179
+ /**
1180
+ * `$groupBy` on this field passes the server's gate (`@atscript/moost-db`
1181
+ * 0.1.148+). Together with `filterable` and `@ui.valueHelp.distinct` it
1182
+ * enables the distinct-values picker. Since 0.1.148.
1183
+ */
1184
+ groupable?: boolean;
1085
1185
  }
1086
1186
  /** Meta response from moost-db `/meta` endpoint. */
1087
1187
  interface MetaResponse {
@@ -1110,6 +1210,11 @@ interface MetaResponse {
1110
1210
  relations: RelationInfo[];
1111
1211
  fields: Record<string, FieldMeta>;
1112
1212
  type: TSerializedAnnotatedType;
1213
+ /**
1214
+ * The controller's declared display-only fields (`@DbDecorations`) as a
1215
+ * serialized plain interface. Absent on older servers. Since 0.1.148.
1216
+ */
1217
+ decorations?: TSerializedAnnotatedType;
1113
1218
  }
1114
1219
  /**
1115
1220
  * Server-declared actions grouped by `level`. Built by `createTableDef` from
@@ -1170,6 +1275,13 @@ interface TableDef {
1170
1275
  searchIndexes: SearchIndexInfo[];
1171
1276
  relations: RelationInfo[];
1172
1277
  }
1278
+ /**
1279
+ * Scalar storage kind of a column's value — what the server's filter guard
1280
+ * checks. `string` / `date` / `isoDate` are `string`, `string.date` and
1281
+ * `string.isoDate`; `timestamp` is `number.timestamp` (epoch ms).
1282
+ * Since 0.1.148.
1283
+ */
1284
+ type ColumnValueKind = "string" | "date" | "isoDate" | "number" | "integer" | "decimal" | "timestamp" | "boolean";
1173
1285
  /** A single column definition — built from field metadata + annotations. */
1174
1286
  interface ColumnDef {
1175
1287
  /** Field path in dot-notation (e.g. 'address.city'). */
@@ -1178,6 +1290,14 @@ interface ColumnDef {
1178
1290
  label: string;
1179
1291
  /** Display type — from @ui.table.type, then @ui.type, then inferred from designType. */
1180
1292
  type: string;
1293
+ /**
1294
+ * Scalar storage kind of the column's value, derived from the atscript type
1295
+ * (a union of one kind counts; arrays, objects, JSON and mixed unions have
1296
+ * none). Filter UIs and the query builder read it to pick the filter kind
1297
+ * and to encode values the way the server's filter guard expects.
1298
+ * Since 0.1.148.
1299
+ */
1300
+ valueKind?: ColumnValueKind;
1181
1301
  /** Named component override from @ui.table.component — looked up in the table components map. */
1182
1302
  component?: string;
1183
1303
  /**
@@ -1209,13 +1329,29 @@ interface ColumnDef {
1209
1329
  maxLen?: number;
1210
1330
  /** Initial column ordering from @ui.table.order (lower = first). */
1211
1331
  order: number;
1212
- /** Enumerated options for union literal types (e.g. 'a' | 'b' | 'c'). */
1332
+ /**
1333
+ * Enumerated options for union literal types (e.g. 'a' | 'b' | 'c'). `value` is
1334
+ * the typed literal (`true`, `3`) — what a filter sends to the server; the
1335
+ * `key` is its string form. `createTableDef` always sets it (since 0.1.148);
1336
+ * a hand-built column may omit it, and the string `key` is used.
1337
+ */
1213
1338
  options?: {
1214
1339
  key: string;
1215
1340
  label: string;
1341
+ value?: string | number | boolean;
1216
1342
  }[];
1217
1343
  /** Value-help info for FK columns (from extractValueHelp). */
1218
1344
  valueHelpInfo?: ValueHelpInfo;
1345
+ /**
1346
+ * Distinct-values picker (`@ui.valueHelp.distinct`): the table's own controller
1347
+ * (`url`) answers the values of `field` via `$groupBy`. Set only when the server
1348
+ * lists the field `filterable` and `groupable` and no dictionary help or literal
1349
+ * options apply — independent of `valueHelpInfo`. Since 0.1.148.
1350
+ */
1351
+ distinct?: {
1352
+ url: string;
1353
+ field: string;
1354
+ };
1219
1355
  /** Literal currency code from `@db.amount.currency 'EUR'`. */
1220
1356
  currencyCode?: string;
1221
1357
  /** Sibling field path from `@db.amount.currency.ref 'fieldName'`. */
@@ -1272,6 +1408,18 @@ interface TableQueryState {
1272
1408
  */
1273
1409
  declare function createTableDef(meta: MetaResponse, preDeserializedType?: TAtscriptAnnotatedType): TableDef;
1274
1410
  //#endregion
1411
+ //#region src/table/value-kind.d.ts
1412
+ /** Storage kinds that hold plain numbers (a `timestamp` is epoch ms, but filters treat it as a date). */
1413
+ declare const NUMERIC_VALUE_KINDS: ReadonlySet<ColumnValueKind>;
1414
+ /**
1415
+ * The typed value of one of a column's `options` — the literal itself
1416
+ * (`true`, `3`, `'a'`), falling back to the string `key` for a hand-built
1417
+ * column that has no `value`.
1418
+ *
1419
+ * @internal Shared with `@atscript/vue-table`.
1420
+ */
1421
+ declare function optionValue(option: NonNullable<ColumnDef["options"]>[number]): string | number | boolean;
1422
+ //#endregion
1275
1423
  //#region src/client-factory.d.ts
1276
1424
  /**
1277
1425
  * Factory that creates a `Client` for a given URL.
@@ -1317,6 +1465,8 @@ declare function getMetaEntry(url: string, factory?: ClientFactory): MetaCacheEn
1317
1465
  declare function resetMetaCache(): void;
1318
1466
  //#endregion
1319
1467
  //#region src/shared/str.d.ts
1468
+ /** Escape special regex characters in user input for safe embedding in a `$regex` filter. */
1469
+ declare function escapeRegex(input: string): string;
1320
1470
  /** Safely convert an unknown value to a string without triggering no-base-to-string lint errors. */
1321
1471
  declare function str(value: unknown): string;
1322
1472
  //#endregion
@@ -1386,4 +1536,4 @@ interface TModelRoute {
1386
1536
  */
1387
1537
  declare function buildModelRoutes(models: readonly TAtscriptAnnotatedType[]): TModelRoute[];
1388
1538
  //#endregion
1389
- export { type ClientFactory, type CloneUnwrap, type ColumnDef, type CreateFormDefOptions, type CurrencyDisplay, DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, type DecimalParts, EXPECT_MAX_LENGTH, type FieldMeta, type FieldResolver, type FormActionInfo, type FormArrayFieldDef, type FormDef, type FormDiffOptions, type FormDiffResult, type FormFieldChange, type FormFieldDef, type FormObjectFieldDef, type FormRebaseOptions, type FormRebaseResult, type FormTupleFieldDef, type FormUnionFieldDef, type FormUnionVariant, type FormatDecimalOptions, type GridSpanArgs, type GridSpec, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, type MeasurementInfo, type MetaCacheEntry, type MetaResponse, type PaginationControl, type RelationInfo, type ResolvedValueHelp, type SearchIndexInfo, type SortControl, StaticFieldResolver, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TFieldValidatorOptions, type TFormAction, type TFormEntryOptions, type TFormValidatorCallOptions, type TFormValueResolver, type TModelRoute, type TResolveOptions, type TableActionsModel, type TableDef, type TableQueryState, UI_DICT_ATTR, UI_DICT_DESCR, UI_DICT_FILTERABLE, UI_DICT_LABEL, UI_DICT_SEARCHABLE, UI_DICT_SORTABLE, UI_FORM_ACTION, UI_FORM_ATTR, UI_FORM_AUTOCOMPLETE, UI_FORM_CLASSES, UI_FORM_COMPONENT, UI_FORM_DISABLED, UI_FORM_FN_ATTR, UI_FORM_FN_CLASSES, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_DISABLED, UI_FORM_FN_HIDDEN, UI_FORM_FN_HINT, UI_FORM_FN_LABEL, UI_FORM_FN_OPTIONS, UI_FORM_FN_PLACEHOLDER, UI_FORM_FN_PREFIX, UI_FORM_FN_READONLY, UI_FORM_FN_STYLES, UI_FORM_FN_SUBMIT_DISABLED, UI_FORM_FN_SUBMIT_TEXT, UI_FORM_FN_TITLE, UI_FORM_FN_VALUE, UI_FORM_GRID_COL_SPAN, UI_FORM_GRID_ROW_SPAN, UI_FORM_HIDDEN, UI_FORM_HINT, UI_FORM_LABEL_SINGULAR, UI_FORM_OPTIONS, UI_FORM_ORDER, UI_FORM_PLACEHOLDER, UI_FORM_PREFIX, UI_FORM_PREFIX_ICON, UI_FORM_PREFIX_REF, UI_FORM_STYLES, UI_FORM_SUBMIT_TEXT, UI_FORM_SUFFIX, UI_FORM_SUFFIX_ICON, UI_FORM_SUFFIX_REF, UI_FORM_TYPE, UI_FORM_VALIDATE, UI_NAV_GROUP, UI_NAV_HIDDEN, UI_NAV_ORDER, UI_TABLE_ATTR, UI_TABLE_CLASSES, UI_TABLE_COMPONENT, UI_TABLE_EXCLUDE, UI_TABLE_FN_ATTR, UI_TABLE_FN_CLASSES, UI_TABLE_FN_PREFIX, UI_TABLE_FN_STYLES, UI_TABLE_ORDER, UI_TABLE_SELECT_WITH, UI_TABLE_STYLES, UI_TABLE_TYPE, UI_TABLE_WIDTH, UI_TYPE, ValueHelpClient, type ValueHelpInfo, type ValueHelpResult, type ValueHelpSearchOptions, WF_ACTION_WITH_DATA, applyFormChanges, asArray, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, buildGridClasses, buildModelRoutes, buildUnionVariants, collectDirtyPaths, createFieldValidator, createFormData, createFormDef, createFormValueResolver, createTableDef, deepClone, deepEqual, defaultResolver, deleteByPath, detectUnionVariant, enforceScale, extractLiteralOptions, extractMeasurement, extractValueHelp, formatDecimalForDisplay, getByPath, getColumn, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getDeclaredFormActions, getDefaultClientFactory, getDefaultValidatorPlugins, getFieldMeta, getFilterableColumns, getFormValidator, getMetaEntry, getResolver, getSortableColumns, getThousandsSeparator, groupInteger, hasComputedAnnotations, hasFieldMeta, isArrayField, isFieldHidden, isObjectField, isPathDirty, isPureLiteralUnion, isTupleField, isUnionField, iteratePathAncestors, joinDecimalString, joinPath, mergeErrorMaps, navigateHrefFor, omitPaths, optKey, optLabel, parseColSpan, parseDecimalInput, parseRowSpan, parseStaticAttrs, parseStaticOptions, resetDefaultClientFactory, resetMetaCache, resetValueHelpCache, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptions, resolveSingularLabel, resolveStatic, resolveValueHelp, setByPath, setDefaultClientFactory, setDefaultValidatorPlugins, setResolver, splitDecimalString, str, unionVariantChanged, valueHelpDictPaths };
1539
+ export { type ClientFactory, type CloneUnwrap, type ColumnDef, type ColumnValueKind, type CreateFormDefOptions, type CurrencyDisplay, DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, type DecimalParts, EXPECT_MAX_LENGTH, type FieldMeta, type FieldResolver, type FormActionInfo, type FormArrayFieldDef, type FormDef, type FormDiffOptions, type FormDiffResult, type FormFieldChange, type FormFieldDef, type FormObjectFieldDef, type FormRebaseOptions, type FormRebaseResult, type FormTupleFieldDef, type FormUnionFieldDef, type FormUnionVariant, type FormatDecimalOptions, type GridSpanArgs, type GridSpec, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, type MeasurementInfo, type MetaCacheEntry, type MetaResponse, NUMERIC_VALUE_KINDS, type PaginationControl, type RelationInfo, type ResolvedValueHelp, type SearchIndexInfo, type SortControl, StaticFieldResolver, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TFieldValidatorOptions, type TFormAction, type TFormEntryOptions, type TFormValidatorCallOptions, type TFormValueResolver, type TModelRoute, type TResolveOptions, type TableActionsModel, type TableDef, type TableQueryState, UI_DICT_ATTR, UI_DICT_DESCR, UI_DICT_FILTERABLE, UI_DICT_LABEL, UI_DICT_SEARCHABLE, UI_DICT_SORTABLE, UI_FORM_ACTION, UI_FORM_ATTR, UI_FORM_AUTOCOMPLETE, UI_FORM_CLASSES, UI_FORM_COMPONENT, UI_FORM_DISABLED, UI_FORM_FN_ATTR, UI_FORM_FN_CLASSES, UI_FORM_FN_DESCRIPTION, UI_FORM_FN_DISABLED, UI_FORM_FN_HIDDEN, UI_FORM_FN_HINT, UI_FORM_FN_LABEL, UI_FORM_FN_OPTIONS, UI_FORM_FN_PLACEHOLDER, UI_FORM_FN_PREFIX, UI_FORM_FN_READONLY, UI_FORM_FN_STYLES, UI_FORM_FN_SUBMIT_DISABLED, UI_FORM_FN_SUBMIT_TEXT, UI_FORM_FN_TITLE, UI_FORM_FN_VALUE, UI_FORM_GRID_COL_SPAN, UI_FORM_GRID_ROW_SPAN, UI_FORM_HIDDEN, UI_FORM_HINT, UI_FORM_LABEL_SINGULAR, UI_FORM_OPTIONS, UI_FORM_ORDER, UI_FORM_PLACEHOLDER, UI_FORM_PREFIX, UI_FORM_PREFIX_ICON, UI_FORM_PREFIX_REF, UI_FORM_STYLES, UI_FORM_SUBMIT_TEXT, UI_FORM_SUFFIX, UI_FORM_SUFFIX_ICON, UI_FORM_SUFFIX_REF, UI_FORM_TYPE, UI_FORM_VALIDATE, UI_NAV_GROUP, UI_NAV_HIDDEN, UI_NAV_ORDER, UI_TABLE_ATTR, UI_TABLE_CLASSES, UI_TABLE_COMPONENT, UI_TABLE_EXCLUDE, UI_TABLE_FN_ATTR, UI_TABLE_FN_CLASSES, UI_TABLE_FN_PREFIX, UI_TABLE_FN_STYLES, UI_TABLE_ORDER, UI_TABLE_SELECT_WITH, UI_TABLE_STYLES, UI_TABLE_TYPE, UI_TABLE_WIDTH, UI_TYPE, ValueHelpClient, type ValueHelpInfo, type ValueHelpResult, type ValueHelpSearchOptions, WF_ACTION_WITH_DATA, applyFormChanges, asArray, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, buildGridClasses, buildModelRoutes, buildUnionVariants, collectDirtyPaths, createFieldValidator, createFormData, createFormDef, createFormValueResolver, createTableDef, deepClone, deepEqual, defaultResolver, deleteByPath, detectUnionVariant, enforceScale, escapeRegex, extractFieldLiteralOptions, extractLiteralOptions, extractMeasurement, extractValueHelp, fetchDistinctValues, formatDecimalForDisplay, getByPath, getColumn, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getDeclaredFormActions, getDefaultClientFactory, getDefaultValidatorPlugins, getFieldMeta, getFilterableColumns, getFormValidator, getMetaEntry, getResolver, getSortableColumns, getThousandsSeparator, groupInteger, hasComputedAnnotations, hasFieldMeta, isArrayField, isFieldHidden, isObjectField, isPathDirty, isPickerDeclined, isPureLiteralUnion, isTupleField, isUnionField, iteratePathAncestors, joinDecimalString, joinPath, mergeErrorMaps, navigateHrefFor, omitPaths, optKey, optLabel, optionLabel, optionValue, parseColSpan, parseDecimalInput, parseRowSpan, parseStaticAttrs, parseStaticOptions, resetDefaultClientFactory, resetMetaCache, resetValueHelpCache, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptions, resolveSingularLabel, resolveStatic, resolveValueHelp, setByPath, setDefaultClientFactory, setDefaultValidatorPlugins, setResolver, splitDecimalString, str, unionVariantChanged, valueHelpDictPaths };