@titaui/pc 1.12.26 → 1.12.27

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 (120) hide show
  1. package/lib/components/change-okr-modal/index.js +1 -1
  2. package/lib/components/common-share/publishMblog.js +1 -1
  3. package/lib/components/create-okr-modal/fields/okr-type-detail.js +1 -1
  4. package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +1 -1
  5. package/lib/components/create-okr-modal/index.js +1 -1
  6. package/lib/components/create-okr-modal/request-api.js +1 -1
  7. package/lib/components/create-okr-modal/utils/helper.js +1 -1
  8. package/lib/components/date-picker/BodyItem.js +3 -3
  9. package/lib/components/date-picker/CalendarHeader.js +3 -3
  10. package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
  11. package/lib/components/drawer-manager/drawerWrapper.js +1 -1
  12. package/lib/components/dynamic/constant.js +2 -1
  13. package/lib/components/dynamic/dynamic-item/dynamic-discovery/dynamic-footer.js +281 -0
  14. package/lib/components/dynamic/dynamic-item/dynamic-discovery/index.js +44 -0
  15. package/lib/components/dynamic/dynamic-item/index.js +8 -1
  16. package/lib/components/eReport/eReportLists/reportList.js +3 -3
  17. package/lib/components/emotions-selector/selector-pop.js +3 -3
  18. package/lib/components/ereport-list/index.js +3 -3
  19. package/lib/components/firework/index.js +1 -1
  20. package/lib/components/form/form-fields/input-verification-code/index.js +1 -1
  21. package/lib/components/grid-layout/util/network.js +1 -1
  22. package/lib/components/mblog/components/MblogAction.js +3 -3
  23. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -1
  24. package/lib/components/okr-detail/components/ao-nice/index.js +1 -1
  25. package/lib/components/okr-detail/components/header/edit-name.js +1 -1
  26. package/lib/components/okr-detail/components/header/o-avatar.js +1 -1
  27. package/lib/components/okr-detail/components/header/o-classify.js +1 -1
  28. package/lib/components/okr-detail/components/o-classify.js +1 -1
  29. package/lib/components/okr-detail/components/o-progress-update/index.js +1 -1
  30. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +1 -1
  31. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +1 -1
  32. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +1 -1
  33. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +1 -1
  34. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
  35. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +1 -1
  36. package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +1 -1
  37. package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +1 -1
  38. package/lib/components/okr-detail/detail-footer/index.js +1 -1
  39. package/lib/components/okr-detail/detail-header/index.js +1 -1
  40. package/lib/components/okr-detail/okr-list/index.js +1 -1
  41. package/lib/components/okr-detail/request-apis.js +1 -1
  42. package/lib/components/okr-flow/child-node/fields/creator.js +1 -1
  43. package/lib/components/okr-flow/child-node/work-node.js +1 -1
  44. package/lib/components/okr-flow/export-modal/index.js +1 -11
  45. package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +1 -1
  46. package/lib/components/okr-flow/request-apis.js +1 -1
  47. package/lib/components/okr-flow/root-node/index.js +1 -1
  48. package/lib/components/okr-progress/components/o-progress-update/index.js +1 -1
  49. package/lib/components/okr-progress-modal/index.js +1 -1
  50. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +1 -1
  51. package/lib/components/okr-review/components/ReviewItem/index.js +3 -3
  52. package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
  53. package/lib/components/okr-share/common-painter/darwAvatar.js +1 -1
  54. package/lib/components/okr-share/common-painter/openDataPainter.js +1 -1
  55. package/lib/components/okr-share/common-painter/utils.js +1 -1
  56. package/lib/components/okr-share/pink-card/drawDepartmentName.js +1 -1
  57. package/lib/components/okr-share/pink-card/drawKrs.js +1 -1
  58. package/lib/components/okr-share/pink-card/drawQuote.js +1 -1
  59. package/lib/components/okr-share/pink-card/drawUserName.js +1 -1
  60. package/lib/components/okr-share/pink-card/index.js +1 -1
  61. package/lib/components/okr-share/publishMblog.js +1 -1
  62. package/lib/components/okr-share/shareCardSelector.js +1 -1
  63. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +1 -3
  64. package/lib/components/okrcase-library/server/network.js +1 -1
  65. package/lib/components/open-data-painter/index.js +1 -1
  66. package/lib/components/period-selector/helper/index.js +1 -1
  67. package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
  68. package/lib/components/rich-editor/models/schema.js +6 -6
  69. package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
  70. package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
  71. package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
  72. package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
  73. package/lib/components/rich-editor/plugins/core/index.js +4 -4
  74. package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
  75. package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
  76. package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
  77. package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
  78. package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
  79. package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
  80. package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
  81. package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
  82. package/lib/components/rich-editor/react/uiProvider.js +3 -3
  83. package/lib/components/rich-editor/ui/Popup/index.js +3 -3
  84. package/lib/components/select/Option.js +3 -3
  85. package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +1 -1
  86. package/lib/components/superset-charts/fetch-assets-and-append/index.js +1 -1
  87. package/lib/components/survey-model/request-api.js +1 -1
  88. package/lib/components/task-relation-modal/index.js +1 -1
  89. package/lib/components/task-relation-modal/tree/category-tree/index.js +1 -1
  90. package/lib/components/task-relation-modal/tree/okr-tree/index.js +1 -1
  91. package/lib/components/task-relation-modal/tree/work-tree/index.js +1 -1
  92. package/lib/components/task-relation-modal/work-relation/index.js +1 -1
  93. package/lib/components/task-tree/task-item-node/e-project.js +1 -1
  94. package/lib/components/task-tree/task-item-node/e-task.js +1 -1
  95. package/lib/components/tita-chart/errorBoundary/index.js +3 -3
  96. package/lib/components/toast/index.js +1 -1
  97. package/lib/components/upvote/index.js +1 -1
  98. package/lib/components/version-change-modal/index.js +1 -1
  99. package/lib/components/version-change-modal/request-api.js +1 -1
  100. package/lib/components/weekly-report/card.js +1 -11
  101. package/lib/components/weekly-report/common-painter/darwAvatar.js +1 -1
  102. package/lib/components/weekly-report/common-painter/drawName.js +1 -1
  103. package/lib/components/weekly-report/common-painter/openDataPainter.js +1 -1
  104. package/lib/components/weekly-report/index.js +1 -1
  105. package/lib/components-v1/animate/AnimateChild.js +3 -3
  106. package/lib/components-v1/avatar/index.js +3 -3
  107. package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
  108. package/lib/components-v1/progress/CircleProgress.js +3 -3
  109. package/lib/components-v1/select/Option.js +3 -3
  110. package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
  111. package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
  112. package/lib/components-v1/userSelector/components/UserItem.js +3 -3
  113. package/lib/pages/group-management/groupInterface.js +1 -1
  114. package/lib/pages/new-okr-list/request-api.js +1 -1
  115. package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +1 -1
  116. package/lib/pages/okr-map/request-apis.js +1 -1
  117. package/lib/utils/open-data.js +1 -1
  118. package/lib/utils/request-v1.js +1 -1
  119. package/lib/utils/request.js +1 -1
  120. package/package.json +1 -1
@@ -31,7 +31,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
31
31
 
32
32
  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; }
33
33
 
34
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ /*! 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; }
34
+ 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; }
35
35
 
36
36
  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); } }
37
37
 
@@ -53,6 +53,7 @@ exports.EFeedType = EFeedType;
53
53
  EFeedType[EFeedType["O"] = 101] = "O";
54
54
  EFeedType[EFeedType["OKRsCommunication"] = 102] = "OKRsCommunication";
55
55
  EFeedType[EFeedType["Interview"] = 103] = "Interview";
56
+ EFeedType[EFeedType["Discovery"] = 2] = "Discovery";
56
57
  })(EFeedType || (exports.EFeedType = EFeedType = {}));
57
58
 
58
59
  var EShareType;
@@ -119,7 +120,7 @@ var EStatusStatus2ClassType = {
119
120
  5: "tu-icon-weijieshou-right"
120
121
  };
121
122
  exports.EStatusStatus2ClassType = EStatusStatus2ClassType;
122
- var PlanReportType = ["titaPlanReport", "titaPlanManagerReport"];
123
+ var PlanReportType = ["titaPlanReport", "titaPlanManagerReport", "TeamCompletionNotice"];
123
124
  exports.PlanReportType = PlanReportType;
124
125
  var PlanReportTrackActionNameMap = {
125
126
  titaPlanReport: "动态日报推送",
@@ -0,0 +1,281 @@
1
+ "use strict";
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
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _conditionRender = _interopRequireDefault(require("../../../condition-render"));
15
+
16
+ var _bsGlobal = require("../../../../utils/bs-global");
17
+
18
+ var _communication = _interopRequireDefault(require("../../../communication"));
19
+
20
+ var _avatar = _interopRequireDefault(require("../../../avatar"));
21
+
22
+ var _tooltip = _interopRequireDefault(require("../../../tooltip"));
23
+
24
+ var _upvote = _interopRequireDefault(require("../../../upvote"));
25
+
26
+ var _upvoteListModal = _interopRequireDefault(require("../../../upvote/upvoteListModal"));
27
+
28
+ var _getLocale = require("../../../../utils/getLocale");
29
+
30
+ var _context = require("../../context");
31
+
32
+ var _constant = require("../../constant");
33
+
34
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
+
36
+ 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); }
37
+
38
+ 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; }
39
+
40
+ 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; }
41
+
42
+ 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; }
43
+
44
+ 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; }
45
+
46
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
47
+
48
+ 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."); }
49
+
50
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
51
+
52
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
53
+
54
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
55
+
56
+ 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."); }
57
+
58
+ 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); }
59
+
60
+ 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; }
61
+
62
+ 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; }
63
+
64
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
65
+
66
+ var prefix = "titaui-dynamic-item";
67
+
68
+ var DynamicFooter = function DynamicFooter(_ref) {
69
+ var _getBSGlobal;
70
+
71
+ var data = _ref.data,
72
+ dailyReportType = _ref.dailyReportType;
73
+ var feedId = data.feedId,
74
+ feedComments = data.feedComments,
75
+ praiseType = data.praiseType,
76
+ praiseUsers = data.praiseUsers,
77
+ feedType = data.feedType,
78
+ publishUser = data.publishUser;
79
+
80
+ var _useState = (0, _react.useState)(true),
81
+ _useState2 = _slicedToArray(_useState, 2),
82
+ usePropsComment = _useState2[0],
83
+ setUsePropsComment = _useState2[1];
84
+
85
+ var _useState3 = (0, _react.useState)(feedComments.total > 0),
86
+ _useState4 = _slicedToArray(_useState3, 2),
87
+ showComment = _useState4[0],
88
+ setShowComment = _useState4[1];
89
+
90
+ var _useState5 = (0, _react.useState)(praiseUsers || []),
91
+ _useState6 = _slicedToArray(_useState5, 2),
92
+ praiseData = _useState6[0],
93
+ setPraiseData = _useState6[1];
94
+
95
+ var _useState7 = (0, _react.useState)(false),
96
+ _useState8 = _slicedToArray(_useState7, 2),
97
+ upvoteModalVisible = _useState8[0],
98
+ setUpvoteModalVisible = _useState8[1];
99
+
100
+ var communicationRef = (0, _react.useRef)();
101
+ var productName = _constant.PlanReportTrackActionNameMap[dailyReportType];
102
+ var hasRewardBtn = !!((_getBSGlobal = (0, _bsGlobal.getBSGlobal)("WebHead")) !== null && _getBSGlobal !== void 0 && _getBSGlobal.AppHead.find(function (item) {
103
+ return item.AppId === "950";
104
+ }));
105
+
106
+ var _useContext = (0, _react.useContext)(_context.SearchKeyContext),
107
+ searchKeyWord = _useContext.searchKeyWord;
108
+
109
+ var handleCommentClick = function handleCommentClick() {
110
+ setShowComment(!showComment);
111
+ setUsePropsComment(false);
112
+ };
113
+
114
+ var onChangeParse = function onChangeParse(type) {
115
+ var _getBSGlobal2 = (0, _bsGlobal.getBSGlobal)("loginUserInfo"),
116
+ Id = _getBSGlobal2.Id;
117
+
118
+ var data = _toConsumableArray(praiseData).filter(function (item) {
119
+ return Number("".concat(item.userId)) !== Number("".concat(Id));
120
+ });
121
+
122
+ var actionName = "";
123
+
124
+ if (type) {
125
+ var avatar = (0, _bsGlobal.getBSGlobal)("loginUserInfo").UserAvatar;
126
+ var name = (0, _bsGlobal.getBSGlobal)("loginUserInfo").Name;
127
+ avatar.color = avatar.Color;
128
+ avatar.medium = avatar.Medium;
129
+ var parseUser = {
130
+ avatar: avatar,
131
+ name: name,
132
+ userId: Id,
133
+ praiseType: type
134
+ };
135
+ setPraiseData([parseUser].concat(_toConsumableArray(data)));
136
+ actionName = "点赞";
137
+ } else {
138
+ setPraiseData(data);
139
+ actionName = "取消点赞";
140
+ }
141
+
142
+ if (window.titaTracker) {
143
+ window.titaTracker("action").record({
144
+ actionName: actionName,
145
+ actionGroup: "互动",
146
+ productName: productName
147
+ });
148
+ }
149
+ };
150
+
151
+ var handlePayReward = function handlePayReward() {
152
+ var data = {
153
+ multi: false,
154
+ toUserInfo: _objectSpread(_objectSpread({}, publishUser), {}, {
155
+ id: publishUser.userId
156
+ }),
157
+ objId: feedId,
158
+ objType: feedType
159
+ };
160
+
161
+ if (window.util) {
162
+ if (window.titaTracker) {
163
+ window.titaTracker("action").record({
164
+ actionName: "打开打赏弹层",
165
+ actionGroup: "互动",
166
+ productName: productName
167
+ });
168
+ }
169
+
170
+ window.util.rewardGetFile(function (myReward) {
171
+ myReward.renderPayReward(data);
172
+ });
173
+ }
174
+ };
175
+
176
+ var renderUpvoteCount = function renderUpvoteCount(type, count) {
177
+ if (count === 0) {
178
+ return "";
179
+ }
180
+
181
+ return count || type;
182
+ };
183
+
184
+ var handleReply = function handleReply(_ref2) {
185
+ var submitType = _ref2.submitType;
186
+ var actionName = submitType === "delete" ? "删除评论" : "评论";
187
+
188
+ if (window.titaTracker) {
189
+ window.titaTracker("action").record({
190
+ actionName: actionName,
191
+ actionGroup: "互动",
192
+ productName: productName
193
+ });
194
+ }
195
+ };
196
+
197
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
198
+ className: (0, _classnames["default"])("".concat(prefix, "__footer"))
199
+ }, /*#__PURE__*/_react["default"].createElement("div", {
200
+ className: "".concat(prefix, "__footer-left")
201
+ }, praiseData.map(function (item, index) {
202
+ if (index >= 8) return /*#__PURE__*/_react["default"].createElement("span", null);
203
+ return /*#__PURE__*/_react["default"].createElement("div", {
204
+ className: "".concat(prefix, "__footer-left-item"),
205
+ key: item.userId
206
+ }, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Icon, {
207
+ name: item.name,
208
+ userId: item.userId,
209
+ avatar: item.avatar,
210
+ type: item.praiseType,
211
+ size: {
212
+ width: 28,
213
+ textNum: 1,
214
+ fontSize: 12
215
+ }
216
+ }));
217
+ }), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
218
+ condition: praiseData && praiseData.length > 8
219
+ }, /*#__PURE__*/_react["default"].createElement(_avatar["default"].Num, {
220
+ onClick: function onClick() {
221
+ return setUpvoteModalVisible(true);
222
+ },
223
+ num: praiseData.length - 8
224
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
225
+ className: "".concat(prefix, "__footer-right")
226
+ }, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
227
+ condition: hasRewardBtn
228
+ }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
229
+ overlay: (0, _getLocale.getLocale)("Feed_Approval"),
230
+ align: {
231
+ offset: [0, 0]
232
+ },
233
+ placement: "top"
234
+ }, /*#__PURE__*/_react["default"].createElement("span", {
235
+ onClick: handlePayReward,
236
+ className: (0, _classnames["default"])("".concat(prefix, "__footer-icon"), "".concat(prefix, "__footer-icon-redenvelopes"))
237
+ }))), /*#__PURE__*/_react["default"].createElement("span", {
238
+ onClick: handleCommentClick,
239
+ className: (0, _classnames["default"])("tu-icon-pinglun-m", "".concat(prefix, "__footer-icon"))
240
+ }, /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
241
+ condition: feedComments.total > 0
242
+ }, /*#__PURE__*/_react["default"].createElement("span", {
243
+ className: "".concat(prefix, "__footer-number")
244
+ }, feedComments.total))), /*#__PURE__*/_react["default"].createElement(_upvote["default"], {
245
+ type: praiseType,
246
+ count: praiseUsers ? praiseUsers.length : 0,
247
+ feedId: feedId,
248
+ onChange: onChangeParse,
249
+ style: {
250
+ marginLeft: 30
251
+ },
252
+ buttonType: "tu-icon-tyle-column",
253
+ customUpvoteBtnCls: "".concat(prefix, "__upvote-btn"),
254
+ renderCount: renderUpvoteCount
255
+ }), /*#__PURE__*/_react["default"].createElement(_upvoteListModal["default"], {
256
+ feedId: feedId,
257
+ visible: upvoteModalVisible,
258
+ onClose: function onClose() {
259
+ return setUpvoteModalVisible(false);
260
+ }
261
+ }))), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
262
+ condition: showComment
263
+ }, /*#__PURE__*/_react["default"].createElement("div", {
264
+ className: (0, _classnames["default"])("".concat(prefix, "__communication"))
265
+ }, /*#__PURE__*/_react["default"].createElement(_communication["default"], {
266
+ feedId: feedId,
267
+ commentCount: 3,
268
+ ref: communicationRef,
269
+ highLightKeyWord: searchKeyWord,
270
+ autoFocus: feedComments.total === 0,
271
+ usePropsComment: usePropsComment,
272
+ communication: feedComments.comments,
273
+ totalCommunicationNum: feedComments.total,
274
+ onReplyChange: handleReply,
275
+ showUser: true,
276
+ showDefaultInput: true
277
+ }))));
278
+ };
279
+
280
+ var _default = DynamicFooter;
281
+ exports["default"] = _default;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _supersetCharts = _interopRequireDefault(require("../../../superset-charts"));
11
+
12
+ var _utils = require("../dynamic-chart/utils");
13
+
14
+ var _dynamicFooter = _interopRequireDefault(require("./dynamic-footer"));
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ 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); }
19
+
20
+ var prefixCls = "titaui-dynamic-item";
21
+
22
+ var DynamicAIDialy = function DynamicAIDialy(_ref) {
23
+ var data = _ref.data;
24
+
25
+ var chartQuery = _react["default"].useMemo(function () {
26
+ return (0, _utils.getChartProps)(data.biId);
27
+ }, [data.biId]);
28
+
29
+ var feedComponent = chartQuery.feedComponent;
30
+ return /*#__PURE__*/_react["default"].createElement("div", {
31
+ className: prefixCls
32
+ }, /*#__PURE__*/_react["default"].createElement(_supersetCharts["default"], _extends({
33
+ feedData: data
34
+ }, chartQuery, {
35
+ type: feedComponent
36
+ })), /*#__PURE__*/_react["default"].createElement(_dynamicFooter["default"], {
37
+ data: data,
38
+ dailyReportType: feedComponent
39
+ }));
40
+ };
41
+
42
+ var _default = /*#__PURE__*/_react["default"].memo(DynamicAIDialy);
43
+
44
+ exports["default"] = _default;
@@ -75,6 +75,8 @@ var _dynamicInterview = _interopRequireDefault(require("./dynamic-interview"));
75
75
 
76
76
  var _dynamicInterviewShare = _interopRequireDefault(require("./dynamic-interview-share"));
77
77
 
78
+ var _dynamicDiscovery = _interopRequireDefault(require("./dynamic-discovery"));
79
+
78
80
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
79
81
 
80
82
  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); }
@@ -168,6 +170,7 @@ var DynamicItem = function DynamicItem(_ref) {
168
170
 
169
171
  var isFeedReport = isBiShare && _constant.PlanReportType.includes((_JSON$parse = JSON.parse(data.biId)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.type);
170
172
 
173
+ var isDiscoveryFeed = data.feedType === _constant.EFeedType.Discovery;
171
174
  var dynamicContentRef = (0, _react.useRef)();
172
175
  var communicationRef = (0, _react.useRef)();
173
176
 
@@ -426,7 +429,11 @@ var DynamicItem = function DynamicItem(_ref) {
426
429
  }, /*#__PURE__*/_react["default"].createElement(_dynamicAiDialy["default"], {
427
430
  data: data
428
431
  })), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
429
- condition: !isFeedReport
432
+ condition: isDiscoveryFeed
433
+ }, /*#__PURE__*/_react["default"].createElement(_dynamicDiscovery["default"], {
434
+ data: data
435
+ })), /*#__PURE__*/_react["default"].createElement(_conditionRender["default"], {
436
+ condition: !isFeedReport && !isDiscoveryFeed
430
437
  }, /*#__PURE__*/_react["default"].createElement("div", {
431
438
  className: "".concat(prefix, "__content"),
432
439
  ref: dynamicContentRef,
@@ -55,7 +55,7 @@ var EReportList = /*#__PURE__*/function (_React$Component) {
55
55
  var _super = _createSuper(EReportList);
56
56
 
57
57
  function EReportList() {
58
- var _temp, _this;
58
+ var _this;
59
59
 
60
60
  _classCallCheck(this, EReportList);
61
61
 
@@ -63,7 +63,7 @@ var EReportList = /*#__PURE__*/function (_React$Component) {
63
63
  args[_key] = arguments[_key];
64
64
  }
65
65
 
66
- return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.state = {
66
+ return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
67
67
  selectedPeriodValue: '',
68
68
  showDatePick: false,
69
69
  eReportWeekList: [],
@@ -178,7 +178,7 @@ var EReportList = /*#__PURE__*/function (_React$Component) {
178
178
  return _this.handlerEReportShareSubmit(submitStatus);
179
179
  }
180
180
  })));
181
- }, _temp));
181
+ }, _assertThisInitialized(_this)));
182
182
  }
183
183
 
184
184
  _createClass(EReportList, [{
@@ -47,7 +47,7 @@ var EmotionsSelectorPop = /*#__PURE__*/function (_PureComponent) {
47
47
  var _super = _createSuper(EmotionsSelectorPop);
48
48
 
49
49
  function EmotionsSelectorPop() {
50
- var _temp, _this;
50
+ var _this;
51
51
 
52
52
  _classCallCheck(this, EmotionsSelectorPop);
53
53
 
@@ -55,7 +55,7 @@ var EmotionsSelectorPop = /*#__PURE__*/function (_PureComponent) {
55
55
  args[_key] = arguments[_key];
56
56
  }
57
57
 
58
- return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function () {
58
+ return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.handleShowPop = function () {
59
59
  setTimeout(function () {
60
60
  // @ts-ignore
61
61
  _this.refs.pop.show(_this.refs.trigger);
@@ -63,7 +63,7 @@ var EmotionsSelectorPop = /*#__PURE__*/function (_PureComponent) {
63
63
  }, _this.handleHide = function () {
64
64
  // @ts-ignore
65
65
  _this.refs.pop.hide();
66
- }, _temp));
66
+ }, _assertThisInitialized(_this)));
67
67
  }
68
68
 
69
69
  _createClass(EmotionsSelectorPop, [{
@@ -57,7 +57,7 @@ var EReportList = /*#__PURE__*/function (_React$Component) {
57
57
  var _super = _createSuper(EReportList);
58
58
 
59
59
  function EReportList() {
60
- var _temp, _this;
60
+ var _this;
61
61
 
62
62
  _classCallCheck(this, EReportList);
63
63
 
@@ -65,7 +65,7 @@ var EReportList = /*#__PURE__*/function (_React$Component) {
65
65
  args[_key] = arguments[_key];
66
66
  }
67
67
 
68
- return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.state = {
68
+ return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
69
69
  selectedPeriodValue: "",
70
70
  showDatePick: false,
71
71
  eReportWeekList: [],
@@ -178,7 +178,7 @@ var EReportList = /*#__PURE__*/function (_React$Component) {
178
178
  return _this.handlerEReportShareSubmit(submitStatus);
179
179
  }
180
180
  })));
181
- }, _temp));
181
+ }, _assertThisInitialized(_this)));
182
182
  }
183
183
 
184
184
  _createClass(EReportList, [{
@@ -11,7 +11,7 @@ var _firework = _interopRequireDefault(require("./firework"));
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
13
 
14
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ /*! 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; }
14
+ 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; }
15
15
 
16
16
  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; }
17
17