@pisell/private-materials 3.0.62 → 3.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.js +8 -8
  8. package/build/lowcode/view.js +6 -6
  9. package/es/components/booking/addons/index.d.ts +1 -1
  10. package/es/components/booking/addons/model.d.ts +1 -2
  11. package/es/components/booking/forms/forms.d.ts +1 -1
  12. package/es/components/booking/forms/index.d.ts +1 -1
  13. package/es/components/booking/forms/model.d.ts +1 -2
  14. package/es/components/booking/index.d.ts +1 -1
  15. package/es/components/booking/info/index.d.ts +1 -1
  16. package/es/components/booking/info/model.d.ts +1 -2
  17. package/es/components/booking/info/service/addService/index.js +22 -57
  18. package/es/components/booking/info/service/addService/utils.d.ts +61 -0
  19. package/es/components/booking/info/service/addService/utils.js +256 -0
  20. package/es/components/booking/info/service/editService/index.js +109 -139
  21. package/es/components/booking/model.d.ts +2 -2
  22. package/es/components/booking/notes/index.d.ts +1 -1
  23. package/es/components/booking/notes/model.d.ts +1 -2
  24. package/es/components/booking/payments/index.d.ts +1 -1
  25. package/es/components/booking/payments/model.d.ts +1 -2
  26. package/es/components/schedules/index.d.ts +1 -1
  27. package/es/components/schedules/model.d.ts +1 -2
  28. package/lib/components/booking/addons/index.d.ts +1 -1
  29. package/lib/components/booking/addons/model.d.ts +1 -2
  30. package/lib/components/booking/forms/forms.d.ts +1 -1
  31. package/lib/components/booking/forms/index.d.ts +1 -1
  32. package/lib/components/booking/forms/model.d.ts +1 -2
  33. package/lib/components/booking/index.d.ts +1 -1
  34. package/lib/components/booking/info/index.d.ts +1 -1
  35. package/lib/components/booking/info/model.d.ts +1 -2
  36. package/lib/components/booking/info/service/addService/index.js +18 -28
  37. package/lib/components/booking/info/service/addService/utils.d.ts +61 -0
  38. package/lib/components/booking/info/service/addService/utils.js +211 -0
  39. package/lib/components/booking/info/service/editService/index.js +68 -99
  40. package/lib/components/booking/model.d.ts +2 -2
  41. package/lib/components/booking/notes/index.d.ts +1 -1
  42. package/lib/components/booking/notes/model.d.ts +1 -2
  43. package/lib/components/booking/payments/index.d.ts +1 -1
  44. package/lib/components/booking/payments/model.d.ts +1 -2
  45. package/lib/components/schedules/index.d.ts +1 -1
  46. package/lib/components/schedules/model.d.ts +1 -2
  47. package/package.json +2 -2
@@ -1,12 +1,12 @@
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
2
  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); }
3
- 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; }
4
- 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); } }
5
- 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); }); }; }
6
3
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
7
4
  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."); }
8
5
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
9
6
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
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 asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
9
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
10
10
  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; }
11
11
  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; }
12
12
  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; }
@@ -20,7 +20,6 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
20
20
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
21
  import React, { useCallback, useContext, useEffect, useMemo, useState } from "react";
22
22
  import Delete_wght300_24px from "@pisell/icon/es/Delete_wght300_24px";
23
- import AlertTriangle from "@pisell/icon/es/AlertTriangle";
24
23
  import Drawer from "../../../components/drawer";
25
24
  import { Context } from "../../model";
26
25
  import { formatAmount, locales } from "@pisell/utils";
@@ -29,11 +28,11 @@ import { Input, Button, Select, Row, Col, Form, Alert, InputNumber } from "antd"
29
28
  import "./index.less";
30
29
  import CollapsibleList from "../../../components/collapsibleList";
31
30
  import { renderBundles } from "../../../components/collapsibleList/utils";
32
- import dayjs from "dayjs";
33
31
  import { useUpdateEffect, useMemoizedFn } from "ahooks";
34
- import { sliceDayIntoFiveMinutes, formatResource, getErrorList, getServiceTimes, getServerItemExtend, deleteCacheParams, getEndDate, flexibleObj, getDuration, getDiscountTime, getServeStartTime } from "../../../utils";
32
+ import { getErrorList, getServiceTimes, deleteCacheParams } from "../../../utils";
35
33
  import Like from "../like";
36
34
  import { getNoResource } from "../../../mock";
35
+ import { formatResources, getDurationProps, getFlexibleOption, getTimeObj } from "../addService/utils";
37
36
  var Info = function Info() {
38
37
  var _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$service3, _state$service3$cache, _state$service5, _state$service5$cache, _state$service5$cache2, _state$service5$cache3, _state$service$cacheI5, _state$service6, _state$service6$cache, _state$service6$cache2, _state$service$cacheI6, _state$service$cacheI7, _state$service$cacheI8, _state$service$cacheI9;
39
38
  var _Form$useForm = Form.useForm(),
@@ -51,6 +50,11 @@ var Info = function Info() {
51
50
  var _useContext = useContext(Context),
52
51
  state = _useContext.state,
53
52
  dispatch = _useContext.dispatch;
53
+ // 这里用 undefined false true 作为3个状态进行使用
54
+ var _useState3 = useState(),
55
+ _useState4 = _slicedToArray(_useState3, 2),
56
+ selectOpen = _useState4[0],
57
+ setSelectOpen = _useState4[1];
54
58
 
55
59
  // 当前商品信息+ 表单信息
56
60
  var getCurrentCacheItem = function getCurrentCacheItem() {
@@ -87,18 +91,14 @@ var Info = function Info() {
87
91
  * @Date: 2024-02-23 09:59
88
92
  */
89
93
  var durationProps = useMemo(function () {
90
- var _currentResource$_ext, _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2;
94
+ var _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2;
91
95
  var _cacheItem = getCurrentCacheItem();
92
- return {
93
- startDate: dayjs(dayjs(_cacheItem._extend.start_date).format("YYYY-MM-DD ") + (getServeStartTime(useStartTime) || "00:00")),
94
- usableTime: currentResource === null || currentResource === void 0 ? void 0 : (_currentResource$_ext = currentResource._extend) === null || _currentResource$_ext === void 0 ? void 0 : _currentResource$_ext.usableTime,
95
- duration: getDuration(_cacheItem === null || _cacheItem === void 0 ? void 0 : _cacheItem.duration),
96
- locale: locales.locale,
97
- slice: (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : (_state$bookingConfig$ = _state$bookingConfig.config) === null || _state$bookingConfig$ === void 0 ? void 0 : (_state$bookingConfig$2 = _state$bookingConfig$.basic) === null || _state$bookingConfig$2 === void 0 ? void 0 : _state$bookingConfig$2.service_time,
98
- selectProps: {
99
- size: "large"
100
- }
101
- };
96
+ return getDurationProps({
97
+ cacheItem: _cacheItem,
98
+ useStartTime: useStartTime,
99
+ currentResource: currentResource,
100
+ slice: (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : (_state$bookingConfig$ = _state$bookingConfig.config) === null || _state$bookingConfig$ === void 0 ? void 0 : (_state$bookingConfig$2 = _state$bookingConfig$.basic) === null || _state$bookingConfig$2 === void 0 ? void 0 : _state$bookingConfig$2.service_time
101
+ });
102
102
  }, [currentResource, state.service.cacheItem, useStartTime, useResource, (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 ? void 0 : (_state$bookingConfig3 = _state$bookingConfig2.config) === null || _state$bookingConfig3 === void 0 ? void 0 : (_state$bookingConfig4 = _state$bookingConfig3.basic) === null || _state$bookingConfig4 === void 0 ? void 0 : _state$bookingConfig4.service_time]);
103
103
 
104
104
  /**
@@ -110,19 +110,9 @@ var Info = function Info() {
110
110
  * @Date: 2024-02-23 10:10
111
111
  */
112
112
  var flexibleOption = useMemo(function () {
113
- var _duration = durationProps.duration;
114
- if (_duration === "flexible") {
115
- var _durationProps$usable, _durationProps$usable2;
116
- // 获取结束时间
117
- var endDate = getEndDate(durationProps.startDate, _duration, (_durationProps$usable = durationProps.usableTime) !== null && _durationProps$usable !== void 0 && _durationProps$usable.end_at ? dayjs((_durationProps$usable2 = durationProps.usableTime) === null || _durationProps$usable2 === void 0 ? void 0 : _durationProps$usable2.end_at) : null);
118
- // 转换为分钟
119
- var timeValue = endDate.diff(durationProps.startDate, "minute");
120
- return {
121
- label: locales.getText("pisell2.text.flexible"),
122
- value: flexibleObj.create(timeValue)
123
- };
124
- }
125
- return null;
113
+ return getFlexibleOption({
114
+ durationProps: durationProps
115
+ });
126
116
  }, [durationProps, locales.locale]);
127
117
 
128
118
  /**
@@ -133,45 +123,12 @@ var Info = function Info() {
133
123
  * @Date: 2024-01-09 13:37
134
124
  */
135
125
  var timeObj = useMemo(function () {
136
- var _state$bookingConfig5, _state$bookingConfig6, _state$bookingConfig7;
137
- var obj = sliceDayIntoFiveMinutes((_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 ? void 0 : (_state$bookingConfig6 = _state$bookingConfig5.config) === null || _state$bookingConfig6 === void 0 ? void 0 : (_state$bookingConfig7 = _state$bookingConfig6.basic) === null || _state$bookingConfig7 === void 0 ? void 0 : _state$bookingConfig7.service_time, locales.locale);
138
- var timeSlices = _toConsumableArray(obj.timeSlices);
139
- var durationSlicesBasedOnTime = _toConsumableArray(obj.durationSlicesBasedOnTime);
140
-
141
- // 如果商品是灵活时长, 则增加灵活的选项
142
- if (flexibleOption) {
143
- durationSlicesBasedOnTime.unshift(flexibleOption);
144
- }
145
-
146
- // 如果当前设置的时长没有在列表内, 则在列表的最上面添加此项
147
- if (useDuration && !durationSlicesBasedOnTime.some(function (d) {
148
- return d.value === useDuration;
149
- })) {
150
- durationSlicesBasedOnTime.unshift({
151
- label: getDiscountTime(useDuration),
152
- value: useDuration,
153
- //@ts-ignore
154
- disabled: true
155
- });
156
- }
157
- // 如果有选择时间, 但是不在列表内 则需要在列表内添加上此值
158
- if (useStartTime && useStartTime !== "now" && !timeSlices.some(function (d) {
159
- return d.value === useStartTime;
160
- })) {
161
- timeSlices.unshift({
162
- label: dayjs(useStartTime, "HH:mm").format("hh:mm A"),
163
- value: useStartTime
164
- });
165
- }
166
-
167
- // 增加当前
168
- timeSlices.unshift({
169
- label: locales.getText("pisell2.text.now"),
170
- value: "now"
171
- });
172
- return _objectSpread(_objectSpread({}, obj), {}, {
173
- timeSlices: timeSlices,
174
- durationSlicesBasedOnTime: durationSlicesBasedOnTime
126
+ return getTimeObj({
127
+ durationProps: durationProps,
128
+ useStartTime: useStartTime,
129
+ currentResource: currentResource,
130
+ state: state,
131
+ useDuration: useDuration
175
132
  });
176
133
  }, [state, locales.locale, useDuration, useStartTime, flexibleOption]);
177
134
 
@@ -197,93 +154,54 @@ var Info = function Info() {
197
154
  */
198
155
  var getResources = /*#__PURE__*/function () {
199
156
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cacheItem) {
200
- var data, _list, _cacheItem, _useResource;
157
+ var _state$service$cacheI, _list, autoClose, _cacheItem;
201
158
  return _regeneratorRuntime().wrap(function _callee$(_context) {
202
159
  while (1) switch (_context.prev = _context.next) {
203
160
  case 0:
204
161
  _context.prev = 0;
205
- setResourceLoading(true);
206
- _context.next = 4;
207
- return state.apis.getResources({
208
- skip: 1,
209
- num: 1000,
210
- with_date_times: state.date.value.format("YYYY-MM-DD"),
211
- codes: ["resources", "therapist", "table"],
212
- _config: {
213
- abort: true
214
- }
215
- });
216
- case 4:
217
- data = _context.sent;
218
162
  // 合并无资源
219
- _list = [getNoResource()].concat((data === null || data === void 0 ? void 0 : data.list) || []);
163
+ _list = state.service.resourcesOrigin || [];
164
+ autoClose = (_state$service$cacheI = state.service.cacheItem) === null || _state$service$cacheI === void 0 ? void 0 : _state$service$cacheI.autoClose;
220
165
  _cacheItem = cacheItem || getCurrentCacheItem();
221
166
  if (_cacheItem._extend) {
222
- _context.next = 9;
167
+ _context.next = 6;
223
168
  break;
224
169
  }
225
170
  return _context.abrupt("return");
226
- case 9:
227
- // 格式化, 添加自定义参数
228
- _list = _list.map(function (d) {
229
- return formatResource(d, _cacheItem, function (item) {
230
- return /*#__PURE__*/React.createElement("div", {
231
- className: "resource-option"
232
- }, /*#__PURE__*/React.createElement("div", {
233
- className: "like-wrap"
234
- }), item.labelText, !item.usable && /*#__PURE__*/React.createElement(AlertTriangle, {
235
- className: "resource-option-alert-icon"
236
- }));
237
- });
238
- });
239
- // 排序, 将可用资源放在最前面
240
- _list = _list.sort(function (a, b) {
241
- return b.usable ? 1 : -1;
242
- });
243
- if (useResource) {
244
- // 校验, 如果当前选择的资源 在列表里没找到, 则恢复成无资源, 防止数据错乱
245
- if (!_list.find(function (d) {
246
- return d.form_record_id === useResource;
247
- })) {
248
- form.setFieldsValue({
249
- resource: 0
250
- });
251
- }
252
- } else {
253
- // 如果只有一个资源,并且当前未选择, 则默认选中
254
- _useResource = 0;
255
- if (_list.length === 2 && useResource !== 0) {
256
- _useResource = _list[1].form_record_id;
257
- }
258
- form.setFieldsValue({
259
- resource: _useResource
260
- });
261
- }
171
+ case 6:
262
172
  dispatch({
263
173
  type: "setService",
264
174
  payload: {
265
- resources: _list
175
+ resources: formatResources({
176
+ cacheItem: _cacheItem,
177
+ resourcesOrigin: _list
178
+ })
266
179
  }
267
180
  });
268
- setTimeout(function () {
269
- var _state$service$cacheI;
270
- // 当选中资源 或者 列表只有无资源的时候 那么直接返回
271
- if ((_state$service$cacheI = state.service.cacheItem) !== null && _state$service$cacheI !== void 0 && _state$service$cacheI.autoClose || _list.length === 1 && useResource === 0) {
272
- form.submit();
181
+ if (_cacheItem.new) {
182
+ // 自动关闭的 提交数据, 否则展开资源列表
183
+ if (autoClose) {
184
+ setTimeout(function () {
185
+ form.submit();
186
+ }, 200);
187
+ } else {
188
+ setTimeout(function () {
189
+ if (selectOpen === undefined) {
190
+ setSelectOpen(true);
191
+ }
192
+ }, 500);
273
193
  }
274
- }, 200);
275
- _context.next = 18;
194
+ }
195
+ _context.next = 12;
276
196
  break;
277
- case 16:
278
- _context.prev = 16;
197
+ case 10:
198
+ _context.prev = 10;
279
199
  _context.t0 = _context["catch"](0);
280
- case 18:
281
- setResourceLoading(false);
282
- case 19:
200
+ case 12:
283
201
  case "end":
284
202
  return _context.stop();
285
203
  }
286
- }, _callee, null, [[0, 16]]);
204
+ }, _callee, null, [[0, 10]]);
287
205
  }));
288
206
  return function getResources(_x2) {
289
207
  return _ref.apply(this, arguments);
@@ -414,7 +332,7 @@ var Info = function Info() {
414
332
  * @Date: 2024-01-09 14:04
415
333
  */
416
334
  var onFinish = function onFinish(values) {
417
- var _currentResource$_ext2;
335
+ var _currentResource$_ext;
418
336
  var _list = _toConsumableArray(state.service.value);
419
337
  var _item = _objectSpread(_objectSpread({}, state.service.cacheItem), {}, {
420
338
  autoClose: false,
@@ -428,7 +346,7 @@ var Info = function Info() {
428
346
  endDate = _getServiceTimes.endDate;
429
347
  _extend.startDate = startDate;
430
348
  _extend.endDate = endDate;
431
- var _ref2 = (currentResource === null || currentResource === void 0 ? void 0 : (_currentResource$_ext2 = currentResource._extend) === null || _currentResource$_ext2 === void 0 ? void 0 : _currentResource$_ext2.usableTime) || {},
349
+ var _ref2 = (currentResource === null || currentResource === void 0 ? void 0 : (_currentResource$_ext = currentResource._extend) === null || _currentResource$_ext === void 0 ? void 0 : _currentResource$_ext.usableTime) || {},
432
350
  relation_type = _ref2.relation_type,
433
351
  item_id = _ref2.item_id,
434
352
  schedule_id = _ref2.schedule_id;
@@ -468,13 +386,14 @@ var Info = function Info() {
468
386
  var setEditData = useMemoizedFn(function () {
469
387
  if (state.service.editModal) {
470
388
  var cacheItem = state.service.cacheItem;
471
- var values = getServerItemExtend(state, cacheItem, timeObj);
389
+ var values = cacheItem._extend;
472
390
  form.setFieldsValue(values);
473
391
  if (state.renderType !== "eventBooking") {
474
392
  // 获取资源列表
475
393
  getResources();
476
394
  }
477
395
  } else {
396
+ setSelectOpen(undefined);
478
397
  form.resetFields();
479
398
  }
480
399
  });
@@ -518,7 +437,7 @@ var Info = function Info() {
518
437
  if (useStartTime && useDuration && state.renderType !== "eventBooking") {
519
438
  getResources();
520
439
  }
521
- }, [useStartTime, useDuration, state.renderType]);
440
+ }, [useStartTime, useDuration, state.renderType, state.service.resourcesOrigin]);
522
441
 
523
442
  /**
524
443
  * @title: 打开弹窗时 设置数据
@@ -572,6 +491,55 @@ var Info = function Info() {
572
491
  var _state$service4, _state$service4$cache, _state$service4$cache2, _state$service4$cache3;
573
492
  return ((_state$service4 = state.service) === null || _state$service4 === void 0 ? void 0 : (_state$service4$cache = _state$service4.cacheItem) === null || _state$service4$cache === void 0 ? void 0 : (_state$service4$cache2 = _state$service4$cache._extend) === null || _state$service4$cache2 === void 0 ? void 0 : (_state$service4$cache3 = _state$service4$cache2.other) === null || _state$service4$cache3 === void 0 ? void 0 : _state$service4$cache3.bundle) || [];
574
493
  }, [(_state$service5 = state.service) === null || _state$service5 === void 0 ? void 0 : (_state$service5$cache = _state$service5.cacheItem) === null || _state$service5$cache === void 0 ? void 0 : (_state$service5$cache2 = _state$service5$cache._extend) === null || _state$service5$cache2 === void 0 ? void 0 : (_state$service5$cache3 = _state$service5$cache2.other) === null || _state$service5$cache3 === void 0 ? void 0 : _state$service5$cache3.bundle]);
494
+
495
+ /**
496
+ * @title: 获取资源列表数据
497
+ * @description:
498
+ * @return {*}
499
+ * @Author: zhiwei.Wang
500
+ * @Date: 2024-01-09 13:38
501
+ */
502
+ var getResourcesData = /*#__PURE__*/function () {
503
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
504
+ var data, _list;
505
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
506
+ while (1) switch (_context2.prev = _context2.next) {
507
+ case 0:
508
+ setResourceLoading(true);
509
+ _context2.next = 3;
510
+ return state.apis.getResources({
511
+ skip: 1,
512
+ num: 1000,
513
+ with_date_times: state.date.value.format("YYYY-MM-DD"),
514
+ codes: ["resources", "therapist", "table"],
515
+ _config: {
516
+ abort: true
517
+ }
518
+ });
519
+ case 3:
520
+ data = _context2.sent;
521
+ // 合并无资源
522
+ _list = [getNoResource()].concat((data === null || data === void 0 ? void 0 : data.list) || []);
523
+ dispatch({
524
+ type: "setService",
525
+ payload: {
526
+ resourcesOrigin: _list
527
+ }
528
+ });
529
+ setResourceLoading(false);
530
+ case 7:
531
+ case "end":
532
+ return _context2.stop();
533
+ }
534
+ }, _callee2);
535
+ }));
536
+ return function getResourcesData() {
537
+ return _ref3.apply(this, arguments);
538
+ };
539
+ }();
540
+ useEffect(function () {
541
+ getResourcesData();
542
+ }, [state.date.value]);
575
543
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
576
544
  zIndex: 1000,
577
545
  forceRender: true,
@@ -715,6 +683,8 @@ var Info = function Info() {
715
683
  size: "large",
716
684
  allowClear: true,
717
685
  showSearch: true,
686
+ open: selectOpen,
687
+ onDropdownVisibleChange: setSelectOpen,
718
688
  filterOption: function filterOption(str, option) {
719
689
  return (option.labelText || "").toLowerCase().includes((str || "").toLowerCase());
720
690
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -35,6 +34,7 @@ export interface FormState {
35
34
  editModal: boolean;
36
35
  services: any[];
37
36
  resources: any[];
37
+ resourcesOrigin: any[];
38
38
  value: any[];
39
39
  cacheItem: any;
40
40
  edit: boolean;
@@ -90,7 +90,7 @@ export declare const walkInData: {
90
90
  id: number;
91
91
  nickname: string;
92
92
  };
93
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
93
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
94
94
  state: FormState;
95
95
  } & {
96
96
  dispatch: (params: {
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: (props: any) => any;
7
+ declare const Notes: (props: any) => JSX.Element;
8
8
  export default Notes;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Payments: (props: any) => any;
8
+ declare const Payments: (props: any) => JSX.Element;
9
9
  export default Payments;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -1,3 +1,3 @@
1
1
  import "./index.less";
2
- declare const Schedules: (props: any) => any;
2
+ declare const Schedules: (props: any) => JSX.Element;
3
3
  export default Schedules;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem, ScheduleItem } from "./type";
3
2
  import dayjs from "dayjs";
4
3
  export interface FormState {
@@ -69,7 +68,7 @@ export interface FormState {
69
68
  };
70
69
  setGlobalState: Function | null;
71
70
  }
72
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
71
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
73
72
  state: FormState;
74
73
  } & {
75
74
  dispatch: (params: {
@@ -13,5 +13,5 @@ export interface InfoProps {
13
13
  setGlobalState: any;
14
14
  }
15
15
  export declare const formatProducts: (values: any) => any;
16
- declare const Addons: (props: any) => any;
16
+ declare const Addons: (props: any) => JSX.Element;
17
17
  export default Addons;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -21,5 +21,5 @@ export interface InfoProps {
21
21
  * @Author: zhiwei.Wang
22
22
  * @Date: 2024-01-30 17:10
23
23
  */
24
- declare const Forms: (props: any) => any;
24
+ declare const Forms: (props: any) => JSX.Element;
25
25
  export default Forms;
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Forms: (props: any) => any;
8
+ declare const Forms: (props: any) => JSX.Element;
9
9
  export default Forms;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -1,2 +1,2 @@
1
- declare const Booking: (props: any) => any;
1
+ declare const Booking: (props: any) => JSX.Element;
2
2
  export default Booking;
@@ -8,5 +8,5 @@ export interface InfoProps {
8
8
  slot: any;
9
9
  setState: any;
10
10
  }
11
- declare const Info: (props: any) => any;
11
+ declare const Info: (props: any) => JSX.Element;
12
12
  export default Info;
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
2
  export declare const walkInData: {
4
3
  id: number;
5
4
  nickname: string;
6
5
  };
7
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
6
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
8
7
  state: FormState;
9
8
  } & {
10
9
  dispatch: (params: {