@pisell/private-materials 3.3.87 → 3.3.88
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/businessModel/SalesModel/Sales/index.js +4 -37
- package/es/components/Sales/Cart/index.js +1 -5
- package/es/components/Sales/Cart/utils.d.ts +0 -40
- package/es/components/Sales/Cart/utils.js +0 -167
- package/es/components/Sales/Checkout/index.d.ts +0 -4
- package/es/components/Sales/Checkout/index.js +8 -52
- package/es/components/Sales/Checkout/serve.d.ts +0 -13
- package/es/components/Sales/Checkout/serve.js +2 -16
- package/es/components/Sales/Checkout/utils.js +1 -7
- package/es/components/Sales/Resource/index.js +2 -2
- package/es/components/Sales/Resource/serve.d.ts +0 -7
- package/es/components/Sales/Resource/serve.js +0 -10
- package/es/components/Sales/Summary/index.d.ts +0 -10
- package/es/components/Sales/Summary/index.js +2 -17
- package/es/components/Sales/Summary/serve.d.ts +0 -1
- package/es/components/Sales/Summary/serve.js +0 -6
- package/es/components/Sales/Summary/utils.d.ts +0 -15
- package/es/components/Sales/Summary/utils.js +1 -43
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
- package/es/components/appointmentBooking/components/Deposit/index.js +7 -27
- package/es/components/appointmentBooking/components/Services/index.js +27 -23
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +20 -25
- package/es/components/appointmentBooking/deposit/index.js +2 -4
- package/es/components/appointmentBooking/index.js +0 -14
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/booking/components/footer/utils.d.ts +0 -1
- package/es/components/booking/components/footer/utils.js +1 -1
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/info/service2/utils.js +2 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/es/components/booking/info2/service/addService/utils.js +13 -44
- package/es/components/booking/info2/service/editService/Resources/index.js +8 -22
- package/es/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/es/components/booking/info2/utilsByBooking.js +0 -9
- package/es/components/booking/locales.d.ts +0 -3
- package/es/components/booking/locales.js +0 -3
- package/es/components/eftposPay/const.d.ts +1 -4
- package/es/components/eftposPay/const.js +1 -3
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/hooks.js +1 -3
- package/es/components/eftposPay/index.js +1 -1
- package/es/components/eftposPay/manufacturer.d.ts +0 -1
- package/es/components/eftposPay/manufacturer.js +0 -4
- package/es/components/eftposPay/pay.d.ts +1 -1
- package/es/components/eftposPay/pay.js +2 -6
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +17 -29
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +6 -10
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
- package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
- package/es/components/eventBooking/components/bookingDetailModal/index.js +4 -22
- package/es/components/eventBooking/index.js +7 -21
- package/es/components/eventBooking/locales.d.ts +0 -24
- package/es/components/eventBooking/locales.js +6 -30
- package/es/components/index.d.ts +1 -3
- package/es/components/index.js +1 -3
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +138 -257
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/lib/businessModel/SalesModel/Sales/index.js +8 -22
- package/lib/components/Sales/Cart/index.js +0 -1
- package/lib/components/Sales/Cart/utils.d.ts +0 -40
- package/lib/components/Sales/Cart/utils.js +0 -117
- package/lib/components/Sales/Checkout/index.d.ts +0 -4
- package/lib/components/Sales/Checkout/index.js +7 -39
- package/lib/components/Sales/Checkout/serve.d.ts +0 -13
- package/lib/components/Sales/Checkout/serve.js +2 -7
- package/lib/components/Sales/Checkout/utils.js +0 -2
- package/lib/components/Sales/Resource/index.js +1 -1
- package/lib/components/Sales/Resource/serve.d.ts +0 -7
- package/lib/components/Sales/Resource/serve.js +2 -9
- package/lib/components/Sales/Summary/index.d.ts +0 -10
- package/lib/components/Sales/Summary/index.js +1 -7
- package/lib/components/Sales/Summary/serve.d.ts +0 -1
- package/lib/components/Sales/Summary/serve.js +0 -32
- package/lib/components/Sales/Summary/utils.d.ts +0 -15
- package/lib/components/Sales/Summary/utils.js +1 -30
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
- package/lib/components/appointmentBooking/components/Deposit/index.js +4 -36
- package/lib/components/appointmentBooking/components/Services/index.js +11 -6
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +4 -8
- package/lib/components/appointmentBooking/deposit/index.js +2 -4
- package/lib/components/appointmentBooking/index.js +0 -11
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/booking/components/footer/utils.d.ts +0 -1
- package/lib/components/booking/components/footer/utils.js +0 -2
- package/lib/components/booking/components/voucher/index.js +2 -2
- package/lib/components/booking/info/service2/utils.js +2 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +0 -10
- package/lib/components/booking/info2/service/addService/utils.js +4 -27
- package/lib/components/booking/info2/service/editService/Resources/index.js +10 -54
- package/lib/components/booking/info2/service/editService/Resources/index.less +0 -6
- package/lib/components/booking/info2/utilsByBooking.js +0 -6
- package/lib/components/booking/locales.d.ts +0 -3
- package/lib/components/booking/locales.js +0 -3
- package/lib/components/eftposPay/const.d.ts +1 -4
- package/lib/components/eftposPay/const.js +0 -2
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/hooks.js +4 -11
- package/lib/components/eftposPay/index.js +1 -1
- package/lib/components/eftposPay/manufacturer.d.ts +0 -1
- package/lib/components/eftposPay/manufacturer.js +0 -6
- package/lib/components/eftposPay/pay.d.ts +1 -1
- package/lib/components/eftposPay/pay.js +2 -13
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +3 -16
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +5 -8
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
- package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +4 -10
- package/lib/components/eventBooking/index.js +7 -11
- package/lib/components/eventBooking/locales.d.ts +0 -24
- package/lib/components/eventBooking/locales.js +6 -30
- package/lib/components/index.d.ts +1 -3
- package/lib/components/index.js +0 -6
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +139 -263
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -6
- package/package.json +3 -3
- package/es/components/booking/editBookingModal/index.d.ts +0 -5
- package/es/components/booking/editBookingModal/index.js +0 -386
- package/es/components/booking/editBookingModal/index.less +0 -8
- package/es/components/booking/editBookingModal/locales.d.ts +0 -21
- package/es/components/booking/editBookingModal/locales.js +0 -20
- package/es/components/booking/editBookingModal/mock.d.ts +0 -807
- package/es/components/booking/editBookingModal/mock.js +0 -2993
- package/es/components/booking/editBookingModal/serve.d.ts +0 -51
- package/es/components/booking/editBookingModal/serve.js +0 -288
- package/es/components/booking/editBookingModal/type.d.ts +0 -12
- package/es/components/booking/editBookingModal/type.js +0 -1
- package/es/components/booking/editBookingModal/utils.d.ts +0 -12
- package/es/components/booking/editBookingModal/utils.js +0 -157
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -26
- package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +0 -308
- package/es/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- package/es/components/eftposPay/linkly/const.d.ts +0 -23
- package/es/components/eftposPay/linkly/const.js +0 -82
- package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
- package/es/components/eftposPay/linkly/hooks/index.js +0 -2
- package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
- package/es/components/eftposPay/linkly/hooks/normal.js +0 -318
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -273
- package/es/components/eftposPay/linkly/index.d.ts +0 -2
- package/es/components/eftposPay/linkly/index.js +0 -197
- package/es/components/eftposPay/linkly/service.d.ts +0 -32
- package/es/components/eftposPay/linkly/service.js +0 -73
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -17
- package/es/components/stepController/components/Content/index.d.ts +0 -7
- package/es/components/stepController/components/Content/index.js +0 -9
- package/es/components/stepController/components/Content/index.less +0 -8
- package/es/components/stepController/components/Footer/index.d.ts +0 -8
- package/es/components/stepController/components/Footer/index.js +0 -15
- package/es/components/stepController/components/Footer/index.less +0 -39
- package/es/components/stepController/components/Header/index.d.ts +0 -20
- package/es/components/stepController/components/Header/index.js +0 -97
- package/es/components/stepController/components/Header/index.less +0 -21
- package/es/components/stepController/index.d.ts +0 -5
- package/es/components/stepController/index.js +0 -64
- package/es/components/stepController/index.less +0 -11
- package/es/components/stepController/locales.d.ts +0 -27
- package/es/components/stepController/locales.js +0 -32
- package/es/components/stepController/types.d.ts +0 -23
- package/es/components/stepController/types.js +0 -1
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
- package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/es/components/ticketBooking/utils/formatTime.js +0 -144
- package/es/hooks/useWindowSize.d.ts +0 -5
- package/es/hooks/useWindowSize.js +0 -26
- package/lib/components/booking/editBookingModal/index.d.ts +0 -5
- package/lib/components/booking/editBookingModal/index.js +0 -363
- package/lib/components/booking/editBookingModal/index.less +0 -8
- package/lib/components/booking/editBookingModal/locales.d.ts +0 -21
- package/lib/components/booking/editBookingModal/locales.js +0 -44
- package/lib/components/booking/editBookingModal/mock.d.ts +0 -807
- package/lib/components/booking/editBookingModal/mock.js +0 -3314
- package/lib/components/booking/editBookingModal/serve.d.ts +0 -51
- package/lib/components/booking/editBookingModal/serve.js +0 -178
- package/lib/components/booking/editBookingModal/type.d.ts +0 -12
- package/lib/components/booking/editBookingModal/type.js +0 -17
- package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
- package/lib/components/booking/editBookingModal/utils.js +0 -158
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +0 -7
- package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +0 -53
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +0 -10
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +0 -311
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +0 -44
- package/lib/components/eftposPay/linkly/const.d.ts +0 -23
- package/lib/components/eftposPay/linkly/const.js +0 -102
- package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
- package/lib/components/eftposPay/linkly/hooks/index.js +0 -25
- package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
- package/lib/components/eftposPay/linkly/hooks/normal.js +0 -239
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -222
- package/lib/components/eftposPay/linkly/index.d.ts +0 -2
- package/lib/components/eftposPay/linkly/index.js +0 -208
- package/lib/components/eftposPay/linkly/service.d.ts +0 -32
- package/lib/components/eftposPay/linkly/service.js +0 -55
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -55
- package/lib/components/stepController/components/Content/index.d.ts +0 -7
- package/lib/components/stepController/components/Content/index.js +0 -40
- package/lib/components/stepController/components/Content/index.less +0 -8
- package/lib/components/stepController/components/Footer/index.d.ts +0 -8
- package/lib/components/stepController/components/Footer/index.js +0 -49
- package/lib/components/stepController/components/Footer/index.less +0 -39
- package/lib/components/stepController/components/Header/index.d.ts +0 -20
- package/lib/components/stepController/components/Header/index.js +0 -104
- package/lib/components/stepController/components/Header/index.less +0 -21
- package/lib/components/stepController/index.d.ts +0 -5
- package/lib/components/stepController/index.js +0 -89
- package/lib/components/stepController/index.less +0 -11
- package/lib/components/stepController/locales.d.ts +0 -27
- package/lib/components/stepController/locales.js +0 -50
- package/lib/components/stepController/types.d.ts +0 -23
- package/lib/components/stepController/types.js +0 -17
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
- package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/lib/components/ticketBooking/utils/formatTime.js +0 -139
- package/lib/hooks/useWindowSize.d.ts +0 -5
- package/lib/hooks/useWindowSize.js +0 -51
- package/lowcode/edit-booking-modal/meta.ts +0 -53
- package/lowcode/step-controller/meta.ts +0 -88
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import React, { useEffect, useRef } from 'react';
|
|
8
|
-
import { Button } from 'antd';
|
|
9
|
-
import { locales } from '@pisell/utils';
|
|
10
|
-
import { useContextData, useDispatch, updateCustom, updateState, updateNextStep } from "../store";
|
|
11
|
-
import { useFail, useStoreRef } from "../hooks";
|
|
12
|
-
import useEngineContext from "../../../hooks/useEngineContext";
|
|
13
|
-
import { request } from "../../../utils";
|
|
14
|
-
import Step from "../component/step/step";
|
|
15
|
-
import { StatusEnum } from "../const";
|
|
16
|
-
import { useLinklyCancel, useLinklyPayOrRefund, useTimeResultQuery, useLinklySignature } from "./hooks";
|
|
17
|
-
import { LinklyActionStatus } from "./const";
|
|
18
|
-
import { getPayParams } from "../helper";
|
|
19
|
-
var Linkly = function Linkly(_ref) {
|
|
20
|
-
var api = _ref.api,
|
|
21
|
-
onChange = _ref.onChange;
|
|
22
|
-
// 设置request
|
|
23
|
-
var context = useEngineContext();
|
|
24
|
-
var utils = context.appHelper.utils || {};
|
|
25
|
-
request.setRequest(utils === null || utils === void 0 ? void 0 : utils.request);
|
|
26
|
-
var _useContextData = useContextData(),
|
|
27
|
-
custom = _useContextData.custom,
|
|
28
|
-
status = _useContextData.status;
|
|
29
|
-
var _useStoreRef = useStoreRef(),
|
|
30
|
-
statusRef = _useStoreRef.statusRef,
|
|
31
|
-
netRef = _useStoreRef.netRef,
|
|
32
|
-
modeRef = _useStoreRef.modeRef,
|
|
33
|
-
amountRef = _useStoreRef.amountRef,
|
|
34
|
-
orderIdRef = _useStoreRef.orderIdRef,
|
|
35
|
-
numRef = _useStoreRef.numRef,
|
|
36
|
-
deviceRef = _useStoreRef.deviceRef,
|
|
37
|
-
payRef = _useStoreRef.payRef;
|
|
38
|
-
var dispatch = useDispatch();
|
|
39
|
-
var stepRef = useRef(custom === null || custom === void 0 ? void 0 : custom.step);
|
|
40
|
-
var fail = useFail(0);
|
|
41
|
-
var failRef = useRef(fail);
|
|
42
|
-
var initRef = useRef(false);
|
|
43
|
-
var controllerRef = useRef();
|
|
44
|
-
var unloadRef = useRef(false);
|
|
45
|
-
var clearRef = useRef();
|
|
46
|
-
|
|
47
|
-
// 检查是否可以继续处理接口返回结果,无网 或 已卸载 则不进行处理
|
|
48
|
-
var handleCheck = function handleCheck() {
|
|
49
|
-
return !(unloadRef.current || !netRef.current);
|
|
50
|
-
};
|
|
51
|
-
var handleLinklySuccess = function handleLinklySuccess(res) {
|
|
52
|
-
var resData = (res === null || res === void 0 ? void 0 : res.data) || {};
|
|
53
|
-
var receipt = Array.isArray(resData === null || resData === void 0 ? void 0 : resData.receipt) ? resData.receipt : [resData.receipt];
|
|
54
|
-
receipt = receipt.filter(function (item) {
|
|
55
|
-
return typeof item === 'string';
|
|
56
|
-
}).filter(Boolean);
|
|
57
|
-
dispatch(updateNextStep());
|
|
58
|
-
// 将所有步骤状态设为完成 resolve
|
|
59
|
-
dispatch(updateCustom({
|
|
60
|
-
card_reader_surcharge: (resData === null || resData === void 0 ? void 0 : resData.card_reader_surcharge) || 0,
|
|
61
|
-
receipt: receipt
|
|
62
|
-
}));
|
|
63
|
-
|
|
64
|
-
// 更新支付状态与文案
|
|
65
|
-
dispatch(updateState({
|
|
66
|
-
status: 'success',
|
|
67
|
-
title: locales.getText('page.eftpos-pay.text.successful')(modeRef.current)
|
|
68
|
-
}));
|
|
69
|
-
clearRef.current = setTimeout(function () {
|
|
70
|
-
var _deviceRef$current;
|
|
71
|
-
var params = getPayParams({
|
|
72
|
-
mode: modeRef.current,
|
|
73
|
-
amount: amountRef.current,
|
|
74
|
-
order_id: orderIdRef.current,
|
|
75
|
-
number: numRef.current,
|
|
76
|
-
device: deviceRef.current,
|
|
77
|
-
pay: payRef.current,
|
|
78
|
-
custom: {
|
|
79
|
-
card_reader_surcharge: (resData === null || resData === void 0 ? void 0 : resData.card_reader_surcharge) || 0,
|
|
80
|
-
receipt: receipt
|
|
81
|
-
}
|
|
82
|
-
}, 'success');
|
|
83
|
-
onChange('success', _objectSpread(_objectSpread({}, params), {}, {
|
|
84
|
-
receipt: (_deviceRef$current = deviceRef.current) !== null && _deviceRef$current !== void 0 && (_deviceRef$current = _deviceRef$current.setting) !== null && _deviceRef$current !== void 0 && _deviceRef$current.receipts ? [] : receipt
|
|
85
|
-
}));
|
|
86
|
-
}, 1000);
|
|
87
|
-
};
|
|
88
|
-
var _useLinklyPayOrRefund = useLinklyPayOrRefund(handleCheck),
|
|
89
|
-
payOrRefund = _useLinklyPayOrRefund.payOrRefund;
|
|
90
|
-
var _useLinklyCancel = useLinklyCancel(handleCheck),
|
|
91
|
-
linklyCancel = _useLinklyCancel.linklyCancel;
|
|
92
|
-
var _useTimeResultQuery = useTimeResultQuery(api, handleCheck, handleLinklySuccess),
|
|
93
|
-
resultQuery = _useTimeResultQuery.run,
|
|
94
|
-
stopResultQuery = _useTimeResultQuery.stop;
|
|
95
|
-
var _useLinklySignature = useLinklySignature(handleCheck),
|
|
96
|
-
linklySignature = _useLinklySignature.linklySignature;
|
|
97
|
-
useEffect(function () {
|
|
98
|
-
stepRef.current = custom === null || custom === void 0 ? void 0 : custom.step;
|
|
99
|
-
}, [custom === null || custom === void 0 ? void 0 : custom.step]);
|
|
100
|
-
useEffect(function () {
|
|
101
|
-
failRef.current = fail;
|
|
102
|
-
}, [fail]);
|
|
103
|
-
useEffect(function () {
|
|
104
|
-
if (statusRef.current === StatusEnum.Success || statusRef.current === StatusEnum.Fail) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
if (initRef.current) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
initRef.current = true;
|
|
111
|
-
|
|
112
|
-
// 存在支付流水号
|
|
113
|
-
if (numRef.current) {
|
|
114
|
-
resultQuery();
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
payOrRefund(resultQuery, handleLinklySuccess);
|
|
118
|
-
}, []);
|
|
119
|
-
useEffect(function () {
|
|
120
|
-
return function () {
|
|
121
|
-
var _controllerRef$curren;
|
|
122
|
-
(_controllerRef$curren = controllerRef.current) === null || _controllerRef$curren === void 0 || _controllerRef$curren.abort();
|
|
123
|
-
unloadRef.current = true;
|
|
124
|
-
if (clearRef.current) {
|
|
125
|
-
clearTimeout(clearRef.current);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
}, []);
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* 取消支付
|
|
132
|
-
*/
|
|
133
|
-
var onCancel = function onCancel() {
|
|
134
|
-
stopResultQuery();
|
|
135
|
-
linklyCancel(resultQuery);
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* 拒绝签名
|
|
140
|
-
*/
|
|
141
|
-
var onDecline = function onDecline() {
|
|
142
|
-
stopResultQuery();
|
|
143
|
-
linklySignature(2, resultQuery);
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* 接受签名
|
|
148
|
-
*/
|
|
149
|
-
var onAccept = function onAccept() {
|
|
150
|
-
stopResultQuery();
|
|
151
|
-
linklySignature(3, resultQuery);
|
|
152
|
-
};
|
|
153
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
154
|
-
className: "pisell-lowcode__eft-pay-body"
|
|
155
|
-
}, ((custom === null || custom === void 0 ? void 0 : custom.list) || []).map(function (item) {
|
|
156
|
-
return /*#__PURE__*/React.createElement(Step, {
|
|
157
|
-
key: item.index,
|
|
158
|
-
pedding: item.pedding,
|
|
159
|
-
resolve: item.resolve,
|
|
160
|
-
reject: item.reject,
|
|
161
|
-
status: item.status
|
|
162
|
-
});
|
|
163
|
-
}), status === StatusEnum.Loading ? /*#__PURE__*/React.createElement("div", {
|
|
164
|
-
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
|
165
|
-
}, locales.getText('page.eftpos-pay.text.processing')) : null, status === StatusEnum.Question ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
166
|
-
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
|
167
|
-
}, locales.getText('page.eftpos-pay.text.receipt.again.title')), /*#__PURE__*/React.createElement("div", {
|
|
168
|
-
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
|
169
|
-
}, locales.getText('page.eftpos-pay.text.receipt.again.text'))) : null, status === StatusEnum.Success ? /*#__PURE__*/React.createElement("div", {
|
|
170
|
-
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
|
171
|
-
}, locales.getText('page.eftpos-pay.text.transaction.end')) : null), (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.Cancel ? /*#__PURE__*/React.createElement("div", {
|
|
172
|
-
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
173
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
174
|
-
block: true,
|
|
175
|
-
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
176
|
-
onClick: onCancel,
|
|
177
|
-
disabled: !!(custom !== null && custom !== void 0 && custom.buttonDisabled)
|
|
178
|
-
}, locales.getText('page.eftpos-pay.text.cancel'))) : null, (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.CancelWaiting || (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.SignatureWaiting ? /*#__PURE__*/React.createElement("div", {
|
|
179
|
-
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
180
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
181
|
-
block: true,
|
|
182
|
-
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
183
|
-
disabled: true
|
|
184
|
-
}, locales.getText('page.eftpos-pay.text.leave'))) : null, (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.Signature ? /*#__PURE__*/React.createElement("div", {
|
|
185
|
-
className: "pisell-lowcode__eft-pay-step-item-btns"
|
|
186
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
187
|
-
block: true,
|
|
188
|
-
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
189
|
-
onClick: onDecline
|
|
190
|
-
}, locales.getText('page.eftpos-pay.text.decline')), /*#__PURE__*/React.createElement(Button, {
|
|
191
|
-
block: true,
|
|
192
|
-
type: "primary",
|
|
193
|
-
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
194
|
-
onClick: onAccept
|
|
195
|
-
}, locales.getText('page.eftpos-pay.text.accept'))) : null);
|
|
196
|
-
};
|
|
197
|
-
export default Linkly;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* linkly支付接口
|
|
3
|
-
*/
|
|
4
|
-
export declare const linklyPayApi: (data: any) => Promise<any>;
|
|
5
|
-
/**
|
|
6
|
-
* 查询linkly支付结果
|
|
7
|
-
*/
|
|
8
|
-
export declare const linklyPayQueryApi: (param: any) => Promise<any>;
|
|
9
|
-
/**
|
|
10
|
-
* 取消linkly支付
|
|
11
|
-
*/
|
|
12
|
-
export declare const linklyPayCancelApi: (param: any) => Promise<any>;
|
|
13
|
-
/**
|
|
14
|
-
* linkly支付签名结果处理
|
|
15
|
-
*/
|
|
16
|
-
export declare const linklyPaySignatureApi: (param: any) => Promise<any>;
|
|
17
|
-
/**
|
|
18
|
-
* linkly退款接口
|
|
19
|
-
*/
|
|
20
|
-
export declare const linklyRefundApi: (data: any) => Promise<any>;
|
|
21
|
-
/**
|
|
22
|
-
* 查询linkly退款结果
|
|
23
|
-
*/
|
|
24
|
-
export declare const linklyRefundQueryApi: (param: any) => Promise<any>;
|
|
25
|
-
/**
|
|
26
|
-
* 取消linkly退款
|
|
27
|
-
*/
|
|
28
|
-
export declare const linklyRefundCancelApi: (param: any) => Promise<any>;
|
|
29
|
-
/**
|
|
30
|
-
* linkly退款签名结果处理
|
|
31
|
-
*/
|
|
32
|
-
export declare const linklyRefundSignatureApi: (param: any) => Promise<any>;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { request } from "../../../utils";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* linkly支付接口
|
|
5
|
-
*/
|
|
6
|
-
export var linklyPayApi = function linklyPayApi(data) {
|
|
7
|
-
return request.getRequest().post('/shop/linkly/pay/apply', data, {
|
|
8
|
-
customMessage: true
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 查询linkly支付结果
|
|
14
|
-
*/
|
|
15
|
-
export var linklyPayQueryApi = function linklyPayQueryApi(param) {
|
|
16
|
-
return request.getRequest().get('/shop/linkly/pay/query', param, {
|
|
17
|
-
customMessage: true
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 取消linkly支付
|
|
23
|
-
*/
|
|
24
|
-
export var linklyPayCancelApi = function linklyPayCancelApi(param) {
|
|
25
|
-
return request.getRequest().post('/shop/linkly/pay/cancel', param, {
|
|
26
|
-
customMessage: true
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* linkly支付签名结果处理
|
|
32
|
-
*/
|
|
33
|
-
export var linklyPaySignatureApi = function linklyPaySignatureApi(param) {
|
|
34
|
-
return request.getRequest().post('/shop/linkly/pay/signature', param, {
|
|
35
|
-
customMessage: true
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* linkly退款接口
|
|
41
|
-
*/
|
|
42
|
-
export var linklyRefundApi = function linklyRefundApi(data) {
|
|
43
|
-
return request.getRequest().post('/shop/linkly/refund/apply', data, {
|
|
44
|
-
customMessage: true
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* 查询linkly退款结果
|
|
50
|
-
*/
|
|
51
|
-
export var linklyRefundQueryApi = function linklyRefundQueryApi(param) {
|
|
52
|
-
return request.getRequest().get('/shop/linkly/refund/query', param, {
|
|
53
|
-
customMessage: true
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* 取消linkly退款
|
|
59
|
-
*/
|
|
60
|
-
export var linklyRefundCancelApi = function linklyRefundCancelApi(param) {
|
|
61
|
-
return request.getRequest().post('/shop/linkly/refund/cancel', param, {
|
|
62
|
-
customMessage: true
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* linkly退款签名结果处理
|
|
68
|
-
*/
|
|
69
|
-
export var linklyRefundSignatureApi = function linklyRefundSignatureApi(param) {
|
|
70
|
-
return request.getRequest().post('/shop/linkly/refund/signature', param, {
|
|
71
|
-
customMessage: true
|
|
72
|
-
});
|
|
73
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useSummary } from "../../../../../Sales";
|
|
3
|
-
import { DepositContent } from "../../../../../appointmentBooking/components/Deposit";
|
|
4
|
-
var Deposit = function Deposit() {
|
|
5
|
-
var _useSummary = useSummary(),
|
|
6
|
-
deposit = _useSummary.deposit,
|
|
7
|
-
isAgreeDepositPolicy = _useSummary.isAgreeDepositPolicy,
|
|
8
|
-
setIsAgreeDepositPolicy = _useSummary.setIsAgreeDepositPolicy,
|
|
9
|
-
getDepositProtocol = _useSummary.getDepositProtocol;
|
|
10
|
-
return /*#__PURE__*/React.createElement(DepositContent, {
|
|
11
|
-
isAgreeDepositPolicy: !!isAgreeDepositPolicy,
|
|
12
|
-
setIsAgreeDepositPolicy: setIsAgreeDepositPolicy,
|
|
13
|
-
deposit: deposit,
|
|
14
|
-
depositProtocolRequest: getDepositProtocol
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
export default Deposit;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import "./index.less";
|
|
3
|
-
var Content = function Content(_ref) {
|
|
4
|
-
var children = _ref.children;
|
|
5
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
-
className: "pisell-step-controller-content"
|
|
7
|
-
}, children);
|
|
8
|
-
};
|
|
9
|
-
export default Content;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import "./index.less";
|
|
4
|
-
var Footer = function Footer(_ref) {
|
|
5
|
-
var isMobile = _ref.isMobile,
|
|
6
|
-
children = _ref.children;
|
|
7
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
8
|
-
className: classNames('pisell-step-controller-footer-wrap', {
|
|
9
|
-
'pisell-step-controller-footer-wrap-mobile': isMobile
|
|
10
|
-
})
|
|
11
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
12
|
-
className: "pisell-step-controller-footer"
|
|
13
|
-
}, children));
|
|
14
|
-
};
|
|
15
|
-
export default Footer;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
.pisell-step-controller-footer-wrap {
|
|
2
|
-
position: sticky;
|
|
3
|
-
left: 0;
|
|
4
|
-
right: 0;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
width: 100%;
|
|
7
|
-
background: #fff;
|
|
8
|
-
// box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
|
|
9
|
-
padding: 24px;
|
|
10
|
-
z-index: 100;
|
|
11
|
-
border-top: 1px solid var(--Gray-100, #f2f4f7);
|
|
12
|
-
|
|
13
|
-
.pisell-step-controller-footer {
|
|
14
|
-
width: 1000px;
|
|
15
|
-
margin: 0 auto;
|
|
16
|
-
max-width: 100%;
|
|
17
|
-
display: flex;
|
|
18
|
-
gap: 12px;
|
|
19
|
-
justify-content: flex-end;
|
|
20
|
-
|
|
21
|
-
.pisell-section-headers-main {
|
|
22
|
-
color: var(--Gray-900, #101828);
|
|
23
|
-
font-size: 14px;
|
|
24
|
-
font-weight: 400;
|
|
25
|
-
line-height: 20px;
|
|
26
|
-
justify-content: start;
|
|
27
|
-
|
|
28
|
-
.select-text {
|
|
29
|
-
font-size: 18px;
|
|
30
|
-
font-weight: 600;
|
|
31
|
-
line-height: 24px;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.pisell-step-controller-footer-wrap-mobile {
|
|
38
|
-
border-top: 1px solid #eaecf0;
|
|
39
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Step } from '../../types';
|
|
3
|
-
import './index.less';
|
|
4
|
-
export interface HeaderProps {
|
|
5
|
-
steps: Step[];
|
|
6
|
-
currentStepIndex: number;
|
|
7
|
-
className?: string;
|
|
8
|
-
style?: React.CSSProperties;
|
|
9
|
-
onBack?: (key: string) => void;
|
|
10
|
-
onClose?: () => void;
|
|
11
|
-
confirmCloseProps?: {
|
|
12
|
-
isConfirmClose?: boolean;
|
|
13
|
-
title?: string;
|
|
14
|
-
content?: string;
|
|
15
|
-
okText?: string;
|
|
16
|
-
cancelText?: string;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
declare const Header: React.FC<HeaderProps>;
|
|
20
|
-
export default Header;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { useState } from 'react';
|
|
8
|
-
import { PisellHeaderProgressBar, PisellModal } from '@pisell/materials';
|
|
9
|
-
import { locales } from '@pisell/utils';
|
|
10
|
-
import "./index.less";
|
|
11
|
-
var Header = function Header(_ref) {
|
|
12
|
-
var _steps$currentStepInd;
|
|
13
|
-
var steps = _ref.steps,
|
|
14
|
-
currentStepIndex = _ref.currentStepIndex,
|
|
15
|
-
style = _ref.style,
|
|
16
|
-
onBack = _ref.onBack,
|
|
17
|
-
onClose = _ref.onClose,
|
|
18
|
-
confirmCloseProps = _ref.confirmCloseProps;
|
|
19
|
-
var _useState = useState(false),
|
|
20
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
21
|
-
open = _useState2[0],
|
|
22
|
-
setOpen = _useState2[1];
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @title: 点击关闭
|
|
26
|
-
* @description:
|
|
27
|
-
* @return {*}
|
|
28
|
-
* @Author: WangHan
|
|
29
|
-
* @Date: 2025-01-14 22:41
|
|
30
|
-
*/
|
|
31
|
-
var handleClose = function handleClose() {
|
|
32
|
-
// 二次确认
|
|
33
|
-
if (confirmCloseProps !== null && confirmCloseProps !== void 0 && confirmCloseProps.isConfirmClose) {
|
|
34
|
-
setOpen(true);
|
|
35
|
-
} else {
|
|
36
|
-
onClose === null || onClose === void 0 || onClose();
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @title: 点击退出
|
|
42
|
-
* @description:
|
|
43
|
-
* @return {*}
|
|
44
|
-
* @Author: WangHan
|
|
45
|
-
* @Date: 2025-02-10 17:46
|
|
46
|
-
*/
|
|
47
|
-
var handleOk = function handleOk() {
|
|
48
|
-
setOpen(false);
|
|
49
|
-
onClose === null || onClose === void 0 || onClose();
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* @title: 返回上一步
|
|
54
|
-
* @description:
|
|
55
|
-
* @return {*}
|
|
56
|
-
* @Author: WangHan
|
|
57
|
-
* @Date: 2025-06-12 16:44
|
|
58
|
-
*/
|
|
59
|
-
var handleBack = function handleBack() {
|
|
60
|
-
if (!steps) return;
|
|
61
|
-
if (currentStepIndex > 0) {
|
|
62
|
-
var prevKey = steps[currentStepIndex - 1].key;
|
|
63
|
-
onBack === null || onBack === void 0 || onBack(prevKey);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PisellHeaderProgressBar, {
|
|
67
|
-
className: "pisell-step-controller-header",
|
|
68
|
-
style: style,
|
|
69
|
-
stepText: locales.getText('pisell2.step.controller.step')(currentStepIndex + 1),
|
|
70
|
-
title: steps === null || steps === void 0 || (_steps$currentStepInd = steps[currentStepIndex]) === null || _steps$currentStepInd === void 0 ? void 0 : _steps$currentStepInd.description,
|
|
71
|
-
showClose: true,
|
|
72
|
-
onBack: handleBack,
|
|
73
|
-
onClose: handleClose,
|
|
74
|
-
enableBorder: true,
|
|
75
|
-
borderColor: "#EAECF0",
|
|
76
|
-
showBack: currentStepIndex > 0 || false
|
|
77
|
-
}), /*#__PURE__*/React.createElement(PisellModal.Information, {
|
|
78
|
-
open: open,
|
|
79
|
-
title: (confirmCloseProps === null || confirmCloseProps === void 0 ? void 0 : confirmCloseProps.title) || '',
|
|
80
|
-
describe: (confirmCloseProps === null || confirmCloseProps === void 0 ? void 0 : confirmCloseProps.content) || '',
|
|
81
|
-
okText: (confirmCloseProps === null || confirmCloseProps === void 0 ? void 0 : confirmCloseProps.okText) || '',
|
|
82
|
-
cancelText: (confirmCloseProps === null || confirmCloseProps === void 0 ? void 0 : confirmCloseProps.cancelText) || '',
|
|
83
|
-
closable: true,
|
|
84
|
-
okButtonProps: {
|
|
85
|
-
style: {
|
|
86
|
-
backgroundColor: '#D92D20'
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
onCancel: function onCancel() {
|
|
90
|
-
setOpen(false);
|
|
91
|
-
},
|
|
92
|
-
onOk: function onOk() {
|
|
93
|
-
return handleOk();
|
|
94
|
-
}
|
|
95
|
-
}));
|
|
96
|
-
};
|
|
97
|
-
export default Header;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.pisell-step-controller-header {
|
|
2
|
-
.pisell-section-headers-content {
|
|
3
|
-
width: 1000px;
|
|
4
|
-
margin: 0 auto;
|
|
5
|
-
max-width: 100%;
|
|
6
|
-
|
|
7
|
-
.pisell-section-headers-main {
|
|
8
|
-
color: var(--Gray-900, #101828);
|
|
9
|
-
font-size: 14px;
|
|
10
|
-
font-weight: 400;
|
|
11
|
-
line-height: 20px;
|
|
12
|
-
justify-content: start;
|
|
13
|
-
|
|
14
|
-
.select-text {
|
|
15
|
-
font-size: 18px;
|
|
16
|
-
font-weight: 600;
|
|
17
|
-
line-height: 24px;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { locales } from '@pisell/utils';
|
|
4
|
-
import { usePisellConfig } from '@pisell/materials';
|
|
5
|
-
import useEngineContext from "../../hooks/useEngineContext";
|
|
6
|
-
import { useWindowSize } from "../../hooks/useWindowSize";
|
|
7
|
-
import Header from "./components/Header";
|
|
8
|
-
import Footer from "./components/Footer";
|
|
9
|
-
import Content from "./components/Content";
|
|
10
|
-
import localeTexts from "./locales";
|
|
11
|
-
import "./index.less";
|
|
12
|
-
var StepController = function StepController(_ref) {
|
|
13
|
-
var _context$engine;
|
|
14
|
-
var steps = _ref.steps,
|
|
15
|
-
currentStep = _ref.currentStep,
|
|
16
|
-
children = _ref.children,
|
|
17
|
-
onBack = _ref.onBack,
|
|
18
|
-
confirmCloseProps = _ref.confirmCloseProps,
|
|
19
|
-
showFooter = _ref.showFooter,
|
|
20
|
-
footerContent = _ref.footerContent,
|
|
21
|
-
onClose = _ref.onClose;
|
|
22
|
-
var context = useEngineContext();
|
|
23
|
-
locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
|
|
24
|
-
|
|
25
|
-
// 监听窗口大小变化,重新计算vh
|
|
26
|
-
useWindowSize({
|
|
27
|
-
debounceMs: 200
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* @title: 是否是移动端
|
|
32
|
-
* @description:
|
|
33
|
-
* @return {*}
|
|
34
|
-
* @Author: WangHan
|
|
35
|
-
* @Date: 2025-06-12 15:56
|
|
36
|
-
*/
|
|
37
|
-
var isMobile = useMemo(function () {
|
|
38
|
-
var config = usePisellConfig();
|
|
39
|
-
var platform = (config === null || config === void 0 ? void 0 : config.platform) || 'h5';
|
|
40
|
-
return platform === 'h5';
|
|
41
|
-
}, []);
|
|
42
|
-
var currentStepIndex = useMemo(function () {
|
|
43
|
-
return (steps === null || steps === void 0 ? void 0 : steps.findIndex(function (step) {
|
|
44
|
-
return step.key === currentStep;
|
|
45
|
-
})) || 0;
|
|
46
|
-
}, [steps, currentStep]);
|
|
47
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
-
className: classNames('pisell-step-controller', {
|
|
49
|
-
'pisell-step-controller-mobile': isMobile
|
|
50
|
-
})
|
|
51
|
-
}, /*#__PURE__*/React.createElement(Header, {
|
|
52
|
-
steps: steps,
|
|
53
|
-
currentStepIndex: currentStepIndex,
|
|
54
|
-
confirmCloseProps: confirmCloseProps,
|
|
55
|
-
onBack: onBack,
|
|
56
|
-
onClose: onClose
|
|
57
|
-
}), /*#__PURE__*/React.createElement(Content, {
|
|
58
|
-
children: children
|
|
59
|
-
}), showFooter && footerContent ? /*#__PURE__*/React.createElement(Footer, {
|
|
60
|
-
children: footerContent,
|
|
61
|
-
isMobile: isMobile
|
|
62
|
-
}) : null);
|
|
63
|
-
};
|
|
64
|
-
export default StepController;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
en: {
|
|
3
|
-
'pisell2.step.controller.step': (step: number) => string;
|
|
4
|
-
'pisell2.step.controller.sendEmail': string;
|
|
5
|
-
'pisell2.step.controller.copy': string;
|
|
6
|
-
'pisell2.step.controller.download': string;
|
|
7
|
-
'pisell2.step.controller.preview': string;
|
|
8
|
-
'pisell2.step.controller.continue': string;
|
|
9
|
-
};
|
|
10
|
-
'zh-CN': {
|
|
11
|
-
'pisell2.step.controller.step': (step: number) => string;
|
|
12
|
-
'pisell2.step.controller.sendEmail': string;
|
|
13
|
-
'pisell2.step.controller.copy': string;
|
|
14
|
-
'pisell2.step.controller.download': string;
|
|
15
|
-
'pisell2.step.controller.preview': string;
|
|
16
|
-
'pisell2.step.controller.continue': string;
|
|
17
|
-
};
|
|
18
|
-
'zh-HK': {
|
|
19
|
-
'pisell2.step.controller.step': (step: number) => string;
|
|
20
|
-
'pisell2.step.controller.sendEmail': string;
|
|
21
|
-
'pisell2.step.controller.copy': string;
|
|
22
|
-
'pisell2.step.controller.download': string;
|
|
23
|
-
'pisell2.step.controller.preview': string;
|
|
24
|
-
'pisell2.step.controller.continue': string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export default _default;
|