@pisell/materials 6.3.9 → 6.3.11
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 +6 -6
- package/build/lowcode/preview.js +150 -169
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +27 -40
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +27 -40
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +11 -11
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/page/index.d.ts +1 -0
- package/es/components/pisellQRScanner/index.js +0 -8
- package/es/components/pisellText/components/Editable/index.js +130 -0
- package/es/components/pisellText/components/Editable/index.less +40 -0
- package/es/components/pisellText/index.js +2 -0
- package/es/components/select/index.js +4 -2
- package/es/components/select-time/index.d.ts +1 -0
- package/es/components/sortableList/index.js +2 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +11 -1
- package/es/components/table/Actions/component/ExportImport/index.js +55 -27
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/serve.js +8 -0
- package/es/components/tabs/index.js +9 -0
- package/es/components/walletCard/index.js +51 -40
- package/es/locales/en-US.js +2 -2
- package/es/locales/zh-CN.js +1 -1
- package/es/locales/zh-TW.js +1 -1
- package/es/typings.d.ts +7 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +11 -11
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/pisellText/components/Editable/index.js +139 -0
- package/lib/components/pisellText/components/Editable/index.less +40 -0
- package/lib/components/pisellText/index.js +2 -0
- package/lib/components/select/index.js +7 -2
- package/lib/components/select-time/index.d.ts +1 -0
- package/lib/components/sortableList/index.js +2 -2
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -1
- package/lib/components/table/Actions/component/ExportImport/index.js +37 -25
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/serve.js +8 -0
- package/lib/components/tabs/index.js +5 -0
- package/lib/components/walletCard/index.js +47 -29
- package/lib/locales/en-US.js +2 -2
- package/lib/locales/zh-CN.js +1 -1
- package/lib/locales/zh-TW.js +1 -1
- package/lib/typings.d.ts +7 -1
- package/lowcode/pisell-text.editable/meta.ts +115 -0
- package/lowcode/pisell-text.editable/snippets.ts +15 -0
- package/lowcode/sortable-list/meta.ts +1 -1
- package/lowcode/wallet-card/meta.ts +20 -0
- package/package.json +1 -1
- package/es/components/appVersionControl/index.d.ts +0 -4
- package/es/components/cardPro/index.d.ts +0 -3
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +0 -56
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +0 -17
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -25
- package/es/components/dataSourceComponents/fields/Upload/index.d.ts +0 -3
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -5
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
- 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/login-and-register/index.d.ts +0 -82
- package/es/components/pisell-config-provider/context.d.ts +0 -20
- package/es/components/pisell-config-provider/index.d.ts +0 -12
- package/es/components/pisellAdjustPrice/index.d.ts +0 -4
- package/es/components/pisellAdjustPrice/status.d.ts +0 -32
- package/es/components/pisellAdjustPrice/type.d.ts +0 -20
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/pisellQRScanner/index.d.ts +0 -37
- package/es/components/pisellQrcode/index.d.ts +0 -10
- package/es/components/pisellText/index.d.ts +0 -8
- package/es/components/productCard/components/Action/index.d.ts +0 -3
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/es/components/productCard/components/Time/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/select/index.d.ts +0 -9
- package/es/components/sortableList/index.d.ts +0 -11
- package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/es/components/table/Table/index.d.ts +0 -4
- package/es/components/table/serve.d.ts +0 -13
- package/es/components/table/types.d.ts +0 -268
- package/es/components/tabs/index.d.ts +0 -16
- package/es/components/versionModal/index.d.ts +0 -23
- package/es/components/virtual-keyboard/Amount/index.d.ts +0 -5
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -11
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Number/index.d.ts +0 -5
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Number/types.d.ts +0 -25
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/es/components/walletCard/index.d.ts +0 -71
- package/es/locales/en-US.d.ts +0 -290
- package/es/locales/zh-CN.d.ts +0 -285
- package/es/locales/zh-TW.d.ts +0 -285
- package/lib/components/appVersionControl/index.d.ts +0 -4
- package/lib/components/cardPro/index.d.ts +0 -3
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +0 -56
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +0 -17
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -25
- package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +0 -3
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -5
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
- 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/login-and-register/index.d.ts +0 -82
- package/lib/components/pisell-config-provider/context.d.ts +0 -20
- package/lib/components/pisell-config-provider/index.d.ts +0 -12
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -4
- package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
- package/lib/components/pisellAdjustPrice/type.d.ts +0 -20
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/pisellQRScanner/index.d.ts +0 -37
- package/lib/components/pisellQrcode/index.d.ts +0 -10
- package/lib/components/pisellText/index.d.ts +0 -8
- package/lib/components/productCard/components/Action/index.d.ts +0 -3
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/lib/components/productCard/components/Time/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/select/index.d.ts +0 -9
- package/lib/components/sortableList/index.d.ts +0 -11
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/lib/components/table/Table/index.d.ts +0 -4
- package/lib/components/table/serve.d.ts +0 -13
- package/lib/components/table/types.d.ts +0 -268
- package/lib/components/tabs/index.d.ts +0 -16
- package/lib/components/versionModal/index.d.ts +0 -23
- package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -5
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -11
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Number/index.d.ts +0 -5
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Number/types.d.ts +0 -25
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/lib/components/walletCard/index.d.ts +0 -71
- package/lib/locales/en-US.d.ts +0 -290
- package/lib/locales/zh-CN.d.ts +0 -285
- package/lib/locales/zh-TW.d.ts +0 -285
|
@@ -63,6 +63,7 @@ var ExportImport = ({ exportImport }) => {
|
|
|
63
63
|
const [type, setType] = (0, import_react.useState)(import_status.defaultOptions.exportType);
|
|
64
64
|
const [value, setValue] = (0, import_react.useState)("");
|
|
65
65
|
const [errorStatus, setErrorStatus] = (0, import_react.useState)();
|
|
66
|
+
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
66
67
|
const { state } = (0, import_hooks.useSharedState)(import_model.Context);
|
|
67
68
|
const { originResultDataSource, currentDataSource } = state;
|
|
68
69
|
const context = (0, import_useEngineContext.default)();
|
|
@@ -142,33 +143,43 @@ var ExportImport = ({ exportImport }) => {
|
|
|
142
143
|
});
|
|
143
144
|
const onOk = async () => {
|
|
144
145
|
const { apiUrl, otherParams } = exportImport;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
146
|
+
setLoading(true);
|
|
147
|
+
try {
|
|
148
|
+
if (value === import_status.defaultOptions.exportValue) {
|
|
149
|
+
const _params = {
|
|
150
|
+
type,
|
|
151
|
+
originDataSource: originResultDataSource,
|
|
152
|
+
currentDataSource
|
|
153
|
+
};
|
|
154
|
+
const result = await (0, import_function.batchExport)(_params, exportImport);
|
|
155
|
+
if (result) {
|
|
156
|
+
onCancel();
|
|
157
|
+
}
|
|
158
|
+
} else if (value === import_status.defaultOptions.importValue) {
|
|
159
|
+
const formData = new FormData();
|
|
160
|
+
formData.append("file", file);
|
|
161
|
+
const formId = otherParams == null ? void 0 : otherParams.form_id;
|
|
162
|
+
const formCode = otherParams == null ? void 0 : otherParams.code;
|
|
163
|
+
if (formId) {
|
|
164
|
+
formData.append("form_id", formId);
|
|
165
|
+
}
|
|
166
|
+
if (formCode) {
|
|
167
|
+
formData.append("code", formCode);
|
|
168
|
+
}
|
|
169
|
+
formData.append("url", (apiUrl == null ? void 0 : apiUrl.import) || "");
|
|
170
|
+
if (otherParams.import) {
|
|
171
|
+
Object.entries(otherParams.import).forEach(([key, value2]) => {
|
|
172
|
+
formData.append(key, value2);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
if (formData) {
|
|
176
|
+
import_antd.message.loading({ content: "Loading...", key: value });
|
|
177
|
+
await _batchImport.run(formData);
|
|
178
|
+
}
|
|
170
179
|
}
|
|
180
|
+
} catch (error) {
|
|
171
181
|
}
|
|
182
|
+
setLoading(false);
|
|
172
183
|
};
|
|
173
184
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
174
185
|
import_antd.Dropdown,
|
|
@@ -196,6 +207,7 @@ var ExportImport = ({ exportImport }) => {
|
|
|
196
207
|
onOk,
|
|
197
208
|
cancelText: (0, import_locales.getText)("table-action-export-import-cancel"),
|
|
198
209
|
okButtonProps: {
|
|
210
|
+
loading,
|
|
199
211
|
disabled: value === import_status.defaultOptions.importValue && (!file || !!errorStatus)
|
|
200
212
|
}
|
|
201
213
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const fieldMaps: {
|
|
2
3
|
text: {
|
|
3
4
|
field: {
|
|
@@ -197,12 +198,12 @@ export declare const fieldList: ({
|
|
|
197
198
|
field_icon: string;
|
|
198
199
|
field_name: string;
|
|
199
200
|
field_type: string;
|
|
200
|
-
default_value:
|
|
201
|
+
default_value: string;
|
|
201
202
|
} | {
|
|
202
203
|
field_icon: string;
|
|
203
204
|
field_name: string;
|
|
204
205
|
field_type: string;
|
|
205
|
-
default_value:
|
|
206
|
+
default_value: boolean;
|
|
206
207
|
} | {
|
|
207
208
|
field_icon: string;
|
|
208
209
|
field_name: string;
|
|
@@ -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
|
-
}) => ("filters" | "
|
|
158
|
+
}) => ("filters" | "filter_setting" | "view_mode" | "column_setting" | "order_by" | "group_by" | "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 {};
|
|
@@ -35,6 +35,14 @@ var defaultUrl = {
|
|
|
35
35
|
template: "/shop/form/data/download-template"
|
|
36
36
|
};
|
|
37
37
|
var formatApiParams = (params, type) => {
|
|
38
|
+
if (params instanceof FormData) {
|
|
39
|
+
let url = params.get("url");
|
|
40
|
+
params.delete("url");
|
|
41
|
+
return {
|
|
42
|
+
url: url || (defaultUrl == null ? void 0 : defaultUrl[type]),
|
|
43
|
+
params
|
|
44
|
+
};
|
|
45
|
+
}
|
|
38
46
|
const _url = (params == null ? void 0 : params.url) || (defaultUrl == null ? void 0 : defaultUrl[type]);
|
|
39
47
|
let _params = { ...params };
|
|
40
48
|
delete _params.url;
|
|
@@ -46,6 +46,11 @@ var Tabs = class extends import_react.Component {
|
|
|
46
46
|
componentDidMount() {
|
|
47
47
|
document.body.id = "body";
|
|
48
48
|
}
|
|
49
|
+
componentDidUpdate(prevProps) {
|
|
50
|
+
if (prevProps.activeKey !== this.props.activeKey) {
|
|
51
|
+
this.setState({ activeKey: this.props.activeKey });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
49
54
|
_handleChange = (key) => {
|
|
50
55
|
this.setActiveKey(key);
|
|
51
56
|
};
|
|
@@ -53,7 +53,7 @@ var DEFAULT_PROPS = {
|
|
|
53
53
|
showWalletName: true,
|
|
54
54
|
shopName: "Store name",
|
|
55
55
|
showShopName: true,
|
|
56
|
-
cardNo: "
|
|
56
|
+
cardNo: "WL0000000001",
|
|
57
57
|
cardStyle: "normal",
|
|
58
58
|
codeType: "barCode",
|
|
59
59
|
platform: "pc",
|
|
@@ -64,24 +64,44 @@ var DEFAULT_PROPS = {
|
|
|
64
64
|
isLogin: true,
|
|
65
65
|
items: [
|
|
66
66
|
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
type: "rechargeable",
|
|
68
|
+
display: 1,
|
|
69
|
+
custom_title: {
|
|
70
|
+
original: "Balance",
|
|
71
|
+
"zh-CN": "充值卡",
|
|
72
|
+
"zh-HK": "充值卡",
|
|
73
|
+
en: "Balance"
|
|
74
|
+
}
|
|
70
75
|
},
|
|
71
76
|
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
type: "point",
|
|
78
|
+
display: 1,
|
|
79
|
+
custom_title: {
|
|
80
|
+
original: "Points",
|
|
81
|
+
"zh-CN": "积分卡",
|
|
82
|
+
"zh-HK": "積分卡",
|
|
83
|
+
en: "Points"
|
|
84
|
+
}
|
|
75
85
|
},
|
|
76
86
|
{
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
87
|
+
type: "voucher",
|
|
88
|
+
display: 1,
|
|
89
|
+
custom_title: {
|
|
90
|
+
original: "Voucher",
|
|
91
|
+
"zh-CN": "代金券",
|
|
92
|
+
"zh-HK": "代金券",
|
|
93
|
+
en: "Voucher"
|
|
94
|
+
}
|
|
80
95
|
},
|
|
81
96
|
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
97
|
+
type: "discount",
|
|
98
|
+
display: 1,
|
|
99
|
+
custom_title: {
|
|
100
|
+
original: "Discount",
|
|
101
|
+
"zh-CN": "折扣卡",
|
|
102
|
+
"zh-HK": "折扣卡",
|
|
103
|
+
en: "Discount"
|
|
104
|
+
}
|
|
85
105
|
}
|
|
86
106
|
]
|
|
87
107
|
};
|
|
@@ -101,7 +121,7 @@ var useCodeModal = (cardNo, onCodeClick, codeType) => {
|
|
|
101
121
|
e.stopPropagation();
|
|
102
122
|
if ((_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b.call(_a2)) {
|
|
103
123
|
const typeMap = {
|
|
104
|
-
|
|
124
|
+
qrCode: "qrCode",
|
|
105
125
|
barCode: "barCode"
|
|
106
126
|
};
|
|
107
127
|
(_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.postMessageToApp) == null ? void 0 : _d.call(_c, {
|
|
@@ -188,8 +208,12 @@ var CardHeader = ({
|
|
|
188
208
|
)));
|
|
189
209
|
};
|
|
190
210
|
var CardItem = ({ item, symbol }) => {
|
|
191
|
-
|
|
192
|
-
|
|
211
|
+
var _a;
|
|
212
|
+
const { type, custom_title, value } = item;
|
|
213
|
+
const context = (0, import_useEngineContext.default)();
|
|
214
|
+
const utils = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils;
|
|
215
|
+
const translationOriginal = (utils == null ? void 0 : utils.translationOriginal) || (utils == null ? void 0 : utils.translation);
|
|
216
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item-label" }, translationOriginal(custom_title || "") || ""), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item-value" }, type === "rechargeable" ? /* @__PURE__ */ import_react.default.createElement(
|
|
193
217
|
import_Amount.default,
|
|
194
218
|
{
|
|
195
219
|
className: "pisell-card-amount-item-value",
|
|
@@ -199,27 +223,19 @@ var CardItem = ({ item, symbol }) => {
|
|
|
199
223
|
showCurrencySymbol: true,
|
|
200
224
|
value
|
|
201
225
|
}
|
|
202
|
-
) : value));
|
|
226
|
+
) : value || "0"));
|
|
203
227
|
};
|
|
204
228
|
var CardContent = ({ items, symbol }) => {
|
|
205
|
-
const
|
|
206
|
-
const sortedItems = (0, import_react.useMemo)(() => {
|
|
207
|
-
if (!(items == null ? void 0 : items.length)) return [];
|
|
208
|
-
return [...items].sort((a, b) => {
|
|
209
|
-
const indexA = expectedOrder.indexOf(a.key);
|
|
210
|
-
const indexB = expectedOrder.indexOf(b.key);
|
|
211
|
-
return indexA - indexB;
|
|
212
|
-
});
|
|
213
|
-
}, [items]);
|
|
229
|
+
const filteredItems = (items || []).filter((item) => item.display !== 0);
|
|
214
230
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
215
231
|
"div",
|
|
216
232
|
{
|
|
217
233
|
className: "pisell-wallet-card-list",
|
|
218
234
|
style: {
|
|
219
|
-
justifyContent:
|
|
235
|
+
justifyContent: filteredItems.length > 1 ? "space-between" : "flex-start"
|
|
220
236
|
}
|
|
221
237
|
},
|
|
222
|
-
|
|
238
|
+
filteredItems.map((item, index) => /* @__PURE__ */ import_react.default.createElement(CardItem, { key: index, item, symbol }))
|
|
223
239
|
);
|
|
224
240
|
};
|
|
225
241
|
var CodeDisplay = ({ codeType, cardNo }) => {
|
|
@@ -336,7 +352,9 @@ var WalletCard = (props) => {
|
|
|
336
352
|
}
|
|
337
353
|
utils == null ? void 0 : utils.action({
|
|
338
354
|
type: "pisell1.goWallet",
|
|
339
|
-
data: {
|
|
355
|
+
data: {
|
|
356
|
+
id: props.id
|
|
357
|
+
},
|
|
340
358
|
callback: () => {
|
|
341
359
|
}
|
|
342
360
|
});
|
package/lib/locales/en-US.js
CHANGED
|
@@ -168,7 +168,7 @@ var en_US_default = {
|
|
|
168
168
|
"pisell-adjust-price-total-after-discount": "Total after discount: ",
|
|
169
169
|
"pisell-adjust-price-discount-can-be-maximum": "Discount can be maximum",
|
|
170
170
|
"pisell-discount-card-title": "Discount",
|
|
171
|
-
"pisell-discount-card-unit": "
|
|
171
|
+
"pisell-discount-card-unit": "OFF",
|
|
172
172
|
"pisell-discount-card-fixed-amount-prefix": "Save",
|
|
173
173
|
// 数据源表格
|
|
174
174
|
"pisell-data-source-table-add": "Add",
|
|
@@ -215,7 +215,7 @@ var en_US_default = {
|
|
|
215
215
|
"pisell-action-get-data": "Please get data first",
|
|
216
216
|
"pisell-action-delete-success": "Deleted successfully",
|
|
217
217
|
"pisell-action-delete-failed": "Delete failed, please try again",
|
|
218
|
-
"walletCard-
|
|
218
|
+
"walletCard-point": "Points",
|
|
219
219
|
"walletCard-rechargeable": "Balance",
|
|
220
220
|
"walletCard-voucher": "Voucher",
|
|
221
221
|
"walletCard-discount": "Discount",
|
package/lib/locales/zh-CN.js
CHANGED
|
@@ -214,7 +214,7 @@ var zh_CN_default = {
|
|
|
214
214
|
"pisell-action-get-data": "请先获取数据",
|
|
215
215
|
"pisell-action-delete-success": "删除成功",
|
|
216
216
|
"pisell-action-delete-failed": "删除失败,请重试",
|
|
217
|
-
"walletCard-
|
|
217
|
+
"walletCard-point": "积分",
|
|
218
218
|
"walletCard-rechargeable": "余额",
|
|
219
219
|
"walletCard-voucher": "代金券",
|
|
220
220
|
"walletCard-discount": "折扣卡",
|
package/lib/locales/zh-TW.js
CHANGED
|
@@ -214,7 +214,7 @@ var zh_TW_default = {
|
|
|
214
214
|
"pisell-action-get-data": "請先獲取數據",
|
|
215
215
|
"pisell-action-delete-success": "刪除成功",
|
|
216
216
|
"pisell-action-delete-failed": "刪除失敗,請重試",
|
|
217
|
-
"walletCard-
|
|
217
|
+
"walletCard-point": "積分",
|
|
218
218
|
"walletCard-rechargeable": "餘額",
|
|
219
219
|
"walletCard-voucher": "代金券",
|
|
220
220
|
"walletCard-discount": "折扣卡",
|
package/lib/typings.d.ts
CHANGED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'PisellText.Editable',
|
|
6
|
+
title: '可编辑文本',
|
|
7
|
+
category: '数据输入',
|
|
8
|
+
docUrl: '',
|
|
9
|
+
screenshot: '',
|
|
10
|
+
devMode: 'proCode',
|
|
11
|
+
npm: {
|
|
12
|
+
package: '@pisell/materials',
|
|
13
|
+
version: '1.0.1',
|
|
14
|
+
exportName: 'PisellText',
|
|
15
|
+
main: 'src/index.tsx',
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: 'Editable',
|
|
18
|
+
},
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: 'value',
|
|
22
|
+
title: {
|
|
23
|
+
label: '文本内容',
|
|
24
|
+
tip: '文本内容,支持字符串或多语言对象'
|
|
25
|
+
},
|
|
26
|
+
propType: {
|
|
27
|
+
type: 'oneOfType',
|
|
28
|
+
value: ['string', 'object']
|
|
29
|
+
},
|
|
30
|
+
setter: {
|
|
31
|
+
componentName: 'MixedSetter',
|
|
32
|
+
props: {
|
|
33
|
+
setters: [
|
|
34
|
+
'StringSetter',
|
|
35
|
+
'JsonSetter'
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'editable',
|
|
42
|
+
title: {
|
|
43
|
+
label: '启用编辑',
|
|
44
|
+
tip: '启用编辑功能,支持布尔值或详细配置对象',
|
|
45
|
+
},
|
|
46
|
+
propType: {
|
|
47
|
+
type: 'oneOfType',
|
|
48
|
+
value: ['bool', 'object']
|
|
49
|
+
},
|
|
50
|
+
setter: {
|
|
51
|
+
componentName: 'MixedSetter',
|
|
52
|
+
props: {
|
|
53
|
+
setters: [
|
|
54
|
+
'BoolSetter',
|
|
55
|
+
{
|
|
56
|
+
componentName: 'ObjectSetter',
|
|
57
|
+
props: {
|
|
58
|
+
config: {
|
|
59
|
+
items: [
|
|
60
|
+
{
|
|
61
|
+
name: 'disabled',
|
|
62
|
+
title: { label: '禁用编辑', tip: '是否禁用编辑功能' },
|
|
63
|
+
propType: 'bool',
|
|
64
|
+
setter: 'BoolSetter',
|
|
65
|
+
defaultValue: false,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'maxLength',
|
|
69
|
+
title: { label: '最大长度', tip: '编辑时的最大字符长度' },
|
|
70
|
+
propType: 'number',
|
|
71
|
+
setter: 'NumberSetter',
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
defaultValue: false,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'size',
|
|
84
|
+
title: { label: '尺寸', tip: '输入框尺寸' },
|
|
85
|
+
propType: { type: 'oneOf', value: ['large', 'middle', 'small'] },
|
|
86
|
+
setter: [
|
|
87
|
+
{
|
|
88
|
+
componentName: 'RadioGroupSetter',
|
|
89
|
+
props: {
|
|
90
|
+
options: [
|
|
91
|
+
{ title: 'Large', value: 'large' },
|
|
92
|
+
{ title: 'Middle', value: 'middle' },
|
|
93
|
+
{ title: 'Small', value: 'small' },
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
'VariableSetter'
|
|
98
|
+
],
|
|
99
|
+
defaultValue: 'middle',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'className',
|
|
103
|
+
title: { label: '类名', tip: '自定义CSS类名' },
|
|
104
|
+
propType: 'string',
|
|
105
|
+
setter: 'StringSetter',
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
configure: {
|
|
109
|
+
supports: {
|
|
110
|
+
style: true,
|
|
111
|
+
className: true,
|
|
112
|
+
events: ['onChange'],
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
};
|
|
@@ -241,6 +241,26 @@ export default {
|
|
|
241
241
|
setter: 'BoolSetter',
|
|
242
242
|
defaultValue: false,
|
|
243
243
|
},
|
|
244
|
+
{
|
|
245
|
+
name: 'codeType',
|
|
246
|
+
title: {
|
|
247
|
+
label: {
|
|
248
|
+
type: 'i18n',
|
|
249
|
+
'en-US': 'Code Type',
|
|
250
|
+
'zh-CN': '条码类型',
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
setter: {
|
|
254
|
+
componentName: 'RadioGroupSetter',
|
|
255
|
+
props: {
|
|
256
|
+
options: [
|
|
257
|
+
{ title: '条形码', value: 'barCode' },
|
|
258
|
+
{ title: '二维码', value: 'qrCode' },
|
|
259
|
+
],
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
defaultValue: 'qrCode',
|
|
263
|
+
},
|
|
244
264
|
],
|
|
245
265
|
},
|
|
246
266
|
{
|
package/package.json
CHANGED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FormInstance } from 'antd';
|
|
3
|
-
import { ModeType } from './type';
|
|
4
|
-
import './style.less';
|
|
5
|
-
export interface WithModeProps {
|
|
6
|
-
renderMode?: ModeType;
|
|
7
|
-
value?: any;
|
|
8
|
-
onChange?: (value: any) => void;
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @title: 增加renderMode属性
|
|
13
|
-
* @description: 基于renderMode属性控制渲染模式
|
|
14
|
-
* @return: *
|
|
15
|
-
* @Author: shengjie.zuo
|
|
16
|
-
* @Date: 2024-11-23 17:13:18
|
|
17
|
-
*/
|
|
18
|
-
export declare const withMode: <P extends object>(FieldComponent: React.ComponentType<P>, ReadPrettyComponent?: React.ComponentType<P & {
|
|
19
|
-
renderMode: ModeType;
|
|
20
|
-
}> | undefined, transformProps?: ((props: P, renderMode: ModeType) => P) | undefined) => React.FC<P & WithModeProps>;
|
|
21
|
-
export interface WithFormItemProps {
|
|
22
|
-
name: string;
|
|
23
|
-
label?: string;
|
|
24
|
-
mode?: ModeType;
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
}
|
|
27
|
-
export declare const formItemNameReplace: (name: string) => string;
|
|
28
|
-
export declare const formItemNameReverse: (name: string) => string;
|
|
29
|
-
export declare const isValidDomain: (value: string) => boolean;
|
|
30
|
-
/**
|
|
31
|
-
* @title: 追加formItem层
|
|
32
|
-
* @description:
|
|
33
|
-
* @return: *
|
|
34
|
-
* @Author: shengjie.zuo
|
|
35
|
-
* @Date: 2024-11-23 17:14:25
|
|
36
|
-
*/
|
|
37
|
-
export declare const withFormItem: <P extends object>(WrappedComponent: React.ComponentType<P>, overlayProps?: {
|
|
38
|
-
otherFormItemProps?: Record<string, any> | ((props: Record<string, any>, others?: Record<string, any>) => Record<string, any>) | undefined;
|
|
39
|
-
innerProps?: Record<string, any> | undefined;
|
|
40
|
-
} | undefined) => React.FC<P & WithFormItemProps>;
|
|
41
|
-
export declare const withDataSource: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
42
|
-
dataSource?: any;
|
|
43
|
-
}) => JSX.Element;
|
|
44
|
-
export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
45
|
-
options?: any;
|
|
46
|
-
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
47
|
-
labelField: string;
|
|
48
|
-
valueField: string;
|
|
49
|
-
extraParams?: Record<string, any> | undefined;
|
|
50
|
-
}) => JSX.Element;
|
|
51
|
-
export declare const getNestedValue: (obj: Record<string, any>, path: string) => Record<string, any>;
|
|
52
|
-
export declare const renderValueWithMap: (value: any, valueMap?: Record<string, string>, renderMode?: ModeType) => JSX.Element | null;
|
|
53
|
-
export declare function toArr(str: string | number | (string | number)[]): (string | number)[];
|
|
54
|
-
export declare const filterSystemFields: (params: Record<string, any>) => Record<string, any>;
|
|
55
|
-
export declare const transformFormObjToArrayWithUntouched: (obj: Record<string, any>) => any[];
|
|
56
|
-
export declare const setFormFieldsUntouched: (form: FormInstance) => void;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Drawer } from 'antd';
|
|
2
|
-
import { OperationItem } from '../type';
|
|
3
|
-
declare const useDrawerState: (operationContent?: {
|
|
4
|
-
[key: string]: import("react").ReactNode;
|
|
5
|
-
} | undefined) => {
|
|
6
|
-
drawerVisible: boolean;
|
|
7
|
-
setDrawerVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
8
|
-
openDrawer: (item: OperationItem) => void;
|
|
9
|
-
closeDrawer: () => void;
|
|
10
|
-
drawerContent: import("react").ReactNode;
|
|
11
|
-
Container: {
|
|
12
|
-
(props: import("../../../pisellModal").PisellModalProps): JSX.Element;
|
|
13
|
-
confirm: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
14
|
-
destroy: () => void;
|
|
15
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
16
|
-
};
|
|
17
|
-
info: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
18
|
-
destroy: () => void;
|
|
19
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
20
|
-
};
|
|
21
|
-
error: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
22
|
-
destroy: () => void;
|
|
23
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
24
|
-
};
|
|
25
|
-
warn: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => any;
|
|
26
|
-
warning: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
27
|
-
destroy: () => void;
|
|
28
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
29
|
-
};
|
|
30
|
-
success: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
31
|
-
destroy: () => void;
|
|
32
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
33
|
-
};
|
|
34
|
-
Information: (props: import("../../../pisellModal/components/Information").InformationProps) => JSX.Element;
|
|
35
|
-
} | typeof Drawer;
|
|
36
|
-
containerProps: {};
|
|
37
|
-
};
|
|
38
|
-
export default useDrawerState;
|