@pisell/materials 1.0.961 → 1.0.962
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 +1 -1
- package/build/lowcode/preview.js +148 -148
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +24 -20
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +26 -22
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +18 -5
- package/es/components/page/index.js +4 -2
- package/es/components/pisellWalletPassCard/index.js +80 -62
- package/es/components/pisellWalletPassCard/index.less +95 -33
- package/es/components/table/index.js +1 -1
- package/es/components/virtualInput/index.js +0 -1
- package/es/components/walletCard/index.js +61 -6
- package/es/components/walletCard/index.less +62 -2
- package/es/locales/en-US.js +6 -11
- package/es/locales/zh-CN.js +6 -11
- package/es/locales/zh-TW.js +6 -11
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +20 -10
- package/lib/components/page/index.js +3 -2
- package/lib/components/pisellWalletPassCard/index.js +62 -31
- package/lib/components/pisellWalletPassCard/index.less +95 -33
- package/lib/components/table/index.js +1 -1
- package/lib/components/virtualInput/index.js +0 -8
- package/lib/components/walletCard/index.js +57 -4
- package/lib/components/walletCard/index.less +62 -2
- package/lib/locales/en-US.js +3 -11
- package/lib/locales/zh-CN.js +3 -11
- package/lib/locales/zh-TW.js +3 -11
- package/package.json +2 -2
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -25
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +0 -4
- package/es/components/page/index.d.ts +0 -6
- package/es/components/pisellCardList/index.d.ts +0 -107
- package/es/components/pisellGoodPassCard/index.d.ts +0 -50
- package/es/components/pisellQRScanner/index.d.ts +0 -24
- package/es/components/pisellQrcode/index.d.ts +0 -10
- package/es/components/pisellText/components/Editable/index.d.ts +0 -29
- package/es/components/pisellText/index.d.ts +0 -9
- package/es/components/pisellWalletPassCard/index.d.ts +0 -140
- package/es/components/productCard/index.d.ts +0 -7
- 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/components/ExportTable/function.d.ts +0 -7
- package/es/components/table/serve.d.ts +0 -13
- package/es/components/tabs/index.d.ts +0 -17
- package/es/index.d.ts +0 -146
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -25
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +0 -4
- package/lib/components/page/index.d.ts +0 -6
- package/lib/components/pisellCardList/index.d.ts +0 -107
- package/lib/components/pisellGoodPassCard/index.d.ts +0 -50
- package/lib/components/pisellQRScanner/index.d.ts +0 -24
- package/lib/components/pisellQrcode/index.d.ts +0 -10
- package/lib/components/pisellText/components/Editable/index.d.ts +0 -29
- package/lib/components/pisellText/index.d.ts +0 -9
- package/lib/components/pisellWalletPassCard/index.d.ts +0 -140
- package/lib/components/productCard/index.d.ts +0 -7
- 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/components/ExportTable/function.d.ts +0 -7
- package/lib/components/table/serve.d.ts +0 -13
- package/lib/components/tabs/index.d.ts +0 -17
- package/lib/index.d.ts +0 -146
|
@@ -29,8 +29,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/virtualInput/index.tsx
|
|
30
30
|
var virtualInput_exports = {};
|
|
31
31
|
__export(virtualInput_exports, {
|
|
32
|
-
BaseVirtualInputProps: () => import_BaseVirtualInput2.BaseVirtualInputProps,
|
|
33
|
-
BaseVirtualInputRef: () => import_BaseVirtualInput2.BaseVirtualInputRef,
|
|
34
32
|
default: () => virtualInput_default
|
|
35
33
|
});
|
|
36
34
|
module.exports = __toCommonJS(virtualInput_exports);
|
|
@@ -39,7 +37,6 @@ var import_classnames = __toESM(require("classnames"));
|
|
|
39
37
|
var import_icon = __toESM(require("../icon"));
|
|
40
38
|
var import_BaseVirtualInput = __toESM(require("./BaseVirtualInput"));
|
|
41
39
|
var import_index = require("./index.less");
|
|
42
|
-
var import_BaseVirtualInput2 = require("./BaseVirtualInput");
|
|
43
40
|
var VirtualInput = (0, import_react.forwardRef)(
|
|
44
41
|
({
|
|
45
42
|
topContent,
|
|
@@ -95,8 +92,3 @@ var VirtualInput = (0, import_react.forwardRef)(
|
|
|
95
92
|
);
|
|
96
93
|
VirtualInput.displayName = "VirtualInput";
|
|
97
94
|
var virtualInput_default = VirtualInput;
|
|
98
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
-
0 && (module.exports = {
|
|
100
|
-
BaseVirtualInputProps,
|
|
101
|
-
BaseVirtualInputRef
|
|
102
|
-
});
|
|
@@ -62,6 +62,11 @@ var DEFAULT_PROPS = {
|
|
|
62
62
|
showCode: true,
|
|
63
63
|
walletName: "Level",
|
|
64
64
|
isLogin: true,
|
|
65
|
+
showHolderName: true,
|
|
66
|
+
holderType: "customer",
|
|
67
|
+
holder: null,
|
|
68
|
+
onSetHolder: () => {
|
|
69
|
+
},
|
|
65
70
|
items: [
|
|
66
71
|
{
|
|
67
72
|
type: "rechargeable",
|
|
@@ -166,7 +171,10 @@ var CardHeader = ({
|
|
|
166
171
|
onCodeClick,
|
|
167
172
|
isLogin = false,
|
|
168
173
|
showViewPin = false,
|
|
169
|
-
onViewPinClick
|
|
174
|
+
onViewPinClick,
|
|
175
|
+
showHolderName,
|
|
176
|
+
holderName,
|
|
177
|
+
onHolderClick
|
|
170
178
|
}) => {
|
|
171
179
|
const processedShowIcon = toBooleanValue(showIcon);
|
|
172
180
|
const processedShowWalletName = toBooleanValue(showWalletName);
|
|
@@ -181,7 +189,14 @@ var CardHeader = ({
|
|
|
181
189
|
alt: "wallet icon",
|
|
182
190
|
style: { width: "20px", height: "20px" }
|
|
183
191
|
}
|
|
184
|
-
)) : null, processedShowWalletName && walletName && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header-level-text" }, walletName)),
|
|
192
|
+
)) : null, processedShowWalletName && walletName && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header-level-text" }, walletName)), showHolderName && /* @__PURE__ */ import_react.default.createElement(
|
|
193
|
+
"div",
|
|
194
|
+
{
|
|
195
|
+
className: (0, import_classnames.default)("pisell-wallet-card-header-holder-name"),
|
|
196
|
+
onClick: onHolderClick
|
|
197
|
+
},
|
|
198
|
+
holderName
|
|
199
|
+
), processedShowShopName && shopName && /* @__PURE__ */ import_react.default.createElement("div", null, shopName), processedShowCardNo && cardNo && /* @__PURE__ */ import_react.default.createElement("div", null, cardNo), processedShowViewPin && /* @__PURE__ */ import_react.default.createElement(
|
|
185
200
|
"div",
|
|
186
201
|
{
|
|
187
202
|
className: "pisell-wallet-card-header-view-pin",
|
|
@@ -307,7 +322,11 @@ var WalletCard = (props) => {
|
|
|
307
322
|
onClick,
|
|
308
323
|
className,
|
|
309
324
|
style,
|
|
310
|
-
isGuide
|
|
325
|
+
isGuide,
|
|
326
|
+
showHolderName,
|
|
327
|
+
holderType,
|
|
328
|
+
holder,
|
|
329
|
+
onSetHolder
|
|
311
330
|
} = mergedProps;
|
|
312
331
|
const showIcon = toBooleanValue(mergedProps.showIcon);
|
|
313
332
|
const showWalletName = toBooleanValue(mergedProps.showWalletName);
|
|
@@ -367,6 +386,36 @@ var WalletCard = (props) => {
|
|
|
367
386
|
console.error("onViewPinClick方法需要传入");
|
|
368
387
|
}
|
|
369
388
|
};
|
|
389
|
+
const _renderMask = () => {
|
|
390
|
+
if (holderType === "customer") return null;
|
|
391
|
+
if (holderType === "custom" && !(holder == null ? void 0 : holder.id)) {
|
|
392
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-add-holder-mask" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-add-holder-mask-text" }, (0, import_locales.getText)("pisell2.wallet-card.add-holder-tip")), /* @__PURE__ */ import_react.default.createElement(
|
|
393
|
+
import_antd.Button,
|
|
394
|
+
{
|
|
395
|
+
type: "primary",
|
|
396
|
+
className: "pisell-wallet-add-holder-mask-button",
|
|
397
|
+
onClick: () => onSetHolder == null ? void 0 : onSetHolder()
|
|
398
|
+
},
|
|
399
|
+
(0, import_locales.getText)("pisell2.wallet-card.add-holder-button-text"),
|
|
400
|
+
/* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-user-edit", style: { fontSize: 16 } })
|
|
401
|
+
));
|
|
402
|
+
}
|
|
403
|
+
return null;
|
|
404
|
+
};
|
|
405
|
+
const _showHolderName = (0, import_react.useMemo)(() => {
|
|
406
|
+
return holderType === "custom" && showHolderName;
|
|
407
|
+
}, [holderType, showHolderName]);
|
|
408
|
+
const holderName = (0, import_react.useMemo)(() => {
|
|
409
|
+
if (holderType === "custom" && !(holder == null ? void 0 : holder.id)) {
|
|
410
|
+
return "--";
|
|
411
|
+
}
|
|
412
|
+
return (holder == null ? void 0 : holder.name) || "";
|
|
413
|
+
}, [holderType, holder]);
|
|
414
|
+
const handleHolderClick = (e) => {
|
|
415
|
+
e.stopPropagation();
|
|
416
|
+
e.preventDefault();
|
|
417
|
+
onSetHolder == null ? void 0 : onSetHolder(holder);
|
|
418
|
+
};
|
|
370
419
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
371
420
|
"div",
|
|
372
421
|
{
|
|
@@ -382,6 +431,7 @@ var WalletCard = (props) => {
|
|
|
382
431
|
flexDirection: codeDirection === "top" ? "column-reverse" : "column"
|
|
383
432
|
}
|
|
384
433
|
},
|
|
434
|
+
_renderMask(),
|
|
385
435
|
/* @__PURE__ */ import_react.default.createElement(
|
|
386
436
|
"div",
|
|
387
437
|
{
|
|
@@ -417,7 +467,10 @@ var WalletCard = (props) => {
|
|
|
417
467
|
onCodeClick: handleCodeClick,
|
|
418
468
|
isLogin,
|
|
419
469
|
showViewPin,
|
|
420
|
-
onViewPinClick
|
|
470
|
+
onViewPinClick,
|
|
471
|
+
showHolderName: _showHolderName,
|
|
472
|
+
holderName,
|
|
473
|
+
onHolderClick: handleHolderClick
|
|
421
474
|
}
|
|
422
475
|
),
|
|
423
476
|
/* @__PURE__ */ import_react.default.createElement(
|
|
@@ -9,6 +9,35 @@
|
|
|
9
9
|
width: 100%;
|
|
10
10
|
display: flex;
|
|
11
11
|
cursor: pointer;
|
|
12
|
+
position: relative;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.pisell-wallet-add-holder-mask {
|
|
16
|
+
position: absolute;
|
|
17
|
+
top: 0;
|
|
18
|
+
left: 0;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
gap: 16px;
|
|
27
|
+
|
|
28
|
+
&-text {
|
|
29
|
+
color: #fff;
|
|
30
|
+
text-align: center;
|
|
31
|
+
font-size: 16px;
|
|
32
|
+
font-style: normal;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
line-height: 24px;
|
|
35
|
+
white-space: pre-line;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&-button {
|
|
39
|
+
font-weight: bold;
|
|
40
|
+
}
|
|
12
41
|
}
|
|
13
42
|
|
|
14
43
|
// 卡片内容区域
|
|
@@ -35,6 +64,12 @@
|
|
|
35
64
|
color: #fff;
|
|
36
65
|
}
|
|
37
66
|
}
|
|
67
|
+
|
|
68
|
+
.pisell-wallet-card-header-holder-name {
|
|
69
|
+
color: var(--Gray-900, #101828);
|
|
70
|
+
border: 1px solid var(--Gray-100, #f2f4f7);
|
|
71
|
+
background: var(--Gray-100, #f2f4f7);
|
|
72
|
+
}
|
|
38
73
|
}
|
|
39
74
|
|
|
40
75
|
// 亮色主题
|
|
@@ -54,6 +89,12 @@
|
|
|
54
89
|
color: #101828;
|
|
55
90
|
}
|
|
56
91
|
}
|
|
92
|
+
|
|
93
|
+
.pisell-wallet-card-header-holder-name {
|
|
94
|
+
color: #fff;
|
|
95
|
+
border: 1px solid var(--Gray-600, #475467);
|
|
96
|
+
background: var(--Gray-600, #475467);
|
|
97
|
+
}
|
|
57
98
|
}
|
|
58
99
|
}
|
|
59
100
|
|
|
@@ -66,6 +107,25 @@
|
|
|
66
107
|
display: flex;
|
|
67
108
|
justify-content: space-between;
|
|
68
109
|
align-items: flex-start;
|
|
110
|
+
min-height: 100px;
|
|
111
|
+
|
|
112
|
+
.pisell-wallet-card-header-holder-name {
|
|
113
|
+
cursor: pointer;
|
|
114
|
+
display: inline-block;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
text-overflow: ellipsis;
|
|
117
|
+
white-space: nowrap;
|
|
118
|
+
padding: 2px 8px;
|
|
119
|
+
border-radius: 16px;
|
|
120
|
+
height: 22px;
|
|
121
|
+
min-width: 50px;
|
|
122
|
+
text-align: center;
|
|
123
|
+
font-size: 12px;
|
|
124
|
+
line-height: 16px;
|
|
125
|
+
max-width: 100%;
|
|
126
|
+
font-style: normal;
|
|
127
|
+
font-weight: 500;
|
|
128
|
+
}
|
|
69
129
|
|
|
70
130
|
// 头部左侧
|
|
71
131
|
.pisell-wallet-card-header-left {
|
|
@@ -78,7 +138,7 @@
|
|
|
78
138
|
display: flex;
|
|
79
139
|
align-items: center;
|
|
80
140
|
gap: 10px;
|
|
81
|
-
margin-bottom:
|
|
141
|
+
margin-bottom: 4px;
|
|
82
142
|
|
|
83
143
|
// 卡片名称文本
|
|
84
144
|
.pisell-wallet-card-header-level-text {
|
|
@@ -157,7 +217,7 @@
|
|
|
157
217
|
|
|
158
218
|
// 卡片内容列表
|
|
159
219
|
.pisell-wallet-card-list {
|
|
160
|
-
margin-top:
|
|
220
|
+
margin-top: unset;
|
|
161
221
|
height: 50px;
|
|
162
222
|
box-sizing: border-box;
|
|
163
223
|
display: flex;
|
package/lib/locales/en-US.js
CHANGED
|
@@ -399,15 +399,7 @@ var en_US_default = {
|
|
|
399
399
|
"pisell-upload-camera-capture": "Capture",
|
|
400
400
|
"pisell-upload-camera-retake": "Retake",
|
|
401
401
|
"pisell-upload-camera-use": "Use photo",
|
|
402
|
-
//
|
|
403
|
-
"
|
|
404
|
-
"
|
|
405
|
-
"pisell-list-load-more": "Load More",
|
|
406
|
-
"pisell-list-view-less": "View Less",
|
|
407
|
-
"pisell-list-pagination-total": (start, end, total) => `Showing ${start}-${end} of ${total} items`,
|
|
408
|
-
"pisell-list-scroll-down": "Scroll Down",
|
|
409
|
-
"pisell-list-scroll-right": "Scroll Right",
|
|
410
|
-
"pisell-list-pagination-page-of": (current, total) => `Page ${current} of ${total}`,
|
|
411
|
-
"pisell-list-pagination-previous": "Previous",
|
|
412
|
-
"pisell-list-pagination-next": "Next"
|
|
402
|
+
// 钱包卡片组件
|
|
403
|
+
"pisell2.wallet-card.add-holder-tip": "To ensure your benefits, please\r\nassign a holder to activate this card.",
|
|
404
|
+
"pisell2.wallet-card.add-holder-button-text": "Set Holder"
|
|
413
405
|
};
|
package/lib/locales/zh-CN.js
CHANGED
|
@@ -390,15 +390,7 @@ var zh_CN_default = {
|
|
|
390
390
|
"pisell-upload-camera-capture": "拍摄/拍照",
|
|
391
391
|
"pisell-upload-camera-retake": "重拍",
|
|
392
392
|
"pisell-upload-camera-use": "使用照片",
|
|
393
|
-
//
|
|
394
|
-
"
|
|
395
|
-
"
|
|
396
|
-
"pisell-list-load-more": "查看更多",
|
|
397
|
-
"pisell-list-view-less": "查看更少",
|
|
398
|
-
"pisell-list-pagination-total": (start, end, total) => `显示第 ${start}-${end} 条,共 ${total} 条`,
|
|
399
|
-
"pisell-list-scroll-down": "向下滚动",
|
|
400
|
-
"pisell-list-scroll-right": "向右滚动",
|
|
401
|
-
"pisell-list-pagination-page-of": (current, total) => `第 ${current} 页 共 ${total} 页`,
|
|
402
|
-
"pisell-list-pagination-previous": "上一页",
|
|
403
|
-
"pisell-list-pagination-next": "下一页"
|
|
393
|
+
// 钱包卡片组件
|
|
394
|
+
"pisell2.wallet-card.add-holder-tip": "为确保您的权益,此卡\r\n需指定使用人后方可激活使用。",
|
|
395
|
+
"pisell2.wallet-card.add-holder-button-text": "添加持有人"
|
|
404
396
|
};
|
package/lib/locales/zh-TW.js
CHANGED
|
@@ -391,15 +391,7 @@ var zh_TW_default = {
|
|
|
391
391
|
"pisell-upload-camera-capture": "拍攝/拍照",
|
|
392
392
|
"pisell-upload-camera-retake": "重拍",
|
|
393
393
|
"pisell-upload-camera-use": "使用照片",
|
|
394
|
-
//
|
|
395
|
-
"
|
|
396
|
-
"
|
|
397
|
-
"pisell-list-load-more": "查看更多",
|
|
398
|
-
"pisell-list-view-less": "查看更少",
|
|
399
|
-
"pisell-list-pagination-total": (start, end, total) => `顯示第 ${start}-${end} 條,共 ${total} 條`,
|
|
400
|
-
"pisell-list-scroll-down": "向下滾動",
|
|
401
|
-
"pisell-list-scroll-right": "向右滾動",
|
|
402
|
-
"pisell-list-pagination-page-of": (current, total) => `第 ${current} 頁 共 ${total} 頁`,
|
|
403
|
-
"pisell-list-pagination-previous": "上一頁",
|
|
404
|
-
"pisell-list-pagination-next": "下一頁"
|
|
394
|
+
// 钱包卡片组件
|
|
395
|
+
"pisell2.wallet-card.add-holder-tip": "為確保您的權益,此卡\r\n需指定使用人後方可激活使用。",
|
|
396
|
+
"pisell2.wallet-card.add-holder-button-text": "添加使用人"
|
|
405
397
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.962",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@use-gesture/react": "^10.3.1",
|
|
60
60
|
"@zxing/library": "0.21.2",
|
|
61
61
|
"ahooks": "^3.7.6",
|
|
62
|
-
"antd": "
|
|
62
|
+
"antd": "*",
|
|
63
63
|
"antd-img-crop": "^4.23.0",
|
|
64
64
|
"classnames": "^2.3.2",
|
|
65
65
|
"crypto-js": "^4.2.0",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 获取nocobase数据列表
|
|
3
|
-
*/
|
|
4
|
-
export declare const getCountryDataList: () => Promise<any>;
|
|
5
|
-
export declare const getShopCountryDataList: (locale?: any) => Promise<any>;
|
|
6
|
-
export interface Country {
|
|
7
|
-
id: number;
|
|
8
|
-
name: {
|
|
9
|
-
en: string;
|
|
10
|
-
'zh-CN': string;
|
|
11
|
-
'zh-HK': string;
|
|
12
|
-
original: string;
|
|
13
|
-
};
|
|
14
|
-
code: string;
|
|
15
|
-
calling_code: string;
|
|
16
|
-
currency_code: string;
|
|
17
|
-
sort: number;
|
|
18
|
-
status: string;
|
|
19
|
-
created_at: string;
|
|
20
|
-
updated_at: string;
|
|
21
|
-
prefix: string;
|
|
22
|
-
}
|
|
23
|
-
export declare const useCountries: () => {
|
|
24
|
-
data: Country[];
|
|
25
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface VariablesContextType {
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
variables?: Record<string, any>;
|
|
5
|
-
registerVariable?: (value: Record<string, any>) => void;
|
|
6
|
-
parseVariable?: (str: string, localVariables?: Record<string, any>) => any;
|
|
7
|
-
registerValueVariable?: (componentId: string, value: Record<string, any>) => void;
|
|
8
|
-
registerFunctionVariable?: (componentId: string, value: Record<string, any>) => void;
|
|
9
|
-
subscribeVariables?: (listener: (allVariables: Record<string, any>, updateVariables: Record<string, any>) => void) => () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const VariablesContext: import("react").Context<VariablesContextType>;
|
|
12
|
-
export default VariablesContext;
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PisellCheckboxGroupProps } from '../pisellCheckboxGroup';
|
|
3
|
-
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
|
-
import { PisellWalletPassCardProps, FormatOption } from '../pisellWalletPassCard';
|
|
5
|
-
import './index.less';
|
|
6
|
-
export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'options'> {
|
|
7
|
-
platform?: PisellContextType['platform'];
|
|
8
|
-
/** 当用户查看完所有记录时,底部会显示此消息 */
|
|
9
|
-
endMessage?: React.ReactNode;
|
|
10
|
-
/** 加载下次数据时的加载站位 */
|
|
11
|
-
loader?: React.ReactNode;
|
|
12
|
-
/** 是否有更多数据 */
|
|
13
|
-
hasMore: boolean;
|
|
14
|
-
/** 加载更多数据回调 */
|
|
15
|
-
loadMoreData?: () => Promise<void>;
|
|
16
|
-
/** 当前list数据 */
|
|
17
|
-
data: PisellWalletPassCardProps[];
|
|
18
|
-
/** list空数据时展示内容 */
|
|
19
|
-
empty?: React.ReactNode;
|
|
20
|
-
/** 是否展示空状态 */
|
|
21
|
-
showEmpty?: boolean;
|
|
22
|
-
/** 是否展示卡片名称 */
|
|
23
|
-
showName?: boolean;
|
|
24
|
-
/** 是否展示店铺名称 */
|
|
25
|
-
showStoreName?: boolean;
|
|
26
|
-
/** 是否展示核销金额 */
|
|
27
|
-
showRedeem?: boolean;
|
|
28
|
-
/** 是否展示余额 */
|
|
29
|
-
showBalance?: boolean;
|
|
30
|
-
/** 是否展示编码 */
|
|
31
|
-
showCode?: boolean;
|
|
32
|
-
/** 是否展示到期时间 */
|
|
33
|
-
showValidDate?: boolean;
|
|
34
|
-
/** 使用日程信息计算有效期 */
|
|
35
|
-
validDateBySchedule?: boolean;
|
|
36
|
-
/** 日程列表 */
|
|
37
|
-
scheduleList?: any[];
|
|
38
|
-
/** 是否展示详情按钮 */
|
|
39
|
-
showDetail?: boolean;
|
|
40
|
-
/** 是否展示二维码 */
|
|
41
|
-
showQrCode?: boolean;
|
|
42
|
-
/** 是否展示封面图 */
|
|
43
|
-
showCover?: boolean;
|
|
44
|
-
/** 是否余额货币单位 */
|
|
45
|
-
showBalanceSymbol?: boolean;
|
|
46
|
-
/** 卡片大小 */
|
|
47
|
-
type?: 'default' | 'mini';
|
|
48
|
-
/** 展示操作按钮 */
|
|
49
|
-
showActions?: boolean;
|
|
50
|
-
/** 操作按钮配置 */
|
|
51
|
-
actions?: {
|
|
52
|
-
/** 按钮展示方式 */
|
|
53
|
-
layout: 'expanded' | 'collapsed';
|
|
54
|
-
/** detail 按钮配置 */
|
|
55
|
-
detail?: {
|
|
56
|
-
visible: boolean;
|
|
57
|
-
iconColor: string;
|
|
58
|
-
};
|
|
59
|
-
/** edit按钮配置 */
|
|
60
|
-
edit?: {
|
|
61
|
-
visible: boolean;
|
|
62
|
-
iconColor: string;
|
|
63
|
-
dialogTitle: string;
|
|
64
|
-
enableDialog: boolean;
|
|
65
|
-
fields: {
|
|
66
|
-
name: string;
|
|
67
|
-
label: string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
/** 编辑编辑按钮后,弹窗展示之前 */
|
|
72
|
-
beforeEdit?: (value: any, index: number) => Promise<any> | boolean | void;
|
|
73
|
-
/** 编辑弹窗点击提交 */
|
|
74
|
-
onConfirmEdit?: (value: any, index: number, data: any) => void;
|
|
75
|
-
/** 是否展示状态标识 */
|
|
76
|
-
showStatus?: boolean;
|
|
77
|
-
/** 名称标题字号字重颜色配置 */
|
|
78
|
-
nameTitleStyle?: {
|
|
79
|
-
fontSize: number;
|
|
80
|
-
fontWeight: number;
|
|
81
|
-
color: string;
|
|
82
|
-
};
|
|
83
|
-
/** 开启编辑金额 */
|
|
84
|
-
enableEditAmount?: boolean;
|
|
85
|
-
/** 编辑金额事件 */
|
|
86
|
-
onConfirmEditAmount?: (value: number, index: number, data: any) => void;
|
|
87
|
-
/** 是否使用外部详情处理 */
|
|
88
|
-
useExternalDetail?: boolean;
|
|
89
|
-
/** 详情事件 */
|
|
90
|
-
onDetail?: (value: any, index: number) => void;
|
|
91
|
-
/** 自定义余额格式化函数,如果提供则优先使用 */
|
|
92
|
-
formatBalance?: (balance?: number, option?: FormatOption) => React.ReactNode;
|
|
93
|
-
/** 自定义余额标题格式化函数,如果提供则优先使用 */
|
|
94
|
-
formatBalanceTitle?: (balanceTitle?: string, option?: FormatOption) => React.ReactNode;
|
|
95
|
-
/** 自定义使用金额格式化函数,如果提供则优先使用 */
|
|
96
|
-
formatRedeem?: (redeem?: number, option?: FormatOption) => React.ReactNode;
|
|
97
|
-
/** 自定义使用金额标题格式化函数,如果提供则优先使用 */
|
|
98
|
-
formatRedeemTitle?: (redeemTitle?: string, option?: FormatOption) => React.ReactNode;
|
|
99
|
-
/** 编辑金额前事件 */
|
|
100
|
-
onBeforeEditAmount?: (value: any, index: number, data: any) => Promise<any> | boolean | void;
|
|
101
|
-
/** 选项点击事件 */
|
|
102
|
-
onItemClick?: (e: React.MouseEvent<HTMLDivElement>, option: any) => void;
|
|
103
|
-
/** 是否展示选中状态的背景色 */
|
|
104
|
-
showActiveBackground?: boolean;
|
|
105
|
-
}
|
|
106
|
-
declare const _default: React.NamedExoticComponent<PisellCardListProps>;
|
|
107
|
-
export default _default;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
interface ApplicableProductDetails {
|
|
4
|
-
amount: string;
|
|
5
|
-
type: string;
|
|
6
|
-
resource_id: number;
|
|
7
|
-
title: string;
|
|
8
|
-
original_amount: string;
|
|
9
|
-
}
|
|
10
|
-
interface Discount {
|
|
11
|
-
id: number;
|
|
12
|
-
product_name: string;
|
|
13
|
-
encoded: string;
|
|
14
|
-
code: string;
|
|
15
|
-
tag: string;
|
|
16
|
-
expire_time?: string;
|
|
17
|
-
product_id: number;
|
|
18
|
-
relation_type: string;
|
|
19
|
-
par_value: string;
|
|
20
|
-
used_par_value: string;
|
|
21
|
-
limit_status: string;
|
|
22
|
-
limited_relation_product_data: any;
|
|
23
|
-
balance: string;
|
|
24
|
-
format_title: any;
|
|
25
|
-
product: any;
|
|
26
|
-
savedAmount: number;
|
|
27
|
-
isDisabled: boolean;
|
|
28
|
-
isSelected?: boolean;
|
|
29
|
-
isAvailable?: boolean;
|
|
30
|
-
isUsed?: boolean;
|
|
31
|
-
applicableProductIds?: number[];
|
|
32
|
-
applicableProductDetails: ApplicableProductDetails[];
|
|
33
|
-
appliedProductDetails: any[];
|
|
34
|
-
}
|
|
35
|
-
export interface PisellGoodPassCardProps {
|
|
36
|
-
/**数据源 */
|
|
37
|
-
dataSource: Array<Discount>;
|
|
38
|
-
/**事件 */
|
|
39
|
-
onChange?: (current: {
|
|
40
|
-
id: string | number;
|
|
41
|
-
isSelected: boolean;
|
|
42
|
-
}) => void;
|
|
43
|
-
/**样式 */
|
|
44
|
-
style: React.CSSProperties;
|
|
45
|
-
/**快捷展示排序 */
|
|
46
|
-
mixedSort?: (val: Discount[]) => Discount[];
|
|
47
|
-
isInModal: boolean;
|
|
48
|
-
}
|
|
49
|
-
declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
|
|
50
|
-
export default index;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
export interface PisellQRScannerProps {
|
|
4
|
-
/** 是否可见 */
|
|
5
|
-
visible: boolean;
|
|
6
|
-
/** 是否显示上传图片按钮 */
|
|
7
|
-
showUpload?: boolean;
|
|
8
|
-
/** 关闭回调 */
|
|
9
|
-
onClose: () => void;
|
|
10
|
-
/** 扫码成功回调 */
|
|
11
|
-
onScan: (value: string) => void;
|
|
12
|
-
/**
|
|
13
|
-
* 样式属性,可选
|
|
14
|
-
* 注意: 不应传入renderMode等不必要属性
|
|
15
|
-
*/
|
|
16
|
-
style?: React.CSSProperties;
|
|
17
|
-
/** 类名,可选 */
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* 二维码扫描组件
|
|
22
|
-
*/
|
|
23
|
-
declare const PisellQRScanner: React.FC<PisellQRScannerProps>;
|
|
24
|
-
export default PisellQRScanner;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
interface PisellQrcodeProps {
|
|
4
|
-
size?: number;
|
|
5
|
-
platform: 'pc' | 'h5' | 'ipad';
|
|
6
|
-
value: string;
|
|
7
|
-
className: string;
|
|
8
|
-
}
|
|
9
|
-
declare const PisellQrcode: React.FC<PisellQrcodeProps>;
|
|
10
|
-
export default PisellQrcode;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
export declare type MultiLanguageValue = {
|
|
4
|
-
en: string;
|
|
5
|
-
'zh-CN': string;
|
|
6
|
-
'zh-HK': string;
|
|
7
|
-
};
|
|
8
|
-
export interface EditableConfig {
|
|
9
|
-
/** 是否禁用编辑 */
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/** 最大长度 */
|
|
12
|
-
maxLength?: number;
|
|
13
|
-
/** 编辑图标 */
|
|
14
|
-
icon?: React.ReactNode;
|
|
15
|
-
}
|
|
16
|
-
export interface EditableProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
17
|
-
/** 文本内容,支持字符串或多语言对象 */
|
|
18
|
-
value?: string | MultiLanguageValue;
|
|
19
|
-
/** 子节点内容,优先级高于 value */
|
|
20
|
-
children?: string;
|
|
21
|
-
/** 可编辑配置,boolean 时使用默认配置 */
|
|
22
|
-
editable?: boolean | EditableConfig;
|
|
23
|
-
/** 编辑变更回调 */
|
|
24
|
-
onChange?: (value: string | MultiLanguageValue) => void;
|
|
25
|
-
/** 输入框尺寸 */
|
|
26
|
-
size?: 'large' | 'middle' | 'small';
|
|
27
|
-
}
|
|
28
|
-
declare const Editable: React.FC<EditableProps>;
|
|
29
|
-
export default Editable;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface PisellTextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
-
}
|
|
4
|
-
declare const PisellText: {
|
|
5
|
-
(props: PisellTextProps): JSX.Element;
|
|
6
|
-
Amount: (props: import("./components/Amount").AmountProps) => JSX.Element;
|
|
7
|
-
Editable: React.FC<import("./components/Editable").EditableProps>;
|
|
8
|
-
};
|
|
9
|
-
export default PisellText;
|