@pisell/materials 3.0.13 → 3.0.14

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 (82) 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/page/index.js +12 -9
  20. package/es/components/select-time/RightPanel/index.d.ts +9 -0
  21. package/es/components/select-time/RightPanel/index.js +45 -0
  22. package/es/components/select-time/RightPanel/index.less +22 -0
  23. package/es/components/select-time/index.d.ts +14 -0
  24. package/es/components/select-time/index.js +115 -0
  25. package/es/components/select-time/index.less +16 -0
  26. package/es/components/select-time/utils.d.ts +9 -0
  27. package/es/components/select-time/utils.js +42 -0
  28. package/es/components/virtual-keyboard/Keyboard/index.d.ts +18 -0
  29. package/es/components/virtual-keyboard/Keyboard/index.js +51 -0
  30. package/es/components/virtual-keyboard/Keyboard/index.less +32 -0
  31. package/es/components/virtual-keyboard/Time/index.d.ts +13 -0
  32. package/es/components/virtual-keyboard/Time/index.js +124 -0
  33. package/es/components/virtual-keyboard/Time/index.less +0 -0
  34. package/es/components/virtual-keyboard/Time/utils.d.ts +10 -0
  35. package/es/components/virtual-keyboard/Time/utils.js +153 -0
  36. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +9 -0
  37. package/es/components/virtual-keyboard/VirtualKeyInput/index.js +76 -0
  38. package/es/components/virtual-keyboard/VirtualKeyInput/index.less +52 -0
  39. package/es/components/virtual-keyboard/index.d.ts +14 -0
  40. package/es/components/virtual-keyboard/index.js +85 -0
  41. package/es/components/virtual-keyboard/index.less +17 -0
  42. package/es/index.d.ts +3 -0
  43. package/es/index.js +3 -0
  44. package/es/locales/en-US.d.ts +2 -0
  45. package/es/locales/en-US.js +3 -1
  46. package/es/locales/zh-CN.d.ts +2 -0
  47. package/es/locales/zh-CN.js +3 -1
  48. package/es/locales/zh-TW.d.ts +2 -0
  49. package/es/locales/zh-TW.js +3 -1
  50. package/lib/components/page/index.js +6 -7
  51. package/lib/components/select-time/RightPanel/index.d.ts +9 -0
  52. package/lib/components/select-time/RightPanel/index.js +78 -0
  53. package/lib/components/select-time/RightPanel/index.less +22 -0
  54. package/lib/components/select-time/index.d.ts +14 -0
  55. package/lib/components/select-time/index.js +145 -0
  56. package/lib/components/select-time/index.less +16 -0
  57. package/lib/components/select-time/utils.d.ts +9 -0
  58. package/lib/components/select-time/utils.js +71 -0
  59. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +18 -0
  60. package/lib/components/virtual-keyboard/Keyboard/index.js +81 -0
  61. package/lib/components/virtual-keyboard/Keyboard/index.less +32 -0
  62. package/lib/components/virtual-keyboard/Time/index.d.ts +13 -0
  63. package/lib/components/virtual-keyboard/Time/index.js +166 -0
  64. package/lib/components/virtual-keyboard/Time/index.less +0 -0
  65. package/lib/components/virtual-keyboard/Time/utils.d.ts +10 -0
  66. package/lib/components/virtual-keyboard/Time/utils.js +162 -0
  67. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +9 -0
  68. package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +90 -0
  69. package/lib/components/virtual-keyboard/VirtualKeyInput/index.less +52 -0
  70. package/lib/components/virtual-keyboard/index.d.ts +14 -0
  71. package/lib/components/virtual-keyboard/index.js +131 -0
  72. package/lib/components/virtual-keyboard/index.less +17 -0
  73. package/lib/index.d.ts +3 -0
  74. package/lib/index.js +9 -0
  75. package/lib/locales/en-US.d.ts +2 -0
  76. package/lib/locales/en-US.js +3 -1
  77. package/lib/locales/zh-CN.d.ts +2 -0
  78. package/lib/locales/zh-CN.js +3 -1
  79. package/lib/locales/zh-TW.d.ts +2 -0
  80. package/lib/locales/zh-TW.js +3 -1
  81. package/lowcode/select-time/meta.ts +8 -8
  82. package/package.json +1 -1
@@ -0,0 +1,153 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread 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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ 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; }
7
+ var getStringAtPosition = function getStringAtPosition(str, pos) {
8
+ if (pos < 0 || pos >= str.length) {
9
+ return undefined;
10
+ }
11
+ return str.charAt(pos);
12
+ };
13
+ var getNum1 = function getNum1(arr, str) {
14
+ var num1 = getStringAtPosition(str, 0);
15
+ // 第一位
16
+ if (Number(num1) < 3) {
17
+ arr[0] = num1;
18
+ return arr;
19
+ }
20
+ arr[0] = "0";
21
+ arr[1] = num1;
22
+ return arr;
23
+ };
24
+ var getNum2 = function getNum2(arr, num2) {
25
+ var num1 = arr[0];
26
+ // 0 1 2
27
+ if (arr.length < 2) {
28
+ // 0 1
29
+ if (Number(num1) < 2) {
30
+ arr[1] = num2;
31
+ return arr;
32
+ } else {
33
+ // 2
34
+ if (Number(num1) === 2) {
35
+ if (Number(num2) < 4) {
36
+ arr[1] = num2;
37
+ return arr;
38
+ } else {
39
+ if (Number(num2) <= 5) {
40
+ arr[1] = "0";
41
+ arr[2] = num2;
42
+ return arr;
43
+ }
44
+ arr[1] = "0";
45
+ arr[2] = "0";
46
+ arr[3] = num2;
47
+ return arr;
48
+ }
49
+ }
50
+ }
51
+ }
52
+
53
+ // 03 04 05 06
54
+ if (Number(num2) < 6) {
55
+ arr[2] = num2;
56
+ return arr;
57
+ } else {
58
+ arr[2] = "0";
59
+ arr[3] = num2;
60
+ return arr;
61
+ }
62
+ };
63
+ var getNum3 = function getNum3(arr, num3) {
64
+ // 01 02 10 12 22 23
65
+ if (arr.length === 2) {
66
+ if (Number(num3) < 6) {
67
+ arr[2] = num3;
68
+ return arr;
69
+ } else {
70
+ arr[2] = "0";
71
+ arr[3] = num3;
72
+ return arr;
73
+ }
74
+ }
75
+ // 010 012 123 234
76
+ arr[3] = num3;
77
+ return arr;
78
+ };
79
+ var getNum4 = function getNum4(arr, num4) {
80
+ arr[3] = num4;
81
+ return arr;
82
+ };
83
+ var formatArray = function formatArray(arr) {
84
+ var _arr = _toConsumableArray(arr);
85
+ while (_arr.length < 4) {
86
+ _arr.push("0");
87
+ }
88
+ _arr.splice(2, "0", ":");
89
+ return _arr;
90
+ };
91
+ var formatRes = function formatRes(arr) {
92
+ var valueArray = _toConsumableArray(arr);
93
+ var previewValueArray = formatArray(arr);
94
+ var previewValueArrayDom = null;
95
+ if (valueArray.length > 2) {
96
+ valueArray.splice(2, "0", ":");
97
+ }
98
+ previewValueArrayDom = previewValueArray.map(function (d, i) {
99
+ if (valueArray[i]) {
100
+ return /*#__PURE__*/React.createElement("span", null, d);
101
+ } else {
102
+ return /*#__PURE__*/React.createElement("span", {
103
+ style: {
104
+ color: "#98A2B3"
105
+ }
106
+ }, d);
107
+ }
108
+ });
109
+ return {
110
+ valueArray: valueArray,
111
+ valueString: arr.join(""),
112
+ previewValueArray: formatArray(arr),
113
+ previewValueArrayDom: previewValueArrayDom,
114
+ previewValueString: formatArray(arr).join(""),
115
+ disabled: []
116
+ };
117
+ };
118
+
119
+ // 将字符串自动转换成Time
120
+ export var formatStringToTime = function formatStringToTime(value) {
121
+ var arr = [];
122
+ var str = value.replace(":", "");
123
+ if (str.length >= 5) {
124
+ str = "";
125
+ }
126
+ var num2 = getStringAtPosition(str, 1);
127
+ var num3 = getStringAtPosition(str, 2);
128
+ var num4 = getStringAtPosition(str, 3);
129
+ if (!str.length) {
130
+ return formatRes(arr);
131
+ }
132
+ arr = getNum1(arr, str);
133
+ // 第二位
134
+
135
+ if (num2 !== undefined) {
136
+ arr = getNum2(arr, num2);
137
+ if (arr.length === 4) {
138
+ return formatRes(arr);
139
+ }
140
+ }
141
+ if (num3 !== undefined) {
142
+ arr = getNum3(arr, num3);
143
+ if (arr.length === 4) {
144
+ return formatRes(arr);
145
+ }
146
+ }
147
+ if (num4 !== undefined) {
148
+ arr = getNum4(arr, num4);
149
+ return formatRes(arr);
150
+ }
151
+ return formatRes(arr);
152
+ };
153
+ export var fn = function fn() {};
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { InputProps } from "antd";
3
+ import "./index.less";
4
+ export interface VirtualKeyInputProps extends InputProps {
5
+ previewValue?: string;
6
+ renderInput?: (props: any) => any;
7
+ }
8
+ declare const VirtualKeyInput: (props: VirtualKeyInputProps) => React.JSX.Element;
9
+ export default VirtualKeyInput;
@@ -0,0 +1,76 @@
1
+ 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); }
2
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ 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."); }
4
+ 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); }
5
+ 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; }
6
+ 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; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ import React, { useEffect, useState } from "react";
9
+ import { Input } from "antd";
10
+ import { Delete } from "@pisell/icon";
11
+ import { useEventListener } from "ahooks";
12
+ import classNames from "classnames";
13
+ import "./index.less";
14
+ var list = ["Backspace"];
15
+ var VirtualKeyInput = function VirtualKeyInput(props) {
16
+ var _props$previewValue = props.previewValue,
17
+ previewValue = _props$previewValue === void 0 ? props.value : _props$previewValue,
18
+ value = props.value;
19
+ var _useState = useState(false),
20
+ _useState2 = _slicedToArray(_useState, 2),
21
+ select = _useState2[0],
22
+ setSelect = _useState2[1];
23
+ useEventListener("keydown", function (ev) {
24
+ if (list.includes(ev.key)) {
25
+ _onDelete === null || _onDelete === void 0 ? void 0 : _onDelete();
26
+ }
27
+ });
28
+ useEffect(function () {
29
+ if (value) {
30
+ setSelect(false);
31
+ }
32
+ }, [value]);
33
+ var _onDelete = function _onDelete() {
34
+ if (select) {
35
+ var _props$onChange;
36
+ (_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call(props, {
37
+ target: {
38
+ value: ""
39
+ }
40
+ });
41
+ setSelect(false);
42
+ return;
43
+ }
44
+ var _val = props.value + "";
45
+ _val = _val.slice(0, _val.length - 1);
46
+ props.onChange && props.onChange({
47
+ target: {
48
+ value: _val
49
+ }
50
+ });
51
+ };
52
+ return /*#__PURE__*/React.createElement("div", {
53
+ className: "virtual-keyboard-input-wrap"
54
+ }, props.renderInput ? /*#__PURE__*/React.createElement("div", {
55
+ className: classNames("virtual-keyboard-input", {
56
+ "virtual-keyboard-input-select": select
57
+ }),
58
+ onClick: function onClick() {
59
+ if (value) {
60
+ setSelect(!select);
61
+ }
62
+ }
63
+ }, props.renderInput(props)) : /*#__PURE__*/React.createElement(Input, _extends({
64
+ className: "virtual-keyboard-input",
65
+ bordered: false
66
+ }, props, {
67
+ readOnly: true,
68
+ value: previewValue
69
+ })), value !== null && value !== void 0 && value.length ? /*#__PURE__*/React.createElement("div", {
70
+ className: "virtual-keyboard-input-delete",
71
+ onClick: _onDelete
72
+ }, /*#__PURE__*/React.createElement(Delete, {
73
+ className: "virtual-keyboard-input-delete-icon"
74
+ })) : null);
75
+ };
76
+ export default VirtualKeyInput;
@@ -0,0 +1,52 @@
1
+ .virtual-keyboard-input-wrap {
2
+ width: 100%;
3
+ height: 100px;
4
+ margin-bottom: 10px;
5
+ border-radius: 5px;
6
+ background: var(--Base-White, #FFF);
7
+ box-shadow: 0px 1px 0px 0px #898A8D;
8
+ position: relative;
9
+ overflow: hidden;
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+
14
+ .virtual-keyboard-input-delete {
15
+ position: absolute;
16
+ top: 0;
17
+ bottom: 0;
18
+ right: 0;
19
+ padding-right: 30px;
20
+ padding-left: 12px;
21
+ cursor: pointer;
22
+ font-size: 50px;
23
+ background-color: #fff;
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ user-select: none;
28
+
29
+ .virtual-keyboard-input-delete-icon {
30
+ font-size: 30px;
31
+ color: #000;
32
+ }
33
+ }
34
+
35
+ .virtual-keyboard-input {
36
+ height: 100%;
37
+ text-align: center;
38
+ color: var(--Base-Black, #000);
39
+ font-size: 60px;
40
+ font-weight: 500;
41
+ letter-spacing: -1.2px;
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ user-select: none;
46
+
47
+ &.virtual-keyboard-input-select {
48
+ background-color: #7f56d938;
49
+ border-radius: 8px;
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { KeyboardProps } from "./Keyboard";
3
+ import { VirtualKeyInputProps } from "./VirtualKeyInput";
4
+ import "./index.less";
5
+ interface VirtualKeyboardProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ keyboardProps?: KeyboardProps;
7
+ virtualKeyInputProps?: VirtualKeyInputProps;
8
+ rightPanel?: React.ReactNode;
9
+ style?: React.CSSProperties;
10
+ onChange?: (value?: any) => void;
11
+ value?: string;
12
+ }
13
+ declare const VirtualKeyboard: (props: VirtualKeyboardProps) => React.JSX.Element;
14
+ export default VirtualKeyboard;
@@ -0,0 +1,85 @@
1
+ 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); }
2
+ import React, { useEffect } from "react";
3
+ import Keyboard from "./Keyboard";
4
+ import VirtualKeyInput from "./VirtualKeyInput";
5
+ import "./index.less";
6
+ import classNames from "classnames";
7
+ var items = [{
8
+ value: 1,
9
+ label: "1",
10
+ disabled: false,
11
+ type: "text"
12
+ }, {
13
+ value: 2,
14
+ label: "2",
15
+ disabled: false,
16
+ type: "text"
17
+ }, {
18
+ value: 3,
19
+ label: "3",
20
+ disabled: false,
21
+ type: "text"
22
+ }, {
23
+ value: 4,
24
+ label: "4",
25
+ disabled: false,
26
+ type: "text"
27
+ }, {
28
+ value: 5,
29
+ label: "5",
30
+ disabled: false,
31
+ type: "text"
32
+ }, {
33
+ value: 6,
34
+ label: "6",
35
+ disabled: false,
36
+ type: "text"
37
+ }, {
38
+ value: 7,
39
+ label: "7",
40
+ disabled: false,
41
+ type: "text"
42
+ }, {
43
+ value: 8,
44
+ label: "8",
45
+ disabled: false,
46
+ type: "text"
47
+ }, {
48
+ value: 9,
49
+ label: "9",
50
+ disabled: false,
51
+ type: "text"
52
+ }, {
53
+ value: "0",
54
+ label: "0",
55
+ disabled: false,
56
+ type: "text"
57
+ }, {
58
+ value: "ok",
59
+ label: "OK",
60
+ disabled: false,
61
+ type: "primary"
62
+ }];
63
+ var VirtualKeyboard = function VirtualKeyboard(props) {
64
+ var virtualKeyInputProps = props.virtualKeyInputProps,
65
+ style = props.style,
66
+ className = props.className,
67
+ keyboardProps = props.keyboardProps,
68
+ onChange = props.onChange,
69
+ value = props.value,
70
+ rightPanel = props.rightPanel;
71
+ useEffect(function () {
72
+ document.body.id = "body";
73
+ }, []);
74
+ return /*#__PURE__*/React.createElement("div", {
75
+ className: classNames("virtual-keyboard-component", className),
76
+ style: style
77
+ }, /*#__PURE__*/React.createElement("div", {
78
+ className: classNames("virtual-keyboard-component-left")
79
+ }, /*#__PURE__*/React.createElement(VirtualKeyInput, virtualKeyInputProps), /*#__PURE__*/React.createElement(Keyboard, _extends({
80
+ items: items
81
+ }, keyboardProps))), rightPanel ? /*#__PURE__*/React.createElement("div", {
82
+ className: "virtual-keyboard-component-right"
83
+ }, rightPanel) : null);
84
+ };
85
+ export default VirtualKeyboard;
@@ -0,0 +1,17 @@
1
+ .virtual-keyboard-component {
2
+ display: flex;
3
+ align-items: center;
4
+ gap: 20px;
5
+ }
6
+
7
+ .virtual-keyboard-component-left {
8
+ padding: 10px;
9
+ width: 380px;
10
+ border-radius: 10px;
11
+ background: var(--Gray-300, #D0D5DD);
12
+ backdrop-filter: blur(50px);
13
+ }
14
+
15
+ .virtual-keyboard-component-right {
16
+ align-self: stretch;
17
+ }
package/es/index.d.ts CHANGED
@@ -73,4 +73,7 @@ export { default as Sort } from "./components/sort";
73
73
  export { default as InputNumberRange } from "./components/input-number-range";
74
74
  export { default as LowCodePage } from "./components/lowCodePage";
75
75
  export { default as Segmented } from "./components/segmented";
76
+ export { default as VirtualKeyboard } from "./components/virtual-keyboard";
77
+ export { default as VirtualKeyboardTime } from "./components/virtual-keyboard/Time";
78
+ export { default as SelectTime } from "./components/select-time";
76
79
  export { default as AutoCompleteNumber } from "./components/auto-complete-number";
package/es/index.js CHANGED
@@ -93,4 +93,7 @@ export { default as Sort } from "./components/sort";
93
93
  export { default as InputNumberRange } from "./components/input-number-range";
94
94
  export { default as LowCodePage } from "./components/lowCodePage";
95
95
  export { default as Segmented } from "./components/segmented";
96
+ export { default as VirtualKeyboard } from "./components/virtual-keyboard";
97
+ export { default as VirtualKeyboardTime } from "./components/virtual-keyboard/Time";
98
+ export { default as SelectTime } from "./components/select-time";
96
99
  export { default as AutoCompleteNumber } from "./components/auto-complete-number";
@@ -35,5 +35,7 @@ declare const _default: {
35
35
  "table-action-range-picker-presets-last-14-day": string;
36
36
  "table-action-range-picker-presets-last-30-day": string;
37
37
  "table-action-range-picker-presets-last-90-day": string;
38
+ "virtual-keyboard-time-now": string;
39
+ "virtual-keyboard-time-ok": string;
38
40
  };
39
41
  export default _default;
@@ -40,5 +40,7 @@ export default {
40
40
  "table-action-range-picker-presets-last-7-day": "Last 7 Days",
41
41
  "table-action-range-picker-presets-last-14-day": "Last 14 Days",
42
42
  "table-action-range-picker-presets-last-30-day": "Last 30 Days",
43
- "table-action-range-picker-presets-last-90-day": "Last 90 Days"
43
+ "table-action-range-picker-presets-last-90-day": "Last 90 Days",
44
+ "virtual-keyboard-time-now": "Now",
45
+ "virtual-keyboard-time-ok": "OK"
44
46
  };
@@ -35,5 +35,7 @@ declare const _default: {
35
35
  "table-action-range-picker-presets-last-14-day": string;
36
36
  "table-action-range-picker-presets-last-30-day": string;
37
37
  "table-action-range-picker-presets-last-90-day": string;
38
+ "virtual-keyboard-time-now": string;
39
+ "virtual-keyboard-time-ok": string;
38
40
  };
39
41
  export default _default;
@@ -40,5 +40,7 @@ export default {
40
40
  "table-action-range-picker-presets-last-7-day": "过去7天",
41
41
  "table-action-range-picker-presets-last-14-day": "过去14天",
42
42
  "table-action-range-picker-presets-last-30-day": "过去30天",
43
- "table-action-range-picker-presets-last-90-day": "过去90天"
43
+ "table-action-range-picker-presets-last-90-day": "过去90天",
44
+ "virtual-keyboard-time-now": "此刻",
45
+ "virtual-keyboard-time-ok": "确定"
44
46
  };
@@ -35,5 +35,7 @@ declare const _default: {
35
35
  "table-action-range-picker-presets-last-14-day": string;
36
36
  "table-action-range-picker-presets-last-30-day": string;
37
37
  "table-action-range-picker-presets-last-90-day": string;
38
+ "virtual-keyboard-time-now": string;
39
+ "virtual-keyboard-time-ok": string;
38
40
  };
39
41
  export default _default;
@@ -40,5 +40,7 @@ export default {
40
40
  "table-action-range-picker-presets-last-7-day": "過去7天",
41
41
  "table-action-range-picker-presets-last-14-day": "過去14天",
42
42
  "table-action-range-picker-presets-last-30-day": "過去30天",
43
- "table-action-range-picker-presets-last-90-day": "過去90天"
43
+ "table-action-range-picker-presets-last-90-day": "過去90天",
44
+ "virtual-keyboard-time-now": "此刻",
45
+ "virtual-keyboard-time-ok": "確定"
44
46
  };
@@ -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;