@golemui/gui-shared 1.0.3 → 1.1.1-rc.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 +25 -0
- package/index.d.ts +1 -0
- package/index.js +268 -198
- package/index.umd.cjs +1 -1
- package/internals.d.ts +4 -4
- package/internals.js +339 -298
- package/internals.umd.cjs +1 -1
- package/lib/dx/core/defineShortcutType.d.ts +2 -1
- package/lib/dx/core/dx.domain.d.ts +6 -1
- package/lib/dx/core/itemTypeRegistry.d.ts +13 -1
- package/lib/dx/formDef.domain.d.ts +2 -1
- package/lib/dx/gui.d.ts +20 -0
- package/lib/dx/index.d.ts +30 -0
- package/lib/dx/resolveFormInput.d.ts +9 -1
- package/lib/dx/shortcuts/date-time-calendar/dateTimeCalendar.domain.d.ts +22 -0
- package/lib/dx/shortcuts/date-time-calendar/dateTimeCalendarSensibleDefaults.service.d.ts +6 -0
- package/lib/dx/shortcuts/date-time-calendar/guiDateTimeCalendar.impl.d.ts +6 -0
- package/lib/dx/shortcuts/date-time-calendar/register.d.ts +2 -0
- package/lib/dx/shortcuts/date-time-input/dateTimeInput.domain.d.ts +17 -0
- package/lib/dx/shortcuts/date-time-input/guiDateTimeInput.impl.d.ts +6 -0
- package/lib/dx/shortcuts/date-time-input/register.d.ts +2 -0
- package/lib/dx/shortcuts/date-time-picker/dateTimePicker.domain.d.ts +18 -0
- package/lib/dx/shortcuts/date-time-picker/guiDateTimePicker.impl.d.ts +7 -0
- package/lib/dx/shortcuts/date-time-picker/register.d.ts +2 -0
- package/lib/dx/shortcuts/range-date-time-calendar/guiRangeDateTimeCalendar.impl.d.ts +6 -0
- package/lib/dx/shortcuts/range-date-time-calendar/rangeDateTimeCalendar.domain.d.ts +17 -0
- package/lib/dx/shortcuts/range-date-time-calendar/register.d.ts +2 -0
- package/lib/dx/shortcuts/range-date-time-input/guiRangeDateTimeInput.impl.d.ts +6 -0
- package/lib/dx/shortcuts/range-date-time-input/rangeDateTimeInput.domain.d.ts +17 -0
- package/lib/dx/shortcuts/range-date-time-input/register.d.ts +2 -0
- package/lib/dx/shortcuts/range-date-time-picker/guiRangeDateTimePicker.impl.d.ts +6 -0
- package/lib/dx/shortcuts/range-date-time-picker/rangeDateTimePicker.domain.d.ts +17 -0
- package/lib/dx/shortcuts/range-date-time-picker/register.d.ts +2 -0
- package/lib/dx/shortcuts/range-time-input/guiRangeTimeInput.impl.d.ts +6 -0
- package/lib/dx/shortcuts/range-time-input/rangeTimeInput.domain.d.ts +17 -0
- package/lib/dx/shortcuts/range-time-input/register.d.ts +2 -0
- package/lib/dx/shortcuts/range-time-picker/guiRangeTimePicker.impl.d.ts +6 -0
- package/lib/dx/shortcuts/range-time-picker/rangeTimePicker.domain.d.ts +17 -0
- package/lib/dx/shortcuts/range-time-picker/register.d.ts +2 -0
- package/lib/dx/shortcuts/scopes/scopeChain.d.ts +30 -0
- package/lib/dx/shortcuts/time-input/guiTimeInput.impl.d.ts +6 -0
- package/lib/dx/shortcuts/time-input/register.d.ts +2 -0
- package/lib/dx/shortcuts/time-input/timeInput.domain.d.ts +17 -0
- package/lib/dx/shortcuts/time-picker/guiTimePicker.impl.d.ts +7 -0
- package/lib/dx/shortcuts/time-picker/register.d.ts +2 -0
- package/lib/dx/shortcuts/time-picker/timePicker.domain.d.ts +18 -0
- package/lib/golem-form.d.ts +32 -2
- package/lib/widget.props.d.ts +246 -26
- package/lib/widgets.d.ts +2 -2
- package/package.json +3 -3
- package/register-B3CJMfX9.cjs +1 -0
- package/{register-BaJnbpMX.js → register-De8Y1vW5.js} +805 -424
- package/register-BHpCnzXI.cjs +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ArrayValidator } from '@golemui/gui-validators';
|
|
2
|
+
import { RangeTimePickerProps } from '../../../widget.props';
|
|
3
|
+
import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
|
|
4
|
+
import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
|
|
5
|
+
import { DxValidator } from '../../core/dxValidatorHelper';
|
|
6
|
+
export interface RangeTimePickerDecorator extends DxInputBase, DxCommonFields, Partial<RangeTimePickerProps> {
|
|
7
|
+
type: 'rangeTimePicker';
|
|
8
|
+
validator?: DxValidator<ArrayValidator>;
|
|
9
|
+
}
|
|
10
|
+
export interface GslRangeTimePickerConfig extends GslConfigBase<RangeTimePickerDecorator> {
|
|
11
|
+
suppressAutomaticLabels?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type RangeTimePickerEntry = {
|
|
14
|
+
key: string;
|
|
15
|
+
def: DefOrCallback<RangeTimePickerDecorator>;
|
|
16
|
+
};
|
|
17
|
+
export type GuiRangeTimePickerShortcut = GuiShortcutOf<'RANGE_TIME_PICKER', RangeTimePickerEntry>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { GslRangeTimePickerConfig, RangeTimePickerDecorator } from './rangeTimePicker.domain';
|
|
2
|
+
export declare const _gslRangeTimePickers: (config: GslRangeTimePickerConfig, matcher?: ((decorator: RangeTimePickerDecorator) => boolean) | undefined) => import('../../core/dx.domain').GslLeafSelector, _gslRangeTimePickerByUid: (uid: string, config: GslRangeTimePickerConfig) => import('../../core/dx.domain').GslLeafSelector;
|
|
@@ -11,11 +11,21 @@ import { _gslCurrencies, _gslCurrencyByUid } from '../currency/register';
|
|
|
11
11
|
import { _gslMarkdowns, _gslMarkdownByUid } from '../markdown/register';
|
|
12
12
|
import { _gslLists, _gslListByUid } from '../list/register';
|
|
13
13
|
import { _gslCalendars, _gslCalendarByUid } from '../calendar/register';
|
|
14
|
+
import { _gslDateTimeCalendars, _gslDateTimeCalendarByUid } from '../date-time-calendar/register';
|
|
14
15
|
import { _gslDateInputs, _gslDateInputByUid } from '../date-input/register';
|
|
15
16
|
import { _gslDatePickers, _gslDatePickerByUid } from '../date-picker/register';
|
|
17
|
+
import { _gslDateTimePickers, _gslDateTimePickerByUid } from '../date-time-picker/register';
|
|
16
18
|
import { _gslRangeCalendars, _gslRangeCalendarByUid } from '../range-calendar/register';
|
|
17
19
|
import { _gslRangeDateInputs, _gslRangeDateInputByUid } from '../range-date-input/register';
|
|
20
|
+
import { _gslRangeDateTimeInputs, _gslRangeDateTimeInputByUid } from '../range-date-time-input/register';
|
|
21
|
+
import { _gslRangeDateTimeCalendars, _gslRangeDateTimeCalendarByUid } from '../range-date-time-calendar/register';
|
|
22
|
+
import { _gslRangeDateTimePickers, _gslRangeDateTimePickerByUid } from '../range-date-time-picker/register';
|
|
23
|
+
import { _gslRangeTimeInputs, _gslRangeTimeInputByUid } from '../range-time-input/register';
|
|
24
|
+
import { _gslTimeInputs, _gslTimeInputByUid } from '../time-input/register';
|
|
25
|
+
import { _gslTimePickers, _gslTimePickerByUid } from '../time-picker/register';
|
|
26
|
+
import { _gslDateTimeInputs, _gslDateTimeInputByUid } from '../date-time-input/register';
|
|
18
27
|
import { _gslRangeDatePickers, _gslRangeDatePickerByUid } from '../range-date-picker/register';
|
|
28
|
+
import { _gslRangeTimePickers, _gslRangeTimePickerByUid } from '../range-time-picker/register';
|
|
19
29
|
import { _gslRepeaters, _gslRepeaterByUid } from '../repeater/register';
|
|
20
30
|
import { _gslActions, _gslActionByUid } from '../actions/register';
|
|
21
31
|
import { _gslLayouts, _gslLayoutByUid } from '../layouts/register';
|
|
@@ -64,16 +74,36 @@ export declare class ScopeChain {
|
|
|
64
74
|
listByUid(uid: string, config: CfgByUid<typeof _gslListByUid>): GslLeafSelector;
|
|
65
75
|
calendars(config: CfgGsl<typeof _gslCalendars>): GslLeafSelector;
|
|
66
76
|
calendarByUid(uid: string, config: CfgByUid<typeof _gslCalendarByUid>): GslLeafSelector;
|
|
77
|
+
dateTimeCalendars(config: CfgGsl<typeof _gslDateTimeCalendars>): GslLeafSelector;
|
|
78
|
+
dateTimeCalendarByUid(uid: string, config: CfgByUid<typeof _gslDateTimeCalendarByUid>): GslLeafSelector;
|
|
67
79
|
dateInputs(config: CfgGsl<typeof _gslDateInputs>): GslLeafSelector;
|
|
68
80
|
dateInputByUid(uid: string, config: CfgByUid<typeof _gslDateInputByUid>): GslLeafSelector;
|
|
81
|
+
timeInputs(config: CfgGsl<typeof _gslTimeInputs>): GslLeafSelector;
|
|
82
|
+
timeInputByUid(uid: string, config: CfgByUid<typeof _gslTimeInputByUid>): GslLeafSelector;
|
|
83
|
+
timePickers(config: CfgGsl<typeof _gslTimePickers>): GslLeafSelector;
|
|
84
|
+
timePickerByUid(uid: string, config: CfgByUid<typeof _gslTimePickerByUid>): GslLeafSelector;
|
|
85
|
+
dateTimeInputs(config: CfgGsl<typeof _gslDateTimeInputs>): GslLeafSelector;
|
|
86
|
+
dateTimeInputByUid(uid: string, config: CfgByUid<typeof _gslDateTimeInputByUid>): GslLeafSelector;
|
|
69
87
|
datePickers(config: CfgGsl<typeof _gslDatePickers>): GslLeafSelector;
|
|
70
88
|
datePickerByUid(uid: string, config: CfgByUid<typeof _gslDatePickerByUid>): GslLeafSelector;
|
|
89
|
+
dateTimePickers(config: CfgGsl<typeof _gslDateTimePickers>): GslLeafSelector;
|
|
90
|
+
dateTimePickerByUid(uid: string, config: CfgByUid<typeof _gslDateTimePickerByUid>): GslLeafSelector;
|
|
71
91
|
rangeCalendars(config: CfgGsl<typeof _gslRangeCalendars>): GslLeafSelector;
|
|
72
92
|
rangeCalendarByUid(uid: string, config: CfgByUid<typeof _gslRangeCalendarByUid>): GslLeafSelector;
|
|
73
93
|
rangeDateInputs(config: CfgGsl<typeof _gslRangeDateInputs>): GslLeafSelector;
|
|
74
94
|
rangeDateInputByUid(uid: string, config: CfgByUid<typeof _gslRangeDateInputByUid>): GslLeafSelector;
|
|
95
|
+
rangeTimeInputs(config: CfgGsl<typeof _gslRangeTimeInputs>): GslLeafSelector;
|
|
96
|
+
rangeTimeInputByUid(uid: string, config: CfgByUid<typeof _gslRangeTimeInputByUid>): GslLeafSelector;
|
|
97
|
+
rangeDateTimeInputs(config: CfgGsl<typeof _gslRangeDateTimeInputs>): GslLeafSelector;
|
|
98
|
+
rangeDateTimeInputByUid(uid: string, config: CfgByUid<typeof _gslRangeDateTimeInputByUid>): GslLeafSelector;
|
|
99
|
+
rangeDateTimeCalendars(config: CfgGsl<typeof _gslRangeDateTimeCalendars>): GslLeafSelector;
|
|
100
|
+
rangeDateTimeCalendarByUid(uid: string, config: CfgByUid<typeof _gslRangeDateTimeCalendarByUid>): GslLeafSelector;
|
|
101
|
+
rangeDateTimePickers(config: CfgGsl<typeof _gslRangeDateTimePickers>): GslLeafSelector;
|
|
102
|
+
rangeDateTimePickerByUid(uid: string, config: CfgByUid<typeof _gslRangeDateTimePickerByUid>): GslLeafSelector;
|
|
75
103
|
rangeDatePickers(config: CfgGsl<typeof _gslRangeDatePickers>): GslLeafSelector;
|
|
76
104
|
rangeDatePickerByUid(uid: string, config: CfgByUid<typeof _gslRangeDatePickerByUid>): GslLeafSelector;
|
|
105
|
+
rangeTimePickers(config: CfgGsl<typeof _gslRangeTimePickers>): GslLeafSelector;
|
|
106
|
+
rangeTimePickerByUid(uid: string, config: CfgByUid<typeof _gslRangeTimePickerByUid>): GslLeafSelector;
|
|
77
107
|
repeaters(config: CfgGsl<typeof _gslRepeaters>): GslLeafSelector;
|
|
78
108
|
repeaterByUid(uid: string, config: CfgByUid<typeof _gslRepeaterByUid>): GslLeafSelector;
|
|
79
109
|
actions(config: CfgGsl<typeof _gslActions>): GslLeafSelector;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DxRuntimeParams } from '../../core/dxUtilityTypes';
|
|
2
|
+
import { TimeInputDecorator, GuiTimeInputShortcut } from './timeInput.domain';
|
|
3
|
+
export declare function _guiTimeInput(path: string): GuiTimeInputShortcut;
|
|
4
|
+
export declare function _guiTimeInput(path: string, props: Partial<Omit<TimeInputDecorator, 'type'>>): GuiTimeInputShortcut;
|
|
5
|
+
export declare function _guiTimeInput(path: string, props: Partial<Omit<TimeInputDecorator, 'type'>>, tags: string[]): GuiTimeInputShortcut;
|
|
6
|
+
export declare function _guiTimeInput(path: string, callback: (params: DxRuntimeParams) => Partial<Omit<TimeInputDecorator, 'type'>>, tags?: string[]): GuiTimeInputShortcut;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { TimeInputDecorator, GslTimeInputConfig } from './timeInput.domain';
|
|
2
|
+
export declare const _gslTimeInputs: (config: GslTimeInputConfig, matcher?: ((decorator: TimeInputDecorator) => boolean) | undefined) => import('../../core/dx.domain').GslLeafSelector, _gslTimeInputByUid: (uid: string, config: GslTimeInputConfig) => import('../../core/dx.domain').GslLeafSelector;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StringValidator } from '@golemui/gui-validators';
|
|
2
|
+
import { TimeInputProps } from '../../../widget.props';
|
|
3
|
+
import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
|
|
4
|
+
import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
|
|
5
|
+
import { DxValidator } from '../../core/dxValidatorHelper';
|
|
6
|
+
export interface TimeInputDecorator extends DxInputBase, DxCommonFields, Partial<TimeInputProps> {
|
|
7
|
+
type: 'timeInput';
|
|
8
|
+
validator?: DxValidator<StringValidator>;
|
|
9
|
+
}
|
|
10
|
+
export interface GslTimeInputConfig extends GslConfigBase<TimeInputDecorator> {
|
|
11
|
+
suppressAutomaticLabels?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type TimeInputEntry = {
|
|
14
|
+
key: string;
|
|
15
|
+
def: DefOrCallback<TimeInputDecorator>;
|
|
16
|
+
};
|
|
17
|
+
export type GuiTimeInputShortcut = GuiShortcutOf<'TIME_INPUT', TimeInputEntry>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DxRuntimeParams } from '../../core/dxUtilityTypes';
|
|
2
|
+
import { TimePickerDecorator, GuiTimePickerShortcut } from './timePicker.domain';
|
|
3
|
+
type TimePickerFactoryProps = Omit<TimePickerDecorator, 'type'>;
|
|
4
|
+
export declare function _guiTimePicker(path: string, props: TimePickerFactoryProps): GuiTimePickerShortcut;
|
|
5
|
+
export declare function _guiTimePicker(path: string, props: TimePickerFactoryProps, tags: string[]): GuiTimePickerShortcut;
|
|
6
|
+
export declare function _guiTimePicker(path: string, callback: (params: DxRuntimeParams) => TimePickerFactoryProps, tags?: string[]): GuiTimePickerShortcut;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { TimePickerDecorator, GslTimePickerConfig } from './timePicker.domain';
|
|
2
|
+
export declare const _gslTimePickers: (config: GslTimePickerConfig, matcher?: ((decorator: TimePickerDecorator) => boolean) | undefined) => import('../../core/dx.domain').GslLeafSelector, _gslTimePickerByUid: (uid: string, config: GslTimePickerConfig) => import('../../core/dx.domain').GslLeafSelector;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StringValidator } from '@golemui/gui-validators';
|
|
2
|
+
import { TimePickerProps } from '../../../widget.props';
|
|
3
|
+
import { DxCommonFields, DxInputBase } from '../../core/dxBase.types';
|
|
4
|
+
import { DefOrCallback, GslConfigBase, GuiShortcutOf } from '../../core/dxUtilityTypes';
|
|
5
|
+
import { DxValidator } from '../../core/dxValidatorHelper';
|
|
6
|
+
export interface TimePickerDecorator extends DxInputBase, DxCommonFields, Partial<TimePickerProps> {
|
|
7
|
+
type: 'timePicker';
|
|
8
|
+
validator?: DxValidator<StringValidator>;
|
|
9
|
+
}
|
|
10
|
+
export interface GslTimePickerConfig extends GslConfigBase<TimePickerDecorator> {
|
|
11
|
+
suppressAutomaticLabels?: boolean;
|
|
12
|
+
suppressAutomaticPlaceholders?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type TimePickerEntry = {
|
|
15
|
+
key: string;
|
|
16
|
+
def: DefOrCallback<TimePickerDecorator>;
|
|
17
|
+
};
|
|
18
|
+
export type GuiTimePickerShortcut = GuiShortcutOf<'TIME_PICKER', TimePickerEntry>;
|
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, DateRange, DateinputProps, DropdownProps, FlexProps, GridProps, ListProps, MarkdownProps, MarkdownTextProps, NumberinputProps, OptionValue, PasswordProps, RadiogroupProps, RangeCalendarProps, RangeDateInputProps, RangeDatePickerProps, RepeaterProps, SelectProps, TabsProps, TextareaProps, TextinputProps, ToggleProps } from './widget.props';
|
|
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';
|
|
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> | GuiCurrency<FormType, States, V> | GuiDateinput<FormType, States, V> | GuiDatePicker<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> | 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> | 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> | 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
|
};
|
|
@@ -105,6 +105,9 @@ type GuiButton<FormType extends Record<string, any>, States extends string> = Ac
|
|
|
105
105
|
type GuiCalendar<FormType extends Record<string, any>, States extends string, V> = InputWidget<string, States, FormType, CalendarProps, V> & {
|
|
106
106
|
type: 'calendar';
|
|
107
107
|
};
|
|
108
|
+
type GuiDateTimeCalendar<FormType extends Record<string, any>, States extends string, V> = InputWidget<string, States, FormType, DateTimeCalendarProps, V> & {
|
|
109
|
+
type: 'dateTimeCalendar';
|
|
110
|
+
};
|
|
108
111
|
type GuiCheckbox<FormType extends Record<string, any>, States extends string, V> = InputWidget<boolean, States, FormType, CheckboxProps, V> & {
|
|
109
112
|
type: 'checkbox';
|
|
110
113
|
};
|
|
@@ -117,6 +120,9 @@ type GuiDateinput<FormType extends Record<string, any>, States extends string, V
|
|
|
117
120
|
type GuiDatePicker<FormType extends Record<string, any>, States extends string, V> = InputWidget<string, States, FormType, DatePickerProps, V> & {
|
|
118
121
|
type: 'datePicker';
|
|
119
122
|
};
|
|
123
|
+
type GuiDateTimePicker<FormType extends Record<string, any>, States extends string, V> = InputWidget<string, States, FormType, DateTimePickerProps, V> & {
|
|
124
|
+
type: 'dateTimePicker';
|
|
125
|
+
};
|
|
120
126
|
type GuiDropdown<FormType extends Record<string, any>, States extends string, V> = InputWidget<OptionValue, States, FormType, DropdownProps<unknown>, V> & {
|
|
121
127
|
type: 'dropdown';
|
|
122
128
|
};
|
|
@@ -142,9 +148,24 @@ type GuiRangeCalendar<FormType extends Record<string, any>, States extends strin
|
|
|
142
148
|
type GuiRangeDateInput<FormType extends Record<string, any>, States extends string, V> = InputWidget<DateRange[], States, FormType, RangeDateInputProps, V> & {
|
|
143
149
|
type: 'rangeDateInput';
|
|
144
150
|
};
|
|
151
|
+
type GuiRangeTimeInput<FormType extends Record<string, any>, States extends string, V> = InputWidget<TimeRange[], States, FormType, RangeTimeInputProps, V> & {
|
|
152
|
+
type: 'rangeTimeInput';
|
|
153
|
+
};
|
|
154
|
+
type GuiRangeDateTimeInput<FormType extends Record<string, any>, States extends string, V> = InputWidget<DateTimeRange[], States, FormType, RangeDateTimeInputProps, V> & {
|
|
155
|
+
type: 'rangeDateTimeInput';
|
|
156
|
+
};
|
|
157
|
+
type GuiRangeDateTimeCalendar<FormType extends Record<string, any>, States extends string, V> = InputWidget<DateTimeRange[], States, FormType, RangeDateTimeCalendarProps, V> & {
|
|
158
|
+
type: 'rangeDateTimeCalendar';
|
|
159
|
+
};
|
|
160
|
+
type GuiRangeDateTimePicker<FormType extends Record<string, any>, States extends string, V> = InputWidget<DateTimeRange[], States, FormType, RangeDateTimePickerProps, V> & {
|
|
161
|
+
type: 'rangeDateTimePicker';
|
|
162
|
+
};
|
|
145
163
|
type GuiRangeDatePicker<FormType extends Record<string, any>, States extends string, V> = InputWidget<DateRange[], States, FormType, RangeDatePickerProps, V> & {
|
|
146
164
|
type: 'rangeDatePicker';
|
|
147
165
|
};
|
|
166
|
+
type GuiRangeTimePicker<FormType extends Record<string, any>, States extends string, V> = InputWidget<TimeRange[], States, FormType, RangeTimePickerProps, V> & {
|
|
167
|
+
type: 'rangeTimePicker';
|
|
168
|
+
};
|
|
148
169
|
type GuiRepeater<FormType extends Record<string, any>, States extends string, V, CustomWidget extends FormWidget<any, FormType>> = InputWidget<Record<string, unknown>[], States, FormType, RepeaterProps<LayoutWidget<States, FormType, AccordionProps, GolemWidget<FormType, States, V, CustomWidget>[]>>, V> & {
|
|
149
170
|
type: 'repeater';
|
|
150
171
|
};
|
|
@@ -169,6 +190,15 @@ type GuiTextInput<FormType extends Record<string, any>, States extends string, V
|
|
|
169
190
|
type GuiPassword<FormType extends Record<string, any>, States extends string, V> = InputWidget<string, States, FormType, PasswordProps, V> & {
|
|
170
191
|
type: 'password';
|
|
171
192
|
};
|
|
193
|
+
type GuiTimeInput<FormType extends Record<string, any>, States extends string, V> = InputWidget<string, States, FormType, TimeInputProps, V> & {
|
|
194
|
+
type: 'timeInput';
|
|
195
|
+
};
|
|
196
|
+
type GuiTimePicker<FormType extends Record<string, any>, States extends string, V> = InputWidget<string, States, FormType, TimePickerProps, V> & {
|
|
197
|
+
type: 'timePicker';
|
|
198
|
+
};
|
|
199
|
+
type GuiDateTimeInput<FormType extends Record<string, any>, States extends string, V> = InputWidget<string, States, FormType, DateTimeInputProps, V> & {
|
|
200
|
+
type: 'dateTimeInput';
|
|
201
|
+
};
|
|
172
202
|
type GuiToggle<FormType extends Record<string, any>, States extends string, V> = InputWidget<boolean, States, FormType, ToggleProps, V> & {
|
|
173
203
|
type: 'toggle';
|
|
174
204
|
};
|
package/lib/widget.props.d.ts
CHANGED
|
@@ -3,6 +3,14 @@ export interface DateRange {
|
|
|
3
3
|
start: string;
|
|
4
4
|
end?: string;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* A selected date-time range value. Both ends are local ISO date-time strings
|
|
8
|
+
* (`YYYY-MM-DDTHH:mm:ss`).
|
|
9
|
+
*/
|
|
10
|
+
export interface DateTimeRange {
|
|
11
|
+
start: string;
|
|
12
|
+
end: string;
|
|
13
|
+
}
|
|
6
14
|
export type AccordionProps = {
|
|
7
15
|
singleOpen?: boolean;
|
|
8
16
|
defaultOpen?: {
|
|
@@ -97,6 +105,7 @@ export type MarkdownProps = {
|
|
|
97
105
|
orderedListTitle?: string;
|
|
98
106
|
unorderedListTitle?: string;
|
|
99
107
|
splitViewTitle?: string;
|
|
108
|
+
toolbarAriaLabel?: string;
|
|
100
109
|
defaultOpenPreview?: boolean;
|
|
101
110
|
} & TextareaProps;
|
|
102
111
|
export type CalendarProps = {
|
|
@@ -126,6 +135,16 @@ export type CalendarProps = {
|
|
|
126
135
|
* This label is used to improve accessibility by providing screen readers with descriptive text.
|
|
127
136
|
*/
|
|
128
137
|
nextMonthAriaLabel?: string;
|
|
138
|
+
/**
|
|
139
|
+
* An optional string that represents the ARIA label for the year-selector toggle button in the
|
|
140
|
+
* calendar header. The current year is appended to it. Defaults to 'Select year'.
|
|
141
|
+
*/
|
|
142
|
+
selectYearAriaLabel?: string;
|
|
143
|
+
/**
|
|
144
|
+
* An optional string that represents the ARIA label for the year-selector grid.
|
|
145
|
+
* Defaults to 'Year selection'.
|
|
146
|
+
*/
|
|
147
|
+
yearGridAriaLabel?: string;
|
|
129
148
|
/**
|
|
130
149
|
* Specifies the formatting style for displaying the day portion of a date.
|
|
131
150
|
*
|
|
@@ -181,6 +200,31 @@ export type CalendarProps = {
|
|
|
181
200
|
*/
|
|
182
201
|
numberOfMonths?: number;
|
|
183
202
|
};
|
|
203
|
+
/**
|
|
204
|
+
* Calendar with an embedded time picker. The value is a local ISO date-time
|
|
205
|
+
* (YYYY-MM-DDTHH:mm:ss), emitted only when both the day and the time are
|
|
206
|
+
* selected; picking a different day clears the time and emits null. With
|
|
207
|
+
* numberOfMonths > 1 the time row and grid render on the first panel only.
|
|
208
|
+
*/
|
|
209
|
+
export type DateTimeCalendarProps = CalendarProps & {
|
|
210
|
+
/** '12' or '24'. Defaults to the locale's hour cycle. */
|
|
211
|
+
hourFormat?: '12' | '24';
|
|
212
|
+
/** Minutes between selectable slots. Defaults to 30. */
|
|
213
|
+
minuteStep?: number;
|
|
214
|
+
/** First selectable time (ISO time, inclusive). Defaults to '00:00:00'. */
|
|
215
|
+
minTime?: string;
|
|
216
|
+
/** Last selectable time (ISO time, inclusive). Defaults to '23:59:59'. */
|
|
217
|
+
maxTime?: string;
|
|
218
|
+
/** Times inside these ranges render disabled; entries can scope per day. */
|
|
219
|
+
disabledTimeRanges?: DisabledTimeRange[];
|
|
220
|
+
/** Allows typing a time in the input; when false (default) times come only from the grid. */
|
|
221
|
+
allowCustomTime?: boolean;
|
|
222
|
+
minTimeMessage?: Localizable;
|
|
223
|
+
maxTimeMessage?: Localizable;
|
|
224
|
+
disabledTimeRangeMessage?: Localizable;
|
|
225
|
+
/** Shown in the time grid when the bounds yield no slots. Defaults to 'No available times'. */
|
|
226
|
+
noAvailableTimesMessage?: Localizable;
|
|
227
|
+
};
|
|
184
228
|
export type RangeCalendarProps = {
|
|
185
229
|
/**
|
|
186
230
|
* An optional descriptive text providing guidance or information about the associated widget or functionality.
|
|
@@ -208,6 +252,16 @@ export type RangeCalendarProps = {
|
|
|
208
252
|
* This label is used to improve accessibility by providing screen readers with descriptive text.
|
|
209
253
|
*/
|
|
210
254
|
nextMonthAriaLabel?: string;
|
|
255
|
+
/**
|
|
256
|
+
* An optional string that represents the ARIA label for the year-selector toggle button in the
|
|
257
|
+
* calendar header. The current year is appended to it. Defaults to 'Select year'.
|
|
258
|
+
*/
|
|
259
|
+
selectYearAriaLabel?: string;
|
|
260
|
+
/**
|
|
261
|
+
* An optional string that represents the ARIA label for the year-selector grid.
|
|
262
|
+
* Defaults to 'Year selection'.
|
|
263
|
+
*/
|
|
264
|
+
yearGridAriaLabel?: string;
|
|
211
265
|
/**
|
|
212
266
|
* Specifies the formatting style for displaying the day portion of a date.
|
|
213
267
|
*
|
|
@@ -257,6 +311,13 @@ export type RangeCalendarProps = {
|
|
|
257
311
|
* @type {DateRange[] | undefined}
|
|
258
312
|
*/
|
|
259
313
|
disabledRanges?: DateRange[];
|
|
314
|
+
/**
|
|
315
|
+
* Error surfaced when a selected range spans one or more disabled days. The
|
|
316
|
+
* whole range is rejected (no pill added), rather than split around the
|
|
317
|
+
* disabled days — consistent with the time pickers. Defaults to
|
|
318
|
+
* "Invalid date: date is within a disabled range."
|
|
319
|
+
*/
|
|
320
|
+
disabledDateRangeMessage?: Localizable;
|
|
260
321
|
/**
|
|
261
322
|
* Specifies the number of months to be displayed in the calendar.
|
|
262
323
|
* Default is 1.
|
|
@@ -270,6 +331,79 @@ export type RangeCalendarProps = {
|
|
|
270
331
|
export type DateinputProps = {
|
|
271
332
|
hint?: string;
|
|
272
333
|
icon?: string;
|
|
334
|
+
dayAriaLabel?: string;
|
|
335
|
+
monthAriaLabel?: string;
|
|
336
|
+
yearAriaLabel?: string;
|
|
337
|
+
invalidDateMessage?: Localizable;
|
|
338
|
+
/** Earliest allowed date (ISO date, inclusive). */
|
|
339
|
+
minDate?: string;
|
|
340
|
+
/** Latest allowed date (ISO date, inclusive). */
|
|
341
|
+
maxDate?: string;
|
|
342
|
+
minDateMessage?: Localizable;
|
|
343
|
+
maxDateMessage?: Localizable;
|
|
344
|
+
};
|
|
345
|
+
export type DateTimeInputProps = {
|
|
346
|
+
hint?: string;
|
|
347
|
+
icon?: string;
|
|
348
|
+
dayAriaLabel?: string;
|
|
349
|
+
monthAriaLabel?: string;
|
|
350
|
+
yearAriaLabel?: string;
|
|
351
|
+
hourAriaLabel?: string;
|
|
352
|
+
minuteAriaLabel?: string;
|
|
353
|
+
dayPeriodAriaLabel?: string;
|
|
354
|
+
hourFormat?: '12' | '24';
|
|
355
|
+
minuteStep?: number;
|
|
356
|
+
invalidDateMessage?: Localizable;
|
|
357
|
+
/** Earliest allowed date (ISO date, inclusive). */
|
|
358
|
+
minDate?: string;
|
|
359
|
+
/** Latest allowed date (ISO date, inclusive). */
|
|
360
|
+
maxDate?: string;
|
|
361
|
+
/** First allowed time (ISO time, inclusive). */
|
|
362
|
+
minTime?: string;
|
|
363
|
+
/** Last allowed time (ISO time, inclusive). */
|
|
364
|
+
maxTime?: string;
|
|
365
|
+
minDateMessage?: Localizable;
|
|
366
|
+
maxDateMessage?: Localizable;
|
|
367
|
+
minTimeMessage?: Localizable;
|
|
368
|
+
maxTimeMessage?: Localizable;
|
|
369
|
+
};
|
|
370
|
+
export type TimeInputProps = {
|
|
371
|
+
hint?: string;
|
|
372
|
+
icon?: string;
|
|
373
|
+
hourAriaLabel?: string;
|
|
374
|
+
minuteAriaLabel?: string;
|
|
375
|
+
dayPeriodAriaLabel?: string;
|
|
376
|
+
hourFormat?: '12' | '24';
|
|
377
|
+
minuteStep?: number;
|
|
378
|
+
/** First allowed time (ISO time, inclusive). */
|
|
379
|
+
minTime?: string;
|
|
380
|
+
/** Last allowed time (ISO time, inclusive). */
|
|
381
|
+
maxTime?: string;
|
|
382
|
+
minTimeMessage?: Localizable;
|
|
383
|
+
maxTimeMessage?: Localizable;
|
|
384
|
+
};
|
|
385
|
+
/**
|
|
386
|
+
* A time range value (also the base of {@link DisabledTimeRange}).
|
|
387
|
+
*/
|
|
388
|
+
export type TimeRange = {
|
|
389
|
+
start: string;
|
|
390
|
+
end: string;
|
|
391
|
+
};
|
|
392
|
+
export type DisabledTimeRange = TimeRange & {
|
|
393
|
+
/** ISO date (YYYY-MM-DD): the range only applies on that date. */
|
|
394
|
+
date?: string;
|
|
395
|
+
/** Weekday numbers as returned by Date.prototype.getDay(): 0=Sunday … 6=Saturday. */
|
|
396
|
+
weekdays?: number[];
|
|
397
|
+
};
|
|
398
|
+
export type TimePickerProps = TimeInputProps & PickerToggleProps & {
|
|
399
|
+
/** Times inside these ranges (both ends inclusive) render disabled. */
|
|
400
|
+
disabledRanges?: TimeRange[];
|
|
401
|
+
/** Allows typing a time in the input; when false (default) values come only from the list. */
|
|
402
|
+
allowCustomTime?: boolean;
|
|
403
|
+
height?: number;
|
|
404
|
+
itemHeight?: number;
|
|
405
|
+
disabledRangeMessage?: Localizable;
|
|
406
|
+
noAvailableTimesMessage?: Localizable;
|
|
273
407
|
};
|
|
274
408
|
export type RangeDateInputProps = {
|
|
275
409
|
hint?: string;
|
|
@@ -278,40 +412,123 @@ export type RangeDateInputProps = {
|
|
|
278
412
|
removePillAriaLabel?: string;
|
|
279
413
|
startDateAriaLabel?: string;
|
|
280
414
|
endDateAriaLabel?: string;
|
|
415
|
+
dayAriaLabel?: string;
|
|
416
|
+
monthAriaLabel?: string;
|
|
417
|
+
yearAriaLabel?: string;
|
|
418
|
+
invalidDateMessage?: Localizable;
|
|
419
|
+
};
|
|
420
|
+
export type DateBoundsMessageProps = {
|
|
421
|
+
minDateMessage?: Localizable;
|
|
422
|
+
maxDateMessage?: Localizable;
|
|
423
|
+
disabledDateRangeMessage?: Localizable;
|
|
281
424
|
};
|
|
282
|
-
|
|
425
|
+
/** The popup toggle button shared by the six pickers. */
|
|
426
|
+
export type PickerToggleProps = {
|
|
427
|
+
toggleAriaLabel?: string;
|
|
428
|
+
};
|
|
429
|
+
export type DatePickerProps = CalendarProps & DateinputProps & DateBoundsMessageProps & PickerToggleProps;
|
|
430
|
+
export type DateTimePickerProps = DateTimeCalendarProps & DateTimeInputProps & DateBoundsMessageProps & PickerToggleProps;
|
|
431
|
+
export type RangeDatePickerProps = RangeCalendarProps & RangeDateInputProps & DateBoundsMessageProps & PickerToggleProps;
|
|
432
|
+
export type RangeDateTimeCalendarProps = Omit<RangeCalendarProps, 'minDate' | 'maxDate' | 'disabledRanges' | 'disabledDateRangeMessage'> & {
|
|
433
|
+
hourFormat?: '12' | '24';
|
|
434
|
+
minuteStep?: number;
|
|
435
|
+
/** Allows typing a time in each picker; when false (default) times come only from the grid. */
|
|
436
|
+
allowCustomTime?: boolean;
|
|
437
|
+
/** Visible heading on the start time picker. Defaults to "Start time". */
|
|
438
|
+
startTimeLabel?: Localizable;
|
|
439
|
+
/** Visible heading on the end time picker. Defaults to "End time". */
|
|
440
|
+
endTimeLabel?: Localizable;
|
|
441
|
+
/** Earliest allowed instant (ISO date-time, inclusive). */
|
|
442
|
+
minDateTime?: string;
|
|
443
|
+
/** Latest allowed instant (ISO date-time, inclusive). */
|
|
444
|
+
maxDateTime?: string;
|
|
445
|
+
minDateTimeMessage?: Localizable;
|
|
446
|
+
maxDateTimeMessage?: Localizable;
|
|
447
|
+
/** Disabled instant spans. Blocking a whole day is a span of 00:00:00–23:59:59. */
|
|
448
|
+
disabledRanges?: DateTimeRange[];
|
|
449
|
+
/** Error surfaced when a selected range steps over, or overlaps, a disabled span. */
|
|
450
|
+
disabledRangeMessage?: Localizable;
|
|
451
|
+
/** Shown in a time grid when the bounds yield no slots. Defaults to 'No available times'. */
|
|
452
|
+
noAvailableTimesMessage?: Localizable;
|
|
453
|
+
/**
|
|
454
|
+
* ARIA label template for the per-day count badge; a `{count}` token is
|
|
455
|
+
* substituted with the number of ranges on that day. Defaults to '{count} ranges'.
|
|
456
|
+
*/
|
|
457
|
+
dayCountAriaLabel?: Localizable;
|
|
458
|
+
/**
|
|
459
|
+
* ARIA label template for the grey per-day disabled-spans badge shown on
|
|
460
|
+
* partially-blocked days; a `{count}` token is substituted with the number of
|
|
461
|
+
* disabled spans on that day. Defaults to '{count} disabled ranges'.
|
|
462
|
+
*/
|
|
463
|
+
disabledDayCountAriaLabel?: Localizable;
|
|
464
|
+
};
|
|
465
|
+
export type RangeTimeInputProps = {
|
|
283
466
|
hint?: string;
|
|
284
467
|
icon?: string;
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
468
|
+
separator?: string;
|
|
469
|
+
removePillAriaLabel?: string;
|
|
470
|
+
startTimeAriaLabel?: string;
|
|
471
|
+
endTimeAriaLabel?: string;
|
|
472
|
+
hourAriaLabel?: string;
|
|
473
|
+
minuteAriaLabel?: string;
|
|
474
|
+
dayPeriodAriaLabel?: string;
|
|
475
|
+
hourFormat?: '12' | '24';
|
|
476
|
+
minuteStep?: number;
|
|
477
|
+
/** First allowed time (ISO time, inclusive). */
|
|
478
|
+
minTime?: string;
|
|
479
|
+
/** Last allowed time (ISO time, inclusive). */
|
|
480
|
+
maxTime?: string;
|
|
481
|
+
minTimeMessage?: Localizable;
|
|
482
|
+
maxTimeMessage?: Localizable;
|
|
483
|
+
/** Shown when the entered "time out" is not strictly after "time in". */
|
|
484
|
+
rangeOrderMessage?: Localizable;
|
|
296
485
|
};
|
|
297
|
-
export type
|
|
486
|
+
export type RangeDateTimeInputProps = {
|
|
298
487
|
hint?: string;
|
|
299
488
|
icon?: string;
|
|
300
489
|
separator?: string;
|
|
301
490
|
removePillAriaLabel?: string;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
491
|
+
startDateTimeAriaLabel?: string;
|
|
492
|
+
endDateTimeAriaLabel?: string;
|
|
493
|
+
dayAriaLabel?: string;
|
|
494
|
+
monthAriaLabel?: string;
|
|
495
|
+
yearAriaLabel?: string;
|
|
496
|
+
hourAriaLabel?: string;
|
|
497
|
+
minuteAriaLabel?: string;
|
|
498
|
+
dayPeriodAriaLabel?: string;
|
|
499
|
+
hourFormat?: '12' | '24';
|
|
500
|
+
minuteStep?: number;
|
|
501
|
+
invalidDateMessage?: Localizable;
|
|
502
|
+
/**
|
|
503
|
+
* Earliest allowed date-time (ISO date-time, inclusive). Each endpoint of the
|
|
504
|
+
* value is an instant, so the bound is an instant too: a date-only bound
|
|
505
|
+
* cannot say whether its last day is allowed until 00:00 or 23:59.
|
|
506
|
+
*/
|
|
507
|
+
minDateTime?: string;
|
|
508
|
+
/** Latest allowed date-time (ISO date-time, inclusive). */
|
|
509
|
+
maxDateTime?: string;
|
|
510
|
+
minDateTimeMessage?: Localizable;
|
|
511
|
+
maxDateTimeMessage?: Localizable;
|
|
512
|
+
};
|
|
513
|
+
/**
|
|
514
|
+
* The date-time range picker is the calendar (instant-space bounds, disabled
|
|
515
|
+
* spans, two time pickers, per-day count badge) with the typed range input as
|
|
516
|
+
* its trigger.
|
|
517
|
+
*/
|
|
518
|
+
export type RangeDateTimePickerProps = RangeDateTimeCalendarProps & RangeDateTimeInputProps & PickerToggleProps;
|
|
519
|
+
export type RangeTimePickerProps = RangeTimeInputProps & PickerToggleProps & {
|
|
520
|
+
/** Times inside these ranges (both ends inclusive) render disabled. */
|
|
521
|
+
disabledRanges?: TimeRange[];
|
|
522
|
+
/** Allows typing a time in the input; when false (default) values come only from the lists. */
|
|
523
|
+
allowCustomTime?: boolean;
|
|
524
|
+
height?: number;
|
|
525
|
+
itemHeight?: number;
|
|
526
|
+
/** Visible heading above the "time in" list in the popover. Defaults to "Start time". */
|
|
527
|
+
startTimeLabel?: Localizable;
|
|
528
|
+
/** Visible heading above the "time out" list in the popover. Defaults to "End time". */
|
|
529
|
+
endTimeLabel?: Localizable;
|
|
530
|
+
disabledRangeMessage?: Localizable;
|
|
531
|
+
noAvailableTimesMessage?: Localizable;
|
|
315
532
|
};
|
|
316
533
|
export type NumberinputProps = {
|
|
317
534
|
placeholder?: string;
|
|
@@ -376,10 +593,13 @@ export type SelectProps = {
|
|
|
376
593
|
placeholder?: string;
|
|
377
594
|
labelField?: string;
|
|
378
595
|
valueField?: string;
|
|
596
|
+
invalidOptionMessage?: Localizable;
|
|
379
597
|
};
|
|
380
598
|
export type ListItem<T> = {
|
|
381
599
|
template: T;
|
|
382
600
|
value: OptionValue;
|
|
601
|
+
/** Disabled items render greyed out, are skipped by keyboard navigation and cannot be selected */
|
|
602
|
+
disabled?: boolean;
|
|
383
603
|
};
|
|
384
604
|
type ItemKeys<T> = T extends Record<string, any> ? keyof T : string;
|
|
385
605
|
export type DropdownProps<T> = {
|
package/lib/widgets.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const inputWidgets: readonly ["calendar", "checkbox", "currency", "dateInput", "datePicker", "dropdown", "list", "markdown", "number", "password", "radiogroup", "rangeCalendar", "rangeDateInput", "rangeDatePicker", "repeater", "select", "tags", "textarea", "textinput", "toggle"];
|
|
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"];
|
|
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" | "password" | "checkbox" | "dateInput" | "currency" | "rangeCalendar" | "select" | "radiogroup" | "tabs" | "list" | "datePicker" | "dropdown" | "markdown" | "rangeDateInput" | "rangeDatePicker" | "textarea" | "calendar" | "grid" | "toggle" | "textinput" | "renderer" | "alert" | "markdownText" | "accordion")[];
|
|
5
|
+
export declare const golemWidgets: ("number" | "button" | "repeater" | "flex" | "tags" | "password" | "checkbox" | "dateInput" | "currency" | "rangeCalendar" | "select" | "radiogroup" | "tabs" | "list" | "datePicker" | "dropdown" | "markdown" | "rangeDateInput" | "rangeDatePicker" | "textarea" | "calendar" | "dateTimeCalendar" | "dateTimePicker" | "rangeDateTimeInput" | "rangeDateTimeCalendar" | "rangeDateTimePicker" | "rangeTimeInput" | "rangeTimePicker" | "timeInput" | "timePicker" | "dateTimeInput" | "grid" | "toggle" | "textinput" | "renderer" | "alert" | "markdownText" | "accordion")[];
|
|
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.0
|
|
3
|
+
"version": "1.1.1-rc.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.umd.cjs",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"*.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@golemui/core": "1.0
|
|
35
|
-
"@golemui/gui-validators": "1.0
|
|
34
|
+
"@golemui/core": "1.1.1-rc.0",
|
|
35
|
+
"@golemui/gui-validators": "1.1.1-rc.0"
|
|
36
36
|
},
|
|
37
37
|
"repository": {
|
|
38
38
|
"type": "git",
|