@pisell/materials 1.0.395 → 1.0.397
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +45 -13
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +46 -14
- package/es/components/browserSelect/chevron-down.png +0 -0
- package/es/components/browserSelect/index.d.ts +15 -0
- package/es/components/browserSelect/index.js +36 -0
- package/es/components/browserSelect/index.less +18 -0
- package/es/components/date-picker/constants.d.ts +39 -0
- package/es/components/date-picker/constants.js +76 -0
- package/es/components/date-picker/datePickerCpt.d.ts +8 -0
- package/es/components/date-picker/datePickerCpt.js +370 -0
- package/es/components/date-picker/hooks/useMediaQuery.d.ts +2 -0
- package/es/components/date-picker/hooks/useMediaQuery.js +28 -0
- package/es/components/date-picker/index.js +2 -2
- package/es/components/date-picker/index.less +1880 -0
- package/es/components/drag-sort-tree/index.d.ts +0 -1
- package/es/components/drag-sort-tree/index.js +2 -1
- package/es/components/picker-view/index.d.ts +2 -0
- package/es/components/picker-view/index.js +2 -0
- package/es/components/pisell-config-provider/index.js +2 -0
- package/es/components/pisellModal/components/functions/index.d.ts +23 -5
- package/es/components/pisellModal/components/functions/index.js +7 -2
- package/es/components/pisellModal/index.d.ts +20 -5
- package/es/components/pisellTags/index.d.ts +13 -0
- package/es/components/pisellTags/index.js +83 -0
- package/es/components/pisellTags/index.less +17 -0
- package/es/components/pisellTags/utils.d.ts +1 -0
- package/es/components/pisellTags/utils.js +89 -0
- package/es/components/table/Actions/component/ColumnsSetting/PopoverContent.js +1 -1
- package/es/components/table/Actions/component/ExportImport/index.js +5 -4
- package/es/components/table/BasicTable/index.js +0 -1
- package/es/components/table/Gallery/index.js +2 -1
- package/es/components/table/Table/fields/rangePicker/Edit/index.js +13 -11
- package/es/components/table/Table/index.js +2 -1
- package/es/components/table/Table/utils.d.ts +14 -2
- package/es/components/table/Table/utils.js +6 -2
- package/es/components/table/hooks/useTableSetting.js +26 -5
- package/es/components/table/hooks/useTransDataSource.d.ts +1 -0
- package/es/components/table/hooks/useTransDataSource.js +6 -4
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/locales/en-US.d.ts +12 -0
- package/es/locales/en-US.js +13 -0
- package/es/locales/zh-CN.d.ts +12 -0
- package/es/locales/zh-CN.js +13 -0
- package/es/locales/zh-TW.d.ts +12 -0
- package/es/locales/zh-TW.js +13 -0
- package/lib/components/browserSelect/chevron-down.png +0 -0
- package/lib/components/browserSelect/index.d.ts +15 -0
- package/lib/components/browserSelect/index.js +59 -0
- package/lib/components/browserSelect/index.less +18 -0
- package/lib/components/date-picker/constants.d.ts +39 -0
- package/lib/components/date-picker/constants.js +78 -0
- package/lib/components/date-picker/datePickerCpt.d.ts +8 -0
- package/lib/components/date-picker/datePickerCpt.js +403 -0
- package/lib/components/date-picker/hooks/useMediaQuery.d.ts +2 -0
- package/lib/components/date-picker/hooks/useMediaQuery.js +43 -0
- package/lib/components/date-picker/index.js +2 -2
- package/lib/components/date-picker/index.less +1880 -0
- package/lib/components/drag-sort-tree/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/index.js +0 -1
- package/lib/components/picker-view/index.d.ts +2 -0
- package/lib/components/picker-view/index.js +36 -0
- package/lib/components/pisell-config-provider/index.js +2 -0
- package/lib/components/pisellModal/components/functions/index.d.ts +23 -5
- package/lib/components/pisellModal/components/functions/index.js +13 -7
- package/lib/components/pisellModal/index.d.ts +20 -5
- package/lib/components/pisellTags/index.d.ts +13 -0
- package/lib/components/pisellTags/index.js +113 -0
- package/lib/components/pisellTags/index.less +17 -0
- package/lib/components/pisellTags/utils.d.ts +1 -0
- package/lib/components/pisellTags/utils.js +86 -0
- package/lib/components/table/Actions/component/ColumnsSetting/PopoverContent.js +1 -1
- package/lib/components/table/Actions/component/ExportImport/index.js +5 -5
- package/lib/components/table/BasicTable/index.js +0 -1
- package/lib/components/table/Gallery/index.js +2 -1
- package/lib/components/table/Table/fields/rangePicker/Edit/index.js +1 -9
- package/lib/components/table/Table/index.js +2 -1
- package/lib/components/table/Table/utils.d.ts +14 -2
- package/lib/components/table/Table/utils.js +7 -1
- package/lib/components/table/hooks/useTableSetting.js +23 -9
- package/lib/components/table/hooks/useTransDataSource.d.ts +1 -0
- package/lib/components/table/hooks/useTransDataSource.js +5 -4
- package/lib/index.d.ts +3 -1
- package/lib/index.js +6 -0
- package/lib/locales/en-US.d.ts +12 -0
- package/lib/locales/en-US.js +13 -0
- package/lib/locales/zh-CN.d.ts +12 -0
- package/lib/locales/zh-CN.js +13 -0
- package/lib/locales/zh-TW.d.ts +12 -0
- package/lib/locales/zh-TW.js +13 -0
- package/package.json +4 -4
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
package/es/index.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ export { default as List } from './components/list';
|
|
|
72
72
|
export { default as Sort } from './components/sort';
|
|
73
73
|
export { default as InputNumberRange } from './components/input-number-range';
|
|
74
74
|
export { default as LowCodePage } from './components/lowCodePage';
|
|
75
|
+
export { default as PickerView } from './components/picker-view';
|
|
75
76
|
export { default as Segmented } from './components/segmented';
|
|
76
77
|
export { default as VirtualKeyboard } from './components/virtual-keyboard';
|
|
77
78
|
export { default as VirtualKeyboardTime } from './components/virtual-keyboard/Time';
|
|
@@ -101,4 +102,5 @@ export { default as PisellAlert } from './components/pisellAlert';
|
|
|
101
102
|
export { default as PisellCard } from './components/pisellCard';
|
|
102
103
|
export { default as PisellInformationEntry } from './components/pisellInformationEntry';
|
|
103
104
|
export { default as usePisellConfig } from './components/pisell-config-provider/hooks/usePisellConfig';
|
|
104
|
-
export { globalConfig, default as PisellContext } from './components/pisell-config-provider/context';
|
|
105
|
+
export { globalConfig, default as PisellContext, } from './components/pisell-config-provider/context';
|
|
106
|
+
export { default as PisellTags } from './components/pisellTags';
|
package/es/index.js
CHANGED
|
@@ -92,6 +92,7 @@ export { default as List } from "./components/list";
|
|
|
92
92
|
export { default as Sort } from "./components/sort";
|
|
93
93
|
export { default as InputNumberRange } from "./components/input-number-range";
|
|
94
94
|
export { default as LowCodePage } from "./components/lowCodePage";
|
|
95
|
+
export { default as PickerView } from "./components/picker-view";
|
|
95
96
|
export { default as Segmented } from "./components/segmented";
|
|
96
97
|
export { default as VirtualKeyboard } from "./components/virtual-keyboard";
|
|
97
98
|
export { default as VirtualKeyboardTime } from "./components/virtual-keyboard/Time";
|
|
@@ -123,4 +124,5 @@ export { default as PisellAlert } from "./components/pisellAlert";
|
|
|
123
124
|
export { default as PisellCard } from "./components/pisellCard";
|
|
124
125
|
export { default as PisellInformationEntry } from "./components/pisellInformationEntry";
|
|
125
126
|
export { default as usePisellConfig } from "./components/pisell-config-provider/hooks/usePisellConfig";
|
|
126
|
-
export { globalConfig, default as PisellContext } from "./components/pisell-config-provider/context";
|
|
127
|
+
export { globalConfig, default as PisellContext } from "./components/pisell-config-provider/context";
|
|
128
|
+
export { default as PisellTags } from "./components/pisellTags";
|
package/es/locales/en-US.d.ts
CHANGED
|
@@ -97,6 +97,18 @@ declare const _default: {
|
|
|
97
97
|
'table-action-export-import-log-copy': string;
|
|
98
98
|
'table-action-export-import-table-success-copy': string;
|
|
99
99
|
'drag-sort-tree-unavailable-today-tip': string;
|
|
100
|
+
'date-picker-today': string;
|
|
101
|
+
'date-picker-yesterday': string;
|
|
102
|
+
'date-picker-tomorrow': string;
|
|
103
|
+
'date-picker-next_monday': string;
|
|
104
|
+
'date-picker-last_friday': string;
|
|
105
|
+
'date-picker-first_day_of_this_month': string;
|
|
106
|
+
'date-picker-last_day_of_this_month': string;
|
|
107
|
+
'date-picker-first_day_of_next_month': string;
|
|
108
|
+
'date-picker-last_day_of_last_month': string;
|
|
109
|
+
'date-picker-invalid-date': string;
|
|
110
|
+
"date-picker-apply": string;
|
|
111
|
+
'date-picker-shortcut-custom': string;
|
|
100
112
|
'pisell-input-copy-success': string;
|
|
101
113
|
'pisell-input-copy': string;
|
|
102
114
|
'pisell-empty-description-no-data': string;
|
package/es/locales/en-US.js
CHANGED
|
@@ -119,6 +119,19 @@ export default {
|
|
|
119
119
|
'table-action-export-import-log-copy': 'Copy',
|
|
120
120
|
'table-action-export-import-table-success-copy': 'Copy Success',
|
|
121
121
|
'drag-sort-tree-unavailable-today-tip': 'Unavailable today',
|
|
122
|
+
// 日期组件
|
|
123
|
+
'date-picker-today': 'Today',
|
|
124
|
+
'date-picker-yesterday': 'Yesterday',
|
|
125
|
+
'date-picker-tomorrow': 'Tomorrow',
|
|
126
|
+
'date-picker-next_monday': 'Next monday',
|
|
127
|
+
'date-picker-last_friday': 'Last friday',
|
|
128
|
+
'date-picker-first_day_of_this_month': 'First day of this month',
|
|
129
|
+
'date-picker-last_day_of_this_month': 'Last day of this month',
|
|
130
|
+
'date-picker-first_day_of_next_month': 'First day of next month',
|
|
131
|
+
'date-picker-last_day_of_last_month': 'Last day of last month',
|
|
132
|
+
'date-picker-invalid-date': 'Invalid date',
|
|
133
|
+
"date-picker-apply": "Apply",
|
|
134
|
+
'date-picker-shortcut-custom': 'Custom',
|
|
122
135
|
'pisell-input-copy-success': 'Copy Success',
|
|
123
136
|
'pisell-input-copy': 'Copy',
|
|
124
137
|
// 空状态
|
package/es/locales/zh-CN.d.ts
CHANGED
|
@@ -97,6 +97,18 @@ declare const _default: {
|
|
|
97
97
|
'table-action-export-import-log-copy': string;
|
|
98
98
|
'table-action-export-import-table-success-copy': string;
|
|
99
99
|
'drag-sort-tree-unavailable-today-tip': string;
|
|
100
|
+
'date-picker-today': string;
|
|
101
|
+
'date-picker-yesterday': string;
|
|
102
|
+
'date-picker-tomorrow': string;
|
|
103
|
+
'date-picker-next_monday': string;
|
|
104
|
+
'date-picker-last_friday': string;
|
|
105
|
+
'date-picker-first_day_of_this_month': string;
|
|
106
|
+
'date-picker-last_day_of_this_month': string;
|
|
107
|
+
'date-picker-first_day_of_next_month': string;
|
|
108
|
+
'date-picker-last_day_of_last_month': string;
|
|
109
|
+
'date-picker-invalid-date': string;
|
|
110
|
+
"date-picker-apply": string;
|
|
111
|
+
'date-picker-shortcut-custom': string;
|
|
100
112
|
'pisell-input-copy-success': string;
|
|
101
113
|
'pisell-input-copy': string;
|
|
102
114
|
'pisell-empty-description-no-data': string;
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -119,6 +119,19 @@ export default {
|
|
|
119
119
|
'table-action-export-import-log-copy': '复制',
|
|
120
120
|
'table-action-export-import-table-success-copy': '复制成功',
|
|
121
121
|
'drag-sort-tree-unavailable-today-tip': '今日不可用',
|
|
122
|
+
// 日期组件
|
|
123
|
+
'date-picker-today': '今天',
|
|
124
|
+
'date-picker-yesterday': '昨天',
|
|
125
|
+
'date-picker-tomorrow': '明天',
|
|
126
|
+
'date-picker-next_monday': '下个星期一',
|
|
127
|
+
'date-picker-last_friday': '上个星期五',
|
|
128
|
+
'date-picker-first_day_of_this_month': '本月的第一天',
|
|
129
|
+
'date-picker-last_day_of_this_month': '本月的最后一天',
|
|
130
|
+
'date-picker-first_day_of_next_month': '下个月的第一天',
|
|
131
|
+
'date-picker-last_day_of_last_month': '上个月的最后一天',
|
|
132
|
+
'date-picker-invalid-date': '无效日期',
|
|
133
|
+
"date-picker-apply": "确定",
|
|
134
|
+
'date-picker-shortcut-custom': '自定义',
|
|
122
135
|
'pisell-input-copy-success': '复制成功',
|
|
123
136
|
'pisell-input-copy': '复制',
|
|
124
137
|
// 空状态
|
package/es/locales/zh-TW.d.ts
CHANGED
|
@@ -97,6 +97,18 @@ declare const _default: {
|
|
|
97
97
|
'table-action-export-import-log-copy': string;
|
|
98
98
|
'table-action-export-import-table-success-copy': string;
|
|
99
99
|
'drag-sort-tree-unavailable-today-tip': string;
|
|
100
|
+
'date-picker-today': string;
|
|
101
|
+
'date-picker-yesterday': string;
|
|
102
|
+
'date-picker-tomorrow': string;
|
|
103
|
+
'date-picker-next_monday': string;
|
|
104
|
+
'date-picker-last_friday': string;
|
|
105
|
+
'date-picker-first_day_of_this_month': string;
|
|
106
|
+
'date-picker-last_day_of_this_month': string;
|
|
107
|
+
'date-picker-first_day_of_next_month': string;
|
|
108
|
+
'date-picker-last_day_of_last_month': string;
|
|
109
|
+
'date-picker-invalid-date': string;
|
|
110
|
+
"date-picker-apply": string;
|
|
111
|
+
'date-picker-shortcut-custom': string;
|
|
100
112
|
'pisell-input-copy-success': string;
|
|
101
113
|
'pisell-input-copy': string;
|
|
102
114
|
'pisell-empty-description-no-data': string;
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -119,6 +119,19 @@ export default {
|
|
|
119
119
|
'table-action-export-import-log-copy': '復製',
|
|
120
120
|
'table-action-export-import-table-success-copy': '復製成功',
|
|
121
121
|
'drag-sort-tree-unavailable-today-tip': '今日不可用',
|
|
122
|
+
// 日期组件
|
|
123
|
+
'date-picker-today': '今天',
|
|
124
|
+
'date-picker-yesterday': '昨天',
|
|
125
|
+
'date-picker-tomorrow': '明天',
|
|
126
|
+
'date-picker-next_monday': '下個星期一',
|
|
127
|
+
'date-picker-last_friday': '上個星期五',
|
|
128
|
+
'date-picker-first_day_of_this_month': '本月的第一天',
|
|
129
|
+
'date-picker-last_day_of_this_month': '本月的最後一天',
|
|
130
|
+
'date-picker-first_day_of_next_month': '下個月的第一天',
|
|
131
|
+
'date-picker-last_day_of_last_month': '上個月的最後一天',
|
|
132
|
+
'date-picker-invalid-date': '無效日期',
|
|
133
|
+
"date-picker-apply": "确定",
|
|
134
|
+
'date-picker-shortcut-custom': '自定義',
|
|
122
135
|
'pisell-input-copy-success': '復製成功',
|
|
123
136
|
'pisell-input-copy': '復製',
|
|
124
137
|
// 空状态
|
|
Binary file
|
|
@@ -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) => React.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/components/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,39 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
export declare const presetDetailMap: {
|
|
3
|
+
today: {
|
|
4
|
+
getValue: () => dayjs.Dayjs;
|
|
5
|
+
label: () => any;
|
|
6
|
+
};
|
|
7
|
+
yesterday: {
|
|
8
|
+
getValue: () => dayjs.Dayjs;
|
|
9
|
+
label: () => any;
|
|
10
|
+
};
|
|
11
|
+
tomorrow: {
|
|
12
|
+
getValue: () => dayjs.Dayjs;
|
|
13
|
+
label: () => any;
|
|
14
|
+
};
|
|
15
|
+
next_monday: {
|
|
16
|
+
getValue: () => dayjs.Dayjs;
|
|
17
|
+
label: () => any;
|
|
18
|
+
};
|
|
19
|
+
last_friday: {
|
|
20
|
+
getValue: () => dayjs.Dayjs;
|
|
21
|
+
label: () => any;
|
|
22
|
+
};
|
|
23
|
+
first_day_of_this_month: {
|
|
24
|
+
getValue: () => dayjs.Dayjs;
|
|
25
|
+
label: () => any;
|
|
26
|
+
};
|
|
27
|
+
last_day_of_this_month: {
|
|
28
|
+
getValue: () => dayjs.Dayjs;
|
|
29
|
+
label: () => any;
|
|
30
|
+
};
|
|
31
|
+
first_day_of_next_month: {
|
|
32
|
+
getValue: () => dayjs.Dayjs;
|
|
33
|
+
label: () => any;
|
|
34
|
+
};
|
|
35
|
+
last_day_of_last_month: {
|
|
36
|
+
getValue: () => dayjs.Dayjs;
|
|
37
|
+
label: () => any;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
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/components/date-picker/constants.ts
|
|
30
|
+
var constants_exports = {};
|
|
31
|
+
__export(constants_exports, {
|
|
32
|
+
presetDetailMap: () => presetDetailMap
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(constants_exports);
|
|
35
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
36
|
+
var import_locales = require("../../locales");
|
|
37
|
+
var presetDetailMap = {
|
|
38
|
+
today: {
|
|
39
|
+
getValue: () => (0, import_dayjs.default)().startOf("day"),
|
|
40
|
+
label: () => (0, import_locales.getText)("date-picker-today")
|
|
41
|
+
},
|
|
42
|
+
yesterday: {
|
|
43
|
+
getValue: () => (0, import_dayjs.default)().add(-1, "d").startOf("day"),
|
|
44
|
+
label: () => (0, import_locales.getText)("date-picker-yesterday")
|
|
45
|
+
},
|
|
46
|
+
tomorrow: {
|
|
47
|
+
getValue: () => (0, import_dayjs.default)().add(1, "d").startOf("day"),
|
|
48
|
+
label: () => (0, import_locales.getText)("date-picker-tomorrow")
|
|
49
|
+
},
|
|
50
|
+
next_monday: {
|
|
51
|
+
getValue: () => (0, import_dayjs.default)().startOf("week").add(8, "day").startOf("day"),
|
|
52
|
+
label: () => (0, import_locales.getText)("date-picker-next_monday")
|
|
53
|
+
},
|
|
54
|
+
last_friday: {
|
|
55
|
+
getValue: () => (0, import_dayjs.default)().subtract(1, "week").startOf("week").add(5, "day").startOf("day"),
|
|
56
|
+
label: () => (0, import_locales.getText)("date-picker-last_friday")
|
|
57
|
+
},
|
|
58
|
+
first_day_of_this_month: {
|
|
59
|
+
getValue: () => (0, import_dayjs.default)().startOf("month").startOf("day"),
|
|
60
|
+
label: () => (0, import_locales.getText)("date-picker-first_day_of_this_month")
|
|
61
|
+
},
|
|
62
|
+
last_day_of_this_month: {
|
|
63
|
+
getValue: () => (0, import_dayjs.default)().endOf("month").startOf("day"),
|
|
64
|
+
label: () => (0, import_locales.getText)("date-picker-last_day_of_this_month")
|
|
65
|
+
},
|
|
66
|
+
first_day_of_next_month: {
|
|
67
|
+
getValue: () => (0, import_dayjs.default)().endOf("month").add(1, "day").startOf("day"),
|
|
68
|
+
label: () => (0, import_locales.getText)("date-picker-first_day_of_next_month")
|
|
69
|
+
},
|
|
70
|
+
last_day_of_last_month: {
|
|
71
|
+
getValue: () => (0, import_dayjs.default)().startOf("month").subtract(1, "day").startOf("day"),
|
|
72
|
+
label: () => (0, import_locales.getText)("date-picker-last_day_of_last_month")
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
76
|
+
0 && (module.exports = {
|
|
77
|
+
presetDetailMap
|
|
78
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PickerDateProps } from 'antd/es/date-picker/generatePicker';
|
|
3
|
+
import { Dayjs } from 'dayjs';
|
|
4
|
+
import './index.less';
|
|
5
|
+
interface DatePickerCptProps extends PickerDateProps<Dayjs> {
|
|
6
|
+
}
|
|
7
|
+
declare const DatePickerCpt: (props: DatePickerCptProps) => React.JSX.Element;
|
|
8
|
+
export default DatePickerCpt;
|