@pisell/materials 2.2.9 → 2.2.11
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 +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +19 -19
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +19 -19
- package/es/components/Pagination/index.d.ts +1 -1
- package/es/components/date-picker/index.js +2 -1
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +4 -1
- package/es/components/drag-sort-tree/TreeItem/index.js +45 -31
- package/es/components/drag-sort-tree/TreeItem/index.less +44 -12
- package/es/components/drag-sort-tree/index.d.ts +1 -0
- package/es/components/drag-sort-tree/index.js +41 -18
- package/es/components/drag-sort-tree/index.less +4 -0
- package/es/components/drag-sort-tree/types.d.ts +5 -1
- package/es/components/table/Table/fields/index.d.ts +31 -0
- package/es/components/table/Table/fields/index.js +5 -2
- package/es/components/table/Table/fields/oldRangePicker/Config/index.d.ts +3 -0
- package/es/components/table/Table/fields/oldRangePicker/Config/index.js +5 -0
- package/es/components/table/Table/fields/oldRangePicker/Edit/index.d.ts +4 -0
- package/es/components/table/Table/fields/oldRangePicker/Edit/index.js +106 -0
- package/es/components/table/Table/fields/oldRangePicker/Show/index.d.ts +4 -0
- package/es/components/table/Table/fields/oldRangePicker/Show/index.js +17 -0
- package/es/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +3 -0
- package/es/components/table/Table/fields/oldRangePicker/Sort/index.js +5 -0
- package/es/components/table/Table/fields/oldRangePicker/filterUtil/index.d.ts +13 -0
- package/es/components/table/Table/fields/oldRangePicker/filterUtil/index.js +50 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +16 -0
- package/es/components/table/Table/fields/oldRangePicker/index.js +19 -0
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +2 -1
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +2 -1
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +2 -1
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/date-picker/index.js +1 -0
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +4 -1
- package/lib/components/drag-sort-tree/TreeItem/index.js +86 -29
- package/lib/components/drag-sort-tree/TreeItem/index.less +44 -12
- package/lib/components/drag-sort-tree/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/index.js +29 -13
- package/lib/components/drag-sort-tree/index.less +4 -0
- package/lib/components/drag-sort-tree/types.d.ts +5 -1
- package/lib/components/table/Table/fields/index.d.ts +31 -0
- package/lib/components/table/Table/fields/index.js +5 -2
- package/lib/components/table/Table/fields/oldRangePicker/Config/index.d.ts +3 -0
- package/lib/components/table/Table/fields/oldRangePicker/Config/index.js +39 -0
- package/lib/components/table/Table/fields/oldRangePicker/Edit/index.d.ts +4 -0
- package/lib/components/table/Table/fields/oldRangePicker/Edit/index.js +131 -0
- package/lib/components/table/Table/fields/oldRangePicker/Show/index.d.ts +4 -0
- package/lib/components/table/Table/fields/oldRangePicker/Show/index.js +48 -0
- package/lib/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +3 -0
- package/lib/components/table/Table/fields/oldRangePicker/Sort/index.js +39 -0
- package/lib/components/table/Table/fields/oldRangePicker/filterUtil/index.d.ts +13 -0
- package/lib/components/table/Table/fields/oldRangePicker/filterUtil/index.js +61 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +16 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.js +53 -0
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +2 -1
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +2 -1
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +2 -1
- package/lowcode/date-picker.old-range-picker/__screenshots__/date-picker-range-picker-1.png +0 -0
- package/lowcode/date-picker.old-range-picker/__screenshots__/date-picker-range-picker-2.png +0 -0
- package/lowcode/date-picker.old-range-picker/__screenshots__/date-picker-range-picker-3.png +0 -0
- package/lowcode/date-picker.old-range-picker/__screenshots__/date-picker-range-picker-4.png +0 -0
- package/lowcode/date-picker.old-range-picker/meta.ts +305 -0
- package/lowcode/date-picker.old-range-picker/snippets.ts +11 -0
- package/lowcode/date-picker.range-picker/meta.ts +20 -0
- package/lowcode/drag-sort-tree/meta.ts +10 -1
- package/lowcode/table/meta.ts +4 -0
- package/package.json +3 -3
- 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
|
@@ -0,0 +1,39 @@
|
|
|
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/table/Table/fields/oldRangePicker/Config/index.tsx
|
|
30
|
+
var Config_exports = {};
|
|
31
|
+
__export(Config_exports, {
|
|
32
|
+
default: () => Config_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Config_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var Config = () => {
|
|
37
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null);
|
|
38
|
+
};
|
|
39
|
+
var Config_default = Config;
|
|
@@ -0,0 +1,131 @@
|
|
|
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/table/Table/fields/oldRangePicker/Edit/index.tsx
|
|
30
|
+
var Edit_exports = {};
|
|
31
|
+
__export(Edit_exports, {
|
|
32
|
+
default: () => Edit_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Edit_exports);
|
|
35
|
+
var import_utils = require("@pisell/utils");
|
|
36
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_date_picker = __toESM(require("../../../../../date-picker"));
|
|
39
|
+
var import_locales = require("../../../../../../locales");
|
|
40
|
+
var { OldRangePicker: RangePicker } = import_date_picker.default;
|
|
41
|
+
var defaultFormat = "YYYY-MM-DD HH:mm:ss";
|
|
42
|
+
var Edit = (props, ref) => {
|
|
43
|
+
const {
|
|
44
|
+
value,
|
|
45
|
+
onChange,
|
|
46
|
+
onPressEnter,
|
|
47
|
+
onBlur,
|
|
48
|
+
style,
|
|
49
|
+
bordered,
|
|
50
|
+
presets,
|
|
51
|
+
showTime,
|
|
52
|
+
format,
|
|
53
|
+
...others
|
|
54
|
+
} = props;
|
|
55
|
+
const dayjsVal = (0, import_react.useMemo)(() => {
|
|
56
|
+
if ((0, import_utils.isString)(value)) {
|
|
57
|
+
return (0, import_dayjs.default)(value);
|
|
58
|
+
}
|
|
59
|
+
if ((0, import_utils.isArr)(value)) {
|
|
60
|
+
if (value.some((item) => !item)) {
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
return value.map((item) => (0, import_dayjs.default)(item));
|
|
64
|
+
}
|
|
65
|
+
return value;
|
|
66
|
+
}, [value]);
|
|
67
|
+
const rangePresets = [
|
|
68
|
+
{ label: (0, import_locales.getText)("table-action-range-picker-presets-today"), value: [(0, import_dayjs.default)().startOf("day"), (0, import_dayjs.default)().endOf("day")] },
|
|
69
|
+
{
|
|
70
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-yesterday"),
|
|
71
|
+
value: [
|
|
72
|
+
(0, import_dayjs.default)().add(-1, "d").startOf("day"),
|
|
73
|
+
(0, import_dayjs.default)().add(-1, "d").endOf("day")
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-3-day"),
|
|
78
|
+
value: [(0, import_dayjs.default)().add(-3, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-7-day"),
|
|
82
|
+
value: [(0, import_dayjs.default)().add(-7, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-14-day"),
|
|
86
|
+
value: [(0, import_dayjs.default)().add(-14, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-30-day"),
|
|
90
|
+
value: [(0, import_dayjs.default)().add(-30, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-90-day"),
|
|
94
|
+
value: [(0, import_dayjs.default)().add(-90, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
95
|
+
}
|
|
96
|
+
];
|
|
97
|
+
const _showTime = (0, import_react.useMemo)(() => {
|
|
98
|
+
if ((0, import_utils.isBoolean)(showTime)) {
|
|
99
|
+
return showTime;
|
|
100
|
+
} else if (typeof showTime === "object") {
|
|
101
|
+
return showTime;
|
|
102
|
+
}
|
|
103
|
+
return true;
|
|
104
|
+
}, [showTime]);
|
|
105
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
106
|
+
RangePicker,
|
|
107
|
+
{
|
|
108
|
+
...others,
|
|
109
|
+
format,
|
|
110
|
+
showTime: _showTime,
|
|
111
|
+
presets: presets || rangePresets,
|
|
112
|
+
ref,
|
|
113
|
+
value: dayjsVal,
|
|
114
|
+
onChange: (date) => {
|
|
115
|
+
onChange == null ? void 0 : onChange(date == null ? void 0 : date.map((item) => {
|
|
116
|
+
var _a;
|
|
117
|
+
return ((_a = item == null ? void 0 : item.format) == null ? void 0 : _a.call(item, defaultFormat)) || null;
|
|
118
|
+
}));
|
|
119
|
+
},
|
|
120
|
+
onPressEnter,
|
|
121
|
+
onBlur,
|
|
122
|
+
style: { width: "220px", ...style },
|
|
123
|
+
bordered,
|
|
124
|
+
onClick: (e) => e.stopPropagation(),
|
|
125
|
+
panelRender: (dom) => {
|
|
126
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { onClick: (e) => e.stopPropagation() }, dom);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
};
|
|
131
|
+
var Edit_default = (0, import_react.forwardRef)(Edit);
|
|
@@ -0,0 +1,48 @@
|
|
|
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/table/Table/fields/oldRangePicker/Show/index.tsx
|
|
30
|
+
var Show_exports = {};
|
|
31
|
+
__export(Show_exports, {
|
|
32
|
+
default: () => Show_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Show_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var Show = (props) => {
|
|
37
|
+
const {
|
|
38
|
+
title,
|
|
39
|
+
editable,
|
|
40
|
+
dataIndex,
|
|
41
|
+
field_type,
|
|
42
|
+
record,
|
|
43
|
+
handleSave,
|
|
44
|
+
...restProps
|
|
45
|
+
} = props;
|
|
46
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, record[dataIndex]);
|
|
47
|
+
};
|
|
48
|
+
var Show_default = Show;
|
|
@@ -0,0 +1,39 @@
|
|
|
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/table/Table/fields/oldRangePicker/Sort/index.tsx
|
|
30
|
+
var Sort_exports = {};
|
|
31
|
+
__export(Sort_exports, {
|
|
32
|
+
default: () => Sort_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Sort_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var Sort = () => {
|
|
37
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null);
|
|
38
|
+
};
|
|
39
|
+
var Sort_default = Sort;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Dayjs } from "dayjs";
|
|
2
|
+
/**
|
|
3
|
+
* 判断dataSource日期是否在filters范围内
|
|
4
|
+
* @param value 日期数组
|
|
5
|
+
* @param key 对应日期在对象中的键
|
|
6
|
+
* @param item 包含日期的对象
|
|
7
|
+
* @returns 如果日期在给定范围内返回true,否则返回false
|
|
8
|
+
*/
|
|
9
|
+
export default function ({ value, key, item, }: {
|
|
10
|
+
value: (string | Dayjs)[];
|
|
11
|
+
key: string | string[];
|
|
12
|
+
item: Record<string, any>;
|
|
13
|
+
}): boolean;
|
|
@@ -0,0 +1,61 @@
|
|
|
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/table/Table/fields/oldRangePicker/filterUtil/index.ts
|
|
30
|
+
var filterUtil_exports = {};
|
|
31
|
+
__export(filterUtil_exports, {
|
|
32
|
+
default: () => filterUtil_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(filterUtil_exports);
|
|
35
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_utils2 = require("../../utils");
|
|
38
|
+
function isDateInRange(date, [startDate, endDate]) {
|
|
39
|
+
return date.isSame(startDate) || date.isSame(endDate) || date.isAfter(startDate) && date.isBefore(endDate);
|
|
40
|
+
}
|
|
41
|
+
function filterUtil_default({
|
|
42
|
+
value,
|
|
43
|
+
key,
|
|
44
|
+
item
|
|
45
|
+
}) {
|
|
46
|
+
if (!value)
|
|
47
|
+
return true;
|
|
48
|
+
if ((value == null ? void 0 : value.length) !== 2)
|
|
49
|
+
return true;
|
|
50
|
+
const valueDayjsObj = value.map((item2) => (0, import_dayjs.default)(item2 || ""));
|
|
51
|
+
if (valueDayjsObj.some((item2) => !item2.isValid())) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
const dataValue = (0, import_utils2.getValueByKeys)(item, key);
|
|
55
|
+
if ((0, import_utils.isUndefined)(dataValue))
|
|
56
|
+
return false;
|
|
57
|
+
const dataDayjsObj = (0, import_dayjs.default)(dataValue);
|
|
58
|
+
if (!dataDayjsObj.isValid())
|
|
59
|
+
return false;
|
|
60
|
+
return isDateInRange(dataDayjsObj, valueDayjsObj);
|
|
61
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import filter from "./filterUtil";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
field: {
|
|
5
|
+
field_icon: string;
|
|
6
|
+
field_name: string;
|
|
7
|
+
field_type: string;
|
|
8
|
+
default_value: string;
|
|
9
|
+
};
|
|
10
|
+
config: () => import("react").JSX.Element;
|
|
11
|
+
edit: import("react").ForwardRefExoticComponent<Omit<import("../types").EditPropsType, "ref"> & import("react").RefAttributes<any>>;
|
|
12
|
+
sort: () => import("react").JSX.Element;
|
|
13
|
+
show: (props: import("../types").FieldPropsType) => import("react").JSX.Element;
|
|
14
|
+
filterFn: typeof filter;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,53 @@
|
|
|
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/table/Table/fields/oldRangePicker/index.tsx
|
|
30
|
+
var oldRangePicker_exports = {};
|
|
31
|
+
__export(oldRangePicker_exports, {
|
|
32
|
+
default: () => oldRangePicker_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(oldRangePicker_exports);
|
|
35
|
+
var import_Config = __toESM(require("./Config"));
|
|
36
|
+
var import_Edit = __toESM(require("./Edit"));
|
|
37
|
+
var import_Show = __toESM(require("./Show"));
|
|
38
|
+
var import_Sort = __toESM(require("./Sort"));
|
|
39
|
+
var import_filterUtil = __toESM(require("./filterUtil"));
|
|
40
|
+
var field = {
|
|
41
|
+
field_icon: "pi-a-Property3Singlelinetext",
|
|
42
|
+
field_name: "OldRangePicker",
|
|
43
|
+
field_type: "oldRangePicker",
|
|
44
|
+
default_value: "OldRangePicker"
|
|
45
|
+
};
|
|
46
|
+
var oldRangePicker_default = {
|
|
47
|
+
field,
|
|
48
|
+
config: import_Config.default,
|
|
49
|
+
edit: import_Edit.default,
|
|
50
|
+
sort: import_Sort.default,
|
|
51
|
+
show: import_Show.default,
|
|
52
|
+
filterFn: import_filterUtil.default
|
|
53
|
+
};
|
package/lib/locales/en-US.d.ts
CHANGED
|
@@ -96,5 +96,6 @@ declare const _default: {
|
|
|
96
96
|
'table-action-export-import-log-err-log': string;
|
|
97
97
|
'table-action-export-import-log-copy': string;
|
|
98
98
|
'table-action-export-import-table-success-copy': string;
|
|
99
|
+
'drag-sort-tree-unavailable-today-tip': string;
|
|
99
100
|
};
|
|
100
101
|
export default _default;
|
package/lib/locales/en-US.js
CHANGED
|
@@ -123,5 +123,6 @@ var en_US_default = {
|
|
|
123
123
|
"table-action-export-import-log-detail-title": "Import Details",
|
|
124
124
|
"table-action-export-import-log-err-log": "Failure Log",
|
|
125
125
|
"table-action-export-import-log-copy": "Copy",
|
|
126
|
-
"table-action-export-import-table-success-copy": "Copy Success"
|
|
126
|
+
"table-action-export-import-table-success-copy": "Copy Success",
|
|
127
|
+
"drag-sort-tree-unavailable-today-tip": "Unavailable today"
|
|
127
128
|
};
|
package/lib/locales/zh-CN.d.ts
CHANGED
|
@@ -96,5 +96,6 @@ declare const _default: {
|
|
|
96
96
|
'table-action-export-import-log-err-log': string;
|
|
97
97
|
'table-action-export-import-log-copy': string;
|
|
98
98
|
'table-action-export-import-table-success-copy': string;
|
|
99
|
+
'drag-sort-tree-unavailable-today-tip': string;
|
|
99
100
|
};
|
|
100
101
|
export default _default;
|
package/lib/locales/zh-CN.js
CHANGED
|
@@ -123,5 +123,6 @@ var zh_CN_default = {
|
|
|
123
123
|
"table-action-export-import-log-detail-title": "导入详情",
|
|
124
124
|
"table-action-export-import-log-err-log": "失败日志",
|
|
125
125
|
"table-action-export-import-log-copy": "复制",
|
|
126
|
-
"table-action-export-import-table-success-copy": "复制成功"
|
|
126
|
+
"table-action-export-import-table-success-copy": "复制成功",
|
|
127
|
+
"drag-sort-tree-unavailable-today-tip": "今日不可用"
|
|
127
128
|
};
|
package/lib/locales/zh-TW.d.ts
CHANGED
|
@@ -96,5 +96,6 @@ declare const _default: {
|
|
|
96
96
|
'table-action-export-import-log-err-log': string;
|
|
97
97
|
'table-action-export-import-log-copy': string;
|
|
98
98
|
'table-action-export-import-table-success-copy': string;
|
|
99
|
+
'drag-sort-tree-unavailable-today-tip': string;
|
|
99
100
|
};
|
|
100
101
|
export default _default;
|
package/lib/locales/zh-TW.js
CHANGED
|
@@ -123,5 +123,6 @@ var zh_TW_default = {
|
|
|
123
123
|
"table-action-export-import-log-detail-title": "導入詳情",
|
|
124
124
|
"table-action-export-import-log-err-log": "失敗日誌",
|
|
125
125
|
"table-action-export-import-log-copy": "復製",
|
|
126
|
-
"table-action-export-import-table-success-copy": "復製成功"
|
|
126
|
+
"table-action-export-import-table-success-copy": "復製成功",
|
|
127
|
+
"drag-sort-tree-unavailable-today-tip": "今日不可用"
|
|
127
128
|
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|