@pisell/materials 2.2.28 → 2.2.30

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 (100) 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 +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +13 -13
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +19 -19
  11. package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +10 -0
  12. package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.js +62 -0
  13. package/es/components/pisellAdjustPrice/index.d.ts +10 -0
  14. package/es/components/pisellAdjustPrice/index.js +148 -0
  15. package/es/components/pisellAdjustPrice/index.less +30 -0
  16. package/es/components/pisellFloatingPanel/index.d.ts +17 -0
  17. package/es/components/pisellFloatingPanel/index.js +89 -0
  18. package/es/components/pisellFloatingPanel/index.less +30 -0
  19. package/es/components/pisellStatisticList/index.d.ts +18 -0
  20. package/es/components/pisellStatisticList/index.js +67 -0
  21. package/es/components/pisellStatisticList/index.less +47 -0
  22. package/es/components/segmented/index.d.ts +1 -0
  23. package/es/components/segmented/index.js +1 -0
  24. package/es/components/segmented/index.less +3 -0
  25. package/es/components/virtual-keyboard/Amount/index.d.ts +22 -0
  26. package/es/components/virtual-keyboard/Amount/index.js +65 -0
  27. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +12 -0
  28. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +22 -0
  29. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +18 -0
  30. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +19 -0
  31. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +213 -0
  32. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.less +9 -0
  33. package/es/components/virtual-keyboard/Keyboard/index.d.ts +8 -6
  34. package/es/components/virtual-keyboard/Keyboard/index.js +59 -15
  35. package/es/components/virtual-keyboard/Keyboard/index.less +35 -24
  36. package/es/components/virtual-keyboard/Number/index.d.ts +14 -0
  37. package/es/components/virtual-keyboard/Number/index.js +35 -0
  38. package/es/components/virtual-keyboard/VirtualInput/index.d.ts +9 -0
  39. package/es/components/virtual-keyboard/VirtualInput/index.js +41 -0
  40. package/es/components/virtual-keyboard/VirtualInput/index.less +46 -0
  41. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +6 -3
  42. package/es/components/virtual-keyboard/VirtualKeyInput/index.js +27 -20
  43. package/es/index.d.ts +6 -0
  44. package/es/index.js +7 -1
  45. package/es/locales/en-US.d.ts +6 -0
  46. package/es/locales/en-US.js +8 -1
  47. package/es/locales/zh-CN.d.ts +6 -0
  48. package/es/locales/zh-CN.js +8 -1
  49. package/es/locales/zh-TW.d.ts +6 -0
  50. package/es/locales/zh-TW.js +8 -1
  51. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +10 -0
  52. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.js +84 -0
  53. package/lib/components/pisellAdjustPrice/index.d.ts +10 -0
  54. package/lib/components/pisellAdjustPrice/index.js +156 -0
  55. package/lib/components/pisellAdjustPrice/index.less +30 -0
  56. package/lib/components/pisellFloatingPanel/index.d.ts +17 -0
  57. package/lib/components/pisellFloatingPanel/index.js +113 -0
  58. package/lib/components/pisellFloatingPanel/index.less +30 -0
  59. package/lib/components/pisellStatisticList/index.d.ts +18 -0
  60. package/lib/components/pisellStatisticList/index.js +109 -0
  61. package/lib/components/pisellStatisticList/index.less +47 -0
  62. package/lib/components/segmented/index.d.ts +1 -0
  63. package/lib/components/segmented/index.js +1 -0
  64. package/lib/components/segmented/index.less +3 -0
  65. package/lib/components/virtual-keyboard/Amount/index.d.ts +22 -0
  66. package/lib/components/virtual-keyboard/Amount/index.js +96 -0
  67. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +12 -0
  68. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +46 -0
  69. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +18 -0
  70. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +19 -0
  71. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +245 -0
  72. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.less +9 -0
  73. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +8 -6
  74. package/lib/components/virtual-keyboard/Keyboard/index.js +51 -4
  75. package/lib/components/virtual-keyboard/Keyboard/index.less +35 -24
  76. package/lib/components/virtual-keyboard/Number/index.d.ts +14 -0
  77. package/lib/components/virtual-keyboard/Number/index.js +65 -0
  78. package/lib/components/virtual-keyboard/VirtualInput/index.d.ts +9 -0
  79. package/lib/components/virtual-keyboard/VirtualInput/index.js +63 -0
  80. package/lib/components/virtual-keyboard/VirtualInput/index.less +46 -0
  81. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +6 -3
  82. package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +20 -11
  83. package/lib/index.d.ts +6 -0
  84. package/lib/index.js +18 -0
  85. package/lib/locales/en-US.d.ts +6 -0
  86. package/lib/locales/en-US.js +8 -1
  87. package/lib/locales/zh-CN.d.ts +6 -0
  88. package/lib/locales/zh-CN.js +8 -1
  89. package/lib/locales/zh-TW.d.ts +6 -0
  90. package/lib/locales/zh-TW.js +8 -1
  91. package/lowcode/input/meta.ts +25 -0
  92. package/lowcode/pisell-adjust-price/meta.ts +58 -0
  93. package/lowcode/pisell-adjust-price/snippets.ts +10 -0
  94. package/lowcode/pisell-adjust-price-input-number/meta.ts +245 -0
  95. package/lowcode/pisell-floating-panel/meta.ts +232 -0
  96. package/lowcode/pisell-modal.information/meta.ts +5 -0
  97. package/lowcode/pisell-number-keyboard/meta.ts +98 -0
  98. package/lowcode/pisell-price-keyboard/meta.ts +174 -0
  99. package/lowcode/pisell-statistic-list/meta.ts +264 -0
  100. package/package.json +3 -3
@@ -1,18 +1,20 @@
1
- import React from "react";
2
- import "./index.less";
1
+ import React from 'react';
2
+ import './index.less';
3
3
  export declare type ItemValue = string | number;
4
4
  export interface Item {
5
5
  value: ItemValue;
6
- label: string;
6
+ label: React.ReactNode;
7
7
  disabled: boolean;
8
- type: "text" | "primary";
8
+ type: 'text' | 'primary';
9
9
  style?: React.CSSProperties;
10
+ size?: number;
10
11
  }
11
12
  export interface KeyboardProps {
12
13
  className?: string;
13
14
  style?: React.CSSProperties;
14
15
  onChange?: (value?: ItemValue) => void;
15
16
  items?: Item[];
17
+ rightItems?: Item[];
16
18
  }
17
- declare const Keyboard: (props: KeyboardProps) => React.JSX.Element;
18
- export default Keyboard;
19
+ declare const _default: React.MemoExoticComponent<(props: KeyboardProps) => React.JSX.Element>;
20
+ export default _default;
@@ -38,8 +38,11 @@ var import_index = require("./index.less");
38
38
  var import_classnames = __toESM(require("classnames"));
39
39
  var import_ahooks = require("ahooks");
40
40
  var list = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "ok"];
41
+ var defaultArr = [];
41
42
  var Keyboard = (props) => {
42
- const { items = [], className, style, onChange } = props;
43
+ const { items = defaultArr, className, style, onChange, rightItems } = props;
44
+ const contentRef = (0, import_react.useRef)(null);
45
+ const size = (0, import_ahooks.useSize)(contentRef);
43
46
  (0, import_ahooks.useEventListener)("keydown", (ev) => {
44
47
  console.log("ev", ev);
45
48
  let key = ev.key;
@@ -50,13 +53,16 @@ var Keyboard = (props) => {
50
53
  onChange == null ? void 0 : onChange(key);
51
54
  }
52
55
  });
56
+ const getHeight = (0, import_ahooks.useMemoizedFn)((itemSize = 1) => {
57
+ return ((size == null ? void 0 : size.width) || 0) / 4 * itemSize + (itemSize - 1) * 7;
58
+ });
53
59
  return /* @__PURE__ */ import_react.default.createElement(
54
60
  "div",
55
61
  {
56
62
  className: (0, import_classnames.default)("virtual-keyboard-wrap", className),
57
63
  style
58
64
  },
59
- items.map((item) => {
65
+ /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("virtual-keyboard-content"), ref: contentRef }, items.map((item) => {
60
66
  var _a;
61
67
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "virtual-keyboard-item", style: item.style }, /* @__PURE__ */ import_react.default.createElement(
62
68
  import_antd.Button,
@@ -75,7 +81,48 @@ var Keyboard = (props) => {
75
81
  },
76
82
  item.label
77
83
  ));
78
- })
84
+ })),
85
+ rightItems && /* @__PURE__ */ import_react.default.createElement(
86
+ "div",
87
+ {
88
+ className: (0, import_classnames.default)(
89
+ "virtual-keyboard-content",
90
+ "virtual-keyboard-right"
91
+ ),
92
+ style: { flex: `0 0 calc((100% - 21px) / 4 * 1)` }
93
+ },
94
+ rightItems == null ? void 0 : rightItems.map((item) => {
95
+ var _a, _b;
96
+ return /* @__PURE__ */ import_react.default.createElement(
97
+ "div",
98
+ {
99
+ className: "virtual-keyboard-item",
100
+ style: {
101
+ ...item.style || {},
102
+ height: getHeight(item.size)
103
+ }
104
+ },
105
+ /* @__PURE__ */ import_react.default.createElement(
106
+ import_antd.Button,
107
+ {
108
+ id: `virtual-keyboard-${item.value}`,
109
+ key: item.value,
110
+ type: item.type,
111
+ className: "virtual-keyboard-item-button",
112
+ style: {
113
+ fontSize: ((_a = item.style) == null ? void 0 : _a.fontSize) || 25,
114
+ color: item.type === "primary" ? "#fff" : ((_b = item.style) == null ? void 0 : _b.color) || void 0
115
+ },
116
+ disabled: item.disabled,
117
+ onClick: (e) => {
118
+ onChange == null ? void 0 : onChange(item.value);
119
+ }
120
+ },
121
+ item.label
122
+ )
123
+ );
124
+ })
125
+ )
79
126
  );
80
127
  };
81
- var Keyboard_default = Keyboard;
128
+ var Keyboard_default = import_react.default.memo(Keyboard);
@@ -1,32 +1,43 @@
1
1
  .virtual-keyboard-wrap {
2
- width: 100%;
3
2
  display: flex;
4
- flex-wrap: wrap;
5
- align-items: center;
6
- justify-content: flex-end;
7
3
  gap: 7px;
4
+ .virtual-keyboard-content {
5
+ width: 100%;
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ align-items: center;
9
+ justify-content: flex-end;
10
+ gap: 7px;
8
11
 
9
- .virtual-keyboard-item {
10
- border-radius: 5px;
11
- background: var(--Base-White, #FFF);
12
- box-shadow: 0px 1px 0px 0px #898A8D;
13
- overflow: hidden;
14
- width: calc((100% - 14px) / 3 * 1);
15
- padding-top: 25%;
16
- position: relative;
12
+ .virtual-keyboard-item {
13
+ border-radius: 5px;
14
+ background: var(--Base-White, #fff);
15
+ box-shadow: 0px 1px 0px 0px #898a8d;
16
+ overflow: hidden;
17
+ width: calc((100% - 14px) / 3 * 1);
18
+ padding-top: 25%;
19
+ position: relative;
17
20
 
18
- .virtual-keyboard-item-button {
19
- position: absolute;
20
- left: 0;
21
- top: 0;
21
+ .virtual-keyboard-item-button {
22
+ position: absolute;
23
+ left: 0;
24
+ top: 0;
25
+ width: 100%;
26
+ height: 100%;
27
+ border-radius: 5px;
28
+ color: var(--Base-Black, #000);
29
+ font-size: 25px;
30
+ font-style: normal;
31
+ font-weight: 400;
32
+ box-shadow: none;
33
+ }
34
+ }
35
+ }
36
+ .virtual-keyboard-right {
37
+ flex-direction: column;
38
+ justify-content: start;
39
+ .virtual-keyboard-item{
22
40
  width: 100%;
23
- height: 100%;
24
- border-radius: 5px;
25
- color: var(--Base-Black, #000);
26
- font-size: 25px;
27
- font-style: normal;
28
- font-weight: 400;
29
- box-shadow: none;
30
41
  }
31
42
  }
32
- }
43
+ }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export interface NumberProps {
3
+ max?: number;
4
+ min?: number;
5
+ doneText?: string;
6
+ resetText: string;
7
+ defaultValue?: string | number;
8
+ placeholder?: string;
9
+ value?: string | number;
10
+ onChange?: (val: string | number) => void;
11
+ onEnter?: (val: string | number) => void;
12
+ }
13
+ declare const Number: (props: NumberProps) => React.JSX.Element;
14
+ export default Number;
@@ -0,0 +1,65 @@
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/virtual-keyboard/Number/index.tsx
30
+ var Number_exports = {};
31
+ __export(Number_exports, {
32
+ default: () => Number_default
33
+ });
34
+ module.exports = __toCommonJS(Number_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_ahooks = require("ahooks");
37
+ var import_BaseNumberKeyboard = __toESM(require("../BaseNumberKeyboard"));
38
+ var Number = (props) => {
39
+ const {
40
+ min,
41
+ max,
42
+ doneText,
43
+ resetText,
44
+ defaultValue,
45
+ placeholder,
46
+ onEnter
47
+ } = props;
48
+ const [value, setValue] = (0, import_ahooks.useControllableValue)(props, {
49
+ defaultValue: defaultValue || ""
50
+ });
51
+ return /* @__PURE__ */ import_react.default.createElement(
52
+ import_BaseNumberKeyboard.default,
53
+ {
54
+ max,
55
+ min,
56
+ value,
57
+ onChange: setValue,
58
+ placeholder,
59
+ doneText,
60
+ resetText,
61
+ onEnter
62
+ }
63
+ );
64
+ };
65
+ var Number_default = Number;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface VirtualInputProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ value?: string;
5
+ autoFocus?: boolean;
6
+ placeholder?: string;
7
+ }
8
+ declare const VirtualInput: (props: VirtualInputProps) => React.JSX.Element;
9
+ export default VirtualInput;
@@ -0,0 +1,63 @@
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/virtual-keyboard/VirtualInput/index.tsx
30
+ var VirtualInput_exports = {};
31
+ __export(VirtualInput_exports, {
32
+ default: () => VirtualInput_default
33
+ });
34
+ module.exports = __toCommonJS(VirtualInput_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_classnames = __toESM(require("classnames"));
37
+ var import_utils = require("@pisell/utils");
38
+ var import_index = require("./index.less");
39
+ var VirtualInput = (props) => {
40
+ const { value, autoFocus, placeholder = "" } = props;
41
+ const [isFocus, setIsFocus] = (0, import_react.useState)(autoFocus);
42
+ const onFocus = () => {
43
+ setIsFocus(true);
44
+ };
45
+ const onBlur = () => {
46
+ setIsFocus(false);
47
+ };
48
+ return /* @__PURE__ */ import_react.default.createElement(
49
+ "div",
50
+ {
51
+ onFocus,
52
+ onBlur,
53
+ tabIndex: 0,
54
+ className: (0, import_classnames.default)("pisell-virtual-input-value", {
55
+ "pisell-virtual-input-value-focus": isFocus
56
+ })
57
+ },
58
+ value,
59
+ ((0, import_utils.isUndefined)(value) || value === "") && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-virtual-input-placeholder" }, placeholder),
60
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-virtual-input-caret-container" }, isFocus && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-virtual-input-caret" }))
61
+ );
62
+ };
63
+ var VirtualInput_default = VirtualInput;
@@ -0,0 +1,46 @@
1
+ .pisell-virtual-input-value {
2
+ width: 100%;
3
+ min-width: 80px;
4
+ height: 100%;
5
+ display: flex;
6
+ align-items: center;
7
+ .pisell-virtual-input-caret-container {
8
+ height: 100%;
9
+ display: flex;
10
+ align-items: center;
11
+ .pisell-virtual-input-caret {
12
+ height: 40px;
13
+ width: 4px;
14
+ position: relative;
15
+ background: var(--Blue-600, #1570EF);
16
+ }
17
+ }
18
+ .pisell-virtual-input-placeholder {
19
+ color: var(--Gray-300, #D0D5DD);
20
+ }
21
+ }
22
+
23
+ .pisell-virtual-input-value-focus {
24
+ .pisell-virtual-input-caret {
25
+ display: block;
26
+ animation-name: pisell-caret-blink;
27
+ animation-duration: 1s;
28
+ animation-timing-function: linear;
29
+ animation-iteration-count: infinite;
30
+ }
31
+ }
32
+
33
+ @keyframes pisell-caret-blink {
34
+ from {
35
+ opacity: 1;
36
+ }
37
+ 60% {
38
+ opacity: 1;
39
+ }
40
+ 80% {
41
+ opacity: 0;
42
+ }
43
+ to {
44
+ opacity: 0;
45
+ }
46
+ }
@@ -1,9 +1,12 @@
1
- import React from "react";
2
- import { InputProps } from "antd";
3
- import "./index.less";
1
+ import React from 'react';
2
+ import { InputProps } from 'antd';
3
+ import './index.less';
4
4
  export interface VirtualKeyInputProps extends InputProps {
5
5
  previewValue?: string;
6
6
  renderInput?: (props: any) => any;
7
+ showDelete?: boolean;
8
+ onValueSelect?: (selected: boolean) => void;
9
+ defaultSelect?: boolean;
7
10
  }
8
11
  declare const VirtualKeyInput: (props: VirtualKeyInputProps) => React.JSX.Element;
9
12
  export default VirtualKeyInput;
@@ -40,23 +40,32 @@ var import_classnames = __toESM(require("classnames"));
40
40
  var import_index = require("./index.less");
41
41
  var list = ["Backspace"];
42
42
  var VirtualKeyInput = (props) => {
43
- const { previewValue = props.value, value } = props;
44
- const [select, setSelect] = (0, import_react.useState)(false);
43
+ var _a;
44
+ const {
45
+ previewValue = props.value,
46
+ value,
47
+ showDelete = true,
48
+ onValueSelect,
49
+ defaultSelect
50
+ } = props;
51
+ const [select, setSelect] = (0, import_react.useState)(defaultSelect ?? false);
45
52
  (0, import_ahooks.useEventListener)("keydown", (ev) => {
46
53
  if (list.includes(ev.key)) {
47
54
  _onDelete == null ? void 0 : _onDelete();
48
55
  }
49
56
  });
50
- (0, import_react.useEffect)(() => {
51
- if (value) {
52
- setSelect(false);
53
- }
57
+ const handleSelectChange = (selected) => {
58
+ onValueSelect == null ? void 0 : onValueSelect(selected);
59
+ setSelect(selected);
60
+ };
61
+ (0, import_ahooks.useUpdateEffect)(() => {
62
+ handleSelectChange(false);
54
63
  }, [value]);
55
64
  const _onDelete = () => {
56
- var _a;
65
+ var _a2;
57
66
  if (select) {
58
- (_a = props.onChange) == null ? void 0 : _a.call(props, { target: { value: "" } });
59
- setSelect(false);
67
+ (_a2 = props.onChange) == null ? void 0 : _a2.call(props, { target: { value: "" } });
68
+ handleSelectChange(false);
60
69
  return;
61
70
  }
62
71
  let _val = props.value + "";
@@ -71,7 +80,7 @@ var VirtualKeyInput = (props) => {
71
80
  }),
72
81
  onClick: () => {
73
82
  if (value) {
74
- setSelect(!select);
83
+ handleSelectChange(!select);
75
84
  }
76
85
  }
77
86
  },
@@ -85,6 +94,6 @@ var VirtualKeyInput = (props) => {
85
94
  readOnly: true,
86
95
  value: previewValue
87
96
  }
88
- ), (value == null ? void 0 : value.length) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "virtual-keyboard-input-delete", onClick: _onDelete }, /* @__PURE__ */ import_react.default.createElement(import_Delete.default, { className: "virtual-keyboard-input-delete-icon" })) : null);
97
+ ), ((_a = `${value ?? ""}`) == null ? void 0 : _a.length) && showDelete ? /* @__PURE__ */ import_react.default.createElement("div", { className: "virtual-keyboard-input-delete", onClick: _onDelete }, /* @__PURE__ */ import_react.default.createElement(import_Delete.default, { className: "virtual-keyboard-input-delete-icon" })) : null);
89
98
  };
90
99
  var VirtualKeyInput_default = VirtualKeyInput;
package/lib/index.d.ts CHANGED
@@ -102,3 +102,9 @@ export { default as PisellCard } from './components/pisellCard';
102
102
  export { default as PisellInformationEntry } from './components/pisellInformationEntry';
103
103
  export { default as usePisellConfig } from './components/pisell-config-provider/hooks/usePisellConfig';
104
104
  export { globalConfig, default as PisellContext } from './components/pisell-config-provider/context';
105
+ export { default as PisellPriceKeyboard } from './components/virtual-keyboard/Amount';
106
+ export { default as PisellNumberKeyboard } from './components/virtual-keyboard/Number';
107
+ export { default as PisellAdjustPrice } from './components/pisellAdjustPrice';
108
+ export { default as PisellAdjustPriceInputNumber } from './components/pisellAdjustPrice/PisellAdjustPriceInputNumber';
109
+ export { default as PisellStatisticList } from './components/pisellStatisticList';
110
+ export { default as PisellFloatingPanel } from './components/pisellFloatingPanel';
package/lib/index.js CHANGED
@@ -73,6 +73,8 @@ __export(src_exports, {
73
73
  Modal: () => import_modal.default,
74
74
  Page: () => import_page.default,
75
75
  Pagination: () => import_antd22.Pagination,
76
+ PisellAdjustPrice: () => import_pisellAdjustPrice.default,
77
+ PisellAdjustPriceInputNumber: () => import_PisellAdjustPriceInputNumber.default,
76
78
  PisellAlert: () => import_pisellAlert.default,
77
79
  PisellCard: () => import_pisellCard.default,
78
80
  PisellCardList: () => import_pisellCardList.default,
@@ -83,12 +85,16 @@ __export(src_exports, {
83
85
  PisellCountdown: () => import_pisellCountdown.default,
84
86
  PisellDatePicker: () => import_pisellDatePicker.default,
85
87
  PisellEmpty: () => import_pisellEmpty.default,
88
+ PisellFloatingPanel: () => import_pisellFloatingPanel.default,
86
89
  PisellInformationEntry: () => import_pisellInformationEntry.default,
87
90
  PisellInput: () => import_pisellInput.default,
88
91
  PisellLoading: () => import_pisellLoading.default,
89
92
  PisellModal: () => import_pisellModal.default,
93
+ PisellNumberKeyboard: () => import_Number.default,
94
+ PisellPriceKeyboard: () => import_Amount.default,
90
95
  PisellRow: () => import_pisellRow.default,
91
96
  PisellScan: () => import_pisellScan.default,
97
+ PisellStatisticList: () => import_pisellStatisticList.default,
92
98
  PisellText: () => import_pisellText.default,
93
99
  PisellToast: () => import_pisellToast.default,
94
100
  PisellTooltip: () => import_pisellTooltip.default,
@@ -240,6 +246,12 @@ var import_pisellCard = __toESM(require("./components/pisellCard"));
240
246
  var import_pisellInformationEntry = __toESM(require("./components/pisellInformationEntry"));
241
247
  var import_usePisellConfig = __toESM(require("./components/pisell-config-provider/hooks/usePisellConfig"));
242
248
  var import_context = __toESM(require("./components/pisell-config-provider/context"));
249
+ var import_Amount = __toESM(require("./components/virtual-keyboard/Amount"));
250
+ var import_Number = __toESM(require("./components/virtual-keyboard/Number"));
251
+ var import_pisellAdjustPrice = __toESM(require("./components/pisellAdjustPrice"));
252
+ var import_PisellAdjustPriceInputNumber = __toESM(require("./components/pisellAdjustPrice/PisellAdjustPriceInputNumber"));
253
+ var import_pisellStatisticList = __toESM(require("./components/pisellStatisticList"));
254
+ var import_pisellFloatingPanel = __toESM(require("./components/pisellFloatingPanel"));
243
255
  // Annotate the CommonJS export names for ESM import in node:
244
256
  0 && (module.exports = {
245
257
  Affix,
@@ -286,6 +298,8 @@ var import_context = __toESM(require("./components/pisell-config-provider/contex
286
298
  Modal,
287
299
  Page,
288
300
  Pagination,
301
+ PisellAdjustPrice,
302
+ PisellAdjustPriceInputNumber,
289
303
  PisellAlert,
290
304
  PisellCard,
291
305
  PisellCardList,
@@ -296,12 +310,16 @@ var import_context = __toESM(require("./components/pisell-config-provider/contex
296
310
  PisellCountdown,
297
311
  PisellDatePicker,
298
312
  PisellEmpty,
313
+ PisellFloatingPanel,
299
314
  PisellInformationEntry,
300
315
  PisellInput,
301
316
  PisellLoading,
302
317
  PisellModal,
318
+ PisellNumberKeyboard,
319
+ PisellPriceKeyboard,
303
320
  PisellRow,
304
321
  PisellScan,
322
+ PisellStatisticList,
305
323
  PisellText,
306
324
  PisellToast,
307
325
  PisellTooltip,
@@ -106,5 +106,11 @@ declare const _default: {
106
106
  'pisell-wallet-pass-card-redeem': string;
107
107
  'pisell-wallet-pass-card-balance': string;
108
108
  'pisell-wallet-pass-card-valid-to': string;
109
+ 'pisell-adjust-price-price-override': string;
110
+ 'pisell-adjust-price-discount': string;
111
+ 'pisell-adjust-price-discount-amount': string;
112
+ 'pisell-adjust-price-discount-percentage': string;
113
+ 'pisell-adjust-price-total-after-discount': string;
114
+ 'pisell-adjust-price-discount-can-be-maximum': string;
109
115
  };
110
116
  export default _default;
@@ -136,5 +136,12 @@ var en_US_default = {
136
136
  "pisell-wallet-pass-card-detail": "Detail",
137
137
  "pisell-wallet-pass-card-redeem": "Redeem",
138
138
  "pisell-wallet-pass-card-balance": "Balance",
139
- "pisell-wallet-pass-card-valid-to": "Valid to"
139
+ "pisell-wallet-pass-card-valid-to": "Valid to",
140
+ // 金额修改组件
141
+ "pisell-adjust-price-price-override": "Price override",
142
+ "pisell-adjust-price-discount": "Discount",
143
+ "pisell-adjust-price-discount-amount": "Amount",
144
+ "pisell-adjust-price-discount-percentage": "Percentage",
145
+ "pisell-adjust-price-total-after-discount": "Total after discount: ",
146
+ "pisell-adjust-price-discount-can-be-maximum": "Discount can be maximum"
140
147
  };
@@ -106,5 +106,11 @@ declare const _default: {
106
106
  'pisell-wallet-pass-card-redeem': string;
107
107
  'pisell-wallet-pass-card-balance': string;
108
108
  'pisell-wallet-pass-card-valid-to': string;
109
+ 'pisell-adjust-price-price-override': string;
110
+ 'pisell-adjust-price-discount': string;
111
+ 'pisell-adjust-price-discount-amount': string;
112
+ 'pisell-adjust-price-discount-percentage': string;
113
+ 'pisell-adjust-price-total-after-discount': string;
114
+ 'pisell-adjust-price-discount-can-be-maximum': string;
109
115
  };
110
116
  export default _default;
@@ -136,5 +136,12 @@ var zh_CN_default = {
136
136
  "pisell-wallet-pass-card-detail": "详情",
137
137
  "pisell-wallet-pass-card-redeem": "兑换",
138
138
  "pisell-wallet-pass-card-balance": "余额",
139
- "pisell-wallet-pass-card-valid-to": "有效期至"
139
+ "pisell-wallet-pass-card-valid-to": "有效期至",
140
+ // 金额修改组件
141
+ "pisell-adjust-price-price-override": "一口价",
142
+ "pisell-adjust-price-discount": "折扣",
143
+ "pisell-adjust-price-discount-amount": "金额",
144
+ "pisell-adjust-price-discount-percentage": "百分比",
145
+ "pisell-adjust-price-total-after-discount": "打折后总价",
146
+ "pisell-adjust-price-discount-can-be-maximum": "折扣最高可达"
140
147
  };
@@ -106,5 +106,11 @@ declare const _default: {
106
106
  'pisell-wallet-pass-card-redeem': string;
107
107
  'pisell-wallet-pass-card-balance': string;
108
108
  'pisell-wallet-pass-card-valid-to': string;
109
+ 'pisell-adjust-price-price-override': string;
110
+ 'pisell-adjust-price-discount': string;
111
+ 'pisell-adjust-price-discount-amount': string;
112
+ 'pisell-adjust-price-discount-percentage': string;
113
+ 'pisell-adjust-price-total-after-discount': string;
114
+ 'pisell-adjust-price-discount-can-be-maximum': string;
109
115
  };
110
116
  export default _default;
@@ -136,5 +136,12 @@ var zh_TW_default = {
136
136
  "pisell-wallet-pass-card-detail": "詳情",
137
137
  "pisell-wallet-pass-card-redeem": "兌換",
138
138
  "pisell-wallet-pass-card-balance": "餘額",
139
- "pisell-wallet-pass-card-valid-to": "有效期至"
139
+ "pisell-wallet-pass-card-valid-to": "有效期至",
140
+ // 金额修改组件
141
+ "pisell-adjust-price-price-override": "一口價",
142
+ "pisell-adjust-price-discount": "折扣",
143
+ "pisell-adjust-price-discount-amount": "金額",
144
+ "pisell-adjust-price-discount-percentage": "百分比",
145
+ "pisell-adjust-price-total-after-discount": "打折后總價",
146
+ "pisell-adjust-price-discount-can-be-maximum": "折扣最高可達"
140
147
  };
@@ -49,6 +49,13 @@ export default {
49
49
  defaultValue: false,
50
50
  setter: 'BoolSetter',
51
51
  },
52
+ {
53
+ name: 'readOnly',
54
+ title: { label: '是否只读', tip: '是否为只读状态' },
55
+ propType: 'bool',
56
+ defaultValue: false,
57
+ setter: 'BoolSetter',
58
+ },
52
59
  {
53
60
  name: 'placeholder',
54
61
  title: { label: '占位提示', tip: '占位提示' },
@@ -151,6 +158,16 @@ export default {
151
158
  title: { label: '失去焦点回调', tip: '失去焦点回调' },
152
159
  propType: 'func',
153
160
  },
161
+ {
162
+ name: 'onClick',
163
+ title: { label: '点击回调', tip: '点击回调' },
164
+ propType: 'func',
165
+ },
166
+ {
167
+ name: 'onClear',
168
+ title: { label: '按下清除按钮的回调', tip: '按下清除按钮的回调' },
169
+ propType: 'func',
170
+ },
154
171
  ],
155
172
  configure: {
156
173
  supports: {
@@ -188,6 +205,14 @@ export default {
188
205
  name: 'onBlur',
189
206
  template: "onBlur(event,${extParams}){\n// 按键释放回调\nconsole.log('onBlur',event);}",
190
207
  },
208
+ {
209
+ name: 'onClick',
210
+ template: "onClick(event,${extParams}){\n// 点击回调\nconsole.log('onClick',event);}",
211
+ },
212
+ {
213
+ name: 'onClear',
214
+ template: "onClear(event,${extParams}){\n// 按下清除按钮的回调\nconsole.log('onClear',event);}",
215
+ },
191
216
  ],
192
217
  },
193
218
  },