@pisell/materials 3.0.49-gray → 3.0.50-gray

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 (88) 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/pisellStatisticList/index.js +2 -1
  17. package/es/components/pisellStatisticList/index.less +4 -0
  18. package/es/components/segmented/index.d.ts +1 -0
  19. package/es/components/segmented/index.js +1 -0
  20. package/es/components/segmented/index.less +3 -0
  21. package/es/components/virtual-keyboard/Amount/index.d.ts +22 -0
  22. package/es/components/virtual-keyboard/Amount/index.js +65 -0
  23. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +12 -0
  24. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +22 -0
  25. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +18 -0
  26. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +19 -0
  27. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +213 -0
  28. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.less +9 -0
  29. package/es/components/virtual-keyboard/Keyboard/index.d.ts +8 -6
  30. package/es/components/virtual-keyboard/Keyboard/index.js +59 -15
  31. package/es/components/virtual-keyboard/Keyboard/index.less +35 -24
  32. package/es/components/virtual-keyboard/Number/index.d.ts +14 -0
  33. package/es/components/virtual-keyboard/Number/index.js +35 -0
  34. package/es/components/virtual-keyboard/VirtualInput/index.d.ts +9 -0
  35. package/es/components/virtual-keyboard/VirtualInput/index.js +41 -0
  36. package/es/components/virtual-keyboard/VirtualInput/index.less +46 -0
  37. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +6 -3
  38. package/es/components/virtual-keyboard/VirtualKeyInput/index.js +27 -20
  39. package/es/index.d.ts +4 -0
  40. package/es/index.js +4 -0
  41. package/es/locales/en-US.d.ts +6 -0
  42. package/es/locales/en-US.js +8 -1
  43. package/es/locales/zh-CN.d.ts +6 -0
  44. package/es/locales/zh-CN.js +8 -1
  45. package/es/locales/zh-TW.d.ts +6 -0
  46. package/es/locales/zh-TW.js +8 -1
  47. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +10 -0
  48. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.js +84 -0
  49. package/lib/components/pisellAdjustPrice/index.d.ts +10 -0
  50. package/lib/components/pisellAdjustPrice/index.js +156 -0
  51. package/lib/components/pisellAdjustPrice/index.less +30 -0
  52. package/lib/components/pisellStatisticList/index.js +1 -1
  53. package/lib/components/pisellStatisticList/index.less +4 -0
  54. package/lib/components/segmented/index.d.ts +1 -0
  55. package/lib/components/segmented/index.js +1 -0
  56. package/lib/components/segmented/index.less +3 -0
  57. package/lib/components/virtual-keyboard/Amount/index.d.ts +22 -0
  58. package/lib/components/virtual-keyboard/Amount/index.js +96 -0
  59. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +12 -0
  60. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +46 -0
  61. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +18 -0
  62. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +19 -0
  63. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +245 -0
  64. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.less +9 -0
  65. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +8 -6
  66. package/lib/components/virtual-keyboard/Keyboard/index.js +51 -4
  67. package/lib/components/virtual-keyboard/Keyboard/index.less +35 -24
  68. package/lib/components/virtual-keyboard/Number/index.d.ts +14 -0
  69. package/lib/components/virtual-keyboard/Number/index.js +65 -0
  70. package/lib/components/virtual-keyboard/VirtualInput/index.d.ts +9 -0
  71. package/lib/components/virtual-keyboard/VirtualInput/index.js +63 -0
  72. package/lib/components/virtual-keyboard/VirtualInput/index.less +46 -0
  73. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +6 -3
  74. package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +20 -11
  75. package/lib/index.d.ts +4 -0
  76. package/lib/index.js +12 -0
  77. package/lib/locales/en-US.d.ts +6 -0
  78. package/lib/locales/en-US.js +8 -1
  79. package/lib/locales/zh-CN.d.ts +6 -0
  80. package/lib/locales/zh-CN.js +8 -1
  81. package/lib/locales/zh-TW.d.ts +6 -0
  82. package/lib/locales/zh-TW.js +8 -1
  83. package/lowcode/pisell-adjust-price/meta.ts +58 -0
  84. package/lowcode/pisell-adjust-price/snippets.ts +10 -0
  85. package/lowcode/pisell-adjust-price-input-number/meta.ts +245 -0
  86. package/lowcode/pisell-number-keyboard/meta.ts +98 -0
  87. package/lowcode/pisell-price-keyboard/meta.ts +174 -0
  88. package/package.json +1 -1
@@ -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,5 +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';
105
109
  export { default as PisellStatisticList } from './components/pisellStatisticList';
106
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,
@@ -88,6 +90,8 @@ __export(src_exports, {
88
90
  PisellInput: () => import_pisellInput.default,
89
91
  PisellLoading: () => import_pisellLoading.default,
90
92
  PisellModal: () => import_pisellModal.default,
93
+ PisellNumberKeyboard: () => import_Number.default,
94
+ PisellPriceKeyboard: () => import_Amount.default,
91
95
  PisellRow: () => import_pisellRow.default,
92
96
  PisellScan: () => import_pisellScan.default,
93
97
  PisellStatisticList: () => import_pisellStatisticList.default,
@@ -242,6 +246,10 @@ var import_pisellCard = __toESM(require("./components/pisellCard"));
242
246
  var import_pisellInformationEntry = __toESM(require("./components/pisellInformationEntry"));
243
247
  var import_usePisellConfig = __toESM(require("./components/pisell-config-provider/hooks/usePisellConfig"));
244
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"));
245
253
  var import_pisellStatisticList = __toESM(require("./components/pisellStatisticList"));
246
254
  var import_pisellFloatingPanel = __toESM(require("./components/pisellFloatingPanel"));
247
255
  // Annotate the CommonJS export names for ESM import in node:
@@ -290,6 +298,8 @@ var import_pisellFloatingPanel = __toESM(require("./components/pisellFloatingPan
290
298
  Modal,
291
299
  Page,
292
300
  Pagination,
301
+ PisellAdjustPrice,
302
+ PisellAdjustPriceInputNumber,
293
303
  PisellAlert,
294
304
  PisellCard,
295
305
  PisellCardList,
@@ -305,6 +315,8 @@ var import_pisellFloatingPanel = __toESM(require("./components/pisellFloatingPan
305
315
  PisellInput,
306
316
  PisellLoading,
307
317
  PisellModal,
318
+ PisellNumberKeyboard,
319
+ PisellPriceKeyboard,
308
320
  PisellRow,
309
321
  PisellScan,
310
322
  PisellStatisticList,
@@ -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
  };
@@ -0,0 +1,58 @@
1
+ import snippets from "./snippets";
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: "PisellAdjustPrice",
6
+ title: "卡片",
7
+ category: "数据展示",
8
+ docUrl: "",
9
+ screenshot: "",
10
+ devMode: "proCode",
11
+ npm: {
12
+ package: "@pisell/materials",
13
+ version: "1.0.1",
14
+ exportName: "PisellAdjustPrice",
15
+ main: "src/index.tsx",
16
+ destructuring: true,
17
+ subName: "",
18
+ },
19
+ props: [
20
+ {
21
+ name: 'defaultValue',
22
+ title: { label: '默认值', tip: '默认值' },
23
+ propType: 'number',
24
+ setter: 'NumberSetter',
25
+ },
26
+ {
27
+ name: 'max',
28
+ title: { label: '最大值', tip: '最大值' },
29
+ propType: 'number',
30
+ setter: 'NumberSetter',
31
+ },
32
+ {
33
+ name: 'min',
34
+ title: { label: '最小值', tip: '最小值' },
35
+ propType: 'number',
36
+ setter: 'NumberSetter',
37
+ },
38
+ {
39
+ name: 'value',
40
+ title: { label: 'value', tip: 'value' },
41
+ propType: 'number',
42
+ setter: 'NumberSetter',
43
+ },
44
+ ],
45
+ configure: {
46
+ component: { isContainer: true },
47
+ supports: {
48
+ style: true,
49
+ events: [
50
+ {
51
+ name: 'onChange',
52
+ template:
53
+ "onChange(value,${extParams}){\nconsole.log('onChange', value);}",
54
+ },
55
+ ],
56
+ },
57
+ },
58
+ };
@@ -0,0 +1,10 @@
1
+ export default [
2
+ {
3
+ title: '金额修改',
4
+ schema: {
5
+ componentName: 'PisellAdjustPrice',
6
+ props: {
7
+ },
8
+ },
9
+ },
10
+ ];
@@ -0,0 +1,245 @@
1
+ import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
2
+
3
+ const PisellAdjustPriceInputNumberMeta: ComponentMetadata = {
4
+ componentName: 'PisellAdjustPriceInputNumber',
5
+ title: 'PisellAdjustPriceInputNumber',
6
+ docUrl: '',
7
+ screenshot: '',
8
+ devMode: 'proCode',
9
+ npm: {
10
+ package: '@pisell/materials',
11
+ version: '3.0.48',
12
+ exportName: 'PisellAdjustPriceInputNumber',
13
+ main: 'src/index.tsx',
14
+ destructuring: true,
15
+ subName: '',
16
+ },
17
+ configure: {
18
+ props: [
19
+ {
20
+ name: "defaultValue",
21
+ title: { label: "默认值", tip: "默认值" },
22
+ propType: "number",
23
+ setter: "NumberSetter",
24
+ },
25
+ {
26
+ name: "value",
27
+ title: { label: "当前值", tip: "当前值" },
28
+ propType: "number",
29
+ setter: "NumberSetter",
30
+ },
31
+ {
32
+ name: "originValue",
33
+ title: { label: "原始金额", tip: "原始金额" },
34
+ propType: "number",
35
+ setter: "NumberSetter",
36
+ },
37
+ {
38
+ name: "autoFocus",
39
+ title: { label: "自动聚焦", tip: "自动获取焦点" },
40
+ propType: "bool",
41
+ defaultValue: false,
42
+ setter: "BoolSetter",
43
+ },
44
+ {
45
+ name: "disabled",
46
+ title: { label: "是否禁用", tip: "是否为禁用状态" },
47
+ propType: "bool",
48
+ defaultValue: false,
49
+ setter: "BoolSetter",
50
+ },
51
+ {
52
+ name: "placeholder",
53
+ title: { label: "占位提示", tip: "占位提示" },
54
+ propType: "string",
55
+ defaultValue: "请输入",
56
+ setter: "PisellI18nSetter",
57
+ },
58
+ {
59
+ name: "controls",
60
+ title: { label: "是否显示增减按钮", tip: "是否显示增减按钮" },
61
+ propType: "bool",
62
+ defaultValue: true,
63
+ setter: "BoolSetter",
64
+ },
65
+ {
66
+ name: "bordered",
67
+ title: { label: "显示边框", tip: "是否有边框" },
68
+ propType: "bool",
69
+ defaultValue: true,
70
+ setter: "BoolSetter",
71
+ },
72
+ {
73
+ name: "type",
74
+ title: { label: "input类型", tip: "声明 input 类型,同原生 input 标签的 type 属性,见:MDN(请直接使用 Input.TextArea 代替 type=\"textarea\")" },
75
+ propType: 'string',
76
+ setter: 'StringSetter',
77
+ },
78
+ {
79
+ name: "addonAfter",
80
+ title: { label: "后置标签", tip: "后置标签" },
81
+ propType: { type: "oneOfType", value: ["string", "node"] },
82
+ setter: ["PisellI18nSetter", "SlotSetter"],
83
+ },
84
+ {
85
+ name: "addonBefore",
86
+ title: { label: "前置标签", tip: "前置标签" },
87
+ propType: { type: "oneOfType", value: ["string", "node"] },
88
+ setter: ["PisellI18nSetter", "SlotSetter"],
89
+ },
90
+ // {
91
+ // name: 'formatter',
92
+ // title: {
93
+ // label: '指定输入框展示值的格式',
94
+ // tip: '指定输入框展示值的格式',
95
+ // },
96
+ // propType: 'func',
97
+ // },
98
+ {
99
+ name: "max",
100
+ title: { label: "最大值", tip: "最大值" },
101
+ propType: "number",
102
+ setter: "NumberSetter",
103
+ },
104
+ {
105
+ name: "min",
106
+ title: { label: "最小值", tip: "最小值" },
107
+ propType: "number",
108
+ setter: "NumberSetter",
109
+ },
110
+ {
111
+ name: "precision",
112
+ title: { label: "数值精度", tip: "数值精度" },
113
+ propType: "number",
114
+ setter: "NumberSetter",
115
+ },
116
+ // {
117
+ // name: 'decimalSeparator',
118
+ // title: { label: '小数点', tip: '小数点' },
119
+ // propType: 'string',
120
+ // },
121
+ {
122
+ name: "size",
123
+ title: { label: "尺寸", tip: "输入框大小" },
124
+ propType: { type: "oneOf", value: ["large", "middle", "small"] },
125
+ setter: {
126
+ componentName: "RadioGroupSetter",
127
+ props: {
128
+ options: [
129
+ {
130
+ title: "大",
131
+ value: "large",
132
+ },
133
+ {
134
+ title: "中",
135
+ value: "middle",
136
+ },
137
+ {
138
+ title: "小",
139
+ value: "small",
140
+ },
141
+ ],
142
+ },
143
+ },
144
+ defaultValue: "middle",
145
+ },
146
+ {
147
+ name: "step",
148
+ title: { label: "单步长", tip: "每次改变步数" },
149
+ propType: "number",
150
+ setter: "NumberSetter",
151
+ },
152
+ {
153
+ name: "onChange",
154
+ title: { label: "变化回调", tip: "变化回调" },
155
+ propType: "func",
156
+ },
157
+ {
158
+ name: "onPressEnter",
159
+ title: { label: "按下回车的回调", tip: "按下回车的回调" },
160
+ propType: "func",
161
+ },
162
+ {
163
+ name: "onFocus",
164
+ title: { label: "获取焦点回调", tip: "获取焦点回调" },
165
+ propType: "func",
166
+ },
167
+ {
168
+ name: "onKeyDown",
169
+ title: { label: "按键按下时的回调", tip: "按键按下时的回调" },
170
+ propType: "func",
171
+ },
172
+ {
173
+ name: "onKeyPress",
174
+ title: { label: "按键按下后的回调", tip: "按键按下之后释放之前的回调" },
175
+ propType: "func",
176
+ },
177
+ {
178
+ name: "onKeyUp",
179
+ title: { label: "按键释放回调", tip: "按键释放之后的回调" },
180
+ propType: "func",
181
+ },
182
+ {
183
+ name: "onBlur",
184
+ title: { label: "失去焦点回调", tip: "失去焦点回调" },
185
+ propType: "func",
186
+ },
187
+ ],
188
+ supports: {
189
+ style: true,
190
+ events: [
191
+ {
192
+ name: "onChange",
193
+ template:
194
+ "onChange(value,${extParams}){\n// 变化回调\nconsole.log('onChange',value);}",
195
+ },
196
+ {
197
+ name: "onPressEnter",
198
+ template:
199
+ "onPressEnter(event,${extParams}){\n// 按下回车的回调\nconsole.log('onPressEnter',event);}",
200
+ },
201
+ {
202
+ name: "onFocus",
203
+ template:
204
+ "onFocus(event,${extParams}){\n// 获取焦点回调\nconsole.log('onFocus',event);}",
205
+ },
206
+ {
207
+ name: "onKeyDown",
208
+ template:
209
+ "onKeyDown(event,${extParams}){\n// 按键按下时的回调\nconsole.log('onKeyDown',event);}",
210
+ },
211
+ {
212
+ name: "onKeyPress",
213
+ template:
214
+ "onKeyPress(event,${extParams}){\n// 按键按下后的回调\nconsole.log('onKeyPress',event);}",
215
+ },
216
+ {
217
+ name: "onKeyUp",
218
+ template:
219
+ "onKeyUp(event,${extParams}){\n// 按键释放回调\nconsole.log('onKeyUp',event);}",
220
+ },
221
+ {
222
+ name: "onBlur",
223
+ template:
224
+ "onBlur(event,${extParams}){\n// 按键释放回调\nconsole.log('onBlur',event);}",
225
+ },
226
+ ],
227
+ },
228
+ component: {},
229
+ },
230
+ };
231
+ const snippets: Snippet[] = [
232
+ {
233
+ title: 'PisellAdjustPriceInputNumber',
234
+ screenshot: '',
235
+ schema: {
236
+ componentName: 'PisellAdjustPriceInputNumber',
237
+ props: {},
238
+ },
239
+ },
240
+ ];
241
+
242
+ export default {
243
+ ...PisellAdjustPriceInputNumberMeta,
244
+ snippets,
245
+ };
@@ -0,0 +1,98 @@
1
+ import { ComponentMetadata, Snippet } from "@alilc/lowcode-types";
2
+
3
+
4
+ const PisellNumberKeyboardMeta: ComponentMetadata = {
5
+ componentName: "PisellNumberKeyboard",
6
+ title: "PisellNumberKeyboard",
7
+ docUrl: "",
8
+ screenshot: "",
9
+ devMode: "proCode",
10
+ npm: {
11
+ package: "@pisell/materials",
12
+ version: "1.0.3",
13
+ exportName: "PisellNumberKeyboard",
14
+ main: "src/index.tsx",
15
+ destructuring: true,
16
+ subName: "",
17
+ },
18
+ props: [
19
+ {
20
+ name: "defaultValue",
21
+ title: { label: "默认值", tip: "默认值" },
22
+ propType: "number",
23
+ setter: "NumberSetter",
24
+ },
25
+ {
26
+ name: "max",
27
+ title: { label: "最大值", tip: "最大值" },
28
+ propType: "number",
29
+ setter: "NumberSetter",
30
+ },
31
+ {
32
+ name: "min",
33
+ title: { label: "最小值", tip: "最小值" },
34
+ propType: "number",
35
+ setter: "NumberSetter",
36
+ },
37
+ {
38
+ name: "doneText",
39
+ title: { label: "确认按钮文案", tip: "确认按钮文案" },
40
+ propType: "string",
41
+ defaultValue: "Done",
42
+ setter: "PisellI18nSetter",
43
+ },
44
+ {
45
+ name: "resetText",
46
+ title: { label: "重置按钮文案", tip: "重置按钮文案" },
47
+ propType: "string",
48
+ defaultValue: "Reset",
49
+ setter: "PisellI18nSetter",
50
+ },
51
+ {
52
+ name: "placeholder",
53
+ title: { label: "展位文字placeholder", tip: "placeholder" },
54
+ propType: "string",
55
+ setter: "PisellI18nSetter",
56
+ },
57
+ ],
58
+ configure: {
59
+ supports: {
60
+ style: true,
61
+ events: [
62
+ {
63
+ name: "onClick",
64
+ template:
65
+ "onClick(event,${extParams}){\n// 点击时的回调\nconsole.log('onClick', event);}",
66
+ },
67
+ {
68
+ name: "onChange",
69
+ template:
70
+ "onChange(value,${extParams}){\nconsole.log('onChange', value);}",
71
+ },
72
+ {
73
+ name: "onEnter",
74
+ template:
75
+ "onEnter(value,${extParams}){\nconsole.log('onEnter', value);}",
76
+ },
77
+ ],
78
+ },
79
+ component: {
80
+ isContainer: true,
81
+ },
82
+ },
83
+ };
84
+ const snippets: Snippet[] = [
85
+ {
86
+ title: "PisellNumberKeyboard",
87
+ screenshot: "",
88
+ schema: {
89
+ componentName: "PisellNumberKeyboard",
90
+ props: {},
91
+ },
92
+ },
93
+ ];
94
+
95
+ export default {
96
+ ...PisellNumberKeyboardMeta,
97
+ snippets,
98
+ };