@pisell/materials 2.2.85 → 2.2.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +7 -7
- package/build/lowcode/preview.js +144 -160
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +25 -35
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +30 -40
- package/es/components/batch-editor/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +4 -5
- package/es/components/date-picker/index.d.ts +0 -1
- package/es/components/filter/index.d.ts +0 -1
- package/es/components/page/index.d.ts +0 -1
- package/es/components/pisellAdjustPrice/index.d.ts +1 -6
- package/es/components/pisellAdjustPrice/index.js +63 -8
- package/es/components/pisellAdjustPrice/index.less +35 -6
- package/es/components/pisellAdjustPrice/status.d.ts +32 -0
- package/es/components/pisellAdjustPrice/status.js +32 -0
- package/es/components/pisellAdjustPrice/type.d.ts +20 -0
- package/es/components/pisellAdjustPrice/type.js +1 -0
- package/es/components/pisellInput/index.d.ts +0 -1
- package/es/components/pisellModal/components/IpadModal/index.d.ts +0 -1
- package/es/components/pisellModal/components/MobileModal/index.d.ts +0 -1
- package/es/components/pisellModal/components/index.d.ts +0 -1
- package/es/components/pisellWalletPassCard/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Header/index.js +4 -3
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Sales/index.js +1 -1
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/index.d.ts +0 -1
- package/es/components/table/Actions/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/SelectField/index.d.ts +0 -1
- package/es/components/table/Table/fields/date/index.d.ts +0 -1
- package/es/components/table/Table/fields/image/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/image/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +2 -3
- package/es/components/table/Table/fields/link/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/index.d.ts +0 -1
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/es/components/table/Table/fields/rangePicker/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/index.d.ts +0 -1
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/index.d.ts +0 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/versionSelect/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Amount/index.d.ts +10 -0
- package/es/components/virtual-keyboard/Amount/index.js +9 -4
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +38 -10
- package/es/components/virtual-keyboard/Keyboard/index.js +2 -2
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.js +10 -3
- package/es/utils/index.d.ts +1 -1
- package/lib/components/batch-editor/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +4 -5
- package/lib/components/date-picker/index.d.ts +0 -1
- package/lib/components/filter/index.d.ts +0 -1
- package/lib/components/page/index.d.ts +0 -1
- package/lib/components/pisellAdjustPrice/index.d.ts +1 -6
- package/lib/components/pisellAdjustPrice/index.js +118 -57
- package/lib/components/pisellAdjustPrice/index.less +35 -6
- package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
- package/lib/components/pisellAdjustPrice/status.js +60 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +20 -0
- package/lib/components/pisellAdjustPrice/type.js +17 -0
- package/lib/components/pisellInput/index.d.ts +0 -1
- package/lib/components/pisellModal/components/IpadModal/index.d.ts +0 -1
- package/lib/components/pisellModal/components/MobileModal/index.d.ts +0 -1
- package/lib/components/pisellModal/components/index.d.ts +0 -1
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Header/index.js +4 -3
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Sales/index.js +1 -1
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/index.d.ts +0 -1
- package/lib/components/table/Actions/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/fields/date/index.d.ts +0 -1
- package/lib/components/table/Table/fields/image/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/image/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +2 -3
- package/lib/components/table/Table/fields/link/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/index.d.ts +0 -1
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +0 -1
- package/lib/components/table/Table/fields/search/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/search/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/index.d.ts +0 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/versionSelect/index.d.ts +0 -1
- package/lib/components/virtual-keyboard/Amount/index.d.ts +10 -0
- package/lib/components/virtual-keyboard/Amount/index.js +8 -3
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +31 -8
- package/lib/components/virtual-keyboard/Keyboard/index.js +2 -1
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +34 -27
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/pisell-adjust-price/meta.ts +168 -0
- package/lowcode/pisell-adjust-price/snippets.ts +1 -0
- package/package.json +3 -3
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/es/components/drag-sort-tree/index.d.ts +0 -4
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisell-config-provider/index.d.ts +0 -12
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -93
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/es/components/productCard/locales.d.ts +0 -84
- package/es/components/productCard/status.d.ts +0 -32
- package/es/components/productCard/types.d.ts +0 -84
- package/es/components/table/types.d.ts +0 -251
- package/es/locales/en-US.d.ts +0 -278
- package/es/locales/zh-CN.d.ts +0 -273
- package/es/locales/zh-TW.d.ts +0 -273
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/lib/components/drag-sort-tree/index.d.ts +0 -4
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisell-config-provider/index.d.ts +0 -12
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -93
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/lib/components/productCard/locales.d.ts +0 -84
- package/lib/components/productCard/status.d.ts +0 -32
- package/lib/components/productCard/types.d.ts +0 -84
- package/lib/components/table/types.d.ts +0 -251
- package/lib/locales/en-US.d.ts +0 -278
- package/lib/locales/zh-CN.d.ts +0 -273
- package/lib/locales/zh-TW.d.ts +0 -273
|
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
155
155
|
sort?: SortType | undefined;
|
|
156
156
|
mode: "" | "localStorage" | "remote";
|
|
157
157
|
currentViewMode: ModeType;
|
|
158
|
-
}) => ("
|
|
158
|
+
}) => ("view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting")[];
|
|
159
159
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
160
160
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
161
161
|
export {};
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseNumberKeyboardProps } from '../BaseNumberKeyboard';
|
|
3
|
+
export interface RightItemsStyleProps {
|
|
4
|
+
buttonBackgroundColor?: string;
|
|
5
|
+
textColor?: string;
|
|
6
|
+
resetButtonBackgroundColor?: string;
|
|
7
|
+
resetButtonTextColor?: string;
|
|
8
|
+
isDoneButtonFollowTheme?: boolean;
|
|
9
|
+
doneButtonBackgroundColor?: string;
|
|
10
|
+
doneButtonTextColor?: string;
|
|
11
|
+
}
|
|
3
12
|
export interface AmountProps {
|
|
4
13
|
max?: number;
|
|
5
14
|
min?: number;
|
|
@@ -17,6 +26,7 @@ export interface AmountProps {
|
|
|
17
26
|
onEnter?: (val: string | number) => void;
|
|
18
27
|
defaultSelect?: boolean;
|
|
19
28
|
inputFormat?: (_v: string) => React.ReactNode | null;
|
|
29
|
+
rightItemsStyle?: RightItemsStyleProps;
|
|
20
30
|
}
|
|
21
31
|
declare const Amount: (props: AmountProps) => JSX.Element;
|
|
22
32
|
export default Amount;
|
|
@@ -48,7 +48,8 @@ var Amount = (props) => {
|
|
|
48
48
|
onEnter,
|
|
49
49
|
presets,
|
|
50
50
|
defaultSelect,
|
|
51
|
-
inputFormat
|
|
51
|
+
inputFormat,
|
|
52
|
+
rightItemsStyle
|
|
52
53
|
} = props;
|
|
53
54
|
const [value, setValue] = (0, import_ahooks.useControllableValue)(props, {
|
|
54
55
|
defaultValue: defaultValue || ""
|
|
@@ -71,7 +72,10 @@ var Amount = (props) => {
|
|
|
71
72
|
precision,
|
|
72
73
|
hideDecimalForWholeNumbers: false,
|
|
73
74
|
showCurrencySymbol: amountProps == null ? void 0 : amountProps.showCurrencySymbol,
|
|
74
|
-
useThousandsSeparator: amountProps == null ? void 0 : amountProps.useThousandsSeparator
|
|
75
|
+
useThousandsSeparator: amountProps == null ? void 0 : amountProps.useThousandsSeparator,
|
|
76
|
+
style: {
|
|
77
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.textColor) || "#000000"
|
|
78
|
+
}
|
|
75
79
|
}
|
|
76
80
|
), endWith && ".");
|
|
77
81
|
};
|
|
@@ -89,7 +93,8 @@ var Amount = (props) => {
|
|
|
89
93
|
doneText,
|
|
90
94
|
resetText,
|
|
91
95
|
onEnter,
|
|
92
|
-
presets
|
|
96
|
+
presets,
|
|
97
|
+
rightItemsStyle
|
|
93
98
|
}
|
|
94
99
|
);
|
|
95
100
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PresetsProps } from
|
|
2
|
+
import { PresetsProps } from './Presets';
|
|
3
|
+
import { RightItemsStyleProps } from '../Amount';
|
|
3
4
|
import './index.less';
|
|
4
5
|
export interface BaseNumberKeyboardProps {
|
|
5
6
|
placeholder?: string;
|
|
@@ -14,6 +15,7 @@ export interface BaseNumberKeyboardProps {
|
|
|
14
15
|
min?: number;
|
|
15
16
|
presets?: PresetsProps['presets'];
|
|
16
17
|
defaultSelect?: boolean;
|
|
18
|
+
rightItemsStyle?: RightItemsStyleProps;
|
|
17
19
|
}
|
|
18
20
|
declare const BaseNumberKeyboard: (props: BaseNumberKeyboardProps) => JSX.Element;
|
|
19
21
|
export default BaseNumberKeyboard;
|
|
@@ -127,7 +127,8 @@ var BaseNumberKeyboard = (props) => {
|
|
|
127
127
|
min,
|
|
128
128
|
onEnter,
|
|
129
129
|
presets,
|
|
130
|
-
defaultSelect
|
|
130
|
+
defaultSelect,
|
|
131
|
+
rightItemsStyle
|
|
131
132
|
} = props;
|
|
132
133
|
const [value, setValue] = (0, import_ahooks.useControllableValue)(props, {
|
|
133
134
|
defaultValue
|
|
@@ -142,7 +143,11 @@ var BaseNumberKeyboard = (props) => {
|
|
|
142
143
|
value: "delete",
|
|
143
144
|
label: /* @__PURE__ */ import_react.default.createElement(import_Delete.default, { className: "virtual-keyboard-input-delete-icon" }),
|
|
144
145
|
disabled: false,
|
|
145
|
-
type: "text"
|
|
146
|
+
type: "text",
|
|
147
|
+
style: {
|
|
148
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.textColor) || "#000000",
|
|
149
|
+
backgroundColor: (rightItemsStyle == null ? void 0 : rightItemsStyle.buttonBackgroundColor) || "#ffffff"
|
|
150
|
+
}
|
|
146
151
|
},
|
|
147
152
|
{
|
|
148
153
|
value: "reset",
|
|
@@ -151,7 +156,8 @@ var BaseNumberKeyboard = (props) => {
|
|
|
151
156
|
type: "text",
|
|
152
157
|
style: {
|
|
153
158
|
fontSize: "18px",
|
|
154
|
-
color: "#D92D20"
|
|
159
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.resetButtonTextColor) || "#D92D20",
|
|
160
|
+
backgroundColor: (rightItemsStyle == null ? void 0 : rightItemsStyle.resetButtonBackgroundColor) || "#ffffff"
|
|
155
161
|
}
|
|
156
162
|
},
|
|
157
163
|
{
|
|
@@ -162,12 +168,25 @@ var BaseNumberKeyboard = (props) => {
|
|
|
162
168
|
size: 2,
|
|
163
169
|
style: {
|
|
164
170
|
fontSize: "18px",
|
|
165
|
-
background: "var(--
|
|
166
|
-
color: "#
|
|
171
|
+
background: (rightItemsStyle == null ? void 0 : rightItemsStyle.isDoneButtonFollowTheme) ? "var(--theme-color)" : (rightItemsStyle == null ? void 0 : rightItemsStyle.doneButtonBackgroundColor) || "#5d3f9f",
|
|
172
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.isDoneButtonFollowTheme) ? "#ffffff" : (rightItemsStyle == null ? void 0 : rightItemsStyle.doneButtonTextColor) || "#ffffff"
|
|
167
173
|
}
|
|
168
174
|
}
|
|
169
175
|
];
|
|
170
|
-
}, [doneText, resetText]);
|
|
176
|
+
}, [doneText, resetText, rightItemsStyle]);
|
|
177
|
+
const itemsWithStyle = (0, import_react.useMemo)(() => {
|
|
178
|
+
return items.map((item) => ({
|
|
179
|
+
...item,
|
|
180
|
+
style: {
|
|
181
|
+
backgroundColor: (rightItemsStyle == null ? void 0 : rightItemsStyle.buttonBackgroundColor) || "#fff",
|
|
182
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.textColor) || "#000000"
|
|
183
|
+
}
|
|
184
|
+
}));
|
|
185
|
+
}, [
|
|
186
|
+
items,
|
|
187
|
+
rightItemsStyle == null ? void 0 : rightItemsStyle.buttonBackgroundColor,
|
|
188
|
+
rightItemsStyle == null ? void 0 : rightItemsStyle.textColor
|
|
189
|
+
]);
|
|
171
190
|
const checkValue = (val) => {
|
|
172
191
|
if ((0, import_utils.isNumber)(max) && Number(val) > max) {
|
|
173
192
|
const newValue = Math.min(Number(val), Number(max));
|
|
@@ -229,12 +248,16 @@ var BaseNumberKeyboard = (props) => {
|
|
|
229
248
|
},
|
|
230
249
|
showDelete: false,
|
|
231
250
|
onValueSelect: setSelect,
|
|
232
|
-
defaultSelect
|
|
251
|
+
defaultSelect,
|
|
252
|
+
style: {
|
|
253
|
+
backgroundColor: (rightItemsStyle == null ? void 0 : rightItemsStyle.buttonBackgroundColor) || "#fff",
|
|
254
|
+
color: (rightItemsStyle == null ? void 0 : rightItemsStyle.textColor) || "#000000"
|
|
255
|
+
}
|
|
233
256
|
}
|
|
234
257
|
), /* @__PURE__ */ import_react.default.createElement(import_Presets.default, { presets, onChange: handleChangeValue }), /* @__PURE__ */ import_react.default.createElement(
|
|
235
258
|
import_Keyboard.default,
|
|
236
259
|
{
|
|
237
|
-
items,
|
|
260
|
+
items: itemsWithStyle,
|
|
238
261
|
rightItems,
|
|
239
262
|
onChange: handleKeyboardChange
|
|
240
263
|
}
|
|
@@ -124,7 +124,8 @@ var Keyboard = (props) => {
|
|
|
124
124
|
className: "virtual-keyboard-item-button",
|
|
125
125
|
style: {
|
|
126
126
|
fontSize: ((_a = item.style) == null ? void 0 : _a.fontSize) || 25,
|
|
127
|
-
color: item.type === "primary" ? "#fff" : ((_b = item.style) == null ? void 0 : _b.color) || void 0
|
|
127
|
+
color: item.type === "primary" ? "#fff" : ((_b = item.style) == null ? void 0 : _b.color) || void 0,
|
|
128
|
+
...item.type === "primary" ? item.style || {} : {}
|
|
128
129
|
},
|
|
129
130
|
disabled: item.disabled,
|
|
130
131
|
onClick: (e) => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { InputProps } from 'antd';
|
|
2
3
|
import './index.less';
|
|
3
4
|
export interface VirtualKeyInputProps extends InputProps {
|
|
@@ -6,6 +7,7 @@ export interface VirtualKeyInputProps extends InputProps {
|
|
|
6
7
|
showDelete?: boolean;
|
|
7
8
|
onValueSelect?: (selected: boolean) => void;
|
|
8
9
|
defaultSelect?: boolean;
|
|
10
|
+
style?: React.CSSProperties;
|
|
9
11
|
}
|
|
10
12
|
declare const VirtualKeyInput: (props: VirtualKeyInputProps) => JSX.Element;
|
|
11
13
|
export default VirtualKeyInput;
|
|
@@ -46,7 +46,8 @@ var VirtualKeyInput = (props) => {
|
|
|
46
46
|
value,
|
|
47
47
|
showDelete = true,
|
|
48
48
|
onValueSelect,
|
|
49
|
-
defaultSelect
|
|
49
|
+
defaultSelect,
|
|
50
|
+
style
|
|
50
51
|
} = props;
|
|
51
52
|
const [select, setSelect] = (0, import_react.useState)(defaultSelect ?? false);
|
|
52
53
|
(0, import_ahooks.useEventListener)("keydown", (ev) => {
|
|
@@ -72,35 +73,41 @@ var VirtualKeyInput = (props) => {
|
|
|
72
73
|
_val = _val.slice(0, _val.length - 1);
|
|
73
74
|
props.onChange && props.onChange({ target: { value: _val } });
|
|
74
75
|
};
|
|
75
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
76
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
76
77
|
"div",
|
|
77
78
|
{
|
|
78
|
-
className:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
onClick: () => {
|
|
82
|
-
if (value) {
|
|
83
|
-
handleSelectChange(!select);
|
|
84
|
-
}
|
|
79
|
+
className: "virtual-keyboard-input-wrap",
|
|
80
|
+
style: {
|
|
81
|
+
backgroundColor: (style == null ? void 0 : style.backgroundColor) || "#ffffff"
|
|
85
82
|
}
|
|
86
83
|
},
|
|
87
|
-
props.renderInput(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
104
|
-
|
|
84
|
+
props.renderInput ? /* @__PURE__ */ import_react.default.createElement(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
className: (0, import_classnames.default)("virtual-keyboard-input", {
|
|
88
|
+
"virtual-keyboard-input-select": select
|
|
89
|
+
}),
|
|
90
|
+
onClick: () => {
|
|
91
|
+
if (value) {
|
|
92
|
+
handleSelectChange(!select);
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
style: {
|
|
96
|
+
color: (style == null ? void 0 : style.color) || "#000000"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
props.renderInput(props)
|
|
100
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
101
|
+
import_antd.Input,
|
|
102
|
+
{
|
|
103
|
+
className: "virtual-keyboard-input",
|
|
104
|
+
bordered: false,
|
|
105
|
+
...props,
|
|
106
|
+
readOnly: true,
|
|
107
|
+
value: previewValue
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
((_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
|
|
111
|
+
);
|
|
105
112
|
};
|
|
106
113
|
var VirtualKeyInput_default = VirtualKeyInput;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -17,6 +17,174 @@ export default {
|
|
|
17
17
|
subName: "",
|
|
18
18
|
},
|
|
19
19
|
props: [
|
|
20
|
+
{
|
|
21
|
+
name: 'selectType',
|
|
22
|
+
title: { label: '选择类型', tip: 'selectType | 选择类型' },
|
|
23
|
+
setter: {
|
|
24
|
+
componentName: 'RadioGroupSetter',
|
|
25
|
+
props: {
|
|
26
|
+
options: [
|
|
27
|
+
{ title: 'Light', value: 'light' },
|
|
28
|
+
{ title: 'Dark', value: 'dark' },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
defaultValue: 'light',
|
|
33
|
+
extraProps: {
|
|
34
|
+
onChange: (value: string, target: any) => {
|
|
35
|
+
// 根据主题切换自动设置颜色
|
|
36
|
+
const isLight = value === 'light';
|
|
37
|
+
|
|
38
|
+
target.getProps().setPropValue('backgroundColor', isLight ? '#ffffff' : 'rgba(0, 0, 0, 0.70)');
|
|
39
|
+
target.getProps().setPropValue('containerBackgroundColor', isLight ? '#d0d5dd' : 'rgba(0, 0, 0, 0.40)');
|
|
40
|
+
target.getProps().setPropValue('buttonBackgroundColor', '#ffffff');
|
|
41
|
+
target.getProps().setPropValue('textColor', "#000000");
|
|
42
|
+
target.getProps().setPropValue('resetButtonBackgroundColor', '#ffffff');
|
|
43
|
+
target.getProps().setPropValue('resetButtonTextColor', "#d92d20");
|
|
44
|
+
target.getProps().setPropValue('doneButtonBackgroundColor', "#4ca30d");
|
|
45
|
+
target.getProps().setPropValue('doneButtonTextColor', "#ffffff");
|
|
46
|
+
target.getProps().setPropValue('isDoneButtonFollowTheme', true);
|
|
47
|
+
target.getProps().setPropValue('isShowMainText', true);
|
|
48
|
+
target.getProps().setPropValue('isShowSubText', true);
|
|
49
|
+
target.getProps().setPropValue('mainTextColor', isLight ? '#101828' : '#ffffff');
|
|
50
|
+
target.getProps().setPropValue('subTextColor', isLight ? '#667085' : '#d0d5dd');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "backgroundColor",
|
|
56
|
+
title: {
|
|
57
|
+
label: "背景色",
|
|
58
|
+
tip: "backgroundColor | 背景色",
|
|
59
|
+
},
|
|
60
|
+
propType: "string",
|
|
61
|
+
setter: "ColorSetter",
|
|
62
|
+
defaultValue: "#ffffff",
|
|
63
|
+
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "containerBackgroundColor",
|
|
67
|
+
title: {
|
|
68
|
+
label: "容器背景色",
|
|
69
|
+
tip: "containerBackgroundColor | 容器背景色",
|
|
70
|
+
},
|
|
71
|
+
propType: "string",
|
|
72
|
+
setter: "ColorSetter",
|
|
73
|
+
defaultValue: "#d0d5dd",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "buttonBackgroundColor",
|
|
77
|
+
title: {
|
|
78
|
+
label: "按钮背景色",
|
|
79
|
+
tip: "buttonBackgroundColor | 按钮背景色",
|
|
80
|
+
},
|
|
81
|
+
propType: "string",
|
|
82
|
+
setter: "ColorSetter",
|
|
83
|
+
defaultValue: "#ffffff",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "textColor",
|
|
87
|
+
title: {
|
|
88
|
+
label: "文本颜色",
|
|
89
|
+
tip: "textColor | 文本颜色",
|
|
90
|
+
},
|
|
91
|
+
propType: "string",
|
|
92
|
+
setter: "ColorSetter",
|
|
93
|
+
defaultValue: "#000000",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "resetButtonBackgroundColor",
|
|
97
|
+
title: {
|
|
98
|
+
label: "重置按钮背景色",
|
|
99
|
+
tip: "resetButtonBackgroundColor | 重置按钮背景色",
|
|
100
|
+
},
|
|
101
|
+
propType: "string",
|
|
102
|
+
setter: "ColorSetter",
|
|
103
|
+
defaultValue: "#ffffff",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "resetButtonTextColor",
|
|
107
|
+
title: {
|
|
108
|
+
label: "重置按钮文本颜色",
|
|
109
|
+
tip: "resetButtonTextColor | 重置按钮文本颜色",
|
|
110
|
+
},
|
|
111
|
+
propType: "string",
|
|
112
|
+
setter: "ColorSetter",
|
|
113
|
+
defaultValue: "#d92d20",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'isDoneButtonFollowTheme',
|
|
117
|
+
title: { label: 'Done按钮颜色跟随主题色', tip: 'isDoneButtonFollowTheme | Done按钮颜色跟随主题色' },
|
|
118
|
+
propType: 'bool',
|
|
119
|
+
defaultValue: true,
|
|
120
|
+
setter: 'BoolSetter'
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "doneButtonBackgroundColor",
|
|
124
|
+
title: {
|
|
125
|
+
label: "Done按钮背景色",
|
|
126
|
+
tip: "doneButtonBackgroundColor | Done按钮背景色",
|
|
127
|
+
},
|
|
128
|
+
propType: "string",
|
|
129
|
+
setter: "ColorSetter",
|
|
130
|
+
defaultValue: "#4ca30d",
|
|
131
|
+
condition(target: any) {
|
|
132
|
+
return !target.getProps().getPropValue("isDoneButtonFollowTheme");
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "doneButtonTextColor",
|
|
137
|
+
title: {
|
|
138
|
+
label: "Done按钮文本颜色",
|
|
139
|
+
tip: "doneButtonTextColor | Done按钮文本颜色",
|
|
140
|
+
},
|
|
141
|
+
propType: "string",
|
|
142
|
+
setter: "ColorSetter",
|
|
143
|
+
defaultValue: "#ffffff",
|
|
144
|
+
condition(target: any) {
|
|
145
|
+
return !target.getProps().getPropValue("isDoneButtonFollowTheme");
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: 'isShowMainText',
|
|
150
|
+
title: { label: '显示主文案', tip: 'isShowMainText | 显示主文案' },
|
|
151
|
+
propType: 'bool',
|
|
152
|
+
defaultValue: true,
|
|
153
|
+
setter: 'BoolSetter'
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: "mainTextColor",
|
|
157
|
+
title: {
|
|
158
|
+
label: "主文案颜色",
|
|
159
|
+
tip: "mainTextColor | 主文案颜色",
|
|
160
|
+
},
|
|
161
|
+
propType: "string",
|
|
162
|
+
setter: "ColorSetter",
|
|
163
|
+
defaultValue: "#101828",
|
|
164
|
+
condition(target: any) {
|
|
165
|
+
return target.getProps().getPropValue("isShowMainText");
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: 'isShowSubText',
|
|
170
|
+
title: { label: '显示副文案', tip: 'isShowSubText | 显示副文案' },
|
|
171
|
+
propType: 'bool',
|
|
172
|
+
defaultValue: true,
|
|
173
|
+
setter: 'BoolSetter'
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: "subTextColor",
|
|
177
|
+
title: {
|
|
178
|
+
label: "副文案颜色",
|
|
179
|
+
tip: "subTextColor | 副文案颜色",
|
|
180
|
+
},
|
|
181
|
+
propType: "string",
|
|
182
|
+
setter: "ColorSetter",
|
|
183
|
+
defaultValue: "#667085",
|
|
184
|
+
condition(target: any) {
|
|
185
|
+
return target.getProps().getPropValue("isShowSubText");
|
|
186
|
+
},
|
|
187
|
+
},
|
|
20
188
|
{
|
|
21
189
|
name: 'defaultValue',
|
|
22
190
|
title: { label: '默认值', tip: '默认值' },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.87",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"react-barcode": "^1.5.3",
|
|
73
73
|
"vod-js-sdk-v6": "^1.4.11",
|
|
74
74
|
"@pisell/date-picker": "1.0.101",
|
|
75
|
-
"@pisell/
|
|
76
|
-
"@pisell/
|
|
75
|
+
"@pisell/icon": "0.0.11",
|
|
76
|
+
"@pisell/utils": "2.0.1"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"react": "^18.0.0",
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ColumnType } from 'antd/es/table';
|
|
3
|
-
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
4
|
-
export declare type OperationItem = {
|
|
5
|
-
label?: string;
|
|
6
|
-
openMode: 'modal' | 'drawer' | 'custom';
|
|
7
|
-
openContentSize: 'small' | 'middle' | 'large';
|
|
8
|
-
openTitle: string;
|
|
9
|
-
actionType: 'detail' | 'edit' | 'delete' | 'custom';
|
|
10
|
-
key: string;
|
|
11
|
-
buttonProps?: any;
|
|
12
|
-
onClick?: (record: any) => void;
|
|
13
|
-
};
|
|
14
|
-
export interface DataSourceTableProps {
|
|
15
|
-
title?: string | React.ReactNode | (() => React.ReactNode);
|
|
16
|
-
subTitle?: string | React.ReactNode | (() => React.ReactNode);
|
|
17
|
-
titleButtons?: {
|
|
18
|
-
show: boolean;
|
|
19
|
-
maxCount: number;
|
|
20
|
-
items: OperationItem[];
|
|
21
|
-
};
|
|
22
|
-
tableButtons?: {
|
|
23
|
-
show: boolean;
|
|
24
|
-
maxCount: number;
|
|
25
|
-
items: OperationItem[];
|
|
26
|
-
};
|
|
27
|
-
buttons?: any[];
|
|
28
|
-
operation?: {
|
|
29
|
-
show: boolean;
|
|
30
|
-
title: string;
|
|
31
|
-
width: number;
|
|
32
|
-
align: 'left' | 'center' | 'right';
|
|
33
|
-
fixed: 'left' | 'right' | false;
|
|
34
|
-
type: 'link' | 'button';
|
|
35
|
-
items: OperationItem[];
|
|
36
|
-
};
|
|
37
|
-
operationContent?: {
|
|
38
|
-
[key: string]: React.ReactNode;
|
|
39
|
-
};
|
|
40
|
-
dataSource: DataSourceType;
|
|
41
|
-
columns: ColumnType<any>[];
|
|
42
|
-
filter: any;
|
|
43
|
-
search?: {
|
|
44
|
-
show: boolean;
|
|
45
|
-
placeholder: string;
|
|
46
|
-
};
|
|
47
|
-
__designMode: string;
|
|
48
|
-
componentId: string;
|
|
49
|
-
clickToDetail?: {
|
|
50
|
-
show: boolean;
|
|
51
|
-
useCustomAction: boolean;
|
|
52
|
-
actionType: string;
|
|
53
|
-
openMode: 'modal' | 'drawer';
|
|
54
|
-
openContentSize: 'small' | 'middle' | 'large';
|
|
55
|
-
openTitle: string;
|
|
56
|
-
key: string;
|
|
57
|
-
};
|
|
58
|
-
onRow?: any;
|
|
59
|
-
filterBy?: Record<string, any>;
|
|
60
|
-
sortBy: string;
|
|
61
|
-
tabs?: {
|
|
62
|
-
show: boolean;
|
|
63
|
-
type: string;
|
|
64
|
-
items: {
|
|
65
|
-
name: string;
|
|
66
|
-
filterBy: Record<string, any>;
|
|
67
|
-
sortBy: string;
|
|
68
|
-
}[];
|
|
69
|
-
};
|
|
70
|
-
onValuesChange?: (changedValues: any, values: any) => void;
|
|
71
|
-
extraParams?: {
|
|
72
|
-
list?: Record<string, any>;
|
|
73
|
-
get?: Record<string, any>;
|
|
74
|
-
update?: Record<string, any>;
|
|
75
|
-
create?: Record<string, any>;
|
|
76
|
-
destroy?: Record<string, any>;
|
|
77
|
-
};
|
|
78
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 获取nocobase数据列表
|
|
3
|
-
*/
|
|
4
|
-
export declare const getCountryDataList: () => Promise<any>;
|
|
5
|
-
export interface Country {
|
|
6
|
-
id: number;
|
|
7
|
-
name: {
|
|
8
|
-
en: string;
|
|
9
|
-
"zh-CN": string;
|
|
10
|
-
"zh-HK": string;
|
|
11
|
-
original: string;
|
|
12
|
-
};
|
|
13
|
-
code: string;
|
|
14
|
-
calling_code: string;
|
|
15
|
-
currency_code: string;
|
|
16
|
-
sort: number;
|
|
17
|
-
status: string;
|
|
18
|
-
created_at: string;
|
|
19
|
-
updated_at: string;
|
|
20
|
-
prefix: string;
|
|
21
|
-
}
|
|
22
|
-
export declare const useCountries: () => {
|
|
23
|
-
data: Country[];
|
|
24
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import './index.less';
|
|
2
|
-
import { ValueProps, SortType } from '../types';
|
|
3
|
-
declare type IdType = string | number;
|
|
4
|
-
declare type TreeItemProps = {
|
|
5
|
-
id: string | number;
|
|
6
|
-
key: string | number;
|
|
7
|
-
item: ValueProps | any;
|
|
8
|
-
depth: number;
|
|
9
|
-
lists: any[];
|
|
10
|
-
childrenProps?: SortType;
|
|
11
|
-
sensors?: any;
|
|
12
|
-
expandedKeys?: IdType[];
|
|
13
|
-
setExpandedKeys?: any;
|
|
14
|
-
onSelectKeys?: (ids: IdType) => void;
|
|
15
|
-
onChange?: (value: any[]) => void;
|
|
16
|
-
};
|
|
17
|
-
declare const TreeItem: (props: TreeItemProps) => JSX.Element;
|
|
18
|
-
export default TreeItem;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IconComponentProps } from '@ant-design/icons/es/components/Icon';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
interface IconFontProps extends IconComponentProps {
|
|
4
|
-
type: string;
|
|
5
|
-
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
6
|
-
}
|
|
7
|
-
declare const IconFont: React.FC<IconFontProps>;
|
|
8
|
-
export default IconFont;
|