@progress/kendo-react-scheduler 15.2.0-develop.4 → 15.2.0-develop.6
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/Scheduler.d.ts +2 -2
- package/Scheduler.js +1 -1
- package/Scheduler.mjs +394 -302
- package/components/DateHeaderCell.js +1 -1
- package/components/DateHeaderCell.mjs +23 -20
- package/components/MoreEventsPopover.d.ts +25 -0
- package/components/MoreEventsPopover.js +8 -0
- package/components/MoreEventsPopover.mjs +59 -0
- package/components/SchedulerForm.d.ts +4 -0
- package/components/SchedulerForm.js +1 -1
- package/components/SchedulerForm.mjs +113 -100
- package/components/SchedulerRemoveDialog.d.ts +4 -0
- package/components/SchedulerRemoveDialog.js +1 -1
- package/components/SchedulerRemoveDialog.mjs +29 -29
- package/components/ShowMoreItemsButton.d.ts +1 -0
- package/components/ShowMoreItemsButton.js +1 -1
- package/components/ShowMoreItemsButton.mjs +33 -26
- package/components/header/navigation/NavigationDatePicker.d.ts +9 -1
- package/components/header/navigation/NavigationDatePicker.js +1 -1
- package/components/header/navigation/NavigationDatePicker.mjs +65 -71
- package/components/header/view-selector/ViewSelectorList.d.ts +9 -1
- package/components/header/view-selector/ViewSelectorList.js +1 -1
- package/components/header/view-selector/ViewSelectorList.mjs +35 -51
- package/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/editors/RemoveRecurrenceConfirmDialog.d.ts +17 -0
- package/editors/RemoveRecurrenceConfirmDialog.js +8 -0
- package/editors/RemoveRecurrenceConfirmDialog.mjs +28 -0
- package/editors/ResourceEditor.d.ts +1 -0
- package/editors/ResourceEditor.js +1 -1
- package/editors/ResourceEditor.mjs +18 -17
- package/editors/SchedulerFormEditor.d.ts +69 -356
- package/editors/SchedulerFormEditor.js +1 -1
- package/editors/SchedulerFormEditor.mjs +360 -227
- package/editors/SchedulerRecurrenceDialog.d.ts +30 -0
- package/editors/SchedulerRecurrenceDialog.js +8 -0
- package/editors/SchedulerRecurrenceDialog.mjs +463 -0
- package/editors/{FilterableComboBox.d.ts → TimezoneDropDownList.d.ts} +2 -2
- package/editors/TimezoneDropDownList.js +8 -0
- package/editors/TimezoneDropDownList.mjs +42 -0
- package/editors/ZonedDateTime.d.ts +2 -0
- package/editors/ZonedDateTime.js +1 -1
- package/editors/ZonedDateTime.mjs +11 -18
- package/editors/ZonedSplitDateTime.d.ts +34 -0
- package/editors/ZonedSplitDateTime.js +8 -0
- package/editors/ZonedSplitDateTime.mjs +72 -0
- package/hooks/index.d.ts +2 -0
- package/hooks/useGroupRowHeightSync.d.ts +10 -0
- package/hooks/useGroupRowHeightSync.js +8 -0
- package/hooks/useGroupRowHeightSync.mjs +84 -0
- package/hooks/useRecurrenceSummary.d.ts +10 -0
- package/hooks/useRecurrenceSummary.js +8 -0
- package/hooks/useRecurrenceSummary.mjs +69 -0
- package/hooks/useSlotExpand.js +1 -1
- package/hooks/useSlotExpand.mjs +55 -45
- package/hooks/useToolbarResponsive.d.ts +22 -0
- package/hooks/useToolbarResponsive.js +8 -0
- package/hooks/useToolbarResponsive.mjs +37 -0
- package/index.d.mts +5 -2
- package/index.d.ts +5 -2
- package/index.js +1 -1
- package/index.mjs +83 -79
- package/items/SchedulerEditItem.js +1 -1
- package/items/SchedulerEditItem.mjs +361 -347
- package/items/SchedulerItem.d.ts +4 -0
- package/items/SchedulerItem.js +1 -1
- package/items/SchedulerItem.mjs +171 -185
- package/items/SchedulerProportionalViewItem.js +1 -1
- package/items/SchedulerProportionalViewItem.mjs +111 -94
- package/items/SchedulerViewItem.js +1 -1
- package/items/SchedulerViewItem.mjs +175 -142
- package/messages/index.d.ts +75 -0
- package/messages/index.js +1 -1
- package/messages/index.mjs +147 -97
- package/models/Item.d.ts +2 -0
- package/models/Occurrence.d.ts +2 -0
- package/models/SchedulerModelFields.d.ts +5 -0
- package/models/SchedulerResource.d.ts +6 -0
- package/models/SchedulerView.d.ts +3 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -11
- package/services/itemsService.js +1 -1
- package/services/itemsService.mjs +34 -32
- package/services/occurrenceService.js +1 -1
- package/services/occurrenceService.mjs +27 -26
- package/tasks/SchedulerTask.js +1 -1
- package/tasks/SchedulerTask.mjs +26 -26
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -1
- package/utils/index.mjs +7 -6
- package/views/agenda/AgendaView.js +1 -1
- package/views/agenda/AgendaView.mjs +7 -7
- package/views/day/DayView.js +1 -1
- package/views/day/DayView.mjs +2 -2
- package/views/day/MultiDayView.js +1 -1
- package/views/day/MultiDayView.mjs +2 -2
- package/views/month/MonthView.js +1 -1
- package/views/month/MonthView.mjs +111 -82
- package/views/time/MultiDayTimelineView.js +1 -1
- package/views/time/MultiDayTimelineView.mjs +23 -23
- package/views/time/TimelineView.js +1 -1
- package/views/time/TimelineView.mjs +2 -2
- package/views/week/WeekView.js +1 -1
- package/views/week/WeekView.mjs +5 -5
- package/views/week/WorkWeekView.js +1 -1
- package/views/week/WorkWeekView.mjs +15 -15
- package/editors/FilterableComboBox.js +0 -8
- package/editors/FilterableComboBox.mjs +0 -30
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { RecurrenceRule } from '@progress/kendo-recurrence';
|
|
9
|
+
import { LabelProps } from '@progress/kendo-react-labels';
|
|
9
10
|
import { FormRenderProps, FieldProps, FormElementProps, FormElementHandle } from '@progress/kendo-react-form';
|
|
10
|
-
import { InputProps,
|
|
11
|
-
import {
|
|
11
|
+
import { InputProps, TextAreaProps, SwitchProps } from '@progress/kendo-react-inputs';
|
|
12
|
+
import { DropDownListProps, MultiSelectProps } from '@progress/kendo-react-dropdowns';
|
|
12
13
|
import { Omit } from '../models/Omit';
|
|
13
14
|
import { ZonedDateTimeProps } from './ZonedDateTime.js';
|
|
14
15
|
import * as React from 'react';
|
|
@@ -20,6 +21,41 @@ type TargetlessChangeEvent<E extends {
|
|
|
20
21
|
value: T;
|
|
21
22
|
}) => void;
|
|
22
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Represents the props passed to the [`recurrenceButtonTextTemplate`](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerformeditorprops#toc-recurrenceButtonTextTemplate) component.
|
|
26
|
+
*/
|
|
27
|
+
export interface RecurrenceButtonTextTemplateProps {
|
|
28
|
+
/**
|
|
29
|
+
* The current recurrence rule string (RRULE), or `null` when no recurrence is set.
|
|
30
|
+
*/
|
|
31
|
+
recurrenceRule: string | null;
|
|
32
|
+
/**
|
|
33
|
+
* The default summary text computed by the Scheduler for the current recurrence rule,
|
|
34
|
+
* or `null` when no recurrence is set.
|
|
35
|
+
*/
|
|
36
|
+
text: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* The parsed recurrence rule object, or `null` when no recurrence is set.
|
|
39
|
+
*/
|
|
40
|
+
parsedRule: RecurrenceRule | null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Represents the props passed to the [`recurrenceEditorHintTemplate`](https://www.telerik.com/kendo-react-ui/components/scheduler/api/schedulerformeditorprops#toc-recurrenceEditorHintTemplate) component.
|
|
44
|
+
*/
|
|
45
|
+
export interface RecurrenceEditorHintTemplateProps {
|
|
46
|
+
/**
|
|
47
|
+
* The current recurrence rule string (RRULE).
|
|
48
|
+
*/
|
|
49
|
+
recurrenceRule: string;
|
|
50
|
+
/**
|
|
51
|
+
* The default summary text computed by the Scheduler for the current recurrence rule.
|
|
52
|
+
*/
|
|
53
|
+
text: string;
|
|
54
|
+
/**
|
|
55
|
+
* The parsed recurrence rule object.
|
|
56
|
+
*/
|
|
57
|
+
parsedRule: RecurrenceRule;
|
|
58
|
+
}
|
|
23
59
|
/**
|
|
24
60
|
* Represents the props of the KendoReact `SchedulerFormEditor` component.
|
|
25
61
|
*/
|
|
@@ -34,20 +70,6 @@ export interface SchedulerFormEditorProps extends Omit<FormElementProps, 'childr
|
|
|
34
70
|
* Specifies the `tabIndex` attribute of the root element.
|
|
35
71
|
*/
|
|
36
72
|
tabIndex?: number;
|
|
37
|
-
/**
|
|
38
|
-
* Overrides the component used for visualizing the `title` field label.
|
|
39
|
-
* The [KendoReact Label](https://www.telerik.com/kendo-react-ui/components/labels/label) component is used, by default.
|
|
40
|
-
*
|
|
41
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
42
|
-
*/
|
|
43
|
-
titleLabel?: React.ComponentType<LabelProps & FieldProps>;
|
|
44
|
-
/**
|
|
45
|
-
* Overrides the component used for visualizing the `title` field error.
|
|
46
|
-
* The [KendoReact Error](https://www.telerik.com/kendo-react-ui/components/labels/error) component is used, by default.
|
|
47
|
-
*
|
|
48
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
49
|
-
*/
|
|
50
|
-
titleError?: React.ComponentType<LabelProps & FieldProps>;
|
|
51
73
|
/**
|
|
52
74
|
* Overrides the component used for visualizing the `title` field editor.
|
|
53
75
|
* The [KendoReact Input](https://www.telerik.com/kendo-react-ui/components/inputs/input) component is used, by default.
|
|
@@ -55,20 +77,6 @@ export interface SchedulerFormEditorProps extends Omit<FormElementProps, 'childr
|
|
|
55
77
|
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
56
78
|
*/
|
|
57
79
|
titleEditor?: React.ComponentType<TargetlessChangeEvent<InputProps & FieldProps, string>>;
|
|
58
|
-
/**
|
|
59
|
-
* Overrides the component used for visualizing the `start` field label.
|
|
60
|
-
* The [KendoReact Label](https://www.telerik.com/kendo-react-ui/components/labels/label) component is used, by default.
|
|
61
|
-
*
|
|
62
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
63
|
-
*/
|
|
64
|
-
startLabel?: React.ComponentType<LabelProps & FieldProps>;
|
|
65
|
-
/**
|
|
66
|
-
* Overrides the component used for visualizing the `start` field error.
|
|
67
|
-
* The [KendoReact Error](https://www.telerik.com/kendo-react-ui/components/labels/error) component is used, by default.
|
|
68
|
-
*
|
|
69
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
70
|
-
*/
|
|
71
|
-
startError?: React.ComponentType<ErrorProps & FieldProps>;
|
|
72
80
|
/**
|
|
73
81
|
* Overrides the component used for visualizing the `start` field editor.
|
|
74
82
|
* The [KendoReact DatePicker](https://www.telerik.com/kendo-react-ui/components/dateinputs/datepicker) or [KendoReact DateTimePicker](https://www.telerik.com/kendo-react-ui/components/dateinputs/datetimepicker) component is used by default depending on the `allDay` field value.
|
|
@@ -76,55 +84,13 @@ export interface SchedulerFormEditorProps extends Omit<FormElementProps, 'childr
|
|
|
76
84
|
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
77
85
|
*/
|
|
78
86
|
startEditor?: React.ComponentType<TargetlessChangeEvent<ZonedDateTimeProps & FieldProps, Date>>;
|
|
79
|
-
/**
|
|
80
|
-
* Overrides the component used for visualizing the `start timezone` field label.
|
|
81
|
-
* The [KendoReact Label](https://www.telerik.com/kendo-react-ui/components/labels/label) component is used, by default.
|
|
82
|
-
*
|
|
83
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
84
|
-
*/
|
|
85
|
-
startTimezoneLabel?: React.ComponentType<LabelProps & FieldProps>;
|
|
86
|
-
/**
|
|
87
|
-
* Overrides the component used for visualizing the `start timezone` field error.
|
|
88
|
-
* The [KendoReact Error](https://www.telerik.com/kendo-react-ui/components/labels/error) component is used, by default.
|
|
89
|
-
*
|
|
90
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
91
|
-
*/
|
|
92
|
-
startTimezoneError?: React.ComponentType<ErrorProps & FieldProps>;
|
|
93
87
|
/**
|
|
94
88
|
* Overrides the component used for visualizing the `start timezone` field editor.
|
|
95
|
-
*
|
|
89
|
+
* A [KendoReact DropDownList](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist) component is used, by default.
|
|
96
90
|
*
|
|
97
91
|
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
98
92
|
*/
|
|
99
|
-
startTimezoneEditor?: React.ComponentType<TargetlessChangeEvent<
|
|
100
|
-
/**
|
|
101
|
-
* Overrides the component used for visualizing the `start timezone checked` label.
|
|
102
|
-
* The [KendoReact Label](https://www.telerik.com/kendo-react-ui/components/labels/label) component is used, by default.
|
|
103
|
-
*
|
|
104
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
105
|
-
*/
|
|
106
|
-
startTimezoneCheckedLabel?: React.ComponentType<LabelProps>;
|
|
107
|
-
/**
|
|
108
|
-
* Overrides the component used for visualizing the `start timezone checked` editor.
|
|
109
|
-
* The [KendoReact Checkbox](https://www.telerik.com/kendo-react-ui/components/inputs/checkbox) component is used, by default.
|
|
110
|
-
*
|
|
111
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
112
|
-
*/
|
|
113
|
-
startTimezoneCheckedEditor?: React.ComponentType<TargetlessChangeEvent<CheckboxProps, boolean>>;
|
|
114
|
-
/**
|
|
115
|
-
* Overrides the component used for visualizing the `end` field label.
|
|
116
|
-
* The [KendoReact Label](https://www.telerik.com/kendo-react-ui/components/labels/label) component is used, by default.
|
|
117
|
-
*
|
|
118
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
119
|
-
*/
|
|
120
|
-
endLabel?: React.ComponentType<LabelProps & FieldProps>;
|
|
121
|
-
/**
|
|
122
|
-
* Overrides the component used for visualizing the `end` field error.
|
|
123
|
-
* The [KendoReact Error](https://www.telerik.com/kendo-react-ui/components/labels/error) component is used, by default.
|
|
124
|
-
*
|
|
125
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
126
|
-
*/
|
|
127
|
-
endError?: React.ComponentType<ErrorProps & FieldProps>;
|
|
93
|
+
startTimezoneEditor?: React.ComponentType<TargetlessChangeEvent<DropDownListProps & FieldProps, string>>;
|
|
128
94
|
/**
|
|
129
95
|
* Overrides the component used for visualizing the `end` field editor.
|
|
130
96
|
* The [KendoReact DatePicker](https://www.telerik.com/kendo-react-ui/components/dateinputs/datepicker) or [KendoReact DateTimePicker](https://www.telerik.com/kendo-react-ui/components/dateinputs/datetimepicker) component is used by default depending on the `allDay` field value.
|
|
@@ -132,41 +98,27 @@ export interface SchedulerFormEditorProps extends Omit<FormElementProps, 'childr
|
|
|
132
98
|
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
133
99
|
*/
|
|
134
100
|
endEditor?: React.ComponentType<TargetlessChangeEvent<ZonedDateTimeProps & FieldProps, Date>>;
|
|
135
|
-
/**
|
|
136
|
-
* Overrides the component used for visualizing the `end timezone` field label.
|
|
137
|
-
* The [KendoReact Label](https://www.telerik.com/kendo-react-ui/components/labels/label) component is used, by default.
|
|
138
|
-
*
|
|
139
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
140
|
-
*/
|
|
141
|
-
endTimezoneLabel?: React.ComponentType<LabelProps>;
|
|
142
|
-
/**
|
|
143
|
-
* Overrides the component used for visualizing the `end timezone` field error.
|
|
144
|
-
* The [KendoReact Error](https://www.telerik.com/kendo-react-ui/components/labels/error) component is used, by default.
|
|
145
|
-
*
|
|
146
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
147
|
-
*/
|
|
148
|
-
endTimezoneError?: React.ComponentType<ErrorProps>;
|
|
149
101
|
/**
|
|
150
102
|
* Overrides the component used for visualizing the `end timezone` field editor.
|
|
151
|
-
*
|
|
103
|
+
* A [KendoReact DropDownList](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist) component is used, by default.
|
|
152
104
|
*
|
|
153
105
|
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
154
106
|
*/
|
|
155
|
-
endTimezoneEditor?: React.ComponentType<TargetlessChangeEvent<
|
|
107
|
+
endTimezoneEditor?: React.ComponentType<TargetlessChangeEvent<DropDownListProps, string>>;
|
|
156
108
|
/**
|
|
157
|
-
* Overrides the component used for visualizing the `start
|
|
109
|
+
* Overrides the component used for visualizing the `start` field label.
|
|
158
110
|
* The [KendoReact Label](https://www.telerik.com/kendo-react-ui/components/labels/label) component is used, by default.
|
|
159
111
|
*
|
|
160
112
|
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
161
113
|
*/
|
|
162
|
-
|
|
114
|
+
startLabel?: React.ComponentType<LabelProps & FieldProps>;
|
|
163
115
|
/**
|
|
164
|
-
* Overrides the component used for visualizing the `end
|
|
165
|
-
* The [KendoReact
|
|
116
|
+
* Overrides the component used for visualizing the `end` field label.
|
|
117
|
+
* The [KendoReact Label](https://www.telerik.com/kendo-react-ui/components/labels/label) component is used, by default.
|
|
166
118
|
*
|
|
167
119
|
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
168
120
|
*/
|
|
169
|
-
|
|
121
|
+
endLabel?: React.ComponentType<LabelProps & FieldProps>;
|
|
170
122
|
/**
|
|
171
123
|
* Overrides the component used for visualizing the `allDay` field label.
|
|
172
124
|
* The [KendoReact Label](https://www.telerik.com/kendo-react-ui/components/labels/label) component is used, by default.
|
|
@@ -176,11 +128,11 @@ export interface SchedulerFormEditorProps extends Omit<FormElementProps, 'childr
|
|
|
176
128
|
allDayLabel?: React.ComponentType<LabelProps & FieldProps>;
|
|
177
129
|
/**
|
|
178
130
|
* Overrides the component used for visualizing the `allDay` field editor.
|
|
179
|
-
* The [KendoReact
|
|
131
|
+
* The [KendoReact Switch](https://www.telerik.com/kendo-react-ui/components/inputs/switch) component is used, by default.
|
|
180
132
|
*
|
|
181
133
|
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
182
134
|
*/
|
|
183
|
-
allDayEditor?: React.ComponentType<TargetlessChangeEvent<
|
|
135
|
+
allDayEditor?: React.ComponentType<TargetlessChangeEvent<SwitchProps & FieldProps, boolean>>;
|
|
184
136
|
/**
|
|
185
137
|
* Overrides the component used for visualizing the `recurrenceRule` field editor.
|
|
186
138
|
* A custom made RecurrenceEditor component is used, by default.
|
|
@@ -190,20 +142,6 @@ export interface SchedulerFormEditorProps extends Omit<FormElementProps, 'childr
|
|
|
190
142
|
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
191
143
|
*/
|
|
192
144
|
recurrenceEditor?: React.ComponentType<TargetlessChangeEvent<FieldProps, string>>;
|
|
193
|
-
/**
|
|
194
|
-
* Overrides the component used for visualizing the `description` field label.
|
|
195
|
-
* The [KendoReact Label](https://www.telerik.com/kendo-react-ui/components/labels/label) component is used, by default.
|
|
196
|
-
*
|
|
197
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
198
|
-
*/
|
|
199
|
-
descriptionLabel?: React.ComponentType<LabelProps & FieldProps>;
|
|
200
|
-
/**
|
|
201
|
-
* Overrides the component used for visualizing the `description` field error.
|
|
202
|
-
* The [KendoReact Error](https://www.telerik.com/kendo-react-ui/components/labels/error) component is used, by default.
|
|
203
|
-
*
|
|
204
|
-
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
205
|
-
*/
|
|
206
|
-
descriptionError?: React.ComponentType<ErrorProps & FieldProps>;
|
|
207
145
|
/**
|
|
208
146
|
* Overrides the component used for visualizing the `description` field editor.
|
|
209
147
|
* The [KendoReact TextArea](https://www.telerik.com/kendo-react-ui/components/inputs/textarea) component is used, by default.
|
|
@@ -212,26 +150,26 @@ export interface SchedulerFormEditorProps extends Omit<FormElementProps, 'childr
|
|
|
212
150
|
*/
|
|
213
151
|
descriptionEditor?: React.ComponentType<TargetlessChangeEvent<TextAreaProps & FieldProps, string>>;
|
|
214
152
|
/**
|
|
215
|
-
* Overrides the component used for visualizing
|
|
216
|
-
*
|
|
153
|
+
* Overrides the component used for visualizing each `resource` field editor.
|
|
154
|
+
* An extended KendoReact [MultiSelect](https://www.telerik.com/kendo-react-ui/components/dropdowns/multiselect) or [DropDownList](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist) component is used by default, depending on the `multiple` field of each individual `resource`.
|
|
217
155
|
*
|
|
218
156
|
* For more information, please refer to the [`Scheduler Form Editor Customization`](https://www.telerik.com/kendo-react-ui/components/scheduler/customization/form/editor) article.
|
|
219
157
|
*/
|
|
220
|
-
|
|
158
|
+
resourceEditor?: React.ComponentType<TargetlessChangeEvent<(MultiSelectProps | DropDownListProps) & FieldProps, any>>;
|
|
221
159
|
/**
|
|
222
|
-
* Overrides the
|
|
223
|
-
* The [KendoReact Error](https://www.telerik.com/kendo-react-ui/components/labels/error) component is used, by default.
|
|
160
|
+
* Overrides the content rendered inside the "Make recurring" button in the event edit form.
|
|
224
161
|
*
|
|
225
|
-
*
|
|
162
|
+
* Receives the current `recurrenceRule` (RRULE string or `null` when no recurrence is set).
|
|
163
|
+
* The developer controls the entire button content for both states.
|
|
226
164
|
*/
|
|
227
|
-
|
|
165
|
+
recurrenceButtonTextTemplate?: React.ComponentType<RecurrenceButtonTextTemplateProps>;
|
|
228
166
|
/**
|
|
229
|
-
* Overrides the
|
|
230
|
-
* An extended KendoReact [MultiSelect](https://www.telerik.com/kendo-react-ui/components/dropdowns/multiselect) or [DropDownList](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist) component is used by default, depending on the `multiple` field of each individual `resource`.
|
|
167
|
+
* Overrides the recurrence summary hint displayed inside the recurrence editor dialog.
|
|
231
168
|
*
|
|
232
|
-
*
|
|
169
|
+
* Receives the current `recurrenceRule` (RRULE string) and should render the desired summary.
|
|
170
|
+
* This template is only used when a recurrence rule exists.
|
|
233
171
|
*/
|
|
234
|
-
|
|
172
|
+
recurrenceEditorHintTemplate?: React.ComponentType<RecurrenceEditorHintTemplateProps>;
|
|
235
173
|
}
|
|
236
174
|
/**
|
|
237
175
|
* Represents the `ref` of the SchedulerFormEditor component.
|
|
@@ -254,242 +192,17 @@ export interface SchedulerFormEditorHandle {
|
|
|
254
192
|
export declare const SchedulerFormEditor: React.ForwardRefExoticComponent<globalThis.Omit<SchedulerFormEditorProps, "ref"> & React.RefAttributes<SchedulerFormEditorHandle | null>>;
|
|
255
193
|
export declare const schedulerFormEditorDefaultProps: {
|
|
256
194
|
as: React.ForwardRefExoticComponent<globalThis.Omit<FormElementProps, "ref"> & React.RefAttributes<FormElementHandle>>;
|
|
257
|
-
titleLabel: {
|
|
258
|
-
(props: LabelProps): React.JSX.Element;
|
|
259
|
-
propTypes: {
|
|
260
|
-
id: import('prop-types').Requireable<string>;
|
|
261
|
-
editorId: import('prop-types').Requireable<string>;
|
|
262
|
-
editorRef: import('prop-types').Requireable<NonNullable<((...args: any[]) => any) | import('prop-types').InferProps<{
|
|
263
|
-
current: import('prop-types').Requireable<any>;
|
|
264
|
-
}> | null | undefined>>;
|
|
265
|
-
editorValid: import('prop-types').Requireable<boolean>;
|
|
266
|
-
editorDisabled: import('prop-types').Requireable<boolean>;
|
|
267
|
-
style: import('prop-types').Requireable<object>;
|
|
268
|
-
className: import('prop-types').Requireable<string>;
|
|
269
|
-
optional: import('prop-types').Requireable<boolean>;
|
|
270
|
-
};
|
|
271
|
-
displayName: string;
|
|
272
|
-
};
|
|
273
|
-
titleError: {
|
|
274
|
-
(props: ErrorProps): React.JSX.Element;
|
|
275
|
-
propTypes: {
|
|
276
|
-
id: import('prop-types').Requireable<string>;
|
|
277
|
-
direction: import('prop-types').Requireable<string>;
|
|
278
|
-
children: import('prop-types').Requireable<NonNullable<import('prop-types').ReactNodeLike>>;
|
|
279
|
-
style: import('prop-types').Requireable<object>;
|
|
280
|
-
className: import('prop-types').Requireable<string>;
|
|
281
|
-
};
|
|
282
|
-
displayName: string;
|
|
283
|
-
};
|
|
284
195
|
titleEditor: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<import('@progress/kendo-react-inputs').InputHandle | null>>;
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
editorValid: import('prop-types').Requireable<boolean>;
|
|
294
|
-
editorDisabled: import('prop-types').Requireable<boolean>;
|
|
295
|
-
style: import('prop-types').Requireable<object>;
|
|
296
|
-
className: import('prop-types').Requireable<string>;
|
|
297
|
-
optional: import('prop-types').Requireable<boolean>;
|
|
298
|
-
};
|
|
299
|
-
displayName: string;
|
|
300
|
-
};
|
|
301
|
-
startError: {
|
|
302
|
-
(props: ErrorProps): React.JSX.Element;
|
|
303
|
-
propTypes: {
|
|
304
|
-
id: import('prop-types').Requireable<string>;
|
|
305
|
-
direction: import('prop-types').Requireable<string>;
|
|
306
|
-
children: import('prop-types').Requireable<NonNullable<import('prop-types').ReactNodeLike>>;
|
|
307
|
-
style: import('prop-types').Requireable<object>;
|
|
308
|
-
className: import('prop-types').Requireable<string>;
|
|
309
|
-
};
|
|
310
|
-
displayName: string;
|
|
311
|
-
};
|
|
312
|
-
startEditor: (props: ZonedDateTimeProps) => React.JSX.Element;
|
|
313
|
-
startTimezoneLabel: {
|
|
314
|
-
(props: LabelProps): React.JSX.Element;
|
|
315
|
-
propTypes: {
|
|
316
|
-
id: import('prop-types').Requireable<string>;
|
|
317
|
-
editorId: import('prop-types').Requireable<string>;
|
|
318
|
-
editorRef: import('prop-types').Requireable<NonNullable<((...args: any[]) => any) | import('prop-types').InferProps<{
|
|
319
|
-
current: import('prop-types').Requireable<any>;
|
|
320
|
-
}> | null | undefined>>;
|
|
321
|
-
editorValid: import('prop-types').Requireable<boolean>;
|
|
322
|
-
editorDisabled: import('prop-types').Requireable<boolean>;
|
|
323
|
-
style: import('prop-types').Requireable<object>;
|
|
324
|
-
className: import('prop-types').Requireable<string>;
|
|
325
|
-
optional: import('prop-types').Requireable<boolean>;
|
|
326
|
-
};
|
|
327
|
-
displayName: string;
|
|
328
|
-
};
|
|
329
|
-
startTimezoneError: {
|
|
330
|
-
(props: ErrorProps): React.JSX.Element;
|
|
331
|
-
propTypes: {
|
|
332
|
-
id: import('prop-types').Requireable<string>;
|
|
333
|
-
direction: import('prop-types').Requireable<string>;
|
|
334
|
-
children: import('prop-types').Requireable<NonNullable<import('prop-types').ReactNodeLike>>;
|
|
335
|
-
style: import('prop-types').Requireable<object>;
|
|
336
|
-
className: import('prop-types').Requireable<string>;
|
|
337
|
-
};
|
|
338
|
-
displayName: string;
|
|
339
|
-
};
|
|
340
|
-
startTimezoneEditor: (props: import('@progress/kendo-react-form').FieldRenderProps & ComboBoxProps) => React.JSX.Element;
|
|
341
|
-
startTimezoneCheckedLabel: {
|
|
342
|
-
(props: LabelProps): React.JSX.Element;
|
|
343
|
-
propTypes: {
|
|
344
|
-
id: import('prop-types').Requireable<string>;
|
|
345
|
-
editorId: import('prop-types').Requireable<string>;
|
|
346
|
-
editorRef: import('prop-types').Requireable<NonNullable<((...args: any[]) => any) | import('prop-types').InferProps<{
|
|
347
|
-
current: import('prop-types').Requireable<any>;
|
|
348
|
-
}> | null | undefined>>;
|
|
349
|
-
editorValid: import('prop-types').Requireable<boolean>;
|
|
350
|
-
editorDisabled: import('prop-types').Requireable<boolean>;
|
|
351
|
-
style: import('prop-types').Requireable<object>;
|
|
352
|
-
className: import('prop-types').Requireable<string>;
|
|
353
|
-
optional: import('prop-types').Requireable<boolean>;
|
|
354
|
-
};
|
|
355
|
-
displayName: string;
|
|
356
|
-
};
|
|
357
|
-
startTimezoneCheckedEditor: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<import('@progress/kendo-react-inputs').CheckboxHandle | null>>;
|
|
358
|
-
endLabel: {
|
|
359
|
-
(props: LabelProps): React.JSX.Element;
|
|
360
|
-
propTypes: {
|
|
361
|
-
id: import('prop-types').Requireable<string>;
|
|
362
|
-
editorId: import('prop-types').Requireable<string>;
|
|
363
|
-
editorRef: import('prop-types').Requireable<NonNullable<((...args: any[]) => any) | import('prop-types').InferProps<{
|
|
364
|
-
current: import('prop-types').Requireable<any>;
|
|
365
|
-
}> | null | undefined>>;
|
|
366
|
-
editorValid: import('prop-types').Requireable<boolean>;
|
|
367
|
-
editorDisabled: import('prop-types').Requireable<boolean>;
|
|
368
|
-
style: import('prop-types').Requireable<object>;
|
|
369
|
-
className: import('prop-types').Requireable<string>;
|
|
370
|
-
optional: import('prop-types').Requireable<boolean>;
|
|
371
|
-
};
|
|
372
|
-
displayName: string;
|
|
373
|
-
};
|
|
374
|
-
endError: {
|
|
375
|
-
(props: ErrorProps): React.JSX.Element;
|
|
376
|
-
propTypes: {
|
|
377
|
-
id: import('prop-types').Requireable<string>;
|
|
378
|
-
direction: import('prop-types').Requireable<string>;
|
|
379
|
-
children: import('prop-types').Requireable<NonNullable<import('prop-types').ReactNodeLike>>;
|
|
380
|
-
style: import('prop-types').Requireable<object>;
|
|
381
|
-
className: import('prop-types').Requireable<string>;
|
|
382
|
-
};
|
|
383
|
-
displayName: string;
|
|
384
|
-
};
|
|
385
|
-
endEditor: (props: ZonedDateTimeProps) => React.JSX.Element;
|
|
386
|
-
endTimezoneLabel: {
|
|
387
|
-
(props: LabelProps): React.JSX.Element;
|
|
388
|
-
propTypes: {
|
|
389
|
-
id: import('prop-types').Requireable<string>;
|
|
390
|
-
editorId: import('prop-types').Requireable<string>;
|
|
391
|
-
editorRef: import('prop-types').Requireable<NonNullable<((...args: any[]) => any) | import('prop-types').InferProps<{
|
|
392
|
-
current: import('prop-types').Requireable<any>;
|
|
393
|
-
}> | null | undefined>>;
|
|
394
|
-
editorValid: import('prop-types').Requireable<boolean>;
|
|
395
|
-
editorDisabled: import('prop-types').Requireable<boolean>;
|
|
396
|
-
style: import('prop-types').Requireable<object>;
|
|
397
|
-
className: import('prop-types').Requireable<string>;
|
|
398
|
-
optional: import('prop-types').Requireable<boolean>;
|
|
399
|
-
};
|
|
400
|
-
displayName: string;
|
|
401
|
-
};
|
|
402
|
-
endTimezoneError: {
|
|
403
|
-
(props: ErrorProps): React.JSX.Element;
|
|
404
|
-
propTypes: {
|
|
405
|
-
id: import('prop-types').Requireable<string>;
|
|
406
|
-
direction: import('prop-types').Requireable<string>;
|
|
407
|
-
children: import('prop-types').Requireable<NonNullable<import('prop-types').ReactNodeLike>>;
|
|
408
|
-
style: import('prop-types').Requireable<object>;
|
|
409
|
-
className: import('prop-types').Requireable<string>;
|
|
410
|
-
};
|
|
411
|
-
displayName: string;
|
|
412
|
-
};
|
|
413
|
-
endTimezoneEditor: (props: import('@progress/kendo-react-form').FieldRenderProps & ComboBoxProps) => React.JSX.Element;
|
|
414
|
-
endTimezoneCheckedLabel: {
|
|
415
|
-
(props: LabelProps): React.JSX.Element;
|
|
416
|
-
propTypes: {
|
|
417
|
-
id: import('prop-types').Requireable<string>;
|
|
418
|
-
editorId: import('prop-types').Requireable<string>;
|
|
419
|
-
editorRef: import('prop-types').Requireable<NonNullable<((...args: any[]) => any) | import('prop-types').InferProps<{
|
|
420
|
-
current: import('prop-types').Requireable<any>;
|
|
421
|
-
}> | null | undefined>>;
|
|
422
|
-
editorValid: import('prop-types').Requireable<boolean>;
|
|
423
|
-
editorDisabled: import('prop-types').Requireable<boolean>;
|
|
424
|
-
style: import('prop-types').Requireable<object>;
|
|
425
|
-
className: import('prop-types').Requireable<string>;
|
|
426
|
-
optional: import('prop-types').Requireable<boolean>;
|
|
427
|
-
};
|
|
428
|
-
displayName: string;
|
|
429
|
-
};
|
|
430
|
-
endTimezoneCheckedEditor: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<import('@progress/kendo-react-inputs').CheckboxHandle | null>>;
|
|
431
|
-
allDayLabel: {
|
|
432
|
-
(props: LabelProps): React.JSX.Element;
|
|
433
|
-
propTypes: {
|
|
434
|
-
id: import('prop-types').Requireable<string>;
|
|
435
|
-
editorId: import('prop-types').Requireable<string>;
|
|
436
|
-
editorRef: import('prop-types').Requireable<NonNullable<((...args: any[]) => any) | import('prop-types').InferProps<{
|
|
437
|
-
current: import('prop-types').Requireable<any>;
|
|
438
|
-
}> | null | undefined>>;
|
|
439
|
-
editorValid: import('prop-types').Requireable<boolean>;
|
|
440
|
-
editorDisabled: import('prop-types').Requireable<boolean>;
|
|
441
|
-
style: import('prop-types').Requireable<object>;
|
|
442
|
-
className: import('prop-types').Requireable<string>;
|
|
443
|
-
optional: import('prop-types').Requireable<boolean>;
|
|
444
|
-
};
|
|
445
|
-
displayName: string;
|
|
446
|
-
};
|
|
447
|
-
allDayEditor: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<import('@progress/kendo-react-inputs').CheckboxHandle | null>>;
|
|
196
|
+
startEditor: (props: import('./ZonedSplitDateTime').ZonedSplitDateTimeProps) => React.JSX.Element;
|
|
197
|
+
endEditor: (props: import('./ZonedSplitDateTime').ZonedSplitDateTimeProps) => React.JSX.Element;
|
|
198
|
+
startTimezoneEditor: (props: import('@progress/kendo-react-form').FieldRenderProps & DropDownListProps) => React.JSX.Element;
|
|
199
|
+
endTimezoneEditor: (props: import('@progress/kendo-react-form').FieldRenderProps & DropDownListProps) => React.JSX.Element;
|
|
200
|
+
startLabel: React.FC<any>;
|
|
201
|
+
endLabel: React.FC<any>;
|
|
202
|
+
allDayEditor: React.FC<any>;
|
|
203
|
+
allDayLabel: React.FC<any>;
|
|
448
204
|
recurrenceEditor: React.FunctionComponent<import('../recurrence/RecurrenceEditor').RecurrenceEditorProps>;
|
|
449
|
-
descriptionLabel: {
|
|
450
|
-
(props: LabelProps): React.JSX.Element;
|
|
451
|
-
propTypes: {
|
|
452
|
-
id: import('prop-types').Requireable<string>;
|
|
453
|
-
editorId: import('prop-types').Requireable<string>;
|
|
454
|
-
editorRef: import('prop-types').Requireable<NonNullable<((...args: any[]) => any) | import('prop-types').InferProps<{
|
|
455
|
-
current: import('prop-types').Requireable<any>;
|
|
456
|
-
}> | null | undefined>>;
|
|
457
|
-
editorValid: import('prop-types').Requireable<boolean>;
|
|
458
|
-
editorDisabled: import('prop-types').Requireable<boolean>;
|
|
459
|
-
style: import('prop-types').Requireable<object>;
|
|
460
|
-
className: import('prop-types').Requireable<string>;
|
|
461
|
-
optional: import('prop-types').Requireable<boolean>;
|
|
462
|
-
};
|
|
463
|
-
displayName: string;
|
|
464
|
-
};
|
|
465
205
|
descriptionEditor: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<import('@progress/kendo-react-inputs').TextAreaHandle | null>>;
|
|
466
|
-
descriptionError: {
|
|
467
|
-
(props: ErrorProps): React.JSX.Element;
|
|
468
|
-
propTypes: {
|
|
469
|
-
id: import('prop-types').Requireable<string>;
|
|
470
|
-
direction: import('prop-types').Requireable<string>;
|
|
471
|
-
children: import('prop-types').Requireable<NonNullable<import('prop-types').ReactNodeLike>>;
|
|
472
|
-
style: import('prop-types').Requireable<object>;
|
|
473
|
-
className: import('prop-types').Requireable<string>;
|
|
474
|
-
};
|
|
475
|
-
displayName: string;
|
|
476
|
-
};
|
|
477
|
-
resourceLabel: {
|
|
478
|
-
(props: LabelProps): React.JSX.Element;
|
|
479
|
-
propTypes: {
|
|
480
|
-
id: import('prop-types').Requireable<string>;
|
|
481
|
-
editorId: import('prop-types').Requireable<string>;
|
|
482
|
-
editorRef: import('prop-types').Requireable<NonNullable<((...args: any[]) => any) | import('prop-types').InferProps<{
|
|
483
|
-
current: import('prop-types').Requireable<any>;
|
|
484
|
-
}> | null | undefined>>;
|
|
485
|
-
editorValid: import('prop-types').Requireable<boolean>;
|
|
486
|
-
editorDisabled: import('prop-types').Requireable<boolean>;
|
|
487
|
-
style: import('prop-types').Requireable<object>;
|
|
488
|
-
className: import('prop-types').Requireable<string>;
|
|
489
|
-
optional: import('prop-types').Requireable<boolean>;
|
|
490
|
-
};
|
|
491
|
-
displayName: string;
|
|
492
|
-
};
|
|
493
206
|
resourceEditor: (props: import('./ResourceEditor').ResourceEditorProps) => React.JSX.Element;
|
|
494
207
|
};
|
|
495
208
|
export {};
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const se=require("react"),Ee=require("@progress/kendo-date-math"),i=require("@progress/kendo-react-labels"),ue=require("@progress/kendo-react-intl"),a=require("@progress/kendo-react-form"),b=require("@progress/kendo-react-inputs"),h=require("@progress/kendo-react-dateinputs"),n=require("../messages/index.js"),C=require("./FilterableComboBox.js"),be=require("@progress/kendo-react-common"),Te=require("../recurrence/RecurrenceEditor.js"),ke=require("./ResourceEditor.js"),S=require("./ZonedDateTime.js"),D=require("../context/SchedulerContext.js");function ze(r){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const m in r)if(m!=="default"){const E=Object.getOwnPropertyDescriptor(r,m);Object.defineProperty(c,m,E.get?E:{enumerable:!0,get:()=>r[m]})}}return c.default=r,Object.freeze(c)}const e=ze(se),N=e.forwardRef((r,c)=>{const m=e.useRef(null),E=e.useRef(null),L=Ee.timezoneNames(),d=ue.useLocalization(),t=D.useSchedulerFieldsContext(),{resources:p,timezone:T}=D.useSchedulerPropsContext();e.useImperativeHandle(E,()=>{var l;return{element:(l=m.current)!=null&&l.element?m.current.element:m.current,props:r}}),e.useImperativeHandle(c,()=>E.current);const{as:v=o.as,...y}=r,{titleLabel:R=o.titleLabel,titleError:x=o.titleError,titleEditor:q=o.titleEditor,startLabel:Z=o.startLabel,startError:w=o.startError,startEditor:I=o.startEditor,startTimezoneLabel:A=o.startTimezoneLabel,startTimezoneError:P=o.startTimezoneError,startTimezoneEditor:W=o.startTimezoneEditor,startTimezoneCheckedLabel:g=o.startTimezoneCheckedLabel,startTimezoneCheckedEditor:G=o.startTimezoneCheckedEditor,endLabel:M=o.endLabel,endError:O=o.endError,endEditor:j=o.endEditor,endTimezoneLabel:B=o.endTimezoneLabel,endTimezoneError:V=o.endTimezoneError,endTimezoneEditor:_=o.endTimezoneEditor,endTimezoneCheckedLabel:H=o.endTimezoneCheckedLabel,endTimezoneCheckedEditor:K=o.endTimezoneCheckedEditor,allDayLabel:J=o.allDayLabel,allDayEditor:Q=o.allDayEditor,recurrenceEditor:U=o.recurrenceEditor,descriptionLabel:X=o.descriptionLabel,descriptionEditor:Y=o.descriptionEditor,descriptionError:$=o.descriptionError,resourceLabel:ee=o.resourceLabel,resourceEditor:te=o.resourceEditor}=r,re=r.valueGetter(t.start)||new Date,ae=r.valueGetter(t.startTimezone)||T||"",ne=r.valueGetter(t.endTimezone)||T||"",f=e.useMemo(()=>d.toLanguageString(n.editorValidationRequired,n.messages[n.editorValidationRequired]),[d]),[s,oe]=e.useState(!!r.valueGetter(t.startTimezone)),[k,F]=e.useState(!!r.valueGetter(t.endTimezone)),le=e.useCallback(l=>{l.value||(r.onChange(t.startTimezone,{value:null}),r.onChange(t.endTimezone,{value:null}),F(l.value)),oe(l.value)},[r.onChange,t.startTimezone,t.endTimezone]),ie=e.useCallback(l=>{l.value||r.onChange(t.endTimezone,{value:null}),F(l.value)},[r.onChange]),u=e.useCallback(l=>l?void 0:f,[f]),de=e.useCallback((l,z)=>s?u(z(t.startTimezone)):void 0,[u,s,t.startTimezone]),me=e.useCallback((l,z)=>s&&k?u(z(t.endTimezone))||u(z(t.startTimezone)):void 0,[u,s,k,t.startTimezone,t.endTimezone]),ce=e.useMemo(()=>be.classNames("k-scheduler-edit-form",r.className),[r.className]);return e.createElement(v,{ref:v===o.as?m:void 0,...y,className:ce},e.createElement(e.Fragment,null,e.createElement(a.FieldWrapper,null,e.createElement(a.Field,{name:t.title,component:R,editorId:"k-scheduler-editor-title",className:"k-form-label"},d.toLanguageString(n.editorEventTitle,n.messages[n.editorEventTitle])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(a.Field,{id:"k-scheduler-editor-title",name:t.title,field:t.title,component:q}),r.errors[t.title]&&e.createElement(a.Field,{name:t.title,component:x},r.errors[t.title]))),e.createElement(a.FieldWrapper,null,e.createElement(a.Field,{name:t.start,component:Z,editorId:"k-scheduler-editor-start",className:"k-form-label"},d.toLanguageString(n.editorEventStart,n.messages[n.editorEventStart])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(a.Field,{id:"k-scheduler-editor-start",name:t.start,width:"auto",component:I,as:r.valueGetter(t.isAllDay)?h.DatePicker:h.DateTimePicker,timezone:T}),r.errors[t.start]&&e.createElement(a.Field,{name:t.start,component:w},r.errors[t.start]))),e.createElement(a.FieldWrapper,null,e.createElement(g,{className:"k-form-label"}),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(G,{id:"k-scheduler-editor-set-start-timezone",onChange:le,value:s}),e.createElement(g,{className:"k-checkbox-label",editorId:"k-scheduler-editor-set-start-timezone"},d.toLanguageString(n.editorEventTimeZone,n.messages[n.editorEventTimeZone])))),s&&e.createElement(a.FieldWrapper,null,e.createElement(a.Field,{name:t.start,component:A,className:"k-form-label"},d.toLanguageString(n.editorEventStartTimeZone,n.messages[n.editorEventStartTimeZone])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(a.Field,{component:W,value:ae,validator:de,data:L,name:t.startTimezone}),r.errors[t.startTimezone]&&e.createElement(a.Field,{name:t.startTimezone,component:P},r.errors[t.startTimezone]))),e.createElement(a.FieldWrapper,null,e.createElement(a.Field,{name:t.end,component:M,editorId:"k-scheduler-editor-end",className:"k-form-label"},d.toLanguageString(n.editorEventEnd,n.messages[n.editorEventEnd])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(a.Field,{id:"k-scheduler-editor-end",name:t.end,width:"auto",component:j,as:r.valueGetter(t.isAllDay)?h.DatePicker:h.DateTimePicker,timezone:T}),r.errors[t.end]&&e.createElement(a.Field,{name:t.end,component:O},r.errors[t.end]))),s&&e.createElement(a.FieldWrapper,null,e.createElement("div",{className:"k-form-field-wrap"},e.createElement(K,{id:"k-scheduler-editor-set-end-timezone",onChange:ie,value:k})),e.createElement(H,{editorId:"k-scheduler-editor-set-end-timezone",className:"k-form-label"},d.toLanguageString(n.editorEventSeparateTimeZones,n.messages[n.editorEventSeparateTimeZones]))),k&&e.createElement(a.FieldWrapper,null,e.createElement(a.Field,{name:t.endTimezone,component:B,className:"k-form-label"},d.toLanguageString(n.editorEventEndTimeZone,n.messages[n.editorEventEndTimeZone])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(a.Field,{value:ne,data:L,validator:me,component:_,name:t.endTimezone}),r.errors[t.endTimezone]&&e.createElement(a.Field,{name:t.endTimezone,component:V},r.errors[t.endTimezone]))),e.createElement(a.FieldWrapper,null,e.createElement(a.Field,{name:t.isAllDay,component:i.Label,className:"k-form-label"}),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(a.Field,{id:"k-is-allday-checkbox",name:t.isAllDay,component:Q}),e.createElement(a.Field,{name:t.isAllDay,field:t.isAllDay,editorId:"k-is-allday-checkbox",className:"k-checkbox-label",component:J},d.toLanguageString(n.editorEventAllDay,n.messages[n.editorEventAllDay])))),e.createElement("div",{className:"k-recurrence-editor"},e.createElement(a.Field,{component:U,field:t.recurrenceRule,name:t.recurrenceRule,start:re})),e.createElement(a.FieldWrapper,null,e.createElement(a.Field,{name:t.description,component:X,className:"k-form-label"},d.toLanguageString(n.editorEventDescription,n.messages[n.editorEventDescription])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(a.Field,{component:Y,name:t.description,rows:1,id:"k-event-description"}),r.errors[t.description]&&e.createElement(a.Field,{name:t.description,component:$},r.errors[t.description]))),(p||[]).map(l=>e.createElement(a.FieldWrapper,{key:l.field},e.createElement(a.Field,{name:l.field,component:ee,className:"k-form-label"}),e.createElement(i.Label,{className:"k-form-label"},l.name),e.createElement(a.Field,{name:l.field,component:te,resource:l,multiple:l.multiple,data:l.data,textField:l.textField,valueField:l.valueField,colorField:l.colorField})))))}),o={as:e.forwardRef((r,c)=>e.createElement(a.FormElement,{ref:c,id:r.id,style:r.style,tabIndex:r.tabIndex,className:r.className,horizontal:r.horizontal,children:r.children})),titleLabel:i.Label,titleError:i.Error,titleEditor:b.Input,startLabel:i.Label,startError:i.Error,startEditor:S.ZonedDateTime,startTimezoneLabel:i.Label,startTimezoneError:i.Error,startTimezoneEditor:C.FilterableComboBox,startTimezoneCheckedLabel:i.Label,startTimezoneCheckedEditor:b.Checkbox,endLabel:i.Label,endError:i.Error,endEditor:S.ZonedDateTime,endTimezoneLabel:i.Label,endTimezoneError:i.Error,endTimezoneEditor:C.FilterableComboBox,endTimezoneCheckedLabel:i.Label,endTimezoneCheckedEditor:b.Checkbox,allDayLabel:i.Label,allDayEditor:b.Checkbox,recurrenceEditor:Te.RecurrenceEditor,descriptionLabel:i.Label,descriptionEditor:b.TextArea,descriptionError:i.Error,resourceLabel:i.Label,resourceEditor:ke.ResourceEditor};N.displayName="KendoReactSchedulerFormEditor";exports.SchedulerFormEditor=N;exports.schedulerFormEditorDefaultProps=o;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ze=require("react"),De=require("@progress/kendo-date-math"),pe=require("@progress/kendo-recurrence"),k=require("@progress/kendo-react-labels"),W=require("@progress/kendo-react-intl"),l=require("@progress/kendo-react-form"),w=require("@progress/kendo-react-inputs"),b=require("@progress/kendo-react-buttons"),L=require("@progress/kendo-react-common"),v=require("@progress/kendo-svg-icons"),t=require("../messages/index.js"),Y=require("./TimezoneDropDownList.js"),Ce=require("../recurrence/RecurrenceEditor.js"),Fe=require("./ResourceEditor.js"),G=require("./ZonedSplitDateTime.js"),K=require("@progress/kendo-react-dialogs"),ye=require("./SchedulerRecurrenceDialog.js"),Ne=require("./RemoveRecurrenceConfirmDialog.js"),Q=require("../hooks/useRecurrenceSummary.js"),J=require("../context/SchedulerContext.js");function Ie(a){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const c in a)if(c!=="default"){const T=Object.getOwnPropertyDescriptor(a,c);Object.defineProperty(m,c,T.get?T:{enumerable:!0,get:()=>a[c]})}}return m.default=a,Object.freeze(m)}const e=Ie(ze),U=e.forwardRef((a,m)=>{const c=e.useRef(null),T=e.useRef(null),C=De.timezoneNames(),n=W.useLocalization(),S=W.useInternationalization(),r=J.useSchedulerFieldsContext(),{resources:x,timezone:u}=J.useSchedulerPropsContext();e.useImperativeHandle(T,()=>{var o;return{element:(o=c.current)!=null&&o.element?c.current.element:c.current,props:a}}),e.useImperativeHandle(m,()=>T.current);const{as:z=i.as,...F}=a,{onChange:d,valueGetter:g}=a,{titleEditor:$=i.titleEditor,startEditor:A=i.startEditor,endEditor:q=i.endEditor,startTimezoneEditor:ee=i.startTimezoneEditor,endTimezoneEditor:te=i.endTimezoneEditor,startLabel:re=i.startLabel,endLabel:M=i.endLabel,allDayEditor:ne=i.allDayEditor,allDayLabel:ae=i.allDayLabel,recurrenceEditor:oe,descriptionEditor:le=i.descriptionEditor,resourceEditor:ie=i.resourceEditor}=a,h=e.useMemo(()=>g(r.start)||new Date,[g,r.start]),R=g(r.isAllDay)||!1,E=g(r.startTimezone)||u||"",s=g(r.recurrenceRule),B=g(r.recurrenceId),ce=!(B!=null),_=e.useMemo(()=>n.toLanguageString(t.editorEventAllDay,t.messages[t.editorEventAllDay]),[n]),[f,O]=e.useState(!!g(r.startTimezone)),[se,y]=e.useState(!1),[de,D]=e.useState(!1),[me,N]=e.useState(!1),Z=a.recurrenceButtonTextTemplate,ue=a.recurrenceEditorHintTemplate,I=e.useMemo(()=>n.toLanguageString(t.editorMakeRecurring,t.messages[t.editorMakeRecurring]),[n]),ge=e.useMemo(()=>s&&Q.getRecurrenceSummary(s,h,S,n)||I,[s,h,S,n,I]),Ee=e.useMemo(()=>s?Q.getRecurrenceSummary(s,h,S,n):null,[s,h,S,n]),fe=e.useMemo(()=>s?pe.parseRule({recurrenceRule:s}):null,[s]),P=e.useRef(E);e.useEffect(()=>{f&&E&&E!==P.current&&d(r.endTimezone,{value:E}),P.current=E},[E,f,d,r.endTimezone]);const j=e.useCallback(o=>{o.preventDefault(),f?y(!0):O(!0)},[f]),Te=e.useCallback(()=>{d(r.startTimezone,{value:null}),d(r.endTimezone,{value:null}),O(!1),y(!1)},[d,r.startTimezone,r.endTimezone]),H=e.useCallback(()=>{y(!1)},[]),ve=e.useCallback(()=>{D(!0)},[]),Se=e.useCallback(o=>{d(r.recurrenceRule,{value:o}),D(!1)},[d,r.recurrenceRule]),he=e.useCallback(()=>{D(!1)},[]),Re=e.useCallback(()=>{N(!0)},[]),be=e.useCallback(()=>{d(r.recurrenceRule,{value:null}),d(r.recurrenceExceptions,{value:null}),N(!1),D(!1)},[d,r.recurrenceRule,r.recurrenceExceptions]),Le=e.useCallback(()=>{N(!1)},[]),ke=e.useMemo(()=>L.classNames("k-scheduler-edit-form",a.className),[a.className]);return e.createElement(e.Fragment,null,e.createElement(z,{ref:z===i.as?c:void 0,horizontal:!0,...F,className:ke},e.createElement(e.Fragment,null,e.createElement(l.FieldWrapper,null,e.createElement(k.Label,{className:"k-form-label"},e.createElement(L.SvgIcon,{icon:v.rightDoubleQuotesIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(l.Field,{id:"k-scheduler-editor-title",name:r.title,field:r.title,component:$,placeholder:n.toLanguageString(t.editorEventTitle,t.messages[t.editorEventTitle]),"aria-label":n.toLanguageString(t.editorEventTitle,t.messages[t.editorEventTitle])}))),e.createElement(l.FieldWrapper,null,e.createElement(k.Label,{className:"k-form-label"},e.createElement(L.SvgIcon,{icon:v.clockIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement("div",{className:"k-scheduler-datetime-section"},e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(l.Field,{id:"k-is-allday-switch",name:r.isAllDay,component:ne,onLabel:"",offLabel:"",ariaLabel:_}),e.createElement(l.Field,{name:r.isAllDay,field:r.isAllDay,editorId:"k-is-allday-switch",component:ae},_)),e.createElement("div",{className:"k-scheduler-datetime-grid"},R?e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(l.Field,{name:r.start,component:A,isAllDay:R,fieldError:a.errors[r.start],ariaLabel:n.toLanguageString(t.editorEventStart,t.messages[t.editorEventStart]),timezone:u}),e.createElement(l.Field,{name:r.end,component:M,editorId:"k-scheduler-editor-end",className:"k-scheduler-datetime-label"},n.toLanguageString(t.editorDateConnectorTo,t.messages[t.editorDateConnectorTo])),e.createElement(l.Field,{name:r.end,component:q,isAllDay:R,dateId:"k-scheduler-editor-end",fieldError:a.errors[r.end],ariaLabel:n.toLanguageString(t.editorEventEnd,t.messages[t.editorEventEnd]),timezone:u})):e.createElement(e.Fragment,null,e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(l.Field,{name:r.start,component:A,isAllDay:R,timeId:"k-scheduler-editor-start-time",connectorElement:e.createElement(l.Field,{name:r.start,component:re,editorId:"k-scheduler-editor-start-time",className:"k-scheduler-datetime-label"},n.toLanguageString(t.editorDateConnectorFrom,t.messages[t.editorDateConnectorFrom])),fieldError:a.errors[r.start],ariaLabel:n.toLanguageString(t.editorEventStart,t.messages[t.editorEventStart]),timeAriaLabel:n.toLanguageString(t.editorStartTimeAriaLabel,t.messages[t.editorStartTimeAriaLabel]),timezone:u})),!f&&e.createElement(b.Button,{className:"k-col-span-2",fillMode:"flat",themeColor:"primary",title:n.toLanguageString(t.editorSetTimezoneTitle,t.messages[t.editorSetTimezoneTitle]),onClick:j,svgIcon:v.globeIcon},n.toLanguageString(t.editorTimezoneButton,t.messages[t.editorTimezoneButton])),f&&e.createElement(e.Fragment,null,e.createElement(l.Field,{name:r.startTimezone,component:ee,data:C,value:E,ariaLabel:n.toLanguageString(t.editorEventStartTimeZone,t.messages[t.editorEventStartTimeZone])}),e.createElement(b.Button,{title:n.toLanguageString(t.editorResetTimezoneTitle,t.messages[t.editorResetTimezoneTitle]),"aria-label":n.toLanguageString(t.editorResetTimezoneAriaLabel,t.messages[t.editorResetTimezoneAriaLabel]),onClick:j,svgIcon:v.globeIcon,fillMode:"flat",themeColor:"primary"})),e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(l.Field,{name:r.end,component:q,isAllDay:R,timeId:"k-scheduler-editor-end-time",connectorElement:e.createElement(l.Field,{name:r.end,component:M,editorId:"k-scheduler-editor-end-time",className:"k-scheduler-datetime-label"},n.toLanguageString(t.editorDateConnectorTo,t.messages[t.editorDateConnectorTo])),fieldError:a.errors[r.end],ariaLabel:n.toLanguageString(t.editorEventEnd,t.messages[t.editorEventEnd]),timeAriaLabel:n.toLanguageString(t.editorEndTimeAriaLabel,t.messages[t.editorEndTimeAriaLabel]),timezone:u})),f&&e.createElement(l.Field,{name:r.endTimezone,component:te,data:C,value:g(r.endTimezone)||u||"",ariaLabel:n.toLanguageString(t.editorEventEndTimeZone,t.messages[t.editorEventEndTimeZone])}))),ce&&e.createElement("div",{className:"k-scheduler-edit-form-row"},e.createElement(b.Button,{className:"k-scheduler-recurrence-button",type:"button",fillMode:"flat",themeColor:"primary",svgIcon:v.arrowRotateCwIcon,onClick:ve},Z?e.createElement(Z,{recurrenceRule:s,text:Ee,parsedRule:fe}):ge))))),e.createElement(l.FieldWrapper,null,e.createElement(k.Label,{className:"k-form-label"},e.createElement(L.SvgIcon,{icon:v.commentIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(l.Field,{component:le,name:r.description,id:"k-event-description",resizable:"vertical",placeholder:n.toLanguageString(t.editorEventDescription,t.messages[t.editorEventDescription]),"aria-label":n.toLanguageString(t.editorEventDescription,t.messages[t.editorEventDescription])}))),(x||[]).map(o=>e.createElement(l.FieldWrapper,{key:o.field},o.svgIcon&&e.createElement(k.Label,{className:"k-form-label"},e.createElement(L.SvgIcon,{icon:o.svgIcon,size:"xlarge"})),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(l.Field,{name:o.field,component:ie,resource:o,multiple:o.multiple,data:o.data,textField:o.textField,valueField:o.valueField,colorField:o.colorField,ariaLabel:o.name||o.field})))))),de&&e.createElement(ye.SchedulerRecurrenceDialog,{value:s,start:h,timezone:u||"",onSave:Se,onCancel:he,onRemoveRecurrence:Re,recurrenceEditorHintTemplate:ue,recurrenceEditor:oe}),me&&e.createElement(Ne.RemoveRecurrenceConfirmDialog,{onConfirm:be,onCancel:Le}),se&&e.createElement(K.Dialog,{title:n.toLanguageString(t.resetTimezoneDialogTitle,t.messages[t.resetTimezoneDialogTitle]),onClose:H},n.toLanguageString(t.resetTimezoneConfirmation,t.messages[t.resetTimezoneConfirmation]),e.createElement(K.DialogActionsBar,null,e.createElement(b.Button,{onClick:H},n.toLanguageString(t.resetTimezoneNo,t.messages[t.resetTimezoneNo])),e.createElement(b.Button,{themeColor:"primary",onClick:Te},n.toLanguageString(t.resetTimezoneYes,t.messages[t.resetTimezoneYes])))))});U.displayName="KendoReactSchedulerFormEditor";const V=e.forwardRef((a,m)=>e.createElement(l.FormElement,{ref:m,id:a.id,style:a.style,tabIndex:a.tabIndex,className:a.className,horizontal:a.horizontal,children:a.children}));V.displayName="SchedulerFormEditorDefaultElement";const X=a=>{const{value:m,onChange:c,valid:T,visited:C,touched:n,modified:S,name:r,validationMessage:x,...u}=a,z=e.useCallback(F=>{c&&c({value:F.value})},[c]);return e.createElement(w.Switch,{...u,checked:m||!1,onChange:z})};X.displayName="SwitchFieldAdapter";const p=a=>e.createElement(k.Label,{...a,style:{marginBottom:0,...a.style}});p.displayName="DefaultLabel";const i={as:V,titleEditor:w.Input,startEditor:G.ZonedSplitDateTime,endEditor:G.ZonedSplitDateTime,startTimezoneEditor:Y.TimezoneDropDownList,endTimezoneEditor:Y.TimezoneDropDownList,startLabel:p,endLabel:p,allDayEditor:X,allDayLabel:p,recurrenceEditor:Ce.RecurrenceEditor,descriptionEditor:w.TextArea,resourceEditor:Fe.ResourceEditor};exports.SchedulerFormEditor=U;exports.schedulerFormEditorDefaultProps=i;
|