@lemon-fe/kits 1.1.0-alpha.1 → 1.1.0-alpha.10
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.
|
@@ -27,12 +27,12 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
27
27
|
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; }
|
|
28
28
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
29
29
|
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); }
|
|
30
|
+
import { ConfigProvider, Modal, Row, Spin, Typography } from 'antd';
|
|
30
31
|
import React, { useContext, Component, createRef } from 'react';
|
|
31
32
|
import { unmountComponentAtNode, render } from 'react-dom';
|
|
32
33
|
import { ReloadOutlined } from '@ant-design/icons';
|
|
33
|
-
import { Actions, DataGrid, Icons, Layout, Section } from '@lemon-fe/components';
|
|
34
|
+
import { Actions, ComponentConfigureContext, DataGrid, Icons, Layout, Section } from '@lemon-fe/components';
|
|
34
35
|
import { Subject } from '@lemon-fe/utils';
|
|
35
|
-
import { ConfigProvider, Modal, Row, Spin, Typography } from 'antd';
|
|
36
36
|
import { get } from 'lodash';
|
|
37
37
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
38
38
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -638,6 +638,7 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
|
|
|
638
638
|
}(Component);
|
|
639
639
|
export default function useBatchOperate(options) {
|
|
640
640
|
var ctx = useContext(ConfigProvider.ConfigContext);
|
|
641
|
+
var componentCtx = useContext(ComponentConfigureContext);
|
|
641
642
|
var run = function run(rows) {
|
|
642
643
|
var otherOpts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
643
644
|
var root = document.createDocumentFragment();
|
|
@@ -646,13 +647,16 @@ export default function useBatchOperate(options) {
|
|
|
646
647
|
render( /*#__PURE__*/_jsx(ConfigProvider, {
|
|
647
648
|
prefixCls: getPrefixCls(),
|
|
648
649
|
iconPrefixCls: iconPrefixCls,
|
|
649
|
-
children: /*#__PURE__*/_jsx(
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
650
|
+
children: /*#__PURE__*/_jsx(ComponentConfigureContext.Provider, {
|
|
651
|
+
value: componentCtx,
|
|
652
|
+
children: /*#__PURE__*/_jsx(BatchOperate, _objectSpread(_objectSpread(_objectSpread({
|
|
653
|
+
rows: rows
|
|
654
|
+
}, options), otherOpts), {}, {
|
|
655
|
+
afterClose: function afterClose() {
|
|
656
|
+
unmountComponentAtNode(root);
|
|
657
|
+
}
|
|
658
|
+
}))
|
|
659
|
+
})
|
|
656
660
|
}), root);
|
|
657
661
|
};
|
|
658
662
|
return {
|
|
@@ -4,13 +4,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
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; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
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); }
|
|
7
|
+
import { Button, Result } from 'antd';
|
|
7
8
|
import React, { memo, useEffect } from 'react';
|
|
8
9
|
import { useMemo } from 'react';
|
|
9
10
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
10
11
|
import { matchPath, useHistory } from 'react-router-dom';
|
|
11
12
|
import RouteTab from "../components/route-tab";
|
|
12
13
|
import { useLastestRef } from '@lemon-fe/hooks';
|
|
13
|
-
import { Button, Result } from 'antd';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
16
|
function isSubPath(path, subPath) {
|
|
@@ -102,7 +102,7 @@ function MicroLayout(props) {
|
|
|
102
102
|
if (target === undefined || pathname === target.location.pathname) {
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
|
-
if (target.instance.block({
|
|
105
|
+
if (target.instance !== undefined && target.instance.block({
|
|
106
106
|
title: target.title,
|
|
107
107
|
onOk: function onOk() {
|
|
108
108
|
history.push(loc);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/kits",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.10",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -16,17 +16,21 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"es"
|
|
18
18
|
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"test": "echo \"Error: run tests from root\" && exit 1",
|
|
21
|
+
"build": "father build",
|
|
22
|
+
"prepublish": "npm run build"
|
|
23
|
+
},
|
|
19
24
|
"dependencies": {
|
|
20
|
-
"@ag-grid-community/styles": "29.2.0",
|
|
21
25
|
"@ant-design/icons": "^4.7.0",
|
|
26
|
+
"@lemon-fe/components": "^1.1.0-alpha.10",
|
|
27
|
+
"@lemon-fe/hooks": "^1.1.0-alpha.5",
|
|
28
|
+
"@lemon-fe/utils": "^1.1.0-alpha.5",
|
|
22
29
|
"antd": "4.24.8",
|
|
23
30
|
"classnames": "^2.2.6",
|
|
24
31
|
"lodash": "^4.17.0",
|
|
25
32
|
"moment": "^2.29.4",
|
|
26
|
-
"react-error-boundary": "^4.0.11"
|
|
27
|
-
"@lemon-fe/components": "^1.1.0-alpha.1",
|
|
28
|
-
"@lemon-fe/utils": "^1.1.0-alpha.1",
|
|
29
|
-
"@lemon-fe/hooks": "^1.1.0-alpha.1"
|
|
33
|
+
"react-error-boundary": "^4.0.11"
|
|
30
34
|
},
|
|
31
35
|
"peerDependencies": {
|
|
32
36
|
"react-router": "^5.0.0",
|
|
@@ -40,9 +44,5 @@
|
|
|
40
44
|
"publishConfig": {
|
|
41
45
|
"registry": "https://registry.npmjs.org"
|
|
42
46
|
},
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
"build": "father build",
|
|
46
|
-
"prepublish": "npm run build"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
47
|
+
"gitHead": "4447c2939e0d119833cdae2baaec033c20199320"
|
|
48
|
+
}
|