@pisell/private-materials 3.0.133 → 3.0.134
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 +5 -5
- package/build/lowcode/render/default/view.js +13 -11
- package/build/lowcode/view.js +12 -10
- package/es/components/eftpos/const.d.ts +1 -1
- package/es/components/eftpos/const.js +85 -37
- package/es/components/eftpos/form/index.d.ts +1 -1
- package/es/components/eftpos/form/index.js +51 -23
- package/es/components/eftpos/index.d.ts +3 -3
- package/es/components/eftpos/index.js +118 -69
- package/lib/components/eftpos/const.d.ts +1 -1
- package/lib/components/eftpos/const.js +29 -25
- package/lib/components/eftpos/form/index.d.ts +1 -1
- package/lib/components/eftpos/form/index.js +16 -1
- package/lib/components/eftpos/index.d.ts +3 -3
- package/lib/components/eftpos/index.js +30 -15
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
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
2
|
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
3
|
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
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
6
|
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); }
|
|
7
|
+
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; }
|
|
8
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
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
10
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -13,9 +13,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
13
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
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
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
-
import React, { useState, useRef, useEffect } from
|
|
17
|
-
import { Spin } from
|
|
18
|
-
import { locales } from
|
|
16
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
17
|
+
import { Spin } from 'antd';
|
|
18
|
+
import { locales } from '@pisell/utils';
|
|
19
19
|
import Table from "./table";
|
|
20
20
|
import Device from "./device";
|
|
21
21
|
import Pos from "./pos";
|
|
@@ -28,9 +28,9 @@ var PosTabs = function PosTabs(_ref) {
|
|
|
28
28
|
PosForm = _ref.PosForm,
|
|
29
29
|
style = _ref.style;
|
|
30
30
|
useEffect(function () {
|
|
31
|
-
document.body.id =
|
|
31
|
+
document.body.id = 'body';
|
|
32
32
|
}, []);
|
|
33
|
-
var _useState = useState(locales.getText(
|
|
33
|
+
var _useState = useState(locales.getText('page.eftpos.text.device')),
|
|
34
34
|
_useState2 = _slicedToArray(_useState, 2),
|
|
35
35
|
active = _useState2[0],
|
|
36
36
|
setActive = _useState2[1];
|
|
@@ -43,26 +43,26 @@ var PosTabs = function PosTabs(_ref) {
|
|
|
43
43
|
key && setActive(key);
|
|
44
44
|
};
|
|
45
45
|
var items = [{
|
|
46
|
-
key: locales.getText(
|
|
46
|
+
key: locales.getText('page.eftpos.text.device'),
|
|
47
47
|
label: function label(active) {
|
|
48
48
|
return /*#__PURE__*/React.createElement("div", {
|
|
49
49
|
className: "pisell-lowcode__pos_tabs-tab-label"
|
|
50
50
|
}, /*#__PURE__*/React.createElement("div", {
|
|
51
|
-
className: "pisell-lowcode__pos_circle ".concat(active ?
|
|
51
|
+
className: "pisell-lowcode__pos_circle ".concat(active ? 'active' : '')
|
|
52
52
|
}), /*#__PURE__*/React.createElement("span", {
|
|
53
|
-
className: "pisell-lowcode__pos_tabs-tab-label-tlt ".concat(active ?
|
|
53
|
+
className: "pisell-lowcode__pos_tabs-tab-label-tlt ".concat(active ? 'active' : '')
|
|
54
54
|
}, "device"));
|
|
55
55
|
},
|
|
56
56
|
children: Table
|
|
57
57
|
}, {
|
|
58
|
-
key:
|
|
58
|
+
key: 'apiKey',
|
|
59
59
|
label: function label(active) {
|
|
60
60
|
return /*#__PURE__*/React.createElement("div", {
|
|
61
61
|
className: "pisell-lowcode__pos_tabs-tab-label"
|
|
62
62
|
}, /*#__PURE__*/React.createElement("div", {
|
|
63
|
-
className: "pisell-lowcode__pos_circle ".concat(active ?
|
|
63
|
+
className: "pisell-lowcode__pos_circle ".concat(active ? 'active' : '')
|
|
64
64
|
}), /*#__PURE__*/React.createElement("span", {
|
|
65
|
-
className: "pisell-lowcode__pos_tabs-tab-label-tlt ".concat(active ?
|
|
65
|
+
className: "pisell-lowcode__pos_tabs-tab-label-tlt ".concat(active ? 'active' : '')
|
|
66
66
|
}, "apiKey"));
|
|
67
67
|
},
|
|
68
68
|
children: PosForm
|
|
@@ -76,7 +76,7 @@ var PosTabs = function PosTabs(_ref) {
|
|
|
76
76
|
return /*#__PURE__*/React.createElement("div", {
|
|
77
77
|
key: item.key,
|
|
78
78
|
style: {
|
|
79
|
-
display:
|
|
79
|
+
display: 'contents'
|
|
80
80
|
},
|
|
81
81
|
"data-key": item.key,
|
|
82
82
|
onClick: onClick
|
|
@@ -85,12 +85,12 @@ var PosTabs = function PosTabs(_ref) {
|
|
|
85
85
|
className: "pisell-lowcode__pos_tab-content"
|
|
86
86
|
}, items.map(function (item) {
|
|
87
87
|
return /*#__PURE__*/React.createElement("div", {
|
|
88
|
-
className: "pisell-lowcode__pos_tabs-tabpane ".concat(active === item.key ?
|
|
88
|
+
className: "pisell-lowcode__pos_tabs-tabpane ".concat(active === item.key ? 'active' : ''),
|
|
89
89
|
key: item.key
|
|
90
90
|
}, item.children);
|
|
91
91
|
})));
|
|
92
92
|
};
|
|
93
|
-
locales.init(localeTexts, localStorage.getItem(
|
|
93
|
+
locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
|
|
94
94
|
export default (function (props) {
|
|
95
95
|
var name = props.name,
|
|
96
96
|
zIndex = props.zIndex,
|
|
@@ -104,7 +104,7 @@ export default (function (props) {
|
|
|
104
104
|
onEdit = props.onEdit,
|
|
105
105
|
getPosComm = props.getPosComm,
|
|
106
106
|
savePos = props.savePos;
|
|
107
|
-
var _useState3 = useState(
|
|
107
|
+
var _useState3 = useState('list'),
|
|
108
108
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
109
109
|
page = _useState4[0],
|
|
110
110
|
setPage = _useState4[1];
|
|
@@ -117,7 +117,7 @@ export default (function (props) {
|
|
|
117
117
|
status = _useState8[0],
|
|
118
118
|
setStatus = _useState8[1];
|
|
119
119
|
var tableRef = useRef();
|
|
120
|
-
var deviceIdRef = useRef(
|
|
120
|
+
var deviceIdRef = useRef('');
|
|
121
121
|
var _useState9 = useState([]),
|
|
122
122
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
123
123
|
deviceItemList = _useState10[0],
|
|
@@ -129,84 +129,133 @@ export default (function (props) {
|
|
|
129
129
|
var onDelDevice = function onDelDevice(id) {
|
|
130
130
|
return onDel(id);
|
|
131
131
|
};
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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 () {
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @title: 编辑设备
|
|
135
|
+
* @param {any} device 设备信息
|
|
136
|
+
* @Author: hongbing.wang
|
|
137
|
+
* @Date: 2024-08-20 11:20
|
|
138
|
+
*/
|
|
139
|
+
var onEditDevice = /*#__PURE__*/function () {
|
|
168
140
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(device) {
|
|
141
|
+
var _field, _list, field, list;
|
|
169
142
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
170
143
|
while (1) switch (_context.prev = _context.next) {
|
|
144
|
+
case 0:
|
|
145
|
+
if (!device) {
|
|
146
|
+
_context.next = 10;
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
deviceIdRef.current = device.id;
|
|
150
|
+
_field = getField(type, DeviceEnum.Edit);
|
|
151
|
+
_context.next = 5;
|
|
152
|
+
return getCommByFields({
|
|
153
|
+
field: _field,
|
|
154
|
+
value: device,
|
|
155
|
+
getComm: getComm
|
|
156
|
+
});
|
|
157
|
+
case 5:
|
|
158
|
+
_list = _context.sent;
|
|
159
|
+
setStatus(DeviceEnum.Edit);
|
|
160
|
+
setDeviceCommList(_list);
|
|
161
|
+
setPage('edit');
|
|
162
|
+
return _context.abrupt("return");
|
|
163
|
+
case 10:
|
|
164
|
+
// 新增
|
|
165
|
+
setStatus(DeviceEnum.Add);
|
|
166
|
+
field = getField(type);
|
|
167
|
+
_context.next = 14;
|
|
168
|
+
return getCommByFields({
|
|
169
|
+
field: field,
|
|
170
|
+
getComm: getComm
|
|
171
|
+
});
|
|
172
|
+
case 14:
|
|
173
|
+
list = _context.sent;
|
|
174
|
+
console.log(list);
|
|
175
|
+
setDeviceCommList(list);
|
|
176
|
+
setPage('edit');
|
|
177
|
+
case 18:
|
|
178
|
+
case "end":
|
|
179
|
+
return _context.stop();
|
|
180
|
+
}
|
|
181
|
+
}, _callee);
|
|
182
|
+
}));
|
|
183
|
+
return function onEditDevice(_x2) {
|
|
184
|
+
return _ref2.apply(this, arguments);
|
|
185
|
+
};
|
|
186
|
+
}();
|
|
187
|
+
var onRepair = /*#__PURE__*/function () {
|
|
188
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(device) {
|
|
189
|
+
var field, list;
|
|
190
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
191
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
192
|
+
case 0:
|
|
193
|
+
field = getField(type, DeviceEnum.Repair);
|
|
194
|
+
_context2.next = 3;
|
|
195
|
+
return getCommByFields({
|
|
196
|
+
field: field,
|
|
197
|
+
value: device,
|
|
198
|
+
getComm: getComm
|
|
199
|
+
});
|
|
200
|
+
case 3:
|
|
201
|
+
list = _context2.sent;
|
|
202
|
+
deviceIdRef.current = device.id;
|
|
203
|
+
setDeviceCommList(list);
|
|
204
|
+
setStatus(DeviceEnum.Repair);
|
|
205
|
+
setPage('edit');
|
|
206
|
+
case 8:
|
|
207
|
+
case "end":
|
|
208
|
+
return _context2.stop();
|
|
209
|
+
}
|
|
210
|
+
}, _callee2);
|
|
211
|
+
}));
|
|
212
|
+
return function onRepair(_x3) {
|
|
213
|
+
return _ref3.apply(this, arguments);
|
|
214
|
+
};
|
|
215
|
+
}();
|
|
216
|
+
var onSave = /*#__PURE__*/function () {
|
|
217
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(device) {
|
|
218
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
219
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
171
220
|
case 0:
|
|
172
221
|
setLoading(true);
|
|
173
|
-
|
|
222
|
+
_context3.next = 3;
|
|
174
223
|
return onEdit(_objectSpread(_objectSpread({}, device), {}, {
|
|
175
224
|
type: type
|
|
176
|
-
}), status ||
|
|
225
|
+
}), status || 'add').catch(function () {
|
|
177
226
|
setLoading(false);
|
|
178
227
|
});
|
|
179
228
|
case 3:
|
|
180
229
|
setLoading(false);
|
|
181
|
-
|
|
230
|
+
_context3.next = 6;
|
|
182
231
|
return tableRef.current.loadData();
|
|
183
232
|
case 6:
|
|
184
|
-
setPage(
|
|
233
|
+
setPage('list');
|
|
185
234
|
case 7:
|
|
186
235
|
case "end":
|
|
187
|
-
return
|
|
236
|
+
return _context3.stop();
|
|
188
237
|
}
|
|
189
|
-
},
|
|
238
|
+
}, _callee3);
|
|
190
239
|
}));
|
|
191
|
-
return function onSave(
|
|
192
|
-
return
|
|
240
|
+
return function onSave(_x4) {
|
|
241
|
+
return _ref4.apply(this, arguments);
|
|
193
242
|
};
|
|
194
243
|
}();
|
|
195
244
|
var onSavePos = function onSavePos(pos) {
|
|
196
|
-
if (typeof savePos ===
|
|
245
|
+
if (typeof savePos === 'function') {
|
|
197
246
|
savePos(pos);
|
|
198
247
|
}
|
|
199
248
|
};
|
|
200
249
|
var onBack = function onBack() {
|
|
201
|
-
setPage(
|
|
250
|
+
setPage('list');
|
|
202
251
|
};
|
|
203
252
|
useEffect(function () {
|
|
204
|
-
if (typeof getPosComm ===
|
|
253
|
+
if (typeof getPosComm === 'function') {
|
|
205
254
|
setPosCommList(getPosComm(type));
|
|
206
255
|
}
|
|
207
256
|
}, [type, getPosComm]);
|
|
208
257
|
useEffect(function () {
|
|
209
|
-
setPage(
|
|
258
|
+
setPage('list');
|
|
210
259
|
}, [type]);
|
|
211
260
|
if (type === Eftpos.Stripe) {
|
|
212
261
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PosTabs, {
|
|
@@ -227,9 +276,9 @@ export default (function (props) {
|
|
|
227
276
|
formItemList: posItemList
|
|
228
277
|
})
|
|
229
278
|
}), /*#__PURE__*/React.createElement(Drawer, {
|
|
230
|
-
open: page ===
|
|
279
|
+
open: page === 'edit',
|
|
231
280
|
onClose: onBack,
|
|
232
|
-
title: locales.getText(
|
|
281
|
+
title: locales.getText('page.eftpos.text.device.add')(status, name),
|
|
233
282
|
titleNoWrap: true,
|
|
234
283
|
zIndex: zIndex || 9999,
|
|
235
284
|
destroyOnClose: true,
|
|
@@ -255,9 +304,9 @@ export default (function (props) {
|
|
|
255
304
|
onEdit: onEditDevice,
|
|
256
305
|
key: "table".concat(type)
|
|
257
306
|
}), /*#__PURE__*/React.createElement(Drawer, {
|
|
258
|
-
open: page ===
|
|
307
|
+
open: page === 'edit',
|
|
259
308
|
onClose: onBack,
|
|
260
|
-
title: locales.getText(
|
|
309
|
+
title: locales.getText('page.eftpos.text.device.add')(status, name),
|
|
261
310
|
titleNoWrap: true,
|
|
262
311
|
zIndex: zIndex || 9999,
|
|
263
312
|
destroyOnClose: true,
|
|
@@ -63,41 +63,45 @@ var getDefaultValue = (list) => {
|
|
|
63
63
|
};
|
|
64
64
|
}, {});
|
|
65
65
|
};
|
|
66
|
-
function getCommByFields({
|
|
66
|
+
async function getCommByFields({
|
|
67
67
|
field,
|
|
68
68
|
value,
|
|
69
69
|
name = [],
|
|
70
70
|
getComm
|
|
71
71
|
}) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
const result = await Promise.all(
|
|
73
|
+
field.map(async (item) => {
|
|
74
|
+
if (typeof item === "string") {
|
|
75
|
+
const commConfig = await getComm(
|
|
76
|
+
value ? { field: item, value: value[item] } : { field: item },
|
|
77
|
+
value
|
|
78
|
+
);
|
|
79
|
+
if (!commConfig) {
|
|
80
|
+
return void 0;
|
|
81
|
+
}
|
|
82
|
+
const ComponentName = commConfig.Component;
|
|
83
|
+
const helpFn = import_form.helpMapping[ComponentName];
|
|
84
|
+
if (helpFn) {
|
|
85
|
+
return helpFn.getCommName(commConfig, name);
|
|
86
|
+
}
|
|
87
|
+
commConfig.__sourceName = commConfig.name;
|
|
88
|
+
commConfig.name = name.length > 0 ? [...name, commConfig.name] : commConfig.name;
|
|
89
|
+
return commConfig;
|
|
80
90
|
}
|
|
81
|
-
const
|
|
82
|
-
const helpFn = import_form.helpMapping[ComponentName];
|
|
83
|
-
if (helpFn) {
|
|
84
|
-
return helpFn.getCommName(commConfig, name);
|
|
85
|
-
}
|
|
86
|
-
commConfig.__sourceName = commConfig.name;
|
|
87
|
-
commConfig.name = name.length > 0 ? [...name, commConfig.name] : commConfig.name;
|
|
88
|
-
return commConfig;
|
|
89
|
-
}
|
|
90
|
-
return {
|
|
91
|
-
name: name.length > 0 ? [...name, item.name] : item.name,
|
|
92
|
-
__sourceName: item.name,
|
|
93
|
-
children: getCommByFields({
|
|
91
|
+
const children = await getCommByFields({
|
|
94
92
|
field: item.children,
|
|
95
93
|
value,
|
|
96
94
|
name: [...name || [], item.name],
|
|
97
95
|
getComm
|
|
98
|
-
})
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
});
|
|
97
|
+
return {
|
|
98
|
+
name: name.length > 0 ? [...name, item.name] : item.name,
|
|
99
|
+
__sourceName: item.name,
|
|
100
|
+
children
|
|
101
|
+
};
|
|
102
|
+
})
|
|
103
|
+
);
|
|
104
|
+
return result.filter(Boolean);
|
|
101
105
|
}
|
|
102
106
|
// Annotate the CommonJS export names for ESM import in node:
|
|
103
107
|
0 && (module.exports = {
|
|
@@ -40,7 +40,22 @@ var Mapping = {
|
|
|
40
40
|
Input: import_antd.Input,
|
|
41
41
|
InputNumber: import_antd.InputNumber,
|
|
42
42
|
Checkbox: import_antd.Checkbox,
|
|
43
|
-
"Checkbox.Group":
|
|
43
|
+
"Checkbox.Group": ({
|
|
44
|
+
direction,
|
|
45
|
+
options,
|
|
46
|
+
...props
|
|
47
|
+
}) => {
|
|
48
|
+
if (direction === "vertical") {
|
|
49
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Checkbox.Group, { ...props }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { direction }, options == null ? void 0 : options.map((item) => {
|
|
50
|
+
if (typeof item === "object") {
|
|
51
|
+
const { label, value, ...other } = item;
|
|
52
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Checkbox, { ...other, value, key: `${item.value}` }, label);
|
|
53
|
+
}
|
|
54
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Checkbox, { value: item, key: `${item}` }, item);
|
|
55
|
+
})));
|
|
56
|
+
}
|
|
57
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Checkbox.Group, { ...props, options });
|
|
58
|
+
},
|
|
44
59
|
Radio: import_antd.Radio,
|
|
45
60
|
"Radio.Group": ({
|
|
46
61
|
direction,
|
|
@@ -144,25 +144,26 @@ var eftpos_default = (props) => {
|
|
|
144
144
|
const onDelDevice = (id) => {
|
|
145
145
|
return onDel(id);
|
|
146
146
|
};
|
|
147
|
-
const onEditDevice = (device) => {
|
|
148
|
-
if (
|
|
149
|
-
setStatus(import_const.DeviceEnum.Add);
|
|
150
|
-
const field = getField(type);
|
|
151
|
-
const list = (0, import_const.getCommByFields)({ field, getComm });
|
|
152
|
-
console.log(list);
|
|
153
|
-
setDeviceCommList(list);
|
|
154
|
-
} else {
|
|
147
|
+
const onEditDevice = async (device) => {
|
|
148
|
+
if (device) {
|
|
155
149
|
deviceIdRef.current = device.id;
|
|
156
|
-
const
|
|
157
|
-
const
|
|
150
|
+
const field2 = getField(type, import_const.DeviceEnum.Edit);
|
|
151
|
+
const list2 = await (0, import_const.getCommByFields)({ field: field2, value: device, getComm });
|
|
158
152
|
setStatus(import_const.DeviceEnum.Edit);
|
|
159
|
-
setDeviceCommList(
|
|
153
|
+
setDeviceCommList(list2);
|
|
154
|
+
setPage("edit");
|
|
155
|
+
return;
|
|
160
156
|
}
|
|
157
|
+
setStatus(import_const.DeviceEnum.Add);
|
|
158
|
+
const field = getField(type);
|
|
159
|
+
const list = await (0, import_const.getCommByFields)({ field, getComm });
|
|
160
|
+
console.log(list);
|
|
161
|
+
setDeviceCommList(list);
|
|
161
162
|
setPage("edit");
|
|
162
163
|
};
|
|
163
|
-
const onRepair = (device) => {
|
|
164
|
+
const onRepair = async (device) => {
|
|
164
165
|
const field = getField(type, import_const.DeviceEnum.Repair);
|
|
165
|
-
const list = (0, import_const.getCommByFields)({ field, value: device, getComm });
|
|
166
|
+
const list = await (0, import_const.getCommByFields)({ field, value: device, getComm });
|
|
166
167
|
deviceIdRef.current = device.id;
|
|
167
168
|
setDeviceCommList(list);
|
|
168
169
|
setStatus(import_const.DeviceEnum.Repair);
|
|
@@ -238,7 +239,14 @@ var eftpos_default = (props) => {
|
|
|
238
239
|
spinning: loading,
|
|
239
240
|
wrapperClassName: "pisell-lowcode__pos_box"
|
|
240
241
|
},
|
|
241
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
242
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
243
|
+
import_device.default,
|
|
244
|
+
{
|
|
245
|
+
formItemList: deviceItemList,
|
|
246
|
+
onSave,
|
|
247
|
+
key: `posdevice${type}`
|
|
248
|
+
}
|
|
249
|
+
)
|
|
242
250
|
)
|
|
243
251
|
));
|
|
244
252
|
}
|
|
@@ -273,7 +281,14 @@ var eftpos_default = (props) => {
|
|
|
273
281
|
spinning: loading,
|
|
274
282
|
wrapperClassName: "pisell-lowcode__pos_box"
|
|
275
283
|
},
|
|
276
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
284
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
285
|
+
import_device.default,
|
|
286
|
+
{
|
|
287
|
+
formItemList: deviceItemList,
|
|
288
|
+
onSave,
|
|
289
|
+
key: `device${type}`
|
|
290
|
+
}
|
|
291
|
+
)
|
|
277
292
|
)
|
|
278
293
|
));
|
|
279
294
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.134",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
62
|
"@pisell/utils": "1.0.42",
|
|
63
|
-
"@pisell/date-picker": "1.0.100",
|
|
64
63
|
"@pisell/materials": "3.0.47",
|
|
65
|
-
"@pisell/icon": "0.0.11"
|
|
64
|
+
"@pisell/icon": "0.0.11",
|
|
65
|
+
"@pisell/date-picker": "1.0.100"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|