@titaui/pc 1.12.49-beta.1 → 1.12.49-beta.2
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/lib/components/attachments-preview/index.css +5 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +41 -20
- package/lib/components/dynamic/dynamic-item/components/summary-header/request-api.js +9 -3
- package/lib/components/guide-tip/index.css +1 -1
- package/lib/components/guide-tip/index.js +7 -4
- package/lib/components/nav-top/components/app-center/index.css +11 -0
- package/lib/components/nav-top/components/app-center/index.js +59 -12
- package/lib/components/picker/components/panels/year-panel/index.js +3 -34
- package/package.json +1 -1
|
@@ -53,14 +53,14 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
53
53
|
|
|
54
54
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
55
55
|
|
|
56
|
-
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, $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 generator._invoke = function (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); } }; }(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; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return 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, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), 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 (object) { var 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; }
|
|
57
|
-
|
|
58
56
|
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; }
|
|
59
57
|
|
|
60
58
|
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; }
|
|
61
59
|
|
|
62
60
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
63
61
|
|
|
62
|
+
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, $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 generator._invoke = function (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); } }; }(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; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return 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, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), 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 (object) { var 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; }
|
|
63
|
+
|
|
64
64
|
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); } }
|
|
65
65
|
|
|
66
66
|
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); }); }; }
|
|
@@ -195,17 +195,38 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
195
195
|
setSelectVisible(false);
|
|
196
196
|
};
|
|
197
197
|
|
|
198
|
-
var enSureDeleteDynamic = function
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
198
|
+
var enSureDeleteDynamic = /*#__PURE__*/function () {
|
|
199
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
200
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
201
|
+
while (1) {
|
|
202
|
+
switch (_context.prev = _context.next) {
|
|
203
|
+
case 0:
|
|
204
|
+
_context.next = 2;
|
|
205
|
+
return (0, _requestApi2.deleteSummary)(feedId);
|
|
203
206
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
+
case 2:
|
|
208
|
+
_toast["default"].Success((0, _getLocale.getLocale)("Pro_detail_Deletsuccess"), {
|
|
209
|
+
canClose: false
|
|
210
|
+
});
|
|
207
211
|
|
|
208
|
-
|
|
212
|
+
setShowDialogConfirm(false);
|
|
213
|
+
|
|
214
|
+
if (onDeleteFeed) {
|
|
215
|
+
onDeleteFeed(feedId);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
case 5:
|
|
219
|
+
case "end":
|
|
220
|
+
return _context.stop();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}, _callee);
|
|
224
|
+
}));
|
|
225
|
+
|
|
226
|
+
return function enSureDeleteDynamic() {
|
|
227
|
+
return _ref2.apply(this, arguments);
|
|
228
|
+
};
|
|
229
|
+
}();
|
|
209
230
|
|
|
210
231
|
var cancelDeleteDynamic = function cancelDeleteDynamic() {
|
|
211
232
|
setShowDialogConfirm(false);
|
|
@@ -229,23 +250,23 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
229
250
|
};
|
|
230
251
|
|
|
231
252
|
var handleCloseEvaluateDialog = /*#__PURE__*/function () {
|
|
232
|
-
var
|
|
253
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
233
254
|
var _user;
|
|
234
255
|
|
|
235
|
-
return _regeneratorRuntime().wrap(function
|
|
256
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
236
257
|
while (1) {
|
|
237
|
-
switch (
|
|
258
|
+
switch (_context2.prev = _context2.next) {
|
|
238
259
|
case 0:
|
|
239
260
|
if (!params) {
|
|
240
|
-
|
|
261
|
+
_context2.next = 5;
|
|
241
262
|
break;
|
|
242
263
|
}
|
|
243
264
|
|
|
244
|
-
|
|
265
|
+
_context2.next = 3;
|
|
245
266
|
return (0, _requestApi2.getUserById)(loginUserId);
|
|
246
267
|
|
|
247
268
|
case 3:
|
|
248
|
-
_user =
|
|
269
|
+
_user = _context2.sent;
|
|
249
270
|
setEvaluates([_objectSpread(_objectSpread({}, params), {}, {
|
|
250
271
|
user: _user
|
|
251
272
|
})]);
|
|
@@ -255,14 +276,14 @@ var DynamicItemHeader = function DynamicItemHeader(_ref) {
|
|
|
255
276
|
|
|
256
277
|
case 6:
|
|
257
278
|
case "end":
|
|
258
|
-
return
|
|
279
|
+
return _context2.stop();
|
|
259
280
|
}
|
|
260
281
|
}
|
|
261
|
-
},
|
|
282
|
+
}, _callee2);
|
|
262
283
|
}));
|
|
263
284
|
|
|
264
285
|
return function handleCloseEvaluateDialog(_x) {
|
|
265
|
-
return
|
|
286
|
+
return _ref3.apply(this, arguments);
|
|
266
287
|
};
|
|
267
288
|
}();
|
|
268
289
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getUserById = void 0;
|
|
6
|
+
exports.getUserById = exports.deleteSummary = void 0;
|
|
7
7
|
|
|
8
|
-
var _request = require("
|
|
8
|
+
var _request = require("@titaui/request");
|
|
9
9
|
|
|
10
10
|
// @ts-ignore
|
|
11
11
|
var getUserById = function getUserById(userId) {
|
|
@@ -14,4 +14,10 @@ var getUserById = function getUserById(userId) {
|
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
exports.getUserById = getUserById;
|
|
17
|
+
exports.getUserById = getUserById;
|
|
18
|
+
|
|
19
|
+
var deleteSummary = function deleteSummary(id) {
|
|
20
|
+
return (0, _request.rpost)("v1")("/summary/delete/".concat(id));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.deleteSummary = deleteSummary;
|
|
@@ -17,7 +17,7 @@ var _button = _interopRequireDefault(require("../button"));
|
|
|
17
17
|
|
|
18
18
|
require("./index.css");
|
|
19
19
|
|
|
20
|
-
var _excluded = ["type", "width", "time", "children", "popupPlacement", "classnames", "content", "onClickClose", "buttonTitle"];
|
|
20
|
+
var _excluded = ["type", "width", "time", "children", "popupPlacement", "classnames", "content", "onClickClose", "buttonTitle", "visible"];
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
23
|
|
|
@@ -72,6 +72,8 @@ var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
72
72
|
onClickClose = props.onClickClose,
|
|
73
73
|
_props$buttonTitle = props.buttonTitle,
|
|
74
74
|
buttonTitle = _props$buttonTitle === void 0 ? '好哒' : _props$buttonTitle,
|
|
75
|
+
_props$visible = props.visible,
|
|
76
|
+
visible = _props$visible === void 0 ? false : _props$visible,
|
|
75
77
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
76
78
|
|
|
77
79
|
var handleCloseGuidePopup = function handleCloseGuidePopup() {
|
|
@@ -92,7 +94,8 @@ var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
92
94
|
onClick: handleCloseGuidePopup
|
|
93
95
|
})), type === 'button' && /*#__PURE__*/_react["default"].createElement(_button["default"].Rect, {
|
|
94
96
|
text: buttonTitle,
|
|
95
|
-
size: "small"
|
|
97
|
+
size: "small",
|
|
98
|
+
onClick: handleCloseGuidePopup
|
|
96
99
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
97
100
|
className: (0, _classnames["default"])("".concat(preCls, "__popup-triangle"), "".concat(preCls, "__popup-triangle--").concat(popupPlacement))
|
|
98
101
|
}));
|
|
@@ -111,7 +114,7 @@ var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
111
114
|
(0, _react.useEffect)(function () {
|
|
112
115
|
if (type === 'time') {
|
|
113
116
|
setTimeout(function () {
|
|
114
|
-
|
|
117
|
+
popupRef.current.close();
|
|
115
118
|
}, time);
|
|
116
119
|
}
|
|
117
120
|
}, []);
|
|
@@ -120,7 +123,7 @@ var GuideTip = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
120
123
|
action: ['focus'],
|
|
121
124
|
popupPlacement: popupPlacement,
|
|
122
125
|
popup: renderPopupContent(),
|
|
123
|
-
popupVisible:
|
|
126
|
+
popupVisible: visible
|
|
124
127
|
}, restProps), children);
|
|
125
128
|
});
|
|
126
129
|
var _default = GuideTip;
|
|
@@ -145,6 +145,17 @@
|
|
|
145
145
|
background-color: rgba(90, 216, 166, 0.1);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
.app-center__app-guide .titaui-pc__guide-tip__popup-triangle {
|
|
149
|
+
left: 18%;
|
|
150
|
+
bottom: -5px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.app-center__app-guide-content {
|
|
154
|
+
font-size: 14px;
|
|
155
|
+
color: #FFFFFF;
|
|
156
|
+
line-height: 22px;
|
|
157
|
+
}
|
|
158
|
+
|
|
148
159
|
.app-center__drawer {
|
|
149
160
|
transform: translateY(54px);
|
|
150
161
|
}
|
|
@@ -13,6 +13,10 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _drawer = _interopRequireDefault(require("../../../drawer"));
|
|
15
15
|
|
|
16
|
+
var _conditionRender = _interopRequireDefault(require("../../../condition-render"));
|
|
17
|
+
|
|
18
|
+
var _guideTip = _interopRequireDefault(require("../../../guide-tip"));
|
|
19
|
+
|
|
16
20
|
var _bookDemo = _interopRequireDefault(require("../../../book-demo"));
|
|
17
21
|
|
|
18
22
|
var _errorBoundary = _interopRequireDefault(require("../../../error-boundary"));
|
|
@@ -21,6 +25,8 @@ var _utils = require("../../utils");
|
|
|
21
25
|
|
|
22
26
|
var _errorLevel = _interopRequireDefault(require("../../../../utils/error-level"));
|
|
23
27
|
|
|
28
|
+
var _helpers = require("../../../../utils/helpers");
|
|
29
|
+
|
|
24
30
|
require("./index.css");
|
|
25
31
|
|
|
26
32
|
var _interface = require("./interface");
|
|
@@ -54,6 +60,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
54
60
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
55
61
|
|
|
56
62
|
var precls = 'app-center';
|
|
63
|
+
var userId = (0, _helpers.getLoginUserInfo)().Id;
|
|
57
64
|
|
|
58
65
|
var AppCenter = function AppCenter(props) {
|
|
59
66
|
var _props$appCenterVisib = props.appCenterVisible,
|
|
@@ -99,10 +106,34 @@ var AppCenter = function AppCenter(props) {
|
|
|
99
106
|
currentAppId = _useState8[0],
|
|
100
107
|
setCurrentAppId = _useState8[1];
|
|
101
108
|
|
|
109
|
+
var _useState9 = (0, _react.useState)(false),
|
|
110
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
111
|
+
summaryGuideVisible = _useState10[0],
|
|
112
|
+
setSummaryGuideVisible = _useState10[1];
|
|
113
|
+
|
|
102
114
|
var bookDemoRef = (0, _react.useRef)();
|
|
115
|
+
|
|
116
|
+
var handleCloseSummaryGuide = function handleCloseSummaryGuide() {
|
|
117
|
+
setSummaryGuideVisible(false);
|
|
118
|
+
var cacheIsKonw = localStorage.getItem("NewSummaryGuide_".concat(userId));
|
|
119
|
+
|
|
120
|
+
if (!cacheIsKonw) {
|
|
121
|
+
localStorage.setItem("NewSummaryGuide_".concat(userId), "".concat(userId));
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
103
125
|
(0, _react.useEffect)(function () {
|
|
104
126
|
setInit(true);
|
|
105
127
|
}, []);
|
|
128
|
+
(0, _react.useEffect)(function () {
|
|
129
|
+
var cacheIsKonw = localStorage.getItem("NewSummaryGuide_".concat(userId));
|
|
130
|
+
|
|
131
|
+
if (cacheIsKonw) {
|
|
132
|
+
setSummaryGuideVisible(false);
|
|
133
|
+
} else {
|
|
134
|
+
setSummaryGuideVisible(true);
|
|
135
|
+
}
|
|
136
|
+
}, []);
|
|
106
137
|
(0, _react.useEffect)(function () {
|
|
107
138
|
var _apps$find;
|
|
108
139
|
|
|
@@ -160,18 +191,7 @@ var AppCenter = function AppCenter(props) {
|
|
|
160
191
|
}
|
|
161
192
|
};
|
|
162
193
|
|
|
163
|
-
|
|
164
|
-
className: "".concat(precls, "__drawer"),
|
|
165
|
-
placement: "top",
|
|
166
|
-
onClose: closeAppCenter,
|
|
167
|
-
visible: appCenterVisible,
|
|
168
|
-
width: "100%",
|
|
169
|
-
autoClosable: true
|
|
170
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
|
-
className: precls
|
|
172
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
173
|
-
className: "".concat(precls, "__app-list")
|
|
174
|
-
}, apps.length > 0 && apps.map(function (app) {
|
|
194
|
+
var renderAppItem = function renderAppItem(app) {
|
|
175
195
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
196
|
className: "".concat(precls, "__app-item ").concat(precls, "__app-item--").concat(app.code),
|
|
177
197
|
onClick: function onClick() {
|
|
@@ -186,6 +206,33 @@ var AppCenter = function AppCenter(props) {
|
|
|
186
206
|
}, app.title), isTrial && /*#__PURE__*/_react["default"].createElement("span", {
|
|
187
207
|
className: "".concat(precls, "__app-item-sub-title")
|
|
188
208
|
}, app.subTitle)));
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
return /*#__PURE__*/_react["default"].createElement(_drawer["default"], {
|
|
212
|
+
className: "".concat(precls, "__drawer"),
|
|
213
|
+
placement: "top",
|
|
214
|
+
onClose: closeAppCenter,
|
|
215
|
+
visible: appCenterVisible,
|
|
216
|
+
width: "100%",
|
|
217
|
+
autoClosable: true
|
|
218
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
219
|
+
className: precls
|
|
220
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
221
|
+
className: "".concat(precls, "__app-list")
|
|
222
|
+
}, apps.length > 0 && apps.map(function (app) {
|
|
223
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
224
|
+
condition: app.code === 'daily'
|
|
225
|
+
}, /*#__PURE__*/_react["default"].createElement(_guideTip["default"], {
|
|
226
|
+
visible: summaryGuideVisible,
|
|
227
|
+
content: /*#__PURE__*/_react["default"].createElement("span", {
|
|
228
|
+
className: "".concat(precls, "__app-guide-content")
|
|
229
|
+
}, "\uD83C\uDF89 \u603B\u7ED3\u5347\u7EA7\uFF01\u5168\u65B0\u63A8\u51FA OKR \u603B\u7ED3\u6A21\u7248\uFF0C\u7528\u603B\u7ED3\u6765\u5B9E\u73B0 OKR \u95ED\u73AF\uFF01"),
|
|
230
|
+
type: 'button',
|
|
231
|
+
classnames: "".concat(precls, "__app-guide"),
|
|
232
|
+
onClickClose: handleCloseSummaryGuide
|
|
233
|
+
}, renderAppItem(app))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
|
|
234
|
+
condition: app.code !== 'daily'
|
|
235
|
+
}, renderAppItem(app)));
|
|
189
236
|
}), new Array(20).fill(1).map(function () {
|
|
190
237
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
191
238
|
className: "".concat(precls, "__app-item-placeholder")
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = void 0;
|
|
9
7
|
|
|
10
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
11
|
|
|
@@ -23,10 +21,6 @@ require("./index.css");
|
|
|
23
21
|
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
23
|
|
|
26
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
-
|
|
28
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
-
|
|
30
24
|
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); }
|
|
31
25
|
|
|
32
26
|
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; }
|
|
@@ -35,28 +29,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
35
29
|
|
|
36
30
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
37
31
|
|
|
38
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
39
|
-
|
|
40
|
-
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."); }
|
|
41
|
-
|
|
42
|
-
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); }
|
|
43
|
-
|
|
44
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
45
|
-
|
|
46
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
47
|
-
|
|
48
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
|
-
|
|
50
32
|
var YearPanel = function YearPanel(props) {
|
|
51
33
|
var onViewDateChange = props.onViewDateChange,
|
|
52
34
|
viewDate = props.viewDate;
|
|
53
|
-
|
|
54
|
-
var _useState = (0, _react.useState)(),
|
|
55
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
56
|
-
newViewDate = _useState2[0],
|
|
57
|
-
setNewViewDate = _useState2[1];
|
|
58
|
-
|
|
59
|
-
var yearNumber = (0, _moment["default"])(newViewDate).year();
|
|
35
|
+
var yearNumber = (0, _moment["default"])(viewDate).year();
|
|
60
36
|
|
|
61
37
|
var startYear = Math.floor(yearNumber / _utils.YEAR_DECADE_COUNT) * _utils.YEAR_DECADE_COUNT;
|
|
62
38
|
|
|
@@ -64,7 +40,7 @@ var YearPanel = function YearPanel(props) {
|
|
|
64
40
|
|
|
65
41
|
var onDecadeYearChange = function onDecadeYearChange(diff) {
|
|
66
42
|
if (onViewDateChange) {
|
|
67
|
-
onViewDateChange((0, _moment["default"])(
|
|
43
|
+
onViewDateChange((0, _moment["default"])(viewDate).add(diff, 'y'));
|
|
68
44
|
}
|
|
69
45
|
};
|
|
70
46
|
|
|
@@ -73,13 +49,6 @@ var YearPanel = function YearPanel(props) {
|
|
|
73
49
|
endYear: endYear
|
|
74
50
|
}));
|
|
75
51
|
|
|
76
|
-
(0, _react.useEffect)(function () {
|
|
77
|
-
if (typeof viewDate === 'string') {
|
|
78
|
-
setNewViewDate(viewDate.split('~')[0]);
|
|
79
|
-
} else {
|
|
80
|
-
setNewViewDate(viewDate);
|
|
81
|
-
}
|
|
82
|
-
}, []);
|
|
83
52
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
53
|
className: (0, _classnames["default"])("".concat(_utils.PickerPanelClass, "__year"))
|
|
85
54
|
}, /*#__PURE__*/_react["default"].createElement(_yearHead["default"], _extends({}, extendProps, {
|