@pisell/private-materials 6.6.102 → 6.6.103

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.
Files changed (81) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/Sales/Summary/utils.d.ts +1 -1
  8. package/es/components/booking/addons/model.d.ts +10 -1
  9. package/es/components/booking/forms/model.d.ts +10 -1
  10. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  11. package/es/components/booking/info/model.d.ts +10 -1
  12. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  13. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  14. package/es/components/booking/model.d.ts +9 -1
  15. package/es/components/booking/notes/model.d.ts +10 -1
  16. package/es/components/booking/payments/model.d.ts +10 -1
  17. package/es/components/booking/utils.d.ts +2 -2
  18. package/es/components/eftpos/const.d.ts +2 -0
  19. package/es/components/eftpos/const.js +25 -2
  20. package/es/components/eftpos/device.d.ts +1 -0
  21. package/es/components/eftpos/device.js +9 -4
  22. package/es/components/eftpos/form/index.d.ts +2 -1
  23. package/es/components/eftpos/form/index.js +7 -2
  24. package/es/components/eftpos/index.js +5 -0
  25. package/es/components/eftpos/pos.d.ts +2 -1
  26. package/es/components/eftpos/pos.js +9 -4
  27. package/es/components/eftpos/surcharge/index.js +13 -1
  28. package/es/components/eftposPay/amount.js +20 -5
  29. package/es/components/eftposPay/hooks.d.ts +1 -1
  30. package/es/components/eftposPay/store/index.d.ts +4 -4
  31. package/es/components/pay/toC/model.d.ts +9 -1
  32. package/es/components/schedules/model.d.ts +9 -1
  33. package/es/components/ticketBooking/utils/index.d.ts +1 -1
  34. package/es/hooks/useCardSurchargeReadOnly.d.ts +4 -0
  35. package/es/hooks/useCardSurchargeReadOnly.js +61 -0
  36. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
  37. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
  38. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
  39. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
  40. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
  41. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
  42. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
  43. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
  44. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  45. package/lib/components/booking/addons/model.d.ts +10 -1
  46. package/lib/components/booking/forms/model.d.ts +10 -1
  47. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  48. package/lib/components/booking/info/model.d.ts +10 -1
  49. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  50. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  51. package/lib/components/booking/model.d.ts +9 -1
  52. package/lib/components/booking/notes/model.d.ts +10 -1
  53. package/lib/components/booking/payments/model.d.ts +10 -1
  54. package/lib/components/booking/utils.d.ts +2 -2
  55. package/lib/components/eftpos/const.d.ts +2 -0
  56. package/lib/components/eftpos/const.js +18 -2
  57. package/lib/components/eftpos/device.d.ts +1 -0
  58. package/lib/components/eftpos/device.js +11 -3
  59. package/lib/components/eftpos/form/index.d.ts +2 -1
  60. package/lib/components/eftpos/form/index.js +11 -2
  61. package/lib/components/eftpos/index.js +5 -0
  62. package/lib/components/eftpos/pos.d.ts +2 -1
  63. package/lib/components/eftpos/pos.js +15 -3
  64. package/lib/components/eftpos/surcharge/index.js +41 -8
  65. package/lib/components/eftposPay/amount.js +26 -3
  66. package/lib/components/eftposPay/hooks.d.ts +1 -1
  67. package/lib/components/eftposPay/store/index.d.ts +4 -4
  68. package/lib/components/pay/toC/model.d.ts +9 -1
  69. package/lib/components/schedules/model.d.ts +9 -1
  70. package/lib/components/ticketBooking/utils/index.d.ts +1 -1
  71. package/lib/hooks/useCardSurchargeReadOnly.d.ts +4 -0
  72. package/lib/hooks/useCardSurchargeReadOnly.js +86 -0
  73. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
  74. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
  75. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
  76. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
  77. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
  78. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
  79. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
  80. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
  81. package/package.json +2 -2
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
30
30
  * @return {*}
31
31
  * @Author: xiangfeng.xue
32
32
  */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
4
4
  setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
5
5
  handleOpen: () => void;
6
6
  handleValuesChange: (val: any) => void;
7
- handleOk: (values: SendModalValues) => Promise<boolean | undefined>;
7
+ handleOk: (values: SendModalValues) => Promise<any>;
8
8
  };
9
9
  export default useSendModal;
@@ -1,5 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FormState } from '../model';
1
3
  export declare const walkInData: {
2
4
  id: number;
3
5
  nickname: string;
4
6
  };
5
- export declare const Provider: any, Context: any;
7
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
+ state: FormState;
9
+ } & {
10
+ dispatch: (params: {
11
+ type: string;
12
+ payload: any;
13
+ }) => void;
14
+ }>;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: any;
9
+ locale: string;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: any;
10
+ locale: string;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -109,4 +110,11 @@ export declare const walkInData: {
109
110
  id: number;
110
111
  nickname: string;
111
112
  };
112
- export declare const Provider: any, Context: any;
113
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
114
+ state: FormState;
115
+ } & {
116
+ dispatch: (params: {
117
+ type: string;
118
+ payload: any;
119
+ }) => void;
120
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -175,10 +175,10 @@ export declare const getProductOriginTotalPrice: (item: any) => number;
175
175
  export declare const getDuration: (duration: number | {
176
176
  type: string;
177
177
  value: number;
178
- }) => number | {
178
+ }) => number | "flexible" | {
179
179
  type: string;
180
180
  value: number;
181
- } | "flexible";
181
+ };
182
182
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
183
183
  export declare const getIsEdit: (state: any) => boolean;
184
184
  export {};
@@ -50,6 +50,8 @@ export interface DeviceProp {
50
50
  * @Date: 2024-08-19 11:10
51
51
  */
52
52
  export declare const getDefaultValue: (list: any) => any;
53
+ /** Preserve fee fields when saving unrelated device or merchant settings. */
54
+ export declare const preserveSurchargeValues: (values: any, list: any[]) => any;
53
55
  /**
54
56
  * @title: 构建通用表单配置信息,构建动态表单
55
57
  * @description:
@@ -1,13 +1,14 @@
1
1
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
2
2
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
3
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
- 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); }
5
4
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
5
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
- 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; }
8
6
  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); }
9
7
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
10
8
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
9
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
10
+ 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); }
11
+ 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; }
11
12
  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; }
12
13
  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; }
13
14
  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; }
@@ -63,6 +64,28 @@ export var getDefaultValue = function getDefaultValue(list) {
63
64
  }, {});
64
65
  };
65
66
 
67
+ /** Preserve fee fields when saving unrelated device or merchant settings. */
68
+ export var preserveSurchargeValues = function preserveSurchargeValues(values, list) {
69
+ var result = _objectSpread({}, values);
70
+ var _iterator = _createForOfIteratorHelper(list),
71
+ _step;
72
+ try {
73
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
74
+ var item = _step.value;
75
+ if (Array.isArray(item.children) && item.children.length) {
76
+ result[item.__sourceName] = preserveSurchargeValues(values === null || values === void 0 ? void 0 : values[item.__sourceName], item.children);
77
+ } else if (item.Component === 'Surcharge') {
78
+ Object.assign(result, helpMapping.Surcharge.getCommDefaultVal(item));
79
+ }
80
+ }
81
+ } catch (err) {
82
+ _iterator.e(err);
83
+ } finally {
84
+ _iterator.f();
85
+ }
86
+ return result;
87
+ };
88
+
66
89
  /**
67
90
  * @title: 构建通用表单配置信息,构建动态表单
68
91
  * @description:
@@ -5,6 +5,7 @@ interface DeviceProps {
5
5
  onSave: (device: DeviceProp) => void;
6
6
  children?: React.ReactNode;
7
7
  type?: Eftpos;
8
+ surchargeReadOnly?: boolean;
8
9
  status?: 'add' | 'edit' | 'repair';
9
10
  }
10
11
  declare const Device: (props: DeviceProps) => JSX.Element;
@@ -1,12 +1,14 @@
1
1
  import React from 'react';
2
2
  import { Form, Button } from 'antd';
3
3
  import { locales } from '@pisell/utils';
4
- import { Eftpos, getDefaultValue } from "./const";
4
+ import { Eftpos, getDefaultValue, preserveSurchargeValues } from "./const";
5
5
  import FormItem from "./form";
6
6
  var Device = function Device(props) {
7
7
  var onSave = props.onSave,
8
8
  children = props.children,
9
- formItemList = props.formItemList;
9
+ formItemList = props.formItemList,
10
+ _props$surchargeReadO = props.surchargeReadOnly,
11
+ surchargeReadOnly = _props$surchargeReadO === void 0 ? false : _props$surchargeReadO;
10
12
  var initialValues = getDefaultValue(formItemList);
11
13
  var simpleCloudIntegrationSteps = locales.getText('page.eftpos.text.simple.cloud.integration.steps');
12
14
  return /*#__PURE__*/React.createElement(React.Fragment, null, (props === null || props === void 0 ? void 0 : props.type) === Eftpos.MX51 && /*#__PURE__*/React.createElement("div", {
@@ -21,7 +23,9 @@ var Device = function Device(props) {
21
23
  }, step);
22
24
  })), /*#__PURE__*/React.createElement(Form, {
23
25
  layout: "vertical",
24
- onFinish: onSave,
26
+ onFinish: function onFinish(values) {
27
+ return onSave(surchargeReadOnly ? preserveSurchargeValues(values, formItemList) : values);
28
+ },
25
29
  initialValues: initialValues,
26
30
  className: "pisell-lowcode__pos-device"
27
31
  }, /*#__PURE__*/React.createElement("div", {
@@ -31,7 +35,8 @@ var Device = function Device(props) {
31
35
  padding: '0 0 60px 0'
32
36
  }
33
37
  }, /*#__PURE__*/React.createElement(FormItem, {
34
- formItemList: formItemList
38
+ formItemList: formItemList,
39
+ surchargeReadOnly: surchargeReadOnly
35
40
  }), children), /*#__PURE__*/React.createElement(Form.Item, {
36
41
  className: "pisell-lowcode__pos-device-btn"
37
42
  }, /*#__PURE__*/React.createElement(Button, {
@@ -3,10 +3,11 @@
3
3
  * @Author: hongbing.wang
4
4
  * @Date: 2024-08-20 13:21
5
5
  */
6
- declare const CustomFormItem: ({ formItemList, level, onChange, }: {
6
+ declare const CustomFormItem: ({ formItemList, level, onChange, surchargeReadOnly, }: {
7
7
  formItemList: any[];
8
8
  level?: number | undefined;
9
9
  onChange?: ((...agrn: unknown[]) => unknown) | undefined;
10
+ surchargeReadOnly?: boolean | undefined;
10
11
  }) => JSX.Element;
11
12
  export default CustomFormItem;
12
13
  declare type helpMappingType = {
@@ -46,7 +46,9 @@ var CustomFormItem = function CustomFormItem(_ref) {
46
46
  var formItemList = _ref.formItemList,
47
47
  _ref$level = _ref.level,
48
48
  level = _ref$level === void 0 ? 0 : _ref$level,
49
- onChange = _ref.onChange;
49
+ onChange = _ref.onChange,
50
+ _ref$surchargeReadOnl = _ref.surchargeReadOnly,
51
+ surchargeReadOnly = _ref$surchargeReadOnl === void 0 ? false : _ref$surchargeReadOnl;
50
52
  return /*#__PURE__*/React.createElement(React.Fragment, null, formItemList.map(function (_ref2, index) {
51
53
  var __sourceName = _ref2.__sourceName,
52
54
  Component = _ref2.Component,
@@ -55,6 +57,7 @@ var CustomFormItem = function CustomFormItem(_ref) {
55
57
  return /*#__PURE__*/React.createElement(CustomFormItem, {
56
58
  formItemList: item.children,
57
59
  onChange: onChange,
60
+ surchargeReadOnly: surchargeReadOnly,
58
61
  key: item.name ? "".concat(item.name).concat(level) : "".concat(Component).concat(index).concat(level),
59
62
  level: level + 1
60
63
  });
@@ -82,7 +85,9 @@ var CustomFormItem = function CustomFormItem(_ref) {
82
85
  }
83
86
  if (CustomMapping[Component]) {
84
87
  var _Comm2 = CustomMapping[Component];
85
- return /*#__PURE__*/React.createElement(_Comm2, _extends({}, item, {
88
+ return /*#__PURE__*/React.createElement(_Comm2, _extends({}, item, Component === 'Surcharge' ? {
89
+ surchargeReadOnly: surchargeReadOnly
90
+ } : {}, {
86
91
  key: "".concat(item.name).concat(level)
87
92
  }));
88
93
  }
@@ -32,6 +32,7 @@ import { Eftpos, getCommByFields, DeviceEnum, getDefaultValue, TYPES_WITH_MERCHA
32
32
  import { Image } from '@pisell/materials';
33
33
  import mx51SCISvg from "./assets/mx51SCI.svg";
34
34
  import useEngineContext from "../../hooks/useEngineContext";
35
+ import useCardSurchargeReadOnly from "../../hooks/useCardSurchargeReadOnly";
35
36
  import { request } from "../../utils";
36
37
  import "./index.less";
37
38
  locales.init(localeTexts, getLocale());
@@ -139,6 +140,7 @@ export default (function (props) {
139
140
  tyroUrl = props.tyroUrl,
140
141
  tyroVersion = props.tyroVersion,
141
142
  useTyroLog = props.useTyroLog;
143
+ var surchargeReadOnly = useCardSurchargeReadOnly(type);
142
144
  // 设置request
143
145
  var context = useEngineContext();
144
146
  var utils = context.appHelper.utils || {};
@@ -665,6 +667,7 @@ export default (function (props) {
665
667
  wrapperClassName: "pisell-lowcode__pos_setting_box"
666
668
  }, /*#__PURE__*/React.createElement(Pos, {
667
669
  eftposName: name,
670
+ surchargeReadOnly: surchargeReadOnly,
668
671
  onSave: onSavePos,
669
672
  formItemList: posItemList
670
673
  })),
@@ -683,6 +686,7 @@ export default (function (props) {
683
686
  wrapperClassName: "pisell-lowcode__pos_box"
684
687
  }, /*#__PURE__*/React.createElement(Device, {
685
688
  formItemList: deviceItemList,
689
+ surchargeReadOnly: surchargeReadOnly,
686
690
  onSave: onSave,
687
691
  key: "posdevice".concat(type)
688
692
  }, pairStatus ? /*#__PURE__*/React.createElement(Form.Item, {
@@ -749,6 +753,7 @@ export default (function (props) {
749
753
  wrapperClassName: "pisell-lowcode__pos_box"
750
754
  }, /*#__PURE__*/React.createElement(Device, {
751
755
  formItemList: deviceItemList,
756
+ surchargeReadOnly: surchargeReadOnly,
752
757
  onSave: onSavePair,
753
758
  key: "device".concat(type),
754
759
  type: type,
@@ -2,7 +2,8 @@ import { DeviceProp } from "./const";
2
2
  interface PosProps {
3
3
  eftposName: string;
4
4
  formItemList: any[];
5
+ surchargeReadOnly?: boolean;
5
6
  onSave: (device: DeviceProp) => void;
6
7
  }
7
- declare const PosForm: ({ onSave, formItemList }: PosProps) => JSX.Element;
8
+ declare const PosForm: ({ onSave, formItemList, surchargeReadOnly, }: PosProps) => JSX.Element;
8
9
  export default PosForm;
@@ -1,12 +1,14 @@
1
1
  import { Form, Button, Typography } from "antd";
2
2
  import React from "react";
3
- import { getDefaultValue } from "./const";
3
+ import { getDefaultValue, preserveSurchargeValues } from "./const";
4
4
  import { locales } from "@pisell/utils";
5
5
  import FormItem from "./form";
6
6
  var Title = Typography.Title;
7
7
  var PosForm = function PosForm(_ref) {
8
8
  var onSave = _ref.onSave,
9
- formItemList = _ref.formItemList;
9
+ formItemList = _ref.formItemList,
10
+ _ref$surchargeReadOnl = _ref.surchargeReadOnly,
11
+ surchargeReadOnly = _ref$surchargeReadOnl === void 0 ? false : _ref$surchargeReadOnl;
10
12
  var initialValues = getDefaultValue(formItemList);
11
13
  return /*#__PURE__*/React.createElement("div", {
12
14
  className: "pisell-lowcode__pos-form-box"
@@ -15,14 +17,17 @@ var PosForm = function PosForm(_ref) {
15
17
  className: "pisell-lowcode__pos-title"
16
18
  }, locales.getText('page.eftpos.text.setting')), /*#__PURE__*/React.createElement(Form, {
17
19
  layout: "vertical",
18
- onFinish: onSave,
20
+ onFinish: function onFinish(values) {
21
+ return onSave(surchargeReadOnly ? preserveSurchargeValues(values, formItemList) : values);
22
+ },
19
23
  initialValues: initialValues,
20
24
  className: "pisell-lowcode__pos-form",
21
25
  key: formItemList
22
26
  }, /*#__PURE__*/React.createElement("div", {
23
27
  className: "pisell-lowcode__pos-form-content"
24
28
  }, /*#__PURE__*/React.createElement(FormItem, {
25
- formItemList: formItemList
29
+ formItemList: formItemList,
30
+ surchargeReadOnly: surchargeReadOnly
26
31
  })), /*#__PURE__*/React.createElement("div", {
27
32
  className: "pisell-lowcode__pos-form-btn"
28
33
  }, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
@@ -68,7 +68,9 @@ export default (function (props) {
68
68
  var origin = props.origin,
69
69
  top = props.top,
70
70
  left = props.left,
71
- right = props.right;
71
+ right = props.right,
72
+ _props$surchargeReadO = props.surchargeReadOnly,
73
+ surchargeReadOnly = _props$surchargeReadO === void 0 ? false : _props$surchargeReadO;
72
74
  var leftRef = useRef(left.input.default || 0);
73
75
  var rightRef = useRef(right.input.default || 0);
74
76
  var _useState = useState(origin.input.defaultValue),
@@ -90,6 +92,7 @@ export default (function (props) {
90
92
  * @Date: 2024-08-20 11:12
91
93
  */
92
94
  var onValueChange = function onValueChange(e) {
95
+ if (surchargeReadOnly) return;
93
96
  setStatus(e.target.value);
94
97
  };
95
98
 
@@ -99,6 +102,7 @@ export default (function (props) {
99
102
  * @Date: 2024-08-20 11:13
100
103
  */
101
104
  var onChangeRate = function onChangeRate(val) {
105
+ if (surchargeReadOnly) return;
102
106
  leftRef.current = val;
103
107
  };
104
108
 
@@ -108,6 +112,7 @@ export default (function (props) {
108
112
  * @Date: 2024-08-20 11:13
109
113
  */
110
114
  var onChangeMoney = function onChangeMoney(val) {
115
+ if (surchargeReadOnly) return;
111
116
  rightRef.current = val;
112
117
  };
113
118
 
@@ -120,8 +125,10 @@ export default (function (props) {
120
125
  rules: origin.rules || [],
121
126
  style: origin.style || {}
122
127
  }, /*#__PURE__*/React.createElement(Radio.Group, {
128
+ disabled: surchargeReadOnly,
123
129
  value: origin.input.defaultValue,
124
130
  onChange: function onChange(e) {
131
+ if (surchargeReadOnly) return;
125
132
  setStatusOrigin(e.target.value);
126
133
  }
127
134
  }, /*#__PURE__*/React.createElement(Space, {
@@ -132,6 +139,7 @@ export default (function (props) {
132
139
  value = item.value,
133
140
  other = _objectWithoutProperties(item, _excluded);
134
141
  return /*#__PURE__*/React.createElement(Radio, _extends({}, other, {
142
+ disabled: surchargeReadOnly || other.disabled,
135
143
  value: value,
136
144
  key: "".concat(item.value)
137
145
  }), label);
@@ -146,6 +154,7 @@ export default (function (props) {
146
154
  rules: top.rules || [],
147
155
  style: top.style || {}
148
156
  }, /*#__PURE__*/React.createElement(Radio.Group, {
157
+ disabled: surchargeReadOnly,
149
158
  value: top.input.defaultValue,
150
159
  onChange: onValueChange
151
160
  }, /*#__PURE__*/React.createElement(Space, {
@@ -156,6 +165,7 @@ export default (function (props) {
156
165
  value = item.value,
157
166
  other = _objectWithoutProperties(item, _excluded2);
158
167
  return /*#__PURE__*/React.createElement(Radio, _extends({}, other, {
168
+ disabled: surchargeReadOnly || other.disabled,
159
169
  value: value,
160
170
  key: "".concat(item.value)
161
171
  }), label);
@@ -168,6 +178,7 @@ export default (function (props) {
168
178
  rules: left.rules || [],
169
179
  style: left.style || {}
170
180
  }, /*#__PURE__*/React.createElement(InputNumber, {
181
+ disabled: surchargeReadOnly,
171
182
  min: 0,
172
183
  max: 100,
173
184
  precision: 2,
@@ -183,6 +194,7 @@ export default (function (props) {
183
194
  rules: right.rules || [],
184
195
  style: right.style || {}
185
196
  }, /*#__PURE__*/React.createElement(InputNumber, {
197
+ disabled: surchargeReadOnly,
186
198
  min: 0,
187
199
  max: 100000,
188
200
  precision: 2,
@@ -11,14 +11,16 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import { locales } from '@pisell/utils';
12
12
  import { InputNumber, Button, message } from 'antd';
13
13
  import { Decimal } from 'decimal.js';
14
- import React, { useMemo, useState } from 'react';
14
+ import React, { useEffect, useMemo, useState } from 'react';
15
15
  import { useMount } from 'ahooks';
16
16
  import Alert from "./component/alert";
17
17
  import Titlebar from "./component/header/titlebar";
18
+ import { ModeEnum } from "./const";
18
19
  import { getAmonunt } from "./manufacturer";
19
20
  import { limitDecimals } from "./helper";
20
21
  import { useDispatch, useContextData, updateComponent, updateState } from "./store";
21
22
  import payLog from "./utils/payLog";
23
+ import useCardSurchargeReadOnly from "../../hooks/useCardSurchargeReadOnly";
22
24
 
23
25
  /**
24
26
  * @title: 支付金额信息配置页
@@ -45,6 +47,15 @@ export default (function (_ref) {
45
47
  status = _useState2[0],
46
48
  setStatus = _useState2[1];
47
49
  var store = useContextData();
50
+ var isPayment = store.mode === ModeEnum.Pay || store.mode === ModeEnum.FullPay;
51
+ var surchargeReadOnly = useCardSurchargeReadOnly(store.eftpos, {
52
+ includePos: isPayment
53
+ });
54
+ var hideSurchargeEdit = isPayment && surchargeReadOnly;
55
+ var isAmountPage = status || hideSurchargeEdit;
56
+ useEffect(function () {
57
+ if (hideSurchargeEdit) setStatus(true);
58
+ }, [hideSurchargeEdit]);
48
59
  var _getAmonunt = getAmonunt(store),
49
60
  name = _getAmonunt.name,
50
61
  symbol = _getAmonunt.symbol,
@@ -129,6 +140,7 @@ export default (function (_ref) {
129
140
  var onSubmit = function onSubmit() {
130
141
  if (!status) {
131
142
  setStatus(true);
143
+ if (surchargeReadOnly) return;
132
144
  setSurRate(tempSurRate);
133
145
  setSurMoney(tempSurMoney);
134
146
  return;
@@ -185,6 +197,7 @@ export default (function (_ref) {
185
197
  * @Date: 2024-08-19 09:53
186
198
  */
187
199
  var onEdit = function onEdit() {
200
+ if (surchargeReadOnly || useOriginSurcharge) return;
188
201
  payLog.log('金额页-点击编辑');
189
202
  setStatus(false);
190
203
  setTempSurRate(curSurRate);
@@ -201,7 +214,7 @@ export default (function (_ref) {
201
214
  }, isMobile ? null : /*#__PURE__*/React.createElement(Titlebar, {
202
215
  type: 'left-title-close',
203
216
  onClose: onClose
204
- }, status ? name : locales.getText('page.eftpos-pay.text.surcharge.edit.title')), status ? /*#__PURE__*/React.createElement("div", {
217
+ }, isAmountPage ? name : locales.getText('page.eftpos-pay.text.surcharge.edit.title')), isAmountPage ? /*#__PURE__*/React.createElement("div", {
205
218
  className: "pisell-lowcode__eft-pay-amount-body"
206
219
  }, /*#__PURE__*/React.createElement("div", {
207
220
  className: "pisell-lowcode__eft-pay-cash",
@@ -239,10 +252,10 @@ export default (function (_ref) {
239
252
  className: "pisell-lowcode__eft-pay-total"
240
253
  }, locales.getText('page.eftpos-pay.text.surcharge.edit.actual.pay'), ":", formatAmount("".concat(total), 2, symbol)), /*#__PURE__*/React.createElement("div", {
241
254
  className: "pisell-lowcode__eft-pay-money"
242
- }, locales.getText('page.eftpos-pay.text.surcharge.edit.inc.surcharge'), ": ", formatAmount("".concat(totalSurMoney), 2, symbol), " (", locales.getText('page.eftpos-pay.text.surcharge.edit.rate'), ":", curSurRate, "% + ", formatAmount("".concat(curSurMoney), 2, symbol), ")")), /*#__PURE__*/React.createElement(Button, {
255
+ }, locales.getText('page.eftpos-pay.text.surcharge.edit.inc.surcharge'), ": ", formatAmount("".concat(totalSurMoney), 2, symbol), " (", locales.getText('page.eftpos-pay.text.surcharge.edit.rate'), ":", curSurRate, "% + ", formatAmount("".concat(curSurMoney), 2, symbol), ")")), !hideSurchargeEdit && /*#__PURE__*/React.createElement(Button, {
243
256
  type: "link",
244
257
  onClick: onEdit,
245
- disabled: useOriginSurcharge
258
+ disabled: surchargeReadOnly || useOriginSurcharge
246
259
  }, locales.getText('page.eftpos-pay.text.surcharge.edit.surcharge')))) : /*#__PURE__*/React.createElement("div", {
247
260
  className: "pisell-lowcode__eft-pay-amount-body"
248
261
  }, /*#__PURE__*/React.createElement(Alert, null, locales.getText('page.eftpos-pay.text.surcharge.percentage-fixed')), /*#__PURE__*/React.createElement("div", {
@@ -253,6 +266,7 @@ export default (function (_ref) {
253
266
  className: "pisell-lowcode__eft-pay-amount-item-title"
254
267
  }, locales.getText('page.eftpos-pay.text.surcharge.percentage')), /*#__PURE__*/React.createElement(InputNumber, {
255
268
  type: "number",
269
+ disabled: surchargeReadOnly,
256
270
  value: tempSurRate,
257
271
  min: 0,
258
272
  max: 100,
@@ -270,6 +284,7 @@ export default (function (_ref) {
270
284
  className: "pisell-lowcode__eft-pay-amount-item-title"
271
285
  }, locales.getText('page.eftpos-pay.text.surcharge.fixed')), /*#__PURE__*/React.createElement(InputNumber, {
272
286
  type: "number",
287
+ disabled: surchargeReadOnly,
273
288
  value: tempSurMoney,
274
289
  min: 0,
275
290
  max: 100000,
@@ -292,6 +307,6 @@ export default (function (_ref) {
292
307
  className: "pisell-lowcode__eft-pay-step-item-btn",
293
308
  type: "primary",
294
309
  onClick: onSubmit,
295
- disabled: currentMoney <= 0 && status
310
+ disabled: currentMoney <= 0 && isAmountPage
296
311
  }, locales.getText('page.eftpos-pay.text.sure'))));
297
312
  });
@@ -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<"tyro" | "mx51" | "payo" | "windcave" | "stripe" | "linkly" | "huifu" | "adyenpos" | "adyenalipay" | "adyenwechat">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly" | "mx51" | "adyenpos" | "huifu" | "adyenalipay" | "adyenwechat">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -299,15 +299,15 @@ export declare const backUpFree: (payload: Partial<State>) => {
299
299
  name?: string | undefined;
300
300
  symbol?: string | undefined;
301
301
  amount?: string | number | undefined;
302
- mode?: "refund" | "fullPay" | "pay" | "query" | undefined;
302
+ mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
303
303
  order_id?: string | number | undefined;
304
- eftpos?: "tyro" | "mx51" | "payo" | "windcave" | "stripe" | "linkly" | "huifu" | "adyenpos" | "adyenalipay" | "adyenwechat" | undefined;
305
- action?: "amount" | "pay" | "deviceList" | undefined;
304
+ eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | "mx51" | "adyenpos" | "huifu" | "adyenalipay" | "adyenwechat" | undefined;
305
+ action?: "pay" | "amount" | "deviceList" | undefined;
306
306
  key?: number | undefined;
307
307
  step?: number | undefined;
308
308
  title?: string | undefined;
309
309
  subTitle?: string | undefined;
310
- type?: "step" | "unset" | undefined;
310
+ type?: "unset" | "step" | undefined;
311
311
  render?: boolean | undefined;
312
312
  net?: boolean | undefined;
313
313
  component?: string | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  platform: 'pc' | 'h5' | '' | undefined;
3
4
  order: any;
@@ -29,4 +30,11 @@ export interface PayGroup {
29
30
  _order: any;
30
31
  front_order_uuid?: string;
31
32
  }
32
- export declare const Provider: any, Context: any;
33
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
34
+ state: FormState;
35
+ } & {
36
+ dispatch: (params: {
37
+ type: string;
38
+ payload: any;
39
+ }) => void;
40
+ }>;