@pisell/private-materials 3.3.23 → 3.3.25
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/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/footer/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +5 -4
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/single/index.js +64 -15
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/pet/index.js +5 -2
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/index.js +39 -15
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/utils.d.ts +4 -0
- package/es/components/booking/info/utils.js +18 -1
- package/es/components/booking/info2/service/addService/index.d.ts +0 -1
- package/es/components/booking/info2/service/editService/index.js +25 -2
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.js +8 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/productSelect/components/productGroup/index.less +1 -1
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/hooks/useComponents.js +1 -1
- package/es/utils/date.d.ts +11 -0
- package/es/utils/date.js +49 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +6 -9
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/single/index.js +28 -6
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/pet/index.js +5 -2
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/index.js +32 -10
- package/lib/components/booking/info/utils.d.ts +4 -0
- package/lib/components/booking/info/utils.js +17 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info2/service/editService/index.js +28 -4
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.js +8 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/productSelect/components/productGroup/index.less +1 -1
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/utils/date.d.ts +11 -0
- package/lib/utils/date.js +57 -0
- package/package.json +3 -3
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
function _typeof(
|
|
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 e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
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
3
|
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); } }
|
|
4
4
|
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); }); }; }
|
|
5
5
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
6
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
7
7
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
8
|
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; }
|
|
9
|
-
function _toPropertyKey(
|
|
10
|
-
function _toPrimitive(
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
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); }
|
|
11
11
|
import { locales } from "@pisell/utils";
|
|
12
12
|
var Request = /*#__PURE__*/function () {
|
|
13
13
|
function Request() {
|
|
@@ -3,7 +3,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
3
3
|
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."); }
|
|
4
4
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
5
|
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; }
|
|
6
|
-
function _iterableToArrayLimit(
|
|
6
|
+
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; } }
|
|
7
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
8
|
import React, { useState, useMemo } from "react";
|
|
9
9
|
import classNames from "classnames";
|
|
@@ -60,7 +60,7 @@ var SelectModal = function SelectModal(props) {
|
|
|
60
60
|
} : undefined);
|
|
61
61
|
}, [search, dataSource]);
|
|
62
62
|
var onSelect = function onSelect(item) {
|
|
63
|
-
onChange === null || onChange === void 0
|
|
63
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(changeArray(_value, item, "id"));
|
|
64
64
|
onClose();
|
|
65
65
|
};
|
|
66
66
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
addWalletCard: any;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
walletDetailState: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
setup?: 'menu' | 'list' | 'detail' | string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
7
|
+
state: RechargeState;
|
|
8
|
+
} & {
|
|
9
|
+
dispatch: (params: {
|
|
10
|
+
type: string;
|
|
11
|
+
payload: any;
|
|
12
|
+
}) => void;
|
|
13
|
+
}>;
|
|
14
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
selectedGiftOptionId: string | null;
|
|
4
|
+
cardList: Array<{
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
price: number;
|
|
8
|
+
}>;
|
|
9
|
+
selectedItem: {
|
|
10
|
+
id?: string;
|
|
11
|
+
gift_price?: number;
|
|
12
|
+
price?: number;
|
|
13
|
+
name?: string;
|
|
14
|
+
variant_id?: string;
|
|
15
|
+
};
|
|
16
|
+
productId?: string;
|
|
17
|
+
detailId?: string;
|
|
18
|
+
total: string | number;
|
|
19
|
+
rechargeModalOpen: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
22
|
+
state: RechargeState;
|
|
23
|
+
} & {
|
|
24
|
+
dispatch: (params: {
|
|
25
|
+
type: string;
|
|
26
|
+
payload: any;
|
|
27
|
+
}) => void;
|
|
28
|
+
}>;
|
|
29
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: 0;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IWalletListItemProps } from './serve';
|
|
2
3
|
export interface WalletCardItemProps {
|
|
3
4
|
id: string;
|
|
@@ -26,4 +27,11 @@ export interface WalletListProps {
|
|
|
26
27
|
currentSearchListItemCode?: string;
|
|
27
28
|
[key: string]: any;
|
|
28
29
|
}
|
|
29
|
-
export declare const Provider: any, Context:
|
|
30
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
31
|
+
global_wallet: WalletListProps;
|
|
32
|
+
} & {
|
|
33
|
+
dispatch: (params: {
|
|
34
|
+
type: string;
|
|
35
|
+
payload: any;
|
|
36
|
+
}) => void;
|
|
37
|
+
}>;
|
|
@@ -8,7 +8,7 @@ var useComponents = function useComponents(params) {
|
|
|
8
8
|
var _utils$getComponents;
|
|
9
9
|
var _ref = appHelper || {},
|
|
10
10
|
utils = _ref.utils;
|
|
11
|
-
return (utils === null || utils === void 0
|
|
11
|
+
return (utils === null || utils === void 0 ? void 0 : (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
|
|
12
12
|
}, [components]);
|
|
13
13
|
return Cpt;
|
|
14
14
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 格式化时间
|
|
3
|
+
* @description:
|
|
4
|
+
* @param {Moment} date 时间
|
|
5
|
+
* @param {string} cnFormat 中文
|
|
6
|
+
* @param {string} enFormat 英文
|
|
7
|
+
* @return {*}
|
|
8
|
+
* @Author: Wzw
|
|
9
|
+
* @Date: 2022-07-28 11:57
|
|
10
|
+
*/
|
|
11
|
+
export declare const formatDate: (date: any, cnFormat?: string, enFormat?: string) => string;
|
package/es/utils/date.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
|
+
import { getLocale } from "./locales";
|
|
3
|
+
/**
|
|
4
|
+
* @title: 格式化时间
|
|
5
|
+
* @description:
|
|
6
|
+
* @param {Moment} date 时间
|
|
7
|
+
* @param {string} cnFormat 中文
|
|
8
|
+
* @param {string} enFormat 英文
|
|
9
|
+
* @return {*}
|
|
10
|
+
* @Author: Wzw
|
|
11
|
+
* @Date: 2022-07-28 11:57
|
|
12
|
+
*/
|
|
13
|
+
export var formatDate = function formatDate(date, cnFormat, enFormat) {
|
|
14
|
+
var _cnFormat = cnFormat || 'LL';
|
|
15
|
+
var _enFormat = enFormat || _cnFormat;
|
|
16
|
+
// 澳大利亚
|
|
17
|
+
// ll 20 Jul 2022
|
|
18
|
+
// LL 20 July 2022
|
|
19
|
+
// D MMM 20 July
|
|
20
|
+
// D MMMM 20 July
|
|
21
|
+
|
|
22
|
+
// 中国
|
|
23
|
+
// ll 2022年07月20日
|
|
24
|
+
// LL 2022年07月20日
|
|
25
|
+
// MMM Do 7月20日
|
|
26
|
+
// MMMM Do 07月20日
|
|
27
|
+
// 时分秒
|
|
28
|
+
// hh:mm:ss 05:01:41
|
|
29
|
+
|
|
30
|
+
// 一天内的时间段: Sunday, 6 July ⋅ 10:00 – 11:30
|
|
31
|
+
var format = _cnFormat;
|
|
32
|
+
var dayjs_local = 'zh-cn';
|
|
33
|
+
var umi_locale = getLocale();
|
|
34
|
+
// 中文环境切换moment语言为中文, 其他环境默认澳大利亚
|
|
35
|
+
if (umi_locale !== 'zh-CN' && umi_locale !== 'zh-HK') {
|
|
36
|
+
dayjs_local = 'en-au';
|
|
37
|
+
format = _enFormat;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// 繁体
|
|
41
|
+
if (umi_locale === 'zh-TW') {
|
|
42
|
+
dayjs_local = 'zh-tw';
|
|
43
|
+
format = _cnFormat;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// 设置moment语言
|
|
47
|
+
dayjs.locale(dayjs_local);
|
|
48
|
+
return dayjs(date).format(format);
|
|
49
|
+
};
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -41,16 +41,16 @@ var import_react = __toESM(require("react"));
|
|
|
41
41
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
42
42
|
var import_addons = require("../../addons");
|
|
43
43
|
var import_utils2 = require("../../info/service2/utils");
|
|
44
|
-
var import_utils3 = require("../../info/utils");
|
|
45
44
|
var import_serve = require("../../info2/serve");
|
|
46
45
|
var import_AppointmentProductModal = __toESM(require("./AppointmentProductModal"));
|
|
47
46
|
var import_FooterMenus = __toESM(require("./FooterMenus"));
|
|
48
47
|
var import_amount = require("./amount");
|
|
49
48
|
var import_index = require("./index.less");
|
|
50
49
|
var import_serve2 = require("./serve");
|
|
51
|
-
var
|
|
50
|
+
var import_utils3 = require("./utils");
|
|
52
51
|
var import_voucher = __toESM(require("../voucher"));
|
|
53
52
|
var import__ = require("../../../../index");
|
|
53
|
+
var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
|
|
54
54
|
var Footer = (props) => {
|
|
55
55
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
56
56
|
const { state, buttons, dispatch, source } = props;
|
|
@@ -58,6 +58,7 @@ var Footer = (props) => {
|
|
|
58
58
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
|
59
59
|
const [checkoutLoading, setCheckoutLoading] = (0, import_react.useState)(false);
|
|
60
60
|
const [isShowPaymentLink, setIsShowPaymentLink] = (0, import_react.useState)(false);
|
|
61
|
+
const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
|
|
61
62
|
const appointmentProductRef = (0, import_react.useRef)(null);
|
|
62
63
|
const context = (0, import_useEngineContext.default)();
|
|
63
64
|
const { isTerminal, interaction, store, storage, businessUtils } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
@@ -242,11 +243,7 @@ var Footer = (props) => {
|
|
|
242
243
|
}
|
|
243
244
|
};
|
|
244
245
|
const getApis = () => {
|
|
245
|
-
|
|
246
|
-
if ((0, import_utils3.isBooking4Shop)(
|
|
247
|
-
(_e2 = (_d2 = (_c2 = (_b2 = (_a2 = context.appHelper.utils.store) == null ? void 0 : _a2.getState) == null ? void 0 : _b2.call(_a2)) == null ? void 0 : _c2.global) == null ? void 0 : _d2.globalConfig) == null ? void 0 : _e2.id,
|
|
248
|
-
state.renderType
|
|
249
|
-
) || state.renderType === "dayBooking") {
|
|
246
|
+
if (isBooking4Shop || state.renderType === "dayBooking") {
|
|
250
247
|
return {
|
|
251
248
|
editBooking: import_serve.editBookings,
|
|
252
249
|
createBooking: import_serve.createBookings
|
|
@@ -274,7 +271,7 @@ var Footer = (props) => {
|
|
|
274
271
|
const isHasDayProducts = handleDaySubmit();
|
|
275
272
|
if (isHasDayProducts) return;
|
|
276
273
|
}
|
|
277
|
-
if ((0, import_utils2.getIsSubjectRequire)(state) && (0,
|
|
274
|
+
if (isBooking4Shop && (0, import_utils2.getIsSubjectRequire)(state) && (0, import_utils3.checkHolderIsError)(state)) {
|
|
278
275
|
return;
|
|
279
276
|
}
|
|
280
277
|
let _setLoading = type === "checkout" ? setCheckoutLoading : setLoading;
|
|
@@ -288,7 +285,7 @@ var Footer = (props) => {
|
|
|
288
285
|
}
|
|
289
286
|
try {
|
|
290
287
|
let callbackData = null;
|
|
291
|
-
let values = (0,
|
|
288
|
+
let values = (0, import_utils3.formatValues)({ ...state, ...saveOtherValue });
|
|
292
289
|
const api = state.bookingId ? editApi : createApi;
|
|
293
290
|
if (addonsEdit) {
|
|
294
291
|
await handleSaveAddons();
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -41,6 +41,8 @@ var import_collapsibleList = __toESM(require("../../components/collapsibleList")
|
|
|
41
41
|
var import_index = require("./index.less");
|
|
42
42
|
var import_RenderValueById = __toESM(require("./RenderValueById"));
|
|
43
43
|
var import_useComponents = __toESM(require("../../../../hooks/useComponents"));
|
|
44
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
45
|
+
var import_date = require("../../../../utils/date");
|
|
44
46
|
var queryValueById = ["checkbox", "radioButton", "select", "form_to_form"];
|
|
45
47
|
var Single = ({
|
|
46
48
|
value,
|
|
@@ -138,6 +140,29 @@ var Single = ({
|
|
|
138
140
|
},
|
|
139
141
|
[form]
|
|
140
142
|
);
|
|
143
|
+
console.log("fff", form);
|
|
144
|
+
const ignoreValidity = (0, import_react.useMemo)(() => {
|
|
145
|
+
var _a2, _b2;
|
|
146
|
+
return !((_b2 = (_a2 = form == null ? void 0 : form.form) == null ? void 0 : _a2.setting) == null ? void 0 : _b2.validity) || form.form.setting.validity.type === "no_expiry";
|
|
147
|
+
}, [form == null ? void 0 : form.form]);
|
|
148
|
+
const getExpireStatus = (expiredAt) => {
|
|
149
|
+
if (ignoreValidity || !expiredAt) return null;
|
|
150
|
+
const now = (0, import_dayjs.default)();
|
|
151
|
+
const expireDate = (0, import_dayjs.default)(expiredAt).endOf("day");
|
|
152
|
+
const diffDays = expireDate.diff(now, "day");
|
|
153
|
+
let cnDate = "YYYY-MM-DD";
|
|
154
|
+
let enDate = "DD/MM/YYYY";
|
|
155
|
+
const formattedDate = (0, import_date.formatDate)(expireDate, cnDate, enDate);
|
|
156
|
+
if (now.isAfter(expireDate)) {
|
|
157
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { color: "#999999", fontSize: "14px", lineHeight: "20px" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Tag, { color: "red", style: { borderRadius: 16, marginRight: 8 } }, import_utils.locales.getText("pisell2.text.status.expired")), import_utils.locales.getText("pisell2.text.validity.expired")(formattedDate));
|
|
158
|
+
}
|
|
159
|
+
if (diffDays < 7) {
|
|
160
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { color: "#FFA940", fontSize: "14px", lineHeight: "20px" } }, import_utils.locales.getText("pisell2.text.validity.expiring_soon")(
|
|
161
|
+
formattedDate
|
|
162
|
+
));
|
|
163
|
+
}
|
|
164
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { color: "#999999", fontSize: "14px", lineHeight: "20px" } }, import_utils.locales.getText("pisell2.text.validity.valid_through")(formattedDate));
|
|
165
|
+
};
|
|
141
166
|
const _optionRender = (item) => {
|
|
142
167
|
if (optionRender) {
|
|
143
168
|
return optionRender(item);
|
|
@@ -146,14 +171,11 @@ var Single = ({
|
|
|
146
171
|
"div",
|
|
147
172
|
{
|
|
148
173
|
style: {
|
|
149
|
-
flex: 1
|
|
150
|
-
display: "flex",
|
|
151
|
-
alignItems: "center",
|
|
152
|
-
justifyContent: "space-between"
|
|
174
|
+
flex: 1
|
|
153
175
|
}
|
|
154
176
|
},
|
|
155
|
-
item["main_field"] || item[form.option_key] || "-",
|
|
156
|
-
|
|
177
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { color: "#1B1B1B", fontSize: 16, fontWeight: 600, lineHeight: "22px" } }, item["main_field"] || item[form.option_key] || "-"),
|
|
178
|
+
/* @__PURE__ */ import_react.default.createElement("div", null, getExpireStatus(item.expired_at))
|
|
157
179
|
);
|
|
158
180
|
};
|
|
159
181
|
const _addButtonProps = (0, import_react.useMemo)(() => {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -48,6 +48,7 @@ var import_index = require("./index.less");
|
|
|
48
48
|
var import_useAddHolder = __toESM(require("../hooks/useAddHolder"));
|
|
49
49
|
var import_useGetHolderList = __toESM(require("../hooks/useGetHolderList"));
|
|
50
50
|
var import_dayjs = __toESM(require("dayjs"));
|
|
51
|
+
var import_date = require("../../../../utils/date");
|
|
51
52
|
var defaultParams = {
|
|
52
53
|
skip: 1,
|
|
53
54
|
num: 20,
|
|
@@ -428,11 +429,13 @@ var Pet = (props) => {
|
|
|
428
429
|
const now = (0, import_dayjs.default)();
|
|
429
430
|
const expireDate = (0, import_dayjs.default)(expiredAt).endOf("day");
|
|
430
431
|
const diffDays = expireDate.diff(now, "day");
|
|
431
|
-
|
|
432
|
+
let cnDate = "YYYY-MM-DD";
|
|
433
|
+
let enDate = "DD/MM/YYYY";
|
|
434
|
+
const formattedDate = (0, import_date.formatDate)(expireDate, cnDate, enDate);
|
|
432
435
|
if (now.isAfter(expireDate)) {
|
|
433
436
|
return /* @__PURE__ */ import_react.default.createElement("div", { style: { color: "#999999", fontSize: "14px", lineHeight: "20px" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Tag, { color: "red", style: { borderRadius: 16, marginRight: 8 } }, import_utils.locales.getText("pisell2.text.status.expired")), import_utils.locales.getText("pisell2.text.validity.expired")(formattedDate));
|
|
434
437
|
}
|
|
435
|
-
if (diffDays
|
|
438
|
+
if (diffDays < 7) {
|
|
436
439
|
return /* @__PURE__ */ import_react.default.createElement("div", { style: { color: "#FFA940", fontSize: "14px", lineHeight: "20px" } }, import_utils.locales.getText("pisell2.text.validity.expiring_soon")(
|
|
437
440
|
formattedDate
|
|
438
441
|
));
|
|
@@ -397,7 +397,7 @@ var Info = (_, ref) => {
|
|
|
397
397
|
isEventBookingMode
|
|
398
398
|
]);
|
|
399
399
|
const handleEdit = (0, import_ahooks.useMemoizedFn)((e) => {
|
|
400
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
400
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
|
|
401
401
|
const item = state.service.cacheItem;
|
|
402
402
|
let values = form.getFieldsValue();
|
|
403
403
|
let dayValue = {};
|
|
@@ -412,6 +412,14 @@ var Info = (_, ref) => {
|
|
|
412
412
|
dayValue.product_option = option || [];
|
|
413
413
|
}
|
|
414
414
|
const isSession = (0, import_utils3.isSessionProduct)(item);
|
|
415
|
+
const sessionValue = {};
|
|
416
|
+
if (isSession) {
|
|
417
|
+
sessionValue.startEndTime = {
|
|
418
|
+
startDate: (_f2 = item == null ? void 0 : item._extend) == null ? void 0 : _f2.start_date,
|
|
419
|
+
endDate: (_g2 = item == null ? void 0 : item._extend) == null ? void 0 : _g2.end_date,
|
|
420
|
+
duration: (_h2 = item == null ? void 0 : item._extend) == null ? void 0 : _h2.duration
|
|
421
|
+
};
|
|
422
|
+
}
|
|
415
423
|
state.action({
|
|
416
424
|
type: "pisell1.handleOpenProductModal",
|
|
417
425
|
data: {
|
|
@@ -424,15 +432,18 @@ var Info = (_, ref) => {
|
|
|
424
432
|
package: true
|
|
425
433
|
},
|
|
426
434
|
value: {
|
|
427
|
-
...((
|
|
428
|
-
...dayValue
|
|
435
|
+
...((_i2 = item._extend) == null ? void 0 : _i2.other) || {},
|
|
436
|
+
...dayValue,
|
|
437
|
+
...sessionValue
|
|
429
438
|
},
|
|
430
439
|
isOS: isSession,
|
|
431
|
-
customer_id: isDayBookingMode ? ((
|
|
440
|
+
customer_id: isDayBookingMode ? ((_k2 = (_j2 = state.client) == null ? void 0 : _j2.value) == null ? void 0 : _k2.id) || 1 : void 0
|
|
432
441
|
},
|
|
433
442
|
callback: async (e2, extension_type, detail) => {
|
|
434
443
|
var _a3, _b3, _c3, _d3;
|
|
435
444
|
const _detail = detail || item;
|
|
445
|
+
const other = JSON.parse(JSON.stringify(e2));
|
|
446
|
+
other.session = e2.session;
|
|
436
447
|
let cacheItem = {
|
|
437
448
|
..._detail,
|
|
438
449
|
product_id: item.id,
|
|
@@ -443,7 +454,7 @@ var Info = (_, ref) => {
|
|
|
443
454
|
// 将当前表单的值覆盖进去
|
|
444
455
|
...values,
|
|
445
456
|
// 覆盖选择的规格和套餐
|
|
446
|
-
other
|
|
457
|
+
other
|
|
447
458
|
},
|
|
448
459
|
new: 0
|
|
449
460
|
};
|
|
@@ -451,6 +462,7 @@ var Info = (_, ref) => {
|
|
|
451
462
|
if ((_b3 = (_a3 = cacheItem == null ? void 0 : cacheItem._extend) == null ? void 0 : _a3.other) == null ? void 0 : _b3.product_variant_id) {
|
|
452
463
|
cacheItem._extend.price = Number((_d3 = (_c3 = cacheItem._extend) == null ? void 0 : _c3.other) == null ? void 0 : _d3.price);
|
|
453
464
|
}
|
|
465
|
+
const sessionDetail = (0, import_utils7.editSessionProduct)(cacheItem, e2.session);
|
|
454
466
|
cacheItem._extend.total = _total;
|
|
455
467
|
cacheItem._extend.origin_total = _total;
|
|
456
468
|
dispatch({
|
|
@@ -459,12 +471,22 @@ var Info = (_, ref) => {
|
|
|
459
471
|
cacheItem
|
|
460
472
|
}
|
|
461
473
|
});
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
474
|
+
if (isDayBookingMode) {
|
|
475
|
+
setTimeout(() => {
|
|
476
|
+
updateMultiDay({
|
|
477
|
+
start_date: values.start_date,
|
|
478
|
+
end_date: values.end_date
|
|
479
|
+
});
|
|
480
|
+
}, 100);
|
|
481
|
+
} else {
|
|
482
|
+
form.setFieldsValue({
|
|
483
|
+
total: _total,
|
|
484
|
+
...(0, import_utils3.isSessionProduct)(cacheItem) && sessionDetail ? {
|
|
485
|
+
start_time: sessionDetail.start_time,
|
|
486
|
+
duration: sessionDetail.duration
|
|
487
|
+
} : {}
|
|
466
488
|
});
|
|
467
|
-
}
|
|
489
|
+
}
|
|
468
490
|
}
|
|
469
491
|
});
|
|
470
492
|
});
|
|
@@ -43,4 +43,8 @@ export declare const getMultiDayPrices: (data: DataEntry[]) => ResultStructure;
|
|
|
43
43
|
export declare const isDayBooking: (shopId: number) => boolean;
|
|
44
44
|
export declare const isOpenAddTime: (state: any) => boolean;
|
|
45
45
|
export declare const isShowAddTime: (state: any, currentService: any) => boolean;
|
|
46
|
+
export declare const editSessionProduct: (cacheItem: any, session: any) => {
|
|
47
|
+
duration: any;
|
|
48
|
+
start_time: any;
|
|
49
|
+
} | undefined;
|
|
46
50
|
export {};
|
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/booking/info/utils.ts
|
|
30
30
|
var utils_exports = {};
|
|
31
31
|
__export(utils_exports, {
|
|
32
|
+
editSessionProduct: () => editSessionProduct,
|
|
32
33
|
formatServiceListByTime: () => formatServiceListByTime,
|
|
33
34
|
getIsBundleOrCombination: () => getIsBundleOrCombination,
|
|
34
35
|
getMultiDayPrices: () => getMultiDayPrices,
|
|
@@ -162,8 +163,24 @@ var isShowAddTime = (state, currentService) => {
|
|
|
162
163
|
}
|
|
163
164
|
return true;
|
|
164
165
|
};
|
|
166
|
+
var editSessionProduct = (cacheItem, session) => {
|
|
167
|
+
if ((0, import_utils.isSessionProduct)(cacheItem) && session) {
|
|
168
|
+
cacheItem._extend.start_date = session.start_at;
|
|
169
|
+
cacheItem._extend.startDate = session.start_at;
|
|
170
|
+
cacheItem._extend.start_time = session.start_time;
|
|
171
|
+
cacheItem._extend.end_time = session.end_time;
|
|
172
|
+
cacheItem._extend.end_date = session.end_at;
|
|
173
|
+
cacheItem._extend.endDate = session.end_at;
|
|
174
|
+
cacheItem._extend.duration = (0, import_utils.getDays)({ _extend: cacheItem._extend }, "minutes");
|
|
175
|
+
return {
|
|
176
|
+
duration: cacheItem._extend.duration,
|
|
177
|
+
start_time: session.start_time
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
};
|
|
165
181
|
// Annotate the CommonJS export names for ESM import in node:
|
|
166
182
|
0 && (module.exports = {
|
|
183
|
+
editSessionProduct,
|
|
167
184
|
formatServiceListByTime,
|
|
168
185
|
getIsBundleOrCombination,
|
|
169
186
|
getMultiDayPrices,
|