tntd 1.4.18 → 1.4.19
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/Ellipsis/index.js +1 -1
- package/dist/stats.json +44 -44
- package/dist/tntd.js +1 -1
- package/es/Ellipsis/index.js +1 -1
- package/lib/Ellipsis/index.js +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ const isEllipsisActive = (e) => {
|
|
|
17
17
|
if(e.offsetWidth === e.scrollWidth && e.offsetHeight === e.scrollHeight){
|
|
18
18
|
let styleStr = 'overflow:visible; ';
|
|
19
19
|
if(!e?.parentNode?.getAttribute('style')?.includes('width')){
|
|
20
|
-
styleStr+='
|
|
20
|
+
styleStr+='max-width:100%;';
|
|
21
21
|
}
|
|
22
22
|
e.parentNode.setAttribute('style',styleStr);
|
|
23
23
|
}
|
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 (600 KiB)\n tntd.css\n tntd.js\n"
|
|
6
6
|
],
|
|
7
7
|
"version": "4.46.0",
|
|
8
|
-
"hash": "
|
|
9
|
-
"time":
|
|
10
|
-
"builtAt":
|
|
8
|
+
"hash": "4523357087b79d1316d3",
|
|
9
|
+
"time": 7200,
|
|
10
|
+
"builtAt": 1671109521283,
|
|
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": 601645,
|
|
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": 892422,
|
|
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": "f4f875b4a9ae265aa6e5",
|
|
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": 74,
|
|
@@ -564,7 +564,7 @@
|
|
|
564
564
|
"moduleName": "./components/index.js + 102 modules",
|
|
565
565
|
"type": "harmony side effect evaluation",
|
|
566
566
|
"userRequest": "react",
|
|
567
|
-
"loc": "1:0-
|
|
567
|
+
"loc": "1:0-31"
|
|
568
568
|
},
|
|
569
569
|
{
|
|
570
570
|
"moduleId": 74,
|
|
@@ -789,7 +789,7 @@
|
|
|
789
789
|
"moduleName": "./components/index.js + 102 modules",
|
|
790
790
|
"type": "harmony side effect evaluation",
|
|
791
791
|
"userRequest": "react",
|
|
792
|
-
"loc": "21:0-
|
|
792
|
+
"loc": "21:0-33"
|
|
793
793
|
},
|
|
794
794
|
{
|
|
795
795
|
"moduleId": 74,
|
|
@@ -807,7 +807,7 @@
|
|
|
807
807
|
"moduleName": "./components/index.js + 102 modules",
|
|
808
808
|
"type": "harmony side effect evaluation",
|
|
809
809
|
"userRequest": "react",
|
|
810
|
-
"loc": "21:0-
|
|
810
|
+
"loc": "21:0-51"
|
|
811
811
|
},
|
|
812
812
|
{
|
|
813
813
|
"moduleId": 74,
|
|
@@ -2909,9 +2909,9 @@
|
|
|
2909
2909
|
"chunks": [
|
|
2910
2910
|
0
|
|
2911
2911
|
],
|
|
2912
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
2912
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Columns/index.js",
|
|
2913
2913
|
"issuerId": null,
|
|
2914
|
-
"issuerName": "./components/
|
|
2914
|
+
"issuerName": "./components/Columns/index.js",
|
|
2915
2915
|
"issuerPath": [
|
|
2916
2916
|
{
|
|
2917
2917
|
"id": null,
|
|
@@ -2920,8 +2920,8 @@
|
|
|
2920
2920
|
},
|
|
2921
2921
|
{
|
|
2922
2922
|
"id": null,
|
|
2923
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
2924
|
-
"name": "./components/
|
|
2923
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Columns/index.js",
|
|
2924
|
+
"name": "./components/Columns/index.js"
|
|
2925
2925
|
}
|
|
2926
2926
|
],
|
|
2927
2927
|
"failed": false,
|
|
@@ -5011,9 +5011,9 @@
|
|
|
5011
5011
|
"chunks": [
|
|
5012
5012
|
0
|
|
5013
5013
|
],
|
|
5014
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
5014
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/ResizableTable/index.js",
|
|
5015
5015
|
"issuerId": null,
|
|
5016
|
-
"issuerName": "./components/
|
|
5016
|
+
"issuerName": "./components/Table/ResizableTable/index.js",
|
|
5017
5017
|
"issuerPath": [
|
|
5018
5018
|
{
|
|
5019
5019
|
"id": null,
|
|
@@ -5022,8 +5022,8 @@
|
|
|
5022
5022
|
},
|
|
5023
5023
|
{
|
|
5024
5024
|
"id": null,
|
|
5025
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
5026
|
-
"name": "./components/
|
|
5025
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/ResizableTable/index.js",
|
|
5026
|
+
"name": "./components/Table/ResizableTable/index.js"
|
|
5027
5027
|
}
|
|
5028
5028
|
],
|
|
5029
5029
|
"failed": false,
|
|
@@ -5904,9 +5904,9 @@
|
|
|
5904
5904
|
"chunks": [
|
|
5905
5905
|
0
|
|
5906
5906
|
],
|
|
5907
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
5907
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Columns/index.js",
|
|
5908
5908
|
"issuerId": null,
|
|
5909
|
-
"issuerName": "./components/
|
|
5909
|
+
"issuerName": "./components/Columns/index.js",
|
|
5910
5910
|
"issuerPath": [
|
|
5911
5911
|
{
|
|
5912
5912
|
"id": null,
|
|
@@ -5915,8 +5915,8 @@
|
|
|
5915
5915
|
},
|
|
5916
5916
|
{
|
|
5917
5917
|
"id": null,
|
|
5918
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
5919
|
-
"name": "./components/
|
|
5918
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Columns/index.js",
|
|
5919
|
+
"name": "./components/Columns/index.js"
|
|
5920
5920
|
}
|
|
5921
5921
|
],
|
|
5922
5922
|
"failed": false,
|
|
@@ -11995,7 +11995,7 @@
|
|
|
11995
11995
|
"name": "./components/index.js + 102 modules",
|
|
11996
11996
|
"index": 0,
|
|
11997
11997
|
"index2": 188,
|
|
11998
|
-
"size":
|
|
11998
|
+
"size": 452959,
|
|
11999
11999
|
"cacheable": true,
|
|
12000
12000
|
"built": true,
|
|
12001
12001
|
"optional": false,
|
|
@@ -13887,7 +13887,7 @@
|
|
|
13887
13887
|
"name": "./components/Ellipsis/index.js",
|
|
13888
13888
|
"index": 178,
|
|
13889
13889
|
"index2": 183,
|
|
13890
|
-
"size":
|
|
13890
|
+
"size": 6921,
|
|
13891
13891
|
"cacheable": true,
|
|
13892
13892
|
"built": true,
|
|
13893
13893
|
"optional": false,
|
|
@@ -13935,7 +13935,7 @@
|
|
|
13935
13935
|
],
|
|
13936
13936
|
"optimizationBailout": [],
|
|
13937
13937
|
"depth": 1,
|
|
13938
|
-
"source": "function 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 _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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n/*\n * @Author: 梁洪刚\n * @CreatDate: 2021-03-31 13:57:32\n * @Describe: 省略号组件\n */\nimport { useState, useEffect, useRef } from 'react';\nimport { Popover, Tooltip } from 'antd';\nimport copy from 'copy-to-clipboard';\nimport CopySVG from './Svg/CopySVG';\nimport TickSVG from './Svg/TickSVG';\nimport './index.less';\nvar tolerance = 0; // In px. Depends on the font you are using\n\nvar isEllipsisActive = function isEllipsisActive(e) {\n if (e.offsetWidth === e.scrollWidth && e.offsetHeight === e.scrollHeight) {\n var _e$parentNode, _e$parentNode$getAttr;\n\n var styleStr = 'overflow:visible; ';\n\n if (!(e == null ? void 0 : (_e$parentNode = e.parentNode) == null ? void 0 : (_e$parentNode$getAttr = _e$parentNode.getAttribute('style')) == null ? void 0 : _e$parentNode$getAttr.includes('width'))) {\n styleStr += '
|
|
13938
|
+
"source": "function 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 _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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n/*\n * @Author: 梁洪刚\n * @CreatDate: 2021-03-31 13:57:32\n * @Describe: 省略号组件\n */\nimport { useState, useEffect, useRef } from 'react';\nimport { Popover, Tooltip } from 'antd';\nimport copy from 'copy-to-clipboard';\nimport CopySVG from './Svg/CopySVG';\nimport TickSVG from './Svg/TickSVG';\nimport './index.less';\nvar tolerance = 0; // In px. Depends on the font you are using\n\nvar isEllipsisActive = function isEllipsisActive(e) {\n if (e.offsetWidth === e.scrollWidth && e.offsetHeight === e.scrollHeight) {\n var _e$parentNode, _e$parentNode$getAttr;\n\n var styleStr = 'overflow:visible; ';\n\n if (!(e == null ? void 0 : (_e$parentNode = e.parentNode) == null ? void 0 : (_e$parentNode$getAttr = _e$parentNode.getAttribute('style')) == null ? void 0 : _e$parentNode$getAttr.includes('width'))) {\n styleStr += 'max-width:100%;';\n }\n\n e.parentNode.setAttribute('style', styleStr);\n }\n\n return e.offsetWidth + tolerance < e.scrollWidth || e.offsetHeight < e.scrollHeight;\n};\n\nexport default (function (props) {\n var _props$_popover = props._popover,\n _popover = _props$_popover === void 0 ? props.Popover : _props$_popover,\n title = props.title,\n content = props.content,\n className = props.className,\n style = props.style,\n widthLimit = props.widthLimit,\n _props$_lines = props._lines,\n _lines = _props$_lines === void 0 ? props.lines !== 1 && props.lines : _props$_lines,\n children = props.children,\n emptyText = props.emptyText,\n _props$_copyable = props._copyable,\n _copyable = _props$_copyable === void 0 ? props.copyable : _props$_copyable,\n prefix = props.prefix,\n suffix = props.suffix; // allow visible or not state\n\n\n var _useState = useState(true),\n _useState2 = _slicedToArray(_useState, 2),\n flag = _useState2[0],\n setFlag = _useState2[1]; // visible[Tooltip/Popover] state\n\n\n var _useState3 = useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n tipVisible = _useState4[0],\n setTipVisible = _useState4[1]; // copy animation state\n\n\n var _useState5 = useState(false),\n _useState6 = _slicedToArray(_useState5, 2),\n hasCopy = _useState6[0],\n setHasCopy = _useState6[1];\n\n var elementRef = useRef();\n useEffect(function () {\n elementRef.current && isEllipsisActive(elementRef.current) ? setFlag(true) : (setFlag(false), setTipVisible(false));\n }); // original Node\n\n var inner = typeof children === 'string' ? children : _popover ? content : title; // for className\n\n var getClassName = function getClassName() {\n return \"overflow \".concat(_lines ? 'ellipsis-wrap' : 'ellipsis-nowrap', \" \").concat(className || '');\n }; // Tooltip.trigger(default 'hover') ==trigger==> onVisibleChange(visible)\n\n\n var handleVisibleChange = function handleVisibleChange(visible) {\n // const { onVisibleChange } = props;\n // onVisibleChange(visible);\n flag && setTipVisible(visible);\n }; // onClick Copy Button\n\n\n var handleCopy = function handleCopy(innerText) {\n copy(innerText);\n setHasCopy(!hasCopy);\n setTimeout(function () {\n setHasCopy(false);\n }, 1000);\n };\n\n var renderNode = function renderNode() {\n var popoverNode = React.createElement(Popover, _extends({}, props, {\n content: content || children,\n visible: tipVisible,\n onVisibleChange: function onVisibleChange(visible) {\n return handleVisibleChange(visible);\n }\n }), React.createElement(\"div\", {\n className: className,\n style: {\n WebkitLineClamp: _lines\n },\n ref: elementRef\n }, children || content));\n var tooltipNode = React.createElement(Tooltip, _extends({}, props, {\n title: title || children,\n visible: tipVisible,\n onVisibleChange: function onVisibleChange(visible) {\n return handleVisibleChange(visible);\n }\n }), React.createElement(\"div\", {\n className: className,\n style: {\n WebkitLineClamp: _lines\n },\n ref: elementRef\n }, children || title));\n return _popover ? popoverNode : tooltipNode;\n };\n\n return React.createElement(React.Fragment, null, React.createElement(\"div\", {\n className: \"tnt-ellipsis\",\n style: _objectSpread({}, style, {\n maxWidth: widthLimit\n })\n }, prefix && prefix, React.createElement(\"div\", {\n className: getClassName()\n }, inner ? renderNode() : emptyText), suffix && suffix, inner && _copyable && React.createElement(\"div\", {\n className: \"svg-button\",\n onClick: function onClick() {\n return handleCopy(elementRef.current.innerText);\n }\n }, !hasCopy ? React.createElement(CopySVG, null) : React.createElement(TickSVG, null))));\n});"
|
|
13939
13939
|
},
|
|
13940
13940
|
{
|
|
13941
13941
|
"id": null,
|
|
@@ -22381,7 +22381,7 @@
|
|
|
22381
22381
|
"moduleName": "./components/index.js + 102 modules",
|
|
22382
22382
|
"type": "harmony side effect evaluation",
|
|
22383
22383
|
"userRequest": "react",
|
|
22384
|
-
"loc": "1:0-
|
|
22384
|
+
"loc": "1:0-38"
|
|
22385
22385
|
},
|
|
22386
22386
|
{
|
|
22387
22387
|
"moduleId": 74,
|
|
@@ -22399,7 +22399,7 @@
|
|
|
22399
22399
|
"moduleName": "./components/index.js + 102 modules",
|
|
22400
22400
|
"type": "harmony side effect evaluation",
|
|
22401
22401
|
"userRequest": "react",
|
|
22402
|
-
"loc": "1:0-
|
|
22402
|
+
"loc": "1:0-31"
|
|
22403
22403
|
},
|
|
22404
22404
|
{
|
|
22405
22405
|
"moduleId": 74,
|
|
@@ -22624,7 +22624,7 @@
|
|
|
22624
22624
|
"moduleName": "./components/index.js + 102 modules",
|
|
22625
22625
|
"type": "harmony side effect evaluation",
|
|
22626
22626
|
"userRequest": "react",
|
|
22627
|
-
"loc": "21:0-
|
|
22627
|
+
"loc": "21:0-33"
|
|
22628
22628
|
},
|
|
22629
22629
|
{
|
|
22630
22630
|
"moduleId": 74,
|
|
@@ -22642,7 +22642,7 @@
|
|
|
22642
22642
|
"moduleName": "./components/index.js + 102 modules",
|
|
22643
22643
|
"type": "harmony side effect evaluation",
|
|
22644
22644
|
"userRequest": "react",
|
|
22645
|
-
"loc": "21:0-
|
|
22645
|
+
"loc": "21:0-51"
|
|
22646
22646
|
},
|
|
22647
22647
|
{
|
|
22648
22648
|
"moduleId": 74,
|
|
@@ -24744,9 +24744,9 @@
|
|
|
24744
24744
|
"chunks": [
|
|
24745
24745
|
0
|
|
24746
24746
|
],
|
|
24747
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
24747
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Columns/index.js",
|
|
24748
24748
|
"issuerId": null,
|
|
24749
|
-
"issuerName": "./components/
|
|
24749
|
+
"issuerName": "./components/Columns/index.js",
|
|
24750
24750
|
"issuerPath": [
|
|
24751
24751
|
{
|
|
24752
24752
|
"id": null,
|
|
@@ -24755,8 +24755,8 @@
|
|
|
24755
24755
|
},
|
|
24756
24756
|
{
|
|
24757
24757
|
"id": null,
|
|
24758
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
24759
|
-
"name": "./components/
|
|
24758
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Columns/index.js",
|
|
24759
|
+
"name": "./components/Columns/index.js"
|
|
24760
24760
|
}
|
|
24761
24761
|
],
|
|
24762
24762
|
"failed": false,
|
|
@@ -26846,9 +26846,9 @@
|
|
|
26846
26846
|
"chunks": [
|
|
26847
26847
|
0
|
|
26848
26848
|
],
|
|
26849
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
26849
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/ResizableTable/index.js",
|
|
26850
26850
|
"issuerId": null,
|
|
26851
|
-
"issuerName": "./components/
|
|
26851
|
+
"issuerName": "./components/Table/ResizableTable/index.js",
|
|
26852
26852
|
"issuerPath": [
|
|
26853
26853
|
{
|
|
26854
26854
|
"id": null,
|
|
@@ -26857,8 +26857,8 @@
|
|
|
26857
26857
|
},
|
|
26858
26858
|
{
|
|
26859
26859
|
"id": null,
|
|
26860
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
26861
|
-
"name": "./components/
|
|
26860
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Table/ResizableTable/index.js",
|
|
26861
|
+
"name": "./components/Table/ResizableTable/index.js"
|
|
26862
26862
|
}
|
|
26863
26863
|
],
|
|
26864
26864
|
"failed": false,
|
|
@@ -27739,9 +27739,9 @@
|
|
|
27739
27739
|
"chunks": [
|
|
27740
27740
|
0
|
|
27741
27741
|
],
|
|
27742
|
-
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
27742
|
+
"issuer": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Columns/index.js",
|
|
27743
27743
|
"issuerId": null,
|
|
27744
|
-
"issuerName": "./components/
|
|
27744
|
+
"issuerName": "./components/Columns/index.js",
|
|
27745
27745
|
"issuerPath": [
|
|
27746
27746
|
{
|
|
27747
27747
|
"id": null,
|
|
@@ -27750,8 +27750,8 @@
|
|
|
27750
27750
|
},
|
|
27751
27751
|
{
|
|
27752
27752
|
"id": null,
|
|
27753
|
-
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/
|
|
27754
|
-
"name": "./components/
|
|
27753
|
+
"identifier": "/Users/zhouzefei/projects/tntd/node_modules/babel-loader/lib/index.js?cacheDirectory=true!/Users/zhouzefei/projects/tntd/components/Columns/index.js",
|
|
27754
|
+
"name": "./components/Columns/index.js"
|
|
27755
27755
|
}
|
|
27756
27756
|
],
|
|
27757
27757
|
"failed": false,
|
|
@@ -33830,7 +33830,7 @@
|
|
|
33830
33830
|
"name": "./components/index.js + 102 modules",
|
|
33831
33831
|
"index": 0,
|
|
33832
33832
|
"index2": 188,
|
|
33833
|
-
"size":
|
|
33833
|
+
"size": 452959,
|
|
33834
33834
|
"cacheable": true,
|
|
33835
33835
|
"built": true,
|
|
33836
33836
|
"optional": false,
|
|
@@ -35722,7 +35722,7 @@
|
|
|
35722
35722
|
"name": "./components/Ellipsis/index.js",
|
|
35723
35723
|
"index": 178,
|
|
35724
35724
|
"index2": 183,
|
|
35725
|
-
"size":
|
|
35725
|
+
"size": 6921,
|
|
35726
35726
|
"cacheable": true,
|
|
35727
35727
|
"built": true,
|
|
35728
35728
|
"optional": false,
|
|
@@ -35770,7 +35770,7 @@
|
|
|
35770
35770
|
],
|
|
35771
35771
|
"optimizationBailout": [],
|
|
35772
35772
|
"depth": 1,
|
|
35773
|
-
"source": "function 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 _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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n/*\n * @Author: 梁洪刚\n * @CreatDate: 2021-03-31 13:57:32\n * @Describe: 省略号组件\n */\nimport { useState, useEffect, useRef } from 'react';\nimport { Popover, Tooltip } from 'antd';\nimport copy from 'copy-to-clipboard';\nimport CopySVG from './Svg/CopySVG';\nimport TickSVG from './Svg/TickSVG';\nimport './index.less';\nvar tolerance = 0; // In px. Depends on the font you are using\n\nvar isEllipsisActive = function isEllipsisActive(e) {\n if (e.offsetWidth === e.scrollWidth && e.offsetHeight === e.scrollHeight) {\n var _e$parentNode, _e$parentNode$getAttr;\n\n var styleStr = 'overflow:visible; ';\n\n if (!(e == null ? void 0 : (_e$parentNode = e.parentNode) == null ? void 0 : (_e$parentNode$getAttr = _e$parentNode.getAttribute('style')) == null ? void 0 : _e$parentNode$getAttr.includes('width'))) {\n styleStr += '
|
|
35773
|
+
"source": "function 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 _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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n/*\n * @Author: 梁洪刚\n * @CreatDate: 2021-03-31 13:57:32\n * @Describe: 省略号组件\n */\nimport { useState, useEffect, useRef } from 'react';\nimport { Popover, Tooltip } from 'antd';\nimport copy from 'copy-to-clipboard';\nimport CopySVG from './Svg/CopySVG';\nimport TickSVG from './Svg/TickSVG';\nimport './index.less';\nvar tolerance = 0; // In px. Depends on the font you are using\n\nvar isEllipsisActive = function isEllipsisActive(e) {\n if (e.offsetWidth === e.scrollWidth && e.offsetHeight === e.scrollHeight) {\n var _e$parentNode, _e$parentNode$getAttr;\n\n var styleStr = 'overflow:visible; ';\n\n if (!(e == null ? void 0 : (_e$parentNode = e.parentNode) == null ? void 0 : (_e$parentNode$getAttr = _e$parentNode.getAttribute('style')) == null ? void 0 : _e$parentNode$getAttr.includes('width'))) {\n styleStr += 'max-width:100%;';\n }\n\n e.parentNode.setAttribute('style', styleStr);\n }\n\n return e.offsetWidth + tolerance < e.scrollWidth || e.offsetHeight < e.scrollHeight;\n};\n\nexport default (function (props) {\n var _props$_popover = props._popover,\n _popover = _props$_popover === void 0 ? props.Popover : _props$_popover,\n title = props.title,\n content = props.content,\n className = props.className,\n style = props.style,\n widthLimit = props.widthLimit,\n _props$_lines = props._lines,\n _lines = _props$_lines === void 0 ? props.lines !== 1 && props.lines : _props$_lines,\n children = props.children,\n emptyText = props.emptyText,\n _props$_copyable = props._copyable,\n _copyable = _props$_copyable === void 0 ? props.copyable : _props$_copyable,\n prefix = props.prefix,\n suffix = props.suffix; // allow visible or not state\n\n\n var _useState = useState(true),\n _useState2 = _slicedToArray(_useState, 2),\n flag = _useState2[0],\n setFlag = _useState2[1]; // visible[Tooltip/Popover] state\n\n\n var _useState3 = useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n tipVisible = _useState4[0],\n setTipVisible = _useState4[1]; // copy animation state\n\n\n var _useState5 = useState(false),\n _useState6 = _slicedToArray(_useState5, 2),\n hasCopy = _useState6[0],\n setHasCopy = _useState6[1];\n\n var elementRef = useRef();\n useEffect(function () {\n elementRef.current && isEllipsisActive(elementRef.current) ? setFlag(true) : (setFlag(false), setTipVisible(false));\n }); // original Node\n\n var inner = typeof children === 'string' ? children : _popover ? content : title; // for className\n\n var getClassName = function getClassName() {\n return \"overflow \".concat(_lines ? 'ellipsis-wrap' : 'ellipsis-nowrap', \" \").concat(className || '');\n }; // Tooltip.trigger(default 'hover') ==trigger==> onVisibleChange(visible)\n\n\n var handleVisibleChange = function handleVisibleChange(visible) {\n // const { onVisibleChange } = props;\n // onVisibleChange(visible);\n flag && setTipVisible(visible);\n }; // onClick Copy Button\n\n\n var handleCopy = function handleCopy(innerText) {\n copy(innerText);\n setHasCopy(!hasCopy);\n setTimeout(function () {\n setHasCopy(false);\n }, 1000);\n };\n\n var renderNode = function renderNode() {\n var popoverNode = React.createElement(Popover, _extends({}, props, {\n content: content || children,\n visible: tipVisible,\n onVisibleChange: function onVisibleChange(visible) {\n return handleVisibleChange(visible);\n }\n }), React.createElement(\"div\", {\n className: className,\n style: {\n WebkitLineClamp: _lines\n },\n ref: elementRef\n }, children || content));\n var tooltipNode = React.createElement(Tooltip, _extends({}, props, {\n title: title || children,\n visible: tipVisible,\n onVisibleChange: function onVisibleChange(visible) {\n return handleVisibleChange(visible);\n }\n }), React.createElement(\"div\", {\n className: className,\n style: {\n WebkitLineClamp: _lines\n },\n ref: elementRef\n }, children || title));\n return _popover ? popoverNode : tooltipNode;\n };\n\n return React.createElement(React.Fragment, null, React.createElement(\"div\", {\n className: \"tnt-ellipsis\",\n style: _objectSpread({}, style, {\n maxWidth: widthLimit\n })\n }, prefix && prefix, React.createElement(\"div\", {\n className: getClassName()\n }, inner ? renderNode() : emptyText), suffix && suffix, inner && _copyable && React.createElement(\"div\", {\n className: \"svg-button\",\n onClick: function onClick() {\n return handleCopy(elementRef.current.innerText);\n }\n }, !hasCopy ? React.createElement(CopySVG, null) : React.createElement(TickSVG, null))));\n});"
|
|
35774
35774
|
},
|
|
35775
35775
|
{
|
|
35776
35776
|
"id": null,
|