@pisell/private-materials 3.0.143 → 3.0.145
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 +12 -12
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/booking/components/footer/utils.js +7 -0
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/eftpos/surcharge/index.js +1 -1
- package/es/components/eftposPay/amount.js +3 -0
- package/es/components/eftposPay/component/manual/index.js +1 -0
- package/es/components/eftposPay/helper.js +4 -3
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -4
- package/es/components/eftposPay/index.js +3 -11
- package/es/components/eftposPay/payo/const.js +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/windcave/const.js +1 -1
- package/lib/components/booking/components/footer/utils.js +4 -1
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/eftpos/surcharge/index.js +1 -1
- package/lib/components/eftposPay/amount.js +3 -0
- package/lib/components/eftposPay/component/manual/index.js +1 -0
- package/lib/components/eftposPay/helper.js +2 -2
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -4
- package/lib/components/eftposPay/index.js +2 -9
- package/lib/components/eftposPay/payo/const.js +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/windcave/const.js +1 -1
- package/lowcode/eftpos-pay/meta.ts +11 -11
- package/package.json +1 -1
|
@@ -188,6 +188,7 @@ var formatHolder = function formatHolder(state, values) {
|
|
|
188
188
|
|
|
189
189
|
// https://menutech.w.eolink.com/home/api-studio/inside/K2bI3n465fe7244b3dbd6679d87caedfbb0636bf8c29eda/api/2778666/detail/53001549?spaceKey=menutech
|
|
190
190
|
export var formatValues = function formatValues(state) {
|
|
191
|
+
var _values, _values$bookings, _values$bookings$;
|
|
191
192
|
var values = {
|
|
192
193
|
type: state.renderType === 'eventBooking' ? "event_booking_v2" : "appointment_booking",
|
|
193
194
|
platform: "shop",
|
|
@@ -219,5 +220,11 @@ export var formatValues = function formatValues(state) {
|
|
|
219
220
|
|
|
220
221
|
// 服务
|
|
221
222
|
values.bookings = formatBookings(state);
|
|
223
|
+
|
|
224
|
+
// 日期
|
|
225
|
+
if ((_values = values) !== null && _values !== void 0 && (_values$bookings = _values.bookings) !== null && _values$bookings !== void 0 && (_values$bookings$ = _values$bookings[0]) !== null && _values$bookings$ !== void 0 && _values$bookings$.select_date && !(state !== null && state !== void 0 && state.bookingId)) {
|
|
226
|
+
// 默认用第一个预约的选择日期并且是新建,编辑目前先不处理,用于解决附加费问题
|
|
227
|
+
values.schedule_date = values.bookings[0].select_date;
|
|
228
|
+
}
|
|
222
229
|
return values;
|
|
223
230
|
};
|
|
@@ -55,7 +55,7 @@ export var getCommDefaultVal = function getCommDefaultVal(commConfig) {
|
|
|
55
55
|
var _ref;
|
|
56
56
|
var top = commConfig.top.input.defaultValue;
|
|
57
57
|
var origin = commConfig.origin.input.defaultValue;
|
|
58
|
-
return _ref = {}, _defineProperty(_ref, commConfig.origin.__sourceName, typeof origin === 'undefined' ?
|
|
58
|
+
return _ref = {}, _defineProperty(_ref, commConfig.origin.__sourceName, typeof origin === 'undefined' ? false : origin), _defineProperty(_ref, commConfig.top.__sourceName, typeof top === 'undefined' ? true : top), _defineProperty(_ref, commConfig.left.__sourceName, commConfig.left.input.defaultValue || 0), _defineProperty(_ref, commConfig.right.__sourceName, commConfig.right.input.defaultValue || 0), _ref;
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
/**
|
|
@@ -196,6 +196,7 @@ export default (function (_ref) {
|
|
|
196
196
|
}, /*#__PURE__*/React.createElement("div", {
|
|
197
197
|
className: "pisell-lowcode__eft-pay-money-title"
|
|
198
198
|
}, locales.getText('page.eftpos-pay.text.input.title')(name)), /*#__PURE__*/React.createElement(InputNumber, {
|
|
199
|
+
type: "number",
|
|
199
200
|
addonBefore: symbol || '$',
|
|
200
201
|
max: money,
|
|
201
202
|
precision: 2,
|
|
@@ -236,6 +237,7 @@ export default (function (_ref) {
|
|
|
236
237
|
}, /*#__PURE__*/React.createElement("div", {
|
|
237
238
|
className: "pisell-lowcode__eft-pay-amount-item-title"
|
|
238
239
|
}, locales.getText('page.eftpos-pay.text.surcharge.percentage')), /*#__PURE__*/React.createElement(InputNumber, {
|
|
240
|
+
type: "number",
|
|
239
241
|
value: tempSurRate,
|
|
240
242
|
min: 0,
|
|
241
243
|
max: 100,
|
|
@@ -252,6 +254,7 @@ export default (function (_ref) {
|
|
|
252
254
|
}, /*#__PURE__*/React.createElement("div", {
|
|
253
255
|
className: "pisell-lowcode__eft-pay-amount-item-title"
|
|
254
256
|
}, locales.getText('page.eftpos-pay.text.surcharge.fixed')), /*#__PURE__*/React.createElement(InputNumber, {
|
|
257
|
+
type: "number",
|
|
255
258
|
value: tempSurMoney,
|
|
256
259
|
min: 0,
|
|
257
260
|
max: 100000,
|
|
@@ -179,6 +179,7 @@ export default (function (_ref) {
|
|
|
179
179
|
}, /*#__PURE__*/React.createElement("div", {
|
|
180
180
|
className: "pisell-lowcode__eft-pay-manual-edit-text"
|
|
181
181
|
}, locales.getText('page.eftpos-pay.text.manual.tip')), /*#__PURE__*/React.createElement(InputNumber, {
|
|
182
|
+
type: "number",
|
|
182
183
|
addonBefore: symbol || '$',
|
|
183
184
|
min: pay === null || pay === void 0 ? void 0 : pay.total,
|
|
184
185
|
precision: 2,
|
|
@@ -5,7 +5,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
5
5
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
6
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
7
7
|
import { Decimal } from 'decimal.js';
|
|
8
|
-
import { ModeEnum } from "./const";
|
|
8
|
+
import { ModeEnum, EftposEnum } from "./const";
|
|
9
9
|
/* eslint-disable no-bitwise */
|
|
10
10
|
export function getUuid() {
|
|
11
11
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
@@ -138,7 +138,8 @@ export function getAmonunt(store) {
|
|
|
138
138
|
pay = store.pay,
|
|
139
139
|
name = store.name,
|
|
140
140
|
symbol = store.symbol,
|
|
141
|
-
amount = store.amount
|
|
141
|
+
amount = store.amount,
|
|
142
|
+
eftpos = store.eftpos;
|
|
142
143
|
if (!device) {
|
|
143
144
|
throw Error('device is not defined');
|
|
144
145
|
}
|
|
@@ -173,7 +174,7 @@ export function getAmonunt(store) {
|
|
|
173
174
|
};
|
|
174
175
|
}
|
|
175
176
|
// 原始手续费 是指 各个pos机厂商跟银行合作直接收取的手续费,一旦设置则清空,配置中设置的手续费
|
|
176
|
-
var useOriginSurcharge = setting.useOriginSurcharge || false;
|
|
177
|
+
var useOriginSurcharge = eftpos === EftposEnum.Tyro ? setting.useOriginSurcharge || false : false;
|
|
177
178
|
|
|
178
179
|
// 直接设备中手续费金额
|
|
179
180
|
var surRate = setting.constant_rate || 0;
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "payo" | "stripe">;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* @title: 通用失败处理
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PosProps } from './const';
|
|
3
3
|
import './index.less';
|
|
4
|
-
|
|
5
|
-
declare const _default: ({ key, ...props }: PosProps & {
|
|
6
|
-
key: string | number;
|
|
7
|
-
}) => React.JSX.Element;
|
|
4
|
+
declare const _default: (props: PosProps) => React.JSX.Element;
|
|
8
5
|
export default _default;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["action", "getApi", "device_number", "terminal", "tyroUrl", "tyroVersion", "onChangeParams"]
|
|
3
|
-
_excluded2 = ["key"];
|
|
4
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
var _excluded = ["action", "getApi", "device_number", "terminal", "tyroUrl", "tyroVersion", "onChangeParams"];
|
|
5
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
4
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
5
|
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; }
|
|
@@ -47,6 +45,7 @@ var App = function App(_ref) {
|
|
|
47
45
|
setCurrent = _useState2[1];
|
|
48
46
|
var statusRef = useRef(data.status);
|
|
49
47
|
var context = useEngineContext();
|
|
48
|
+
console.log('context = ', context);
|
|
50
49
|
var _ref2 = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {
|
|
51
50
|
formatAmount: function formatAmount(number, precision, symbol) {
|
|
52
51
|
return "".concat(symbol).concat(number);
|
|
@@ -183,7 +182,7 @@ var App = function App(_ref) {
|
|
|
183
182
|
formatAmount: formatAmount
|
|
184
183
|
});
|
|
185
184
|
};
|
|
186
|
-
export
|
|
185
|
+
export default (function (props) {
|
|
187
186
|
var _context$appHelper2, _store$getState, _store$getState$call, _store$getState$call$, _props$params, _props$params2;
|
|
188
187
|
var context = useEngineContext();
|
|
189
188
|
var _ref3 = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils) || {
|
|
@@ -280,11 +279,4 @@ export var Root = function Root(props) {
|
|
|
280
279
|
source: props.source,
|
|
281
280
|
device_number: props === null || props === void 0 ? void 0 : (_props$params2 = props.params) === null || _props$params2 === void 0 ? void 0 : _props$params2.device_number
|
|
282
281
|
}));
|
|
283
|
-
};
|
|
284
|
-
export default (function (_ref4) {
|
|
285
|
-
var key = _ref4.key,
|
|
286
|
-
props = _objectWithoutProperties(_ref4, _excluded2);
|
|
287
|
-
return /*#__PURE__*/React.createElement(Root, _extends({}, props, {
|
|
288
|
-
key: key
|
|
289
|
-
}));
|
|
290
282
|
});
|
|
@@ -281,9 +281,9 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
281
281
|
name?: string | undefined;
|
|
282
282
|
symbol?: string | undefined;
|
|
283
283
|
amount?: string | number | undefined;
|
|
284
|
-
mode?: "refund" | "pay" | "query" | undefined;
|
|
284
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
285
285
|
order_id?: string | number | undefined;
|
|
286
|
-
eftpos?: "
|
|
286
|
+
eftpos?: "tyro" | "windcave" | "payo" | "stripe" | undefined;
|
|
287
287
|
action?: "amount" | "deviceList" | "pay" | undefined;
|
|
288
288
|
key?: number | undefined;
|
|
289
289
|
step?: number | undefined;
|
|
@@ -111,7 +111,7 @@ export function getAmonunt(store) {
|
|
|
111
111
|
useOriginSurcharge: false
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
var useOriginSurcharge =
|
|
114
|
+
var useOriginSurcharge = false;
|
|
115
115
|
|
|
116
116
|
// 直接设备中手续费金额 + 原始支付总额
|
|
117
117
|
var surRate = setting.constant_rate || 0;
|
|
@@ -162,7 +162,7 @@ var formatHolder = (state, values) => {
|
|
|
162
162
|
return obj;
|
|
163
163
|
};
|
|
164
164
|
var formatValues = (state) => {
|
|
165
|
-
var _a;
|
|
165
|
+
var _a, _b, _c;
|
|
166
166
|
let values = {
|
|
167
167
|
type: state.renderType === "eventBooking" ? "event_booking_v2" : "appointment_booking",
|
|
168
168
|
platform: "shop",
|
|
@@ -189,6 +189,9 @@ var formatValues = (state) => {
|
|
|
189
189
|
};
|
|
190
190
|
values.holder = formatHolder(state, values);
|
|
191
191
|
values.bookings = formatBookings(state);
|
|
192
|
+
if (((_c = (_b = values == null ? void 0 : values.bookings) == null ? void 0 : _b[0]) == null ? void 0 : _c.select_date) && !(state == null ? void 0 : state.bookingId)) {
|
|
193
|
+
values.schedule_date = values.bookings[0].select_date;
|
|
194
|
+
}
|
|
192
195
|
return values;
|
|
193
196
|
};
|
|
194
197
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -53,7 +53,7 @@ var getCommDefaultVal = (commConfig) => {
|
|
|
53
53
|
const top = commConfig.top.input.defaultValue;
|
|
54
54
|
const origin = commConfig.origin.input.defaultValue;
|
|
55
55
|
return {
|
|
56
|
-
[commConfig.origin.__sourceName]: typeof origin === "undefined" ?
|
|
56
|
+
[commConfig.origin.__sourceName]: typeof origin === "undefined" ? false : origin,
|
|
57
57
|
[commConfig.top.__sourceName]: typeof top === "undefined" ? true : top,
|
|
58
58
|
[commConfig.left.__sourceName]: commConfig.left.input.defaultValue || 0,
|
|
59
59
|
[commConfig.right.__sourceName]: commConfig.right.input.defaultValue || 0
|
|
@@ -141,6 +141,7 @@ var amount_default = ({
|
|
|
141
141
|
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-money" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-money-title" }, import_utils.locales.getText("page.eftpos-pay.text.input.title")(name)), /* @__PURE__ */ import_react.default.createElement(
|
|
142
142
|
import_antd.InputNumber,
|
|
143
143
|
{
|
|
144
|
+
type: "number",
|
|
144
145
|
addonBefore: symbol || "$",
|
|
145
146
|
max: money,
|
|
146
147
|
precision: 2,
|
|
@@ -166,6 +167,7 @@ var amount_default = ({
|
|
|
166
167
|
), ": ", formatAmount(`${totalSurMoney}`, 2, symbol), " (", import_utils.locales.getText("page.eftpos-pay.text.surcharge.edit.rate"), ":", curSurRate, "% + ", formatAmount(`${curSurMoney}`, 2, symbol), ")")), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "link", onClick: onEdit, disabled: useOriginSurcharge }, import_utils.locales.getText("page.eftpos-pay.text.surcharge.edit.surcharge")))) : /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-body" }, /* @__PURE__ */ import_react.default.createElement(import_alert.default, null, import_utils.locales.getText("page.eftpos-pay.text.surcharge.percentage-fixed")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-form" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-item-title" }, import_utils.locales.getText("page.eftpos-pay.text.surcharge.percentage")), /* @__PURE__ */ import_react.default.createElement(
|
|
167
168
|
import_antd.InputNumber,
|
|
168
169
|
{
|
|
170
|
+
type: "number",
|
|
169
171
|
value: tempSurRate,
|
|
170
172
|
min: 0,
|
|
171
173
|
max: 100,
|
|
@@ -179,6 +181,7 @@ var amount_default = ({
|
|
|
179
181
|
)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-amount-item-title" }, import_utils.locales.getText("page.eftpos-pay.text.surcharge.fixed")), /* @__PURE__ */ import_react.default.createElement(
|
|
180
182
|
import_antd.InputNumber,
|
|
181
183
|
{
|
|
184
|
+
type: "number",
|
|
182
185
|
value: tempSurMoney,
|
|
183
186
|
min: 0,
|
|
184
187
|
max: 1e5,
|
|
@@ -125,6 +125,7 @@ var manual_default = ({ onChange, className = "", formatAmount }) => {
|
|
|
125
125
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lowcode__eft-pay-manual ${className}` }, isUpdateAmount ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-title" }, import_utils.locales.getText("page.eftpos-pay.text.manual.title")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-body" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-text" }, import_utils.locales.getText("page.eftpos-pay.text.manual.subtitle")(formatAmount(pay == null ? void 0 : pay.total, 2, symbol)), " ", /* @__PURE__ */ import_react.default.createElement("br", null), import_utils.locales.getText("page.eftpos-pay.text.manual.confirm"), /* @__PURE__ */ import_react.default.createElement("br", null), import_utils.locales.getText("page.eftpos-pay.text.manual.diff")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-act" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-manual-edit-text" }, import_utils.locales.getText("page.eftpos-pay.text.manual.tip")), /* @__PURE__ */ import_react.default.createElement(
|
|
126
126
|
import_antd.InputNumber,
|
|
127
127
|
{
|
|
128
|
+
type: "number",
|
|
128
129
|
addonBefore: symbol || "$",
|
|
129
130
|
min: pay == null ? void 0 : pay.total,
|
|
130
131
|
precision: 2,
|
|
@@ -119,7 +119,7 @@ var limitDecimals = (value) => {
|
|
|
119
119
|
return "";
|
|
120
120
|
};
|
|
121
121
|
function getAmonunt(store) {
|
|
122
|
-
const { device, pay, name, symbol, amount } = store;
|
|
122
|
+
const { device, pay, name, symbol, amount, eftpos } = store;
|
|
123
123
|
if (!device) {
|
|
124
124
|
throw Error("device is not defined");
|
|
125
125
|
}
|
|
@@ -150,7 +150,7 @@ function getAmonunt(store) {
|
|
|
150
150
|
useOriginSurcharge: false
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
const useOriginSurcharge = setting.useOriginSurcharge || false;
|
|
153
|
+
const useOriginSurcharge = eftpos === import_const.EftposEnum.Tyro ? setting.useOriginSurcharge || false : false;
|
|
154
154
|
const surRate = setting.constant_rate || 0;
|
|
155
155
|
const surMoney = setting.constant_money || 0;
|
|
156
156
|
const surcharge = setting.surcharge;
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "payo" | "stripe">;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* @title: 通用失败处理
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PosProps } from './const';
|
|
3
3
|
import './index.less';
|
|
4
|
-
|
|
5
|
-
declare const _default: ({ key, ...props }: PosProps & {
|
|
6
|
-
key: string | number;
|
|
7
|
-
}) => React.JSX.Element;
|
|
4
|
+
declare const _default: (props: PosProps) => React.JSX.Element;
|
|
8
5
|
export default _default;
|
|
@@ -29,7 +29,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/eftposPay/index.tsx
|
|
30
30
|
var eftposPay_exports = {};
|
|
31
31
|
__export(eftposPay_exports, {
|
|
32
|
-
Root: () => Root,
|
|
33
32
|
default: () => eftposPay_default
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(eftposPay_exports);
|
|
@@ -62,6 +61,7 @@ var App = ({
|
|
|
62
61
|
const [current, setCurrent] = (0, import_react.useState)(action);
|
|
63
62
|
const statusRef = (0, import_react.useRef)(data.status);
|
|
64
63
|
const context = (0, import_useEngineContext.default)();
|
|
64
|
+
console.log("context = ", context);
|
|
65
65
|
const { formatAmount, isTerminal } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {
|
|
66
66
|
formatAmount: (number, precision, symbol) => `${symbol}${number}`,
|
|
67
67
|
isTerminal: () => false
|
|
@@ -164,7 +164,7 @@ var App = ({
|
|
|
164
164
|
}
|
|
165
165
|
);
|
|
166
166
|
};
|
|
167
|
-
var
|
|
167
|
+
var eftposPay_default = (props) => {
|
|
168
168
|
var _a, _b, _c, _d, _e, _f;
|
|
169
169
|
const context = (0, import_useEngineContext.default)();
|
|
170
170
|
const { store } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || { store: {} };
|
|
@@ -245,10 +245,3 @@ var Root = (props) => {
|
|
|
245
245
|
}
|
|
246
246
|
));
|
|
247
247
|
};
|
|
248
|
-
var eftposPay_default = ({ key, ...props }) => {
|
|
249
|
-
return /* @__PURE__ */ import_react.default.createElement(Root, { ...props, key });
|
|
250
|
-
};
|
|
251
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
252
|
-
0 && (module.exports = {
|
|
253
|
-
Root
|
|
254
|
-
});
|
|
@@ -109,7 +109,7 @@ function getAmonunt(store) {
|
|
|
109
109
|
useOriginSurcharge: false
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
const useOriginSurcharge =
|
|
112
|
+
const useOriginSurcharge = false;
|
|
113
113
|
const surRate = setting.constant_rate || 0;
|
|
114
114
|
const surMoney = setting.constant_money || 0;
|
|
115
115
|
const surcharge = setting.surcharge;
|
|
@@ -281,9 +281,9 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
281
281
|
name?: string | undefined;
|
|
282
282
|
symbol?: string | undefined;
|
|
283
283
|
amount?: string | number | undefined;
|
|
284
|
-
mode?: "refund" | "pay" | "query" | undefined;
|
|
284
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
285
285
|
order_id?: string | number | undefined;
|
|
286
|
-
eftpos?: "
|
|
286
|
+
eftpos?: "tyro" | "windcave" | "payo" | "stripe" | undefined;
|
|
287
287
|
action?: "amount" | "deviceList" | "pay" | undefined;
|
|
288
288
|
key?: number | undefined;
|
|
289
289
|
step?: number | undefined;
|
|
@@ -98,7 +98,7 @@ function getAmonunt(store) {
|
|
|
98
98
|
useOriginSurcharge: false
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
const useOriginSurcharge =
|
|
101
|
+
const useOriginSurcharge = false;
|
|
102
102
|
const surRate = setting.constant_rate || 0;
|
|
103
103
|
const surMoney = setting.constant_money || 0;
|
|
104
104
|
const surcharge = setting.surcharge;
|
|
@@ -27,17 +27,17 @@ const PayMeta: ComponentMetadata = {
|
|
|
27
27
|
name: 'type',
|
|
28
28
|
setter: ['JsonSetter', 'VariableSetter'],
|
|
29
29
|
},
|
|
30
|
-
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
},
|
|
30
|
+
// {
|
|
31
|
+
// title: {
|
|
32
|
+
// label: {
|
|
33
|
+
// type: 'i18n',
|
|
34
|
+
// 'en-US': 'key',
|
|
35
|
+
// 'zh-CN': 'key',
|
|
36
|
+
// },
|
|
37
|
+
// },
|
|
38
|
+
// name: 'key',
|
|
39
|
+
// setter: ['JsonSetter', 'VariableSetter'],
|
|
40
|
+
// },
|
|
41
41
|
{
|
|
42
42
|
title: {
|
|
43
43
|
label: {
|