@pisell/materials 6.3.8 → 6.3.10
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 +5 -5
- package/build/lowcode/preview.js +155 -150
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +24 -25
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +34 -35
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +158 -22
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +21 -22
- package/es/components/pisellQRScanner/index.d.ts +0 -13
- package/es/components/pisellQRScanner/index.js +0 -8
- package/es/components/pisellText/components/Editable/index.d.ts +29 -0
- 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.d.ts +1 -0
- package/es/components/pisellText/index.js +2 -0
- package/es/components/pisellWalletPassCard/index.d.ts +0 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/select/index.js +4 -2
- package/es/components/select-time/index.d.ts +0 -1
- package/es/components/sortableList/index.d.ts +1 -1
- package/es/components/sortableList/index.js +2 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -1
- package/es/components/table/Actions/component/ExportImport/index.js +55 -27
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -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/table/serve.js +8 -0
- package/es/components/tabs/index.d.ts +1 -0
- package/es/components/tabs/index.js +9 -0
- package/es/components/walletCard/index.d.ts +11 -11
- package/es/components/walletCard/index.js +51 -40
- package/es/locales/en-US.d.ts +1 -1
- package/es/locales/en-US.js +2 -2
- package/es/locales/zh-CN.d.ts +1 -1
- package/es/locales/zh-CN.js +1 -1
- package/es/locales/zh-TW.d.ts +1 -1
- package/es/locales/zh-TW.js +1 -1
- package/es/typings.d.ts +7 -1
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +182 -18
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +21 -22
- package/lib/components/pisellQRScanner/index.d.ts +0 -13
- package/lib/components/pisellText/components/Editable/index.d.ts +29 -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.d.ts +1 -0
- package/lib/components/pisellText/index.js +2 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +0 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/select/index.js +7 -2
- package/lib/components/select-time/index.d.ts +0 -1
- package/lib/components/sortableList/index.d.ts +1 -1
- package/lib/components/sortableList/index.js +2 -2
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +7 -1
- package/lib/components/table/Actions/component/ExportImport/index.js +37 -25
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -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/table/serve.js +8 -0
- package/lib/components/tabs/index.d.ts +1 -0
- package/lib/components/tabs/index.js +5 -0
- package/lib/components/walletCard/index.d.ts +11 -11
- package/lib/components/walletCard/index.js +47 -29
- package/lib/locales/en-US.d.ts +1 -1
- package/lib/locales/en-US.js +2 -2
- package/lib/locales/zh-CN.d.ts +1 -1
- package/lib/locales/zh-CN.js +1 -1
- package/lib/locales/zh-TW.d.ts +1 -1
- package/lib/locales/zh-TW.js +1 -1
- package/lib/typings.d.ts +7 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -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 +2 -2
package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js
CHANGED
|
@@ -27,6 +27,11 @@ var import_locales = require("../../../../../../../locales/index");
|
|
|
27
27
|
var import_serve = require("../../../../../serve");
|
|
28
28
|
var import_status = require("../../../../../status");
|
|
29
29
|
var import_file = require("../../utils/file");
|
|
30
|
+
var exportImportTypeMap = {
|
|
31
|
+
"current-page": "page",
|
|
32
|
+
"all-records": "all",
|
|
33
|
+
"selected-records": "select"
|
|
34
|
+
};
|
|
30
35
|
var _batchExport = async (params) => {
|
|
31
36
|
let { status } = await (0, import_serve.exportData)(params);
|
|
32
37
|
if (status) {
|
|
@@ -42,7 +47,7 @@ var _batchExport = async (params) => {
|
|
|
42
47
|
var batchExport = (exportParams, exportImport) => {
|
|
43
48
|
const { selectLists, apiUrl, otherParams } = exportImport;
|
|
44
49
|
let _name = (0, import_file.getFileDateName)();
|
|
45
|
-
let params = { ...otherParams };
|
|
50
|
+
let params = (otherParams == null ? void 0 : otherParams.export) ? { ...otherParams == null ? void 0 : otherParams.export } : { ...otherParams };
|
|
46
51
|
params.url = apiUrl == null ? void 0 : apiUrl.export;
|
|
47
52
|
console.log("exportParams", exportParams);
|
|
48
53
|
const type = (exportParams == null ? void 0 : exportParams.type) || import_status.defaultOptions.exportType;
|
|
@@ -72,6 +77,7 @@ var batchExport = (exportParams, exportImport) => {
|
|
|
72
77
|
params == null ? true : delete params.payment_status;
|
|
73
78
|
params == null ? true : delete params.status;
|
|
74
79
|
}
|
|
80
|
+
params.export_select = exportImportTypeMap[type];
|
|
75
81
|
return _batchExport(params);
|
|
76
82
|
};
|
|
77
83
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -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
|
},
|
|
@@ -197,12 +197,12 @@ export declare const fieldList: ({
|
|
|
197
197
|
field_icon: string;
|
|
198
198
|
field_name: string;
|
|
199
199
|
field_type: string;
|
|
200
|
-
default_value:
|
|
200
|
+
default_value: boolean;
|
|
201
201
|
} | {
|
|
202
202
|
field_icon: string;
|
|
203
203
|
field_name: string;
|
|
204
204
|
field_type: string;
|
|
205
|
-
default_value:
|
|
205
|
+
default_value: string;
|
|
206
206
|
} | {
|
|
207
207
|
field_icon: string;
|
|
208
208
|
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
|
-
}) => ("
|
|
158
|
+
}) => ("view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting" | "filters")[];
|
|
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
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
|
-
declare global {
|
|
4
|
-
namespace JSX {
|
|
5
|
-
interface IntrinsicElements {
|
|
6
|
-
[elemName: string]: any;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
3
|
export interface WalletCardItem {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
type: string;
|
|
5
|
+
custom_title?: string | {
|
|
6
|
+
original: string;
|
|
7
|
+
en: string;
|
|
8
|
+
'zh-CN': string;
|
|
9
|
+
'zh-HK': string;
|
|
10
|
+
};
|
|
11
|
+
display?: 0 | 1;
|
|
14
12
|
value?: number;
|
|
15
13
|
}
|
|
16
14
|
export interface WalletCardProps {
|
|
15
|
+
/** 钱包ID */
|
|
16
|
+
id?: string;
|
|
17
17
|
/** 二维码弹窗适配平台 */
|
|
18
18
|
platform?: 'pc' | 'h5' | 'ipad';
|
|
19
19
|
/** 卡片主题 */
|
|
@@ -21,7 +21,7 @@ export interface WalletCardProps {
|
|
|
21
21
|
/** 默认还是完整显示code */
|
|
22
22
|
cardStyle?: 'normal' | 'full';
|
|
23
23
|
/** 条形码还是二维码 */
|
|
24
|
-
codeType?: 'barCode' | '
|
|
24
|
+
codeType?: 'barCode' | 'qrCode';
|
|
25
25
|
/** 二维码方向 */
|
|
26
26
|
codeDirection?: 'bottom' | 'top';
|
|
27
27
|
/** 自定义背景图 */
|
|
@@ -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.d.ts
CHANGED
|
@@ -175,7 +175,7 @@ declare const _default: {
|
|
|
175
175
|
'pisell-action-get-data': string;
|
|
176
176
|
'pisell-action-delete-success': string;
|
|
177
177
|
'pisell-action-delete-failed': string;
|
|
178
|
-
'walletCard-
|
|
178
|
+
'walletCard-point': string;
|
|
179
179
|
'walletCard-rechargeable': string;
|
|
180
180
|
'walletCard-voucher': string;
|
|
181
181
|
'walletCard-discount': string;
|
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.d.ts
CHANGED
|
@@ -175,7 +175,7 @@ declare const _default: {
|
|
|
175
175
|
'pisell-action-get-data': string;
|
|
176
176
|
'pisell-action-delete-success': string;
|
|
177
177
|
'pisell-action-delete-failed': string;
|
|
178
|
-
'walletCard-
|
|
178
|
+
'walletCard-point': string;
|
|
179
179
|
'walletCard-rechargeable': string;
|
|
180
180
|
'walletCard-voucher': string;
|
|
181
181
|
'walletCard-discount': string;
|
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.d.ts
CHANGED
|
@@ -174,7 +174,7 @@ declare const _default: {
|
|
|
174
174
|
'pisell-action-get-data': string;
|
|
175
175
|
'pisell-action-delete-success': string;
|
|
176
176
|
'pisell-action-delete-failed': string;
|
|
177
|
-
'walletCard-
|
|
177
|
+
'walletCard-point': string;
|
|
178
178
|
'walletCard-rechargeable': string;
|
|
179
179
|
'walletCard-voucher': string;
|
|
180
180
|
'walletCard-discount': string;
|
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
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => any;
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.10",
|
|
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
|
"react-camera-pro": "1.4.0",
|
|
75
|
-
"@pisell/icon": "0.0.11",
|
|
76
75
|
"@pisell/date-picker": "3.0.4",
|
|
76
|
+
"@pisell/icon": "0.0.11",
|
|
77
77
|
"@pisell/utils": "3.0.1"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|