@pisell/date-picker 1.0.75 → 1.0.77
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/es/ActionBar/index.js +19 -28
- package/es/ActionBar/index.less +2 -1
- package/es/CustomCalendarHeader/index.d.ts +2 -0
- package/es/CustomCalendarHeader/index.js +53 -0
- package/es/Dialog/index.d.ts +2 -0
- package/es/Dialog/index.js +22 -0
- package/es/Drawer/index.d.ts +11 -0
- package/es/Drawer/index.js +35 -0
- package/es/Drawer/index.less +40 -0
- package/es/PisellDateRangePicker/LocaleContext.d.ts +2 -0
- package/es/PisellDateRangePicker/index.d.ts +81 -0
- package/es/PisellDateRangePicker/index.js +112 -41
- package/es/PisellDateRangePicker/index.less +56 -0
- package/es/Shortcuts/index.d.ts +4 -3
- package/es/Toolbar/index.d.ts +3 -0
- package/es/Toolbar/index.js +122 -0
- package/es/Toolbar/index.less +32 -0
- package/es/browserSelect/chevron-down.png +0 -0
- package/es/browserSelect/index.d.ts +15 -0
- package/es/browserSelect/index.js +36 -0
- package/es/browserSelect/index.less +18 -0
- package/es/constants.d.ts +58 -0
- package/es/constants.js +128 -0
- package/es/hooks/useDocumentVisibility.d.ts +2 -0
- package/es/hooks/useDocumentVisibility.js +27 -0
- package/es/hooks/useNextDay.d.ts +2 -0
- package/es/hooks/useNextDay.js +15 -0
- package/es/hooks/useUpdateEffect.d.ts +2 -0
- package/es/hooks/useUpdateEffect.js +11 -0
- package/es/icon/ChevronLeft.d.ts +5 -0
- package/es/icon/ChevronLeft.js +23 -0
- package/es/icon/ChevronLeftDouble.d.ts +5 -0
- package/es/icon/ChevronLeftDouble.js +23 -0
- package/es/icon/ChevronRight.d.ts +5 -0
- package/es/icon/ChevronRight.js +23 -0
- package/es/icon/ChevronRightDouble.d.ts +5 -0
- package/es/icon/ChevronRightDouble.js +23 -0
- package/es/index.d.ts +23 -0
- package/es/index.js +1 -0
- package/es/locales/en-US.d.ts +17 -0
- package/es/locales/en-US.js +18 -1
- package/es/locales/index.d.ts +2 -0
- package/es/locales/zh-CN.d.ts +21 -4
- package/es/locales/zh-CN.js +21 -4
- package/es/locales/zh-TW.d.ts +17 -0
- package/es/locales/zh-TW.js +18 -1
- package/es/utils/index.d.ts +32 -0
- package/es/utils/index.js +86 -3
- package/lib/ActionBar/index.js +30 -25
- package/lib/ActionBar/index.less +2 -1
- package/lib/CustomCalendarHeader/index.d.ts +2 -0
- package/lib/CustomCalendarHeader/index.js +58 -0
- package/lib/Dialog/index.d.ts +2 -0
- package/lib/Dialog/index.js +52 -0
- package/lib/Drawer/index.d.ts +11 -0
- package/lib/Drawer/index.js +62 -0
- package/lib/Drawer/index.less +40 -0
- package/lib/PisellDateRangePicker/LocaleContext.d.ts +2 -0
- package/lib/PisellDateRangePicker/index.d.ts +81 -0
- package/lib/PisellDateRangePicker/index.js +89 -33
- package/lib/PisellDateRangePicker/index.less +56 -0
- package/lib/Shortcuts/index.d.ts +4 -3
- package/lib/Toolbar/index.d.ts +3 -0
- package/lib/Toolbar/index.js +139 -0
- package/lib/Toolbar/index.less +32 -0
- package/lib/browserSelect/chevron-down.png +0 -0
- package/lib/browserSelect/index.d.ts +15 -0
- package/lib/browserSelect/index.js +59 -0
- package/lib/browserSelect/index.less +18 -0
- package/lib/constants.d.ts +58 -0
- package/lib/constants.js +178 -0
- package/lib/hooks/useDocumentVisibility.d.ts +2 -0
- package/lib/hooks/useDocumentVisibility.js +40 -0
- package/lib/hooks/useNextDay.d.ts +2 -0
- package/lib/hooks/useNextDay.js +49 -0
- package/lib/hooks/useUpdateEffect.d.ts +2 -0
- package/lib/hooks/useUpdateEffect.js +35 -0
- package/lib/icon/ChevronLeft.d.ts +5 -0
- package/lib/icon/ChevronLeft.js +60 -0
- package/lib/icon/ChevronLeftDouble.d.ts +5 -0
- package/lib/icon/ChevronLeftDouble.js +60 -0
- package/lib/icon/ChevronRight.d.ts +5 -0
- package/lib/icon/ChevronRight.js +60 -0
- package/lib/icon/ChevronRightDouble.d.ts +5 -0
- package/lib/icon/ChevronRightDouble.js +60 -0
- package/lib/{PisellDateRangePicker → icon}/CloseCircle.js +1 -1
- package/lib/index.d.ts +23 -0
- package/lib/index.js +10 -1
- package/lib/locales/en-US.d.ts +17 -0
- package/lib/locales/en-US.js +18 -1
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/zh-CN.d.ts +21 -4
- package/lib/locales/zh-CN.js +18 -1
- package/lib/locales/zh-TW.d.ts +17 -0
- package/lib/locales/zh-TW.js +18 -1
- package/lib/utils/index.d.ts +32 -0
- package/lib/utils/index.js +58 -0
- package/package.json +1 -1
- /package/es/{PisellDateRangePicker → icon}/CloseCircle.d.ts +0 -0
- /package/es/{PisellDateRangePicker → icon}/CloseCircle.js +0 -0
- /package/lib/{PisellDateRangePicker → icon}/CloseCircle.d.ts +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
interface BrowserSelectProps extends React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> {
|
|
4
|
+
options: any[];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @title: 系统级别的下拉框
|
|
8
|
+
* @description:
|
|
9
|
+
* @param {BrowserSelectProps} props
|
|
10
|
+
* @return {*}
|
|
11
|
+
* @Author: zhiwei.Wang
|
|
12
|
+
* @Date: 2024-01-30 16:43
|
|
13
|
+
*/
|
|
14
|
+
declare const BrowserSelect: (props: BrowserSelectProps) => JSX.Element;
|
|
15
|
+
export default BrowserSelect;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/browserSelect/index.tsx
|
|
30
|
+
var browserSelect_exports = {};
|
|
31
|
+
__export(browserSelect_exports, {
|
|
32
|
+
default: () => browserSelect_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(browserSelect_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_index = require("./index.less");
|
|
38
|
+
var BrowserSelect = (props) => {
|
|
39
|
+
const { options, ...resetProps } = props;
|
|
40
|
+
const _options = (0, import_react.useMemo)(() => {
|
|
41
|
+
return (props.options || []).map((d) => {
|
|
42
|
+
return /* @__PURE__ */ import_react.default.createElement("option", { value: d.value, key: d.value }, d.label);
|
|
43
|
+
});
|
|
44
|
+
}, [props.options]);
|
|
45
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
46
|
+
"select",
|
|
47
|
+
{
|
|
48
|
+
...resetProps,
|
|
49
|
+
className: (0, import_classnames.default)("date-picker-pisell-browser-select", resetProps.className),
|
|
50
|
+
onChange: (e) => {
|
|
51
|
+
var _a;
|
|
52
|
+
e.persist();
|
|
53
|
+
(_a = resetProps.onChange) == null ? void 0 : _a.call(resetProps, e);
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
_options
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
var browserSelect_default = BrowserSelect;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.date-picker-pisell-browser-select {
|
|
2
|
+
padding: 9px 16px;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
background-color: #fff;
|
|
5
|
+
background-image: url('./chevron-down.png');
|
|
6
|
+
color: var(--Gray-true-900, #141414);
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
font-style: normal;
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
border: 1px solid var(--Gray-300, #D0D5DD);
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
appearance: none;
|
|
13
|
+
-webkit-appearance: none;
|
|
14
|
+
-moz-appearance: none;
|
|
15
|
+
background-position: right 10px center;
|
|
16
|
+
background-size: 12px;
|
|
17
|
+
background-repeat: no-repeat;
|
|
18
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { PresetType } from "./Shortcuts";
|
|
3
|
+
export declare const presetValueArr: string[];
|
|
4
|
+
export declare const presetDetailMap: {
|
|
5
|
+
today: {
|
|
6
|
+
getValue: () => dayjs.Dayjs[];
|
|
7
|
+
label: () => any;
|
|
8
|
+
};
|
|
9
|
+
yesterday: {
|
|
10
|
+
getValue: () => dayjs.Dayjs[];
|
|
11
|
+
label: () => any;
|
|
12
|
+
};
|
|
13
|
+
last_3_days: {
|
|
14
|
+
getValue: () => dayjs.Dayjs[];
|
|
15
|
+
label: () => any;
|
|
16
|
+
};
|
|
17
|
+
last_7_days: {
|
|
18
|
+
getValue: () => dayjs.Dayjs[];
|
|
19
|
+
label: () => any;
|
|
20
|
+
};
|
|
21
|
+
last_30_days: {
|
|
22
|
+
getValue: () => dayjs.Dayjs[];
|
|
23
|
+
label: () => any;
|
|
24
|
+
};
|
|
25
|
+
last_90_days: {
|
|
26
|
+
getValue: () => dayjs.Dayjs[];
|
|
27
|
+
label: () => any;
|
|
28
|
+
};
|
|
29
|
+
last_180_days: {
|
|
30
|
+
getValue: () => dayjs.Dayjs[];
|
|
31
|
+
label: () => any;
|
|
32
|
+
};
|
|
33
|
+
tomorrow: {
|
|
34
|
+
getValue: () => dayjs.Dayjs[];
|
|
35
|
+
label: () => any;
|
|
36
|
+
};
|
|
37
|
+
next_3_days: {
|
|
38
|
+
getValue: () => dayjs.Dayjs[];
|
|
39
|
+
label: () => any;
|
|
40
|
+
};
|
|
41
|
+
next_7_days: {
|
|
42
|
+
getValue: () => dayjs.Dayjs[];
|
|
43
|
+
label: () => any;
|
|
44
|
+
};
|
|
45
|
+
next_30_days: {
|
|
46
|
+
getValue: () => dayjs.Dayjs[];
|
|
47
|
+
label: () => any;
|
|
48
|
+
};
|
|
49
|
+
next_90_days: {
|
|
50
|
+
getValue: () => dayjs.Dayjs[];
|
|
51
|
+
label: () => any;
|
|
52
|
+
};
|
|
53
|
+
next_180_days: {
|
|
54
|
+
getValue: () => dayjs.Dayjs[];
|
|
55
|
+
label: () => any;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare const defaultPresets: PresetType[];
|
package/lib/constants.js
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/constants.ts
|
|
30
|
+
var constants_exports = {};
|
|
31
|
+
__export(constants_exports, {
|
|
32
|
+
defaultPresets: () => defaultPresets,
|
|
33
|
+
presetDetailMap: () => presetDetailMap,
|
|
34
|
+
presetValueArr: () => presetValueArr
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(constants_exports);
|
|
37
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
38
|
+
var import_locales = require("./locales");
|
|
39
|
+
var presetValueArr = [
|
|
40
|
+
"today",
|
|
41
|
+
"yesterday",
|
|
42
|
+
"last_3_days",
|
|
43
|
+
"last_7_days",
|
|
44
|
+
"last_30_days",
|
|
45
|
+
"last_90_days",
|
|
46
|
+
"last_180_days",
|
|
47
|
+
"tomorrow",
|
|
48
|
+
"next_3_days",
|
|
49
|
+
"next_7_days",
|
|
50
|
+
"next_30_days",
|
|
51
|
+
"next_90_days",
|
|
52
|
+
"next_180_days"
|
|
53
|
+
];
|
|
54
|
+
var presetDetailMap = {
|
|
55
|
+
today: {
|
|
56
|
+
getValue: () => [(0, import_dayjs.default)().startOf("day"), (0, import_dayjs.default)().endOf("day")],
|
|
57
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-today")
|
|
58
|
+
},
|
|
59
|
+
yesterday: {
|
|
60
|
+
getValue: () => [
|
|
61
|
+
(0, import_dayjs.default)().add(-1, "d").startOf("day"),
|
|
62
|
+
(0, import_dayjs.default)().add(-1, "d").endOf("day")
|
|
63
|
+
],
|
|
64
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-yesterday")
|
|
65
|
+
},
|
|
66
|
+
last_3_days: {
|
|
67
|
+
getValue: () => [
|
|
68
|
+
(0, import_dayjs.default)().add(-3, "d").startOf("day"),
|
|
69
|
+
(0, import_dayjs.default)().add(-1, "d").endOf("day")
|
|
70
|
+
],
|
|
71
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-last-3-days")
|
|
72
|
+
},
|
|
73
|
+
last_7_days: {
|
|
74
|
+
getValue: () => [
|
|
75
|
+
(0, import_dayjs.default)().add(-7, "d").startOf("day"),
|
|
76
|
+
(0, import_dayjs.default)().add(-1, "d").endOf("day")
|
|
77
|
+
],
|
|
78
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-last-7-days")
|
|
79
|
+
},
|
|
80
|
+
last_30_days: {
|
|
81
|
+
getValue: () => [
|
|
82
|
+
(0, import_dayjs.default)().add(-30, "d").startOf("day"),
|
|
83
|
+
(0, import_dayjs.default)().add(-1, "d").endOf("day")
|
|
84
|
+
],
|
|
85
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-last-30-days")
|
|
86
|
+
},
|
|
87
|
+
last_90_days: {
|
|
88
|
+
getValue: () => [
|
|
89
|
+
(0, import_dayjs.default)().add(-90, "d").startOf("day"),
|
|
90
|
+
(0, import_dayjs.default)().add(-1, "d").endOf("day")
|
|
91
|
+
],
|
|
92
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-last-90-days")
|
|
93
|
+
},
|
|
94
|
+
last_180_days: {
|
|
95
|
+
getValue: () => [
|
|
96
|
+
(0, import_dayjs.default)().add(-180, "d").startOf("day"),
|
|
97
|
+
(0, import_dayjs.default)().add(-1, "d").endOf("day")
|
|
98
|
+
],
|
|
99
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-last-180-days")
|
|
100
|
+
},
|
|
101
|
+
tomorrow: {
|
|
102
|
+
getValue: () => [
|
|
103
|
+
(0, import_dayjs.default)().add(1, "d").startOf("day"),
|
|
104
|
+
(0, import_dayjs.default)().add(1, "d").endOf("day")
|
|
105
|
+
],
|
|
106
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-tomorrow")
|
|
107
|
+
},
|
|
108
|
+
next_3_days: {
|
|
109
|
+
getValue: () => [
|
|
110
|
+
(0, import_dayjs.default)().add(1, "d").startOf("day"),
|
|
111
|
+
(0, import_dayjs.default)().add(3, "d").endOf("day")
|
|
112
|
+
],
|
|
113
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-next-3-days")
|
|
114
|
+
},
|
|
115
|
+
next_7_days: {
|
|
116
|
+
getValue: () => [
|
|
117
|
+
(0, import_dayjs.default)().add(1, "d").startOf("day"),
|
|
118
|
+
(0, import_dayjs.default)().add(7, "d").endOf("day")
|
|
119
|
+
],
|
|
120
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-next-7-days")
|
|
121
|
+
},
|
|
122
|
+
next_30_days: {
|
|
123
|
+
getValue: () => [
|
|
124
|
+
(0, import_dayjs.default)().add(1, "d").startOf("day"),
|
|
125
|
+
(0, import_dayjs.default)().add(30, "d").endOf("day")
|
|
126
|
+
],
|
|
127
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-next-30-days")
|
|
128
|
+
},
|
|
129
|
+
next_90_days: {
|
|
130
|
+
getValue: () => [
|
|
131
|
+
(0, import_dayjs.default)().add(1, "d").startOf("day"),
|
|
132
|
+
(0, import_dayjs.default)().add(90, "d").endOf("day")
|
|
133
|
+
],
|
|
134
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-next-90-days")
|
|
135
|
+
},
|
|
136
|
+
next_180_days: {
|
|
137
|
+
getValue: () => [
|
|
138
|
+
(0, import_dayjs.default)().add(1, "d").startOf("day"),
|
|
139
|
+
(0, import_dayjs.default)().add(180, "d").endOf("day")
|
|
140
|
+
],
|
|
141
|
+
label: () => (0, import_locales.getText)("toolbar-date-range-shortcut-next-180-days")
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
var defaultPresets = [
|
|
145
|
+
{
|
|
146
|
+
value: "today"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
value: "yesterday"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
value: "tomorrow"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
value: "next_7_days"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
value: "next_30_days"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
value: "next_90_days"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
value: "last_7_days"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
value: "last_30_days"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
value: "last_90_days"
|
|
171
|
+
}
|
|
172
|
+
];
|
|
173
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
174
|
+
0 && (module.exports = {
|
|
175
|
+
defaultPresets,
|
|
176
|
+
presetDetailMap,
|
|
177
|
+
presetValueArr
|
|
178
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/hooks/useDocumentVisibility.ts
|
|
20
|
+
var useDocumentVisibility_exports = {};
|
|
21
|
+
__export(useDocumentVisibility_exports, {
|
|
22
|
+
default: () => useDocumentVisibility_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(useDocumentVisibility_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var getVisible = () => document.visibilityState;
|
|
27
|
+
var useDocumentVisibility = () => {
|
|
28
|
+
const [visible, setVisible] = (0, import_react.useState)(getVisible());
|
|
29
|
+
(0, import_react.useEffect)(() => {
|
|
30
|
+
const handleVisibilityChange = () => {
|
|
31
|
+
setVisible(getVisible());
|
|
32
|
+
};
|
|
33
|
+
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
34
|
+
return () => {
|
|
35
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
36
|
+
};
|
|
37
|
+
}, []);
|
|
38
|
+
return visible;
|
|
39
|
+
};
|
|
40
|
+
var useDocumentVisibility_default = useDocumentVisibility;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/hooks/useNextDay.ts
|
|
30
|
+
var useNextDay_exports = {};
|
|
31
|
+
__export(useNextDay_exports, {
|
|
32
|
+
default: () => useNextDay_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(useNextDay_exports);
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_useUpdateEffect = __toESM(require("./useUpdateEffect"));
|
|
37
|
+
var import_useDocumentVisibility = __toESM(require("./useDocumentVisibility"));
|
|
38
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
39
|
+
var useNextDay = (fn) => {
|
|
40
|
+
const visible = (0, import_useDocumentVisibility.default)();
|
|
41
|
+
const currentDay = (0, import_react.useRef)((0, import_dayjs.default)());
|
|
42
|
+
(0, import_useUpdateEffect.default)(() => {
|
|
43
|
+
if (visible && !currentDay.current.isSame((0, import_dayjs.default)(), "day")) {
|
|
44
|
+
currentDay.current = (0, import_dayjs.default)();
|
|
45
|
+
fn();
|
|
46
|
+
}
|
|
47
|
+
}, [visible]);
|
|
48
|
+
};
|
|
49
|
+
var useNextDay_default = useNextDay;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/hooks/useUpdateEffect.ts
|
|
20
|
+
var useUpdateEffect_exports = {};
|
|
21
|
+
__export(useUpdateEffect_exports, {
|
|
22
|
+
default: () => useUpdateEffect_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(useUpdateEffect_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var useUpdateEffect = (fn, deps) => {
|
|
27
|
+
const isMount = (0, import_react.useRef)(false);
|
|
28
|
+
(0, import_react.useEffect)(() => {
|
|
29
|
+
if (isMount.current) {
|
|
30
|
+
fn();
|
|
31
|
+
}
|
|
32
|
+
isMount.current = true;
|
|
33
|
+
}, deps);
|
|
34
|
+
};
|
|
35
|
+
var useUpdateEffect_default = useUpdateEffect;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/icon/ChevronLeft.tsx
|
|
30
|
+
var ChevronLeft_exports = {};
|
|
31
|
+
__export(ChevronLeft_exports, {
|
|
32
|
+
default: () => ChevronLeft_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ChevronLeft_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var ChevronLeft = (props) => {
|
|
37
|
+
const { className, onClick } = props;
|
|
38
|
+
return /* @__PURE__ */ import_react.default.createElement("span", { className, onClick }, /* @__PURE__ */ import_react.default.createElement(
|
|
39
|
+
"svg",
|
|
40
|
+
{
|
|
41
|
+
className: "icon",
|
|
42
|
+
viewBox: "0 0 1024 1024",
|
|
43
|
+
version: "1.1",
|
|
44
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
+
"p-id": "35105",
|
|
46
|
+
width: "1em",
|
|
47
|
+
height: "1em"
|
|
48
|
+
},
|
|
49
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
50
|
+
"path",
|
|
51
|
+
{
|
|
52
|
+
"fill-rule": "evenodd",
|
|
53
|
+
"clip-rule": "evenodd",
|
|
54
|
+
d: "M15.7071 5.29289C16.0976 5.68342 16.0976 6.31658 15.7071 6.70711L10.4142 12L15.7071 17.2929C16.0976 17.6834 16.0976 18.3166 15.7071 18.7071C15.3166 19.0976 14.6834 19.0976 14.2929 18.7071L8.29289 12.7071C7.90237 12.3166 7.90237 11.6834 8.29289 11.2929L14.2929 5.29289C14.6834 4.90237 15.3166 4.90237 15.7071 5.29289Z",
|
|
55
|
+
fill: "currentColor"
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
));
|
|
59
|
+
};
|
|
60
|
+
var ChevronLeft_default = ChevronLeft;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/icon/ChevronLeftDouble.tsx
|
|
30
|
+
var ChevronLeftDouble_exports = {};
|
|
31
|
+
__export(ChevronLeftDouble_exports, {
|
|
32
|
+
default: () => ChevronLeftDouble_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ChevronLeftDouble_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var ChevronLeftDouble = (props) => {
|
|
37
|
+
const { className, onClick } = props;
|
|
38
|
+
return /* @__PURE__ */ import_react.default.createElement("span", { className, onClick }, /* @__PURE__ */ import_react.default.createElement(
|
|
39
|
+
"svg",
|
|
40
|
+
{
|
|
41
|
+
className: "icon",
|
|
42
|
+
viewBox: "0 0 1024 1024",
|
|
43
|
+
version: "1.1",
|
|
44
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
+
"p-id": "35105",
|
|
46
|
+
width: "1em",
|
|
47
|
+
height: "1em"
|
|
48
|
+
},
|
|
49
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
50
|
+
"path",
|
|
51
|
+
{
|
|
52
|
+
"fill-rule": "evenodd",
|
|
53
|
+
"clip-rule": "evenodd",
|
|
54
|
+
d: "M11.7071 6.29289C12.0976 6.68342 12.0976 7.31658 11.7071 7.70711L7.41421 12L11.7071 16.2929C12.0976 16.6834 12.0976 17.3166 11.7071 17.7071C11.3166 18.0976 10.6834 18.0976 10.2929 17.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929L10.2929 6.29289C10.6834 5.90237 11.3166 5.90237 11.7071 6.29289ZM18.7071 6.29289C19.0976 6.68342 19.0976 7.31658 18.7071 7.70711L14.4142 12L18.7071 16.2929C19.0976 16.6834 19.0976 17.3166 18.7071 17.7071C18.3166 18.0976 17.6834 18.0976 17.2929 17.7071L12.2929 12.7071C11.9024 12.3166 11.9024 11.6834 12.2929 11.2929L17.2929 6.29289C17.6834 5.90237 18.3166 5.90237 18.7071 6.29289Z",
|
|
55
|
+
fill: "currentColor"
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
));
|
|
59
|
+
};
|
|
60
|
+
var ChevronLeftDouble_default = ChevronLeftDouble;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/icon/ChevronRight.tsx
|
|
30
|
+
var ChevronRight_exports = {};
|
|
31
|
+
__export(ChevronRight_exports, {
|
|
32
|
+
default: () => ChevronRight_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ChevronRight_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var ChevronRight = (props) => {
|
|
37
|
+
const { className, onClick } = props;
|
|
38
|
+
return /* @__PURE__ */ import_react.default.createElement("span", { className, onClick }, /* @__PURE__ */ import_react.default.createElement(
|
|
39
|
+
"svg",
|
|
40
|
+
{
|
|
41
|
+
className: "icon",
|
|
42
|
+
viewBox: "0 0 1024 1024",
|
|
43
|
+
version: "1.1",
|
|
44
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
+
"p-id": "35105",
|
|
46
|
+
width: "1em",
|
|
47
|
+
height: "1em"
|
|
48
|
+
},
|
|
49
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
50
|
+
"path",
|
|
51
|
+
{
|
|
52
|
+
"fill-rule": "evenodd",
|
|
53
|
+
"clip-rule": "evenodd",
|
|
54
|
+
d: "M8.29289 5.29289C8.68342 4.90237 9.31658 4.90237 9.70711 5.29289L15.7071 11.2929C16.0976 11.6834 16.0976 12.3166 15.7071 12.7071L9.70711 18.7071C9.31658 19.0976 8.68342 19.0976 8.29289 18.7071C7.90237 18.3166 7.90237 17.6834 8.29289 17.2929L13.5858 12L8.29289 6.70711C7.90237 6.31658 7.90237 5.68342 8.29289 5.29289Z",
|
|
55
|
+
fill: "currentColor"
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
));
|
|
59
|
+
};
|
|
60
|
+
var ChevronRight_default = ChevronRight;
|