@pisell/private-materials 3.0.13 → 3.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +2 -1
- package/es/components/booking/components/addButton/index.d.ts +8 -8
- package/es/components/booking/components/addButton/index.js +1 -1
- package/es/components/booking/components/drawer/index.d.ts +1 -1
- package/es/components/booking/components/footer/FooterMenus/index.js +1 -1
- package/es/components/booking/components/footer/index.js +25 -23
- package/es/components/booking/components/footer/utils.js +4 -3
- package/es/components/booking/forms/forms.d.ts +1 -1
- package/es/components/booking/forms/forms.js +2 -1
- package/es/components/booking/forms/index.d.ts +1 -1
- package/es/components/booking/forms/model.d.ts +2 -1
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/client/index.js +0 -1
- package/es/components/booking/info/date/index.less +1 -1
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/index.js +23 -9
- package/es/components/booking/info/model.d.ts +2 -1
- package/es/components/booking/info/notes/index.d.ts +3 -0
- package/es/components/booking/info/notes/index.js +83 -0
- package/es/components/booking/info/pet/index.js +5 -7
- package/es/components/booking/info/service/addService/index.js +74 -15
- package/es/components/booking/info/service/editService/index.js +8 -7
- package/es/components/booking/info/service/index.js +1 -1
- package/es/components/booking/info/service/index.less +3 -0
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +3 -0
- package/es/components/booking/model.d.ts +13 -1
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +2 -1
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/model.d.ts +2 -1
- package/es/components/booking/utils.js +2 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/productExtension/card/index.d.ts +10 -0
- package/es/components/productExtension/card/index.js +20 -0
- package/es/components/productExtension/card/index.less +34 -0
- package/es/components/productExtension/fields/Actor/Container/index.d.ts +12 -0
- package/es/components/productExtension/fields/Actor/Container/index.js +34 -0
- package/es/components/productExtension/fields/Actor/Container/index.less +19 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/index.d.ts +10 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +94 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/index.less +32 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/status.d.ts +0 -0
- package/es/components/productExtension/fields/Actor/CutOffTime/status.js +0 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +5 -0
- package/es/components/productExtension/fields/Actor/index.js +23 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +10 -0
- package/es/components/productExtension/fields/Forms/index.js +184 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +4 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +30 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.less +69 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +4 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +39 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.less +62 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +10 -0
- package/es/components/productExtension/fields/SelectProducts/index.js +99 -0
- package/es/components/productExtension/fields/SelectProducts/index.less +30 -0
- package/es/components/productExtension/fields/SelectProducts/mock.d.ts +0 -0
- package/es/components/productExtension/fields/SelectProducts/mock.js +0 -0
- package/es/components/productExtension/fields/SelectProducts/server.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/server.js +29 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +4 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.js +200 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.less +0 -0
- package/es/components/productExtension/fields/SelectResourcesTable/mock.d.ts +2681 -0
- package/es/components/productExtension/fields/SelectResourcesTable/mock.js +5072 -0
- package/es/components/productExtension/fields/SelectResourcesTable/server.d.ts +2 -0
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +49 -0
- package/es/components/productExtension/fields/index.d.ts +1 -0
- package/es/components/productExtension/fields/index.js +33 -0
- package/es/components/productExtension/index.d.ts +7 -0
- package/es/components/productExtension/index.js +78 -0
- package/es/components/productExtension/index.less +0 -0
- package/es/components/productExtension/locales.d.ts +48 -0
- package/es/components/productExtension/locales.js +47 -0
- package/es/components/productExtension/server.d.ts +1 -0
- package/es/components/productExtension/server.js +29 -0
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +2 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +21 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +5 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +20 -5
- package/es/components/selectModal/index.d.ts +24 -0
- package/es/components/selectModal/index.js +108 -0
- package/es/components/selectModal/index.less +0 -0
- package/es/components/tabProduct/card/index.d.ts +2 -2
- package/es/components/tabProduct/card/index.js +3 -4
- package/es/components/tabProduct/index.d.ts +4 -2
- package/es/components/tabProduct/index.js +10 -9
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/utils/index.d.ts +22 -0
- package/es/utils/index.js +56 -0
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +2 -1
- package/lib/components/booking/components/addButton/index.d.ts +8 -8
- package/lib/components/booking/components/addButton/index.js +1 -1
- package/lib/components/booking/components/drawer/index.d.ts +1 -1
- package/lib/components/booking/components/footer/FooterMenus/index.js +1 -1
- package/lib/components/booking/components/footer/index.js +5 -3
- package/lib/components/booking/components/footer/utils.js +4 -2
- package/lib/components/booking/forms/forms.d.ts +1 -1
- package/lib/components/booking/forms/forms.js +1 -1
- package/lib/components/booking/forms/index.d.ts +1 -1
- package/lib/components/booking/forms/model.d.ts +2 -1
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/client/index.js +0 -1
- package/lib/components/booking/info/date/index.less +1 -1
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/index.js +27 -9
- package/lib/components/booking/info/model.d.ts +2 -1
- package/lib/components/booking/info/notes/index.d.ts +3 -0
- package/lib/components/booking/info/notes/index.js +111 -0
- package/lib/components/booking/info/pet/index.js +5 -7
- package/lib/components/booking/info/service/addService/index.js +65 -10
- package/lib/components/booking/info/service/editService/index.js +7 -5
- package/lib/components/booking/info/service/index.js +1 -1
- package/lib/components/booking/info/service/index.less +3 -0
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +3 -0
- package/lib/components/booking/model.d.ts +13 -1
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +2 -1
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/model.d.ts +2 -1
- package/lib/components/booking/utils.js +2 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/productExtension/card/index.d.ts +10 -0
- package/lib/components/productExtension/card/index.js +57 -0
- package/lib/components/productExtension/card/index.less +34 -0
- package/lib/components/productExtension/fields/Actor/Container/index.d.ts +12 -0
- package/lib/components/productExtension/fields/Actor/Container/index.js +64 -0
- package/lib/components/productExtension/fields/Actor/Container/index.less +19 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/index.d.ts +10 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/index.js +128 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/index.less +32 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/status.d.ts +0 -0
- package/lib/components/productExtension/fields/Actor/CutOffTime/status.js +0 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +5 -0
- package/lib/components/productExtension/fields/Actor/index.js +56 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +10 -0
- package/lib/components/productExtension/fields/Forms/index.js +108 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +4 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +65 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.less +69 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +4 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +79 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.less +62 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +10 -0
- package/lib/components/productExtension/fields/SelectProducts/index.js +126 -0
- package/lib/components/productExtension/fields/SelectProducts/index.less +30 -0
- package/lib/components/productExtension/fields/SelectProducts/mock.d.ts +0 -0
- package/lib/components/productExtension/fields/SelectProducts/mock.js +0 -0
- package/lib/components/productExtension/fields/SelectProducts/server.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/server.js +33 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +4 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.js +178 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.less +0 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/mock.d.ts +2681 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/mock.js +12723 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/server.d.ts +2 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/server.js +39 -0
- package/lib/components/productExtension/fields/index.d.ts +1 -0
- package/lib/components/productExtension/fields/index.js +69 -0
- package/lib/components/productExtension/index.d.ts +7 -0
- package/lib/components/productExtension/index.js +109 -0
- package/lib/components/productExtension/index.less +0 -0
- package/lib/components/productExtension/locales.d.ts +48 -0
- package/lib/components/productExtension/locales.js +71 -0
- package/lib/components/productExtension/server.d.ts +1 -0
- package/lib/components/productExtension/server.js +33 -0
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +2 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +11 -6
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +5 -2
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +18 -4
- package/lib/components/selectModal/index.d.ts +24 -0
- package/lib/components/selectModal/index.js +133 -0
- package/lib/components/selectModal/index.less +0 -0
- package/lib/components/tabProduct/card/index.d.ts +2 -2
- package/lib/components/tabProduct/card/index.js +1 -2
- package/lib/components/tabProduct/index.d.ts +4 -2
- package/lib/components/tabProduct/index.js +7 -8
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/utils/index.d.ts +22 -0
- package/lib/utils/index.js +59 -0
- package/lowcode/product-extension/meta.ts +120 -0
- package/package.json +3 -3
|
@@ -1,12 +1,16 @@
|
|
|
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
|
+
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
|
+
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); }); }; }
|
|
2
5
|
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; }
|
|
3
6
|
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; }
|
|
4
7
|
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; }
|
|
5
8
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
9
|
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
|
-
function
|
|
9
|
-
function
|
|
10
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
11
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
13
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
14
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
15
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
16
|
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); }
|
|
@@ -32,8 +36,47 @@ var Info = function Info() {
|
|
|
32
36
|
var _useContext = useContext(Context),
|
|
33
37
|
state = _useContext.state,
|
|
34
38
|
dispatch = _useContext.dispatch;
|
|
39
|
+
var setDefaultService = function setDefaultService(list) {
|
|
40
|
+
if (state.renderType !== "eventBooking") {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (state.bookingId) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (list.length !== 1) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
var _list = _toConsumableArray(state.service.value);
|
|
50
|
+
if (_list.length !== 0) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
var product = list[0];
|
|
54
|
+
var _item = _objectSpread(_objectSpread({}, product), {}, {
|
|
55
|
+
product_id: product.id,
|
|
56
|
+
_id: getUniqueId(),
|
|
57
|
+
_extend: {
|
|
58
|
+
start_date: state.date.value,
|
|
59
|
+
startDate: state.date.value,
|
|
60
|
+
endDate: state.date.value,
|
|
61
|
+
start_time: "00:00:00",
|
|
62
|
+
duration: 10,
|
|
63
|
+
quantity: 1,
|
|
64
|
+
price: product.price,
|
|
65
|
+
product_name: product.title
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
_list.push(_item);
|
|
69
|
+
dispatch({
|
|
70
|
+
type: "setService",
|
|
71
|
+
payload: {
|
|
72
|
+
value: _list,
|
|
73
|
+
edit: true
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
};
|
|
35
77
|
var getServices = /*#__PURE__*/function () {
|
|
36
78
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
79
|
+
var _state$eventOtherPara;
|
|
37
80
|
var data;
|
|
38
81
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
39
82
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -42,24 +85,26 @@ var Info = function Info() {
|
|
|
42
85
|
return state.apis.getServices({
|
|
43
86
|
skip: 1,
|
|
44
87
|
num: 500,
|
|
45
|
-
extension_type: ["product_appointment"],
|
|
88
|
+
extension_type: state.renderType === "eventBooking" ? undefined : ["product_appointment"],
|
|
46
89
|
with: ["category"],
|
|
47
90
|
// include_formula: "no",
|
|
48
91
|
// include_bundle: "no",
|
|
49
92
|
// include_option: "no",
|
|
50
93
|
// include_variant: "no",
|
|
94
|
+
ids: state.renderType === "eventBooking" ? (_state$eventOtherPara = state.eventOtherParams) === null || _state$eventOtherPara === void 0 ? void 0 : _state$eventOtherPara.productIds : undefined,
|
|
51
95
|
open_quotation: 1,
|
|
52
96
|
with_schedule: 0
|
|
53
97
|
});
|
|
54
98
|
case 2:
|
|
55
99
|
data = _context.sent;
|
|
100
|
+
setDefaultService(data === null || data === void 0 ? void 0 : data.list);
|
|
56
101
|
dispatch({
|
|
57
102
|
type: "setService",
|
|
58
103
|
payload: {
|
|
59
104
|
services: (data === null || data === void 0 ? void 0 : data.list) || []
|
|
60
105
|
}
|
|
61
106
|
});
|
|
62
|
-
case
|
|
107
|
+
case 5:
|
|
63
108
|
case "end":
|
|
64
109
|
return _context.stop();
|
|
65
110
|
}
|
|
@@ -114,7 +159,6 @@ var Info = function Info() {
|
|
|
114
159
|
return isIncludes(item.title);
|
|
115
160
|
} : undefined);
|
|
116
161
|
}, [search, (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.services]);
|
|
117
|
-
console.log("renderList", renderList);
|
|
118
162
|
var isService = useMemo(function () {
|
|
119
163
|
return state.service.value.length > 0;
|
|
120
164
|
}, [state.service.value]);
|
|
@@ -133,16 +177,31 @@ var Info = function Info() {
|
|
|
133
177
|
var showAddButton = useMemo(function () {
|
|
134
178
|
return !state.disabledEdit && !state.channelDisabledEdit;
|
|
135
179
|
}, [state.disabledEdit, state.channelDisabledEdit]);
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
180
|
+
var addButton = useMemo(function () {
|
|
181
|
+
if (state.renderType === "eventBooking") {
|
|
182
|
+
return isService ? /*#__PURE__*/React.createElement("div", {
|
|
183
|
+
style: {
|
|
184
|
+
height: 20
|
|
185
|
+
}
|
|
186
|
+
}) : /*#__PURE__*/React.createElement(AddButton, {
|
|
187
|
+
showSub: false,
|
|
188
|
+
title: locales.getText("pisell2.text.add-a-service"),
|
|
189
|
+
subTitle: locales.getText("pisell2.text.add-another-service"),
|
|
190
|
+
onClick: handleSelectService
|
|
191
|
+
});
|
|
144
192
|
}
|
|
145
|
-
|
|
193
|
+
return showAddButton ? /*#__PURE__*/React.createElement(AddButton, {
|
|
194
|
+
showSub: isService,
|
|
195
|
+
title: locales.getText("pisell2.text.add-a-service"),
|
|
196
|
+
subTitle: locales.getText("pisell2.text.add-another-service"),
|
|
197
|
+
onClick: handleSelectService
|
|
198
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
199
|
+
style: {
|
|
200
|
+
height: 20
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}, [state.renderType, showAddButton, isService, state.service.value]);
|
|
204
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, addButton, /*#__PURE__*/React.createElement(Drawer, {
|
|
146
205
|
open: state.service.addModal,
|
|
147
206
|
title: locales.getText("pisell2.text.select-service"),
|
|
148
207
|
rootClassName: "booking-server-wrap",
|
|
@@ -420,9 +420,10 @@ var Info = function Info() {
|
|
|
420
420
|
if (state.service.editModal) {
|
|
421
421
|
var cacheItem = state.service.cacheItem;
|
|
422
422
|
form.setFieldsValue(getServerItemExtend(state, cacheItem, timeObj));
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
423
|
+
if (state.renderType !== 'eventBooking') {
|
|
424
|
+
// 获取资源列表
|
|
425
|
+
getResources();
|
|
426
|
+
}
|
|
426
427
|
} else {
|
|
427
428
|
form.resetFields();
|
|
428
429
|
}
|
|
@@ -464,10 +465,10 @@ var Info = function Info() {
|
|
|
464
465
|
* @Date: 2024-01-09 14:07
|
|
465
466
|
*/
|
|
466
467
|
useUpdateEffect(function () {
|
|
467
|
-
if (useStartTime && useDuration) {
|
|
468
|
+
if (useStartTime && useDuration && state.renderType !== 'eventBooking') {
|
|
468
469
|
getResources();
|
|
469
470
|
}
|
|
470
|
-
}, [useStartTime, useDuration]);
|
|
471
|
+
}, [useStartTime, useDuration, state.renderType]);
|
|
471
472
|
|
|
472
473
|
/**
|
|
473
474
|
* @title: 打开弹窗时 设置数据
|
|
@@ -601,7 +602,7 @@ var Info = function Info() {
|
|
|
601
602
|
name: "discount_reason"
|
|
602
603
|
}, /*#__PURE__*/React.createElement(Input.TextArea, {
|
|
603
604
|
size: "large"
|
|
604
|
-
}))) : null, /*#__PURE__*/React.createElement(Col, {
|
|
605
|
+
}))) : null, state.renderType !== 'eventBooking' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Col, {
|
|
605
606
|
span: 12
|
|
606
607
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
607
608
|
label: locales.getText("pisell2.text.start_time"),
|
|
@@ -659,7 +660,7 @@ var Info = function Info() {
|
|
|
659
660
|
}, /*#__PURE__*/React.createElement(InputNumber, null)), /*#__PURE__*/React.createElement(Form.Item, {
|
|
660
661
|
hidden: true,
|
|
661
662
|
name: "like_status"
|
|
662
|
-
}, /*#__PURE__*/React.createElement(Input, null)))), errorList.map(function (d, i) {
|
|
663
|
+
}, /*#__PURE__*/React.createElement(Input, null))))), state.renderType !== 'eventBooking' && errorList.map(function (d, i) {
|
|
663
664
|
return /*#__PURE__*/React.createElement(Alert, {
|
|
664
665
|
key: d.type,
|
|
665
666
|
message: d.label,
|
|
@@ -107,7 +107,7 @@ var Info = function Info() {
|
|
|
107
107
|
}
|
|
108
108
|
}, d.id ? /*#__PURE__*/React.createElement("div", {
|
|
109
109
|
className: "pisell-lowcode__booking-service-item-title"
|
|
110
|
-
}, d.title) : null, d._extend ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
110
|
+
}, d.title) : null, d._extend ? /*#__PURE__*/React.createElement(React.Fragment, null, state.renderType !== 'eventBooking' && /*#__PURE__*/React.createElement("div", {
|
|
111
111
|
className: "pisell-lowcode__booking-service-item-date"
|
|
112
112
|
}, getServiceTime(d, state.date.value)), /*#__PURE__*/React.createElement("div", {
|
|
113
113
|
className: "pisell-lowcode__booking-service-item-technician"
|
|
@@ -40,6 +40,7 @@ declare const _default: {
|
|
|
40
40
|
'pisell2.text.add-notes': string;
|
|
41
41
|
'pisell2.text.notes': string;
|
|
42
42
|
'pisell2.text.new-appointment': string;
|
|
43
|
+
'pisell2.text.enroll': string;
|
|
43
44
|
'pisell2.text.add-products-successfully': string;
|
|
44
45
|
'pisell2.text.add': string;
|
|
45
46
|
'pisell2.text.created-successfully': string;
|
|
@@ -168,6 +169,7 @@ declare const _default: {
|
|
|
168
169
|
'pisell2.text.add-notes': string;
|
|
169
170
|
'pisell2.text.notes': string;
|
|
170
171
|
'pisell2.text.new-appointment': string;
|
|
172
|
+
'pisell2.text.enroll': string;
|
|
171
173
|
'pisell2.text.add-products-successfully': string;
|
|
172
174
|
'pisell2.text.refund': string;
|
|
173
175
|
'pisell2.text.refund-amount': string;
|
|
@@ -291,6 +293,7 @@ declare const _default: {
|
|
|
291
293
|
'pisell2.text.add-notes': string;
|
|
292
294
|
'pisell2.text.notes': string;
|
|
293
295
|
'pisell2.text.new-appointment': string;
|
|
296
|
+
'pisell2.text.enroll': string;
|
|
294
297
|
'pisell2.text.add-products-successfully': string;
|
|
295
298
|
'pisell2.text.add': string;
|
|
296
299
|
'pisell2.text.created-successfully': string;
|
|
@@ -40,6 +40,7 @@ export default {
|
|
|
40
40
|
'pisell2.text.add-notes': 'Add Notes',
|
|
41
41
|
'pisell2.text.notes': 'Notes',
|
|
42
42
|
'pisell2.text.new-appointment': 'New appointment',
|
|
43
|
+
'pisell2.text.enroll': 'Enroll',
|
|
43
44
|
'pisell2.text.add-products-successfully': 'Add products successfully',
|
|
44
45
|
'pisell2.text.add': 'Add',
|
|
45
46
|
'pisell2.text.created-successfully': 'Appointment created',
|
|
@@ -183,6 +184,7 @@ export default {
|
|
|
183
184
|
'pisell2.text.add-notes': '添加备注',
|
|
184
185
|
'pisell2.text.notes': '备注',
|
|
185
186
|
'pisell2.text.new-appointment': '新预约',
|
|
187
|
+
'pisell2.text.enroll': '报名',
|
|
186
188
|
'pisell2.text.add-products-successfully': '添加商品成功',
|
|
187
189
|
'pisell2.text.refund': '退款',
|
|
188
190
|
'pisell2.text.refund-amount': '退款金额',
|
|
@@ -326,6 +328,7 @@ export default {
|
|
|
326
328
|
'pisell2.text.add-notes': '添加備注',
|
|
327
329
|
'pisell2.text.notes': '備注',
|
|
328
330
|
'pisell2.text.new-appointment': '新預約',
|
|
331
|
+
'pisell2.text.enroll': '报名',
|
|
329
332
|
'pisell2.text.add-products-successfully': '添加商品成功',
|
|
330
333
|
//
|
|
331
334
|
'pisell2.text.add': '添加',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -70,12 +71,23 @@ export interface FormState {
|
|
|
70
71
|
bookingId: string | number;
|
|
71
72
|
bookingDetail: any;
|
|
72
73
|
channelDisabledEdit: boolean;
|
|
74
|
+
renderType?: 'eventBooking';
|
|
75
|
+
eventOtherParams?: {
|
|
76
|
+
relation_id: number;
|
|
77
|
+
number: number;
|
|
78
|
+
registration_type: 'single' | 'all' | 'extra_include';
|
|
79
|
+
start_date: string;
|
|
80
|
+
start_time: string;
|
|
81
|
+
end_date: string;
|
|
82
|
+
end_time: string;
|
|
83
|
+
productIds: number[];
|
|
84
|
+
};
|
|
73
85
|
}
|
|
74
86
|
export declare const walkInData: {
|
|
75
87
|
id: number;
|
|
76
88
|
nickname: string;
|
|
77
89
|
};
|
|
78
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
90
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
79
91
|
state: FormState;
|
|
80
92
|
} & {
|
|
81
93
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormState } from "../model";
|
|
2
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
|
|
3
4
|
state: FormState;
|
|
4
5
|
} & {
|
|
5
6
|
dispatch: (params: {
|
|
@@ -443,6 +443,7 @@ export var deleteCacheParams = function deleteCacheParams() {
|
|
|
443
443
|
* @Date: 2024-01-26 14:09
|
|
444
444
|
*/
|
|
445
445
|
export var getServerItemExtend = function getServerItemExtend(state, cacheItem, timeObj) {
|
|
446
|
+
var _cacheItem$duration;
|
|
446
447
|
// 编辑直接返回原数据
|
|
447
448
|
if (!cacheItem.new && cacheItem._extend.endDate) {
|
|
448
449
|
return cacheItem._extend;
|
|
@@ -453,7 +454,7 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
|
|
|
453
454
|
|
|
454
455
|
// 下一个商品的扩展参数
|
|
455
456
|
var _extend = {
|
|
456
|
-
duration: findNextDuration(cacheItem.duration, timeObj.durationSlicesBasedOnTime, cacheItem.duration.value)
|
|
457
|
+
duration: findNextDuration(cacheItem.duration, timeObj.durationSlicesBasedOnTime, cacheItem === null || cacheItem === void 0 ? void 0 : (_cacheItem$duration = cacheItem.duration) === null || _cacheItem$duration === void 0 ? void 0 : _cacheItem$duration.value)
|
|
457
458
|
};
|
|
458
459
|
|
|
459
460
|
// 如果有上一个商品, 将上一个商品的某些参数 设置到新商品上
|
package/es/components/index.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ import BookingNotes from './booking/notes';
|
|
|
5
5
|
import BookingAddons from './booking/addons';
|
|
6
6
|
import BookingForms from './booking/forms';
|
|
7
7
|
import Schedules from './schedules';
|
|
8
|
-
|
|
8
|
+
import ProductExtension from './productExtension';
|
|
9
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension };
|
package/es/components/index.js
CHANGED
|
@@ -5,4 +5,5 @@ import BookingNotes from "./booking/notes";
|
|
|
5
5
|
import BookingAddons from "./booking/addons";
|
|
6
6
|
import BookingForms from "./booking/forms";
|
|
7
7
|
import Schedules from "./schedules";
|
|
8
|
-
|
|
8
|
+
import ProductExtension from "./productExtension";
|
|
9
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
interface LmCardProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
4
|
+
header: React.ReactNode;
|
|
5
|
+
headerClassName: string;
|
|
6
|
+
extra: React.ReactNode;
|
|
7
|
+
hidden?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const LmCard: React.FC<Partial<LmCardProps>>;
|
|
10
|
+
export default LmCard;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 _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; }
|
|
3
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4
|
+
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); }
|
|
5
|
+
import React from "react";
|
|
6
|
+
import classNames from "classnames";
|
|
7
|
+
import "./index.less";
|
|
8
|
+
var LmCard = function LmCard(props) {
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: classNames("pisell_card", props.className, _defineProperty({}, "pisell_card-hidden", props.hidden)),
|
|
11
|
+
style: props.style
|
|
12
|
+
}, props.header ? /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "pisell_card-header"
|
|
14
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: classNames("pisell_card-title", props.headerClassName)
|
|
16
|
+
}, props.header), props.extra) : null, /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: classNames("pisell_card-content")
|
|
18
|
+
}, props.children));
|
|
19
|
+
};
|
|
20
|
+
export default LmCard;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.pisell_card {
|
|
2
|
+
width: 100%;
|
|
3
|
+
background: #ffffff;
|
|
4
|
+
opacity: 1;
|
|
5
|
+
border-radius: 12px;
|
|
6
|
+
padding: 20px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
margin-bottom: 20px;
|
|
9
|
+
// overflow: hidden;
|
|
10
|
+
|
|
11
|
+
&.pisell_card-hidden {
|
|
12
|
+
height: 0;
|
|
13
|
+
width: 0;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
padding: 0;
|
|
16
|
+
margin: 0
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pisell_card-header {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
margin-bottom: 20px;
|
|
24
|
+
|
|
25
|
+
.pisell_card-title {
|
|
26
|
+
height: 28px;
|
|
27
|
+
font-size: 16px;
|
|
28
|
+
// font-weight: 650;
|
|
29
|
+
line-height: 28px;
|
|
30
|
+
color: #252a2d;
|
|
31
|
+
font-weight: bold;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
interface ContainerProps {
|
|
4
|
+
title: string;
|
|
5
|
+
children: any;
|
|
6
|
+
desc: string | ReactElement;
|
|
7
|
+
isMargin: boolean;
|
|
8
|
+
hint: string | ReactElement;
|
|
9
|
+
hintProps: object;
|
|
10
|
+
}
|
|
11
|
+
declare const Container: React.FC<Partial<ContainerProps>>;
|
|
12
|
+
export default Container;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Tooltip } from "antd";
|
|
4
|
+
import { QuestionCircleOutlined } from "@ant-design/icons";
|
|
5
|
+
import "./index.less";
|
|
6
|
+
var Container = function Container(_ref) {
|
|
7
|
+
var title = _ref.title,
|
|
8
|
+
children = _ref.children,
|
|
9
|
+
desc = _ref.desc,
|
|
10
|
+
_ref$isMargin = _ref.isMargin,
|
|
11
|
+
isMargin = _ref$isMargin === void 0 ? false : _ref$isMargin,
|
|
12
|
+
hint = _ref.hint,
|
|
13
|
+
hintProps = _ref.hintProps;
|
|
14
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: "pisell2_product-extension-container"
|
|
16
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "pisell2_product-extension-container-title-wrap"
|
|
18
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: "pisell2_product-extension-container-title"
|
|
20
|
+
}, title), hint ? /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
21
|
+
title: hint
|
|
22
|
+
}, hintProps), /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
|
|
23
|
+
style: {
|
|
24
|
+
marginLeft: 4,
|
|
25
|
+
cursor: "pointer"
|
|
26
|
+
}
|
|
27
|
+
})) : null), children, /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: "pisell2_product-extension-container-desc",
|
|
29
|
+
style: {
|
|
30
|
+
marginBottom: isMargin ? "15px" : ""
|
|
31
|
+
}
|
|
32
|
+
}, desc));
|
|
33
|
+
};
|
|
34
|
+
export default Container;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.pisell2_product-extension-container {
|
|
2
|
+
.pisell2_product-extension-container-title-wrap {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
margin-bottom: 6px;
|
|
6
|
+
|
|
7
|
+
.pisell2_product-extension-container-title {
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
color: #222b45;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.pisell2_product-extension-container-desc {
|
|
14
|
+
color: rgba(0, 0, 0, 0.45);
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
|
|
17
|
+
margin-top: 8px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.less";
|
|
3
|
+
export declare const maxNumber: any;
|
|
4
|
+
interface CutOffTimeProps {
|
|
5
|
+
value?: any;
|
|
6
|
+
onChange?: (e: any) => void;
|
|
7
|
+
name: string[];
|
|
8
|
+
}
|
|
9
|
+
declare const CutOffTime: React.FC<CutOffTimeProps>;
|
|
10
|
+
export default CutOffTime;
|