tntd 1.4.22 → 1.4.23
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/components/Handle/README.md +20 -0
- package/components/Handle/index.js +1 -1
- package/dist/stats.json +68 -68
- package/dist/tntd.js +1 -1
- package/es/Handle/index.js +1 -1
- package/lib/Handle/index.js +1 -1
- package/package.json +1 -1
|
@@ -54,6 +54,26 @@ const Demo = props => {
|
|
|
54
54
|
<a>查看</a>
|
|
55
55
|
<a>编辑</a>
|
|
56
56
|
<a>测试</a>
|
|
57
|
+
{
|
|
58
|
+
false &&
|
|
59
|
+
<a>导入</a>
|
|
60
|
+
}
|
|
61
|
+
<a>导出</a>
|
|
62
|
+
<Popconfirm
|
|
63
|
+
title="Are you sure delete this task?"
|
|
64
|
+
onConfirm={void 0}
|
|
65
|
+
onCancel={void 0}
|
|
66
|
+
okText="Yes"
|
|
67
|
+
cancelText="No"
|
|
68
|
+
onClick={e => e.stopPropagation()}
|
|
69
|
+
getPopupContainer={trigger => trigger.parentNode}
|
|
70
|
+
trigger="hover"
|
|
71
|
+
overlayStyle={{
|
|
72
|
+
width: 300
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
<a>Delete</a>
|
|
76
|
+
</Popconfirm>
|
|
57
77
|
</Handle>
|
|
58
78
|
)
|
|
59
79
|
}
|
|
@@ -22,7 +22,7 @@ export default props => {
|
|
|
22
22
|
if(lang === 'en' || popConfirmHandle){
|
|
23
23
|
newChildren?.forEach((v,i)=>{
|
|
24
24
|
const { type, props } = v;
|
|
25
|
-
if(type?.name === 'Popconfirm'){
|
|
25
|
+
if(type?.name === 'Popconfirm' || (props.hasOwnProperty('onConfirm') && typeof props?.onConfirm === 'function')){
|
|
26
26
|
newChildren[i]= React.cloneElement(v, {
|
|
27
27
|
overlayStyle: { width: 180 },
|
|
28
28
|
...(v?.props || {}),
|
package/dist/stats.json
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.\nEntrypoints:\n main (605 KiB)\n tntd.css\n tntd.js\n"
|
|
6
6
|
],
|
|
7
7
|
"version": "4.46.0",
|
|
8
|
-
"hash": "
|
|
9
|
-
"time":
|
|
10
|
-
"builtAt":
|
|
8
|
+
"hash": "ac25ecc348e198a01c7c",
|
|
9
|
+
"time": 2864,
|
|
10
|
+
"builtAt": 1672995775434,
|
|
11
11
|
"publicPath": "",
|
|
12
12
|
"outputPath": "/Users/zhouzefei/projects/tntd/dist",
|
|
13
13
|
"assetsByChunkName": {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"name": "tntd.js",
|
|
140
|
-
"size":
|
|
140
|
+
"size": 607143,
|
|
141
141
|
"chunks": [
|
|
142
142
|
0
|
|
143
143
|
],
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
"rendered": true,
|
|
185
185
|
"initial": true,
|
|
186
186
|
"entry": true,
|
|
187
|
-
"size":
|
|
187
|
+
"size": 903548,
|
|
188
188
|
"names": [
|
|
189
189
|
"main"
|
|
190
190
|
],
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
"tntd.css",
|
|
193
193
|
"tntd.js"
|
|
194
194
|
],
|
|
195
|
-
"hash": "
|
|
195
|
+
"hash": "709bc49ede263f4cba61",
|
|
196
196
|
"siblings": [],
|
|
197
197
|
"parents": [],
|
|
198
198
|
"children": [
|
|
@@ -546,7 +546,7 @@
|
|
|
546
546
|
"moduleName": "./components/index.js + 102 modules",
|
|
547
547
|
"type": "harmony side effect evaluation",
|
|
548
548
|
"userRequest": "react",
|
|
549
|
-
"loc": "1:0-
|
|
549
|
+
"loc": "1:0-38"
|
|
550
550
|
},
|
|
551
551
|
{
|
|
552
552
|
"moduleId": 75,
|
|
@@ -555,7 +555,7 @@
|
|
|
555
555
|
"moduleName": "./components/index.js + 102 modules",
|
|
556
556
|
"type": "harmony side effect evaluation",
|
|
557
557
|
"userRequest": "react",
|
|
558
|
-
"loc": "1:0-
|
|
558
|
+
"loc": "1:0-31"
|
|
559
559
|
},
|
|
560
560
|
{
|
|
561
561
|
"moduleId": 75,
|
|
@@ -915,7 +915,7 @@
|
|
|
915
915
|
"moduleName": "./components/index.js + 102 modules",
|
|
916
916
|
"type": "harmony side effect evaluation",
|
|
917
917
|
"userRequest": "react",
|
|
918
|
-
"loc": "27:0-
|
|
918
|
+
"loc": "27:0-80"
|
|
919
919
|
},
|
|
920
920
|
{
|
|
921
921
|
"moduleId": 75,
|
|
@@ -924,7 +924,7 @@
|
|
|
924
924
|
"moduleName": "./components/index.js + 102 modules",
|
|
925
925
|
"type": "harmony side effect evaluation",
|
|
926
926
|
"userRequest": "react",
|
|
927
|
-
"loc": "27:0-
|
|
927
|
+
"loc": "27:0-41"
|
|
928
928
|
},
|
|
929
929
|
{
|
|
930
930
|
"moduleId": 75,
|
|
@@ -3080,9 +3080,9 @@
|
|
|
3080
3080
|
"chunks": [
|
|
3081
3081
|
0
|
|
3082
3082
|
],
|
|
3083
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/
|
|
3083
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/index.js",
|
|
3084
3084
|
"issuerId": null,
|
|
3085
|
-
"issuerName": "./components/Table/
|
|
3085
|
+
"issuerName": "./components/Table/index.js",
|
|
3086
3086
|
"issuerPath": [
|
|
3087
3087
|
{
|
|
3088
3088
|
"id": null,
|
|
@@ -3091,8 +3091,8 @@
|
|
|
3091
3091
|
},
|
|
3092
3092
|
{
|
|
3093
3093
|
"id": null,
|
|
3094
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/
|
|
3095
|
-
"name": "./components/Table/
|
|
3094
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/index.js",
|
|
3095
|
+
"name": "./components/Table/index.js"
|
|
3096
3096
|
}
|
|
3097
3097
|
],
|
|
3098
3098
|
"failed": false,
|
|
@@ -3341,7 +3341,7 @@
|
|
|
3341
3341
|
"moduleName": "./components/index.js + 102 modules",
|
|
3342
3342
|
"type": "harmony import specifier",
|
|
3343
3343
|
"userRequest": "antd",
|
|
3344
|
-
"loc": "28:29-
|
|
3344
|
+
"loc": "28:29-34"
|
|
3345
3345
|
},
|
|
3346
3346
|
{
|
|
3347
3347
|
"moduleId": 75,
|
|
@@ -3350,7 +3350,7 @@
|
|
|
3350
3350
|
"moduleName": "./components/index.js + 102 modules",
|
|
3351
3351
|
"type": "harmony import specifier",
|
|
3352
3352
|
"userRequest": "antd",
|
|
3353
|
-
"loc": "28:29-
|
|
3353
|
+
"loc": "28:29-32"
|
|
3354
3354
|
},
|
|
3355
3355
|
{
|
|
3356
3356
|
"moduleId": 75,
|
|
@@ -5353,7 +5353,7 @@
|
|
|
5353
5353
|
"moduleName": "./components/index.js + 102 modules",
|
|
5354
5354
|
"type": "harmony side effect evaluation",
|
|
5355
5355
|
"userRequest": "lodash",
|
|
5356
|
-
"loc": "29:0-
|
|
5356
|
+
"loc": "29:0-67"
|
|
5357
5357
|
},
|
|
5358
5358
|
{
|
|
5359
5359
|
"moduleId": 75,
|
|
@@ -5362,7 +5362,7 @@
|
|
|
5362
5362
|
"moduleName": "./components/index.js + 102 modules",
|
|
5363
5363
|
"type": "harmony side effect evaluation",
|
|
5364
5364
|
"userRequest": "lodash",
|
|
5365
|
-
"loc": "29:0-
|
|
5365
|
+
"loc": "29:0-34"
|
|
5366
5366
|
},
|
|
5367
5367
|
{
|
|
5368
5368
|
"moduleId": 75,
|
|
@@ -6084,9 +6084,9 @@
|
|
|
6084
6084
|
"chunks": [
|
|
6085
6085
|
0
|
|
6086
6086
|
],
|
|
6087
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/
|
|
6087
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/index.js",
|
|
6088
6088
|
"issuerId": null,
|
|
6089
|
-
"issuerName": "./components/Table/
|
|
6089
|
+
"issuerName": "./components/Table/index.js",
|
|
6090
6090
|
"issuerPath": [
|
|
6091
6091
|
{
|
|
6092
6092
|
"id": null,
|
|
@@ -6095,8 +6095,8 @@
|
|
|
6095
6095
|
},
|
|
6096
6096
|
{
|
|
6097
6097
|
"id": null,
|
|
6098
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/
|
|
6099
|
-
"name": "./components/Table/
|
|
6098
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/index.js",
|
|
6099
|
+
"name": "./components/Table/index.js"
|
|
6100
6100
|
}
|
|
6101
6101
|
],
|
|
6102
6102
|
"failed": false,
|
|
@@ -6713,9 +6713,9 @@
|
|
|
6713
6713
|
"chunks": [
|
|
6714
6714
|
0
|
|
6715
6715
|
],
|
|
6716
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
6716
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Layout/createActions.js",
|
|
6717
6717
|
"issuerId": null,
|
|
6718
|
-
"issuerName": "./components/
|
|
6718
|
+
"issuerName": "./components/Layout/createActions.js",
|
|
6719
6719
|
"issuerPath": [
|
|
6720
6720
|
{
|
|
6721
6721
|
"id": null,
|
|
@@ -6724,13 +6724,13 @@
|
|
|
6724
6724
|
},
|
|
6725
6725
|
{
|
|
6726
6726
|
"id": null,
|
|
6727
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
6728
|
-
"name": "./components/
|
|
6727
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Layout/index.js",
|
|
6728
|
+
"name": "./components/Layout/index.js"
|
|
6729
6729
|
},
|
|
6730
6730
|
{
|
|
6731
6731
|
"id": null,
|
|
6732
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
6733
|
-
"name": "./components/
|
|
6732
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Layout/createActions.js",
|
|
6733
|
+
"name": "./components/Layout/createActions.js"
|
|
6734
6734
|
}
|
|
6735
6735
|
],
|
|
6736
6736
|
"failed": false,
|
|
@@ -8253,9 +8253,9 @@
|
|
|
8253
8253
|
"chunks": [
|
|
8254
8254
|
0
|
|
8255
8255
|
],
|
|
8256
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/
|
|
8257
|
-
"issuerId":
|
|
8258
|
-
"issuerName": "./node_modules/react-resizable/build/
|
|
8256
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/ResizableBox.js",
|
|
8257
|
+
"issuerId": 73,
|
|
8258
|
+
"issuerName": "./node_modules/react-resizable/build/ResizableBox.js",
|
|
8259
8259
|
"issuerPath": [
|
|
8260
8260
|
{
|
|
8261
8261
|
"id": null,
|
|
@@ -8273,9 +8273,9 @@
|
|
|
8273
8273
|
"name": "./node_modules/react-resizable/index.js"
|
|
8274
8274
|
},
|
|
8275
8275
|
{
|
|
8276
|
-
"id":
|
|
8277
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/
|
|
8278
|
-
"name": "./node_modules/react-resizable/build/
|
|
8276
|
+
"id": 73,
|
|
8277
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/ResizableBox.js",
|
|
8278
|
+
"name": "./node_modules/react-resizable/build/ResizableBox.js"
|
|
8279
8279
|
}
|
|
8280
8280
|
],
|
|
8281
8281
|
"failed": false,
|
|
@@ -12555,7 +12555,7 @@
|
|
|
12555
12555
|
"name": "./components/index.js + 102 modules",
|
|
12556
12556
|
"index": 0,
|
|
12557
12557
|
"index2": 191,
|
|
12558
|
-
"size":
|
|
12558
|
+
"size": 454675,
|
|
12559
12559
|
"cacheable": true,
|
|
12560
12560
|
"built": true,
|
|
12561
12561
|
"optional": false,
|
|
@@ -14185,7 +14185,7 @@
|
|
|
14185
14185
|
"name": "./components/Handle/index.js",
|
|
14186
14186
|
"index": 165,
|
|
14187
14187
|
"index2": 166,
|
|
14188
|
-
"size":
|
|
14188
|
+
"size": 6406,
|
|
14189
14189
|
"cacheable": true,
|
|
14190
14190
|
"built": true,
|
|
14191
14191
|
"optional": false,
|
|
@@ -14233,7 +14233,7 @@
|
|
|
14233
14233
|
],
|
|
14234
14234
|
"optimizationBailout": [],
|
|
14235
14235
|
"depth": 1,
|
|
14236
|
-
"source": "function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _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; }\n\nfunction _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; }\n\nimport React, { Fragment } from 'react';\nimport { Dropdown, Menu, Divider } from 'antd';\nimport { getText, getLanguage } from '../locale';\nimport Icon from '../Icon';\nimport './index.less';\nvar clsPrefix = 'tnt-more-menus';\nexport default (function (props) {\n var _lastChildPart2;\n\n var _ref = props || {},\n _ref$children = _ref.children,\n children = _ref$children === void 0 ? [] : _ref$children,\n type = _ref.type,\n _ref$num = _ref.num,\n num = _ref$num === void 0 ? 3 : _ref$num,\n _ref$divider = _ref.divider,\n divider = _ref$divider === void 0 ? true : _ref$divider,\n lessOneMoreFit = _ref.lessOneMoreFit,\n popConfirmHandle = _ref.popConfirmHandle,\n rest = _objectWithoutProperties(_ref, [\"children\", \"type\", \"num\", \"divider\", \"lessOneMoreFit\", \"popConfirmHandle\"]);\n\n var _ref2 = props || {},\n lang = _ref2.lang;\n\n if (!lang) {\n lang = getLanguage();\n }\n\n var newChildren = [];\n\n if (Array.isArray(children)) {\n newChildren = (children == null ? void 0 : children.filter(function (item) {\n return !!item;\n })) || [];\n } else if (children) {\n newChildren.push(children);\n }\n\n if (lang === 'en' || popConfirmHandle) {\n var _newChildren;\n\n (_newChildren = newChildren) == null ? void 0 : _newChildren.forEach(function (v, i) {\n var type = v.type,\n props = v.props;\n\n if ((type == null ? void 0 : type.name) === 'Popconfirm') {\n newChildren[i] = React.cloneElement(v, _objectSpread({\n overlayStyle: {\n width: 180\n }\n }, (v == null ? void 0 : v.props) || {}, {\n onClick: function onClick(e) {\n return e.stopPropagation();\n },\n trigger: 'hover',\n getPopupContainer: function getPopupContainer(trigger) {\n return trigger.parentNode;\n }\n }));\n }\n });\n }\n\n var preChildPart = newChildren,\n lastChildPart = null; // 只有1个时不适配\n\n if (lessOneMoreFit && newChildren.length - num === 1) {\n preChildPart = newChildren;\n } else if (newChildren && num && !isNaN(num) && newChildren.length > num) {\n preChildPart = newChildren.slice(0, num);\n lastChildPart = newChildren.slice(num);\n }\n\n ;\n\n if (divider && preChildPart) {\n var preChildLen = preChildPart.length;\n preChildPart = preChildPart.map(function (dom, i) {\n var _lastChildPart;\n\n return React.createElement(Fragment, {\n key: i\n }, dom, !(i === preChildLen - 1 && !((_lastChildPart = lastChildPart) == null ? void 0 : _lastChildPart.length) // 没有更多 且 是最后一个时 不显示 Divider\n ) && React.createElement(Divider, {\n type: \"vertical\"\n }));\n });\n }\n\n var menu = function menu(childArr) {\n return React.createElement(Menu, {\n className: \"org-pop-opera-btn\"\n }, childArr == null ? void 0 : childArr.map(function (child, i) {\n return React.createElement(Menu.Item, {\n key: i\n }, child);\n }));\n };\n\n if (lang === 'en') {\n return React.createElement(Dropdown, {\n overlay: menu(newChildren || []),\n arrow: true\n }, type === 'icon' ? React.createElement(Icon, {\n type: \"more\"\n }) : React.createElement(\"a\", {\n className: \"ant-dropdown-more\"\n }, getText('handleMore', lang), React.createElement(\"i\", {\n className: \"\".concat(clsPrefix, \"-dropdown-icon\")\n }, React.createElement(Icon, {\n type: \"down\"\n }))));\n }\n\n return React.createElement(\"div\", _extends({\n onClick: function onClick(e) {\n e.stopPropagation();\n }\n }, rest), preChildPart, !!((_lastChildPart2 = lastChildPart) == null ? void 0 : _lastChildPart2.length) && React.createElement(Dropdown, {\n overlay: menu(lastChildPart || []),\n arrow: true\n }, type === 'icon' ? React.createElement(Icon, {\n type: \"more\"\n }) : React.createElement(\"a\", {\n className: \"ant-dropdown-more\"\n }, getText('handleMore', lang), React.createElement(\"i\", {\n className: \"\".concat(clsPrefix, \"-dropdown-icon\")\n }, React.createElement(Icon, {\n type: \"down\"\n })))));\n});"
|
|
14236
|
+
"source": "function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _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; }\n\nfunction _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; }\n\nimport React, { Fragment } from 'react';\nimport { Dropdown, Menu, Divider } from 'antd';\nimport { getText, getLanguage } from '../locale';\nimport Icon from '../Icon';\nimport './index.less';\nvar clsPrefix = 'tnt-more-menus';\nexport default (function (props) {\n var _lastChildPart2;\n\n var _ref = props || {},\n _ref$children = _ref.children,\n children = _ref$children === void 0 ? [] : _ref$children,\n type = _ref.type,\n _ref$num = _ref.num,\n num = _ref$num === void 0 ? 3 : _ref$num,\n _ref$divider = _ref.divider,\n divider = _ref$divider === void 0 ? true : _ref$divider,\n lessOneMoreFit = _ref.lessOneMoreFit,\n popConfirmHandle = _ref.popConfirmHandle,\n rest = _objectWithoutProperties(_ref, [\"children\", \"type\", \"num\", \"divider\", \"lessOneMoreFit\", \"popConfirmHandle\"]);\n\n var _ref2 = props || {},\n lang = _ref2.lang;\n\n if (!lang) {\n lang = getLanguage();\n }\n\n var newChildren = [];\n\n if (Array.isArray(children)) {\n newChildren = (children == null ? void 0 : children.filter(function (item) {\n return !!item;\n })) || [];\n } else if (children) {\n newChildren.push(children);\n }\n\n if (lang === 'en' || popConfirmHandle) {\n var _newChildren;\n\n (_newChildren = newChildren) == null ? void 0 : _newChildren.forEach(function (v, i) {\n var type = v.type,\n props = v.props;\n\n if ((type == null ? void 0 : type.name) === 'Popconfirm' || props.hasOwnProperty('onConfirm') && typeof (props == null ? void 0 : props.onConfirm) === 'function') {\n newChildren[i] = React.cloneElement(v, _objectSpread({\n overlayStyle: {\n width: 180\n }\n }, (v == null ? void 0 : v.props) || {}, {\n onClick: function onClick(e) {\n return e.stopPropagation();\n },\n trigger: 'hover',\n getPopupContainer: function getPopupContainer(trigger) {\n return trigger.parentNode;\n }\n }));\n }\n });\n }\n\n var preChildPart = newChildren,\n lastChildPart = null; // 只有1个时不适配\n\n if (lessOneMoreFit && newChildren.length - num === 1) {\n preChildPart = newChildren;\n } else if (newChildren && num && !isNaN(num) && newChildren.length > num) {\n preChildPart = newChildren.slice(0, num);\n lastChildPart = newChildren.slice(num);\n }\n\n ;\n\n if (divider && preChildPart) {\n var preChildLen = preChildPart.length;\n preChildPart = preChildPart.map(function (dom, i) {\n var _lastChildPart;\n\n return React.createElement(Fragment, {\n key: i\n }, dom, !(i === preChildLen - 1 && !((_lastChildPart = lastChildPart) == null ? void 0 : _lastChildPart.length) // 没有更多 且 是最后一个时 不显示 Divider\n ) && React.createElement(Divider, {\n type: \"vertical\"\n }));\n });\n }\n\n var menu = function menu(childArr) {\n return React.createElement(Menu, {\n className: \"org-pop-opera-btn\"\n }, childArr == null ? void 0 : childArr.map(function (child, i) {\n return React.createElement(Menu.Item, {\n key: i\n }, child);\n }));\n };\n\n if (lang === 'en') {\n return React.createElement(Dropdown, {\n overlay: menu(newChildren || []),\n arrow: true\n }, type === 'icon' ? React.createElement(Icon, {\n type: \"more\"\n }) : React.createElement(\"a\", {\n className: \"ant-dropdown-more\"\n }, getText('handleMore', lang), React.createElement(\"i\", {\n className: \"\".concat(clsPrefix, \"-dropdown-icon\")\n }, React.createElement(Icon, {\n type: \"down\"\n }))));\n }\n\n return React.createElement(\"div\", _extends({\n onClick: function onClick(e) {\n e.stopPropagation();\n }\n }, rest), preChildPart, !!((_lastChildPart2 = lastChildPart) == null ? void 0 : _lastChildPart2.length) && React.createElement(Dropdown, {\n overlay: menu(lastChildPart || []),\n arrow: true\n }, type === 'icon' ? React.createElement(Icon, {\n type: \"more\"\n }) : React.createElement(\"a\", {\n className: \"ant-dropdown-more\"\n }, getText('handleMore', lang), React.createElement(\"i\", {\n className: \"\".concat(clsPrefix, \"-dropdown-icon\")\n }, React.createElement(Icon, {\n type: \"down\"\n })))));\n});"
|
|
14237
14237
|
},
|
|
14238
14238
|
{
|
|
14239
14239
|
"id": null,
|
|
@@ -22614,7 +22614,7 @@
|
|
|
22614
22614
|
"moduleName": "./components/index.js + 102 modules",
|
|
22615
22615
|
"type": "harmony side effect evaluation",
|
|
22616
22616
|
"userRequest": "react",
|
|
22617
|
-
"loc": "1:0-
|
|
22617
|
+
"loc": "1:0-38"
|
|
22618
22618
|
},
|
|
22619
22619
|
{
|
|
22620
22620
|
"moduleId": 75,
|
|
@@ -22623,7 +22623,7 @@
|
|
|
22623
22623
|
"moduleName": "./components/index.js + 102 modules",
|
|
22624
22624
|
"type": "harmony side effect evaluation",
|
|
22625
22625
|
"userRequest": "react",
|
|
22626
|
-
"loc": "1:0-
|
|
22626
|
+
"loc": "1:0-31"
|
|
22627
22627
|
},
|
|
22628
22628
|
{
|
|
22629
22629
|
"moduleId": 75,
|
|
@@ -22983,7 +22983,7 @@
|
|
|
22983
22983
|
"moduleName": "./components/index.js + 102 modules",
|
|
22984
22984
|
"type": "harmony side effect evaluation",
|
|
22985
22985
|
"userRequest": "react",
|
|
22986
|
-
"loc": "27:0-
|
|
22986
|
+
"loc": "27:0-80"
|
|
22987
22987
|
},
|
|
22988
22988
|
{
|
|
22989
22989
|
"moduleId": 75,
|
|
@@ -22992,7 +22992,7 @@
|
|
|
22992
22992
|
"moduleName": "./components/index.js + 102 modules",
|
|
22993
22993
|
"type": "harmony side effect evaluation",
|
|
22994
22994
|
"userRequest": "react",
|
|
22995
|
-
"loc": "27:0-
|
|
22995
|
+
"loc": "27:0-41"
|
|
22996
22996
|
},
|
|
22997
22997
|
{
|
|
22998
22998
|
"moduleId": 75,
|
|
@@ -25148,9 +25148,9 @@
|
|
|
25148
25148
|
"chunks": [
|
|
25149
25149
|
0
|
|
25150
25150
|
],
|
|
25151
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/
|
|
25151
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/index.js",
|
|
25152
25152
|
"issuerId": null,
|
|
25153
|
-
"issuerName": "./components/Table/
|
|
25153
|
+
"issuerName": "./components/Table/index.js",
|
|
25154
25154
|
"issuerPath": [
|
|
25155
25155
|
{
|
|
25156
25156
|
"id": null,
|
|
@@ -25159,8 +25159,8 @@
|
|
|
25159
25159
|
},
|
|
25160
25160
|
{
|
|
25161
25161
|
"id": null,
|
|
25162
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/
|
|
25163
|
-
"name": "./components/Table/
|
|
25162
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/index.js",
|
|
25163
|
+
"name": "./components/Table/index.js"
|
|
25164
25164
|
}
|
|
25165
25165
|
],
|
|
25166
25166
|
"failed": false,
|
|
@@ -25409,7 +25409,7 @@
|
|
|
25409
25409
|
"moduleName": "./components/index.js + 102 modules",
|
|
25410
25410
|
"type": "harmony import specifier",
|
|
25411
25411
|
"userRequest": "antd",
|
|
25412
|
-
"loc": "28:29-
|
|
25412
|
+
"loc": "28:29-34"
|
|
25413
25413
|
},
|
|
25414
25414
|
{
|
|
25415
25415
|
"moduleId": 75,
|
|
@@ -25418,7 +25418,7 @@
|
|
|
25418
25418
|
"moduleName": "./components/index.js + 102 modules",
|
|
25419
25419
|
"type": "harmony import specifier",
|
|
25420
25420
|
"userRequest": "antd",
|
|
25421
|
-
"loc": "28:29-
|
|
25421
|
+
"loc": "28:29-32"
|
|
25422
25422
|
},
|
|
25423
25423
|
{
|
|
25424
25424
|
"moduleId": 75,
|
|
@@ -27421,7 +27421,7 @@
|
|
|
27421
27421
|
"moduleName": "./components/index.js + 102 modules",
|
|
27422
27422
|
"type": "harmony side effect evaluation",
|
|
27423
27423
|
"userRequest": "lodash",
|
|
27424
|
-
"loc": "29:0-
|
|
27424
|
+
"loc": "29:0-67"
|
|
27425
27425
|
},
|
|
27426
27426
|
{
|
|
27427
27427
|
"moduleId": 75,
|
|
@@ -27430,7 +27430,7 @@
|
|
|
27430
27430
|
"moduleName": "./components/index.js + 102 modules",
|
|
27431
27431
|
"type": "harmony side effect evaluation",
|
|
27432
27432
|
"userRequest": "lodash",
|
|
27433
|
-
"loc": "29:0-
|
|
27433
|
+
"loc": "29:0-34"
|
|
27434
27434
|
},
|
|
27435
27435
|
{
|
|
27436
27436
|
"moduleId": 75,
|
|
@@ -28152,9 +28152,9 @@
|
|
|
28152
28152
|
"chunks": [
|
|
28153
28153
|
0
|
|
28154
28154
|
],
|
|
28155
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/
|
|
28155
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/index.js",
|
|
28156
28156
|
"issuerId": null,
|
|
28157
|
-
"issuerName": "./components/Table/
|
|
28157
|
+
"issuerName": "./components/Table/index.js",
|
|
28158
28158
|
"issuerPath": [
|
|
28159
28159
|
{
|
|
28160
28160
|
"id": null,
|
|
@@ -28163,8 +28163,8 @@
|
|
|
28163
28163
|
},
|
|
28164
28164
|
{
|
|
28165
28165
|
"id": null,
|
|
28166
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/
|
|
28167
|
-
"name": "./components/Table/
|
|
28166
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/index.js",
|
|
28167
|
+
"name": "./components/Table/index.js"
|
|
28168
28168
|
}
|
|
28169
28169
|
],
|
|
28170
28170
|
"failed": false,
|
|
@@ -28781,9 +28781,9 @@
|
|
|
28781
28781
|
"chunks": [
|
|
28782
28782
|
0
|
|
28783
28783
|
],
|
|
28784
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
28784
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Layout/createActions.js",
|
|
28785
28785
|
"issuerId": null,
|
|
28786
|
-
"issuerName": "./components/
|
|
28786
|
+
"issuerName": "./components/Layout/createActions.js",
|
|
28787
28787
|
"issuerPath": [
|
|
28788
28788
|
{
|
|
28789
28789
|
"id": null,
|
|
@@ -28792,13 +28792,13 @@
|
|
|
28792
28792
|
},
|
|
28793
28793
|
{
|
|
28794
28794
|
"id": null,
|
|
28795
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
28796
|
-
"name": "./components/
|
|
28795
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Layout/index.js",
|
|
28796
|
+
"name": "./components/Layout/index.js"
|
|
28797
28797
|
},
|
|
28798
28798
|
{
|
|
28799
28799
|
"id": null,
|
|
28800
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
28801
|
-
"name": "./components/
|
|
28800
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Layout/createActions.js",
|
|
28801
|
+
"name": "./components/Layout/createActions.js"
|
|
28802
28802
|
}
|
|
28803
28803
|
],
|
|
28804
28804
|
"failed": false,
|
|
@@ -30321,9 +30321,9 @@
|
|
|
30321
30321
|
"chunks": [
|
|
30322
30322
|
0
|
|
30323
30323
|
],
|
|
30324
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/
|
|
30325
|
-
"issuerId":
|
|
30326
|
-
"issuerName": "./node_modules/react-resizable/build/
|
|
30324
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/ResizableBox.js",
|
|
30325
|
+
"issuerId": 73,
|
|
30326
|
+
"issuerName": "./node_modules/react-resizable/build/ResizableBox.js",
|
|
30327
30327
|
"issuerPath": [
|
|
30328
30328
|
{
|
|
30329
30329
|
"id": null,
|
|
@@ -30341,9 +30341,9 @@
|
|
|
30341
30341
|
"name": "./node_modules/react-resizable/index.js"
|
|
30342
30342
|
},
|
|
30343
30343
|
{
|
|
30344
|
-
"id":
|
|
30345
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/
|
|
30346
|
-
"name": "./node_modules/react-resizable/build/
|
|
30344
|
+
"id": 73,
|
|
30345
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/ResizableBox.js",
|
|
30346
|
+
"name": "./node_modules/react-resizable/build/ResizableBox.js"
|
|
30347
30347
|
}
|
|
30348
30348
|
],
|
|
30349
30349
|
"failed": false,
|
|
@@ -34623,7 +34623,7 @@
|
|
|
34623
34623
|
"name": "./components/index.js + 102 modules",
|
|
34624
34624
|
"index": 0,
|
|
34625
34625
|
"index2": 191,
|
|
34626
|
-
"size":
|
|
34626
|
+
"size": 454675,
|
|
34627
34627
|
"cacheable": true,
|
|
34628
34628
|
"built": true,
|
|
34629
34629
|
"optional": false,
|
|
@@ -36253,7 +36253,7 @@
|
|
|
36253
36253
|
"name": "./components/Handle/index.js",
|
|
36254
36254
|
"index": 165,
|
|
36255
36255
|
"index2": 166,
|
|
36256
|
-
"size":
|
|
36256
|
+
"size": 6406,
|
|
36257
36257
|
"cacheable": true,
|
|
36258
36258
|
"built": true,
|
|
36259
36259
|
"optional": false,
|
|
@@ -36301,7 +36301,7 @@
|
|
|
36301
36301
|
],
|
|
36302
36302
|
"optimizationBailout": [],
|
|
36303
36303
|
"depth": 1,
|
|
36304
|
-
"source": "function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _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; }\n\nfunction _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; }\n\nimport React, { Fragment } from 'react';\nimport { Dropdown, Menu, Divider } from 'antd';\nimport { getText, getLanguage } from '../locale';\nimport Icon from '../Icon';\nimport './index.less';\nvar clsPrefix = 'tnt-more-menus';\nexport default (function (props) {\n var _lastChildPart2;\n\n var _ref = props || {},\n _ref$children = _ref.children,\n children = _ref$children === void 0 ? [] : _ref$children,\n type = _ref.type,\n _ref$num = _ref.num,\n num = _ref$num === void 0 ? 3 : _ref$num,\n _ref$divider = _ref.divider,\n divider = _ref$divider === void 0 ? true : _ref$divider,\n lessOneMoreFit = _ref.lessOneMoreFit,\n popConfirmHandle = _ref.popConfirmHandle,\n rest = _objectWithoutProperties(_ref, [\"children\", \"type\", \"num\", \"divider\", \"lessOneMoreFit\", \"popConfirmHandle\"]);\n\n var _ref2 = props || {},\n lang = _ref2.lang;\n\n if (!lang) {\n lang = getLanguage();\n }\n\n var newChildren = [];\n\n if (Array.isArray(children)) {\n newChildren = (children == null ? void 0 : children.filter(function (item) {\n return !!item;\n })) || [];\n } else if (children) {\n newChildren.push(children);\n }\n\n if (lang === 'en' || popConfirmHandle) {\n var _newChildren;\n\n (_newChildren = newChildren) == null ? void 0 : _newChildren.forEach(function (v, i) {\n var type = v.type,\n props = v.props;\n\n if ((type == null ? void 0 : type.name) === 'Popconfirm') {\n newChildren[i] = React.cloneElement(v, _objectSpread({\n overlayStyle: {\n width: 180\n }\n }, (v == null ? void 0 : v.props) || {}, {\n onClick: function onClick(e) {\n return e.stopPropagation();\n },\n trigger: 'hover',\n getPopupContainer: function getPopupContainer(trigger) {\n return trigger.parentNode;\n }\n }));\n }\n });\n }\n\n var preChildPart = newChildren,\n lastChildPart = null; // 只有1个时不适配\n\n if (lessOneMoreFit && newChildren.length - num === 1) {\n preChildPart = newChildren;\n } else if (newChildren && num && !isNaN(num) && newChildren.length > num) {\n preChildPart = newChildren.slice(0, num);\n lastChildPart = newChildren.slice(num);\n }\n\n ;\n\n if (divider && preChildPart) {\n var preChildLen = preChildPart.length;\n preChildPart = preChildPart.map(function (dom, i) {\n var _lastChildPart;\n\n return React.createElement(Fragment, {\n key: i\n }, dom, !(i === preChildLen - 1 && !((_lastChildPart = lastChildPart) == null ? void 0 : _lastChildPart.length) // 没有更多 且 是最后一个时 不显示 Divider\n ) && React.createElement(Divider, {\n type: \"vertical\"\n }));\n });\n }\n\n var menu = function menu(childArr) {\n return React.createElement(Menu, {\n className: \"org-pop-opera-btn\"\n }, childArr == null ? void 0 : childArr.map(function (child, i) {\n return React.createElement(Menu.Item, {\n key: i\n }, child);\n }));\n };\n\n if (lang === 'en') {\n return React.createElement(Dropdown, {\n overlay: menu(newChildren || []),\n arrow: true\n }, type === 'icon' ? React.createElement(Icon, {\n type: \"more\"\n }) : React.createElement(\"a\", {\n className: \"ant-dropdown-more\"\n }, getText('handleMore', lang), React.createElement(\"i\", {\n className: \"\".concat(clsPrefix, \"-dropdown-icon\")\n }, React.createElement(Icon, {\n type: \"down\"\n }))));\n }\n\n return React.createElement(\"div\", _extends({\n onClick: function onClick(e) {\n e.stopPropagation();\n }\n }, rest), preChildPart, !!((_lastChildPart2 = lastChildPart) == null ? void 0 : _lastChildPart2.length) && React.createElement(Dropdown, {\n overlay: menu(lastChildPart || []),\n arrow: true\n }, type === 'icon' ? React.createElement(Icon, {\n type: \"more\"\n }) : React.createElement(\"a\", {\n className: \"ant-dropdown-more\"\n }, getText('handleMore', lang), React.createElement(\"i\", {\n className: \"\".concat(clsPrefix, \"-dropdown-icon\")\n }, React.createElement(Icon, {\n type: \"down\"\n })))));\n});"
|
|
36304
|
+
"source": "function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _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; }\n\nfunction _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; }\n\nimport React, { Fragment } from 'react';\nimport { Dropdown, Menu, Divider } from 'antd';\nimport { getText, getLanguage } from '../locale';\nimport Icon from '../Icon';\nimport './index.less';\nvar clsPrefix = 'tnt-more-menus';\nexport default (function (props) {\n var _lastChildPart2;\n\n var _ref = props || {},\n _ref$children = _ref.children,\n children = _ref$children === void 0 ? [] : _ref$children,\n type = _ref.type,\n _ref$num = _ref.num,\n num = _ref$num === void 0 ? 3 : _ref$num,\n _ref$divider = _ref.divider,\n divider = _ref$divider === void 0 ? true : _ref$divider,\n lessOneMoreFit = _ref.lessOneMoreFit,\n popConfirmHandle = _ref.popConfirmHandle,\n rest = _objectWithoutProperties(_ref, [\"children\", \"type\", \"num\", \"divider\", \"lessOneMoreFit\", \"popConfirmHandle\"]);\n\n var _ref2 = props || {},\n lang = _ref2.lang;\n\n if (!lang) {\n lang = getLanguage();\n }\n\n var newChildren = [];\n\n if (Array.isArray(children)) {\n newChildren = (children == null ? void 0 : children.filter(function (item) {\n return !!item;\n })) || [];\n } else if (children) {\n newChildren.push(children);\n }\n\n if (lang === 'en' || popConfirmHandle) {\n var _newChildren;\n\n (_newChildren = newChildren) == null ? void 0 : _newChildren.forEach(function (v, i) {\n var type = v.type,\n props = v.props;\n\n if ((type == null ? void 0 : type.name) === 'Popconfirm' || props.hasOwnProperty('onConfirm') && typeof (props == null ? void 0 : props.onConfirm) === 'function') {\n newChildren[i] = React.cloneElement(v, _objectSpread({\n overlayStyle: {\n width: 180\n }\n }, (v == null ? void 0 : v.props) || {}, {\n onClick: function onClick(e) {\n return e.stopPropagation();\n },\n trigger: 'hover',\n getPopupContainer: function getPopupContainer(trigger) {\n return trigger.parentNode;\n }\n }));\n }\n });\n }\n\n var preChildPart = newChildren,\n lastChildPart = null; // 只有1个时不适配\n\n if (lessOneMoreFit && newChildren.length - num === 1) {\n preChildPart = newChildren;\n } else if (newChildren && num && !isNaN(num) && newChildren.length > num) {\n preChildPart = newChildren.slice(0, num);\n lastChildPart = newChildren.slice(num);\n }\n\n ;\n\n if (divider && preChildPart) {\n var preChildLen = preChildPart.length;\n preChildPart = preChildPart.map(function (dom, i) {\n var _lastChildPart;\n\n return React.createElement(Fragment, {\n key: i\n }, dom, !(i === preChildLen - 1 && !((_lastChildPart = lastChildPart) == null ? void 0 : _lastChildPart.length) // 没有更多 且 是最后一个时 不显示 Divider\n ) && React.createElement(Divider, {\n type: \"vertical\"\n }));\n });\n }\n\n var menu = function menu(childArr) {\n return React.createElement(Menu, {\n className: \"org-pop-opera-btn\"\n }, childArr == null ? void 0 : childArr.map(function (child, i) {\n return React.createElement(Menu.Item, {\n key: i\n }, child);\n }));\n };\n\n if (lang === 'en') {\n return React.createElement(Dropdown, {\n overlay: menu(newChildren || []),\n arrow: true\n }, type === 'icon' ? React.createElement(Icon, {\n type: \"more\"\n }) : React.createElement(\"a\", {\n className: \"ant-dropdown-more\"\n }, getText('handleMore', lang), React.createElement(\"i\", {\n className: \"\".concat(clsPrefix, \"-dropdown-icon\")\n }, React.createElement(Icon, {\n type: \"down\"\n }))));\n }\n\n return React.createElement(\"div\", _extends({\n onClick: function onClick(e) {\n e.stopPropagation();\n }\n }, rest), preChildPart, !!((_lastChildPart2 = lastChildPart) == null ? void 0 : _lastChildPart2.length) && React.createElement(Dropdown, {\n overlay: menu(lastChildPart || []),\n arrow: true\n }, type === 'icon' ? React.createElement(Icon, {\n type: \"more\"\n }) : React.createElement(\"a\", {\n className: \"ant-dropdown-more\"\n }, getText('handleMore', lang), React.createElement(\"i\", {\n className: \"\".concat(clsPrefix, \"-dropdown-icon\")\n }, React.createElement(Icon, {\n type: \"down\"\n })))));\n});"
|
|
36305
36305
|
},
|
|
36306
36306
|
{
|
|
36307
36307
|
"id": null,
|