@lingxiteam/assets 4.2.1-alpha.2 → 4.3.2-alpha.1

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 (175) hide show
  1. package/es/IconSvg/index.js +8 -7
  2. package/es/error/errorCatch/index.js +1 -1
  3. package/es/error/errorDisplay/Mobile/Drawer/Drawer.js +99 -77
  4. package/es/error/errorDisplay/Mobile/Drawer/index.js +26 -26
  5. package/es/error/errorDisplay/Mobile/ErrorMsg/index.js +127 -129
  6. package/es/error/errorDisplay/Mobile/Modal/Modal.js +46 -31
  7. package/es/error/errorDisplay/Mobile/Modal/index.js +24 -24
  8. package/es/error/errorDisplay/Mobile/defaultGlobalConfig.js +2 -2
  9. package/es/error/errorDisplay/Web/Drawer/Drawer.js +183 -145
  10. package/es/error/errorDisplay/Web/Drawer/DrawerConnect.js +43 -46
  11. package/es/error/errorDisplay/Web/Drawer/index.js +15 -15
  12. package/es/error/errorDisplay/Web/ErrorMsg/index.js +341 -327
  13. package/es/error/errorDisplay/Web/Notification/Notice.js +78 -65
  14. package/es/error/errorDisplay/Web/Notification/Notification.js +15 -15
  15. package/es/error/errorDisplay/Web/Notification/index.js +36 -38
  16. package/es/error/errorDisplay/Web/defaultGlobalConfig.js +2 -2
  17. package/es/error/errorDisplay/compUtils.js +6 -6
  18. package/es/error/errorDisplay/http.js +7 -7
  19. package/es/error/index.js +6 -6
  20. package/es/index.js +5 -5
  21. package/es/rootConfig/index.d.ts +1 -1
  22. package/es/rootConfig/index.js +5 -5
  23. package/es/rootConfig/locales/enus/config-locales-es.d.ts +2 -0
  24. package/es/rootConfig/locales/enus/config-locales-es.js +13 -0
  25. package/es/rootConfig/locales/enus/config-locales-es.mobile.d.ts +2 -0
  26. package/es/rootConfig/locales/enus/config-locales-es.mobile.js +199 -0
  27. package/es/rootConfig/locales/enus/config-locales-es.pc.d.ts +2 -0
  28. package/es/rootConfig/locales/enus/config-locales-es.pc.js +49 -0
  29. package/es/rootConfig/locales/enus/config-locales-es.todo-actionList.d.ts +2 -0
  30. package/es/rootConfig/locales/enus/config-locales-es.todo-actionList.js +1293 -0
  31. package/es/rootConfig/locales/enus/config-locales-es.todo-callback.d.ts +2 -0
  32. package/es/rootConfig/locales/enus/config-locales-es.todo-callback.js +21 -0
  33. package/es/rootConfig/locales/enus/config-locales-es.todo-optionList.d.ts +2 -0
  34. package/es/rootConfig/locales/enus/config-locales-es.todo-optionList.js +339 -0
  35. package/es/rootConfig/locales/zhcn/config-locales-cn.d.ts +2 -0
  36. package/es/rootConfig/locales/zhcn/config-locales-cn.js +13 -0
  37. package/es/rootConfig/locales/zhcn/config-locales-cn.mobile.d.ts +2 -0
  38. package/es/rootConfig/locales/zhcn/config-locales-cn.mobile.js +199 -0
  39. package/es/rootConfig/locales/zhcn/config-locales-cn.pc.d.ts +2 -0
  40. package/es/rootConfig/locales/zhcn/config-locales-cn.pc.js +385 -0
  41. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.d.ts +2 -0
  42. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.js +1297 -0
  43. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-callback.d.ts +2 -0
  44. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-callback.js +21 -0
  45. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.d.ts +2 -0
  46. package/es/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.js +339 -0
  47. package/es/rootConfig/locales/zhhk/config-locales-hk.d.ts +2 -0
  48. package/es/rootConfig/locales/zhhk/config-locales-hk.js +13 -0
  49. package/es/rootConfig/locales/zhhk/config-locales-hk.mobile.d.ts +2 -0
  50. package/es/rootConfig/locales/zhhk/config-locales-hk.mobile.js +199 -0
  51. package/es/rootConfig/locales/zhhk/config-locales-hk.pc.d.ts +2 -0
  52. package/es/rootConfig/locales/zhhk/config-locales-hk.pc.js +385 -0
  53. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.d.ts +2 -0
  54. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.js +1297 -0
  55. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-callback.d.ts +2 -0
  56. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-callback.js +21 -0
  57. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.d.ts +2 -0
  58. package/es/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.js +339 -0
  59. package/es/rootConfig/mobile/BusiComp.d.ts +0 -1
  60. package/es/rootConfig/mobile/BusiComp.js +35 -32
  61. package/es/rootConfig/mobile/MobileModal.js +62 -57
  62. package/es/rootConfig/mobile/MobilePopover.d.ts +0 -2
  63. package/es/rootConfig/mobile/MobilePopover.js +37 -34
  64. package/es/rootConfig/mobile/index.js +4 -4
  65. package/es/rootConfig/mobile/page.d.ts +17 -2
  66. package/es/rootConfig/mobile/page.js +85 -78
  67. package/es/rootConfig/pc/BusiComp.js +110 -40
  68. package/es/rootConfig/pc/Drawer.d.ts +8 -9
  69. package/es/rootConfig/pc/Drawer.js +161 -91
  70. package/es/rootConfig/pc/Modal.d.ts +0 -1
  71. package/es/rootConfig/pc/Modal.js +140 -70
  72. package/es/rootConfig/pc/Popover.d.ts +0 -1
  73. package/es/rootConfig/pc/Popover.js +114 -44
  74. package/es/rootConfig/pc/index.js +5 -5
  75. package/es/rootConfig/pc/page.d.ts +0 -2
  76. package/es/rootConfig/pc/page.js +133 -64
  77. package/es/rootConfig/todoActionList.d.ts +1 -0
  78. package/es/rootConfig/todoActionList.js +2363 -1237
  79. package/es/rootConfig/todoCallback.d.ts +12 -1
  80. package/es/rootConfig/todoCallback.js +175 -103
  81. package/es/rootConfig/todoOptionList.d.ts +0 -66
  82. package/es/rootConfig/todoOptionList.js +400 -401
  83. package/es/theme/index.js +18 -20
  84. package/es/theme/src/default/index.js +7 -7
  85. package/es/theme/utils/renderColors.js +1 -1
  86. package/es/utils/url.js +8 -7
  87. package/lib/IconSvg/index.js +10 -9
  88. package/lib/error/errorCatch/index.js +2 -3
  89. package/lib/error/errorDisplay/Mobile/Drawer/Drawer.js +99 -79
  90. package/lib/error/errorDisplay/Mobile/Drawer/index.js +25 -26
  91. package/lib/error/errorDisplay/Mobile/ErrorMsg/index.js +123 -126
  92. package/lib/error/errorDisplay/Mobile/Modal/Modal.js +45 -33
  93. package/lib/error/errorDisplay/Mobile/Modal/index.js +23 -24
  94. package/lib/error/errorDisplay/Mobile/defaultGlobalConfig.js +3 -5
  95. package/lib/error/errorDisplay/SVGstring.js +6 -12
  96. package/lib/error/errorDisplay/Web/Drawer/Drawer.js +181 -146
  97. package/lib/error/errorDisplay/Web/Drawer/DrawerConnect.js +44 -48
  98. package/lib/error/errorDisplay/Web/Drawer/index.js +18 -20
  99. package/lib/error/errorDisplay/Web/ErrorMsg/index.js +336 -324
  100. package/lib/error/errorDisplay/Web/Notification/Notice.js +79 -68
  101. package/lib/error/errorDisplay/Web/Notification/Notification.js +15 -16
  102. package/lib/error/errorDisplay/Web/Notification/index.js +37 -41
  103. package/lib/error/errorDisplay/Web/defaultGlobalConfig.js +3 -5
  104. package/lib/error/errorDisplay/compUtils.js +9 -12
  105. package/lib/error/errorDisplay/const.js +7 -13
  106. package/lib/error/errorDisplay/http.js +8 -9
  107. package/lib/index.js +3 -6
  108. package/lib/rootConfig/index.d.ts +1 -1
  109. package/lib/rootConfig/index.js +9 -3
  110. package/lib/rootConfig/locales/enus/config-locales-es.d.ts +2 -0
  111. package/lib/rootConfig/locales/enus/config-locales-es.js +19 -0
  112. package/lib/rootConfig/locales/enus/config-locales-es.mobile.d.ts +2 -0
  113. package/lib/rootConfig/locales/enus/config-locales-es.mobile.js +205 -0
  114. package/lib/rootConfig/locales/enus/config-locales-es.pc.d.ts +2 -0
  115. package/lib/rootConfig/locales/enus/config-locales-es.pc.js +55 -0
  116. package/lib/rootConfig/locales/enus/config-locales-es.todo-actionList.d.ts +2 -0
  117. package/lib/rootConfig/locales/enus/config-locales-es.todo-actionList.js +1299 -0
  118. package/lib/rootConfig/locales/enus/config-locales-es.todo-callback.d.ts +2 -0
  119. package/lib/rootConfig/locales/enus/config-locales-es.todo-callback.js +27 -0
  120. package/lib/rootConfig/locales/enus/config-locales-es.todo-optionList.d.ts +2 -0
  121. package/lib/rootConfig/locales/enus/config-locales-es.todo-optionList.js +345 -0
  122. package/lib/rootConfig/locales/zhcn/config-locales-cn.d.ts +2 -0
  123. package/lib/rootConfig/locales/zhcn/config-locales-cn.js +19 -0
  124. package/lib/rootConfig/locales/zhcn/config-locales-cn.mobile.d.ts +2 -0
  125. package/lib/rootConfig/locales/zhcn/config-locales-cn.mobile.js +205 -0
  126. package/lib/rootConfig/locales/zhcn/config-locales-cn.pc.d.ts +2 -0
  127. package/lib/rootConfig/locales/zhcn/config-locales-cn.pc.js +391 -0
  128. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.d.ts +2 -0
  129. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.js +1303 -0
  130. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-callback.d.ts +2 -0
  131. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-callback.js +27 -0
  132. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.d.ts +2 -0
  133. package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.js +345 -0
  134. package/lib/rootConfig/locales/zhhk/config-locales-hk.d.ts +2 -0
  135. package/lib/rootConfig/locales/zhhk/config-locales-hk.js +19 -0
  136. package/lib/rootConfig/locales/zhhk/config-locales-hk.mobile.d.ts +2 -0
  137. package/lib/rootConfig/locales/zhhk/config-locales-hk.mobile.js +205 -0
  138. package/lib/rootConfig/locales/zhhk/config-locales-hk.pc.d.ts +2 -0
  139. package/lib/rootConfig/locales/zhhk/config-locales-hk.pc.js +391 -0
  140. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.d.ts +2 -0
  141. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.js +1303 -0
  142. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-callback.d.ts +2 -0
  143. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-callback.js +27 -0
  144. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.d.ts +2 -0
  145. package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.js +345 -0
  146. package/lib/rootConfig/mobile/BusiComp.d.ts +0 -1
  147. package/lib/rootConfig/mobile/BusiComp.js +36 -34
  148. package/lib/rootConfig/mobile/MobileModal.js +63 -59
  149. package/lib/rootConfig/mobile/MobilePopover.d.ts +0 -2
  150. package/lib/rootConfig/mobile/MobilePopover.js +38 -36
  151. package/lib/rootConfig/mobile/page.d.ts +17 -2
  152. package/lib/rootConfig/mobile/page.js +86 -80
  153. package/lib/rootConfig/pc/BusiComp.js +111 -42
  154. package/lib/rootConfig/pc/Drawer.d.ts +8 -9
  155. package/lib/rootConfig/pc/Drawer.js +162 -93
  156. package/lib/rootConfig/pc/Modal.d.ts +0 -1
  157. package/lib/rootConfig/pc/Modal.js +141 -72
  158. package/lib/rootConfig/pc/Popover.d.ts +0 -1
  159. package/lib/rootConfig/pc/Popover.js +115 -46
  160. package/lib/rootConfig/pc/page.d.ts +0 -2
  161. package/lib/rootConfig/pc/page.js +134 -66
  162. package/lib/rootConfig/todoActionList.d.ts +1 -0
  163. package/lib/rootConfig/todoActionList.js +2364 -1244
  164. package/lib/rootConfig/todoCallback.d.ts +12 -1
  165. package/lib/rootConfig/todoCallback.js +182 -116
  166. package/lib/rootConfig/todoOptionList.d.ts +0 -66
  167. package/lib/rootConfig/todoOptionList.js +401 -403
  168. package/lib/theme/bin/default/modalWidth.js +1 -2
  169. package/lib/theme/index.js +19 -22
  170. package/lib/theme/src/default/index.js +7 -7
  171. package/lib/theme/utils/renderColors.js +1 -1
  172. package/lib/utils/cookieUtil.js +1 -2
  173. package/lib/utils/img.js +2 -3
  174. package/lib/utils/url.js +13 -16
  175. package/package.json +3 -4
@@ -1,26 +1,29 @@
1
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
1
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
2
2
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
3
  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."); }
4
4
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
5
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
6
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
- 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; }
7
+ 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; }
8
8
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
9
9
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
10
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
11
- 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; }
10
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
12
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
14
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
15
- 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); }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
16
16
  /* eslint-disable react/no-unknown-property */
17
17
  import React, { isValidElement } from 'react';
18
- import Notification, { notificationInstance } from '../Notification';
19
- import { resolveRequestPath, debounce } from '../../compUtils';
20
- import { drawerHandel } from '../Drawer';
21
- import http from '../../http';
22
- import { statusClrMap } from '../../const';
23
- import { defaultGlobalConfig, setGlobalConfig } from '../defaultGlobalConfig';
18
+ import Notification, { notificationInstance } from "../Notification";
19
+ import { resolveRequestPath, debounce } from "../../compUtils";
20
+ import { drawerHandel } from "../Drawer";
21
+ import http from "../../http";
22
+ import { statusClrMap } from "../../const";
23
+ import { defaultGlobalConfig, setGlobalConfig } from "../defaultGlobalConfig";
24
+ import { jsx as _jsx } from "react/jsx-runtime";
25
+ import { Fragment as _Fragment } from "react/jsx-runtime";
26
+ import { jsxs as _jsxs } from "react/jsx-runtime";
24
27
  var isElm = function isElm(val) {
25
28
  return ['number', 'string'].includes(_typeof(val)) || /*#__PURE__*/isValidElement(val);
26
29
  };
@@ -57,46 +60,54 @@ var renderErrList = function renderErrList(errList, opts) {
57
60
  code: item === null || item === void 0 ? void 0 : item.errorCode,
58
61
  content: item === null || item === void 0 ? void 0 : item.errorMsg,
59
62
  status: statusClrMap[item === null || item === void 0 ? void 0 : item.errorType],
60
- subContent: erorrListShowType === 'innerWindow' && (item === null || item === void 0 ? void 0 : (_item$guidance = item.guidance) === null || _item$guidance === void 0 ? void 0 : _item$guidance.content),
61
- url: item === null || item === void 0 ? void 0 : (_item$guidance2 = item.guidance) === null || _item$guidance2 === void 0 ? void 0 : _item$guidance2.guidanceUrl,
62
- extra: (item === null || item === void 0 ? void 0 : item.guidance) && erorrListShowType === 'openDrawer' && /*#__PURE__*/React.createElement("a", {
63
+ subContent: erorrListShowType === 'innerWindow' && (item === null || item === void 0 || (_item$guidance = item.guidance) === null || _item$guidance === void 0 ? void 0 : _item$guidance.content),
64
+ url: item === null || item === void 0 || (_item$guidance2 = item.guidance) === null || _item$guidance2 === void 0 ? void 0 : _item$guidance2.guidanceUrl,
65
+ extra: (item === null || item === void 0 ? void 0 : item.guidance) && erorrListShowType === 'openDrawer' && /*#__PURE__*/_jsx("a", {
63
66
  onClick: function onClick() {
64
67
  var _item$guidance3;
65
68
  drawerHandel.open({
66
69
  title: item === null || item === void 0 ? void 0 : item.errorTypeName,
67
70
  status: statusClrMap[item === null || item === void 0 ? void 0 : item.errorType],
68
71
  mode: 'default',
69
- content: /*#__PURE__*/React.createElement("div", {
72
+ content: /*#__PURE__*/_jsx("div", {
70
73
  // eslint-disable-next-line react/no-danger
71
74
  dangerouslySetInnerHTML: {
72
- __html: item === null || item === void 0 ? void 0 : (_item$guidance3 = item.guidance) === null || _item$guidance3 === void 0 ? void 0 : _item$guidance3.content
75
+ __html: item === null || item === void 0 || (_item$guidance3 = item.guidance) === null || _item$guidance3 === void 0 ? void 0 : _item$guidance3.content
73
76
  }
74
77
  })
75
78
  });
76
- }
77
- }, getLocale('detail', ' 详情'))
79
+ },
80
+ children: getLocale('detail', ' 详情')
81
+ })
78
82
  };
79
83
  });
80
84
  }
81
- return /*#__PURE__*/React.createElement("div", {
82
- className: "lx-drawer-empty"
83
- }, getLocale('ErrorMsg.no-information', emptyTxt));
85
+ return /*#__PURE__*/_jsx("div", {
86
+ className: "lx-drawer-empty",
87
+ children: getLocale('ErrorMsg.no-information', emptyTxt)
88
+ });
84
89
  };
85
90
  var renderGuidance = function renderGuidance(guidance, opts) {
86
- return (guidance === null || guidance === void 0 ? void 0 : guidance.title) || (guidance === null || guidance === void 0 ? void 0 : guidance.content) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
87
- className: "lx-drawer-group-article lx-drawer-article"
88
- // eslint-disable-next-line react/no-danger
89
- ,
90
- dangerouslySetInnerHTML: {
91
- __html: guidance === null || guidance === void 0 ? void 0 : guidance.content
92
- }
93
- }), (guidance === null || guidance === void 0 ? void 0 : guidance.guidanceUrl) ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
94
- onClick: function onClick() {
95
- window.open(guidance === null || guidance === void 0 ? void 0 : guidance.guidanceUrl, '_blank');
96
- }
97
- }, opts.getLocale('documentLink', '文档链接'))) : null) : /*#__PURE__*/React.createElement("div", {
98
- className: "lx-drawer-empty"
99
- }, opts.getLocale('ErrorMsg.no-information', emptyTxt));
91
+ return guidance !== null && guidance !== void 0 && guidance.title || guidance !== null && guidance !== void 0 && guidance.content ? /*#__PURE__*/_jsxs(_Fragment, {
92
+ children: [/*#__PURE__*/_jsx("div", {
93
+ className: "lx-drawer-group-article lx-drawer-article"
94
+ // eslint-disable-next-line react/no-danger
95
+ ,
96
+ dangerouslySetInnerHTML: {
97
+ __html: guidance === null || guidance === void 0 ? void 0 : guidance.content
98
+ }
99
+ }), guidance !== null && guidance !== void 0 && guidance.guidanceUrl ? /*#__PURE__*/_jsx("div", {
100
+ children: /*#__PURE__*/_jsx("a", {
101
+ onClick: function onClick() {
102
+ window.open(guidance === null || guidance === void 0 ? void 0 : guidance.guidanceUrl, '_blank');
103
+ },
104
+ children: opts.getLocale('documentLink', '文档链接')
105
+ })
106
+ }) : null]
107
+ }) : /*#__PURE__*/_jsx("div", {
108
+ className: "lx-drawer-empty",
109
+ children: opts.getLocale('ErrorMsg.no-information', emptyTxt)
110
+ });
100
111
  };
101
112
  var renderTitle = function renderTitle(msg, opts) {
102
113
  var errTypeTitMap = opts.errTypeTitMap;
@@ -105,7 +116,7 @@ var renderTitle = function renderTitle(msg, opts) {
105
116
  }
106
117
  if (typeof (msg === null || msg === void 0 ? void 0 : msg.code) === 'string') {
107
118
  var _msg$code;
108
- var nbr = msg === null || msg === void 0 ? void 0 : (_msg$code = msg.code) === null || _msg$code === void 0 ? void 0 : _msg$code.split('-')[0];
119
+ var nbr = msg === null || msg === void 0 || (_msg$code = msg.code) === null || _msg$code === void 0 ? void 0 : _msg$code.split('-')[0];
109
120
  return nbr && errTypeTitMap[nbr] ? errTypeTitMap[nbr] : '';
110
121
  }
111
122
  return '';
@@ -123,307 +134,311 @@ var ErrorMsg = {
123
134
  var _msg$resolve;
124
135
  var resolve, _opts$feebackAction, feebackAction, _ref, _ref$target, target, resMsg, stack, footerContent, loadingStates, mapFeebackTxt, feedbackLoading, feedbackUrl, isShowFeedback, pageUrl, getDes, feedbackParams, feebackReturn, handleLoading, handleFeeback, renderTxt, renderDisabled;
125
136
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
126
- while (1) {
127
- switch (_context3.prev = _context3.next) {
128
- case 0:
129
- _context3.next = 2;
130
- return (_msg$resolve = msg === null || msg === void 0 ? void 0 : msg.resolve) !== null && _msg$resolve !== void 0 ? _msg$resolve : opts.resolve;
131
- case 2:
132
- resolve = _context3.sent;
133
- _opts$feebackAction = opts.feebackAction, feebackAction = _opts$feebackAction === void 0 ? false : _opts$feebackAction;
134
- _ref = msg || {}, _ref$target = _ref.target, target = _ref$target === void 0 ? {} : _ref$target, resMsg = _ref.msg, stack = _ref.stack;
135
- footerContent = [];
136
- loadingStates = ['loading', 'finish'];
137
- mapFeebackTxt = {
138
- loading: opts.getLocale(feedbackTxts[2].code, feedbackTxts[2].title),
139
- finish: opts.getLocale(feedbackTxts[1].code, feedbackTxts[1].title)
140
- }; // 故障上报loading
141
- feedbackLoading = ''; // 故障上报地址
142
- feedbackUrl = defaultFeedbackUrl; // 是否显示故障上报
143
- isShowFeedback = true; // 页面请求路径
144
- pageUrl = window.location.href;
145
- getDes = "<h3>".concat(opts.getLocale('PageRequestPath', '页面请求路径'), "<h3><p>").concat(pageUrl, "</p><h3>").concat(opts.getLocale('PageRequestPath', '接口请求路径'), "<h3><p>").concat(target === null || target === void 0 ? void 0 : target.id, "</p><h3>").concat(opts.getLocale('PageRequestPath', '接口返回报文'), "<h3><p>").concat(resMsg, " ").concat(stack, "</p>"); // 故障上报数据
146
- feedbackParams = {
147
- feedbackType: '5000',
148
- feedbackProductType: '5000',
149
- feedbackTitle: msg === null || msg === void 0 ? void 0 : msg.code,
150
- feedbackContent: JSON.stringify({
151
- target: target,
152
- description: getDes
153
- })
154
- };
155
- if (typeof feebackAction === 'boolean' && !feebackAction) {
156
- isShowFeedback = false;
137
+ while (1) switch (_context3.prev = _context3.next) {
138
+ case 0:
139
+ _context3.next = 2;
140
+ return (_msg$resolve = msg === null || msg === void 0 ? void 0 : msg.resolve) !== null && _msg$resolve !== void 0 ? _msg$resolve : opts.resolve;
141
+ case 2:
142
+ resolve = _context3.sent;
143
+ _opts$feebackAction = opts.feebackAction, feebackAction = _opts$feebackAction === void 0 ? false : _opts$feebackAction;
144
+ _ref = msg || {}, _ref$target = _ref.target, target = _ref$target === void 0 ? {} : _ref$target, resMsg = _ref.msg, stack = _ref.stack;
145
+ footerContent = [];
146
+ loadingStates = ['loading', 'finish'];
147
+ mapFeebackTxt = {
148
+ loading: opts.getLocale(feedbackTxts[2].code, feedbackTxts[2].title),
149
+ finish: opts.getLocale(feedbackTxts[1].code, feedbackTxts[1].title)
150
+ }; // 故障上报loading
151
+ feedbackLoading = ''; // 故障上报地址
152
+ feedbackUrl = defaultFeedbackUrl; // 是否显示故障上报
153
+ isShowFeedback = true; // 页面请求路径
154
+ pageUrl = window.location.href;
155
+ getDes = "<h3>".concat(opts.getLocale('PageRequestPath', '页面请求路径'), "<h3><p>").concat(pageUrl, "</p><h3>").concat(opts.getLocale('PageRequestPath', '接口请求路径'), "<h3><p>").concat(target === null || target === void 0 ? void 0 : target.id, "</p><h3>").concat(opts.getLocale('PageRequestPath', '接口返回报文'), "<h3><p>").concat(resMsg, " ").concat(stack, "</p>"); // 故障上报数据
156
+ feedbackParams = {
157
+ feedbackType: '5000',
158
+ feedbackProductType: '5000',
159
+ feedbackTitle: msg === null || msg === void 0 ? void 0 : msg.code,
160
+ feedbackContent: JSON.stringify({
161
+ target: target,
162
+ description: getDes
163
+ })
164
+ };
165
+ if (typeof feebackAction === 'boolean' && !feebackAction) {
166
+ isShowFeedback = false;
167
+ }
168
+ if (typeof feebackAction === 'string' && feebackAction) {
169
+ feedbackUrl = feebackAction;
170
+ }
171
+ if (!(typeof feebackAction === 'function')) {
172
+ _context3.next = 21;
173
+ break;
174
+ }
175
+ _context3.next = 19;
176
+ return feebackAction(_objectSpread({}, feedbackParams));
177
+ case 19:
178
+ feebackReturn = _context3.sent;
179
+ if (!feebackReturn) {
180
+ isShowFeedback = false;
181
+ } else {
182
+ feedbackUrl = feebackReturn === null || feebackReturn === void 0 ? void 0 : feebackReturn.url;
183
+ feedbackParams = feebackReturn === null || feebackReturn === void 0 ? void 0 : feebackReturn.payload;
184
+ }
185
+ case 21:
186
+ handleLoading = function handleLoading(_key, _state) {
187
+ var _error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
188
+ var getAllList = Notification.getOpenList().map(function (v) {
189
+ if (String(v.itemKey) === String(_key)) {
190
+ return _objectSpread(_objectSpread({}, v), {}, {
191
+ feedbackState: _state ? loadingStates[0] : loadingStates[1]
192
+ });
193
+ }
194
+ return v;
195
+ });
196
+ Notification.setOpenList(_toConsumableArray(getAllList));
197
+ var feedbackDrawerDom = document.getElementById("lx-feedback-drawer-".concat(_key));
198
+ if (feedbackDrawerDom) {
199
+ // eslint-disable-next-line max-len
200
+ feedbackDrawerDom.innerHTML = _state ? opts.getLocale(feedbackTxts[2].code, feedbackTxts[2].title) : opts.getLocale(feedbackTxts[1].code, feedbackTxts[1].title);
201
+ feedbackDrawerDom.classList.add(btnDisableClass[1]);
202
+ if (_error) {
203
+ feedbackDrawerDom.innerHTML = opts.getLocale(feedbackTxts[0].code, feedbackTxts[0].title);
204
+ feedbackDrawerDom.classList.remove(btnDisableClass[1]);
205
+ }
157
206
  }
158
- if (typeof feebackAction === 'string' && feebackAction) {
159
- feedbackUrl = feebackAction;
207
+ feedbackLoading = _state ? loadingStates[0] : loadingStates[1];
208
+ if (_error) {
209
+ feedbackLoading = '';
160
210
  }
161
- if (!(typeof feebackAction === 'function')) {
162
- _context3.next = 21;
163
- break;
211
+ };
212
+ handleFeeback = debounce( /*#__PURE__*/function () {
213
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(flag, elKey) {
214
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
215
+ while (1) switch (_context.prev = _context.next) {
216
+ case 0:
217
+ _context.prev = 0;
218
+ _context.next = 3;
219
+ return http.post(feedbackUrl, {
220
+ data: _objectSpread({}, feedbackParams)
221
+ });
222
+ case 3:
223
+ handleLoading(elKey, false);
224
+ _context.next = 10;
225
+ break;
226
+ case 6:
227
+ _context.prev = 6;
228
+ _context.t0 = _context["catch"](0);
229
+ handleLoading(elKey, false, true);
230
+ // eslint-disable-next-line no-console
231
+ console.error(new Error("ErrorMsg\u7EC4\u4EF6: \u6545\u969C\u4E0A\u62A5\u5931\u8D25\uFF0C".concat(_context.t0)));
232
+ case 10:
233
+ case "end":
234
+ return _context.stop();
235
+ }
236
+ }, _callee, null, [[0, 6]]);
237
+ }));
238
+ return function (_x2, _x3) {
239
+ return _ref2.apply(this, arguments);
240
+ };
241
+ }(), 400);
242
+ renderTxt = function renderTxt(_state) {
243
+ if (_state) {
244
+ // eslint-disable-next-line max-len
245
+ return _state === loadingStates[0] ? opts.getLocale(feedbackTxts[2].code, feedbackTxts[2].title) : opts.getLocale(feedbackTxts[1].code, feedbackTxts[1].title);
164
246
  }
165
- _context3.next = 19;
166
- return feebackAction(_objectSpread({}, feedbackParams));
167
- case 19:
168
- feebackReturn = _context3.sent;
169
- if (!feebackReturn) {
170
- isShowFeedback = false;
171
- } else {
172
- feedbackUrl = feebackReturn === null || feebackReturn === void 0 ? void 0 : feebackReturn.url;
173
- feedbackParams = feebackReturn === null || feebackReturn === void 0 ? void 0 : feebackReturn.payload;
247
+ return opts.getLocale(feedbackTxts[0].code, feedbackTxts[0].title);
248
+ };
249
+ renderDisabled = function renderDisabled(flag, _key) {
250
+ if (_param.feedbackState) {
251
+ return flag === feedbackPlacements[0] ? btnDisableClass[0] : btnDisableClass[1];
174
252
  }
175
- case 21:
176
- handleLoading = function handleLoading(_key, _state) {
177
- var _error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
178
- var getAllList = Notification.getOpenList().map(function (v) {
179
- if (String(v.itemKey) === String(_key)) {
180
- return _objectSpread(_objectSpread({}, v), {}, {
181
- feedbackState: _state ? loadingStates[0] : loadingStates[1]
182
- });
183
- }
184
- return v;
185
- });
186
- Notification.setOpenList(_toConsumableArray(getAllList));
253
+ if (flag === feedbackPlacements[1] && feedbackLoading) {
187
254
  var feedbackDrawerDom = document.getElementById("lx-feedback-drawer-".concat(_key));
188
255
  if (feedbackDrawerDom) {
189
- // eslint-disable-next-line max-len
190
- feedbackDrawerDom.innerHTML = _state ? opts.getLocale(feedbackTxts[2].code, feedbackTxts[2].title) : opts.getLocale(feedbackTxts[1].code, feedbackTxts[1].title);
191
- feedbackDrawerDom.classList.add(btnDisableClass[1]);
192
- if (_error) {
193
- feedbackDrawerDom.innerHTML = opts.getLocale(feedbackTxts[0].code, feedbackTxts[0].title);
194
- feedbackDrawerDom.classList.remove(btnDisableClass[1]);
195
- }
196
- }
197
- feedbackLoading = _state ? loadingStates[0] : loadingStates[1];
198
- if (_error) {
199
- feedbackLoading = '';
200
- }
201
- };
202
- handleFeeback = debounce( /*#__PURE__*/function () {
203
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(flag, elKey) {
204
- return _regeneratorRuntime().wrap(function _callee$(_context) {
205
- while (1) {
206
- switch (_context.prev = _context.next) {
207
- case 0:
208
- _context.prev = 0;
209
- _context.next = 3;
210
- return http.post(feedbackUrl, {
211
- data: _objectSpread({}, feedbackParams)
212
- });
213
- case 3:
214
- handleLoading(elKey, false);
215
- _context.next = 10;
216
- break;
217
- case 6:
218
- _context.prev = 6;
219
- _context.t0 = _context["catch"](0);
220
- handleLoading(elKey, false, true);
221
- // eslint-disable-next-line no-console
222
- console.error(new Error("ErrorMsg\u7EC4\u4EF6: \u6545\u969C\u4E0A\u62A5\u5931\u8D25\uFF0C".concat(_context.t0)));
223
- case 10:
224
- case "end":
225
- return _context.stop();
226
- }
227
- }
228
- }, _callee, null, [[0, 6]]);
229
- }));
230
- return function (_x2, _x3) {
231
- return _ref2.apply(this, arguments);
232
- };
233
- }(), 400);
234
- renderTxt = function renderTxt(_state) {
235
- if (_state) {
236
- // eslint-disable-next-line max-len
237
- return _state === loadingStates[0] ? opts.getLocale(feedbackTxts[2].code, feedbackTxts[2].title) : opts.getLocale(feedbackTxts[1].code, feedbackTxts[1].title);
238
- }
239
- return opts.getLocale(feedbackTxts[0].code, feedbackTxts[0].title);
240
- };
241
- renderDisabled = function renderDisabled(flag, _key) {
242
- if (_param.feedbackState) {
243
- return flag === feedbackPlacements[0] ? btnDisableClass[0] : btnDisableClass[1];
256
+ feedbackDrawerDom.innerHTML = feedbackLoading === loadingStates[0] ? feedbackTxts[2] : feedbackTxts[1];
244
257
  }
245
- if (flag === feedbackPlacements[1] && feedbackLoading) {
246
- var feedbackDrawerDom = document.getElementById("lx-feedback-drawer-".concat(_key));
247
- if (feedbackDrawerDom) {
248
- feedbackDrawerDom.innerHTML = feedbackLoading === loadingStates[0] ? feedbackTxts[2] : feedbackTxts[1];
249
- }
250
- return btnDisableClass[1];
251
- }
252
- return '';
253
- };
254
- if (isShowFeedback) {
255
- footerContent.push( /*#__PURE__*/React.createElement("a", {
256
- className: "lx-notification-notice-footer-btn-ghost lx-feedback-notification-".concat(_param.itemKey, " ").concat(renderDisabled(feedbackPlacements[0], _param.itemKey)),
257
- config: String(_param.itemKey),
258
- onClick: function onClick(e) {
259
- if (!(_param === null || _param === void 0 ? void 0 : _param.feedbackState)) {
260
- var getKey = e.target.getAttribute('config');
261
- handleLoading(getKey, true);
262
- handleFeeback(feedbackPlacements[0], getKey);
263
- }
264
- }
265
- }, mapFeebackTxt[_param === null || _param === void 0 ? void 0 : _param.feedbackState] || opts.getLocale(feedbackTxts[0].code, feedbackTxts[0].title)));
258
+ return btnDisableClass[1];
266
259
  }
267
- if (opts.extendFooter) {
268
- if (typeof opts.footer === 'function') {
269
- footerContent.push(opts.extendFooter());
270
- } else {
271
- footerContent.push(opts.extendFooter);
272
- }
260
+ return '';
261
+ };
262
+ if (isShowFeedback) {
263
+ footerContent.push( /*#__PURE__*/_jsx("a", {
264
+ className: "lx-notification-notice-footer-btn-ghost lx-feedback-notification-".concat(_param.itemKey, " ").concat(renderDisabled(feedbackPlacements[0], _param.itemKey)),
265
+ config: String(_param.itemKey),
266
+ onClick: function onClick(e) {
267
+ if (!(_param !== null && _param !== void 0 && _param.feedbackState)) {
268
+ var getKey = e.target.getAttribute('config');
269
+ handleLoading(getKey, true);
270
+ handleFeeback(feedbackPlacements[0], getKey);
271
+ }
272
+ },
273
+ children: mapFeebackTxt[_param === null || _param === void 0 ? void 0 : _param.feedbackState] || opts.getLocale(feedbackTxts[0].code, feedbackTxts[0].title)
274
+ }));
275
+ }
276
+ if (opts.extendFooter) {
277
+ if (typeof opts.footer === 'function') {
278
+ footerContent.push(opts.extendFooter());
279
+ } else {
280
+ footerContent.push(opts.extendFooter);
273
281
  }
274
- if (resolve) {
275
- footerContent.push( /*#__PURE__*/React.createElement("a", {
276
- onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
277
- var _detRes;
278
- var detRes, article, url, errMsg, renderSubTitle, renderContent;
279
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
280
- while (1) {
281
- switch (_context2.prev = _context2.next) {
282
- case 0:
283
- detRes = {};
284
- if ((resolve === null || resolve === void 0 ? void 0 : resolve.article) || (resolve === null || resolve === void 0 ? void 0 : resolve.extend)) {
285
- // 已预设解决方案
286
- detRes = {
287
- article: resolve === null || resolve === void 0 ? void 0 : resolve.article,
288
- extend: resolve === null || resolve === void 0 ? void 0 : resolve.extend
289
- };
290
- }
291
- article = opts.getArticle(msg.code, opts.getLocale);
292
- if (!article) {
293
- _context2.next = 7;
294
- break;
295
- }
296
- // 网络异常无法获取解决方案,使用内置的
297
- detRes = {
298
- article: article,
299
- extend: []
300
- };
301
- _context2.next = 22;
302
- break;
303
- case 7:
304
- // 请求后端获取解决方案
282
+ }
283
+ if (resolve) {
284
+ footerContent.push( /*#__PURE__*/_jsx("a", {
285
+ onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
286
+ var _detRes;
287
+ var detRes, article, url, errMsg, renderSubTitle, renderContent;
288
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
289
+ while (1) switch (_context2.prev = _context2.next) {
290
+ case 0:
291
+ detRes = {};
292
+ if (resolve !== null && resolve !== void 0 && resolve.article || resolve !== null && resolve !== void 0 && resolve.extend) {
293
+ // 已预设解决方案
294
+ detRes = {
295
+ article: resolve === null || resolve === void 0 ? void 0 : resolve.article,
296
+ extend: resolve === null || resolve === void 0 ? void 0 : resolve.extend
297
+ };
298
+ }
299
+ article = opts.getArticle(msg.code, opts.getLocale);
300
+ if (!article) {
301
+ _context2.next = 7;
302
+ break;
303
+ }
304
+ // 网络异常无法获取解决方案,使用内置的
305
+ detRes = {
306
+ article: article,
307
+ extend: []
308
+ };
309
+ _context2.next = 22;
310
+ break;
311
+ case 7:
312
+ // 请求后端获取解决方案
305
313
 
306
- if (typeof resolve === 'string') {
307
- url = resolve;
308
- } else if (_typeof(resolve) === 'object') {
309
- url = resolve.href;
310
- }
311
- if (!url) {
312
- _context2.next = 21;
313
- break;
314
- }
315
- _context2.prev = 9;
316
- _context2.next = 12;
317
- return http.get(url, {
318
- params: {
319
- errorCode: msg === null || msg === void 0 ? void 0 : msg.code,
320
- errorMsg: msg === null || msg === void 0 ? void 0 : msg.msg
321
- }
322
- });
323
- case 12:
324
- errMsg = _context2.sent;
325
- detRes = {
326
- article: errMsg === null || errMsg === void 0 ? void 0 : errMsg.guidance,
327
- extend: errMsg === null || errMsg === void 0 ? void 0 : errMsg.errorInfos
328
- };
329
- _context2.next = 19;
330
- break;
331
- case 16:
332
- _context2.prev = 16;
333
- _context2.t0 = _context2["catch"](9);
334
- // eslint-disable-next-line no-console
335
- console.error(new Error("ErrorMsg\u7EC4\u4EF6: \u83B7\u53D6\u89E3\u51B3\u65B9\u6848\u5931\u8D25\uFF0C".concat(_context2.t0)));
336
- case 19:
337
- _context2.next = 22;
338
- break;
339
- case 21:
340
- // eslint-disable-next-line no-console
341
- console.error(new Error('ErrorMsg组件: 无效resolve'));
342
- case 22:
343
- renderSubTitle = function renderSubTitle() {
344
- if (target.type === targetTypes[0] && (target === null || target === void 0 ? void 0 : target.id)) {
345
- return "".concat(opts.getLocale('serviceURL', '服务地址'), "\uFF1A").concat(target === null || target === void 0 ? void 0 : target.id);
314
+ if (typeof resolve === 'string') {
315
+ url = resolve;
316
+ } else if (_typeof(resolve) === 'object') {
317
+ url = resolve.href;
318
+ }
319
+ if (!url) {
320
+ _context2.next = 21;
321
+ break;
322
+ }
323
+ _context2.prev = 9;
324
+ _context2.next = 12;
325
+ return http.get(url, {
326
+ params: {
327
+ errorCode: msg === null || msg === void 0 ? void 0 : msg.code,
328
+ errorMsg: msg === null || msg === void 0 ? void 0 : msg.msg
329
+ }
330
+ });
331
+ case 12:
332
+ errMsg = _context2.sent;
333
+ detRes = {
334
+ article: errMsg === null || errMsg === void 0 ? void 0 : errMsg.guidance,
335
+ extend: errMsg === null || errMsg === void 0 ? void 0 : errMsg.errorInfos
336
+ };
337
+ _context2.next = 19;
338
+ break;
339
+ case 16:
340
+ _context2.prev = 16;
341
+ _context2.t0 = _context2["catch"](9);
342
+ // eslint-disable-next-line no-console
343
+ console.error(new Error("ErrorMsg\u7EC4\u4EF6: \u83B7\u53D6\u89E3\u51B3\u65B9\u6848\u5931\u8D25\uFF0C".concat(_context2.t0)));
344
+ case 19:
345
+ _context2.next = 22;
346
+ break;
347
+ case 21:
348
+ // eslint-disable-next-line no-console
349
+ console.error(new Error('ErrorMsg组件: 无效resolve'));
350
+ case 22:
351
+ renderSubTitle = function renderSubTitle() {
352
+ if (target.type === targetTypes[0] && target !== null && target !== void 0 && target.id) {
353
+ return "".concat(opts.getLocale('serviceURL', '服务地址'), "\uFF1A").concat(target === null || target === void 0 ? void 0 : target.id);
354
+ }
355
+ return null;
356
+ };
357
+ renderContent = function renderContent() {
358
+ var baseMsg = (msg === null || msg === void 0 ? void 0 : msg.description) || (msg === null || msg === void 0 ? void 0 : msg.msg);
359
+ return /*#__PURE__*/_jsxs(_Fragment, {
360
+ children: [baseMsg ? /*#__PURE__*/_jsxs(_Fragment, {
361
+ children: [baseMsg, /*#__PURE__*/_jsx("br", {})]
362
+ }) : '', msg === null || msg === void 0 ? void 0 : msg.stack]
363
+ });
364
+ };
365
+ drawerHandel.open({
366
+ getLocale: opts.getLocale,
367
+ title: "".concat(renderTitle(msg, opts), "(").concat((msg === null || msg === void 0 ? void 0 : msg.code) || '', ")"),
368
+ status: 'error',
369
+ mode: 'errorInfo',
370
+ content: renderContent(),
371
+ errorInfoProps: {
372
+ tabs: [{
373
+ key: 'article',
374
+ tab: opts.getLocale('ErrorMsg.solution', '解决方案')
375
+ }, {
376
+ key: 'extend',
377
+ tab: opts.getLocale('ErrorMsg.errorMsgMatch', '错误信息匹配')
378
+ }],
379
+ tabsActiveKey: 'article',
380
+ tabsContent: renderGuidance((_detRes = detRes) === null || _detRes === void 0 ? void 0 : _detRes.article, opts),
381
+ onTabsChange: function onTabsChange(record) {
382
+ var _detRes2, _detRes3;
383
+ switch (record === null || record === void 0 ? void 0 : record.key) {
384
+ case 'article':
385
+ record.update({
386
+ errorInfoProps: {
387
+ tabsActiveKey: record === null || record === void 0 ? void 0 : record.key,
388
+ tabsContent: renderGuidance((_detRes2 = detRes) === null || _detRes2 === void 0 ? void 0 : _detRes2.article, opts)
389
+ }
390
+ });
391
+ break;
392
+ case 'extend':
393
+ record.update({
394
+ errorInfoProps: {
395
+ tabsActiveKey: record === null || record === void 0 ? void 0 : record.key,
396
+ tabsContent: renderErrList((_detRes3 = detRes) === null || _detRes3 === void 0 ? void 0 : _detRes3.extend, opts)
397
+ }
398
+ });
399
+ break;
400
+ default:
401
+ break;
346
402
  }
347
- return null;
348
- };
349
- renderContent = function renderContent() {
350
- var baseMsg = (msg === null || msg === void 0 ? void 0 : msg.description) || (msg === null || msg === void 0 ? void 0 : msg.msg);
351
- return /*#__PURE__*/React.createElement(React.Fragment, null, baseMsg ? /*#__PURE__*/React.createElement(React.Fragment, null, baseMsg, /*#__PURE__*/React.createElement("br", null)) : '', msg === null || msg === void 0 ? void 0 : msg.stack);
352
- };
353
- drawerHandel.open({
354
- getLocale: opts.getLocale,
355
- title: "".concat(renderTitle(msg, opts), "(").concat((msg === null || msg === void 0 ? void 0 : msg.code) || '', ")"),
356
- status: 'error',
357
- mode: 'errorInfo',
358
- content: renderContent(),
359
- errorInfoProps: {
360
- tabs: [{
361
- key: 'article',
362
- tab: opts.getLocale('ErrorMsg.solution', '解决方案')
363
- }, {
364
- key: 'extend',
365
- tab: opts.getLocale('ErrorMsg.errorMsgMatch', '错误信息匹配')
366
- }],
367
- tabsActiveKey: 'article',
368
- tabsContent: renderGuidance((_detRes = detRes) === null || _detRes === void 0 ? void 0 : _detRes.article, opts),
369
- onTabsChange: function onTabsChange(record) {
370
- var _detRes2, _detRes3;
371
- switch (record === null || record === void 0 ? void 0 : record.key) {
372
- case 'article':
373
- record.update({
374
- errorInfoProps: {
375
- tabsActiveKey: record === null || record === void 0 ? void 0 : record.key,
376
- tabsContent: renderGuidance((_detRes2 = detRes) === null || _detRes2 === void 0 ? void 0 : _detRes2.article, opts)
377
- }
378
- });
379
- break;
380
- case 'extend':
381
- record.update({
382
- errorInfoProps: {
383
- tabsActiveKey: record === null || record === void 0 ? void 0 : record.key,
384
- tabsContent: renderErrList((_detRes3 = detRes) === null || _detRes3 === void 0 ? void 0 : _detRes3.extend, opts)
385
- }
386
- });
387
- break;
388
- default:
389
- break;
390
- }
391
- }
403
+ }
404
+ },
405
+ subTitle: renderSubTitle(),
406
+ footer: isShowFeedback ? /*#__PURE__*/_jsxs("div", {
407
+ children: [/*#__PURE__*/_jsx("a", {
408
+ className: "lx-drawer-btn",
409
+ onClick: function onClick() {
410
+ drawerHandel.close();
392
411
  },
393
- subTitle: renderSubTitle(),
394
- footer: isShowFeedback ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
395
- className: "lx-drawer-btn",
396
- onClick: function onClick() {
397
- drawerHandel.close();
412
+ children: opts.cancelText
413
+ }), /*#__PURE__*/_jsx("a", {
414
+ className: "lx-drawer-btn lx-drawer-btn-primary ".concat(renderDisabled(feedbackPlacements[1], _param.itemKey)),
415
+ id: "lx-feedback-drawer-".concat(_param.itemKey),
416
+ config: _param.itemKey,
417
+ onClick: function onClick(e) {
418
+ if (!_param.feedbackState) {
419
+ var getKey = e.target.getAttribute('config');
420
+ handleLoading(getKey, true);
421
+ handleFeeback(feedbackPlacements[1], getKey);
398
422
  }
399
- }, opts.cancelText), /*#__PURE__*/React.createElement("a", {
400
- className: "lx-drawer-btn lx-drawer-btn-primary ".concat(renderDisabled(feedbackPlacements[1], _param.itemKey)),
401
- id: "lx-feedback-drawer-".concat(_param.itemKey),
402
- config: _param.itemKey,
403
- onClick: function onClick(e) {
404
- if (!_param.feedbackState) {
405
- var getKey = e.target.getAttribute('config');
406
- handleLoading(getKey, true);
407
- handleFeeback(feedbackPlacements[1], getKey);
408
- }
409
- }
410
- }, renderTxt(_param.feedbackState))) : null
411
- });
412
- case 25:
413
- case "end":
414
- return _context2.stop();
415
- }
416
- }
417
- }, _callee2, null, [[9, 16]]);
418
- })),
419
- className: "lx-notification-notice-footer-btn-primary"
420
- }, opts.okText));
421
- }
422
- return _context3.abrupt("return", footerContent);
423
- case 29:
424
- case "end":
425
- return _context3.stop();
426
- }
423
+ },
424
+ children: renderTxt(_param.feedbackState)
425
+ })]
426
+ }) : null
427
+ });
428
+ case 25:
429
+ case "end":
430
+ return _context2.stop();
431
+ }
432
+ }, _callee2, null, [[9, 16]]);
433
+ })),
434
+ className: "lx-notification-notice-footer-btn-primary",
435
+ children: opts.okText
436
+ }));
437
+ }
438
+ return _context3.abrupt("return", footerContent);
439
+ case 29:
440
+ case "end":
441
+ return _context3.stop();
427
442
  }
428
443
  }, _callee3);
429
444
  }));
@@ -462,5 +477,4 @@ var ErrorMsg = {
462
477
  }
463
478
  // getInstance,
464
479
  };
465
-
466
480
  export default ErrorMsg;