@pisell/private-materials 6.2.49 → 6.2.50
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 +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +27 -3
- package/es/components/appointmentBooking/components/Content/index.js +3 -3
- package/es/components/appointmentBooking/components/Services/index.js +36 -18
- package/es/components/appointmentBooking/components/Voucher/index.js +6 -5
- package/es/components/appointmentBooking/hooks.js +10 -2
- package/es/components/appointmentBooking/index.js +10 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/footer/index.js +12 -1
- package/es/components/booking/editBookingModal/index.js +8 -2
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +12 -0
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/normal.js +3 -3
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +25 -4
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +34 -8
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +3 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -3
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +112 -24
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +78 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +9 -0
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pay/toC/utils.js +1 -1
- package/es/components/pinModal/hooks.d.ts +7 -0
- package/es/components/pinModal/hooks.js +65 -0
- package/es/components/pinModal/index.d.ts +4 -0
- package/es/components/pinModal/index.js +98 -0
- package/es/components/pinModal/index.less +44 -0
- package/es/components/pinModal/locales.d.ts +27 -0
- package/es/components/pinModal/locales.js +26 -0
- package/es/components/pinModal/serve.d.ts +6 -0
- package/es/components/pinModal/serve.js +11 -0
- package/es/components/pinModal/types.d.ts +0 -0
- package/es/components/pinModal/types.js +0 -0
- package/es/components/pinVerifyModal/hooks.d.ts +7 -0
- package/es/components/pinVerifyModal/hooks.js +80 -0
- package/es/components/pinVerifyModal/index.d.ts +5 -0
- package/es/components/pinVerifyModal/index.js +218 -0
- package/es/components/pinVerifyModal/index.less +92 -0
- package/es/components/pinVerifyModal/locales.d.ts +24 -0
- package/es/components/pinVerifyModal/locales.js +23 -0
- package/es/components/pinVerifyModal/types.d.ts +33 -0
- package/es/components/pinVerifyModal/types.js +1 -0
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/ticketBooking/components/ticketBooking/index.js +58 -10
- package/es/components/ticketBooking/components/timeBar/index.js +2 -1
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/wallet/Detail/index.js +251 -63
- package/es/components/wallet/Detail/locales.d.ts +51 -0
- package/es/components/wallet/Detail/locales.js +57 -3
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/Detail/serve.js +5 -1
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/components/UsageRules/index.d.ts +23 -0
- package/es/components/wallet/components/UsageRules/index.js +147 -0
- package/es/components/wallet/components/UsageRules/index.less +157 -0
- package/es/components/wallet/components/WalletCard.js +8 -3
- package/es/components/wallet/components/index.d.ts +1 -0
- package/es/components/wallet/components/index.js +2 -1
- package/es/components/wallet/model.d.ts +1 -9
- package/es/components/walletList/index.js +20 -2
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +22 -2
- package/lib/components/appointmentBooking/components/Content/index.js +2 -2
- package/lib/components/appointmentBooking/components/Services/index.js +13 -3
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
- package/lib/components/appointmentBooking/hooks.js +10 -2
- package/lib/components/appointmentBooking/index.js +6 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/footer/index.js +15 -2
- package/lib/components/booking/components/voucher/index.js +1 -3
- package/lib/components/booking/editBookingModal/index.js +6 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +6 -0
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/normal.js +3 -3
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +16 -4
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +30 -8
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +6 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +84 -36
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.js +18 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +7 -2
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pay/toC/utils.js +1 -1
- package/lib/components/pinModal/hooks.d.ts +7 -0
- package/lib/components/pinModal/hooks.js +85 -0
- package/lib/components/pinModal/index.d.ts +4 -0
- package/lib/components/pinModal/index.js +88 -0
- package/lib/components/pinModal/index.less +44 -0
- package/lib/components/pinModal/locales.d.ts +27 -0
- package/lib/components/pinModal/locales.js +50 -0
- package/lib/components/pinModal/serve.d.ts +6 -0
- package/lib/components/pinModal/serve.js +37 -0
- package/lib/components/pinModal/types.d.ts +0 -0
- package/lib/components/pinModal/types.js +0 -0
- package/lib/components/pinVerifyModal/hooks.d.ts +7 -0
- package/lib/components/pinVerifyModal/hooks.js +93 -0
- package/lib/components/pinVerifyModal/index.d.ts +5 -0
- package/lib/components/pinVerifyModal/index.js +230 -0
- package/lib/components/pinVerifyModal/index.less +92 -0
- package/lib/components/pinVerifyModal/locales.d.ts +24 -0
- package/lib/components/pinVerifyModal/locales.js +47 -0
- package/lib/components/pinVerifyModal/types.d.ts +33 -0
- package/lib/components/pinVerifyModal/types.js +17 -0
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/ticketBooking/components/ticketBooking/index.js +50 -6
- package/lib/components/ticketBooking/components/timeBar/index.js +2 -1
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/wallet/Detail/index.js +140 -8
- package/lib/components/wallet/Detail/locales.d.ts +51 -0
- package/lib/components/wallet/Detail/locales.js +57 -3
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/Detail/serve.js +6 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/components/UsageRules/index.d.ts +23 -0
- package/lib/components/wallet/components/UsageRules/index.js +113 -0
- package/lib/components/wallet/components/UsageRules/index.less +157 -0
- package/lib/components/wallet/components/WalletCard.js +3 -1
- package/lib/components/wallet/components/index.d.ts +1 -0
- package/lib/components/wallet/components/index.js +3 -0
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/components/walletList/index.js +19 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lowcode/pin-modal/meta.ts +37 -0
- package/lowcode/pin-verify-modal/meta.ts +80 -0
- package/package.json +4 -4
@@ -0,0 +1,113 @@
|
|
1
|
+
var __create = Object.create;
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all)
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
+
};
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
+
}
|
17
|
+
return to;
|
18
|
+
};
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
+
mod
|
26
|
+
));
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
|
+
|
29
|
+
// src/components/wallet/components/UsageRules/index.tsx
|
30
|
+
var UsageRules_exports = {};
|
31
|
+
__export(UsageRules_exports, {
|
32
|
+
default: () => UsageRules_default
|
33
|
+
});
|
34
|
+
module.exports = __toCommonJS(UsageRules_exports);
|
35
|
+
var import_react = __toESM(require("react"));
|
36
|
+
var import_materials = require("@pisell/materials");
|
37
|
+
var import_index = require("./index.less");
|
38
|
+
var { Text } = import_materials.Typography;
|
39
|
+
function UsageRules({
|
40
|
+
className = "",
|
41
|
+
style,
|
42
|
+
rules,
|
43
|
+
personalLimit = {
|
44
|
+
total: 5,
|
45
|
+
remaining: 3,
|
46
|
+
note: "用完后此券将自动失效"
|
47
|
+
},
|
48
|
+
locales
|
49
|
+
}) {
|
50
|
+
const interpolateText = (text, variables) => {
|
51
|
+
return text.replace(/\{(\w+)\}/g, (match, key) => {
|
52
|
+
return variables[key] !== void 0 ? variables[key] : match;
|
53
|
+
});
|
54
|
+
};
|
55
|
+
const getText = (key, fallback) => {
|
56
|
+
return (locales == null ? void 0 : locales.getText(key)) || fallback || key;
|
57
|
+
};
|
58
|
+
const getRuleDescription = (type, limit) => {
|
59
|
+
if (limit === 0 && type === "monthly") {
|
60
|
+
return getText("page.wallet.monthlyLimitUnlimited", "无限制");
|
61
|
+
}
|
62
|
+
const templateKey = `page.wallet.${type}LimitDesc`;
|
63
|
+
const template = getText(templateKey, "");
|
64
|
+
return interpolateText(template, { limit });
|
65
|
+
};
|
66
|
+
const getRuleResetTime = (type) => {
|
67
|
+
const resetKey = `page.wallet.${type}Reset`;
|
68
|
+
return getText(resetKey, "");
|
69
|
+
};
|
70
|
+
const defaultRules = [
|
71
|
+
{
|
72
|
+
type: "daily",
|
73
|
+
limit: 3,
|
74
|
+
description: getRuleDescription("daily", 3),
|
75
|
+
resetTime: getRuleResetTime("daily")
|
76
|
+
},
|
77
|
+
{
|
78
|
+
type: "weekly",
|
79
|
+
limit: 15,
|
80
|
+
description: getRuleDescription("weekly", 15),
|
81
|
+
resetTime: getRuleResetTime("weekly")
|
82
|
+
},
|
83
|
+
{
|
84
|
+
type: "monthly",
|
85
|
+
limit: 60,
|
86
|
+
description: getRuleDescription("monthly", 60),
|
87
|
+
resetTime: getRuleResetTime("monthly")
|
88
|
+
}
|
89
|
+
];
|
90
|
+
const processedRules = rules ? rules.map((rule) => ({
|
91
|
+
...rule,
|
92
|
+
description: getRuleDescription(rule.type, rule.limit),
|
93
|
+
resetTime: getRuleResetTime(rule.type)
|
94
|
+
})) : defaultRules;
|
95
|
+
const finalRules = processedRules;
|
96
|
+
const getRuleLabel = (type) => {
|
97
|
+
switch (type) {
|
98
|
+
case "daily":
|
99
|
+
return getText("page.wallet.dailyLimit", "每日限制:");
|
100
|
+
case "weekly":
|
101
|
+
return getText("page.wallet.weeklyLimit", "每周限制:");
|
102
|
+
case "monthly":
|
103
|
+
return getText("page.wallet.monthlyLimit", "每月限制:");
|
104
|
+
default:
|
105
|
+
return getText("page.wallet.dailyLimit", "限制:");
|
106
|
+
}
|
107
|
+
};
|
108
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `usage-rules ${className}`, style }, /* @__PURE__ */ import_react.default.createElement(Text, { className: "usage-rules-title" }, getText("page.wallet.usageRules", "使用规则")), /* @__PURE__ */ import_react.default.createElement(Text, { className: "usage-rules-subtitle" }, getText("page.wallet.usageRulesSubtitle", "请仔细阅读以下使用条件")), /* @__PURE__ */ import_react.default.createElement("div", { className: "usage-rules-section" }, /* @__PURE__ */ import_react.default.createElement(Text, { className: "usage-rules-section-title" }, getText("page.wallet.timeUsageLimits", "时间使用限制")), /* @__PURE__ */ import_react.default.createElement("div", { className: "usage-rules-list" }, finalRules.length > 0 ? finalRules.map((rule, index) => /* @__PURE__ */ import_react.default.createElement("div", { key: index, className: "usage-rules-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "usage-rules-item-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "usage-rules-item-main-line" }, /* @__PURE__ */ import_react.default.createElement(Text, { className: "usage-rules-item-label" }, getRuleLabel(rule.type)), /* @__PURE__ */ import_react.default.createElement(Text, { className: "usage-rules-item-description" }, rule.description)), rule.resetTime && /* @__PURE__ */ import_react.default.createElement(Text, { className: "usage-rules-item-reset" }, rule.resetTime)))) : /* @__PURE__ */ import_react.default.createElement("div", { className: "usage-rules-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "usage-rules-item-content" }, /* @__PURE__ */ import_react.default.createElement(Text, { className: "usage-rules-item-description" }, getText("page.wallet.monthlyLimitUnlimited", "无限制")))))), /* @__PURE__ */ import_react.default.createElement("div", { className: "usage-rules-section" }, /* @__PURE__ */ import_react.default.createElement(Text, { className: "usage-rules-section-title" }, getText("page.wallet.totalQuantityControl", "总量控制")), /* @__PURE__ */ import_react.default.createElement("div", { className: "usage-rules-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "usage-rules-item-content" }, personalLimit.total > 0 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(Text, { className: "usage-rules-item-label" }, getText("page.wallet.personalLimit", "个人限额:")), /* @__PURE__ */ import_react.default.createElement(Text, { className: "usage-rules-item-description" }, interpolateText(
|
109
|
+
getText("page.wallet.personalLimitDesc", "您最多可使用此券{total}次(剩余{remaining}次)"),
|
110
|
+
{ total: personalLimit.total, remaining: personalLimit.remaining }
|
111
|
+
)), /* @__PURE__ */ import_react.default.createElement(Text, { className: "usage-rules-item-note" }, getText("page.wallet.voucherExpireNote", "用完后此券将自动失效"))) : /* @__PURE__ */ import_react.default.createElement(Text, { className: "usage-rules-item-description" }, getText("page.wallet.monthlyLimitUnlimited", "无限制"))))));
|
112
|
+
}
|
113
|
+
var UsageRules_default = UsageRules;
|
@@ -0,0 +1,157 @@
|
|
1
|
+
.usage-rules {
|
2
|
+
padding: 16px;
|
3
|
+
background: #ffffff;
|
4
|
+
border-radius: 8px;
|
5
|
+
border: 1px solid #f0f0f0;
|
6
|
+
margin-top: 16px;
|
7
|
+
margin-bottom: 20px;
|
8
|
+
|
9
|
+
// 确保所有Text组件都是块级元素
|
10
|
+
.ant-typography {
|
11
|
+
display: block !important;
|
12
|
+
width: 100% !important;
|
13
|
+
margin-bottom: 0 !important;
|
14
|
+
}
|
15
|
+
|
16
|
+
&-title {
|
17
|
+
font-size: 18px;
|
18
|
+
font-weight: 600;
|
19
|
+
color: #000000;
|
20
|
+
line-height: 24px;
|
21
|
+
margin-bottom: 8px;
|
22
|
+
display: block;
|
23
|
+
width: 100%;
|
24
|
+
}
|
25
|
+
|
26
|
+
&-subtitle {
|
27
|
+
font-size: 14px;
|
28
|
+
color: #6B7280;
|
29
|
+
line-height: 20px;
|
30
|
+
margin-bottom: 24px;
|
31
|
+
display: block;
|
32
|
+
width: 100%;
|
33
|
+
}
|
34
|
+
|
35
|
+
&-section {
|
36
|
+
margin-bottom: 24px;
|
37
|
+
|
38
|
+
&:last-child {
|
39
|
+
margin-bottom: 0;
|
40
|
+
}
|
41
|
+
|
42
|
+
&-title {
|
43
|
+
font-size: 16px;
|
44
|
+
font-weight: 500;
|
45
|
+
color: #6B7280;
|
46
|
+
line-height: 20px;
|
47
|
+
margin-bottom: 16px;
|
48
|
+
display: block;
|
49
|
+
width: 100%;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
&-list {
|
54
|
+
display: flex;
|
55
|
+
flex-direction: column;
|
56
|
+
gap: 16px;
|
57
|
+
}
|
58
|
+
|
59
|
+
&-item {
|
60
|
+
position: relative;
|
61
|
+
display: flex;
|
62
|
+
align-items: flex-start;
|
63
|
+
|
64
|
+
&::before {
|
65
|
+
content: '•';
|
66
|
+
color: #697281;
|
67
|
+
font-size: 16px;
|
68
|
+
line-height: 20px;
|
69
|
+
font-weight: bold;
|
70
|
+
margin-right: 8px;
|
71
|
+
flex-shrink: 0;
|
72
|
+
margin-top: 0;
|
73
|
+
}
|
74
|
+
|
75
|
+
&-content {
|
76
|
+
flex: 1;
|
77
|
+
min-width: 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
&-main-line {
|
81
|
+
margin-bottom: 4px;
|
82
|
+
}
|
83
|
+
|
84
|
+
&-label {
|
85
|
+
font-size: 14px;
|
86
|
+
font-weight: 600;
|
87
|
+
color: #000000;
|
88
|
+
line-height: 20px;
|
89
|
+
display: inline;
|
90
|
+
margin-right: 4px;
|
91
|
+
}
|
92
|
+
|
93
|
+
&-description {
|
94
|
+
font-size: 14px;
|
95
|
+
color: #000000;
|
96
|
+
line-height: 20px;
|
97
|
+
display: inline;
|
98
|
+
word-wrap: break-word;
|
99
|
+
}
|
100
|
+
|
101
|
+
&-reset {
|
102
|
+
font-size: 14px;
|
103
|
+
color: #000000;
|
104
|
+
line-height: 20px;
|
105
|
+
display: block;
|
106
|
+
width: 100%;
|
107
|
+
}
|
108
|
+
|
109
|
+
&-note {
|
110
|
+
font-size: 14px;
|
111
|
+
color: #000000;
|
112
|
+
line-height: 20px;
|
113
|
+
margin-top: 4px;
|
114
|
+
display: block;
|
115
|
+
width: 100%;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
}
|
120
|
+
|
121
|
+
// 响应式设计
|
122
|
+
@media (max-width: 768px) {
|
123
|
+
.usage-rules {
|
124
|
+
padding: 12px;
|
125
|
+
margin-top: 12px;
|
126
|
+
|
127
|
+
&-title {
|
128
|
+
font-size: 16px;
|
129
|
+
}
|
130
|
+
|
131
|
+
&-subtitle {
|
132
|
+
font-size: 13px;
|
133
|
+
}
|
134
|
+
|
135
|
+
&-section {
|
136
|
+
margin-bottom: 20px;
|
137
|
+
|
138
|
+
&-title {
|
139
|
+
font-size: 15px;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
&-item {
|
144
|
+
&::before {
|
145
|
+
font-size: 14px;
|
146
|
+
margin-right: 6px;
|
147
|
+
}
|
148
|
+
|
149
|
+
&-label,
|
150
|
+
&-description,
|
151
|
+
&-reset,
|
152
|
+
&-note {
|
153
|
+
font-size: 13px;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
@@ -54,7 +54,8 @@ var WalletCard = ({
|
|
54
54
|
limit_status,
|
55
55
|
product_cover = "",
|
56
56
|
par_value = "",
|
57
|
-
unified_messages = {}
|
57
|
+
unified_messages = {},
|
58
|
+
...rest
|
58
59
|
} = item;
|
59
60
|
const platform = (0, import_react.useMemo)(() => (0, import_utils.isMobile)() ? "h5" : "pc", []);
|
60
61
|
const { title: disabledReason = "" } = unified_messages;
|
@@ -64,6 +65,7 @@ var WalletCard = ({
|
|
64
65
|
return /* @__PURE__ */ import_react.default.createElement(
|
65
66
|
import_materials.PisellWalletPassCard,
|
66
67
|
{
|
68
|
+
...rest,
|
67
69
|
balanceTitle,
|
68
70
|
showDetail: false,
|
69
71
|
showRedeem: false,
|
@@ -30,13 +30,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
30
30
|
var components_exports = {};
|
31
31
|
__export(components_exports, {
|
32
32
|
FooterButtons: () => import_FooterButtons.default,
|
33
|
+
UsageRules: () => import_UsageRules.default,
|
33
34
|
WalletBar: () => import_WalletBar.default
|
34
35
|
});
|
35
36
|
module.exports = __toCommonJS(components_exports);
|
36
37
|
var import_WalletBar = __toESM(require("./WalletBar"));
|
37
38
|
var import_FooterButtons = __toESM(require("./FooterButtons"));
|
39
|
+
var import_UsageRules = __toESM(require("./UsageRules"));
|
38
40
|
// Annotate the CommonJS export names for ESM import in node:
|
39
41
|
0 && (module.exports = {
|
40
42
|
FooterButtons,
|
43
|
+
UsageRules,
|
41
44
|
WalletBar
|
42
45
|
});
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { IWalletListItemProps } from './serve';
|
3
2
|
export interface WalletCardItemProps {
|
4
3
|
id: string;
|
@@ -27,11 +26,4 @@ export interface WalletListProps {
|
|
27
26
|
currentSearchListItemCode?: string;
|
28
27
|
[key: string]: any;
|
29
28
|
}
|
30
|
-
export declare const Provider:
|
31
|
-
global_wallet: WalletListProps;
|
32
|
-
} & {
|
33
|
-
dispatch: (params: {
|
34
|
-
type: string;
|
35
|
-
payload: any;
|
36
|
-
}) => void;
|
37
|
-
}>;
|
29
|
+
export declare const Provider: any, Context: any;
|
@@ -45,6 +45,7 @@ var import_locales = __toESM(require("./locales"));
|
|
45
45
|
var import_index = require("./index.less");
|
46
46
|
var import_classnames = __toESM(require("classnames"));
|
47
47
|
var import_types = require("./types");
|
48
|
+
var import_pinModal = __toESM(require("../pinModal"));
|
48
49
|
var STORAGE_KEY = "pisell_wallet_list_data";
|
49
50
|
var STORAGE_KEY_BALANCE = "pisell_wallet_balance_data";
|
50
51
|
var safeLocalStorage = {
|
@@ -134,6 +135,7 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
134
135
|
const [walletShopList, setWalletShopList] = (0, import_react.useState)([]);
|
135
136
|
const requestIdRef = (0, import_react.useRef)("");
|
136
137
|
const pubsub = utils == null ? void 0 : utils.pubsub;
|
138
|
+
const pinModalRef = (0, import_react.useRef)(null);
|
137
139
|
const isUserLoggedIn = (0, import_react.useMemo)(() => {
|
138
140
|
var _a2, _b2;
|
139
141
|
return !!((_b2 = (_a2 = utils == null ? void 0 : utils.token) == null ? void 0 : _a2.get) == null ? void 0 : _b2.call(_a2)) || false;
|
@@ -370,6 +372,14 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
370
372
|
});
|
371
373
|
}
|
372
374
|
};
|
375
|
+
const onViewPinClick = (card) => {
|
376
|
+
var _a2;
|
377
|
+
if (card == null ? void 0 : card.id) {
|
378
|
+
(_a2 = pinModalRef.current) == null ? void 0 : _a2.open(card == null ? void 0 : card.id);
|
379
|
+
} else {
|
380
|
+
console.error("onViewPinClick方法需要传入wallet_detail_id");
|
381
|
+
}
|
382
|
+
};
|
373
383
|
const renderWalletCard = (item) => {
|
374
384
|
var _a2;
|
375
385
|
const { code, shop, wallet, id } = item;
|
@@ -423,7 +433,14 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
423
433
|
isLogin: isUserLoggedIn
|
424
434
|
// 添加登录状态
|
425
435
|
};
|
426
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
436
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
437
|
+
import_materials.WalletCard,
|
438
|
+
{
|
439
|
+
key: id,
|
440
|
+
...cardProps,
|
441
|
+
onViewPinClick: () => onViewPinClick(item)
|
442
|
+
}
|
443
|
+
);
|
427
444
|
};
|
428
445
|
const carouselProps = {
|
429
446
|
className: (0, import_classnames.default)("pisell-lowcode__walletList"),
|
@@ -545,7 +562,7 @@ var WalletList = (0, import_model.Provider)((props) => {
|
|
545
562
|
}
|
546
563
|
}
|
547
564
|
)
|
548
|
-
)));
|
565
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_pinModal.default, { ref: pinModalRef }));
|
549
566
|
};
|
550
567
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-list-wrapper" }, renderContent());
|
551
568
|
});
|
package/lib/index.d.ts
CHANGED
@@ -52,3 +52,5 @@ export { default as NoteModal } from './plus/noteModal';
|
|
52
52
|
export { default as SaasLogin } from './plus/saasLogin';
|
53
53
|
export { default as SaasRegister } from './plus/saasRegister';
|
54
54
|
export { default as SaasCreateOrganization } from './plus/saasCreateOrganization';
|
55
|
+
export { default as PinModal } from './components/pinModal';
|
56
|
+
export { default as PinVerifyModal } from './components/pinVerifyModal';
|
package/lib/index.js
CHANGED
@@ -63,6 +63,8 @@ __export(src_exports, {
|
|
63
63
|
EventTimeResourceSelector: () => import_timeResourceSelector.default,
|
64
64
|
Login: () => import_login.default,
|
65
65
|
NoteModal: () => import_noteModal.default,
|
66
|
+
PinModal: () => import_pinModal.default,
|
67
|
+
PinVerifyModal: () => import_pinVerifyModal.default,
|
66
68
|
PisellSelectCustomerModal: () => import_pisellSelectCustomerModal.default,
|
67
69
|
ProductExtension: () => import_productExtension.default,
|
68
70
|
RuleSetting: () => import_ruleSetting.default,
|
@@ -140,6 +142,8 @@ var import_noteModal = __toESM(require("./plus/noteModal"));
|
|
140
142
|
var import_saasLogin = __toESM(require("./plus/saasLogin"));
|
141
143
|
var import_saasRegister = __toESM(require("./plus/saasRegister"));
|
142
144
|
var import_saasCreateOrganization = __toESM(require("./plus/saasCreateOrganization"));
|
145
|
+
var import_pinModal = __toESM(require("./components/pinModal"));
|
146
|
+
var import_pinVerifyModal = __toESM(require("./components/pinVerifyModal"));
|
143
147
|
import_dayjs.default.extend(import_weekday.default);
|
144
148
|
import_dayjs.default.extend(import_localeData.default);
|
145
149
|
// Annotate the CommonJS export names for ESM import in node:
|
@@ -178,6 +182,8 @@ import_dayjs.default.extend(import_localeData.default);
|
|
178
182
|
EventTimeResourceSelector,
|
179
183
|
Login,
|
180
184
|
NoteModal,
|
185
|
+
PinModal,
|
186
|
+
PinVerifyModal,
|
181
187
|
PisellSelectCustomerModal,
|
182
188
|
ProductExtension,
|
183
189
|
RuleSetting,
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
2
|
+
|
3
|
+
const PinModalMeta: ComponentMetadata = {
|
4
|
+
componentName: 'PinModal',
|
5
|
+
title: 'PinModal',
|
6
|
+
docUrl: '',
|
7
|
+
screenshot: '',
|
8
|
+
devMode: 'proCode',
|
9
|
+
npm: {
|
10
|
+
package: '@pisell/private-materials',
|
11
|
+
version: '1.1.558',
|
12
|
+
exportName: 'PinModal',
|
13
|
+
main: 'src/index.ts',
|
14
|
+
destructuring: true,
|
15
|
+
subName: '',
|
16
|
+
},
|
17
|
+
configure: {
|
18
|
+
props: [],
|
19
|
+
supports: {},
|
20
|
+
component: {},
|
21
|
+
},
|
22
|
+
};
|
23
|
+
const snippets: Snippet[] = [
|
24
|
+
{
|
25
|
+
title: 'PinModal',
|
26
|
+
screenshot: '',
|
27
|
+
schema: {
|
28
|
+
componentName: 'PinModal',
|
29
|
+
props: {},
|
30
|
+
},
|
31
|
+
},
|
32
|
+
];
|
33
|
+
|
34
|
+
export default {
|
35
|
+
...PinModalMeta,
|
36
|
+
snippets,
|
37
|
+
};
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
2
|
+
|
3
|
+
const PinVerifyModalMeta: ComponentMetadata = {
|
4
|
+
componentName: 'PinVerifyModal',
|
5
|
+
title: 'PinVerifyModal',
|
6
|
+
docUrl: '',
|
7
|
+
screenshot: '',
|
8
|
+
devMode: 'proCode',
|
9
|
+
npm: {
|
10
|
+
package: '@pisell/private-materials',
|
11
|
+
version: '1.1.558',
|
12
|
+
exportName: 'PinVerifyModal',
|
13
|
+
main: 'src/index.ts',
|
14
|
+
destructuring: true,
|
15
|
+
subName: '',
|
16
|
+
},
|
17
|
+
configure: {
|
18
|
+
props: [
|
19
|
+
{
|
20
|
+
title: {
|
21
|
+
label: {
|
22
|
+
type: 'i18n',
|
23
|
+
'en-US': 'onOpen',
|
24
|
+
'zh-CN': 'onOpen',
|
25
|
+
},
|
26
|
+
},
|
27
|
+
name: 'onOpen',
|
28
|
+
setter: {
|
29
|
+
componentName: 'FunctionSetter',
|
30
|
+
isRequired: false,
|
31
|
+
},
|
32
|
+
},
|
33
|
+
{
|
34
|
+
title: {
|
35
|
+
label: {
|
36
|
+
type: 'i18n',
|
37
|
+
'en-US': 'onClose',
|
38
|
+
'zh-CN': 'onClose',
|
39
|
+
},
|
40
|
+
},
|
41
|
+
name: 'onClose',
|
42
|
+
setter: {
|
43
|
+
componentName: 'FunctionSetter',
|
44
|
+
isRequired: false,
|
45
|
+
},
|
46
|
+
},
|
47
|
+
{
|
48
|
+
title: {
|
49
|
+
label: {
|
50
|
+
type: 'i18n',
|
51
|
+
'en-US': 'onSuccess',
|
52
|
+
'zh-CN': 'onSuccess',
|
53
|
+
},
|
54
|
+
},
|
55
|
+
name: 'onSuccess',
|
56
|
+
setter: {
|
57
|
+
componentName: 'FunctionSetter',
|
58
|
+
isRequired: false,
|
59
|
+
},
|
60
|
+
},
|
61
|
+
],
|
62
|
+
supports: {},
|
63
|
+
component: {},
|
64
|
+
},
|
65
|
+
};
|
66
|
+
const snippets: Snippet[] = [
|
67
|
+
{
|
68
|
+
title: 'PinVerifyModal',
|
69
|
+
screenshot: '',
|
70
|
+
schema: {
|
71
|
+
componentName: 'PinVerifyModal',
|
72
|
+
props: {},
|
73
|
+
},
|
74
|
+
},
|
75
|
+
];
|
76
|
+
|
77
|
+
export default {
|
78
|
+
...PinVerifyModalMeta,
|
79
|
+
snippets,
|
80
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pisell/private-materials",
|
3
|
-
"version": "6.2.
|
3
|
+
"version": "6.2.50",
|
4
4
|
"main": "./lib/index.js",
|
5
5
|
"module": "./es/index.js",
|
6
6
|
"types": "./lib/index.d.ts",
|
@@ -59,10 +59,10 @@
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
60
60
|
"react-resizable": "^3.0.5",
|
61
61
|
"styled-components": "^6.0.0-rc.3",
|
62
|
-
"@pisell/date-picker": "3.0.4",
|
63
|
-
"@pisell/materials": "6.2.39",
|
64
62
|
"@pisell/icon": "0.0.11",
|
65
|
-
"@pisell/
|
63
|
+
"@pisell/date-picker": "3.0.4",
|
64
|
+
"@pisell/utils": "3.0.1",
|
65
|
+
"@pisell/materials": "6.2.40"
|
66
66
|
},
|
67
67
|
"peerDependencies": {
|
68
68
|
"react": "^18.0.0",
|