@nokecy/qc-ui 1.0.45 → 1.0.47
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/dist/cjs/ag-grid-plus/_utils/customGroupCellRenderer.js +10 -2
- package/dist/cjs/ag-grid-plus/ag-gridPlus.js +13 -7
- package/dist/cjs/ag-grid-plus/interface.d.ts +1 -0
- package/dist/esm/ag-grid-plus/_utils/customGroupCellRenderer.js +10 -2
- package/dist/esm/ag-grid-plus/ag-gridPlus.js +13 -7
- package/dist/esm/ag-grid-plus/interface.d.ts +1 -0
- package/dist/umd/qc-ui.min.js +1 -1
- package/package.json +1 -1
|
@@ -16,8 +16,10 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
16
16
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
var CustomGroupCellRenderer = function CustomGroupCellRenderer(props) {
|
|
19
|
+
//@ts-ignore
|
|
19
20
|
var node = props.node,
|
|
20
|
-
value = props.value
|
|
21
|
+
value = props.value,
|
|
22
|
+
innerRenderer = props.innerRenderer;
|
|
21
23
|
var _useState = (0, _react.useState)(node.expanded),
|
|
22
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
23
25
|
expanded = _useState2[0],
|
|
@@ -70,6 +72,12 @@ var CustomGroupCellRenderer = function CustomGroupCellRenderer(props) {
|
|
|
70
72
|
fontSize: '10px',
|
|
71
73
|
color: '#00b96b'
|
|
72
74
|
}
|
|
73
|
-
}))), "\xA0",
|
|
75
|
+
}))), "\xA0", /*#__PURE__*/_react.default.createElement("span", {
|
|
76
|
+
style: {
|
|
77
|
+
display: 'inline-block',
|
|
78
|
+
height: 2,
|
|
79
|
+
width: "".concat(node.level * 14, "px")
|
|
80
|
+
}
|
|
81
|
+
}), innerRenderer ? innerRenderer(props) : value);
|
|
74
82
|
};
|
|
75
83
|
var _default = exports.default = CustomGroupCellRenderer;
|
|
@@ -110,7 +110,7 @@ function AgGridPlus(props) {
|
|
|
110
110
|
sortColumn = _useState16[0],
|
|
111
111
|
setSortColumn = _useState16[1];
|
|
112
112
|
var _useState17 = (0, _react.useState)({
|
|
113
|
-
pageSize: 200,
|
|
113
|
+
pageSize: props.hidePagination ? 10000 : 200,
|
|
114
114
|
current: 1,
|
|
115
115
|
total: dataSource ? dataSource.length : 0
|
|
116
116
|
}),
|
|
@@ -336,13 +336,13 @@ function AgGridPlus(props) {
|
|
|
336
336
|
if (!i.cellRenderer) {
|
|
337
337
|
switch (i.calculateType) {
|
|
338
338
|
case "sum":
|
|
339
|
-
calculateData[i.field] = i.formatWithCommas ? handelNumber(sumFun(i.field, displayedData).toFixed(i.transactionAmount)) : sumFun(i.field, displayedData).toFixed(i.transactionAmount);
|
|
339
|
+
calculateData[i.field] = i.formatWithCommas ? handelNumber(sumFun(i.field, displayedData).toFixed(i.transactionAmount)) : Number(sumFun(i.field, displayedData).toFixed(i.transactionAmount));
|
|
340
340
|
break;
|
|
341
341
|
case "avg":
|
|
342
|
-
calculateData[i.field] = avgFun(i.field, displayedData).toFixed(i.transactionAmount);
|
|
342
|
+
calculateData[i.field] = Number(avgFun(i.field, displayedData).toFixed(i.transactionAmount));
|
|
343
343
|
break;
|
|
344
344
|
case "standardDeviation":
|
|
345
|
-
calculateData[i.field] = standardDeviationFun(i.field, displayedData).toFixed(i.transactionAmount);
|
|
345
|
+
calculateData[i.field] = Number(standardDeviationFun(i.field, displayedData).toFixed(i.transactionAmount));
|
|
346
346
|
break;
|
|
347
347
|
default:
|
|
348
348
|
break;
|
|
@@ -440,6 +440,11 @@ function AgGridPlus(props) {
|
|
|
440
440
|
return /*#__PURE__*/_react.default.createElement(Text, {
|
|
441
441
|
ellipsis: {
|
|
442
442
|
tooltip: value
|
|
443
|
+
},
|
|
444
|
+
style: {
|
|
445
|
+
display: 'flex',
|
|
446
|
+
justifyContent: 'center',
|
|
447
|
+
alignItems: 'center'
|
|
443
448
|
}
|
|
444
449
|
}, value);
|
|
445
450
|
}
|
|
@@ -536,10 +541,11 @@ function AgGridPlus(props) {
|
|
|
536
541
|
maxResultCount: pagination.pageSize
|
|
537
542
|
});
|
|
538
543
|
var autoGroupColumnDef = (0, _react.useMemo)(function () {
|
|
539
|
-
|
|
544
|
+
var _props$autoGroupColum;
|
|
545
|
+
return _objectSpread(_objectSpread({}, props.autoGroupColumnDef), (_props$autoGroupColum = props.autoGroupColumnDef) !== null && _props$autoGroupColum !== void 0 && _props$autoGroupColum.cellRenderer ? {} : {
|
|
540
546
|
cellRenderer: _customGroupCellRenderer.default
|
|
541
547
|
});
|
|
542
|
-
}, []);
|
|
548
|
+
}, [props.autoGroupColumnDef]);
|
|
543
549
|
return /*#__PURE__*/_react.default.createElement(_antd.Spin, {
|
|
544
550
|
spinning: loading,
|
|
545
551
|
wrapperClassName: "grid-spin"
|
|
@@ -658,7 +664,7 @@ function AgGridPlus(props) {
|
|
|
658
664
|
display: "flex",
|
|
659
665
|
justifyContent: "flex-end"
|
|
660
666
|
}
|
|
661
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Pagination, {
|
|
667
|
+
}, !props.hidePagination && /*#__PURE__*/_react.default.createElement(_antd.Pagination, {
|
|
662
668
|
pageSize: pagination.pageSize,
|
|
663
669
|
current: pagination.current,
|
|
664
670
|
total: pagination.total,
|
|
@@ -7,8 +7,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
8
8
|
import { MinusOutlined, PlusOutlined } from '@ant-design/icons';
|
|
9
9
|
var CustomGroupCellRenderer = function CustomGroupCellRenderer(props) {
|
|
10
|
+
//@ts-ignore
|
|
10
11
|
var node = props.node,
|
|
11
|
-
value = props.value
|
|
12
|
+
value = props.value,
|
|
13
|
+
innerRenderer = props.innerRenderer;
|
|
12
14
|
var _useState = useState(node.expanded),
|
|
13
15
|
_useState2 = _slicedToArray(_useState, 2),
|
|
14
16
|
expanded = _useState2[0],
|
|
@@ -61,6 +63,12 @@ var CustomGroupCellRenderer = function CustomGroupCellRenderer(props) {
|
|
|
61
63
|
fontSize: '10px',
|
|
62
64
|
color: '#00b96b'
|
|
63
65
|
}
|
|
64
|
-
}))), "\xA0",
|
|
66
|
+
}))), "\xA0", /*#__PURE__*/React.createElement("span", {
|
|
67
|
+
style: {
|
|
68
|
+
display: 'inline-block',
|
|
69
|
+
height: 2,
|
|
70
|
+
width: "".concat(node.level * 14, "px")
|
|
71
|
+
}
|
|
72
|
+
}), innerRenderer ? innerRenderer(props) : value);
|
|
65
73
|
};
|
|
66
74
|
export default CustomGroupCellRenderer;
|
|
@@ -101,7 +101,7 @@ function AgGridPlus(props) {
|
|
|
101
101
|
sortColumn = _useState16[0],
|
|
102
102
|
setSortColumn = _useState16[1];
|
|
103
103
|
var _useState17 = useState({
|
|
104
|
-
pageSize: 200,
|
|
104
|
+
pageSize: props.hidePagination ? 10000 : 200,
|
|
105
105
|
current: 1,
|
|
106
106
|
total: dataSource ? dataSource.length : 0
|
|
107
107
|
}),
|
|
@@ -327,13 +327,13 @@ function AgGridPlus(props) {
|
|
|
327
327
|
if (!i.cellRenderer) {
|
|
328
328
|
switch (i.calculateType) {
|
|
329
329
|
case "sum":
|
|
330
|
-
calculateData[i.field] = i.formatWithCommas ? handelNumber(sumFun(i.field, displayedData).toFixed(i.transactionAmount)) : sumFun(i.field, displayedData).toFixed(i.transactionAmount);
|
|
330
|
+
calculateData[i.field] = i.formatWithCommas ? handelNumber(sumFun(i.field, displayedData).toFixed(i.transactionAmount)) : Number(sumFun(i.field, displayedData).toFixed(i.transactionAmount));
|
|
331
331
|
break;
|
|
332
332
|
case "avg":
|
|
333
|
-
calculateData[i.field] = avgFun(i.field, displayedData).toFixed(i.transactionAmount);
|
|
333
|
+
calculateData[i.field] = Number(avgFun(i.field, displayedData).toFixed(i.transactionAmount));
|
|
334
334
|
break;
|
|
335
335
|
case "standardDeviation":
|
|
336
|
-
calculateData[i.field] = standardDeviationFun(i.field, displayedData).toFixed(i.transactionAmount);
|
|
336
|
+
calculateData[i.field] = Number(standardDeviationFun(i.field, displayedData).toFixed(i.transactionAmount));
|
|
337
337
|
break;
|
|
338
338
|
default:
|
|
339
339
|
break;
|
|
@@ -431,6 +431,11 @@ function AgGridPlus(props) {
|
|
|
431
431
|
return /*#__PURE__*/React.createElement(Text, {
|
|
432
432
|
ellipsis: {
|
|
433
433
|
tooltip: value
|
|
434
|
+
},
|
|
435
|
+
style: {
|
|
436
|
+
display: 'flex',
|
|
437
|
+
justifyContent: 'center',
|
|
438
|
+
alignItems: 'center'
|
|
434
439
|
}
|
|
435
440
|
}, value);
|
|
436
441
|
}
|
|
@@ -527,10 +532,11 @@ function AgGridPlus(props) {
|
|
|
527
532
|
maxResultCount: pagination.pageSize
|
|
528
533
|
});
|
|
529
534
|
var autoGroupColumnDef = useMemo(function () {
|
|
530
|
-
|
|
535
|
+
var _props$autoGroupColum;
|
|
536
|
+
return _objectSpread(_objectSpread({}, props.autoGroupColumnDef), (_props$autoGroupColum = props.autoGroupColumnDef) !== null && _props$autoGroupColum !== void 0 && _props$autoGroupColum.cellRenderer ? {} : {
|
|
531
537
|
cellRenderer: CustomGroupCellRenderer
|
|
532
538
|
});
|
|
533
|
-
}, []);
|
|
539
|
+
}, [props.autoGroupColumnDef]);
|
|
534
540
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
535
541
|
spinning: loading,
|
|
536
542
|
wrapperClassName: "grid-spin"
|
|
@@ -649,7 +655,7 @@ function AgGridPlus(props) {
|
|
|
649
655
|
display: "flex",
|
|
650
656
|
justifyContent: "flex-end"
|
|
651
657
|
}
|
|
652
|
-
}, /*#__PURE__*/React.createElement(Pagination, {
|
|
658
|
+
}, !props.hidePagination && /*#__PURE__*/React.createElement(Pagination, {
|
|
653
659
|
pageSize: pagination.pageSize,
|
|
654
660
|
current: pagination.current,
|
|
655
661
|
total: pagination.total,
|