@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.
Files changed (115) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +20 -20
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +20 -20
  11. package/dist/umd/materials.min.css +1 -0
  12. package/dist/umd/materials.min.js +1 -0
  13. package/dist/umd/static/DotsSix.57d66266.svg +1 -0
  14. package/dist/umd/static/arrow-left.e542294f.svg +1 -0
  15. package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
  16. package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
  17. package/dist/umd/static/help-circle.31c9be40.svg +1 -0
  18. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
  19. package/es/components/batch-editor/fields/Image/index.d.ts +7 -0
  20. package/es/components/batch-editor/fields/Image/index.js +14 -0
  21. package/es/components/batch-editor/fields/Image/index.less +6 -0
  22. package/es/components/batch-editor/fields/Price/index.d.ts +7 -0
  23. package/es/components/batch-editor/fields/Price/index.js +26 -0
  24. package/es/components/batch-editor/fields/Text/index.d.ts +6 -0
  25. package/es/components/batch-editor/fields/Text/index.js +8 -0
  26. package/es/components/batch-editor/fields/index.d.ts +7 -0
  27. package/es/components/batch-editor/fields/index.js +8 -0
  28. package/es/components/batch-editor/index.d.ts +11 -0
  29. package/es/components/batch-editor/index.js +465 -0
  30. package/es/components/batch-editor/index.less +50 -0
  31. package/es/components/page/index.js +12 -9
  32. package/es/components/select-time/RightPanel/index.d.ts +9 -0
  33. package/es/components/select-time/RightPanel/index.js +45 -0
  34. package/es/components/select-time/RightPanel/index.less +22 -0
  35. package/es/components/select-time/index.d.ts +14 -0
  36. package/es/components/select-time/index.js +115 -0
  37. package/es/components/select-time/index.less +16 -0
  38. package/es/components/select-time/utils.d.ts +9 -0
  39. package/es/components/select-time/utils.js +42 -0
  40. package/es/components/table/Table/fields/select/filterUtil/index.js +11 -1
  41. package/es/components/table/hooks/useTransDataSource.js +1 -0
  42. package/es/components/table/index.js +11 -3
  43. package/es/components/table/index.less +47 -2
  44. package/es/components/virtual-keyboard/Keyboard/index.d.ts +18 -0
  45. package/es/components/virtual-keyboard/Keyboard/index.js +51 -0
  46. package/es/components/virtual-keyboard/Keyboard/index.less +32 -0
  47. package/es/components/virtual-keyboard/Time/index.d.ts +13 -0
  48. package/es/components/virtual-keyboard/Time/index.js +124 -0
  49. package/es/components/virtual-keyboard/Time/index.less +0 -0
  50. package/es/components/virtual-keyboard/Time/utils.d.ts +10 -0
  51. package/es/components/virtual-keyboard/Time/utils.js +153 -0
  52. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +9 -0
  53. package/es/components/virtual-keyboard/VirtualKeyInput/index.js +76 -0
  54. package/es/components/virtual-keyboard/VirtualKeyInput/index.less +52 -0
  55. package/es/components/virtual-keyboard/index.d.ts +14 -0
  56. package/es/components/virtual-keyboard/index.js +85 -0
  57. package/es/components/virtual-keyboard/index.less +17 -0
  58. package/es/index.d.ts +4 -0
  59. package/es/index.js +5 -1
  60. package/es/locales/en-US.d.ts +14 -0
  61. package/es/locales/en-US.js +19 -1
  62. package/es/locales/zh-CN.d.ts +14 -0
  63. package/es/locales/zh-CN.js +19 -1
  64. package/es/locales/zh-TW.d.ts +14 -0
  65. package/es/locales/zh-TW.js +19 -1
  66. package/lib/components/batch-editor/fields/Image/index.d.ts +7 -0
  67. package/lib/components/batch-editor/fields/Image/index.js +48 -0
  68. package/lib/components/batch-editor/fields/Image/index.less +6 -0
  69. package/lib/components/batch-editor/fields/Price/index.d.ts +7 -0
  70. package/lib/components/batch-editor/fields/Price/index.js +55 -0
  71. package/lib/components/batch-editor/fields/Text/index.d.ts +6 -0
  72. package/lib/components/batch-editor/fields/Text/index.js +40 -0
  73. package/lib/components/batch-editor/fields/index.d.ts +7 -0
  74. package/lib/components/batch-editor/fields/index.js +42 -0
  75. package/lib/components/batch-editor/index.d.ts +11 -0
  76. package/lib/components/batch-editor/index.js +370 -0
  77. package/lib/components/batch-editor/index.less +50 -0
  78. package/lib/components/page/index.js +6 -7
  79. package/lib/components/select-time/RightPanel/index.d.ts +9 -0
  80. package/lib/components/select-time/RightPanel/index.js +78 -0
  81. package/lib/components/select-time/RightPanel/index.less +22 -0
  82. package/lib/components/select-time/index.d.ts +14 -0
  83. package/lib/components/select-time/index.js +145 -0
  84. package/lib/components/select-time/index.less +16 -0
  85. package/lib/components/select-time/utils.d.ts +9 -0
  86. package/lib/components/select-time/utils.js +71 -0
  87. package/lib/components/table/Table/fields/select/filterUtil/index.js +7 -1
  88. package/lib/components/table/hooks/useTransDataSource.js +1 -0
  89. package/lib/components/table/index.js +16 -4
  90. package/lib/components/table/index.less +47 -2
  91. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +18 -0
  92. package/lib/components/virtual-keyboard/Keyboard/index.js +81 -0
  93. package/lib/components/virtual-keyboard/Keyboard/index.less +32 -0
  94. package/lib/components/virtual-keyboard/Time/index.d.ts +13 -0
  95. package/lib/components/virtual-keyboard/Time/index.js +166 -0
  96. package/lib/components/virtual-keyboard/Time/index.less +0 -0
  97. package/lib/components/virtual-keyboard/Time/utils.d.ts +10 -0
  98. package/lib/components/virtual-keyboard/Time/utils.js +162 -0
  99. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +9 -0
  100. package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +90 -0
  101. package/lib/components/virtual-keyboard/VirtualKeyInput/index.less +52 -0
  102. package/lib/components/virtual-keyboard/index.d.ts +14 -0
  103. package/lib/components/virtual-keyboard/index.js +131 -0
  104. package/lib/components/virtual-keyboard/index.less +17 -0
  105. package/lib/index.d.ts +4 -0
  106. package/lib/index.js +12 -0
  107. package/lib/locales/en-US.d.ts +14 -0
  108. package/lib/locales/en-US.js +15 -1
  109. package/lib/locales/zh-CN.d.ts +14 -0
  110. package/lib/locales/zh-CN.js +15 -1
  111. package/lib/locales/zh-TW.d.ts +14 -0
  112. package/lib/locales/zh-TW.js +15 -1
  113. package/lowcode/batch-editor/meta.ts +93 -0
  114. package/lowcode/select-time/meta.ts +8 -8
  115. 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
- "Input": {
122
- "fontSizeIcon": 16
121
+ Input: {
122
+ fontSizeIcon: 16
123
123
  // "lineHeight": 1
124
124
  },
125
- "Select": {
126
- "fontSizeIcon": 16
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
- "en": {
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,9 @@
1
+ import React from "react";
2
+ import "./index.less";
3
+ interface RightPanelProps {
4
+ value: string;
5
+ onChange: (value: string) => void;
6
+ slice: number;
7
+ }
8
+ declare const RightPanel: (props: RightPanelProps) => React.JSX.Element;
9
+ export default RightPanel;
@@ -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,16 @@
1
+ body {
2
+ &.hide-scroll {
3
+
4
+ &::-webkit-scrollbar {
5
+ display: none;
6
+ }
7
+
8
+ &::-webkit-scrollbar-thumb {
9
+ display: none;
10
+ }
11
+
12
+ &::-webkit-scrollbar-track {
13
+ display: none;
14
+ }
15
+ }
16
+ }
@@ -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
- return (0, import_utils.isArr)(value) ? value.includes(dataValue) : value === dataValue;
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
  }
@@ -84,6 +84,7 @@ var useTransDataSource = (params) => {
84
84
  filterLocalArr,
85
85
  filters
86
86
  ]);
87
+ console.log("dataSourcedataSource", dataSource);
87
88
  return dataSource;
88
89
  };
89
90
  var useTransDataSource_default = useTransDataSource;
@@ -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)(columns) || "";
127
- }, [currentSettingKey, JSON.stringify(columns)]);
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("column_setting", tableSettingRef.current.column_setting);
246
- }, [(0, import_utils.stringify)(columns)]);
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
- .pisell-table-column-sorter-up,.pisell-table-column-sorter-down {
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 >.pisell-lowcode-table-container {
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;