@lingxiteam/assets 4.2.1-alpha.2 → 4.3.2-alpha.3
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 +106 -0
- package/es/rootConfig/locales/enus/config-locales-es.pc.d.ts +2 -0
- package/es/rootConfig/locales/enus/config-locales-es.pc.js +42 -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 +865 -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 +20 -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 +266 -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 +57 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.pc.d.ts +2 -0
- package/es/rootConfig/locales/zhcn/config-locales-cn.pc.js +97 -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 +583 -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 +13 -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 +127 -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 +106 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.pc.d.ts +2 -0
- package/es/rootConfig/locales/zhhk/config-locales-hk.pc.js +174 -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 +869 -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 +20 -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 +266 -0
- package/es/rootConfig/mobile/BusiComp.d.ts +0 -1
- package/es/rootConfig/mobile/BusiComp.js +13 -10
- package/es/rootConfig/mobile/MobileModal.js +32 -27
- package/es/rootConfig/mobile/MobilePopover.d.ts +0 -2
- package/es/rootConfig/mobile/MobilePopover.js +16 -13
- package/es/rootConfig/mobile/index.js +4 -4
- package/es/rootConfig/mobile/page.d.ts +17 -2
- package/es/rootConfig/mobile/page.js +45 -38
- package/es/rootConfig/pc/BusiComp.js +82 -12
- package/es/rootConfig/pc/Drawer.d.ts +8 -9
- package/es/rootConfig/pc/Drawer.js +116 -46
- package/es/rootConfig/pc/Modal.d.ts +0 -1
- package/es/rootConfig/pc/Modal.js +90 -20
- package/es/rootConfig/pc/Popover.d.ts +0 -1
- package/es/rootConfig/pc/Popover.js +85 -15
- package/es/rootConfig/pc/index.js +5 -5
- package/es/rootConfig/pc/page.d.ts +0 -2
- package/es/rootConfig/pc/page.js +91 -22
- package/es/rootConfig/todoActionList.d.ts +1 -0
- package/es/rootConfig/todoActionList.js +1845 -719
- 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 +197 -198
- 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 +112 -0
- package/lib/rootConfig/locales/enus/config-locales-es.pc.d.ts +2 -0
- package/lib/rootConfig/locales/enus/config-locales-es.pc.js +48 -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 +871 -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 +26 -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 +272 -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 +63 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.pc.d.ts +2 -0
- package/lib/rootConfig/locales/zhcn/config-locales-cn.pc.js +103 -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 +589 -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 +19 -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 +133 -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 +112 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.pc.d.ts +2 -0
- package/lib/rootConfig/locales/zhhk/config-locales-hk.pc.js +180 -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 +875 -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 +26 -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 +272 -0
- package/lib/rootConfig/mobile/BusiComp.d.ts +0 -1
- package/lib/rootConfig/mobile/BusiComp.js +14 -12
- package/lib/rootConfig/mobile/MobileModal.js +33 -29
- package/lib/rootConfig/mobile/MobilePopover.d.ts +0 -2
- package/lib/rootConfig/mobile/MobilePopover.js +17 -15
- package/lib/rootConfig/mobile/page.d.ts +17 -2
- package/lib/rootConfig/mobile/page.js +46 -40
- package/lib/rootConfig/pc/BusiComp.js +83 -14
- package/lib/rootConfig/pc/Drawer.d.ts +8 -9
- package/lib/rootConfig/pc/Drawer.js +117 -48
- package/lib/rootConfig/pc/Modal.d.ts +0 -1
- package/lib/rootConfig/pc/Modal.js +91 -22
- package/lib/rootConfig/pc/Popover.d.ts +0 -1
- package/lib/rootConfig/pc/Popover.js +86 -17
- package/lib/rootConfig/pc/page.d.ts +0 -2
- package/lib/rootConfig/pc/page.js +92 -24
- package/lib/rootConfig/todoActionList.d.ts +1 -0
- package/lib/rootConfig/todoActionList.js +1815 -695
- 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 +198 -200
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -10,14 +10,15 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
10
10
|
var _SVGstring = require("../../SVGstring");
|
|
11
11
|
var _img = require("../../../../utils/img");
|
|
12
12
|
require("./Drawer.less");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _getRequireWildcardCache(
|
|
15
|
-
function _interopRequireWildcard(
|
|
16
|
-
function ownKeys(
|
|
17
|
-
function _objectSpread(
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
18
19
|
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; }
|
|
19
|
-
function _toPropertyKey(
|
|
20
|
-
function _toPrimitive(
|
|
20
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
21
|
+
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); }
|
|
21
22
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
22
23
|
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."); }
|
|
23
24
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -25,8 +26,8 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
25
26
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
26
27
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
27
28
|
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); }
|
|
28
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
29
|
-
function _iterableToArrayLimit(
|
|
29
|
+
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; }
|
|
30
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
30
31
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
32
|
var isDomEle = function isDomEle(target) {
|
|
32
33
|
return typeof target === 'string' || typeof target === 'number' || /*#__PURE__*/(0, _react.isValidElement)(target);
|
|
@@ -98,46 +99,52 @@ var Drawer = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
98
99
|
return cont;
|
|
99
100
|
};
|
|
100
101
|
return items.map(function (item) {
|
|
101
|
-
return /*#__PURE__*/
|
|
102
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
102
103
|
className: "lx-drawer-group-article",
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
104
|
+
children: [isDomEle(item === null || item === void 0 ? void 0 : item.title) ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
105
|
+
className: "lx-drawer-group-article-title",
|
|
106
|
+
children: item === null || item === void 0 ? void 0 : item.title
|
|
107
|
+
}) : null, isDomEle(item === null || item === void 0 ? void 0 : item.author) ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
108
|
+
className: "lx-drawer-group-article-author",
|
|
109
|
+
children: item === null || item === void 0 ? void 0 : item.author
|
|
110
|
+
}) : null, isDomEle(item === null || item === void 0 ? void 0 : item.content) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
111
|
+
className: "lx-drawer-group-article-content",
|
|
112
|
+
children: [renderItemÇont(item === null || item === void 0 ? void 0 : item.content, item[contentRowKey]), typeof (item === null || item === void 0 ? void 0 : item.content) === 'string' && (item === null || item === void 0 ? void 0 : item.content.length) > contentMaxLen ? /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
113
|
+
className: "lx-drawer-group-article-extra",
|
|
114
|
+
onClick: function onClick() {
|
|
115
|
+
setExtraConts(function (list) {
|
|
116
|
+
var cloneList = _toConsumableArray(list);
|
|
117
|
+
if (!item[contentRowKey]) {
|
|
118
|
+
return cloneList;
|
|
119
|
+
}
|
|
120
|
+
if (list.includes(item[contentRowKey])) {
|
|
121
|
+
return cloneList.filter(function (record) {
|
|
122
|
+
return record !== item[contentRowKey];
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
return [].concat(_toConsumableArray(cloneList), [item[contentRowKey]]);
|
|
121
126
|
});
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
})
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
+
},
|
|
128
|
+
children: extraConts.includes(item[contentRowKey]) ? getLocale('packUp', '收起') : getLocale('open', '展开')
|
|
129
|
+
}) : null]
|
|
130
|
+
}) : null]
|
|
131
|
+
}, item[contentRowKey]);
|
|
127
132
|
});
|
|
128
133
|
}
|
|
129
134
|
return null;
|
|
130
135
|
};
|
|
131
136
|
if (Array.isArray(dataSource) && dataSource.length > 0) {
|
|
132
137
|
return dataSource.map(function (item, index) {
|
|
133
|
-
return renderRecord instanceof Function ? renderRecord(item, index) : /*#__PURE__*/
|
|
138
|
+
return renderRecord instanceof Function ? renderRecord(item, index) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
134
139
|
className: "lx-drawer-group-item",
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
141
|
+
className: "lx-drawer-group-item-head",
|
|
142
|
+
children: item === null || item === void 0 ? void 0 : item.title
|
|
143
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
144
|
+
className: "lx-drawer-group-item-body",
|
|
145
|
+
children: [isDomEle(item === null || item === void 0 ? void 0 : item.content) ? item === null || item === void 0 ? void 0 : item.content : '', renderList(item === null || item === void 0 ? void 0 : item.content)]
|
|
146
|
+
})]
|
|
147
|
+
}, item[rowKey]);
|
|
141
148
|
});
|
|
142
149
|
}
|
|
143
150
|
return null;
|
|
@@ -147,48 +154,60 @@ var Drawer = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
147
154
|
_errorInfoProps$tabsR = errorInfoProps.tabsRowKey,
|
|
148
155
|
tabsRowKey = _errorInfoProps$tabsR === void 0 ? 'key' : _errorInfoProps$tabsR;
|
|
149
156
|
if (Array.isArray(tabsCont) && tabsCont.length > 0) {
|
|
150
|
-
return /*#__PURE__*/
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
157
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
158
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
159
|
+
className: "lx-drawer-err-list",
|
|
160
|
+
children: tabsCont.map(function (item) {
|
|
161
|
+
return tabsRowRender instanceof Function ? tabsRowRender(item) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
162
|
+
className: (0, _classnames.default)('lx-drawer-err-item', item === null || item === void 0 ? void 0 : item.status),
|
|
163
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
164
|
+
className: "lx-drawer-err-item-head",
|
|
165
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
166
|
+
className: "lx-drawer-err-item-head-cell",
|
|
167
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
168
|
+
className: "lx-drawer-err-item-head-title",
|
|
169
|
+
children: [item === null || item === void 0 ? void 0 : item.title, ' ']
|
|
170
|
+
}), item === null || item === void 0 ? void 0 : item.code]
|
|
171
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
172
|
+
className: "lx-drawer-err-item-head-extra",
|
|
173
|
+
children: [' ', isDomEle(item === null || item === void 0 ? void 0 : item.extra) ? item === null || item === void 0 ? void 0 : item.extra : null, item.subContent && /*#__PURE__*/(0, _jsxRuntime.jsxs)("a", {
|
|
174
|
+
onClick: function onClick() {
|
|
175
|
+
return setErrorCollapseMap(function (pre) {
|
|
176
|
+
return _objectSpread(_objectSpread({}, pre), {}, _defineProperty({}, item[tabsRowKey], !errorCollapseMap[item[tabsRowKey]]));
|
|
177
|
+
});
|
|
178
|
+
},
|
|
179
|
+
children: [errorCollapseMap[item[tabsRowKey]] ? getLocale('packUp', '收起') : getLocale('open', '展开'), /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
180
|
+
src: (0, _img.getSvgImageBase64)(_SVGstring.ArrowIcon),
|
|
181
|
+
alt: "",
|
|
182
|
+
className: (0, _classnames.default)('lx-drawer-err-item-head-extra-arrow', {
|
|
183
|
+
'lx-icon-up': errorCollapseMap[item[tabsRowKey]]
|
|
184
|
+
})
|
|
185
|
+
})]
|
|
186
|
+
})]
|
|
187
|
+
})]
|
|
188
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
189
|
+
className: "lx-drawer-err-item-body",
|
|
190
|
+
children: [item === null || item === void 0 ? void 0 : item.content, errorCollapseMap[item[tabsRowKey]] && item.subContent && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
191
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
192
|
+
className: "lx-drawer-err-item-body-subcontent lx-drawer-article"
|
|
193
|
+
// eslint-disable-next-line react/no-danger
|
|
194
|
+
,
|
|
195
|
+
dangerouslySetInnerHTML: {
|
|
196
|
+
__html: item === null || item === void 0 ? void 0 : item.subContent
|
|
197
|
+
}
|
|
198
|
+
}), item.url && /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
199
|
+
className: "lx-drawer-err-item-body-jump",
|
|
200
|
+
href: item.url,
|
|
201
|
+
target: "_blank",
|
|
202
|
+
rel: "noreferrer",
|
|
203
|
+
children: getLocale('documentLink', '文档链接')
|
|
204
|
+
})]
|
|
205
|
+
})]
|
|
206
|
+
})]
|
|
207
|
+
}, item[tabsRowKey]);
|
|
175
208
|
})
|
|
176
|
-
})
|
|
177
|
-
|
|
178
|
-
}, item === null || item === void 0 ? void 0 : item.content, errorCollapseMap[item[tabsRowKey]] && item.subContent && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
179
|
-
className: "lx-drawer-err-item-body-subcontent lx-drawer-article"
|
|
180
|
-
// eslint-disable-next-line react/no-danger
|
|
181
|
-
,
|
|
182
|
-
dangerouslySetInnerHTML: {
|
|
183
|
-
__html: item === null || item === void 0 ? void 0 : item.subContent
|
|
184
|
-
}
|
|
185
|
-
}), item.url && /*#__PURE__*/_react.default.createElement("a", {
|
|
186
|
-
className: "lx-drawer-err-item-body-jump",
|
|
187
|
-
href: item.url,
|
|
188
|
-
target: "_blank",
|
|
189
|
-
rel: "noreferrer"
|
|
190
|
-
}, getLocale('documentLink', '文档链接')))));
|
|
191
|
-
})));
|
|
209
|
+
})
|
|
210
|
+
});
|
|
192
211
|
}
|
|
193
212
|
return isDomEle(tabsCont) ? tabsCont : null;
|
|
194
213
|
};
|
|
@@ -202,83 +221,99 @@ var Drawer = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
202
221
|
tabsContent = errorInfoProps.tabsContent,
|
|
203
222
|
tabsFooter = errorInfoProps.tabsFooter,
|
|
204
223
|
onTabsChange = errorInfoProps.onTabsChange;
|
|
205
|
-
return /*#__PURE__*/
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
})
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
224
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
225
|
+
children: [isDomEle(subTitle) ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
226
|
+
className: "lx-drawer-sub-title",
|
|
227
|
+
title: subTitle,
|
|
228
|
+
children: subTitle
|
|
229
|
+
}) : null, isDomEle(content) ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
230
|
+
className: "lx-drawer-code-desc",
|
|
231
|
+
children: content
|
|
232
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
233
|
+
className: (0, _classnames.default)('lx-drawer-code-tabs', {
|
|
234
|
+
full: isFull
|
|
235
|
+
}),
|
|
236
|
+
children: [Array.isArray(tabs) && tabs.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
237
|
+
className: "lx-drawer-code-tabs-head",
|
|
238
|
+
children: [isDomEle(content) ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
239
|
+
className: "lx-drawer-code-tabs-control",
|
|
240
|
+
onClick: function onClick() {
|
|
241
|
+
setIsFull(!isFull);
|
|
242
|
+
},
|
|
243
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
244
|
+
src: (0, _img.getSvgImageBase64)(_SVGstring.ArrowIcon),
|
|
245
|
+
alt: "",
|
|
246
|
+
className: (0, _classnames.default)('lx-drawer-code-tabs-control-icon', isFull ? '' : 'flip')
|
|
247
|
+
})
|
|
248
|
+
}) : null, tabs.map(function (item) {
|
|
249
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
250
|
+
className: (0, _classnames.default)({
|
|
251
|
+
active: tabsActiveKey === item.key
|
|
252
|
+
}, 'lx-drawer-code-tabs-head-item'),
|
|
253
|
+
onClick: function onClick(ev) {
|
|
254
|
+
onTabsChange(_objectSpread(_objectSpread({}, item), {}, {
|
|
255
|
+
update: props === null || props === void 0 ? void 0 : props.onUpdate
|
|
256
|
+
}), ev);
|
|
257
|
+
},
|
|
258
|
+
children: item.tab
|
|
259
|
+
}, item.key);
|
|
260
|
+
})]
|
|
261
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
262
|
+
className: "lx-drawer-code-tabs-body",
|
|
263
|
+
children: [renderTabsList(tabsContent), isDomEle(tabsFooter) ? tabsFooter : null]
|
|
264
|
+
})]
|
|
265
|
+
})]
|
|
266
|
+
});
|
|
240
267
|
}
|
|
241
268
|
if (mode === 'groupList') {
|
|
242
|
-
return /*#__PURE__*/
|
|
269
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
270
|
+
children: renderGroups()
|
|
271
|
+
});
|
|
243
272
|
}
|
|
244
273
|
return isDomEle(content) ? content : null;
|
|
245
274
|
};
|
|
246
|
-
return /*#__PURE__*/
|
|
275
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
247
276
|
className: (0, _classnames.default)('lx-drawer', {
|
|
248
277
|
opening: visible,
|
|
249
278
|
closeing: !visible
|
|
250
279
|
}),
|
|
251
|
-
ref: ref
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
280
|
+
ref: ref,
|
|
281
|
+
children: [mask ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
282
|
+
className: "lx-drawer-mask",
|
|
283
|
+
onClick: onClose
|
|
284
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
285
|
+
className: (0, _classnames.default)('lx-drawer-container', status),
|
|
286
|
+
style: {
|
|
287
|
+
width: "".concat(width, "px"),
|
|
288
|
+
transform: "translateX(-".concat(offset, "px)")
|
|
289
|
+
},
|
|
290
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
291
|
+
className: "lx-drawer-head",
|
|
292
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
293
|
+
className: "lx-drawer-head-title",
|
|
294
|
+
children: isDomEle(title) ? title : null
|
|
295
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
296
|
+
className: "lx-drawer-head-extra",
|
|
297
|
+
onClick: onClose,
|
|
298
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
299
|
+
src: (0, _img.getSvgImageBase64)(status === 'default' ? _SVGstring.CloseIcon : _SVGstring.CloseWhiteIcon),
|
|
300
|
+
alt: "",
|
|
301
|
+
className: "lx-drawer-head-close"
|
|
302
|
+
})
|
|
303
|
+
})]
|
|
304
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
305
|
+
className: "lx-drawer-body",
|
|
306
|
+
children: renderContent()
|
|
307
|
+
}), isDomEle(footer) ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
308
|
+
className: "lx-drawer-footer",
|
|
309
|
+
children: footer
|
|
310
|
+
}) : null]
|
|
311
|
+
})]
|
|
312
|
+
});
|
|
277
313
|
});
|
|
278
314
|
Drawer.defaultProps = {
|
|
279
315
|
getLocale: function getLocale(t, p) {
|
|
280
316
|
return p !== null && p !== void 0 ? p : '';
|
|
281
317
|
}
|
|
282
318
|
};
|
|
283
|
-
var _default = Drawer;
|
|
284
|
-
exports.default = _default;
|
|
319
|
+
var _default = exports.default = Drawer;
|