@golemui/gui-shared 0.0.2 → 0.12.1

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 (130) hide show
  1. package/CHANGELOG.md +2 -10
  2. package/README.md +15 -6
  3. package/index.d.ts +4 -3
  4. package/index.js +2363 -104
  5. package/index.umd.cjs +1 -1
  6. package/lib/dx/__tests__/helpers.d.ts +30 -0
  7. package/lib/dx/core/defineShortcutType.d.ts +38 -0
  8. package/lib/dx/core/dx.domain.d.ts +76 -0
  9. package/lib/dx/core/dxBase.types.d.ts +107 -0
  10. package/lib/dx/core/dxPropsHelper.d.ts +9 -0
  11. package/lib/dx/core/dxUtilityTypes.d.ts +40 -0
  12. package/lib/dx/core/dxValidatorHelper.d.ts +18 -0
  13. package/lib/dx/core/eventWiring.service.d.ts +22 -0
  14. package/lib/dx/core/itemTypeRegistry.d.ts +82 -0
  15. package/lib/dx/core/itemWalker.service.d.ts +31 -0
  16. package/lib/dx/core/selectorNormalizer.service.d.ts +15 -0
  17. package/lib/dx/core/selectorResolver.service.d.ts +11 -0
  18. package/lib/dx/core/sharedSensibleDefaults.service.d.ts +35 -0
  19. package/lib/dx/core/stateExpansion.service.d.ts +31 -0
  20. package/lib/dx/core/widgetMapper.service.d.ts +13 -0
  21. package/lib/dx/core/widgetMerger.service.d.ts +14 -0
  22. package/lib/dx/dx.service.d.ts +40 -0
  23. package/lib/dx/formDef.domain.d.ts +52 -0
  24. package/lib/dx/gui.d.ts +74 -0
  25. package/lib/dx/index.d.ts +100 -0
  26. package/lib/dx/registerAll.d.ts +0 -0
  27. package/lib/dx/resolveFormInput.d.ts +37 -0
  28. package/lib/dx/shortcuts/accordion/accordion.domain.d.ts +20 -0
  29. package/lib/dx/shortcuts/accordion/guiAccordion.impl.d.ts +12 -0
  30. package/lib/dx/shortcuts/accordion/register.d.ts +2 -0
  31. package/lib/dx/shortcuts/actions/actions.domain.d.ts +21 -0
  32. package/lib/dx/shortcuts/actions/guiActions.impl.d.ts +7 -0
  33. package/lib/dx/shortcuts/actions/register.d.ts +2 -0
  34. package/lib/dx/shortcuts/alert/alert.domain.d.ts +9 -0
  35. package/lib/dx/shortcuts/alert/guiAlert.impl.d.ts +6 -0
  36. package/lib/dx/shortcuts/alert/register.d.ts +2 -0
  37. package/lib/dx/shortcuts/calendar/calendar.domain.d.ts +21 -0
  38. package/lib/dx/shortcuts/calendar/calendarSensibleDefaults.service.d.ts +6 -0
  39. package/lib/dx/shortcuts/calendar/guiCalendar.impl.d.ts +6 -0
  40. package/lib/dx/shortcuts/calendar/register.d.ts +2 -0
  41. package/lib/dx/shortcuts/checkbox/checkbox.domain.d.ts +16 -0
  42. package/lib/dx/shortcuts/checkbox/guiCheckbox.impl.d.ts +6 -0
  43. package/lib/dx/shortcuts/checkbox/register.d.ts +2 -0
  44. package/lib/dx/shortcuts/currency/currency.domain.d.ts +17 -0
  45. package/lib/dx/shortcuts/currency/guiCurrency.impl.d.ts +6 -0
  46. package/lib/dx/shortcuts/currency/register.d.ts +2 -0
  47. package/lib/dx/shortcuts/custom-action/customAction.domain.d.ts +14 -0
  48. package/lib/dx/shortcuts/custom-action/guiCustomAction.impl.d.ts +6 -0
  49. package/lib/dx/shortcuts/custom-action/register.d.ts +2 -0
  50. package/lib/dx/shortcuts/custom-display/customDisplay.domain.d.ts +9 -0
  51. package/lib/dx/shortcuts/custom-display/guiCustomDisplay.impl.d.ts +8 -0
  52. package/lib/dx/shortcuts/custom-display/register.d.ts +2 -0
  53. package/lib/dx/shortcuts/custom-input/customInput.domain.d.ts +16 -0
  54. package/lib/dx/shortcuts/custom-input/guiCustomInput.impl.d.ts +6 -0
  55. package/lib/dx/shortcuts/custom-input/register.d.ts +2 -0
  56. package/lib/dx/shortcuts/custom-layout/customLayout.domain.d.ts +13 -0
  57. package/lib/dx/shortcuts/custom-layout/guiCustomLayout.impl.d.ts +7 -0
  58. package/lib/dx/shortcuts/custom-layout/register.d.ts +2 -0
  59. package/lib/dx/shortcuts/date-input/dateInput.domain.d.ts +16 -0
  60. package/lib/dx/shortcuts/date-input/guiDateInput.impl.d.ts +6 -0
  61. package/lib/dx/shortcuts/date-input/register.d.ts +2 -0
  62. package/lib/dx/shortcuts/date-picker/datePicker.domain.d.ts +17 -0
  63. package/lib/dx/shortcuts/date-picker/guiDatePicker.impl.d.ts +7 -0
  64. package/lib/dx/shortcuts/date-picker/register.d.ts +2 -0
  65. package/lib/dx/shortcuts/display/display.domain.d.ts +13 -0
  66. package/lib/dx/shortcuts/display/guiDisplay.impl.d.ts +3 -0
  67. package/lib/dx/shortcuts/display/register.d.ts +2 -0
  68. package/lib/dx/shortcuts/dropdown/dropdown.domain.d.ts +18 -0
  69. package/lib/dx/shortcuts/dropdown/guiDropdown.impl.d.ts +7 -0
  70. package/lib/dx/shortcuts/dropdown/register.d.ts +2 -0
  71. package/lib/dx/shortcuts/inputs/gslInputSubtypes.d.ts +4 -0
  72. package/lib/dx/shortcuts/inputs/guiBooleanInput.impl.d.ts +6 -0
  73. package/lib/dx/shortcuts/inputs/guiInputs.impl.d.ts +2 -0
  74. package/lib/dx/shortcuts/inputs/guiNumberInput.impl.d.ts +6 -0
  75. package/lib/dx/shortcuts/inputs/guiTextInput.impl.d.ts +6 -0
  76. package/lib/dx/shortcuts/inputs/inputDefsByKey.service.d.ts +11 -0
  77. package/lib/dx/shortcuts/inputs/inputSensibleDefaults.service.d.ts +9 -0
  78. package/lib/dx/shortcuts/inputs/inputTypeDefaults.service.d.ts +9 -0
  79. package/lib/dx/shortcuts/inputs/inputs.domain.d.ts +51 -0
  80. package/lib/dx/shortcuts/inputs/register.d.ts +2 -0
  81. package/lib/dx/shortcuts/layouts/guiFlex.impl.d.ts +8 -0
  82. package/lib/dx/shortcuts/layouts/layouts.domain.d.ts +31 -0
  83. package/lib/dx/shortcuts/layouts/register.d.ts +2 -0
  84. package/lib/dx/shortcuts/list/guiList.impl.d.ts +7 -0
  85. package/lib/dx/shortcuts/list/list.domain.d.ts +17 -0
  86. package/lib/dx/shortcuts/list/register.d.ts +2 -0
  87. package/lib/dx/shortcuts/markdown/guiMarkdown.impl.d.ts +6 -0
  88. package/lib/dx/shortcuts/markdown/markdown.domain.d.ts +17 -0
  89. package/lib/dx/shortcuts/markdown/register.d.ts +2 -0
  90. package/lib/dx/shortcuts/password/guiPassword.impl.d.ts +6 -0
  91. package/lib/dx/shortcuts/password/password.domain.d.ts +17 -0
  92. package/lib/dx/shortcuts/password/register.d.ts +2 -0
  93. package/lib/dx/shortcuts/radiogroup/guiRadiogroup.impl.d.ts +7 -0
  94. package/lib/dx/shortcuts/radiogroup/radiogroup.domain.d.ts +17 -0
  95. package/lib/dx/shortcuts/radiogroup/register.d.ts +2 -0
  96. package/lib/dx/shortcuts/range-calendar/guiRangeCalendar.impl.d.ts +6 -0
  97. package/lib/dx/shortcuts/range-calendar/rangeCalendar.domain.d.ts +16 -0
  98. package/lib/dx/shortcuts/range-calendar/register.d.ts +2 -0
  99. package/lib/dx/shortcuts/range-date-input/guiRangeDateInput.impl.d.ts +6 -0
  100. package/lib/dx/shortcuts/range-date-input/rangeDateInput.domain.d.ts +16 -0
  101. package/lib/dx/shortcuts/range-date-input/register.d.ts +2 -0
  102. package/lib/dx/shortcuts/range-date-picker/guiRangeDatePicker.impl.d.ts +6 -0
  103. package/lib/dx/shortcuts/range-date-picker/rangeDatePicker.domain.d.ts +17 -0
  104. package/lib/dx/shortcuts/range-date-picker/register.d.ts +2 -0
  105. package/lib/dx/shortcuts/repeater/guiRepeater.impl.d.ts +6 -0
  106. package/lib/dx/shortcuts/repeater/register.d.ts +3 -0
  107. package/lib/dx/shortcuts/repeater/repeater.domain.d.ts +21 -0
  108. package/lib/dx/shortcuts/scopes/gslStates.impl.d.ts +11 -0
  109. package/lib/dx/shortcuts/scopes/gslTag.impl.d.ts +2 -0
  110. package/lib/dx/shortcuts/scopes/scopeChain.d.ts +99 -0
  111. package/lib/dx/shortcuts/select/guiSelect.impl.d.ts +7 -0
  112. package/lib/dx/shortcuts/select/register.d.ts +2 -0
  113. package/lib/dx/shortcuts/select/select.domain.d.ts +18 -0
  114. package/lib/dx/shortcuts/tabs/guiTabs.impl.d.ts +12 -0
  115. package/lib/dx/shortcuts/tabs/register.d.ts +2 -0
  116. package/lib/dx/shortcuts/tabs/tabs.domain.d.ts +17 -0
  117. package/lib/dx/shortcuts/textarea/guiTextarea.impl.d.ts +6 -0
  118. package/lib/dx/shortcuts/textarea/register.d.ts +2 -0
  119. package/lib/dx/shortcuts/textarea/textarea.domain.d.ts +17 -0
  120. package/lib/golem-form.d.ts +18 -3
  121. package/lib/shared.d.ts +13 -0
  122. package/lib/utils/index.d.ts +2 -0
  123. package/lib/utils/objectUtils.service.d.ts +11 -0
  124. package/lib/utils/repeater.d.ts +9 -0
  125. package/lib/utils/schema.d.ts +14 -0
  126. package/lib/widget.factory.d.ts +4 -2
  127. package/lib/widget.props.d.ts +99 -7
  128. package/lib/widgets.d.ts +9 -9
  129. package/package.json +8 -3
  130. package/lib/middleware/json-schema-vanilla.d.ts +0 -2
@@ -0,0 +1,35 @@
1
+ import { Localizable } from '@golemui/core';
2
+ /**
3
+ * Config interface for types that support automatic labels.
4
+ */
5
+ export interface LabelSensibleDefaultsConfig {
6
+ suppressAutomaticLabels?: boolean;
7
+ }
8
+ /**
9
+ * Config interface for types that support automatic placeholders.
10
+ */
11
+ export interface PlaceholderSensibleDefaultsConfig {
12
+ suppressAutomaticPlaceholders?: boolean;
13
+ }
14
+ export declare function pathToLabel(path: string | undefined): string;
15
+ /**
16
+ * Auto-generate a label from the field path if none is explicitly set.
17
+ * Reusable across inputs, calendar, and future input-like types.
18
+ *
19
+ * Behavior must match existing `inputSensibleDefaults.service.ts` and
20
+ * `calendarSensibleDefaults.service.ts` exactly.
21
+ */
22
+ export declare function processAutoLabel<D extends {
23
+ path?: string;
24
+ label?: Localizable | null;
25
+ }>(def: D, config: LabelSensibleDefaultsConfig): D;
26
+ /**
27
+ * Auto-generate a placeholder from the field path if none is explicitly set.
28
+ * Reusable across inputs, textarea, password, and future input-like types.
29
+ *
30
+ * Behavior must match existing `inputSensibleDefaults.service.ts` exactly.
31
+ */
32
+ export declare function processAutoPlaceholder<D extends {
33
+ path?: string;
34
+ placeholder?: string;
35
+ }>(def: D, config: PlaceholderSensibleDefaultsConfig): D;
@@ -0,0 +1,31 @@
1
+ import { NonFunctionWidget } from '@golemui/core';
2
+ import { GslLeafSelector, MergeResult } from './dx.domain';
3
+ import { EventIdGenerator, EventRegistry } from './itemTypeRegistry';
4
+ export interface StateData {
5
+ stateOverrides: Record<string, Record<string, any>>;
6
+ }
7
+ export declare class StateExpansionService {
8
+ /**
9
+ * Extracts `states` from a merge result, combining with state-targeted
10
+ * GSL leaf selectors from `_gslStates`.
11
+ *
12
+ * Returns a cleaned merge result (no states) and accumulated state data.
13
+ */
14
+ extractFromMergeResult(mergeResult: MergeResult, stateLeafs: GslLeafSelector[]): {
15
+ cleanedResult: MergeResult;
16
+ stateData: StateData;
17
+ };
18
+ /**
19
+ * Applies state overrides to a core widget. Each override produces:
20
+ * - `visible: true/false` → `include: { in }` / `exclude: { from }`
21
+ * - Core suffixable props → `'prop.stateName': value` at widget root
22
+ * - Event handlers → `on: { 'eventType.stateName': eventId }` with registry wiring
23
+ * - Custom props → `props: { 'prop.stateName': value }`
24
+ */
25
+ applyToWidget(widget: NonFunctionWidget, stateData: StateData, eventRegistry: EventRegistry, eventIdGenerator: EventIdGenerator): NonFunctionWidget;
26
+ hasStateData(stateData: StateData): boolean;
27
+ private applyVisibility;
28
+ private applyStateEvent;
29
+ }
30
+ declare const stateExpansionService: StateExpansionService;
31
+ export default stateExpansionService;
@@ -0,0 +1,13 @@
1
+ import { FormWidget, NonFunctionWidget, UiState } from '@golemui/core';
2
+ import { GslItemType, MergeResult } from './dx.domain';
3
+ export declare class WidgetMapper {
4
+ mapToWidget<StateKeys extends UiState = never, FormData extends Record<string, any> = any>(mergeResult: MergeResult, itemType: GslItemType): FormWidget<StateKeys, FormData>;
5
+ mapStaticDef<StateKeys extends UiState = never, FormData extends Record<string, any> = any>(def: Record<string, any>, itemType: GslItemType): NonFunctionWidget<StateKeys, FormData>;
6
+ /**
7
+ * Injects BaseWidget-level fields that all widget types share.
8
+ * Centralized here so individual mappers don't need to repeat the pattern.
9
+ */
10
+ private applyBaseWidgetFields;
11
+ }
12
+ declare const widgetMapper: WidgetMapper;
13
+ export default widgetMapper;
@@ -0,0 +1,14 @@
1
+ import { GslItemType, MergeResult, ResolvedSelectors, RuntimeFunction } from './dx.domain';
2
+ import { ObjectUtils } from '../../utils/objectUtils.service';
3
+ export declare class WidgetMerger {
4
+ private readonly objectUtils;
5
+ constructor(objectUtils: ObjectUtils);
6
+ merge(baseDef: Record<string, any> | RuntimeFunction, itemType: GslItemType, resolved: ResolvedSelectors): MergeResult;
7
+ private collectDecorators;
8
+ private applySensibleDefaults;
9
+ private createPromotedFunction;
10
+ private wrapWithSensibleDefaults;
11
+ private composeRuntimeFunctions;
12
+ }
13
+ declare const widgetMerger: WidgetMerger;
14
+ export default widgetMerger;
@@ -0,0 +1,40 @@
1
+ import { UiState } from '@golemui/core';
2
+ import { DxDefinitions, DxResult } from './formDef.domain';
3
+ import { DxFormConfig, GslSelectorsInput } from './core/dx.domain';
4
+ import { SelectorNormalizer } from './core/selectorNormalizer.service';
5
+ import { EventWiringService } from './core/eventWiring.service';
6
+ import { ItemWalker } from './core/itemWalker.service';
7
+ /**
8
+ * Transforms a developer-friendly form definition into a fully-fledged form definition
9
+ * usable by the framework ({@link Form}<STATE_KEYS, FORM_DATA>).
10
+ *
11
+ * Orchestrates: prepareForm → walkAndMap → buildResult.
12
+ */
13
+ export declare class DxService {
14
+ private readonly selectorNormalizer;
15
+ private readonly eventWiring;
16
+ private readonly walker;
17
+ constructor(selectorNormalizer: SelectorNormalizer, eventWiring: EventWiringService, walker: ItemWalker);
18
+ processDxFacade<STATE_KEYS extends UiState = never, FORM_DATA extends Record<string, any> = any>(dxDefinitionsRaw: DxDefinitions, gslSelectorsInput?: GslSelectorsInput, formConfigInput?: DxFormConfig<STATE_KEYS>): DxResult<STATE_KEYS, FORM_DATA>;
19
+ /**
20
+ * Normalizes raw form definitions and applies form-level defaults.
21
+ *
22
+ * Steps:
23
+ * 1. Normalize definitions — ensure a flat array; convert bare functions to display widgets.
24
+ * 2. Normalize selectors — convert mixed leaf/aggregated selectors into a uniform
25
+ * aggregated shape, and extract form-level config (see {@link FormConfig}).
26
+ * 3. Auto-submit — unless suppressed, append a submit button if none was declared.
27
+ * Throws if more than one submit button is found.
28
+ * 4. Auto-stack — unless suppressed, wrap all definitions in a synthetic root
29
+ * flex column layout so the form renders as a single vertical container.
30
+ */
31
+ private prepareForm;
32
+ /**
33
+ * Converts DX `$`-separated state names to core's `:`-separated names.
34
+ * E.g. `{ register$adult: 'expr' }` → `{ 'register:adult': 'expr' }`.
35
+ */
36
+ private convertStateNames;
37
+ private buildResult;
38
+ }
39
+ declare const formDefs: DxService;
40
+ export { formDefs };
@@ -0,0 +1,52 @@
1
+ import { ValidateOn } from '@golemui/core';
2
+ import { ValidGuiShortcut } from './core/dx.domain';
3
+ import { DxCommonFields, DxInternalFields } from './core/dxBase.types';
4
+ import { DxRuntimeParams } from './core/dxUtilityTypes';
5
+ import { Dependencies } from '../shared';
6
+ import * as Core from '@golemui/core';
7
+ export type GslItemType = string;
8
+ /**
9
+ * @deprecated Use DxCommonFields (+ kind-specific DxInputBase/DxActionBase/etc.)
10
+ * for public decorator interfaces. Use DxInternalFields & DxCommonFields for
11
+ * pipeline-internal code that needs the full set.
12
+ *
13
+ * This type is kept as an alias for backward compatibility with pipeline internals.
14
+ */
15
+ export type WidgetItemDecorator = DxInternalFields & DxCommonFields;
16
+ export type DxDisplayRenderFn = (params: DxRuntimeParams) => any;
17
+ export type DxDefinitionItem = ValidGuiShortcut | DxDisplayRenderFn;
18
+ export type DxDefinitions = DxDefinitionItem | DxDefinitionItem[];
19
+ export type FormEvents = (event: Core.FormEvent) => void;
20
+ export interface DxResult<S extends Core.UiState = never, F extends Record<string, any> = any> {
21
+ form: Core.Form<S, F>;
22
+ events?: FormEvents;
23
+ dependencies?: Dependencies;
24
+ widgetLoaders?: Record<string, () => Promise<unknown>>;
25
+ validateOn?: ValidateOn;
26
+ itemRenderers?: Record<string, unknown>;
27
+ }
28
+ export type { DxEventHandler, DxInternalFields, DxCommonFields, DxInputBase, DxActionBase, DxLayoutBase, DxDisplayBase, } from './core/dxBase.types';
29
+ export type { DataInputDecorator, NumberDataInputValidator, NumberDataInputDecorator, TextDataInputValidator, TextDataInputDecorator, BooleanDataInputDecorator, InputDecorator, ValidShortcutType, DxRuntimeParams, InputTags, } from './shortcuts/inputs/inputs.domain';
30
+ export type { ActionDecorator, ActionDefCallback, ActionDefOrCallback, } from './shortcuts/actions/actions.domain';
31
+ export type { PasswordDecorator } from './shortcuts/password/password.domain';
32
+ export type { CheckboxDecorator } from './shortcuts/checkbox/checkbox.domain';
33
+ export type { DateInputDecorator } from './shortcuts/date-input/dateInput.domain';
34
+ export type { CurrencyDecorator } from './shortcuts/currency/currency.domain';
35
+ export type { RangeCalendarDecorator } from './shortcuts/range-calendar/rangeCalendar.domain';
36
+ export type { SelectDecorator } from './shortcuts/select/select.domain';
37
+ export type { RadiogroupDecorator } from './shortcuts/radiogroup/radiogroup.domain';
38
+ export type { TabsDecorator } from './shortcuts/tabs/tabs.domain';
39
+ export type { ListDecorator } from './shortcuts/list/list.domain';
40
+ export type { AlertDecorator } from './shortcuts/alert/alert.domain';
41
+ export type { DatePickerDecorator } from './shortcuts/date-picker/datePicker.domain';
42
+ export type { DropdownDecorator } from './shortcuts/dropdown/dropdown.domain';
43
+ export type { AccordionDecorator } from './shortcuts/accordion/accordion.domain';
44
+ export type { RepeaterDecorator } from './shortcuts/repeater/repeater.domain';
45
+ export type { MarkdownDecorator } from './shortcuts/markdown/markdown.domain';
46
+ export type { RangeDateInputDecorator } from './shortcuts/range-date-input/rangeDateInput.domain';
47
+ export type { RangeDatePickerDecorator } from './shortcuts/range-date-picker/rangeDatePicker.domain';
48
+ export type { GslDecoratorCallback, DefOrCallback, GslConfigBase, GuiShortcutOf, } from './core/dxUtilityTypes';
49
+ export { createGslSelector } from './core/dxUtilityTypes';
50
+ export { defineShortcutType } from './core/defineShortcutType';
51
+ export type { LabelSensibleDefaultsConfig, PlaceholderSensibleDefaultsConfig, } from './core/sharedSensibleDefaults.service';
52
+ export { processAutoLabel, processAutoPlaceholder } from './core/sharedSensibleDefaults.service';
@@ -0,0 +1,74 @@
1
+ import { _guiTextInput } from './shortcuts/inputs/guiTextInput.impl';
2
+ import { _guiNumberInput } from './shortcuts/inputs/guiNumberInput.impl';
3
+ import { _guiBooleanInput } from './shortcuts/inputs/guiBooleanInput.impl';
4
+ import { _guiSelect } from './shortcuts/select/guiSelect.impl';
5
+ import { _guiDropdown } from './shortcuts/dropdown/guiDropdown.impl';
6
+ import { _guiRadiogroup } from './shortcuts/radiogroup/guiRadiogroup.impl';
7
+ import { _guiCheckbox } from './shortcuts/checkbox/guiCheckbox.impl';
8
+ import { _guiTextarea } from './shortcuts/textarea/guiTextarea.impl';
9
+ import { _guiPassword } from './shortcuts/password/guiPassword.impl';
10
+ import { _guiCurrency } from './shortcuts/currency/guiCurrency.impl';
11
+ import { _guiMarkdown } from './shortcuts/markdown/guiMarkdown.impl';
12
+ import { _guiList } from './shortcuts/list/guiList.impl';
13
+ import { _guiCalendar } from './shortcuts/calendar/guiCalendar.impl';
14
+ import { _guiDateInput } from './shortcuts/date-input/guiDateInput.impl';
15
+ import { _guiDatePicker } from './shortcuts/date-picker/guiDatePicker.impl';
16
+ import { _guiRangeCalendar } from './shortcuts/range-calendar/guiRangeCalendar.impl';
17
+ import { _guiRangeDateInput } from './shortcuts/range-date-input/guiRangeDateInput.impl';
18
+ import { _guiRangeDatePicker } from './shortcuts/range-date-picker/guiRangeDatePicker.impl';
19
+ import { _guiCustomInput } from './shortcuts/custom-input/guiCustomInput.impl';
20
+ import { _guiButton } from './shortcuts/actions/guiActions.impl';
21
+ import { _guiCustomAction } from './shortcuts/custom-action/guiCustomAction.impl';
22
+ import { _guiAlert } from './shortcuts/alert/guiAlert.impl';
23
+ import { _guiCustomDisplay } from './shortcuts/custom-display/guiCustomDisplay.impl';
24
+ import { _guiTabs } from './shortcuts/tabs/guiTabs.impl';
25
+ import { _guiAccordion } from './shortcuts/accordion/guiAccordion.impl';
26
+ import { _guiCustomLayout } from './shortcuts/custom-layout/guiCustomLayout.impl';
27
+ import { _guiRepeater } from './shortcuts/repeater/guiRepeater.impl';
28
+ import { ScopeChain } from './shortcuts/scopes/scopeChain';
29
+ export declare const gui: {
30
+ readonly inputs: {
31
+ readonly textInput: typeof _guiTextInput;
32
+ readonly numberInput: typeof _guiNumberInput;
33
+ readonly booleanInput: typeof _guiBooleanInput;
34
+ readonly select: typeof _guiSelect;
35
+ readonly dropdown: typeof _guiDropdown;
36
+ readonly radiogroup: typeof _guiRadiogroup;
37
+ readonly checkbox: typeof _guiCheckbox;
38
+ readonly textarea: typeof _guiTextarea;
39
+ readonly password: typeof _guiPassword;
40
+ readonly currency: typeof _guiCurrency;
41
+ readonly markdown: typeof _guiMarkdown;
42
+ readonly list: typeof _guiList;
43
+ readonly calendar: typeof _guiCalendar;
44
+ readonly dateInput: typeof _guiDateInput;
45
+ readonly datePicker: typeof _guiDatePicker;
46
+ readonly rangeCalendar: typeof _guiRangeCalendar;
47
+ readonly rangeDateInput: typeof _guiRangeDateInput;
48
+ readonly rangeDatePicker: typeof _guiRangeDatePicker;
49
+ readonly repeater: typeof _guiRepeater;
50
+ readonly custom: typeof _guiCustomInput;
51
+ };
52
+ readonly actions: {
53
+ readonly button: typeof _guiButton;
54
+ readonly submitButton: (defs?: import('./formDef.domain').ActionDecorator | import('./formDef.domain').ActionDefOrCallback) => import('./shortcuts/actions/actions.domain').GuiActionsShortcut;
55
+ readonly custom: typeof _guiCustomAction;
56
+ };
57
+ readonly displays: {
58
+ readonly display: (render: (params: import('./formDef.domain').DxRuntimeParams) => any, tags?: string[]) => import('./shortcuts/display/display.domain').GuiDisplayItemsShortcut;
59
+ readonly alert: typeof _guiAlert;
60
+ readonly custom: typeof _guiCustomDisplay;
61
+ };
62
+ readonly layouts: {
63
+ readonly flex: (children: import('./core/dx.domain').ValidGuiShortcut[], props?: import('./shortcuts/layouts/layouts.domain').FlexFamilyProps, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
64
+ readonly horizontalFlex: (children: import('./core/dx.domain').ValidGuiShortcut[], props?: Omit<import('./shortcuts/layouts/layouts.domain').FlexFamilyProps, "direction">, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
65
+ readonly verticalFlex: (children: import('./core/dx.domain').ValidGuiShortcut[], props?: Omit<import('./shortcuts/layouts/layouts.domain').FlexFamilyProps, "direction">, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
66
+ readonly grid: (children: import('./core/dx.domain').ValidGuiShortcut[], props?: import('./shortcuts/layouts/layouts.domain').GridFamilyProps, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
67
+ readonly horizontalGrid: (children: import('./core/dx.domain').ValidGuiShortcut[], props?: Omit<import('./shortcuts/layouts/layouts.domain').GridFamilyProps, "direction">, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
68
+ readonly verticalGrid: (children: import('./core/dx.domain').ValidGuiShortcut[], props?: Omit<import('./shortcuts/layouts/layouts.domain').GridFamilyProps, "direction">, tags?: string[]) => import('./shortcuts/layouts/layouts.domain').GuiLayoutItemsShortcut;
69
+ readonly tabs: typeof _guiTabs;
70
+ readonly accordion: typeof _guiAccordion;
71
+ readonly custom: typeof _guiCustomLayout;
72
+ };
73
+ readonly selectors: ScopeChain;
74
+ };
@@ -0,0 +1,100 @@
1
+ export { gui } from './gui';
2
+ export { _guiAccordion } from './shortcuts/accordion/guiAccordion.impl';
3
+ export { _guiButton, _guiSubmitButton } from './shortcuts/actions/guiActions.impl';
4
+ export { _guiAlert } from './shortcuts/alert/guiAlert.impl';
5
+ export { _guiCalendar } from './shortcuts/calendar/guiCalendar.impl';
6
+ export { _guiCheckbox } from './shortcuts/checkbox/guiCheckbox.impl';
7
+ export { _guiCurrency } from './shortcuts/currency/guiCurrency.impl';
8
+ export { _guiCustomAction } from './shortcuts/custom-action/guiCustomAction.impl';
9
+ export { _guiCustomDisplay } from './shortcuts/custom-display/guiCustomDisplay.impl';
10
+ export { _guiCustomInput } from './shortcuts/custom-input/guiCustomInput.impl';
11
+ export { _guiCustomLayout } from './shortcuts/custom-layout/guiCustomLayout.impl';
12
+ export { _guiDateInput } from './shortcuts/date-input/guiDateInput.impl';
13
+ export { _guiDatePicker } from './shortcuts/date-picker/guiDatePicker.impl';
14
+ export { _guiDisplay } from './shortcuts/display/guiDisplay.impl';
15
+ export { _guiDropdown } from './shortcuts/dropdown/guiDropdown.impl';
16
+ export { _guiBooleanInput } from './shortcuts/inputs/guiBooleanInput.impl';
17
+ export { _guiNumberInput } from './shortcuts/inputs/guiNumberInput.impl';
18
+ export { _guiTextInput } from './shortcuts/inputs/guiTextInput.impl';
19
+ export { _guiFlex, _guiGrid, _guiHorizontalFlex, _guiHorizontalGrid, _guiVerticalFlex, _guiVerticalGrid, } from './shortcuts/layouts/guiFlex.impl';
20
+ export { _guiList } from './shortcuts/list/guiList.impl';
21
+ export { _guiMarkdown } from './shortcuts/markdown/guiMarkdown.impl';
22
+ export { _guiPassword } from './shortcuts/password/guiPassword.impl';
23
+ export { _guiRadiogroup } from './shortcuts/radiogroup/guiRadiogroup.impl';
24
+ export { _guiRangeCalendar } from './shortcuts/range-calendar/guiRangeCalendar.impl';
25
+ export { _guiRangeDateInput } from './shortcuts/range-date-input/guiRangeDateInput.impl';
26
+ export { _guiRangeDatePicker } from './shortcuts/range-date-picker/guiRangeDatePicker.impl';
27
+ export { _guiRepeater } from './shortcuts/repeater/guiRepeater.impl';
28
+ export { _guiSelect } from './shortcuts/select/guiSelect.impl';
29
+ export { _guiTabs } from './shortcuts/tabs/guiTabs.impl';
30
+ export { _guiTextarea } from './shortcuts/textarea/guiTextarea.impl';
31
+ export { _gslAccordionByUid, _gslAccordions } from './shortcuts/accordion/register';
32
+ export { _gslActionByUid, _gslActions } from './shortcuts/actions/register';
33
+ export { _gslAlertByUid, _gslAlerts } from './shortcuts/alert/register';
34
+ export { _gslCalendarByUid, _gslCalendars } from './shortcuts/calendar/register';
35
+ export { _gslCheckboxByUid, _gslCheckboxes } from './shortcuts/checkbox/register';
36
+ export { _gslCurrencies, _gslCurrencyByUid } from './shortcuts/currency/register';
37
+ export { _gslCustomActionByUid, _gslCustomActions } from './shortcuts/custom-action/register';
38
+ export { _gslCustomDisplayByUid, _gslCustomDisplays } from './shortcuts/custom-display/register';
39
+ export { _gslCustomInputByUid, _gslCustomInputs } from './shortcuts/custom-input/register';
40
+ export { _gslCustomLayoutByUid, _gslCustomLayouts } from './shortcuts/custom-layout/register';
41
+ export { _gslDateInputByUid, _gslDateInputs } from './shortcuts/date-input/register';
42
+ export { _gslDatePickerByUid, _gslDatePickers } from './shortcuts/date-picker/register';
43
+ export { _gslDisplayByUid, _gslDisplays } from './shortcuts/display/register';
44
+ export { _gslDropdownByUid, _gslDropdowns } from './shortcuts/dropdown/register';
45
+ export { _gslBooleanInputs, _gslNumberInputs, _gslTextInputs, } from './shortcuts/inputs/gslInputSubtypes';
46
+ export { _gslInputByUid, _gslInputs } from './shortcuts/inputs/register';
47
+ export { _gslLayoutByUid, _gslLayouts } from './shortcuts/layouts/register';
48
+ export { _gslListByUid, _gslLists } from './shortcuts/list/register';
49
+ export { _gslMarkdownByUid, _gslMarkdowns } from './shortcuts/markdown/register';
50
+ export { _gslPasswordByUid, _gslPasswords } from './shortcuts/password/register';
51
+ export { _gslRadiogroupByUid, _gslRadiogroups } from './shortcuts/radiogroup/register';
52
+ export { _gslRangeCalendarByUid, _gslRangeCalendars } from './shortcuts/range-calendar/register';
53
+ export { _gslRangeDateInputByUid, _gslRangeDateInputs, } from './shortcuts/range-date-input/register';
54
+ export { _gslRangeDatePickerByUid, _gslRangeDatePickers, } from './shortcuts/range-date-picker/register';
55
+ export { _gslRepeaterByUid, _gslRepeaters } from './shortcuts/repeater/register';
56
+ export { _gslSelectByUid, _gslSelects } from './shortcuts/select/register';
57
+ export { _gslTabs, _gslTabsByUid } from './shortcuts/tabs/register';
58
+ export { _gslTextareaByUid, _gslTextareas } from './shortcuts/textarea/register';
59
+ export { _gslStates } from './shortcuts/scopes/gslStates.impl';
60
+ export { _gslTag } from './shortcuts/scopes/gslTag.impl';
61
+ export type { DxFormConfig, FormConfig, GslSelectorsInput } from './core/dx.domain';
62
+ export type { DxRuntimeParams } from './core/dxUtilityTypes';
63
+ export { formDefs } from './dx.service';
64
+ export type { DxDefinitionItem, DxDefinitions, DxDisplayRenderFn, DxResult, FormEvents, } from './formDef.domain';
65
+ export { isDxDefinitions, resolveFormInput } from './resolveFormInput';
66
+ export type { FormInput, GuiFormInitConfig, ResolvedFormInput } from './resolveFormInput';
67
+ export type { AccordionDecorator, GslAccordionConfig, } from './shortcuts/accordion/accordion.domain';
68
+ export type { ActionDecorator, GslActionsConfig } from './shortcuts/actions/actions.domain';
69
+ export type { AlertDecorator, GslAlertsConfig } from './shortcuts/alert/alert.domain';
70
+ export type { CalendarDecorator, GslCalendarConfig } from './shortcuts/calendar/calendar.domain';
71
+ export type { CheckboxDecorator, GslCheckboxConfig } from './shortcuts/checkbox/checkbox.domain';
72
+ export type { CurrencyDecorator, GslCurrencyConfig } from './shortcuts/currency/currency.domain';
73
+ export type { CustomActionDecorator, GslCustomActionConfig, } from './shortcuts/custom-action/customAction.domain';
74
+ export type { CustomDisplayDecorator, GslCustomDisplayConfig, } from './shortcuts/custom-display/customDisplay.domain';
75
+ export type { CustomInputDecorator, GslCustomInputConfig, } from './shortcuts/custom-input/customInput.domain';
76
+ export type { CustomLayoutDecorator, GslCustomLayoutConfig, } from './shortcuts/custom-layout/customLayout.domain';
77
+ export type { DateInputDecorator, GslDateInputConfig, } from './shortcuts/date-input/dateInput.domain';
78
+ export type { DatePickerDecorator, GslDatePickerConfig, } from './shortcuts/date-picker/datePicker.domain';
79
+ export type { DisplayDecorator, GslDisplaysConfig } from './shortcuts/display/display.domain';
80
+ export type { DropdownDecorator, GslDropdownConfig } from './shortcuts/dropdown/dropdown.domain';
81
+ export type { BooleanDataInputDecorator, GslInputsConfig, InputDecorator, InputTags, NumberDataInputDecorator, SimpleFieldDef, TextDataInputDecorator, ValidShortcutType, } from './shortcuts/inputs/inputs.domain';
82
+ export type { GslLayoutsConfig, LayoutDecorator } from './shortcuts/layouts/layouts.domain';
83
+ export type { GslListConfig, ListDecorator } from './shortcuts/list/list.domain';
84
+ export type { GslMarkdownConfig, MarkdownDecorator } from './shortcuts/markdown/markdown.domain';
85
+ export type { GslPasswordConfig, PasswordDecorator } from './shortcuts/password/password.domain';
86
+ export type { GslRadiogroupConfig, RadiogroupDecorator, } from './shortcuts/radiogroup/radiogroup.domain';
87
+ export type { GslRangeCalendarConfig, RangeCalendarDecorator, } from './shortcuts/range-calendar/rangeCalendar.domain';
88
+ export type { GslRangeDateInputConfig, RangeDateInputDecorator, } from './shortcuts/range-date-input/rangeDateInput.domain';
89
+ export type { GslRangeDatePickerConfig, RangeDatePickerDecorator, } from './shortcuts/range-date-picker/rangeDatePicker.domain';
90
+ export type { GslRepeaterConfig, RepeaterDecorator } from './shortcuts/repeater/repeater.domain';
91
+ export type { GslSelectConfig, SelectDecorator } from './shortcuts/select/select.domain';
92
+ export type { GslTabsConfig, TabsDecorator } from './shortcuts/tabs/tabs.domain';
93
+ export type { GslTextareaConfig, TextareaDecorator } from './shortcuts/textarea/textarea.domain';
94
+ export { defineShortcutType } from './core/defineShortcutType';
95
+ export type { ShortcutTypeSelectors } from './core/defineShortcutType';
96
+ export type { DxActionBase, DxCommonFields, DxDisplayBase, DxFormEvent, DxInputBase, DxInternalFields, DxLayoutBase, } from './core/dxBase.types';
97
+ export { extractWidgetProps } from './core/dxPropsHelper';
98
+ export { createGslSelector } from './core/dxUtilityTypes';
99
+ export type { DefOrCallback, GslConfigBase, GslDecoratorCallback, GuiShortcutOf, } from './core/dxUtilityTypes';
100
+ export { processAutoLabel, processAutoPlaceholder } from './core/sharedSensibleDefaults.service';
File without changes
@@ -0,0 +1,37 @@
1
+ import { ValidateOn } from '@golemui/core';
2
+ import { CustomValidatorSchemas } from '@golemui/gui-validators';
3
+ import { Dependencies } from '../shared';
4
+ import { DxFormConfig, GslSelectorsInput } from './core/dx.domain';
5
+ import { DxDefinitions, FormEvents } from './formDef.domain';
6
+ import * as Core from '@golemui/core';
7
+ export type FormInput = string | Record<string, any> | DxDefinitions;
8
+ export interface GuiFormInitConfig {
9
+ formDef: FormInput;
10
+ formSelectors?: GslSelectorsInput;
11
+ formConfig?: DxFormConfig;
12
+ customWidgetLoaders?: Record<string, () => Promise<unknown>>;
13
+ customValidators?: CustomValidatorSchemas;
14
+ data?: Record<string, any>;
15
+ meta?: Record<string, any>;
16
+ middlewares?: Core.Middleware<Core.State, Core.Action>[];
17
+ validateOn?: ValidateOn;
18
+ itemRenderers?: Record<string, unknown>;
19
+ localization?: Core.I18nTranslator;
20
+ dependencies?: Dependencies;
21
+ formName?: string;
22
+ }
23
+ export interface ResolvedFormInput<FormData extends Record<string, any> = any> {
24
+ formDef: string | Record<string, any> | Core.Form<any, FormData>;
25
+ formEvent?: FormEvents;
26
+ dependencies?: Dependencies;
27
+ widgetLoaders?: Record<string, () => Promise<unknown>>;
28
+ validateOn?: ValidateOn;
29
+ itemRenderers?: Record<string, unknown>;
30
+ }
31
+ /**
32
+ * Heuristic discriminator: a DX bundle is an array of `_gui*` shortcuts (each
33
+ * carrying `type: 'ITEMS'`) or a single such shortcut. JSON form defs are
34
+ * either strings or plain objects with `kind`/`type` at the top level.
35
+ */
36
+ export declare function isDxDefinitions(input: unknown): input is DxDefinitions;
37
+ export declare function resolveFormInput<FormData extends Record<string, any> = any>(formDef: FormInput | undefined, formSelectors?: GslSelectorsInput, formConfig?: DxFormConfig): ResolvedFormInput<FormData>;
@@ -0,0 +1,20 @@
1
+ import { DxCommonFields, DxLayoutBase } from '../../core/dxBase.types';
2
+ import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
3
+ import { ValidGuiShortcut } from '../../core/dx.domain';
4
+ export interface AccordionDecorator extends DxLayoutBase, DxCommonFields {
5
+ sections: {
6
+ label: string;
7
+ uid: string;
8
+ }[];
9
+ singleOpen?: boolean;
10
+ defaultOpen?: {
11
+ [key: string]: boolean;
12
+ };
13
+ renderMode?: 'all' | 'activeOnly';
14
+ }
15
+ export type GslAccordionConfig = GslConfigBase<AccordionDecorator>;
16
+ export type AccordionEntry = {
17
+ def: DefOrCallback<AccordionDecorator>;
18
+ children: ValidGuiShortcut[];
19
+ };
20
+ export type GuiAccordionShortcut = GuiShortcutOf<'ACCORDION', AccordionEntry>;
@@ -0,0 +1,12 @@
1
+ import { ValidGuiShortcut } from '../../core/dx.domain';
2
+ import { AccordionDecorator, GuiAccordionShortcut } from './accordion.domain';
3
+ type AccordionFactoryProps = Omit<AccordionDecorator, 'sections'>;
4
+ export interface AccordionSection {
5
+ label: string;
6
+ children: ValidGuiShortcut[];
7
+ uid?: string;
8
+ }
9
+ export declare function _guiAccordion(sections: AccordionSection[]): GuiAccordionShortcut;
10
+ export declare function _guiAccordion(sections: AccordionSection[], props: AccordionFactoryProps): GuiAccordionShortcut;
11
+ export declare function _guiAccordion(sections: AccordionSection[], props: AccordionFactoryProps, tags: string[]): GuiAccordionShortcut;
12
+ export {};
@@ -0,0 +1,2 @@
1
+ import { AccordionDecorator, GslAccordionConfig } from './accordion.domain';
2
+ export declare const _gslAccordions: (config: GslAccordionConfig, matcher?: ((decorator: AccordionDecorator) => boolean) | undefined) => import('../../core/dx.domain').GslLeafSelector, _gslAccordionByUid: (uid: string, config: GslAccordionConfig) => import('../../core/dx.domain').GslLeafSelector;
@@ -0,0 +1,21 @@
1
+ import { ButtonProps } from '../../../widget.props';
2
+ import { DxActionBase, DxCommonFields, DxInternalFields } from '../../core/dxBase.types';
3
+ import { DxRuntimeParams, DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
4
+ export interface ActionDecorator extends DxActionBase, DxCommonFields, Partial<ButtonProps> {
5
+ data?: any | null;
6
+ type?: 'button';
7
+ on?: {
8
+ click: string;
9
+ };
10
+ onClick?: ((data: any) => void) | string;
11
+ }
12
+ /**
13
+ * Full decorator type including pipeline-internal fields.
14
+ */
15
+ export type ActionDecoratorFull = ActionDecorator & DxInternalFields;
16
+ export type ActionDefCallback = (params: DxRuntimeParams) => Partial<ActionDecorator>;
17
+ export type ActionDefOrCallback = DefOrCallback<ActionDecorator>;
18
+ export type ActionSensibleDefaultsConfig = Record<string, never>;
19
+ export type GslActionsConfig = GslConfigBase<ActionDecorator>;
20
+ export type ActionEntry = ActionDefOrCallback;
21
+ export type GuiActionsShortcut = GuiShortcutOf<'ACTIONS', ActionEntry>;
@@ -0,0 +1,7 @@
1
+ import { DxRuntimeParams } from '../../core/dxUtilityTypes';
2
+ import { ActionDecorator, ActionDefOrCallback, GuiActionsShortcut } from './actions.domain';
3
+ export declare function _guiButton(props: ActionDecorator): GuiActionsShortcut;
4
+ export declare function _guiButton(props: ActionDecorator, tags: string[]): GuiActionsShortcut;
5
+ export declare function _guiButton(callback: (params: DxRuntimeParams) => Partial<ActionDecorator>): GuiActionsShortcut;
6
+ export declare function _guiButton(callback: (params: DxRuntimeParams) => Partial<ActionDecorator>, tags: string[]): GuiActionsShortcut;
7
+ export declare const _guiSubmitButton: (defs?: ActionDecorator | ActionDefOrCallback) => GuiActionsShortcut;
@@ -0,0 +1,2 @@
1
+ import { ActionDecorator, GslActionsConfig } from './actions.domain';
2
+ export declare const _gslActions: (config: GslActionsConfig, matcher?: ((decorator: ActionDecorator) => boolean) | undefined) => import('../../core/dx.domain').GslLeafSelector, _gslActionByUid: (uid: string, config: GslActionsConfig) => import('../../core/dx.domain').GslLeafSelector;
@@ -0,0 +1,9 @@
1
+ import { AlertProps } from '../../../widget.props';
2
+ import { DxCommonFields } from '../../core/dxBase.types';
3
+ import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
4
+ export interface AlertDecorator extends DxCommonFields, Partial<AlertProps> {
5
+ text: string;
6
+ }
7
+ export type GslAlertsConfig = GslConfigBase<AlertDecorator>;
8
+ export type AlertEntry = DefOrCallback<AlertDecorator>;
9
+ export type GuiAlertShortcut = GuiShortcutOf<'ALERTS', AlertEntry>;
@@ -0,0 +1,6 @@
1
+ import { DxRuntimeParams } from '../../core/dxUtilityTypes';
2
+ import { AlertDecorator, GuiAlertShortcut } from './alert.domain';
3
+ type AlertFactoryProps = AlertDecorator;
4
+ export declare function _guiAlert(props: AlertFactoryProps, tags?: string[]): GuiAlertShortcut;
5
+ export declare function _guiAlert(callback: (params: DxRuntimeParams) => AlertFactoryProps, tags?: string[]): GuiAlertShortcut;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ import { AlertDecorator, GslAlertsConfig } from './alert.domain';
2
+ export declare const _gslAlerts: (config: GslAlertsConfig, matcher?: ((decorator: AlertDecorator) => boolean) | undefined) => import('../../core/dx.domain').GslLeafSelector, _gslAlertByUid: (uid: string, config: GslAlertsConfig) => import('../../core/dx.domain').GslLeafSelector;
@@ -0,0 +1,21 @@
1
+ import { StringValidator } from '@golemui/gui-validators';
2
+ import { CalendarProps } from '../../../widget.props';
3
+ import { DxCommonFields, DxInputBase, DxInternalFields } from '../../core/dxBase.types';
4
+ import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ export interface CalendarDecorator extends DxInputBase, DxCommonFields, Partial<CalendarProps> {
6
+ type: 'calendar';
7
+ validator?: Omit<StringValidator, 'type'>;
8
+ }
9
+ /**
10
+ * Full decorator type including pipeline-internal fields.
11
+ * Used by the pipeline only — form authors use CalendarDecorator.
12
+ */
13
+ export type CalendarDecoratorFull = CalendarDecorator & DxInternalFields;
14
+ export interface CalendarSensibleDefaultsConfig {
15
+ suppressAutomaticLabels?: boolean;
16
+ }
17
+ export interface GslCalendarConfig extends GslConfigBase<CalendarDecorator> {
18
+ suppressAutomaticLabels?: boolean;
19
+ }
20
+ export type CalendarEntry = DefOrCallback<CalendarDecorator>;
21
+ export type GuiCalendarShortcut = GuiShortcutOf<'CALENDAR', CalendarEntry>;
@@ -0,0 +1,6 @@
1
+ import { CalendarDecorator, CalendarSensibleDefaultsConfig } from './calendar.domain';
2
+ export declare class CalendarSensibleDefaultsService {
3
+ processAutomaticLabels(item: CalendarDecorator, currentConfig: CalendarSensibleDefaultsConfig): CalendarDecorator;
4
+ }
5
+ declare const calendarSensibleDefaultsService: CalendarSensibleDefaultsService;
6
+ export default calendarSensibleDefaultsService;
@@ -0,0 +1,6 @@
1
+ import { DxRuntimeParams } from '../../core/dxUtilityTypes';
2
+ import { GuiCalendarShortcut, CalendarDecorator } from './calendar.domain';
3
+ export declare function _guiCalendar(path: string): GuiCalendarShortcut;
4
+ export declare function _guiCalendar(path: string, props: Partial<Omit<CalendarDecorator, 'type'>>): GuiCalendarShortcut;
5
+ export declare function _guiCalendar(path: string, props: Partial<Omit<CalendarDecorator, 'type'>>, tags: string[]): GuiCalendarShortcut;
6
+ export declare function _guiCalendar(path: string, callback: (params: DxRuntimeParams) => Partial<Omit<CalendarDecorator, 'type'>>, tags?: string[]): GuiCalendarShortcut;
@@ -0,0 +1,2 @@
1
+ import { CalendarDecorator, GslCalendarConfig } from './calendar.domain';
2
+ export declare const _gslCalendars: (config: GslCalendarConfig, matcher?: ((decorator: CalendarDecorator) => boolean) | undefined) => import('../../core/dx.domain').GslLeafSelector, _gslCalendarByUid: (uid: string, config: GslCalendarConfig) => import('../../core/dx.domain').GslLeafSelector;
@@ -0,0 +1,16 @@
1
+ import { BooleanValidator } from '@golemui/gui-validators';
2
+ import { CheckboxProps } from '../../../widget.props';
3
+ import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
4
+ import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ export interface CheckboxDecorator extends DxInputBase, DxCommonFields, Partial<CheckboxProps> {
6
+ type: 'checkbox';
7
+ validator?: Omit<BooleanValidator, 'type'>;
8
+ }
9
+ export interface GslCheckboxConfig extends GslConfigBase<CheckboxDecorator> {
10
+ suppressAutomaticLabels?: boolean;
11
+ }
12
+ export type CheckboxEntry = {
13
+ key: string;
14
+ def: DefOrCallback<CheckboxDecorator>;
15
+ };
16
+ export type GuiCheckboxShortcut = GuiShortcutOf<'CHECKBOX', CheckboxEntry>;
@@ -0,0 +1,6 @@
1
+ import { DxRuntimeParams } from '../../core/dxUtilityTypes';
2
+ import { CheckboxDecorator, GuiCheckboxShortcut } from './checkbox.domain';
3
+ export declare function _guiCheckbox(path: string): GuiCheckboxShortcut;
4
+ export declare function _guiCheckbox(path: string, props: Partial<Omit<CheckboxDecorator, 'type'>>): GuiCheckboxShortcut;
5
+ export declare function _guiCheckbox(path: string, props: Partial<Omit<CheckboxDecorator, 'type'>>, tags: string[]): GuiCheckboxShortcut;
6
+ export declare function _guiCheckbox(path: string, callback: (params: DxRuntimeParams) => Partial<Omit<CheckboxDecorator, 'type'>>, tags?: string[]): GuiCheckboxShortcut;
@@ -0,0 +1,2 @@
1
+ import { CheckboxDecorator, GslCheckboxConfig } from './checkbox.domain';
2
+ export declare const _gslCheckboxes: (config: GslCheckboxConfig, matcher?: ((decorator: CheckboxDecorator) => boolean) | undefined) => import('../../core/dx.domain').GslLeafSelector, _gslCheckboxByUid: (uid: string, config: GslCheckboxConfig) => import('../../core/dx.domain').GslLeafSelector;
@@ -0,0 +1,17 @@
1
+ import { NumberValidator } from '@golemui/gui-validators';
2
+ import { CurrencyProps } from '../../../widget.props';
3
+ import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
4
+ import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
5
+ export interface CurrencyDecorator extends DxInputBase, DxCommonFields, Partial<CurrencyProps> {
6
+ type: 'currency';
7
+ validator?: Omit<NumberValidator, 'type'>;
8
+ }
9
+ export interface GslCurrencyConfig extends GslConfigBase<CurrencyDecorator> {
10
+ suppressAutomaticLabels?: boolean;
11
+ suppressAutomaticPlaceholders?: boolean;
12
+ }
13
+ export type CurrencyEntry = {
14
+ key: string;
15
+ def: DefOrCallback<CurrencyDecorator>;
16
+ };
17
+ export type GuiCurrencyShortcut = GuiShortcutOf<'CURRENCY', CurrencyEntry>;
@@ -0,0 +1,6 @@
1
+ import { DxRuntimeParams } from '../../core/dxUtilityTypes';
2
+ import { CurrencyDecorator, GuiCurrencyShortcut } from './currency.domain';
3
+ export declare function _guiCurrency(path: string): GuiCurrencyShortcut;
4
+ export declare function _guiCurrency(path: string, props: Partial<Omit<CurrencyDecorator, 'type'>>): GuiCurrencyShortcut;
5
+ export declare function _guiCurrency(path: string, props: Partial<Omit<CurrencyDecorator, 'type'>>, tags: string[]): GuiCurrencyShortcut;
6
+ export declare function _guiCurrency(path: string, callback: (params: DxRuntimeParams) => Partial<Omit<CurrencyDecorator, 'type'>>, tags?: string[]): GuiCurrencyShortcut;
@@ -0,0 +1,2 @@
1
+ import { CurrencyDecorator, GslCurrencyConfig } from './currency.domain';
2
+ export declare const _gslCurrencies: (config: GslCurrencyConfig, matcher?: ((decorator: CurrencyDecorator) => boolean) | undefined) => import('../../core/dx.domain').GslLeafSelector, _gslCurrencyByUid: (uid: string, config: GslCurrencyConfig) => import('../../core/dx.domain').GslLeafSelector;