@tidbcloud/uikit 2.1.4 → 2.1.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/CHANGELOG.md +13 -0
- package/dist/_virtual/customParseFormat.cjs +4 -0
- package/dist/_virtual/customParseFormat.mjs +4 -0
- package/dist/_virtual/duration.cjs +4 -0
- package/dist/_virtual/duration.mjs +4 -0
- package/dist/_virtual/minMax.cjs +4 -0
- package/dist/_virtual/minMax.mjs +4 -0
- package/dist/biz/DateTimePicker/TimeScollerPicker.cjs +6 -8
- package/dist/biz/DateTimePicker/TimeScollerPicker.mjs +1 -3
- package/dist/biz/DateTimePicker/index.cjs +143 -126
- package/dist/biz/DateTimePicker/index.mjs +135 -118
- package/dist/biz/TimeRangePicker/AbsoluteTimeRangePicker.cjs +7 -9
- package/dist/biz/TimeRangePicker/AbsoluteTimeRangePicker.mjs +1 -3
- package/dist/biz/TimeRangePicker/helpers.cjs +3 -5
- package/dist/biz/TimeRangePicker/helpers.mjs +1 -3
- package/dist/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/customParseFormat.cjs +129 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/customParseFormat.mjs +129 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/duration.cjs +136 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/duration.mjs +136 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/minMax.cjs +32 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/minMax.mjs +32 -0
- package/dist/utils/dayjs.cjs +15 -0
- package/dist/utils/dayjs.d.cts +2 -2
- package/dist/utils/dayjs.d.mts +2 -2
- package/dist/utils/dayjs.mjs +15 -0
- package/dist/utils/index.cjs +2 -2
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
|
@@ -8,9 +8,7 @@ import { IconClock } from "../../icons/index.mjs";
|
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
10
|
import { Typography } from "../../primitive/Typography/index.mjs";
|
|
11
|
-
import dayjs from "dayjs";
|
|
12
|
-
import "../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/timezone.mjs";
|
|
13
|
-
import "../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/utc.mjs";
|
|
11
|
+
import { dayjs } from "../../utils/dayjs.mjs";
|
|
14
12
|
import { DEFAULT_TIME_FORMAT } from "../TimeRangePicker/helpers.mjs";
|
|
15
13
|
import { TimeScollerPicker } from "./TimeScollerPicker.mjs";
|
|
16
14
|
import { useDisclosure } from "../../node_modules/.pnpm/@mantine_hooks@7.15.2_react@18.3.1/node_modules/@mantine/hooks/esm/use-disclosure/use-disclosure.mjs";
|
|
@@ -51,12 +49,15 @@ const DateTimePicker = ({
|
|
|
51
49
|
const [currentValueChangedBy, setCurrentValueChangedBy] = useState(null);
|
|
52
50
|
const updateCurrentValue = useMemoizedFn((val, from) => {
|
|
53
51
|
let next = val;
|
|
52
|
+
if (!next.isValid()) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
54
55
|
if ((currentValue == null ? void 0 : currentValue.unix()) === next.unix()) {
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
57
|
-
if (startDate && next.
|
|
58
|
+
if (startDate && next.isBefore(startDate)) {
|
|
58
59
|
next = dayjs(startDate);
|
|
59
|
-
} else if (endDate && next.
|
|
60
|
+
} else if (endDate && next.isAfter(endDate)) {
|
|
60
61
|
next = dayjs(endDate);
|
|
61
62
|
}
|
|
62
63
|
setCurrentValue(next);
|
|
@@ -89,124 +90,140 @@ const DateTimePicker = ({
|
|
|
89
90
|
next = next.utcOffset(utcOffset).hour(h).minute(m).second(s);
|
|
90
91
|
updateCurrentValue(next, "timeScroller");
|
|
91
92
|
});
|
|
92
|
-
return /* @__PURE__ */ jsxs(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
DatePicker,
|
|
93
|
+
return /* @__PURE__ */ jsxs(
|
|
94
|
+
Popover,
|
|
95
|
+
{
|
|
96
|
+
position: "bottom-end",
|
|
97
|
+
opened,
|
|
98
|
+
withinPortal,
|
|
99
|
+
shadow: "md",
|
|
100
|
+
closeOnClickOutside: true,
|
|
101
|
+
onChange: (opened2) => {
|
|
102
|
+
if (opened2) {
|
|
103
|
+
open();
|
|
104
|
+
} else {
|
|
105
|
+
close();
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ jsx(Popover.Target, { children: /* @__PURE__ */ jsx(
|
|
110
|
+
TextInput,
|
|
111
111
|
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
112
|
+
readOnly: true,
|
|
113
|
+
disabled: disable,
|
|
114
|
+
placeholder,
|
|
115
|
+
value: inputStr,
|
|
116
|
+
rightSection: loading ? /* @__PURE__ */ jsx(Loader, { size: "xs" }) : /* @__PURE__ */ jsx(Box, { component: IconClock, size: 18, c: "carbon.6" }),
|
|
117
|
+
sx,
|
|
118
|
+
size,
|
|
119
|
+
onClick: open
|
|
118
120
|
}
|
|
119
|
-
),
|
|
120
|
-
/* @__PURE__ */ jsx(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
input: {
|
|
132
|
-
height: 30
|
|
133
|
-
}
|
|
121
|
+
) }),
|
|
122
|
+
/* @__PURE__ */ jsx(Popover.Dropdown, { children: /* @__PURE__ */ jsxs(Stack, { children: [
|
|
123
|
+
/* @__PURE__ */ jsxs(Group, { align: "flex-start", children: [
|
|
124
|
+
/* @__PURE__ */ jsx(
|
|
125
|
+
DatePicker,
|
|
126
|
+
{
|
|
127
|
+
minDate: startDate,
|
|
128
|
+
maxDate: endDate,
|
|
129
|
+
value: currentValue.toDate(),
|
|
130
|
+
onChange: calendarChange,
|
|
131
|
+
withCellSpacing: false,
|
|
132
|
+
size: "md"
|
|
134
133
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
{
|
|
150
|
-
bg: "carbon.3",
|
|
151
|
-
pos: "absolute",
|
|
152
|
-
top: 0,
|
|
153
|
-
left: 0,
|
|
154
|
-
h: 32,
|
|
155
|
-
w: 32,
|
|
156
|
-
sx: (theme) => ({ zIndex: -1, borderRadius: theme.defaultRadius, pointerEvents: "none" })
|
|
157
|
-
}
|
|
158
|
-
),
|
|
159
|
-
/* @__PURE__ */ jsx(
|
|
160
|
-
Box,
|
|
161
|
-
{
|
|
162
|
-
bg: "carbon.3",
|
|
163
|
-
pos: "absolute",
|
|
164
|
-
top: 0,
|
|
165
|
-
left: 40,
|
|
166
|
-
h: 32,
|
|
167
|
-
w: 32,
|
|
168
|
-
sx: (theme) => ({ zIndex: -1, borderRadius: theme.defaultRadius, pointerEvents: "none" })
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ jsx(Divider, { orientation: "vertical", mt: -12, mb: -16 }),
|
|
136
|
+
/* @__PURE__ */ jsxs(Stack, { justify: "flex-start", children: [
|
|
137
|
+
/* @__PURE__ */ jsx(
|
|
138
|
+
TimeInput,
|
|
139
|
+
{
|
|
140
|
+
withSeconds: true,
|
|
141
|
+
value: currentValue.format("HH:mm:ss"),
|
|
142
|
+
onChange: timeInputChange,
|
|
143
|
+
size: "sm",
|
|
144
|
+
w: 112,
|
|
145
|
+
styles: {
|
|
146
|
+
input: {
|
|
147
|
+
height: 30
|
|
169
148
|
}
|
|
170
|
-
),
|
|
171
|
-
/* @__PURE__ */ jsx(
|
|
172
|
-
Box,
|
|
173
|
-
{
|
|
174
|
-
bg: "carbon.3",
|
|
175
|
-
pos: "absolute",
|
|
176
|
-
top: 0,
|
|
177
|
-
left: 80,
|
|
178
|
-
h: 32,
|
|
179
|
-
w: 32,
|
|
180
|
-
sx: (theme) => ({ zIndex: -1, borderRadius: theme.defaultRadius, pointerEvents: "none" })
|
|
181
|
-
}
|
|
182
|
-
)
|
|
183
|
-
] }),
|
|
184
|
-
/* @__PURE__ */ jsx(
|
|
185
|
-
TimeScollerPicker,
|
|
186
|
-
{
|
|
187
|
-
currentValue,
|
|
188
|
-
currentValueChangedBy,
|
|
189
|
-
onChange: timeScrollPickerChange,
|
|
190
|
-
start: startDate,
|
|
191
|
-
end: endDate,
|
|
192
|
-
utcOffset
|
|
193
149
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
/* @__PURE__ */ jsxs(
|
|
153
|
+
Box,
|
|
154
|
+
{
|
|
155
|
+
pos: "relative",
|
|
156
|
+
fz: 14,
|
|
157
|
+
fw: 400,
|
|
158
|
+
h: 224,
|
|
159
|
+
sx: (theme) => ({ color: theme.colors.carbon[8], overflow: "hidden", zIndex: 9999 }),
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ jsxs(Flex, { mah: "100%", gap: 8, children: [
|
|
162
|
+
/* @__PURE__ */ jsx(
|
|
163
|
+
Box,
|
|
164
|
+
{
|
|
165
|
+
bg: "carbon.3",
|
|
166
|
+
pos: "absolute",
|
|
167
|
+
top: 0,
|
|
168
|
+
left: 0,
|
|
169
|
+
h: 32,
|
|
170
|
+
w: 32,
|
|
171
|
+
sx: (theme) => ({ zIndex: -1, borderRadius: theme.defaultRadius, pointerEvents: "none" })
|
|
172
|
+
}
|
|
173
|
+
),
|
|
174
|
+
/* @__PURE__ */ jsx(
|
|
175
|
+
Box,
|
|
176
|
+
{
|
|
177
|
+
bg: "carbon.3",
|
|
178
|
+
pos: "absolute",
|
|
179
|
+
top: 0,
|
|
180
|
+
left: 40,
|
|
181
|
+
h: 32,
|
|
182
|
+
w: 32,
|
|
183
|
+
sx: (theme) => ({ zIndex: -1, borderRadius: theme.defaultRadius, pointerEvents: "none" })
|
|
184
|
+
}
|
|
185
|
+
),
|
|
186
|
+
/* @__PURE__ */ jsx(
|
|
187
|
+
Box,
|
|
188
|
+
{
|
|
189
|
+
bg: "carbon.3",
|
|
190
|
+
pos: "absolute",
|
|
191
|
+
top: 0,
|
|
192
|
+
left: 80,
|
|
193
|
+
h: 32,
|
|
194
|
+
w: 32,
|
|
195
|
+
sx: (theme) => ({ zIndex: -1, borderRadius: theme.defaultRadius, pointerEvents: "none" })
|
|
196
|
+
}
|
|
197
|
+
)
|
|
198
|
+
] }),
|
|
199
|
+
/* @__PURE__ */ jsx(
|
|
200
|
+
TimeScollerPicker,
|
|
201
|
+
{
|
|
202
|
+
currentValue,
|
|
203
|
+
currentValueChangedBy,
|
|
204
|
+
onChange: timeScrollPickerChange,
|
|
205
|
+
start: startDate,
|
|
206
|
+
end: endDate,
|
|
207
|
+
utcOffset
|
|
208
|
+
}
|
|
209
|
+
)
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
)
|
|
213
|
+
] })
|
|
214
|
+
] }),
|
|
215
|
+
/* @__PURE__ */ jsx(Divider, { mx: -16 }),
|
|
216
|
+
/* @__PURE__ */ jsx(Group, { children: /* @__PURE__ */ jsxs(Typography, { size: "sm", children: [
|
|
217
|
+
"Use",
|
|
218
|
+
" ",
|
|
219
|
+
/* @__PURE__ */ jsx(Typography, { fw: 600, component: "span", children: utcStr }),
|
|
220
|
+
" ",
|
|
221
|
+
"from your local time zone"
|
|
222
|
+
] }) })
|
|
223
|
+
] }) })
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
);
|
|
210
227
|
};
|
|
211
228
|
export {
|
|
212
229
|
DateTimePicker
|
|
@@ -10,9 +10,7 @@ const index = require("../../icons/index.cjs");
|
|
|
10
10
|
;/* empty css */
|
|
11
11
|
const index$1 = require("../../primitive/Typography/index.cjs");
|
|
12
12
|
const index$2 = require("../../primitive/Button/index.cjs");
|
|
13
|
-
const dayjs = require("dayjs");
|
|
14
|
-
require("../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/timezone.cjs");
|
|
15
|
-
require("../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/utc.cjs");
|
|
13
|
+
const dayjs = require("../../utils/dayjs.cjs");
|
|
16
14
|
const helpers = require("./helpers.cjs");
|
|
17
15
|
const Box = require("../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/Box/Box.cjs");
|
|
18
16
|
const Group = require("../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/Group/Group.cjs");
|
|
@@ -33,10 +31,10 @@ const AbsoluteTimeRangePicker = ({
|
|
|
33
31
|
}) => {
|
|
34
32
|
const [start, setStart] = React.useState(() => value ? new Date(value[0] * 1e3) : null);
|
|
35
33
|
const [end, setEnd] = React.useState(() => value ? new Date(value[1] * 1e3) : null);
|
|
36
|
-
const startDate = start ? dayjs(start).format("MMM D, YYYY") : "-";
|
|
37
|
-
const endDate = end ? dayjs(end).format("MMM D, YYYY") : "-";
|
|
38
|
-
const startTime = start ? dayjs(start).format("HH:mm:ss") : "-";
|
|
39
|
-
const endTime = end ? dayjs(end).format("HH:mm:ss") : "-";
|
|
34
|
+
const startDate = start ? dayjs.dayjs(start).format("MMM D, YYYY") : "-";
|
|
35
|
+
const endDate = end ? dayjs.dayjs(end).format("MMM D, YYYY") : "-";
|
|
36
|
+
const startTime = start ? dayjs.dayjs(start).format("HH:mm:ss") : "-";
|
|
37
|
+
const endTime = end ? dayjs.dayjs(end).format("HH:mm:ss") : "-";
|
|
40
38
|
const isRangeComplete = !!start && !!end;
|
|
41
39
|
const startAfterEnd = isRangeComplete && start.valueOf() > end.valueOf();
|
|
42
40
|
const beyondMin = isRangeComplete && minDateTime && start.valueOf() < minDateTime.valueOf();
|
|
@@ -65,7 +63,7 @@ const AbsoluteTimeRangePicker = ({
|
|
|
65
63
|
};
|
|
66
64
|
const updateTime = (v, setter) => {
|
|
67
65
|
setter((old) => {
|
|
68
|
-
const d = dayjs(v, "HH:mm:ss").toDate();
|
|
66
|
+
const d = dayjs.dayjs(v, "HH:mm:ss").toDate();
|
|
69
67
|
const newD = new Date(old);
|
|
70
68
|
newD.setHours(d.getHours());
|
|
71
69
|
newD.setMinutes(d.getMinutes());
|
|
@@ -73,7 +71,7 @@ const AbsoluteTimeRangePicker = ({
|
|
|
73
71
|
return newD;
|
|
74
72
|
});
|
|
75
73
|
};
|
|
76
|
-
const apply = () => onChange == null ? void 0 : onChange({ type: "absolute", value: [dayjs(start).unix(), dayjs(end).unix()] });
|
|
74
|
+
const apply = () => onChange == null ? void 0 : onChange({ type: "absolute", value: [dayjs.dayjs(start).unix(), dayjs.dayjs(end).unix()] });
|
|
77
75
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box.Box, { p: "md", w: 280, m: -4, children: [
|
|
78
76
|
/* @__PURE__ */ jsxRuntime.jsxs(Group.Group, { pb: "xs", mt: -4, onClick: onReturnClick, sx: { cursor: "pointer" }, children: [
|
|
79
77
|
/* @__PURE__ */ jsxRuntime.jsx(index.IconChevronLeft, { size: 16 }),
|
|
@@ -8,9 +8,7 @@ import { IconChevronLeft, IconAlertCircle } from "../../icons/index.mjs";
|
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { Typography } from "../../primitive/Typography/index.mjs";
|
|
10
10
|
import { Button } from "../../primitive/Button/index.mjs";
|
|
11
|
-
import dayjs from "dayjs";
|
|
12
|
-
import "../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/timezone.mjs";
|
|
13
|
-
import "../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/utc.mjs";
|
|
11
|
+
import { dayjs } from "../../utils/dayjs.mjs";
|
|
14
12
|
import { timeFormatter, formatDuration } from "./helpers.mjs";
|
|
15
13
|
import { Box } from "../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/Box/Box.mjs";
|
|
16
14
|
import { Group } from "../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/Group/Group.mjs";
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const lodashEs = require("lodash-es");
|
|
4
4
|
const prettyMs = require("pretty-ms");
|
|
5
|
-
const dayjs = require("dayjs");
|
|
6
|
-
require("../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/timezone.cjs");
|
|
7
|
-
require("../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/utc.cjs");
|
|
5
|
+
const dayjs = require("../../utils/dayjs.cjs");
|
|
8
6
|
const DEFAULT_QUICK_RANGES = [
|
|
9
7
|
5 * 60,
|
|
10
8
|
15 * 60,
|
|
@@ -31,7 +29,7 @@ const toTimeRangeValue = (timeRange, offset = 0) => {
|
|
|
31
29
|
if (timeRange.type === "absolute") {
|
|
32
30
|
return timeRange.value.map((t) => t + offset);
|
|
33
31
|
} else {
|
|
34
|
-
const now = dayjs().unix();
|
|
32
|
+
const now = dayjs.dayjs().unix();
|
|
35
33
|
return [now - timeRange.value + offset, now + offset];
|
|
36
34
|
}
|
|
37
35
|
};
|
|
@@ -85,7 +83,7 @@ const timeFormatter = (timeValue, utcOffset, format = DEFAULT_TIME_FORMAT) => {
|
|
|
85
83
|
const time = timeValue instanceof Date || isNaN(Number(timeValue)) ? timeValue : Number(timeValue) * 1e3;
|
|
86
84
|
const currentTZOffsetInHours = utcOffset === void 0 || utcOffset === null ? -((/* @__PURE__ */ new Date()).getTimezoneOffset() / 60) : utcOffset;
|
|
87
85
|
const withUTC = format.indexOf("Z") >= 0;
|
|
88
|
-
return dayjs(addOffsetUTC(time, currentTZOffsetInHours)).format(withUTC ? lodashEs.trim(format, "Z") : format) + (withUTC ? getUTCString(currentTZOffsetInHours) : "");
|
|
86
|
+
return dayjs.dayjs(addOffsetUTC(time, currentTZOffsetInHours)).format(withUTC ? lodashEs.trim(format, "Z") : format) + (withUTC ? getUTCString(currentTZOffsetInHours) : "");
|
|
89
87
|
};
|
|
90
88
|
exports.DEFAULT_QUICK_RANGES = DEFAULT_QUICK_RANGES;
|
|
91
89
|
exports.DEFAULT_TIME_FORMAT = DEFAULT_TIME_FORMAT;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { trim } from "lodash-es";
|
|
2
2
|
import prettyMs from "pretty-ms";
|
|
3
|
-
import dayjs from "dayjs";
|
|
4
|
-
import "../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/timezone.mjs";
|
|
5
|
-
import "../../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/plugin/utc.mjs";
|
|
3
|
+
import { dayjs } from "../../utils/dayjs.mjs";
|
|
6
4
|
const DEFAULT_QUICK_RANGES = [
|
|
7
5
|
5 * 60,
|
|
8
6
|
15 * 60,
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const _commonjsHelpers = require("../../../../../../_virtual/_commonjsHelpers.cjs");
|
|
4
|
+
const customParseFormat$1 = require("../../../../../../_virtual/customParseFormat.cjs");
|
|
5
|
+
(function(module2, exports2) {
|
|
6
|
+
!function(e, t) {
|
|
7
|
+
module2.exports = t();
|
|
8
|
+
}(_commonjsHelpers.commonjsGlobal, function() {
|
|
9
|
+
var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e2) {
|
|
10
|
+
return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
|
|
11
|
+
};
|
|
12
|
+
var f = function(e2) {
|
|
13
|
+
return function(t2) {
|
|
14
|
+
this[e2] = +t2;
|
|
15
|
+
};
|
|
16
|
+
}, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
|
|
17
|
+
(this.zone || (this.zone = {})).offset = function(e3) {
|
|
18
|
+
if (!e3) return 0;
|
|
19
|
+
if ("Z" === e3) return 0;
|
|
20
|
+
var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
|
|
21
|
+
return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
|
|
22
|
+
}(e2);
|
|
23
|
+
}], u = function(e2) {
|
|
24
|
+
var t2 = s[e2];
|
|
25
|
+
return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
|
|
26
|
+
}, d = function(e2, t2) {
|
|
27
|
+
var n2, r2 = s.meridiem;
|
|
28
|
+
if (r2) {
|
|
29
|
+
for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t2)) > -1) {
|
|
30
|
+
n2 = i2 > 12;
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
} else n2 = e2 === (t2 ? "pm" : "PM");
|
|
34
|
+
return n2;
|
|
35
|
+
}, c = { A: [o, function(e2) {
|
|
36
|
+
this.afternoon = d(e2, false);
|
|
37
|
+
}], a: [o, function(e2) {
|
|
38
|
+
this.afternoon = d(e2, true);
|
|
39
|
+
}], Q: [n, function(e2) {
|
|
40
|
+
this.month = 3 * (e2 - 1) + 1;
|
|
41
|
+
}], S: [n, function(e2) {
|
|
42
|
+
this.milliseconds = 100 * +e2;
|
|
43
|
+
}], SS: [r, function(e2) {
|
|
44
|
+
this.milliseconds = 10 * +e2;
|
|
45
|
+
}], SSS: [/\d{3}/, function(e2) {
|
|
46
|
+
this.milliseconds = +e2;
|
|
47
|
+
}], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e2) {
|
|
48
|
+
var t2 = s.ordinal, n2 = e2.match(/\d+/);
|
|
49
|
+
if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
|
|
50
|
+
}], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) {
|
|
51
|
+
var t2 = u("months"), n2 = (u("monthsShort") || t2.map(function(e3) {
|
|
52
|
+
return e3.slice(0, 3);
|
|
53
|
+
})).indexOf(e2) + 1;
|
|
54
|
+
if (n2 < 1) throw new Error();
|
|
55
|
+
this.month = n2 % 12 || n2;
|
|
56
|
+
}], MMMM: [o, function(e2) {
|
|
57
|
+
var t2 = u("months").indexOf(e2) + 1;
|
|
58
|
+
if (t2 < 1) throw new Error();
|
|
59
|
+
this.month = t2 % 12 || t2;
|
|
60
|
+
}], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) {
|
|
61
|
+
this.year = a(e2);
|
|
62
|
+
}], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
|
|
63
|
+
function l(n2) {
|
|
64
|
+
var r2, i2;
|
|
65
|
+
r2 = n2, i2 = s && s.formats;
|
|
66
|
+
for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t2, n3, r3) {
|
|
67
|
+
var o3 = r3 && r3.toUpperCase();
|
|
68
|
+
return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t3, n4) {
|
|
69
|
+
return t3 || n4.slice(1);
|
|
70
|
+
});
|
|
71
|
+
})).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) {
|
|
72
|
+
var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
|
|
73
|
+
o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
|
|
74
|
+
}
|
|
75
|
+
return function(e2) {
|
|
76
|
+
for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) {
|
|
77
|
+
var i3 = o2[n3];
|
|
78
|
+
if ("string" == typeof i3) r3 += i3.length;
|
|
79
|
+
else {
|
|
80
|
+
var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0];
|
|
81
|
+
f3.call(t2, u3), e2 = e2.replace(u3, "");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return function(e3) {
|
|
85
|
+
var t3 = e3.afternoon;
|
|
86
|
+
if (void 0 !== t3) {
|
|
87
|
+
var n4 = e3.hours;
|
|
88
|
+
t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
|
|
89
|
+
}
|
|
90
|
+
}(t2), t2;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return function(e2, t2, n2) {
|
|
94
|
+
n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear);
|
|
95
|
+
var r2 = t2.prototype, i2 = r2.parse;
|
|
96
|
+
r2.parse = function(e3) {
|
|
97
|
+
var t3 = e3.date, r3 = e3.utc, o2 = e3.args;
|
|
98
|
+
this.$u = r3;
|
|
99
|
+
var a2 = o2[1];
|
|
100
|
+
if ("string" == typeof a2) {
|
|
101
|
+
var f2 = true === o2[2], h2 = true === o2[3], u2 = f2 || h2, d2 = o2[2];
|
|
102
|
+
h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = function(e4, t4, n3, r4) {
|
|
103
|
+
try {
|
|
104
|
+
if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e4);
|
|
105
|
+
var i3 = l(t4)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = /* @__PURE__ */ new Date(), Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0;
|
|
106
|
+
o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
|
|
107
|
+
var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
|
|
108
|
+
return c3 ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m2 && (D = r4(D).week(m2).toDate()), D);
|
|
109
|
+
} catch (e5) {
|
|
110
|
+
return /* @__PURE__ */ new Date("");
|
|
111
|
+
}
|
|
112
|
+
}(t3, a2, r3, n2), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
|
|
113
|
+
} else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) {
|
|
114
|
+
o2[1] = a2[m - 1];
|
|
115
|
+
var M = n2.apply(this, o2);
|
|
116
|
+
if (M.isValid()) {
|
|
117
|
+
this.$d = M.$d, this.$L = M.$L, this.init();
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
m === c2 && (this.$d = /* @__PURE__ */ new Date(""));
|
|
121
|
+
}
|
|
122
|
+
else i2.call(this, e3);
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
});
|
|
126
|
+
})(customParseFormat$1.__module);
|
|
127
|
+
var customParseFormatExports = customParseFormat$1.__module.exports;
|
|
128
|
+
const customParseFormat = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(customParseFormatExports);
|
|
129
|
+
exports.default = customParseFormat;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { commonjsGlobal, getDefaultExportFromCjs } from "../../../../../../_virtual/_commonjsHelpers.mjs";
|
|
2
|
+
import { __module as customParseFormat$1 } from "../../../../../../_virtual/customParseFormat.mjs";
|
|
3
|
+
(function(module, exports) {
|
|
4
|
+
!function(e, t) {
|
|
5
|
+
module.exports = t();
|
|
6
|
+
}(commonjsGlobal, function() {
|
|
7
|
+
var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e2) {
|
|
8
|
+
return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
|
|
9
|
+
};
|
|
10
|
+
var f = function(e2) {
|
|
11
|
+
return function(t2) {
|
|
12
|
+
this[e2] = +t2;
|
|
13
|
+
};
|
|
14
|
+
}, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
|
|
15
|
+
(this.zone || (this.zone = {})).offset = function(e3) {
|
|
16
|
+
if (!e3) return 0;
|
|
17
|
+
if ("Z" === e3) return 0;
|
|
18
|
+
var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
|
|
19
|
+
return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
|
|
20
|
+
}(e2);
|
|
21
|
+
}], u = function(e2) {
|
|
22
|
+
var t2 = s[e2];
|
|
23
|
+
return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
|
|
24
|
+
}, d = function(e2, t2) {
|
|
25
|
+
var n2, r2 = s.meridiem;
|
|
26
|
+
if (r2) {
|
|
27
|
+
for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t2)) > -1) {
|
|
28
|
+
n2 = i2 > 12;
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
} else n2 = e2 === (t2 ? "pm" : "PM");
|
|
32
|
+
return n2;
|
|
33
|
+
}, c = { A: [o, function(e2) {
|
|
34
|
+
this.afternoon = d(e2, false);
|
|
35
|
+
}], a: [o, function(e2) {
|
|
36
|
+
this.afternoon = d(e2, true);
|
|
37
|
+
}], Q: [n, function(e2) {
|
|
38
|
+
this.month = 3 * (e2 - 1) + 1;
|
|
39
|
+
}], S: [n, function(e2) {
|
|
40
|
+
this.milliseconds = 100 * +e2;
|
|
41
|
+
}], SS: [r, function(e2) {
|
|
42
|
+
this.milliseconds = 10 * +e2;
|
|
43
|
+
}], SSS: [/\d{3}/, function(e2) {
|
|
44
|
+
this.milliseconds = +e2;
|
|
45
|
+
}], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e2) {
|
|
46
|
+
var t2 = s.ordinal, n2 = e2.match(/\d+/);
|
|
47
|
+
if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
|
|
48
|
+
}], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) {
|
|
49
|
+
var t2 = u("months"), n2 = (u("monthsShort") || t2.map(function(e3) {
|
|
50
|
+
return e3.slice(0, 3);
|
|
51
|
+
})).indexOf(e2) + 1;
|
|
52
|
+
if (n2 < 1) throw new Error();
|
|
53
|
+
this.month = n2 % 12 || n2;
|
|
54
|
+
}], MMMM: [o, function(e2) {
|
|
55
|
+
var t2 = u("months").indexOf(e2) + 1;
|
|
56
|
+
if (t2 < 1) throw new Error();
|
|
57
|
+
this.month = t2 % 12 || t2;
|
|
58
|
+
}], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) {
|
|
59
|
+
this.year = a(e2);
|
|
60
|
+
}], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
|
|
61
|
+
function l(n2) {
|
|
62
|
+
var r2, i2;
|
|
63
|
+
r2 = n2, i2 = s && s.formats;
|
|
64
|
+
for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t2, n3, r3) {
|
|
65
|
+
var o3 = r3 && r3.toUpperCase();
|
|
66
|
+
return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t3, n4) {
|
|
67
|
+
return t3 || n4.slice(1);
|
|
68
|
+
});
|
|
69
|
+
})).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) {
|
|
70
|
+
var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
|
|
71
|
+
o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
|
|
72
|
+
}
|
|
73
|
+
return function(e2) {
|
|
74
|
+
for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) {
|
|
75
|
+
var i3 = o2[n3];
|
|
76
|
+
if ("string" == typeof i3) r3 += i3.length;
|
|
77
|
+
else {
|
|
78
|
+
var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0];
|
|
79
|
+
f3.call(t2, u3), e2 = e2.replace(u3, "");
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return function(e3) {
|
|
83
|
+
var t3 = e3.afternoon;
|
|
84
|
+
if (void 0 !== t3) {
|
|
85
|
+
var n4 = e3.hours;
|
|
86
|
+
t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
|
|
87
|
+
}
|
|
88
|
+
}(t2), t2;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
return function(e2, t2, n2) {
|
|
92
|
+
n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear);
|
|
93
|
+
var r2 = t2.prototype, i2 = r2.parse;
|
|
94
|
+
r2.parse = function(e3) {
|
|
95
|
+
var t3 = e3.date, r3 = e3.utc, o2 = e3.args;
|
|
96
|
+
this.$u = r3;
|
|
97
|
+
var a2 = o2[1];
|
|
98
|
+
if ("string" == typeof a2) {
|
|
99
|
+
var f2 = true === o2[2], h2 = true === o2[3], u2 = f2 || h2, d2 = o2[2];
|
|
100
|
+
h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = function(e4, t4, n3, r4) {
|
|
101
|
+
try {
|
|
102
|
+
if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e4);
|
|
103
|
+
var i3 = l(t4)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = /* @__PURE__ */ new Date(), Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0;
|
|
104
|
+
o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
|
|
105
|
+
var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
|
|
106
|
+
return c3 ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m2 && (D = r4(D).week(m2).toDate()), D);
|
|
107
|
+
} catch (e5) {
|
|
108
|
+
return /* @__PURE__ */ new Date("");
|
|
109
|
+
}
|
|
110
|
+
}(t3, a2, r3, n2), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
|
|
111
|
+
} else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) {
|
|
112
|
+
o2[1] = a2[m - 1];
|
|
113
|
+
var M = n2.apply(this, o2);
|
|
114
|
+
if (M.isValid()) {
|
|
115
|
+
this.$d = M.$d, this.$L = M.$L, this.init();
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
m === c2 && (this.$d = /* @__PURE__ */ new Date(""));
|
|
119
|
+
}
|
|
120
|
+
else i2.call(this, e3);
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
})(customParseFormat$1);
|
|
125
|
+
var customParseFormatExports = customParseFormat$1.exports;
|
|
126
|
+
const customParseFormat = /* @__PURE__ */ getDefaultExportFromCjs(customParseFormatExports);
|
|
127
|
+
export {
|
|
128
|
+
customParseFormat as default
|
|
129
|
+
};
|