@pisell/materials 3.0.13 → 3.0.15
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 +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +20 -20
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +20 -20
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/batch-editor/fields/Image/index.d.ts +7 -0
- package/es/components/batch-editor/fields/Image/index.js +14 -0
- package/es/components/batch-editor/fields/Image/index.less +6 -0
- package/es/components/batch-editor/fields/Price/index.d.ts +7 -0
- package/es/components/batch-editor/fields/Price/index.js +26 -0
- package/es/components/batch-editor/fields/Text/index.d.ts +6 -0
- package/es/components/batch-editor/fields/Text/index.js +8 -0
- package/es/components/batch-editor/fields/index.d.ts +7 -0
- package/es/components/batch-editor/fields/index.js +8 -0
- package/es/components/batch-editor/index.d.ts +11 -0
- package/es/components/batch-editor/index.js +465 -0
- package/es/components/batch-editor/index.less +50 -0
- package/es/components/page/index.js +12 -9
- package/es/components/select-time/RightPanel/index.d.ts +9 -0
- package/es/components/select-time/RightPanel/index.js +45 -0
- package/es/components/select-time/RightPanel/index.less +22 -0
- package/es/components/select-time/index.d.ts +14 -0
- package/es/components/select-time/index.js +115 -0
- package/es/components/select-time/index.less +16 -0
- package/es/components/select-time/utils.d.ts +9 -0
- package/es/components/select-time/utils.js +42 -0
- package/es/components/table/Table/fields/select/filterUtil/index.js +11 -1
- package/es/components/table/hooks/useTransDataSource.js +1 -0
- package/es/components/table/index.js +11 -3
- package/es/components/table/index.less +47 -2
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +18 -0
- package/es/components/virtual-keyboard/Keyboard/index.js +51 -0
- package/es/components/virtual-keyboard/Keyboard/index.less +32 -0
- package/es/components/virtual-keyboard/Time/index.d.ts +13 -0
- package/es/components/virtual-keyboard/Time/index.js +124 -0
- package/es/components/virtual-keyboard/Time/index.less +0 -0
- package/es/components/virtual-keyboard/Time/utils.d.ts +10 -0
- package/es/components/virtual-keyboard/Time/utils.js +153 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +9 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.js +76 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.less +52 -0
- package/es/components/virtual-keyboard/index.d.ts +14 -0
- package/es/components/virtual-keyboard/index.js +85 -0
- package/es/components/virtual-keyboard/index.less +17 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +5 -1
- package/es/locales/en-US.d.ts +14 -0
- package/es/locales/en-US.js +19 -1
- package/es/locales/zh-CN.d.ts +14 -0
- package/es/locales/zh-CN.js +19 -1
- package/es/locales/zh-TW.d.ts +14 -0
- package/es/locales/zh-TW.js +19 -1
- package/lib/components/batch-editor/fields/Image/index.d.ts +7 -0
- package/lib/components/batch-editor/fields/Image/index.js +48 -0
- package/lib/components/batch-editor/fields/Image/index.less +6 -0
- package/lib/components/batch-editor/fields/Price/index.d.ts +7 -0
- package/lib/components/batch-editor/fields/Price/index.js +55 -0
- package/lib/components/batch-editor/fields/Text/index.d.ts +6 -0
- package/lib/components/batch-editor/fields/Text/index.js +40 -0
- package/lib/components/batch-editor/fields/index.d.ts +7 -0
- package/lib/components/batch-editor/fields/index.js +42 -0
- package/lib/components/batch-editor/index.d.ts +11 -0
- package/lib/components/batch-editor/index.js +370 -0
- package/lib/components/batch-editor/index.less +50 -0
- package/lib/components/page/index.js +6 -7
- package/lib/components/select-time/RightPanel/index.d.ts +9 -0
- package/lib/components/select-time/RightPanel/index.js +78 -0
- package/lib/components/select-time/RightPanel/index.less +22 -0
- package/lib/components/select-time/index.d.ts +14 -0
- package/lib/components/select-time/index.js +145 -0
- package/lib/components/select-time/index.less +16 -0
- package/lib/components/select-time/utils.d.ts +9 -0
- package/lib/components/select-time/utils.js +71 -0
- package/lib/components/table/Table/fields/select/filterUtil/index.js +7 -1
- package/lib/components/table/hooks/useTransDataSource.js +1 -0
- package/lib/components/table/index.js +16 -4
- package/lib/components/table/index.less +47 -2
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +18 -0
- package/lib/components/virtual-keyboard/Keyboard/index.js +81 -0
- package/lib/components/virtual-keyboard/Keyboard/index.less +32 -0
- package/lib/components/virtual-keyboard/Time/index.d.ts +13 -0
- package/lib/components/virtual-keyboard/Time/index.js +166 -0
- package/lib/components/virtual-keyboard/Time/index.less +0 -0
- package/lib/components/virtual-keyboard/Time/utils.d.ts +10 -0
- package/lib/components/virtual-keyboard/Time/utils.js +162 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +9 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +90 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.less +52 -0
- package/lib/components/virtual-keyboard/index.d.ts +14 -0
- package/lib/components/virtual-keyboard/index.js +131 -0
- package/lib/components/virtual-keyboard/index.less +17 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +12 -0
- package/lib/locales/en-US.d.ts +14 -0
- package/lib/locales/en-US.js +15 -1
- package/lib/locales/zh-CN.d.ts +14 -0
- package/lib/locales/zh-CN.js +15 -1
- package/lib/locales/zh-TW.d.ts +14 -0
- package/lib/locales/zh-TW.js +15 -1
- package/lowcode/batch-editor/meta.ts +93 -0
- package/lowcode/select-time/meta.ts +8 -8
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.batch-editor-table {
|
|
2
|
+
|
|
3
|
+
:global {
|
|
4
|
+
|
|
5
|
+
// .ant-table-tbody .ant-table-cell {
|
|
6
|
+
// display: flex;
|
|
7
|
+
// align-items: center;
|
|
8
|
+
// }
|
|
9
|
+
.ant-table-cell-with-append {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
height: 95px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.column-title {
|
|
17
|
+
display: flex !important;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
word-wrap: normal !important;
|
|
21
|
+
word-break: normal !important;
|
|
22
|
+
white-space: wrap !important;
|
|
23
|
+
padding: 4px 8px;
|
|
24
|
+
|
|
25
|
+
.icon {
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.editor-item {
|
|
31
|
+
flex: 1;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
min-height: 40px;
|
|
34
|
+
|
|
35
|
+
.name {
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
text-overflow: ellipsis;
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
|
|
40
|
+
max-width: 240px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:global {
|
|
45
|
+
.batch-popover-content {
|
|
46
|
+
width: 250px;
|
|
47
|
+
height: 50px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -118,12 +118,12 @@ var theme = {
|
|
|
118
118
|
colorBgContainerDisabled: "#F9FAFB",
|
|
119
119
|
colorTextDisabled: "#98A2B3"
|
|
120
120
|
},
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
Input: {
|
|
122
|
+
fontSizeIcon: 16
|
|
123
123
|
// "lineHeight": 1
|
|
124
124
|
},
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
Select: {
|
|
126
|
+
fontSizeIcon: 16
|
|
127
127
|
// "lineHeight": 1
|
|
128
128
|
}
|
|
129
129
|
},
|
|
@@ -205,7 +205,7 @@ var localeDateMap = {
|
|
|
205
205
|
"en-US": {
|
|
206
206
|
adapterLocale: "en"
|
|
207
207
|
},
|
|
208
|
-
|
|
208
|
+
en: {
|
|
209
209
|
adapterLocale: "en"
|
|
210
210
|
},
|
|
211
211
|
"zh-TW": {
|
|
@@ -221,7 +221,6 @@ var localeDateMap = {
|
|
|
221
221
|
var Page = (props) => {
|
|
222
222
|
var _a2;
|
|
223
223
|
const { children, style, locale, ...others } = props;
|
|
224
|
-
console.log(locale, "locale", props);
|
|
225
224
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
226
225
|
import_config_provider.default,
|
|
227
226
|
{
|
|
@@ -236,7 +235,7 @@ var Page = (props) => {
|
|
|
236
235
|
dateAdapter: import_AdapterDayjs.AdapterDayjs,
|
|
237
236
|
adapterLocale: ((_a2 = localeDateMap == null ? void 0 : localeDateMap[locale]) == null ? void 0 : _a2.adapterLocale) || "en"
|
|
238
237
|
},
|
|
239
|
-
/* @__PURE__ */ import_react.default.createElement(import_date_picker.ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ import_react.default.createElement("div", { style }, children))
|
|
238
|
+
/* @__PURE__ */ import_react.default.createElement(import_date_picker.ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ import_react.default.createElement(import_date_picker.LocaleProvider, { value: { locale } }, /* @__PURE__ */ import_react.default.createElement("div", { style }, children)))
|
|
240
239
|
)
|
|
241
240
|
);
|
|
242
241
|
};
|
|
@@ -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/select-time/RightPanel/index.tsx
|
|
30
|
+
var RightPanel_exports = {};
|
|
31
|
+
__export(RightPanel_exports, {
|
|
32
|
+
default: () => RightPanel_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(RightPanel_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_index = require("./index.less");
|
|
37
|
+
var import_utils = require("../utils");
|
|
38
|
+
var import_classnames = __toESM(require("classnames"));
|
|
39
|
+
var RightPanel = (props) => {
|
|
40
|
+
const { value, onChange, slice = 5 } = props;
|
|
41
|
+
const list = (0, import_react.useMemo)(() => {
|
|
42
|
+
return (0, import_utils.sliceDayIntoFiveMinutes)(slice);
|
|
43
|
+
}, [slice]);
|
|
44
|
+
(0, import_react.useEffect)(() => {
|
|
45
|
+
console.log(
|
|
46
|
+
(0, import_utils.findNextSlice)({
|
|
47
|
+
timeSlices: list,
|
|
48
|
+
date: value
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
let nextTime = (0, import_utils.findNextSlice)({
|
|
52
|
+
timeSlices: list,
|
|
53
|
+
date: value
|
|
54
|
+
});
|
|
55
|
+
let scrollDom = document.querySelector(".select-time-right-panel-list");
|
|
56
|
+
const timeDom = document.querySelector(`#time${nextTime.replace(":", "")}`);
|
|
57
|
+
if (scrollDom && timeDom) {
|
|
58
|
+
scrollDom.scrollTop = timeDom.offsetTop;
|
|
59
|
+
}
|
|
60
|
+
}, [value]);
|
|
61
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "select-time-right-panel" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "select-time-right-panel-list" }, list.map((d) => {
|
|
62
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: (0, import_classnames.default)("select-time-right-panel-item", {
|
|
66
|
+
"select-time-right-panel-item-active": d.value === value
|
|
67
|
+
}),
|
|
68
|
+
key: d.value,
|
|
69
|
+
id: "time" + d.value.replace(":", ""),
|
|
70
|
+
onClick: () => {
|
|
71
|
+
onChange(d.value);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
d.label
|
|
75
|
+
);
|
|
76
|
+
})));
|
|
77
|
+
};
|
|
78
|
+
var RightPanel_default = RightPanel;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.select-time-right-panel {}
|
|
2
|
+
|
|
3
|
+
.select-time-right-panel-list {
|
|
4
|
+
width: 184px;
|
|
5
|
+
max-height: 511px;
|
|
6
|
+
overflow: auto;
|
|
7
|
+
|
|
8
|
+
.select-time-right-panel-item {
|
|
9
|
+
padding: 16px 8px;
|
|
10
|
+
border-radius: 8px;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
color: var(--Text-Text_1, #1B1B1B);
|
|
13
|
+
font-size: 24px;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
|
|
17
|
+
&.select-time-right-panel-item-active,
|
|
18
|
+
&:hover {
|
|
19
|
+
background: var(--Gray-100, #F2F4F7);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VirtualKeyboardTimeProps } from "../virtual-keyboard/Time";
|
|
3
|
+
import { PopoverProps, TimePickerProps } from "antd";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
interface SelectTimeProps {
|
|
6
|
+
value: any;
|
|
7
|
+
onChange: (e: string) => void;
|
|
8
|
+
popoverProps: PopoverProps;
|
|
9
|
+
timePickerProps: TimePickerProps;
|
|
10
|
+
timeProps: VirtualKeyboardTimeProps;
|
|
11
|
+
slice: number;
|
|
12
|
+
}
|
|
13
|
+
declare const SelectTime: (props: SelectTimeProps) => React.JSX.Element;
|
|
14
|
+
export default SelectTime;
|
|
@@ -0,0 +1,145 @@
|
|
|
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/select-time/index.tsx
|
|
30
|
+
var select_time_exports = {};
|
|
31
|
+
__export(select_time_exports, {
|
|
32
|
+
default: () => select_time_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(select_time_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_Time = __toESM(require("../virtual-keyboard/Time"));
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_RightPanel = __toESM(require("./RightPanel"));
|
|
39
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
40
|
+
var import_index = require("./index.less");
|
|
41
|
+
var SelectTime = (props) => {
|
|
42
|
+
const { onChange, value, popoverProps, timePickerProps, timeProps, slice } = props;
|
|
43
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
44
|
+
const [_value, set_value] = (0, import_react.useState)("");
|
|
45
|
+
(0, import_react.useEffect)(() => {
|
|
46
|
+
set_value(value);
|
|
47
|
+
}, [value]);
|
|
48
|
+
const valueString = (0, import_react.useMemo)(() => {
|
|
49
|
+
if (!_value) {
|
|
50
|
+
return void 0;
|
|
51
|
+
}
|
|
52
|
+
if (typeof _value === "string") {
|
|
53
|
+
return _value;
|
|
54
|
+
}
|
|
55
|
+
return _value == null ? void 0 : _value.valueString;
|
|
56
|
+
}, [_value]);
|
|
57
|
+
const previewValueString = (0, import_react.useMemo)(() => {
|
|
58
|
+
if (!_value) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
if (typeof _value === "string") {
|
|
62
|
+
return _value;
|
|
63
|
+
}
|
|
64
|
+
return _value == null ? void 0 : _value.previewValueString;
|
|
65
|
+
}, [_value]);
|
|
66
|
+
const timePickerValue = (0, import_react.useMemo)(() => {
|
|
67
|
+
if (!previewValueString) {
|
|
68
|
+
return void 0;
|
|
69
|
+
}
|
|
70
|
+
return (0, import_dayjs.default)((0, import_dayjs.default)().format("YYYY-MM-DD") + " " + previewValueString);
|
|
71
|
+
}, [previewValueString]);
|
|
72
|
+
const _onChange = (e) => {
|
|
73
|
+
if (!open) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
set_value(e);
|
|
77
|
+
};
|
|
78
|
+
const onEnter = (e) => {
|
|
79
|
+
_onChange(e);
|
|
80
|
+
onOpenChange(false, (e == null ? void 0 : e.previewValueString) || e);
|
|
81
|
+
};
|
|
82
|
+
const onOpenChange = (e, _val = previewValueString) => {
|
|
83
|
+
setOpen(e);
|
|
84
|
+
if (e) {
|
|
85
|
+
} else {
|
|
86
|
+
if (_val === value) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
onChange == null ? void 0 : onChange(_val);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
(0, import_react.useEffect)(() => {
|
|
93
|
+
if (open) {
|
|
94
|
+
document.body.classList.add("hide-scroll");
|
|
95
|
+
} else {
|
|
96
|
+
setTimeout(() => {
|
|
97
|
+
document.body.classList.remove("hide-scroll");
|
|
98
|
+
}, 150);
|
|
99
|
+
}
|
|
100
|
+
}, [open]);
|
|
101
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
102
|
+
import_antd.Popover,
|
|
103
|
+
{
|
|
104
|
+
destroyTooltipOnHide: true,
|
|
105
|
+
content: /* @__PURE__ */ import_react.default.createElement(
|
|
106
|
+
import_Time.default,
|
|
107
|
+
{
|
|
108
|
+
onChange: _onChange,
|
|
109
|
+
value: valueString,
|
|
110
|
+
onEnter: (e) => {
|
|
111
|
+
onEnter(e);
|
|
112
|
+
},
|
|
113
|
+
rightPanel: /* @__PURE__ */ import_react.default.createElement(
|
|
114
|
+
import_RightPanel.default,
|
|
115
|
+
{
|
|
116
|
+
value: previewValueString,
|
|
117
|
+
onChange: onEnter,
|
|
118
|
+
slice
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
...timeProps
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
open,
|
|
125
|
+
placement: "bottom",
|
|
126
|
+
arrow: false,
|
|
127
|
+
onOpenChange,
|
|
128
|
+
trigger: ["click"],
|
|
129
|
+
...popoverProps
|
|
130
|
+
},
|
|
131
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
132
|
+
import_antd.TimePicker,
|
|
133
|
+
{
|
|
134
|
+
format: "HH:mm",
|
|
135
|
+
size: "large",
|
|
136
|
+
inputReadOnly: true,
|
|
137
|
+
allowClear: false,
|
|
138
|
+
open: false,
|
|
139
|
+
value: timePickerValue,
|
|
140
|
+
...timePickerProps
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
));
|
|
144
|
+
};
|
|
145
|
+
var select_time_default = SelectTime;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const sliceDayIntoFiveMinutes: (slice: number) => {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const findNextSlice: ({ timeSlices, index, date }: {
|
|
6
|
+
timeSlices: any[];
|
|
7
|
+
index?: number | undefined;
|
|
8
|
+
date?: string | undefined;
|
|
9
|
+
}) => any;
|
|
@@ -0,0 +1,71 @@
|
|
|
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/select-time/utils.ts
|
|
30
|
+
var utils_exports = {};
|
|
31
|
+
__export(utils_exports, {
|
|
32
|
+
findNextSlice: () => findNextSlice,
|
|
33
|
+
sliceDayIntoFiveMinutes: () => sliceDayIntoFiveMinutes
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(utils_exports);
|
|
36
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
37
|
+
var sliceDayIntoFiveMinutes = (slice) => {
|
|
38
|
+
const startTime = (0, import_dayjs.default)().startOf("day");
|
|
39
|
+
const endTime = (0, import_dayjs.default)().endOf("day");
|
|
40
|
+
const timeSlice = slice || 5;
|
|
41
|
+
let timeSlices = [];
|
|
42
|
+
let currentTime = startTime;
|
|
43
|
+
while (currentTime.isBefore(endTime)) {
|
|
44
|
+
const timeLabel = currentTime.format("HH:mm");
|
|
45
|
+
const timeValue = currentTime.format("HH:mm");
|
|
46
|
+
timeSlices.push({ label: timeLabel, value: timeValue });
|
|
47
|
+
const nextTime = currentTime.add(timeSlice, "minute");
|
|
48
|
+
currentTime = nextTime;
|
|
49
|
+
}
|
|
50
|
+
return timeSlices;
|
|
51
|
+
};
|
|
52
|
+
var findNextSlice = ({
|
|
53
|
+
timeSlices = [],
|
|
54
|
+
index = 0,
|
|
55
|
+
date = ""
|
|
56
|
+
}) => {
|
|
57
|
+
const currentTimeValue = date || (0, import_dayjs.default)().format("HH:mm");
|
|
58
|
+
for (let i = 0; i < timeSlices.length; i++) {
|
|
59
|
+
if (timeSlices[i].value !== "now") {
|
|
60
|
+
if (timeSlices[i].value >= currentTimeValue) {
|
|
61
|
+
return timeSlices[i].value;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return timeSlices[index].value;
|
|
66
|
+
};
|
|
67
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
+
0 && (module.exports = {
|
|
69
|
+
findNextSlice,
|
|
70
|
+
sliceDayIntoFiveMinutes
|
|
71
|
+
});
|
|
@@ -33,5 +33,11 @@ function filterUtil_default({
|
|
|
33
33
|
return true;
|
|
34
34
|
}
|
|
35
35
|
const dataValue = (0, import_utils2.getValueByKeys)(item, key);
|
|
36
|
-
|
|
36
|
+
if ((0, import_utils.isArr)(value)) {
|
|
37
|
+
return value.includes(dataValue);
|
|
38
|
+
}
|
|
39
|
+
if ((0, import_utils.isArr)(dataValue)) {
|
|
40
|
+
return dataValue.includes(value);
|
|
41
|
+
}
|
|
42
|
+
return value === dataValue;
|
|
37
43
|
}
|
|
@@ -122,9 +122,18 @@ var GridView = (0, import_model.Provider)(
|
|
|
122
122
|
}
|
|
123
123
|
return viewMode || defaultViewMode;
|
|
124
124
|
}, [viewMode, defaultViewMode, multiple]);
|
|
125
|
+
const removeTitleColumns = (0, import_react.useMemo)(() => {
|
|
126
|
+
let _columns = columns.map((item) => {
|
|
127
|
+
return {
|
|
128
|
+
...item,
|
|
129
|
+
title: void 0
|
|
130
|
+
};
|
|
131
|
+
});
|
|
132
|
+
return _columns;
|
|
133
|
+
}, [columns]);
|
|
125
134
|
const currentSettingHash = (0, import_react.useMemo)(() => {
|
|
126
|
-
return currentSettingKey || (0, import_utils.getHash)(
|
|
127
|
-
}, [currentSettingKey, JSON.stringify(
|
|
135
|
+
return currentSettingKey || (0, import_utils.getHash)(removeTitleColumns) || "";
|
|
136
|
+
}, [currentSettingKey, JSON.stringify(removeTitleColumns)]);
|
|
128
137
|
(0, import_react.useEffect)(() => {
|
|
129
138
|
const setting = (0, import_utils.getTableSettingFromLocalStorage)(tableId);
|
|
130
139
|
if (setting.currentSettingHash !== currentSettingHash) {
|
|
@@ -242,8 +251,11 @@ var GridView = (0, import_model.Provider)(
|
|
|
242
251
|
}, [currentViewMode]);
|
|
243
252
|
(0, import_react.useEffect)(() => {
|
|
244
253
|
form.setFieldValue("column_setting", {});
|
|
245
|
-
form.setFieldValue(
|
|
246
|
-
|
|
254
|
+
form.setFieldValue(
|
|
255
|
+
"column_setting",
|
|
256
|
+
tableSettingRef.current.column_setting
|
|
257
|
+
);
|
|
258
|
+
}, [(0, import_utils.stringify)(removeTitleColumns)]);
|
|
247
259
|
(0, import_react.useEffect)(() => {
|
|
248
260
|
form.setFieldsValue(initialValuesRef.current);
|
|
249
261
|
}, [JSON.stringify(propsFilter)]);
|
|
@@ -2,34 +2,67 @@
|
|
|
2
2
|
height: 100%;
|
|
3
3
|
flex: 1;
|
|
4
4
|
}
|
|
5
|
+
|
|
5
6
|
.materials-grid {
|
|
6
7
|
width: 100%;
|
|
7
8
|
height: 100%;
|
|
8
9
|
display: flex;
|
|
9
10
|
flex-direction: column;
|
|
11
|
+
|
|
10
12
|
.pisell-lowcode-table-thead {
|
|
11
13
|
.pisell-lowcode-table-cell {
|
|
12
14
|
padding: 0 14px;
|
|
13
15
|
height: 44px;
|
|
14
16
|
}
|
|
15
17
|
}
|
|
18
|
+
|
|
16
19
|
.pisell-lowcode-table-cell {
|
|
17
20
|
padding: 12px;
|
|
21
|
+
|
|
22
|
+
.pisell-lowcode-table-selection {
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
|
|
26
|
+
.pisell-lowcode-checkbox-wrapper {
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.cell-provider {
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
.pisell-lowcode-checkbox-wrapper {
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
}
|
|
18
46
|
}
|
|
47
|
+
|
|
19
48
|
.pisell-lowcode-table-filter-column {
|
|
20
49
|
align-items: center;
|
|
50
|
+
|
|
21
51
|
.pisell-lowcode-dropdown-trigger {
|
|
22
52
|
width: 25px;
|
|
23
53
|
height: 25px;
|
|
24
54
|
justify-content: center;
|
|
25
55
|
}
|
|
56
|
+
|
|
26
57
|
.pisell-lowcode-table-filter-trigger.active {
|
|
27
58
|
background: var(--primary-100, #F4EBFF);
|
|
28
59
|
}
|
|
29
60
|
}
|
|
61
|
+
|
|
30
62
|
.pisell-lowcode-table-column-sorters {
|
|
31
63
|
cursor: pointer;
|
|
32
64
|
}
|
|
65
|
+
|
|
33
66
|
.pisell-table-sorter-inner {
|
|
34
67
|
width: 25px;
|
|
35
68
|
height: 25px;
|
|
@@ -42,47 +75,59 @@
|
|
|
42
75
|
transition: color 0.3s;
|
|
43
76
|
border-radius: 8px;
|
|
44
77
|
justify-content: center;
|
|
78
|
+
|
|
45
79
|
&:hover {
|
|
46
80
|
background: var(--primary-100, #F4EBFF);
|
|
47
81
|
}
|
|
48
|
-
|
|
82
|
+
|
|
83
|
+
.pisell-table-column-sorter-up,
|
|
84
|
+
.pisell-table-column-sorter-down {
|
|
49
85
|
color: rgba(102, 112, 133, 0.65);
|
|
50
86
|
font-size: 12px;
|
|
51
87
|
}
|
|
88
|
+
|
|
52
89
|
.pisell-table-column-sorter-down {
|
|
53
90
|
margin-top: -0.3em;
|
|
54
91
|
}
|
|
92
|
+
|
|
55
93
|
.pisell-table-column-up {
|
|
56
94
|
font-size: 20px;
|
|
57
95
|
}
|
|
96
|
+
|
|
58
97
|
.pisell-table-column-down {
|
|
59
98
|
font-size: 20px;
|
|
60
99
|
transform: rotate(180deg);
|
|
61
100
|
}
|
|
62
101
|
}
|
|
102
|
+
|
|
63
103
|
.pisell-table-sorter-inner.active {
|
|
64
104
|
background: var(--primary-100, #F4EBFF);
|
|
65
105
|
cursor: pointer;
|
|
66
106
|
color: #7F56D9
|
|
67
107
|
}
|
|
68
108
|
|
|
69
|
-
.pisell-lowcode-table-wrapper .pisell-lowcode-table.pisell-lowcode-table-bordered
|
|
109
|
+
.pisell-lowcode-table-wrapper .pisell-lowcode-table.pisell-lowcode-table-bordered>.pisell-lowcode-table-container {
|
|
70
110
|
border-left: none;
|
|
71
111
|
}
|
|
112
|
+
|
|
72
113
|
.pisell-lowcode-table-wrapper .pisell-lowcode-table-bordered .pisell-lowcode-table-thead tr td:first-child {
|
|
73
114
|
border-left: 1px solid #EAECF0;
|
|
74
115
|
}
|
|
116
|
+
|
|
75
117
|
.pisell-lowcode-table-wrapper .pisell-lowcode-table-bordered .pisell-lowcode-table-thead tr th:first-child {
|
|
76
118
|
border-left: 1px solid #EAECF0;
|
|
77
119
|
}
|
|
120
|
+
|
|
78
121
|
div.pisell-lowcode-table-selection-column {
|
|
79
122
|
display: flex;
|
|
80
123
|
align-items: center;
|
|
81
124
|
justify-content: center;
|
|
82
125
|
}
|
|
126
|
+
|
|
83
127
|
.pisell-lowcode-table-bordered .pisell-lowcode-table-tbody .pisell-lowcode-table-selection-column {
|
|
84
128
|
border-left: 1px solid #EAECF0;
|
|
85
129
|
}
|
|
130
|
+
|
|
86
131
|
.drag-sort-cell {
|
|
87
132
|
.editable-cell-value-wrap {
|
|
88
133
|
display: flex;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
export declare type ItemValue = string | number;
|
|
4
|
+
export interface Item {
|
|
5
|
+
value: ItemValue;
|
|
6
|
+
label: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
type: "text" | "primary";
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export interface KeyboardProps {
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
onChange?: (value?: ItemValue) => void;
|
|
15
|
+
items?: Item[];
|
|
16
|
+
}
|
|
17
|
+
declare const Keyboard: (props: KeyboardProps) => React.JSX.Element;
|
|
18
|
+
export default Keyboard;
|