@pisell/private-materials 6.3.16 → 6.3.17
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 +150 -150
- 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 +8 -8
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/index.d.ts +3 -1
- package/es/components/index.js +3 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- 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/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/utils.d.ts +1 -1
- package/es/components/walletList/index.js +20 -2
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +6 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -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/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/utils.d.ts +1 -1
- package/lib/components/walletList/index.js +19 -2
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/pin-modal/meta.ts +37 -0
- package/lowcode/pin-verify-modal/meta.ts +80 -0
- package/package.json +3 -3
@@ -1,3 +1,9 @@
|
|
1
1
|
import { WalletPassDataType } from './serve';
|
2
2
|
export declare const formatMachineCodeServer2CardList: (data: WalletPassDataType[], selectId?: number[]) => any;
|
3
3
|
export declare const getDataByIds: (arr: any[], ids: number[]) => any[];
|
4
|
+
/**
|
5
|
+
* 判断是否是wallet code
|
6
|
+
* @param val
|
7
|
+
* @returns
|
8
|
+
*/
|
9
|
+
export declare const getIsWalletCode: (val: string) => boolean;
|
@@ -20,7 +20,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
20
20
|
var utils_exports = {};
|
21
21
|
__export(utils_exports, {
|
22
22
|
formatMachineCodeServer2CardList: () => formatMachineCodeServer2CardList,
|
23
|
-
getDataByIds: () => getDataByIds
|
23
|
+
getDataByIds: () => getDataByIds,
|
24
|
+
getIsWalletCode: () => getIsWalletCode
|
24
25
|
});
|
25
26
|
module.exports = __toCommonJS(utils_exports);
|
26
27
|
var import_utils = require("@pisell/utils");
|
@@ -64,8 +65,12 @@ var formatMachineCodeServer2CardList = (data, selectId = []) => {
|
|
64
65
|
var getDataByIds = (arr, ids) => {
|
65
66
|
return arr.filter((item) => ids.includes(item.id));
|
66
67
|
};
|
68
|
+
var getIsWalletCode = (val) => {
|
69
|
+
return val.startsWith("WL") || val.startsWith("2") && val.length === 10;
|
70
|
+
};
|
67
71
|
// Annotate the CommonJS export names for ESM import in node:
|
68
72
|
0 && (module.exports = {
|
69
73
|
formatMachineCodeServer2CardList,
|
70
|
-
getDataByIds
|
74
|
+
getDataByIds,
|
75
|
+
getIsWalletCode
|
71
76
|
});
|
@@ -49,7 +49,7 @@ var formatWalletPassParams = (payGroup) => {
|
|
49
49
|
const payments = (walletPass == null ? void 0 : walletPass.cards.map((item) => {
|
50
50
|
return {
|
51
51
|
amount: getAvailableMaxAmount(item),
|
52
|
-
wallet_pass_use_value: item.
|
52
|
+
wallet_pass_use_value: item.recommended_usage_par_value,
|
53
53
|
voucher_id: item.id,
|
54
54
|
tag: item.tag,
|
55
55
|
wallet_pass_usage_unit: item.wallet_pass_usage_unit
|
@@ -0,0 +1,85 @@
|
|
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/pinModal/hooks.ts
|
30
|
+
var hooks_exports = {};
|
31
|
+
__export(hooks_exports, {
|
32
|
+
usePin: () => usePin
|
33
|
+
});
|
34
|
+
module.exports = __toCommonJS(hooks_exports);
|
35
|
+
var import_react = require("react");
|
36
|
+
var import_ahooks = require("ahooks");
|
37
|
+
var import_dayjs = __toESM(require("dayjs"));
|
38
|
+
var import_serve = require("./serve");
|
39
|
+
var usePin = () => {
|
40
|
+
const [pin, setPin] = (0, import_react.useState)("");
|
41
|
+
const [lastUpdateTime, setLastUpdateTime] = (0, import_react.useState)("");
|
42
|
+
const _getPinRequest = (0, import_ahooks.useRequest)(import_serve.getPinApi, {
|
43
|
+
manual: true,
|
44
|
+
loadingDelay: 100,
|
45
|
+
onSuccess: (res) => {
|
46
|
+
const { code, data } = res;
|
47
|
+
if (code === 200 && (data == null ? void 0 : data.pin)) {
|
48
|
+
setPin(data.pin);
|
49
|
+
setLastUpdateTime(getTime((data == null ? void 0 : data.generated_at) || ""));
|
50
|
+
}
|
51
|
+
}
|
52
|
+
});
|
53
|
+
const getTime = (time) => {
|
54
|
+
if (!time) return "";
|
55
|
+
return (0, import_dayjs.default)(time).format("YYYY-MM-DD HH:mm");
|
56
|
+
};
|
57
|
+
const _resetPinRequest = (0, import_ahooks.useRequest)(import_serve.resetPinApi, {
|
58
|
+
manual: true,
|
59
|
+
loadingDelay: 100,
|
60
|
+
onSuccess: (res) => {
|
61
|
+
const { code, data } = res;
|
62
|
+
if (code === 200 && (data == null ? void 0 : data.pin)) {
|
63
|
+
setPin(data.pin);
|
64
|
+
setLastUpdateTime(getTime((data == null ? void 0 : data.generated_at) || ""));
|
65
|
+
}
|
66
|
+
}
|
67
|
+
});
|
68
|
+
const getPin = (id) => {
|
69
|
+
_getPinRequest.run({ wallet_detail_id: id });
|
70
|
+
};
|
71
|
+
const resetPin = (id) => {
|
72
|
+
_resetPinRequest.run({ wallet_detail_id: id });
|
73
|
+
};
|
74
|
+
return {
|
75
|
+
pin,
|
76
|
+
lastUpdateTime,
|
77
|
+
getPin,
|
78
|
+
resetPin,
|
79
|
+
resetPinLoading: _resetPinRequest.loading
|
80
|
+
};
|
81
|
+
};
|
82
|
+
// Annotate the CommonJS export names for ESM import in node:
|
83
|
+
0 && (module.exports = {
|
84
|
+
usePin
|
85
|
+
});
|
@@ -0,0 +1,88 @@
|
|
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/pinModal/index.tsx
|
30
|
+
var pinModal_exports = {};
|
31
|
+
__export(pinModal_exports, {
|
32
|
+
default: () => pinModal_default
|
33
|
+
});
|
34
|
+
module.exports = __toCommonJS(pinModal_exports);
|
35
|
+
var import_react = __toESM(require("react"));
|
36
|
+
var import_materials = require("@pisell/materials");
|
37
|
+
var import_utils = require("@pisell/utils");
|
38
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
39
|
+
var import_locales = __toESM(require("./locales"));
|
40
|
+
var import_hooks = require("./hooks");
|
41
|
+
var import_utils2 = require("../../utils");
|
42
|
+
var import_index = require("./index.less");
|
43
|
+
var PinModal = (props, ref) => {
|
44
|
+
var _a, _b, _c, _d;
|
45
|
+
const context = (0, import_useEngineContext.default)();
|
46
|
+
import_utils.locales.init(import_locales.default, ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en");
|
47
|
+
import_utils2.request.setRequest((_d = (_c = context == null ? void 0 : context.appHelper) == null ? void 0 : _c.utils) == null ? void 0 : _d.request);
|
48
|
+
const [visible, setVisible] = (0, import_react.useState)(false);
|
49
|
+
const { pin, lastUpdateTime, getPin, resetPin, resetPinLoading } = (0, import_hooks.usePin)();
|
50
|
+
const walletDetailIdRef = (0, import_react.useRef)();
|
51
|
+
const onOpen = (wallet_detail_id) => {
|
52
|
+
walletDetailIdRef.current = wallet_detail_id;
|
53
|
+
getPin(wallet_detail_id);
|
54
|
+
setVisible(true);
|
55
|
+
};
|
56
|
+
const onHide = () => {
|
57
|
+
walletDetailIdRef.current = void 0;
|
58
|
+
setVisible(false);
|
59
|
+
};
|
60
|
+
const onResetPin = async () => {
|
61
|
+
if (!walletDetailIdRef.current || resetPinLoading) {
|
62
|
+
return;
|
63
|
+
}
|
64
|
+
resetPin(walletDetailIdRef.current);
|
65
|
+
};
|
66
|
+
(0, import_react.useImperativeHandle)(ref, () => ({
|
67
|
+
open: onOpen,
|
68
|
+
hide: onHide
|
69
|
+
}));
|
70
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
71
|
+
import_materials.PisellModal,
|
72
|
+
{
|
73
|
+
title: import_utils.locales.getText("pisell2.pin.modal.title"),
|
74
|
+
open: visible,
|
75
|
+
okText: import_utils.locales.getText("pisell2.pin.modal.reset.pin"),
|
76
|
+
onOk: onResetPin,
|
77
|
+
cancelText: import_utils.locales.getText("pisell2.pin.modal.cancel"),
|
78
|
+
onCancel: onHide,
|
79
|
+
okButtonProps: {
|
80
|
+
loading: resetPinLoading
|
81
|
+
},
|
82
|
+
destroyOnClose: true,
|
83
|
+
mobileModalHeight: "auto"
|
84
|
+
},
|
85
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pin-modal" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pin-modal-content" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pin-modal-content-label" }, import_utils.locales.getText("pisell2.pin.modal.label")), /* @__PURE__ */ import_react.default.createElement("span", { className: "pin-modal-content-code" }, pin)), /* @__PURE__ */ import_react.default.createElement("span", { className: "pin-modal-content-desc" }, import_utils.locales.getText("pisell2.pin.modal.desc")), /* @__PURE__ */ import_react.default.createElement("span", { className: "pin-modal-content-time" }, import_utils.locales.getText("pisell2.pin.modal.time"), lastUpdateTime))
|
86
|
+
);
|
87
|
+
};
|
88
|
+
var pinModal_default = (0, import_react.forwardRef)(PinModal);
|
@@ -0,0 +1,44 @@
|
|
1
|
+
.pin-modal {
|
2
|
+
width: 100%;
|
3
|
+
height: 100%;
|
4
|
+
padding: 16px 0;
|
5
|
+
display: flex;
|
6
|
+
flex-direction: column;
|
7
|
+
align-items: center;
|
8
|
+
gap: 16px;
|
9
|
+
|
10
|
+
&-content {
|
11
|
+
display: flex;
|
12
|
+
flex-direction: column;
|
13
|
+
align-items: center;
|
14
|
+
gap: 4px;
|
15
|
+
|
16
|
+
&-label {
|
17
|
+
color: #101828;
|
18
|
+
text-align: center;
|
19
|
+
font-size: 16px;
|
20
|
+
font-weight: 400;
|
21
|
+
}
|
22
|
+
|
23
|
+
&-code {
|
24
|
+
color: #101828;
|
25
|
+
text-align: center;
|
26
|
+
font-size: 24px;
|
27
|
+
font-weight: 600;
|
28
|
+
}
|
29
|
+
|
30
|
+
&-desc {
|
31
|
+
color: #101828;
|
32
|
+
text-align: center;
|
33
|
+
font-size: 16px;
|
34
|
+
font-weight: 500;
|
35
|
+
}
|
36
|
+
|
37
|
+
&-time {
|
38
|
+
color: #667085;
|
39
|
+
text-align: center;
|
40
|
+
font-size: 16px;
|
41
|
+
font-weight: 400;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
en: {
|
3
|
+
'pisell2.pin.modal.title': string;
|
4
|
+
'pisell2.pin.modal.label': string;
|
5
|
+
'pisell2.pin.modal.desc': string;
|
6
|
+
'pisell2.pin.modal.time': string;
|
7
|
+
'pisell2.pin.modal.reset.pin': string;
|
8
|
+
'pisell2.pin.modal.cancel': string;
|
9
|
+
};
|
10
|
+
'zh-CN': {
|
11
|
+
'pisell2.pin.modal.title': string;
|
12
|
+
'pisell2.pin.modal.label': string;
|
13
|
+
'pisell2.pin.modal.desc': string;
|
14
|
+
'pisell2.pin.modal.time': string;
|
15
|
+
'pisell2.pin.modal.reset.pin': string;
|
16
|
+
'pisell2.pin.modal.cancel': string;
|
17
|
+
};
|
18
|
+
'zh-HK': {
|
19
|
+
'pisell2.pin.modal.title': string;
|
20
|
+
'pisell2.pin.modal.label': string;
|
21
|
+
'pisell2.pin.modal.desc': string;
|
22
|
+
'pisell2.pin.modal.time': string;
|
23
|
+
'pisell2.pin.modal.reset.pin': string;
|
24
|
+
'pisell2.pin.modal.cancel': string;
|
25
|
+
};
|
26
|
+
};
|
27
|
+
export default _default;
|
@@ -0,0 +1,50 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name in all)
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
8
|
+
};
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
+
}
|
15
|
+
return to;
|
16
|
+
};
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
|
19
|
+
// src/components/pinModal/locales.ts
|
20
|
+
var locales_exports = {};
|
21
|
+
__export(locales_exports, {
|
22
|
+
default: () => locales_default
|
23
|
+
});
|
24
|
+
module.exports = __toCommonJS(locales_exports);
|
25
|
+
var locales_default = {
|
26
|
+
en: {
|
27
|
+
"pisell2.pin.modal.title": "View PIN",
|
28
|
+
"pisell2.pin.modal.label": "Current PIN :",
|
29
|
+
"pisell2.pin.modal.desc": "This PIN will expire in 72 hours. Do not share your PIN with others.",
|
30
|
+
"pisell2.pin.modal.time": "Last Updated : ",
|
31
|
+
"pisell2.pin.modal.reset.pin": "Regenerate PIN",
|
32
|
+
"pisell2.pin.modal.cancel": "Cancel"
|
33
|
+
},
|
34
|
+
"zh-CN": {
|
35
|
+
"pisell2.pin.modal.title": "查看PIN",
|
36
|
+
"pisell2.pin.modal.label": "当前PIN码 :",
|
37
|
+
"pisell2.pin.modal.desc": "该PIN码将在72小时后失效,请勿向他人泄露您的PIN码。",
|
38
|
+
"pisell2.pin.modal.time": "最后更新时间 : ",
|
39
|
+
"pisell2.pin.modal.reset.pin": "重新生成PIN",
|
40
|
+
"pisell2.pin.modal.cancel": "取消"
|
41
|
+
},
|
42
|
+
"zh-HK": {
|
43
|
+
"pisell2.pin.modal.title": "查看PIN",
|
44
|
+
"pisell2.pin.modal.label": "當前PIN碼 :",
|
45
|
+
"pisell2.pin.modal.desc": "該PIN碼將在72小時後失效,請勿向他人洩露您的PIN碼。",
|
46
|
+
"pisell2.pin.modal.time": "最後更新時間 : ",
|
47
|
+
"pisell2.pin.modal.reset.pin": "重新生成PIN",
|
48
|
+
"pisell2.pin.modal.cancel": "取消"
|
49
|
+
}
|
50
|
+
};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name in all)
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
8
|
+
};
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
+
}
|
15
|
+
return to;
|
16
|
+
};
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
|
19
|
+
// src/components/pinModal/serve.ts
|
20
|
+
var serve_exports = {};
|
21
|
+
__export(serve_exports, {
|
22
|
+
getPinApi: () => getPinApi,
|
23
|
+
resetPinApi: () => resetPinApi
|
24
|
+
});
|
25
|
+
module.exports = __toCommonJS(serve_exports);
|
26
|
+
var import_utils = require("../../utils");
|
27
|
+
var getPinApi = (data) => {
|
28
|
+
return import_utils.request.getRequest().get("/h5/wallet/detail/pin", data);
|
29
|
+
};
|
30
|
+
var resetPinApi = (data) => {
|
31
|
+
return import_utils.request.getRequest().post("/h5/wallet/detail/pin/refresh", data);
|
32
|
+
};
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
34
|
+
0 && (module.exports = {
|
35
|
+
getPinApi,
|
36
|
+
resetPinApi
|
37
|
+
});
|
File without changes
|
File without changes
|
@@ -0,0 +1,93 @@
|
|
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/pinVerifyModal/hooks.ts
|
30
|
+
var hooks_exports = {};
|
31
|
+
__export(hooks_exports, {
|
32
|
+
usePinVerify: () => usePinVerify
|
33
|
+
});
|
34
|
+
module.exports = __toCommonJS(hooks_exports);
|
35
|
+
var import_react = require("react");
|
36
|
+
var import_ahooks = require("ahooks");
|
37
|
+
var import_materials = require("@pisell/materials");
|
38
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
39
|
+
var import_utils = require("../../utils");
|
40
|
+
var usePinVerify = () => {
|
41
|
+
var _a, _b;
|
42
|
+
const context = (0, import_useEngineContext.default)();
|
43
|
+
const apiPrefix = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.constants) == null ? void 0 : _b.apiPrefix;
|
44
|
+
const [verifyInfo, setVerifyInfo] = (0, import_react.useState)(null);
|
45
|
+
const verifySuccessRef = (0, import_react.useRef)(
|
46
|
+
() => {
|
47
|
+
}
|
48
|
+
);
|
49
|
+
const _setVerifyInfo = (data) => {
|
50
|
+
const { failed_count, check_max_count } = data || {};
|
51
|
+
if (!check_max_count) {
|
52
|
+
setVerifyInfo(null);
|
53
|
+
return;
|
54
|
+
}
|
55
|
+
setVerifyInfo({
|
56
|
+
check_max_count,
|
57
|
+
remaining_count: check_max_count - (failed_count || 0)
|
58
|
+
});
|
59
|
+
};
|
60
|
+
const verifyPinApi = (data) => {
|
61
|
+
return import_utils.request.getRequest().post(`${apiPrefix}/wallet/detail/pin/validate`, data, {
|
62
|
+
fullResult: true
|
63
|
+
});
|
64
|
+
};
|
65
|
+
const _verifyPin = (0, import_ahooks.useRequest)(verifyPinApi, {
|
66
|
+
manual: true,
|
67
|
+
onSuccess: (res) => {
|
68
|
+
var _a2;
|
69
|
+
if ((res == null ? void 0 : res.code) === 200) {
|
70
|
+
const { status, msg, failed_count, check_max_count } = (res == null ? void 0 : res.data) || {};
|
71
|
+
_setVerifyInfo({ failed_count, check_max_count });
|
72
|
+
(0, import_materials.PisellToast)({ content: msg, duration: 2 });
|
73
|
+
if (status === "success") {
|
74
|
+
(_a2 = verifySuccessRef.current) == null ? void 0 : _a2.call(verifySuccessRef, res == null ? void 0 : res.data);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
});
|
79
|
+
const verifyPin = (data, onSuccess) => {
|
80
|
+
verifySuccessRef.current = onSuccess;
|
81
|
+
_verifyPin.run(data);
|
82
|
+
};
|
83
|
+
return {
|
84
|
+
verifyPin,
|
85
|
+
loading: _verifyPin.loading,
|
86
|
+
verifyInfo,
|
87
|
+
setVerifyInfo: _setVerifyInfo
|
88
|
+
};
|
89
|
+
};
|
90
|
+
// Annotate the CommonJS export names for ESM import in node:
|
91
|
+
0 && (module.exports = {
|
92
|
+
usePinVerify
|
93
|
+
});
|