@pisell/materials 1.0.404 → 1.0.405
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 +13 -13
- package/build/lowcode/assets-dev.json +4 -4
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +59 -16
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +62 -19
- 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/ExportImport/components/ExportFile/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.js +30 -26
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +3 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.js +25 -21
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.js +34 -31
- package/es/components/table/Actions/component/ExportImport/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/index.js +32 -25
- package/es/components/table/BasicTable/index.js +5 -3
- 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.d.ts +2 -2
- package/es/components/table/Table/index.js +68 -42
- package/es/components/table/Table/index.less +3 -0
- package/es/components/table/Table/utils.d.ts +14 -2
- package/es/components/table/Table/utils.js +6 -2
- package/es/components/table/View/index.d.ts +2 -2
- package/es/components/table/View/index.js +27 -16
- package/es/components/table/hooks/useGenScroll.js +1 -1
- package/es/components/table/hooks/useTableSetting.js +29 -7
- package/es/components/table/hooks/useTransDataSource.d.ts +1 -0
- package/es/components/table/hooks/useTransDataSource.js +8 -6
- package/es/components/table/index.js +7 -5
- package/es/components/table/index.less +9 -0
- package/es/components/table/serve.d.ts +1 -0
- package/es/components/table/serve.js +38 -7
- package/es/components/table/types.d.ts +2 -0
- 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/ExportImport/components/ExportFile/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.js +6 -2
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +2 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.js +6 -2
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.js +4 -2
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/index.js +13 -8
- package/lib/components/table/BasicTable/index.js +2 -3
- 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.d.ts +2 -2
- package/lib/components/table/Table/index.js +61 -34
- package/lib/components/table/Table/index.less +3 -0
- package/lib/components/table/Table/utils.d.ts +14 -2
- package/lib/components/table/Table/utils.js +7 -1
- package/lib/components/table/View/index.d.ts +2 -2
- package/lib/components/table/View/index.js +28 -19
- package/lib/components/table/hooks/useGenScroll.js +1 -1
- package/lib/components/table/hooks/useTableSetting.js +26 -11
- package/lib/components/table/hooks/useTransDataSource.d.ts +1 -0
- package/lib/components/table/hooks/useTransDataSource.js +6 -5
- package/lib/components/table/index.js +4 -4
- package/lib/components/table/index.less +9 -0
- package/lib/components/table/serve.d.ts +1 -0
- package/lib/components/table/serve.js +24 -4
- package/lib/components/table/types.d.ts +2 -0
- 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 +1 -1
- 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
|
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,36 @@
|
|
|
1
|
+
var _excluded = ["options"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import React, { useMemo } from "react";
|
|
6
|
+
import classNames from "classnames";
|
|
7
|
+
import "./index.less";
|
|
8
|
+
/**
|
|
9
|
+
* @title: 系统级别的下拉框
|
|
10
|
+
* @description:
|
|
11
|
+
* @param {BrowserSelectProps} props
|
|
12
|
+
* @return {*}
|
|
13
|
+
* @Author: zhiwei.Wang
|
|
14
|
+
* @Date: 2024-01-30 16:43
|
|
15
|
+
*/
|
|
16
|
+
var BrowserSelect = function BrowserSelect(props) {
|
|
17
|
+
var options = props.options,
|
|
18
|
+
resetProps = _objectWithoutProperties(props, _excluded);
|
|
19
|
+
var _options = useMemo(function () {
|
|
20
|
+
return (props.options || []).map(function (d) {
|
|
21
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
22
|
+
value: d.value,
|
|
23
|
+
key: d.value
|
|
24
|
+
}, d.label);
|
|
25
|
+
});
|
|
26
|
+
}, [props.options]);
|
|
27
|
+
return /*#__PURE__*/React.createElement("select", _extends({}, resetProps, {
|
|
28
|
+
className: classNames("date-picker-pisell-browser-select", resetProps.className),
|
|
29
|
+
onChange: function onChange(e) {
|
|
30
|
+
var _resetProps$onChange;
|
|
31
|
+
e.persist();
|
|
32
|
+
(_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 ? void 0 : _resetProps$onChange.call(resetProps, e);
|
|
33
|
+
}
|
|
34
|
+
}), _options);
|
|
35
|
+
};
|
|
36
|
+
export 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,76 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { getText } from "../../locales";
|
|
3
|
+
export var presetDetailMap = {
|
|
4
|
+
today: {
|
|
5
|
+
getValue: function getValue() {
|
|
6
|
+
return dayjs().startOf('day');
|
|
7
|
+
},
|
|
8
|
+
label: function label() {
|
|
9
|
+
return getText('date-picker-today');
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
yesterday: {
|
|
13
|
+
getValue: function getValue() {
|
|
14
|
+
return dayjs().add(-1, 'd').startOf('day');
|
|
15
|
+
},
|
|
16
|
+
label: function label() {
|
|
17
|
+
return getText('date-picker-yesterday');
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
tomorrow: {
|
|
21
|
+
getValue: function getValue() {
|
|
22
|
+
return dayjs().add(1, 'd').startOf('day');
|
|
23
|
+
},
|
|
24
|
+
label: function label() {
|
|
25
|
+
return getText('date-picker-tomorrow');
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
next_monday: {
|
|
29
|
+
getValue: function getValue() {
|
|
30
|
+
return dayjs().startOf('week').add(8, 'day').startOf('day');
|
|
31
|
+
},
|
|
32
|
+
label: function label() {
|
|
33
|
+
return getText('date-picker-next_monday');
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
last_friday: {
|
|
37
|
+
getValue: function getValue() {
|
|
38
|
+
return dayjs().subtract(1, 'week').startOf('week').add(5, 'day').startOf('day');
|
|
39
|
+
},
|
|
40
|
+
label: function label() {
|
|
41
|
+
return getText('date-picker-last_friday');
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
first_day_of_this_month: {
|
|
45
|
+
getValue: function getValue() {
|
|
46
|
+
return dayjs().startOf('month').startOf('day');
|
|
47
|
+
},
|
|
48
|
+
label: function label() {
|
|
49
|
+
return getText('date-picker-first_day_of_this_month');
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
last_day_of_this_month: {
|
|
53
|
+
getValue: function getValue() {
|
|
54
|
+
return dayjs().endOf('month').startOf('day');
|
|
55
|
+
},
|
|
56
|
+
label: function label() {
|
|
57
|
+
return getText('date-picker-last_day_of_this_month');
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
first_day_of_next_month: {
|
|
61
|
+
getValue: function getValue() {
|
|
62
|
+
return dayjs().endOf('month').add(1, 'day').startOf('day');
|
|
63
|
+
},
|
|
64
|
+
label: function label() {
|
|
65
|
+
return getText('date-picker-first_day_of_next_month');
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
last_day_of_last_month: {
|
|
69
|
+
getValue: function getValue() {
|
|
70
|
+
return dayjs().startOf('month').subtract(1, 'day').startOf('day');
|
|
71
|
+
},
|
|
72
|
+
label: function label() {
|
|
73
|
+
return getText('date-picker-last_day_of_last_month');
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
@@ -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;
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["picker", "onChange", "value", "format", "defaultValue", "showTime"];
|
|
3
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
|
+
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
16
|
+
import dayjs from 'dayjs';
|
|
17
|
+
import classNames from 'classnames';
|
|
18
|
+
import { Button, ConfigProvider, DatePicker, Drawer, Input, Modal } from 'antd';
|
|
19
|
+
import BrowserSelect from "../browserSelect";
|
|
20
|
+
import { isFunction } from '@pisell/utils';
|
|
21
|
+
import { presetDetailMap } from "./constants";
|
|
22
|
+
import { getText } from "../../locales";
|
|
23
|
+
import useResponsive, { configResponsive } from "../../hooks/useResponsive";
|
|
24
|
+
import "./index.less";
|
|
25
|
+
var isValidDate = function isValidDate(dateString, format) {
|
|
26
|
+
var date = window.dayjs(dateString, format, true);
|
|
27
|
+
return date.isValid();
|
|
28
|
+
};
|
|
29
|
+
configResponsive({
|
|
30
|
+
phone: 0,
|
|
31
|
+
ipad: 768,
|
|
32
|
+
pc: 1080
|
|
33
|
+
});
|
|
34
|
+
var DatePickerCpt = function DatePickerCpt(props) {
|
|
35
|
+
var picker = props.picker,
|
|
36
|
+
onChange = props.onChange,
|
|
37
|
+
value = props.value,
|
|
38
|
+
propsFormat = props.format,
|
|
39
|
+
defaultValue = props.defaultValue,
|
|
40
|
+
showTime = props.showTime,
|
|
41
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
42
|
+
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
43
|
+
locale = _useContext.locale;
|
|
44
|
+
var _useState = useState(''),
|
|
45
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
+
currentShortcut = _useState2[0],
|
|
47
|
+
setCurrentShortcut = _useState2[1];
|
|
48
|
+
var _useState3 = useState(false),
|
|
49
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
50
|
+
open = _useState4[0],
|
|
51
|
+
setOpen = _useState4[1];
|
|
52
|
+
var _useState5 = useState(false),
|
|
53
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
54
|
+
popupOpen = _useState6[0],
|
|
55
|
+
setPopupOpen = _useState6[1];
|
|
56
|
+
var _useState7 = useState(value),
|
|
57
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
58
|
+
_value = _useState8[0],
|
|
59
|
+
setValue = _useState8[1];
|
|
60
|
+
var _useState9 = useState(''),
|
|
61
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
62
|
+
valueStr = _useState10[0],
|
|
63
|
+
setValueStr = _useState10[1];
|
|
64
|
+
var _useState11 = useState(false),
|
|
65
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
66
|
+
error = _useState12[0],
|
|
67
|
+
setError = _useState12[1];
|
|
68
|
+
var ref = useRef(null);
|
|
69
|
+
var panelRef = useRef(null);
|
|
70
|
+
var canClose = useRef(true);
|
|
71
|
+
var _useState13 = useState(0),
|
|
72
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
73
|
+
panelTimeWidth = _useState14[0],
|
|
74
|
+
setPanelTimeWidth = _useState14[1];
|
|
75
|
+
|
|
76
|
+
// const isDesktop = useMediaQuery('@media (pointer: fine)');
|
|
77
|
+
|
|
78
|
+
var responsive = useResponsive();
|
|
79
|
+
var isDesktop = !('ontouchstart' in window || navigator.maxTouchPoints);
|
|
80
|
+
useEffect(function () {
|
|
81
|
+
document.body.id = 'body';
|
|
82
|
+
}, []);
|
|
83
|
+
useEffect(function () {
|
|
84
|
+
setValue(value);
|
|
85
|
+
}, [value]);
|
|
86
|
+
useEffect(function () {
|
|
87
|
+
setValueStr((_value === null || _value === void 0 ? void 0 : _value.format(format || 'YYYY-MM-DD')) || '');
|
|
88
|
+
}, [_value]);
|
|
89
|
+
var customPresetItems = useMemo(function () {
|
|
90
|
+
var preset = [{
|
|
91
|
+
label: presetDetailMap['today'].label(),
|
|
92
|
+
value: 'today'
|
|
93
|
+
}, {
|
|
94
|
+
label: presetDetailMap['yesterday'].label(),
|
|
95
|
+
value: 'yesterday'
|
|
96
|
+
}, {
|
|
97
|
+
label: presetDetailMap['tomorrow'].label(),
|
|
98
|
+
value: 'tomorrow'
|
|
99
|
+
}, {
|
|
100
|
+
label: presetDetailMap['next_monday'].label(),
|
|
101
|
+
value: 'next_monday'
|
|
102
|
+
}, {
|
|
103
|
+
label: presetDetailMap['last_friday'].label(),
|
|
104
|
+
value: 'last_friday'
|
|
105
|
+
}, {
|
|
106
|
+
label: presetDetailMap['first_day_of_this_month'].label(),
|
|
107
|
+
value: 'first_day_of_this_month'
|
|
108
|
+
}, {
|
|
109
|
+
label: presetDetailMap['last_day_of_this_month'].label(),
|
|
110
|
+
value: 'last_day_of_this_month'
|
|
111
|
+
}, {
|
|
112
|
+
label: presetDetailMap['first_day_of_next_month'].label(),
|
|
113
|
+
value: 'first_day_of_next_month'
|
|
114
|
+
}, {
|
|
115
|
+
label: presetDetailMap['last_day_of_last_month'].label(),
|
|
116
|
+
value: 'last_day_of_last_month'
|
|
117
|
+
}];
|
|
118
|
+
if (!currentShortcut) {
|
|
119
|
+
preset.push({
|
|
120
|
+
label: getText('date-picker-shortcut-custom'),
|
|
121
|
+
value: 'custom'
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
return preset;
|
|
125
|
+
}, [currentShortcut]);
|
|
126
|
+
var format = useMemo(function () {
|
|
127
|
+
if (propsFormat) {
|
|
128
|
+
if (isFunction(propsFormat)) {
|
|
129
|
+
return propsFormat(value);
|
|
130
|
+
}
|
|
131
|
+
return propsFormat;
|
|
132
|
+
}
|
|
133
|
+
var localeValue = locale === null || locale === void 0 ? void 0 : locale.locale;
|
|
134
|
+
return localeValue === 'en' || localeValue === 'en-US' ? 'DD/MM/YYYY' : 'YYYY/MM/DD';
|
|
135
|
+
}, [propsFormat, locale]);
|
|
136
|
+
var handleSelectChange = function handleSelectChange(e) {
|
|
137
|
+
var _presetDetailMap;
|
|
138
|
+
canClose.current = true;
|
|
139
|
+
var shortcut = e.target.value;
|
|
140
|
+
setCurrentShortcut(shortcut);
|
|
141
|
+
var date = (_presetDetailMap = presetDetailMap[shortcut]) === null || _presetDetailMap === void 0 ? void 0 : _presetDetailMap.getValue();
|
|
142
|
+
setValue(date);
|
|
143
|
+
handleOk(date);
|
|
144
|
+
};
|
|
145
|
+
var handleTodayClick = function handleTodayClick() {
|
|
146
|
+
var val = dayjs().startOf('day');
|
|
147
|
+
handleChange(val);
|
|
148
|
+
handleOpenChange(false);
|
|
149
|
+
};
|
|
150
|
+
var handleOpenChange = function handleOpenChange(visible) {
|
|
151
|
+
if (!visible) {
|
|
152
|
+
setOpen(visible);
|
|
153
|
+
setTimeout(function () {
|
|
154
|
+
var _ref$current;
|
|
155
|
+
setPopupOpen(visible);
|
|
156
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.blur();
|
|
157
|
+
});
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
setOpen(visible);
|
|
161
|
+
setPopupOpen(visible);
|
|
162
|
+
};
|
|
163
|
+
var handleOk = function handleOk(val) {
|
|
164
|
+
var returnValue = val || _value;
|
|
165
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(returnValue, returnValue === null || returnValue === void 0 ? void 0 : returnValue.format('YYYY-MM-DD'));
|
|
166
|
+
handleOpenChange(false);
|
|
167
|
+
};
|
|
168
|
+
var handleChange = function handleChange(val, valStr, isNotChange) {
|
|
169
|
+
if (!showTime) {
|
|
170
|
+
canClose.current = true;
|
|
171
|
+
}
|
|
172
|
+
setError(false);
|
|
173
|
+
setCurrentShortcut('');
|
|
174
|
+
setValue(val);
|
|
175
|
+
if (!isNotChange) {
|
|
176
|
+
handleOk(val);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
var handleApply = function handleApply() {
|
|
180
|
+
if (error) return;
|
|
181
|
+
handleOk();
|
|
182
|
+
};
|
|
183
|
+
var handleDataStrChange = function handleDataStrChange(e) {
|
|
184
|
+
var val = e.target.value;
|
|
185
|
+
setValueStr(val);
|
|
186
|
+
if (isValidDate(val, format)) {
|
|
187
|
+
setError(false);
|
|
188
|
+
var valDate = dayjs(val, format);
|
|
189
|
+
setValue(valDate);
|
|
190
|
+
} else {
|
|
191
|
+
setError(true);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
useEffect(function () {
|
|
195
|
+
var _panelRef$current;
|
|
196
|
+
var width = 0;
|
|
197
|
+
var childElements = ((_panelRef$current = panelRef.current) === null || _panelRef$current === void 0 ? void 0 : _panelRef$current.getElementsByClassName('pisell-lowcode-picker-time-panel')) || [];
|
|
198
|
+
if (childElements.length > 0) {
|
|
199
|
+
var childElement = childElements[0];
|
|
200
|
+
width = childElement.offsetWidth;
|
|
201
|
+
}
|
|
202
|
+
if (width > 0) {
|
|
203
|
+
setPanelTimeWidth(width);
|
|
204
|
+
}
|
|
205
|
+
}, [open]);
|
|
206
|
+
var handleSelect = function handleSelect(val) {
|
|
207
|
+
canClose.current = !showTime;
|
|
208
|
+
setValue(val);
|
|
209
|
+
};
|
|
210
|
+
var handleTimeChange = function handleTimeChange(val) {
|
|
211
|
+
setValue(function (preVal) {
|
|
212
|
+
var _preVal$set, _preVal$set$set;
|
|
213
|
+
return (preVal === null || preVal === void 0 ? void 0 : (_preVal$set = preVal.set('hour', (val === null || val === void 0 ? void 0 : val.get('hour')) || 0)) === null || _preVal$set === void 0 ? void 0 : (_preVal$set$set = _preVal$set.set('minute', (val === null || val === void 0 ? void 0 : val.get('minute')) || 0)) === null || _preVal$set$set === void 0 ? void 0 : _preVal$set$set.set('second', (val === null || val === void 0 ? void 0 : val.get('second')) || 0)) || null;
|
|
214
|
+
});
|
|
215
|
+
};
|
|
216
|
+
var timeInputProps = useMemo(function () {
|
|
217
|
+
var step = 1;
|
|
218
|
+
var _format = '';
|
|
219
|
+
if ((showTime === null || showTime === void 0 ? void 0 : showTime.format) === 'HH:mm') {
|
|
220
|
+
step = undefined;
|
|
221
|
+
_format = 'HH:mm';
|
|
222
|
+
} else if ((showTime === null || showTime === void 0 ? void 0 : showTime.format) === 'HH:mm:ss' || showTime) {
|
|
223
|
+
step = 1;
|
|
224
|
+
_format = 'HH:mm:ss';
|
|
225
|
+
}
|
|
226
|
+
return {
|
|
227
|
+
step: step,
|
|
228
|
+
onChange: function onChange(e) {
|
|
229
|
+
var val = e.target.value;
|
|
230
|
+
handleTimeChange(window.dayjs(val, _format));
|
|
231
|
+
},
|
|
232
|
+
value: _value === null || _value === void 0 ? void 0 : _value.format(_format)
|
|
233
|
+
};
|
|
234
|
+
}, [showTime, _value]);
|
|
235
|
+
if (!picker || picker === 'date') {
|
|
236
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DatePicker, _extends({}, others, {
|
|
237
|
+
ref: ref,
|
|
238
|
+
onSelect: handleSelect,
|
|
239
|
+
showTime: isDesktop ? showTime : false,
|
|
240
|
+
defaultValue: defaultValue,
|
|
241
|
+
showNow: false,
|
|
242
|
+
onChange: function onChange(val, valStr) {
|
|
243
|
+
return handleChange(val, valStr, !isDesktop && showTime);
|
|
244
|
+
},
|
|
245
|
+
open: popupOpen,
|
|
246
|
+
renderExtraFooter: !(!showTime || isDesktop) ? function () {
|
|
247
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
248
|
+
onMouseDown: function onMouseDown(e) {
|
|
249
|
+
canClose.current = false;
|
|
250
|
+
e.stopPropagation();
|
|
251
|
+
}
|
|
252
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
253
|
+
className: "date-picker-time-label"
|
|
254
|
+
}, "Time"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("input", _extends({
|
|
255
|
+
type: "time",
|
|
256
|
+
className: "date-picker-input-time"
|
|
257
|
+
}, timeInputProps))));
|
|
258
|
+
} : undefined,
|
|
259
|
+
className: classNames('pisell-lowcode-mode-date-picker', others.className),
|
|
260
|
+
value: _value,
|
|
261
|
+
onOpenChange: function onOpenChange(o) {
|
|
262
|
+
if (!o && (!canClose.current || showTime)) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
handleOpenChange(o);
|
|
266
|
+
},
|
|
267
|
+
mode: "date",
|
|
268
|
+
picker: "date",
|
|
269
|
+
popupClassName: "date-picker-popup-wrap",
|
|
270
|
+
format: currentShortcut ? function () {
|
|
271
|
+
return presetDetailMap[currentShortcut].label();
|
|
272
|
+
} : format,
|
|
273
|
+
panelRender: function panelRender(panelNode) {
|
|
274
|
+
var dom = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
275
|
+
className: classNames('pisell-lowcode-date-picker-custom-wrap', _defineProperty({}, 'pisell-lowcode-date-picker-custom-wrap-show-time', showTime)),
|
|
276
|
+
ref: panelRef
|
|
277
|
+
}, !showTime && /*#__PURE__*/React.createElement("div", {
|
|
278
|
+
className: "pisell-lowcode-date-picker-custom-action",
|
|
279
|
+
onMouseDown: function onMouseDown(e) {
|
|
280
|
+
canClose.current = false;
|
|
281
|
+
e.stopPropagation();
|
|
282
|
+
},
|
|
283
|
+
style: {
|
|
284
|
+
width: "calc(100% - 48px - ".concat(panelTimeWidth, "px)")
|
|
285
|
+
}
|
|
286
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
287
|
+
style: {
|
|
288
|
+
width: '50%'
|
|
289
|
+
}
|
|
290
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
291
|
+
size: "large",
|
|
292
|
+
placeholder: dayjs().format(format || 'YYYY-MM-DD'),
|
|
293
|
+
value: valueStr,
|
|
294
|
+
onChange: handleDataStrChange
|
|
295
|
+
}), error && /*#__PURE__*/React.createElement("span", {
|
|
296
|
+
className: "date-picker-error"
|
|
297
|
+
}, getText('date-picker-invalid-date'))), /*#__PURE__*/React.createElement(BrowserSelect
|
|
298
|
+
// @ts-ignore
|
|
299
|
+
, {
|
|
300
|
+
value: currentShortcut || 'custom',
|
|
301
|
+
className: "date-picker-toolbar-select",
|
|
302
|
+
options: customPresetItems
|
|
303
|
+
// @ts-ignore
|
|
304
|
+
,
|
|
305
|
+
size: 'large',
|
|
306
|
+
onChange: handleSelectChange,
|
|
307
|
+
style: {
|
|
308
|
+
width: '50%'
|
|
309
|
+
}
|
|
310
|
+
})), panelNode), /*#__PURE__*/React.createElement("div", {
|
|
311
|
+
className: "pisell-lowcode-custom-footer"
|
|
312
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
313
|
+
className: "pisell-lowcode-custom-footer-today",
|
|
314
|
+
onClick: handleTodayClick
|
|
315
|
+
}, getText('date-picker-today')), /*#__PURE__*/React.createElement(Button, {
|
|
316
|
+
type: "primary",
|
|
317
|
+
size: "large",
|
|
318
|
+
onClick: handleApply
|
|
319
|
+
}, getText('date-picker-apply'))));
|
|
320
|
+
if (isDesktop) {
|
|
321
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
322
|
+
className: "pisell-lowcode-date-picker-custom-popup-wrap pisell-lowcode-date-picker-dropdown-mode"
|
|
323
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
324
|
+
className: "pisell-lowcode-date-picker-custom-wrap"
|
|
325
|
+
}, dom));
|
|
326
|
+
}
|
|
327
|
+
if (responsive === 'phone') {
|
|
328
|
+
return /*#__PURE__*/React.createElement(Drawer, {
|
|
329
|
+
placement: "bottom",
|
|
330
|
+
open: open,
|
|
331
|
+
height: "auto",
|
|
332
|
+
closable: false,
|
|
333
|
+
styles: {
|
|
334
|
+
content: {
|
|
335
|
+
borderRadius: '8px 8px 0 0'
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
bodyStyle: {
|
|
339
|
+
padding: 0
|
|
340
|
+
},
|
|
341
|
+
maskClosable: false
|
|
342
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
343
|
+
className: "pisell-lowcode-picker-custom-dropdown pisell-lowcode-date-picker-custom-popup-wrap",
|
|
344
|
+
onMouseDown: function onMouseDown(e) {
|
|
345
|
+
return e.stopPropagation();
|
|
346
|
+
}
|
|
347
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
348
|
+
className: "pisell-lowcode-picker-panel-container pisell-lowcode-picker-date-panel-container"
|
|
349
|
+
}, dom)));
|
|
350
|
+
}
|
|
351
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
352
|
+
width: 458,
|
|
353
|
+
open: open,
|
|
354
|
+
footer: null,
|
|
355
|
+
closable: false,
|
|
356
|
+
wrapClassName: 'pisell-lowcode-date-picker-modal'
|
|
357
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
358
|
+
className: "pisell-lowcode-picker-custom-dropdown pisell-lowcode-date-picker-custom-popup-wrap",
|
|
359
|
+
onMouseDown: function onMouseDown(e) {
|
|
360
|
+
return e.stopPropagation();
|
|
361
|
+
}
|
|
362
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
363
|
+
className: "pisell-lowcode-picker-panel-container pisell-lowcode-picker-date-panel-container"
|
|
364
|
+
}, dom)));
|
|
365
|
+
}
|
|
366
|
+
})));
|
|
367
|
+
}
|
|
368
|
+
return /*#__PURE__*/React.createElement(DatePicker, props);
|
|
369
|
+
};
|
|
370
|
+
export default DatePickerCpt;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { useEffect, useState } from 'react';
|
|
8
|
+
var useMediaQuery = function useMediaQuery(query) {
|
|
9
|
+
var _useState = useState(false),
|
|
10
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11
|
+
matches = _useState2[0],
|
|
12
|
+
setMatches = _useState2[1];
|
|
13
|
+
useEffect(function () {
|
|
14
|
+
var mediaQuery = window.matchMedia(query);
|
|
15
|
+
if (mediaQuery.matches !== matches) {
|
|
16
|
+
setMatches(mediaQuery.matches);
|
|
17
|
+
}
|
|
18
|
+
var handleMediaQueryChange = function handleMediaQueryChange(event) {
|
|
19
|
+
setMatches(event.matches);
|
|
20
|
+
};
|
|
21
|
+
mediaQuery.addEventListener('change', handleMediaQueryChange);
|
|
22
|
+
return function () {
|
|
23
|
+
mediaQuery.removeEventListener('change', handleMediaQueryChange);
|
|
24
|
+
};
|
|
25
|
+
}, [query]);
|
|
26
|
+
return matches;
|
|
27
|
+
};
|
|
28
|
+
export default useMediaQuery;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { DatePicker as OriginalDatePicker } from 'antd';
|
|
2
1
|
import { withMomentProps } from "../../utils/hoc";
|
|
3
2
|
import dayjs from 'dayjs';
|
|
4
3
|
import { RangePicker, OldPisellDateRangePicker } from "@pisell/date-picker";
|
|
5
4
|
import localeData from 'dayjs/plugin/localeData';
|
|
6
5
|
import weekday from 'dayjs/plugin/weekday';
|
|
6
|
+
import DatePickerCpt from "./datePickerCpt";
|
|
7
7
|
dayjs.extend(weekday);
|
|
8
8
|
dayjs.extend(localeData);
|
|
9
9
|
|
|
10
10
|
// const OriginalRangePicker = OriginalDatePicker.RangePicker;
|
|
11
11
|
|
|
12
|
-
var DatePicker = withMomentProps(
|
|
12
|
+
var DatePicker = withMomentProps(DatePickerCpt, ['defaultPickerValue', 'defaultValue', 'showTime.defaultValue', 'value']);
|
|
13
13
|
|
|
14
14
|
// const RangePicker = withMomentProps(OriginalRangePicker, [
|
|
15
15
|
// 'defaultPickerValue',
|