@myunisoft/design-system 0.19.0-beta.2 → 0.19.0-beta.4
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/index.js +287 -45
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37,9 +37,9 @@ var $gXNCa$babelruntimeregenerator = require("@babel/runtime/regenerator");
|
|
|
37
37
|
var $gXNCa$babelruntimehelpersasyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
38
38
|
var $gXNCa$lodashfind = require("lodash/find");
|
|
39
39
|
var $gXNCa$exceljs = require("exceljs");
|
|
40
|
+
var $gXNCa$jspdf = require("jspdf");
|
|
40
41
|
var $gXNCa$printjs = require("print-js");
|
|
41
42
|
var $gXNCa$html2canvas = require("html2canvas");
|
|
42
|
-
var $gXNCa$jspdf = require("jspdf");
|
|
43
43
|
var $gXNCa$muistyleswithStyles = require("@mui/styles/withStyles");
|
|
44
44
|
var $gXNCa$reactdropzone = require("react-dropzone");
|
|
45
45
|
var $gXNCa$muimaterialIconButton = require("@mui/material/IconButton");
|
|
@@ -959,7 +959,7 @@ function $33a6c9c6ce93d958$var$_interopRequireWildcard(obj, nodeInterop) {
|
|
|
959
959
|
}
|
|
960
960
|
var $33a6c9c6ce93d958$var$Body = /*#__PURE__*/ $33a6c9c6ce93d958$var$_react["default"].forwardRef(function Body(props, ref) {
|
|
961
961
|
var cache = props.cache, displayableRows = props.displayableRows, height = props.height, onScrollbarPresenceChange = props.onScrollbarPresenceChange, domRef = props.domRef, scrollLeft = props.scrollLeft, totalWidth = props.totalWidth, onScroll = props.onScroll, horizontalPadding = props.horizontalPadding, rest = (0, $33a6c9c6ce93d958$var$_objectWithoutProperties2["default"])(props, $33a6c9c6ce93d958$var$_excluded);
|
|
962
|
-
var _useConfig = (0, $ckVq7.useConfig)(), _useConfig$config = _useConfig.config, _useConfig$config$alw = _useConfig$config.alwaysInEdition, alwaysInEdition = _useConfig$config$alw === void 0 ? false : _useConfig$config$alw, columns = _useConfig$config.columns, _useConfig$config$wit = _useConfig$config.withBorders, withBorders = _useConfig$config$wit === void 0 ? false : _useConfig$config$wit, selectableRowKey = _useConfig$config.selectableRowKey, _useConfig$config$has = _useConfig$config.hasSecureSociety, hasSecureSociety = _useConfig$config$has === void 0 ? false : _useConfig$config$has, _useConfig$config$ope = _useConfig$config.openSocieties, openSocieties = _useConfig$config$ope === void 0 ? [] : _useConfig$config$ope;
|
|
962
|
+
var _useConfig = (0, $ckVq7.useConfig)(), _useConfig$config = _useConfig.config, _useConfig$config$alw = _useConfig$config.alwaysInEdition, alwaysInEdition = _useConfig$config$alw === void 0 ? false : _useConfig$config$alw, columns = _useConfig$config.columns, _useConfig$config$wit = _useConfig$config.withBorders, withBorders = _useConfig$config$wit === void 0 ? false : _useConfig$config$wit, selectableRowKey = _useConfig$config.selectableRowKey, _useConfig$config$has = _useConfig$config.hasSecureSociety, hasSecureSociety = _useConfig$config$has === void 0 ? false : _useConfig$config$has, _useConfig$config$ope = _useConfig$config.openSocieties, openSocieties = _useConfig$config$ope === void 0 ? [] : _useConfig$config$ope, stylesProp = _useConfig$config.styles;
|
|
963
963
|
var styles = (0, $33a6c9c6ce93d958$var$_styles["default"])({
|
|
964
964
|
horizontalPadding: horizontalPadding,
|
|
965
965
|
rowHeight: props.rowHeight
|
|
@@ -967,6 +967,14 @@ var $33a6c9c6ce93d958$var$Body = /*#__PURE__*/ $33a6c9c6ce93d958$var$_react["def
|
|
|
967
967
|
var openSocietiesIds = openSocieties.map(function(society) {
|
|
968
968
|
return society === null || society === void 0 ? void 0 : society.id;
|
|
969
969
|
});
|
|
970
|
+
var containerCustomStyling = (0, $33a6c9c6ce93d958$var$_react.useMemo)(function() {
|
|
971
|
+
var _stylesProp$body, _stylesProp$body$cont;
|
|
972
|
+
return stylesProp === null || stylesProp === void 0 ? void 0 : (_stylesProp$body = stylesProp.body) === null || _stylesProp$body === void 0 ? void 0 : (_stylesProp$body$cont = _stylesProp$body.container) === null || _stylesProp$body$cont === void 0 ? void 0 : _stylesProp$body$cont.call(_stylesProp$body, {
|
|
973
|
+
rowCount: displayableRows.length
|
|
974
|
+
});
|
|
975
|
+
}, [
|
|
976
|
+
displayableRows.length
|
|
977
|
+
]);
|
|
970
978
|
var _renderBodyRow = (0, $33a6c9c6ce93d958$var$_react.useCallback)(function(rowProps) {
|
|
971
979
|
var row = displayableRows[rowProps.rowIndex];
|
|
972
980
|
if (!row) return null;
|
|
@@ -983,7 +991,8 @@ var $33a6c9c6ce93d958$var$Body = /*#__PURE__*/ $33a6c9c6ce93d958$var$_react["def
|
|
|
983
991
|
cache: cache,
|
|
984
992
|
hasSecureSociety: hasSecureSociety,
|
|
985
993
|
openSocietiesIds: openSocietiesIds,
|
|
986
|
-
alwaysInEdition: alwaysInEdition
|
|
994
|
+
alwaysInEdition: alwaysInEdition,
|
|
995
|
+
bodyStylesProp: stylesProp === null || stylesProp === void 0 ? void 0 : stylesProp.body
|
|
987
996
|
}, rest));
|
|
988
997
|
}, [
|
|
989
998
|
displayableRows,
|
|
@@ -995,9 +1004,10 @@ var $33a6c9c6ce93d958$var$Body = /*#__PURE__*/ $33a6c9c6ce93d958$var$_react["def
|
|
|
995
1004
|
alwaysInEdition
|
|
996
1005
|
]);
|
|
997
1006
|
return /*#__PURE__*/ $33a6c9c6ce93d958$var$_react["default"].createElement("div", {
|
|
998
|
-
className: styles.gridContainer,
|
|
1007
|
+
className: (0, $33a6c9c6ce93d958$var$_classnames["default"])(containerCustomStyling === null || containerCustomStyling === void 0 ? void 0 : containerCustomStyling.classes, styles.gridContainer),
|
|
999
1008
|
ref: domRef,
|
|
1000
|
-
"data-role": "body"
|
|
1009
|
+
"data-role": "body",
|
|
1010
|
+
style: containerCustomStyling === null || containerCustomStyling === void 0 ? void 0 : containerCustomStyling.style
|
|
1001
1011
|
}, /*#__PURE__*/ $33a6c9c6ce93d958$var$_react["default"].createElement($33a6c9c6ce93d958$var$_VirtualGrid["default"], (0, $33a6c9c6ce93d958$var$_extends2["default"])({
|
|
1002
1012
|
ref: ref,
|
|
1003
1013
|
className: (0, $33a6c9c6ce93d958$var$_classnames["default"])("vtBody", styles.BodyGrid, styles.defaultStyle, (0, $33a6c9c6ce93d958$var$_defineProperty2["default"])({}, styles.BodyGrid_withBorders, withBorders)),
|
|
@@ -1671,10 +1681,10 @@ Object.defineProperty(module.exports, "__esModule", {
|
|
|
1671
1681
|
module.exports["default"] = void 0;
|
|
1672
1682
|
|
|
1673
1683
|
|
|
1674
|
-
var $c5260278287da19e$var$_react = $gXNCa$babelruntimehelpersinteropRequireDefault($gXNCa$react);
|
|
1675
|
-
|
|
1676
1684
|
var $c5260278287da19e$var$_classnames = $gXNCa$babelruntimehelpersinteropRequireDefault($gXNCa$classnames);
|
|
1677
1685
|
|
|
1686
|
+
var $c5260278287da19e$var$_react = $gXNCa$babelruntimehelpersinteropRequireDefault($gXNCa$react);
|
|
1687
|
+
|
|
1678
1688
|
var $ckVq7 = parcelRequire("ckVq7");
|
|
1679
1689
|
|
|
1680
1690
|
var $igQNT = parcelRequire("igQNT");
|
|
@@ -1944,6 +1954,7 @@ module.exports["default"] = $874862337ffd9628$var$_default;
|
|
|
1944
1954
|
parcelRequire.register("7Gceh", function(module, exports) {
|
|
1945
1955
|
"use strict";
|
|
1946
1956
|
|
|
1957
|
+
|
|
1947
1958
|
Object.defineProperty(module.exports, "__esModule", {
|
|
1948
1959
|
value: true
|
|
1949
1960
|
});
|
|
@@ -1955,7 +1966,7 @@ var $5975f126da112a16$var$_extends2 = $gXNCa$babelruntimehelpersinteropRequireDe
|
|
|
1955
1966
|
|
|
1956
1967
|
var $5975f126da112a16$var$_objectWithoutProperties2 = $gXNCa$babelruntimehelpersinteropRequireDefault($gXNCa$babelruntimehelpersobjectWithoutProperties);
|
|
1957
1968
|
|
|
1958
|
-
var $5975f126da112a16$var$_react = $
|
|
1969
|
+
var $5975f126da112a16$var$_react = $5975f126da112a16$var$_interopRequireWildcard($gXNCa$react);
|
|
1959
1970
|
|
|
1960
1971
|
var $5975f126da112a16$var$_classnames = $gXNCa$babelruntimehelpersinteropRequireDefault($gXNCa$classnames);
|
|
1961
1972
|
|
|
@@ -1982,10 +1993,37 @@ var $5975f126da112a16$var$_excluded = [
|
|
|
1982
1993
|
"isVisible",
|
|
1983
1994
|
"hasSecureSociety",
|
|
1984
1995
|
"openSocietiesIds",
|
|
1985
|
-
"alwaysInEdition"
|
|
1996
|
+
"alwaysInEdition",
|
|
1997
|
+
"bodyStylesProp"
|
|
1986
1998
|
], $5975f126da112a16$var$_excluded2 = [
|
|
1987
1999
|
"key"
|
|
1988
2000
|
];
|
|
2001
|
+
function $5975f126da112a16$var$_getRequireWildcardCache(nodeInterop) {
|
|
2002
|
+
if (typeof WeakMap !== "function") return null;
|
|
2003
|
+
var cacheBabelInterop = new WeakMap();
|
|
2004
|
+
var cacheNodeInterop = new WeakMap();
|
|
2005
|
+
return ($5975f126da112a16$var$_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
2006
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
2007
|
+
})(nodeInterop);
|
|
2008
|
+
}
|
|
2009
|
+
function $5975f126da112a16$var$_interopRequireWildcard(obj, nodeInterop) {
|
|
2010
|
+
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
2011
|
+
if (obj === null || $gXNCa$babelruntimehelperstypeof(obj) !== "object" && typeof obj !== "function") return {
|
|
2012
|
+
"default": obj
|
|
2013
|
+
};
|
|
2014
|
+
var cache = $5975f126da112a16$var$_getRequireWildcardCache(nodeInterop);
|
|
2015
|
+
if (cache && cache.has(obj)) return cache.get(obj);
|
|
2016
|
+
var newObj = {};
|
|
2017
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
2018
|
+
for(var key in obj)if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
2019
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
2020
|
+
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
2021
|
+
else newObj[key] = obj[key];
|
|
2022
|
+
}
|
|
2023
|
+
newObj["default"] = obj;
|
|
2024
|
+
if (cache) cache.set(obj, newObj);
|
|
2025
|
+
return newObj;
|
|
2026
|
+
}
|
|
1989
2027
|
function $5975f126da112a16$var$ownKeys(object, enumerableOnly) {
|
|
1990
2028
|
var keys = Object.keys(object);
|
|
1991
2029
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -2009,10 +2047,20 @@ function $5975f126da112a16$var$_objectSpread(target) {
|
|
|
2009
2047
|
}
|
|
2010
2048
|
var $5975f126da112a16$var$BodyRow = function BodyRow(props) {
|
|
2011
2049
|
var _row$parentRowIndex;
|
|
2012
|
-
var cache = props.cache, columns = props.columns, columnWidth = props.columnWidth, displayableRows = props.displayableRows, fixedColumnCount = props.fixedColumnCount, hasCheckBoxHidden = props.hasCheckBoxHidden, rowIndex = props.rowIndex, _props$row = props.row, row = _props$row === void 0 ? {} : _props$row, scrollLeft = props.scrollLeft, selectableRowKey = props.selectableRowKey, style = props.style, classes = props.classes, isVisible = props.isVisible, _props$hasSecureSocie = props.hasSecureSociety, hasSecureSociety = _props$hasSecureSocie === void 0 ? false : _props$hasSecureSocie, _props$openSocietiesI = props.openSocietiesIds, openSocietiesIds = _props$openSocietiesI === void 0 ? [] : _props$openSocietiesI, _props$alwaysInEditio = props.alwaysInEdition, alwaysInEdition = _props$alwaysInEditio === void 0 ? false : _props$alwaysInEditio, rest = (0, $5975f126da112a16$var$_objectWithoutProperties2["default"])(props, $5975f126da112a16$var$_excluded);
|
|
2050
|
+
var cache = props.cache, columns = props.columns, columnWidth = props.columnWidth, displayableRows = props.displayableRows, fixedColumnCount = props.fixedColumnCount, hasCheckBoxHidden = props.hasCheckBoxHidden, rowIndex = props.rowIndex, _props$row = props.row, row = _props$row === void 0 ? {} : _props$row, scrollLeft = props.scrollLeft, selectableRowKey = props.selectableRowKey, style = props.style, classes = props.classes, isVisible = props.isVisible, _props$hasSecureSocie = props.hasSecureSociety, hasSecureSociety = _props$hasSecureSocie === void 0 ? false : _props$hasSecureSocie, _props$openSocietiesI = props.openSocietiesIds, openSocietiesIds = _props$openSocietiesI === void 0 ? [] : _props$openSocietiesI, _props$alwaysInEditio = props.alwaysInEdition, alwaysInEdition = _props$alwaysInEditio === void 0 ? false : _props$alwaysInEditio, bodyStylesProp = props.bodyStylesProp, rest = (0, $5975f126da112a16$var$_objectWithoutProperties2["default"])(props, $5975f126da112a16$var$_excluded);
|
|
2013
2051
|
var apiRef = (0, $4IFzq.useApiRef)();
|
|
2014
2052
|
var selectedRows = (0, $9E7Hm.useSelector)(apiRef, $lRxmh.selectedRowsSelector);
|
|
2015
2053
|
var isSelected = selectedRows.includes(row[selectableRowKey]);
|
|
2054
|
+
var customStyling = (0, $5975f126da112a16$var$_react.useMemo)(function() {
|
|
2055
|
+
var _bodyStylesProp$row;
|
|
2056
|
+
return bodyStylesProp === null || bodyStylesProp === void 0 ? void 0 : (_bodyStylesProp$row = bodyStylesProp.row) === null || _bodyStylesProp$row === void 0 ? void 0 : _bodyStylesProp$row.call(bodyStylesProp, {
|
|
2057
|
+
rowData: row,
|
|
2058
|
+
rowIndex: rowIndex
|
|
2059
|
+
});
|
|
2060
|
+
}, [
|
|
2061
|
+
row,
|
|
2062
|
+
rowIndex
|
|
2063
|
+
]);
|
|
2016
2064
|
var keyId = row[selectableRowKey];
|
|
2017
2065
|
var isOdd = ((_row$parentRowIndex = row.parentRowIndex) !== null && _row$parentRowIndex !== void 0 ? _row$parentRowIndex : rowIndex) % 2;
|
|
2018
2066
|
var checkIfSocietyIsOpen = !openSocietiesIds.includes(row === null || row === void 0 ? void 0 : row.company_id);
|
|
@@ -2030,19 +2078,20 @@ var $5975f126da112a16$var$BodyRow = function BodyRow(props) {
|
|
|
2030
2078
|
fixedColumnCount: fixedColumnCount,
|
|
2031
2079
|
isSecuredRow: isSecuredRow,
|
|
2032
2080
|
row: row,
|
|
2033
|
-
isSelected: isSelected
|
|
2081
|
+
isSelected: isSelected,
|
|
2082
|
+
bodyCellStylesProp: bodyStylesProp === null || bodyStylesProp === void 0 ? void 0 : bodyStylesProp.cell
|
|
2034
2083
|
}, cellProps, rest));
|
|
2035
2084
|
};
|
|
2036
2085
|
return /*#__PURE__*/ $5975f126da112a16$var$_react["default"].createElement("div", {
|
|
2037
2086
|
key: rowIndex,
|
|
2038
2087
|
"data-role": "row",
|
|
2039
2088
|
"data-key": keyId,
|
|
2040
|
-
className: (0, $5975f126da112a16$var$_classnames["default"])("bodyRow", isOdd ? "odd" : "even", {
|
|
2089
|
+
className: (0, $5975f126da112a16$var$_classnames["default"])("bodyRow", customStyling === null || customStyling === void 0 ? void 0 : customStyling.classes, isOdd ? "odd" : "even", {
|
|
2041
2090
|
selectedRow: isSelected && !alwaysInEdition
|
|
2042
2091
|
}),
|
|
2043
|
-
style: {
|
|
2092
|
+
style: $5975f126da112a16$var$_objectSpread($5975f126da112a16$var$_objectSpread({}, customStyling === null || customStyling === void 0 ? void 0 : customStyling.style), {}, {
|
|
2044
2093
|
top: style.top
|
|
2045
|
-
}
|
|
2094
|
+
})
|
|
2046
2095
|
}, isVisible && columns.map(function(column, index) {
|
|
2047
2096
|
return _renderBodyCell($5975f126da112a16$var$_objectSpread($5975f126da112a16$var$_objectSpread({
|
|
2048
2097
|
rowIndex: rowIndex,
|
|
@@ -2228,7 +2277,7 @@ function $207fc0463a0bd15d$var$_objectSpread(target) {
|
|
|
2228
2277
|
}
|
|
2229
2278
|
var $207fc0463a0bd15d$var$BodyCell = function BodyCell(_ref) {
|
|
2230
2279
|
var _cx3, _displayableRows$rowI;
|
|
2231
|
-
var columnIndex = _ref.columnIndex, key = _ref.keyName, parent = _ref.parent, rowIndex = _ref.rowIndex, style = _ref.style, _ref$displayableRows = _ref.displayableRows, displayableRows = _ref$displayableRows === void 0 ? [] : _ref$displayableRows, _ref$hasCheckBoxHidde = _ref.hasCheckBoxHidden, hasCheckBoxHidden = _ref$hasCheckBoxHidde === void 0 ? false : _ref$hasCheckBoxHidde, tableKeyName = _ref.tableKeyName, onCellFocus = _ref.onCellFocus, onCellBlur = _ref.onCellBlur, onClick = _ref.onClick, onDoubleClick = _ref.onDoubleClick, focusedCell = _ref.focusedCell, onKeyDown = _ref.onKeyDown, isSecuredRow = _ref.isSecuredRow, _ref$row = _ref.row, row = _ref$row === void 0 ? {} : _ref$row, isSelected = _ref.isSelected;
|
|
2280
|
+
var columnIndex = _ref.columnIndex, key = _ref.keyName, parent = _ref.parent, rowIndex = _ref.rowIndex, style = _ref.style, _ref$displayableRows = _ref.displayableRows, displayableRows = _ref$displayableRows === void 0 ? [] : _ref$displayableRows, _ref$hasCheckBoxHidde = _ref.hasCheckBoxHidden, hasCheckBoxHidden = _ref$hasCheckBoxHidde === void 0 ? false : _ref$hasCheckBoxHidde, tableKeyName = _ref.tableKeyName, onCellFocus = _ref.onCellFocus, onCellBlur = _ref.onCellBlur, onClick = _ref.onClick, onDoubleClick = _ref.onDoubleClick, focusedCell = _ref.focusedCell, onKeyDown = _ref.onKeyDown, isSecuredRow = _ref.isSecuredRow, _ref$row = _ref.row, row = _ref$row === void 0 ? {} : _ref$row, isSelected = _ref.isSelected, bodyCellStylesProp = _ref.bodyCellStylesProp;
|
|
2232
2281
|
var styles = (0, $207fc0463a0bd15d$var$_styles["default"])();
|
|
2233
2282
|
var CHECKBOX_COLUMN = "checkboxColumn";
|
|
2234
2283
|
var VTContext = (0, $207fc0463a0bd15d$var$_react.useContext)($207fc0463a0bd15d$var$_context["default"]);
|
|
@@ -2251,6 +2300,18 @@ var $207fc0463a0bd15d$var$BodyCell = function BodyCell(_ref) {
|
|
|
2251
2300
|
}, [
|
|
2252
2301
|
isFocused
|
|
2253
2302
|
]);
|
|
2303
|
+
var customStyling = (0, $207fc0463a0bd15d$var$_react.useMemo)(function() {
|
|
2304
|
+
return bodyCellStylesProp === null || bodyCellStylesProp === void 0 ? void 0 : bodyCellStylesProp({
|
|
2305
|
+
rowData: row,
|
|
2306
|
+
key: keyColumn,
|
|
2307
|
+
rowIndex: rowIndex,
|
|
2308
|
+
columnIndex: columnIndex
|
|
2309
|
+
});
|
|
2310
|
+
}, [
|
|
2311
|
+
row,
|
|
2312
|
+
columnIndex,
|
|
2313
|
+
rowIndex
|
|
2314
|
+
]);
|
|
2254
2315
|
var rowStyle = (0, $207fc0463a0bd15d$var$_classnames["default"])(styles.cell, (0, $207fc0463a0bd15d$var$_defineProperty2["default"])({}, styles.lockRow, isSecuredRow));
|
|
2255
2316
|
var _renderCheckBoxCell = (0, $207fc0463a0bd15d$var$_react.useCallback)(function(_ref3) {
|
|
2256
2317
|
var key = _ref3.key, rowIndex = _ref3.rowIndex, style = _ref3.style;
|
|
@@ -2377,7 +2438,7 @@ var $207fc0463a0bd15d$var$BodyCell = function BodyCell(_ref) {
|
|
|
2377
2438
|
"data-role": "cell",
|
|
2378
2439
|
"data-column-key": keyColumn,
|
|
2379
2440
|
key: key,
|
|
2380
|
-
style: $207fc0463a0bd15d$var$_objectSpread($207fc0463a0bd15d$var$_objectSpread({}, style), (_displayableRows$rowI = displayableRows[rowIndex]) === null || _displayableRows$rowI === void 0 ? void 0 : _displayableRows$rowI.style),
|
|
2441
|
+
style: $207fc0463a0bd15d$var$_objectSpread($207fc0463a0bd15d$var$_objectSpread($207fc0463a0bd15d$var$_objectSpread({}, style), (_displayableRows$rowI = displayableRows[rowIndex]) === null || _displayableRows$rowI === void 0 ? void 0 : _displayableRows$rowI.style), customStyling === null || customStyling === void 0 ? void 0 : customStyling.style),
|
|
2381
2442
|
onDoubleClick: dbClick,
|
|
2382
2443
|
onClick: simpleClick === null || simpleClick === void 0 ? void 0 : simpleClick.bind(null, displayableRows[rowIndex])
|
|
2383
2444
|
}, hasContextMenu ? /*#__PURE__*/ $207fc0463a0bd15d$var$_react["default"].createElement($207fc0463a0bd15d$var$_ContextMenu["default"], {
|
|
@@ -6237,7 +6298,7 @@ var $c28dcb2ecc31f940$var$downloadFile = function downloadFile(data, filename) {
|
|
|
6237
6298
|
var $c28dcb2ecc31f940$var$exportData = function exportData(rows, columns, format, fileName, tableRefs) {
|
|
6238
6299
|
var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
|
6239
6300
|
var _columns = columns.filter($e902G.isExportable);
|
|
6240
|
-
var _rows = (0, $jlN5T.parseDataRows)(rows, _columns);
|
|
6301
|
+
var _rows = (0, $jlN5T.parseDataRows)(rows, _columns, options);
|
|
6241
6302
|
if (format === "csv") {
|
|
6242
6303
|
var csvData = [
|
|
6243
6304
|
_columns.map(function(_ref) {
|
|
@@ -6277,8 +6338,6 @@ var $e1660f894c3a788a$var$_regenerator = $gXNCa$babelruntimehelpersinteropRequir
|
|
|
6277
6338
|
|
|
6278
6339
|
var $e1660f894c3a788a$var$_asyncToGenerator2 = $gXNCa$babelruntimehelpersinteropRequireDefault($gXNCa$babelruntimehelpersasyncToGenerator);
|
|
6279
6340
|
|
|
6280
|
-
var $e1660f894c3a788a$var$_toConsumableArray2 = $gXNCa$babelruntimehelpersinteropRequireDefault($gXNCa$babelruntimehelperstoConsumableArray);
|
|
6281
|
-
|
|
6282
6341
|
var $e1660f894c3a788a$var$_typeof2 = $gXNCa$babelruntimehelpersinteropRequireDefault($gXNCa$babelruntimehelperstypeof);
|
|
6283
6342
|
|
|
6284
6343
|
var $e1660f894c3a788a$var$_objectWithoutProperties2 = $gXNCa$babelruntimehelpersinteropRequireDefault($gXNCa$babelruntimehelpersobjectWithoutProperties);
|
|
@@ -6312,6 +6371,68 @@ var $e1660f894c3a788a$var$_excluded = [
|
|
|
6312
6371
|
"key",
|
|
6313
6372
|
"typeCell"
|
|
6314
6373
|
];
|
|
6374
|
+
function $e1660f894c3a788a$var$_createForOfIteratorHelper(o, allowArrayLike) {
|
|
6375
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
6376
|
+
if (!it) {
|
|
6377
|
+
if (Array.isArray(o) || (it = $e1660f894c3a788a$var$_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
6378
|
+
if (it) o = it;
|
|
6379
|
+
var i = 0;
|
|
6380
|
+
var F = function F() {};
|
|
6381
|
+
return {
|
|
6382
|
+
s: F,
|
|
6383
|
+
n: function n() {
|
|
6384
|
+
if (i >= o.length) return {
|
|
6385
|
+
done: true
|
|
6386
|
+
};
|
|
6387
|
+
return {
|
|
6388
|
+
done: false,
|
|
6389
|
+
value: o[i++]
|
|
6390
|
+
};
|
|
6391
|
+
},
|
|
6392
|
+
e: function e(_e) {
|
|
6393
|
+
throw _e;
|
|
6394
|
+
},
|
|
6395
|
+
f: F
|
|
6396
|
+
};
|
|
6397
|
+
}
|
|
6398
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6399
|
+
}
|
|
6400
|
+
var normalCompletion = true, didErr = false, err;
|
|
6401
|
+
return {
|
|
6402
|
+
s: function s() {
|
|
6403
|
+
it = it.call(o);
|
|
6404
|
+
},
|
|
6405
|
+
n: function n() {
|
|
6406
|
+
var step = it.next();
|
|
6407
|
+
normalCompletion = step.done;
|
|
6408
|
+
return step;
|
|
6409
|
+
},
|
|
6410
|
+
e: function e(_e2) {
|
|
6411
|
+
didErr = true;
|
|
6412
|
+
err = _e2;
|
|
6413
|
+
},
|
|
6414
|
+
f: function f() {
|
|
6415
|
+
try {
|
|
6416
|
+
if (!normalCompletion && it["return"] != null) it["return"]();
|
|
6417
|
+
} finally{
|
|
6418
|
+
if (didErr) throw err;
|
|
6419
|
+
}
|
|
6420
|
+
}
|
|
6421
|
+
};
|
|
6422
|
+
}
|
|
6423
|
+
function $e1660f894c3a788a$var$_unsupportedIterableToArray(o, minLen) {
|
|
6424
|
+
if (!o) return;
|
|
6425
|
+
if (typeof o === "string") return $e1660f894c3a788a$var$_arrayLikeToArray(o, minLen);
|
|
6426
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
6427
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
6428
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
6429
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return $e1660f894c3a788a$var$_arrayLikeToArray(o, minLen);
|
|
6430
|
+
}
|
|
6431
|
+
function $e1660f894c3a788a$var$_arrayLikeToArray(arr, len) {
|
|
6432
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
6433
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
6434
|
+
return arr2;
|
|
6435
|
+
}
|
|
6315
6436
|
var $e1660f894c3a788a$var$CSV_FILE = {
|
|
6316
6437
|
type: "text/csv;charset=utf-8",
|
|
6317
6438
|
extension: ".csv"
|
|
@@ -6388,14 +6509,28 @@ var $e1660f894c3a788a$var$formatDataToCSV = function formatDataToCSV(row, column
|
|
|
6388
6509
|
].includes((0, $e1660f894c3a788a$var$_typeof2["default"])(result)) ? result : "";
|
|
6389
6510
|
};
|
|
6390
6511
|
module.exports.formatDataToCSV = $e1660f894c3a788a$var$formatDataToCSV;
|
|
6512
|
+
var $e1660f894c3a788a$var$defaultRowsFilter = function defaultRowsFilter(row) {
|
|
6513
|
+
return !row.secured;
|
|
6514
|
+
};
|
|
6391
6515
|
var $e1660f894c3a788a$var$parseDataRows = function parseDataRows(rows, columns) {
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6516
|
+
var exportOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
6517
|
+
var _exportOptions$rowsFi = exportOptions.rowsFilter, rowsFilter = _exportOptions$rowsFi === void 0 ? $e1660f894c3a788a$var$defaultRowsFilter : _exportOptions$rowsFi;
|
|
6518
|
+
var res = [];
|
|
6519
|
+
var _iterator = $e1660f894c3a788a$var$_createForOfIteratorHelper(rows), _step;
|
|
6520
|
+
try {
|
|
6521
|
+
var _loop = function _loop() {
|
|
6522
|
+
var row = _step.value;
|
|
6523
|
+
if (rowsFilter(row)) res.push(columns.map(function(column) {
|
|
6395
6524
|
return $e1660f894c3a788a$var$formatDataToCSV(row, column);
|
|
6396
|
-
})
|
|
6397
|
-
|
|
6398
|
-
|
|
6525
|
+
}));
|
|
6526
|
+
};
|
|
6527
|
+
for(_iterator.s(); !(_step = _iterator.n()).done;)_loop();
|
|
6528
|
+
} catch (err) {
|
|
6529
|
+
_iterator.e(err);
|
|
6530
|
+
} finally{
|
|
6531
|
+
_iterator.f();
|
|
6532
|
+
}
|
|
6533
|
+
return res;
|
|
6399
6534
|
};
|
|
6400
6535
|
module.exports.parseDataRows = $e1660f894c3a788a$var$parseDataRows;
|
|
6401
6536
|
var $e1660f894c3a788a$var$exportToCSV = function exportToCSV(csvData, fileName) {
|
|
@@ -9630,10 +9765,10 @@ function $62231dc23eb5e423$var$_interopRequireWildcard(obj, nodeInterop) {
|
|
|
9630
9765
|
if (cache) cache.set(obj, newObj);
|
|
9631
9766
|
return newObj;
|
|
9632
9767
|
}
|
|
9633
|
-
var $62231dc23eb5e423$var$Footer = /*#__PURE__*/ $62231dc23eb5e423$var$_react["default"].forwardRef(function(_ref, ref) {
|
|
9768
|
+
var $62231dc23eb5e423$var$Footer = /*#__PURE__*/ $62231dc23eb5e423$var$_react["default"].forwardRef(function Footer(_ref, ref) {
|
|
9634
9769
|
var _ref$current;
|
|
9635
9770
|
var modeEdit = _ref.modeEdit, displayableRows = _ref.displayableRows, domRef = _ref.domRef, rest = (0, $62231dc23eb5e423$var$_objectWithoutProperties2["default"])(_ref, $62231dc23eb5e423$var$_excluded);
|
|
9636
|
-
var _useConfig = (0, $ckVq7.useConfig)(), _useConfig$config = _useConfig.config, columns = _useConfig$config.columns, _useConfig$config$foo = _useConfig$config.footerStyle, footerStyle = _useConfig$config$foo === void 0 ? {} : _useConfig$config$foo;
|
|
9771
|
+
var _useConfig = (0, $ckVq7.useConfig)(), _useConfig$config = _useConfig.config, columns = _useConfig$config.columns, _useConfig$config$foo = _useConfig$config.footerStyle, footerStyle = _useConfig$config$foo === void 0 ? {} : _useConfig$config$foo, stylesProp = _useConfig$config.styles;
|
|
9637
9772
|
var _columns = (0, $62231dc23eb5e423$var$_react.useMemo)(function() {
|
|
9638
9773
|
var list = [];
|
|
9639
9774
|
for(var i = 0; i < columns.length; i++){
|
|
@@ -9642,7 +9777,7 @@ var $62231dc23eb5e423$var$Footer = /*#__PURE__*/ $62231dc23eb5e423$var$_react["d
|
|
|
9642
9777
|
});
|
|
9643
9778
|
var column = columns[i];
|
|
9644
9779
|
var _ref2 = column.footerProps || {}, colspan = _ref2.colspan;
|
|
9645
|
-
if (colspan && typeof colspan === "number" && colspan > 0 && i + colspan
|
|
9780
|
+
if (colspan && typeof colspan === "number" && colspan > 0 && i + colspan <= columns.length) {
|
|
9646
9781
|
for(var j = 1; j < colspan; j++)width += rest.columnWidth({
|
|
9647
9782
|
index: i + j
|
|
9648
9783
|
});
|
|
@@ -9660,26 +9795,35 @@ var $62231dc23eb5e423$var$Footer = /*#__PURE__*/ $62231dc23eb5e423$var$_react["d
|
|
|
9660
9795
|
}
|
|
9661
9796
|
return list;
|
|
9662
9797
|
}, [
|
|
9663
|
-
columns
|
|
9798
|
+
columns,
|
|
9799
|
+
rest.columnWidth
|
|
9664
9800
|
]);
|
|
9801
|
+
var containerCustomStyling = (0, $62231dc23eb5e423$var$_react.useMemo)(function() {
|
|
9802
|
+
var _stylesProp$footer, _stylesProp$footer$co;
|
|
9803
|
+
return stylesProp === null || stylesProp === void 0 ? void 0 : (_stylesProp$footer = stylesProp.footer) === null || _stylesProp$footer === void 0 ? void 0 : (_stylesProp$footer$co = _stylesProp$footer.container) === null || _stylesProp$footer$co === void 0 ? void 0 : _stylesProp$footer$co.call(_stylesProp$footer);
|
|
9804
|
+
}, []);
|
|
9665
9805
|
var styles = (0, $62231dc23eb5e423$var$_styles["default"])(footerStyle);
|
|
9666
9806
|
var _renderFooterCell = (0, $62231dc23eb5e423$var$_react.useCallback)(function(_ref3) {
|
|
9667
|
-
var
|
|
9807
|
+
var _stylesProp$footer2;
|
|
9808
|
+
var column = _ref3.column, key = _ref3.key, style = _ref3.style, classes = _ref3.classes, columnIndex = _ref3.columnIndex;
|
|
9668
9809
|
return /*#__PURE__*/ $62231dc23eb5e423$var$_react["default"].createElement($62231dc23eb5e423$var$_Cell["default"], {
|
|
9669
9810
|
column: column,
|
|
9670
9811
|
style: style,
|
|
9671
9812
|
key: key,
|
|
9672
9813
|
displayableRows: displayableRows,
|
|
9673
|
-
|
|
9814
|
+
columnIndex: columnIndex,
|
|
9815
|
+
classes: classes,
|
|
9816
|
+
footerCellStylesProp: stylesProp === null || stylesProp === void 0 ? void 0 : (_stylesProp$footer2 = stylesProp.footer) === null || _stylesProp$footer2 === void 0 ? void 0 : _stylesProp$footer2.cell
|
|
9674
9817
|
});
|
|
9675
9818
|
}, [
|
|
9676
9819
|
columns,
|
|
9677
9820
|
displayableRows
|
|
9678
9821
|
]);
|
|
9679
9822
|
return /*#__PURE__*/ $62231dc23eb5e423$var$_react["default"].createElement("div", {
|
|
9680
|
-
className: (0, $62231dc23eb5e423$var$_classnames["default"])(styles.gridContainer, styles.defaultStyle),
|
|
9823
|
+
className: (0, $62231dc23eb5e423$var$_classnames["default"])(styles.gridContainer, styles.defaultStyle, containerCustomStyling === null || containerCustomStyling === void 0 ? void 0 : containerCustomStyling.classes),
|
|
9681
9824
|
ref: domRef,
|
|
9682
|
-
"data-role": "footer"
|
|
9825
|
+
"data-role": "footer",
|
|
9826
|
+
style: containerCustomStyling === null || containerCustomStyling === void 0 ? void 0 : containerCustomStyling.style
|
|
9683
9827
|
}, modeEdit && /*#__PURE__*/ $62231dc23eb5e423$var$_react["default"].createElement("div", {
|
|
9684
9828
|
className: styles.footer_fakeCheckboxCell
|
|
9685
9829
|
}), /*#__PURE__*/ $62231dc23eb5e423$var$_react["default"].createElement("div", {
|
|
@@ -9762,6 +9906,7 @@ module.exports["default"] = $1b8a9f45f1071ae2$var$_default;
|
|
|
9762
9906
|
parcelRequire.register("k2N64", function(module, exports) {
|
|
9763
9907
|
"use strict";
|
|
9764
9908
|
|
|
9909
|
+
|
|
9765
9910
|
Object.defineProperty(module.exports, "__esModule", {
|
|
9766
9911
|
value: true
|
|
9767
9912
|
});
|
|
@@ -9769,7 +9914,7 @@ module.exports["default"] = void 0;
|
|
|
9769
9914
|
|
|
9770
9915
|
var $e97a142935cec5f5$var$_defineProperty2 = $gXNCa$babelruntimehelpersinteropRequireDefault($gXNCa$babelruntimehelpersdefineProperty);
|
|
9771
9916
|
|
|
9772
|
-
var $e97a142935cec5f5$var$_react = $
|
|
9917
|
+
var $e97a142935cec5f5$var$_react = $e97a142935cec5f5$var$_interopRequireWildcard($gXNCa$react);
|
|
9773
9918
|
|
|
9774
9919
|
var $e97a142935cec5f5$var$_classnames = $gXNCa$babelruntimehelpersinteropRequireDefault($gXNCa$classnames);
|
|
9775
9920
|
|
|
@@ -9784,6 +9929,32 @@ var $e97a142935cec5f5$var$_styles = $gXNCa$babelruntimehelpersinteropRequireDefa
|
|
|
9784
9929
|
var $gD8z6 = parcelRequire("gD8z6");
|
|
9785
9930
|
|
|
9786
9931
|
var $lDpO0 = parcelRequire("lDpO0");
|
|
9932
|
+
function $e97a142935cec5f5$var$_getRequireWildcardCache(nodeInterop) {
|
|
9933
|
+
if (typeof WeakMap !== "function") return null;
|
|
9934
|
+
var cacheBabelInterop = new WeakMap();
|
|
9935
|
+
var cacheNodeInterop = new WeakMap();
|
|
9936
|
+
return ($e97a142935cec5f5$var$_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
9937
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
9938
|
+
})(nodeInterop);
|
|
9939
|
+
}
|
|
9940
|
+
function $e97a142935cec5f5$var$_interopRequireWildcard(obj, nodeInterop) {
|
|
9941
|
+
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
9942
|
+
if (obj === null || $gXNCa$babelruntimehelperstypeof(obj) !== "object" && typeof obj !== "function") return {
|
|
9943
|
+
"default": obj
|
|
9944
|
+
};
|
|
9945
|
+
var cache = $e97a142935cec5f5$var$_getRequireWildcardCache(nodeInterop);
|
|
9946
|
+
if (cache && cache.has(obj)) return cache.get(obj);
|
|
9947
|
+
var newObj = {};
|
|
9948
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
9949
|
+
for(var key in obj)if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
9950
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
9951
|
+
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
9952
|
+
else newObj[key] = obj[key];
|
|
9953
|
+
}
|
|
9954
|
+
newObj["default"] = obj;
|
|
9955
|
+
if (cache) cache.set(obj, newObj);
|
|
9956
|
+
return newObj;
|
|
9957
|
+
}
|
|
9787
9958
|
function $e97a142935cec5f5$var$ownKeys(object, enumerableOnly) {
|
|
9788
9959
|
var keys = Object.keys(object);
|
|
9789
9960
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -9806,7 +9977,7 @@ function $e97a142935cec5f5$var$_objectSpread(target) {
|
|
|
9806
9977
|
return target;
|
|
9807
9978
|
}
|
|
9808
9979
|
var $e97a142935cec5f5$var$FooterCell = function FooterCell(_ref) {
|
|
9809
|
-
var column = _ref.column, style = _ref.style, displayableRows = _ref.displayableRows, classes = _ref.classes;
|
|
9980
|
+
var column = _ref.column, style = _ref.style, displayableRows = _ref.displayableRows, classes = _ref.classes, columnIndex = _ref.columnIndex, footerCellStylesProp = _ref.footerCellStylesProp;
|
|
9810
9981
|
var styles = (0, $e97a142935cec5f5$var$_styles["default"])();
|
|
9811
9982
|
var typeFooter = column.typeFooter, tooltipFooter = column.tooltipFooter, typeCell = column.typeCell, footerValue = column.footerValue, footerStyle = column.footerStyle, keyColumn = column.key, alignText = column.alignText, noFooter = column.noFooter;
|
|
9812
9983
|
var renderCustom = function renderCustom() {
|
|
@@ -9826,13 +9997,22 @@ var $e97a142935cec5f5$var$FooterCell = function FooterCell(_ref) {
|
|
|
9826
9997
|
}
|
|
9827
9998
|
};
|
|
9828
9999
|
var alignCell = (0, $gD8z6.defineCellAlign)(typeCell, alignText);
|
|
10000
|
+
var customStyling = (0, $e97a142935cec5f5$var$_react.useMemo)(function() {
|
|
10001
|
+
return footerCellStylesProp === null || footerCellStylesProp === void 0 ? void 0 : footerCellStylesProp({
|
|
10002
|
+
key: keyColumn,
|
|
10003
|
+
columnIndex: columnIndex
|
|
10004
|
+
});
|
|
10005
|
+
}, [
|
|
10006
|
+
keyColumn,
|
|
10007
|
+
columnIndex
|
|
10008
|
+
]);
|
|
9829
10009
|
var _render = function _render() {
|
|
9830
10010
|
return /*#__PURE__*/ $e97a142935cec5f5$var$_react["default"].createElement("div", {
|
|
9831
|
-
className: (0, $e97a142935cec5f5$var$_classnames["default"])(styles.cell, styles.footer, classes, (0, $e97a142935cec5f5$var$_defineProperty2["default"])({}, styles["align".concat((0, $e97a142935cec5f5$var$_upperFirst2["default"])(alignCell))], alignCell)),
|
|
10011
|
+
className: (0, $e97a142935cec5f5$var$_classnames["default"])(customStyling === null || customStyling === void 0 ? void 0 : customStyling.classes, styles.cell, styles.footer, classes, (0, $e97a142935cec5f5$var$_defineProperty2["default"])({}, styles["align".concat((0, $e97a142935cec5f5$var$_upperFirst2["default"])(alignCell))], alignCell)),
|
|
9832
10012
|
"data-role": "cell",
|
|
9833
10013
|
"data-column-key": keyColumn,
|
|
9834
10014
|
key: keyColumn,
|
|
9835
|
-
style: $e97a142935cec5f5$var$_objectSpread($e97a142935cec5f5$var$_objectSpread({}, footerStyle), style)
|
|
10015
|
+
style: $e97a142935cec5f5$var$_objectSpread($e97a142935cec5f5$var$_objectSpread($e97a142935cec5f5$var$_objectSpread({}, footerStyle), style), customStyling === null || customStyling === void 0 ? void 0 : customStyling.style)
|
|
9836
10016
|
}, /*#__PURE__*/ $e97a142935cec5f5$var$_react["default"].createElement("div", {
|
|
9837
10017
|
className: (0, $e97a142935cec5f5$var$_classnames["default"])(styles.footerCell)
|
|
9838
10018
|
}, footerValue ? renderCustom() : _getValue()));
|
|
@@ -10069,7 +10249,7 @@ var $e7517de803644e56$var$Header = /*#__PURE__*/ $e7517de803644e56$var$_react["d
|
|
|
10069
10249
|
var displayableRows = _ref.displayableRows, wrapHeaderText = _ref.wrapHeaderText, _tableKeyName = _ref.tableKeyName, order = _ref.order, orderDirection = _ref.orderDirection, onOrderChange = _ref.onOrderChange, domRef = _ref.domRef, rest = (0, $e7517de803644e56$var$_objectWithoutProperties2["default"])(_ref, $e7517de803644e56$var$_excluded);
|
|
10070
10250
|
var CHECKBOX_COLUMN = "checkboxColumn";
|
|
10071
10251
|
var styles = (0, $e7517de803644e56$var$_styles["default"])();
|
|
10072
|
-
var _useConfig = (0, $ckVq7.useConfig)(), _useConfig$config = _useConfig.config, columns = _useConfig$config.columns, _useConfig$config$has = _useConfig$config.hasCheckBoxHidden, hasCheckBoxHidden = _useConfig$config$has === void 0 ? false : _useConfig$config$has, _useConfig$config$has2 = _useConfig$config.hasSecureSociety, hasSecureSociety = _useConfig$config$has2 === void 0 ? false : _useConfig$config$has2, openSocieties = _useConfig$config.openSocieties, _useConfig$config$sel = _useConfig$config.selectableOnlyOneRow, selectableOnlyOneRow = _useConfig$config$sel === void 0 ? false : _useConfig$config$sel, _useConfig$config$sel2 = _useConfig$config.selectableRowKey, selectableRowKey = _useConfig$config$sel2 === void 0 ? "id" : _useConfig$config$sel2, _useConfig$config$wit = _useConfig$config.withBorders, withBorders = _useConfig$config$wit === void 0 ? false : _useConfig$config$wit;
|
|
10252
|
+
var _useConfig = (0, $ckVq7.useConfig)(), _useConfig$config = _useConfig.config, columns = _useConfig$config.columns, _useConfig$config$has = _useConfig$config.hasCheckBoxHidden, hasCheckBoxHidden = _useConfig$config$has === void 0 ? false : _useConfig$config$has, _useConfig$config$has2 = _useConfig$config.hasSecureSociety, hasSecureSociety = _useConfig$config$has2 === void 0 ? false : _useConfig$config$has2, openSocieties = _useConfig$config.openSocieties, _useConfig$config$sel = _useConfig$config.selectableOnlyOneRow, selectableOnlyOneRow = _useConfig$config$sel === void 0 ? false : _useConfig$config$sel, _useConfig$config$sel2 = _useConfig$config.selectableRowKey, selectableRowKey = _useConfig$config$sel2 === void 0 ? "id" : _useConfig$config$sel2, _useConfig$config$wit = _useConfig$config.withBorders, withBorders = _useConfig$config$wit === void 0 ? false : _useConfig$config$wit, stylesProp = _useConfig$config.styles;
|
|
10073
10253
|
var isAllCheckedColumn = function isAllCheckedColumn(key, rows) {
|
|
10074
10254
|
var _iterator = $e7517de803644e56$var$_createForOfIteratorHelper(rows), _step;
|
|
10075
10255
|
try {
|
|
@@ -10086,6 +10266,10 @@ var $e7517de803644e56$var$Header = /*#__PURE__*/ $e7517de803644e56$var$_react["d
|
|
|
10086
10266
|
};
|
|
10087
10267
|
var apiRef = (0, $4IFzq.useApiRef)();
|
|
10088
10268
|
var selectedRows = (0, $9E7Hm.useSelector)(apiRef, $lRxmh.selectedRowsSelector);
|
|
10269
|
+
var containerCustomStyling = (0, $e7517de803644e56$var$_react.useMemo)(function() {
|
|
10270
|
+
var _stylesProp$header, _stylesProp$header$co;
|
|
10271
|
+
return stylesProp === null || stylesProp === void 0 ? void 0 : (_stylesProp$header = stylesProp.header) === null || _stylesProp$header === void 0 ? void 0 : (_stylesProp$header$co = _stylesProp$header.container) === null || _stylesProp$header$co === void 0 ? void 0 : _stylesProp$header$co.call(_stylesProp$header);
|
|
10272
|
+
}, []);
|
|
10089
10273
|
var allSelectableKey = (0, $e7517de803644e56$var$_react.useMemo)(function() {
|
|
10090
10274
|
return (0, $idhBf.getSelectableRows)({
|
|
10091
10275
|
displayableRows: displayableRows,
|
|
@@ -10131,6 +10315,7 @@ var $e7517de803644e56$var$Header = /*#__PURE__*/ $e7517de803644e56$var$_react["d
|
|
|
10131
10315
|
withBorders
|
|
10132
10316
|
]);
|
|
10133
10317
|
var _renderHeaderCellDispatch = function _renderHeaderCellDispatch(params) {
|
|
10318
|
+
var _stylesProp$header2;
|
|
10134
10319
|
var columnIndex = params.columnIndex;
|
|
10135
10320
|
var keyColumn = columns[columnIndex].key;
|
|
10136
10321
|
if (keyColumn === CHECKBOX_COLUMN) return _renderHeaderCheckBoxCell(params);
|
|
@@ -10140,7 +10325,8 @@ var $e7517de803644e56$var$Header = /*#__PURE__*/ $e7517de803644e56$var$_react["d
|
|
|
10140
10325
|
onOrderChange: onOrderChange,
|
|
10141
10326
|
isAllCheckedColumn: isAllCheckedColumn,
|
|
10142
10327
|
displayableRows: displayableRows,
|
|
10143
|
-
allSelectableKey: allSelectableKey
|
|
10328
|
+
allSelectableKey: allSelectableKey,
|
|
10329
|
+
headerCellStylesProp: stylesProp === null || stylesProp === void 0 ? void 0 : (_stylesProp$header2 = stylesProp.header) === null || _stylesProp$header2 === void 0 ? void 0 : _stylesProp$header2.cell
|
|
10144
10330
|
};
|
|
10145
10331
|
return /*#__PURE__*/ $e7517de803644e56$var$_react["default"].createElement($e7517de803644e56$var$_Cell["default"], (0, $e7517de803644e56$var$_extends2["default"])({
|
|
10146
10332
|
column: columns[columnIndex],
|
|
@@ -10148,9 +10334,10 @@ var $e7517de803644e56$var$Header = /*#__PURE__*/ $e7517de803644e56$var$_react["d
|
|
|
10148
10334
|
}, params, otherProps));
|
|
10149
10335
|
};
|
|
10150
10336
|
return /*#__PURE__*/ $e7517de803644e56$var$_react["default"].createElement("div", {
|
|
10151
|
-
className: styles.gridContainer,
|
|
10337
|
+
className: (0, $e7517de803644e56$var$_classnames["default"])(containerCustomStyling === null || containerCustomStyling === void 0 ? void 0 : containerCustomStyling.classes, styles.gridContainer),
|
|
10152
10338
|
ref: domRef,
|
|
10153
|
-
"data-role": "header"
|
|
10339
|
+
"data-role": "header",
|
|
10340
|
+
style: containerCustomStyling === null || containerCustomStyling === void 0 ? void 0 : containerCustomStyling.style
|
|
10154
10341
|
}, /*#__PURE__*/ $e7517de803644e56$var$_react["default"].createElement("div", {
|
|
10155
10342
|
ref: ref,
|
|
10156
10343
|
"data-role": "row",
|
|
@@ -10180,6 +10367,7 @@ module.exports["default"] = $e7517de803644e56$var$_default;
|
|
|
10180
10367
|
parcelRequire.register("a1X1i", function(module, exports) {
|
|
10181
10368
|
"use strict";
|
|
10182
10369
|
|
|
10370
|
+
|
|
10183
10371
|
Object.defineProperty(module.exports, "__esModule", {
|
|
10184
10372
|
value: true
|
|
10185
10373
|
});
|
|
@@ -10192,7 +10380,7 @@ var $74d7c783859244b3$var$_classnames = $gXNCa$babelruntimehelpersinteropRequire
|
|
|
10192
10380
|
|
|
10193
10381
|
var $74d7c783859244b3$var$_upperFirst2 = $gXNCa$babelruntimehelpersinteropRequireDefault($gXNCa$lodashupperFirst);
|
|
10194
10382
|
|
|
10195
|
-
var $74d7c783859244b3$var$_react = $
|
|
10383
|
+
var $74d7c783859244b3$var$_react = $74d7c783859244b3$var$_interopRequireWildcard($gXNCa$react);
|
|
10196
10384
|
|
|
10197
10385
|
var $gD8z6 = parcelRequire("gD8z6");
|
|
10198
10386
|
|
|
@@ -10205,18 +10393,72 @@ var $74d7c783859244b3$var$_Checkbox = $gXNCa$babelruntimehelpersinteropRequireDe
|
|
|
10205
10393
|
var $74d7c783859244b3$var$_Sortable = $gXNCa$babelruntimehelpersinteropRequireDefault((parcelRequire("l4kT6")));
|
|
10206
10394
|
|
|
10207
10395
|
var $74d7c783859244b3$var$_styles = $gXNCa$babelruntimehelpersinteropRequireDefault((parcelRequire("jDuSq")));
|
|
10396
|
+
function $74d7c783859244b3$var$_getRequireWildcardCache(nodeInterop) {
|
|
10397
|
+
if (typeof WeakMap !== "function") return null;
|
|
10398
|
+
var cacheBabelInterop = new WeakMap();
|
|
10399
|
+
var cacheNodeInterop = new WeakMap();
|
|
10400
|
+
return ($74d7c783859244b3$var$_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
|
|
10401
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
10402
|
+
})(nodeInterop);
|
|
10403
|
+
}
|
|
10404
|
+
function $74d7c783859244b3$var$_interopRequireWildcard(obj, nodeInterop) {
|
|
10405
|
+
if (!nodeInterop && obj && obj.__esModule) return obj;
|
|
10406
|
+
if (obj === null || $gXNCa$babelruntimehelperstypeof(obj) !== "object" && typeof obj !== "function") return {
|
|
10407
|
+
"default": obj
|
|
10408
|
+
};
|
|
10409
|
+
var cache = $74d7c783859244b3$var$_getRequireWildcardCache(nodeInterop);
|
|
10410
|
+
if (cache && cache.has(obj)) return cache.get(obj);
|
|
10411
|
+
var newObj = {};
|
|
10412
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
10413
|
+
for(var key in obj)if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
10414
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
10415
|
+
if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);
|
|
10416
|
+
else newObj[key] = obj[key];
|
|
10417
|
+
}
|
|
10418
|
+
newObj["default"] = obj;
|
|
10419
|
+
if (cache) cache.set(obj, newObj);
|
|
10420
|
+
return newObj;
|
|
10421
|
+
}
|
|
10422
|
+
function $74d7c783859244b3$var$ownKeys(object, enumerableOnly) {
|
|
10423
|
+
var keys = Object.keys(object);
|
|
10424
|
+
if (Object.getOwnPropertySymbols) {
|
|
10425
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
10426
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
10427
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
10428
|
+
})), keys.push.apply(keys, symbols);
|
|
10429
|
+
}
|
|
10430
|
+
return keys;
|
|
10431
|
+
}
|
|
10432
|
+
function $74d7c783859244b3$var$_objectSpread(target) {
|
|
10433
|
+
for(var i = 1; i < arguments.length; i++){
|
|
10434
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
10435
|
+
i % 2 ? $74d7c783859244b3$var$ownKeys(Object(source), !0).forEach(function(key) {
|
|
10436
|
+
(0, $74d7c783859244b3$var$_defineProperty2["default"])(target, key, source[key]);
|
|
10437
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : $74d7c783859244b3$var$ownKeys(Object(source)).forEach(function(key) {
|
|
10438
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
10439
|
+
});
|
|
10440
|
+
}
|
|
10441
|
+
return target;
|
|
10442
|
+
}
|
|
10208
10443
|
var $74d7c783859244b3$var$HeaderCell = function HeaderCell(_ref) {
|
|
10209
|
-
var allSelectableKey = _ref.allSelectableKey, column = _ref.column, columnIndex = _ref.columnIndex, style = _ref.style, withBorders = _ref.withBorders, wrapHeaderText = _ref.wrapHeaderText, order = _ref.order, orderDirection = _ref.orderDirection, onOrderChange = _ref.onOrderChange, isAllCheckedColumn = _ref.isAllCheckedColumn, displayableRows = _ref.displayableRows;
|
|
10444
|
+
var allSelectableKey = _ref.allSelectableKey, column = _ref.column, columnIndex = _ref.columnIndex, style = _ref.style, headerCellStylesProp = _ref.headerCellStylesProp, withBorders = _ref.withBorders, wrapHeaderText = _ref.wrapHeaderText, order = _ref.order, orderDirection = _ref.orderDirection, onOrderChange = _ref.onOrderChange, isAllCheckedColumn = _ref.isAllCheckedColumn, displayableRows = _ref.displayableRows;
|
|
10210
10445
|
var header = column.header, keyColumn = column.key, tooltipHeader = column.tooltipHeader, typeCell = column.typeCell, _column$headerOnClick = column.headerOnClick, headerOnClick = _column$headerOnClick === void 0 ? function() {} : _column$headerOnClick, _column$selectAll = column.selectAll, selectAll = _column$selectAll === void 0 ? false : _column$selectAll, _column$variant = column.variant, variant = _column$variant === void 0 ? "primary" : _column$variant, changeOtherColumnOnClick = column.changeOtherColumnOnClick, alignText = column.alignText, sortable = column.sortable;
|
|
10211
10446
|
var _useConfig = (0, $ckVq7.useConfig)(), send = _useConfig.send, _useConfig$config$sel = _useConfig.config.selectableRowKey, selectableRowKey = _useConfig$config$sel === void 0 ? "id" : _useConfig$config$sel;
|
|
10212
10447
|
var styles = (0, $74d7c783859244b3$var$_styles["default"])();
|
|
10213
10448
|
var alignCell = (0, $gD8z6.defineCellAlign)(typeCell, alignText);
|
|
10449
|
+
var customStyling = (0, $74d7c783859244b3$var$_react.useMemo)(function() {
|
|
10450
|
+
return headerCellStylesProp === null || headerCellStylesProp === void 0 ? void 0 : headerCellStylesProp({
|
|
10451
|
+
columnIndex: columnIndex
|
|
10452
|
+
});
|
|
10453
|
+
}, [
|
|
10454
|
+
columnIndex
|
|
10455
|
+
]);
|
|
10214
10456
|
var render = function render() {
|
|
10215
10457
|
var _cx;
|
|
10216
10458
|
return /*#__PURE__*/ $74d7c783859244b3$var$_react["default"].createElement("div", {
|
|
10217
|
-
className: (0, $74d7c783859244b3$var$_classnames["default"])(styles.cell, (_cx = {}, (0, $74d7c783859244b3$var$_defineProperty2["default"])(_cx, styles["align".concat((0, $74d7c783859244b3$var$_upperFirst2["default"])(alignCell))], alignCell), (0, $74d7c783859244b3$var$_defineProperty2["default"])(_cx, styles.hasSelectAll, selectAll), (0, $74d7c783859244b3$var$_defineProperty2["default"])(_cx, styles.withGrid, withBorders), _cx)),
|
|
10459
|
+
className: (0, $74d7c783859244b3$var$_classnames["default"])(customStyling === null || customStyling === void 0 ? void 0 : customStyling.classes, styles.cell, (_cx = {}, (0, $74d7c783859244b3$var$_defineProperty2["default"])(_cx, styles["align".concat((0, $74d7c783859244b3$var$_upperFirst2["default"])(alignCell))], alignCell), (0, $74d7c783859244b3$var$_defineProperty2["default"])(_cx, styles.hasSelectAll, selectAll), (0, $74d7c783859244b3$var$_defineProperty2["default"])(_cx, styles.withGrid, withBorders), _cx)),
|
|
10218
10460
|
key: keyColumn,
|
|
10219
|
-
style: style,
|
|
10461
|
+
style: $74d7c783859244b3$var$_objectSpread($74d7c783859244b3$var$_objectSpread({}, style), customStyling === null || customStyling === void 0 ? void 0 : customStyling.style),
|
|
10220
10462
|
onClick: headerOnClick,
|
|
10221
10463
|
"data-role": "cell",
|
|
10222
10464
|
"data-column-key": keyColumn
|