@golemui/gui-shared 1.1.1-rc.0 → 1.1.1-rc.2

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 (162) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/index.js +23 -366
  3. package/index.umd.cjs +1 -1
  4. package/internals.js +162 -757
  5. package/internals.umd.cjs +1 -1
  6. package/lib/dx/__tests__/helpers.d.ts +1 -1
  7. package/lib/dx/formDef.domain.d.ts +8 -33
  8. package/lib/dx/formDefs.d.ts +7 -0
  9. package/lib/dx/gui.d.ts +281 -52
  10. package/lib/dx/guiDependencyTypes.d.ts +14 -0
  11. package/lib/dx/index.d.ts +12 -11
  12. package/lib/dx/registry.d.ts +26 -0
  13. package/lib/dx/resolveFormInput.d.ts +7 -20
  14. package/lib/dx/shortcuts/accordion/accordion.domain.d.ts +1 -3
  15. package/lib/dx/shortcuts/accordion/guiAccordion.impl.d.ts +1 -1
  16. package/lib/dx/shortcuts/accordion/register.d.ts +4 -2
  17. package/lib/dx/shortcuts/actions/actions.domain.d.ts +1 -2
  18. package/lib/dx/shortcuts/actions/guiActions.impl.d.ts +1 -1
  19. package/lib/dx/shortcuts/actions/register.d.ts +3 -1
  20. package/lib/dx/shortcuts/alert/alert.domain.d.ts +1 -2
  21. package/lib/dx/shortcuts/alert/guiAlert.impl.d.ts +1 -1
  22. package/lib/dx/shortcuts/alert/register.d.ts +4 -2
  23. package/lib/dx/shortcuts/calendar/calendar.domain.d.ts +1 -3
  24. package/lib/dx/shortcuts/calendar/guiCalendar.impl.d.ts +1 -1
  25. package/lib/dx/shortcuts/calendar/register.d.ts +4 -2
  26. package/lib/dx/shortcuts/checkbox/checkbox.domain.d.ts +1 -3
  27. package/lib/dx/shortcuts/checkbox/guiCheckbox.impl.d.ts +1 -1
  28. package/lib/dx/shortcuts/checkbox/register.d.ts +4 -2
  29. package/lib/dx/shortcuts/currency/currency.domain.d.ts +1 -3
  30. package/lib/dx/shortcuts/currency/guiCurrency.impl.d.ts +1 -1
  31. package/lib/dx/shortcuts/currency/register.d.ts +4 -2
  32. package/lib/dx/shortcuts/custom-action/customAction.domain.d.ts +1 -2
  33. package/lib/dx/shortcuts/custom-action/guiCustomAction.impl.d.ts +1 -1
  34. package/lib/dx/shortcuts/custom-action/register.d.ts +4 -2
  35. package/lib/dx/shortcuts/custom-display/customDisplay.domain.d.ts +1 -2
  36. package/lib/dx/shortcuts/custom-display/guiCustomDisplay.impl.d.ts +1 -1
  37. package/lib/dx/shortcuts/custom-display/register.d.ts +4 -2
  38. package/lib/dx/shortcuts/custom-input/customInput.domain.d.ts +1 -2
  39. package/lib/dx/shortcuts/custom-input/guiCustomInput.impl.d.ts +1 -1
  40. package/lib/dx/shortcuts/custom-input/register.d.ts +4 -2
  41. package/lib/dx/shortcuts/custom-layout/customLayout.domain.d.ts +1 -3
  42. package/lib/dx/shortcuts/custom-layout/guiCustomLayout.impl.d.ts +1 -2
  43. package/lib/dx/shortcuts/custom-layout/register.d.ts +4 -2
  44. package/lib/dx/shortcuts/date-input/dateInput.domain.d.ts +1 -3
  45. package/lib/dx/shortcuts/date-input/guiDateInput.impl.d.ts +1 -1
  46. package/lib/dx/shortcuts/date-input/register.d.ts +4 -2
  47. package/lib/dx/shortcuts/date-picker/datePicker.domain.d.ts +1 -3
  48. package/lib/dx/shortcuts/date-picker/guiDatePicker.impl.d.ts +1 -1
  49. package/lib/dx/shortcuts/date-picker/register.d.ts +4 -2
  50. package/lib/dx/shortcuts/date-time-calendar/dateTimeCalendar.domain.d.ts +1 -3
  51. package/lib/dx/shortcuts/date-time-calendar/guiDateTimeCalendar.impl.d.ts +1 -1
  52. package/lib/dx/shortcuts/date-time-calendar/register.d.ts +4 -2
  53. package/lib/dx/shortcuts/date-time-input/dateTimeInput.domain.d.ts +1 -3
  54. package/lib/dx/shortcuts/date-time-input/guiDateTimeInput.impl.d.ts +1 -1
  55. package/lib/dx/shortcuts/date-time-input/register.d.ts +4 -2
  56. package/lib/dx/shortcuts/date-time-picker/dateTimePicker.domain.d.ts +1 -3
  57. package/lib/dx/shortcuts/date-time-picker/guiDateTimePicker.impl.d.ts +1 -1
  58. package/lib/dx/shortcuts/date-time-picker/register.d.ts +4 -2
  59. package/lib/dx/shortcuts/display/display.domain.d.ts +1 -2
  60. package/lib/dx/shortcuts/display/guiDisplay.impl.d.ts +1 -1
  61. package/lib/dx/shortcuts/display/register.d.ts +4 -2
  62. package/lib/dx/shortcuts/dropdown/dropdown.domain.d.ts +1 -2
  63. package/lib/dx/shortcuts/dropdown/guiDropdown.impl.d.ts +1 -1
  64. package/lib/dx/shortcuts/dropdown/register.d.ts +4 -2
  65. package/lib/dx/shortcuts/inputs/gslInputSubtypes.d.ts +3 -3
  66. package/lib/dx/shortcuts/inputs/guiBooleanInput.impl.d.ts +1 -1
  67. package/lib/dx/shortcuts/inputs/guiNumberInput.impl.d.ts +1 -1
  68. package/lib/dx/shortcuts/inputs/guiTextInput.impl.d.ts +1 -1
  69. package/lib/dx/shortcuts/inputs/inputSensibleDefaults.service.d.ts +1 -1
  70. package/lib/dx/shortcuts/inputs/inputs.domain.d.ts +1 -3
  71. package/lib/dx/shortcuts/inputs/register.d.ts +4 -2
  72. package/lib/dx/shortcuts/layouts/guiFlex.impl.d.ts +1 -1
  73. package/lib/dx/shortcuts/layouts/layouts.domain.d.ts +1 -3
  74. package/lib/dx/shortcuts/layouts/register.d.ts +4 -2
  75. package/lib/dx/shortcuts/list/guiList.impl.d.ts +1 -1
  76. package/lib/dx/shortcuts/list/list.domain.d.ts +1 -2
  77. package/lib/dx/shortcuts/list/register.d.ts +4 -2
  78. package/lib/dx/shortcuts/markdown/guiMarkdown.impl.d.ts +1 -1
  79. package/lib/dx/shortcuts/markdown/markdown.domain.d.ts +1 -3
  80. package/lib/dx/shortcuts/markdown/register.d.ts +4 -2
  81. package/lib/dx/shortcuts/markdown-text/guiMarkdownText.impl.d.ts +1 -1
  82. package/lib/dx/shortcuts/markdown-text/markdownText.domain.d.ts +1 -2
  83. package/lib/dx/shortcuts/markdown-text/register.d.ts +4 -2
  84. package/lib/dx/shortcuts/password/guiPassword.impl.d.ts +1 -1
  85. package/lib/dx/shortcuts/password/password.domain.d.ts +1 -3
  86. package/lib/dx/shortcuts/password/register.d.ts +4 -2
  87. package/lib/dx/shortcuts/radiogroup/guiRadiogroup.impl.d.ts +1 -1
  88. package/lib/dx/shortcuts/radiogroup/radiogroup.domain.d.ts +1 -2
  89. package/lib/dx/shortcuts/radiogroup/register.d.ts +4 -2
  90. package/lib/dx/shortcuts/range-calendar/guiRangeCalendar.impl.d.ts +1 -1
  91. package/lib/dx/shortcuts/range-calendar/rangeCalendar.domain.d.ts +1 -3
  92. package/lib/dx/shortcuts/range-calendar/register.d.ts +4 -2
  93. package/lib/dx/shortcuts/range-date-input/guiRangeDateInput.impl.d.ts +1 -1
  94. package/lib/dx/shortcuts/range-date-input/rangeDateInput.domain.d.ts +1 -3
  95. package/lib/dx/shortcuts/range-date-input/register.d.ts +4 -2
  96. package/lib/dx/shortcuts/range-date-picker/guiRangeDatePicker.impl.d.ts +1 -1
  97. package/lib/dx/shortcuts/range-date-picker/rangeDatePicker.domain.d.ts +1 -3
  98. package/lib/dx/shortcuts/range-date-picker/register.d.ts +4 -2
  99. package/lib/dx/shortcuts/range-date-time-calendar/guiRangeDateTimeCalendar.impl.d.ts +1 -1
  100. package/lib/dx/shortcuts/range-date-time-calendar/rangeDateTimeCalendar.domain.d.ts +1 -3
  101. package/lib/dx/shortcuts/range-date-time-calendar/register.d.ts +4 -2
  102. package/lib/dx/shortcuts/range-date-time-input/guiRangeDateTimeInput.impl.d.ts +1 -1
  103. package/lib/dx/shortcuts/range-date-time-input/rangeDateTimeInput.domain.d.ts +1 -3
  104. package/lib/dx/shortcuts/range-date-time-input/register.d.ts +4 -2
  105. package/lib/dx/shortcuts/range-date-time-picker/guiRangeDateTimePicker.impl.d.ts +1 -1
  106. package/lib/dx/shortcuts/range-date-time-picker/rangeDateTimePicker.domain.d.ts +1 -3
  107. package/lib/dx/shortcuts/range-date-time-picker/register.d.ts +4 -2
  108. package/lib/dx/shortcuts/range-time-input/guiRangeTimeInput.impl.d.ts +1 -1
  109. package/lib/dx/shortcuts/range-time-input/rangeTimeInput.domain.d.ts +1 -3
  110. package/lib/dx/shortcuts/range-time-input/register.d.ts +4 -2
  111. package/lib/dx/shortcuts/range-time-picker/guiRangeTimePicker.impl.d.ts +1 -1
  112. package/lib/dx/shortcuts/range-time-picker/rangeTimePicker.domain.d.ts +1 -3
  113. package/lib/dx/shortcuts/range-time-picker/register.d.ts +4 -2
  114. package/lib/dx/shortcuts/repeater/guiRepeater.impl.d.ts +1 -1
  115. package/lib/dx/shortcuts/repeater/register.d.ts +5 -3
  116. package/lib/dx/shortcuts/repeater/repeater.domain.d.ts +1 -4
  117. package/lib/dx/shortcuts/scopes/gslStates.impl.d.ts +1 -1
  118. package/lib/dx/shortcuts/scopes/gslTag.impl.d.ts +1 -1
  119. package/lib/dx/shortcuts/select/guiSelect.impl.d.ts +1 -1
  120. package/lib/dx/shortcuts/select/register.d.ts +4 -2
  121. package/lib/dx/shortcuts/select/select.domain.d.ts +1 -2
  122. package/lib/dx/shortcuts/tabs/guiTabs.impl.d.ts +1 -1
  123. package/lib/dx/shortcuts/tabs/register.d.ts +4 -2
  124. package/lib/dx/shortcuts/tabs/tabs.domain.d.ts +1 -3
  125. package/lib/dx/shortcuts/tags/guiTags.impl.d.ts +1 -1
  126. package/lib/dx/shortcuts/tags/register.d.ts +4 -2
  127. package/lib/dx/shortcuts/tags/tags.domain.d.ts +1 -3
  128. package/lib/dx/shortcuts/textarea/guiTextarea.impl.d.ts +1 -1
  129. package/lib/dx/shortcuts/textarea/register.d.ts +4 -2
  130. package/lib/dx/shortcuts/textarea/textarea.domain.d.ts +1 -3
  131. package/lib/dx/shortcuts/time-input/guiTimeInput.impl.d.ts +1 -1
  132. package/lib/dx/shortcuts/time-input/register.d.ts +4 -2
  133. package/lib/dx/shortcuts/time-input/timeInput.domain.d.ts +1 -3
  134. package/lib/dx/shortcuts/time-picker/guiTimePicker.impl.d.ts +1 -1
  135. package/lib/dx/shortcuts/time-picker/register.d.ts +4 -2
  136. package/lib/dx/shortcuts/time-picker/timePicker.domain.d.ts +1 -3
  137. package/lib/shared.d.ts +3 -0
  138. package/lib/widgets.d.ts +1 -1
  139. package/package.json +7 -3
  140. package/{register-De8Y1vW5.js → resolveFormInput-CsFeoGjz.js} +1402 -1387
  141. package/resolveFormInput-UcmQ-kme.cjs +1 -0
  142. package/lib/dx/core/defineShortcutType.d.ts +0 -39
  143. package/lib/dx/core/dx.domain.d.ts +0 -79
  144. package/lib/dx/core/dxBase.types.d.ts +0 -128
  145. package/lib/dx/core/dxPropsHelper.d.ts +0 -9
  146. package/lib/dx/core/dxUtilityTypes.d.ts +0 -40
  147. package/lib/dx/core/dxValidatorHelper.d.ts +0 -31
  148. package/lib/dx/core/eventWiring.service.d.ts +0 -34
  149. package/lib/dx/core/itemTypeRegistry.d.ts +0 -94
  150. package/lib/dx/core/itemWalker.service.d.ts +0 -31
  151. package/lib/dx/core/selectorNormalizer.service.d.ts +0 -15
  152. package/lib/dx/core/selectorResolver.service.d.ts +0 -11
  153. package/lib/dx/core/sharedSensibleDefaults.service.d.ts +0 -35
  154. package/lib/dx/core/stateExpansion.service.d.ts +0 -31
  155. package/lib/dx/core/widgetMapper.service.d.ts +0 -13
  156. package/lib/dx/core/widgetMerger.service.d.ts +0 -14
  157. package/lib/dx/core/withForm.d.ts +0 -8
  158. package/lib/dx/dx.service.d.ts +0 -36
  159. package/lib/dx/registerAll.d.ts +0 -0
  160. package/lib/dx/shortcuts/scopes/scopeChain.d.ts +0 -132
  161. package/lib/utils/objectUtils.service.d.ts +0 -11
  162. package/register-B3CJMfX9.cjs +0 -1
@@ -1,709 +1,328 @@
1
+ import { createShortcutType as u, processAutoLabel as d, processAutoPlaceholder as m, extractWidgetProps as p, buildTypedValidator as c, eventWiringService as ye, withForm as pe, createGslSelector as Ie, createItemTypeRegistry as _e, registerShortcutType as ke, defineShortcutType as Se, GuiItemTypes as y, createSelectors as Ae, createImplementation as Ee } from "@golemui/dx";
1
2
  import "@golemui/core";
2
- const m = {
3
- INPUTS: "INPUTS",
4
- ACTIONS: "ACTIONS",
5
- LAYOUTS: "LAYOUTS",
6
- DISPLAYS: "DISPLAYS"
7
- };
8
- function P(e) {
9
- return function(t, s = () => !0) {
10
- return {
11
- kind: "leaf",
12
- selectorType: e,
13
- matcher: s,
14
- config: t
15
- };
16
- };
17
- }
18
- function y(e, t) {
19
- return typeof e == "function" ? e : { type: t, ...e ?? {} };
20
- }
21
- function Te(e, t, s) {
22
- if (typeof t == "function") {
23
- const i = t;
24
- return {
25
- items: [{ key: e, def: (o) => ({ type: "text", ...i(o) }) }],
26
- type: "ITEMS",
27
- itemType: m.INPUTS,
28
- tags: s ?? []
29
- };
3
+ function he(e) {
4
+ switch (e.type) {
5
+ case "text":
6
+ return De(e);
7
+ case "number":
8
+ return Pe(e);
9
+ case "boolean":
10
+ return Ue(e);
11
+ default:
12
+ throw new Error(`Unsupported field type "${e.type}"`);
30
13
  }
31
- const a = { type: "text", ...t };
14
+ }
15
+ function Ue(e) {
16
+ const t = p(e);
32
17
  return {
33
- items: [{ key: e, def: a }],
34
- type: "ITEMS",
35
- itemType: m.INPUTS,
36
- tags: s ?? []
18
+ uid: e.uid ?? "",
19
+ kind: "input",
20
+ type: "toggle",
21
+ path: e.path ?? "",
22
+ ...e.label != null ? { label: e.label } : {},
23
+ ...e.disabled != null ? { disabled: e.disabled } : {},
24
+ ...e.readonly != null ? { readonly: e.readonly } : {},
25
+ ...e.validator != null ? { validator: c(e.validator, "boolean") } : {},
26
+ props: t
37
27
  };
38
28
  }
39
- function ge(e, t, s) {
40
- if (typeof t == "function") {
41
- const i = t;
42
- return {
43
- items: [{ key: e, def: (o) => ({ type: "number", ...i(o) }) }],
44
- type: "ITEMS",
45
- itemType: m.INPUTS,
46
- tags: s ?? []
47
- };
48
- }
49
- const a = { type: "number", ...t };
29
+ function De(e) {
30
+ const t = p(e);
50
31
  return {
51
- items: [{ key: e, def: a }],
52
- type: "ITEMS",
53
- itemType: m.INPUTS,
54
- tags: s ?? []
32
+ uid: e.uid ?? "",
33
+ kind: "input",
34
+ type: "textinput",
35
+ path: e.path ?? "",
36
+ ...e.label != null ? { label: e.label } : {},
37
+ ...e.disabled != null ? { disabled: e.disabled } : {},
38
+ ...e.readonly != null ? { readonly: e.readonly } : {},
39
+ props: {
40
+ placeholder: t.placeholder ?? "",
41
+ ...t
42
+ },
43
+ validator: c(e.validator, "string")
55
44
  };
56
45
  }
57
- function be(e, t, s) {
58
- if (typeof t == "function") {
59
- const i = t;
60
- return {
61
- items: [{ key: e, def: (o) => ({ type: "boolean", ...i(o) }) }],
62
- type: "ITEMS",
63
- itemType: m.INPUTS,
64
- tags: s ?? []
65
- };
66
- }
67
- const a = { type: "boolean", ...t };
46
+ function Pe(e) {
47
+ const t = p(e);
68
48
  return {
69
- items: [{ key: e, def: a }],
70
- type: "ITEMS",
71
- itemType: m.INPUTS,
72
- tags: s ?? []
49
+ uid: e.uid ?? "",
50
+ kind: "input",
51
+ type: "number",
52
+ path: e.path ?? "",
53
+ ...e.label != null ? { label: e.label } : {},
54
+ ...e.disabled != null ? { disabled: e.disabled } : {},
55
+ ...e.readonly != null ? { readonly: e.readonly } : {},
56
+ props: {
57
+ placeholder: t.placeholder ?? "",
58
+ ...t
59
+ },
60
+ validator: c(e.validator, "number")
73
61
  };
74
62
  }
75
- function _e(e, t, s) {
76
- if (typeof t == "function") {
77
- const n = t;
78
- return { type: "ITEMS", itemType: "SELECT", items: [{ key: e, def: (l) => ({ type: "select", ...n(l) }) }], tags: s ?? [] };
79
- }
80
- const a = { type: "select", ...t };
81
- return { type: "ITEMS", itemType: "SELECT", items: [{ key: e, def: a }], tags: s ?? [] };
82
- }
83
- function Ee(e, t, s) {
84
- if (typeof t == "function") {
85
- const n = t;
86
- return { type: "ITEMS", itemType: "DROPDOWN", items: [{ key: e, def: (l) => ({
87
- type: "dropdown",
88
- ...n(l)
89
- }) }], tags: s ?? [] };
90
- }
91
- const a = { type: "dropdown", ...t };
92
- return { type: "ITEMS", itemType: "DROPDOWN", items: [{ key: e, def: a }], tags: s ?? [] };
93
- }
94
- function Ie(e, t, s) {
95
- if (typeof t == "function") {
96
- const n = t;
97
- return { type: "ITEMS", itemType: "RADIOGROUP", items: [{ key: e, def: (l) => ({ type: "radiogroup", ...n(l) }) }], tags: s ?? [] };
98
- }
99
- const a = { type: "radiogroup", ...t };
100
- return { type: "ITEMS", itemType: "RADIOGROUP", items: [{ key: e, def: a }], tags: s ?? [] };
101
- }
102
- function Ae(e, t, s) {
103
- if (typeof t == "function") {
104
- const n = t;
105
- return { type: "ITEMS", itemType: "CHECKBOX", items: [{ key: e, def: (l) => ({ type: "checkbox", ...n(l) }) }], tags: s ?? [] };
106
- }
107
- const a = { type: "checkbox", ...t };
108
- return { type: "ITEMS", itemType: "CHECKBOX", items: [{ key: e, def: a }], tags: s ?? [] };
109
- }
110
- function ke(e, t, s) {
111
- if (typeof t == "function") {
112
- const n = t;
113
- return { type: "ITEMS", itemType: "TEXTAREA", items: [{ key: e, def: (l) => ({ type: "textarea", ...n(l) }) }], tags: s ?? [] };
114
- }
115
- const a = { type: "textarea", ...t };
116
- return { type: "ITEMS", itemType: "TEXTAREA", items: [{ key: e, def: a }], tags: s ?? [] };
117
- }
118
- function he(e, t, s) {
119
- if (typeof t == "function") {
120
- const n = t;
121
- return { type: "ITEMS", itemType: "PASSWORD", items: [{ key: e, def: (l) => ({ type: "password", ...n(l) }) }], tags: s ?? [] };
122
- }
123
- const a = { type: "password", ...t };
124
- return { type: "ITEMS", itemType: "PASSWORD", items: [{ key: e, def: a }], tags: s ?? [] };
63
+ const k = u({
64
+ itemType: "INPUTS",
65
+ kind: "input",
66
+ entryShape: "keyed",
67
+ sensibleDefaults: {
68
+ base: {
69
+ suppressAutomaticLabels: !1,
70
+ suppressAutomaticPlaceholders: !1
71
+ },
72
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
73
+ apply: (e, t) => {
74
+ let s = d(e, t);
75
+ return s = m(s, t), s;
76
+ }
77
+ },
78
+ mapToWidget: he
79
+ }), b = k.gsl, Me = k.gslByUid;
80
+ function Be(e) {
81
+ const {
82
+ uid: t,
83
+ label: s,
84
+ actionType: a,
85
+ disabled: i,
86
+ on: n,
87
+ onClick: l,
88
+ data: r,
89
+ type: o,
90
+ tags: T,
91
+ size: g,
92
+ include: ge,
93
+ exclude: be,
94
+ states: re,
95
+ ...I
96
+ } = e;
97
+ return {
98
+ uid: t ?? "",
99
+ kind: "action",
100
+ type: "button",
101
+ disabled: i,
102
+ actionType: a,
103
+ label: s,
104
+ ...n != null ? { on: n } : {},
105
+ props: I
106
+ };
125
107
  }
126
- function Se(e, t, s) {
127
- if (typeof t == "function") {
128
- const n = t;
129
- return { type: "ITEMS", itemType: "CURRENCY", items: [{ key: e, def: (l) => ({ type: "currency", ...n(l) }) }], tags: s ?? [] };
130
- }
131
- const a = { type: "currency", ...t };
132
- return { type: "ITEMS", itemType: "CURRENCY", items: [{ key: e, def: a }], tags: s ?? [] };
108
+ const S = u({
109
+ itemType: "ACTIONS",
110
+ kind: "action",
111
+ entryShape: "bare",
112
+ mapToWidget: Be,
113
+ afterMerge: (e, t) => ye.extractOnClickFromMergeResult(
114
+ e,
115
+ t.eventRegistry,
116
+ t.eventIdGenerator
117
+ )
118
+ }), Re = S.gsl, Le = S.gslByUid;
119
+ function ve(e) {
120
+ const {
121
+ uid: t,
122
+ widgetName: s,
123
+ tags: a,
124
+ size: i,
125
+ onChange: n,
126
+ include: l,
127
+ exclude: r,
128
+ ...o
129
+ } = e, { on: T, ...g } = o;
130
+ return {
131
+ uid: t ?? "",
132
+ kind: "layout",
133
+ type: s ?? "flex",
134
+ props: {
135
+ direction: g.direction ?? "column",
136
+ ...g
137
+ },
138
+ children: []
139
+ };
133
140
  }
134
- function De(e, t, s) {
135
- if (typeof t == "function") {
136
- const n = t;
137
- return { type: "ITEMS", itemType: "MARKDOWN", items: [{ key: e, def: (l) => ({ type: "markdown", ...n(l) }) }], tags: s ?? [] };
138
- }
139
- const a = { type: "markdown", ...t };
140
- return { type: "ITEMS", itemType: "MARKDOWN", items: [{ key: e, def: a }], tags: s ?? [] };
141
+ function fe(e, t) {
142
+ const s = t.walkChildren(t.children ?? []);
143
+ if (e.kind === "static")
144
+ return { ...t.mapStaticDef(e.def, "LAYOUTS"), children: s };
145
+ const a = e.fn;
146
+ return ((i) => {
147
+ const n = a(i);
148
+ return { ...t.mapStaticDef(n, "LAYOUTS"), children: s };
149
+ });
141
150
  }
142
- function fe(e, t, s) {
143
- if (typeof t == "function") {
144
- const n = t;
145
- return { type: "ITEMS", itemType: "LIST", items: [{ key: e, def: (l) => ({ type: "list", ...n(l) }) }], tags: s ?? [] };
146
- }
147
- const a = { type: "list", ...t };
148
- return { type: "ITEMS", itemType: "LIST", items: [{ key: e, def: a }], tags: s ?? [] };
151
+ function Ce(e) {
152
+ return e.children;
149
153
  }
150
- function Pe(e, t, s) {
151
- if (typeof t == "function") {
152
- const i = t;
153
- return {
154
- items: [(o) => ({
155
- type: "calendar",
156
- path: e,
157
- ...i(o)
158
- })],
159
- type: "ITEMS",
160
- itemType: "CALENDAR",
161
- tags: s ?? []
162
- };
163
- }
154
+ const A = u({
155
+ itemType: "LAYOUTS",
156
+ kind: "layout",
157
+ entryShape: "compound",
158
+ mapToWidget: ve,
159
+ buildCustomWidget: fe,
160
+ getChildren: Ce
161
+ }), Ne = A.gsl, We = A.gslByUid;
162
+ function we(e) {
164
163
  return {
165
- items: [{ type: "calendar", path: e, ...t }],
166
- type: "ITEMS",
167
- itemType: "CALENDAR",
168
- tags: s ?? []
164
+ uid: "",
165
+ kind: "display",
166
+ type: "renderer",
167
+ props: { render: e.render }
169
168
  };
170
169
  }
171
- function Ue(e, t, s) {
172
- if (typeof t == "function") {
173
- const i = t;
170
+ function xe(e, t) {
171
+ if (e.kind === "static") {
172
+ const a = e.def;
173
+ return ((i) => ({
174
+ uid: "",
175
+ kind: "display",
176
+ type: "renderer",
177
+ ...a.include != null ? { include: a.include } : {},
178
+ ...a.exclude != null ? { exclude: a.exclude } : {},
179
+ props: { render: a.render(pe(i)) }
180
+ }));
181
+ }
182
+ const s = e.fn;
183
+ return ((a) => {
184
+ const i = s(a);
174
185
  return {
175
- items: [(o) => ({
176
- type: "dateTimeCalendar",
177
- path: e,
178
- ...i(o)
179
- })],
180
- type: "ITEMS",
181
- itemType: "DATE_TIME_CALENDAR",
182
- tags: s ?? []
186
+ uid: "",
187
+ kind: "display",
188
+ type: "renderer",
189
+ ...i.include != null ? { include: i.include } : {},
190
+ ...i.exclude != null ? { exclude: i.exclude } : {},
191
+ props: { render: i.render(pe(a)) }
183
192
  };
184
- }
185
- return {
186
- items: [{ type: "dateTimeCalendar", path: e, ...t }],
187
- type: "ITEMS",
188
- itemType: "DATE_TIME_CALENDAR",
189
- tags: s ?? []
190
- };
191
- }
192
- function Me(e, t, s) {
193
- if (typeof t == "function") {
194
- const n = t;
195
- return { type: "ITEMS", itemType: "DATE_INPUT", items: [{ key: e, def: (l) => ({ type: "dateInput", ...n(l) }) }], tags: s ?? [] };
196
- }
197
- const a = { type: "dateInput", ...t };
198
- return { type: "ITEMS", itemType: "DATE_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
193
+ });
199
194
  }
200
- function Le(e, t, s) {
201
- if (typeof t == "function") {
202
- const n = t;
203
- return { type: "ITEMS", itemType: "DATE_PICKER", items: [{ key: e, def: (l) => ({
204
- type: "datePicker",
205
- ...n(l)
206
- }) }], tags: s ?? [] };
207
- }
208
- const a = { type: "datePicker", ...t };
209
- return { type: "ITEMS", itemType: "DATE_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
210
- }
211
- function ve(e, t, s) {
212
- if (typeof t == "function") {
213
- const n = t;
214
- return { type: "ITEMS", itemType: "DATE_TIME_PICKER", items: [{ key: e, def: (l) => ({
215
- type: "dateTimePicker",
216
- ...n(l)
217
- }) }], tags: s ?? [] };
218
- }
219
- const a = { type: "dateTimePicker", ...t };
220
- return { type: "ITEMS", itemType: "DATE_TIME_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
221
- }
222
- function Re(e, t, s) {
223
- if (typeof t == "function") {
224
- const n = t;
225
- return { type: "ITEMS", itemType: "RANGE_CALENDAR", items: [{ key: e, def: (l) => ({
226
- type: "rangeCalendar",
227
- ...n(l)
228
- }) }], tags: s ?? [] };
229
- }
230
- const a = { type: "rangeCalendar", ...t };
231
- return { type: "ITEMS", itemType: "RANGE_CALENDAR", items: [{ key: e, def: a }], tags: s ?? [] };
232
- }
233
- function Ne(e, t, s) {
234
- if (typeof t == "function") {
235
- const n = t;
236
- return { type: "ITEMS", itemType: "RANGE_DATE_INPUT", items: [{ key: e, def: (l) => ({
237
- type: "rangeDateInput",
238
- ...n(l)
239
- }) }], tags: s ?? [] };
240
- }
241
- const a = { type: "rangeDateInput", ...t };
242
- return { type: "ITEMS", itemType: "RANGE_DATE_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
243
- }
244
- function Ce(e, t, s) {
245
- if (typeof t == "function") {
246
- const n = t;
247
- return { type: "ITEMS", itemType: "RANGE_DATE_TIME_INPUT", items: [{ key: e, def: (l) => ({
248
- type: "rangeDateTimeInput",
249
- ...n(l)
250
- }) }], tags: s ?? [] };
251
- }
252
- const a = { type: "rangeDateTimeInput", ...t };
253
- return { type: "ITEMS", itemType: "RANGE_DATE_TIME_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
254
- }
255
- function Be(e, t, s) {
256
- if (typeof t == "function") {
257
- const n = t;
258
- return { type: "ITEMS", itemType: "RANGE_DATE_TIME_CALENDAR", items: [{ key: e, def: (l) => ({
259
- type: "rangeDateTimeCalendar",
260
- ...n(l)
261
- }) }], tags: s ?? [] };
262
- }
263
- const a = { type: "rangeDateTimeCalendar", ...t };
264
- return { type: "ITEMS", itemType: "RANGE_DATE_TIME_CALENDAR", items: [{ key: e, def: a }], tags: s ?? [] };
265
- }
266
- function We(e, t, s) {
267
- if (typeof t == "function") {
268
- const n = t;
269
- return { type: "ITEMS", itemType: "RANGE_DATE_TIME_PICKER", items: [{ key: e, def: (l) => ({
270
- type: "rangeDateTimePicker",
271
- ...n(l)
272
- }) }], tags: s ?? [] };
273
- }
274
- const a = { type: "rangeDateTimePicker", ...t };
275
- return { type: "ITEMS", itemType: "RANGE_DATE_TIME_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
276
- }
277
- function we(e, t, s) {
278
- if (typeof t == "function") {
279
- const n = t;
280
- return { type: "ITEMS", itemType: "RANGE_TIME_INPUT", items: [{ key: e, def: (l) => ({
281
- type: "rangeTimeInput",
282
- ...n(l)
283
- }) }], tags: s ?? [] };
284
- }
285
- const a = { type: "rangeTimeInput", ...t };
286
- return { type: "ITEMS", itemType: "RANGE_TIME_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
287
- }
288
- function xe(e, t, s) {
289
- if (typeof t == "function") {
290
- const n = t;
291
- return { type: "ITEMS", itemType: "RANGE_DATE_PICKER", items: [{ key: e, def: (l) => ({
292
- type: "rangeDatePicker",
293
- ...n(l)
294
- }) }], tags: s ?? [] };
295
- }
296
- const a = { type: "rangeDatePicker", ...t };
297
- return { type: "ITEMS", itemType: "RANGE_DATE_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
298
- }
299
- function Ge(e, t, s) {
300
- if (typeof t == "function") {
301
- const n = t;
302
- return { type: "ITEMS", itemType: "RANGE_TIME_PICKER", items: [{ key: e, def: (l) => ({
303
- type: "rangeTimePicker",
304
- ...n(l)
305
- }) }], tags: s ?? [] };
306
- }
307
- const a = { type: "rangeTimePicker", ...t };
308
- return { type: "ITEMS", itemType: "RANGE_TIME_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
309
- }
310
- function Ke(e, t, s) {
311
- if (typeof t == "function") {
312
- const n = t;
313
- return { type: "ITEMS", itemType: "TIME_INPUT", items: [{ key: e, def: (l) => ({ type: "timeInput", ...n(l) }) }], tags: s ?? [] };
314
- }
315
- const a = { type: "timeInput", ...t };
316
- return { type: "ITEMS", itemType: "TIME_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
317
- }
318
- function Ye(e, t, s) {
319
- if (typeof t == "function") {
320
- const n = t;
321
- return { type: "ITEMS", itemType: "TIME_PICKER", items: [{ key: e, def: (l) => ({
322
- type: "timePicker",
323
- ...n(l)
324
- }) }], tags: s ?? [] };
325
- }
326
- const a = { type: "timePicker", ...t };
327
- return { type: "ITEMS", itemType: "TIME_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
328
- }
329
- function $e(e, t, s) {
330
- if (typeof t == "function") {
331
- const n = t;
332
- return { type: "ITEMS", itemType: "DATE_TIME_INPUT", items: [{ key: e, def: (l) => ({
333
- type: "dateTimeInput",
334
- ...n(l)
335
- }) }], tags: s ?? [] };
336
- }
337
- const a = { type: "dateTimeInput", ...t };
338
- return { type: "ITEMS", itemType: "DATE_TIME_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
339
- }
340
- function Oe(e, t, s, a) {
341
- if (typeof s == "function") {
342
- const o = s;
343
- return { type: "ITEMS", itemType: "CUSTOM_INPUT", items: [{ key: t, def: (c) => ({
344
- customType: e,
345
- ...o(c)
346
- }) }], tags: a ?? [] };
347
- }
348
- const i = { customType: e, ...s };
349
- return { type: "ITEMS", itemType: "CUSTOM_INPUT", items: [{ key: t, def: i }], tags: a ?? [] };
350
- }
351
- function Fe(e, t) {
352
- return {
353
- items: [e],
354
- type: "ITEMS",
355
- itemType: m.ACTIONS,
356
- tags: t ?? []
357
- };
358
- }
359
- function ze(e, t, s) {
360
- if (typeof t == "function") {
361
- const n = t;
362
- return { type: "ITEMS", itemType: "CUSTOM_ACTION", items: [
363
- (u) => ({ customType: e, ...n(u) })
364
- ], tags: s ?? [] };
365
- }
366
- return { type: "ITEMS", itemType: "CUSTOM_ACTION", items: [{ customType: e, ...t }], tags: s ?? [] };
367
- }
368
- const He = (e, t) => ({
369
- type: "ITEMS",
370
- itemType: m.DISPLAYS,
371
- items: [{ render: e }],
372
- tags: t ?? []
373
- });
374
- function Ve(e, t) {
375
- return { type: "ITEMS", itemType: "ALERTS", items: [e], tags: t ?? [] };
376
- }
377
- function Xe(e, t) {
378
- return { type: "ITEMS", itemType: "MARKDOWN_TEXTS", items: [e], tags: t ?? [] };
379
- }
380
- function je(e, t, s) {
381
- if (typeof t == "function") {
382
- const u = t;
383
- return { type: "ITEMS", itemType: "CUSTOM_DISPLAY", items: [
384
- (c) => ({ customType: e, ...u(c) })
385
- ], tags: s ?? [] };
386
- }
387
- const { uid: a, ...i } = t ?? {};
388
- return { type: "ITEMS", itemType: "CUSTOM_DISPLAY", items: [{
389
- customType: e,
390
- ...a != null ? { uid: a } : {},
391
- props: Object.keys(i).length > 0 ? i : void 0
392
- }], tags: s ?? [] };
393
- }
394
- const U = (e, t, s) => ({
395
- type: "ITEMS",
396
- itemType: m.LAYOUTS,
397
- items: [{ def: { widgetName: "flex", ...t ?? {} }, children: e }],
398
- tags: s ?? []
399
- }), Ze = (e, t, s) => U(e, { direction: "row", ...t ?? {} }, s), qe = (e, t, s) => U(e, { direction: "column", ...t ?? {} }, s), M = (e, t, s) => ({
400
- type: "ITEMS",
401
- itemType: m.LAYOUTS,
402
- items: [
403
- {
404
- def: {
405
- widgetName: "grid",
406
- direction: "row",
407
- autoFit: !0,
408
- ...t ?? {}
409
- },
410
- children: e
411
- }
412
- ],
413
- tags: s ?? []
414
- }), Je = (e, t, s) => M(e, { direction: "row", ...t ?? {} }, s), Qe = (e, t, s) => M(e, { direction: "column", ...t ?? {} }, s);
415
- function S(e) {
416
- return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
417
- }
418
- function et(e, t, s) {
419
- const a = e.map((o) => ({
420
- label: o.label,
421
- uid: o.uid ?? S(o.label)
422
- })), i = e.map((o) => ({
423
- type: "ITEMS",
424
- itemType: m.LAYOUTS,
425
- items: [
426
- {
427
- def: { uid: o.uid ?? S(o.label), direction: "column", widgetName: "flex" },
428
- children: o.children
429
- }
430
- ],
431
- tags: []
432
- }));
433
- return {
434
- type: "ITEMS",
435
- itemType: "TABS",
436
- items: [{ def: {
437
- tabs: a,
438
- ...t
439
- }, children: i }],
440
- tags: s ?? []
441
- };
442
- }
443
- function D(e) {
444
- return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
445
- }
446
- function tt(e, t, s) {
447
- const a = e.map((o) => ({
448
- label: o.label,
449
- uid: o.uid ?? D(o.label)
450
- })), i = e.map((o) => ({
451
- type: "ITEMS",
452
- itemType: m.LAYOUTS,
453
- items: [
454
- {
455
- def: { uid: o.uid ?? D(o.label), direction: "column", widgetName: "flex" },
456
- children: o.children
457
- }
458
- ],
459
- tags: []
460
- }));
461
- return {
462
- type: "ITEMS",
463
- itemType: "ACCORDION",
464
- items: [{ def: {
465
- sections: a,
466
- ...t
467
- }, children: i }],
468
- tags: s ?? []
469
- };
470
- }
471
- function st(e, t, s, a) {
472
- if (typeof s == "function") {
473
- const o = s;
474
- return { type: "ITEMS", itemType: "CUSTOM_LAYOUT", items: [{ def: (c) => ({
475
- customType: e,
476
- ...o(c)
477
- }), children: t }], tags: a ?? [] };
478
- }
479
- return { type: "ITEMS", itemType: "CUSTOM_LAYOUT", items: [{ def: { customType: e, ...s }, children: t }], tags: a ?? [] };
480
- }
481
- function at(e, t, s) {
482
- const { template: a, ...i } = t;
483
- return {
484
- type: "ITEMS",
485
- itemType: "REPEATER",
486
- items: [{ key: e, def: i, children: a }],
487
- tags: s ?? []
488
- };
489
- }
490
- function it(e, t, s) {
491
- if (typeof t == "function") {
492
- const n = t;
493
- return { type: "ITEMS", itemType: "TAGS", items: [{ key: e, def: (l) => ({ type: "tags", ...n(l) }) }], tags: s ?? [] };
494
- }
495
- const a = { type: "tags", ...t };
496
- return { type: "ITEMS", itemType: "TAGS", items: [{ key: e, def: a }], tags: s ?? [] };
497
- }
498
- const I = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map();
499
- function L(e, t, s) {
500
- if (I.has(e))
501
- throw new Error(`Item type "${e}" is already registered.`);
502
- I.set(e, t), s && C.set(e, s);
503
- }
504
- function nt(e) {
505
- const t = I.get(e);
506
- if (!t)
507
- throw new Error(
508
- `No handler registered for item type "${e}". Did you forget to import the registration module?`
509
- );
510
- return t;
511
- }
512
- function lt(e) {
513
- return I.has(e);
514
- }
515
- function r(e) {
516
- const t = (u) => {
517
- if (!e.sensibleDefaults)
518
- return {};
519
- let l = { ...e.sensibleDefaults.base };
520
- for (const c of u) {
521
- const g = c.config;
522
- for (const b of e.sensibleDefaults.fields) {
523
- const _ = b;
524
- g[_] != null && (l = { ...l, [_]: g[_] });
525
- }
526
- }
527
- return l;
528
- }, s = (u, l) => e.sensibleDefaults ? e.sensibleDefaults.apply(u, l) : u, a = (u) => {
529
- switch (e.entryShape) {
530
- case "bare":
531
- return { baseDef: u };
532
- case "keyed": {
533
- const l = u;
534
- return { baseDef: l.def, path: l.key };
535
- }
536
- case "compound": {
537
- const l = u;
538
- return { baseDef: l.def, children: l.children };
539
- }
540
- }
541
- }, i = {
542
- rollUpSensibleDefaults: t,
543
- applySensibleDefaults: s,
544
- mapToWidget: e.mapToWidget,
545
- parseEntry: a,
546
- ...e.afterMerge ? { afterMerge: e.afterMerge } : {},
547
- ...e.buildCustomWidget ? { buildCustomWidget: e.buildCustomWidget } : {},
548
- ...e.getChildren ? { getChildren: e.getChildren } : {}
549
- };
550
- L(e.itemType, i, e.kind);
551
- const n = P(e.itemType);
552
- return { gsl: n, gslByUid: (u, l) => n(l, ((c) => c.uid === u)) };
553
- }
554
- function p(e) {
555
- const {
556
- uid: t,
557
- path: s,
558
- label: a,
559
- disabled: i,
560
- readonly: n,
561
- defaultValue: o,
562
- tags: u,
563
- type: l,
564
- size: c,
565
- onLoad: g,
566
- onChange: b,
567
- onFilter: _,
568
- on: A,
569
- states: E,
570
- include: de,
571
- exclude: ye,
572
- validator: ce,
573
- ...N
574
- } = e;
575
- return N;
576
- }
577
- function B(e) {
578
- return e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (t) => t.toUpperCase()) : "";
579
- }
580
- function d(e, t) {
581
- return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: B(e.path) };
582
- }
583
- function T(e, t) {
584
- return e.placeholder != null || t.suppressAutomaticPlaceholders || !e.path ? e : { ...e, placeholder: e.path };
585
- }
586
- function W(e) {
587
- switch (e.type) {
588
- case "text":
589
- return x(e);
590
- case "number":
591
- return G(e);
592
- case "boolean":
593
- return w(e);
594
- default:
595
- throw new Error(`Unsupported field type "${e.type}"`);
596
- }
597
- }
598
- function w(e) {
599
- const t = p(e);
600
- return {
195
+ const E = u({
196
+ itemType: "DISPLAYS",
197
+ kind: "display",
198
+ entryShape: "bare",
199
+ mapToWidget: we,
200
+ buildCustomWidget: xe
201
+ }), Ge = E.gsl, Ke = E.gslByUid, h = u({
202
+ itemType: "CALENDAR",
203
+ kind: "input",
204
+ entryShape: "bare",
205
+ sensibleDefaults: {
206
+ base: { suppressAutomaticLabels: !1 },
207
+ fields: ["suppressAutomaticLabels"],
208
+ apply: (e, t) => d(e, t)
209
+ },
210
+ mapToWidget: (e) => ({
601
211
  uid: e.uid ?? "",
602
212
  kind: "input",
603
- type: "toggle",
213
+ type: "calendar",
604
214
  path: e.path ?? "",
605
215
  ...e.label != null ? { label: e.label } : {},
606
216
  ...e.disabled != null ? { disabled: e.disabled } : {},
607
217
  ...e.readonly != null ? { readonly: e.readonly } : {},
608
- ...e.validator != null ? { validator: y(e.validator, "boolean") } : {},
609
- props: t
610
- };
611
- }
612
- function x(e) {
613
- const t = p(e);
614
- return {
218
+ ...e.validator != null ? { validator: c(e.validator, "string") } : {},
219
+ props: p(e)
220
+ })
221
+ }), Ye = h.gsl, $e = h.gslByUid, U = u({
222
+ itemType: "DATE_TIME_CALENDAR",
223
+ kind: "input",
224
+ entryShape: "bare",
225
+ sensibleDefaults: {
226
+ base: { suppressAutomaticLabels: !1 },
227
+ fields: ["suppressAutomaticLabels"],
228
+ apply: (e, t) => d(e, t)
229
+ },
230
+ mapToWidget: (e) => ({
615
231
  uid: e.uid ?? "",
616
232
  kind: "input",
617
- type: "textinput",
233
+ type: "dateTimeCalendar",
618
234
  path: e.path ?? "",
619
235
  ...e.label != null ? { label: e.label } : {},
620
236
  ...e.disabled != null ? { disabled: e.disabled } : {},
621
237
  ...e.readonly != null ? { readonly: e.readonly } : {},
622
- props: {
623
- placeholder: t.placeholder ?? "",
624
- ...t
238
+ ...e.validator != null ? { validator: c(e.validator, "string") } : {},
239
+ props: p(e)
240
+ })
241
+ }), Fe = U.gsl, ze = U.gslByUid, D = u({
242
+ itemType: "DATE_TIME_PICKER",
243
+ kind: "input",
244
+ entryShape: "keyed",
245
+ sensibleDefaults: {
246
+ base: {
247
+ suppressAutomaticLabels: !1,
248
+ suppressAutomaticPlaceholders: !1
625
249
  },
626
- validator: y(e.validator, "string")
627
- };
628
- }
629
- function G(e) {
630
- const t = p(e);
631
- return {
250
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
251
+ apply: (e, t) => m(d(e, t), t)
252
+ },
253
+ mapToWidget: (e) => ({
632
254
  uid: e.uid ?? "",
633
255
  kind: "input",
634
- type: "number",
256
+ type: "dateTimePicker",
635
257
  path: e.path ?? "",
636
258
  ...e.label != null ? { label: e.label } : {},
637
259
  ...e.disabled != null ? { disabled: e.disabled } : {},
638
260
  ...e.readonly != null ? { readonly: e.readonly } : {},
639
- props: {
640
- placeholder: t.placeholder ?? "",
641
- ...t
642
- },
643
- validator: y(e.validator, "number")
644
- };
645
- }
646
- const { gsl: h, gslByUid: ot } = r({
647
- itemType: "INPUTS",
261
+ ...e.validator != null ? { validator: c(e.validator, "string") } : {},
262
+ props: p(e)
263
+ })
264
+ }), Oe = D.gsl, Xe = D.gslByUid, P = u({
265
+ itemType: "TEXTAREA",
648
266
  kind: "input",
649
267
  entryShape: "keyed",
650
268
  sensibleDefaults: {
651
- base: {
652
- suppressAutomaticLabels: !1,
653
- suppressAutomaticPlaceholders: !1
654
- },
269
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
655
270
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
656
- apply: (e, t) => {
657
- let s = d(e, t);
658
- return s = T(s, t), s;
659
- }
271
+ apply: (e, t) => m(d(e, t), t)
660
272
  },
661
- mapToWidget: W
662
- }), ut = (e) => h(e, (t) => t.type === "text"), rt = (e) => h(e, (t) => t.type === "number"), pt = (e) => h(e, (t) => t.type === "boolean"), { gsl: dt, gslByUid: yt } = r({
663
- itemType: "SELECT",
273
+ mapToWidget: (e) => ({
274
+ uid: e.uid ?? "",
275
+ kind: "input",
276
+ type: "textarea",
277
+ path: e.path ?? "",
278
+ ...e.label != null ? { label: e.label } : {},
279
+ ...e.disabled != null ? { disabled: e.disabled } : {},
280
+ ...e.readonly != null ? { readonly: e.readonly } : {},
281
+ ...e.validator != null ? { validator: c(e.validator, "string") } : {},
282
+ props: p(e)
283
+ })
284
+ }), He = P.gsl, Ve = P.gslByUid, M = u({
285
+ itemType: "PASSWORD",
664
286
  kind: "input",
665
287
  entryShape: "keyed",
666
288
  sensibleDefaults: {
667
289
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
668
290
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
669
- apply: (e, t) => T(d(e, t), t)
291
+ apply: (e, t) => m(d(e, t), t)
670
292
  },
671
293
  mapToWidget: (e) => ({
672
294
  uid: e.uid ?? "",
673
295
  kind: "input",
674
- type: "select",
296
+ type: "password",
675
297
  path: e.path ?? "",
676
298
  ...e.label != null ? { label: e.label } : {},
677
299
  ...e.disabled != null ? { disabled: e.disabled } : {},
678
300
  ...e.readonly != null ? { readonly: e.readonly } : {},
679
- ...e.validator != null ? { validator: e.validator } : {},
301
+ ...e.validator != null ? { validator: c(e.validator, "string") } : {},
680
302
  props: p(e)
681
303
  })
682
- }), { gsl: ct, gslByUid: mt } = r({
683
- itemType: "DROPDOWN",
304
+ }), je = M.gsl, qe = M.gslByUid, B = u({
305
+ itemType: "CHECKBOX",
684
306
  kind: "input",
685
307
  entryShape: "keyed",
686
308
  sensibleDefaults: {
687
- base: {
688
- suppressAutomaticLabels: !1,
689
- suppressAutomaticPlaceholders: !1
690
- },
691
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
692
- apply: (e, t) => T(d(e, t), t)
309
+ base: { suppressAutomaticLabels: !1 },
310
+ fields: ["suppressAutomaticLabels"],
311
+ apply: (e, t) => d(e, t)
693
312
  },
694
313
  mapToWidget: (e) => ({
695
314
  uid: e.uid ?? "",
696
315
  kind: "input",
697
- type: "dropdown",
316
+ type: "checkbox",
698
317
  path: e.path ?? "",
699
318
  ...e.label != null ? { label: e.label } : {},
700
319
  ...e.disabled != null ? { disabled: e.disabled } : {},
701
320
  ...e.readonly != null ? { readonly: e.readonly } : {},
702
- ...e.validator != null ? { validator: e.validator } : {},
321
+ ...e.validator != null ? { validator: c(e.validator, "boolean") } : {},
703
322
  props: p(e)
704
323
  })
705
- }), { gsl: Tt, gslByUid: gt } = r({
706
- itemType: "RADIOGROUP",
324
+ }), Je = B.gsl, Qe = B.gslByUid, R = u({
325
+ itemType: "DATE_INPUT",
707
326
  kind: "input",
708
327
  entryShape: "keyed",
709
328
  sensibleDefaults: {
@@ -714,16 +333,16 @@ const { gsl: h, gslByUid: ot } = r({
714
333
  mapToWidget: (e) => ({
715
334
  uid: e.uid ?? "",
716
335
  kind: "input",
717
- type: "radiogroup",
336
+ type: "dateInput",
718
337
  path: e.path ?? "",
719
338
  ...e.label != null ? { label: e.label } : {},
720
339
  ...e.disabled != null ? { disabled: e.disabled } : {},
721
340
  ...e.readonly != null ? { readonly: e.readonly } : {},
722
- ...e.validator != null ? { validator: e.validator } : {},
341
+ ...e.validator != null ? { validator: c(e.validator, "string") } : {},
723
342
  props: p(e)
724
343
  })
725
- }), { gsl: bt, gslByUid: _t } = r({
726
- itemType: "CHECKBOX",
344
+ }), Ze = R.gsl, et = R.gslByUid, L = u({
345
+ itemType: "TIME_INPUT",
727
346
  kind: "input",
728
347
  entryShape: "keyed",
729
348
  sensibleDefaults: {
@@ -734,62 +353,65 @@ const { gsl: h, gslByUid: ot } = r({
734
353
  mapToWidget: (e) => ({
735
354
  uid: e.uid ?? "",
736
355
  kind: "input",
737
- type: "checkbox",
356
+ type: "timeInput",
738
357
  path: e.path ?? "",
739
358
  ...e.label != null ? { label: e.label } : {},
740
359
  ...e.disabled != null ? { disabled: e.disabled } : {},
741
360
  ...e.readonly != null ? { readonly: e.readonly } : {},
742
- ...e.validator != null ? { validator: y(e.validator, "boolean") } : {},
361
+ ...e.validator != null ? { validator: c(e.validator, "string") } : {},
743
362
  props: p(e)
744
363
  })
745
- }), { gsl: Et, gslByUid: It } = r({
746
- itemType: "TEXTAREA",
364
+ }), tt = L.gsl, st = L.gslByUid, v = u({
365
+ itemType: "TIME_PICKER",
747
366
  kind: "input",
748
367
  entryShape: "keyed",
749
368
  sensibleDefaults: {
750
- base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
369
+ base: {
370
+ suppressAutomaticLabels: !1,
371
+ suppressAutomaticPlaceholders: !1
372
+ },
751
373
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
752
- apply: (e, t) => T(d(e, t), t)
374
+ apply: (e, t) => m(d(e, t), t)
753
375
  },
754
376
  mapToWidget: (e) => ({
755
377
  uid: e.uid ?? "",
756
378
  kind: "input",
757
- type: "textarea",
379
+ type: "timePicker",
758
380
  path: e.path ?? "",
759
381
  ...e.label != null ? { label: e.label } : {},
760
382
  ...e.disabled != null ? { disabled: e.disabled } : {},
761
383
  ...e.readonly != null ? { readonly: e.readonly } : {},
762
- ...e.validator != null ? { validator: y(e.validator, "string") } : {},
384
+ ...e.validator != null ? { validator: c(e.validator, "string") } : {},
763
385
  props: p(e)
764
386
  })
765
- }), { gsl: At, gslByUid: kt } = r({
766
- itemType: "PASSWORD",
387
+ }), at = v.gsl, it = v.gslByUid, f = u({
388
+ itemType: "DATE_TIME_INPUT",
767
389
  kind: "input",
768
390
  entryShape: "keyed",
769
391
  sensibleDefaults: {
770
- base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
771
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
772
- apply: (e, t) => T(d(e, t), t)
392
+ base: { suppressAutomaticLabels: !1 },
393
+ fields: ["suppressAutomaticLabels"],
394
+ apply: (e, t) => d(e, t)
773
395
  },
774
396
  mapToWidget: (e) => ({
775
397
  uid: e.uid ?? "",
776
398
  kind: "input",
777
- type: "password",
399
+ type: "dateTimeInput",
778
400
  path: e.path ?? "",
779
401
  ...e.label != null ? { label: e.label } : {},
780
402
  ...e.disabled != null ? { disabled: e.disabled } : {},
781
403
  ...e.readonly != null ? { readonly: e.readonly } : {},
782
- ...e.validator != null ? { validator: y(e.validator, "string") } : {},
404
+ ...e.validator != null ? { validator: c(e.validator, "string") } : {},
783
405
  props: p(e)
784
406
  })
785
- }), { gsl: ht, gslByUid: St } = r({
407
+ }), nt = f.gsl, lt = f.gslByUid, C = u({
786
408
  itemType: "CURRENCY",
787
409
  kind: "input",
788
410
  entryShape: "keyed",
789
411
  sensibleDefaults: {
790
412
  base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
791
413
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
792
- apply: (e, t) => T(d(e, t), t)
414
+ apply: (e, t) => m(d(e, t), t)
793
415
  },
794
416
  mapToWidget: (e) => ({
795
417
  uid: e.uid ?? "",
@@ -799,31 +421,53 @@ const { gsl: h, gslByUid: ot } = r({
799
421
  ...e.label != null ? { label: e.label } : {},
800
422
  ...e.disabled != null ? { disabled: e.disabled } : {},
801
423
  ...e.readonly != null ? { readonly: e.readonly } : {},
802
- ...e.validator != null ? { validator: y(e.validator, "number") } : {},
424
+ ...e.validator != null ? { validator: c(e.validator, "number") } : {},
803
425
  props: p(e)
804
426
  })
805
- }), { gsl: Dt, gslByUid: ft } = r({
806
- itemType: "MARKDOWN",
427
+ }), ot = C.gsl, ut = C.gslByUid, N = u({
428
+ itemType: "RANGE_CALENDAR",
807
429
  kind: "input",
808
430
  entryShape: "keyed",
809
431
  sensibleDefaults: {
810
- base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
811
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
812
- apply: (e, t) => T(d(e, t), t)
432
+ base: { suppressAutomaticLabels: !1 },
433
+ fields: ["suppressAutomaticLabels"],
434
+ apply: (e, t) => d(e, t)
813
435
  },
814
436
  mapToWidget: (e) => ({
815
437
  uid: e.uid ?? "",
816
438
  kind: "input",
817
- type: "markdown",
439
+ type: "rangeCalendar",
818
440
  path: e.path ?? "",
819
441
  ...e.label != null ? { label: e.label } : {},
820
442
  ...e.disabled != null ? { disabled: e.disabled } : {},
821
443
  ...e.readonly != null ? { readonly: e.readonly } : {},
822
- ...e.validator != null ? { validator: y(e.validator, "string") } : {},
444
+ ...e.validator != null ? { validator: c(e.validator, "array") } : {},
823
445
  props: p(e)
824
446
  })
825
- }), { gsl: Pt, gslByUid: Ut } = r({
826
- itemType: "LIST",
447
+ }), rt = N.gsl, pt = N.gslByUid, W = u(
448
+ {
449
+ itemType: "SELECT",
450
+ kind: "input",
451
+ entryShape: "keyed",
452
+ sensibleDefaults: {
453
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
454
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
455
+ apply: (e, t) => m(d(e, t), t)
456
+ },
457
+ mapToWidget: (e) => ({
458
+ uid: e.uid ?? "",
459
+ kind: "input",
460
+ type: "select",
461
+ path: e.path ?? "",
462
+ ...e.label != null ? { label: e.label } : {},
463
+ ...e.disabled != null ? { disabled: e.disabled } : {},
464
+ ...e.readonly != null ? { readonly: e.readonly } : {},
465
+ ...e.validator != null ? { validator: e.validator } : {},
466
+ props: p(e)
467
+ })
468
+ }
469
+ ), dt = W.gsl, ct = W.gslByUid, w = u({
470
+ itemType: "RADIOGROUP",
827
471
  kind: "input",
828
472
  entryShape: "keyed",
829
473
  sensibleDefaults: {
@@ -834,7 +478,7 @@ const { gsl: h, gslByUid: ot } = r({
834
478
  mapToWidget: (e) => ({
835
479
  uid: e.uid ?? "",
836
480
  kind: "input",
837
- type: "list",
481
+ type: "radiogroup",
838
482
  path: e.path ?? "",
839
483
  ...e.label != null ? { label: e.label } : {},
840
484
  ...e.disabled != null ? { disabled: e.disabled } : {},
@@ -842,10 +486,44 @@ const { gsl: h, gslByUid: ot } = r({
842
486
  ...e.validator != null ? { validator: e.validator } : {},
843
487
  props: p(e)
844
488
  })
845
- }), { gsl: Mt, gslByUid: Lt } = r({
846
- itemType: "CALENDAR",
489
+ }), yt = w.gsl, mt = w.gslByUid;
490
+ function Tt(e) {
491
+ return {
492
+ uid: e.uid ?? "",
493
+ kind: "layout",
494
+ type: "tabs",
495
+ props: {
496
+ tabs: e.tabs,
497
+ renderMode: e.renderMode ?? "all",
498
+ ...e.defaultOpen != null ? { defaultOpen: e.defaultOpen } : {}
499
+ },
500
+ children: []
501
+ };
502
+ }
503
+ function gt(e, t) {
504
+ const s = t.walkChildren(t.children ?? []);
505
+ if (e.kind === "static")
506
+ return { ...t.mapStaticDef(e.def, "TABS"), children: s };
507
+ const a = e.fn;
508
+ return ((i) => {
509
+ const n = a(i);
510
+ return { ...t.mapStaticDef(n, "TABS"), children: s };
511
+ });
512
+ }
513
+ function bt(e) {
514
+ return e.children;
515
+ }
516
+ const x = u({
517
+ itemType: "TABS",
518
+ kind: "layout",
519
+ entryShape: "compound",
520
+ mapToWidget: Tt,
521
+ buildCustomWidget: gt,
522
+ getChildren: bt
523
+ }), It = x.gsl, _t = x.gslByUid, G = u({
524
+ itemType: "LIST",
847
525
  kind: "input",
848
- entryShape: "bare",
526
+ entryShape: "keyed",
849
527
  sensibleDefaults: {
850
528
  base: { suppressAutomaticLabels: !1 },
851
529
  fields: ["suppressAutomaticLabels"],
@@ -854,102 +532,241 @@ const { gsl: h, gslByUid: ot } = r({
854
532
  mapToWidget: (e) => ({
855
533
  uid: e.uid ?? "",
856
534
  kind: "input",
857
- type: "calendar",
535
+ type: "list",
858
536
  path: e.path ?? "",
859
537
  ...e.label != null ? { label: e.label } : {},
860
538
  ...e.disabled != null ? { disabled: e.disabled } : {},
861
539
  ...e.readonly != null ? { readonly: e.readonly } : {},
862
- ...e.validator != null ? { validator: y(e.validator, "string") } : {},
540
+ ...e.validator != null ? { validator: e.validator } : {},
863
541
  props: p(e)
864
542
  })
865
- }), { gsl: vt, gslByUid: Rt } = r({
866
- itemType: "DATE_TIME_CALENDAR",
543
+ }), kt = G.gsl, St = G.gslByUid, K = u({
544
+ itemType: "TAGS",
867
545
  kind: "input",
546
+ entryShape: "keyed",
547
+ sensibleDefaults: {
548
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
549
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
550
+ apply: (e, t) => m(d(e, t), t)
551
+ },
552
+ mapToWidget: (e) => ({
553
+ uid: e.uid ?? "",
554
+ kind: "input",
555
+ type: "tags",
556
+ path: e.path ?? "",
557
+ ...e.label != null ? { label: e.label } : {},
558
+ ...e.disabled != null ? { disabled: e.disabled } : {},
559
+ ...e.readonly != null ? { readonly: e.readonly } : {},
560
+ ...e.validator != null ? { validator: c(e.validator, "array") } : {},
561
+ props: p(e)
562
+ })
563
+ }), ya = K.gsl, ma = K.gslByUid, Y = u({
564
+ itemType: "ALERTS",
565
+ kind: "display",
566
+ entryShape: "bare",
567
+ mapToWidget: (e) => ({
568
+ uid: e.uid ?? "",
569
+ kind: "display",
570
+ type: "alert",
571
+ props: {
572
+ text: e.text,
573
+ ...e.level != null ? { level: e.level } : {}
574
+ }
575
+ })
576
+ }), At = Y.gsl, Et = Y.gslByUid, $ = u({
577
+ itemType: "MARKDOWN_TEXTS",
578
+ kind: "display",
868
579
  entryShape: "bare",
580
+ mapToWidget: (e) => ({
581
+ uid: e.uid ?? "",
582
+ kind: "display",
583
+ type: "markdownText",
584
+ props: {
585
+ md: e.md
586
+ }
587
+ })
588
+ }), ht = $.gsl, Ut = $.gslByUid, F = u({
589
+ itemType: "DATE_PICKER",
590
+ kind: "input",
591
+ entryShape: "keyed",
869
592
  sensibleDefaults: {
870
- base: { suppressAutomaticLabels: !1 },
871
- fields: ["suppressAutomaticLabels"],
872
- apply: (e, t) => d(e, t)
593
+ base: {
594
+ suppressAutomaticLabels: !1,
595
+ suppressAutomaticPlaceholders: !1
596
+ },
597
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
598
+ apply: (e, t) => m(d(e, t), t)
873
599
  },
874
600
  mapToWidget: (e) => ({
875
601
  uid: e.uid ?? "",
876
602
  kind: "input",
877
- type: "dateTimeCalendar",
603
+ type: "datePicker",
878
604
  path: e.path ?? "",
879
605
  ...e.label != null ? { label: e.label } : {},
880
606
  ...e.disabled != null ? { disabled: e.disabled } : {},
881
607
  ...e.readonly != null ? { readonly: e.readonly } : {},
882
- ...e.validator != null ? { validator: y(e.validator, "string") } : {},
608
+ ...e.validator != null ? { validator: c(e.validator, "string") } : {},
883
609
  props: p(e)
884
610
  })
885
- }), { gsl: Nt, gslByUid: Ct } = r({
886
- itemType: "DATE_INPUT",
611
+ }), Dt = F.gsl, Pt = F.gslByUid, z = u({
612
+ itemType: "DROPDOWN",
887
613
  kind: "input",
888
614
  entryShape: "keyed",
889
615
  sensibleDefaults: {
890
- base: { suppressAutomaticLabels: !1 },
891
- fields: ["suppressAutomaticLabels"],
892
- apply: (e, t) => d(e, t)
616
+ base: {
617
+ suppressAutomaticLabels: !1,
618
+ suppressAutomaticPlaceholders: !1
619
+ },
620
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
621
+ apply: (e, t) => m(d(e, t), t)
893
622
  },
894
623
  mapToWidget: (e) => ({
895
624
  uid: e.uid ?? "",
896
625
  kind: "input",
897
- type: "dateInput",
626
+ type: "dropdown",
898
627
  path: e.path ?? "",
899
628
  ...e.label != null ? { label: e.label } : {},
900
629
  ...e.disabled != null ? { disabled: e.disabled } : {},
901
630
  ...e.readonly != null ? { readonly: e.readonly } : {},
902
- ...e.validator != null ? { validator: y(e.validator, "string") } : {},
631
+ ...e.validator != null ? { validator: e.validator } : {},
903
632
  props: p(e)
904
633
  })
905
- }), { gsl: Bt, gslByUid: Wt } = r({
906
- itemType: "DATE_PICKER",
634
+ }), Mt = z.gsl, Bt = z.gslByUid;
635
+ function Rt(e) {
636
+ return {
637
+ uid: e.uid ?? "",
638
+ kind: "layout",
639
+ type: "accordion",
640
+ props: {
641
+ sections: e.sections,
642
+ renderMode: e.renderMode ?? "all",
643
+ ...e.singleOpen != null ? { singleOpen: e.singleOpen } : {},
644
+ ...e.defaultOpen != null ? { defaultOpen: e.defaultOpen } : {}
645
+ },
646
+ children: []
647
+ };
648
+ }
649
+ function Lt(e, t) {
650
+ const s = t.walkChildren(t.children ?? []);
651
+ if (e.kind === "static")
652
+ return { ...t.mapStaticDef(e.def, "ACCORDION"), children: s };
653
+ const a = e.fn;
654
+ return ((i) => {
655
+ const n = a(i);
656
+ return { ...t.mapStaticDef(n, "ACCORDION"), children: s };
657
+ });
658
+ }
659
+ function vt(e) {
660
+ return e.children;
661
+ }
662
+ const O = u({
663
+ itemType: "ACCORDION",
664
+ kind: "layout",
665
+ entryShape: "compound",
666
+ mapToWidget: Rt,
667
+ buildCustomWidget: Lt,
668
+ getChildren: vt
669
+ }), ft = O.gsl, Ct = O.gslByUid;
670
+ function Nt(e) {
671
+ const t = {};
672
+ return e.addLabel != null && (t.addLabel = e.addLabel), e.removeLabel != null && (t.removeLabel = e.removeLabel), e.limit != null && (t.limit = e.limit), e.title != null && (t.title = e.title), e.addButtonIcon != null && (t.addButtonIcon = e.addButtonIcon), e.removeButtonIcon != null && (t.removeButtonIcon = e.removeButtonIcon), t;
673
+ }
674
+ function Wt(e) {
675
+ return {
676
+ uid: e.uid ?? "",
677
+ kind: "input",
678
+ type: "repeater",
679
+ path: e.path ?? "",
680
+ ...e.label != null ? { label: e.label } : {},
681
+ ...e.disabled != null ? { disabled: e.disabled } : {},
682
+ ...e.readonly != null ? { readonly: e.readonly } : {},
683
+ ...e.validator != null ? { validator: c(e.validator, "array") } : {},
684
+ props: {
685
+ ...Nt(e),
686
+ template: { kind: "layout", type: "flex", children: [], props: { direction: "column" } }
687
+ }
688
+ };
689
+ }
690
+ function _(e, t) {
691
+ for (const s of e) {
692
+ if (typeof s == "function") continue;
693
+ const a = s;
694
+ typeof a.path == "string" && a.path && !a.path.startsWith(t) && (a.path = t + a.path), "children" in a && Array.isArray(a.children) && _(a.children, t);
695
+ const i = a.props;
696
+ i?.template?.children && Array.isArray(i.template.children) && _(i.template.children, t);
697
+ }
698
+ }
699
+ function wt(e, t) {
700
+ const s = t.walkChildren(t.children ?? []), a = e.kind === "static" ? e.def.path ?? "" : e.fn({})?.path ?? "";
701
+ a && _(s, a + ".items.");
702
+ const i = {
703
+ kind: "layout",
704
+ type: "flex",
705
+ uid: "",
706
+ children: s,
707
+ props: { direction: "column" }
708
+ };
709
+ if (e.kind === "static") {
710
+ const l = t.mapStaticDef(e.def, "REPEATER");
711
+ return {
712
+ ...l,
713
+ props: { ...l.props, template: i }
714
+ };
715
+ }
716
+ const n = e.fn;
717
+ return ((l) => {
718
+ const r = n(l), o = t.mapStaticDef(r, "REPEATER");
719
+ return {
720
+ ...o,
721
+ props: { ...o.props, template: i }
722
+ };
723
+ });
724
+ }
725
+ function xt(e) {
726
+ return {
727
+ baseDef: e.def,
728
+ path: e.key,
729
+ children: e.children
730
+ };
731
+ }
732
+ function Gt(e) {
733
+ return e.children;
734
+ }
735
+ const Kt = {
736
+ parseEntry: xt,
737
+ rollUpSensibleDefaults: () => ({}),
738
+ applySensibleDefaults: (e) => e,
739
+ mapToWidget: Wt,
740
+ buildCustomWidget: wt,
741
+ getChildren: Gt
742
+ }, X = Ie("REPEATER"), me = (e, t) => X(t, ((s) => s.uid === e)), Yt = {
743
+ itemType: "REPEATER",
907
744
  kind: "input",
908
- entryShape: "keyed",
909
- sensibleDefaults: {
910
- base: {
911
- suppressAutomaticLabels: !1,
912
- suppressAutomaticPlaceholders: !1
913
- },
914
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
915
- apply: (e, t) => T(d(e, t), t)
916
- },
917
- mapToWidget: (e) => ({
918
- uid: e.uid ?? "",
919
- kind: "input",
920
- type: "datePicker",
921
- path: e.path ?? "",
922
- ...e.label != null ? { label: e.label } : {},
923
- ...e.disabled != null ? { disabled: e.disabled } : {},
924
- ...e.readonly != null ? { readonly: e.readonly } : {},
925
- ...e.validator != null ? { validator: y(e.validator, "string") } : {},
926
- props: p(e)
927
- })
928
- }), { gsl: wt, gslByUid: xt } = r({
929
- itemType: "DATE_TIME_PICKER",
745
+ handler: Kt,
746
+ gsl: X,
747
+ gslByUid: me
748
+ }, H = u({
749
+ itemType: "MARKDOWN",
930
750
  kind: "input",
931
751
  entryShape: "keyed",
932
752
  sensibleDefaults: {
933
- base: {
934
- suppressAutomaticLabels: !1,
935
- suppressAutomaticPlaceholders: !1
936
- },
753
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
937
754
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
938
- apply: (e, t) => T(d(e, t), t)
755
+ apply: (e, t) => m(d(e, t), t)
939
756
  },
940
757
  mapToWidget: (e) => ({
941
758
  uid: e.uid ?? "",
942
759
  kind: "input",
943
- type: "dateTimePicker",
760
+ type: "markdown",
944
761
  path: e.path ?? "",
945
762
  ...e.label != null ? { label: e.label } : {},
946
763
  ...e.disabled != null ? { disabled: e.disabled } : {},
947
764
  ...e.readonly != null ? { readonly: e.readonly } : {},
948
- ...e.validator != null ? { validator: y(e.validator, "string") } : {},
765
+ ...e.validator != null ? { validator: c(e.validator, "string") } : {},
949
766
  props: p(e)
950
767
  })
951
- }), { gsl: Gt, gslByUid: Kt } = r({
952
- itemType: "RANGE_CALENDAR",
768
+ }), $t = H.gsl, Ft = H.gslByUid, V = u({
769
+ itemType: "RANGE_DATE_INPUT",
953
770
  kind: "input",
954
771
  entryShape: "keyed",
955
772
  sensibleDefaults: {
@@ -960,16 +777,16 @@ const { gsl: h, gslByUid: ot } = r({
960
777
  mapToWidget: (e) => ({
961
778
  uid: e.uid ?? "",
962
779
  kind: "input",
963
- type: "rangeCalendar",
780
+ type: "rangeDateInput",
964
781
  path: e.path ?? "",
965
782
  ...e.label != null ? { label: e.label } : {},
966
783
  ...e.disabled != null ? { disabled: e.disabled } : {},
967
784
  ...e.readonly != null ? { readonly: e.readonly } : {},
968
- ...e.validator != null ? { validator: y(e.validator, "array") } : {},
785
+ ...e.validator != null ? { validator: c(e.validator, "array") } : {},
969
786
  props: p(e)
970
787
  })
971
- }), { gsl: Yt, gslByUid: $t } = r({
972
- itemType: "RANGE_DATE_INPUT",
788
+ }), zt = V.gsl, Ot = V.gslByUid, j = u({
789
+ itemType: "RANGE_TIME_INPUT",
973
790
  kind: "input",
974
791
  entryShape: "keyed",
975
792
  sensibleDefaults: {
@@ -980,15 +797,15 @@ const { gsl: h, gslByUid: ot } = r({
980
797
  mapToWidget: (e) => ({
981
798
  uid: e.uid ?? "",
982
799
  kind: "input",
983
- type: "rangeDateInput",
800
+ type: "rangeTimeInput",
984
801
  path: e.path ?? "",
985
802
  ...e.label != null ? { label: e.label } : {},
986
803
  ...e.disabled != null ? { disabled: e.disabled } : {},
987
804
  ...e.readonly != null ? { readonly: e.readonly } : {},
988
- ...e.validator != null ? { validator: y(e.validator, "array") } : {},
805
+ ...e.validator != null ? { validator: c(e.validator, "array") } : {},
989
806
  props: p(e)
990
807
  })
991
- }), { gsl: Ot, gslByUid: Ft } = r({
808
+ }), Xt = j.gsl, Ht = j.gslByUid, q = u({
992
809
  itemType: "RANGE_DATE_TIME_INPUT",
993
810
  kind: "input",
994
811
  entryShape: "keyed",
@@ -1005,10 +822,10 @@ const { gsl: h, gslByUid: ot } = r({
1005
822
  ...e.label != null ? { label: e.label } : {},
1006
823
  ...e.disabled != null ? { disabled: e.disabled } : {},
1007
824
  ...e.readonly != null ? { readonly: e.readonly } : {},
1008
- ...e.validator != null ? { validator: y(e.validator, "array") } : {},
825
+ ...e.validator != null ? { validator: c(e.validator, "array") } : {},
1009
826
  props: p(e)
1010
827
  })
1011
- }), { gsl: zt, gslByUid: Ht } = r({
828
+ }), Vt = q.gsl, jt = q.gslByUid, J = u({
1012
829
  itemType: "RANGE_DATE_TIME_CALENDAR",
1013
830
  kind: "input",
1014
831
  entryShape: "keyed",
@@ -1025,10 +842,10 @@ const { gsl: h, gslByUid: ot } = r({
1025
842
  ...e.label != null ? { label: e.label } : {},
1026
843
  ...e.disabled != null ? { disabled: e.disabled } : {},
1027
844
  ...e.readonly != null ? { readonly: e.readonly } : {},
1028
- ...e.validator != null ? { validator: y(e.validator, "array") } : {},
845
+ ...e.validator != null ? { validator: c(e.validator, "array") } : {},
1029
846
  props: p(e)
1030
847
  })
1031
- }), { gsl: Vt, gslByUid: Xt } = r({
848
+ }), qt = J.gsl, Jt = J.gslByUid, Q = u({
1032
849
  itemType: "RANGE_DATE_TIME_PICKER",
1033
850
  kind: "input",
1034
851
  entryShape: "keyed",
@@ -1045,51 +862,11 @@ const { gsl: h, gslByUid: ot } = r({
1045
862
  ...e.label != null ? { label: e.label } : {},
1046
863
  ...e.disabled != null ? { disabled: e.disabled } : {},
1047
864
  ...e.readonly != null ? { readonly: e.readonly } : {},
1048
- ...e.validator != null ? { validator: y(e.validator, "array") } : {},
1049
- props: p(e)
1050
- })
1051
- }), { gsl: jt, gslByUid: Zt } = r({
1052
- itemType: "RANGE_TIME_INPUT",
1053
- kind: "input",
1054
- entryShape: "keyed",
1055
- sensibleDefaults: {
1056
- base: { suppressAutomaticLabels: !1 },
1057
- fields: ["suppressAutomaticLabels"],
1058
- apply: (e, t) => d(e, t)
1059
- },
1060
- mapToWidget: (e) => ({
1061
- uid: e.uid ?? "",
1062
- kind: "input",
1063
- type: "rangeTimeInput",
1064
- path: e.path ?? "",
1065
- ...e.label != null ? { label: e.label } : {},
1066
- ...e.disabled != null ? { disabled: e.disabled } : {},
1067
- ...e.readonly != null ? { readonly: e.readonly } : {},
1068
- ...e.validator != null ? { validator: y(e.validator, "array") } : {},
1069
- props: p(e)
1070
- })
1071
- }), { gsl: qt, gslByUid: Jt } = r({
1072
- itemType: "TIME_INPUT",
1073
- kind: "input",
1074
- entryShape: "keyed",
1075
- sensibleDefaults: {
1076
- base: { suppressAutomaticLabels: !1 },
1077
- fields: ["suppressAutomaticLabels"],
1078
- apply: (e, t) => d(e, t)
1079
- },
1080
- mapToWidget: (e) => ({
1081
- uid: e.uid ?? "",
1082
- kind: "input",
1083
- type: "timeInput",
1084
- path: e.path ?? "",
1085
- ...e.label != null ? { label: e.label } : {},
1086
- ...e.disabled != null ? { disabled: e.disabled } : {},
1087
- ...e.readonly != null ? { readonly: e.readonly } : {},
1088
- ...e.validator != null ? { validator: y(e.validator, "string") } : {},
865
+ ...e.validator != null ? { validator: c(e.validator, "array") } : {},
1089
866
  props: p(e)
1090
867
  })
1091
- }), { gsl: Qt, gslByUid: es } = r({
1092
- itemType: "TIME_PICKER",
868
+ }), Qt = Q.gsl, Zt = Q.gslByUid, Z = u({
869
+ itemType: "RANGE_DATE_PICKER",
1093
870
  kind: "input",
1094
871
  entryShape: "keyed",
1095
872
  sensibleDefaults: {
@@ -1098,21 +875,21 @@ const { gsl: h, gslByUid: ot } = r({
1098
875
  suppressAutomaticPlaceholders: !1
1099
876
  },
1100
877
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
1101
- apply: (e, t) => T(d(e, t), t)
878
+ apply: (e, t) => m(d(e, t), t)
1102
879
  },
1103
880
  mapToWidget: (e) => ({
1104
881
  uid: e.uid ?? "",
1105
882
  kind: "input",
1106
- type: "timePicker",
883
+ type: "rangeDatePicker",
1107
884
  path: e.path ?? "",
1108
885
  ...e.label != null ? { label: e.label } : {},
1109
886
  ...e.disabled != null ? { disabled: e.disabled } : {},
1110
887
  ...e.readonly != null ? { readonly: e.readonly } : {},
1111
- ...e.validator != null ? { validator: y(e.validator, "string") } : {},
888
+ ...e.validator != null ? { validator: c(e.validator, "array") } : {},
1112
889
  props: p(e)
1113
890
  })
1114
- }), { gsl: ts, gslByUid: ss } = r({
1115
- itemType: "DATE_TIME_INPUT",
891
+ }), es = Z.gsl, ts = Z.gslByUid, ee = u({
892
+ itemType: "RANGE_TIME_PICKER",
1116
893
  kind: "input",
1117
894
  entryShape: "keyed",
1118
895
  sensibleDefaults: {
@@ -1123,685 +900,923 @@ const { gsl: h, gslByUid: ot } = r({
1123
900
  mapToWidget: (e) => ({
1124
901
  uid: e.uid ?? "",
1125
902
  kind: "input",
1126
- type: "dateTimeInput",
903
+ type: "rangeTimePicker",
1127
904
  path: e.path ?? "",
1128
905
  ...e.label != null ? { label: e.label } : {},
1129
906
  ...e.disabled != null ? { disabled: e.disabled } : {},
1130
907
  ...e.readonly != null ? { readonly: e.readonly } : {},
1131
- ...e.validator != null ? { validator: y(e.validator, "string") } : {},
908
+ ...e.validator != null ? { validator: c(e.validator, "array") } : {},
1132
909
  props: p(e)
1133
910
  })
1134
- }), { gsl: as, gslByUid: is } = r({
1135
- itemType: "RANGE_DATE_PICKER",
1136
- kind: "input",
1137
- entryShape: "keyed",
1138
- sensibleDefaults: {
1139
- base: {
1140
- suppressAutomaticLabels: !1,
1141
- suppressAutomaticPlaceholders: !1
1142
- },
1143
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
1144
- apply: (e, t) => T(d(e, t), t)
1145
- },
911
+ }), ss = ee.gsl, as = ee.gslByUid, te = u({
912
+ itemType: "CUSTOM_DISPLAY",
913
+ kind: "display",
914
+ entryShape: "bare",
1146
915
  mapToWidget: (e) => ({
1147
916
  uid: e.uid ?? "",
1148
- kind: "input",
1149
- type: "rangeDatePicker",
1150
- path: e.path ?? "",
1151
- ...e.label != null ? { label: e.label } : {},
1152
- ...e.disabled != null ? { disabled: e.disabled } : {},
1153
- ...e.readonly != null ? { readonly: e.readonly } : {},
1154
- ...e.validator != null ? { validator: y(e.validator, "array") } : {},
1155
- props: p(e)
917
+ kind: "display",
918
+ type: e.customType,
919
+ props: e.props ?? {}
1156
920
  })
1157
- }), { gsl: ns, gslByUid: ls } = r({
1158
- itemType: "RANGE_TIME_PICKER",
921
+ }), is = te.gsl, ns = te.gslByUid, se = u({
922
+ itemType: "CUSTOM_INPUT",
1159
923
  kind: "input",
1160
924
  entryShape: "keyed",
1161
925
  sensibleDefaults: {
1162
- base: { suppressAutomaticLabels: !1 },
926
+ base: {
927
+ suppressAutomaticLabels: !1
928
+ },
1163
929
  fields: ["suppressAutomaticLabels"],
1164
930
  apply: (e, t) => d(e, t)
1165
931
  },
1166
932
  mapToWidget: (e) => ({
1167
933
  uid: e.uid ?? "",
1168
934
  kind: "input",
1169
- type: "rangeTimePicker",
935
+ type: e.customType,
1170
936
  path: e.path ?? "",
1171
937
  ...e.label != null ? { label: e.label } : {},
1172
938
  ...e.disabled != null ? { disabled: e.disabled } : {},
1173
939
  ...e.readonly != null ? { readonly: e.readonly } : {},
1174
- ...e.validator != null ? { validator: y(e.validator, "array") } : {},
1175
- props: p(e)
940
+ ...e.defaultValue != null ? { defaultValue: e.defaultValue } : {},
941
+ ...e.validator != null ? { validator: e.validator } : {},
942
+ props: e.props ?? {}
1176
943
  })
1177
- });
1178
- function K(e) {
1179
- const t = {};
1180
- return e.addLabel != null && (t.addLabel = e.addLabel), e.removeLabel != null && (t.removeLabel = e.removeLabel), e.limit != null && (t.limit = e.limit), e.title != null && (t.title = e.title), e.addButtonIcon != null && (t.addButtonIcon = e.addButtonIcon), e.removeButtonIcon != null && (t.removeButtonIcon = e.removeButtonIcon), t;
1181
- }
1182
- function Y(e) {
944
+ }), ls = se.gsl, os = se.gslByUid, ae = u({
945
+ itemType: "CUSTOM_ACTION",
946
+ kind: "action",
947
+ entryShape: "bare",
948
+ mapToWidget: (e) => {
949
+ const {
950
+ uid: t,
951
+ label: s,
952
+ disabled: a,
953
+ on: i,
954
+ onClick: n,
955
+ data: l,
956
+ customType: r,
957
+ tags: o,
958
+ size: T,
959
+ include: g,
960
+ exclude: ge,
961
+ states: be,
962
+ props: re,
963
+ ...I
964
+ } = e;
965
+ return {
966
+ uid: t ?? "",
967
+ kind: "action",
968
+ type: e.customType,
969
+ label: s,
970
+ disabled: a,
971
+ ...i != null ? { on: i } : {},
972
+ props: { ...re, ...I }
973
+ };
974
+ },
975
+ afterMerge: (e, t) => ye.extractOnClickFromMergeResult(
976
+ e,
977
+ t.eventRegistry,
978
+ t.eventIdGenerator
979
+ )
980
+ }), us = ae.gsl, rs = ae.gslByUid;
981
+ function ps(e) {
1183
982
  return {
1184
983
  uid: e.uid ?? "",
1185
- kind: "input",
1186
- type: "repeater",
1187
- path: e.path ?? "",
1188
- ...e.label != null ? { label: e.label } : {},
1189
- ...e.disabled != null ? { disabled: e.disabled } : {},
1190
- ...e.readonly != null ? { readonly: e.readonly } : {},
1191
- ...e.validator != null ? { validator: y(e.validator, "array") } : {},
1192
- props: {
1193
- ...K(e),
1194
- template: { kind: "layout", type: "flex", children: [], props: { direction: "column" } }
1195
- }
984
+ kind: "layout",
985
+ type: e.customType,
986
+ props: e.props ?? {},
987
+ children: []
988
+ };
989
+ }
990
+ function ds(e, t) {
991
+ const s = t.walkChildren(t.children ?? []);
992
+ if (e.kind === "static")
993
+ return { ...t.mapStaticDef(e.def, "CUSTOM_LAYOUT"), children: s };
994
+ const a = e.fn;
995
+ return ((i) => {
996
+ const n = a(i);
997
+ return { ...t.mapStaticDef(n, "CUSTOM_LAYOUT"), children: s };
998
+ });
999
+ }
1000
+ function cs(e) {
1001
+ return e.children;
1002
+ }
1003
+ const ie = u({
1004
+ itemType: "CUSTOM_LAYOUT",
1005
+ kind: "layout",
1006
+ entryShape: "compound",
1007
+ mapToWidget: ps,
1008
+ buildCustomWidget: ds,
1009
+ getChildren: cs
1010
+ }), ys = ie.gsl, ms = ie.gslByUid, Ts = [
1011
+ k,
1012
+ S,
1013
+ A,
1014
+ E,
1015
+ h,
1016
+ U,
1017
+ D,
1018
+ P,
1019
+ M,
1020
+ B,
1021
+ R,
1022
+ L,
1023
+ v,
1024
+ f,
1025
+ C,
1026
+ N,
1027
+ W,
1028
+ w,
1029
+ x,
1030
+ G,
1031
+ K,
1032
+ Y,
1033
+ $,
1034
+ F,
1035
+ z,
1036
+ O,
1037
+ Yt,
1038
+ H,
1039
+ V,
1040
+ j,
1041
+ q,
1042
+ J,
1043
+ Q,
1044
+ Z,
1045
+ ee,
1046
+ te,
1047
+ se,
1048
+ ae,
1049
+ ie
1050
+ ], ne = _e();
1051
+ for (const e of Ts)
1052
+ ke(ne, e);
1053
+ function Ta(e) {
1054
+ return Se(
1055
+ ne,
1056
+ e
1057
+ );
1058
+ }
1059
+ function gs(e, t, s) {
1060
+ if (typeof t == "function") {
1061
+ const i = t;
1062
+ return {
1063
+ items: [{ key: e, def: (l) => ({ type: "text", ...i(l) }) }],
1064
+ type: "ITEMS",
1065
+ itemType: y.INPUTS,
1066
+ tags: s ?? []
1067
+ };
1068
+ }
1069
+ const a = { type: "text", ...t };
1070
+ return {
1071
+ items: [{ key: e, def: a }],
1072
+ type: "ITEMS",
1073
+ itemType: y.INPUTS,
1074
+ tags: s ?? []
1075
+ };
1076
+ }
1077
+ function bs(e, t, s) {
1078
+ if (typeof t == "function") {
1079
+ const i = t;
1080
+ return {
1081
+ items: [{ key: e, def: (l) => ({ type: "number", ...i(l) }) }],
1082
+ type: "ITEMS",
1083
+ itemType: y.INPUTS,
1084
+ tags: s ?? []
1085
+ };
1086
+ }
1087
+ const a = { type: "number", ...t };
1088
+ return {
1089
+ items: [{ key: e, def: a }],
1090
+ type: "ITEMS",
1091
+ itemType: y.INPUTS,
1092
+ tags: s ?? []
1093
+ };
1094
+ }
1095
+ function Is(e, t, s) {
1096
+ if (typeof t == "function") {
1097
+ const i = t;
1098
+ return {
1099
+ items: [{ key: e, def: (l) => ({ type: "boolean", ...i(l) }) }],
1100
+ type: "ITEMS",
1101
+ itemType: y.INPUTS,
1102
+ tags: s ?? []
1103
+ };
1104
+ }
1105
+ const a = { type: "boolean", ...t };
1106
+ return {
1107
+ items: [{ key: e, def: a }],
1108
+ type: "ITEMS",
1109
+ itemType: y.INPUTS,
1110
+ tags: s ?? []
1196
1111
  };
1197
1112
  }
1198
- function k(e, t) {
1199
- for (const s of e) {
1200
- if (typeof s == "function") continue;
1201
- const a = s;
1202
- typeof a.path == "string" && a.path && !a.path.startsWith(t) && (a.path = t + a.path), "children" in a && Array.isArray(a.children) && k(a.children, t);
1203
- const i = a.props;
1204
- i?.template?.children && Array.isArray(i.template.children) && k(i.template.children, t);
1113
+ function _s(e, t, s) {
1114
+ if (typeof t == "function") {
1115
+ const n = t;
1116
+ return { type: "ITEMS", itemType: "SELECT", items: [{ key: e, def: (o) => ({ type: "select", ...n(o) }) }], tags: s ?? [] };
1117
+ }
1118
+ const a = { type: "select", ...t };
1119
+ return { type: "ITEMS", itemType: "SELECT", items: [{ key: e, def: a }], tags: s ?? [] };
1120
+ }
1121
+ function ks(e, t, s) {
1122
+ if (typeof t == "function") {
1123
+ const n = t;
1124
+ return { type: "ITEMS", itemType: "DROPDOWN", items: [{ key: e, def: (o) => ({
1125
+ type: "dropdown",
1126
+ ...n(o)
1127
+ }) }], tags: s ?? [] };
1128
+ }
1129
+ const a = { type: "dropdown", ...t };
1130
+ return { type: "ITEMS", itemType: "DROPDOWN", items: [{ key: e, def: a }], tags: s ?? [] };
1131
+ }
1132
+ function Ss(e, t, s) {
1133
+ if (typeof t == "function") {
1134
+ const n = t;
1135
+ return { type: "ITEMS", itemType: "RADIOGROUP", items: [{ key: e, def: (o) => ({ type: "radiogroup", ...n(o) }) }], tags: s ?? [] };
1136
+ }
1137
+ const a = { type: "radiogroup", ...t };
1138
+ return { type: "ITEMS", itemType: "RADIOGROUP", items: [{ key: e, def: a }], tags: s ?? [] };
1139
+ }
1140
+ function As(e, t, s) {
1141
+ if (typeof t == "function") {
1142
+ const n = t;
1143
+ return { type: "ITEMS", itemType: "CHECKBOX", items: [{ key: e, def: (o) => ({ type: "checkbox", ...n(o) }) }], tags: s ?? [] };
1144
+ }
1145
+ const a = { type: "checkbox", ...t };
1146
+ return { type: "ITEMS", itemType: "CHECKBOX", items: [{ key: e, def: a }], tags: s ?? [] };
1147
+ }
1148
+ function Es(e, t, s) {
1149
+ if (typeof t == "function") {
1150
+ const n = t;
1151
+ return { type: "ITEMS", itemType: "TEXTAREA", items: [{ key: e, def: (o) => ({ type: "textarea", ...n(o) }) }], tags: s ?? [] };
1152
+ }
1153
+ const a = { type: "textarea", ...t };
1154
+ return { type: "ITEMS", itemType: "TEXTAREA", items: [{ key: e, def: a }], tags: s ?? [] };
1155
+ }
1156
+ function hs(e, t, s) {
1157
+ if (typeof t == "function") {
1158
+ const n = t;
1159
+ return { type: "ITEMS", itemType: "PASSWORD", items: [{ key: e, def: (o) => ({ type: "password", ...n(o) }) }], tags: s ?? [] };
1160
+ }
1161
+ const a = { type: "password", ...t };
1162
+ return { type: "ITEMS", itemType: "PASSWORD", items: [{ key: e, def: a }], tags: s ?? [] };
1163
+ }
1164
+ function Us(e, t, s) {
1165
+ if (typeof t == "function") {
1166
+ const n = t;
1167
+ return { type: "ITEMS", itemType: "CURRENCY", items: [{ key: e, def: (o) => ({ type: "currency", ...n(o) }) }], tags: s ?? [] };
1168
+ }
1169
+ const a = { type: "currency", ...t };
1170
+ return { type: "ITEMS", itemType: "CURRENCY", items: [{ key: e, def: a }], tags: s ?? [] };
1171
+ }
1172
+ function Ds(e, t, s) {
1173
+ if (typeof t == "function") {
1174
+ const n = t;
1175
+ return { type: "ITEMS", itemType: "MARKDOWN", items: [{ key: e, def: (o) => ({ type: "markdown", ...n(o) }) }], tags: s ?? [] };
1205
1176
  }
1177
+ const a = { type: "markdown", ...t };
1178
+ return { type: "ITEMS", itemType: "MARKDOWN", items: [{ key: e, def: a }], tags: s ?? [] };
1206
1179
  }
1207
- function $(e, t) {
1208
- const s = t.walkChildren(t.children ?? []), a = e.kind === "static" ? e.def.path ?? "" : e.fn({})?.path ?? "";
1209
- a && k(s, a + ".items.");
1210
- const i = {
1211
- kind: "layout",
1212
- type: "flex",
1213
- uid: "",
1214
- children: s,
1215
- props: { direction: "column" }
1216
- };
1217
- if (e.kind === "static") {
1218
- const o = t.mapStaticDef(e.def, "REPEATER");
1180
+ function Ps(e, t, s) {
1181
+ if (typeof t == "function") {
1182
+ const n = t;
1183
+ return { type: "ITEMS", itemType: "LIST", items: [{ key: e, def: (o) => ({ type: "list", ...n(o) }) }], tags: s ?? [] };
1184
+ }
1185
+ const a = { type: "list", ...t };
1186
+ return { type: "ITEMS", itemType: "LIST", items: [{ key: e, def: a }], tags: s ?? [] };
1187
+ }
1188
+ function Ms(e, t, s) {
1189
+ if (typeof t == "function") {
1190
+ const i = t;
1219
1191
  return {
1220
- ...o,
1221
- props: { ...o.props, template: i }
1192
+ items: [(l) => ({
1193
+ type: "calendar",
1194
+ path: e,
1195
+ ...i(l)
1196
+ })],
1197
+ type: "ITEMS",
1198
+ itemType: "CALENDAR",
1199
+ tags: s ?? []
1222
1200
  };
1223
1201
  }
1224
- const n = e.fn;
1225
- return ((o) => {
1226
- const u = n(o), l = t.mapStaticDef(u, "REPEATER");
1202
+ return {
1203
+ items: [{ type: "calendar", path: e, ...t }],
1204
+ type: "ITEMS",
1205
+ itemType: "CALENDAR",
1206
+ tags: s ?? []
1207
+ };
1208
+ }
1209
+ function Bs(e, t, s) {
1210
+ if (typeof t == "function") {
1211
+ const i = t;
1227
1212
  return {
1228
- ...l,
1229
- props: { ...l.props, template: i }
1213
+ items: [(l) => ({
1214
+ type: "dateTimeCalendar",
1215
+ path: e,
1216
+ ...i(l)
1217
+ })],
1218
+ type: "ITEMS",
1219
+ itemType: "DATE_TIME_CALENDAR",
1220
+ tags: s ?? []
1230
1221
  };
1231
- });
1232
- }
1233
- function O(e) {
1222
+ }
1234
1223
  return {
1235
- baseDef: e.def,
1236
- path: e.key,
1237
- children: e.children
1224
+ items: [{ type: "dateTimeCalendar", path: e, ...t }],
1225
+ type: "ITEMS",
1226
+ itemType: "DATE_TIME_CALENDAR",
1227
+ tags: s ?? []
1238
1228
  };
1239
1229
  }
1240
- function F(e) {
1241
- return e.children;
1230
+ function Rs(e, t, s) {
1231
+ if (typeof t == "function") {
1232
+ const n = t;
1233
+ return { type: "ITEMS", itemType: "DATE_INPUT", items: [{ key: e, def: (o) => ({ type: "dateInput", ...n(o) }) }], tags: s ?? [] };
1234
+ }
1235
+ const a = { type: "dateInput", ...t };
1236
+ return { type: "ITEMS", itemType: "DATE_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
1242
1237
  }
1243
- const z = {
1244
- parseEntry: O,
1245
- rollUpSensibleDefaults: () => ({}),
1246
- applySensibleDefaults: (e) => e,
1247
- mapToWidget: Y,
1248
- buildCustomWidget: $,
1249
- getChildren: F
1250
- };
1251
- L("REPEATER", z, "input");
1252
- const H = P("REPEATER"), os = (e, t) => H(t, ((s) => s.uid === e)), v = {
1253
- onLoad: "load",
1254
- onChange: "change",
1255
- onFilter: "filter",
1256
- onBlur: "blur"
1257
- }, V = Object.keys(v);
1258
- function X(e) {
1259
- if (e.length > 0)
1260
- return null;
1261
- try {
1262
- const t = e();
1263
- return typeof t == "string" ? t : null;
1264
- } catch {
1265
- return null;
1238
+ function Ls(e, t, s) {
1239
+ if (typeof t == "function") {
1240
+ const n = t;
1241
+ return { type: "ITEMS", itemType: "DATE_PICKER", items: [{ key: e, def: (o) => ({
1242
+ type: "datePicker",
1243
+ ...n(o)
1244
+ }) }], tags: s ?? [] };
1266
1245
  }
1246
+ const a = { type: "datePicker", ...t };
1247
+ return { type: "ITEMS", itemType: "DATE_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
1267
1248
  }
1268
- class j {
1269
- // ── Action-specific: onClick ───────────────────────────────────
1270
- extractOnClickFromMergeResult(t, s, a) {
1271
- if (t.kind === "dynamic") {
1272
- const o = t.fn;
1273
- return { kind: "dynamic", fn: (l) => {
1274
- const c = o(l);
1275
- return this.wireOnClick(c, s, a);
1276
- } };
1277
- }
1278
- const i = t.def;
1279
- return { kind: "static", def: this.wireOnClick(i, s, a) };
1249
+ function vs(e, t, s) {
1250
+ if (typeof t == "function") {
1251
+ const n = t;
1252
+ return { type: "ITEMS", itemType: "DATE_TIME_PICKER", items: [{ key: e, def: (o) => ({
1253
+ type: "dateTimePicker",
1254
+ ...n(o)
1255
+ }) }], tags: s ?? [] };
1280
1256
  }
1281
- wireOnClick(t, s, a) {
1282
- const i = a.next(), n = t.onClick;
1283
- if (typeof n == "function") {
1284
- const { onClick: o, ...u } = t, l = n(void 0);
1285
- return typeof l == "string" ? { ...u, uid: i, on: { click: l } } : (s.set(i, (c) => n(c.data)), { ...u, uid: i, on: { click: i } });
1286
- }
1287
- return { ...t, uid: i };
1257
+ const a = { type: "dateTimePicker", ...t };
1258
+ return { type: "ITEMS", itemType: "DATE_TIME_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
1259
+ }
1260
+ function fs(e, t, s) {
1261
+ if (typeof t == "function") {
1262
+ const n = t;
1263
+ return { type: "ITEMS", itemType: "RANGE_CALENDAR", items: [{ key: e, def: (o) => ({
1264
+ type: "rangeCalendar",
1265
+ ...n(o)
1266
+ }) }], tags: s ?? [] };
1288
1267
  }
1289
- // ── Universal: onLoad, onChange, onFilter ──────────────────────
1290
- wireInputLayoutEvents(t, s, a) {
1291
- if (t.kind === "dynamic") {
1292
- const n = t.fn;
1293
- return { kind: "dynamic", fn: (u) => {
1294
- const l = n(u);
1295
- return this.wireEventProperties(l, s, a);
1296
- } };
1297
- }
1298
- return { kind: "static", def: this.wireEventProperties(t.def, s, a) };
1268
+ const a = { type: "rangeCalendar", ...t };
1269
+ return { type: "ITEMS", itemType: "RANGE_CALENDAR", items: [{ key: e, def: a }], tags: s ?? [] };
1270
+ }
1271
+ function Cs(e, t, s) {
1272
+ if (typeof t == "function") {
1273
+ const n = t;
1274
+ return { type: "ITEMS", itemType: "RANGE_DATE_INPUT", items: [{ key: e, def: (o) => ({
1275
+ type: "rangeDateInput",
1276
+ ...n(o)
1277
+ }) }], tags: s ?? [] };
1299
1278
  }
1300
- wireEventProperties(t, s, a) {
1301
- const i = { ...t.on || {} };
1302
- let n = !1;
1303
- const o = { ...t };
1304
- for (const u of V) {
1305
- const l = t[u];
1306
- if (l == null) continue;
1307
- const c = v[u];
1308
- if (typeof l == "function") {
1309
- const g = X(l);
1310
- if (g != null)
1311
- i[c] = g;
1312
- else {
1313
- const b = a.next();
1314
- s.set(b, l), i[c] = b;
1315
- }
1316
- n = !0;
1317
- } else typeof l == "string" && (i[c] = l, n = !0);
1318
- delete o[u];
1319
- }
1320
- return n && (o.on = i), o;
1279
+ const a = { type: "rangeDateInput", ...t };
1280
+ return { type: "ITEMS", itemType: "RANGE_DATE_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
1281
+ }
1282
+ function Ns(e, t, s) {
1283
+ if (typeof t == "function") {
1284
+ const n = t;
1285
+ return { type: "ITEMS", itemType: "RANGE_DATE_TIME_INPUT", items: [{ key: e, def: (o) => ({
1286
+ type: "rangeDateTimeInput",
1287
+ ...n(o)
1288
+ }) }], tags: s ?? [] };
1321
1289
  }
1290
+ const a = { type: "rangeDateTimeInput", ...t };
1291
+ return { type: "ITEMS", itemType: "RANGE_DATE_TIME_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
1322
1292
  }
1323
- const R = new j();
1324
- function Z(e) {
1325
- const {
1326
- uid: t,
1327
- label: s,
1328
- actionType: a,
1329
- disabled: i,
1330
- on: n,
1331
- onClick: o,
1332
- data: u,
1333
- type: l,
1334
- tags: c,
1335
- size: g,
1336
- include: b,
1337
- exclude: _,
1338
- states: A,
1339
- ...E
1340
- } = e;
1341
- return {
1342
- uid: t ?? "",
1343
- kind: "action",
1344
- type: "button",
1345
- disabled: i,
1346
- actionType: a,
1347
- label: s,
1348
- ...n != null ? { on: n } : {},
1349
- props: E
1350
- };
1293
+ function Ws(e, t, s) {
1294
+ if (typeof t == "function") {
1295
+ const n = t;
1296
+ return { type: "ITEMS", itemType: "RANGE_DATE_TIME_CALENDAR", items: [{ key: e, def: (o) => ({
1297
+ type: "rangeDateTimeCalendar",
1298
+ ...n(o)
1299
+ }) }], tags: s ?? [] };
1300
+ }
1301
+ const a = { type: "rangeDateTimeCalendar", ...t };
1302
+ return { type: "ITEMS", itemType: "RANGE_DATE_TIME_CALENDAR", items: [{ key: e, def: a }], tags: s ?? [] };
1351
1303
  }
1352
- const { gsl: us, gslByUid: rs } = r({
1353
- itemType: "ACTIONS",
1354
- kind: "action",
1355
- entryShape: "bare",
1356
- mapToWidget: Z,
1357
- afterMerge: (e, t) => R.extractOnClickFromMergeResult(
1358
- e,
1359
- t.eventRegistry,
1360
- t.eventIdGenerator
1361
- )
1362
- });
1363
- function q(e) {
1364
- const {
1365
- uid: t,
1366
- widgetName: s,
1367
- tags: a,
1368
- size: i,
1369
- onChange: n,
1370
- include: o,
1371
- exclude: u,
1372
- ...l
1373
- } = e, { on: c, ...g } = l;
1374
- return {
1375
- uid: t ?? "",
1376
- kind: "layout",
1377
- type: s ?? "flex",
1378
- props: {
1379
- direction: g.direction ?? "column",
1380
- ...g
1381
- },
1382
- children: []
1383
- };
1304
+ function ws(e, t, s) {
1305
+ if (typeof t == "function") {
1306
+ const n = t;
1307
+ return { type: "ITEMS", itemType: "RANGE_DATE_TIME_PICKER", items: [{ key: e, def: (o) => ({
1308
+ type: "rangeDateTimePicker",
1309
+ ...n(o)
1310
+ }) }], tags: s ?? [] };
1311
+ }
1312
+ const a = { type: "rangeDateTimePicker", ...t };
1313
+ return { type: "ITEMS", itemType: "RANGE_DATE_TIME_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
1384
1314
  }
1385
- function J(e, t) {
1386
- const s = t.walkChildren(t.children ?? []);
1387
- if (e.kind === "static")
1388
- return { ...t.mapStaticDef(e.def, "LAYOUTS"), children: s };
1389
- const a = e.fn;
1390
- return ((i) => {
1391
- const n = a(i);
1392
- return { ...t.mapStaticDef(n, "LAYOUTS"), children: s };
1393
- });
1315
+ function xs(e, t, s) {
1316
+ if (typeof t == "function") {
1317
+ const n = t;
1318
+ return { type: "ITEMS", itemType: "RANGE_TIME_INPUT", items: [{ key: e, def: (o) => ({
1319
+ type: "rangeTimeInput",
1320
+ ...n(o)
1321
+ }) }], tags: s ?? [] };
1322
+ }
1323
+ const a = { type: "rangeTimeInput", ...t };
1324
+ return { type: "ITEMS", itemType: "RANGE_TIME_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
1394
1325
  }
1395
- function Q(e) {
1396
- return e.children;
1326
+ function Gs(e, t, s) {
1327
+ if (typeof t == "function") {
1328
+ const n = t;
1329
+ return { type: "ITEMS", itemType: "RANGE_DATE_PICKER", items: [{ key: e, def: (o) => ({
1330
+ type: "rangeDatePicker",
1331
+ ...n(o)
1332
+ }) }], tags: s ?? [] };
1333
+ }
1334
+ const a = { type: "rangeDatePicker", ...t };
1335
+ return { type: "ITEMS", itemType: "RANGE_DATE_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
1397
1336
  }
1398
- const { gsl: ps, gslByUid: ds } = r({
1399
- itemType: "LAYOUTS",
1400
- kind: "layout",
1401
- entryShape: "compound",
1402
- mapToWidget: q,
1403
- buildCustomWidget: J,
1404
- getChildren: Q
1405
- });
1406
- function f(e) {
1407
- return {
1408
- errors: void 0,
1409
- touched: void 0,
1410
- translate: void 0,
1411
- ...e ?? {},
1412
- $form: e?.$form ?? {}
1413
- };
1337
+ function Ks(e, t, s) {
1338
+ if (typeof t == "function") {
1339
+ const n = t;
1340
+ return { type: "ITEMS", itemType: "RANGE_TIME_PICKER", items: [{ key: e, def: (o) => ({
1341
+ type: "rangeTimePicker",
1342
+ ...n(o)
1343
+ }) }], tags: s ?? [] };
1344
+ }
1345
+ const a = { type: "rangeTimePicker", ...t };
1346
+ return { type: "ITEMS", itemType: "RANGE_TIME_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
1347
+ }
1348
+ function Ys(e, t, s) {
1349
+ if (typeof t == "function") {
1350
+ const n = t;
1351
+ return { type: "ITEMS", itemType: "TIME_INPUT", items: [{ key: e, def: (o) => ({ type: "timeInput", ...n(o) }) }], tags: s ?? [] };
1352
+ }
1353
+ const a = { type: "timeInput", ...t };
1354
+ return { type: "ITEMS", itemType: "TIME_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
1355
+ }
1356
+ function $s(e, t, s) {
1357
+ if (typeof t == "function") {
1358
+ const n = t;
1359
+ return { type: "ITEMS", itemType: "TIME_PICKER", items: [{ key: e, def: (o) => ({
1360
+ type: "timePicker",
1361
+ ...n(o)
1362
+ }) }], tags: s ?? [] };
1363
+ }
1364
+ const a = { type: "timePicker", ...t };
1365
+ return { type: "ITEMS", itemType: "TIME_PICKER", items: [{ key: e, def: a }], tags: s ?? [] };
1366
+ }
1367
+ function Fs(e, t, s) {
1368
+ if (typeof t == "function") {
1369
+ const n = t;
1370
+ return { type: "ITEMS", itemType: "DATE_TIME_INPUT", items: [{ key: e, def: (o) => ({
1371
+ type: "dateTimeInput",
1372
+ ...n(o)
1373
+ }) }], tags: s ?? [] };
1374
+ }
1375
+ const a = { type: "dateTimeInput", ...t };
1376
+ return { type: "ITEMS", itemType: "DATE_TIME_INPUT", items: [{ key: e, def: a }], tags: s ?? [] };
1377
+ }
1378
+ function zs(e, t, s, a) {
1379
+ if (typeof s == "function") {
1380
+ const l = s;
1381
+ return { type: "ITEMS", itemType: "CUSTOM_INPUT", items: [{ key: t, def: (T) => ({
1382
+ customType: e,
1383
+ ...l(T)
1384
+ }) }], tags: a ?? [] };
1385
+ }
1386
+ const i = { customType: e, ...s };
1387
+ return { type: "ITEMS", itemType: "CUSTOM_INPUT", items: [{ key: t, def: i }], tags: a ?? [] };
1414
1388
  }
1415
- function ee(e) {
1389
+ function Os(e, t) {
1416
1390
  return {
1417
- uid: "",
1418
- kind: "display",
1419
- type: "renderer",
1420
- props: { render: e.render }
1391
+ items: [e],
1392
+ type: "ITEMS",
1393
+ itemType: y.ACTIONS,
1394
+ tags: t ?? []
1421
1395
  };
1422
1396
  }
1423
- function te(e, t) {
1424
- if (e.kind === "static") {
1425
- const a = e.def;
1426
- return ((i) => ({
1427
- uid: "",
1428
- kind: "display",
1429
- type: "renderer",
1430
- ...a.include != null ? { include: a.include } : {},
1431
- ...a.exclude != null ? { exclude: a.exclude } : {},
1432
- props: { render: a.render(f(i)) }
1433
- }));
1397
+ function Xs(e, t, s) {
1398
+ if (typeof t == "function") {
1399
+ const n = t;
1400
+ return { type: "ITEMS", itemType: "CUSTOM_ACTION", items: [
1401
+ (r) => ({ customType: e, ...n(r) })
1402
+ ], tags: s ?? [] };
1403
+ }
1404
+ return { type: "ITEMS", itemType: "CUSTOM_ACTION", items: [{ customType: e, ...t }], tags: s ?? [] };
1405
+ }
1406
+ const Te = (e, t) => ({
1407
+ type: "ITEMS",
1408
+ itemType: y.DISPLAYS,
1409
+ items: [{ render: e }],
1410
+ tags: t ?? []
1411
+ });
1412
+ function Hs(e, t) {
1413
+ return { type: "ITEMS", itemType: "ALERTS", items: [e], tags: t ?? [] };
1414
+ }
1415
+ function Vs(e, t) {
1416
+ return { type: "ITEMS", itemType: "MARKDOWN_TEXTS", items: [e], tags: t ?? [] };
1417
+ }
1418
+ function js(e, t, s) {
1419
+ if (typeof t == "function") {
1420
+ const r = t;
1421
+ return { type: "ITEMS", itemType: "CUSTOM_DISPLAY", items: [
1422
+ (T) => ({ customType: e, ...r(T) })
1423
+ ], tags: s ?? [] };
1434
1424
  }
1435
- const s = e.fn;
1436
- return ((a) => {
1437
- const i = s(a);
1438
- return {
1439
- uid: "",
1440
- kind: "display",
1441
- type: "renderer",
1442
- ...i.include != null ? { include: i.include } : {},
1443
- ...i.exclude != null ? { exclude: i.exclude } : {},
1444
- props: { render: i.render(f(a)) }
1445
- };
1446
- });
1425
+ const { uid: a, ...i } = t ?? {};
1426
+ return { type: "ITEMS", itemType: "CUSTOM_DISPLAY", items: [{
1427
+ customType: e,
1428
+ ...a != null ? { uid: a } : {},
1429
+ props: Object.keys(i).length > 0 ? i : void 0
1430
+ }], tags: s ?? [] };
1447
1431
  }
1448
- const { gsl: ys, gslByUid: cs } = r({
1449
- itemType: "DISPLAYS",
1450
- kind: "display",
1451
- entryShape: "bare",
1452
- mapToWidget: ee,
1453
- buildCustomWidget: te
1454
- }), { gsl: ms, gslByUid: Ts } = r({
1455
- itemType: "ALERTS",
1456
- kind: "display",
1457
- entryShape: "bare",
1458
- mapToWidget: (e) => ({
1459
- uid: e.uid ?? "",
1460
- kind: "display",
1461
- type: "alert",
1462
- props: {
1463
- text: e.text,
1464
- ...e.level != null ? { level: e.level } : {}
1465
- }
1466
- })
1467
- }), { gsl: gs, gslByUid: bs } = r({
1468
- itemType: "MARKDOWN_TEXTS",
1469
- kind: "display",
1470
- entryShape: "bare",
1471
- mapToWidget: (e) => ({
1472
- uid: e.uid ?? "",
1473
- kind: "display",
1474
- type: "markdownText",
1475
- props: {
1476
- md: e.md
1432
+ const le = (e, t, s) => ({
1433
+ type: "ITEMS",
1434
+ itemType: y.LAYOUTS,
1435
+ items: [{ def: { widgetName: "flex", ...t ?? {} }, children: e }],
1436
+ tags: s ?? []
1437
+ }), qs = (e, t, s) => le(e, { direction: "row", ...t ?? {} }, s), Js = (e, t, s) => le(e, { direction: "column", ...t ?? {} }, s), oe = (e, t, s) => ({
1438
+ type: "ITEMS",
1439
+ itemType: y.LAYOUTS,
1440
+ items: [
1441
+ {
1442
+ def: {
1443
+ widgetName: "grid",
1444
+ direction: "row",
1445
+ autoFit: !0,
1446
+ ...t ?? {}
1447
+ },
1448
+ children: e
1477
1449
  }
1478
- })
1479
- });
1480
- function se(e) {
1450
+ ],
1451
+ tags: s ?? []
1452
+ }), Qs = (e, t, s) => oe(e, { direction: "row", ...t ?? {} }, s), Zs = (e, t, s) => oe(e, { direction: "column", ...t ?? {} }, s);
1453
+ function de(e) {
1454
+ return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
1455
+ }
1456
+ function ea(e, t, s) {
1457
+ const a = e.map((l) => ({
1458
+ label: l.label,
1459
+ uid: l.uid ?? de(l.label)
1460
+ })), i = e.map((l) => ({
1461
+ type: "ITEMS",
1462
+ itemType: y.LAYOUTS,
1463
+ items: [
1464
+ {
1465
+ def: { uid: l.uid ?? de(l.label), direction: "column", widgetName: "flex" },
1466
+ children: l.children
1467
+ }
1468
+ ],
1469
+ tags: []
1470
+ }));
1481
1471
  return {
1482
- uid: e.uid ?? "",
1483
- kind: "layout",
1484
- type: "tabs",
1485
- props: {
1486
- tabs: e.tabs,
1487
- renderMode: e.renderMode ?? "all",
1488
- ...e.defaultOpen != null ? { defaultOpen: e.defaultOpen } : {}
1489
- },
1490
- children: []
1472
+ type: "ITEMS",
1473
+ itemType: "TABS",
1474
+ items: [{ def: {
1475
+ tabs: a,
1476
+ ...t
1477
+ }, children: i }],
1478
+ tags: s ?? []
1491
1479
  };
1492
1480
  }
1493
- function ae(e, t) {
1494
- const s = t.walkChildren(t.children ?? []);
1495
- if (e.kind === "static")
1496
- return { ...t.mapStaticDef(e.def, "TABS"), children: s };
1497
- const a = e.fn;
1498
- return ((i) => {
1499
- const n = a(i);
1500
- return { ...t.mapStaticDef(n, "TABS"), children: s };
1501
- });
1502
- }
1503
- function ie(e) {
1504
- return e.children;
1481
+ function ce(e) {
1482
+ return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
1505
1483
  }
1506
- const { gsl: _s, gslByUid: Es } = r({
1507
- itemType: "TABS",
1508
- kind: "layout",
1509
- entryShape: "compound",
1510
- mapToWidget: se,
1511
- buildCustomWidget: ae,
1512
- getChildren: ie
1513
- });
1514
- function ne(e) {
1484
+ function ta(e, t, s) {
1485
+ const a = e.map((l) => ({
1486
+ label: l.label,
1487
+ uid: l.uid ?? ce(l.label)
1488
+ })), i = e.map((l) => ({
1489
+ type: "ITEMS",
1490
+ itemType: y.LAYOUTS,
1491
+ items: [
1492
+ {
1493
+ def: { uid: l.uid ?? ce(l.label), direction: "column", widgetName: "flex" },
1494
+ children: l.children
1495
+ }
1496
+ ],
1497
+ tags: []
1498
+ }));
1515
1499
  return {
1516
- uid: e.uid ?? "",
1517
- kind: "layout",
1518
- type: "accordion",
1519
- props: {
1520
- sections: e.sections,
1521
- renderMode: e.renderMode ?? "all",
1522
- ...e.singleOpen != null ? { singleOpen: e.singleOpen } : {},
1523
- ...e.defaultOpen != null ? { defaultOpen: e.defaultOpen } : {}
1524
- },
1525
- children: []
1500
+ type: "ITEMS",
1501
+ itemType: "ACCORDION",
1502
+ items: [{ def: {
1503
+ sections: a,
1504
+ ...t
1505
+ }, children: i }],
1506
+ tags: s ?? []
1526
1507
  };
1527
1508
  }
1528
- function le(e, t) {
1529
- const s = t.walkChildren(t.children ?? []);
1530
- if (e.kind === "static")
1531
- return { ...t.mapStaticDef(e.def, "ACCORDION"), children: s };
1532
- const a = e.fn;
1533
- return ((i) => {
1534
- const n = a(i);
1535
- return { ...t.mapStaticDef(n, "ACCORDION"), children: s };
1536
- });
1537
- }
1538
- function oe(e) {
1539
- return e.children;
1509
+ function sa(e, t, s, a) {
1510
+ if (typeof s == "function") {
1511
+ const l = s;
1512
+ return { type: "ITEMS", itemType: "CUSTOM_LAYOUT", items: [{ def: (T) => ({
1513
+ customType: e,
1514
+ ...l(T)
1515
+ }), children: t }], tags: a ?? [] };
1516
+ }
1517
+ return { type: "ITEMS", itemType: "CUSTOM_LAYOUT", items: [{ def: { customType: e, ...s }, children: t }], tags: a ?? [] };
1540
1518
  }
1541
- const { gsl: Is, gslByUid: As } = r({
1542
- itemType: "ACCORDION",
1543
- kind: "layout",
1544
- entryShape: "compound",
1545
- mapToWidget: ne,
1546
- buildCustomWidget: le,
1547
- getChildren: oe
1548
- }), { gsl: ks, gslByUid: hs } = r({
1549
- itemType: "CUSTOM_INPUT",
1550
- kind: "input",
1551
- entryShape: "keyed",
1552
- sensibleDefaults: {
1553
- base: {
1554
- suppressAutomaticLabels: !1
1555
- },
1556
- fields: ["suppressAutomaticLabels"],
1557
- apply: (e, t) => d(e, t)
1558
- },
1559
- mapToWidget: (e) => ({
1560
- uid: e.uid ?? "",
1561
- kind: "input",
1562
- type: e.customType,
1563
- path: e.path ?? "",
1564
- ...e.label != null ? { label: e.label } : {},
1565
- ...e.disabled != null ? { disabled: e.disabled } : {},
1566
- ...e.readonly != null ? { readonly: e.readonly } : {},
1567
- ...e.defaultValue != null ? { defaultValue: e.defaultValue } : {},
1568
- ...e.validator != null ? { validator: e.validator } : {},
1569
- props: e.props ?? {}
1570
- })
1571
- }), { gsl: Ss, gslByUid: Ds } = r({
1572
- itemType: "CUSTOM_ACTION",
1573
- kind: "action",
1574
- entryShape: "bare",
1575
- mapToWidget: (e) => {
1576
- const {
1577
- uid: t,
1578
- label: s,
1579
- disabled: a,
1580
- on: i,
1581
- onClick: n,
1582
- data: o,
1583
- customType: u,
1584
- tags: l,
1585
- size: c,
1586
- include: g,
1587
- exclude: b,
1588
- states: _,
1589
- props: A,
1590
- ...E
1591
- } = e;
1592
- return {
1593
- uid: t ?? "",
1594
- kind: "action",
1595
- type: e.customType,
1596
- label: s,
1597
- disabled: a,
1598
- ...i != null ? { on: i } : {},
1599
- props: { ...A, ...E }
1600
- };
1601
- },
1602
- afterMerge: (e, t) => R.extractOnClickFromMergeResult(
1603
- e,
1604
- t.eventRegistry,
1605
- t.eventIdGenerator
1606
- )
1607
- }), { gsl: fs, gslByUid: Ps } = r({
1608
- itemType: "CUSTOM_DISPLAY",
1609
- kind: "display",
1610
- entryShape: "bare",
1611
- mapToWidget: (e) => ({
1612
- uid: e.uid ?? "",
1613
- kind: "display",
1614
- type: e.customType,
1615
- props: e.props ?? {}
1616
- })
1617
- });
1618
- function ue(e) {
1519
+ function aa(e, t, s) {
1520
+ const { template: a, ...i } = t;
1619
1521
  return {
1620
- uid: e.uid ?? "",
1621
- kind: "layout",
1622
- type: e.customType,
1623
- props: e.props ?? {},
1624
- children: []
1522
+ type: "ITEMS",
1523
+ itemType: "REPEATER",
1524
+ items: [{ key: e, def: i, children: a }],
1525
+ tags: s ?? []
1625
1526
  };
1626
1527
  }
1627
- function re(e, t) {
1628
- const s = t.walkChildren(t.children ?? []);
1629
- if (e.kind === "static")
1630
- return { ...t.mapStaticDef(e.def, "CUSTOM_LAYOUT"), children: s };
1631
- const a = e.fn;
1632
- return ((i) => {
1633
- const n = a(i);
1634
- return { ...t.mapStaticDef(n, "CUSTOM_LAYOUT"), children: s };
1635
- });
1636
- }
1637
- function pe(e) {
1638
- return e.children;
1528
+ function ia(e, t, s) {
1529
+ if (typeof t == "function") {
1530
+ const n = t;
1531
+ return { type: "ITEMS", itemType: "TAGS", items: [{ key: e, def: (o) => ({ type: "tags", ...n(o) }) }], tags: s ?? [] };
1532
+ }
1533
+ const a = { type: "tags", ...t };
1534
+ return { type: "ITEMS", itemType: "TAGS", items: [{ key: e, def: a }], tags: s ?? [] };
1639
1535
  }
1640
- const { gsl: Us, gslByUid: Ms } = r({
1641
- itemType: "CUSTOM_LAYOUT",
1642
- kind: "layout",
1643
- entryShape: "compound",
1644
- mapToWidget: ue,
1645
- buildCustomWidget: re,
1646
- getChildren: pe
1647
- }), { gsl: Ls, gslByUid: vs } = r({
1648
- itemType: "TAGS",
1649
- kind: "input",
1650
- entryShape: "keyed",
1651
- sensibleDefaults: {
1652
- base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
1653
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
1654
- apply: (e, t) => T(d(e, t), t)
1536
+ const na = (e) => b(e, (t) => t.type === "text"), la = (e) => b(e, (t) => t.type === "number"), oa = (e) => b(e, (t) => t.type === "boolean"), ua = Ae({
1537
+ // Inputs
1538
+ inputs: b,
1539
+ inputByUid: Me,
1540
+ textInputs: na,
1541
+ numberInputs: la,
1542
+ booleanInputs: oa,
1543
+ selects: dt,
1544
+ selectByUid: ct,
1545
+ dropdowns: Mt,
1546
+ dropdownByUid: Bt,
1547
+ radiogroups: yt,
1548
+ radiogroupByUid: mt,
1549
+ checkboxes: Je,
1550
+ checkboxByUid: Qe,
1551
+ textareas: He,
1552
+ textareaByUid: Ve,
1553
+ passwords: je,
1554
+ passwordByUid: qe,
1555
+ currencies: ot,
1556
+ currencyByUid: ut,
1557
+ markdowns: $t,
1558
+ markdownByUid: Ft,
1559
+ lists: kt,
1560
+ listByUid: St,
1561
+ calendars: Ye,
1562
+ calendarByUid: $e,
1563
+ dateTimeCalendars: Fe,
1564
+ dateTimeCalendarByUid: ze,
1565
+ dateInputs: Ze,
1566
+ dateInputByUid: et,
1567
+ timeInputs: tt,
1568
+ timeInputByUid: st,
1569
+ timePickers: at,
1570
+ timePickerByUid: it,
1571
+ dateTimeInputs: nt,
1572
+ dateTimeInputByUid: lt,
1573
+ datePickers: Dt,
1574
+ datePickerByUid: Pt,
1575
+ dateTimePickers: Oe,
1576
+ dateTimePickerByUid: Xe,
1577
+ rangeCalendars: rt,
1578
+ rangeCalendarByUid: pt,
1579
+ rangeDateInputs: zt,
1580
+ rangeDateInputByUid: Ot,
1581
+ rangeTimeInputs: Xt,
1582
+ rangeTimeInputByUid: Ht,
1583
+ rangeDateTimeInputs: Vt,
1584
+ rangeDateTimeInputByUid: jt,
1585
+ rangeDateTimeCalendars: qt,
1586
+ rangeDateTimeCalendarByUid: Jt,
1587
+ rangeDateTimePickers: Qt,
1588
+ rangeDateTimePickerByUid: Zt,
1589
+ rangeDatePickers: es,
1590
+ rangeDatePickerByUid: ts,
1591
+ rangeTimePickers: ss,
1592
+ rangeTimePickerByUid: as,
1593
+ repeaters: X,
1594
+ repeaterByUid: me,
1595
+ // Actions, displays, layouts
1596
+ actions: Re,
1597
+ actionByUid: Le,
1598
+ layouts: Ne,
1599
+ layoutByUid: We,
1600
+ displays: Ge,
1601
+ displayByUid: Ke,
1602
+ alerts: At,
1603
+ alertByUid: Et,
1604
+ markdownTexts: ht,
1605
+ markdownTextByUid: Ut,
1606
+ tabs: It,
1607
+ tabsByUid: _t,
1608
+ accordions: ft,
1609
+ accordionByUid: Ct,
1610
+ // Custom kinds
1611
+ customInputs: ls,
1612
+ customInputByUid: os,
1613
+ customActions: us,
1614
+ customActionByUid: rs,
1615
+ customDisplays: is,
1616
+ customDisplayByUid: ns,
1617
+ customLayouts: ys,
1618
+ customLayoutByUid: ms
1619
+ }), ra = {
1620
+ bareItemToWidget: (e) => Te(e),
1621
+ rootEntry: (e) => {
1622
+ const t = {
1623
+ def: { uid: "#root", direction: "column", widgetName: "flex" },
1624
+ children: e
1625
+ };
1626
+ return { type: "ITEMS", itemType: y.LAYOUTS, items: [t], tags: [] };
1627
+ }
1628
+ }, pa = {
1629
+ inputs: {
1630
+ textInput: gs,
1631
+ numberInput: bs,
1632
+ booleanInput: Is,
1633
+ select: _s,
1634
+ dropdown: ks,
1635
+ radiogroup: Ss,
1636
+ checkbox: As,
1637
+ textarea: Es,
1638
+ password: hs,
1639
+ currency: Us,
1640
+ markdown: Ds,
1641
+ list: Ps,
1642
+ calendar: Ms,
1643
+ dateTimeCalendar: Bs,
1644
+ dateInput: Rs,
1645
+ datePicker: Ls,
1646
+ dateTimePicker: vs,
1647
+ timeInput: Ys,
1648
+ timePicker: $s,
1649
+ dateTimeInput: Fs,
1650
+ rangeCalendar: fs,
1651
+ rangeDateInput: Cs,
1652
+ rangeDateTimeInput: Ns,
1653
+ rangeDateTimeCalendar: Ws,
1654
+ rangeDateTimePicker: ws,
1655
+ rangeTimeInput: xs,
1656
+ rangeDatePicker: Gs,
1657
+ rangeTimePicker: Ks,
1658
+ repeater: aa,
1659
+ tags: ia,
1660
+ custom: zs
1655
1661
  },
1656
- mapToWidget: (e) => ({
1657
- uid: e.uid ?? "",
1658
- kind: "input",
1659
- type: "tags",
1660
- path: e.path ?? "",
1661
- ...e.label != null ? { label: e.label } : {},
1662
- ...e.disabled != null ? { disabled: e.disabled } : {},
1663
- ...e.readonly != null ? { readonly: e.readonly } : {},
1664
- ...e.validator != null ? { validator: y(e.validator, "array") } : {},
1665
- props: p(e)
1666
- })
1667
- });
1662
+ actions: {
1663
+ button: Os,
1664
+ custom: Xs
1665
+ },
1666
+ displays: {
1667
+ display: Te,
1668
+ alert: Hs,
1669
+ markdownText: Vs,
1670
+ custom: js
1671
+ },
1672
+ layouts: {
1673
+ flex: le,
1674
+ horizontalFlex: qs,
1675
+ verticalFlex: Js,
1676
+ grid: oe,
1677
+ horizontalGrid: Qs,
1678
+ verticalGrid: Zs,
1679
+ tabs: ea,
1680
+ accordion: ta,
1681
+ custom: sa
1682
+ }
1683
+ }, ue = Ee({
1684
+ name: "gui",
1685
+ registry: ne,
1686
+ facade: pa,
1687
+ selectors: ua,
1688
+ adapter: ra
1689
+ }), ga = ue.namespace, ba = ue.formDefs, Ia = ue.resolveFormInput;
1668
1690
  export {
1669
- ns as $,
1670
- Nt as A,
1671
- Ct as B,
1672
- qt as C,
1673
- Jt as D,
1674
- Qt as E,
1675
- es as F,
1676
- ts as G,
1677
- ss as H,
1678
- Bt as I,
1679
- Wt as J,
1680
- wt as K,
1681
- xt as L,
1682
- Gt as M,
1683
- Kt as N,
1684
- Yt as O,
1685
- $t as P,
1686
- jt as Q,
1687
- Zt as R,
1688
- Ot as S,
1689
- Ft as T,
1690
- zt as U,
1691
- Ht as V,
1692
- Vt as W,
1693
- Xt as X,
1694
- as as Y,
1695
- is as Z,
1696
- h as _,
1697
- ot as a,
1698
- ke as a$,
1699
- ls as a0,
1700
- H as a1,
1701
- os as a2,
1702
- us as a3,
1703
- rs as a4,
1704
- ps as a5,
1705
- ds as a6,
1706
- ys as a7,
1707
- cs as a8,
1708
- ms as a9,
1709
- Ve as aA,
1710
- He as aB,
1711
- ze as aC,
1712
- Fe as aD,
1713
- Oe as aE,
1714
- it as aF,
1715
- at as aG,
1716
- Ge as aH,
1717
- xe as aI,
1718
- we as aJ,
1719
- We as aK,
1720
- Be as aL,
1721
- Ce as aM,
1722
- Ne as aN,
1723
- Re as aO,
1724
- $e as aP,
1725
- Ye as aQ,
1726
- Ke as aR,
1727
- ve as aS,
1728
- Le as aT,
1729
- Me as aU,
1730
- Ue as aV,
1731
- Pe as aW,
1732
- fe as aX,
1733
- De as aY,
1734
- Se as aZ,
1735
- he as a_,
1736
- Ts as aa,
1737
- gs as ab,
1738
- bs as ac,
1739
- _s as ad,
1740
- Es as ae,
1741
- Is as af,
1742
- As as ag,
1743
- ks as ah,
1744
- hs as ai,
1745
- Ss as aj,
1746
- Ds as ak,
1747
- fs as al,
1748
- Ps as am,
1749
- Us as an,
1750
- Ms as ao,
1751
- st as ap,
1752
- tt as aq,
1753
- et as ar,
1754
- Qe as as,
1755
- Je as at,
1756
- M as au,
1757
- qe as av,
1758
- Ze as aw,
1759
- U as ax,
1760
- je as ay,
1761
- Xe as az,
1762
- ut as b,
1763
- Ae as b0,
1764
- Ie as b1,
1765
- Ee as b2,
1766
- _e as b3,
1767
- be as b4,
1768
- ge as b5,
1769
- Te as b6,
1770
- lt as b7,
1771
- nt as b8,
1772
- X as b9,
1773
- f as ba,
1774
- m as bb,
1775
- R as bc,
1776
- Ls as bd,
1777
- vs as be,
1778
- P as bf,
1779
- r as bg,
1780
- p as bh,
1781
- d as bi,
1782
- T as bj,
1783
- rt as c,
1784
- pt as d,
1785
- dt as e,
1786
- yt as f,
1787
- ct as g,
1788
- mt as h,
1789
- Tt as i,
1790
- gt as j,
1791
- bt as k,
1792
- _t as l,
1793
- Et as m,
1794
- It as n,
1795
- At as o,
1796
- kt as p,
1797
- ht as q,
1798
- St as r,
1799
- Dt as s,
1800
- ft as t,
1801
- Pt as u,
1802
- Ut as v,
1803
- Mt as w,
1804
- Lt as x,
1805
- vt as y,
1806
- Rt as z
1691
+ Ot as $,
1692
+ Fe as A,
1693
+ lt as B,
1694
+ nt as C,
1695
+ Xe as D,
1696
+ Oe as E,
1697
+ Ke as F,
1698
+ Ge as G,
1699
+ Bt as H,
1700
+ Mt as I,
1701
+ Me as J,
1702
+ b as K,
1703
+ We as L,
1704
+ Ne as M,
1705
+ St as N,
1706
+ kt as O,
1707
+ Ft as P,
1708
+ Ut as Q,
1709
+ ht as R,
1710
+ $t as S,
1711
+ la as T,
1712
+ qe as U,
1713
+ je as V,
1714
+ mt as W,
1715
+ yt as X,
1716
+ pt as Y,
1717
+ rt as Z,
1718
+ Ct as _,
1719
+ ft as a,
1720
+ Ks as a$,
1721
+ zt as a0,
1722
+ ts as a1,
1723
+ es as a2,
1724
+ Jt as a3,
1725
+ qt as a4,
1726
+ jt as a5,
1727
+ Vt as a6,
1728
+ Zt as a7,
1729
+ Qt as a8,
1730
+ Ht as a9,
1731
+ js as aA,
1732
+ zs as aB,
1733
+ sa as aC,
1734
+ Rs as aD,
1735
+ Ls as aE,
1736
+ Bs as aF,
1737
+ Fs as aG,
1738
+ vs as aH,
1739
+ Te as aI,
1740
+ ks as aJ,
1741
+ le as aK,
1742
+ oe as aL,
1743
+ qs as aM,
1744
+ Qs as aN,
1745
+ Ps as aO,
1746
+ Ds as aP,
1747
+ Vs as aQ,
1748
+ bs as aR,
1749
+ hs as aS,
1750
+ Ss as aT,
1751
+ fs as aU,
1752
+ Cs as aV,
1753
+ Gs as aW,
1754
+ Ws as aX,
1755
+ Ns as aY,
1756
+ ws as aZ,
1757
+ xs as a_,
1758
+ Xt as aa,
1759
+ as as ab,
1760
+ ss as ac,
1761
+ me as ad,
1762
+ X as ae,
1763
+ ct as af,
1764
+ dt as ag,
1765
+ It as ah,
1766
+ _t as ai,
1767
+ ya as aj,
1768
+ ma as ak,
1769
+ na as al,
1770
+ Ve as am,
1771
+ He as an,
1772
+ st as ao,
1773
+ tt as ap,
1774
+ it as aq,
1775
+ at as ar,
1776
+ ta as as,
1777
+ Hs as at,
1778
+ Is as au,
1779
+ Os as av,
1780
+ Ms as aw,
1781
+ As as ax,
1782
+ Us as ay,
1783
+ Xs as az,
1784
+ Le as b,
1785
+ aa as b0,
1786
+ _s as b1,
1787
+ ea as b2,
1788
+ ia as b3,
1789
+ gs as b4,
1790
+ Es as b5,
1791
+ Ys as b6,
1792
+ $s as b7,
1793
+ Js as b8,
1794
+ Zs as b9,
1795
+ Ta as ba,
1796
+ ba as bb,
1797
+ Ia as bc,
1798
+ Re as c,
1799
+ Et as d,
1800
+ At as e,
1801
+ oa as f,
1802
+ ga as g,
1803
+ $e as h,
1804
+ Ye as i,
1805
+ Qe as j,
1806
+ Je as k,
1807
+ ot as l,
1808
+ ut as m,
1809
+ rs as n,
1810
+ us as o,
1811
+ ns as p,
1812
+ is as q,
1813
+ os as r,
1814
+ ls as s,
1815
+ ms as t,
1816
+ ys as u,
1817
+ et as v,
1818
+ Ze as w,
1819
+ Pt as x,
1820
+ Dt as y,
1821
+ ze as z
1807
1822
  };