@atscript/ui 0.1.207 → 0.1.208

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.
Files changed (86) hide show
  1. package/dist/form/create-form-def.cjs +13 -12
  2. package/dist/form/create-form-def.mjs +14 -13
  3. package/dist/form/decimal-format.cjs +8 -3
  4. package/dist/form/decimal-format.d.cts +8 -2
  5. package/dist/form/decimal-format.d.mts +8 -2
  6. package/dist/form/decimal-format.mjs +8 -3
  7. package/dist/form/form-actions.cjs +9 -0
  8. package/dist/form/form-actions.d.cts +7 -1
  9. package/dist/form/form-actions.d.mts +7 -1
  10. package/dist/form/form-actions.mjs +9 -1
  11. package/dist/form/measurement.cjs +58 -0
  12. package/dist/form/measurement.d.cts +36 -1
  13. package/dist/form/measurement.d.mts +36 -1
  14. package/dist/form/measurement.mjs +57 -2
  15. package/dist/form/omit-derived.cjs +11 -0
  16. package/dist/form/omit-derived.d.cts +8 -1
  17. package/dist/form/omit-derived.d.mts +8 -1
  18. package/dist/form/omit-derived.mjs +11 -1
  19. package/dist/form/optional-mode.cjs +7 -7
  20. package/dist/form/optional-mode.d.cts +2 -1
  21. package/dist/form/optional-mode.d.mts +2 -1
  22. package/dist/form/optional-mode.mjs +8 -8
  23. package/dist/form/types.cjs +5 -0
  24. package/dist/form/types.d.cts +14 -0
  25. package/dist/form/types.d.mts +14 -0
  26. package/dist/form/types.mjs +5 -1
  27. package/dist/form/validate.cjs +56 -5
  28. package/dist/form/validate.d.cts +30 -2
  29. package/dist/form/validate.d.mts +30 -2
  30. package/dist/form/validate.mjs +56 -6
  31. package/dist/index.cjs +24 -3
  32. package/dist/index.d.cts +14 -9
  33. package/dist/index.d.mts +14 -9
  34. package/dist/index.mjs +15 -10
  35. package/dist/plugin/annotations.cjs +1 -1
  36. package/dist/plugin/annotations.mjs +1 -1
  37. package/dist/shared/annotation-keys.d.cts +2 -1
  38. package/dist/shared/annotation-keys.d.mts +2 -1
  39. package/dist/shared/dev.cjs +22 -0
  40. package/dist/shared/dev.d.cts +4 -0
  41. package/dist/shared/dev.d.mts +4 -0
  42. package/dist/shared/dev.mjs +22 -0
  43. package/dist/shared/field-resolver.cjs +21 -1
  44. package/dist/shared/field-resolver.d.cts +15 -1
  45. package/dist/shared/field-resolver.d.mts +15 -1
  46. package/dist/shared/field-resolver.mjs +20 -2
  47. package/dist/shared/merge-filters.cjs +28 -0
  48. package/dist/shared/merge-filters.d.cts +13 -0
  49. package/dist/shared/merge-filters.d.mts +13 -0
  50. package/dist/shared/merge-filters.mjs +28 -0
  51. package/dist/shared/resolve-component.cjs +27 -0
  52. package/dist/shared/resolve-component.d.cts +22 -0
  53. package/dist/shared/resolve-component.d.mts +22 -0
  54. package/dist/shared/resolve-component.mjs +27 -0
  55. package/dist/shared/stable-key.cjs +28 -0
  56. package/dist/shared/stable-key.d.cts +13 -0
  57. package/dist/shared/stable-key.d.mts +13 -0
  58. package/dist/shared/stable-key.mjs +28 -0
  59. package/dist/shared/to-date.cjs +65 -0
  60. package/dist/shared/to-date.d.cts +35 -0
  61. package/dist/shared/to-date.d.mts +35 -0
  62. package/dist/shared/to-date.mjs +64 -0
  63. package/dist/table/create-table-def.cjs +49 -15
  64. package/dist/table/create-table-def.mjs +49 -16
  65. package/dist/table/types.d.cts +15 -13
  66. package/dist/table/types.d.mts +15 -13
  67. package/dist/value-help/distinct-client.cjs +80 -7
  68. package/dist/value-help/distinct-client.d.cts +31 -36
  69. package/dist/value-help/distinct-client.d.mts +31 -36
  70. package/dist/value-help/distinct-client.mjs +80 -7
  71. package/dist/value-help/index.d.mts +2 -2
  72. package/dist/value-help/options.cjs +21 -0
  73. package/dist/value-help/options.d.cts +17 -1
  74. package/dist/value-help/options.d.mts +17 -1
  75. package/dist/value-help/options.mjs +21 -1
  76. package/dist/value-help/resolve.cjs +2 -12
  77. package/dist/value-help/resolve.mjs +3 -13
  78. package/dist/value-help/scope.cjs +3 -7
  79. package/dist/value-help/scope.mjs +3 -7
  80. package/dist/value-help/texts.cjs +7 -4
  81. package/dist/value-help/texts.mjs +7 -4
  82. package/dist/value-help/value-help-client.cjs +5 -3
  83. package/dist/value-help/value-help-client.d.cts +3 -2
  84. package/dist/value-help/value-help-client.d.mts +3 -2
  85. package/dist/value-help/value-help-client.mjs +5 -3
  86. package/package.json +10 -10
package/dist/index.d.cts CHANGED
@@ -1,14 +1,15 @@
1
- import { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, 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_OPTIONAL_MODE, 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_FILL, 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, UI_VALUE_LABEL, WF_ACTION_WITH_DATA } from "./shared/annotation-keys.cjs";
1
+ import { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, EXPECT_ARRAY_UNIQUE_ITEMS, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, 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_OPTIONAL_MODE, 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_FILL, 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, UI_VALUE_LABEL, WF_ACTION_WITH_DATA } from "./shared/annotation-keys.cjs";
2
2
  import { ValueLabel, ValueLabelArrangement, ValueText, arrangeText, codeOf, valueLabelOf } from "./shared/value-label.cjs";
3
3
  import { TFormEntryOptions, ValueHelpInfo } from "./value-help/types.cjs";
4
4
  import { FormArrayFieldDef, FormDef, FormFieldDef, FormObjectFieldDef, FormTupleFieldDef, FormUnionFieldDef, FormUnionVariant, TFormAction, isArrayField, isObjectField, isTupleField, isUnionField } from "./form/types.cjs";
5
5
  import { CreateFormDefOptions, buildUnionVariants, createFormDef } from "./form/create-form-def.cjs";
6
6
  import { TOptionalMode, emptiedValue, getDefaultOptionalMode, resolveOptionalMode, setDefaultOptionalMode } from "./form/optional-mode.cjs";
7
7
  import { normalizeLoadedEmpty } from "./form/loaded-empty.cjs";
8
- import { FormActionInfo, getDeclaredFormActions } from "./form/form-actions.cjs";
8
+ import { FormActionInfo, getDeclaredFormAction, getDeclaredFormActions } from "./form/form-actions.cjs";
9
9
  import { UserTextT, deserializeServedType, fieldText, isServedType, markServedType, userText } from "./i18n/model-texts.cjs";
10
- import { FieldResolver, StaticFieldResolver, TResolveOptions, asArray, defaultResolver, getFieldMeta, getResolver, hasComputedAnnotations, hasFieldMeta, isFieldHidden, parseStaticAttrs, resolveAttrs, resolveFieldProp, resolveFormProp, resolveStatic, setResolver } from "./shared/field-resolver.cjs";
10
+ import { FieldResolver, StaticFieldResolver, TResolveOptions, asArray, defaultResolver, getFieldMeta, getResolver, hasComputedAnnotations, hasFieldMeta, isFieldDisabled, isFieldHidden, isFieldReadonly, parseStaticAttrs, resolveAttrs, resolveFieldProp, resolveFormProp, resolveStatic, setResolver } from "./shared/field-resolver.cjs";
11
11
  import { ClientFactory, ClientFactoryOptions, TypedClientFactory, getDefaultClientFactory, resetDefaultClientFactory, setDefaultClientFactory } from "./client-factory.cjs";
12
+ import { Measurement, MeasurementInfo, extractMeasurement, numberAdornment, refText, resolveMeasurement } from "./form/measurement.cjs";
12
13
  import { ColumnDef, ColumnValueKind, FieldMeta, MetaResponse, PaginationControl, RelationInfo, SearchIndexInfo, SortControl, TableActionsModel, TableDef, TableQueryState } from "./table/types.cjs";
13
14
  import { UiT, UiTextParams, UiTexts, UiTranslate, activateUiTexts, createUiTexts, getUiTexts, onUiLocaleChange, setUiLocale } from "./i18n/ui-texts.cjs";
14
15
  import { MetaCacheEntry, MetaEntryOptions, createMetaClient, getMetaCacheIdentity, getMetaEntry, getMetaTableDef, onMetaCacheReset, resetMetaCache, retainMetaEntry, setMetaCacheIdentity, setMetaCacheMaxEntries } from "./shared/meta-cache.cjs";
@@ -20,16 +21,16 @@ import { DEFAULT_BOOLEAN_LABELS, extractFieldLiteralOptions, extractLiteralOptio
20
21
  import { extractValueHelp, valueHelpKey } from "./value-help/extract-ref.cjs";
21
22
  import { optKey, optLabel, optionLabel, parseStaticOptions, resolveOptions } from "./value-help/resolve-options.cjs";
22
23
  import { ValueHelpFillWrite, ValueHelpScope, valueHelpFills, valueHelpScope } from "./value-help/scope.cjs";
23
- import { VALUE_HELP_OPTIONS_CAP, listsDictionary, valueHelpDropdown, valueHelpOptions, valueHelpRowText } from "./value-help/options.cjs";
24
- import { fetchDistinctValues, isPickerDeclined } from "./value-help/distinct-client.cjs";
24
+ import { VALUE_HELP_OPTIONS_CAP, ValuePickerMode, listsDictionary, valueHelpDropdown, valueHelpOptions, valueHelpRowText, valuePickerMode } from "./value-help/options.cjs";
25
+ import { DistinctPager, DistinctPagerOptions, createDistinctPager, isPickerDeclined } from "./value-help/distinct-client.cjs";
25
26
  import { ValueHelpTextOptions, loadValueHelpTexts, onValueHelpTexts, valueHelpText } from "./value-help/texts.cjs";
26
27
  import { DisplayValueOptions, displayValue } from "./value-help/display-value.cjs";
27
28
  import { TFormValueResolver, createFormData, createFormValueResolver, deleteByPath, detectUnionVariant, getByPath, joinPath, parentPrefix, setByPath } from "./form/path-utils.cjs";
28
29
  import { CloneUnwrap, deepClone } from "./form/clone.cjs";
29
- import { FormValidator, TFieldValidatorOptions, TFormValidatorCallOptions, UI_FORM_VALIDATE_ERROR_CODE, createFieldValidator, getDefaultValidatorPlugins, getFormValidator, isContainerKind, setDefaultValidatorPlugins } from "./form/validate.cjs";
30
+ import { FormValidator, TFieldValidatorOptions, TFormValidatorCallOptions, UI_FORM_VALIDATE_ERROR_CODE, createFieldValidator, getDefaultValidatorPlugins, getFormValidator, isContainerKind, isFieldRequired, setDefaultValidatorPlugins } from "./form/validate.cjs";
30
31
  import { FormDiffOptions, FormDiffResult, FormFieldChange, buildFormDiff, deepEqual } from "./form/diff.cjs";
31
32
  import { omitSkippedNavFields } from "./form/skipped-nav.cjs";
32
- import { omitDerivedFields } from "./form/omit-derived.cjs";
33
+ import { formPayload, omitDerivedFields } from "./form/omit-derived.cjs";
33
34
  import { collectDirtyPaths, isPathDirty } from "./form/dirty.cjs";
34
35
  import { applyFormChanges } from "./form/apply.cjs";
35
36
  import { FormRebaseOptions, FormRebaseResult, buildFormRebase } from "./form/rebase.cjs";
@@ -37,14 +38,18 @@ import { unionVariantChanged } from "./form/union-detect.cjs";
37
38
  import { FORM_ERROR_KEY, buildDescendantErrorCounts, iteratePathAncestors, mergeErrorMaps, omitPaths, validatorErrorsToMap } from "./form/error-utils.cjs";
38
39
  import { DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, GridSpanArgs, GridSpec, buildGridClasses, parseColSpan, parseRowSpan, resolveGridSpec } from "./form/grid.cjs";
39
40
  import { resolveSingularLabel } from "./form/labels.cjs";
40
- import { MeasurementInfo, extractMeasurement } from "./form/measurement.cjs";
41
41
  import { CurrencyDisplay, DecimalParts, FormatDecimalOptions, enforceScale, formatDecimalForDisplay, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getThousandsSeparator, groupInteger, joinDecimalString, parseDecimalInput, splitDecimalString } from "./form/decimal-format.cjs";
42
42
  import { createTableDef } from "./table/create-table-def.cjs";
43
43
  import { NUMERIC_VALUE_KINDS, coerceNumericText, isNumericText, optionValue } from "./table/value-kind.cjs";
44
44
  import { escapeRegex, str } from "./shared/str.cjs";
45
+ import { DEV } from "./shared/dev.cjs";
46
+ import { mergeFilters } from "./shared/merge-filters.cjs";
47
+ import { stableValueKey } from "./shared/stable-key.cjs";
48
+ import { resolveComponent } from "./shared/resolve-component.cjs";
49
+ import { DateValue, toDate, utcDay } from "./shared/to-date.cjs";
45
50
  import { getColumn, getFilterableColumns, getSortableColumns } from "./table/column-resolver.cjs";
46
51
  import { navigateHrefFor } from "./table/navigate-href.cjs";
47
52
  import { TModelRoute, buildModelRoutes } from "./nav/model-routes.cjs";
48
53
  import { ClientLike, TCrudOp, TCrudPermissions, TDbActionInfo, TDbActionIntent, TDbActionLevel, TDbActionProcessor } from "@atscript/db-client";
49
54
  import { compareExact } from "@atscript/db/meta";
50
- export { type ClientFactory, type ClientFactoryOptions, type ClientLike, 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_BOOLEAN_LABELS, DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, type DecimalParts, type DisplayValueOptions, EXPECT_MAX_LENGTH, FORM_ERROR_KEY, 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 FormValidator, 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 TOptionalMode, type TResolveOptions, type TableActionsModel, type TableDef, type TableQueryState, type TypedClientFactory, 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_OPTIONAL_MODE, 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_FORM_VALIDATE_ERROR_CODE, UI_NAV_GROUP, UI_NAV_HIDDEN, UI_NAV_ORDER, UI_TABLE_ATTR, UI_TABLE_CLASSES, UI_TABLE_COMPONENT, UI_TABLE_EXCLUDE, UI_TABLE_FILL, 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, UI_VALUE_LABEL, type UiT, type UiTextParams, type UiTexts, type UiTranslate, type UserTextT, VALUE_HELP_OPTIONS_CAP, ValueHelpClient, type ValueHelpFillWrite, type ValueHelpInfo, type ValueHelpResult, type ValueHelpScope, type ValueHelpSearchOptions, type ValueHelpSource, type ValueHelpSourceOptions, type ValueHelpTextOptions, type ValueLabel, type ValueLabelArrangement, type ValueText, WF_ACTION_WITH_DATA, activateUiTexts, applyFormChanges, arrangeText, asArray, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, buildGridClasses, buildModelRoutes, buildUnionVariants, codeOf, coerceNumericText, collectDirtyPaths, compareExact, createFieldValidator, createFormData, createFormDef, createFormValueResolver, createMetaClient, createTableDef, createUiTexts, deepClone, deepEqual, defaultResolver, deleteByPath, deserializeServedType, detectUnionVariant, displayValue, emptiedValue, enforceScale, escapeRegex, extractFieldLiteralOptions, extractLiteralOptions, extractMeasurement, extractValueHelp, fetchDistinctValues, fieldText, formatDecimalForDisplay, getByPath, getColumn, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getDeclaredFormActions, getDefaultClientFactory, getDefaultOptionalMode, getDefaultValidatorPlugins, getFieldMeta, getFilterableColumns, getFormValidator, getMetaCacheIdentity, getMetaEntry, getMetaTableDef, getResolver, getSortableColumns, getThousandsSeparator, getUiTexts, groupInteger, hasComputedAnnotations, hasFieldMeta, invalidateValueHelpCache, isArrayField, isContainerKind, isFieldHidden, isNumericText, isObjectField, isPathDirty, isPickerDeclined, isPureLiteralUnion, isServedType, isTupleField, isUnionField, iteratePathAncestors, joinDecimalString, joinPath, listsDictionary, loadValueHelpTexts, markServedType, mergeErrorMaps, navigateHrefFor, normalizeLoadedEmpty, omitDerivedFields, omitPaths, omitSkippedNavFields, onMetaCacheReset, onUiLocaleChange, onValueHelpTexts, optKey, optLabel, optionLabel, optionValue, parentPrefix, parseColSpan, parseDecimalInput, parseRowSpan, parseStaticAttrs, parseStaticOptions, resetDefaultClientFactory, resetMetaCache, resetValueHelpCache, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptionalMode, resolveOptions, resolveSingularLabel, resolveStatic, resolveValueHelp, retainMetaEntry, setByPath, setDefaultClientFactory, setDefaultOptionalMode, setDefaultValidatorPlugins, setMetaCacheIdentity, setMetaCacheMaxEntries, setResolver, setUiLocale, setValueHelpCacheTtl, splitDecimalString, str, unionVariantChanged, userText, validatorErrorsToMap, valueHelpColumns, valueHelpDictPaths, valueHelpDropdown, valueHelpFills, valueHelpKey, valueHelpOptions, valueHelpRowText, valueHelpScope, valueHelpSelect, valueHelpSource, valueHelpText, valueLabelOf };
55
+ export { type ClientFactory, type ClientFactoryOptions, type ClientLike, 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_BOOLEAN_LABELS, DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, DEV, type DateValue, type DecimalParts, type DisplayValueOptions, type DistinctPager, type DistinctPagerOptions, EXPECT_ARRAY_UNIQUE_ITEMS, EXPECT_MAX_LENGTH, FORM_ERROR_KEY, 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 FormValidator, type FormatDecimalOptions, type GridSpanArgs, type GridSpec, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, type Measurement, 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 TOptionalMode, type TResolveOptions, type TableActionsModel, type TableDef, type TableQueryState, type TypedClientFactory, 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_OPTIONAL_MODE, 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_FORM_VALIDATE_ERROR_CODE, UI_NAV_GROUP, UI_NAV_HIDDEN, UI_NAV_ORDER, UI_TABLE_ATTR, UI_TABLE_CLASSES, UI_TABLE_COMPONENT, UI_TABLE_EXCLUDE, UI_TABLE_FILL, 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, UI_VALUE_LABEL, type UiT, type UiTextParams, type UiTexts, type UiTranslate, type UserTextT, VALUE_HELP_OPTIONS_CAP, ValueHelpClient, type ValueHelpFillWrite, type ValueHelpInfo, type ValueHelpResult, type ValueHelpScope, type ValueHelpSearchOptions, type ValueHelpSource, type ValueHelpSourceOptions, type ValueHelpTextOptions, type ValueLabel, type ValueLabelArrangement, type ValuePickerMode, type ValueText, WF_ACTION_WITH_DATA, activateUiTexts, applyFormChanges, arrangeText, asArray, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, buildGridClasses, buildModelRoutes, buildUnionVariants, codeOf, coerceNumericText, collectDirtyPaths, compareExact, createDistinctPager, createFieldValidator, createFormData, createFormDef, createFormValueResolver, createMetaClient, createTableDef, createUiTexts, deepClone, deepEqual, defaultResolver, deleteByPath, deserializeServedType, detectUnionVariant, displayValue, emptiedValue, enforceScale, escapeRegex, extractFieldLiteralOptions, extractLiteralOptions, extractMeasurement, extractValueHelp, fieldText, formPayload, formatDecimalForDisplay, getByPath, getColumn, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getDeclaredFormAction, getDeclaredFormActions, getDefaultClientFactory, getDefaultOptionalMode, getDefaultValidatorPlugins, getFieldMeta, getFilterableColumns, getFormValidator, getMetaCacheIdentity, getMetaEntry, getMetaTableDef, getResolver, getSortableColumns, getThousandsSeparator, getUiTexts, groupInteger, hasComputedAnnotations, hasFieldMeta, invalidateValueHelpCache, isArrayField, isContainerKind, isFieldDisabled, isFieldHidden, isFieldReadonly, isFieldRequired, isNumericText, isObjectField, isPathDirty, isPickerDeclined, isPureLiteralUnion, isServedType, isTupleField, isUnionField, iteratePathAncestors, joinDecimalString, joinPath, listsDictionary, loadValueHelpTexts, markServedType, mergeErrorMaps, mergeFilters, navigateHrefFor, normalizeLoadedEmpty, numberAdornment, omitDerivedFields, omitPaths, omitSkippedNavFields, onMetaCacheReset, onUiLocaleChange, onValueHelpTexts, optKey, optLabel, optionLabel, optionValue, parentPrefix, parseColSpan, parseDecimalInput, parseRowSpan, parseStaticAttrs, parseStaticOptions, refText, resetDefaultClientFactory, resetMetaCache, resetValueHelpCache, resolveAttrs, resolveComponent, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveMeasurement, resolveOptionalMode, resolveOptions, resolveSingularLabel, resolveStatic, resolveValueHelp, retainMetaEntry, setByPath, setDefaultClientFactory, setDefaultOptionalMode, setDefaultValidatorPlugins, setMetaCacheIdentity, setMetaCacheMaxEntries, setResolver, setUiLocale, setValueHelpCacheTtl, splitDecimalString, stableValueKey, str, toDate, unionVariantChanged, userText, utcDay, validatorErrorsToMap, valueHelpColumns, valueHelpDictPaths, valueHelpDropdown, valueHelpFills, valueHelpKey, valueHelpOptions, valueHelpRowText, valueHelpScope, valueHelpSelect, valueHelpSource, valueHelpText, valueLabelOf, valuePickerMode };
package/dist/index.d.mts CHANGED
@@ -1,14 +1,15 @@
1
- import { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, 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_OPTIONAL_MODE, 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_FILL, 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, UI_VALUE_LABEL, WF_ACTION_WITH_DATA } from "./shared/annotation-keys.mjs";
1
+ import { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, EXPECT_ARRAY_UNIQUE_ITEMS, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, 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_OPTIONAL_MODE, 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_FILL, 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, UI_VALUE_LABEL, WF_ACTION_WITH_DATA } from "./shared/annotation-keys.mjs";
2
2
  import { ValueLabel, ValueLabelArrangement, ValueText, arrangeText, codeOf, valueLabelOf } from "./shared/value-label.mjs";
3
3
  import { TFormEntryOptions, ValueHelpInfo } from "./value-help/types.mjs";
4
4
  import { FormArrayFieldDef, FormDef, FormFieldDef, FormObjectFieldDef, FormTupleFieldDef, FormUnionFieldDef, FormUnionVariant, TFormAction, isArrayField, isObjectField, isTupleField, isUnionField } from "./form/types.mjs";
5
5
  import { CreateFormDefOptions, buildUnionVariants, createFormDef } from "./form/create-form-def.mjs";
6
6
  import { TOptionalMode, emptiedValue, getDefaultOptionalMode, resolveOptionalMode, setDefaultOptionalMode } from "./form/optional-mode.mjs";
7
7
  import { normalizeLoadedEmpty } from "./form/loaded-empty.mjs";
8
- import { FormActionInfo, getDeclaredFormActions } from "./form/form-actions.mjs";
8
+ import { FormActionInfo, getDeclaredFormAction, getDeclaredFormActions } from "./form/form-actions.mjs";
9
9
  import { UserTextT, deserializeServedType, fieldText, isServedType, markServedType, userText } from "./i18n/model-texts.mjs";
10
- import { FieldResolver, StaticFieldResolver, TResolveOptions, asArray, defaultResolver, getFieldMeta, getResolver, hasComputedAnnotations, hasFieldMeta, isFieldHidden, parseStaticAttrs, resolveAttrs, resolveFieldProp, resolveFormProp, resolveStatic, setResolver } from "./shared/field-resolver.mjs";
10
+ import { FieldResolver, StaticFieldResolver, TResolveOptions, asArray, defaultResolver, getFieldMeta, getResolver, hasComputedAnnotations, hasFieldMeta, isFieldDisabled, isFieldHidden, isFieldReadonly, parseStaticAttrs, resolveAttrs, resolveFieldProp, resolveFormProp, resolveStatic, setResolver } from "./shared/field-resolver.mjs";
11
11
  import { ClientFactory, ClientFactoryOptions, TypedClientFactory, getDefaultClientFactory, resetDefaultClientFactory, setDefaultClientFactory } from "./client-factory.mjs";
12
+ import { Measurement, MeasurementInfo, extractMeasurement, numberAdornment, refText, resolveMeasurement } from "./form/measurement.mjs";
12
13
  import { ColumnDef, ColumnValueKind, FieldMeta, MetaResponse, PaginationControl, RelationInfo, SearchIndexInfo, SortControl, TableActionsModel, TableDef, TableQueryState } from "./table/types.mjs";
13
14
  import { UiT, UiTextParams, UiTexts, UiTranslate, activateUiTexts, createUiTexts, getUiTexts, onUiLocaleChange, setUiLocale } from "./i18n/ui-texts.mjs";
14
15
  import { MetaCacheEntry, MetaEntryOptions, createMetaClient, getMetaCacheIdentity, getMetaEntry, getMetaTableDef, onMetaCacheReset, resetMetaCache, retainMetaEntry, setMetaCacheIdentity, setMetaCacheMaxEntries } from "./shared/meta-cache.mjs";
@@ -20,16 +21,16 @@ import { DEFAULT_BOOLEAN_LABELS, extractFieldLiteralOptions, extractLiteralOptio
20
21
  import { extractValueHelp, valueHelpKey } from "./value-help/extract-ref.mjs";
21
22
  import { optKey, optLabel, optionLabel, parseStaticOptions, resolveOptions } from "./value-help/resolve-options.mjs";
22
23
  import { ValueHelpFillWrite, ValueHelpScope, valueHelpFills, valueHelpScope } from "./value-help/scope.mjs";
23
- import { VALUE_HELP_OPTIONS_CAP, listsDictionary, valueHelpDropdown, valueHelpOptions, valueHelpRowText } from "./value-help/options.mjs";
24
- import { fetchDistinctValues, isPickerDeclined } from "./value-help/distinct-client.mjs";
24
+ import { VALUE_HELP_OPTIONS_CAP, ValuePickerMode, listsDictionary, valueHelpDropdown, valueHelpOptions, valueHelpRowText, valuePickerMode } from "./value-help/options.mjs";
25
+ import { DistinctPager, DistinctPagerOptions, createDistinctPager, isPickerDeclined } from "./value-help/distinct-client.mjs";
25
26
  import { ValueHelpTextOptions, loadValueHelpTexts, onValueHelpTexts, valueHelpText } from "./value-help/texts.mjs";
26
27
  import { DisplayValueOptions, displayValue } from "./value-help/display-value.mjs";
27
28
  import { TFormValueResolver, createFormData, createFormValueResolver, deleteByPath, detectUnionVariant, getByPath, joinPath, parentPrefix, setByPath } from "./form/path-utils.mjs";
28
29
  import { CloneUnwrap, deepClone } from "./form/clone.mjs";
29
- import { FormValidator, TFieldValidatorOptions, TFormValidatorCallOptions, UI_FORM_VALIDATE_ERROR_CODE, createFieldValidator, getDefaultValidatorPlugins, getFormValidator, isContainerKind, setDefaultValidatorPlugins } from "./form/validate.mjs";
30
+ import { FormValidator, TFieldValidatorOptions, TFormValidatorCallOptions, UI_FORM_VALIDATE_ERROR_CODE, createFieldValidator, getDefaultValidatorPlugins, getFormValidator, isContainerKind, isFieldRequired, setDefaultValidatorPlugins } from "./form/validate.mjs";
30
31
  import { FormDiffOptions, FormDiffResult, FormFieldChange, buildFormDiff, deepEqual } from "./form/diff.mjs";
31
32
  import { omitSkippedNavFields } from "./form/skipped-nav.mjs";
32
- import { omitDerivedFields } from "./form/omit-derived.mjs";
33
+ import { formPayload, omitDerivedFields } from "./form/omit-derived.mjs";
33
34
  import { collectDirtyPaths, isPathDirty } from "./form/dirty.mjs";
34
35
  import { applyFormChanges } from "./form/apply.mjs";
35
36
  import { FormRebaseOptions, FormRebaseResult, buildFormRebase } from "./form/rebase.mjs";
@@ -37,14 +38,18 @@ import { unionVariantChanged } from "./form/union-detect.mjs";
37
38
  import { FORM_ERROR_KEY, buildDescendantErrorCounts, iteratePathAncestors, mergeErrorMaps, omitPaths, validatorErrorsToMap } from "./form/error-utils.mjs";
38
39
  import { DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, GridSpanArgs, GridSpec, buildGridClasses, parseColSpan, parseRowSpan, resolveGridSpec } from "./form/grid.mjs";
39
40
  import { resolveSingularLabel } from "./form/labels.mjs";
40
- import { MeasurementInfo, extractMeasurement } from "./form/measurement.mjs";
41
41
  import { CurrencyDisplay, DecimalParts, FormatDecimalOptions, enforceScale, formatDecimalForDisplay, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getThousandsSeparator, groupInteger, joinDecimalString, parseDecimalInput, splitDecimalString } from "./form/decimal-format.mjs";
42
42
  import { createTableDef } from "./table/create-table-def.mjs";
43
43
  import { NUMERIC_VALUE_KINDS, coerceNumericText, isNumericText, optionValue } from "./table/value-kind.mjs";
44
44
  import { escapeRegex, str } from "./shared/str.mjs";
45
+ import { DEV } from "./shared/dev.mjs";
46
+ import { mergeFilters } from "./shared/merge-filters.mjs";
47
+ import { stableValueKey } from "./shared/stable-key.mjs";
48
+ import { resolveComponent } from "./shared/resolve-component.mjs";
49
+ import { DateValue, toDate, utcDay } from "./shared/to-date.mjs";
45
50
  import { getColumn, getFilterableColumns, getSortableColumns } from "./table/column-resolver.mjs";
46
51
  import { navigateHrefFor } from "./table/navigate-href.mjs";
47
52
  import { TModelRoute, buildModelRoutes } from "./nav/model-routes.mjs";
48
53
  import { compareExact } from "@atscript/db/meta";
49
54
  import { ClientLike, TCrudOp, TCrudPermissions, TDbActionInfo, TDbActionIntent, TDbActionLevel, TDbActionProcessor } from "@atscript/db-client";
50
- export { type ClientFactory, type ClientFactoryOptions, type ClientLike, 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_BOOLEAN_LABELS, DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, type DecimalParts, type DisplayValueOptions, EXPECT_MAX_LENGTH, FORM_ERROR_KEY, 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 FormValidator, 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 TOptionalMode, type TResolveOptions, type TableActionsModel, type TableDef, type TableQueryState, type TypedClientFactory, 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_OPTIONAL_MODE, 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_FORM_VALIDATE_ERROR_CODE, UI_NAV_GROUP, UI_NAV_HIDDEN, UI_NAV_ORDER, UI_TABLE_ATTR, UI_TABLE_CLASSES, UI_TABLE_COMPONENT, UI_TABLE_EXCLUDE, UI_TABLE_FILL, 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, UI_VALUE_LABEL, type UiT, type UiTextParams, type UiTexts, type UiTranslate, type UserTextT, VALUE_HELP_OPTIONS_CAP, ValueHelpClient, type ValueHelpFillWrite, type ValueHelpInfo, type ValueHelpResult, type ValueHelpScope, type ValueHelpSearchOptions, type ValueHelpSource, type ValueHelpSourceOptions, type ValueHelpTextOptions, type ValueLabel, type ValueLabelArrangement, type ValueText, WF_ACTION_WITH_DATA, activateUiTexts, applyFormChanges, arrangeText, asArray, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, buildGridClasses, buildModelRoutes, buildUnionVariants, codeOf, coerceNumericText, collectDirtyPaths, compareExact, createFieldValidator, createFormData, createFormDef, createFormValueResolver, createMetaClient, createTableDef, createUiTexts, deepClone, deepEqual, defaultResolver, deleteByPath, deserializeServedType, detectUnionVariant, displayValue, emptiedValue, enforceScale, escapeRegex, extractFieldLiteralOptions, extractLiteralOptions, extractMeasurement, extractValueHelp, fetchDistinctValues, fieldText, formatDecimalForDisplay, getByPath, getColumn, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getDeclaredFormActions, getDefaultClientFactory, getDefaultOptionalMode, getDefaultValidatorPlugins, getFieldMeta, getFilterableColumns, getFormValidator, getMetaCacheIdentity, getMetaEntry, getMetaTableDef, getResolver, getSortableColumns, getThousandsSeparator, getUiTexts, groupInteger, hasComputedAnnotations, hasFieldMeta, invalidateValueHelpCache, isArrayField, isContainerKind, isFieldHidden, isNumericText, isObjectField, isPathDirty, isPickerDeclined, isPureLiteralUnion, isServedType, isTupleField, isUnionField, iteratePathAncestors, joinDecimalString, joinPath, listsDictionary, loadValueHelpTexts, markServedType, mergeErrorMaps, navigateHrefFor, normalizeLoadedEmpty, omitDerivedFields, omitPaths, omitSkippedNavFields, onMetaCacheReset, onUiLocaleChange, onValueHelpTexts, optKey, optLabel, optionLabel, optionValue, parentPrefix, parseColSpan, parseDecimalInput, parseRowSpan, parseStaticAttrs, parseStaticOptions, resetDefaultClientFactory, resetMetaCache, resetValueHelpCache, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptionalMode, resolveOptions, resolveSingularLabel, resolveStatic, resolveValueHelp, retainMetaEntry, setByPath, setDefaultClientFactory, setDefaultOptionalMode, setDefaultValidatorPlugins, setMetaCacheIdentity, setMetaCacheMaxEntries, setResolver, setUiLocale, setValueHelpCacheTtl, splitDecimalString, str, unionVariantChanged, userText, validatorErrorsToMap, valueHelpColumns, valueHelpDictPaths, valueHelpDropdown, valueHelpFills, valueHelpKey, valueHelpOptions, valueHelpRowText, valueHelpScope, valueHelpSelect, valueHelpSource, valueHelpText, valueLabelOf };
55
+ export { type ClientFactory, type ClientFactoryOptions, type ClientLike, 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_BOOLEAN_LABELS, DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, DEV, type DateValue, type DecimalParts, type DisplayValueOptions, type DistinctPager, type DistinctPagerOptions, EXPECT_ARRAY_UNIQUE_ITEMS, EXPECT_MAX_LENGTH, FORM_ERROR_KEY, 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 FormValidator, type FormatDecimalOptions, type GridSpanArgs, type GridSpec, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, type Measurement, 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 TOptionalMode, type TResolveOptions, type TableActionsModel, type TableDef, type TableQueryState, type TypedClientFactory, 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_OPTIONAL_MODE, 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_FORM_VALIDATE_ERROR_CODE, UI_NAV_GROUP, UI_NAV_HIDDEN, UI_NAV_ORDER, UI_TABLE_ATTR, UI_TABLE_CLASSES, UI_TABLE_COMPONENT, UI_TABLE_EXCLUDE, UI_TABLE_FILL, 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, UI_VALUE_LABEL, type UiT, type UiTextParams, type UiTexts, type UiTranslate, type UserTextT, VALUE_HELP_OPTIONS_CAP, ValueHelpClient, type ValueHelpFillWrite, type ValueHelpInfo, type ValueHelpResult, type ValueHelpScope, type ValueHelpSearchOptions, type ValueHelpSource, type ValueHelpSourceOptions, type ValueHelpTextOptions, type ValueLabel, type ValueLabelArrangement, type ValuePickerMode, type ValueText, WF_ACTION_WITH_DATA, activateUiTexts, applyFormChanges, arrangeText, asArray, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, buildGridClasses, buildModelRoutes, buildUnionVariants, codeOf, coerceNumericText, collectDirtyPaths, compareExact, createDistinctPager, createFieldValidator, createFormData, createFormDef, createFormValueResolver, createMetaClient, createTableDef, createUiTexts, deepClone, deepEqual, defaultResolver, deleteByPath, deserializeServedType, detectUnionVariant, displayValue, emptiedValue, enforceScale, escapeRegex, extractFieldLiteralOptions, extractLiteralOptions, extractMeasurement, extractValueHelp, fieldText, formPayload, formatDecimalForDisplay, getByPath, getColumn, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getDeclaredFormAction, getDeclaredFormActions, getDefaultClientFactory, getDefaultOptionalMode, getDefaultValidatorPlugins, getFieldMeta, getFilterableColumns, getFormValidator, getMetaCacheIdentity, getMetaEntry, getMetaTableDef, getResolver, getSortableColumns, getThousandsSeparator, getUiTexts, groupInteger, hasComputedAnnotations, hasFieldMeta, invalidateValueHelpCache, isArrayField, isContainerKind, isFieldDisabled, isFieldHidden, isFieldReadonly, isFieldRequired, isNumericText, isObjectField, isPathDirty, isPickerDeclined, isPureLiteralUnion, isServedType, isTupleField, isUnionField, iteratePathAncestors, joinDecimalString, joinPath, listsDictionary, loadValueHelpTexts, markServedType, mergeErrorMaps, mergeFilters, navigateHrefFor, normalizeLoadedEmpty, numberAdornment, omitDerivedFields, omitPaths, omitSkippedNavFields, onMetaCacheReset, onUiLocaleChange, onValueHelpTexts, optKey, optLabel, optionLabel, optionValue, parentPrefix, parseColSpan, parseDecimalInput, parseRowSpan, parseStaticAttrs, parseStaticOptions, refText, resetDefaultClientFactory, resetMetaCache, resetValueHelpCache, resolveAttrs, resolveComponent, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveMeasurement, resolveOptionalMode, resolveOptions, resolveSingularLabel, resolveStatic, resolveValueHelp, retainMetaEntry, setByPath, setDefaultClientFactory, setDefaultOptionalMode, setDefaultValidatorPlugins, setMetaCacheIdentity, setMetaCacheMaxEntries, setResolver, setUiLocale, setValueHelpCacheTtl, splitDecimalString, stableValueKey, str, toDate, unionVariantChanged, userText, utcDay, validatorErrorsToMap, valueHelpColumns, valueHelpDictPaths, valueHelpDropdown, valueHelpFills, valueHelpKey, valueHelpOptions, valueHelpRowText, valueHelpScope, valueHelpSelect, valueHelpSource, valueHelpText, valueLabelOf, valuePickerMode };
package/dist/index.mjs CHANGED
@@ -1,25 +1,27 @@
1
- import { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, 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_OPTIONAL_MODE, 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_FILL, 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, UI_VALUE_LABEL, WF_ACTION_WITH_DATA } from "./shared/annotation-keys.mjs";
1
+ import { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, EXPECT_ARRAY_UNIQUE_ITEMS, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, 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_OPTIONAL_MODE, 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_FILL, 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, UI_VALUE_LABEL, WF_ACTION_WITH_DATA } from "./shared/annotation-keys.mjs";
2
2
  import { isArrayField, isObjectField, isTupleField, isUnionField } from "./form/types.mjs";
3
3
  import { deserializeServedType, fieldText, isServedType, markServedType, userText } from "./i18n/model-texts.mjs";
4
- import { StaticFieldResolver, asArray, defaultResolver, getFieldMeta, getResolver, hasComputedAnnotations, hasFieldMeta, isFieldHidden, parseStaticAttrs, resolveAttrs, resolveFieldProp, resolveFormProp, resolveStatic, setResolver } from "./shared/field-resolver.mjs";
4
+ import { StaticFieldResolver, asArray, defaultResolver, getFieldMeta, getResolver, hasComputedAnnotations, hasFieldMeta, isFieldDisabled, isFieldHidden, isFieldReadonly, parseStaticAttrs, resolveAttrs, resolveFieldProp, resolveFormProp, resolveStatic, setResolver } from "./shared/field-resolver.mjs";
5
5
  import { activateUiTexts, createUiTexts, getUiTexts, onUiLocaleChange, setUiLocale } from "./i18n/ui-texts.mjs";
6
6
  import { DEFAULT_BOOLEAN_LABELS, extractFieldLiteralOptions, extractLiteralOptions, isPureLiteralUnion } from "./value-help/extract-literals.mjs";
7
7
  import { extractValueHelp, valueHelpKey } from "./value-help/extract-ref.mjs";
8
8
  import { deepClone } from "./form/clone.mjs";
9
9
  import { createFormData, createFormValueResolver, deleteByPath, detectUnionVariant, getByPath, joinPath, parentPrefix, setByPath } from "./form/path-utils.mjs";
10
10
  import { omitSkippedNavFields } from "./form/skipped-nav.mjs";
11
+ import { enforceScale, formatDecimalForDisplay, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getThousandsSeparator, groupInteger, joinDecimalString, parseDecimalInput, splitDecimalString } from "./form/decimal-format.mjs";
12
+ import { extractMeasurement, numberAdornment, refText, resolveMeasurement } from "./form/measurement.mjs";
11
13
  import { buildUnionVariants, createFormDef } from "./form/create-form-def.mjs";
12
14
  import { emptiedValue, getDefaultOptionalMode, resolveOptionalMode, setDefaultOptionalMode } from "./form/optional-mode.mjs";
13
15
  import { normalizeLoadedEmpty } from "./form/loaded-empty.mjs";
14
- import { getDeclaredFormActions } from "./form/form-actions.mjs";
16
+ import { getDeclaredFormAction, getDeclaredFormActions } from "./form/form-actions.mjs";
15
17
  import { valueHelpDictPaths } from "./value-help/dict-paths.mjs";
16
18
  import { optKey, optLabel, optionLabel, parseStaticOptions, resolveOptions } from "./value-help/resolve-options.mjs";
19
+ import { mergeFilters } from "./shared/merge-filters.mjs";
17
20
  import { escapeRegex, str } from "./shared/str.mjs";
18
- import { extractMeasurement } from "./form/measurement.mjs";
19
21
  import { arrangeText, codeOf, valueLabelOf } from "./shared/value-label.mjs";
20
22
  import { createTableDef } from "./table/create-table-def.mjs";
21
23
  import { NUMERIC_VALUE_KINDS, coerceNumericText, isNumericText, optionValue } from "./table/value-kind.mjs";
22
- import { VALUE_HELP_OPTIONS_CAP, listsDictionary, valueHelpDropdown, valueHelpOptions, valueHelpRowText } from "./value-help/options.mjs";
24
+ import { VALUE_HELP_OPTIONS_CAP, listsDictionary, valueHelpDropdown, valueHelpOptions, valueHelpRowText, valuePickerMode } from "./value-help/options.mjs";
23
25
  import { getDefaultClientFactory, resetDefaultClientFactory, setDefaultClientFactory } from "./client-factory.mjs";
24
26
  import { createMetaClient, getMetaCacheIdentity, getMetaEntry, getMetaTableDef, onMetaCacheReset, resetMetaCache, retainMetaEntry, setMetaCacheIdentity, setMetaCacheMaxEntries } from "./shared/meta-cache.mjs";
25
27
  import { resetValueHelpCache, resolveValueHelp } from "./value-help/resolve.mjs";
@@ -27,21 +29,24 @@ import { valueHelpColumns, valueHelpSource } from "./value-help/source.mjs";
27
29
  import { loadValueHelpTexts, onValueHelpTexts, valueHelpText } from "./value-help/texts.mjs";
28
30
  import { ValueHelpClient, invalidateValueHelpCache, setValueHelpCacheTtl, valueHelpSelect } from "./value-help/value-help-client.mjs";
29
31
  import { valueHelpFills, valueHelpScope } from "./value-help/scope.mjs";
30
- import { fetchDistinctValues, isPickerDeclined } from "./value-help/distinct-client.mjs";
32
+ import { stableValueKey } from "./shared/stable-key.mjs";
33
+ import { createDistinctPager, isPickerDeclined } from "./value-help/distinct-client.mjs";
31
34
  import { displayValue } from "./value-help/display-value.mjs";
32
35
  import { FORM_ERROR_KEY, buildDescendantErrorCounts, iteratePathAncestors, mergeErrorMaps, omitPaths, validatorErrorsToMap } from "./form/error-utils.mjs";
33
- import { UI_FORM_VALIDATE_ERROR_CODE, createFieldValidator, getDefaultValidatorPlugins, getFormValidator, isContainerKind, setDefaultValidatorPlugins } from "./form/validate.mjs";
36
+ import { UI_FORM_VALIDATE_ERROR_CODE, createFieldValidator, getDefaultValidatorPlugins, getFormValidator, isContainerKind, isFieldRequired, setDefaultValidatorPlugins } from "./form/validate.mjs";
34
37
  import { buildFormDiff, deepEqual } from "./form/diff.mjs";
35
- import { omitDerivedFields } from "./form/omit-derived.mjs";
38
+ import { formPayload, omitDerivedFields } from "./form/omit-derived.mjs";
36
39
  import { collectDirtyPaths, isPathDirty } from "./form/dirty.mjs";
37
40
  import { applyFormChanges } from "./form/apply.mjs";
38
41
  import { buildFormRebase } from "./form/rebase.mjs";
39
42
  import { unionVariantChanged } from "./form/union-detect.mjs";
40
43
  import { DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, buildGridClasses, parseColSpan, parseRowSpan, resolveGridSpec } from "./form/grid.mjs";
41
44
  import { resolveSingularLabel } from "./form/labels.mjs";
42
- import { enforceScale, formatDecimalForDisplay, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getThousandsSeparator, groupInteger, joinDecimalString, parseDecimalInput, splitDecimalString } from "./form/decimal-format.mjs";
45
+ import { DEV } from "./shared/dev.mjs";
46
+ import { resolveComponent } from "./shared/resolve-component.mjs";
47
+ import { toDate, utcDay } from "./shared/to-date.mjs";
43
48
  import { getColumn, getFilterableColumns, getSortableColumns } from "./table/column-resolver.mjs";
44
49
  import { navigateHrefFor } from "./table/navigate-href.mjs";
45
50
  import { buildModelRoutes } from "./nav/model-routes.mjs";
46
51
  import { compareExact } from "@atscript/db/meta";
47
- export { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, DEFAULT_BOOLEAN_LABELS, DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, EXPECT_MAX_LENGTH, FORM_ERROR_KEY, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, NUMERIC_VALUE_KINDS, StaticFieldResolver, 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_OPTIONAL_MODE, 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_FORM_VALIDATE_ERROR_CODE, UI_NAV_GROUP, UI_NAV_HIDDEN, UI_NAV_ORDER, UI_TABLE_ATTR, UI_TABLE_CLASSES, UI_TABLE_COMPONENT, UI_TABLE_EXCLUDE, UI_TABLE_FILL, 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, UI_VALUE_LABEL, VALUE_HELP_OPTIONS_CAP, ValueHelpClient, WF_ACTION_WITH_DATA, activateUiTexts, applyFormChanges, arrangeText, asArray, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, buildGridClasses, buildModelRoutes, buildUnionVariants, codeOf, coerceNumericText, collectDirtyPaths, compareExact, createFieldValidator, createFormData, createFormDef, createFormValueResolver, createMetaClient, createTableDef, createUiTexts, deepClone, deepEqual, defaultResolver, deleteByPath, deserializeServedType, detectUnionVariant, displayValue, emptiedValue, enforceScale, escapeRegex, extractFieldLiteralOptions, extractLiteralOptions, extractMeasurement, extractValueHelp, fetchDistinctValues, fieldText, formatDecimalForDisplay, getByPath, getColumn, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getDeclaredFormActions, getDefaultClientFactory, getDefaultOptionalMode, getDefaultValidatorPlugins, getFieldMeta, getFilterableColumns, getFormValidator, getMetaCacheIdentity, getMetaEntry, getMetaTableDef, getResolver, getSortableColumns, getThousandsSeparator, getUiTexts, groupInteger, hasComputedAnnotations, hasFieldMeta, invalidateValueHelpCache, isArrayField, isContainerKind, isFieldHidden, isNumericText, isObjectField, isPathDirty, isPickerDeclined, isPureLiteralUnion, isServedType, isTupleField, isUnionField, iteratePathAncestors, joinDecimalString, joinPath, listsDictionary, loadValueHelpTexts, markServedType, mergeErrorMaps, navigateHrefFor, normalizeLoadedEmpty, omitDerivedFields, omitPaths, omitSkippedNavFields, onMetaCacheReset, onUiLocaleChange, onValueHelpTexts, optKey, optLabel, optionLabel, optionValue, parentPrefix, parseColSpan, parseDecimalInput, parseRowSpan, parseStaticAttrs, parseStaticOptions, resetDefaultClientFactory, resetMetaCache, resetValueHelpCache, resolveAttrs, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveOptionalMode, resolveOptions, resolveSingularLabel, resolveStatic, resolveValueHelp, retainMetaEntry, setByPath, setDefaultClientFactory, setDefaultOptionalMode, setDefaultValidatorPlugins, setMetaCacheIdentity, setMetaCacheMaxEntries, setResolver, setUiLocale, setValueHelpCacheTtl, splitDecimalString, str, unionVariantChanged, userText, validatorErrorsToMap, valueHelpColumns, valueHelpDictPaths, valueHelpDropdown, valueHelpFills, valueHelpKey, valueHelpOptions, valueHelpRowText, valueHelpScope, valueHelpSelect, valueHelpSource, valueHelpText, valueLabelOf };
52
+ export { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, DEFAULT_BOOLEAN_LABELS, DEFAULT_COL_SPAN, DEFAULT_ROW_SPAN, DEV, EXPECT_ARRAY_UNIQUE_ITEMS, EXPECT_MAX_LENGTH, FORM_ERROR_KEY, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, NUMERIC_VALUE_KINDS, StaticFieldResolver, 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_OPTIONAL_MODE, 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_FORM_VALIDATE_ERROR_CODE, UI_NAV_GROUP, UI_NAV_HIDDEN, UI_NAV_ORDER, UI_TABLE_ATTR, UI_TABLE_CLASSES, UI_TABLE_COMPONENT, UI_TABLE_EXCLUDE, UI_TABLE_FILL, 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, UI_VALUE_LABEL, VALUE_HELP_OPTIONS_CAP, ValueHelpClient, WF_ACTION_WITH_DATA, activateUiTexts, applyFormChanges, arrangeText, asArray, buildDescendantErrorCounts, buildFormDiff, buildFormRebase, buildGridClasses, buildModelRoutes, buildUnionVariants, codeOf, coerceNumericText, collectDirtyPaths, compareExact, createDistinctPager, createFieldValidator, createFormData, createFormDef, createFormValueResolver, createMetaClient, createTableDef, createUiTexts, deepClone, deepEqual, defaultResolver, deleteByPath, deserializeServedType, detectUnionVariant, displayValue, emptiedValue, enforceScale, escapeRegex, extractFieldLiteralOptions, extractLiteralOptions, extractMeasurement, extractValueHelp, fieldText, formPayload, formatDecimalForDisplay, getByPath, getColumn, getCurrencyDecimals, getCurrencyDisplayParts, getDecimalSeparator, getDeclaredFormAction, getDeclaredFormActions, getDefaultClientFactory, getDefaultOptionalMode, getDefaultValidatorPlugins, getFieldMeta, getFilterableColumns, getFormValidator, getMetaCacheIdentity, getMetaEntry, getMetaTableDef, getResolver, getSortableColumns, getThousandsSeparator, getUiTexts, groupInteger, hasComputedAnnotations, hasFieldMeta, invalidateValueHelpCache, isArrayField, isContainerKind, isFieldDisabled, isFieldHidden, isFieldReadonly, isFieldRequired, isNumericText, isObjectField, isPathDirty, isPickerDeclined, isPureLiteralUnion, isServedType, isTupleField, isUnionField, iteratePathAncestors, joinDecimalString, joinPath, listsDictionary, loadValueHelpTexts, markServedType, mergeErrorMaps, mergeFilters, navigateHrefFor, normalizeLoadedEmpty, numberAdornment, omitDerivedFields, omitPaths, omitSkippedNavFields, onMetaCacheReset, onUiLocaleChange, onValueHelpTexts, optKey, optLabel, optionLabel, optionValue, parentPrefix, parseColSpan, parseDecimalInput, parseRowSpan, parseStaticAttrs, parseStaticOptions, refText, resetDefaultClientFactory, resetMetaCache, resetValueHelpCache, resolveAttrs, resolveComponent, resolveFieldProp, resolveFormProp, resolveGridSpec, resolveMeasurement, resolveOptionalMode, resolveOptions, resolveSingularLabel, resolveStatic, resolveValueHelp, retainMetaEntry, setByPath, setDefaultClientFactory, setDefaultOptionalMode, setDefaultValidatorPlugins, setMetaCacheIdentity, setMetaCacheMaxEntries, setResolver, setUiLocale, setValueHelpCacheTtl, splitDecimalString, stableValueKey, str, toDate, unionVariantChanged, userText, utcDay, validatorErrorsToMap, valueHelpColumns, valueHelpDictPaths, valueHelpDropdown, valueHelpFills, valueHelpKey, valueHelpOptions, valueHelpRowText, valueHelpScope, valueHelpSelect, valueHelpSource, valueHelpText, valueLabelOf, valuePickerMode };
@@ -595,7 +595,7 @@ const uiAnnotations = { ui: {
595
595
  }),
596
596
  dict: {
597
597
  label: new _atscript_core.AnnotationSpec({
598
- description: "The label of this dictionary's records: every code bound to it (`@db.rel.FK` or `@ui.valueHelp`) shows with this field's text — in table cells, export, filter chips, read-only form fields and the reference field while it is not focused — and the pickers show it as each row's text. A binding may name another field (`@ui.valueHelp.label`). Without it, codes show alone.\n\n**Example:**\n```atscript\n@ui.dict.label 'keyText'\nname: string\n```\n",
598
+ description: "The label of this dictionary's records: every code bound to it (`@db.rel.FK` or `@ui.valueHelp`) shows with this field's text — in table cells, export, filter chips, read-only form fields and the reference field while it is not focused — and the pickers show it as each row's text; a table of these records names a row an action runs on by it in the action dialog. A binding may name another field (`@ui.valueHelp.label`). Without it, codes show alone.\n\n**Example:**\n```atscript\n@ui.dict.label 'keyText'\nname: string\n```\n",
599
599
  nodeType: ["prop"],
600
600
  passedWhenReferred: false,
601
601
  argument: arrangementArg("Default: `textKey`.")
@@ -595,7 +595,7 @@ const uiAnnotations = { ui: {
595
595
  }),
596
596
  dict: {
597
597
  label: new AnnotationSpec({
598
- description: "The label of this dictionary's records: every code bound to it (`@db.rel.FK` or `@ui.valueHelp`) shows with this field's text — in table cells, export, filter chips, read-only form fields and the reference field while it is not focused — and the pickers show it as each row's text. A binding may name another field (`@ui.valueHelp.label`). Without it, codes show alone.\n\n**Example:**\n```atscript\n@ui.dict.label 'keyText'\nname: string\n```\n",
598
+ description: "The label of this dictionary's records: every code bound to it (`@db.rel.FK` or `@ui.valueHelp`) shows with this field's text — in table cells, export, filter chips, read-only form fields and the reference field while it is not focused — and the pickers show it as each row's text; a table of these records names a row an action runs on by it in the action dialog. A binding may name another field (`@ui.valueHelp.label`). Without it, codes show alone.\n\n**Example:**\n```atscript\n@ui.dict.label 'keyText'\nname: string\n```\n",
599
599
  nodeType: ["prop"],
600
600
  passedWhenReferred: false,
601
601
  argument: arrangementArg("Default: `textKey`.")
@@ -63,6 +63,7 @@ declare const META_REQUIRED: "meta.required";
63
63
  declare const META_DEFAULT: "meta.default";
64
64
  declare const META_SENSITIVE: "meta.sensitive";
65
65
  declare const EXPECT_MAX_LENGTH: "expect.maxLength";
66
+ declare const EXPECT_ARRAY_UNIQUE_ITEMS: "expect.array.uniqueItems";
66
67
  declare const UI_FORM_FN_PREFIX: "ui.form.fn.";
67
68
  declare const UI_FORM_FN_LABEL: "ui.form.fn.label";
68
69
  declare const UI_FORM_FN_PLACEHOLDER: "ui.form.fn.placeholder";
@@ -85,4 +86,4 @@ declare const UI_TABLE_FN_CLASSES: "ui.table.fn.classes";
85
86
  declare const UI_TABLE_FN_STYLES: "ui.table.fn.styles";
86
87
  declare const UI_FORM_VALIDATE: "ui.form.validate";
87
88
  //#endregion
88
- export { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, 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_OPTIONAL_MODE, 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_FILL, 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, UI_VALUE_LABEL, WF_ACTION_WITH_DATA };
89
+ export { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, EXPECT_ARRAY_UNIQUE_ITEMS, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, 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_OPTIONAL_MODE, 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_FILL, 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, UI_VALUE_LABEL, WF_ACTION_WITH_DATA };
@@ -63,6 +63,7 @@ declare const META_REQUIRED: "meta.required";
63
63
  declare const META_DEFAULT: "meta.default";
64
64
  declare const META_SENSITIVE: "meta.sensitive";
65
65
  declare const EXPECT_MAX_LENGTH: "expect.maxLength";
66
+ declare const EXPECT_ARRAY_UNIQUE_ITEMS: "expect.array.uniqueItems";
66
67
  declare const UI_FORM_FN_PREFIX: "ui.form.fn.";
67
68
  declare const UI_FORM_FN_LABEL: "ui.form.fn.label";
68
69
  declare const UI_FORM_FN_PLACEHOLDER: "ui.form.fn.placeholder";
@@ -85,4 +86,4 @@ declare const UI_TABLE_FN_CLASSES: "ui.table.fn.classes";
85
86
  declare const UI_TABLE_FN_STYLES: "ui.table.fn.styles";
86
87
  declare const UI_FORM_VALIDATE: "ui.form.validate";
87
88
  //#endregion
88
- export { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, 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_OPTIONAL_MODE, 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_FILL, 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, UI_VALUE_LABEL, WF_ACTION_WITH_DATA };
89
+ export { DB_AMOUNT_CURRENCY, DB_AMOUNT_CURRENCY_REF, DB_COLUMN_PRECISION, DB_HTTP_PATH, DB_REL_FK, DB_UNIT, DB_UNIT_REF, EXPECT_ARRAY_UNIQUE_ITEMS, EXPECT_MAX_LENGTH, META_DEFAULT, META_DESCRIPTION, META_ID, META_LABEL, META_READONLY, META_REQUIRED, META_SENSITIVE, 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_OPTIONAL_MODE, 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_FILL, 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, UI_VALUE_LABEL, WF_ACTION_WITH_DATA };
@@ -0,0 +1,22 @@
1
+ //#region src/shared/dev.ts
2
+ /**
3
+ * `true` outside a production build — the gate for authoring-time warnings, so
4
+ * their strings and checks cost a shipped app nothing. In `@atscript/ui` since
5
+ * 0.1.208 (`@atscript/ui-table` re-exports it).
6
+ *
7
+ * Read from `process.env.NODE_ENV` rather than `import.meta.env`: bundlers
8
+ * replace this expression with a literal in both the ESM and the CJS output,
9
+ * while `import.meta` only exists in the former. Where neither a bundler nor a
10
+ * `process` shim is present the read throws — warnings stay on, which is the
11
+ * safe side of the trade.
12
+ */
13
+ function detectDev() {
14
+ try {
15
+ return process.env.NODE_ENV !== "production";
16
+ } catch {
17
+ return true;
18
+ }
19
+ }
20
+ const DEV = detectDev();
21
+ //#endregion
22
+ exports.DEV = DEV;
@@ -0,0 +1,4 @@
1
+ //#region src/shared/dev.d.ts
2
+ declare const DEV: boolean;
3
+ //#endregion
4
+ export { DEV };
@@ -0,0 +1,4 @@
1
+ //#region src/shared/dev.d.ts
2
+ declare const DEV: boolean;
3
+ //#endregion
4
+ export { DEV };
@@ -0,0 +1,22 @@
1
+ //#region src/shared/dev.ts
2
+ /**
3
+ * `true` outside a production build — the gate for authoring-time warnings, so
4
+ * their strings and checks cost a shipped app nothing. In `@atscript/ui` since
5
+ * 0.1.208 (`@atscript/ui-table` re-exports it).
6
+ *
7
+ * Read from `process.env.NODE_ENV` rather than `import.meta.env`: bundlers
8
+ * replace this expression with a literal in both the ESM and the CJS output,
9
+ * while `import.meta` only exists in the former. Where neither a bundler nor a
10
+ * `process` shim is present the read throws — warnings stay on, which is the
11
+ * safe side of the trade.
12
+ */
13
+ function detectDev() {
14
+ try {
15
+ return process.env.NODE_ENV !== "production";
16
+ } catch {
17
+ return true;
18
+ }
19
+ }
20
+ const DEV = detectDev();
21
+ //#endregion
22
+ export { DEV };
@@ -46,13 +46,31 @@ function resolveFormProp(type, fnKey, staticKey, scope, opts) {
46
46
  function hasComputedAnnotations(prop) {
47
47
  return activeResolver.hasComputedAnnotations(prop);
48
48
  }
49
+ const BOOL = { staticAsBoolean: true };
49
50
  /**
50
51
  * SSOT for field hidden resolution — resolves `@ui.form.fn.hidden`
51
52
  * (dynamic, via the active resolver) with static `@ui.form.hidden`
52
53
  * presence as the fallback. Absent both → `false` (visible).
53
54
  */
54
55
  function isFieldHidden(prop, scope) {
55
- return resolveFieldProp(prop, "ui.form.fn.hidden", "ui.form.hidden", scope, { staticAsBoolean: true }) ?? false;
56
+ return resolveFieldProp(prop, "ui.form.fn.hidden", "ui.form.hidden", scope, BOOL) ?? false;
57
+ }
58
+ /**
59
+ * A field's own disabled state — `@ui.form.fn.disabled` (dynamic, via the
60
+ * active resolver), else `@ui.form.disabled`; `false` without both. Not an
61
+ * enclosing field's lock. Since 0.1.208.
62
+ */
63
+ function isFieldDisabled(prop, scope) {
64
+ return resolveFieldProp(prop, "ui.form.fn.disabled", "ui.form.disabled", scope, BOOL) ?? false;
65
+ }
66
+ /**
67
+ * A field's own read-only state — always for a field the server owns
68
+ * (`FormFieldDef.derived`), else `@ui.form.fn.readonly` (dynamic, via the
69
+ * active resolver), else `@meta.readonly`; `false` without them. Not an
70
+ * enclosing field's lock. Since 0.1.208.
71
+ */
72
+ function isFieldReadonly(field, scope) {
73
+ return field.derived === true || (resolveFieldProp(field.prop, "ui.form.fn.readonly", "meta.readonly", scope, BOOL) ?? false);
56
74
  }
57
75
  function getFieldMeta(prop, key) {
58
76
  return prop.metadata.get(key);
@@ -115,7 +133,9 @@ exports.getFieldMeta = getFieldMeta;
115
133
  exports.getResolver = getResolver;
116
134
  exports.hasComputedAnnotations = hasComputedAnnotations;
117
135
  exports.hasFieldMeta = hasFieldMeta;
136
+ exports.isFieldDisabled = isFieldDisabled;
118
137
  exports.isFieldHidden = isFieldHidden;
138
+ exports.isFieldReadonly = isFieldReadonly;
119
139
  exports.parseStaticAttrs = parseStaticAttrs;
120
140
  exports.resolveAttrs = resolveAttrs;
121
141
  exports.resolveFieldProp = resolveFieldProp;
@@ -1,3 +1,4 @@
1
+ import { FormFieldDef } from "../form/types.cjs";
1
2
  import { UserTextT } from "../i18n/model-texts.cjs";
2
3
  import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
3
4
 
@@ -53,6 +54,19 @@ declare function hasComputedAnnotations(prop: TAtscriptAnnotatedType): boolean;
53
54
  * presence as the fallback. Absent both → `false` (visible).
54
55
  */
55
56
  declare function isFieldHidden(prop: TAtscriptAnnotatedType, scope: Record<string, unknown>): boolean;
57
+ /**
58
+ * A field's own disabled state — `@ui.form.fn.disabled` (dynamic, via the
59
+ * active resolver), else `@ui.form.disabled`; `false` without both. Not an
60
+ * enclosing field's lock. Since 0.1.208.
61
+ */
62
+ declare function isFieldDisabled(prop: TAtscriptAnnotatedType, scope: Record<string, unknown>): boolean;
63
+ /**
64
+ * A field's own read-only state — always for a field the server owns
65
+ * (`FormFieldDef.derived`), else `@ui.form.fn.readonly` (dynamic, via the
66
+ * active resolver), else `@meta.readonly`; `false` without them. Not an
67
+ * enclosing field's lock. Since 0.1.208.
68
+ */
69
+ declare function isFieldReadonly(field: FormFieldDef, scope: Record<string, unknown>): boolean;
56
70
  /**
57
71
  * Reads a static metadata value from an ATScript prop.
58
72
  * Typed overload for known AtscriptMetadata keys; falls back to `unknown` for other keys.
@@ -80,4 +94,4 @@ interface TResolveAttrsKeys {
80
94
  */
81
95
  declare function resolveAttrs(prop: TAtscriptAnnotatedType, scope: Record<string, unknown>, keys?: TResolveAttrsKeys): Record<string, unknown> | undefined;
82
96
  //#endregion
83
- export { FieldResolver, StaticFieldResolver, TResolveOptions, asArray, defaultResolver, getFieldMeta, getResolver, hasComputedAnnotations, hasFieldMeta, isFieldHidden, parseStaticAttrs, resolveAttrs, resolveFieldProp, resolveFormProp, resolveStatic, setResolver };
97
+ export { FieldResolver, StaticFieldResolver, TResolveOptions, asArray, defaultResolver, getFieldMeta, getResolver, hasComputedAnnotations, hasFieldMeta, isFieldDisabled, isFieldHidden, isFieldReadonly, parseStaticAttrs, resolveAttrs, resolveFieldProp, resolveFormProp, resolveStatic, setResolver };
@@ -1,3 +1,4 @@
1
+ import { FormFieldDef } from "../form/types.mjs";
1
2
  import { UserTextT } from "../i18n/model-texts.mjs";
2
3
  import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
3
4
 
@@ -53,6 +54,19 @@ declare function hasComputedAnnotations(prop: TAtscriptAnnotatedType): boolean;
53
54
  * presence as the fallback. Absent both → `false` (visible).
54
55
  */
55
56
  declare function isFieldHidden(prop: TAtscriptAnnotatedType, scope: Record<string, unknown>): boolean;
57
+ /**
58
+ * A field's own disabled state — `@ui.form.fn.disabled` (dynamic, via the
59
+ * active resolver), else `@ui.form.disabled`; `false` without both. Not an
60
+ * enclosing field's lock. Since 0.1.208.
61
+ */
62
+ declare function isFieldDisabled(prop: TAtscriptAnnotatedType, scope: Record<string, unknown>): boolean;
63
+ /**
64
+ * A field's own read-only state — always for a field the server owns
65
+ * (`FormFieldDef.derived`), else `@ui.form.fn.readonly` (dynamic, via the
66
+ * active resolver), else `@meta.readonly`; `false` without them. Not an
67
+ * enclosing field's lock. Since 0.1.208.
68
+ */
69
+ declare function isFieldReadonly(field: FormFieldDef, scope: Record<string, unknown>): boolean;
56
70
  /**
57
71
  * Reads a static metadata value from an ATScript prop.
58
72
  * Typed overload for known AtscriptMetadata keys; falls back to `unknown` for other keys.
@@ -80,4 +94,4 @@ interface TResolveAttrsKeys {
80
94
  */
81
95
  declare function resolveAttrs(prop: TAtscriptAnnotatedType, scope: Record<string, unknown>, keys?: TResolveAttrsKeys): Record<string, unknown> | undefined;
82
96
  //#endregion
83
- export { FieldResolver, StaticFieldResolver, TResolveOptions, asArray, defaultResolver, getFieldMeta, getResolver, hasComputedAnnotations, hasFieldMeta, isFieldHidden, parseStaticAttrs, resolveAttrs, resolveFieldProp, resolveFormProp, resolveStatic, setResolver };
97
+ export { FieldResolver, StaticFieldResolver, TResolveOptions, asArray, defaultResolver, getFieldMeta, getResolver, hasComputedAnnotations, hasFieldMeta, isFieldDisabled, isFieldHidden, isFieldReadonly, parseStaticAttrs, resolveAttrs, resolveFieldProp, resolveFormProp, resolveStatic, setResolver };
@@ -46,13 +46,31 @@ function resolveFormProp(type, fnKey, staticKey, scope, opts) {
46
46
  function hasComputedAnnotations(prop) {
47
47
  return activeResolver.hasComputedAnnotations(prop);
48
48
  }
49
+ const BOOL = { staticAsBoolean: true };
49
50
  /**
50
51
  * SSOT for field hidden resolution — resolves `@ui.form.fn.hidden`
51
52
  * (dynamic, via the active resolver) with static `@ui.form.hidden`
52
53
  * presence as the fallback. Absent both → `false` (visible).
53
54
  */
54
55
  function isFieldHidden(prop, scope) {
55
- return resolveFieldProp(prop, "ui.form.fn.hidden", "ui.form.hidden", scope, { staticAsBoolean: true }) ?? false;
56
+ return resolveFieldProp(prop, "ui.form.fn.hidden", "ui.form.hidden", scope, BOOL) ?? false;
57
+ }
58
+ /**
59
+ * A field's own disabled state — `@ui.form.fn.disabled` (dynamic, via the
60
+ * active resolver), else `@ui.form.disabled`; `false` without both. Not an
61
+ * enclosing field's lock. Since 0.1.208.
62
+ */
63
+ function isFieldDisabled(prop, scope) {
64
+ return resolveFieldProp(prop, "ui.form.fn.disabled", "ui.form.disabled", scope, BOOL) ?? false;
65
+ }
66
+ /**
67
+ * A field's own read-only state — always for a field the server owns
68
+ * (`FormFieldDef.derived`), else `@ui.form.fn.readonly` (dynamic, via the
69
+ * active resolver), else `@meta.readonly`; `false` without them. Not an
70
+ * enclosing field's lock. Since 0.1.208.
71
+ */
72
+ function isFieldReadonly(field, scope) {
73
+ return field.derived === true || (resolveFieldProp(field.prop, "ui.form.fn.readonly", "meta.readonly", scope, BOOL) ?? false);
56
74
  }
57
75
  function getFieldMeta(prop, key) {
58
76
  return prop.metadata.get(key);
@@ -108,4 +126,4 @@ function resolveAttrs(prop, scope, keys = {}) {
108
126
  return hasAttrs ? result : void 0;
109
127
  }
110
128
  //#endregion
111
- export { StaticFieldResolver, asArray, defaultResolver, getFieldMeta, getResolver, hasComputedAnnotations, hasFieldMeta, isFieldHidden, parseStaticAttrs, resolveAttrs, resolveFieldProp, resolveFormProp, resolveStatic, setResolver };
129
+ export { StaticFieldResolver, asArray, defaultResolver, getFieldMeta, getResolver, hasComputedAnnotations, hasFieldMeta, isFieldDisabled, isFieldHidden, isFieldReadonly, parseStaticAttrs, resolveAttrs, resolveFieldProp, resolveFormProp, resolveStatic, setResolver };
@@ -0,0 +1,28 @@
1
+ //#region src/shared/merge-filters.ts
2
+ /**
3
+ * AND-merge filter expressions (`undefined` ones skipped) — how the UI ANDs
4
+ * every filter it sends. A nested `$and` is flattened into the one, the
5
+ * fields next to it kept; a single expression is returned as is. Variadic
6
+ * since 0.1.140. In `@atscript/ui` since 0.1.208 (`@atscript/ui-table`
7
+ * re-exports it).
8
+ */
9
+ function mergeFilters(...exprs) {
10
+ const list = exprs.filter((e) => !!e);
11
+ return list.length <= 1 ? list[0] : { $and: flattenAnd(list) };
12
+ }
13
+ /** The AND-ed clauses of `exprs`: each nested `$and` spread in, the keys next to it kept as one clause. */
14
+ function flattenAnd(exprs) {
15
+ const out = [];
16
+ for (const expr of exprs) {
17
+ const { $and, ...rest } = expr;
18
+ if (!Array.isArray($and)) {
19
+ out.push(expr);
20
+ continue;
21
+ }
22
+ out.push(...flattenAnd($and));
23
+ if (Object.keys(rest).length > 0) out.push(rest);
24
+ }
25
+ return out;
26
+ }
27
+ //#endregion
28
+ exports.mergeFilters = mergeFilters;
@@ -0,0 +1,13 @@
1
+ import { FilterExpr } from "@atscript/db-client";
2
+
3
+ //#region src/shared/merge-filters.d.ts
4
+ /**
5
+ * AND-merge filter expressions (`undefined` ones skipped) — how the UI ANDs
6
+ * every filter it sends. A nested `$and` is flattened into the one, the
7
+ * fields next to it kept; a single expression is returned as is. Variadic
8
+ * since 0.1.140. In `@atscript/ui` since 0.1.208 (`@atscript/ui-table`
9
+ * re-exports it).
10
+ */
11
+ declare function mergeFilters(...exprs: (FilterExpr | undefined)[]): FilterExpr | undefined;
12
+ //#endregion
13
+ export { mergeFilters };