@wix/editor-react-components 1.2769.0 → 1.2771.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/dist/site/components/AudioPlayer/component.js +2 -2
- package/dist/site/components/Breadcrumbs/component.js +1 -1
- package/dist/site/components/DatePicker/DatePicker.types.d.ts +20 -76
- package/dist/site/components/DatePicker/component.js +232 -1240
- package/dist/site/components/DatePicker/components/DatePickerCalendar.d.ts +3 -2
- package/dist/site/components/DatePicker/components/DatePickerField.d.ts +1 -3
- package/dist/site/components/DatePicker/constants.d.ts +47 -79
- package/dist/site/components/DatePicker/css.css +60 -287
- package/dist/site/components/DatePicker/datePickerUtils.d.ts +8 -26
- package/dist/site/components/DatePicker/manifest.js +234 -207
- package/dist/site/components/Repeater/component.js +6 -6
- package/dist/site/components/TextInput/component.js +2 -2
- package/dist/site/components/TimePicker/component.js +350 -3
- package/dist/site/components/chunks/Button.js +2 -2
- package/dist/site/components/chunks/{DismissSmall.js → DateField.js} +56 -430
- package/dist/site/components/chunks/Group.js +44 -44
- package/dist/site/components/chunks/I18nProvider.js +1 -1
- package/dist/site/components/chunks/Input.js +3 -26
- package/dist/site/components/chunks/VisuallyHidden.js +1 -1
- package/dist/site/components/chunks/constants37.js +59 -90
- package/dist/site/components/chunks/filterDOMProps.js +11 -11
- package/dist/site/components/chunks/index11.js +8 -4
- package/package.json +2 -2
- package/dist/site/components/DatePicker/components/DatePickerLabel.d.ts +0 -8
- package/dist/site/components/DatePicker/components/DatePickerTooltip.d.ts +0 -5
- package/dist/site/components/DatePicker/hooks/useDateConstraints.d.ts +0 -12
- package/dist/site/components/DatePicker/hooks/useDatePickerValue.d.ts +0 -15
- package/dist/site/components/DatePicker/hooks/useUnavailableDates.d.ts +0 -3
|
@@ -1,19 +1,50 @@
|
|
|
1
|
-
import { N as NativeStateType, b as DISPLAY_GROUPS, D as DATA, E as ELEMENTS, L as LAYOUT, A as Archetype } from "../chunks/chunk-EVX7ZUBD.js";
|
|
2
|
-
import { D as DesignStates, P as PREVIEW_CALENDAR_OPEN, b as DisplayNames,
|
|
1
|
+
import { C as CSS_PROPERTIES, N as NativeStateType, b as DISPLAY_GROUPS, D as DATA, E as ELEMENTS, L as LAYOUT, A as Archetype } from "../chunks/chunk-EVX7ZUBD.js";
|
|
2
|
+
import { D as DesignStates, P as PREVIEW_CALENDAR_OPEN, d as defaultValues, b as DisplayNames, c as Descriptions, e as PREVIEW_ERROR_MESSAGE, s as selectors } from "../chunks/constants37.js";
|
|
3
3
|
import { w as withSpec, g as getSelector } from "../chunks/manifest.js";
|
|
4
4
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
const basePresetName = "baseDatePicker";
|
|
6
|
+
const presetFont = (size) => ({
|
|
7
|
+
defaultValue: `normal normal 400 ${size}/1.3em 'Wix Madefor Text', sans-serif`
|
|
8
|
+
});
|
|
9
|
+
const presetColor = { defaultValue: "rgba(0, 0, 0, 1)" };
|
|
10
|
+
const presetBorder = { defaultValue: "1px solid rgba(0, 0, 0, 1)" };
|
|
11
|
+
const zero = { defaultValue: "0px" };
|
|
12
|
+
const zeroCorners = {
|
|
13
|
+
borderStartStartRadius: zero,
|
|
14
|
+
borderStartEndRadius: zero,
|
|
15
|
+
borderEndStartRadius: zero,
|
|
16
|
+
borderEndEndRadius: zero
|
|
17
|
+
};
|
|
18
|
+
const presetBox = {
|
|
19
|
+
borderTop: presetBorder,
|
|
20
|
+
borderBottom: presetBorder,
|
|
21
|
+
borderInlineStart: presetBorder,
|
|
22
|
+
borderInlineEnd: presetBorder,
|
|
23
|
+
...zeroCorners,
|
|
24
|
+
paddingTop: zero,
|
|
25
|
+
paddingBottom: zero,
|
|
26
|
+
paddingInlineStart: zero,
|
|
27
|
+
paddingInlineEnd: zero
|
|
11
28
|
};
|
|
12
29
|
const designState = (s) => withSpec({
|
|
13
30
|
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
14
31
|
displayName: s.displayName,
|
|
15
32
|
className: s.className
|
|
16
33
|
});
|
|
34
|
+
const typography = {
|
|
35
|
+
font: {},
|
|
36
|
+
color: {},
|
|
37
|
+
letterSpacing: {},
|
|
38
|
+
lineHeight: {},
|
|
39
|
+
textDecorationLine: {},
|
|
40
|
+
textTransform: {}
|
|
41
|
+
};
|
|
42
|
+
const alignedTypography = { ...typography, textAlign: {} };
|
|
43
|
+
const textShadow = {
|
|
44
|
+
"text-shadow": {
|
|
45
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.textShadow
|
|
46
|
+
}
|
|
47
|
+
};
|
|
17
48
|
const openWhileDesigning = {
|
|
18
49
|
stateKey: PREVIEW_CALENDAR_OPEN,
|
|
19
50
|
elementPath: ".root"
|
|
@@ -34,31 +65,29 @@ const boxPadding = {
|
|
|
34
65
|
paddingInlineStart: {},
|
|
35
66
|
paddingInlineEnd: {}
|
|
36
67
|
};
|
|
37
|
-
const
|
|
68
|
+
const popoverCssProperties = {
|
|
69
|
+
background: {},
|
|
70
|
+
boxShadow: {},
|
|
71
|
+
...boxBorder,
|
|
72
|
+
...boxPadding
|
|
73
|
+
};
|
|
38
74
|
const dateInputCssProperties = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
borderBottom: { defaultValue: fieldBorder },
|
|
46
|
-
borderInlineStart: { defaultValue: fieldBorder },
|
|
47
|
-
borderInlineEnd: { defaultValue: fieldBorder },
|
|
48
|
-
borderStartStartRadius: { defaultValue: "6px" },
|
|
49
|
-
borderStartEndRadius: { defaultValue: "6px" },
|
|
50
|
-
borderEndStartRadius: { defaultValue: "6px" },
|
|
51
|
-
borderEndEndRadius: { defaultValue: "6px" },
|
|
52
|
-
paddingTop: { defaultValue: "8px" },
|
|
53
|
-
paddingBottom: { defaultValue: "8px" },
|
|
54
|
-
paddingInlineStart: { defaultValue: "12px" },
|
|
55
|
-
paddingInlineEnd: { defaultValue: "12px" }
|
|
75
|
+
...typography,
|
|
76
|
+
background: {},
|
|
77
|
+
boxShadow: {},
|
|
78
|
+
columnGap: {},
|
|
79
|
+
...boxBorder,
|
|
80
|
+
...boxPadding
|
|
56
81
|
};
|
|
57
82
|
const manifest = {
|
|
58
|
-
id: "
|
|
59
|
-
type: "wixEditorElements.
|
|
60
|
-
description: "A date picker input. Visitors pick a date from a segmented field or a calendar popover. The selected date is
|
|
83
|
+
id: "869c68a7-f703-43fa-806f-3ed8936172b5",
|
|
84
|
+
type: "wixEditorElements.DatePicker__DEV__v4",
|
|
85
|
+
description: "A date picker input. Visitors pick a date from a segmented field or a calendar popover. The selected date is a local date and can be connected to a data field.",
|
|
61
86
|
installation: {
|
|
87
|
+
presets: {
|
|
88
|
+
small: basePresetName,
|
|
89
|
+
large: basePresetName
|
|
90
|
+
},
|
|
62
91
|
initialSize: {
|
|
63
92
|
width: {
|
|
64
93
|
sizingType: LAYOUT.SIZING_TYPE.pixels,
|
|
@@ -73,9 +102,82 @@ const manifest = {
|
|
|
73
102
|
selector: getSelector(selectors.root),
|
|
74
103
|
displayName: DisplayNames.root.elementDisplayName,
|
|
75
104
|
archetype: Archetype.DatePicker,
|
|
105
|
+
// Bare component with one minimal preset (Button's and Dropdown's
|
|
106
|
+
// structure): the module styles carry layout/behaviour only, this preset
|
|
107
|
+
// gives the default look, and Add Panel templates supply real designs.
|
|
108
|
+
// Part declarations have no defaults; `presetDefaults` mirrors the CSS.
|
|
109
|
+
presets: {
|
|
110
|
+
[basePresetName]: {
|
|
111
|
+
presetCssUrl: `./site/components/DatePicker/presets/${basePresetName}.css`,
|
|
112
|
+
displayName: DisplayNames.root.presets.baseDatePicker,
|
|
113
|
+
presetDefaults: {
|
|
114
|
+
elements: {
|
|
115
|
+
label: {
|
|
116
|
+
cssProperties: {
|
|
117
|
+
textAlign: { defaultValue: "start" },
|
|
118
|
+
font: presetFont("16px"),
|
|
119
|
+
color: presetColor
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
dateInput: {
|
|
123
|
+
cssProperties: {
|
|
124
|
+
font: presetFont("16px"),
|
|
125
|
+
color: presetColor,
|
|
126
|
+
background: { defaultValue: "transparent" },
|
|
127
|
+
boxShadow: { defaultValue: "none" },
|
|
128
|
+
...presetBox
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
calendarButton: {
|
|
132
|
+
cssProperties: {
|
|
133
|
+
background: { defaultValue: "transparent" },
|
|
134
|
+
color: presetColor,
|
|
135
|
+
...zeroCorners
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
popover: {
|
|
139
|
+
cssProperties: {
|
|
140
|
+
background: { defaultValue: "#ffffff" },
|
|
141
|
+
boxShadow: { defaultValue: "none" },
|
|
142
|
+
...presetBox
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
calendarHeader: {
|
|
146
|
+
cssProperties: { font: presetFont("16px"), color: presetColor }
|
|
147
|
+
},
|
|
148
|
+
weekdays: {
|
|
149
|
+
cssProperties: { font: presetFont("14px"), color: presetColor }
|
|
150
|
+
},
|
|
151
|
+
dates: {
|
|
152
|
+
cssProperties: {
|
|
153
|
+
background: { defaultValue: "transparent" },
|
|
154
|
+
font: presetFont("16px"),
|
|
155
|
+
color: presetColor
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
helperText: {
|
|
159
|
+
cssProperties: {
|
|
160
|
+
textAlign: { defaultValue: "start" },
|
|
161
|
+
font: presetFont("14px"),
|
|
162
|
+
color: presetColor
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
errorMessage: {
|
|
166
|
+
cssProperties: {
|
|
167
|
+
textAlign: { defaultValue: "start" },
|
|
168
|
+
font: presetFont("14px"),
|
|
169
|
+
color: presetColor
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
76
176
|
layout: {
|
|
77
|
-
resizeDirection: LAYOUT.RESIZE_DIRECTION.
|
|
78
|
-
|
|
177
|
+
resizeDirection: LAYOUT.RESIZE_DIRECTION.horizontal,
|
|
178
|
+
// Content can widen the component too (e.g. more Date input padding), so
|
|
179
|
+
// it grows instead of spilling out of its bounds — as Checkbox does.
|
|
180
|
+
contentResizeDirection: LAYOUT.CONTENT_RESIZE_DIRECTION.horizontalAndVertical,
|
|
79
181
|
disableStretching: true,
|
|
80
182
|
disablePositioning: false
|
|
81
183
|
},
|
|
@@ -86,29 +188,29 @@ const manifest = {
|
|
|
86
188
|
displayName: DisplayNames.root.elements.label,
|
|
87
189
|
selector: getSelector(selectors.label),
|
|
88
190
|
behaviors: { selectable: false },
|
|
89
|
-
cssProperties:
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
description: {
|
|
93
|
-
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
94
|
-
inlineElement: {
|
|
95
|
-
displayName: DisplayNames.root.elements.description,
|
|
96
|
-
selector: getSelector(selectors.description),
|
|
97
|
-
behaviors: { selectable: false },
|
|
98
|
-
cssProperties: { font: {}, color: {} }
|
|
191
|
+
cssProperties: alignedTypography,
|
|
192
|
+
cssCustomProperties: textShadow
|
|
99
193
|
}
|
|
100
194
|
},
|
|
101
195
|
dateInput: {
|
|
102
196
|
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
103
197
|
inlineElement: {
|
|
104
198
|
displayName: DisplayNames.root.elements.dateInput,
|
|
105
|
-
selector: getSelector(selectors.
|
|
199
|
+
selector: getSelector(selectors.dateInput),
|
|
106
200
|
behaviors: { selectable: false },
|
|
107
201
|
cssProperties: dateInputCssProperties,
|
|
202
|
+
cssCustomProperties: textShadow,
|
|
108
203
|
states: {
|
|
109
204
|
hover: designState(DesignStates.dateInput.hover),
|
|
110
205
|
focus: designState(DesignStates.dateInput.focus),
|
|
111
|
-
|
|
206
|
+
error: {
|
|
207
|
+
...designState(DesignStates.dateInput.error),
|
|
208
|
+
props: { errorMessage: PREVIEW_ERROR_MESSAGE }
|
|
209
|
+
},
|
|
210
|
+
disabled: {
|
|
211
|
+
...designState(DesignStates.dateInput.disabled),
|
|
212
|
+
props: { disabled: true }
|
|
213
|
+
}
|
|
112
214
|
}
|
|
113
215
|
}
|
|
114
216
|
},
|
|
@@ -128,7 +230,8 @@ const manifest = {
|
|
|
128
230
|
},
|
|
129
231
|
states: {
|
|
130
232
|
hover: designState(DesignStates.calendarButton.hover),
|
|
131
|
-
selected: designState(DesignStates.calendarButton.selected)
|
|
233
|
+
selected: designState(DesignStates.calendarButton.selected),
|
|
234
|
+
focus: designState(DesignStates.calendarButton.focus)
|
|
132
235
|
}
|
|
133
236
|
}
|
|
134
237
|
},
|
|
@@ -138,172 +241,109 @@ const manifest = {
|
|
|
138
241
|
displayName: DisplayNames.root.elements.popover,
|
|
139
242
|
selector: getSelector(selectors.popover),
|
|
140
243
|
behaviors: { selectable: false },
|
|
141
|
-
cssProperties:
|
|
244
|
+
cssProperties: popoverCssProperties,
|
|
245
|
+
visibleState: openWhileDesigning
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
calendarHeader: {
|
|
249
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
250
|
+
inlineElement: {
|
|
251
|
+
displayName: DisplayNames.root.elements.calendarHeader,
|
|
252
|
+
selector: getSelector(selectors.calendarHeader),
|
|
253
|
+
behaviors: { selectable: false },
|
|
254
|
+
cssProperties: typography,
|
|
255
|
+
cssCustomProperties: textShadow,
|
|
142
256
|
visibleState: openWhileDesigning
|
|
143
257
|
}
|
|
144
258
|
},
|
|
145
|
-
|
|
259
|
+
weekdays: {
|
|
146
260
|
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
147
261
|
inlineElement: {
|
|
148
|
-
displayName: DisplayNames.root.elements.
|
|
149
|
-
selector: getSelector(selectors.
|
|
262
|
+
displayName: DisplayNames.root.elements.weekdays,
|
|
263
|
+
selector: getSelector(selectors.weekday),
|
|
150
264
|
behaviors: { selectable: false },
|
|
151
|
-
cssProperties:
|
|
265
|
+
cssProperties: alignedTypography,
|
|
266
|
+
cssCustomProperties: textShadow,
|
|
152
267
|
visibleState: openWhileDesigning
|
|
153
268
|
}
|
|
154
269
|
},
|
|
155
|
-
|
|
270
|
+
dates: {
|
|
156
271
|
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
157
272
|
inlineElement: {
|
|
158
|
-
displayName: DisplayNames.root.elements.
|
|
159
|
-
selector: getSelector(selectors.
|
|
273
|
+
displayName: DisplayNames.root.elements.dates,
|
|
274
|
+
selector: getSelector(selectors.date),
|
|
160
275
|
behaviors: { selectable: false },
|
|
161
|
-
cssProperties: { background: {},
|
|
276
|
+
cssProperties: { background: {}, ...typography },
|
|
277
|
+
cssCustomProperties: textShadow,
|
|
162
278
|
states: {
|
|
163
|
-
hover: designState(DesignStates.
|
|
164
|
-
selected: designState(DesignStates.
|
|
165
|
-
|
|
279
|
+
hover: designState(DesignStates.dates.hover),
|
|
280
|
+
selected: designState(DesignStates.dates.selected),
|
|
281
|
+
today: designState(DesignStates.dates.today),
|
|
282
|
+
focus: designState(DesignStates.dates.focus)
|
|
166
283
|
},
|
|
167
284
|
visibleState: openWhileDesigning
|
|
168
285
|
}
|
|
169
286
|
},
|
|
170
|
-
|
|
287
|
+
helperText: {
|
|
171
288
|
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
172
289
|
inlineElement: {
|
|
173
|
-
displayName: DisplayNames.root.elements.
|
|
174
|
-
selector:
|
|
290
|
+
displayName: DisplayNames.root.elements.helperText,
|
|
291
|
+
selector: getSelector(selectors.helperText),
|
|
175
292
|
behaviors: { selectable: false },
|
|
176
|
-
cssProperties:
|
|
177
|
-
|
|
293
|
+
cssProperties: alignedTypography,
|
|
294
|
+
cssCustomProperties: textShadow
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
errorMessage: {
|
|
298
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
299
|
+
inlineElement: {
|
|
300
|
+
displayName: DisplayNames.root.elements.errorMessage,
|
|
301
|
+
selector: getSelector(selectors.errorMessage),
|
|
302
|
+
behaviors: { selectable: false },
|
|
303
|
+
cssProperties: alignedTypography,
|
|
304
|
+
cssCustomProperties: textShadow
|
|
178
305
|
}
|
|
179
306
|
}
|
|
180
307
|
},
|
|
181
308
|
data: {
|
|
182
309
|
value: {
|
|
183
|
-
dataType: DATA.DATA_TYPE.
|
|
184
|
-
displayName: DisplayNames.root.data.value
|
|
185
|
-
|
|
186
|
-
endValue: {
|
|
187
|
-
dataType: DATA.DATA_TYPE.text,
|
|
188
|
-
displayName: DisplayNames.root.data.endValue
|
|
189
|
-
},
|
|
190
|
-
defaultValue: {
|
|
191
|
-
dataType: DATA.DATA_TYPE.text,
|
|
192
|
-
displayName: DisplayNames.root.data.defaultValue
|
|
193
|
-
},
|
|
194
|
-
defaultEndValue: {
|
|
195
|
-
dataType: DATA.DATA_TYPE.text,
|
|
196
|
-
displayName: DisplayNames.root.data.defaultEndValue
|
|
197
|
-
},
|
|
198
|
-
selectionMode: {
|
|
199
|
-
dataType: DATA.DATA_TYPE.textEnum,
|
|
200
|
-
displayName: DisplayNames.root.data.selectionMode.displayName,
|
|
201
|
-
[DATA.DATA_TYPE.textEnum]: {
|
|
202
|
-
options: [
|
|
203
|
-
{
|
|
204
|
-
value: "single",
|
|
205
|
-
displayName: DisplayNames.root.data.selectionMode.options.single
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
value: "range",
|
|
209
|
-
displayName: DisplayNames.root.data.selectionMode.options.range
|
|
210
|
-
}
|
|
211
|
-
]
|
|
212
|
-
},
|
|
213
|
-
defaultValue: defaultValues.selectionMode
|
|
310
|
+
dataType: DATA.DATA_TYPE.localDate,
|
|
311
|
+
displayName: DisplayNames.root.data.value,
|
|
312
|
+
description: Descriptions.root.data.value
|
|
214
313
|
},
|
|
215
|
-
|
|
216
|
-
dataType: DATA.DATA_TYPE.
|
|
217
|
-
displayName: DisplayNames.root.data.
|
|
218
|
-
[DATA.DATA_TYPE.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
value: "day",
|
|
222
|
-
displayName: DisplayNames.root.data.granularity.options.day
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
value: "hour",
|
|
226
|
-
displayName: DisplayNames.root.data.granularity.options.hour
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
value: "minute",
|
|
230
|
-
displayName: DisplayNames.root.data.granularity.options.minute
|
|
231
|
-
}
|
|
232
|
-
]
|
|
233
|
-
},
|
|
234
|
-
defaultValue: defaultValues.granularity
|
|
314
|
+
onValueChange: {
|
|
315
|
+
dataType: DATA.DATA_TYPE.function,
|
|
316
|
+
displayName: DisplayNames.root.data.onValueChange,
|
|
317
|
+
[DATA.DATA_TYPE.function]: {
|
|
318
|
+
parameters: [{ dataType: DATA.DATA_TYPE.localDate }]
|
|
319
|
+
}
|
|
235
320
|
},
|
|
236
321
|
label: {
|
|
237
322
|
dataType: DATA.DATA_TYPE.text,
|
|
238
323
|
displayName: DisplayNames.root.data.label,
|
|
239
324
|
defaultValue: defaultValues.label
|
|
240
325
|
},
|
|
241
|
-
|
|
326
|
+
helperText: {
|
|
242
327
|
dataType: DATA.DATA_TYPE.text,
|
|
243
|
-
displayName: DisplayNames.root.data.
|
|
244
|
-
|
|
328
|
+
displayName: DisplayNames.root.data.helperText,
|
|
329
|
+
description: Descriptions.root.data.helperText,
|
|
330
|
+
defaultValue: defaultValues.helperText
|
|
245
331
|
},
|
|
246
|
-
|
|
332
|
+
errorMessage: {
|
|
247
333
|
dataType: DATA.DATA_TYPE.text,
|
|
248
|
-
displayName: DisplayNames.root.data.
|
|
249
|
-
|
|
250
|
-
},
|
|
251
|
-
minDate: {
|
|
252
|
-
dataType: DATA.DATA_TYPE.localDate,
|
|
253
|
-
displayName: DisplayNames.root.data.minDate
|
|
254
|
-
},
|
|
255
|
-
maxDate: {
|
|
256
|
-
dataType: DATA.DATA_TYPE.localDate,
|
|
257
|
-
displayName: DisplayNames.root.data.maxDate
|
|
258
|
-
},
|
|
259
|
-
unavailableDates: {
|
|
260
|
-
dataType: DATA.DATA_TYPE.arrayItems,
|
|
261
|
-
displayName: DisplayNames.root.data.unavailableDates,
|
|
262
|
-
[DATA.DATA_TYPE.arrayItems]: {
|
|
263
|
-
data: {
|
|
264
|
-
items: {
|
|
265
|
-
from: {
|
|
266
|
-
dataType: DATA.DATA_TYPE.localDate,
|
|
267
|
-
displayName: DisplayNames.root.data.unavailableFrom
|
|
268
|
-
},
|
|
269
|
-
to: {
|
|
270
|
-
dataType: DATA.DATA_TYPE.localDate,
|
|
271
|
-
displayName: DisplayNames.root.data.unavailableTo
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
allowPastDates: {
|
|
278
|
-
dataType: DATA.DATA_TYPE.booleanValue,
|
|
279
|
-
displayName: DisplayNames.root.data.allowPastDates,
|
|
280
|
-
defaultValue: defaultValues.allowPastDates
|
|
281
|
-
},
|
|
282
|
-
allowFutureDates: {
|
|
283
|
-
dataType: DATA.DATA_TYPE.booleanValue,
|
|
284
|
-
displayName: DisplayNames.root.data.allowFutureDates,
|
|
285
|
-
defaultValue: defaultValues.allowFutureDates
|
|
286
|
-
},
|
|
287
|
-
required: {
|
|
288
|
-
dataType: DATA.DATA_TYPE.booleanValue,
|
|
289
|
-
displayName: DisplayNames.root.data.required,
|
|
290
|
-
defaultValue: defaultValues.required
|
|
334
|
+
displayName: DisplayNames.root.data.errorMessage,
|
|
335
|
+
description: Descriptions.root.data.errorMessage
|
|
291
336
|
},
|
|
292
337
|
readOnly: {
|
|
293
338
|
dataType: DATA.DATA_TYPE.booleanValue,
|
|
294
339
|
displayName: DisplayNames.root.data.readOnly,
|
|
295
340
|
defaultValue: defaultValues.readOnly
|
|
296
341
|
},
|
|
297
|
-
|
|
342
|
+
disabled: {
|
|
298
343
|
dataType: DATA.DATA_TYPE.booleanValue,
|
|
299
344
|
displayName: DisplayNames.root.data.disabled,
|
|
300
345
|
defaultValue: defaultValues.disabled
|
|
301
346
|
},
|
|
302
|
-
clearable: {
|
|
303
|
-
dataType: DATA.DATA_TYPE.booleanValue,
|
|
304
|
-
displayName: DisplayNames.root.data.clearable,
|
|
305
|
-
defaultValue: defaultValues.clearable
|
|
306
|
-
},
|
|
307
347
|
a11y: {
|
|
308
348
|
dataType: DATA.DATA_TYPE.a11y,
|
|
309
349
|
[DATA.DATA_TYPE.a11y]: {
|
|
@@ -312,59 +352,50 @@ const manifest = {
|
|
|
312
352
|
},
|
|
313
353
|
direction: {
|
|
314
354
|
dataType: DATA.DATA_TYPE.direction
|
|
315
|
-
}
|
|
316
|
-
...manifestChangeable(),
|
|
317
|
-
onEndChange: {
|
|
318
|
-
dataType: DATA.DATA_TYPE.function,
|
|
319
|
-
displayName: DisplayNames.root.data.onEndChange,
|
|
320
|
-
[DATA.DATA_TYPE.function]: {
|
|
321
|
-
parameters: [{ domEvent: DomEventType.CHANGE }]
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
...manifestFocusable(),
|
|
325
|
-
// The bound value is an ISO date string, so `onValidate` carries text.
|
|
326
|
-
...manifestValidation({ valueDataType: DATA.DATA_TYPE.text })
|
|
355
|
+
}
|
|
327
356
|
},
|
|
328
357
|
displayGroups: {
|
|
358
|
+
// Order of the parts in the design panel.
|
|
359
|
+
partsOrder: {
|
|
360
|
+
groupType: DISPLAY_GROUPS.GROUP_TYPE.elements,
|
|
361
|
+
elements: {
|
|
362
|
+
items: [
|
|
363
|
+
"label",
|
|
364
|
+
"dateInput",
|
|
365
|
+
"calendarButton",
|
|
366
|
+
"popover",
|
|
367
|
+
"calendarHeader",
|
|
368
|
+
"weekdays",
|
|
369
|
+
"dates",
|
|
370
|
+
"helperText",
|
|
371
|
+
"errorMessage"
|
|
372
|
+
]
|
|
373
|
+
}
|
|
374
|
+
},
|
|
329
375
|
orderedDataGroup: {
|
|
330
376
|
groupType: DISPLAY_GROUPS.GROUP_TYPE.data,
|
|
331
377
|
data: {
|
|
332
378
|
items: [
|
|
333
|
-
"required",
|
|
334
|
-
"readOnly",
|
|
335
|
-
"isDisabled",
|
|
336
|
-
"clearable",
|
|
337
|
-
"allowPastDates",
|
|
338
|
-
"allowFutureDates",
|
|
339
|
-
"selectionMode",
|
|
340
|
-
"granularity",
|
|
341
379
|
"label",
|
|
342
|
-
"
|
|
343
|
-
"
|
|
344
|
-
"
|
|
345
|
-
"
|
|
380
|
+
"helperText",
|
|
381
|
+
"errorMessage",
|
|
382
|
+
"value",
|
|
383
|
+
"readOnly",
|
|
384
|
+
"disabled"
|
|
346
385
|
]
|
|
347
386
|
}
|
|
348
387
|
}
|
|
349
388
|
},
|
|
389
|
+
// Only Disabled at the root: hover and focus are per part (Date input,
|
|
390
|
+
// Calendar button, Dates). A root Hover/Focus would restyle every part
|
|
391
|
+
// whenever any of the component is hovered or focused.
|
|
350
392
|
states: {
|
|
351
|
-
hover: withSpec({
|
|
352
|
-
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
353
|
-
displayName: DesignStates.root.hover.displayName,
|
|
354
|
-
className: DesignStates.root.hover.className,
|
|
355
|
-
pseudoClass: NativeStateType.hover
|
|
356
|
-
}),
|
|
357
|
-
focus: withSpec({
|
|
358
|
-
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
359
|
-
displayName: DesignStates.root.focus.displayName,
|
|
360
|
-
className: DesignStates.root.focus.className,
|
|
361
|
-
pseudoClass: NativeStateType.focus
|
|
362
|
-
}),
|
|
363
393
|
disabled: withSpec({
|
|
364
394
|
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
365
395
|
displayName: DesignStates.root.disabled.displayName,
|
|
366
396
|
className: DesignStates.root.disabled.className,
|
|
367
|
-
pseudoClass: NativeStateType.disabled
|
|
397
|
+
pseudoClass: NativeStateType.disabled,
|
|
398
|
+
props: { disabled: true }
|
|
368
399
|
}),
|
|
369
400
|
// Editor-only: activating this state passes `previewCalendarOpen` so the
|
|
370
401
|
// overlay parts (referenced via `visibleState`) are editable on canvas.
|
|
@@ -377,12 +408,8 @@ const manifest = {
|
|
|
377
408
|
displayFilters: {
|
|
378
409
|
states: {
|
|
379
410
|
hide: [PREVIEW_CALENDAR_OPEN]
|
|
380
|
-
},
|
|
381
|
-
actions: {
|
|
382
|
-
hide: ["manageItems"]
|
|
383
411
|
}
|
|
384
|
-
}
|
|
385
|
-
cssProperties
|
|
412
|
+
}
|
|
386
413
|
},
|
|
387
414
|
resources: {
|
|
388
415
|
client: {
|
|
@@ -496,7 +496,6 @@ const LoadMoreButton = ({
|
|
|
496
496
|
children: label
|
|
497
497
|
}
|
|
498
498
|
);
|
|
499
|
-
const DEFAULT_ITEMS = ["1", "2", "3"];
|
|
500
499
|
const getItemKey = (item2, index) => {
|
|
501
500
|
if (typeof item2 === "string") {
|
|
502
501
|
return `${item2}-${index}`;
|
|
@@ -529,20 +528,21 @@ const Repeater = (props) => {
|
|
|
529
528
|
direction,
|
|
530
529
|
a11y,
|
|
531
530
|
renderItem = () => /* @__PURE__ */ jsx(Fragment, {}),
|
|
532
|
-
items
|
|
531
|
+
items,
|
|
533
532
|
isLoading: isLoadingProp,
|
|
534
533
|
onLoadMore,
|
|
535
534
|
emptyStateContent: emptyStateContent2,
|
|
536
535
|
isEmpty: isEmptyProp
|
|
537
536
|
} = props;
|
|
538
|
-
const
|
|
537
|
+
const itemCount = (items == null ? void 0 : items.length) ?? 0;
|
|
538
|
+
const showEmptyState = !isLoadingProp && (isEmptyProp === true || itemCount === 0);
|
|
539
539
|
const presetsWrapperProps = ((_a = props.wix) == null ? void 0 : _a.presetsWrapperProps) || {};
|
|
540
540
|
const [sentinelRef, isIntersecting] = useLoadMoreObserver(
|
|
541
541
|
!!onLoadMore && !showEmptyState && !isLoadingProp
|
|
542
542
|
);
|
|
543
543
|
const { isLoading, load, hasReachedEnd } = useAsyncLoadMore(
|
|
544
544
|
onLoadMore,
|
|
545
|
-
|
|
545
|
+
itemCount,
|
|
546
546
|
isIntersecting,
|
|
547
547
|
isLoadingProp
|
|
548
548
|
);
|
|
@@ -575,7 +575,7 @@ const Repeater = (props) => {
|
|
|
575
575
|
{
|
|
576
576
|
role: "listitem",
|
|
577
577
|
className: clsx(semanticClassNames.item, styles.item),
|
|
578
|
-
children: renderItem(item2, index,
|
|
578
|
+
children: renderItem(item2, index, itemCount)
|
|
579
579
|
},
|
|
580
580
|
getItemKey(item2, index)
|
|
581
581
|
)),
|
|
@@ -617,7 +617,7 @@ const Repeater = (props) => {
|
|
|
617
617
|
/* @__PURE__ */ jsx(
|
|
618
618
|
LiveAnnouncer,
|
|
619
619
|
{
|
|
620
|
-
itemCount
|
|
620
|
+
itemCount,
|
|
621
621
|
hasMore: !hasReachedEnd,
|
|
622
622
|
onLoadMore
|
|
623
623
|
}
|
|
@@ -10,8 +10,8 @@ import { a as accessibilityStyles } from "../chunks/accessibility.module.js";
|
|
|
10
10
|
import { c as componentClassNames, D as DesignStates, E as ERROR_MESSAGE_PREVIEW_TEXT } from "../chunks/constants3.js";
|
|
11
11
|
import { useService } from "@wix/services-manager-react";
|
|
12
12
|
import { b as $fd2148440a13ec26$export$fc1a364ae1f3ff10, c as $191c9b6d48a0a4e2$export$294aa081a6c6f55d, d as $860f7da480e22816$export$b8473d3665f3a75a, e as $d3e0e05bdfcf66bd$export$c24727297075ec6a, f as $3985021b0ad6602f$export$37fb8590cf2c088c, g as $514c0188e459b4c0$export$9afb8bc826b033ea, h as $ee014567cb39d3f0$export$ff05c3ac10437e03, i as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../chunks/Input.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { i as $3e6197669829fe11$export$40bfa8c7b0832715, c as $d1116acdf220c2da$export$4c014de7c8940b4c, j as $3274bf1495747a7b$export$5add1d006293d136, a as $bbaa08b3cd72f041$export$9d1611c77c2fe928, k as $23f2114a1b82827e$export$e58f029f0fbfdb29, l as $01b77f81d0f07f68$export$75b6ee27786ba447, m as $a049562f99e7db0e$export$f9c6924e160136d1, h as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../chunks/Group.js";
|
|
14
|
+
import { a as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, f as $f39a9eba43920ace$export$86427a43e3e48ebb, c as $64fa3d84918910a7$export$29f1550f4b0d4415, g as $64fa3d84918910a7$export$fabf2dc03a41866e, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, i as $64fa3d84918910a7$export$ef03459518577ad4, d as $64fa3d84918910a7$export$4d86445c2cf5e3, e as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, b as $64fa3d84918910a7$export$2881499e37b75b9a } from "../chunks/filterDOMProps.js";
|
|
15
15
|
const $8e6cc465cc68f603$export$698f465ec27e93df = /* @__PURE__ */ createContext(null);
|
|
16
16
|
function $054f71d2330da2e3$export$712718f7aec83d5(props, ref) {
|
|
17
17
|
let { inputElementType = "input", isDisabled = false, isRequired = false, isReadOnly = false, type = "text", validationBehavior = "aria" } = props;
|