@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.
- package/es/IconSvg/index.js +8 -7
- package/es/error/errorCatch/index.js +1 -1
- package/es/error/errorDisplay/Mobile/Drawer/Drawer.js +99 -77
- package/es/error/errorDisplay/Mobile/Drawer/index.js +26 -26
- package/es/error/errorDisplay/Mobile/ErrorMsg/index.js +127 -129
- package/es/error/errorDisplay/Mobile/Modal/Modal.js +46 -31
- package/es/error/errorDisplay/Mobile/Modal/index.js +24 -24
- package/es/error/errorDisplay/Mobile/defaultGlobalConfig.js +2 -2
- package/es/error/errorDisplay/Web/Drawer/Drawer.js +183 -145
- package/es/error/errorDisplay/Web/Drawer/DrawerConnect.js +43 -46
- package/es/error/errorDisplay/Web/Drawer/index.js +15 -15
- package/es/error/errorDisplay/Web/ErrorMsg/index.js +341 -327
- package/es/error/errorDisplay/Web/Notification/Notice.js +78 -65
- package/es/error/errorDisplay/Web/Notification/Notification.js +15 -15
- package/es/error/errorDisplay/Web/Notification/index.js +36 -38
- package/es/error/errorDisplay/Web/defaultGlobalConfig.js +2 -2
- package/es/error/errorDisplay/compUtils.js +6 -6
- package/es/error/errorDisplay/http.js +7 -7
- package/es/error/index.js +6 -6
- package/es/index.js +5 -5
- package/es/rootConfig/index.d.ts +1 -1
- package/es/rootConfig/index.js +5 -5
- package/es/rootConfig/locales/enus/config-locales-es.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.js +13 -0
- package/es/rootConfig/locales/enus/config-locales-es.mobile.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.mobile.js +199 -0
- package/es/rootConfig/locales/enus/config-locales-es.pc.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.pc.js +49 -0
- package/es/rootConfig/locales/enus/config-locales-es.todo-actionList.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.todo-actionList.js +1293 -0
- package/es/rootConfig/locales/enus/config-locales-es.todo-callback.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.todo-callback.js +21 -0
- package/es/rootConfig/locales/enus/config-locales-es.todo-optionList.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.todo-optionList.js +339 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.js +13 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.mobile.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.mobile.js +199 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.pc.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.pc.js +385 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.js +1297 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.todo-callback.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.todo-callback.js +21 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.js +339 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.js +13 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.mobile.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.mobile.js +199 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.pc.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.pc.js +385 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.js +1297 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.todo-callback.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.todo-callback.js +21 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.js +339 -0
- package/es/rootConfig/mobile/BusiComp.d.ts +0 -1
- package/es/rootConfig/mobile/BusiComp.js +35 -32
- package/es/rootConfig/mobile/MobileModal.js +62 -57
- package/es/rootConfig/mobile/MobilePopover.d.ts +0 -2
- package/es/rootConfig/mobile/MobilePopover.js +37 -34
- package/es/rootConfig/mobile/index.js +4 -4
- package/es/rootConfig/mobile/page.d.ts +17 -2
- package/es/rootConfig/mobile/page.js +85 -78
- package/es/rootConfig/pc/BusiComp.js +110 -40
- package/es/rootConfig/pc/Drawer.d.ts +8 -9
- package/es/rootConfig/pc/Drawer.js +161 -91
- package/es/rootConfig/pc/Modal.d.ts +0 -1
- package/es/rootConfig/pc/Modal.js +140 -70
- package/es/rootConfig/pc/Popover.d.ts +0 -1
- package/es/rootConfig/pc/Popover.js +114 -44
- package/es/rootConfig/pc/index.js +5 -5
- package/es/rootConfig/pc/page.d.ts +0 -2
- package/es/rootConfig/pc/page.js +133 -64
- package/es/rootConfig/todoActionList.d.ts +1 -0
- package/es/rootConfig/todoActionList.js +2363 -1237
- package/es/rootConfig/todoCallback.d.ts +12 -1
- package/es/rootConfig/todoCallback.js +175 -103
- package/es/rootConfig/todoOptionList.d.ts +0 -66
- package/es/rootConfig/todoOptionList.js +400 -401
- package/es/theme/index.js +18 -20
- package/es/theme/src/default/index.js +7 -7
- package/es/theme/utils/renderColors.js +1 -1
- package/es/utils/url.js +8 -7
- package/lib/IconSvg/index.js +10 -9
- package/lib/error/errorCatch/index.js +2 -3
- package/lib/error/errorDisplay/Mobile/Drawer/Drawer.js +99 -79
- package/lib/error/errorDisplay/Mobile/Drawer/index.js +25 -26
- package/lib/error/errorDisplay/Mobile/ErrorMsg/index.js +123 -126
- package/lib/error/errorDisplay/Mobile/Modal/Modal.js +45 -33
- package/lib/error/errorDisplay/Mobile/Modal/index.js +23 -24
- package/lib/error/errorDisplay/Mobile/defaultGlobalConfig.js +3 -5
- package/lib/error/errorDisplay/SVGstring.js +6 -12
- package/lib/error/errorDisplay/Web/Drawer/Drawer.js +181 -146
- package/lib/error/errorDisplay/Web/Drawer/DrawerConnect.js +44 -48
- package/lib/error/errorDisplay/Web/Drawer/index.js +18 -20
- package/lib/error/errorDisplay/Web/ErrorMsg/index.js +336 -324
- package/lib/error/errorDisplay/Web/Notification/Notice.js +79 -68
- package/lib/error/errorDisplay/Web/Notification/Notification.js +15 -16
- package/lib/error/errorDisplay/Web/Notification/index.js +37 -41
- package/lib/error/errorDisplay/Web/defaultGlobalConfig.js +3 -5
- package/lib/error/errorDisplay/compUtils.js +9 -12
- package/lib/error/errorDisplay/const.js +7 -13
- package/lib/error/errorDisplay/http.js +8 -9
- package/lib/index.js +3 -6
- package/lib/rootConfig/index.d.ts +1 -1
- package/lib/rootConfig/index.js +9 -3
- package/lib/rootConfig/locales/enus/config-locales-es.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.js +19 -0
- package/lib/rootConfig/locales/enus/config-locales-es.mobile.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.mobile.js +205 -0
- package/lib/rootConfig/locales/enus/config-locales-es.pc.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.pc.js +55 -0
- package/lib/rootConfig/locales/enus/config-locales-es.todo-actionList.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.todo-actionList.js +1299 -0
- package/lib/rootConfig/locales/enus/config-locales-es.todo-callback.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.todo-callback.js +27 -0
- package/lib/rootConfig/locales/enus/config-locales-es.todo-optionList.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.todo-optionList.js +345 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.js +19 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.mobile.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.mobile.js +205 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.pc.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.pc.js +391 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-actionList.js +1303 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-callback.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-callback.js +27 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.todo-optionList.js +345 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.js +19 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.mobile.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.mobile.js +205 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.pc.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.pc.js +391 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-actionList.js +1303 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-callback.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-callback.js +27 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.todo-optionList.js +345 -0
- package/lib/rootConfig/mobile/BusiComp.d.ts +0 -1
- package/lib/rootConfig/mobile/BusiComp.js +36 -34
- package/lib/rootConfig/mobile/MobileModal.js +63 -59
- package/lib/rootConfig/mobile/MobilePopover.d.ts +0 -2
- package/lib/rootConfig/mobile/MobilePopover.js +38 -36
- package/lib/rootConfig/mobile/page.d.ts +17 -2
- package/lib/rootConfig/mobile/page.js +86 -80
- package/lib/rootConfig/pc/BusiComp.js +111 -42
- package/lib/rootConfig/pc/Drawer.d.ts +8 -9
- package/lib/rootConfig/pc/Drawer.js +162 -93
- package/lib/rootConfig/pc/Modal.d.ts +0 -1
- package/lib/rootConfig/pc/Modal.js +141 -72
- package/lib/rootConfig/pc/Popover.d.ts +0 -1
- package/lib/rootConfig/pc/Popover.js +115 -46
- package/lib/rootConfig/pc/page.d.ts +0 -2
- package/lib/rootConfig/pc/page.js +134 -66
- package/lib/rootConfig/todoActionList.d.ts +1 -0
- package/lib/rootConfig/todoActionList.js +2364 -1244
- package/lib/rootConfig/todoCallback.d.ts +12 -1
- package/lib/rootConfig/todoCallback.js +182 -116
- package/lib/rootConfig/todoOptionList.d.ts +0 -66
- package/lib/rootConfig/todoOptionList.js +401 -403
- package/lib/theme/bin/default/modalWidth.js +1 -2
- package/lib/theme/index.js +19 -22
- package/lib/theme/src/default/index.js +7 -7
- package/lib/theme/utils/renderColors.js +1 -1
- package/lib/utils/cookieUtil.js +1 -2
- package/lib/utils/img.js +2 -3
- package/lib/utils/url.js +13 -16
- package/package.json +3 -4
|
@@ -11,24 +11,25 @@ var _Drawer = require("../Drawer");
|
|
|
11
11
|
var _http = _interopRequireDefault(require("../../http"));
|
|
12
12
|
var _const = require("../../const");
|
|
13
13
|
var _defaultGlobalConfig = require("../defaultGlobalConfig");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
17
|
-
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; }
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
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; }
|
|
18
19
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
19
20
|
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."); }
|
|
20
21
|
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); }
|
|
21
22
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
22
23
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
23
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
24
|
+
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; }
|
|
24
25
|
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); } }
|
|
25
26
|
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); }); }; }
|
|
26
|
-
function ownKeys(
|
|
27
|
-
function _objectSpread(
|
|
27
|
+
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; }
|
|
28
|
+
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; }
|
|
28
29
|
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; }
|
|
29
|
-
function _toPropertyKey(
|
|
30
|
-
function _toPrimitive(
|
|
31
|
-
function _typeof(
|
|
30
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
31
|
+
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); }
|
|
32
|
+
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); } /* eslint-disable react/no-unknown-property */
|
|
32
33
|
var isElm = function isElm(val) {
|
|
33
34
|
return ['number', 'string'].includes(_typeof(val)) || /*#__PURE__*/(0, _react.isValidElement)(val);
|
|
34
35
|
};
|
|
@@ -65,46 +66,54 @@ var renderErrList = function renderErrList(errList, opts) {
|
|
|
65
66
|
code: item === null || item === void 0 ? void 0 : item.errorCode,
|
|
66
67
|
content: item === null || item === void 0 ? void 0 : item.errorMsg,
|
|
67
68
|
status: _const.statusClrMap[item === null || item === void 0 ? void 0 : item.errorType],
|
|
68
|
-
subContent: erorrListShowType === 'innerWindow' && (item === null || item === void 0
|
|
69
|
-
url: item === null || item === void 0
|
|
70
|
-
extra: (item === null || item === void 0 ? void 0 : item.guidance) && erorrListShowType === 'openDrawer' && /*#__PURE__*/
|
|
69
|
+
subContent: erorrListShowType === 'innerWindow' && (item === null || item === void 0 || (_item$guidance = item.guidance) === null || _item$guidance === void 0 ? void 0 : _item$guidance.content),
|
|
70
|
+
url: item === null || item === void 0 || (_item$guidance2 = item.guidance) === null || _item$guidance2 === void 0 ? void 0 : _item$guidance2.guidanceUrl,
|
|
71
|
+
extra: (item === null || item === void 0 ? void 0 : item.guidance) && erorrListShowType === 'openDrawer' && /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
71
72
|
onClick: function onClick() {
|
|
72
73
|
var _item$guidance3;
|
|
73
74
|
_Drawer.drawerHandel.open({
|
|
74
75
|
title: item === null || item === void 0 ? void 0 : item.errorTypeName,
|
|
75
76
|
status: _const.statusClrMap[item === null || item === void 0 ? void 0 : item.errorType],
|
|
76
77
|
mode: 'default',
|
|
77
|
-
content: /*#__PURE__*/
|
|
78
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
78
79
|
// eslint-disable-next-line react/no-danger
|
|
79
80
|
dangerouslySetInnerHTML: {
|
|
80
|
-
__html: item === null || item === void 0
|
|
81
|
+
__html: item === null || item === void 0 || (_item$guidance3 = item.guidance) === null || _item$guidance3 === void 0 ? void 0 : _item$guidance3.content
|
|
81
82
|
}
|
|
82
83
|
})
|
|
83
84
|
});
|
|
84
|
-
}
|
|
85
|
-
|
|
85
|
+
},
|
|
86
|
+
children: getLocale('detail', ' 详情')
|
|
87
|
+
})
|
|
86
88
|
};
|
|
87
89
|
});
|
|
88
90
|
}
|
|
89
|
-
return /*#__PURE__*/
|
|
90
|
-
className: "lx-drawer-empty"
|
|
91
|
-
|
|
91
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
92
|
+
className: "lx-drawer-empty",
|
|
93
|
+
children: getLocale('ErrorMsg.no-information', emptyTxt)
|
|
94
|
+
});
|
|
92
95
|
};
|
|
93
96
|
var renderGuidance = function renderGuidance(guidance, opts) {
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
97
|
+
return guidance !== null && guidance !== void 0 && guidance.title || guidance !== null && guidance !== void 0 && guidance.content ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
98
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
99
|
+
className: "lx-drawer-group-article lx-drawer-article"
|
|
100
|
+
// eslint-disable-next-line react/no-danger
|
|
101
|
+
,
|
|
102
|
+
dangerouslySetInnerHTML: {
|
|
103
|
+
__html: guidance === null || guidance === void 0 ? void 0 : guidance.content
|
|
104
|
+
}
|
|
105
|
+
}), guidance !== null && guidance !== void 0 && guidance.guidanceUrl ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
106
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
107
|
+
onClick: function onClick() {
|
|
108
|
+
window.open(guidance === null || guidance === void 0 ? void 0 : guidance.guidanceUrl, '_blank');
|
|
109
|
+
},
|
|
110
|
+
children: opts.getLocale('documentLink', '文档链接')
|
|
111
|
+
})
|
|
112
|
+
}) : null]
|
|
113
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
114
|
+
className: "lx-drawer-empty",
|
|
115
|
+
children: opts.getLocale('ErrorMsg.no-information', emptyTxt)
|
|
116
|
+
});
|
|
108
117
|
};
|
|
109
118
|
var renderTitle = function renderTitle(msg, opts) {
|
|
110
119
|
var errTypeTitMap = opts.errTypeTitMap;
|
|
@@ -113,7 +122,7 @@ var renderTitle = function renderTitle(msg, opts) {
|
|
|
113
122
|
}
|
|
114
123
|
if (typeof (msg === null || msg === void 0 ? void 0 : msg.code) === 'string') {
|
|
115
124
|
var _msg$code;
|
|
116
|
-
var nbr = msg === null || msg === void 0
|
|
125
|
+
var nbr = msg === null || msg === void 0 || (_msg$code = msg.code) === null || _msg$code === void 0 ? void 0 : _msg$code.split('-')[0];
|
|
117
126
|
return nbr && errTypeTitMap[nbr] ? errTypeTitMap[nbr] : '';
|
|
118
127
|
}
|
|
119
128
|
return '';
|
|
@@ -131,307 +140,311 @@ var ErrorMsg = {
|
|
|
131
140
|
var _msg$resolve;
|
|
132
141
|
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;
|
|
133
142
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
134
|
-
while (1) {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
143
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
144
|
+
case 0:
|
|
145
|
+
_context3.next = 2;
|
|
146
|
+
return (_msg$resolve = msg === null || msg === void 0 ? void 0 : msg.resolve) !== null && _msg$resolve !== void 0 ? _msg$resolve : opts.resolve;
|
|
147
|
+
case 2:
|
|
148
|
+
resolve = _context3.sent;
|
|
149
|
+
_opts$feebackAction = opts.feebackAction, feebackAction = _opts$feebackAction === void 0 ? false : _opts$feebackAction;
|
|
150
|
+
_ref = msg || {}, _ref$target = _ref.target, target = _ref$target === void 0 ? {} : _ref$target, resMsg = _ref.msg, stack = _ref.stack;
|
|
151
|
+
footerContent = [];
|
|
152
|
+
loadingStates = ['loading', 'finish'];
|
|
153
|
+
mapFeebackTxt = {
|
|
154
|
+
loading: opts.getLocale(feedbackTxts[2].code, feedbackTxts[2].title),
|
|
155
|
+
finish: opts.getLocale(feedbackTxts[1].code, feedbackTxts[1].title)
|
|
156
|
+
}; // 故障上报loading
|
|
157
|
+
feedbackLoading = ''; // 故障上报地址
|
|
158
|
+
feedbackUrl = defaultFeedbackUrl; // 是否显示故障上报
|
|
159
|
+
isShowFeedback = true; // 页面请求路径
|
|
160
|
+
pageUrl = window.location.href;
|
|
161
|
+
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>"); // 故障上报数据
|
|
162
|
+
feedbackParams = {
|
|
163
|
+
feedbackType: '5000',
|
|
164
|
+
feedbackProductType: '5000',
|
|
165
|
+
feedbackTitle: msg === null || msg === void 0 ? void 0 : msg.code,
|
|
166
|
+
feedbackContent: JSON.stringify({
|
|
167
|
+
target: target,
|
|
168
|
+
description: getDes
|
|
169
|
+
})
|
|
170
|
+
};
|
|
171
|
+
if (typeof feebackAction === 'boolean' && !feebackAction) {
|
|
172
|
+
isShowFeedback = false;
|
|
173
|
+
}
|
|
174
|
+
if (typeof feebackAction === 'string' && feebackAction) {
|
|
175
|
+
feedbackUrl = feebackAction;
|
|
176
|
+
}
|
|
177
|
+
if (!(typeof feebackAction === 'function')) {
|
|
178
|
+
_context3.next = 21;
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
_context3.next = 19;
|
|
182
|
+
return feebackAction(_objectSpread({}, feedbackParams));
|
|
183
|
+
case 19:
|
|
184
|
+
feebackReturn = _context3.sent;
|
|
185
|
+
if (!feebackReturn) {
|
|
186
|
+
isShowFeedback = false;
|
|
187
|
+
} else {
|
|
188
|
+
feedbackUrl = feebackReturn === null || feebackReturn === void 0 ? void 0 : feebackReturn.url;
|
|
189
|
+
feedbackParams = feebackReturn === null || feebackReturn === void 0 ? void 0 : feebackReturn.payload;
|
|
190
|
+
}
|
|
191
|
+
case 21:
|
|
192
|
+
handleLoading = function handleLoading(_key, _state) {
|
|
193
|
+
var _error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
194
|
+
var getAllList = _Notification.default.getOpenList().map(function (v) {
|
|
195
|
+
if (String(v.itemKey) === String(_key)) {
|
|
196
|
+
return _objectSpread(_objectSpread({}, v), {}, {
|
|
197
|
+
feedbackState: _state ? loadingStates[0] : loadingStates[1]
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
return v;
|
|
201
|
+
});
|
|
202
|
+
_Notification.default.setOpenList(_toConsumableArray(getAllList));
|
|
203
|
+
var feedbackDrawerDom = document.getElementById("lx-feedback-drawer-".concat(_key));
|
|
204
|
+
if (feedbackDrawerDom) {
|
|
205
|
+
// eslint-disable-next-line max-len
|
|
206
|
+
feedbackDrawerDom.innerHTML = _state ? opts.getLocale(feedbackTxts[2].code, feedbackTxts[2].title) : opts.getLocale(feedbackTxts[1].code, feedbackTxts[1].title);
|
|
207
|
+
feedbackDrawerDom.classList.add(btnDisableClass[1]);
|
|
208
|
+
if (_error) {
|
|
209
|
+
feedbackDrawerDom.innerHTML = opts.getLocale(feedbackTxts[0].code, feedbackTxts[0].title);
|
|
210
|
+
feedbackDrawerDom.classList.remove(btnDisableClass[1]);
|
|
211
|
+
}
|
|
165
212
|
}
|
|
166
|
-
|
|
167
|
-
|
|
213
|
+
feedbackLoading = _state ? loadingStates[0] : loadingStates[1];
|
|
214
|
+
if (_error) {
|
|
215
|
+
feedbackLoading = '';
|
|
168
216
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
217
|
+
};
|
|
218
|
+
handleFeeback = (0, _compUtils.debounce)( /*#__PURE__*/function () {
|
|
219
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(flag, elKey) {
|
|
220
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
221
|
+
while (1) switch (_context.prev = _context.next) {
|
|
222
|
+
case 0:
|
|
223
|
+
_context.prev = 0;
|
|
224
|
+
_context.next = 3;
|
|
225
|
+
return _http.default.post(feedbackUrl, {
|
|
226
|
+
data: _objectSpread({}, feedbackParams)
|
|
227
|
+
});
|
|
228
|
+
case 3:
|
|
229
|
+
handleLoading(elKey, false);
|
|
230
|
+
_context.next = 10;
|
|
231
|
+
break;
|
|
232
|
+
case 6:
|
|
233
|
+
_context.prev = 6;
|
|
234
|
+
_context.t0 = _context["catch"](0);
|
|
235
|
+
handleLoading(elKey, false, true);
|
|
236
|
+
// eslint-disable-next-line no-console
|
|
237
|
+
console.error(new Error("ErrorMsg\u7EC4\u4EF6: \u6545\u969C\u4E0A\u62A5\u5931\u8D25\uFF0C".concat(_context.t0)));
|
|
238
|
+
case 10:
|
|
239
|
+
case "end":
|
|
240
|
+
return _context.stop();
|
|
241
|
+
}
|
|
242
|
+
}, _callee, null, [[0, 6]]);
|
|
243
|
+
}));
|
|
244
|
+
return function (_x2, _x3) {
|
|
245
|
+
return _ref2.apply(this, arguments);
|
|
246
|
+
};
|
|
247
|
+
}(), 400);
|
|
248
|
+
renderTxt = function renderTxt(_state) {
|
|
249
|
+
if (_state) {
|
|
250
|
+
// eslint-disable-next-line max-len
|
|
251
|
+
return _state === loadingStates[0] ? opts.getLocale(feedbackTxts[2].code, feedbackTxts[2].title) : opts.getLocale(feedbackTxts[1].code, feedbackTxts[1].title);
|
|
172
252
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
isShowFeedback = false;
|
|
179
|
-
} else {
|
|
180
|
-
feedbackUrl = feebackReturn === null || feebackReturn === void 0 ? void 0 : feebackReturn.url;
|
|
181
|
-
feedbackParams = feebackReturn === null || feebackReturn === void 0 ? void 0 : feebackReturn.payload;
|
|
253
|
+
return opts.getLocale(feedbackTxts[0].code, feedbackTxts[0].title);
|
|
254
|
+
};
|
|
255
|
+
renderDisabled = function renderDisabled(flag, _key) {
|
|
256
|
+
if (_param.feedbackState) {
|
|
257
|
+
return flag === feedbackPlacements[0] ? btnDisableClass[0] : btnDisableClass[1];
|
|
182
258
|
}
|
|
183
|
-
|
|
184
|
-
handleLoading = function handleLoading(_key, _state) {
|
|
185
|
-
var _error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
186
|
-
var getAllList = _Notification.default.getOpenList().map(function (v) {
|
|
187
|
-
if (String(v.itemKey) === String(_key)) {
|
|
188
|
-
return _objectSpread(_objectSpread({}, v), {}, {
|
|
189
|
-
feedbackState: _state ? loadingStates[0] : loadingStates[1]
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
return v;
|
|
193
|
-
});
|
|
194
|
-
_Notification.default.setOpenList(_toConsumableArray(getAllList));
|
|
259
|
+
if (flag === feedbackPlacements[1] && feedbackLoading) {
|
|
195
260
|
var feedbackDrawerDom = document.getElementById("lx-feedback-drawer-".concat(_key));
|
|
196
261
|
if (feedbackDrawerDom) {
|
|
197
|
-
|
|
198
|
-
feedbackDrawerDom.innerHTML = _state ? opts.getLocale(feedbackTxts[2].code, feedbackTxts[2].title) : opts.getLocale(feedbackTxts[1].code, feedbackTxts[1].title);
|
|
199
|
-
feedbackDrawerDom.classList.add(btnDisableClass[1]);
|
|
200
|
-
if (_error) {
|
|
201
|
-
feedbackDrawerDom.innerHTML = opts.getLocale(feedbackTxts[0].code, feedbackTxts[0].title);
|
|
202
|
-
feedbackDrawerDom.classList.remove(btnDisableClass[1]);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
feedbackLoading = _state ? loadingStates[0] : loadingStates[1];
|
|
206
|
-
if (_error) {
|
|
207
|
-
feedbackLoading = '';
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
handleFeeback = (0, _compUtils.debounce)( /*#__PURE__*/function () {
|
|
211
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(flag, elKey) {
|
|
212
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
213
|
-
while (1) {
|
|
214
|
-
switch (_context.prev = _context.next) {
|
|
215
|
-
case 0:
|
|
216
|
-
_context.prev = 0;
|
|
217
|
-
_context.next = 3;
|
|
218
|
-
return _http.default.post(feedbackUrl, {
|
|
219
|
-
data: _objectSpread({}, feedbackParams)
|
|
220
|
-
});
|
|
221
|
-
case 3:
|
|
222
|
-
handleLoading(elKey, false);
|
|
223
|
-
_context.next = 10;
|
|
224
|
-
break;
|
|
225
|
-
case 6:
|
|
226
|
-
_context.prev = 6;
|
|
227
|
-
_context.t0 = _context["catch"](0);
|
|
228
|
-
handleLoading(elKey, false, true);
|
|
229
|
-
// eslint-disable-next-line no-console
|
|
230
|
-
console.error(new Error("ErrorMsg\u7EC4\u4EF6: \u6545\u969C\u4E0A\u62A5\u5931\u8D25\uFF0C".concat(_context.t0)));
|
|
231
|
-
case 10:
|
|
232
|
-
case "end":
|
|
233
|
-
return _context.stop();
|
|
234
|
-
}
|
|
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);
|
|
246
|
-
}
|
|
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];
|
|
252
|
-
}
|
|
253
|
-
if (flag === feedbackPlacements[1] && feedbackLoading) {
|
|
254
|
-
var feedbackDrawerDom = document.getElementById("lx-feedback-drawer-".concat(_key));
|
|
255
|
-
if (feedbackDrawerDom) {
|
|
256
|
-
feedbackDrawerDom.innerHTML = feedbackLoading === loadingStates[0] ? feedbackTxts[2] : feedbackTxts[1];
|
|
257
|
-
}
|
|
258
|
-
return btnDisableClass[1];
|
|
262
|
+
feedbackDrawerDom.innerHTML = feedbackLoading === loadingStates[0] ? feedbackTxts[2] : feedbackTxts[1];
|
|
259
263
|
}
|
|
260
|
-
return
|
|
261
|
-
};
|
|
262
|
-
if (isShowFeedback) {
|
|
263
|
-
footerContent.push( /*#__PURE__*/_react.default.createElement("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 ? void 0 : _param.feedbackState)) {
|
|
268
|
-
var getKey = e.target.getAttribute('config');
|
|
269
|
-
handleLoading(getKey, true);
|
|
270
|
-
handleFeeback(feedbackPlacements[0], getKey);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}, mapFeebackTxt[_param === null || _param === void 0 ? void 0 : _param.feedbackState] || opts.getLocale(feedbackTxts[0].code, feedbackTxts[0].title)));
|
|
264
|
+
return btnDisableClass[1];
|
|
274
265
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
266
|
+
return '';
|
|
267
|
+
};
|
|
268
|
+
if (isShowFeedback) {
|
|
269
|
+
footerContent.push( /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
270
|
+
className: "lx-notification-notice-footer-btn-ghost lx-feedback-notification-".concat(_param.itemKey, " ").concat(renderDisabled(feedbackPlacements[0], _param.itemKey)),
|
|
271
|
+
config: String(_param.itemKey),
|
|
272
|
+
onClick: function onClick(e) {
|
|
273
|
+
if (!(_param !== null && _param !== void 0 && _param.feedbackState)) {
|
|
274
|
+
var getKey = e.target.getAttribute('config');
|
|
275
|
+
handleLoading(getKey, true);
|
|
276
|
+
handleFeeback(feedbackPlacements[0], getKey);
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
children: mapFeebackTxt[_param === null || _param === void 0 ? void 0 : _param.feedbackState] || opts.getLocale(feedbackTxts[0].code, feedbackTxts[0].title)
|
|
280
|
+
}));
|
|
281
|
+
}
|
|
282
|
+
if (opts.extendFooter) {
|
|
283
|
+
if (typeof opts.footer === 'function') {
|
|
284
|
+
footerContent.push(opts.extendFooter());
|
|
285
|
+
} else {
|
|
286
|
+
footerContent.push(opts.extendFooter);
|
|
281
287
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
288
|
+
}
|
|
289
|
+
if (resolve) {
|
|
290
|
+
footerContent.push( /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
291
|
+
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
292
|
+
var _detRes;
|
|
293
|
+
var detRes, article, url, errMsg, renderSubTitle, renderContent;
|
|
294
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
295
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
296
|
+
case 0:
|
|
297
|
+
detRes = {};
|
|
298
|
+
if (resolve !== null && resolve !== void 0 && resolve.article || resolve !== null && resolve !== void 0 && resolve.extend) {
|
|
299
|
+
// 已预设解决方案
|
|
300
|
+
detRes = {
|
|
301
|
+
article: resolve === null || resolve === void 0 ? void 0 : resolve.article,
|
|
302
|
+
extend: resolve === null || resolve === void 0 ? void 0 : resolve.extend
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
article = opts.getArticle(msg.code, opts.getLocale);
|
|
306
|
+
if (!article) {
|
|
307
|
+
_context2.next = 7;
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
// 网络异常无法获取解决方案,使用内置的
|
|
311
|
+
detRes = {
|
|
312
|
+
article: article,
|
|
313
|
+
extend: []
|
|
314
|
+
};
|
|
315
|
+
_context2.next = 22;
|
|
316
|
+
break;
|
|
317
|
+
case 7:
|
|
318
|
+
// 请求后端获取解决方案
|
|
313
319
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
320
|
+
if (typeof resolve === 'string') {
|
|
321
|
+
url = resolve;
|
|
322
|
+
} else if (_typeof(resolve) === 'object') {
|
|
323
|
+
url = resolve.href;
|
|
324
|
+
}
|
|
325
|
+
if (!url) {
|
|
326
|
+
_context2.next = 21;
|
|
327
|
+
break;
|
|
328
|
+
}
|
|
329
|
+
_context2.prev = 9;
|
|
330
|
+
_context2.next = 12;
|
|
331
|
+
return _http.default.get(url, {
|
|
332
|
+
params: {
|
|
333
|
+
errorCode: msg === null || msg === void 0 ? void 0 : msg.code,
|
|
334
|
+
errorMsg: msg === null || msg === void 0 ? void 0 : msg.msg
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
case 12:
|
|
338
|
+
errMsg = _context2.sent;
|
|
339
|
+
detRes = {
|
|
340
|
+
article: errMsg === null || errMsg === void 0 ? void 0 : errMsg.guidance,
|
|
341
|
+
extend: errMsg === null || errMsg === void 0 ? void 0 : errMsg.errorInfos
|
|
342
|
+
};
|
|
343
|
+
_context2.next = 19;
|
|
344
|
+
break;
|
|
345
|
+
case 16:
|
|
346
|
+
_context2.prev = 16;
|
|
347
|
+
_context2.t0 = _context2["catch"](9);
|
|
348
|
+
// eslint-disable-next-line no-console
|
|
349
|
+
console.error(new Error("ErrorMsg\u7EC4\u4EF6: \u83B7\u53D6\u89E3\u51B3\u65B9\u6848\u5931\u8D25\uFF0C".concat(_context2.t0)));
|
|
350
|
+
case 19:
|
|
351
|
+
_context2.next = 22;
|
|
352
|
+
break;
|
|
353
|
+
case 21:
|
|
354
|
+
// eslint-disable-next-line no-console
|
|
355
|
+
console.error(new Error('ErrorMsg组件: 无效resolve'));
|
|
356
|
+
case 22:
|
|
357
|
+
renderSubTitle = function renderSubTitle() {
|
|
358
|
+
if (target.type === targetTypes[0] && target !== null && target !== void 0 && target.id) {
|
|
359
|
+
return "".concat(opts.getLocale('serviceURL', '服务地址'), "\uFF1A").concat(target === null || target === void 0 ? void 0 : target.id);
|
|
360
|
+
}
|
|
361
|
+
return null;
|
|
362
|
+
};
|
|
363
|
+
renderContent = function renderContent() {
|
|
364
|
+
var baseMsg = (msg === null || msg === void 0 ? void 0 : msg.description) || (msg === null || msg === void 0 ? void 0 : msg.msg);
|
|
365
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
366
|
+
children: [baseMsg ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
367
|
+
children: [baseMsg, /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {})]
|
|
368
|
+
}) : '', msg === null || msg === void 0 ? void 0 : msg.stack]
|
|
369
|
+
});
|
|
370
|
+
};
|
|
371
|
+
_Drawer.drawerHandel.open({
|
|
372
|
+
getLocale: opts.getLocale,
|
|
373
|
+
title: "".concat(renderTitle(msg, opts), "(").concat((msg === null || msg === void 0 ? void 0 : msg.code) || '', ")"),
|
|
374
|
+
status: 'error',
|
|
375
|
+
mode: 'errorInfo',
|
|
376
|
+
content: renderContent(),
|
|
377
|
+
errorInfoProps: {
|
|
378
|
+
tabs: [{
|
|
379
|
+
key: 'article',
|
|
380
|
+
tab: opts.getLocale('ErrorMsg.solution', '解决方案')
|
|
381
|
+
}, {
|
|
382
|
+
key: 'extend',
|
|
383
|
+
tab: opts.getLocale('ErrorMsg.errorMsgMatch', '错误信息匹配')
|
|
384
|
+
}],
|
|
385
|
+
tabsActiveKey: 'article',
|
|
386
|
+
tabsContent: renderGuidance((_detRes = detRes) === null || _detRes === void 0 ? void 0 : _detRes.article, opts),
|
|
387
|
+
onTabsChange: function onTabsChange(record) {
|
|
388
|
+
var _detRes2, _detRes3;
|
|
389
|
+
switch (record === null || record === void 0 ? void 0 : record.key) {
|
|
390
|
+
case 'article':
|
|
391
|
+
record.update({
|
|
392
|
+
errorInfoProps: {
|
|
393
|
+
tabsActiveKey: record === null || record === void 0 ? void 0 : record.key,
|
|
394
|
+
tabsContent: renderGuidance((_detRes2 = detRes) === null || _detRes2 === void 0 ? void 0 : _detRes2.article, opts)
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
break;
|
|
398
|
+
case 'extend':
|
|
399
|
+
record.update({
|
|
400
|
+
errorInfoProps: {
|
|
401
|
+
tabsActiveKey: record === null || record === void 0 ? void 0 : record.key,
|
|
402
|
+
tabsContent: renderErrList((_detRes3 = detRes) === null || _detRes3 === void 0 ? void 0 : _detRes3.extend, opts)
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
break;
|
|
406
|
+
default:
|
|
407
|
+
break;
|
|
354
408
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
title: "".concat(renderTitle(msg, opts), "(").concat((msg === null || msg === void 0 ? void 0 : msg.code) || '', ")"),
|
|
364
|
-
status: 'error',
|
|
365
|
-
mode: 'errorInfo',
|
|
366
|
-
content: renderContent(),
|
|
367
|
-
errorInfoProps: {
|
|
368
|
-
tabs: [{
|
|
369
|
-
key: 'article',
|
|
370
|
-
tab: opts.getLocale('ErrorMsg.solution', '解决方案')
|
|
371
|
-
}, {
|
|
372
|
-
key: 'extend',
|
|
373
|
-
tab: opts.getLocale('ErrorMsg.errorMsgMatch', '错误信息匹配')
|
|
374
|
-
}],
|
|
375
|
-
tabsActiveKey: 'article',
|
|
376
|
-
tabsContent: renderGuidance((_detRes = detRes) === null || _detRes === void 0 ? void 0 : _detRes.article, opts),
|
|
377
|
-
onTabsChange: function onTabsChange(record) {
|
|
378
|
-
var _detRes2, _detRes3;
|
|
379
|
-
switch (record === null || record === void 0 ? void 0 : record.key) {
|
|
380
|
-
case 'article':
|
|
381
|
-
record.update({
|
|
382
|
-
errorInfoProps: {
|
|
383
|
-
tabsActiveKey: record === null || record === void 0 ? void 0 : record.key,
|
|
384
|
-
tabsContent: renderGuidance((_detRes2 = detRes) === null || _detRes2 === void 0 ? void 0 : _detRes2.article, opts)
|
|
385
|
-
}
|
|
386
|
-
});
|
|
387
|
-
break;
|
|
388
|
-
case 'extend':
|
|
389
|
-
record.update({
|
|
390
|
-
errorInfoProps: {
|
|
391
|
-
tabsActiveKey: record === null || record === void 0 ? void 0 : record.key,
|
|
392
|
-
tabsContent: renderErrList((_detRes3 = detRes) === null || _detRes3 === void 0 ? void 0 : _detRes3.extend, opts)
|
|
393
|
-
}
|
|
394
|
-
});
|
|
395
|
-
break;
|
|
396
|
-
default:
|
|
397
|
-
break;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
subTitle: renderSubTitle(),
|
|
412
|
+
footer: isShowFeedback ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
413
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
414
|
+
className: "lx-drawer-btn",
|
|
415
|
+
onClick: function onClick() {
|
|
416
|
+
_Drawer.drawerHandel.close();
|
|
400
417
|
},
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
onClick: function onClick(e) {
|
|
412
|
-
if (!_param.feedbackState) {
|
|
413
|
-
var getKey = e.target.getAttribute('config');
|
|
414
|
-
handleLoading(getKey, true);
|
|
415
|
-
handleFeeback(feedbackPlacements[1], getKey);
|
|
416
|
-
}
|
|
418
|
+
children: opts.cancelText
|
|
419
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
420
|
+
className: "lx-drawer-btn lx-drawer-btn-primary ".concat(renderDisabled(feedbackPlacements[1], _param.itemKey)),
|
|
421
|
+
id: "lx-feedback-drawer-".concat(_param.itemKey),
|
|
422
|
+
config: _param.itemKey,
|
|
423
|
+
onClick: function onClick(e) {
|
|
424
|
+
if (!_param.feedbackState) {
|
|
425
|
+
var getKey = e.target.getAttribute('config');
|
|
426
|
+
handleLoading(getKey, true);
|
|
427
|
+
handleFeeback(feedbackPlacements[1], getKey);
|
|
417
428
|
}
|
|
418
|
-
},
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
429
|
+
},
|
|
430
|
+
children: renderTxt(_param.feedbackState)
|
|
431
|
+
})]
|
|
432
|
+
}) : null
|
|
433
|
+
});
|
|
434
|
+
case 25:
|
|
435
|
+
case "end":
|
|
436
|
+
return _context2.stop();
|
|
437
|
+
}
|
|
438
|
+
}, _callee2, null, [[9, 16]]);
|
|
439
|
+
})),
|
|
440
|
+
className: "lx-notification-notice-footer-btn-primary",
|
|
441
|
+
children: opts.okText
|
|
442
|
+
}));
|
|
443
|
+
}
|
|
444
|
+
return _context3.abrupt("return", footerContent);
|
|
445
|
+
case 29:
|
|
446
|
+
case "end":
|
|
447
|
+
return _context3.stop();
|
|
435
448
|
}
|
|
436
449
|
}, _callee3);
|
|
437
450
|
}));
|
|
@@ -470,5 +483,4 @@ var ErrorMsg = {
|
|
|
470
483
|
}
|
|
471
484
|
// getInstance,
|
|
472
485
|
};
|
|
473
|
-
var _default = ErrorMsg;
|
|
474
|
-
exports.default = _default;
|
|
486
|
+
var _default = exports.default = ErrorMsg;
|