@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
package/es/IconSvg/index.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
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); }
|
|
2
2
|
var _excluded = ["style", "src"];
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
5
|
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; }
|
|
6
|
-
function _toPropertyKey(
|
|
7
|
-
function _toPrimitive(
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { getSvgImageBase64 } from "../utils/img";
|
|
10
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { getSvgImageBase64 } from '../utils/img';
|
|
12
13
|
var IconSvg = function IconSvg(props) {
|
|
13
14
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14
15
|
var _props$style = props.style,
|
|
15
16
|
style = _props$style === void 0 ? {} : _props$style,
|
|
16
17
|
src = props.src,
|
|
17
18
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
18
|
-
return _jsx("i", _objectSpread(_objectSpread({}, restProps), {}, {
|
|
19
|
+
return /*#__PURE__*/_jsx("i", _objectSpread(_objectSpread({}, restProps), {}, {
|
|
19
20
|
style: _objectSpread(_objectSpread({}, restProps), {}, {
|
|
20
21
|
backgroundImage: getSvgImageBase64(src)
|
|
21
22
|
})
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React, { forwardRef, isValidElement } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import { BackIcon } from
|
|
4
|
-
import { getSvgImageBase64 } from
|
|
5
|
-
import
|
|
3
|
+
import { BackIcon } from "../../SVGstring";
|
|
4
|
+
import { getSvgImageBase64 } from "../../../../utils/img";
|
|
5
|
+
import "./Drawer.less";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
8
|
var isDomEle = function isDomEle(target) {
|
|
7
9
|
return typeof target === 'string' || /*#__PURE__*/isValidElement(target);
|
|
8
10
|
};
|
|
@@ -21,86 +23,106 @@ var Drawer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
21
23
|
getLocale = props.getLocale;
|
|
22
24
|
var renderItems = function renderItems() {
|
|
23
25
|
if (Array.isArray(dataSource) && dataSource.length > 0) {
|
|
24
|
-
return /*#__PURE__*/
|
|
25
|
-
className: "lxm-drawer-list"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
26
|
+
return /*#__PURE__*/_jsx("div", {
|
|
27
|
+
className: "lxm-drawer-list",
|
|
28
|
+
children: dataSource.map(function (item) {
|
|
29
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
30
|
+
className: classnames('lxm-drawer-list-item', item === null || item === void 0 ? void 0 : item.status),
|
|
31
|
+
onClick: function onClick() {
|
|
32
|
+
onClickRecord(item);
|
|
33
|
+
},
|
|
34
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
35
|
+
className: "lxm-drawer-list-item-dt",
|
|
36
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
37
|
+
className: "lxm-drawer-list-item-dt-title",
|
|
38
|
+
children: (item === null || item === void 0 ? void 0 : item.title) || ''
|
|
39
|
+
}), item !== null && item !== void 0 && item.extra ? /*#__PURE__*/_jsx("div", {
|
|
40
|
+
className: "lxm-drawer-list-item-dt-extra",
|
|
41
|
+
children: item === null || item === void 0 ? void 0 : item.extra
|
|
42
|
+
}) : '']
|
|
43
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
44
|
+
className: "lxm-drawer-list-item-dd",
|
|
45
|
+
children: (item === null || item === void 0 ? void 0 : item.content) || ''
|
|
46
|
+
})]
|
|
47
|
+
}, item === null || item === void 0 ? void 0 : item.key);
|
|
48
|
+
})
|
|
49
|
+
});
|
|
43
50
|
}
|
|
44
|
-
return /*#__PURE__*/
|
|
45
|
-
className: "lxm-drawer-empty"
|
|
46
|
-
|
|
51
|
+
return /*#__PURE__*/_jsx("div", {
|
|
52
|
+
className: "lxm-drawer-empty",
|
|
53
|
+
children: getLocale('noData', '暂无数据')
|
|
54
|
+
});
|
|
47
55
|
};
|
|
48
56
|
var renderContent = function renderContent() {
|
|
49
|
-
if (dataSource && (
|
|
50
|
-
return /*#__PURE__*/
|
|
51
|
-
className: "lxm-drawer-content"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
57
|
+
if (dataSource && (dataSource !== null && dataSource !== void 0 && dataSource.title || dataSource !== null && dataSource !== void 0 && dataSource.author || dataSource !== null && dataSource !== void 0 && dataSource.content)) {
|
|
58
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
59
|
+
className: "lxm-drawer-content",
|
|
60
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
61
|
+
className: "lxm-drawer-content-head",
|
|
62
|
+
children: [isDomEle(dataSource === null || dataSource === void 0 ? void 0 : dataSource.title) ? /*#__PURE__*/_jsx("div", {
|
|
63
|
+
className: "lxm-drawer-content-head-title",
|
|
64
|
+
children: dataSource === null || dataSource === void 0 ? void 0 : dataSource.title
|
|
65
|
+
}) : '', isDomEle(dataSource === null || dataSource === void 0 ? void 0 : dataSource.author) ? /*#__PURE__*/_jsx("div", {
|
|
66
|
+
className: "lxm-drawer-content-head-author",
|
|
67
|
+
children: dataSource === null || dataSource === void 0 ? void 0 : dataSource.author
|
|
68
|
+
}) : '']
|
|
69
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
70
|
+
className: "lxm-drawer-content-body",
|
|
71
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
72
|
+
// eslint-disable-next-line react/no-danger
|
|
73
|
+
dangerouslySetInnerHTML: {
|
|
74
|
+
__html: dataSource === null || dataSource === void 0 ? void 0 : dataSource.content
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
66
79
|
}
|
|
67
|
-
return /*#__PURE__*/
|
|
68
|
-
className: "lxm-drawer-empty"
|
|
69
|
-
|
|
80
|
+
return /*#__PURE__*/_jsx("div", {
|
|
81
|
+
className: "lxm-drawer-empty",
|
|
82
|
+
children: getLocale('ErrorMsg.no-information', emptyTxt)
|
|
83
|
+
});
|
|
70
84
|
};
|
|
71
|
-
return visible ? /*#__PURE__*/
|
|
85
|
+
return visible ? /*#__PURE__*/_jsx("div", {
|
|
72
86
|
ref: ref,
|
|
73
|
-
className: "lxm-drawer-wraper"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
87
|
+
className: "lxm-drawer-wraper",
|
|
88
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
89
|
+
className: "lxm-drawer-container",
|
|
90
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
91
|
+
className: "lxm-drawer-header",
|
|
92
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
93
|
+
className: "lxm-drawer-header-extend",
|
|
94
|
+
onClick: onCancel,
|
|
95
|
+
children: /*#__PURE__*/_jsx("img", {
|
|
96
|
+
src: getSvgImageBase64(BackIcon),
|
|
97
|
+
alt: "",
|
|
98
|
+
className: "lxm-drawer-header-close"
|
|
99
|
+
})
|
|
100
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
101
|
+
className: "lxm-drawer-header-title",
|
|
102
|
+
children: isDomEle(title) ? title : ''
|
|
103
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
104
|
+
className: "lxm-drawer-header-extend"
|
|
105
|
+
})]
|
|
106
|
+
}), Array.isArray(tabs) && tabs.length > 0 ? /*#__PURE__*/_jsx("div", {
|
|
107
|
+
className: "lxm-drawer-tabs",
|
|
108
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
109
|
+
className: "lxm-drawer-tabs-row",
|
|
110
|
+
children: tabs.map(function (item) {
|
|
111
|
+
return /*#__PURE__*/_jsx("div", {
|
|
112
|
+
className: classnames('lxm-drawer-tabs-btn', activeTabsKey === (item === null || item === void 0 ? void 0 : item.key) ? 'active' : ''),
|
|
113
|
+
onClick: function onClick() {
|
|
114
|
+
onTabsChange(item);
|
|
115
|
+
},
|
|
116
|
+
children: item.tab
|
|
117
|
+
}, item === null || item === void 0 ? void 0 : item.key);
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
}) : '', /*#__PURE__*/_jsx("div", {
|
|
121
|
+
className: "lxm-drawer-main",
|
|
122
|
+
children: mode === 'list' ? renderItems() : renderContent()
|
|
123
|
+
})]
|
|
124
|
+
})
|
|
125
|
+
}) : '';
|
|
104
126
|
});
|
|
105
127
|
Drawer.defaultProps = {
|
|
106
128
|
getLocale: function getLocale(t, p) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
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); }
|
|
2
2
|
var _excluded = ["getContainer"],
|
|
3
3
|
_excluded2 = ["close", "onTabsChange", "visible", "getContainer"];
|
|
4
|
-
function
|
|
5
|
-
function
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
7
6
|
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; }
|
|
8
|
-
function _toPropertyKey(
|
|
9
|
-
function _toPrimitive(
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
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); }
|
|
10
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
11
|
import React from 'react';
|
|
13
12
|
import { createPortal, render, unmountComponentAtNode } from 'react-dom';
|
|
14
|
-
import { getChildren } from
|
|
15
|
-
import Drawer from
|
|
13
|
+
import { getChildren } from "../../compUtils";
|
|
14
|
+
import Drawer from "./Drawer";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
var DrawerWraper = function DrawerWraper(props) {
|
|
17
17
|
var _props$getContainer = props.getContainer,
|
|
18
18
|
getContainer = _props$getContainer === void 0 ? function () {
|
|
@@ -20,7 +20,7 @@ var DrawerWraper = function DrawerWraper(props) {
|
|
|
20
20
|
} : _props$getContainer,
|
|
21
21
|
config = _objectWithoutProperties(props, _excluded);
|
|
22
22
|
var root = getContainer() || document.body;
|
|
23
|
-
return /*#__PURE__*/createPortal( /*#__PURE__*/
|
|
23
|
+
return /*#__PURE__*/createPortal( /*#__PURE__*/_jsx(Drawer, _objectSpread({}, config)), root);
|
|
24
24
|
};
|
|
25
25
|
var LxMobileDrawerNodes = {};
|
|
26
26
|
var nbr = 0;
|
|
@@ -50,13 +50,13 @@ function open() {
|
|
|
50
50
|
}
|
|
51
51
|
var onCloseDrawer = function onCloseDrawer() {
|
|
52
52
|
if (LxMobileDrawerNodes[key]) {
|
|
53
|
-
var _LxMobileDrawerNodes
|
|
54
|
-
(_LxMobileDrawerNodes$ = LxMobileDrawerNodes[key]) === null || _LxMobileDrawerNodes$ === void 0
|
|
53
|
+
var _LxMobileDrawerNodes$;
|
|
54
|
+
(_LxMobileDrawerNodes$ = LxMobileDrawerNodes[key]) === null || _LxMobileDrawerNodes$ === void 0 || (_LxMobileDrawerNodes$ = _LxMobileDrawerNodes$.nodeDiv) === null || _LxMobileDrawerNodes$ === void 0 || _LxMobileDrawerNodes$.classList.add('lxm-drawer-close-move');
|
|
55
55
|
clearTimeout(closeTimer);
|
|
56
56
|
closeTimer = setTimeout(function () {
|
|
57
|
-
var _LxMobileDrawerNodes$
|
|
58
|
-
unmountComponentAtNode((_LxMobileDrawerNodes$
|
|
59
|
-
(_LxMobileDrawerNodes$
|
|
57
|
+
var _LxMobileDrawerNodes$2, _LxMobileDrawerNodes$3;
|
|
58
|
+
unmountComponentAtNode((_LxMobileDrawerNodes$2 = LxMobileDrawerNodes[key]) === null || _LxMobileDrawerNodes$2 === void 0 ? void 0 : _LxMobileDrawerNodes$2.nodeDiv);
|
|
59
|
+
(_LxMobileDrawerNodes$3 = LxMobileDrawerNodes[key]) === null || _LxMobileDrawerNodes$3 === void 0 || (_LxMobileDrawerNodes$3 = _LxMobileDrawerNodes$3.nodeDiv) === null || _LxMobileDrawerNodes$3 === void 0 || _LxMobileDrawerNodes$3.remove();
|
|
60
60
|
delete LxMobileDrawerNodes[key];
|
|
61
61
|
clearTimeout(closeTimer);
|
|
62
62
|
}, 300);
|
|
@@ -64,17 +64,17 @@ function open() {
|
|
|
64
64
|
};
|
|
65
65
|
var renderNode = function renderNode() {
|
|
66
66
|
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
67
|
-
render( /*#__PURE__*/
|
|
67
|
+
render( /*#__PURE__*/_jsx(Drawer, _objectSpread({
|
|
68
68
|
visible: visible,
|
|
69
69
|
onCancel: function onCancel() {
|
|
70
70
|
if ((config === null || config === void 0 ? void 0 : config.onClose) instanceof Function) {
|
|
71
|
-
config === null || config === void 0
|
|
71
|
+
config === null || config === void 0 || config.onClose();
|
|
72
72
|
}
|
|
73
73
|
onCloseDrawer();
|
|
74
74
|
},
|
|
75
75
|
onOk: function onOk() {
|
|
76
76
|
if ((config === null || config === void 0 ? void 0 : config.onOk) instanceof Function) {
|
|
77
|
-
config === null || config === void 0
|
|
77
|
+
config === null || config === void 0 || config.onOk();
|
|
78
78
|
}
|
|
79
79
|
onCloseDrawer();
|
|
80
80
|
},
|
|
@@ -83,8 +83,8 @@ function open() {
|
|
|
83
83
|
_onTabsChange(_objectSpread(_objectSpread({}, record), {}, {
|
|
84
84
|
update: function update(prarms) {
|
|
85
85
|
if (LxMobileDrawerNodes[key]) {
|
|
86
|
-
var _LxMobileDrawerNodes$
|
|
87
|
-
(_LxMobileDrawerNodes$
|
|
86
|
+
var _LxMobileDrawerNodes$4;
|
|
87
|
+
(_LxMobileDrawerNodes$4 = LxMobileDrawerNodes[key]) === null || _LxMobileDrawerNodes$4 === void 0 || _LxMobileDrawerNodes$4.renderNode(_objectSpread(_objectSpread({}, config), prarms));
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}));
|
|
@@ -104,13 +104,13 @@ function open() {
|
|
|
104
104
|
var modalKey = createDrawer();
|
|
105
105
|
var onClose = function onClose() {
|
|
106
106
|
if (LxMobileDrawerNodes[modalKey]) {
|
|
107
|
-
var _LxMobileDrawerNodes$
|
|
108
|
-
(_LxMobileDrawerNodes$
|
|
107
|
+
var _LxMobileDrawerNodes$5;
|
|
108
|
+
(_LxMobileDrawerNodes$5 = LxMobileDrawerNodes[modalKey]) === null || _LxMobileDrawerNodes$5 === void 0 || (_LxMobileDrawerNodes$5 = _LxMobileDrawerNodes$5.nodeDiv) === null || _LxMobileDrawerNodes$5 === void 0 || _LxMobileDrawerNodes$5.classList.add('lxm-drawer-close-move');
|
|
109
109
|
clearTimeout(closeTimer);
|
|
110
110
|
closeTimer = setTimeout(function () {
|
|
111
|
-
var _LxMobileDrawerNodes$
|
|
112
|
-
unmountComponentAtNode((_LxMobileDrawerNodes$
|
|
113
|
-
(_LxMobileDrawerNodes$
|
|
111
|
+
var _LxMobileDrawerNodes$6, _LxMobileDrawerNodes$7;
|
|
112
|
+
unmountComponentAtNode((_LxMobileDrawerNodes$6 = LxMobileDrawerNodes[modalKey]) === null || _LxMobileDrawerNodes$6 === void 0 ? void 0 : _LxMobileDrawerNodes$6.nodeDiv);
|
|
113
|
+
(_LxMobileDrawerNodes$7 = LxMobileDrawerNodes[modalKey]) === null || _LxMobileDrawerNodes$7 === void 0 || (_LxMobileDrawerNodes$7 = _LxMobileDrawerNodes$7.nodeDiv) === null || _LxMobileDrawerNodes$7 === void 0 || _LxMobileDrawerNodes$7.remove();
|
|
114
114
|
delete LxMobileDrawerNodes[modalKey];
|
|
115
115
|
clearTimeout(closeTimer);
|
|
116
116
|
}, 300);
|
|
@@ -119,8 +119,8 @@ function open() {
|
|
|
119
119
|
var onUpdate = function onUpdate() {
|
|
120
120
|
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
121
121
|
if (LxMobileDrawerNodes[modalKey]) {
|
|
122
|
-
var _LxMobileDrawerNodes$
|
|
123
|
-
(_LxMobileDrawerNodes$
|
|
122
|
+
var _LxMobileDrawerNodes$8;
|
|
123
|
+
(_LxMobileDrawerNodes$8 = LxMobileDrawerNodes[modalKey]) === null || _LxMobileDrawerNodes$8 === void 0 || _LxMobileDrawerNodes$8.renderNode(_objectSpread(_objectSpread({}, config), args));
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
return {
|