@pisell/private-materials 3.0.205 → 3.0.206
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/eftposPay/component/fail/failCustom.js +0 -1
- package/es/components/eftposPay/component/fail/index.js +0 -1
- package/es/components/eftposPay/component/manual/index.js +1 -4
- package/es/components/eftposPay/const.d.ts +1 -27
- package/es/components/eftposPay/const.js +0 -22
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/device.js +2 -2
- package/es/components/eftposPay/helper.d.ts +0 -5
- package/es/components/eftposPay/helper.js +4 -10
- package/es/components/eftposPay/hooks.d.ts +0 -1
- package/es/components/eftposPay/hooks.js +16 -22
- package/es/components/eftposPay/index.d.ts +1 -1
- package/es/components/eftposPay/index.js +179 -130
- package/es/components/eftposPay/locales.d.ts +0 -15
- package/es/components/eftposPay/locales.js +0 -15
- package/es/components/eftposPay/payo/config.js +8 -20
- package/es/components/eftposPay/tyro/index.js +2 -4
- package/es/components/eftposPay/windcave/windcave.js +6 -17
- package/lib/components/eftposPay/component/fail/failCustom.js +1 -1
- package/lib/components/eftposPay/component/fail/index.js +1 -1
- package/lib/components/eftposPay/component/manual/index.js +5 -19
- package/lib/components/eftposPay/const.d.ts +1 -27
- package/lib/components/eftposPay/const.js +0 -18
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/device.js +2 -2
- package/lib/components/eftposPay/helper.d.ts +0 -5
- package/lib/components/eftposPay/helper.js +4 -8
- package/lib/components/eftposPay/hooks.d.ts +0 -1
- package/lib/components/eftposPay/hooks.js +2 -8
- package/lib/components/eftposPay/index.d.ts +1 -1
- package/lib/components/eftposPay/index.js +144 -106
- package/lib/components/eftposPay/locales.d.ts +0 -15
- package/lib/components/eftposPay/locales.js +0 -15
- package/lib/components/eftposPay/payo/config.js +9 -33
- package/lib/components/eftposPay/tyro/index.js +2 -4
- package/lib/components/eftposPay/windcave/windcave.js +6 -29
- package/package.json +4 -4
- package/es/components/eftposPay/app.d.ts +0 -11
- package/es/components/eftposPay/app.js +0 -173
- package/es/components/eftposPay/tip.d.ts +0 -10
- package/es/components/eftposPay/tip.js +0 -177
- package/es/components/eftposPay/tip.less +0 -9
- package/lib/components/eftposPay/app.d.ts +0 -11
- package/lib/components/eftposPay/app.js +0 -166
- package/lib/components/eftposPay/tip.d.ts +0 -10
- package/lib/components/eftposPay/tip.js +0 -159
- package/lib/components/eftposPay/tip.less +0 -9
|
@@ -89,7 +89,6 @@ export default (function (_ref) {
|
|
|
89
89
|
amount: amount,
|
|
90
90
|
total: amount,
|
|
91
91
|
number: number,
|
|
92
|
-
uniquePaymentNumber: number,
|
|
93
92
|
device: device,
|
|
94
93
|
order_id: order_id
|
|
95
94
|
});
|
|
@@ -115,7 +114,6 @@ export default (function (_ref) {
|
|
|
115
114
|
setDisabled(true);
|
|
116
115
|
onChange('fail', {
|
|
117
116
|
number: number,
|
|
118
|
-
uniquePaymentNumber: number,
|
|
119
117
|
device: device,
|
|
120
118
|
order_id: order_id
|
|
121
119
|
});
|
|
@@ -153,7 +151,6 @@ export default (function (_ref) {
|
|
|
153
151
|
total: moneyDeci.toFixed(2, Decimal.ROUND_HALF_UP),
|
|
154
152
|
totalUnit: formatAmount(moneyDeci.toFixed(2, Decimal.ROUND_HALF_UP), 2, symbol),
|
|
155
153
|
number: number,
|
|
156
|
-
uniquePaymentNumber: number,
|
|
157
154
|
device: device,
|
|
158
155
|
order_id: order_id
|
|
159
156
|
}));
|
|
@@ -177,7 +174,7 @@ export default (function (_ref) {
|
|
|
177
174
|
className: "pisell-lowcode__eft-pay-manual-edit-body"
|
|
178
175
|
}, /*#__PURE__*/React.createElement("div", {
|
|
179
176
|
className: "pisell-lowcode__eft-pay-manual-edit-text"
|
|
180
|
-
}, locales.getText('page.eftpos-pay.text.manual.subtitle')(formatAmount(pay === null || pay === void 0 ? void 0 : pay.total, 2, symbol)),
|
|
177
|
+
}, locales.getText('page.eftpos-pay.text.manual.subtitle')(formatAmount(pay === null || pay === void 0 ? void 0 : pay.total, 2, symbol)), " ", /*#__PURE__*/React.createElement("br", null), locales.getText('page.eftpos-pay.text.manual.confirm'), /*#__PURE__*/React.createElement("br", null), locales.getText('page.eftpos-pay.text.manual.diff')), /*#__PURE__*/React.createElement("div", {
|
|
181
178
|
className: "pisell-lowcode__eft-pay-manual-edit-act"
|
|
182
179
|
}, /*#__PURE__*/React.createElement("div", {
|
|
183
180
|
className: "pisell-lowcode__eft-pay-manual-edit-text"
|
|
@@ -27,32 +27,6 @@ export declare enum ModeEnum {
|
|
|
27
27
|
/** 查询 */
|
|
28
28
|
Query = "query"
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
31
|
-
* 崩溃恢复
|
|
32
|
-
*/
|
|
33
|
-
export declare enum RestoreEumn {
|
|
34
|
-
/** 常规 */
|
|
35
|
-
Normal = "normal",
|
|
36
|
-
/** 恢复 */
|
|
37
|
-
Restore = "restore"
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* 订单状态
|
|
41
|
-
*/
|
|
42
|
-
export declare enum OrderEumn {
|
|
43
|
-
/** 恢复 */
|
|
44
|
-
Restore = "restore",
|
|
45
|
-
/** 常规 */
|
|
46
|
-
Normal = "normal",
|
|
47
|
-
/** 成功 */
|
|
48
|
-
Succeed = "succeed",
|
|
49
|
-
/** 失败 */
|
|
50
|
-
Failed = "failed",
|
|
51
|
-
/** 等待 */
|
|
52
|
-
Pending = "pending",
|
|
53
|
-
/** 没有订单状态 */
|
|
54
|
-
Null = "null"
|
|
55
|
-
}
|
|
56
30
|
export declare enum ClientEnum {
|
|
57
31
|
/** 用户端 */
|
|
58
32
|
User = "user",
|
|
@@ -86,7 +60,7 @@ export interface PosProps {
|
|
|
86
60
|
[key: string]: unknown;
|
|
87
61
|
};
|
|
88
62
|
/** 回调 */
|
|
89
|
-
onChangeStatus: (status: `${StatusEnum.Success}` | `${StatusEnum.Fail}` | 'page'
|
|
63
|
+
onChangeStatus: (status: `${StatusEnum.Success}` | `${StatusEnum.Fail}` | 'page', params?: {
|
|
90
64
|
[keys: string]: unknown;
|
|
91
65
|
} | string, other?: any) => void;
|
|
92
66
|
onChangeParams(...agrn: unknown[]): void;
|
|
@@ -17,34 +17,12 @@ export var StatusEnum;
|
|
|
17
17
|
StatusEnum["Question"] = "question";
|
|
18
18
|
})(StatusEnum || (StatusEnum = {}));
|
|
19
19
|
export var ModeEnum;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 崩溃恢复
|
|
23
|
-
*/
|
|
24
20
|
(function (ModeEnum) {
|
|
25
21
|
ModeEnum["Pay"] = "pay";
|
|
26
22
|
ModeEnum["FullPay"] = "fullPay";
|
|
27
23
|
ModeEnum["Refund"] = "refund";
|
|
28
24
|
ModeEnum["Query"] = "query";
|
|
29
25
|
})(ModeEnum || (ModeEnum = {}));
|
|
30
|
-
export var RestoreEumn;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* 订单状态
|
|
34
|
-
*/
|
|
35
|
-
(function (RestoreEumn) {
|
|
36
|
-
RestoreEumn["Normal"] = "normal";
|
|
37
|
-
RestoreEumn["Restore"] = "restore";
|
|
38
|
-
})(RestoreEumn || (RestoreEumn = {}));
|
|
39
|
-
export var OrderEumn;
|
|
40
|
-
(function (OrderEumn) {
|
|
41
|
-
OrderEumn["Restore"] = "restore";
|
|
42
|
-
OrderEumn["Normal"] = "normal";
|
|
43
|
-
OrderEumn["Succeed"] = "succeed";
|
|
44
|
-
OrderEumn["Failed"] = "failed";
|
|
45
|
-
OrderEumn["Pending"] = "pending";
|
|
46
|
-
OrderEumn["Null"] = "null";
|
|
47
|
-
})(OrderEumn || (OrderEumn = {}));
|
|
48
26
|
export var ClientEnum;
|
|
49
27
|
(function (ClientEnum) {
|
|
50
28
|
ClientEnum["User"] = "user";
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "page" | "success" | "fail"
|
|
14
|
+
onChange?: ((status: "page" | "success" | "fail", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -203,11 +203,11 @@ export default (function (_ref) {
|
|
|
203
203
|
className: "pisell-lowcode__eft-pay-device-content"
|
|
204
204
|
}, /*#__PURE__*/React.createElement("div", {
|
|
205
205
|
className: "pisell-lowcode__eft-pay-device-name"
|
|
206
|
-
}, name),
|
|
206
|
+
}, name), /*#__PURE__*/React.createElement("div", {
|
|
207
207
|
className: "pisell-lowcode__eft-pay-device-money"
|
|
208
208
|
}, pay.totalUnit), /*#__PURE__*/React.createElement("div", {
|
|
209
209
|
className: "pisell-lowcode__eft-pay-device-sucharge"
|
|
210
|
-
}, locales.getText('page.eftpos-pay.text.surcharge.edit.inc.surcharge'), ": ", formatAmount("".concat(pay.surcharge), 2, symbol), " (", locales.getText('page.eftpos-pay.text.surcharge.edit.rate'), ":", pay.surRate, "% +", ' ', formatAmount("".concat(pay.surMoney), 2, symbol), ")"))
|
|
210
|
+
}, locales.getText('page.eftpos-pay.text.surcharge.edit.inc.surcharge'), ": ", formatAmount("".concat(pay.surcharge), 2, symbol), " (", locales.getText('page.eftpos-pay.text.surcharge.edit.rate'), ":", pay.surRate, "% +", ' ', formatAmount("".concat(pay.surMoney), 2, symbol), ")")), /*#__PURE__*/React.createElement("div", {
|
|
211
211
|
style: {
|
|
212
212
|
flexShrink: 0
|
|
213
213
|
}
|
|
@@ -28,19 +28,16 @@ export declare const getPayParams: (data: Partial<Omit<State, key>> & Pick<State
|
|
|
28
28
|
order_id: string | number;
|
|
29
29
|
amount?: undefined;
|
|
30
30
|
total?: undefined;
|
|
31
|
-
receipt?: undefined;
|
|
32
31
|
} | {
|
|
33
32
|
cardReaderSurcharge: {};
|
|
34
33
|
surMoney: string;
|
|
35
34
|
surcharge: string;
|
|
36
35
|
total: string;
|
|
37
36
|
number: string | number | undefined;
|
|
38
|
-
uniquePaymentNumber: string | number | undefined;
|
|
39
37
|
device: {
|
|
40
38
|
[key: string]: unknown;
|
|
41
39
|
} | undefined;
|
|
42
40
|
order_id: string | number;
|
|
43
|
-
receipt: {};
|
|
44
41
|
amount?: undefined;
|
|
45
42
|
} | {
|
|
46
43
|
amount: string | number;
|
|
@@ -50,14 +47,12 @@ export declare const getPayParams: (data: Partial<Omit<State, key>> & Pick<State
|
|
|
50
47
|
[key: string]: unknown;
|
|
51
48
|
} | undefined;
|
|
52
49
|
order_id: string | number;
|
|
53
|
-
receipt: {};
|
|
54
50
|
} | {
|
|
55
51
|
amount: string | number;
|
|
56
52
|
total: string | number;
|
|
57
53
|
number: string | number | undefined;
|
|
58
54
|
order_id: string | number;
|
|
59
55
|
device?: undefined;
|
|
60
|
-
receipt?: undefined;
|
|
61
56
|
};
|
|
62
57
|
export declare const limitDecimals: (value: any) => any;
|
|
63
58
|
/**
|
|
@@ -58,7 +58,6 @@ export function cloneDeep(source) {
|
|
|
58
58
|
* @Date: 2024-08-20 20:26
|
|
59
59
|
*/
|
|
60
60
|
export var getPayParams = function getPayParams(data, statue) {
|
|
61
|
-
var _data$custom;
|
|
62
61
|
if (statue === 'fail') {
|
|
63
62
|
return {
|
|
64
63
|
number: data.number,
|
|
@@ -66,11 +65,10 @@ export var getPayParams = function getPayParams(data, statue) {
|
|
|
66
65
|
order_id: data.order_id
|
|
67
66
|
};
|
|
68
67
|
}
|
|
69
|
-
var receipt = (data === null || data === void 0 ? void 0 : (_data$custom = data.custom) === null || _data$custom === void 0 ? void 0 : _data$custom.receipt) || [];
|
|
70
68
|
if (data.mode === ModeEnum.Pay || data.mode === ModeEnum.FullPay) {
|
|
71
|
-
var _data$
|
|
69
|
+
var _data$custom;
|
|
72
70
|
var pay = data.pay;
|
|
73
|
-
var card_reader_surcharge = ((_data$
|
|
71
|
+
var card_reader_surcharge = ((_data$custom = data.custom) === null || _data$custom === void 0 ? void 0 : _data$custom.card_reader_surcharge) || 0;
|
|
74
72
|
var obj = pay || {};
|
|
75
73
|
var cardReaderSurcharge = card_reader_surcharge;
|
|
76
74
|
// 卡手续费
|
|
@@ -95,21 +93,17 @@ export var getPayParams = function getPayParams(data, statue) {
|
|
|
95
93
|
surcharge: surchargeDeci.toFixed(2, Decimal.ROUND_HALF_UP),
|
|
96
94
|
total: total.toFixed(2, Decimal.ROUND_HALF_UP),
|
|
97
95
|
number: data.number,
|
|
98
|
-
uniquePaymentNumber: data.number,
|
|
99
96
|
device: data.device,
|
|
100
|
-
order_id: data.order_id
|
|
101
|
-
receipt: (_data$device = data.device) !== null && _data$device !== void 0 && (_data$device$setting = _data$device.setting) !== null && _data$device$setting !== void 0 && _data$device$setting.receipts ? [] : receipt
|
|
97
|
+
order_id: data.order_id
|
|
102
98
|
});
|
|
103
99
|
}
|
|
104
100
|
if (data.mode === ModeEnum.Refund) {
|
|
105
|
-
var _data$device2, _data$device2$setting;
|
|
106
101
|
return {
|
|
107
102
|
amount: data.amount,
|
|
108
103
|
total: data.amount,
|
|
109
104
|
number: data.number,
|
|
110
105
|
device: data.device,
|
|
111
|
-
order_id: data.order_id
|
|
112
|
-
receipt: (_data$device2 = data.device) !== null && _data$device2 !== void 0 && (_data$device2$setting = _data$device2.setting) !== null && _data$device2$setting !== void 0 && _data$device2$setting.receipts ? [] : receipt
|
|
106
|
+
order_id: data.order_id
|
|
113
107
|
};
|
|
114
108
|
}
|
|
115
109
|
return {
|
|
@@ -21,7 +21,6 @@ export declare const useStoreRef: <T extends {
|
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
22
|
readonly eftposRef: React.MutableRefObject<"windcave" | "tyro" | "payo" | "stripe">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
|
-
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
24
|
};
|
|
26
25
|
/**
|
|
27
26
|
* @title: 通用失败处理
|
|
@@ -13,20 +13,18 @@ var Max4004 = 1;
|
|
|
13
13
|
|
|
14
14
|
// 穿越 react deep
|
|
15
15
|
export var useStoreRef = function useStoreRef() {
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
device =
|
|
19
|
-
pay =
|
|
20
|
-
number =
|
|
21
|
-
mode =
|
|
22
|
-
net =
|
|
23
|
-
status =
|
|
24
|
-
symbol =
|
|
25
|
-
amount =
|
|
26
|
-
eftpos =
|
|
27
|
-
client =
|
|
28
|
-
var dataRef = useRef(data);
|
|
29
|
-
|
|
16
|
+
var _useContextData = useContextData(),
|
|
17
|
+
order_id = _useContextData.order_id,
|
|
18
|
+
device = _useContextData.device,
|
|
19
|
+
pay = _useContextData.pay,
|
|
20
|
+
number = _useContextData.number,
|
|
21
|
+
mode = _useContextData.mode,
|
|
22
|
+
net = _useContextData.net,
|
|
23
|
+
status = _useContextData.status,
|
|
24
|
+
symbol = _useContextData.symbol,
|
|
25
|
+
amount = _useContextData.amount,
|
|
26
|
+
eftpos = _useContextData.eftpos,
|
|
27
|
+
client = _useContextData.client;
|
|
30
28
|
// 设备信息
|
|
31
29
|
var deviceRef = useRef(device);
|
|
32
30
|
|
|
@@ -57,9 +55,6 @@ export var useStoreRef = function useStoreRef() {
|
|
|
57
55
|
// 设备类型
|
|
58
56
|
var eftposRef = useRef(eftpos);
|
|
59
57
|
var clientRef = useRef(client);
|
|
60
|
-
useEffect(function () {
|
|
61
|
-
dataRef.current = data;
|
|
62
|
-
}, [data]);
|
|
63
58
|
useEffect(function () {
|
|
64
59
|
deviceRef.current = device;
|
|
65
60
|
}, [device]);
|
|
@@ -104,8 +99,7 @@ export var useStoreRef = function useStoreRef() {
|
|
|
104
99
|
symbolRef: symbolRef,
|
|
105
100
|
amountRef: amountRef,
|
|
106
101
|
eftposRef: eftposRef,
|
|
107
|
-
clientRef: clientRef
|
|
108
|
-
dataRef: dataRef
|
|
102
|
+
clientRef: clientRef
|
|
109
103
|
};
|
|
110
104
|
};
|
|
111
105
|
|
|
@@ -117,9 +111,9 @@ export var useStoreRef = function useStoreRef() {
|
|
|
117
111
|
* @Date: 2024-08-12 11:54
|
|
118
112
|
*/
|
|
119
113
|
export var useFail = function useFail(index) {
|
|
120
|
-
var
|
|
121
|
-
steps =
|
|
122
|
-
custom =
|
|
114
|
+
var _useContextData2 = useContextData(),
|
|
115
|
+
steps = _useContextData2.steps,
|
|
116
|
+
custom = _useContextData2.custom;
|
|
123
117
|
var _useStoreRef = useStoreRef(),
|
|
124
118
|
modeRef = _useStoreRef.modeRef,
|
|
125
119
|
clientRef = _useStoreRef.clientRef;
|