@atscript/ui 0.1.152 → 0.1.154
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.cjs +521 -272
- package/dist/index.d.cts +108 -16
- package/dist/index.d.mts +108 -16
- package/dist/index.mjs +518 -274
- package/package.json +10 -10
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, FilterExpr, TCrudOp, TCrudPermissions, TCrudPermissions as TCrudPermissions$1, TDbActionInfo, TDbActionInfo as TDbActionInfo$1, TDbActionIntent, TDbActionLevel, TDbActionProcessor } from "@atscript/db-client";
|
|
2
|
+
import { Client, ClientOptions, 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";
|
|
@@ -171,9 +171,12 @@ interface FormFieldDef {
|
|
|
171
171
|
*/
|
|
172
172
|
valueHelpInfo?: ValueHelpInfo;
|
|
173
173
|
/**
|
|
174
|
-
* Server-
|
|
174
|
+
* Server-owned field: a `@db.column.derived` one (read from the type
|
|
175
|
+
* metadata), a computed view column (`CreateFormDefOptions.metaFields`) or,
|
|
176
|
+
* in an edit form (`CreateFormDefOptions.mode`), an `@db.onUpdate.now` one.
|
|
175
177
|
* Rendered read-only, exempt from form validation and never sent by
|
|
176
|
-
* `buildFormDiff` (the server drops a written value anyway).
|
|
178
|
+
* `buildFormDiff` (the server drops or overwrites a written value anyway).
|
|
179
|
+
* Since 0.1.144.
|
|
177
180
|
*/
|
|
178
181
|
derived?: true;
|
|
179
182
|
}
|
|
@@ -261,6 +264,18 @@ interface CreateFormDefOptions {
|
|
|
261
264
|
metaFields?: Record<string, {
|
|
262
265
|
computed?: boolean;
|
|
263
266
|
}>;
|
|
267
|
+
/**
|
|
268
|
+
* What the form is for. `"edit"` — the form edits a stored row and is sent
|
|
269
|
+
* as an update: an `@db.onUpdate.now` field (`number.timestamp.updated`),
|
|
270
|
+
* which the server sets on every update and whose sent value it ignores, is
|
|
271
|
+
* then marked `derived` — read-only, never validated, never sent. Applies at
|
|
272
|
+
* every depth (embedded objects, objects in arrays), except for a reference
|
|
273
|
+
* to another field, an element of an array of numbers, and below a tuple or
|
|
274
|
+
* a union of several types, where the server does not set the field.
|
|
275
|
+
* `"create"` (default) — the field stays editable: the server only fills it
|
|
276
|
+
* when it has `@db.default.now` and the value is left out. Since 0.1.154.
|
|
277
|
+
*/
|
|
278
|
+
mode?: "create" | "edit";
|
|
264
279
|
}
|
|
265
280
|
/**
|
|
266
281
|
* Converts an ATScript annotated type into a FormDef.
|
|
@@ -270,7 +285,8 @@ interface CreateFormDefOptions {
|
|
|
270
285
|
* with `path: ''`.
|
|
271
286
|
*
|
|
272
287
|
* A `@db.column.derived` field is marked `derived` straight from its metadata;
|
|
273
|
-
* a computed view column, from `opts.metaFields
|
|
288
|
+
* a computed view column, from `opts.metaFields`; an `@db.onUpdate.now` field,
|
|
289
|
+
* when `opts.mode` is `"edit"`.
|
|
274
290
|
*/
|
|
275
291
|
declare function createFormDef(type: TAtscriptAnnotatedType, opts?: CreateFormDefOptions): FormDef;
|
|
276
292
|
/**
|
|
@@ -675,7 +691,7 @@ declare function getDefaultValidatorPlugins(): TValidatorPlugin[];
|
|
|
675
691
|
*
|
|
676
692
|
* Validator is created once and reused on every call.
|
|
677
693
|
* ATScript's @expect.* validation runs automatically; server-managed db
|
|
678
|
-
* fields (
|
|
694
|
+
* fields (every `derived` field, absent `@db.default*` / version) pass.
|
|
679
695
|
* For custom `ui.fn.*` validators, install ui-fns and pass its plugin via `opts.plugins`.
|
|
680
696
|
*/
|
|
681
697
|
declare function getFormValidator(def: FormDef, opts?: Partial<TValidatorOptions>): (callOpts: TFormValidatorCallOptions) => Record<string, string>;
|
|
@@ -1439,22 +1455,37 @@ declare const NUMERIC_VALUE_KINDS: ReadonlySet<ColumnValueKind>;
|
|
|
1439
1455
|
declare function optionValue(option: NonNullable<ColumnDef["options"]>[number]): string | number | boolean;
|
|
1440
1456
|
//#endregion
|
|
1441
1457
|
//#region src/client-factory.d.ts
|
|
1458
|
+
/**
|
|
1459
|
+
* Client options the library itself may ask a {@link ClientFactory} for —
|
|
1460
|
+
* spread them into the `Client` options your factory builds:
|
|
1461
|
+
*
|
|
1462
|
+
* ```ts
|
|
1463
|
+
* setDefaultClientFactory((url, opts) => new Client(url, { ...opts, fetch: myFetch }))
|
|
1464
|
+
* ```
|
|
1465
|
+
*
|
|
1466
|
+
* - `metaKey` — the store key for `/meta` revalidation, set when a table is
|
|
1467
|
+
* given `metaKey` (e.g. the route template of a parametric mount). Since 0.1.153.
|
|
1468
|
+
* - `metaStore` — `false` during server rendering, so `/meta` bodies are never
|
|
1469
|
+
* kept in a process-wide store shared by every viewer. Since 0.1.153.
|
|
1470
|
+
*/
|
|
1471
|
+
type ClientFactoryOptions = Pick<ClientOptions, "metaKey" | "metaStore">;
|
|
1442
1472
|
/**
|
|
1443
1473
|
* Factory that creates a `Client` for a given URL.
|
|
1444
1474
|
*
|
|
1445
1475
|
* Single contract shared by every atscript-ui primitive that needs to talk
|
|
1446
1476
|
* to an atscript-db-compatible endpoint: table composables, FK value-help,
|
|
1447
1477
|
* and any future consumer. Produces a `Client` configured with whatever
|
|
1448
|
-
* transport / auth wiring the host application wants.
|
|
1478
|
+
* transport / auth wiring the host application wants. Forward the optional
|
|
1479
|
+
* second argument ({@link ClientFactoryOptions}) into the `Client` options.
|
|
1449
1480
|
*/
|
|
1450
|
-
type ClientFactory = (url: string) => Client;
|
|
1481
|
+
type ClientFactory = (url: string, options?: ClientFactoryOptions) => Client;
|
|
1451
1482
|
/**
|
|
1452
1483
|
* Override the app-wide default factory. Call once at startup (e.g. in
|
|
1453
1484
|
* `entry-client.ts`) to wire shared fetch, credentials, error handling, etc.
|
|
1454
1485
|
* Every table, value-help picker, and other client consumer will pick it up.
|
|
1455
1486
|
*/
|
|
1456
1487
|
declare function setDefaultClientFactory(factory: ClientFactory): void;
|
|
1457
|
-
/** Current app-wide default factory. Falls back to `new Client(url)`. */
|
|
1488
|
+
/** Current app-wide default factory. Falls back to `new Client(url, options)`. */
|
|
1458
1489
|
declare function getDefaultClientFactory(): ClientFactory;
|
|
1459
1490
|
/** Reset the default factory to the built-in one (primarily for tests). */
|
|
1460
1491
|
declare function resetDefaultClientFactory(): void;
|
|
@@ -1467,10 +1498,17 @@ declare function resetDefaultClientFactory(): void;
|
|
|
1467
1498
|
* `resolveValueHelp` and `useTable` route through it so a given URL triggers
|
|
1468
1499
|
* at most one network round-trip and one `deserializeAnnotatedType`.
|
|
1469
1500
|
*
|
|
1501
|
+
* Byte-identical `/meta` bodies (same `ETag`, e.g. one parametric controller
|
|
1502
|
+
* under different route params) also share the deserialized type and the
|
|
1503
|
+
* `TableDef` across URLs.
|
|
1504
|
+
*
|
|
1505
|
+
* The cache keeps the {@link setMetaCacheMaxEntries} most recently used
|
|
1506
|
+
* URLs; an entry held with {@link retainMetaEntry} is never evicted.
|
|
1507
|
+
*
|
|
1470
1508
|
* `/meta` is projected per viewer, so the cache belongs to one identity
|
|
1471
1509
|
* (`setMetaCacheIdentity`) and exists only in the browser: during server
|
|
1472
1510
|
* rendering one process serves many viewers, so every call builds a fresh,
|
|
1473
|
-
* uncached entry.
|
|
1511
|
+
* uncached entry whose client keeps no `/meta` store.
|
|
1474
1512
|
*/
|
|
1475
1513
|
interface MetaCacheEntry {
|
|
1476
1514
|
client: Client;
|
|
@@ -1479,16 +1517,56 @@ interface MetaCacheEntry {
|
|
|
1479
1517
|
resolved?: Promise<ResolvedValueHelp>;
|
|
1480
1518
|
tableDef?: Promise<TableDef>;
|
|
1481
1519
|
}
|
|
1520
|
+
/** Options for {@link getMetaEntry}. */
|
|
1521
|
+
interface MetaEntryOptions {
|
|
1522
|
+
/**
|
|
1523
|
+
* Key under which the `/meta` revalidation store keeps this URL's `ETag`s
|
|
1524
|
+
* (default: the `/meta` URL). Give every URL of one parametric mount the
|
|
1525
|
+
* route template (e.g. `"/api/db/ticket-issue/:key"`): a new route param
|
|
1526
|
+
* then revalidates against the body already loaded for another one and
|
|
1527
|
+
* costs a `304` instead of the full `/meta`. Forwarded to the
|
|
1528
|
+
* {@link ClientFactory} as `metaKey`; honoured only by the first call per
|
|
1529
|
+
* URL, like the factory. Since 0.1.153.
|
|
1530
|
+
*/
|
|
1531
|
+
metaKey?: string;
|
|
1532
|
+
}
|
|
1482
1533
|
/**
|
|
1483
|
-
* Get or create the cache entry for `url`. First caller's `factory`
|
|
1484
|
-
* `Client`; subsequent callers reuse it. On
|
|
1485
|
-
* evicted so the next call retries.
|
|
1486
|
-
*
|
|
1534
|
+
* Get or create the cache entry for `url`. First caller's `factory` (and
|
|
1535
|
+
* `options.metaKey`) seeds the `Client`; subsequent callers reuse it. On
|
|
1536
|
+
* `meta` rejection, the entry is evicted so the next call retries. A hit
|
|
1537
|
+
* marks the URL most recently used; hold an entry you keep using with
|
|
1538
|
+
* {@link retainMetaEntry}. Without a browser `window` nothing is cached and
|
|
1539
|
+
* the client is asked for `metaStore: false`.
|
|
1487
1540
|
*/
|
|
1488
|
-
declare function getMetaEntry(url: string, factory?: ClientFactory): MetaCacheEntry;
|
|
1541
|
+
declare function getMetaEntry(url: string, factory?: ClientFactory, options?: MetaEntryOptions): MetaCacheEntry;
|
|
1542
|
+
/**
|
|
1543
|
+
* Keep `entry` in the cache while it is in use: a held entry is never
|
|
1544
|
+
* evicted by the size limit ({@link setMetaCacheMaxEntries}), so later
|
|
1545
|
+
* `getMetaEntry` / `resolveValueHelp` calls for its URL keep returning it.
|
|
1546
|
+
* Call the returned function (idempotent) once done — `useTable` and the
|
|
1547
|
+
* form value-help do this for their component's lifetime. A reset still
|
|
1548
|
+
* drops held entries. Since 0.1.154.
|
|
1549
|
+
*/
|
|
1550
|
+
declare function retainMetaEntry(entry: MetaCacheEntry): () => void;
|
|
1551
|
+
/**
|
|
1552
|
+
* How many URLs the meta cache keeps (default `100`). Least recently used
|
|
1553
|
+
* entries beyond it are dropped — entries held with {@link retainMetaEntry}
|
|
1554
|
+
* (every mounted table and form value-help) never are, and may exceed it.
|
|
1555
|
+
* At least `1`; `Infinity` turns the limit off; no argument restores the
|
|
1556
|
+
* default. Since 0.1.154.
|
|
1557
|
+
*/
|
|
1558
|
+
declare function setMetaCacheMaxEntries(max?: number): void;
|
|
1559
|
+
/**
|
|
1560
|
+
* The `TableDef` for a cache entry, built once per entry — and once per
|
|
1561
|
+
* `/meta` `ETag` across entries. Since 0.1.153.
|
|
1562
|
+
*/
|
|
1563
|
+
declare function getMetaTableDef(entry: MetaCacheEntry): Promise<TableDef>;
|
|
1489
1564
|
/**
|
|
1490
1565
|
* Drop every cached `/meta` — including the copy each cached `Client`
|
|
1491
|
-
* memoizes
|
|
1566
|
+
* memoizes and the `@atscript/db-client` meta stores used to revalidate it
|
|
1567
|
+
* (the shared default one and any custom one a factory supplied) — the
|
|
1568
|
+
* value-help searches shared under them, and everything registered through
|
|
1569
|
+
* {@link onMetaCacheReset} (e.g. the table-presets cache). Entries already
|
|
1492
1570
|
* handed out keep working; the next `getMetaEntry` refetches.
|
|
1493
1571
|
*/
|
|
1494
1572
|
declare function resetMetaCache(): void;
|
|
@@ -1498,8 +1576,22 @@ declare function resetMetaCache(): void;
|
|
|
1498
1576
|
* every reload of the current user. A key that differs from the previous
|
|
1499
1577
|
* one resets the cache (`resetMetaCache`); the same key keeps it. `null` /
|
|
1500
1578
|
* `undefined` = anonymous.
|
|
1579
|
+
*
|
|
1580
|
+
* Binding an identity also turns on caches that are only safe when the app
|
|
1581
|
+
* reports sign-in changes, such as the table-presets cache.
|
|
1501
1582
|
*/
|
|
1502
1583
|
declare function setMetaCacheIdentity(key: string | null | undefined): void;
|
|
1584
|
+
/**
|
|
1585
|
+
* The identity last passed to {@link setMetaCacheIdentity}: `undefined` when
|
|
1586
|
+
* the app never bound one, `null` for anonymous. Since 0.1.153.
|
|
1587
|
+
*/
|
|
1588
|
+
declare function getMetaCacheIdentity(): string | null | undefined;
|
|
1589
|
+
/**
|
|
1590
|
+
* Run `listener` on every {@link resetMetaCache} (and so on every identity
|
|
1591
|
+
* change). For caches that belong to the signed-in viewer. Returns an
|
|
1592
|
+
* unsubscribe function. Since 0.1.153.
|
|
1593
|
+
*/
|
|
1594
|
+
declare function onMetaCacheReset(listener: () => void): () => void;
|
|
1503
1595
|
//#endregion
|
|
1504
1596
|
//#region src/shared/str.d.ts
|
|
1505
1597
|
/** Escape special regex characters in user input for safe embedding in a `$regex` filter. */
|
|
@@ -1573,4 +1665,4 @@ interface TModelRoute {
|
|
|
1573
1665
|
*/
|
|
1574
1666
|
declare function buildModelRoutes(models: readonly TAtscriptAnnotatedType[]): TModelRoute[];
|
|
1575
1667
|
//#endregion
|
|
1576
|
-
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, invalidateValueHelpCache, 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, setMetaCacheIdentity, setResolver, setValueHelpCacheTtl, splitDecimalString, str, unionVariantChanged, valueHelpDictPaths };
|
|
1668
|
+
export { type ClientFactory, type ClientFactoryOptions, 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 MetaEntryOptions, 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, getMetaCacheIdentity, getMetaEntry, getMetaTableDef, getResolver, getSortableColumns, getThousandsSeparator, groupInteger, hasComputedAnnotations, hasFieldMeta, invalidateValueHelpCache, isArrayField, isFieldHidden, isObjectField, isPathDirty, isPickerDeclined, isPureLiteralUnion, isTupleField, isUnionField, iteratePathAncestors, joinDecimalString, joinPath, mergeErrorMaps, navigateHrefFor, omitPaths, onMetaCacheReset, optKey, optLabel, optionLabel, optionValue, parseColSpan, parseDecimalInput, parseRowSpan, parseStaticAttrs, parseStaticOptions, resetDefaultClientFactory, resetMetaCache, resetValueHelpCache, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptions, resolveSingularLabel, resolveStatic, resolveValueHelp, retainMetaEntry, setByPath, setDefaultClientFactory, setDefaultValidatorPlugins, setMetaCacheIdentity, setMetaCacheMaxEntries, setResolver, setValueHelpCacheTtl, 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, FilterExpr, TCrudOp, TCrudPermissions, TCrudPermissions as TCrudPermissions$1, TDbActionInfo, TDbActionInfo as TDbActionInfo$1, TDbActionIntent, TDbActionLevel, TDbActionProcessor } from "@atscript/db-client";
|
|
2
|
+
import { Client, ClientOptions, 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";
|
|
@@ -171,9 +171,12 @@ interface FormFieldDef {
|
|
|
171
171
|
*/
|
|
172
172
|
valueHelpInfo?: ValueHelpInfo;
|
|
173
173
|
/**
|
|
174
|
-
* Server-
|
|
174
|
+
* Server-owned field: a `@db.column.derived` one (read from the type
|
|
175
|
+
* metadata), a computed view column (`CreateFormDefOptions.metaFields`) or,
|
|
176
|
+
* in an edit form (`CreateFormDefOptions.mode`), an `@db.onUpdate.now` one.
|
|
175
177
|
* Rendered read-only, exempt from form validation and never sent by
|
|
176
|
-
* `buildFormDiff` (the server drops a written value anyway).
|
|
178
|
+
* `buildFormDiff` (the server drops or overwrites a written value anyway).
|
|
179
|
+
* Since 0.1.144.
|
|
177
180
|
*/
|
|
178
181
|
derived?: true;
|
|
179
182
|
}
|
|
@@ -261,6 +264,18 @@ interface CreateFormDefOptions {
|
|
|
261
264
|
metaFields?: Record<string, {
|
|
262
265
|
computed?: boolean;
|
|
263
266
|
}>;
|
|
267
|
+
/**
|
|
268
|
+
* What the form is for. `"edit"` — the form edits a stored row and is sent
|
|
269
|
+
* as an update: an `@db.onUpdate.now` field (`number.timestamp.updated`),
|
|
270
|
+
* which the server sets on every update and whose sent value it ignores, is
|
|
271
|
+
* then marked `derived` — read-only, never validated, never sent. Applies at
|
|
272
|
+
* every depth (embedded objects, objects in arrays), except for a reference
|
|
273
|
+
* to another field, an element of an array of numbers, and below a tuple or
|
|
274
|
+
* a union of several types, where the server does not set the field.
|
|
275
|
+
* `"create"` (default) — the field stays editable: the server only fills it
|
|
276
|
+
* when it has `@db.default.now` and the value is left out. Since 0.1.154.
|
|
277
|
+
*/
|
|
278
|
+
mode?: "create" | "edit";
|
|
264
279
|
}
|
|
265
280
|
/**
|
|
266
281
|
* Converts an ATScript annotated type into a FormDef.
|
|
@@ -270,7 +285,8 @@ interface CreateFormDefOptions {
|
|
|
270
285
|
* with `path: ''`.
|
|
271
286
|
*
|
|
272
287
|
* A `@db.column.derived` field is marked `derived` straight from its metadata;
|
|
273
|
-
* a computed view column, from `opts.metaFields
|
|
288
|
+
* a computed view column, from `opts.metaFields`; an `@db.onUpdate.now` field,
|
|
289
|
+
* when `opts.mode` is `"edit"`.
|
|
274
290
|
*/
|
|
275
291
|
declare function createFormDef(type: TAtscriptAnnotatedType, opts?: CreateFormDefOptions): FormDef;
|
|
276
292
|
/**
|
|
@@ -675,7 +691,7 @@ declare function getDefaultValidatorPlugins(): TValidatorPlugin[];
|
|
|
675
691
|
*
|
|
676
692
|
* Validator is created once and reused on every call.
|
|
677
693
|
* ATScript's @expect.* validation runs automatically; server-managed db
|
|
678
|
-
* fields (
|
|
694
|
+
* fields (every `derived` field, absent `@db.default*` / version) pass.
|
|
679
695
|
* For custom `ui.fn.*` validators, install ui-fns and pass its plugin via `opts.plugins`.
|
|
680
696
|
*/
|
|
681
697
|
declare function getFormValidator(def: FormDef, opts?: Partial<TValidatorOptions>): (callOpts: TFormValidatorCallOptions) => Record<string, string>;
|
|
@@ -1439,22 +1455,37 @@ declare const NUMERIC_VALUE_KINDS: ReadonlySet<ColumnValueKind>;
|
|
|
1439
1455
|
declare function optionValue(option: NonNullable<ColumnDef["options"]>[number]): string | number | boolean;
|
|
1440
1456
|
//#endregion
|
|
1441
1457
|
//#region src/client-factory.d.ts
|
|
1458
|
+
/**
|
|
1459
|
+
* Client options the library itself may ask a {@link ClientFactory} for —
|
|
1460
|
+
* spread them into the `Client` options your factory builds:
|
|
1461
|
+
*
|
|
1462
|
+
* ```ts
|
|
1463
|
+
* setDefaultClientFactory((url, opts) => new Client(url, { ...opts, fetch: myFetch }))
|
|
1464
|
+
* ```
|
|
1465
|
+
*
|
|
1466
|
+
* - `metaKey` — the store key for `/meta` revalidation, set when a table is
|
|
1467
|
+
* given `metaKey` (e.g. the route template of a parametric mount). Since 0.1.153.
|
|
1468
|
+
* - `metaStore` — `false` during server rendering, so `/meta` bodies are never
|
|
1469
|
+
* kept in a process-wide store shared by every viewer. Since 0.1.153.
|
|
1470
|
+
*/
|
|
1471
|
+
type ClientFactoryOptions = Pick<ClientOptions, "metaKey" | "metaStore">;
|
|
1442
1472
|
/**
|
|
1443
1473
|
* Factory that creates a `Client` for a given URL.
|
|
1444
1474
|
*
|
|
1445
1475
|
* Single contract shared by every atscript-ui primitive that needs to talk
|
|
1446
1476
|
* to an atscript-db-compatible endpoint: table composables, FK value-help,
|
|
1447
1477
|
* and any future consumer. Produces a `Client` configured with whatever
|
|
1448
|
-
* transport / auth wiring the host application wants.
|
|
1478
|
+
* transport / auth wiring the host application wants. Forward the optional
|
|
1479
|
+
* second argument ({@link ClientFactoryOptions}) into the `Client` options.
|
|
1449
1480
|
*/
|
|
1450
|
-
type ClientFactory = (url: string) => Client;
|
|
1481
|
+
type ClientFactory = (url: string, options?: ClientFactoryOptions) => Client;
|
|
1451
1482
|
/**
|
|
1452
1483
|
* Override the app-wide default factory. Call once at startup (e.g. in
|
|
1453
1484
|
* `entry-client.ts`) to wire shared fetch, credentials, error handling, etc.
|
|
1454
1485
|
* Every table, value-help picker, and other client consumer will pick it up.
|
|
1455
1486
|
*/
|
|
1456
1487
|
declare function setDefaultClientFactory(factory: ClientFactory): void;
|
|
1457
|
-
/** Current app-wide default factory. Falls back to `new Client(url)`. */
|
|
1488
|
+
/** Current app-wide default factory. Falls back to `new Client(url, options)`. */
|
|
1458
1489
|
declare function getDefaultClientFactory(): ClientFactory;
|
|
1459
1490
|
/** Reset the default factory to the built-in one (primarily for tests). */
|
|
1460
1491
|
declare function resetDefaultClientFactory(): void;
|
|
@@ -1467,10 +1498,17 @@ declare function resetDefaultClientFactory(): void;
|
|
|
1467
1498
|
* `resolveValueHelp` and `useTable` route through it so a given URL triggers
|
|
1468
1499
|
* at most one network round-trip and one `deserializeAnnotatedType`.
|
|
1469
1500
|
*
|
|
1501
|
+
* Byte-identical `/meta` bodies (same `ETag`, e.g. one parametric controller
|
|
1502
|
+
* under different route params) also share the deserialized type and the
|
|
1503
|
+
* `TableDef` across URLs.
|
|
1504
|
+
*
|
|
1505
|
+
* The cache keeps the {@link setMetaCacheMaxEntries} most recently used
|
|
1506
|
+
* URLs; an entry held with {@link retainMetaEntry} is never evicted.
|
|
1507
|
+
*
|
|
1470
1508
|
* `/meta` is projected per viewer, so the cache belongs to one identity
|
|
1471
1509
|
* (`setMetaCacheIdentity`) and exists only in the browser: during server
|
|
1472
1510
|
* rendering one process serves many viewers, so every call builds a fresh,
|
|
1473
|
-
* uncached entry.
|
|
1511
|
+
* uncached entry whose client keeps no `/meta` store.
|
|
1474
1512
|
*/
|
|
1475
1513
|
interface MetaCacheEntry {
|
|
1476
1514
|
client: Client;
|
|
@@ -1479,16 +1517,56 @@ interface MetaCacheEntry {
|
|
|
1479
1517
|
resolved?: Promise<ResolvedValueHelp>;
|
|
1480
1518
|
tableDef?: Promise<TableDef>;
|
|
1481
1519
|
}
|
|
1520
|
+
/** Options for {@link getMetaEntry}. */
|
|
1521
|
+
interface MetaEntryOptions {
|
|
1522
|
+
/**
|
|
1523
|
+
* Key under which the `/meta` revalidation store keeps this URL's `ETag`s
|
|
1524
|
+
* (default: the `/meta` URL). Give every URL of one parametric mount the
|
|
1525
|
+
* route template (e.g. `"/api/db/ticket-issue/:key"`): a new route param
|
|
1526
|
+
* then revalidates against the body already loaded for another one and
|
|
1527
|
+
* costs a `304` instead of the full `/meta`. Forwarded to the
|
|
1528
|
+
* {@link ClientFactory} as `metaKey`; honoured only by the first call per
|
|
1529
|
+
* URL, like the factory. Since 0.1.153.
|
|
1530
|
+
*/
|
|
1531
|
+
metaKey?: string;
|
|
1532
|
+
}
|
|
1482
1533
|
/**
|
|
1483
|
-
* Get or create the cache entry for `url`. First caller's `factory`
|
|
1484
|
-
* `Client`; subsequent callers reuse it. On
|
|
1485
|
-
* evicted so the next call retries.
|
|
1486
|
-
*
|
|
1534
|
+
* Get or create the cache entry for `url`. First caller's `factory` (and
|
|
1535
|
+
* `options.metaKey`) seeds the `Client`; subsequent callers reuse it. On
|
|
1536
|
+
* `meta` rejection, the entry is evicted so the next call retries. A hit
|
|
1537
|
+
* marks the URL most recently used; hold an entry you keep using with
|
|
1538
|
+
* {@link retainMetaEntry}. Without a browser `window` nothing is cached and
|
|
1539
|
+
* the client is asked for `metaStore: false`.
|
|
1487
1540
|
*/
|
|
1488
|
-
declare function getMetaEntry(url: string, factory?: ClientFactory): MetaCacheEntry;
|
|
1541
|
+
declare function getMetaEntry(url: string, factory?: ClientFactory, options?: MetaEntryOptions): MetaCacheEntry;
|
|
1542
|
+
/**
|
|
1543
|
+
* Keep `entry` in the cache while it is in use: a held entry is never
|
|
1544
|
+
* evicted by the size limit ({@link setMetaCacheMaxEntries}), so later
|
|
1545
|
+
* `getMetaEntry` / `resolveValueHelp` calls for its URL keep returning it.
|
|
1546
|
+
* Call the returned function (idempotent) once done — `useTable` and the
|
|
1547
|
+
* form value-help do this for their component's lifetime. A reset still
|
|
1548
|
+
* drops held entries. Since 0.1.154.
|
|
1549
|
+
*/
|
|
1550
|
+
declare function retainMetaEntry(entry: MetaCacheEntry): () => void;
|
|
1551
|
+
/**
|
|
1552
|
+
* How many URLs the meta cache keeps (default `100`). Least recently used
|
|
1553
|
+
* entries beyond it are dropped — entries held with {@link retainMetaEntry}
|
|
1554
|
+
* (every mounted table and form value-help) never are, and may exceed it.
|
|
1555
|
+
* At least `1`; `Infinity` turns the limit off; no argument restores the
|
|
1556
|
+
* default. Since 0.1.154.
|
|
1557
|
+
*/
|
|
1558
|
+
declare function setMetaCacheMaxEntries(max?: number): void;
|
|
1559
|
+
/**
|
|
1560
|
+
* The `TableDef` for a cache entry, built once per entry — and once per
|
|
1561
|
+
* `/meta` `ETag` across entries. Since 0.1.153.
|
|
1562
|
+
*/
|
|
1563
|
+
declare function getMetaTableDef(entry: MetaCacheEntry): Promise<TableDef>;
|
|
1489
1564
|
/**
|
|
1490
1565
|
* Drop every cached `/meta` — including the copy each cached `Client`
|
|
1491
|
-
* memoizes
|
|
1566
|
+
* memoizes and the `@atscript/db-client` meta stores used to revalidate it
|
|
1567
|
+
* (the shared default one and any custom one a factory supplied) — the
|
|
1568
|
+
* value-help searches shared under them, and everything registered through
|
|
1569
|
+
* {@link onMetaCacheReset} (e.g. the table-presets cache). Entries already
|
|
1492
1570
|
* handed out keep working; the next `getMetaEntry` refetches.
|
|
1493
1571
|
*/
|
|
1494
1572
|
declare function resetMetaCache(): void;
|
|
@@ -1498,8 +1576,22 @@ declare function resetMetaCache(): void;
|
|
|
1498
1576
|
* every reload of the current user. A key that differs from the previous
|
|
1499
1577
|
* one resets the cache (`resetMetaCache`); the same key keeps it. `null` /
|
|
1500
1578
|
* `undefined` = anonymous.
|
|
1579
|
+
*
|
|
1580
|
+
* Binding an identity also turns on caches that are only safe when the app
|
|
1581
|
+
* reports sign-in changes, such as the table-presets cache.
|
|
1501
1582
|
*/
|
|
1502
1583
|
declare function setMetaCacheIdentity(key: string | null | undefined): void;
|
|
1584
|
+
/**
|
|
1585
|
+
* The identity last passed to {@link setMetaCacheIdentity}: `undefined` when
|
|
1586
|
+
* the app never bound one, `null` for anonymous. Since 0.1.153.
|
|
1587
|
+
*/
|
|
1588
|
+
declare function getMetaCacheIdentity(): string | null | undefined;
|
|
1589
|
+
/**
|
|
1590
|
+
* Run `listener` on every {@link resetMetaCache} (and so on every identity
|
|
1591
|
+
* change). For caches that belong to the signed-in viewer. Returns an
|
|
1592
|
+
* unsubscribe function. Since 0.1.153.
|
|
1593
|
+
*/
|
|
1594
|
+
declare function onMetaCacheReset(listener: () => void): () => void;
|
|
1503
1595
|
//#endregion
|
|
1504
1596
|
//#region src/shared/str.d.ts
|
|
1505
1597
|
/** Escape special regex characters in user input for safe embedding in a `$regex` filter. */
|
|
@@ -1573,4 +1665,4 @@ interface TModelRoute {
|
|
|
1573
1665
|
*/
|
|
1574
1666
|
declare function buildModelRoutes(models: readonly TAtscriptAnnotatedType[]): TModelRoute[];
|
|
1575
1667
|
//#endregion
|
|
1576
|
-
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, invalidateValueHelpCache, 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, setMetaCacheIdentity, setResolver, setValueHelpCacheTtl, splitDecimalString, str, unionVariantChanged, valueHelpDictPaths };
|
|
1668
|
+
export { type ClientFactory, type ClientFactoryOptions, 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 MetaEntryOptions, 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, getMetaCacheIdentity, getMetaEntry, getMetaTableDef, getResolver, getSortableColumns, getThousandsSeparator, groupInteger, hasComputedAnnotations, hasFieldMeta, invalidateValueHelpCache, isArrayField, isFieldHidden, isObjectField, isPathDirty, isPickerDeclined, isPureLiteralUnion, isTupleField, isUnionField, iteratePathAncestors, joinDecimalString, joinPath, mergeErrorMaps, navigateHrefFor, omitPaths, onMetaCacheReset, optKey, optLabel, optionLabel, optionValue, parseColSpan, parseDecimalInput, parseRowSpan, parseStaticAttrs, parseStaticOptions, resetDefaultClientFactory, resetMetaCache, resetValueHelpCache, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptions, resolveSingularLabel, resolveStatic, resolveValueHelp, retainMetaEntry, setByPath, setDefaultClientFactory, setDefaultValidatorPlugins, setMetaCacheIdentity, setMetaCacheMaxEntries, setResolver, setValueHelpCacheTtl, splitDecimalString, str, unionVariantChanged, valueHelpDictPaths };
|