@semcore/date-picker 4.58.0-prerelease.0 → 4.58.0-prerelease.4
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/lib/cjs/DatePicker.js +36 -27
- package/lib/cjs/DatePicker.js.map +1 -1
- package/lib/cjs/DateRangeComparator.js +43 -38
- package/lib/cjs/DateRangeComparator.js.map +1 -1
- package/lib/cjs/DateRangePicker.js +22 -17
- package/lib/cjs/DateRangePicker.js.map +1 -1
- package/lib/cjs/MonthDateRangeComparator.js +47 -42
- package/lib/cjs/MonthDateRangeComparator.js.map +1 -1
- package/lib/cjs/MonthPicker.js +21 -16
- package/lib/cjs/MonthPicker.js.map +1 -1
- package/lib/cjs/MonthRangePicker.js +23 -18
- package/lib/cjs/MonthRangePicker.js.map +1 -1
- package/lib/cjs/components/ButtonTrigger.js +10 -8
- package/lib/cjs/components/ButtonTrigger.js.map +1 -1
- package/lib/cjs/components/Calendar.js +125 -109
- package/lib/cjs/components/Calendar.js.map +1 -1
- package/lib/cjs/components/DateRangeComparatorAbstract.js +104 -121
- package/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -1
- package/lib/cjs/components/InputTrigger.js +189 -179
- package/lib/cjs/components/InputTrigger.js.map +1 -1
- package/lib/cjs/components/PickerAbstract.js +57 -58
- package/lib/cjs/components/PickerAbstract.js.map +1 -1
- package/lib/cjs/components/RangePickerAbstract.js +76 -97
- package/lib/cjs/components/RangePickerAbstract.js.map +1 -1
- package/lib/cjs/components/index.js +46 -41
- 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/style/calendar.shadow.css +21 -19
- package/lib/cjs/style/date-picker.shadow.css +8 -7
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +5 -4
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/translations/de.json +2 -6
- package/lib/cjs/translations/es.json +2 -6
- package/lib/cjs/translations/fr.json +2 -6
- package/lib/cjs/translations/it.json +2 -6
- package/lib/cjs/translations/ja.json +2 -6
- package/lib/cjs/translations/ko.json +2 -6
- package/lib/cjs/translations/nl.json +2 -6
- package/lib/cjs/translations/pl.json +2 -6
- package/lib/cjs/translations/pt.json +2 -6
- package/lib/cjs/translations/sv.json +2 -6
- package/lib/cjs/translations/tr.json +2 -6
- package/lib/cjs/translations/vi.json +2 -6
- package/lib/cjs/translations/zh.json +2 -6
- package/lib/cjs/utils/cronTabScheduler.js +5 -8
- package/lib/cjs/utils/cronTabScheduler.js.map +1 -1
- package/lib/cjs/utils/datesIntersects.js +4 -3
- package/lib/cjs/utils/datesIntersects.js.map +1 -1
- package/lib/cjs/utils/formatDate.js +5 -3
- package/lib/cjs/utils/formatDate.js.map +1 -1
- package/lib/cjs/utils/includesDate.js +3 -2
- package/lib/cjs/utils/includesDate.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 +28 -22
- package/lib/es6/DatePicker.js.map +1 -1
- package/lib/es6/DateRangeComparator.js +27 -23
- package/lib/es6/DateRangeComparator.js.map +1 -1
- package/lib/es6/DateRangePicker.js +17 -13
- package/lib/es6/DateRangePicker.js.map +1 -1
- package/lib/es6/MonthDateRangeComparator.js +32 -28
- package/lib/es6/MonthDateRangeComparator.js.map +1 -1
- package/lib/es6/MonthPicker.js +17 -13
- package/lib/es6/MonthPicker.js.map +1 -1
- package/lib/es6/MonthRangePicker.js +18 -14
- package/lib/es6/MonthRangePicker.js.map +1 -1
- package/lib/es6/components/ButtonTrigger.js +5 -5
- package/lib/es6/components/ButtonTrigger.js.map +1 -1
- package/lib/es6/components/Calendar.js +112 -100
- package/lib/es6/components/Calendar.js.map +1 -1
- package/lib/es6/components/DateRangeComparatorAbstract.js +101 -120
- package/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -1
- package/lib/es6/components/InputTrigger.js +180 -173
- package/lib/es6/components/InputTrigger.js.map +1 -1
- package/lib/es6/components/PickerAbstract.js +55 -58
- package/lib/es6/components/PickerAbstract.js.map +1 -1
- package/lib/es6/components/RangePickerAbstract.js +71 -94
- package/lib/es6/components/RangePickerAbstract.js.map +1 -1
- package/lib/es6/components/index.js +38 -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/style/calendar.shadow.css +21 -19
- package/lib/es6/style/date-picker.shadow.css +8 -7
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/translations/de.json +2 -6
- package/lib/es6/translations/es.json +2 -6
- package/lib/es6/translations/fr.json +2 -6
- package/lib/es6/translations/it.json +2 -6
- package/lib/es6/translations/ja.json +2 -6
- package/lib/es6/translations/ko.json +2 -6
- package/lib/es6/translations/nl.json +2 -6
- package/lib/es6/translations/pl.json +2 -6
- package/lib/es6/translations/pt.json +2 -6
- package/lib/es6/translations/sv.json +2 -6
- package/lib/es6/translations/tr.json +2 -6
- package/lib/es6/translations/vi.json +2 -6
- package/lib/es6/translations/zh.json +2 -6
- package/lib/es6/utils/cronTabScheduler.js +4 -7
- 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/shortDateRangeFormat.js +1 -1
- package/lib/es6/utils/shortDateRangeFormat.js.map +1 -1
- package/lib/esm/DatePicker.mjs +33 -27
- package/lib/esm/DateRangeComparator.mjs +30 -26
- package/lib/esm/DateRangePicker.mjs +21 -17
- package/lib/esm/MonthDateRangeComparator.mjs +35 -31
- package/lib/esm/MonthPicker.mjs +20 -16
- package/lib/esm/MonthRangePicker.mjs +22 -18
- package/lib/esm/components/ButtonTrigger.mjs +5 -5
- package/lib/esm/components/Calendar.mjs +115 -103
- package/lib/esm/components/DateRangeComparatorAbstract.mjs +89 -105
- package/lib/esm/components/InputTrigger.mjs +181 -143
- package/lib/esm/components/PickerAbstract.mjs +62 -61
- package/lib/esm/components/RangePickerAbstract.mjs +73 -94
- package/lib/esm/components/index.mjs +33 -29
- package/lib/esm/style/calendar.shadow.css +21 -19
- package/lib/esm/style/date-picker.shadow.css +8 -7
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/translations/de.json.mjs +6 -18
- package/lib/esm/translations/es.json.mjs +6 -18
- package/lib/esm/translations/fr.json.mjs +6 -18
- package/lib/esm/translations/it.json.mjs +6 -18
- package/lib/esm/translations/ja.json.mjs +6 -18
- package/lib/esm/translations/ko.json.mjs +6 -18
- package/lib/esm/translations/nl.json.mjs +6 -18
- package/lib/esm/translations/pl.json.mjs +6 -18
- package/lib/esm/translations/pt.json.mjs +6 -18
- package/lib/esm/translations/sv.json.mjs +6 -18
- package/lib/esm/translations/tr.json.mjs +6 -18
- package/lib/esm/translations/vi.json.mjs +6 -18
- package/lib/esm/translations/zh.json.mjs +6 -18
- package/lib/esm/utils/cronTabScheduler.mjs +4 -4
- package/lib/esm/utils/datesIntersects.mjs +1 -1
- package/lib/esm/utils/shortDateRangeFormat.mjs +2 -1
- package/lib/types/index.d.ts +171 -140
- package/package.json +16 -16
- package/lib/cjs/utils/isBetweenPlugin.js +0 -21
- package/lib/cjs/utils/isBetweenPlugin.js.map +0 -1
- package/lib/es6/utils/isBetweenPlugin.js +0 -16
- package/lib/es6/utils/isBetweenPlugin.js.map +0 -1
- package/lib/esm/utils/isBetweenPlugin.mjs +0 -13
package/lib/types/index.d.ts
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
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
|
|
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';
|
|
1
|
+
import React, { ChangeEvent, ComponentProps } from 'react';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import { Flex, Box, BoxProps } from '@semcore/flex-box';
|
|
4
|
+
import { UnknownProperties, Intergalactic, PropGetterFn } from '@semcore/core';
|
|
5
|
+
import Button, { ButtonProps } from '@semcore/button';
|
|
6
|
+
import Divider from '@semcore/divider';
|
|
7
|
+
import { DropdownProps, DropdownTriggerProps } from '@semcore/dropdown';
|
|
8
|
+
import { WithI18nEnhanceProps } from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
9
|
+
import BaseTrigger, { BaseTriggerProps } from '@semcore/base-trigger';
|
|
10
|
+
import Input, { InputProps, InputValueProps } from '@semcore/input';
|
|
11
|
+
import { InputMaskValueProps } from '@semcore/input-mask';
|
|
12
|
+
import Checkbox from '@semcore/checkbox';
|
|
13
|
+
import { TooltipProps } from '@semcore/tooltip';
|
|
14
|
+
import Popper from '@semcore/popper';
|
|
19
15
|
|
|
20
16
|
export type DateConstructorParams = string | number | Date;
|
|
21
17
|
|
|
@@ -25,6 +21,8 @@ export type DateConstructorParams = string | number | Date;
|
|
|
25
21
|
* */
|
|
26
22
|
export type DisabledDates = (DateConstructorParams | (DateConstructorParams | false)[] | string)[];
|
|
27
23
|
|
|
24
|
+
/** @deprecated */
|
|
25
|
+
export interface ICalendarProps extends CalendarProps, UnknownProperties {}
|
|
28
26
|
export type CalendarProps = BoxProps & {
|
|
29
27
|
/**
|
|
30
28
|
* Locale for displaying the days of a week and months, to be transferred to `Intl`
|
|
@@ -35,9 +33,13 @@ export type CalendarProps = BoxProps & {
|
|
|
35
33
|
* Array of dates blocked for selection
|
|
36
34
|
*/
|
|
37
35
|
disabled?: DisabledDates;
|
|
38
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* @ignore
|
|
38
|
+
* */
|
|
39
39
|
highlighted?: DateConstructorParams[];
|
|
40
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* @ignore
|
|
42
|
+
* */
|
|
41
43
|
onHighlightedChange?: (date: Date[]) => void;
|
|
42
44
|
/**
|
|
43
45
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
@@ -52,43 +54,40 @@ export type CalendarProps = BoxProps & {
|
|
|
52
54
|
* @default new Date()
|
|
53
55
|
* */
|
|
54
56
|
displayedPeriod?: Date;
|
|
55
|
-
|
|
57
|
+
|
|
56
58
|
renderOutdated?: boolean;
|
|
57
59
|
};
|
|
58
60
|
|
|
61
|
+
/** @deprecated */
|
|
62
|
+
export interface ICalendarDaysContext extends CalendarDaysContext, UnknownProperties {}
|
|
59
63
|
export type CalendarDaysContext = {
|
|
60
64
|
days: CalendarUnitProps[];
|
|
61
65
|
};
|
|
62
66
|
|
|
67
|
+
/** @deprecated */
|
|
68
|
+
export interface ICalendarMonthsContext extends CalendarMonthsContext, UnknownProperties {}
|
|
63
69
|
export type CalendarMonthsContext = {
|
|
64
70
|
months: CalendarUnitProps[];
|
|
65
71
|
};
|
|
66
72
|
|
|
73
|
+
/** @deprecated */
|
|
74
|
+
export interface ICalendarUnitProps extends CalendarUnitProps, UnknownProperties {}
|
|
67
75
|
export type CalendarUnitProps = BoxProps & {
|
|
68
|
-
/** Indicates if the calendar unit is part of a selected date range */
|
|
69
76
|
selected?: boolean;
|
|
70
|
-
/** Marks units from previous/next months that appear in the current month view */
|
|
71
77
|
outdated?: boolean;
|
|
72
|
-
/** Prevents interaction with the unit */
|
|
73
78
|
disabled?: boolean;
|
|
74
|
-
/** Highlights the current date */
|
|
75
79
|
today?: boolean;
|
|
76
|
-
/** Marks the beginning of a selected date range */
|
|
77
80
|
startSelected?: boolean;
|
|
78
|
-
/** Marks the end of a selected date range */
|
|
79
81
|
endSelected?: boolean;
|
|
80
|
-
/** Shows preview highlighting during range selection */
|
|
81
82
|
highlighted?: boolean;
|
|
82
|
-
/** Marks the start of a highlighted range */
|
|
83
83
|
startHighlighted?: boolean;
|
|
84
|
-
/** Marks the end of a highlighted range */
|
|
85
84
|
endHighlighted?: boolean;
|
|
86
|
-
/** The actual Date object this unit represents */
|
|
87
85
|
date?: Date;
|
|
88
|
-
/** Content to display within the unit (typically the day number) */
|
|
89
86
|
children?: React.ReactNode;
|
|
90
87
|
};
|
|
91
88
|
|
|
89
|
+
/** @deprecated */
|
|
90
|
+
export interface ICalendarContext extends CalendarContext, UnknownProperties {}
|
|
92
91
|
export type CalendarContext = {
|
|
93
92
|
getUnitProps: PropGetterFn;
|
|
94
93
|
};
|
|
@@ -102,129 +101,137 @@ declare const Calendar: Intergalactic.Component<
|
|
|
102
101
|
Unit: Intergalactic.Component<'div', CalendarUnitProps>;
|
|
103
102
|
};
|
|
104
103
|
|
|
104
|
+
/** @deprecated */
|
|
105
|
+
export interface IDatePickerProps extends DatePickerProps, UnknownProperties {}
|
|
105
106
|
export type DatePickerProps = Intergalactic.InternalTypings.EfficientOmit<
|
|
106
107
|
DropdownProps,
|
|
107
108
|
'disabled'
|
|
108
109
|
> &
|
|
109
|
-
WithI18nEnhanceProps & {
|
|
110
|
-
|
|
110
|
+
WithI18nEnhanceProps & {
|
|
111
|
+
/**
|
|
111
112
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
112
113
|
* */
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
value?: DateConstructorParams;
|
|
115
|
+
/**
|
|
115
116
|
* To be activated upon selecting the date
|
|
116
117
|
* */
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
onChange?: (date: Date) => void;
|
|
119
|
+
/**
|
|
119
120
|
* Array of dates blocked for selection
|
|
120
121
|
* */
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
disabled?: (DateConstructorParams | (DateConstructorParams | false)[] | string)[];
|
|
123
|
+
/**
|
|
123
124
|
* Error message when user attempts to input a disabled date
|
|
124
125
|
* */
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
disabledErrorText?: ((attemptedDate: Date) => string) | string | null;
|
|
127
|
+
/**
|
|
127
128
|
* Date for showing the necessary month
|
|
128
129
|
* @default new Date()
|
|
129
130
|
* */
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
displayedPeriod?: DateConstructorParams;
|
|
132
|
+
/**
|
|
132
133
|
* To be activated upon changing the current shown month
|
|
133
134
|
* */
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
onDisplayedPeriodChange?: (date: Date) => void;
|
|
136
|
+
/**
|
|
136
137
|
* Component size
|
|
137
138
|
* @default m
|
|
138
139
|
*/
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
size?: 'm' | 'l';
|
|
141
|
+
/**
|
|
141
142
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
142
143
|
* */
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
highlighted?: DateConstructorParams[];
|
|
145
|
+
/**
|
|
145
146
|
* Default value selected date, accepts everything which is accepted by `new Date()`
|
|
146
147
|
* */
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
defaultValue?: DateConstructorParams;
|
|
149
|
+
/**
|
|
149
150
|
* Default value date for showing the necessary month
|
|
150
151
|
* */
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
defaultDisplayedPeriod?: DateConstructorParams;
|
|
153
|
+
/**
|
|
153
154
|
* Default value selected date, accepts everything which is accepted by `new Date()`
|
|
154
155
|
* */
|
|
155
|
-
|
|
156
|
-
};
|
|
156
|
+
defaultHighlighted?: DateConstructorParams[];
|
|
157
|
+
};
|
|
157
158
|
|
|
159
|
+
/** @deprecated */
|
|
160
|
+
export interface IDateRangePickerProps extends DateRangePickerProps, UnknownProperties {}
|
|
158
161
|
export type DateRangePickerProps = Intergalactic.InternalTypings.EfficientOmit<
|
|
159
162
|
DropdownProps,
|
|
160
163
|
'disabled'
|
|
161
164
|
> &
|
|
162
|
-
WithI18nEnhanceProps & {
|
|
163
|
-
|
|
165
|
+
WithI18nEnhanceProps & {
|
|
166
|
+
/**
|
|
164
167
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
165
168
|
* */
|
|
166
|
-
|
|
167
|
-
|
|
169
|
+
value?: DateConstructorParams[];
|
|
170
|
+
/**
|
|
168
171
|
* Default value selected date, accepts everything which is accepted by `new Date()`
|
|
169
172
|
* */
|
|
170
|
-
|
|
171
|
-
|
|
173
|
+
defaultValue?: DateConstructorParams[];
|
|
174
|
+
/**
|
|
172
175
|
* Default value date for showing the necessary month
|
|
173
176
|
* */
|
|
174
|
-
|
|
175
|
-
|
|
177
|
+
defaultDisplayedPeriod?: DateConstructorParams;
|
|
178
|
+
/**
|
|
176
179
|
* Default value selected date, accepts everything which is accepted by `new Date()`
|
|
177
180
|
* */
|
|
178
|
-
|
|
179
|
-
|
|
181
|
+
defaultHighlighted?: DateConstructorParams[];
|
|
182
|
+
/**
|
|
180
183
|
* To be activated upon selecting the date
|
|
181
184
|
* */
|
|
182
|
-
|
|
183
|
-
|
|
185
|
+
onChange?: (date: Date[]) => void;
|
|
186
|
+
/**
|
|
184
187
|
* Array of dates blocked for selection
|
|
185
188
|
* */
|
|
186
|
-
|
|
187
|
-
|
|
189
|
+
disabled?: (DateConstructorParams | (DateConstructorParams | false)[] | string)[];
|
|
190
|
+
/**
|
|
188
191
|
* Error message when user attempts to input a disabled date
|
|
189
192
|
* */
|
|
190
|
-
|
|
191
|
-
|
|
193
|
+
disabledErrorText?: ((attemptedDate: Date) => string) | string | null;
|
|
194
|
+
/**
|
|
192
195
|
* Date for showing the necessary month
|
|
193
196
|
* @default new Date()
|
|
194
197
|
* */
|
|
195
|
-
|
|
196
|
-
|
|
198
|
+
displayedPeriod?: DateConstructorParams;
|
|
199
|
+
/**
|
|
197
200
|
* To be activated upon changing the current shown month
|
|
198
201
|
* */
|
|
199
|
-
|
|
200
|
-
|
|
202
|
+
onDisplayedPeriodChange?: (date: Date) => void;
|
|
203
|
+
/**
|
|
201
204
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
202
205
|
* */
|
|
203
|
-
|
|
204
|
-
|
|
206
|
+
highlighted?: DateConstructorParams[];
|
|
207
|
+
/**
|
|
205
208
|
* Remove the 'Reset' button
|
|
206
209
|
* */
|
|
207
|
-
|
|
208
|
-
|
|
210
|
+
unclearable?: boolean;
|
|
211
|
+
/**
|
|
209
212
|
* To be activated upon selecting the date
|
|
210
213
|
* */
|
|
211
|
-
|
|
212
|
-
|
|
214
|
+
onHighlightedChange?: (date: Date[]) => void;
|
|
215
|
+
/**
|
|
213
216
|
* Intermediate value between `highlighted` and `value` that user see before explicitly applying it.
|
|
214
217
|
*/
|
|
215
|
-
|
|
216
|
-
|
|
218
|
+
preselectedValue?: DateConstructorParams[];
|
|
219
|
+
/**
|
|
217
220
|
* Normally called when user preselects a date range and when user applies this range.
|
|
218
221
|
*/
|
|
219
|
-
|
|
220
|
-
|
|
222
|
+
onPreselectedValueChange?: (date: Date[]) => void;
|
|
223
|
+
/**
|
|
221
224
|
* Array of periods
|
|
222
225
|
* [{value: [new Date(), new Date()], children: "Today"}]
|
|
223
226
|
* @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month
|
|
224
227
|
* */
|
|
225
|
-
|
|
226
|
-
};
|
|
228
|
+
periods?: (ButtonProps & { value: Date[] })[];
|
|
229
|
+
};
|
|
227
230
|
|
|
231
|
+
/** @deprecated */
|
|
232
|
+
export interface IDateRangePickerPeriodProps
|
|
233
|
+
extends DateRangePickerPeriodProps,
|
|
234
|
+
UnknownProperties {}
|
|
228
235
|
export type DateRangePickerPeriodProps = BoxProps & {
|
|
229
236
|
/**
|
|
230
237
|
* Current selected period
|
|
@@ -250,6 +257,8 @@ export type DateRangePickerPeriodProps = BoxProps & {
|
|
|
250
257
|
periods?: (ButtonProps & { value: Date[] })[];
|
|
251
258
|
};
|
|
252
259
|
|
|
260
|
+
/** @deprecated */
|
|
261
|
+
export interface IDatePickerContext extends DatePickerContext, UnknownProperties {}
|
|
253
262
|
export type DatePickerContext = {
|
|
254
263
|
getTriggerProps: PropGetterFn;
|
|
255
264
|
getPopperProps: PropGetterFn;
|
|
@@ -261,6 +270,10 @@ export type DatePickerContext = {
|
|
|
261
270
|
getTodayProps: PropGetterFn;
|
|
262
271
|
};
|
|
263
272
|
|
|
273
|
+
/** @deprecated */
|
|
274
|
+
export interface IAbstractDatePickerHandlers
|
|
275
|
+
extends AbstractDatePickerHandlers,
|
|
276
|
+
UnknownProperties {}
|
|
264
277
|
export type AbstractDatePickerHandlers = {
|
|
265
278
|
displayedPeriod: (value: DateConstructorParams) => void;
|
|
266
279
|
visible: (index: boolean) => void;
|
|
@@ -268,10 +281,14 @@ export type AbstractDatePickerHandlers = {
|
|
|
268
281
|
value: (index: DateConstructorParams) => void;
|
|
269
282
|
};
|
|
270
283
|
|
|
284
|
+
/** @deprecated */
|
|
285
|
+
export interface IDatePickerHandlers extends DatePickerHandlers, UnknownProperties {}
|
|
271
286
|
export type DatePickerHandlers = {
|
|
272
287
|
visible: (index: boolean) => void;
|
|
273
288
|
};
|
|
274
289
|
|
|
290
|
+
/** @deprecated */
|
|
291
|
+
export interface IInputTriggerProps extends InputTriggerProps, UnknownProperties {}
|
|
275
292
|
export type BaseInputTriggerProps = InputProps &
|
|
276
293
|
TooltipProps & {
|
|
277
294
|
/**
|
|
@@ -294,16 +311,24 @@ export type RangeInputTriggerProps = BaseInputTriggerProps & {
|
|
|
294
311
|
onChange?: (date: Date[], event: ChangeEvent) => void;
|
|
295
312
|
};
|
|
296
313
|
|
|
314
|
+
/** @deprecated */
|
|
315
|
+
export interface ISingleDateInputProps extends SingleDateInputProps, UnknownProperties {}
|
|
297
316
|
export type SingleDateInputProps = InputTriggerProps & {};
|
|
298
317
|
|
|
318
|
+
/** @deprecated */
|
|
319
|
+
export interface IDateRangeProps extends DateRangeProps, UnknownProperties {}
|
|
299
320
|
export type DateRangeProps = RangeInputTriggerProps & {};
|
|
300
321
|
|
|
322
|
+
/** @deprecated */
|
|
323
|
+
export interface IDatePickerMaskedInputProps
|
|
324
|
+
extends DatePickerMaskedInputProps,
|
|
325
|
+
UnknownProperties {}
|
|
301
326
|
export type DatePickerMaskedInputProps = {
|
|
302
327
|
date?: Date;
|
|
303
328
|
onDateChange?: (date: Date, event: ChangeEvent) => void;
|
|
304
329
|
onDisplayedPeriodChange?: (date: Date) => void;
|
|
305
330
|
locale?: string;
|
|
306
|
-
parts?: { year:
|
|
331
|
+
parts?: { year: Boolean; month: Boolean; day: Boolean };
|
|
307
332
|
disabledDates?: (Date | (Date | false)[] | string)[];
|
|
308
333
|
};
|
|
309
334
|
|
|
@@ -361,6 +386,8 @@ declare const DatePicker: Intergalactic.Component<
|
|
|
361
386
|
subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;
|
|
362
387
|
};
|
|
363
388
|
|
|
389
|
+
/** @deprecated */
|
|
390
|
+
export interface IDateRangePickerContext extends DateRangePickerContext, UnknownProperties {}
|
|
364
391
|
export type DateRangePickerContext = {
|
|
365
392
|
getTriggerProps: PropGetterFn;
|
|
366
393
|
getPopperProps: PropGetterFn;
|
|
@@ -397,6 +424,8 @@ declare const DateRangePicker: Intergalactic.Component<
|
|
|
397
424
|
subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;
|
|
398
425
|
};
|
|
399
426
|
|
|
427
|
+
/** @deprecated */
|
|
428
|
+
export interface IMonthPickerContext extends MonthPickerContext, UnknownProperties {}
|
|
400
429
|
export type MonthPickerContext = {
|
|
401
430
|
getTriggerProps: PropGetterFn;
|
|
402
431
|
getPopperProps: PropGetterFn;
|
|
@@ -429,6 +458,8 @@ declare const MonthPicker: Intergalactic.Component<
|
|
|
429
458
|
subtract: (date: number | Date, amount: number, unit: dayjs.OpUnitType) => Date;
|
|
430
459
|
};
|
|
431
460
|
|
|
461
|
+
/** @deprecated */
|
|
462
|
+
export interface IMonthRangePickerContext extends MonthRangePickerContext, UnknownProperties {}
|
|
432
463
|
export type MonthRangePickerContext = {
|
|
433
464
|
getTriggerProps: PropGetterFn;
|
|
434
465
|
getPopperProps: PropGetterFn;
|
|
@@ -475,106 +506,106 @@ export type DateRangeComparatorProps = Intergalactic.InternalTypings.EfficientOm
|
|
|
475
506
|
DropdownProps,
|
|
476
507
|
'disabled'
|
|
477
508
|
> &
|
|
478
|
-
WithI18nEnhanceProps & {
|
|
479
|
-
|
|
509
|
+
WithI18nEnhanceProps & {
|
|
510
|
+
/**
|
|
480
511
|
* Selected date ranges
|
|
481
512
|
* */
|
|
482
|
-
|
|
483
|
-
|
|
513
|
+
value?: DateRangeComparatorValue;
|
|
514
|
+
/**
|
|
484
515
|
* Default value for selected date ranges
|
|
485
516
|
* */
|
|
486
|
-
|
|
487
|
-
|
|
517
|
+
defaultValue?: DateRangeComparatorValue;
|
|
518
|
+
/**
|
|
488
519
|
* Default value date for showing the necessary month
|
|
489
520
|
* */
|
|
490
|
-
|
|
491
|
-
|
|
521
|
+
defaultDisplayedPeriod?: DateConstructorParams;
|
|
522
|
+
/**
|
|
492
523
|
* Default value selected date, accepts everything which is accepted by `new Date()`
|
|
493
524
|
* */
|
|
494
|
-
|
|
495
|
-
|
|
525
|
+
defaultHighlighted?: DateConstructorParams[];
|
|
526
|
+
/**
|
|
496
527
|
* Called with selected date when user clicks `Apply` button.
|
|
497
528
|
* */
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
529
|
+
onChange?: (ranges: {
|
|
530
|
+
value?: DateConstructorParams[];
|
|
531
|
+
compare?: DateConstructorParams[];
|
|
532
|
+
}) => void;
|
|
533
|
+
/**
|
|
503
534
|
* Array of dates blocked for selection
|
|
504
535
|
* */
|
|
505
|
-
|
|
506
|
-
|
|
536
|
+
disabled?: (DateConstructorParams | (DateConstructorParams | false)[] | string)[];
|
|
537
|
+
/**
|
|
507
538
|
* Error message when user attempts to input a disabled date
|
|
508
539
|
* */
|
|
509
|
-
|
|
510
|
-
|
|
540
|
+
disabledErrorText?: ((attemptedDate: Date) => string) | string | null;
|
|
541
|
+
/**
|
|
511
542
|
* Date for showing the necessary month
|
|
512
543
|
* @default new Date()
|
|
513
544
|
* */
|
|
514
|
-
|
|
515
|
-
|
|
545
|
+
displayedPeriod?: DateConstructorParams;
|
|
546
|
+
/**
|
|
516
547
|
* To be activated upon changing the current shown month
|
|
517
548
|
* */
|
|
518
|
-
|
|
519
|
-
|
|
549
|
+
onDisplayedPeriodChange?: (date: Date) => void;
|
|
550
|
+
/**
|
|
520
551
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
521
552
|
* */
|
|
522
|
-
|
|
523
|
-
|
|
553
|
+
highlighted?: DateConstructorParams[];
|
|
554
|
+
/**
|
|
524
555
|
* To be activated upon selecting the date
|
|
525
556
|
* */
|
|
526
|
-
|
|
527
|
-
|
|
557
|
+
onHighlightedChange?: (date: Date[]) => void;
|
|
558
|
+
/**
|
|
528
559
|
* The selected date, accepts everything which is accepted by `new Date()`
|
|
529
560
|
* */
|
|
530
|
-
|
|
531
|
-
|
|
561
|
+
compareHighlighted?: DateConstructorParams[];
|
|
562
|
+
/**
|
|
532
563
|
* To be activated upon selecting the date
|
|
533
564
|
* */
|
|
534
|
-
|
|
535
|
-
|
|
565
|
+
onCompareHighlightedChange?: (date: Date[]) => void;
|
|
566
|
+
/**
|
|
536
567
|
* Intermediate value between `highlighted` and `value` that user see before explicitly applying it.
|
|
537
568
|
*/
|
|
538
|
-
|
|
539
|
-
|
|
569
|
+
preselectedValue?: DateConstructorParams[];
|
|
570
|
+
/**
|
|
540
571
|
* Normally called when user preselects a date range and when user applies this range.
|
|
541
572
|
*/
|
|
542
|
-
|
|
543
|
-
|
|
573
|
+
onPreselectedValueChange?: (date: Date[]) => void;
|
|
574
|
+
/**
|
|
544
575
|
* Intermediate value between `compareHighlighted` and `compare` that user see before explicitly applying it.
|
|
545
576
|
*/
|
|
546
|
-
|
|
547
|
-
|
|
577
|
+
preselectedCompare?: DateConstructorParams[];
|
|
578
|
+
/**
|
|
548
579
|
* Normally called when user preselects a compare range and when user applies ranges.
|
|
549
580
|
*/
|
|
550
|
-
|
|
551
|
-
|
|
581
|
+
onPreselectedCompareChange?: (date: Date[]) => void;
|
|
582
|
+
/**
|
|
552
583
|
* Controls that compare range input is enabled.
|
|
553
584
|
*/
|
|
554
|
-
|
|
555
|
-
|
|
585
|
+
compareToggle?: boolean;
|
|
586
|
+
/**
|
|
556
587
|
* Toggles when compare range input enables or disables.
|
|
557
588
|
*/
|
|
558
|
-
|
|
559
|
-
|
|
589
|
+
onCompareToggleChange?: (compareToggle: boolean) => void;
|
|
590
|
+
/**
|
|
560
591
|
* Controls which date range is focused.
|
|
561
592
|
*/
|
|
562
|
-
|
|
563
|
-
|
|
593
|
+
focusedRange?: DateRangeComparatorFocusRange;
|
|
594
|
+
/**
|
|
564
595
|
* Called when user focuses or is focused on some of the date ranges.
|
|
565
596
|
*/
|
|
566
|
-
|
|
567
|
-
|
|
597
|
+
onFocusedRangeChange?: (focusedRange: DateRangeComparatorFocusRange) => void;
|
|
598
|
+
/**
|
|
568
599
|
* Remove the 'Reset' button
|
|
569
600
|
* */
|
|
570
|
-
|
|
571
|
-
|
|
601
|
+
unclearable?: boolean;
|
|
602
|
+
/**
|
|
572
603
|
* Array of periods
|
|
573
604
|
* [{value: [new Date(), new Date()], children: "Today"}]
|
|
574
605
|
* @default Past 2 days / Past week / Past 2 week / Past month / Past 2 month
|
|
575
606
|
* */
|
|
576
|
-
|
|
577
|
-
};
|
|
607
|
+
periods?: (ButtonProps & { value: Date[] })[];
|
|
608
|
+
};
|
|
578
609
|
|
|
579
610
|
export type DateRangeComparatorContext = {
|
|
580
611
|
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": "4.58.0-prerelease.
|
|
4
|
+
"version": "4.58.0-prerelease.4",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,24 +14,24 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/utils": "4.49.0-prerelease.
|
|
18
|
-
"@semcore/base-trigger": "4.54.0-prerelease.
|
|
19
|
-
"@semcore/button": "5.44.0-prerelease.
|
|
20
|
-
"@semcore/divider": "4.41.0-prerelease.
|
|
21
|
-
"@semcore/dropdown": "4.44.0-prerelease.
|
|
22
|
-
"@semcore/flex-box": "5.42.0-prerelease.
|
|
23
|
-
"@semcore/icon": "4.63.0-prerelease.
|
|
24
|
-
"@semcore/input": "4.43.0-prerelease.
|
|
25
|
-
"@semcore/input-mask": "5.44.0-prerelease.
|
|
26
|
-
"@semcore/neighbor-location": "4.41.0-prerelease.
|
|
27
|
-
"@semcore/typography": "5.54.0-prerelease.
|
|
28
|
-
"@semcore/checkbox": "7.45.0-prerelease.
|
|
29
|
-
"@semcore/popper": "5.47.0-prerelease.
|
|
30
|
-
"@semcore/tooltip": "6.50.0-prerelease.
|
|
17
|
+
"@semcore/utils": "4.49.0-prerelease.4",
|
|
18
|
+
"@semcore/base-trigger": "4.54.0-prerelease.4",
|
|
19
|
+
"@semcore/button": "5.44.0-prerelease.4",
|
|
20
|
+
"@semcore/divider": "4.41.0-prerelease.4",
|
|
21
|
+
"@semcore/dropdown": "4.44.0-prerelease.4",
|
|
22
|
+
"@semcore/flex-box": "5.42.0-prerelease.4",
|
|
23
|
+
"@semcore/icon": "4.63.0-prerelease.4",
|
|
24
|
+
"@semcore/input": "4.43.0-prerelease.4",
|
|
25
|
+
"@semcore/input-mask": "5.44.0-prerelease.4",
|
|
26
|
+
"@semcore/neighbor-location": "4.41.0-prerelease.4",
|
|
27
|
+
"@semcore/typography": "5.54.0-prerelease.4",
|
|
28
|
+
"@semcore/checkbox": "7.45.0-prerelease.4",
|
|
29
|
+
"@semcore/popper": "5.47.0-prerelease.4",
|
|
30
|
+
"@semcore/tooltip": "6.50.0-prerelease.4",
|
|
31
31
|
"dayjs": "1.8.36"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@semcore/core": "^2.40.0-prerelease.
|
|
34
|
+
"@semcore/core": "^2.40.0-prerelease.4",
|
|
35
35
|
"react": "16.8 - 18",
|
|
36
36
|
"react-dom": "16.8 - 18"
|
|
37
37
|
},
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* Plugin is copied from dayjs plugins because of build in both esm and commonjs.
|
|
9
|
-
* See https://github.com/iamkun/dayjs/tree/dev/src/plugin/isBetween
|
|
10
|
-
*/
|
|
11
|
-
var _default = exports["default"] = function _default(_o, c, d) {
|
|
12
|
-
c.prototype.isBetween = function (a, b, u, i) {
|
|
13
|
-
var dA = d(a);
|
|
14
|
-
var dB = d(b);
|
|
15
|
-
i = i || '()';
|
|
16
|
-
var dAi = i[0] === '(';
|
|
17
|
-
var dBi = i[1] === ')';
|
|
18
|
-
return (dAi ? this.isAfter(dA, u) : !this.isBefore(dA, u)) && (dBi ? this.isBefore(dB, u) : !this.isAfter(dB, u)) || (dAi ? this.isBefore(dA, u) : !this.isAfter(dA, u)) && (dBi ? this.isAfter(dB, u) : !this.isBefore(dB, u));
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=isBetweenPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isBetweenPlugin.js","names":["_default","exports","_o","c","d","prototype","isBetween","a","b","u","i","dA","dB","dAi","dBi","isAfter","isBefore"],"sources":["../../../src/utils/isBetweenPlugin.js"],"sourcesContent":["/**\n * Plugin is copied from dayjs plugins because of build in both esm and commonjs.\n * See https://github.com/iamkun/dayjs/tree/dev/src/plugin/isBetween\n */\n\nexport default (function (_o, c, d) {\n c.prototype.isBetween = function (a, b, u, i) {\n const dA = d(a);\n const dB = d(b);\n i = i || '()';\n const dAi = i[0] === '(';\n const dBi = i[1] === ')';\n return (\n ((dAi ? this.isAfter(dA, u) : !this.isBefore(dA, u)) &&\n (dBi ? this.isBefore(dB, u) : !this.isAfter(dB, u))) ||\n ((dAi ? this.isBefore(dA, u) : !this.isAfter(dA, u)) &&\n (dBi ? this.isAfter(dB, u) : !this.isBefore(dB, u)))\n );\n };\n});\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAHA,IAAAA,QAAA,GAAAC,OAAA,cAKgB,SAAAD,SAAUE,EAAE,EAAEC,CAAC,EAAEC,CAAC,EAAE;EAClCD,CAAC,CAACE,SAAS,CAACC,SAAS,GAAG,UAAUC,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAE;IAC5C,IAAMC,EAAE,GAAGP,CAAC,CAACG,CAAC,CAAC;IACf,IAAMK,EAAE,GAAGR,CAAC,CAACI,CAAC,CAAC;IACfE,CAAC,GAAGA,CAAC,IAAI,IAAI;IACb,IAAMG,GAAG,GAAGH,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG;IACxB,IAAMI,GAAG,GAAGJ,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG;IACxB,OACG,CAACG,GAAG,GAAG,IAAI,CAACE,OAAO,CAACJ,EAAE,EAAEF,CAAC,CAAC,GAAG,CAAC,IAAI,CAACO,QAAQ,CAACL,EAAE,EAAEF,CAAC,CAAC,MAChDK,GAAG,GAAG,IAAI,CAACE,QAAQ,CAACJ,EAAE,EAAEH,CAAC,CAAC,GAAG,CAAC,IAAI,CAACM,OAAO,CAACH,EAAE,EAAEH,CAAC,CAAC,CAAC,IAClD,CAACI,GAAG,GAAG,IAAI,CAACG,QAAQ,CAACL,EAAE,EAAEF,CAAC,CAAC,GAAG,CAAC,IAAI,CAACM,OAAO,CAACJ,EAAE,EAAEF,CAAC,CAAC,MAChDK,GAAG,GAAG,IAAI,CAACC,OAAO,CAACH,EAAE,EAAEH,CAAC,CAAC,GAAG,CAAC,IAAI,CAACO,QAAQ,CAACJ,EAAE,EAAEH,CAAC,CAAC,CAAE;EAE5D,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plugin is copied from dayjs plugins because of build in both esm and commonjs.
|
|
3
|
-
* See https://github.com/iamkun/dayjs/tree/dev/src/plugin/isBetween
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export default (function (_o, c, d) {
|
|
7
|
-
c.prototype.isBetween = function (a, b, u, i) {
|
|
8
|
-
var dA = d(a);
|
|
9
|
-
var dB = d(b);
|
|
10
|
-
i = i || '()';
|
|
11
|
-
var dAi = i[0] === '(';
|
|
12
|
-
var dBi = i[1] === ')';
|
|
13
|
-
return (dAi ? this.isAfter(dA, u) : !this.isBefore(dA, u)) && (dBi ? this.isBefore(dB, u) : !this.isAfter(dB, u)) || (dAi ? this.isBefore(dA, u) : !this.isAfter(dA, u)) && (dBi ? this.isAfter(dB, u) : !this.isBefore(dB, u));
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
//# sourceMappingURL=isBetweenPlugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isBetweenPlugin.js","names":["_o","c","d","prototype","isBetween","a","b","u","i","dA","dB","dAi","dBi","isAfter","isBefore"],"sources":["../../../src/utils/isBetweenPlugin.js"],"sourcesContent":["/**\n * Plugin is copied from dayjs plugins because of build in both esm and commonjs.\n * See https://github.com/iamkun/dayjs/tree/dev/src/plugin/isBetween\n */\n\nexport default (function (_o, c, d) {\n c.prototype.isBetween = function (a, b, u, i) {\n const dA = d(a);\n const dB = d(b);\n i = i || '()';\n const dAi = i[0] === '(';\n const dBi = i[1] === ')';\n return (\n ((dAi ? this.isAfter(dA, u) : !this.isBefore(dA, u)) &&\n (dBi ? this.isBefore(dB, u) : !this.isAfter(dB, u))) ||\n ((dAi ? this.isBefore(dA, u) : !this.isAfter(dA, u)) &&\n (dBi ? this.isAfter(dB, u) : !this.isBefore(dB, u)))\n );\n };\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;;AAEA,gBAAgB,UAAUA,EAAE,EAAEC,CAAC,EAAEC,CAAC,EAAE;EAClCD,CAAC,CAACE,SAAS,CAACC,SAAS,GAAG,UAAUC,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAEC,CAAC,EAAE;IAC5C,IAAMC,EAAE,GAAGP,CAAC,CAACG,CAAC,CAAC;IACf,IAAMK,EAAE,GAAGR,CAAC,CAACI,CAAC,CAAC;IACfE,CAAC,GAAGA,CAAC,IAAI,IAAI;IACb,IAAMG,GAAG,GAAGH,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG;IACxB,IAAMI,GAAG,GAAGJ,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG;IACxB,OACG,CAACG,GAAG,GAAG,IAAI,CAACE,OAAO,CAACJ,EAAE,EAAEF,CAAC,CAAC,GAAG,CAAC,IAAI,CAACO,QAAQ,CAACL,EAAE,EAAEF,CAAC,CAAC,MAChDK,GAAG,GAAG,IAAI,CAACE,QAAQ,CAACJ,EAAE,EAAEH,CAAC,CAAC,GAAG,CAAC,IAAI,CAACM,OAAO,CAACH,EAAE,EAAEH,CAAC,CAAC,CAAC,IAClD,CAACI,GAAG,GAAG,IAAI,CAACG,QAAQ,CAACL,EAAE,EAAEF,CAAC,CAAC,GAAG,CAAC,IAAI,CAACM,OAAO,CAACJ,EAAE,EAAEF,CAAC,CAAC,MAChDK,GAAG,GAAG,IAAI,CAACC,OAAO,CAACH,EAAE,EAAEH,CAAC,CAAC,GAAG,CAAC,IAAI,CAACO,QAAQ,CAACJ,EAAE,EAAEH,CAAC,CAAC,CAAE;EAE5D,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const isBetween = (function(_o, c, d) {
|
|
2
|
-
c.prototype.isBetween = function(a, b, u, i) {
|
|
3
|
-
var dA = d(a);
|
|
4
|
-
var dB = d(b);
|
|
5
|
-
i = i || "()";
|
|
6
|
-
var dAi = i[0] === "(";
|
|
7
|
-
var dBi = i[1] === ")";
|
|
8
|
-
return (dAi ? this.isAfter(dA, u) : !this.isBefore(dA, u)) && (dBi ? this.isBefore(dB, u) : !this.isAfter(dB, u)) || (dAi ? this.isBefore(dA, u) : !this.isAfter(dA, u)) && (dBi ? this.isAfter(dB, u) : !this.isBefore(dB, u));
|
|
9
|
-
};
|
|
10
|
-
});
|
|
11
|
-
export {
|
|
12
|
-
isBetween as default
|
|
13
|
-
};
|