@pisell/private-materials 3.0.96 → 3.0.97
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 +16 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +15 -8
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +1 -2
- package/es/components/booking/forms/forms.d.ts +1 -1
- package/es/components/booking/forms/index.d.ts +1 -1
- package/es/components/booking/forms/model.d.ts +1 -2
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/model.d.ts +1 -2
- package/es/components/booking/model.d.ts +1 -2
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -2
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +1 -2
- package/es/components/eftpos/const.d.ts +38 -0
- package/es/components/eftpos/const.js +79 -0
- package/es/components/eftpos/device.d.ts +8 -0
- package/es/components/eftpos/device.js +30 -0
- package/es/components/eftpos/form/index.d.ts +16 -0
- package/es/components/eftpos/form/index.js +113 -0
- package/es/components/eftpos/index.d.ts +37 -0
- package/es/components/eftpos/index.js +274 -0
- package/es/components/eftpos/index.less +153 -0
- package/es/components/eftpos/locales.d.ts +75 -0
- package/es/components/eftpos/locales.js +98 -0
- package/es/components/eftpos/pos.d.ts +9 -0
- package/es/components/eftpos/pos.js +33 -0
- package/es/components/eftpos/surcharge/index.css +17 -0
- package/es/components/eftpos/surcharge/index.d.ts +8 -0
- package/es/components/eftpos/surcharge/index.js +111 -0
- package/es/components/eftpos/table.d.ts +17 -0
- package/es/components/eftpos/table.js +236 -0
- package/es/components/eftposPay/amount.d.ts +14 -0
- package/es/components/eftposPay/amount.js +253 -0
- package/es/components/eftposPay/component/alert/index.d.ts +6 -0
- package/es/components/eftposPay/component/alert/index.js +11 -0
- package/es/components/eftposPay/component/alert/index.less +29 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +3 -0
- package/es/components/eftposPay/component/alert/warn.js +45 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +4 -0
- package/es/components/eftposPay/component/fail/failCustom.js +95 -0
- package/es/components/eftposPay/component/fail/index.d.ts +4 -0
- package/es/components/eftposPay/component/fail/index.js +105 -0
- package/es/components/eftposPay/component/fail/network.d.ts +4 -0
- package/es/components/eftposPay/component/fail/network.js +48 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +4 -0
- package/es/components/eftposPay/component/fail/unknow.js +43 -0
- package/es/components/eftposPay/component/header/index.d.ts +9 -0
- package/es/components/eftposPay/component/header/index.js +66 -0
- package/es/components/eftposPay/component/header/index.less +44 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +13 -0
- package/es/components/eftposPay/component/header/titlebar.js +39 -0
- package/es/components/eftposPay/component/header/titlebar.less +17 -0
- package/es/components/eftposPay/component/manual/index.d.ts +5 -0
- package/es/components/eftposPay/component/manual/index.js +91 -0
- package/es/components/eftposPay/component/manual/index.less +96 -0
- package/es/components/eftposPay/component/signature/index.d.ts +4 -0
- package/es/components/eftposPay/component/signature/index.js +63 -0
- package/es/components/eftposPay/component/step/index.d.ts +12 -0
- package/es/components/eftposPay/component/step/index.js +31 -0
- package/es/components/eftposPay/component/step/step.d.ts +9 -0
- package/es/components/eftposPay/component/step/step.js +23 -0
- package/es/components/eftposPay/const.d.ts +131 -0
- package/es/components/eftposPay/const.js +48 -0
- package/es/components/eftposPay/device.d.ts +14 -0
- package/es/components/eftposPay/device.js +124 -0
- package/es/components/eftposPay/device.less +61 -0
- package/es/components/eftposPay/eftpos/config.d.ts +11 -0
- package/es/components/eftposPay/eftpos/config.js +178 -0
- package/es/components/eftposPay/eftpos/const.d.ts +10 -0
- package/es/components/eftposPay/eftpos/const.js +139 -0
- package/es/components/eftposPay/eftpos/index.d.ts +7 -0
- package/es/components/eftposPay/eftpos/index.js +35 -0
- package/es/components/eftposPay/helper.d.ts +3 -0
- package/es/components/eftposPay/helper.js +35 -0
- package/es/components/eftposPay/hooks.d.ts +4 -0
- package/es/components/eftposPay/hooks.js +153 -0
- package/es/components/eftposPay/index.d.ts +7 -0
- package/es/components/eftposPay/index.js +188 -0
- package/es/components/eftposPay/index.less +273 -0
- package/es/components/eftposPay/locales.d.ts +264 -0
- package/es/components/eftposPay/locales.js +384 -0
- package/es/components/eftposPay/manufacturer.d.ts +6 -0
- package/es/components/eftposPay/manufacturer.js +32 -0
- package/es/components/eftposPay/pay.d.ts +10 -0
- package/es/components/eftposPay/pay.js +108 -0
- package/es/components/eftposPay/payo/config.d.ts +11 -0
- package/es/components/eftposPay/payo/config.js +357 -0
- package/es/components/eftposPay/payo/const.d.ts +6 -0
- package/es/components/eftposPay/payo/const.js +93 -0
- package/es/components/eftposPay/payo/hooks.d.ts +5 -0
- package/es/components/eftposPay/payo/hooks.js +84 -0
- package/es/components/eftposPay/payo/index.d.ts +7 -0
- package/es/components/eftposPay/payo/index.js +35 -0
- package/es/components/eftposPay/store/index.d.ts +239 -0
- package/es/components/eftposPay/store/index.js +304 -0
- package/es/components/eftposPay/store/useThunkReducer.d.ts +9 -0
- package/es/components/eftposPay/store/useThunkReducer.js +31 -0
- package/es/components/eftposPay/windcave/action.d.ts +8 -0
- package/es/components/eftposPay/windcave/action.js +104 -0
- package/es/components/eftposPay/windcave/const.d.ts +104 -0
- package/es/components/eftposPay/windcave/const.js +253 -0
- package/es/components/eftposPay/windcave/helper.d.ts +9 -0
- package/es/components/eftposPay/windcave/helper.js +314 -0
- package/es/components/eftposPay/windcave/hook.d.ts +14 -0
- package/es/components/eftposPay/windcave/hook.js +144 -0
- package/es/components/eftposPay/windcave/index.d.ts +8 -0
- package/es/components/eftposPay/windcave/index.js +49 -0
- package/es/components/eftposPay/windcave/pos.d.ts +8 -0
- package/es/components/eftposPay/windcave/pos.js +180 -0
- package/es/components/eftposPay/windcave/pwd.d.ts +8 -0
- package/es/components/eftposPay/windcave/pwd.js +124 -0
- package/es/components/eftposPay/windcave/receipet.d.ts +6 -0
- package/es/components/eftposPay/windcave/receipet.js +67 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +11 -0
- package/es/components/eftposPay/windcave/receiptAction.js +326 -0
- package/es/components/eftposPay/windcave/timer.d.ts +17 -0
- package/es/components/eftposPay/windcave/timer.js +181 -0
- package/es/components/eftposPay/windcave/wait.d.ts +12 -0
- package/es/components/eftposPay/windcave/wait.js +139 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +6 -0
- package/es/components/eftposPay/windcave/windcave.js +283 -0
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -2
- package/es/hooks/usePrefix.d.ts +1 -0
- package/es/hooks/usePrefix.js +10 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/forms/forms.d.ts +1 -1
- package/lib/components/booking/forms/index.d.ts +1 -1
- package/lib/components/booking/forms/model.d.ts +1 -2
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/model.d.ts +1 -2
- package/lib/components/booking/model.d.ts +1 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -2
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +1 -2
- package/lib/components/eftpos/const.d.ts +38 -0
- package/lib/components/eftpos/const.js +108 -0
- package/lib/components/eftpos/device.d.ts +8 -0
- package/lib/components/eftpos/device.js +55 -0
- package/lib/components/eftpos/form/index.d.ts +16 -0
- package/lib/components/eftpos/form/index.js +124 -0
- package/lib/components/eftpos/index.d.ts +37 -0
- package/lib/components/eftpos/index.js +279 -0
- package/lib/components/eftpos/index.less +153 -0
- package/lib/components/eftpos/locales.d.ts +75 -0
- package/lib/components/eftpos/locales.js +116 -0
- package/lib/components/eftpos/pos.d.ts +9 -0
- package/lib/components/eftpos/pos.js +55 -0
- package/lib/components/eftpos/surcharge/index.css +17 -0
- package/lib/components/eftpos/surcharge/index.d.ts +8 -0
- package/lib/components/eftpos/surcharge/index.js +125 -0
- package/lib/components/eftpos/table.d.ts +17 -0
- package/lib/components/eftpos/table.js +235 -0
- package/lib/components/eftposPay/amount.d.ts +14 -0
- package/lib/components/eftposPay/amount.js +239 -0
- package/lib/components/eftposPay/component/alert/index.d.ts +6 -0
- package/lib/components/eftposPay/component/alert/index.js +38 -0
- package/lib/components/eftposPay/component/alert/index.less +29 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +3 -0
- package/lib/components/eftposPay/component/alert/warn.js +80 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/failCustom.js +117 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/index.js +121 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/network.js +65 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +4 -0
- package/lib/components/eftposPay/component/fail/unknow.js +72 -0
- package/lib/components/eftposPay/component/header/index.d.ts +9 -0
- package/lib/components/eftposPay/component/header/index.js +92 -0
- package/lib/components/eftposPay/component/header/index.less +44 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +13 -0
- package/lib/components/eftposPay/component/header/titlebar.js +55 -0
- package/lib/components/eftposPay/component/header/titlebar.less +17 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +5 -0
- package/lib/components/eftposPay/component/manual/index.js +101 -0
- package/lib/components/eftposPay/component/manual/index.less +96 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +4 -0
- package/lib/components/eftposPay/component/signature/index.js +80 -0
- package/lib/components/eftposPay/component/step/index.d.ts +12 -0
- package/lib/components/eftposPay/component/step/index.js +71 -0
- package/lib/components/eftposPay/component/step/step.d.ts +9 -0
- package/lib/components/eftposPay/component/step/step.js +59 -0
- package/lib/components/eftposPay/const.d.ts +131 -0
- package/lib/components/eftposPay/const.js +86 -0
- package/lib/components/eftposPay/device.d.ts +14 -0
- package/lib/components/eftposPay/device.js +127 -0
- package/lib/components/eftposPay/device.less +61 -0
- package/lib/components/eftposPay/eftpos/config.d.ts +11 -0
- package/lib/components/eftposPay/eftpos/config.js +199 -0
- package/lib/components/eftposPay/eftpos/const.d.ts +10 -0
- package/lib/components/eftposPay/eftpos/const.js +165 -0
- package/lib/components/eftposPay/eftpos/index.d.ts +7 -0
- package/lib/components/eftposPay/eftpos/index.js +66 -0
- package/lib/components/eftposPay/helper.d.ts +3 -0
- package/lib/components/eftposPay/helper.js +62 -0
- package/lib/components/eftposPay/hooks.d.ts +4 -0
- package/lib/components/eftposPay/hooks.js +237 -0
- package/lib/components/eftposPay/index.d.ts +7 -0
- package/lib/components/eftposPay/index.js +189 -0
- package/lib/components/eftposPay/index.less +273 -0
- package/lib/components/eftposPay/locales.d.ts +264 -0
- package/lib/components/eftposPay/locales.js +304 -0
- package/lib/components/eftposPay/manufacturer.d.ts +6 -0
- package/lib/components/eftposPay/manufacturer.js +77 -0
- package/lib/components/eftposPay/pay.d.ts +10 -0
- package/lib/components/eftposPay/pay.js +120 -0
- package/lib/components/eftposPay/payo/config.d.ts +11 -0
- package/lib/components/eftposPay/payo/config.js +377 -0
- package/lib/components/eftposPay/payo/const.d.ts +6 -0
- package/lib/components/eftposPay/payo/const.js +112 -0
- package/lib/components/eftposPay/payo/hooks.d.ts +5 -0
- package/lib/components/eftposPay/payo/hooks.js +80 -0
- package/lib/components/eftposPay/payo/index.d.ts +7 -0
- package/lib/components/eftposPay/payo/index.js +63 -0
- package/lib/components/eftposPay/store/index.d.ts +239 -0
- package/lib/components/eftposPay/store/index.js +371 -0
- package/lib/components/eftposPay/store/useThunkReducer.d.ts +9 -0
- package/lib/components/eftposPay/store/useThunkReducer.js +53 -0
- package/lib/components/eftposPay/windcave/action.d.ts +8 -0
- package/lib/components/eftposPay/windcave/action.js +143 -0
- package/lib/components/eftposPay/windcave/const.d.ts +104 -0
- package/lib/components/eftposPay/windcave/const.js +300 -0
- package/lib/components/eftposPay/windcave/helper.d.ts +9 -0
- package/lib/components/eftposPay/windcave/helper.js +378 -0
- package/lib/components/eftposPay/windcave/hook.d.ts +14 -0
- package/lib/components/eftposPay/windcave/hook.js +139 -0
- package/lib/components/eftposPay/windcave/index.d.ts +8 -0
- package/lib/components/eftposPay/windcave/index.js +78 -0
- package/lib/components/eftposPay/windcave/pos.d.ts +8 -0
- package/lib/components/eftposPay/windcave/pos.js +197 -0
- package/lib/components/eftposPay/windcave/pwd.d.ts +8 -0
- package/lib/components/eftposPay/windcave/pwd.js +143 -0
- package/lib/components/eftposPay/windcave/receipet.d.ts +6 -0
- package/lib/components/eftposPay/windcave/receipet.js +93 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +11 -0
- package/lib/components/eftposPay/windcave/receiptAction.js +386 -0
- package/lib/components/eftposPay/windcave/timer.d.ts +17 -0
- package/lib/components/eftposPay/windcave/timer.js +126 -0
- package/lib/components/eftposPay/windcave/wait.d.ts +12 -0
- package/lib/components/eftposPay/windcave/wait.js +163 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +6 -0
- package/lib/components/eftposPay/windcave/windcave.js +283 -0
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -2
- package/lib/hooks/usePrefix.d.ts +1 -0
- package/lib/hooks/usePrefix.js +44 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lowcode/eftpos/meta.ts +187 -0
- package/lowcode/eftpos-pay/meta.ts +122 -0
- package/package.json +4 -3
|
@@ -0,0 +1,274 @@
|
|
|
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
|
+
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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
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; }
|
|
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; }
|
|
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; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
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); }
|
|
8
|
+
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); } }
|
|
9
|
+
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); }); }; }
|
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
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."); }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
import React, { useState, useRef, useEffect } from "react";
|
|
17
|
+
import { Spin } from "antd";
|
|
18
|
+
import { locales } from "@pisell/utils";
|
|
19
|
+
import Table from "./table";
|
|
20
|
+
import Device from "./device";
|
|
21
|
+
import Pos from "./pos";
|
|
22
|
+
import Drawer from "../booking/components/drawer";
|
|
23
|
+
import localeTexts from "./locales";
|
|
24
|
+
import { Eftpos, getCommByFields, DeviceEnum } from "./const";
|
|
25
|
+
import "./index.less";
|
|
26
|
+
var PosTabs = function PosTabs(_ref) {
|
|
27
|
+
var Table = _ref.Table,
|
|
28
|
+
PosForm = _ref.PosForm,
|
|
29
|
+
style = _ref.style;
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
document.body.id = "body";
|
|
32
|
+
}, []);
|
|
33
|
+
var _useState = useState(locales.getText("page.eftpos.text.device")),
|
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
+
active = _useState2[0],
|
|
36
|
+
setActive = _useState2[1];
|
|
37
|
+
var onClick = function onClick(event) {
|
|
38
|
+
var target = event.currentTarget;
|
|
39
|
+
if (!target) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
var key = target.dataset.key;
|
|
43
|
+
key && setActive(key);
|
|
44
|
+
};
|
|
45
|
+
var items = [{
|
|
46
|
+
key: locales.getText("page.eftpos.text.device"),
|
|
47
|
+
label: function label(active) {
|
|
48
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
className: "pisell-lowcode__pos_tabs-tab-label"
|
|
50
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
className: "pisell-lowcode__pos_circle ".concat(active ? "active" : "")
|
|
52
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
53
|
+
className: "pisell-lowcode__pos_tabs-tab-label-tlt ".concat(active ? "active" : "")
|
|
54
|
+
}, "device"));
|
|
55
|
+
},
|
|
56
|
+
children: Table
|
|
57
|
+
}, {
|
|
58
|
+
key: "apiKey",
|
|
59
|
+
label: function label(active) {
|
|
60
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
className: "pisell-lowcode__pos_tabs-tab-label"
|
|
62
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
className: "pisell-lowcode__pos_circle ".concat(active ? "active" : "")
|
|
64
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
65
|
+
className: "pisell-lowcode__pos_tabs-tab-label-tlt ".concat(active ? "active" : "")
|
|
66
|
+
}, "apiKey"));
|
|
67
|
+
},
|
|
68
|
+
children: PosForm
|
|
69
|
+
}];
|
|
70
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
71
|
+
className: "pisell-lowcode__pos_tabs",
|
|
72
|
+
style: style
|
|
73
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
className: "pisell-lowcode__pos_tabs-nav"
|
|
75
|
+
}, items.map(function (item) {
|
|
76
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
77
|
+
key: item.key,
|
|
78
|
+
style: {
|
|
79
|
+
display: "contents"
|
|
80
|
+
},
|
|
81
|
+
"data-key": item.key,
|
|
82
|
+
onClick: onClick
|
|
83
|
+
}, item.label(active === item.key));
|
|
84
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
className: "pisell-lowcode__pos_tab-content"
|
|
86
|
+
}, items.map(function (item) {
|
|
87
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
88
|
+
className: "pisell-lowcode__pos_tabs-tabpane ".concat(active === item.key ? "active" : ""),
|
|
89
|
+
key: item.key
|
|
90
|
+
}, item.children);
|
|
91
|
+
})));
|
|
92
|
+
};
|
|
93
|
+
locales.init(localeTexts, localStorage.getItem("umi_locale") || "en");
|
|
94
|
+
export default (function (props) {
|
|
95
|
+
var name = props.name,
|
|
96
|
+
zIndex = props.zIndex,
|
|
97
|
+
_props$type = props.type,
|
|
98
|
+
type = _props$type === void 0 ? Eftpos.Payo : _props$type,
|
|
99
|
+
tableSize = props.tableSize,
|
|
100
|
+
getList = props.getList,
|
|
101
|
+
getField = props.getField,
|
|
102
|
+
getComm = props.getComm,
|
|
103
|
+
onDel = props.onDel,
|
|
104
|
+
onEdit = props.onEdit,
|
|
105
|
+
getPosComm = props.getPosComm,
|
|
106
|
+
savePos = props.savePos;
|
|
107
|
+
var _useState3 = useState("list"),
|
|
108
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
109
|
+
page = _useState4[0],
|
|
110
|
+
setPage = _useState4[1];
|
|
111
|
+
var _useState5 = useState(false),
|
|
112
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
113
|
+
loading = _useState6[0],
|
|
114
|
+
setLoading = _useState6[1];
|
|
115
|
+
var _useState7 = useState(DeviceEnum.Add),
|
|
116
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
117
|
+
status = _useState8[0],
|
|
118
|
+
setStatus = _useState8[1];
|
|
119
|
+
var tableRef = useRef();
|
|
120
|
+
var deviceIdRef = useRef("");
|
|
121
|
+
var _useState9 = useState([]),
|
|
122
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
123
|
+
deviceItemList = _useState10[0],
|
|
124
|
+
setDeviceCommList = _useState10[1];
|
|
125
|
+
var _useState11 = useState([]),
|
|
126
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
127
|
+
posItemList = _useState12[0],
|
|
128
|
+
setPosCommList = _useState12[1];
|
|
129
|
+
var onDelDevice = function onDelDevice(id) {
|
|
130
|
+
return onDel(id);
|
|
131
|
+
};
|
|
132
|
+
var onEditDevice = function onEditDevice(device) {
|
|
133
|
+
if (!device) {
|
|
134
|
+
setStatus(DeviceEnum.Add);
|
|
135
|
+
var field = getField(type);
|
|
136
|
+
var list = getCommByFields({
|
|
137
|
+
field: field,
|
|
138
|
+
getComm: getComm
|
|
139
|
+
});
|
|
140
|
+
console.log(list);
|
|
141
|
+
setDeviceCommList(list);
|
|
142
|
+
} else {
|
|
143
|
+
deviceIdRef.current = device.id;
|
|
144
|
+
var _field = getField(type, DeviceEnum.Edit);
|
|
145
|
+
var _list = getCommByFields({
|
|
146
|
+
field: _field,
|
|
147
|
+
value: device,
|
|
148
|
+
getComm: getComm
|
|
149
|
+
});
|
|
150
|
+
setStatus(DeviceEnum.Edit);
|
|
151
|
+
setDeviceCommList(_list);
|
|
152
|
+
}
|
|
153
|
+
setPage("edit");
|
|
154
|
+
};
|
|
155
|
+
var onRepair = function onRepair(device) {
|
|
156
|
+
var field = getField(type, DeviceEnum.Repair);
|
|
157
|
+
var list = getCommByFields({
|
|
158
|
+
field: field,
|
|
159
|
+
value: device,
|
|
160
|
+
getComm: getComm
|
|
161
|
+
});
|
|
162
|
+
deviceIdRef.current = device.id;
|
|
163
|
+
setDeviceCommList(list);
|
|
164
|
+
setStatus(DeviceEnum.Repair);
|
|
165
|
+
setPage("edit");
|
|
166
|
+
};
|
|
167
|
+
var onSave = /*#__PURE__*/function () {
|
|
168
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(device) {
|
|
169
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
170
|
+
while (1) switch (_context.prev = _context.next) {
|
|
171
|
+
case 0:
|
|
172
|
+
setLoading(true);
|
|
173
|
+
_context.next = 3;
|
|
174
|
+
return onEdit(_objectSpread(_objectSpread({}, device), {}, {
|
|
175
|
+
type: type
|
|
176
|
+
}), status || "add").catch(function () {
|
|
177
|
+
setLoading(false);
|
|
178
|
+
});
|
|
179
|
+
case 3:
|
|
180
|
+
setLoading(false);
|
|
181
|
+
_context.next = 6;
|
|
182
|
+
return tableRef.current.loadData();
|
|
183
|
+
case 6:
|
|
184
|
+
setPage("list");
|
|
185
|
+
case 7:
|
|
186
|
+
case "end":
|
|
187
|
+
return _context.stop();
|
|
188
|
+
}
|
|
189
|
+
}, _callee);
|
|
190
|
+
}));
|
|
191
|
+
return function onSave(_x2) {
|
|
192
|
+
return _ref2.apply(this, arguments);
|
|
193
|
+
};
|
|
194
|
+
}();
|
|
195
|
+
var onSavePos = function onSavePos(pos) {
|
|
196
|
+
if (typeof savePos === "function") {
|
|
197
|
+
savePos(pos);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
var onBack = function onBack() {
|
|
201
|
+
setPage("list");
|
|
202
|
+
};
|
|
203
|
+
useEffect(function () {
|
|
204
|
+
if (typeof getPosComm === "function") {
|
|
205
|
+
setPosCommList(getPosComm(type));
|
|
206
|
+
}
|
|
207
|
+
}, [type, getPosComm]);
|
|
208
|
+
useEffect(function () {
|
|
209
|
+
setPage("list");
|
|
210
|
+
}, [type]);
|
|
211
|
+
if (type === Eftpos.Stripe) {
|
|
212
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PosTabs, {
|
|
213
|
+
Table: /*#__PURE__*/React.createElement(Table, {
|
|
214
|
+
ref: tableRef,
|
|
215
|
+
eftposName: name,
|
|
216
|
+
type: type,
|
|
217
|
+
tableSize: tableSize,
|
|
218
|
+
getList: getList,
|
|
219
|
+
onDel: onDelDevice,
|
|
220
|
+
onRepair: onRepair,
|
|
221
|
+
onEdit: onEditDevice,
|
|
222
|
+
key: "postable".concat(type)
|
|
223
|
+
}),
|
|
224
|
+
PosForm: /*#__PURE__*/React.createElement(Pos, {
|
|
225
|
+
eftposName: name,
|
|
226
|
+
onSave: onSavePos,
|
|
227
|
+
formItemList: posItemList
|
|
228
|
+
})
|
|
229
|
+
}), /*#__PURE__*/React.createElement(Drawer, {
|
|
230
|
+
open: page === "edit",
|
|
231
|
+
onClose: onBack,
|
|
232
|
+
title: locales.getText("page.eftpos.text.device.add")(status, name),
|
|
233
|
+
titleNoWrap: true,
|
|
234
|
+
zIndex: zIndex || 9999,
|
|
235
|
+
destroyOnClose: true,
|
|
236
|
+
className: "pisell-lowcode__pos_drawer"
|
|
237
|
+
}, /*#__PURE__*/React.createElement(Spin, {
|
|
238
|
+
tip: "Loading...",
|
|
239
|
+
spinning: loading,
|
|
240
|
+
wrapperClassName: "pisell-lowcode__pos_box"
|
|
241
|
+
}, /*#__PURE__*/React.createElement(Device, {
|
|
242
|
+
formItemList: deviceItemList,
|
|
243
|
+
onSave: onSave,
|
|
244
|
+
key: "posdevice".concat(type)
|
|
245
|
+
}))));
|
|
246
|
+
}
|
|
247
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Table, {
|
|
248
|
+
eftposName: name,
|
|
249
|
+
ref: tableRef,
|
|
250
|
+
type: type,
|
|
251
|
+
tableSize: tableSize,
|
|
252
|
+
getList: getList,
|
|
253
|
+
onDel: onDelDevice,
|
|
254
|
+
onRepair: onRepair,
|
|
255
|
+
onEdit: onEditDevice,
|
|
256
|
+
key: "table".concat(type)
|
|
257
|
+
}), /*#__PURE__*/React.createElement(Drawer, {
|
|
258
|
+
open: page === "edit",
|
|
259
|
+
onClose: onBack,
|
|
260
|
+
title: locales.getText("page.eftpos.text.device.add")(status, name),
|
|
261
|
+
titleNoWrap: true,
|
|
262
|
+
zIndex: zIndex || 9999,
|
|
263
|
+
destroyOnClose: true,
|
|
264
|
+
className: "pisell-lowcode__pos_drawer"
|
|
265
|
+
}, /*#__PURE__*/React.createElement(Spin, {
|
|
266
|
+
tip: "Loading...",
|
|
267
|
+
spinning: loading,
|
|
268
|
+
wrapperClassName: "pisell-lowcode__pos_box"
|
|
269
|
+
}, /*#__PURE__*/React.createElement(Device, {
|
|
270
|
+
formItemList: deviceItemList,
|
|
271
|
+
onSave: onSave,
|
|
272
|
+
key: "device".concat(type)
|
|
273
|
+
}))));
|
|
274
|
+
});
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
.pisell-lowcode__pos_circle {
|
|
2
|
+
width: 50px;
|
|
3
|
+
height: 50px;
|
|
4
|
+
border-radius: 50%;
|
|
5
|
+
background: currentColor;
|
|
6
|
+
background: #f2f2f7;
|
|
7
|
+
color: #acacac;
|
|
8
|
+
border: 1px solid #f2f2f7;
|
|
9
|
+
}
|
|
10
|
+
.pisell-lowcode__pos_circle.active {
|
|
11
|
+
background: var(--primary-600, #7f56d9);
|
|
12
|
+
color: #fff;
|
|
13
|
+
}
|
|
14
|
+
.pisell-lowcode__pos_circle:hover {
|
|
15
|
+
border-color: #d5d7da;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.pisell-lowcode__pos_tabs {
|
|
19
|
+
display: flex;
|
|
20
|
+
height: 100%;
|
|
21
|
+
}
|
|
22
|
+
.pisell-lowcode__pos_tabs-nav {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
position: relative;
|
|
26
|
+
width: 130px;
|
|
27
|
+
align-items: center;
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
}
|
|
30
|
+
.pisell-lowcode__pos_tabs-nav::after {
|
|
31
|
+
content: "";
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 0;
|
|
34
|
+
bottom: 0;
|
|
35
|
+
right: 0;
|
|
36
|
+
width: 1px;
|
|
37
|
+
background-color: #ececec;
|
|
38
|
+
}
|
|
39
|
+
.pisell-lowcode__pos_tabs-tab-label {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
align-items: center;
|
|
43
|
+
width: 72px;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
padding: 16px 0;
|
|
47
|
+
}
|
|
48
|
+
.pisell-lowcode__pos_tabs-tab-label-tlt {
|
|
49
|
+
color: #0d1619;
|
|
50
|
+
font-size: 14px;
|
|
51
|
+
font-style: normal;
|
|
52
|
+
font-weight: 400;
|
|
53
|
+
line-height: 20px;
|
|
54
|
+
}
|
|
55
|
+
.pisell-lowcode__pos_tabs-tab-label-tlt.active {
|
|
56
|
+
color: #7f56d9;
|
|
57
|
+
color: var(--primary-600, #7f56d9);
|
|
58
|
+
font-size: 14px;
|
|
59
|
+
font-style: normal;
|
|
60
|
+
font-weight: 400;
|
|
61
|
+
line-height: 20px;
|
|
62
|
+
}
|
|
63
|
+
.pisell-lowcode__pos_tabs-tabpane {
|
|
64
|
+
display: none;
|
|
65
|
+
flex: 1;
|
|
66
|
+
}
|
|
67
|
+
.pisell-lowcode__pos_tabs-tabpane.active {
|
|
68
|
+
display: flex;
|
|
69
|
+
}
|
|
70
|
+
.pisell-lowcode__pos_tab-content {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex: 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.pisell-lowcode__pos_box {
|
|
76
|
+
height: 100%;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.pisell-lowcode__pos_drawer {
|
|
80
|
+
transform: translateZ(0);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.pisell-lowcode__pos-form-box {
|
|
84
|
+
flex: 1;
|
|
85
|
+
padding: var(--pisell-lc-pos-padding-v, 0)
|
|
86
|
+
var(--pisell-lc-pos-padding-h, 24px);
|
|
87
|
+
height: 100%;
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.pisell-lowcode__pos-form {
|
|
93
|
+
flex: 1;
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.pisell-lowcode__pos-form-content {
|
|
101
|
+
overflow: auto;
|
|
102
|
+
flex: 1;
|
|
103
|
+
}
|
|
104
|
+
.pisell-lowcode__pos-form-btn {
|
|
105
|
+
height: 80px;
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-direction: column;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
background: #fff;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.pisell-lowcode__pos-table {
|
|
113
|
+
flex: 1;
|
|
114
|
+
padding: var(--pisell-lc-pos-padding-v, 0)
|
|
115
|
+
var(--pisell-lc-pos-padding-h, 24px);
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
gap: 8px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.pisell-lowcode__pos-table-act {
|
|
122
|
+
display: flex;
|
|
123
|
+
justify-content: space-between;
|
|
124
|
+
align-items: center;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.pisell-lowcode__pos-table-col {
|
|
128
|
+
word-wrap: break-word;
|
|
129
|
+
}
|
|
130
|
+
.pisell-lowcode__pos-title {
|
|
131
|
+
margin: 24px 0 16px !important;
|
|
132
|
+
color: var(--base-black, #000) !important;
|
|
133
|
+
font-size: 30px !important;
|
|
134
|
+
font-style: normal;
|
|
135
|
+
font-weight: 500 !important;
|
|
136
|
+
line-height: 38px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.pisell-lowcode__pos-device {
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
padding: 24px 32px 0 !important;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
}
|
|
145
|
+
.pisell-lowcode__pos-device-btn {
|
|
146
|
+
position: fixed;
|
|
147
|
+
left: 0;
|
|
148
|
+
right: 0;
|
|
149
|
+
bottom: 0;
|
|
150
|
+
margin: 24px 32px 0 !important;
|
|
151
|
+
background-color: #fff;
|
|
152
|
+
padding: 0 0 24px 0 !important;
|
|
153
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'page.eftpos.text.manufacturer': string;
|
|
4
|
+
'page.eftpos.text.description': string;
|
|
5
|
+
'page.eftpos.text.status': string;
|
|
6
|
+
'page.eftpos.text.operation': string;
|
|
7
|
+
'page.eftpos.text.device': string;
|
|
8
|
+
'page.eftpos.text.device.add': (status?: string, name?: string) => string;
|
|
9
|
+
'page.eftpos.text.device.list': string;
|
|
10
|
+
'page.eftpos.text.device.name': string;
|
|
11
|
+
'page.eftpos.text.sucahrge': string;
|
|
12
|
+
'page.eftpos.text.paired': string;
|
|
13
|
+
'page.eftpos.text.unpaired': string;
|
|
14
|
+
'page.eftpos.text.repair': string;
|
|
15
|
+
'page.eftpos.text.edit': string;
|
|
16
|
+
'page.eftpos.text.delete': string;
|
|
17
|
+
'page.eftpos.text.save': string;
|
|
18
|
+
'page.eftpos.text.confim.delete': string;
|
|
19
|
+
'page.eftpos.text.confirm_delete-message': (x: string) => string;
|
|
20
|
+
'page.eftpos.text.confim.cancel': string;
|
|
21
|
+
'page.eftpos.text.table.name': string;
|
|
22
|
+
'page.eftpos.text.table.status': string;
|
|
23
|
+
'page.eftpos.text.table.surcharge': string;
|
|
24
|
+
'page.eftpos.text.table.opeartion': string;
|
|
25
|
+
};
|
|
26
|
+
'zh-CN': {
|
|
27
|
+
'page.eftpos.text.manufacturer': string;
|
|
28
|
+
'page.eftpos.text.description': string;
|
|
29
|
+
'page.eftpos.text.status': string;
|
|
30
|
+
'page.eftpos.text.operation': string;
|
|
31
|
+
'page.eftpos.text.device': string;
|
|
32
|
+
'page.eftpos.text.device.add': (status?: string, name?: string) => string;
|
|
33
|
+
'page.eftpos.text.device.list': string;
|
|
34
|
+
'page.eftpos.text.device.name': string;
|
|
35
|
+
'page.eftpos.text.sucahrge': string;
|
|
36
|
+
'page.eftpos.text.paired': string;
|
|
37
|
+
'page.eftpos.text.unpaired': string;
|
|
38
|
+
'page.eftpos.text.repair': string;
|
|
39
|
+
'page.eftpos.text.edit': string;
|
|
40
|
+
'page.eftpos.text.delete': string;
|
|
41
|
+
'page.eftpos.text.save': string;
|
|
42
|
+
'page.eftpos.text.confim.delete': string;
|
|
43
|
+
'page.eftpos.text.confirm_delete-message': (x: string) => string;
|
|
44
|
+
'page.eftpos.text.confim.cancel': string;
|
|
45
|
+
'page.eftpos.text.table.name': string;
|
|
46
|
+
'page.eftpos.text.table.status': string;
|
|
47
|
+
'page.eftpos.text.table.surcharge': string;
|
|
48
|
+
'page.eftpos.text.table.opeartion': string;
|
|
49
|
+
};
|
|
50
|
+
'zh-HK': {
|
|
51
|
+
'page.eftpos.text.manufacturer': string;
|
|
52
|
+
'page.eftpos.text.description': string;
|
|
53
|
+
'page.eftpos.text.status': string;
|
|
54
|
+
'page.eftpos.text.operation': string;
|
|
55
|
+
'page.eftpos.text.device': string;
|
|
56
|
+
'page.eftpos.text.device.add': (status?: string, name?: string) => string;
|
|
57
|
+
'page.eftpos.text.device.list': string;
|
|
58
|
+
'page.eftpos.text.device.name': string;
|
|
59
|
+
'page.eftpos.text.sucahrge': string;
|
|
60
|
+
'page.eftpos.text.paired': string;
|
|
61
|
+
'page.eftpos.text.unpaired': string;
|
|
62
|
+
'page.eftpos.text.repair': string;
|
|
63
|
+
'page.eftpos.text.edit': string;
|
|
64
|
+
'page.eftpos.text.delete': string;
|
|
65
|
+
'page.eftpos.text.save': string;
|
|
66
|
+
'page.eftpos.text.confim.delete': string;
|
|
67
|
+
'page.eftpos.text.confirm_delete-message': (x: string) => string;
|
|
68
|
+
'page.eftpos.text.confim.cancel': string;
|
|
69
|
+
'page.eftpos.text.table.name': string;
|
|
70
|
+
'page.eftpos.text.table.status': string;
|
|
71
|
+
'page.eftpos.text.table.surcharge': string;
|
|
72
|
+
'page.eftpos.text.table.opeartion': string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export default _default;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"en": {
|
|
3
|
+
'page.eftpos.text.manufacturer': 'Manufacturer',
|
|
4
|
+
'page.eftpos.text.description': 'Description',
|
|
5
|
+
'page.eftpos.text.status': 'status',
|
|
6
|
+
'page.eftpos.text.operation': 'Operation',
|
|
7
|
+
'page.eftpos.text.device': 'Device',
|
|
8
|
+
'page.eftpos.text.device.add': function pageEftposTextDeviceAdd(status, name) {
|
|
9
|
+
if (!name) {
|
|
10
|
+
return "Add device";
|
|
11
|
+
}
|
|
12
|
+
var action = status == "add" ? 'Add' : status == "edit" ? "Edit" : "Repair";
|
|
13
|
+
return "".concat(action, " ").concat(name, " device");
|
|
14
|
+
},
|
|
15
|
+
'page.eftpos.text.device.list': 'Device list',
|
|
16
|
+
'page.eftpos.text.device.name': 'Device name',
|
|
17
|
+
'page.eftpos.text.sucahrge': 'Sucahrge',
|
|
18
|
+
'page.eftpos.text.paired': 'Paired',
|
|
19
|
+
'page.eftpos.text.unpaired': 'Unpaired',
|
|
20
|
+
'page.eftpos.text.repair': 'Repair',
|
|
21
|
+
'page.eftpos.text.edit': 'Edit',
|
|
22
|
+
'page.eftpos.text.delete': 'Delete',
|
|
23
|
+
'page.eftpos.text.save': 'Save',
|
|
24
|
+
'page.eftpos.text.confim.delete': 'Confirm delete',
|
|
25
|
+
'page.eftpos.text.confirm_delete-message': function pageEftposTextConfirm_deleteMessage(x) {
|
|
26
|
+
return "Confirm delete ".concat(x, " Device");
|
|
27
|
+
},
|
|
28
|
+
'page.eftpos.text.confim.cancel': 'Cancel',
|
|
29
|
+
'page.eftpos.text.table.name': 'Device name',
|
|
30
|
+
'page.eftpos.text.table.status': 'Status',
|
|
31
|
+
'page.eftpos.text.table.surcharge': 'Surcharge',
|
|
32
|
+
'page.eftpos.text.table.opeartion': 'Opeartion'
|
|
33
|
+
},
|
|
34
|
+
'zh-CN': {
|
|
35
|
+
'page.eftpos.text.manufacturer': '厂商',
|
|
36
|
+
'page.eftpos.text.description': '描述',
|
|
37
|
+
'page.eftpos.text.status': '状态',
|
|
38
|
+
'page.eftpos.text.operation': '操作',
|
|
39
|
+
'page.eftpos.text.device': '设备',
|
|
40
|
+
'page.eftpos.text.device.add': function pageEftposTextDeviceAdd(status, name) {
|
|
41
|
+
if (!name) {
|
|
42
|
+
return "\u6DFB\u52A0\u8BBE\u5907";
|
|
43
|
+
}
|
|
44
|
+
var action = status == "add" ? '添加' : status == "edit" ? "编辑" : "重新配置";
|
|
45
|
+
return "".concat(action, " ").concat(name, " \u8BBE\u5907");
|
|
46
|
+
},
|
|
47
|
+
'page.eftpos.text.device.list': '设备列表',
|
|
48
|
+
'page.eftpos.text.device.name': '设备名称',
|
|
49
|
+
'page.eftpos.text.sucahrge': '支付手续费',
|
|
50
|
+
'page.eftpos.text.paired': '已配对',
|
|
51
|
+
'page.eftpos.text.unpaired': '未配对',
|
|
52
|
+
'page.eftpos.text.repair': '重新配置',
|
|
53
|
+
'page.eftpos.text.edit': '编辑',
|
|
54
|
+
'page.eftpos.text.delete': '删除',
|
|
55
|
+
'page.eftpos.text.save': '保存',
|
|
56
|
+
'page.eftpos.text.confim.delete': '确认删除',
|
|
57
|
+
'page.eftpos.text.confirm_delete-message': function pageEftposTextConfirm_deleteMessage(x) {
|
|
58
|
+
return "\u786E\u8BA4\u5220\u9664 ".concat(x, " \u8BBE\u5907\u5417\uFF1F");
|
|
59
|
+
},
|
|
60
|
+
'page.eftpos.text.confim.cancel': '取消',
|
|
61
|
+
'page.eftpos.text.table.name': '设备名称',
|
|
62
|
+
'page.eftpos.text.table.status': '状态',
|
|
63
|
+
'page.eftpos.text.table.surcharge': '支付手续费',
|
|
64
|
+
'page.eftpos.text.table.opeartion': '操作'
|
|
65
|
+
},
|
|
66
|
+
'zh-HK': {
|
|
67
|
+
'page.eftpos.text.manufacturer': '廠商',
|
|
68
|
+
'page.eftpos.text.description': '描述',
|
|
69
|
+
'page.eftpos.text.status': '狀態',
|
|
70
|
+
'page.eftpos.text.operation': '操作',
|
|
71
|
+
'page.eftpos.text.device': '設備',
|
|
72
|
+
'page.eftpos.text.device.add': function pageEftposTextDeviceAdd(status, name) {
|
|
73
|
+
if (!name) {
|
|
74
|
+
return "\u6DFB\u52A0\u8A2D\u5099";
|
|
75
|
+
}
|
|
76
|
+
var action = status == "add" ? '添加' : status == "edit" ? "編輯" : "重新配置";
|
|
77
|
+
return "".concat(action, " ").concat(name, " \u8A2D\u5099");
|
|
78
|
+
},
|
|
79
|
+
'page.eftpos.text.device.list': '設備列表',
|
|
80
|
+
'page.eftpos.text.device.name': '設備名稱',
|
|
81
|
+
'page.eftpos.text.sucahrge': '支付手續費',
|
|
82
|
+
'page.eftpos.text.paired': '已配對',
|
|
83
|
+
'page.eftpos.text.unpaired': '未配對',
|
|
84
|
+
'page.eftpos.text.repair': '重新配置',
|
|
85
|
+
'page.eftpos.text.edit': '編輯',
|
|
86
|
+
'page.eftpos.text.delete': '删除',
|
|
87
|
+
'page.eftpos.text.save': '保存',
|
|
88
|
+
'page.eftpos.text.confim.delete': '確認刪除',
|
|
89
|
+
'page.eftpos.text.confirm_delete-message': function pageEftposTextConfirm_deleteMessage(x) {
|
|
90
|
+
return "\u78BA\u8A8D\u522A\u9664 ".concat(x, " \u8A2D\u5099\u55CE\uFF1F");
|
|
91
|
+
},
|
|
92
|
+
'page.eftpos.text.confim.cancel': '取消',
|
|
93
|
+
'page.eftpos.text.table.name': '設備名稱',
|
|
94
|
+
'page.eftpos.text.table.status': '狀態',
|
|
95
|
+
'page.eftpos.text.table.surcharge': '支付手續費',
|
|
96
|
+
'page.eftpos.text.table.opeartion': '操作'
|
|
97
|
+
}
|
|
98
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DeviceProp } from "./const";
|
|
3
|
+
interface PosProps {
|
|
4
|
+
eftposName: string;
|
|
5
|
+
formItemList: any[];
|
|
6
|
+
onSave: (device: DeviceProp) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const PosForm: ({ eftposName, onSave, formItemList }: PosProps) => React.JSX.Element;
|
|
9
|
+
export default PosForm;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Form, Button, Typography } from "antd";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { getDefaultValue } from "./const";
|
|
4
|
+
import { locales } from "@pisell/utils";
|
|
5
|
+
import FormItem from "./form";
|
|
6
|
+
var Title = Typography.Title;
|
|
7
|
+
var PosForm = function PosForm(_ref) {
|
|
8
|
+
var eftposName = _ref.eftposName,
|
|
9
|
+
onSave = _ref.onSave,
|
|
10
|
+
formItemList = _ref.formItemList;
|
|
11
|
+
var initialValues = getDefaultValue(formItemList);
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "pisell-lowcode__pos-form-box"
|
|
14
|
+
}, /*#__PURE__*/React.createElement(Title, {
|
|
15
|
+
level: 4,
|
|
16
|
+
className: "pisell-lowcode__pos-title"
|
|
17
|
+
}, eftposName, " Apikey"), /*#__PURE__*/React.createElement(Form, {
|
|
18
|
+
layout: "vertical",
|
|
19
|
+
onFinish: onSave,
|
|
20
|
+
initialValues: initialValues,
|
|
21
|
+
className: "pisell-lowcode__pos-form"
|
|
22
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: "pisell-lowcode__pos-form-content"
|
|
24
|
+
}, /*#__PURE__*/React.createElement(FormItem, {
|
|
25
|
+
formItemList: formItemList
|
|
26
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: "pisell-lowcode__pos-form-btn"
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Button, {
|
|
29
|
+
htmlType: "submit",
|
|
30
|
+
block: true
|
|
31
|
+
}, locales.getText("page.eftpos.text.save"))))));
|
|
32
|
+
};
|
|
33
|
+
export default PosForm;
|