@golemui/gui-shared 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/index.js +1 -1
- package/index.umd.cjs +1 -1
- package/internals.d.ts +6 -5
- package/internals.js +171 -143
- package/internals.umd.cjs +1 -1
- package/lib/dx/gui.d.ts +14 -0
- package/lib/dx/index.d.ts +6 -0
- package/lib/dx/shortcuts/multi-dropdown/guiMultiDropdown.impl.d.ts +7 -0
- package/lib/dx/shortcuts/multi-dropdown/multi-dropdown.domain.d.ts +17 -0
- package/lib/dx/shortcuts/multi-dropdown/register.d.ts +4 -0
- package/lib/dx/shortcuts/multi-list/guiMultiList.impl.d.ts +7 -0
- package/lib/dx/shortcuts/multi-list/multi-list.domain.d.ts +16 -0
- package/lib/dx/shortcuts/multi-list/register.d.ts +4 -0
- package/lib/golem-form.d.ts +8 -2
- package/lib/utils/layout-ids.d.ts +44 -0
- package/lib/utils/repeater.d.ts +19 -0
- package/lib/widget.props.d.ts +38 -7
- package/lib/widgets.d.ts +2 -2
- package/package.json +4 -4
- package/resolveFormInput-BL_FxIPF.cjs +1 -0
- package/{resolveFormInput-CsFeoGjz.js → resolveFormInput-D2kg0VqQ.js} +507 -431
- package/resolveFormInput-UcmQ-kme.cjs +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Validator } from '@golemui/gui-validators';
|
|
2
|
+
import { ListItem, MultiListProps, OptionValue } from '../../../widget.props';
|
|
3
|
+
import { DxCommonFields, DxInputBase, DefOrCallback, GslConfigBase, GuiShortcutOf } from '@golemui/dx';
|
|
4
|
+
export interface MultiListDecorator extends DxInputBase, DxCommonFields, Partial<Omit<MultiListProps<any>, 'items'>> {
|
|
5
|
+
type: 'multiList';
|
|
6
|
+
items?: ListItem<any>[] | OptionValue[] | Record<string, unknown>[];
|
|
7
|
+
validator?: Validator;
|
|
8
|
+
}
|
|
9
|
+
export interface GslMultiListConfig extends GslConfigBase<MultiListDecorator> {
|
|
10
|
+
suppressAutomaticLabels?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type MultiListEntry = {
|
|
13
|
+
key: string;
|
|
14
|
+
def: DefOrCallback<MultiListDecorator>;
|
|
15
|
+
};
|
|
16
|
+
export type GuiMultiListShortcut = GuiShortcutOf<'MULTI_LIST', MultiListEntry>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { GslMultiListConfig, MultiListDecorator, MultiListEntry } from './multi-list.domain';
|
|
2
|
+
export declare const multiListShortcutType: import('@golemui/dx').ShortcutTypeDefinition<MultiListEntry, MultiListDecorator, GslMultiListConfig>;
|
|
3
|
+
export declare const _gslMultiLists: (config: GslMultiListConfig, matcher?: ((decorator: MultiListDecorator) => boolean) | undefined) => import('@golemui/dx').GslLeafSelector;
|
|
4
|
+
export declare const _gslMultiListByUid: (uid: string, config: GslMultiListConfig) => import('@golemui/dx').GslLeafSelector;
|
package/lib/golem-form.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActionWidget, DisplayWidget, Form, FormWidget, FunctionWidgetParams, InputWidget, LayoutWidget, ReactiveExpression } from '@golemui/core';
|
|
2
2
|
import { Validator } from '@golemui/gui-validators';
|
|
3
|
-
import { AccordionProps, AlertProps, ButtonProps, CalendarProps, CheckboxProps, CurrencyProps, DatePickerProps, DateTimeCalendarProps, DateTimePickerProps, DateRange, DateinputProps, DropdownProps, FlexProps, GridProps, ListProps, MarkdownProps, MarkdownTextProps, NumberinputProps, OptionValue, PasswordProps, RadiogroupProps, RangeCalendarProps, RangeDateInputProps, RangeDatePickerProps, RangeDateTimeInputProps, RangeDateTimeCalendarProps, RangeDateTimePickerProps, RangeTimeInputProps, RangeTimePickerProps, DateTimeRange, TimeRange, RepeaterProps, SelectProps, TabsProps, DateTimeInputProps, TextareaProps, TextinputProps, TimeInputProps, TimePickerProps, ToggleProps } from './widget.props';
|
|
3
|
+
import { AccordionProps, AlertProps, ButtonProps, CalendarProps, CheckboxProps, CurrencyProps, DatePickerProps, DateTimeCalendarProps, DateTimePickerProps, DateRange, DateinputProps, DropdownProps, MultiDropdownProps, MultiListProps, FlexProps, GridProps, ListProps, MarkdownProps, MarkdownTextProps, NumberinputProps, OptionValue, PasswordProps, RadiogroupProps, RangeCalendarProps, RangeDateInputProps, RangeDatePickerProps, RangeDateTimeInputProps, RangeDateTimeCalendarProps, RangeDateTimePickerProps, RangeTimeInputProps, RangeTimePickerProps, DateTimeRange, TimeRange, RepeaterProps, SelectProps, TabsProps, DateTimeInputProps, TextareaProps, TextinputProps, TimeInputProps, TimePickerProps, ToggleProps } from './widget.props';
|
|
4
4
|
type ExtractStates<S> = S extends Record<string, ReactiveExpression> ? keyof S : never;
|
|
5
5
|
/**
|
|
6
6
|
* Make the uid propery optional on all widgets
|
|
@@ -92,7 +92,7 @@ declare class GolemFormBuilder<FormType extends Record<string, any>, CustomWidge
|
|
|
92
92
|
* ```
|
|
93
93
|
*/
|
|
94
94
|
export declare function golemForm<FormType extends Record<string, any>, CustomWidget extends FormWidget<any, FormType> = never>(): GolemFormBuilder<FormType, CustomWidget>;
|
|
95
|
-
type GolemWidget<FormType extends Record<string, any>, States extends string, V, CustomWidget extends FormWidget<any, FormType> = never> = GuiAccordion<FormType, States, V, CustomWidget> | GuiAlert<FormType, States> | GuiButton<FormType, States> | GuiCalendar<FormType, States, V> | GuiCheckbox<FormType, States, V> | GuiDateTimeCalendar<FormType, States, V> | GuiCurrency<FormType, States, V> | GuiDateinput<FormType, States, V> | GuiDatePicker<FormType, States, V> | GuiDateTimeInput<FormType, States, V> | GuiDateTimePicker<FormType, States, V> | GuiDropdown<FormType, States, V> | GuiFunctionWidget<FormType, States, V, CustomWidget> | GuiList<FormType, States, V> | GuiMarkdown<FormType, States, V> | GuiMarkdownText<FormType, States> | GuiNumberinput<FormType, States, V> | GuiPassword<FormType, States, V> | GuiRadiogroup<FormType, States, V> | GuiRangeCalendar<FormType, States, V> | GuiRangeDateInput<FormType, States, V> | GuiRangeDatePicker<FormType, States, V> | GuiRangeDateTimeInput<FormType, States, V> | GuiRangeDateTimeCalendar<FormType, States, V> | GuiRangeDateTimePicker<FormType, States, V> | GuiRangeTimeInput<FormType, States, V> | GuiRangeTimePicker<FormType, States, V> | GuiRepeater<FormType, States, V, CustomWidget> | GuiSelect<FormType, States, V> | GuiFlex<FormType, States, V, CustomWidget> | GuiGrid<FormType, States, V, CustomWidget> | GuiTabs<FormType, States, V, CustomWidget> | GuiTextarea<FormType, States, V> | GuiTextInput<FormType, States, V> | GuiTimeInput<FormType, States, V> | GuiTimePicker<FormType, States, V> | GuiToggle<FormType, States, V> | CustomWidget;
|
|
95
|
+
type GolemWidget<FormType extends Record<string, any>, States extends string, V, CustomWidget extends FormWidget<any, FormType> = never> = GuiAccordion<FormType, States, V, CustomWidget> | GuiAlert<FormType, States> | GuiButton<FormType, States> | GuiCalendar<FormType, States, V> | GuiCheckbox<FormType, States, V> | GuiDateTimeCalendar<FormType, States, V> | GuiCurrency<FormType, States, V> | GuiDateinput<FormType, States, V> | GuiDatePicker<FormType, States, V> | GuiDateTimeInput<FormType, States, V> | GuiDateTimePicker<FormType, States, V> | GuiDropdown<FormType, States, V> | GuiFunctionWidget<FormType, States, V, CustomWidget> | GuiList<FormType, States, V> | GuiMarkdown<FormType, States, V> | GuiMarkdownText<FormType, States> | GuiMultiDropdown<FormType, States, V> | GuiMultiList<FormType, States, V> | GuiNumberinput<FormType, States, V> | GuiPassword<FormType, States, V> | GuiRadiogroup<FormType, States, V> | GuiRangeCalendar<FormType, States, V> | GuiRangeDateInput<FormType, States, V> | GuiRangeDatePicker<FormType, States, V> | GuiRangeDateTimeInput<FormType, States, V> | GuiRangeDateTimeCalendar<FormType, States, V> | GuiRangeDateTimePicker<FormType, States, V> | GuiRangeTimeInput<FormType, States, V> | GuiRangeTimePicker<FormType, States, V> | GuiRepeater<FormType, States, V, CustomWidget> | GuiSelect<FormType, States, V> | GuiFlex<FormType, States, V, CustomWidget> | GuiGrid<FormType, States, V, CustomWidget> | GuiTabs<FormType, States, V, CustomWidget> | GuiTextarea<FormType, States, V> | GuiTextInput<FormType, States, V> | GuiTimeInput<FormType, States, V> | GuiTimePicker<FormType, States, V> | GuiToggle<FormType, States, V> | CustomWidget;
|
|
96
96
|
type GuiAccordion<FormType extends Record<string, any>, States extends string, V, CustomWidget extends FormWidget<any, FormType>> = LayoutWidget<States, FormType, AccordionProps, GolemWidget<FormType, States, V, CustomWidget>[]> & {
|
|
97
97
|
type: 'accordion';
|
|
98
98
|
};
|
|
@@ -136,6 +136,12 @@ type GuiMarkdown<FormType extends Record<string, any>, States extends string, V>
|
|
|
136
136
|
type GuiMarkdownText<FormType extends Record<string, any>, States extends string> = DisplayWidget<States, FormType, MarkdownTextProps> & {
|
|
137
137
|
type: 'markdownText';
|
|
138
138
|
};
|
|
139
|
+
type GuiMultiDropdown<FormType extends Record<string, any>, States extends string, V> = InputWidget<OptionValue[], States, FormType, MultiDropdownProps<unknown>, V> & {
|
|
140
|
+
type: 'multiDropdown';
|
|
141
|
+
};
|
|
142
|
+
type GuiMultiList<FormType extends Record<string, any>, States extends string, V> = InputWidget<OptionValue[], States, FormType, MultiListProps<unknown>, V> & {
|
|
143
|
+
type: 'multiList';
|
|
144
|
+
};
|
|
139
145
|
type GuiNumberinput<FormType extends Record<string, any>, States extends string, V> = InputWidget<number, States, FormType, NumberinputProps, V> & {
|
|
140
146
|
type: 'number';
|
|
141
147
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal Used by framework layout components, not part of the end-user public API.
|
|
3
|
+
*
|
|
4
|
+
* DOM ids for the tabs and accordion layouts. They are built from the layout widget's own uid
|
|
5
|
+
* plus the tab or section uid, never from a position, so two repeater rows of the same layout
|
|
6
|
+
* produce different ids: the layout uid already carries the row index suffix.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The id of a tab button, also its `data-cy`.
|
|
10
|
+
*
|
|
11
|
+
* @param layoutUid - The tabs layout widget's uid, row index suffix included.
|
|
12
|
+
* @param tabUid - The tab uid from the layout props.
|
|
13
|
+
* @example
|
|
14
|
+
* tabButtonId('rowTabs[1]', 'secondPanel'); // 'tab_rowTabs[1]_secondPanel'
|
|
15
|
+
*/
|
|
16
|
+
export declare function tabButtonId(layoutUid: string, tabUid: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* The id of a tab panel, also its `data-cy`. The tab button's `aria-controls` and the panel's
|
|
19
|
+
* `aria-labelledby` are the other side of the same pair.
|
|
20
|
+
*
|
|
21
|
+
* @param layoutUid - The tabs layout widget's uid, row index suffix included.
|
|
22
|
+
* @param tabUid - The tab uid from the layout props.
|
|
23
|
+
* @example
|
|
24
|
+
* tabPanelId('rowTabs[1]', 'secondPanel'); // 'tabpanel_rowTabs[1]_secondPanel'
|
|
25
|
+
*/
|
|
26
|
+
export declare function tabPanelId(layoutUid: string, tabUid: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* The id of an accordion header button.
|
|
29
|
+
*
|
|
30
|
+
* @param layoutUid - The accordion layout widget's uid, row index suffix included.
|
|
31
|
+
* @param sectionUid - The section uid from the layout props.
|
|
32
|
+
* @example
|
|
33
|
+
* accordionButtonId('rowAccordion[1]', 'secondSection'); // 'accordion_button_rowAccordion[1]_secondSection'
|
|
34
|
+
*/
|
|
35
|
+
export declare function accordionButtonId(layoutUid: string, sectionUid: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* The id of an accordion section region.
|
|
38
|
+
*
|
|
39
|
+
* @param layoutUid - The accordion layout widget's uid, row index suffix included.
|
|
40
|
+
* @param sectionUid - The section uid from the layout props.
|
|
41
|
+
* @example
|
|
42
|
+
* accordionSectionId('rowAccordion[1]', 'secondSection'); // 'accordion_section_rowAccordion[1]_secondSection'
|
|
43
|
+
*/
|
|
44
|
+
export declare function accordionSectionId(layoutUid: string, sectionUid: string): string;
|
package/lib/utils/repeater.d.ts
CHANGED
|
@@ -9,3 +9,22 @@
|
|
|
9
9
|
* @param idIncrementer function that increments the lexically-scoped id.
|
|
10
10
|
*/
|
|
11
11
|
export declare function getItemKey(item: Record<string, unknown>, idIncrementer: () => number): number;
|
|
12
|
+
/**
|
|
13
|
+
* @internal Used by framework layout components, not part of the end-user public API.
|
|
14
|
+
*
|
|
15
|
+
* Returns the repeater row indexes a widget uid carries, as the string to append to a template
|
|
16
|
+
* uid to address the same widget inside that row. Empty when the widget is not inside a repeater.
|
|
17
|
+
*
|
|
18
|
+
* Layout components need it because their children arrive from the store with the row indexes
|
|
19
|
+
* already applied, while the uids in their own props (a tab's `uid`, an accordion section's
|
|
20
|
+
* `uid`) come from the form definition and carry none.
|
|
21
|
+
*
|
|
22
|
+
* Only the trailing run of `[n]` groups counts, an index elsewhere in the uid is part of the name.
|
|
23
|
+
*
|
|
24
|
+
* @param uid - The layout widget's own uid.
|
|
25
|
+
* @returns The index suffix, for example `[0]` or `[2][1]`, or an empty string.
|
|
26
|
+
* @example
|
|
27
|
+
* repeaterIndexSuffix('tabs[0]'); // '[0]'
|
|
28
|
+
* repeaterIndexSuffix('tabs'); // ''
|
|
29
|
+
*/
|
|
30
|
+
export declare function repeaterIndexSuffix(uid: string): string;
|
package/lib/widget.props.d.ts
CHANGED
|
@@ -42,7 +42,6 @@ export type TagsProps = {
|
|
|
42
42
|
separators?: TagsSeparator[];
|
|
43
43
|
allowDuplicates?: boolean;
|
|
44
44
|
trim?: boolean;
|
|
45
|
-
limit?: number;
|
|
46
45
|
removeAriaLabel?: string;
|
|
47
46
|
removeIcon?: string;
|
|
48
47
|
};
|
|
@@ -204,6 +203,32 @@ export type CalendarProps = {
|
|
|
204
203
|
export type IncompleteMessageProps = {
|
|
205
204
|
incompleteMessage?: Localizable;
|
|
206
205
|
};
|
|
206
|
+
/**
|
|
207
|
+
* The opt-in select → edit → confirm flow on the range widgets' pills:
|
|
208
|
+
* clicking a pill selects it and reveals in-pill action icons; Edit (icon, or
|
|
209
|
+
* F2/E on the focused pill) loads it back into the compose surface, and
|
|
210
|
+
* Confirm commits the replacement (Escape cancels) while the pill's label
|
|
211
|
+
* live-previews the working value. `{label}` tokens are interpolated with the
|
|
212
|
+
* range's display label at interaction time.
|
|
213
|
+
*/
|
|
214
|
+
export type RangeEditProps = {
|
|
215
|
+
/** Enables selecting and editing pills in place. Defaults to false. */
|
|
216
|
+
allowEdit?: boolean;
|
|
217
|
+
/** Tooltip label of the pill's Edit icon. Defaults to 'Edit'. */
|
|
218
|
+
editLabel?: Localizable;
|
|
219
|
+
/** Edit hint joined into the pill's aria-description; `{label}` carries the range. Defaults to 'Edit range {label}'. */
|
|
220
|
+
editAriaLabel?: Localizable;
|
|
221
|
+
/** Tooltip label of the pill's Confirm icon. Defaults to 'Confirm'. */
|
|
222
|
+
confirmEditLabel?: Localizable;
|
|
223
|
+
/** Tooltip label of the pill's Cancel icon. Defaults to 'Cancel'. */
|
|
224
|
+
cancelEditLabel?: Localizable;
|
|
225
|
+
/** aria-live announcement when an edit starts. Defaults to 'Editing range {label}.'. */
|
|
226
|
+
editStartedMessage?: Localizable;
|
|
227
|
+
/** aria-live announcement when an edit commits. Defaults to 'Range updated to {label}.'. */
|
|
228
|
+
editCommittedMessage?: Localizable;
|
|
229
|
+
/** aria-live announcement when an edit is cancelled. Defaults to 'Edit cancelled.'. */
|
|
230
|
+
editCancelledMessage?: Localizable;
|
|
231
|
+
};
|
|
207
232
|
/**
|
|
208
233
|
* Calendar with an embedded time picker. The value is a local ISO date-time
|
|
209
234
|
* (YYYY-MM-DDTHH:mm:ss), emitted only when both the day and the time are
|
|
@@ -229,7 +254,7 @@ export type DateTimeCalendarProps = CalendarProps & IncompleteMessageProps & {
|
|
|
229
254
|
/** Shown in the time grid when the bounds yield no slots. Defaults to 'No available times'. */
|
|
230
255
|
noAvailableTimesMessage?: Localizable;
|
|
231
256
|
};
|
|
232
|
-
export type RangeCalendarProps = {
|
|
257
|
+
export type RangeCalendarProps = RangeEditProps & {
|
|
233
258
|
/**
|
|
234
259
|
* An optional descriptive text providing guidance or information about the associated widget or functionality.
|
|
235
260
|
*/
|
|
@@ -409,7 +434,7 @@ export type TimePickerProps = TimeInputProps & PickerToggleProps & {
|
|
|
409
434
|
disabledRangeMessage?: Localizable;
|
|
410
435
|
noAvailableTimesMessage?: Localizable;
|
|
411
436
|
};
|
|
412
|
-
export type RangeDateInputProps = IncompleteMessageProps & {
|
|
437
|
+
export type RangeDateInputProps = IncompleteMessageProps & RangeEditProps & {
|
|
413
438
|
hint?: string;
|
|
414
439
|
icon?: string;
|
|
415
440
|
separator?: string;
|
|
@@ -426,7 +451,7 @@ export type DateBoundsMessageProps = {
|
|
|
426
451
|
maxDateMessage?: Localizable;
|
|
427
452
|
disabledDateRangeMessage?: Localizable;
|
|
428
453
|
};
|
|
429
|
-
/** The popup toggle button shared by the six pickers. */
|
|
454
|
+
/** The popup toggle button shared by the six pickers and the two dropdowns. */
|
|
430
455
|
export type PickerToggleProps = {
|
|
431
456
|
toggleAriaLabel?: string;
|
|
432
457
|
};
|
|
@@ -466,7 +491,7 @@ export type RangeDateTimeCalendarProps = Omit<RangeCalendarProps, 'minDate' | 'm
|
|
|
466
491
|
*/
|
|
467
492
|
disabledDayCountAriaLabel?: Localizable;
|
|
468
493
|
};
|
|
469
|
-
export type RangeTimeInputProps = IncompleteMessageProps & {
|
|
494
|
+
export type RangeTimeInputProps = IncompleteMessageProps & RangeEditProps & {
|
|
470
495
|
hint?: string;
|
|
471
496
|
icon?: string;
|
|
472
497
|
separator?: string;
|
|
@@ -487,7 +512,7 @@ export type RangeTimeInputProps = IncompleteMessageProps & {
|
|
|
487
512
|
/** Shown when the entered "time out" is not strictly after "time in". */
|
|
488
513
|
rangeOrderMessage?: Localizable;
|
|
489
514
|
};
|
|
490
|
-
export type RangeDateTimeInputProps = IncompleteMessageProps & {
|
|
515
|
+
export type RangeDateTimeInputProps = IncompleteMessageProps & RangeEditProps & {
|
|
491
516
|
hint?: string;
|
|
492
517
|
icon?: string;
|
|
493
518
|
separator?: string;
|
|
@@ -606,9 +631,10 @@ export type ListItem<T> = {
|
|
|
606
631
|
disabled?: boolean;
|
|
607
632
|
};
|
|
608
633
|
type ItemKeys<T> = T extends Record<string, any> ? keyof T : string;
|
|
609
|
-
export type DropdownProps<T> = {
|
|
634
|
+
export type DropdownProps<T> = PickerToggleProps & {
|
|
610
635
|
placeholder?: string;
|
|
611
636
|
hint?: string;
|
|
637
|
+
icon?: string;
|
|
612
638
|
autocomplete?: Autocomplete;
|
|
613
639
|
items: ListItem<T>[];
|
|
614
640
|
/**
|
|
@@ -640,6 +666,11 @@ export type ListProps<T> = {
|
|
|
640
666
|
*/
|
|
641
667
|
itemRenderer?: string;
|
|
642
668
|
};
|
|
669
|
+
export type MultiDropdownProps<T> = DropdownProps<T> & {
|
|
670
|
+
removeAriaLabel?: string;
|
|
671
|
+
removeIcon?: string;
|
|
672
|
+
};
|
|
673
|
+
export type MultiListProps<T> = ListProps<T>;
|
|
643
674
|
export type RadiogroupProps = {
|
|
644
675
|
hint?: string;
|
|
645
676
|
options: Option[];
|
package/lib/widgets.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const inputWidgets: readonly ["calendar", "dateTimeCalendar", "checkbox", "currency", "dateInput", "datePicker", "dateTimeInput", "dateTimePicker", "dropdown", "list", "markdown", "number", "password", "radiogroup", "rangeCalendar", "rangeDateInput", "rangeDatePicker", "rangeDateTimeInput", "rangeDateTimeCalendar", "rangeDateTimePicker", "rangeTimeInput", "rangeTimePicker", "repeater", "select", "tags", "textarea", "textinput", "timeInput", "timePicker", "toggle"];
|
|
1
|
+
export declare const inputWidgets: readonly ["calendar", "dateTimeCalendar", "checkbox", "currency", "dateInput", "datePicker", "dateTimeInput", "dateTimePicker", "dropdown", "list", "markdown", "multiDropdown", "multiList", "number", "password", "radiogroup", "rangeCalendar", "rangeDateInput", "rangeDatePicker", "rangeDateTimeInput", "rangeDateTimeCalendar", "rangeDateTimePicker", "rangeTimeInput", "rangeTimePicker", "repeater", "select", "tags", "textarea", "textinput", "timeInput", "timePicker", "toggle"];
|
|
2
2
|
export declare const layoutWidgets: readonly ["accordion", "flex", "grid", "tabs"];
|
|
3
3
|
export declare const displayWidgets: readonly ["alert", "markdownText", "renderer"];
|
|
4
4
|
export declare const actionWidgets: readonly ["button"];
|
|
5
|
-
export declare const golemWidgets: ("number" | "button" | "repeater" | "flex" | "tags" | "toggle" | "textinput" | "renderer" | "calendar" | "dateTimeCalendar" | "dateTimePicker" | "textarea" | "password" | "checkbox" | "dateInput" | "timeInput" | "timePicker" | "dateTimeInput" | "currency" | "rangeCalendar" | "select" | "radiogroup" | "tabs" | "list" | "alert" | "markdownText" | "datePicker" | "dropdown" | "accordion" | "markdown" | "rangeDateInput" | "rangeTimeInput" | "rangeDateTimeInput" | "rangeDateTimeCalendar" | "rangeDateTimePicker" | "rangeDatePicker" | "rangeTimePicker" | "grid")[];
|
|
5
|
+
export declare const golemWidgets: ("number" | "button" | "repeater" | "flex" | "tags" | "toggle" | "textinput" | "renderer" | "calendar" | "dateTimeCalendar" | "dateTimePicker" | "textarea" | "password" | "checkbox" | "dateInput" | "timeInput" | "timePicker" | "dateTimeInput" | "currency" | "rangeCalendar" | "select" | "radiogroup" | "tabs" | "list" | "alert" | "markdownText" | "datePicker" | "dropdown" | "multiDropdown" | "multiList" | "accordion" | "markdown" | "rangeDateInput" | "rangeTimeInput" | "rangeDateTimeInput" | "rangeDateTimeCalendar" | "rangeDateTimePicker" | "rangeDatePicker" | "rangeTimePicker" | "grid")[];
|
|
6
6
|
export type GolemInputWidget = (typeof inputWidgets)[number];
|
|
7
7
|
export type GolemLayoutWidget = (typeof layoutWidgets)[number];
|
|
8
8
|
export type GolemDisplayWidget = (typeof displayWidgets)[number];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemui/gui-shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"*.md"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@golemui/core": "1.
|
|
38
|
-
"@golemui/dx": "1.
|
|
39
|
-
"@golemui/gui-validators": "1.
|
|
37
|
+
"@golemui/core": "1.4.0",
|
|
38
|
+
"@golemui/dx": "1.4.0",
|
|
39
|
+
"@golemui/gui-validators": "1.4.0"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("@golemui/dx");require("@golemui/core");function Mi(e){switch(e.type){case"text":return vi(e);case"number":return Ci(e);case"boolean":return Ri(e);default:throw new Error(`Unsupported field type "${e.type}"`)}}function Ri(e){const t=i.extractWidgetProps(e);return{uid:e.uid??"",kind:"input",type:"toggle",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"boolean")}:{},props:t}}function vi(e){const t=i.extractWidgetProps(e);return{uid:e.uid??"",kind:"input",type:"textinput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},props:{placeholder:t.placeholder??"",...t},validator:i.buildTypedValidator(e.validator,"string")}}function Ci(e){const t=i.extractWidgetProps(e);return{uid:e.uid??"",kind:"input",type:"number",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},props:{placeholder:t.placeholder??"",...t},validator:i.buildTypedValidator(e.validator,"number")}}const _=i.createShortcutType({itemType:"INPUTS",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>{let s=i.processAutoLabel(e,t);return s=i.processAutoPlaceholder(s,t),s}},mapToWidget:Mi}),d=_.gsl,de=_.gslByUid;function fi(e){const{uid:t,label:s,actionType:a,disabled:n,on:l,onClick:o,data:u,type:r,tags:p,size:c,include:Bi,exclude:Li,states:re,...g}=e;return{uid:t??"",kind:"action",type:"button",disabled:n,actionType:a,label:s,...l!=null?{on:l}:{},props:g}}const I=i.createShortcutType({itemType:"ACTIONS",kind:"action",entryShape:"bare",mapToWidget:fi,afterMerge:(e,t)=>i.eventWiringService.extractOnClickFromMergeResult(e,t.eventRegistry,t.eventIdGenerator)}),ce=I.gsl,ye=I.gslByUid;function Wi(e){const{uid:t,widgetName:s,tags:a,size:n,onChange:l,include:o,exclude:u,...r}=e,{on:p,...c}=r;return{uid:t??"",kind:"layout",type:s??"flex",props:{direction:c.direction??"column",...c},children:[]}}function Ni(e,t){const s=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"LAYOUTS"),children:s};const a=e.fn;return(n=>{const l=a(n);return{...t.mapStaticDef(l,"LAYOUTS"),children:s}})}function xi(e){return e.children}const A=i.createShortcutType({itemType:"LAYOUTS",kind:"layout",entryShape:"compound",mapToWidget:Wi,buildCustomWidget:Ni,getChildren:xi}),me=A.gsl,Te=A.gslByUid;function wi(e){return{uid:"",kind:"display",type:"renderer",props:{render:e.render}}}function Gi(e,t){if(e.kind==="static"){const a=e.def;return(n=>({uid:"",kind:"display",type:"renderer",...a.include!=null?{include:a.include}:{},...a.exclude!=null?{exclude:a.exclude}:{},props:{render:a.render(i.withForm(n))}}))}const s=e.fn;return(a=>{const n=s(a);return{uid:"",kind:"display",type:"renderer",...n.include!=null?{include:n.include}:{},...n.exclude!=null?{exclude:n.exclude}:{},props:{render:n.render(i.withForm(a))}}})}const S=i.createShortcutType({itemType:"DISPLAYS",kind:"display",entryShape:"bare",mapToWidget:wi,buildCustomWidget:Gi}),ge=S.gsl,be=S.gslByUid,h=i.createShortcutType({itemType:"CALENDAR",kind:"input",entryShape:"bare",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"calendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"string")}:{},props:i.extractWidgetProps(e)})}),_e=h.gsl,Ie=h.gslByUid,k=i.createShortcutType({itemType:"DATE_TIME_CALENDAR",kind:"input",entryShape:"bare",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateTimeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"string")}:{},props:i.extractWidgetProps(e)})}),Ae=k.gsl,Se=k.gslByUid,E=i.createShortcutType({itemType:"DATE_TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>i.processAutoPlaceholder(i.processAutoLabel(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateTimePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"string")}:{},props:i.extractWidgetProps(e)})}),he=E.gsl,ke=E.gslByUid,P=i.createShortcutType({itemType:"TEXTAREA",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>i.processAutoPlaceholder(i.processAutoLabel(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"textarea",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"string")}:{},props:i.extractWidgetProps(e)})}),Ee=P.gsl,Pe=P.gslByUid,U=i.createShortcutType({itemType:"PASSWORD",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>i.processAutoPlaceholder(i.processAutoLabel(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"password",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"string")}:{},props:i.extractWidgetProps(e)})}),Ue=U.gsl,De=U.gslByUid,D=i.createShortcutType({itemType:"CHECKBOX",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"checkbox",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"boolean")}:{},props:i.extractWidgetProps(e)})}),Be=D.gsl,Le=D.gslByUid,B=i.createShortcutType({itemType:"DATE_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"string")}:{},props:i.extractWidgetProps(e)})}),Me=B.gsl,Re=B.gslByUid,L=i.createShortcutType({itemType:"TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"timeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"string")}:{},props:i.extractWidgetProps(e)})}),ve=L.gsl,Ce=L.gslByUid,M=i.createShortcutType({itemType:"TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>i.processAutoPlaceholder(i.processAutoLabel(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"timePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"string")}:{},props:i.extractWidgetProps(e)})}),fe=M.gsl,We=M.gslByUid,R=i.createShortcutType({itemType:"DATE_TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dateTimeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"string")}:{},props:i.extractWidgetProps(e)})}),Ne=R.gsl,xe=R.gslByUid,v=i.createShortcutType({itemType:"CURRENCY",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>i.processAutoPlaceholder(i.processAutoLabel(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"currency",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"number")}:{},props:i.extractWidgetProps(e)})}),we=v.gsl,Ge=v.gslByUid,C=i.createShortcutType({itemType:"RANGE_CALENDAR",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"array")}:{},props:i.extractWidgetProps(e)})}),Ve=C.gsl,Ke=C.gslByUid,f=i.createShortcutType({itemType:"SELECT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>i.processAutoPlaceholder(i.processAutoLabel(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"select",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:i.extractWidgetProps(e)})}),Ye=f.gsl,$e=f.gslByUid,W=i.createShortcutType({itemType:"RADIOGROUP",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"radiogroup",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:i.extractWidgetProps(e)})}),Fe=W.gsl,ze=W.gslByUid;function Vi(e){return{uid:e.uid??"",kind:"layout",type:"tabs",props:{tabs:e.tabs,renderMode:e.renderMode??"all",...e.defaultOpen!=null?{defaultOpen:e.defaultOpen}:{}},children:[]}}function Ki(e,t){const s=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"TABS"),children:s};const a=e.fn;return(n=>{const l=a(n);return{...t.mapStaticDef(l,"TABS"),children:s}})}function Yi(e){return e.children}const N=i.createShortcutType({itemType:"TABS",kind:"layout",entryShape:"compound",mapToWidget:Vi,buildCustomWidget:Ki,getChildren:Yi}),Oe=N.gsl,He=N.gslByUid,x=i.createShortcutType({itemType:"LIST",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"list",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:i.extractWidgetProps(e)})}),Xe=x.gsl,qe=x.gslByUid,w=i.createShortcutType({itemType:"TAGS",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>i.processAutoPlaceholder(i.processAutoLabel(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"tags",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"array")}:{},props:i.extractWidgetProps(e)})}),$i=w.gsl,Fi=w.gslByUid,G=i.createShortcutType({itemType:"ALERTS",kind:"display",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:"alert",props:{text:e.text,...e.level!=null?{level:e.level}:{}}})}),je=G.gsl,Je=G.gslByUid,V=i.createShortcutType({itemType:"MARKDOWN_TEXTS",kind:"display",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:"markdownText",props:{md:e.md}})}),Qe=V.gsl,Ze=V.gslByUid,K=i.createShortcutType({itemType:"DATE_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>i.processAutoPlaceholder(i.processAutoLabel(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"datePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"string")}:{},props:i.extractWidgetProps(e)})}),et=K.gsl,tt=K.gslByUid,Y=i.createShortcutType({itemType:"DROPDOWN",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>i.processAutoPlaceholder(i.processAutoLabel(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"dropdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:i.extractWidgetProps(e)})}),it=Y.gsl,st=Y.gslByUid,$=i.createShortcutType({itemType:"MULTI_DROPDOWN",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>i.processAutoPlaceholder(i.processAutoLabel(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"multiDropdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:i.extractWidgetProps(e)})}),at=$.gsl,nt=$.gslByUid,F=i.createShortcutType({itemType:"MULTI_LIST",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"multiList",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:e.validator}:{},props:i.extractWidgetProps(e)})}),lt=F.gsl,ot=F.gslByUid;function zi(e){return{uid:e.uid??"",kind:"layout",type:"accordion",props:{sections:e.sections,renderMode:e.renderMode??"all",...e.singleOpen!=null?{singleOpen:e.singleOpen}:{},...e.defaultOpen!=null?{defaultOpen:e.defaultOpen}:{}},children:[]}}function Oi(e,t){const s=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"ACCORDION"),children:s};const a=e.fn;return(n=>{const l=a(n);return{...t.mapStaticDef(l,"ACCORDION"),children:s}})}function Hi(e){return e.children}const z=i.createShortcutType({itemType:"ACCORDION",kind:"layout",entryShape:"compound",mapToWidget:zi,buildCustomWidget:Oi,getChildren:Hi}),rt=z.gsl,ut=z.gslByUid;function Xi(e){const t={};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}function qi(e){return{uid:e.uid??"",kind:"input",type:"repeater",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"array")}:{},props:{...Xi(e),template:{kind:"layout",type:"flex",children:[],props:{direction:"column"}}}}}function b(e,t){for(const s of e){if(typeof s=="function")continue;const a=s;typeof a.path=="string"&&a.path&&!a.path.startsWith(t)&&(a.path=t+a.path),"children"in a&&Array.isArray(a.children)&&b(a.children,t);const n=a.props;n?.template?.children&&Array.isArray(n.template.children)&&b(n.template.children,t)}}function ji(e,t){const s=t.walkChildren(t.children??[]),a=e.kind==="static"?e.def.path??"":e.fn({})?.path??"";a&&b(s,a+".items.");const n={kind:"layout",type:"flex",uid:"",children:s,props:{direction:"column"}};if(e.kind==="static"){const o=t.mapStaticDef(e.def,"REPEATER");return{...o,props:{...o.props,template:n}}}const l=e.fn;return(o=>{const u=l(o),r=t.mapStaticDef(u,"REPEATER");return{...r,props:{...r.props,template:n}}})}function Ji(e){return{baseDef:e.def,path:e.key,children:e.children}}function Qi(e){return e.children}const Zi={parseEntry:Ji,rollUpSensibleDefaults:()=>({}),applySensibleDefaults:e=>e,mapToWidget:qi,buildCustomWidget:ji,getChildren:Qi},y=i.createGslSelector("REPEATER"),O=(e,t)=>y(t,(s=>s.uid===e)),es={itemType:"REPEATER",kind:"input",handler:Zi,gsl:y,gslByUid:O},H=i.createShortcutType({itemType:"MARKDOWN",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>i.processAutoPlaceholder(i.processAutoLabel(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"markdown",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"string")}:{},props:i.extractWidgetProps(e)})}),pt=H.gsl,dt=H.gslByUid,X=i.createShortcutType({itemType:"RANGE_DATE_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"array")}:{},props:i.extractWidgetProps(e)})}),ct=X.gsl,yt=X.gslByUid,q=i.createShortcutType({itemType:"RANGE_TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeTimeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"array")}:{},props:i.extractWidgetProps(e)})}),mt=q.gsl,Tt=q.gslByUid,j=i.createShortcutType({itemType:"RANGE_DATE_TIME_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateTimeInput",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"array")}:{},props:i.extractWidgetProps(e)})}),gt=j.gsl,bt=j.gslByUid,J=i.createShortcutType({itemType:"RANGE_DATE_TIME_CALENDAR",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateTimeCalendar",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"array")}:{},props:i.extractWidgetProps(e)})}),_t=J.gsl,It=J.gslByUid,Q=i.createShortcutType({itemType:"RANGE_DATE_TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDateTimePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"array")}:{},props:i.extractWidgetProps(e)})}),At=Q.gsl,St=Q.gslByUid,Z=i.createShortcutType({itemType:"RANGE_DATE_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1,suppressAutomaticPlaceholders:!1},fields:["suppressAutomaticLabels","suppressAutomaticPlaceholders"],apply:(e,t)=>i.processAutoPlaceholder(i.processAutoLabel(e,t),t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeDatePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"array")}:{},props:i.extractWidgetProps(e)})}),ht=Z.gsl,kt=Z.gslByUid,ee=i.createShortcutType({itemType:"RANGE_TIME_PICKER",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:"rangeTimePicker",path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.validator!=null?{validator:i.buildTypedValidator(e.validator,"array")}:{},props:i.extractWidgetProps(e)})}),Et=ee.gsl,Pt=ee.gslByUid,te=i.createShortcutType({itemType:"CUSTOM_DISPLAY",kind:"display",entryShape:"bare",mapToWidget:e=>({uid:e.uid??"",kind:"display",type:e.customType,props:e.props??{}})}),Ut=te.gsl,Dt=te.gslByUid,ie=i.createShortcutType({itemType:"CUSTOM_INPUT",kind:"input",entryShape:"keyed",sensibleDefaults:{base:{suppressAutomaticLabels:!1},fields:["suppressAutomaticLabels"],apply:(e,t)=>i.processAutoLabel(e,t)},mapToWidget:e=>({uid:e.uid??"",kind:"input",type:e.customType,path:e.path??"",...e.label!=null?{label:e.label}:{},...e.disabled!=null?{disabled:e.disabled}:{},...e.readonly!=null?{readonly:e.readonly}:{},...e.defaultValue!=null?{defaultValue:e.defaultValue}:{},...e.validator!=null?{validator:e.validator}:{},props:e.props??{}})}),Bt=ie.gsl,Lt=ie.gslByUid,se=i.createShortcutType({itemType:"CUSTOM_ACTION",kind:"action",entryShape:"bare",mapToWidget:e=>{const{uid:t,label:s,disabled:a,on:n,onClick:l,data:o,customType:u,tags:r,size:p,include:c,exclude:Bi,states:Li,props:re,...g}=e;return{uid:t??"",kind:"action",type:e.customType,label:s,disabled:a,...n!=null?{on:n}:{},props:{...re,...g}}},afterMerge:(e,t)=>i.eventWiringService.extractOnClickFromMergeResult(e,t.eventRegistry,t.eventIdGenerator)}),Mt=se.gsl,Rt=se.gslByUid;function ts(e){return{uid:e.uid??"",kind:"layout",type:e.customType,props:e.props??{},children:[]}}function is(e,t){const s=t.walkChildren(t.children??[]);if(e.kind==="static")return{...t.mapStaticDef(e.def,"CUSTOM_LAYOUT"),children:s};const a=e.fn;return(n=>{const l=a(n);return{...t.mapStaticDef(l,"CUSTOM_LAYOUT"),children:s}})}function ss(e){return e.children}const ae=i.createShortcutType({itemType:"CUSTOM_LAYOUT",kind:"layout",entryShape:"compound",mapToWidget:ts,buildCustomWidget:is,getChildren:ss}),vt=ae.gsl,Ct=ae.gslByUid,as=[_,I,A,S,h,k,E,P,U,D,B,L,M,R,v,C,f,W,N,x,w,G,V,K,Y,$,F,z,es,H,X,q,j,J,Q,Z,ee,te,ie,se,ae],ne=i.createItemTypeRegistry();for(const e of as)i.registerShortcutType(ne,e);function ns(e){return i.defineShortcutType(ne,e)}function ft(e,t,s){if(typeof t=="function"){const n=t;return{items:[{key:e,def:o=>({type:"text",...n(o)})}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:s??[]}}const a={type:"text",...t};return{items:[{key:e,def:a}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:s??[]}}function Wt(e,t,s){if(typeof t=="function"){const n=t;return{items:[{key:e,def:o=>({type:"number",...n(o)})}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:s??[]}}const a={type:"number",...t};return{items:[{key:e,def:a}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:s??[]}}function Nt(e,t,s){if(typeof t=="function"){const n=t;return{items:[{key:e,def:o=>({type:"boolean",...n(o)})}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:s??[]}}const a={type:"boolean",...t};return{items:[{key:e,def:a}],type:"ITEMS",itemType:i.GuiItemTypes.INPUTS,tags:s??[]}}function xt(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"SELECT",items:[{key:e,def:r=>({type:"select",...l(r)})}],tags:s??[]}}const a={type:"select",...t};return{type:"ITEMS",itemType:"SELECT",items:[{key:e,def:a}],tags:s??[]}}function wt(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:e,def:r=>({type:"dropdown",...l(r)})}],tags:s??[]}}const a={type:"dropdown",...t};return{type:"ITEMS",itemType:"DROPDOWN",items:[{key:e,def:a}],tags:s??[]}}function Gt(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:e,def:r=>({type:"radiogroup",...l(r)})}],tags:s??[]}}const a={type:"radiogroup",...t};return{type:"ITEMS",itemType:"RADIOGROUP",items:[{key:e,def:a}],tags:s??[]}}function Vt(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:e,def:r=>({type:"checkbox",...l(r)})}],tags:s??[]}}const a={type:"checkbox",...t};return{type:"ITEMS",itemType:"CHECKBOX",items:[{key:e,def:a}],tags:s??[]}}function Kt(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:e,def:r=>({type:"textarea",...l(r)})}],tags:s??[]}}const a={type:"textarea",...t};return{type:"ITEMS",itemType:"TEXTAREA",items:[{key:e,def:a}],tags:s??[]}}function Yt(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"PASSWORD",items:[{key:e,def:r=>({type:"password",...l(r)})}],tags:s??[]}}const a={type:"password",...t};return{type:"ITEMS",itemType:"PASSWORD",items:[{key:e,def:a}],tags:s??[]}}function $t(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"CURRENCY",items:[{key:e,def:r=>({type:"currency",...l(r)})}],tags:s??[]}}const a={type:"currency",...t};return{type:"ITEMS",itemType:"CURRENCY",items:[{key:e,def:a}],tags:s??[]}}function Ft(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:e,def:r=>({type:"markdown",...l(r)})}],tags:s??[]}}const a={type:"markdown",...t};return{type:"ITEMS",itemType:"MARKDOWN",items:[{key:e,def:a}],tags:s??[]}}function zt(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"LIST",items:[{key:e,def:r=>({type:"list",...l(r)})}],tags:s??[]}}const a={type:"list",...t};return{type:"ITEMS",itemType:"LIST",items:[{key:e,def:a}],tags:s??[]}}function Ot(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"MULTI_DROPDOWN",items:[{key:e,def:r=>({type:"multiDropdown",...l(r)})}],tags:s??[]}}const a={type:"multiDropdown",...t};return{type:"ITEMS",itemType:"MULTI_DROPDOWN",items:[{key:e,def:a}],tags:s??[]}}function Ht(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"MULTI_LIST",items:[{key:e,def:r=>({type:"multiList",...l(r)})}],tags:s??[]}}const a={type:"multiList",...t};return{type:"ITEMS",itemType:"MULTI_LIST",items:[{key:e,def:a}],tags:s??[]}}function Xt(e,t,s){if(typeof t=="function"){const n=t;return{items:[o=>({type:"calendar",path:e,...n(o)})],type:"ITEMS",itemType:"CALENDAR",tags:s??[]}}return{items:[{type:"calendar",path:e,...t}],type:"ITEMS",itemType:"CALENDAR",tags:s??[]}}function qt(e,t,s){if(typeof t=="function"){const n=t;return{items:[o=>({type:"dateTimeCalendar",path:e,...n(o)})],type:"ITEMS",itemType:"DATE_TIME_CALENDAR",tags:s??[]}}return{items:[{type:"dateTimeCalendar",path:e,...t}],type:"ITEMS",itemType:"DATE_TIME_CALENDAR",tags:s??[]}}function jt(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:e,def:r=>({type:"dateInput",...l(r)})}],tags:s??[]}}const a={type:"dateInput",...t};return{type:"ITEMS",itemType:"DATE_INPUT",items:[{key:e,def:a}],tags:s??[]}}function Jt(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:e,def:r=>({type:"datePicker",...l(r)})}],tags:s??[]}}const a={type:"datePicker",...t};return{type:"ITEMS",itemType:"DATE_PICKER",items:[{key:e,def:a}],tags:s??[]}}function Qt(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"DATE_TIME_PICKER",items:[{key:e,def:r=>({type:"dateTimePicker",...l(r)})}],tags:s??[]}}const a={type:"dateTimePicker",...t};return{type:"ITEMS",itemType:"DATE_TIME_PICKER",items:[{key:e,def:a}],tags:s??[]}}function Zt(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:e,def:r=>({type:"rangeCalendar",...l(r)})}],tags:s??[]}}const a={type:"rangeCalendar",...t};return{type:"ITEMS",itemType:"RANGE_CALENDAR",items:[{key:e,def:a}],tags:s??[]}}function ei(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:e,def:r=>({type:"rangeDateInput",...l(r)})}],tags:s??[]}}const a={type:"rangeDateInput",...t};return{type:"ITEMS",itemType:"RANGE_DATE_INPUT",items:[{key:e,def:a}],tags:s??[]}}function ti(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_DATE_TIME_INPUT",items:[{key:e,def:r=>({type:"rangeDateTimeInput",...l(r)})}],tags:s??[]}}const a={type:"rangeDateTimeInput",...t};return{type:"ITEMS",itemType:"RANGE_DATE_TIME_INPUT",items:[{key:e,def:a}],tags:s??[]}}function ii(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_DATE_TIME_CALENDAR",items:[{key:e,def:r=>({type:"rangeDateTimeCalendar",...l(r)})}],tags:s??[]}}const a={type:"rangeDateTimeCalendar",...t};return{type:"ITEMS",itemType:"RANGE_DATE_TIME_CALENDAR",items:[{key:e,def:a}],tags:s??[]}}function si(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_DATE_TIME_PICKER",items:[{key:e,def:r=>({type:"rangeDateTimePicker",...l(r)})}],tags:s??[]}}const a={type:"rangeDateTimePicker",...t};return{type:"ITEMS",itemType:"RANGE_DATE_TIME_PICKER",items:[{key:e,def:a}],tags:s??[]}}function ai(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_TIME_INPUT",items:[{key:e,def:r=>({type:"rangeTimeInput",...l(r)})}],tags:s??[]}}const a={type:"rangeTimeInput",...t};return{type:"ITEMS",itemType:"RANGE_TIME_INPUT",items:[{key:e,def:a}],tags:s??[]}}function ni(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:e,def:r=>({type:"rangeDatePicker",...l(r)})}],tags:s??[]}}const a={type:"rangeDatePicker",...t};return{type:"ITEMS",itemType:"RANGE_DATE_PICKER",items:[{key:e,def:a}],tags:s??[]}}function li(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"RANGE_TIME_PICKER",items:[{key:e,def:r=>({type:"rangeTimePicker",...l(r)})}],tags:s??[]}}const a={type:"rangeTimePicker",...t};return{type:"ITEMS",itemType:"RANGE_TIME_PICKER",items:[{key:e,def:a}],tags:s??[]}}function oi(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"TIME_INPUT",items:[{key:e,def:r=>({type:"timeInput",...l(r)})}],tags:s??[]}}const a={type:"timeInput",...t};return{type:"ITEMS",itemType:"TIME_INPUT",items:[{key:e,def:a}],tags:s??[]}}function ri(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"TIME_PICKER",items:[{key:e,def:r=>({type:"timePicker",...l(r)})}],tags:s??[]}}const a={type:"timePicker",...t};return{type:"ITEMS",itemType:"TIME_PICKER",items:[{key:e,def:a}],tags:s??[]}}function ui(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"DATE_TIME_INPUT",items:[{key:e,def:r=>({type:"dateTimeInput",...l(r)})}],tags:s??[]}}const a={type:"dateTimeInput",...t};return{type:"ITEMS",itemType:"DATE_TIME_INPUT",items:[{key:e,def:a}],tags:s??[]}}function pi(e,t,s,a){if(typeof s=="function"){const o=s;return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:p=>({customType:e,...o(p)})}],tags:a??[]}}const n={customType:e,...s};return{type:"ITEMS",itemType:"CUSTOM_INPUT",items:[{key:t,def:n}],tags:a??[]}}function di(e,t){return{items:[e],type:"ITEMS",itemType:i.GuiItemTypes.ACTIONS,tags:t??[]}}function ci(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[u=>({customType:e,...l(u)})],tags:s??[]}}return{type:"ITEMS",itemType:"CUSTOM_ACTION",items:[{customType:e,...t}],tags:s??[]}}const le=(e,t)=>({type:"ITEMS",itemType:i.GuiItemTypes.DISPLAYS,items:[{render:e}],tags:t??[]});function yi(e,t){return{type:"ITEMS",itemType:"ALERTS",items:[e],tags:t??[]}}function mi(e,t){return{type:"ITEMS",itemType:"MARKDOWN_TEXTS",items:[e],tags:t??[]}}function Ti(e,t,s){if(typeof t=="function"){const u=t;return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[p=>({customType:e,...u(p)})],tags:s??[]}}const{uid:a,...n}=t??{};return{type:"ITEMS",itemType:"CUSTOM_DISPLAY",items:[{customType:e,...a!=null?{uid:a}:{},props:Object.keys(n).length>0?n:void 0}],tags:s??[]}}const m=(e,t,s)=>({type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[{def:{widgetName:"flex",...t??{}},children:e}],tags:s??[]}),gi=(e,t,s)=>m(e,{direction:"row",...t??{}},s),bi=(e,t,s)=>m(e,{direction:"column",...t??{}},s),T=(e,t,s)=>({type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[{def:{widgetName:"grid",direction:"row",autoFit:!0,...t??{}},children:e}],tags:s??[]}),_i=(e,t,s)=>T(e,{direction:"row",...t??{}},s),Ii=(e,t,s)=>T(e,{direction:"column",...t??{}},s);function ue(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function Ai(e,t,s){const a=e.map(o=>({label:o.label,uid:o.uid??ue(o.label)})),n=e.map(o=>({type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[{def:{uid:o.uid??ue(o.label),direction:"column",widgetName:"flex"},children:o.children}],tags:[]}));return{type:"ITEMS",itemType:"TABS",items:[{def:{tabs:a,...t},children:n}],tags:s??[]}}function pe(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function Si(e,t,s){const a=e.map(o=>({label:o.label,uid:o.uid??pe(o.label)})),n=e.map(o=>({type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[{def:{uid:o.uid??pe(o.label),direction:"column",widgetName:"flex"},children:o.children}],tags:[]}));return{type:"ITEMS",itemType:"ACCORDION",items:[{def:{sections:a,...t},children:n}],tags:s??[]}}function hi(e,t,s,a){if(typeof s=="function"){const o=s;return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:p=>({customType:e,...o(p)}),children:t}],tags:a??[]}}return{type:"ITEMS",itemType:"CUSTOM_LAYOUT",items:[{def:{customType:e,...s},children:t}],tags:a??[]}}function ki(e,t,s){const{template:a,...n}=t;return{type:"ITEMS",itemType:"REPEATER",items:[{key:e,def:n,children:a}],tags:s??[]}}function Ei(e,t,s){if(typeof t=="function"){const l=t;return{type:"ITEMS",itemType:"TAGS",items:[{key:e,def:r=>({type:"tags",...l(r)})}],tags:s??[]}}const a={type:"tags",...t};return{type:"ITEMS",itemType:"TAGS",items:[{key:e,def:a}],tags:s??[]}}const Pi=e=>d(e,t=>t.type==="text"),Ui=e=>d(e,t=>t.type==="number"),Di=e=>d(e,t=>t.type==="boolean"),ls=i.createSelectors({inputs:d,inputByUid:de,textInputs:Pi,numberInputs:Ui,booleanInputs:Di,selects:Ye,selectByUid:$e,dropdowns:it,dropdownByUid:st,radiogroups:Fe,radiogroupByUid:ze,checkboxes:Be,checkboxByUid:Le,textareas:Ee,textareaByUid:Pe,passwords:Ue,passwordByUid:De,currencies:we,currencyByUid:Ge,markdowns:pt,markdownByUid:dt,lists:Xe,listByUid:qe,multiDropdowns:at,multiDropdownByUid:nt,multiLists:lt,multiListByUid:ot,calendars:_e,calendarByUid:Ie,dateTimeCalendars:Ae,dateTimeCalendarByUid:Se,dateInputs:Me,dateInputByUid:Re,timeInputs:ve,timeInputByUid:Ce,timePickers:fe,timePickerByUid:We,dateTimeInputs:Ne,dateTimeInputByUid:xe,datePickers:et,datePickerByUid:tt,dateTimePickers:he,dateTimePickerByUid:ke,rangeCalendars:Ve,rangeCalendarByUid:Ke,rangeDateInputs:ct,rangeDateInputByUid:yt,rangeTimeInputs:mt,rangeTimeInputByUid:Tt,rangeDateTimeInputs:gt,rangeDateTimeInputByUid:bt,rangeDateTimeCalendars:_t,rangeDateTimeCalendarByUid:It,rangeDateTimePickers:At,rangeDateTimePickerByUid:St,rangeDatePickers:ht,rangeDatePickerByUid:kt,rangeTimePickers:Et,rangeTimePickerByUid:Pt,repeaters:y,repeaterByUid:O,actions:ce,actionByUid:ye,layouts:me,layoutByUid:Te,displays:ge,displayByUid:be,alerts:je,alertByUid:Je,markdownTexts:Qe,markdownTextByUid:Ze,tabs:Oe,tabsByUid:He,accordions:rt,accordionByUid:ut,customInputs:Bt,customInputByUid:Lt,customActions:Mt,customActionByUid:Rt,customDisplays:Ut,customDisplayByUid:Dt,customLayouts:vt,customLayoutByUid:Ct}),os={bareItemToWidget:e=>le(e),rootEntry:e=>{const t={def:{uid:"#root",direction:"column",widgetName:"flex"},children:e};return{type:"ITEMS",itemType:i.GuiItemTypes.LAYOUTS,items:[t],tags:[]}}},rs={inputs:{textInput:ft,numberInput:Wt,booleanInput:Nt,select:xt,dropdown:wt,radiogroup:Gt,checkbox:Vt,textarea:Kt,password:Yt,currency:$t,markdown:Ft,list:zt,multiDropdown:Ot,multiList:Ht,calendar:Xt,dateTimeCalendar:qt,dateInput:jt,datePicker:Jt,dateTimePicker:Qt,timeInput:oi,timePicker:ri,dateTimeInput:ui,rangeCalendar:Zt,rangeDateInput:ei,rangeDateTimeInput:ti,rangeDateTimeCalendar:ii,rangeDateTimePicker:si,rangeTimeInput:ai,rangeDatePicker:ni,rangeTimePicker:li,repeater:ki,tags:Ei,custom:pi},actions:{button:di,custom:ci},displays:{display:le,alert:yi,markdownText:mi,custom:Ti},layouts:{flex:m,horizontalFlex:gi,verticalFlex:bi,grid:T,horizontalGrid:_i,verticalGrid:Ii,tabs:Ai,accordion:Si,custom:hi}},oe=i.createImplementation({name:"gui",registry:ne,facade:rs,selectors:ls,adapter:os}),us=oe.namespace,ps=oe.formDefs,ds=oe.resolveFormInput;exports._gslAccordionByUid=ut;exports._gslAccordions=rt;exports._gslActionByUid=ye;exports._gslActions=ce;exports._gslAlertByUid=Je;exports._gslAlerts=je;exports._gslBooleanInputs=Di;exports._gslCalendarByUid=Ie;exports._gslCalendars=_e;exports._gslCheckboxByUid=Le;exports._gslCheckboxes=Be;exports._gslCurrencies=we;exports._gslCurrencyByUid=Ge;exports._gslCustomActionByUid=Rt;exports._gslCustomActions=Mt;exports._gslCustomDisplayByUid=Dt;exports._gslCustomDisplays=Ut;exports._gslCustomInputByUid=Lt;exports._gslCustomInputs=Bt;exports._gslCustomLayoutByUid=Ct;exports._gslCustomLayouts=vt;exports._gslDateInputByUid=Re;exports._gslDateInputs=Me;exports._gslDatePickerByUid=tt;exports._gslDatePickers=et;exports._gslDateTimeCalendarByUid=Se;exports._gslDateTimeCalendars=Ae;exports._gslDateTimeInputByUid=xe;exports._gslDateTimeInputs=Ne;exports._gslDateTimePickerByUid=ke;exports._gslDateTimePickers=he;exports._gslDisplayByUid=be;exports._gslDisplays=ge;exports._gslDropdownByUid=st;exports._gslDropdowns=it;exports._gslInputByUid=de;exports._gslInputs=d;exports._gslLayoutByUid=Te;exports._gslLayouts=me;exports._gslListByUid=qe;exports._gslLists=Xe;exports._gslMarkdownByUid=dt;exports._gslMarkdownTextByUid=Ze;exports._gslMarkdownTexts=Qe;exports._gslMarkdowns=pt;exports._gslMultiDropdownByUid=nt;exports._gslMultiDropdowns=at;exports._gslMultiListByUid=ot;exports._gslMultiLists=lt;exports._gslNumberInputs=Ui;exports._gslPasswordByUid=De;exports._gslPasswords=Ue;exports._gslRadiogroupByUid=ze;exports._gslRadiogroups=Fe;exports._gslRangeCalendarByUid=Ke;exports._gslRangeCalendars=Ve;exports._gslRangeDateInputByUid=yt;exports._gslRangeDateInputs=ct;exports._gslRangeDatePickerByUid=kt;exports._gslRangeDatePickers=ht;exports._gslRangeDateTimeCalendarByUid=It;exports._gslRangeDateTimeCalendars=_t;exports._gslRangeDateTimeInputByUid=bt;exports._gslRangeDateTimeInputs=gt;exports._gslRangeDateTimePickerByUid=St;exports._gslRangeDateTimePickers=At;exports._gslRangeTimeInputByUid=Tt;exports._gslRangeTimeInputs=mt;exports._gslRangeTimePickerByUid=Pt;exports._gslRangeTimePickers=Et;exports._gslRepeaterByUid=O;exports._gslRepeaters=y;exports._gslSelectByUid=$e;exports._gslSelects=Ye;exports._gslTabs=Oe;exports._gslTabsByUid=He;exports._gslTags=$i;exports._gslTagsByUid=Fi;exports._gslTextInputs=Pi;exports._gslTextareaByUid=Pe;exports._gslTextareas=Ee;exports._gslTimeInputByUid=Ce;exports._gslTimeInputs=ve;exports._gslTimePickerByUid=We;exports._gslTimePickers=fe;exports._guiAccordion=Si;exports._guiAlert=yi;exports._guiBooleanInput=Nt;exports._guiButton=di;exports._guiCalendar=Xt;exports._guiCheckbox=Vt;exports._guiCurrency=$t;exports._guiCustomAction=ci;exports._guiCustomDisplay=Ti;exports._guiCustomInput=pi;exports._guiCustomLayout=hi;exports._guiDateInput=jt;exports._guiDatePicker=Jt;exports._guiDateTimeCalendar=qt;exports._guiDateTimeInput=ui;exports._guiDateTimePicker=Qt;exports._guiDisplay=le;exports._guiDropdown=wt;exports._guiFlex=m;exports._guiGrid=T;exports._guiHorizontalFlex=gi;exports._guiHorizontalGrid=_i;exports._guiList=zt;exports._guiMarkdown=Ft;exports._guiMarkdownText=mi;exports._guiMultiDropdown=Ot;exports._guiMultiList=Ht;exports._guiNumberInput=Wt;exports._guiPassword=Yt;exports._guiRadiogroup=Gt;exports._guiRangeCalendar=Zt;exports._guiRangeDateInput=ei;exports._guiRangeDatePicker=ni;exports._guiRangeDateTimeCalendar=ii;exports._guiRangeDateTimeInput=ti;exports._guiRangeDateTimePicker=si;exports._guiRangeTimeInput=ai;exports._guiRangeTimePicker=li;exports._guiRepeater=ki;exports._guiSelect=xt;exports._guiTabs=Ai;exports._guiTags=Ei;exports._guiTextInput=ft;exports._guiTextarea=Kt;exports._guiTimeInput=oi;exports._guiTimePicker=ri;exports._guiVerticalFlex=bi;exports._guiVerticalGrid=Ii;exports.defineShortcutType=ns;exports.formDefs=ps;exports.gui=us;exports.resolveFormInput=ds;
|