@semcore/date-picker 16.1.1 → 16.1.2-prerelease.3
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 +6 -0
- package/README.md +2 -28
- package/lib/cjs/DatePicker.js +27 -31
- package/lib/cjs/DatePicker.js.map +1 -1
- package/lib/cjs/DateRangeComparator.js +28 -29
- package/lib/cjs/DateRangeComparator.js.map +1 -1
- package/lib/cjs/DateRangePicker.js +19 -20
- package/lib/cjs/DateRangePicker.js.map +1 -1
- package/lib/cjs/MonthDateRangeComparator.js +33 -34
- package/lib/cjs/MonthDateRangeComparator.js.map +1 -1
- package/lib/cjs/MonthPicker.js +18 -19
- package/lib/cjs/MonthPicker.js.map +1 -1
- package/lib/cjs/MonthRangePicker.js +20 -21
- package/lib/cjs/MonthRangePicker.js.map +1 -1
- package/lib/cjs/components/ButtonTrigger.js +3 -4
- package/lib/cjs/components/ButtonTrigger.js.map +1 -1
- package/lib/cjs/components/Calendar.js +105 -114
- package/lib/cjs/components/Calendar.js.map +1 -1
- package/lib/cjs/components/DateRangeComparatorAbstract.js +93 -95
- package/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -1
- package/lib/cjs/components/InputTrigger.js +158 -166
- package/lib/cjs/components/InputTrigger.js.map +1 -1
- package/lib/cjs/components/PickerAbstract.js +53 -54
- package/lib/cjs/components/PickerAbstract.js.map +1 -1
- package/lib/cjs/components/RangePickerAbstract.js +61 -62
- package/lib/cjs/components/RangePickerAbstract.js.map +1 -1
- package/lib/cjs/components/index.js +35 -39
- package/lib/cjs/components/index.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +2 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/utils/cronTabScheduler.js +6 -5
- package/lib/cjs/utils/cronTabScheduler.js.map +1 -1
- package/lib/cjs/utils/datesIntersects.js +3 -4
- package/lib/cjs/utils/datesIntersects.js.map +1 -1
- package/lib/cjs/utils/formatDate.js +3 -5
- package/lib/cjs/utils/formatDate.js.map +1 -1
- package/lib/cjs/utils/includesDate.js +2 -3
- package/lib/cjs/utils/includesDate.js.map +1 -1
- package/lib/cjs/utils/isBetweenPlugin.js +1 -2
- package/lib/cjs/utils/isBetweenPlugin.js.map +1 -1
- package/lib/cjs/utils/shortDateRangeFormat.js +2 -2
- package/lib/cjs/utils/shortDateRangeFormat.js.map +1 -1
- package/lib/es6/DatePicker.js +25 -27
- package/lib/es6/DatePicker.js.map +1 -1
- package/lib/es6/DateRangeComparator.js +26 -26
- package/lib/es6/DateRangeComparator.js.map +1 -1
- package/lib/es6/DateRangePicker.js +16 -16
- package/lib/es6/DateRangePicker.js.map +1 -1
- package/lib/es6/MonthDateRangeComparator.js +31 -31
- package/lib/es6/MonthDateRangeComparator.js.map +1 -1
- package/lib/es6/MonthPicker.js +16 -16
- package/lib/es6/MonthPicker.js.map +1 -1
- package/lib/es6/MonthRangePicker.js +17 -17
- package/lib/es6/MonthRangePicker.js.map +1 -1
- package/lib/es6/components/ButtonTrigger.js +2 -2
- package/lib/es6/components/ButtonTrigger.js.map +1 -1
- package/lib/es6/components/Calendar.js +102 -109
- package/lib/es6/components/Calendar.js.map +1 -1
- package/lib/es6/components/DateRangeComparatorAbstract.js +94 -95
- package/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -1
- package/lib/es6/components/InputTrigger.js +158 -165
- package/lib/es6/components/InputTrigger.js.map +1 -1
- package/lib/es6/components/PickerAbstract.js +52 -52
- package/lib/es6/components/PickerAbstract.js.map +1 -1
- package/lib/es6/components/RangePickerAbstract.js +62 -62
- package/lib/es6/components/RangePickerAbstract.js.map +1 -1
- package/lib/es6/components/index.js +33 -35
- package/lib/es6/components/index.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/utils/cronTabScheduler.js +5 -4
- package/lib/es6/utils/cronTabScheduler.js.map +1 -1
- package/lib/es6/utils/datesIntersects.js +1 -1
- package/lib/es6/utils/datesIntersects.js.map +1 -1
- package/lib/es6/utils/formatDate.js.map +1 -1
- package/lib/es6/utils/includesDate.js.map +1 -1
- package/lib/es6/utils/isBetweenPlugin.js +1 -1
- package/lib/es6/utils/isBetweenPlugin.js.map +1 -1
- package/lib/es6/utils/shortDateRangeFormat.js +1 -1
- package/lib/es6/utils/shortDateRangeFormat.js.map +1 -1
- package/lib/esm/DatePicker.mjs +32 -27
- package/lib/esm/DateRangeComparator.mjs +33 -26
- package/lib/esm/DateRangePicker.mjs +25 -18
- package/lib/esm/MonthDateRangeComparator.mjs +38 -31
- package/lib/esm/MonthPicker.mjs +24 -17
- package/lib/esm/MonthRangePicker.mjs +26 -19
- package/lib/esm/components/ButtonTrigger.mjs +1 -1
- package/lib/esm/components/Calendar.mjs +99 -103
- package/lib/esm/components/DateRangeComparatorAbstract.mjs +74 -74
- package/lib/esm/components/InputTrigger.mjs +128 -133
- package/lib/esm/components/PickerAbstract.mjs +55 -53
- package/lib/esm/components/RangePickerAbstract.mjs +63 -61
- package/lib/esm/components/index.mjs +28 -28
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/utils/cronTabScheduler.mjs +4 -4
- package/lib/esm/utils/datesIntersects.mjs +1 -1
- package/lib/esm/utils/isBetweenPlugin.mjs +1 -1
- package/lib/types/index.d.ts +129 -125
- package/package.json +16 -16
package/lib/types/index.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import Popper from '@semcore/popper';
|
|
1
|
+
import type { BaseTriggerProps } from '@semcore/base-trigger';
|
|
2
|
+
import type BaseTrigger from '@semcore/base-trigger';
|
|
3
|
+
import type { ButtonProps } from '@semcore/button';
|
|
4
|
+
import type Button from '@semcore/button';
|
|
5
|
+
import type Checkbox from '@semcore/checkbox';
|
|
6
|
+
import type { UnknownProperties, Intergalactic, PropGetterFn } from '@semcore/core';
|
|
7
|
+
import type { WithI18nEnhanceProps } from '@semcore/core/lib/utils/enhances/i18nEnhance';
|
|
8
|
+
import type Divider from '@semcore/divider';
|
|
9
|
+
import type { DropdownProps, DropdownTriggerProps } from '@semcore/dropdown';
|
|
10
|
+
import type { Flex, Box, BoxProps } from '@semcore/flex-box';
|
|
11
|
+
import type { InputProps, InputValueProps } from '@semcore/input';
|
|
12
|
+
import type Input from '@semcore/input';
|
|
13
|
+
import type { InputMaskValueProps } from '@semcore/input-mask';
|
|
14
|
+
import type Popper from '@semcore/popper';
|
|
15
|
+
import type { TooltipProps } from '@semcore/tooltip';
|
|
16
|
+
import type dayjs from 'dayjs';
|
|
17
|
+
import type { ChangeEvent } from 'react';
|
|
18
|
+
import type React from 'react';
|
|
15
19
|
|
|
16
20
|
export type DateConstructorParams = string | number | Date;
|
|
17
21
|
|
|
@@ -107,54 +111,54 @@ export type DatePickerProps = Intergalactic.InternalTypings.EfficientOmit<
|
|
|
107
111
|
DropdownProps,
|
|
108
112
|
'disabled'
|
|
109
113
|
> &
|
|
110
|
-
|
|
111
|
-
|
|
114
|
+
WithI18nEnhanceProps & {
|
|
115
|
+
/**
|
|
112
116
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
113
117
|
* */
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
value?: DateConstructorParams;
|
|
119
|
+
/**
|
|
116
120
|
* To be activated upon selecting the date
|
|
117
121
|
* */
|
|
118
|
-
|
|
119
|
-
|
|
122
|
+
onChange?: (date: Date) => void;
|
|
123
|
+
/**
|
|
120
124
|
* Array of dates blocked for selection
|
|
121
125
|
* */
|
|
122
|
-
|
|
123
|
-
|
|
126
|
+
disabled?: (DateConstructorParams | (DateConstructorParams | false)[] | string)[];
|
|
127
|
+
/**
|
|
124
128
|
* Error message when user attempts to input a disabled date
|
|
125
129
|
* */
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
disabledErrorText?: ((attemptedDate: Date) => string) | string | null;
|
|
131
|
+
/**
|
|
128
132
|
* Date for showing the necessary month
|
|
129
133
|
* @default new Date()
|
|
130
134
|
* */
|
|
131
|
-
|
|
132
|
-
|
|
135
|
+
displayedPeriod?: DateConstructorParams;
|
|
136
|
+
/**
|
|
133
137
|
* To be activated upon changing the current shown month
|
|
134
138
|
* */
|
|
135
|
-
|
|
136
|
-
|
|
139
|
+
onDisplayedPeriodChange?: (date: Date) => void;
|
|
140
|
+
/**
|
|
137
141
|
* Component size
|
|
138
142
|
* @default m
|
|
139
143
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
144
|
+
size?: 'm' | 'l';
|
|
145
|
+
/**
|
|
142
146
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
143
147
|
* */
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
highlighted?: DateConstructorParams[];
|
|
149
|
+
/**
|
|
146
150
|
* Default value selected date, accepts everything which is accepted by `new Date()`
|
|
147
151
|
* */
|
|
148
|
-
|
|
149
|
-
|
|
152
|
+
defaultValue?: DateConstructorParams;
|
|
153
|
+
/**
|
|
150
154
|
* Default value date for showing the necessary month
|
|
151
155
|
* */
|
|
152
|
-
|
|
153
|
-
|
|
156
|
+
defaultDisplayedPeriod?: DateConstructorParams;
|
|
157
|
+
/**
|
|
154
158
|
* Default value selected date, accepts everything which is accepted by `new Date()`
|
|
155
159
|
* */
|
|
156
|
-
|
|
157
|
-
|
|
160
|
+
defaultHighlighted?: DateConstructorParams[];
|
|
161
|
+
};
|
|
158
162
|
|
|
159
163
|
/** @deprecated */
|
|
160
164
|
export interface IDateRangePickerProps extends DateRangePickerProps, UnknownProperties {}
|
|
@@ -162,76 +166,76 @@ export type DateRangePickerProps = Intergalactic.InternalTypings.EfficientOmit<
|
|
|
162
166
|
DropdownProps,
|
|
163
167
|
'disabled'
|
|
164
168
|
> &
|
|
165
|
-
|
|
166
|
-
|
|
169
|
+
WithI18nEnhanceProps & {
|
|
170
|
+
/**
|
|
167
171
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
168
172
|
* */
|
|
169
|
-
|
|
170
|
-
|
|
173
|
+
value?: DateConstructorParams[];
|
|
174
|
+
/**
|
|
171
175
|
* Default value selected date, accepts everything which is accepted by `new Date()`
|
|
172
176
|
* */
|
|
173
|
-
|
|
174
|
-
|
|
177
|
+
defaultValue?: DateConstructorParams[];
|
|
178
|
+
/**
|
|
175
179
|
* Default value date for showing the necessary month
|
|
176
180
|
* */
|
|
177
|
-
|
|
178
|
-
|
|
181
|
+
defaultDisplayedPeriod?: DateConstructorParams;
|
|
182
|
+
/**
|
|
179
183
|
* Default value selected date, accepts everything which is accepted by `new Date()`
|
|
180
184
|
* */
|
|
181
|
-
|
|
182
|
-
|
|
185
|
+
defaultHighlighted?: DateConstructorParams[];
|
|
186
|
+
/**
|
|
183
187
|
* To be activated upon selecting the date
|
|
184
188
|
* */
|
|
185
|
-
|
|
186
|
-
|
|
189
|
+
onChange?: (date: Date[]) => void;
|
|
190
|
+
/**
|
|
187
191
|
* Array of dates blocked for selection
|
|
188
192
|
* */
|
|
189
|
-
|
|
190
|
-
|
|
193
|
+
disabled?: (DateConstructorParams | (DateConstructorParams | false)[] | string)[];
|
|
194
|
+
/**
|
|
191
195
|
* Error message when user attempts to input a disabled date
|
|
192
196
|
* */
|
|
193
|
-
|
|
194
|
-
|
|
197
|
+
disabledErrorText?: ((attemptedDate: Date) => string) | string | null;
|
|
198
|
+
/**
|
|
195
199
|
* Date for showing the necessary month
|
|
196
200
|
* @default new Date()
|
|
197
201
|
* */
|
|
198
|
-
|
|
199
|
-
|
|
202
|
+
displayedPeriod?: DateConstructorParams;
|
|
203
|
+
/**
|
|
200
204
|
* To be activated upon changing the current shown month
|
|
201
205
|
* */
|
|
202
|
-
|
|
203
|
-
|
|
206
|
+
onDisplayedPeriodChange?: (date: Date) => void;
|
|
207
|
+
/**
|
|
204
208
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
205
209
|
* */
|
|
206
|
-
|
|
207
|
-
|
|
210
|
+
highlighted?: DateConstructorParams[];
|
|
211
|
+
/**
|
|
208
212
|
* Remove the 'Reset' button
|
|
209
213
|
* */
|
|
210
|
-
|
|
211
|
-
|
|
214
|
+
unclearable?: boolean;
|
|
215
|
+
/**
|
|
212
216
|
* To be activated upon selecting the date
|
|
213
217
|
* */
|
|
214
|
-
|
|
215
|
-
|
|
218
|
+
onHighlightedChange?: (date: Date[]) => void;
|
|
219
|
+
/**
|
|
216
220
|
* Intermediate value between `highlighted` and `value` that user see before explicitly applying it.
|
|
217
221
|
*/
|
|
218
|
-
|
|
219
|
-
|
|
222
|
+
preselectedValue?: DateConstructorParams[];
|
|
223
|
+
/**
|
|
220
224
|
* Normally called when user preselects a date range and when user applies this range.
|
|
221
225
|
*/
|
|
222
|
-
|
|
223
|
-
|
|
226
|
+
onPreselectedValueChange?: (date: Date[]) => void;
|
|
227
|
+
/**
|
|
224
228
|
* Array of periods
|
|
225
229
|
* [{value: [new Date(), new Date()], children: "Today"}]
|
|
226
230
|
* @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month
|
|
227
231
|
* */
|
|
228
|
-
|
|
229
|
-
|
|
232
|
+
periods?: (ButtonProps & { value: Date[] })[];
|
|
233
|
+
};
|
|
230
234
|
|
|
231
235
|
/** @deprecated */
|
|
232
236
|
export interface IDateRangePickerPeriodProps
|
|
233
237
|
extends DateRangePickerPeriodProps,
|
|
234
|
-
|
|
238
|
+
UnknownProperties {}
|
|
235
239
|
export type DateRangePickerPeriodProps = BoxProps & {
|
|
236
240
|
/**
|
|
237
241
|
* Current selected period
|
|
@@ -273,7 +277,7 @@ export type DatePickerContext = {
|
|
|
273
277
|
/** @deprecated */
|
|
274
278
|
export interface IAbstractDatePickerHandlers
|
|
275
279
|
extends AbstractDatePickerHandlers,
|
|
276
|
-
|
|
280
|
+
UnknownProperties {}
|
|
277
281
|
export type AbstractDatePickerHandlers = {
|
|
278
282
|
displayedPeriod: (value: DateConstructorParams) => void;
|
|
279
283
|
visible: (index: boolean) => void;
|
|
@@ -322,13 +326,13 @@ export type DateRangeProps = RangeInputTriggerProps & {};
|
|
|
322
326
|
/** @deprecated */
|
|
323
327
|
export interface IDatePickerMaskedInputProps
|
|
324
328
|
extends DatePickerMaskedInputProps,
|
|
325
|
-
|
|
329
|
+
UnknownProperties {}
|
|
326
330
|
export type DatePickerMaskedInputProps = {
|
|
327
331
|
date?: Date;
|
|
328
332
|
onDateChange?: (date: Date, event: ChangeEvent) => void;
|
|
329
333
|
onDisplayedPeriodChange?: (date: Date) => void;
|
|
330
334
|
locale?: string;
|
|
331
|
-
parts?: { year:
|
|
335
|
+
parts?: { year: boolean; month: boolean; day: boolean };
|
|
332
336
|
disabledDates?: (Date | (Date | false)[] | string)[];
|
|
333
337
|
};
|
|
334
338
|
|
|
@@ -506,106 +510,106 @@ export type DateRangeComparatorProps = Intergalactic.InternalTypings.EfficientOm
|
|
|
506
510
|
DropdownProps,
|
|
507
511
|
'disabled'
|
|
508
512
|
> &
|
|
509
|
-
|
|
510
|
-
|
|
513
|
+
WithI18nEnhanceProps & {
|
|
514
|
+
/**
|
|
511
515
|
* Selected date ranges
|
|
512
516
|
* */
|
|
513
|
-
|
|
514
|
-
|
|
517
|
+
value?: DateRangeComparatorValue;
|
|
518
|
+
/**
|
|
515
519
|
* Default value for selected date ranges
|
|
516
520
|
* */
|
|
517
|
-
|
|
518
|
-
|
|
521
|
+
defaultValue?: DateRangeComparatorValue;
|
|
522
|
+
/**
|
|
519
523
|
* Default value date for showing the necessary month
|
|
520
524
|
* */
|
|
521
|
-
|
|
522
|
-
|
|
525
|
+
defaultDisplayedPeriod?: DateConstructorParams;
|
|
526
|
+
/**
|
|
523
527
|
* Default value selected date, accepts everything which is accepted by `new Date()`
|
|
524
528
|
* */
|
|
525
|
-
|
|
526
|
-
|
|
529
|
+
defaultHighlighted?: DateConstructorParams[];
|
|
530
|
+
/**
|
|
527
531
|
* Called with selected date when user clicks `Apply` button.
|
|
528
532
|
* */
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
533
|
+
onChange?: (ranges: {
|
|
534
|
+
value?: DateConstructorParams[];
|
|
535
|
+
compare?: DateConstructorParams[];
|
|
536
|
+
}) => void;
|
|
537
|
+
/**
|
|
534
538
|
* Array of dates blocked for selection
|
|
535
539
|
* */
|
|
536
|
-
|
|
537
|
-
|
|
540
|
+
disabled?: (DateConstructorParams | (DateConstructorParams | false)[] | string)[];
|
|
541
|
+
/**
|
|
538
542
|
* Error message when user attempts to input a disabled date
|
|
539
543
|
* */
|
|
540
|
-
|
|
541
|
-
|
|
544
|
+
disabledErrorText?: ((attemptedDate: Date) => string) | string | null;
|
|
545
|
+
/**
|
|
542
546
|
* Date for showing the necessary month
|
|
543
547
|
* @default new Date()
|
|
544
548
|
* */
|
|
545
|
-
|
|
546
|
-
|
|
549
|
+
displayedPeriod?: DateConstructorParams;
|
|
550
|
+
/**
|
|
547
551
|
* To be activated upon changing the current shown month
|
|
548
552
|
* */
|
|
549
|
-
|
|
550
|
-
|
|
553
|
+
onDisplayedPeriodChange?: (date: Date) => void;
|
|
554
|
+
/**
|
|
551
555
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
552
556
|
* */
|
|
553
|
-
|
|
554
|
-
|
|
557
|
+
highlighted?: DateConstructorParams[];
|
|
558
|
+
/**
|
|
555
559
|
* To be activated upon selecting the date
|
|
556
560
|
* */
|
|
557
|
-
|
|
558
|
-
|
|
561
|
+
onHighlightedChange?: (date: Date[]) => void;
|
|
562
|
+
/**
|
|
559
563
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
560
564
|
* */
|
|
561
|
-
|
|
562
|
-
|
|
565
|
+
compareHighlighted?: DateConstructorParams[];
|
|
566
|
+
/**
|
|
563
567
|
* To be activated upon selecting the date
|
|
564
568
|
* */
|
|
565
|
-
|
|
566
|
-
|
|
569
|
+
onCompareHighlightedChange?: (date: Date[]) => void;
|
|
570
|
+
/**
|
|
567
571
|
* Intermediate value between `highlighted` and `value` that user see before explicitly applying it.
|
|
568
572
|
*/
|
|
569
|
-
|
|
570
|
-
|
|
573
|
+
preselectedValue?: DateConstructorParams[];
|
|
574
|
+
/**
|
|
571
575
|
* Normally called when user preselects a date range and when user applies this range.
|
|
572
576
|
*/
|
|
573
|
-
|
|
574
|
-
|
|
577
|
+
onPreselectedValueChange?: (date: Date[]) => void;
|
|
578
|
+
/**
|
|
575
579
|
* Intermediate value between `compareHighlighted` and `compare` that user see before explicitly applying it.
|
|
576
580
|
*/
|
|
577
|
-
|
|
578
|
-
|
|
581
|
+
preselectedCompare?: DateConstructorParams[];
|
|
582
|
+
/**
|
|
579
583
|
* Normally called when user preselects a compare range and when user applies ranges.
|
|
580
584
|
*/
|
|
581
|
-
|
|
582
|
-
|
|
585
|
+
onPreselectedCompareChange?: (date: Date[]) => void;
|
|
586
|
+
/**
|
|
583
587
|
* Controls that compare range input is enabled.
|
|
584
588
|
*/
|
|
585
|
-
|
|
586
|
-
|
|
589
|
+
compareToggle?: boolean;
|
|
590
|
+
/**
|
|
587
591
|
* Toggles when compare range input enables or disables.
|
|
588
592
|
*/
|
|
589
|
-
|
|
590
|
-
|
|
593
|
+
onCompareToggleChange?: (compareToggle: boolean) => void;
|
|
594
|
+
/**
|
|
591
595
|
* Controls which date range is focused.
|
|
592
596
|
*/
|
|
593
|
-
|
|
594
|
-
|
|
597
|
+
focusedRange?: DateRangeComparatorFocusRange;
|
|
598
|
+
/**
|
|
595
599
|
* Called when user focuses or is focused on some of the date ranges.
|
|
596
600
|
*/
|
|
597
|
-
|
|
598
|
-
|
|
601
|
+
onFocusedRangeChange?: (focusedRange: DateRangeComparatorFocusRange) => void;
|
|
602
|
+
/**
|
|
599
603
|
* Remove the 'Reset' button
|
|
600
604
|
* */
|
|
601
|
-
|
|
602
|
-
|
|
605
|
+
unclearable?: boolean;
|
|
606
|
+
/**
|
|
603
607
|
* Array of periods
|
|
604
608
|
* [{value: [new Date(), new Date()], children: "Today"}]
|
|
605
609
|
* @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month
|
|
606
610
|
* */
|
|
607
|
-
|
|
608
|
-
|
|
611
|
+
periods?: (ButtonProps & { value: Date[] })[];
|
|
612
|
+
};
|
|
609
613
|
|
|
610
614
|
export type DateRangeComparatorContext = {
|
|
611
615
|
getTriggerProps: PropGetterFn;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/date-picker",
|
|
3
3
|
"description": "Semrush DatePicker Component",
|
|
4
|
-
"version": "16.1.
|
|
4
|
+
"version": "16.1.2-prerelease.3",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,23 +14,23 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/base-trigger": "16.2.
|
|
18
|
-
"@semcore/button": "16.0.
|
|
19
|
-
"@semcore/divider": "16.0.
|
|
20
|
-
"@semcore/popper": "16.0.
|
|
21
|
-
"@semcore/dropdown": "16.0.
|
|
22
|
-
"@semcore/icon": "16.2.
|
|
23
|
-
"@semcore/input": "16.0.
|
|
24
|
-
"@semcore/input-mask": "16.0.
|
|
25
|
-
"@semcore/typography": "16.1.
|
|
26
|
-
"@semcore/checkbox": "16.0.
|
|
27
|
-
"@semcore/tooltip": "16.0.
|
|
28
|
-
"@semcore/flex-box": "16.0.
|
|
29
|
-
"@semcore/neighbor-location": "16.0.
|
|
17
|
+
"@semcore/base-trigger": "16.2.1-prerelease.3",
|
|
18
|
+
"@semcore/button": "16.0.2-prerelease.3",
|
|
19
|
+
"@semcore/divider": "16.0.2-prerelease.3",
|
|
20
|
+
"@semcore/popper": "16.0.2-prerelease.3",
|
|
21
|
+
"@semcore/dropdown": "16.0.2-prerelease.3",
|
|
22
|
+
"@semcore/icon": "16.2.1-prerelease.3",
|
|
23
|
+
"@semcore/input": "16.0.2-prerelease.3",
|
|
24
|
+
"@semcore/input-mask": "16.0.2-prerelease.3",
|
|
25
|
+
"@semcore/typography": "16.1.2-prerelease.3",
|
|
26
|
+
"@semcore/checkbox": "16.0.2-prerelease.3",
|
|
27
|
+
"@semcore/tooltip": "16.0.2-prerelease.3",
|
|
28
|
+
"@semcore/flex-box": "16.0.2-prerelease.3",
|
|
29
|
+
"@semcore/neighbor-location": "16.0.2-prerelease.3",
|
|
30
30
|
"dayjs": "1.8.36"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@semcore/base-components": "^16.0.
|
|
33
|
+
"@semcore/base-components": "^16.0.2-prerelease.3"
|
|
34
34
|
},
|
|
35
35
|
"repository": {
|
|
36
36
|
"type": "git",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@semcore/testing-utils": "1.0.0",
|
|
42
|
-
"@
|
|
42
|
+
"@semcore/core": "16.0.0"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "pnpm semcore-builder --source=js && pnpm vite build"
|