@teselagen/ui 0.3.35 → 0.3.36
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/index.cjs.js +2020 -1613
- package/index.es.js +2020 -1613
- package/package.json +1 -2
- package/src/DataTable/SortableColumns.js +8 -1
- package/src/DataTable/style.css +7 -3
- package/src/autoTooltip.js +2 -1
- package/style.css +8 -4
package/index.cjs.js
CHANGED
|
@@ -3020,11 +3020,11 @@ let clearMe;
|
|
|
3020
3020
|
dataAvoid,
|
|
3021
3021
|
dataAvoidBackup
|
|
3022
3022
|
};
|
|
3023
|
-
if (dataTip) {
|
|
3023
|
+
if (dataTip && !document.body.classList.contains("drag-active")) {
|
|
3024
3024
|
inner(dataTip, el, opts);
|
|
3025
3025
|
break;
|
|
3026
3026
|
} else if (isEllipsized && el.offsetWidth < el.scrollWidth - 4 && //the -4 is adding a teeny bit of tolerance to fix issues with the column headers getting tooltips even when fully visible
|
|
3027
|
-
!el.classList.contains("no-data-tip") && el.textContent && ((_b = (_a2 = el.textContent) == null ? void 0 : _a2.trim) == null ? void 0 : _b.call(_a2).length) !== 0) {
|
|
3027
|
+
!el.classList.contains("no-data-tip") && !document.body.classList.contains("drag-active") && el.textContent && ((_b = (_a2 = el.textContent) == null ? void 0 : _a2.trim) == null ? void 0 : _b.call(_a2).length) !== 0) {
|
|
3028
3028
|
inner(el.textContent, el, opts);
|
|
3029
3029
|
break;
|
|
3030
3030
|
} else if (isEllipsized && el.offsetWidth >= el.scrollWidth)
|
|
@@ -4960,7 +4960,7 @@ function _objectSpread$3(target) {
|
|
|
4960
4960
|
for (var i = 1; i < arguments.length; i++) {
|
|
4961
4961
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
4962
4962
|
i % 2 ? ownKeys$5(Object(source), true).forEach(function(key) {
|
|
4963
|
-
_defineProperty$
|
|
4963
|
+
_defineProperty$9(target, key, source[key]);
|
|
4964
4964
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$5(Object(source)).forEach(function(key) {
|
|
4965
4965
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4966
4966
|
});
|
|
@@ -4968,7 +4968,7 @@ function _objectSpread$3(target) {
|
|
|
4968
4968
|
return target;
|
|
4969
4969
|
}
|
|
4970
4970
|
__name(_objectSpread$3, "_objectSpread$3");
|
|
4971
|
-
function _defineProperty$
|
|
4971
|
+
function _defineProperty$9(obj, key, value) {
|
|
4972
4972
|
if (key in obj) {
|
|
4973
4973
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
4974
4974
|
} else {
|
|
@@ -4976,11 +4976,11 @@ function _defineProperty$8(obj, key, value) {
|
|
|
4976
4976
|
}
|
|
4977
4977
|
return obj;
|
|
4978
4978
|
}
|
|
4979
|
-
__name(_defineProperty$
|
|
4980
|
-
function _slicedToArray$
|
|
4979
|
+
__name(_defineProperty$9, "_defineProperty$9");
|
|
4980
|
+
function _slicedToArray$6(arr, i) {
|
|
4981
4981
|
return _arrayWithHoles$4(arr) || _iterableToArrayLimit$4(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$4();
|
|
4982
4982
|
}
|
|
4983
|
-
__name(_slicedToArray$
|
|
4983
|
+
__name(_slicedToArray$6, "_slicedToArray$6");
|
|
4984
4984
|
function _nonIterableRest$4() {
|
|
4985
4985
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4986
4986
|
}
|
|
@@ -5100,8 +5100,8 @@ function allFilesAccepted(_ref) {
|
|
|
5100
5100
|
return false;
|
|
5101
5101
|
}
|
|
5102
5102
|
return files.every(function(file) {
|
|
5103
|
-
var _fileAccepted = fileAccepted(file, accept), _fileAccepted2 = _slicedToArray$
|
|
5104
|
-
var _fileMatchSize = fileMatchSize(file, minSize, maxSize), _fileMatchSize2 = _slicedToArray$
|
|
5103
|
+
var _fileAccepted = fileAccepted(file, accept), _fileAccepted2 = _slicedToArray$6(_fileAccepted, 1), accepted = _fileAccepted2[0];
|
|
5104
|
+
var _fileMatchSize = fileMatchSize(file, minSize, maxSize), _fileMatchSize2 = _slicedToArray$6(_fileMatchSize, 1), sizeMatch = _fileMatchSize2[0];
|
|
5105
5105
|
return accepted && sizeMatch;
|
|
5106
5106
|
});
|
|
5107
5107
|
}
|
|
@@ -5170,16 +5170,16 @@ function filePickerOptionsTypes(accept) {
|
|
|
5170
5170
|
accept: Array.isArray(accept) ? accept.filter(function(item) {
|
|
5171
5171
|
return item === "audio/*" || item === "video/*" || item === "image/*" || item === "text/*" || /\w+\/[-+.\w]+/g.test(item);
|
|
5172
5172
|
}).reduce(function(a2, b2) {
|
|
5173
|
-
return _objectSpread$3(_objectSpread$3({}, a2), {}, _defineProperty$
|
|
5173
|
+
return _objectSpread$3(_objectSpread$3({}, a2), {}, _defineProperty$9({}, b2, []));
|
|
5174
5174
|
}, {}) : {}
|
|
5175
5175
|
}];
|
|
5176
5176
|
}
|
|
5177
5177
|
__name(filePickerOptionsTypes, "filePickerOptionsTypes");
|
|
5178
5178
|
var _excluded$1 = ["children"], _excluded2 = ["open"], _excluded3 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], _excluded4 = ["refKey", "onChange", "onClick"];
|
|
5179
|
-
function _toConsumableArray(arr) {
|
|
5179
|
+
function _toConsumableArray$1(arr) {
|
|
5180
5180
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$9(arr) || _nonIterableSpread();
|
|
5181
5181
|
}
|
|
5182
|
-
__name(_toConsumableArray, "_toConsumableArray");
|
|
5182
|
+
__name(_toConsumableArray$1, "_toConsumableArray$1");
|
|
5183
5183
|
function _nonIterableSpread() {
|
|
5184
5184
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5185
5185
|
}
|
|
@@ -5194,10 +5194,10 @@ function _arrayWithoutHoles(arr) {
|
|
|
5194
5194
|
return _arrayLikeToArray$9(arr);
|
|
5195
5195
|
}
|
|
5196
5196
|
__name(_arrayWithoutHoles, "_arrayWithoutHoles");
|
|
5197
|
-
function _slicedToArray$
|
|
5197
|
+
function _slicedToArray$5(arr, i) {
|
|
5198
5198
|
return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$9(arr, i) || _nonIterableRest$3();
|
|
5199
5199
|
}
|
|
5200
|
-
__name(_slicedToArray$
|
|
5200
|
+
__name(_slicedToArray$5, "_slicedToArray$5");
|
|
5201
5201
|
function _nonIterableRest$3() {
|
|
5202
5202
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5203
5203
|
}
|
|
@@ -5274,7 +5274,7 @@ function _objectSpread$2(target) {
|
|
|
5274
5274
|
for (var i = 1; i < arguments.length; i++) {
|
|
5275
5275
|
var source = null != arguments[i] ? arguments[i] : {};
|
|
5276
5276
|
i % 2 ? ownKeys$4(Object(source), true).forEach(function(key) {
|
|
5277
|
-
_defineProperty$
|
|
5277
|
+
_defineProperty$8(target, key, source[key]);
|
|
5278
5278
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$4(Object(source)).forEach(function(key) {
|
|
5279
5279
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
5280
5280
|
});
|
|
@@ -5282,7 +5282,7 @@ function _objectSpread$2(target) {
|
|
|
5282
5282
|
return target;
|
|
5283
5283
|
}
|
|
5284
5284
|
__name(_objectSpread$2, "_objectSpread$2");
|
|
5285
|
-
function _defineProperty$
|
|
5285
|
+
function _defineProperty$8(obj, key, value) {
|
|
5286
5286
|
if (key in obj) {
|
|
5287
5287
|
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
5288
5288
|
} else {
|
|
@@ -5290,8 +5290,8 @@ function _defineProperty$7(obj, key, value) {
|
|
|
5290
5290
|
}
|
|
5291
5291
|
return obj;
|
|
5292
5292
|
}
|
|
5293
|
-
__name(_defineProperty$
|
|
5294
|
-
function _objectWithoutProperties$
|
|
5293
|
+
__name(_defineProperty$8, "_defineProperty$8");
|
|
5294
|
+
function _objectWithoutProperties$7(source, excluded) {
|
|
5295
5295
|
if (source == null)
|
|
5296
5296
|
return {};
|
|
5297
5297
|
var target = _objectWithoutPropertiesLoose$2(source, excluded);
|
|
@@ -5309,7 +5309,7 @@ function _objectWithoutProperties$5(source, excluded) {
|
|
|
5309
5309
|
}
|
|
5310
5310
|
return target;
|
|
5311
5311
|
}
|
|
5312
|
-
__name(_objectWithoutProperties$
|
|
5312
|
+
__name(_objectWithoutProperties$7, "_objectWithoutProperties$7");
|
|
5313
5313
|
function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
5314
5314
|
if (source == null)
|
|
5315
5315
|
return {};
|
|
@@ -5326,8 +5326,8 @@ function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
|
5326
5326
|
}
|
|
5327
5327
|
__name(_objectWithoutPropertiesLoose$2, "_objectWithoutPropertiesLoose$2");
|
|
5328
5328
|
var Dropzone = /* @__PURE__ */ React$1.forwardRef(function(_ref, ref) {
|
|
5329
|
-
var children = _ref.children, params = _objectWithoutProperties$
|
|
5330
|
-
var _useDropzone = useDropzone(params), open2 = _useDropzone.open, props = _objectWithoutProperties$
|
|
5329
|
+
var children = _ref.children, params = _objectWithoutProperties$7(_ref, _excluded$1);
|
|
5330
|
+
var _useDropzone = useDropzone(params), open2 = _useDropzone.open, props = _objectWithoutProperties$7(_useDropzone, _excluded2);
|
|
5331
5331
|
React$1.useImperativeHandle(ref, function() {
|
|
5332
5332
|
return {
|
|
5333
5333
|
open: open2
|
|
@@ -5536,7 +5536,7 @@ function useDropzone() {
|
|
|
5536
5536
|
}, [onFileDialogCancel]);
|
|
5537
5537
|
var rootRef = React$1.useRef(null);
|
|
5538
5538
|
var inputRef = React$1.useRef(null);
|
|
5539
|
-
var _useReducer = React$1.useReducer(reducer, initialState), _useReducer2 = _slicedToArray$
|
|
5539
|
+
var _useReducer = React$1.useReducer(reducer, initialState), _useReducer2 = _slicedToArray$5(_useReducer, 2), state = _useReducer2[0], dispatch = _useReducer2[1];
|
|
5540
5540
|
var isFocused = state.isFocused, isFileDialogActive = state.isFileDialogActive, draggedFiles = state.draggedFiles;
|
|
5541
5541
|
var onWindowFocus = /* @__PURE__ */ __name(function onWindowFocus2() {
|
|
5542
5542
|
if (isFileDialogActive) {
|
|
@@ -5587,7 +5587,7 @@ function useDropzone() {
|
|
|
5587
5587
|
event.preventDefault();
|
|
5588
5588
|
event.persist();
|
|
5589
5589
|
stopPropagation(event);
|
|
5590
|
-
dragTargetsRef.current = [].concat(_toConsumableArray(dragTargetsRef.current), [event.target]);
|
|
5590
|
+
dragTargetsRef.current = [].concat(_toConsumableArray$1(dragTargetsRef.current), [event.target]);
|
|
5591
5591
|
if (isEvtWithFiles(event)) {
|
|
5592
5592
|
Promise.resolve(getFilesFromEvent(event)).then(function(draggedFiles2) {
|
|
5593
5593
|
if (isPropagationStopped(event) && !noDragEventsBubbling) {
|
|
@@ -5648,8 +5648,8 @@ function useDropzone() {
|
|
|
5648
5648
|
var acceptedFiles = [];
|
|
5649
5649
|
var fileRejections = [];
|
|
5650
5650
|
files.forEach(function(file) {
|
|
5651
|
-
var _fileAccepted = fileAccepted(file, accept), _fileAccepted2 = _slicedToArray$
|
|
5652
|
-
var _fileMatchSize = fileMatchSize(file, minSize, maxSize), _fileMatchSize2 = _slicedToArray$
|
|
5651
|
+
var _fileAccepted = fileAccepted(file, accept), _fileAccepted2 = _slicedToArray$5(_fileAccepted, 2), accepted = _fileAccepted2[0], acceptError = _fileAccepted2[1];
|
|
5652
|
+
var _fileMatchSize = fileMatchSize(file, minSize, maxSize), _fileMatchSize2 = _slicedToArray$5(_fileMatchSize, 2), sizeMatch = _fileMatchSize2[0], sizeError = _fileMatchSize2[1];
|
|
5653
5653
|
var customErrors = validator2 ? validator2(file) : null;
|
|
5654
5654
|
if (accepted && sizeMatch && !customErrors) {
|
|
5655
5655
|
acceptedFiles.push(file);
|
|
@@ -5784,8 +5784,8 @@ function useDropzone() {
|
|
|
5784
5784
|
}, "stopPropagation");
|
|
5785
5785
|
var getRootProps = React$1.useMemo(function() {
|
|
5786
5786
|
return function() {
|
|
5787
|
-
var _ref2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref2$refKey = _ref2.refKey, refKey = _ref2$refKey === void 0 ? "ref" : _ref2$refKey, role = _ref2.role, onKeyDown = _ref2.onKeyDown, onFocus = _ref2.onFocus, onBlur = _ref2.onBlur, onClick = _ref2.onClick, onDragEnter2 = _ref2.onDragEnter, onDragOver2 = _ref2.onDragOver, onDragLeave2 = _ref2.onDragLeave, onDrop2 = _ref2.onDrop, rest = _objectWithoutProperties$
|
|
5788
|
-
return _objectSpread$2(_objectSpread$2(_defineProperty$
|
|
5787
|
+
var _ref2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref2$refKey = _ref2.refKey, refKey = _ref2$refKey === void 0 ? "ref" : _ref2$refKey, role = _ref2.role, onKeyDown = _ref2.onKeyDown, onFocus = _ref2.onFocus, onBlur = _ref2.onBlur, onClick = _ref2.onClick, onDragEnter2 = _ref2.onDragEnter, onDragOver2 = _ref2.onDragOver, onDragLeave2 = _ref2.onDragLeave, onDrop2 = _ref2.onDrop, rest = _objectWithoutProperties$7(_ref2, _excluded3);
|
|
5788
|
+
return _objectSpread$2(_objectSpread$2(_defineProperty$8({
|
|
5789
5789
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
5790
5790
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
5791
5791
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -5805,8 +5805,8 @@ function useDropzone() {
|
|
|
5805
5805
|
}, []);
|
|
5806
5806
|
var getInputProps = React$1.useMemo(function() {
|
|
5807
5807
|
return function() {
|
|
5808
|
-
var _ref3 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref3$refKey = _ref3.refKey, refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey, onChange = _ref3.onChange, onClick = _ref3.onClick, rest = _objectWithoutProperties$
|
|
5809
|
-
var inputProps = _defineProperty$
|
|
5808
|
+
var _ref3 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref3$refKey = _ref3.refKey, refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey, onChange = _ref3.onChange, onClick = _ref3.onClick, rest = _objectWithoutProperties$7(_ref3, _excluded4);
|
|
5809
|
+
var inputProps = _defineProperty$8({
|
|
5810
5810
|
accept,
|
|
5811
5811
|
multiple,
|
|
5812
5812
|
type: "file",
|
|
@@ -6840,7 +6840,7 @@ function _defineProperties$1(target, props) {
|
|
|
6840
6840
|
}
|
|
6841
6841
|
}
|
|
6842
6842
|
__name(_defineProperties$1, "_defineProperties$1");
|
|
6843
|
-
function _createClass$
|
|
6843
|
+
function _createClass$d(Constructor, protoProps, staticProps) {
|
|
6844
6844
|
if (protoProps)
|
|
6845
6845
|
_defineProperties$1(Constructor.prototype, protoProps);
|
|
6846
6846
|
if (staticProps)
|
|
@@ -6850,9 +6850,9 @@ function _createClass$9(Constructor, protoProps, staticProps) {
|
|
|
6850
6850
|
});
|
|
6851
6851
|
return Constructor;
|
|
6852
6852
|
}
|
|
6853
|
-
__name(_createClass$
|
|
6854
|
-
function _extends$
|
|
6855
|
-
_extends$
|
|
6853
|
+
__name(_createClass$d, "_createClass$d");
|
|
6854
|
+
function _extends$o() {
|
|
6855
|
+
_extends$o = Object.assign ? Object.assign.bind() : function(target) {
|
|
6856
6856
|
for (var i = 1; i < arguments.length; i++) {
|
|
6857
6857
|
var source = arguments[i];
|
|
6858
6858
|
for (var key in source) {
|
|
@@ -6863,9 +6863,9 @@ function _extends$j() {
|
|
|
6863
6863
|
}
|
|
6864
6864
|
return target;
|
|
6865
6865
|
};
|
|
6866
|
-
return _extends$
|
|
6866
|
+
return _extends$o.apply(this, arguments);
|
|
6867
6867
|
}
|
|
6868
|
-
__name(_extends$
|
|
6868
|
+
__name(_extends$o, "_extends$o");
|
|
6869
6869
|
function _inheritsLoose$2(subClass, superClass) {
|
|
6870
6870
|
subClass.prototype = Object.create(superClass.prototype);
|
|
6871
6871
|
subClass.prototype.constructor = subClass;
|
|
@@ -6960,7 +6960,7 @@ function createDecoratorAnnotation(annotation) {
|
|
|
6960
6960
|
__name(createDecoratorAnnotation, "createDecoratorAnnotation");
|
|
6961
6961
|
function storeAnnotation(prototype, key, annotation) {
|
|
6962
6962
|
if (!hasProp(prototype, storedAnnotationsSymbol)) {
|
|
6963
|
-
addHiddenProp(prototype, storedAnnotationsSymbol, _extends$
|
|
6963
|
+
addHiddenProp(prototype, storedAnnotationsSymbol, _extends$o({}, prototype[storedAnnotationsSymbol]));
|
|
6964
6964
|
}
|
|
6965
6965
|
if (!isOverride(annotation)) {
|
|
6966
6966
|
prototype[storedAnnotationsSymbol][key] = annotation;
|
|
@@ -6969,7 +6969,7 @@ function storeAnnotation(prototype, key, annotation) {
|
|
|
6969
6969
|
__name(storeAnnotation, "storeAnnotation");
|
|
6970
6970
|
function collectStoredAnnotations(target) {
|
|
6971
6971
|
if (!hasProp(target, storedAnnotationsSymbol)) {
|
|
6972
|
-
addHiddenProp(target, storedAnnotationsSymbol, _extends$
|
|
6972
|
+
addHiddenProp(target, storedAnnotationsSymbol, _extends$o({}, target[storedAnnotationsSymbol]));
|
|
6973
6973
|
}
|
|
6974
6974
|
return target[storedAnnotationsSymbol];
|
|
6975
6975
|
}
|
|
@@ -7297,7 +7297,7 @@ function make_$3(adm, key, descriptor2) {
|
|
|
7297
7297
|
__name(make_$3, "make_$3");
|
|
7298
7298
|
function extend_$3(adm, key, descriptor2, proxyTrap) {
|
|
7299
7299
|
assertComputedDescriptor(adm, this, key, descriptor2);
|
|
7300
|
-
return adm.defineComputedProperty_(key, _extends$
|
|
7300
|
+
return adm.defineComputedProperty_(key, _extends$o({}, this.options_, {
|
|
7301
7301
|
get: descriptor2.get,
|
|
7302
7302
|
set: descriptor2.set
|
|
7303
7303
|
}), proxyTrap);
|
|
@@ -9644,7 +9644,7 @@ var ObservableMap = /* @__PURE__ */ function() {
|
|
|
9644
9644
|
_proto.intercept_ = /* @__PURE__ */ __name(function intercept_(handler) {
|
|
9645
9645
|
return registerInterceptor(this, handler);
|
|
9646
9646
|
}, "intercept_");
|
|
9647
|
-
_createClass$
|
|
9647
|
+
_createClass$d(ObservableMap2, [{
|
|
9648
9648
|
key: "size",
|
|
9649
9649
|
get: /* @__PURE__ */ __name(function get5() {
|
|
9650
9650
|
this.keysAtom_.reportObserved();
|
|
@@ -9878,7 +9878,7 @@ var ObservableSet = /* @__PURE__ */ function() {
|
|
|
9878
9878
|
_proto[_Symbol$iterator$1] = function() {
|
|
9879
9879
|
return this.values();
|
|
9880
9880
|
};
|
|
9881
|
-
_createClass$
|
|
9881
|
+
_createClass$d(ObservableSet2, [{
|
|
9882
9882
|
key: "size",
|
|
9883
9883
|
get: /* @__PURE__ */ __name(function get5() {
|
|
9884
9884
|
this.atom_.reportObserved();
|
|
@@ -10074,7 +10074,7 @@ var ObservableObjectAdministration = /* @__PURE__ */ function() {
|
|
|
10074
10074
|
}
|
|
10075
10075
|
var newValue = change.newValue;
|
|
10076
10076
|
if (descriptor2.value !== newValue) {
|
|
10077
|
-
descriptor2 = _extends$
|
|
10077
|
+
descriptor2 = _extends$o({}, descriptor2, {
|
|
10078
10078
|
value: newValue
|
|
10079
10079
|
});
|
|
10080
10080
|
}
|
|
@@ -10402,7 +10402,7 @@ var LegacyObservableArray = /* @__PURE__ */ function(_StubArray, _Symbol$toStrin
|
|
|
10402
10402
|
}, "next")
|
|
10403
10403
|
});
|
|
10404
10404
|
};
|
|
10405
|
-
_createClass$
|
|
10405
|
+
_createClass$d(LegacyObservableArray2, [{
|
|
10406
10406
|
key: "length",
|
|
10407
10407
|
get: /* @__PURE__ */ __name(function get5() {
|
|
10408
10408
|
return this[$mobx].getArrayLength_();
|
|
@@ -17736,8 +17736,8 @@ lodash.exports;
|
|
|
17736
17736
|
}).call(commonjsGlobal);
|
|
17737
17737
|
})(lodash, lodash.exports);
|
|
17738
17738
|
var lodashExports = lodash.exports;
|
|
17739
|
-
function _extends$
|
|
17740
|
-
_extends$
|
|
17739
|
+
function _extends$n() {
|
|
17740
|
+
_extends$n = Object.assign ? Object.assign.bind() : function(target) {
|
|
17741
17741
|
for (var i = 1; i < arguments.length; i++) {
|
|
17742
17742
|
var source = arguments[i];
|
|
17743
17743
|
for (var key in source) {
|
|
@@ -17748,9 +17748,9 @@ function _extends$i() {
|
|
|
17748
17748
|
}
|
|
17749
17749
|
return target;
|
|
17750
17750
|
};
|
|
17751
|
-
return _extends$
|
|
17751
|
+
return _extends$n.apply(this, arguments);
|
|
17752
17752
|
}
|
|
17753
|
-
__name(_extends$
|
|
17753
|
+
__name(_extends$n, "_extends$n");
|
|
17754
17754
|
function _setPrototypeOf$2(o2, p2) {
|
|
17755
17755
|
_setPrototypeOf$2 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : /* @__PURE__ */ __name(function _setPrototypeOf3(o3, p3) {
|
|
17756
17756
|
o3.__proto__ = p3;
|
|
@@ -17945,7 +17945,7 @@ var mapProps = /* @__PURE__ */ __name(function mapProps2(propsMapper) {
|
|
|
17945
17945
|
}, "mapProps");
|
|
17946
17946
|
var withProps = /* @__PURE__ */ __name(function withProps2(input) {
|
|
17947
17947
|
var hoc = mapProps(function(props) {
|
|
17948
|
-
return _extends$
|
|
17948
|
+
return _extends$n({}, props, typeof input === "function" ? input(props) : input);
|
|
17949
17949
|
});
|
|
17950
17950
|
return hoc;
|
|
17951
17951
|
}, "withProps");
|
|
@@ -17980,7 +17980,7 @@ var withHandlers = /* @__PURE__ */ __name(function withHandlers2(handlers2) {
|
|
|
17980
17980
|
__name(WithHandlers2, "WithHandlers");
|
|
17981
17981
|
var _proto = WithHandlers2.prototype;
|
|
17982
17982
|
_proto.render = /* @__PURE__ */ __name(function render3() {
|
|
17983
|
-
return factory(_extends$
|
|
17983
|
+
return factory(_extends$n({}, this.props, this.handlers));
|
|
17984
17984
|
}, "render");
|
|
17985
17985
|
return WithHandlers2;
|
|
17986
17986
|
}(React$1.Component);
|
|
@@ -18015,7 +18015,7 @@ var withState = /* @__PURE__ */ __name(function withState2(stateName, stateUpdat
|
|
|
18015
18015
|
var _proto = WithState2.prototype;
|
|
18016
18016
|
_proto.render = /* @__PURE__ */ __name(function render3() {
|
|
18017
18017
|
var _extends2;
|
|
18018
|
-
return factory(_extends$
|
|
18018
|
+
return factory(_extends$n({}, this.props, (_extends2 = {}, _extends2[stateName] = this.state.stateValue, _extends2[stateUpdaterName] = this.updateStateValue, _extends2)));
|
|
18019
18019
|
}, "render");
|
|
18020
18020
|
return WithState2;
|
|
18021
18021
|
}(React$1.Component);
|
|
@@ -18075,7 +18075,7 @@ var lifecycle = /* @__PURE__ */ __name(function lifecycle2(spec) {
|
|
|
18075
18075
|
__name(Lifecycle3, "Lifecycle");
|
|
18076
18076
|
var _proto = Lifecycle3.prototype;
|
|
18077
18077
|
_proto.render = /* @__PURE__ */ __name(function render3() {
|
|
18078
|
-
return factory(_extends$
|
|
18078
|
+
return factory(_extends$n({}, this.props, this.state));
|
|
18079
18079
|
}, "render");
|
|
18080
18080
|
return Lifecycle3;
|
|
18081
18081
|
}(React$1.Component);
|
|
@@ -19083,8 +19083,8 @@ var defineProperty$9 = /* @__PURE__ */ __name(function defineProperty3(it, key,
|
|
|
19083
19083
|
return $Object$2.defineProperty(it, key, desc);
|
|
19084
19084
|
}, "defineProperty");
|
|
19085
19085
|
var defineProperty$8 = { "default": defineProperty$9, __esModule: true };
|
|
19086
|
-
var _defineProperty$
|
|
19087
|
-
var _defineProperty2 = _interopRequireDefault$e(_defineProperty$
|
|
19086
|
+
var _defineProperty$7 = defineProperty$8;
|
|
19087
|
+
var _defineProperty2 = _interopRequireDefault$e(_defineProperty$7);
|
|
19088
19088
|
function _interopRequireDefault$e(obj) {
|
|
19089
19089
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
19090
19090
|
}
|
|
@@ -21164,8 +21164,8 @@ var defineProperty$6 = function() {
|
|
|
21164
21164
|
} catch (e2) {
|
|
21165
21165
|
}
|
|
21166
21166
|
}();
|
|
21167
|
-
var _defineProperty$
|
|
21168
|
-
var constant$1 = constant_1, defineProperty$5 = _defineProperty$
|
|
21167
|
+
var _defineProperty$6 = defineProperty$6;
|
|
21168
|
+
var constant$1 = constant_1, defineProperty$5 = _defineProperty$6, identity$3 = identity_1;
|
|
21169
21169
|
var baseSetToString$3 = !defineProperty$5 ? identity$3 : function(func, string2) {
|
|
21170
21170
|
return defineProperty$5(func, "toString", {
|
|
21171
21171
|
"configurable": true,
|
|
@@ -22225,7 +22225,7 @@ function _typeof$4(obj) {
|
|
|
22225
22225
|
return _typeof$4(obj);
|
|
22226
22226
|
}
|
|
22227
22227
|
__name(_typeof$4, "_typeof$4");
|
|
22228
|
-
function _defineProperty$
|
|
22228
|
+
function _defineProperty$5(obj, key, value) {
|
|
22229
22229
|
if (key in obj) {
|
|
22230
22230
|
Object.defineProperty(obj, key, {
|
|
22231
22231
|
value,
|
|
@@ -22238,7 +22238,7 @@ function _defineProperty$4(obj, key, value) {
|
|
|
22238
22238
|
}
|
|
22239
22239
|
return obj;
|
|
22240
22240
|
}
|
|
22241
|
-
__name(_defineProperty$
|
|
22241
|
+
__name(_defineProperty$5, "_defineProperty$5");
|
|
22242
22242
|
function ownKeys$2(object2, enumerableOnly) {
|
|
22243
22243
|
var keys3 = Object.keys(object2);
|
|
22244
22244
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -22257,7 +22257,7 @@ function _objectSpread2(target) {
|
|
|
22257
22257
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
22258
22258
|
if (i % 2) {
|
|
22259
22259
|
ownKeys$2(source, true).forEach(function(key) {
|
|
22260
|
-
_defineProperty$
|
|
22260
|
+
_defineProperty$5(target, key, source[key]);
|
|
22261
22261
|
});
|
|
22262
22262
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
22263
22263
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
@@ -23238,7 +23238,7 @@ var reactList = {};
|
|
|
23238
23238
|
key: "getSizeOfItem",
|
|
23239
23239
|
value: /* @__PURE__ */ __name(function getSizeOfItem(index2) {
|
|
23240
23240
|
var cache = this.cache, items = this.items;
|
|
23241
|
-
var _this$props6 = this.props, axis = _this$props6.axis, itemSizeGetter = _this$props6.itemSizeGetter,
|
|
23241
|
+
var _this$props6 = this.props, axis = _this$props6.axis, itemSizeGetter = _this$props6.itemSizeGetter, itemSizeEstimator3 = _this$props6.itemSizeEstimator, type = _this$props6.type;
|
|
23242
23242
|
var _this$state4 = this.state, from3 = _this$state4.from, itemSize = _this$state4.itemSize, size = _this$state4.size;
|
|
23243
23243
|
if (itemSize)
|
|
23244
23244
|
return itemSize;
|
|
@@ -23251,8 +23251,8 @@ var reactList = {};
|
|
|
23251
23251
|
if (itemEl)
|
|
23252
23252
|
return itemEl[OFFSET_SIZE_KEYS[axis]];
|
|
23253
23253
|
}
|
|
23254
|
-
if (
|
|
23255
|
-
return
|
|
23254
|
+
if (itemSizeEstimator3)
|
|
23255
|
+
return itemSizeEstimator3(index2, cache);
|
|
23256
23256
|
}, "getSizeOfItem")
|
|
23257
23257
|
}, {
|
|
23258
23258
|
key: "constrain",
|
|
@@ -23428,6 +23428,29 @@ var reactList = {};
|
|
|
23428
23428
|
});
|
|
23429
23429
|
})(reactList);
|
|
23430
23430
|
const ReactList = /* @__PURE__ */ getDefaultExportFromCjs(reactList);
|
|
23431
|
+
var _extends$m = Object.assign || function(target) {
|
|
23432
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
23433
|
+
var source = arguments[i];
|
|
23434
|
+
for (var key in source) {
|
|
23435
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
23436
|
+
target[key] = source[key];
|
|
23437
|
+
}
|
|
23438
|
+
}
|
|
23439
|
+
}
|
|
23440
|
+
return target;
|
|
23441
|
+
};
|
|
23442
|
+
function _objectWithoutProperties$6(obj, keys3) {
|
|
23443
|
+
var target = {};
|
|
23444
|
+
for (var i in obj) {
|
|
23445
|
+
if (keys3.indexOf(i) >= 0)
|
|
23446
|
+
continue;
|
|
23447
|
+
if (!Object.prototype.hasOwnProperty.call(obj, i))
|
|
23448
|
+
continue;
|
|
23449
|
+
target[i] = obj[i];
|
|
23450
|
+
}
|
|
23451
|
+
return target;
|
|
23452
|
+
}
|
|
23453
|
+
__name(_objectWithoutProperties$6, "_objectWithoutProperties$6");
|
|
23431
23454
|
const _ = {
|
|
23432
23455
|
get: get$3,
|
|
23433
23456
|
set: set4,
|
|
@@ -23452,19 +23475,24 @@ function get$3(obj, path2, def2) {
|
|
|
23452
23475
|
if (!path2) {
|
|
23453
23476
|
return obj;
|
|
23454
23477
|
}
|
|
23455
|
-
|
|
23456
|
-
|
|
23478
|
+
var pathObj = makePathArray(path2);
|
|
23479
|
+
var val = void 0;
|
|
23457
23480
|
try {
|
|
23458
|
-
val = pathObj.reduce((current, pathPart)
|
|
23481
|
+
val = pathObj.reduce(function(current, pathPart) {
|
|
23482
|
+
return current[pathPart];
|
|
23483
|
+
}, obj);
|
|
23459
23484
|
} catch (e2) {
|
|
23460
23485
|
}
|
|
23461
23486
|
return typeof val !== "undefined" ? val : def2;
|
|
23462
23487
|
}
|
|
23463
23488
|
__name(get$3, "get$3");
|
|
23464
|
-
function set4(
|
|
23465
|
-
|
|
23466
|
-
|
|
23467
|
-
|
|
23489
|
+
function set4() {
|
|
23490
|
+
var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23491
|
+
var path2 = arguments[1];
|
|
23492
|
+
var value = arguments[2];
|
|
23493
|
+
var keys3 = makePathArray(path2);
|
|
23494
|
+
var keyPart = void 0;
|
|
23495
|
+
var cursor = obj;
|
|
23468
23496
|
while ((keyPart = keys3.shift()) && keys3.length) {
|
|
23469
23497
|
if (!cursor[keyPart]) {
|
|
23470
23498
|
cursor[keyPart] = {};
|
|
@@ -23476,7 +23504,7 @@ function set4(obj = {}, path2, value) {
|
|
|
23476
23504
|
}
|
|
23477
23505
|
__name(set4, "set");
|
|
23478
23506
|
function takeRight(arr, n2) {
|
|
23479
|
-
|
|
23507
|
+
var start2 = n2 > arr.length ? 0 : arr.length - n2;
|
|
23480
23508
|
return arr.slice(start2);
|
|
23481
23509
|
}
|
|
23482
23510
|
__name(takeRight, "takeRight");
|
|
@@ -23485,19 +23513,19 @@ function last(arr) {
|
|
|
23485
23513
|
}
|
|
23486
23514
|
__name(last, "last");
|
|
23487
23515
|
function range(n2) {
|
|
23488
|
-
|
|
23489
|
-
for (
|
|
23516
|
+
var arr = [];
|
|
23517
|
+
for (var i = 0; i < n2; i += 1) {
|
|
23490
23518
|
arr.push(n2);
|
|
23491
23519
|
}
|
|
23492
23520
|
return arr;
|
|
23493
23521
|
}
|
|
23494
23522
|
__name(range, "range");
|
|
23495
23523
|
function orderBy(arr, funcs, dirs, indexKey) {
|
|
23496
|
-
return arr.sort((rowA, rowB)
|
|
23497
|
-
for (
|
|
23498
|
-
|
|
23499
|
-
|
|
23500
|
-
|
|
23524
|
+
return arr.sort(function(rowA, rowB) {
|
|
23525
|
+
for (var i = 0; i < funcs.length; i += 1) {
|
|
23526
|
+
var comp = funcs[i];
|
|
23527
|
+
var desc = dirs[i] === false || dirs[i] === "desc";
|
|
23528
|
+
var sortInt = comp(rowA, rowB);
|
|
23501
23529
|
if (sortInt) {
|
|
23502
23530
|
return desc ? -sortInt : sortInt;
|
|
23503
23531
|
}
|
|
@@ -23507,8 +23535,8 @@ function orderBy(arr, funcs, dirs, indexKey) {
|
|
|
23507
23535
|
}
|
|
23508
23536
|
__name(orderBy, "orderBy");
|
|
23509
23537
|
function remove2(a2, b2) {
|
|
23510
|
-
return a2.filter((o2, i)
|
|
23511
|
-
|
|
23538
|
+
return a2.filter(function(o2, i) {
|
|
23539
|
+
var r2 = b2(o2);
|
|
23512
23540
|
if (r2) {
|
|
23513
23541
|
a2.splice(i, 1);
|
|
23514
23542
|
return true;
|
|
@@ -23519,46 +23547,50 @@ function remove2(a2, b2) {
|
|
|
23519
23547
|
__name(remove2, "remove");
|
|
23520
23548
|
function clone2(a2) {
|
|
23521
23549
|
try {
|
|
23522
|
-
return JSON.parse(
|
|
23523
|
-
|
|
23524
|
-
|
|
23525
|
-
|
|
23526
|
-
|
|
23527
|
-
|
|
23528
|
-
})
|
|
23529
|
-
);
|
|
23550
|
+
return JSON.parse(JSON.stringify(a2, function(key, value) {
|
|
23551
|
+
if (typeof value === "function") {
|
|
23552
|
+
return value.toString();
|
|
23553
|
+
}
|
|
23554
|
+
return value;
|
|
23555
|
+
}));
|
|
23530
23556
|
} catch (e2) {
|
|
23531
23557
|
return a2;
|
|
23532
23558
|
}
|
|
23533
23559
|
}
|
|
23534
23560
|
__name(clone2, "clone");
|
|
23535
|
-
function getFirstDefined(
|
|
23536
|
-
for (
|
|
23537
|
-
if (typeof
|
|
23538
|
-
return
|
|
23561
|
+
function getFirstDefined() {
|
|
23562
|
+
for (var i = 0; i < arguments.length; i += 1) {
|
|
23563
|
+
if (typeof (arguments.length <= i ? void 0 : arguments[i]) !== "undefined") {
|
|
23564
|
+
return arguments.length <= i ? void 0 : arguments[i];
|
|
23539
23565
|
}
|
|
23540
23566
|
}
|
|
23541
23567
|
}
|
|
23542
23568
|
__name(getFirstDefined, "getFirstDefined");
|
|
23543
23569
|
function sum(arr) {
|
|
23544
|
-
return arr.reduce((a2, b2)
|
|
23570
|
+
return arr.reduce(function(a2, b2) {
|
|
23571
|
+
return a2 + b2;
|
|
23572
|
+
}, 0);
|
|
23545
23573
|
}
|
|
23546
23574
|
__name(sum, "sum");
|
|
23547
23575
|
function makeTemplateComponent(compClass, displayName) {
|
|
23548
23576
|
if (!displayName) {
|
|
23549
23577
|
throw new Error("No displayName found for template component:", compClass);
|
|
23550
23578
|
}
|
|
23551
|
-
|
|
23552
|
-
var
|
|
23553
|
-
return
|
|
23579
|
+
var cmp = /* @__PURE__ */ __name(function cmp2(_ref) {
|
|
23580
|
+
var children = _ref.children, className = _ref.className, rest = _objectWithoutProperties$6(_ref, ["children", "className"]);
|
|
23581
|
+
return React$1.createElement(
|
|
23582
|
+
"div",
|
|
23583
|
+
_extends$m({ className: classNames(compClass, className) }, rest),
|
|
23584
|
+
children
|
|
23585
|
+
);
|
|
23554
23586
|
}, "cmp");
|
|
23555
23587
|
cmp.displayName = displayName;
|
|
23556
23588
|
return cmp;
|
|
23557
23589
|
}
|
|
23558
23590
|
__name(makeTemplateComponent, "makeTemplateComponent");
|
|
23559
23591
|
function groupBy(xs, key) {
|
|
23560
|
-
return xs.reduce((rv, x2, i)
|
|
23561
|
-
|
|
23592
|
+
return xs.reduce(function(rv, x2, i) {
|
|
23593
|
+
var resKey = typeof key === "function" ? key(x2, i) : x2[key];
|
|
23562
23594
|
rv[resKey] = isArray$b(rv[resKey]) ? rv[resKey] : [];
|
|
23563
23595
|
rv[resKey].push(x2);
|
|
23564
23596
|
return rv;
|
|
@@ -23567,7 +23599,7 @@ function groupBy(xs, key) {
|
|
|
23567
23599
|
__name(groupBy, "groupBy");
|
|
23568
23600
|
function asPx(value) {
|
|
23569
23601
|
value = Number(value);
|
|
23570
|
-
return Number.isNaN(value) ? null :
|
|
23602
|
+
return Number.isNaN(value) ? null : value + "px";
|
|
23571
23603
|
}
|
|
23572
23604
|
__name(asPx, "asPx");
|
|
23573
23605
|
function isArray$b(a2) {
|
|
@@ -23578,19 +23610,20 @@ function makePathArray(obj) {
|
|
|
23578
23610
|
return flattenDeep(obj).join(".").replace(/\[/g, ".").replace(/\]/g, "").split(".");
|
|
23579
23611
|
}
|
|
23580
23612
|
__name(makePathArray, "makePathArray");
|
|
23581
|
-
function flattenDeep(arr
|
|
23613
|
+
function flattenDeep(arr) {
|
|
23614
|
+
var newArr = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
23582
23615
|
if (!isArray$b(arr)) {
|
|
23583
23616
|
newArr.push(arr);
|
|
23584
23617
|
} else {
|
|
23585
|
-
for (
|
|
23618
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
23586
23619
|
flattenDeep(arr[i], newArr);
|
|
23587
23620
|
}
|
|
23588
23621
|
}
|
|
23589
23622
|
return newArr;
|
|
23590
23623
|
}
|
|
23591
23624
|
__name(flattenDeep, "flattenDeep");
|
|
23592
|
-
function splitProps(
|
|
23593
|
-
var
|
|
23625
|
+
function splitProps(_ref2) {
|
|
23626
|
+
var className = _ref2.className, style2 = _ref2.style, rest = _objectWithoutProperties$6(_ref2, ["className", "style"]);
|
|
23594
23627
|
return {
|
|
23595
23628
|
className,
|
|
23596
23629
|
style: style2,
|
|
@@ -23599,9 +23632,9 @@ function splitProps(_c) {
|
|
|
23599
23632
|
}
|
|
23600
23633
|
__name(splitProps, "splitProps");
|
|
23601
23634
|
function compactObject(obj) {
|
|
23602
|
-
|
|
23635
|
+
var newObj = {};
|
|
23603
23636
|
if (obj) {
|
|
23604
|
-
Object.keys(obj).map((key)
|
|
23637
|
+
Object.keys(obj).map(function(key) {
|
|
23605
23638
|
if (Object.prototype.hasOwnProperty.call(obj, key) && obj[key] !== void 0 && typeof obj[key] !== "undefined") {
|
|
23606
23639
|
newObj[key] = obj[key];
|
|
23607
23640
|
}
|
|
@@ -23615,744 +23648,1084 @@ function isSortingDesc(d2) {
|
|
|
23615
23648
|
return !!(d2.sort === "desc" || d2.desc === true || d2.asc === false);
|
|
23616
23649
|
}
|
|
23617
23650
|
__name(isSortingDesc, "isSortingDesc");
|
|
23618
|
-
function normalizeComponent(Comp
|
|
23619
|
-
|
|
23651
|
+
function normalizeComponent(Comp) {
|
|
23652
|
+
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
23653
|
+
var fallback = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Comp;
|
|
23654
|
+
return typeof Comp === "function" ? Object.getPrototypeOf(Comp).isReactComponent ? React$1.createElement(Comp, params) : Comp(params) : fallback;
|
|
23620
23655
|
}
|
|
23621
23656
|
__name(normalizeComponent, "normalizeComponent");
|
|
23622
|
-
|
|
23623
|
-
|
|
23624
|
-
|
|
23657
|
+
var _createClass$c = function() {
|
|
23658
|
+
function defineProperties2(target, props) {
|
|
23659
|
+
for (var i = 0; i < props.length; i++) {
|
|
23660
|
+
var descriptor2 = props[i];
|
|
23661
|
+
descriptor2.enumerable = descriptor2.enumerable || false;
|
|
23662
|
+
descriptor2.configurable = true;
|
|
23663
|
+
if ("value" in descriptor2)
|
|
23664
|
+
descriptor2.writable = true;
|
|
23665
|
+
Object.defineProperty(target, descriptor2.key, descriptor2);
|
|
23666
|
+
}
|
|
23625
23667
|
}
|
|
23626
|
-
|
|
23627
|
-
|
|
23668
|
+
__name(defineProperties2, "defineProperties");
|
|
23669
|
+
return function(Constructor, protoProps, staticProps) {
|
|
23670
|
+
if (protoProps)
|
|
23671
|
+
defineProperties2(Constructor.prototype, protoProps);
|
|
23672
|
+
if (staticProps)
|
|
23673
|
+
defineProperties2(Constructor, staticProps);
|
|
23674
|
+
return Constructor;
|
|
23675
|
+
};
|
|
23676
|
+
}();
|
|
23677
|
+
function _classCallCheck$h(instance, Constructor) {
|
|
23678
|
+
if (!(instance instanceof Constructor)) {
|
|
23679
|
+
throw new TypeError("Cannot call a class as a function");
|
|
23628
23680
|
}
|
|
23629
|
-
|
|
23630
|
-
|
|
23631
|
-
|
|
23632
|
-
|
|
23633
|
-
|
|
23634
|
-
|
|
23635
|
-
|
|
23636
|
-
|
|
23637
|
-
|
|
23638
|
-
|
|
23639
|
-
|
|
23640
|
-
|
|
23641
|
-
|
|
23642
|
-
|
|
23643
|
-
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
|
|
23647
|
-
|
|
23648
|
-
|
|
23649
|
-
|
|
23650
|
-
|
|
23651
|
-
|
|
23652
|
-
|
|
23653
|
-
|
|
23654
|
-
|
|
23655
|
-
|
|
23656
|
-
|
|
23657
|
-
|
|
23658
|
-
|
|
23659
|
-
|
|
23660
|
-
|
|
23661
|
-
|
|
23662
|
-
|
|
23681
|
+
}
|
|
23682
|
+
__name(_classCallCheck$h, "_classCallCheck$h");
|
|
23683
|
+
function _possibleConstructorReturn$h(self2, call2) {
|
|
23684
|
+
if (!self2) {
|
|
23685
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
23686
|
+
}
|
|
23687
|
+
return call2 && (typeof call2 === "object" || typeof call2 === "function") ? call2 : self2;
|
|
23688
|
+
}
|
|
23689
|
+
__name(_possibleConstructorReturn$h, "_possibleConstructorReturn$h");
|
|
23690
|
+
function _inherits$h(subClass, superClass) {
|
|
23691
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
23692
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
23693
|
+
}
|
|
23694
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
|
|
23695
|
+
if (superClass)
|
|
23696
|
+
Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
23697
|
+
}
|
|
23698
|
+
__name(_inherits$h, "_inherits$h");
|
|
23699
|
+
const Lifecycle = /* @__PURE__ */ __name(function(Base) {
|
|
23700
|
+
return function(_Base) {
|
|
23701
|
+
_inherits$h(_class, _Base);
|
|
23702
|
+
function _class() {
|
|
23703
|
+
_classCallCheck$h(this, _class);
|
|
23704
|
+
return _possibleConstructorReturn$h(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
|
|
23705
|
+
}
|
|
23706
|
+
__name(_class, "_class");
|
|
23707
|
+
_createClass$c(_class, [{
|
|
23708
|
+
key: "UNSAFE_componentWillMount",
|
|
23709
|
+
value: /* @__PURE__ */ __name(function UNSAFE_componentWillMount() {
|
|
23710
|
+
this.setStateWithData(this.getDataModel(this.getResolvedState(), true));
|
|
23711
|
+
}, "UNSAFE_componentWillMount")
|
|
23712
|
+
}, {
|
|
23713
|
+
key: "componentDidMount",
|
|
23714
|
+
value: /* @__PURE__ */ __name(function componentDidMount() {
|
|
23715
|
+
this.fireFetchData();
|
|
23716
|
+
}, "componentDidMount")
|
|
23717
|
+
}, {
|
|
23718
|
+
key: "UNSAFE_componentWillReceiveProps",
|
|
23719
|
+
value: /* @__PURE__ */ __name(function UNSAFE_componentWillReceiveProps(nextProps, nextState) {
|
|
23720
|
+
var oldState = this.getResolvedState();
|
|
23721
|
+
var newState = this.getResolvedState(nextProps, nextState);
|
|
23722
|
+
var defaultableOptions = ["sorted", "filtered", "resized", "expanded"];
|
|
23723
|
+
defaultableOptions.forEach(function(x2) {
|
|
23724
|
+
var defaultName = "default" + (x2.charAt(0).toUpperCase() + x2.slice(1));
|
|
23725
|
+
if (JSON.stringify(oldState[defaultName]) !== JSON.stringify(newState[defaultName])) {
|
|
23726
|
+
newState[x2] = newState[defaultName];
|
|
23727
|
+
}
|
|
23728
|
+
});
|
|
23729
|
+
var resettableOptions = ["sortable", "filterable", "resizable"];
|
|
23730
|
+
resettableOptions.forEach(function(x2) {
|
|
23731
|
+
if (oldState[x2] !== newState[x2]) {
|
|
23732
|
+
var baseName = x2.replace("able", "");
|
|
23733
|
+
var optionName = baseName + "ed";
|
|
23734
|
+
var defaultName = "default" + (optionName.charAt(0).toUpperCase() + optionName.slice(1));
|
|
23735
|
+
newState[optionName] = newState[defaultName];
|
|
23736
|
+
}
|
|
23737
|
+
});
|
|
23738
|
+
if (oldState.data !== newState.data || oldState.columns !== newState.columns || oldState.pivotBy !== newState.pivotBy || oldState.sorted !== newState.sorted || oldState.filtered !== newState.filtered) {
|
|
23739
|
+
this.setStateWithData(this.getDataModel(newState, oldState.data !== newState.data));
|
|
23740
|
+
}
|
|
23741
|
+
}, "UNSAFE_componentWillReceiveProps")
|
|
23742
|
+
}, {
|
|
23743
|
+
key: "setStateWithData",
|
|
23744
|
+
value: /* @__PURE__ */ __name(function setStateWithData(newState, cb) {
|
|
23745
|
+
var _this2 = this;
|
|
23746
|
+
var oldState = this.getResolvedState();
|
|
23747
|
+
var newResolvedState = this.getResolvedState({}, newState);
|
|
23748
|
+
var freezeWhenExpanded = newResolvedState.freezeWhenExpanded;
|
|
23749
|
+
newResolvedState.frozen = false;
|
|
23750
|
+
if (freezeWhenExpanded) {
|
|
23751
|
+
var keys3 = Object.keys(newResolvedState.expanded);
|
|
23752
|
+
for (var i = 0; i < keys3.length; i += 1) {
|
|
23753
|
+
if (newResolvedState.expanded[keys3[i]]) {
|
|
23754
|
+
newResolvedState.frozen = true;
|
|
23755
|
+
break;
|
|
23756
|
+
}
|
|
23757
|
+
}
|
|
23758
|
+
}
|
|
23759
|
+
if (oldState.frozen && !newResolvedState.frozen || oldState.sorted !== newResolvedState.sorted || oldState.filtered !== newResolvedState.filtered || oldState.showFilters !== newResolvedState.showFilters || !newResolvedState.frozen && oldState.resolvedData !== newResolvedState.resolvedData) {
|
|
23760
|
+
if (oldState.sorted !== newResolvedState.sorted && this.props.collapseOnSortingChange || oldState.filtered !== newResolvedState.filtered || oldState.showFilters !== newResolvedState.showFilters || oldState.sortedData && !newResolvedState.frozen && oldState.resolvedData !== newResolvedState.resolvedData && this.props.collapseOnDataChange) {
|
|
23761
|
+
newResolvedState.expanded = {};
|
|
23762
|
+
}
|
|
23763
|
+
Object.assign(newResolvedState, this.getSortedData(newResolvedState));
|
|
23764
|
+
}
|
|
23765
|
+
if (oldState.filtered !== newResolvedState.filtered) {
|
|
23766
|
+
newResolvedState.page = 0;
|
|
23663
23767
|
}
|
|
23768
|
+
if (newResolvedState.sortedData) {
|
|
23769
|
+
newResolvedState.pages = newResolvedState.manual ? newResolvedState.pages : Math.ceil(newResolvedState.sortedData.length / newResolvedState.pageSize);
|
|
23770
|
+
newResolvedState.page = newResolvedState.manual ? newResolvedState.page : Math.max(newResolvedState.page >= newResolvedState.pages ? newResolvedState.pages - 1 : newResolvedState.page, 0);
|
|
23771
|
+
}
|
|
23772
|
+
return this.setState(newResolvedState, function() {
|
|
23773
|
+
if (cb) {
|
|
23774
|
+
cb();
|
|
23775
|
+
}
|
|
23776
|
+
if (oldState.page !== newResolvedState.page || oldState.pageSize !== newResolvedState.pageSize || oldState.sorted !== newResolvedState.sorted || oldState.filtered !== newResolvedState.filtered) {
|
|
23777
|
+
_this2.fireFetchData();
|
|
23778
|
+
}
|
|
23779
|
+
});
|
|
23780
|
+
}, "setStateWithData")
|
|
23781
|
+
}]);
|
|
23782
|
+
return _class;
|
|
23783
|
+
}(Base);
|
|
23784
|
+
}, "Lifecycle");
|
|
23785
|
+
var _slicedToArray$4 = function() {
|
|
23786
|
+
function sliceIterator(arr, i) {
|
|
23787
|
+
var _arr = [];
|
|
23788
|
+
var _n = true;
|
|
23789
|
+
var _d = false;
|
|
23790
|
+
var _e = void 0;
|
|
23791
|
+
try {
|
|
23792
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
23793
|
+
_arr.push(_s.value);
|
|
23794
|
+
if (i && _arr.length === i)
|
|
23795
|
+
break;
|
|
23664
23796
|
}
|
|
23665
|
-
}
|
|
23666
|
-
|
|
23667
|
-
|
|
23668
|
-
|
|
23797
|
+
} catch (err) {
|
|
23798
|
+
_d = true;
|
|
23799
|
+
_e = err;
|
|
23800
|
+
} finally {
|
|
23801
|
+
try {
|
|
23802
|
+
if (!_n && _i["return"])
|
|
23803
|
+
_i["return"]();
|
|
23804
|
+
} finally {
|
|
23805
|
+
if (_d)
|
|
23806
|
+
throw _e;
|
|
23669
23807
|
}
|
|
23670
|
-
Object.assign(newResolvedState, this.getSortedData(newResolvedState));
|
|
23671
23808
|
}
|
|
23672
|
-
|
|
23673
|
-
|
|
23674
|
-
|
|
23675
|
-
|
|
23676
|
-
|
|
23677
|
-
|
|
23678
|
-
|
|
23679
|
-
|
|
23680
|
-
|
|
23809
|
+
return _arr;
|
|
23810
|
+
}
|
|
23811
|
+
__name(sliceIterator, "sliceIterator");
|
|
23812
|
+
return function(arr, i) {
|
|
23813
|
+
if (Array.isArray(arr)) {
|
|
23814
|
+
return arr;
|
|
23815
|
+
} else if (Symbol.iterator in Object(arr)) {
|
|
23816
|
+
return sliceIterator(arr, i);
|
|
23817
|
+
} else {
|
|
23818
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
23681
23819
|
}
|
|
23682
|
-
|
|
23683
|
-
|
|
23684
|
-
|
|
23685
|
-
|
|
23686
|
-
|
|
23687
|
-
|
|
23820
|
+
};
|
|
23821
|
+
}();
|
|
23822
|
+
var _extends$l = Object.assign || function(target) {
|
|
23823
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
23824
|
+
var source = arguments[i];
|
|
23825
|
+
for (var key in source) {
|
|
23826
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
23827
|
+
target[key] = source[key];
|
|
23688
23828
|
}
|
|
23689
|
-
}
|
|
23690
|
-
}
|
|
23691
|
-
}, "Lifecycle");
|
|
23692
|
-
const Methods = /* @__PURE__ */ __name((Base) => class extends Base {
|
|
23693
|
-
getResolvedState(props, state) {
|
|
23694
|
-
const resolvedState = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, _.compactObject(this.state)), _.compactObject(this.props)), _.compactObject(state)), _.compactObject(props));
|
|
23695
|
-
return resolvedState;
|
|
23829
|
+
}
|
|
23696
23830
|
}
|
|
23697
|
-
|
|
23698
|
-
|
|
23699
|
-
|
|
23700
|
-
|
|
23701
|
-
|
|
23702
|
-
|
|
23703
|
-
|
|
23704
|
-
|
|
23705
|
-
|
|
23706
|
-
|
|
23707
|
-
|
|
23708
|
-
originalKey,
|
|
23709
|
-
indexKey,
|
|
23710
|
-
groupedByPivotKey,
|
|
23711
|
-
SubComponent
|
|
23712
|
-
} = newState;
|
|
23713
|
-
let hasHeaderGroups = false;
|
|
23714
|
-
columns.forEach((column) => {
|
|
23715
|
-
if (column.columns) {
|
|
23716
|
-
hasHeaderGroups = true;
|
|
23717
|
-
}
|
|
23718
|
-
});
|
|
23719
|
-
let columnsWithExpander = [...columns];
|
|
23720
|
-
let expanderColumn = columns.find(
|
|
23721
|
-
(col) => col.expander || col.columns && col.columns.some((col2) => col2.expander)
|
|
23722
|
-
);
|
|
23723
|
-
if (expanderColumn && !expanderColumn.expander) {
|
|
23724
|
-
expanderColumn = expanderColumn.columns.find((col) => col.expander);
|
|
23831
|
+
return target;
|
|
23832
|
+
};
|
|
23833
|
+
var _createClass$b = function() {
|
|
23834
|
+
function defineProperties2(target, props) {
|
|
23835
|
+
for (var i = 0; i < props.length; i++) {
|
|
23836
|
+
var descriptor2 = props[i];
|
|
23837
|
+
descriptor2.enumerable = descriptor2.enumerable || false;
|
|
23838
|
+
descriptor2.configurable = true;
|
|
23839
|
+
if ("value" in descriptor2)
|
|
23840
|
+
descriptor2.writable = true;
|
|
23841
|
+
Object.defineProperty(target, descriptor2.key, descriptor2);
|
|
23725
23842
|
}
|
|
23726
|
-
|
|
23727
|
-
|
|
23728
|
-
|
|
23843
|
+
}
|
|
23844
|
+
__name(defineProperties2, "defineProperties");
|
|
23845
|
+
return function(Constructor, protoProps, staticProps) {
|
|
23846
|
+
if (protoProps)
|
|
23847
|
+
defineProperties2(Constructor.prototype, protoProps);
|
|
23848
|
+
if (staticProps)
|
|
23849
|
+
defineProperties2(Constructor, staticProps);
|
|
23850
|
+
return Constructor;
|
|
23851
|
+
};
|
|
23852
|
+
}();
|
|
23853
|
+
function _defineProperty$4(obj, key, value) {
|
|
23854
|
+
if (key in obj) {
|
|
23855
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
23856
|
+
} else {
|
|
23857
|
+
obj[key] = value;
|
|
23858
|
+
}
|
|
23859
|
+
return obj;
|
|
23860
|
+
}
|
|
23861
|
+
__name(_defineProperty$4, "_defineProperty$4");
|
|
23862
|
+
function _toConsumableArray(arr) {
|
|
23863
|
+
if (Array.isArray(arr)) {
|
|
23864
|
+
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
|
|
23865
|
+
arr2[i] = arr[i];
|
|
23729
23866
|
}
|
|
23730
|
-
|
|
23731
|
-
|
|
23732
|
-
|
|
23733
|
-
|
|
23734
|
-
|
|
23735
|
-
|
|
23736
|
-
|
|
23737
|
-
|
|
23738
|
-
|
|
23739
|
-
|
|
23740
|
-
|
|
23741
|
-
|
|
23742
|
-
|
|
23743
|
-
|
|
23744
|
-
|
|
23745
|
-
|
|
23746
|
-
|
|
23747
|
-
|
|
23748
|
-
|
|
23749
|
-
|
|
23750
|
-
|
|
23751
|
-
|
|
23752
|
-
|
|
23753
|
-
|
|
23754
|
-
|
|
23755
|
-
|
|
23756
|
-
|
|
23757
|
-
|
|
23758
|
-
|
|
23759
|
-
|
|
23760
|
-
|
|
23761
|
-
|
|
23762
|
-
|
|
23763
|
-
|
|
23764
|
-
|
|
23765
|
-
|
|
23766
|
-
|
|
23767
|
-
|
|
23768
|
-
|
|
23769
|
-
|
|
23867
|
+
return arr2;
|
|
23868
|
+
} else {
|
|
23869
|
+
return Array.from(arr);
|
|
23870
|
+
}
|
|
23871
|
+
}
|
|
23872
|
+
__name(_toConsumableArray, "_toConsumableArray");
|
|
23873
|
+
function _classCallCheck$g(instance, Constructor) {
|
|
23874
|
+
if (!(instance instanceof Constructor)) {
|
|
23875
|
+
throw new TypeError("Cannot call a class as a function");
|
|
23876
|
+
}
|
|
23877
|
+
}
|
|
23878
|
+
__name(_classCallCheck$g, "_classCallCheck$g");
|
|
23879
|
+
function _possibleConstructorReturn$g(self2, call2) {
|
|
23880
|
+
if (!self2) {
|
|
23881
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
23882
|
+
}
|
|
23883
|
+
return call2 && (typeof call2 === "object" || typeof call2 === "function") ? call2 : self2;
|
|
23884
|
+
}
|
|
23885
|
+
__name(_possibleConstructorReturn$g, "_possibleConstructorReturn$g");
|
|
23886
|
+
function _inherits$g(subClass, superClass) {
|
|
23887
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
23888
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
23889
|
+
}
|
|
23890
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
|
|
23891
|
+
if (superClass)
|
|
23892
|
+
Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
23893
|
+
}
|
|
23894
|
+
__name(_inherits$g, "_inherits$g");
|
|
23895
|
+
const Methods = /* @__PURE__ */ __name(function(Base) {
|
|
23896
|
+
return function(_Base) {
|
|
23897
|
+
_inherits$g(_class, _Base);
|
|
23898
|
+
function _class() {
|
|
23899
|
+
_classCallCheck$g(this, _class);
|
|
23900
|
+
return _possibleConstructorReturn$g(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
|
|
23901
|
+
}
|
|
23902
|
+
__name(_class, "_class");
|
|
23903
|
+
_createClass$b(_class, [{
|
|
23904
|
+
key: "getResolvedState",
|
|
23905
|
+
value: /* @__PURE__ */ __name(function getResolvedState(props, state) {
|
|
23906
|
+
var resolvedState = _extends$l({}, _.compactObject(this.state), _.compactObject(this.props), _.compactObject(state), _.compactObject(props));
|
|
23907
|
+
return resolvedState;
|
|
23908
|
+
}, "getResolvedState")
|
|
23909
|
+
}, {
|
|
23910
|
+
key: "getDataModel",
|
|
23911
|
+
value: /* @__PURE__ */ __name(function getDataModel(newState) {
|
|
23912
|
+
var _this2 = this;
|
|
23913
|
+
var columns = newState.columns, _newState$pivotBy = newState.pivotBy, pivotBy = _newState$pivotBy === void 0 ? [] : _newState$pivotBy, data = newState.data, resolveData2 = newState.resolveData, pivotIDKey = newState.pivotIDKey, pivotValKey = newState.pivotValKey, subRowsKey = newState.subRowsKey, aggregatedKey = newState.aggregatedKey, nestingLevelKey = newState.nestingLevelKey, originalKey = newState.originalKey, indexKey = newState.indexKey, groupedByPivotKey = newState.groupedByPivotKey, SubComponent = newState.SubComponent;
|
|
23914
|
+
var hasHeaderGroups = false;
|
|
23915
|
+
columns.forEach(function(column) {
|
|
23916
|
+
if (column.columns) {
|
|
23917
|
+
hasHeaderGroups = true;
|
|
23918
|
+
}
|
|
23770
23919
|
});
|
|
23771
|
-
|
|
23772
|
-
|
|
23773
|
-
|
|
23774
|
-
|
|
23775
|
-
|
|
23776
|
-
visibleColumns = visibleColumns.map((column) => {
|
|
23777
|
-
if (column.columns) {
|
|
23778
|
-
const visibleSubColumns = column.columns.filter(
|
|
23779
|
-
(d2) => pivotBy.indexOf(d2.id) > -1 ? false : _.getFirstDefined(d2.show, true)
|
|
23780
|
-
);
|
|
23781
|
-
return __spreadProps(__spreadValues({}, column), {
|
|
23782
|
-
columns: visibleSubColumns
|
|
23920
|
+
var columnsWithExpander = [].concat(_toConsumableArray(columns));
|
|
23921
|
+
var expanderColumn = columns.find(function(col) {
|
|
23922
|
+
return col.expander || col.columns && col.columns.some(function(col2) {
|
|
23923
|
+
return col2.expander;
|
|
23924
|
+
});
|
|
23783
23925
|
});
|
|
23784
|
-
|
|
23785
|
-
|
|
23786
|
-
|
|
23787
|
-
|
|
23788
|
-
(column) => column.columns ? column.columns.length : pivotBy.indexOf(column.id) > -1 ? false : _.getFirstDefined(column.show, true)
|
|
23789
|
-
);
|
|
23790
|
-
const pivotIndex = visibleColumns.findIndex((col) => col.pivot);
|
|
23791
|
-
if (pivotBy.length) {
|
|
23792
|
-
const pivotColumns = [];
|
|
23793
|
-
pivotBy.forEach((pivotID) => {
|
|
23794
|
-
const found = allDecoratedColumns.find((d2) => d2.id === pivotID);
|
|
23795
|
-
if (found) {
|
|
23796
|
-
pivotColumns.push(found);
|
|
23926
|
+
if (expanderColumn && !expanderColumn.expander) {
|
|
23927
|
+
expanderColumn = expanderColumn.columns.find(function(col) {
|
|
23928
|
+
return col.expander;
|
|
23929
|
+
});
|
|
23797
23930
|
}
|
|
23798
|
-
|
|
23799
|
-
|
|
23800
|
-
|
|
23801
|
-
pivotColumns[0].parentColumn
|
|
23802
|
-
);
|
|
23803
|
-
let PivotGroupHeader = hasHeaderGroups && PivotParentColumn.Header;
|
|
23804
|
-
PivotGroupHeader = PivotGroupHeader || (() => /* @__PURE__ */ React$1.createElement("strong", null, "Pivoted"));
|
|
23805
|
-
let pivotColumnGroup = {
|
|
23806
|
-
Header: PivotGroupHeader,
|
|
23807
|
-
columns: pivotColumns.map((col) => __spreadProps(__spreadValues(__spreadValues({}, this.props.pivotDefaults), col), {
|
|
23808
|
-
pivoted: true
|
|
23809
|
-
}))
|
|
23810
|
-
};
|
|
23811
|
-
if (pivotIndex >= 0) {
|
|
23812
|
-
pivotColumnGroup = __spreadValues(__spreadValues({}, visibleColumns[pivotIndex]), pivotColumnGroup);
|
|
23813
|
-
visibleColumns.splice(pivotIndex, 1, pivotColumnGroup);
|
|
23814
|
-
} else {
|
|
23815
|
-
visibleColumns.unshift(pivotColumnGroup);
|
|
23816
|
-
}
|
|
23817
|
-
}
|
|
23818
|
-
const headerGroups = [];
|
|
23819
|
-
let currentSpan = [];
|
|
23820
|
-
const addHeader = /* @__PURE__ */ __name((columns2, column) => {
|
|
23821
|
-
headerGroups.push(__spreadProps(__spreadValues(__spreadValues({}, this.props.column), column), {
|
|
23822
|
-
columns: columns2
|
|
23823
|
-
}));
|
|
23824
|
-
currentSpan = [];
|
|
23825
|
-
}, "addHeader");
|
|
23826
|
-
visibleColumns.forEach((column) => {
|
|
23827
|
-
if (column.columns) {
|
|
23828
|
-
allVisibleColumns = allVisibleColumns.concat(column.columns);
|
|
23829
|
-
if (currentSpan.length > 0) {
|
|
23830
|
-
addHeader(currentSpan);
|
|
23931
|
+
if (SubComponent && !expanderColumn) {
|
|
23932
|
+
expanderColumn = { expander: true };
|
|
23933
|
+
columnsWithExpander = [expanderColumn].concat(_toConsumableArray(columnsWithExpander));
|
|
23831
23934
|
}
|
|
23832
|
-
|
|
23833
|
-
|
|
23834
|
-
|
|
23835
|
-
|
|
23836
|
-
|
|
23837
|
-
|
|
23838
|
-
|
|
23839
|
-
|
|
23840
|
-
|
|
23841
|
-
|
|
23842
|
-
|
|
23843
|
-
|
|
23844
|
-
|
|
23845
|
-
|
|
23846
|
-
|
|
23847
|
-
|
|
23848
|
-
|
|
23849
|
-
|
|
23850
|
-
|
|
23851
|
-
|
|
23852
|
-
|
|
23853
|
-
|
|
23854
|
-
|
|
23855
|
-
|
|
23856
|
-
|
|
23857
|
-
|
|
23858
|
-
|
|
23859
|
-
|
|
23860
|
-
|
|
23861
|
-
|
|
23862
|
-
|
|
23863
|
-
|
|
23864
|
-
|
|
23865
|
-
|
|
23866
|
-
|
|
23867
|
-
|
|
23868
|
-
|
|
23869
|
-
|
|
23870
|
-
|
|
23871
|
-
|
|
23872
|
-
|
|
23873
|
-
|
|
23874
|
-
|
|
23875
|
-
|
|
23876
|
-
|
|
23877
|
-
|
|
23878
|
-
|
|
23879
|
-
[groupedByPivotKey]: true
|
|
23880
|
-
}));
|
|
23881
|
-
groupedRows = groupedRows.map((rowGroup) => {
|
|
23882
|
-
const subRows = groupRecursively(rowGroup[subRowsKey], keys3, i + 1);
|
|
23883
|
-
return __spreadValues(__spreadProps(__spreadValues({}, rowGroup), {
|
|
23884
|
-
[subRowsKey]: subRows,
|
|
23885
|
-
[aggregatedKey]: true
|
|
23886
|
-
}), aggregate(subRows));
|
|
23935
|
+
var makeDecoratedColumn = /* @__PURE__ */ __name(function makeDecoratedColumn2(column, parentColumn) {
|
|
23936
|
+
var dcol = void 0;
|
|
23937
|
+
if (column.expander) {
|
|
23938
|
+
dcol = _extends$l({}, _this2.props.column, _this2.props.expanderDefaults, column);
|
|
23939
|
+
} else {
|
|
23940
|
+
dcol = _extends$l({}, _this2.props.column, column);
|
|
23941
|
+
}
|
|
23942
|
+
if (dcol.maxWidth < dcol.minWidth) {
|
|
23943
|
+
dcol.minWidth = dcol.maxWidth;
|
|
23944
|
+
}
|
|
23945
|
+
if (parentColumn) {
|
|
23946
|
+
dcol.parentColumn = parentColumn;
|
|
23947
|
+
}
|
|
23948
|
+
if (typeof dcol.accessor === "string") {
|
|
23949
|
+
dcol.id = dcol.id || dcol.accessor;
|
|
23950
|
+
var accessorString = dcol.accessor;
|
|
23951
|
+
dcol.accessor = function(row) {
|
|
23952
|
+
return _.get(row, accessorString);
|
|
23953
|
+
};
|
|
23954
|
+
return dcol;
|
|
23955
|
+
}
|
|
23956
|
+
if (dcol.accessor && !dcol.id) {
|
|
23957
|
+
console.warn(dcol);
|
|
23958
|
+
throw new Error("A column id is required if using a non-string accessor for column above.");
|
|
23959
|
+
}
|
|
23960
|
+
if (!dcol.accessor) {
|
|
23961
|
+
dcol.accessor = function() {
|
|
23962
|
+
return void 0;
|
|
23963
|
+
};
|
|
23964
|
+
}
|
|
23965
|
+
return dcol;
|
|
23966
|
+
}, "makeDecoratedColumn");
|
|
23967
|
+
var allDecoratedColumns = [];
|
|
23968
|
+
var decorateAndAddToAll = /* @__PURE__ */ __name(function decorateAndAddToAll2(column, parentColumn) {
|
|
23969
|
+
var decoratedColumn = makeDecoratedColumn(column, parentColumn);
|
|
23970
|
+
allDecoratedColumns.push(decoratedColumn);
|
|
23971
|
+
return decoratedColumn;
|
|
23972
|
+
}, "decorateAndAddToAll");
|
|
23973
|
+
var decoratedColumns = columnsWithExpander.map(function(column) {
|
|
23974
|
+
if (column.columns) {
|
|
23975
|
+
return _extends$l({}, column, {
|
|
23976
|
+
columns: column.columns.map(function(d2) {
|
|
23977
|
+
return decorateAndAddToAll(d2, column);
|
|
23978
|
+
})
|
|
23979
|
+
});
|
|
23980
|
+
}
|
|
23981
|
+
return decorateAndAddToAll(column);
|
|
23887
23982
|
});
|
|
23888
|
-
|
|
23889
|
-
|
|
23890
|
-
|
|
23891
|
-
|
|
23892
|
-
|
|
23893
|
-
|
|
23894
|
-
|
|
23895
|
-
|
|
23896
|
-
|
|
23897
|
-
|
|
23898
|
-
|
|
23899
|
-
|
|
23900
|
-
|
|
23901
|
-
|
|
23902
|
-
|
|
23903
|
-
|
|
23904
|
-
|
|
23905
|
-
|
|
23906
|
-
|
|
23907
|
-
|
|
23908
|
-
|
|
23909
|
-
|
|
23910
|
-
|
|
23911
|
-
|
|
23912
|
-
|
|
23913
|
-
|
|
23914
|
-
|
|
23915
|
-
|
|
23916
|
-
|
|
23917
|
-
|
|
23918
|
-
|
|
23919
|
-
|
|
23920
|
-
|
|
23921
|
-
|
|
23922
|
-
|
|
23923
|
-
|
|
23924
|
-
|
|
23925
|
-
|
|
23926
|
-
|
|
23927
|
-
|
|
23928
|
-
|
|
23929
|
-
|
|
23930
|
-
|
|
23931
|
-
|
|
23932
|
-
|
|
23933
|
-
|
|
23934
|
-
|
|
23935
|
-
|
|
23936
|
-
|
|
23937
|
-
|
|
23983
|
+
var visibleColumns = decoratedColumns.slice();
|
|
23984
|
+
var allVisibleColumns = [];
|
|
23985
|
+
visibleColumns = visibleColumns.map(function(column) {
|
|
23986
|
+
if (column.columns) {
|
|
23987
|
+
var visibleSubColumns = column.columns.filter(function(d2) {
|
|
23988
|
+
return pivotBy.indexOf(d2.id) > -1 ? false : _.getFirstDefined(d2.show, true);
|
|
23989
|
+
});
|
|
23990
|
+
return _extends$l({}, column, {
|
|
23991
|
+
columns: visibleSubColumns
|
|
23992
|
+
});
|
|
23993
|
+
}
|
|
23994
|
+
return column;
|
|
23995
|
+
});
|
|
23996
|
+
visibleColumns = visibleColumns.filter(function(column) {
|
|
23997
|
+
return column.columns ? column.columns.length : pivotBy.indexOf(column.id) > -1 ? false : _.getFirstDefined(column.show, true);
|
|
23998
|
+
});
|
|
23999
|
+
var pivotIndex = visibleColumns.findIndex(function(col) {
|
|
24000
|
+
return col.pivot;
|
|
24001
|
+
});
|
|
24002
|
+
if (pivotBy.length) {
|
|
24003
|
+
var pivotColumns = [];
|
|
24004
|
+
pivotBy.forEach(function(pivotID) {
|
|
24005
|
+
var found = allDecoratedColumns.find(function(d2) {
|
|
24006
|
+
return d2.id === pivotID;
|
|
24007
|
+
});
|
|
24008
|
+
if (found) {
|
|
24009
|
+
pivotColumns.push(found);
|
|
24010
|
+
}
|
|
24011
|
+
});
|
|
24012
|
+
var PivotParentColumn = pivotColumns.reduce(function(prev, current) {
|
|
24013
|
+
return prev && prev === current.parentColumn && current.parentColumn;
|
|
24014
|
+
}, pivotColumns[0].parentColumn);
|
|
24015
|
+
var PivotGroupHeader = hasHeaderGroups && PivotParentColumn.Header;
|
|
24016
|
+
PivotGroupHeader = PivotGroupHeader || function() {
|
|
24017
|
+
return React$1.createElement(
|
|
24018
|
+
"strong",
|
|
24019
|
+
null,
|
|
24020
|
+
"Pivoted"
|
|
24021
|
+
);
|
|
24022
|
+
};
|
|
24023
|
+
var pivotColumnGroup = {
|
|
24024
|
+
Header: PivotGroupHeader,
|
|
24025
|
+
columns: pivotColumns.map(function(col) {
|
|
24026
|
+
return _extends$l({}, _this2.props.pivotDefaults, col, {
|
|
24027
|
+
pivoted: true
|
|
24028
|
+
});
|
|
24029
|
+
})
|
|
24030
|
+
// Place the pivotColumns back into the visibleColumns
|
|
24031
|
+
};
|
|
24032
|
+
if (pivotIndex >= 0) {
|
|
24033
|
+
pivotColumnGroup = _extends$l({}, visibleColumns[pivotIndex], pivotColumnGroup);
|
|
24034
|
+
visibleColumns.splice(pivotIndex, 1, pivotColumnGroup);
|
|
24035
|
+
} else {
|
|
24036
|
+
visibleColumns.unshift(pivotColumnGroup);
|
|
24037
|
+
}
|
|
23938
24038
|
}
|
|
23939
|
-
|
|
23940
|
-
|
|
23941
|
-
|
|
24039
|
+
var headerGroups = [];
|
|
24040
|
+
var currentSpan = [];
|
|
24041
|
+
var addHeader = /* @__PURE__ */ __name(function addHeader2(columns2, column) {
|
|
24042
|
+
headerGroups.push(_extends$l({}, _this2.props.column, column, {
|
|
24043
|
+
columns: columns2
|
|
24044
|
+
}));
|
|
24045
|
+
currentSpan = [];
|
|
24046
|
+
}, "addHeader");
|
|
24047
|
+
visibleColumns.forEach(function(column) {
|
|
24048
|
+
if (column.columns) {
|
|
24049
|
+
allVisibleColumns = allVisibleColumns.concat(column.columns);
|
|
24050
|
+
if (currentSpan.length > 0) {
|
|
24051
|
+
addHeader(currentSpan);
|
|
24052
|
+
}
|
|
24053
|
+
addHeader(column.columns, column);
|
|
24054
|
+
return;
|
|
24055
|
+
}
|
|
24056
|
+
allVisibleColumns.push(column);
|
|
24057
|
+
currentSpan.push(column);
|
|
24058
|
+
});
|
|
24059
|
+
if (hasHeaderGroups && currentSpan.length > 0) {
|
|
24060
|
+
addHeader(currentSpan);
|
|
23942
24061
|
}
|
|
23943
|
-
|
|
23944
|
-
|
|
23945
|
-
|
|
23946
|
-
|
|
24062
|
+
var accessRow = /* @__PURE__ */ __name(function accessRow2(d2, i) {
|
|
24063
|
+
var _row;
|
|
24064
|
+
var level = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
24065
|
+
var row = (_row = {}, _defineProperty$4(_row, originalKey, d2), _defineProperty$4(_row, indexKey, i), _defineProperty$4(_row, subRowsKey, d2[subRowsKey]), _defineProperty$4(_row, nestingLevelKey, level), _row);
|
|
24066
|
+
allDecoratedColumns.forEach(function(column) {
|
|
24067
|
+
if (column.expander)
|
|
24068
|
+
return;
|
|
24069
|
+
row[column.id] = column.accessor(d2);
|
|
24070
|
+
});
|
|
24071
|
+
if (row[subRowsKey]) {
|
|
24072
|
+
row[subRowsKey] = row[subRowsKey].map(function(d3, i2) {
|
|
24073
|
+
return accessRow2(d3, i2, level + 1);
|
|
24074
|
+
});
|
|
24075
|
+
}
|
|
23947
24076
|
return row;
|
|
23948
|
-
}
|
|
23949
|
-
|
|
23950
|
-
|
|
23951
|
-
row[this.props.subRowsKey],
|
|
23952
|
-
filtered,
|
|
23953
|
-
defaultFilterMethod,
|
|
23954
|
-
allVisibleColumns
|
|
23955
|
-
)
|
|
24077
|
+
}, "accessRow");
|
|
24078
|
+
var resolvedData = resolveData2(data).map(function(d2, i) {
|
|
24079
|
+
return accessRow(d2, i);
|
|
23956
24080
|
});
|
|
23957
|
-
|
|
23958
|
-
|
|
23959
|
-
|
|
24081
|
+
var aggregatingColumns = allVisibleColumns.filter(function(d2) {
|
|
24082
|
+
return !d2.expander && d2.aggregate;
|
|
24083
|
+
});
|
|
24084
|
+
var aggregate = /* @__PURE__ */ __name(function aggregate2(rows) {
|
|
24085
|
+
var aggregationValues = {};
|
|
24086
|
+
aggregatingColumns.forEach(function(column) {
|
|
24087
|
+
var values = rows.map(function(d2) {
|
|
24088
|
+
return d2[column.id];
|
|
24089
|
+
});
|
|
24090
|
+
aggregationValues[column.id] = column.aggregate(values, rows);
|
|
24091
|
+
});
|
|
24092
|
+
return aggregationValues;
|
|
24093
|
+
}, "aggregate");
|
|
24094
|
+
if (pivotBy.length) {
|
|
24095
|
+
var groupRecursively = /* @__PURE__ */ __name(function groupRecursively2(rows, keys3) {
|
|
24096
|
+
var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
24097
|
+
if (i === keys3.length) {
|
|
24098
|
+
return rows;
|
|
24099
|
+
}
|
|
24100
|
+
var groupedRows = Object.entries(_.groupBy(rows, keys3[i])).map(function(_ref) {
|
|
24101
|
+
var _ref3;
|
|
24102
|
+
var _ref2 = _slicedToArray$4(_ref, 2), key = _ref2[0], value = _ref2[1];
|
|
24103
|
+
return _ref3 = {}, _defineProperty$4(_ref3, pivotIDKey, keys3[i]), _defineProperty$4(_ref3, pivotValKey, key), _defineProperty$4(_ref3, keys3[i], key), _defineProperty$4(_ref3, subRowsKey, value), _defineProperty$4(_ref3, nestingLevelKey, i), _defineProperty$4(_ref3, groupedByPivotKey, true), _ref3;
|
|
24104
|
+
});
|
|
24105
|
+
groupedRows = groupedRows.map(function(rowGroup) {
|
|
24106
|
+
var _extends2;
|
|
24107
|
+
var subRows = groupRecursively2(rowGroup[subRowsKey], keys3, i + 1);
|
|
24108
|
+
return _extends$l({}, rowGroup, (_extends2 = {}, _defineProperty$4(_extends2, subRowsKey, subRows), _defineProperty$4(_extends2, aggregatedKey, true), _extends2), aggregate(subRows));
|
|
24109
|
+
});
|
|
24110
|
+
return groupedRows;
|
|
24111
|
+
}, "groupRecursively");
|
|
24112
|
+
resolvedData = groupRecursively(resolvedData, pivotBy);
|
|
24113
|
+
}
|
|
24114
|
+
return _extends$l({}, newState, {
|
|
24115
|
+
resolvedData,
|
|
24116
|
+
allVisibleColumns,
|
|
24117
|
+
headerGroups,
|
|
24118
|
+
allDecoratedColumns,
|
|
24119
|
+
hasHeaderGroups
|
|
24120
|
+
});
|
|
24121
|
+
}, "getDataModel")
|
|
24122
|
+
}, {
|
|
24123
|
+
key: "getSortedData",
|
|
24124
|
+
value: /* @__PURE__ */ __name(function getSortedData(resolvedState) {
|
|
24125
|
+
var manual = resolvedState.manual, sorted = resolvedState.sorted, filtered = resolvedState.filtered, defaultFilterMethod2 = resolvedState.defaultFilterMethod, resolvedData = resolvedState.resolvedData, allVisibleColumns = resolvedState.allVisibleColumns, allDecoratedColumns = resolvedState.allDecoratedColumns;
|
|
24126
|
+
var sortMethodsByColumnID = {};
|
|
24127
|
+
allDecoratedColumns.filter(function(col) {
|
|
24128
|
+
return col.sortMethod;
|
|
24129
|
+
}).forEach(function(col) {
|
|
24130
|
+
sortMethodsByColumnID[col.id] = col.sortMethod;
|
|
24131
|
+
});
|
|
24132
|
+
return {
|
|
24133
|
+
sortedData: manual ? resolvedData : this.sortData(this.filterData(resolvedData, filtered, defaultFilterMethod2, allVisibleColumns), sorted, sortMethodsByColumnID)
|
|
24134
|
+
};
|
|
24135
|
+
}, "getSortedData")
|
|
24136
|
+
}, {
|
|
24137
|
+
key: "fireFetchData",
|
|
24138
|
+
value: /* @__PURE__ */ __name(function fireFetchData() {
|
|
24139
|
+
this.props.onFetchData(this.getResolvedState(), this);
|
|
24140
|
+
}, "fireFetchData")
|
|
24141
|
+
}, {
|
|
24142
|
+
key: "getPropOrState",
|
|
24143
|
+
value: /* @__PURE__ */ __name(function getPropOrState(key) {
|
|
24144
|
+
return _.getFirstDefined(this.props[key], this.state[key]);
|
|
24145
|
+
}, "getPropOrState")
|
|
24146
|
+
}, {
|
|
24147
|
+
key: "getStateOrProp",
|
|
24148
|
+
value: /* @__PURE__ */ __name(function getStateOrProp(key) {
|
|
24149
|
+
return _.getFirstDefined(this.state[key], this.props[key]);
|
|
24150
|
+
}, "getStateOrProp")
|
|
24151
|
+
}, {
|
|
24152
|
+
key: "filterData",
|
|
24153
|
+
value: /* @__PURE__ */ __name(function filterData(data, filtered, defaultFilterMethod2, allVisibleColumns) {
|
|
24154
|
+
var _this3 = this;
|
|
24155
|
+
var filteredData = data;
|
|
24156
|
+
if (filtered.length) {
|
|
24157
|
+
filteredData = filtered.reduce(function(filteredSoFar, nextFilter) {
|
|
24158
|
+
var column = allVisibleColumns.find(function(x2) {
|
|
24159
|
+
return x2.id === nextFilter.id;
|
|
24160
|
+
});
|
|
24161
|
+
if (!column || column.filterable === false) {
|
|
24162
|
+
return filteredSoFar;
|
|
24163
|
+
}
|
|
24164
|
+
var filterMethod = column.filterMethod || defaultFilterMethod2;
|
|
24165
|
+
if (column.filterAll) {
|
|
24166
|
+
return filterMethod(nextFilter, filteredSoFar, column);
|
|
24167
|
+
}
|
|
24168
|
+
return filteredSoFar.filter(function(row) {
|
|
24169
|
+
return filterMethod(nextFilter, row, column);
|
|
24170
|
+
});
|
|
24171
|
+
}, filteredData);
|
|
24172
|
+
filteredData = filteredData.map(function(row) {
|
|
24173
|
+
if (!row[_this3.props.subRowsKey]) {
|
|
24174
|
+
return row;
|
|
24175
|
+
}
|
|
24176
|
+
return _extends$l({}, row, _defineProperty$4({}, _this3.props.subRowsKey, _this3.filterData(row[_this3.props.subRowsKey], filtered, defaultFilterMethod2, allVisibleColumns)));
|
|
24177
|
+
}).filter(function(row) {
|
|
24178
|
+
if (!row[_this3.props.subRowsKey]) {
|
|
24179
|
+
return true;
|
|
24180
|
+
}
|
|
24181
|
+
return row[_this3.props.subRowsKey].length > 0;
|
|
24182
|
+
});
|
|
23960
24183
|
}
|
|
23961
|
-
return
|
|
23962
|
-
})
|
|
23963
|
-
}
|
|
23964
|
-
|
|
23965
|
-
|
|
23966
|
-
|
|
23967
|
-
|
|
23968
|
-
|
|
23969
|
-
|
|
23970
|
-
const sortedData = (this.props.orderByMethod || _.orderBy)(
|
|
23971
|
-
data,
|
|
23972
|
-
sorted.map((sort2) => {
|
|
23973
|
-
if (sortMethodsByColumnID[sort2.id]) {
|
|
23974
|
-
return (a2, b2) => sortMethodsByColumnID[sort2.id](a2[sort2.id], b2[sort2.id], sort2.desc);
|
|
24184
|
+
return filteredData;
|
|
24185
|
+
}, "filterData")
|
|
24186
|
+
}, {
|
|
24187
|
+
key: "sortData",
|
|
24188
|
+
value: /* @__PURE__ */ __name(function sortData(data, sorted) {
|
|
24189
|
+
var _this4 = this;
|
|
24190
|
+
var sortMethodsByColumnID = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
24191
|
+
if (!sorted.length) {
|
|
24192
|
+
return data;
|
|
23975
24193
|
}
|
|
23976
|
-
|
|
23977
|
-
|
|
23978
|
-
|
|
23979
|
-
|
|
23980
|
-
|
|
23981
|
-
|
|
23982
|
-
|
|
23983
|
-
|
|
23984
|
-
|
|
23985
|
-
|
|
23986
|
-
|
|
23987
|
-
|
|
23988
|
-
|
|
23989
|
-
|
|
23990
|
-
|
|
23991
|
-
|
|
23992
|
-
|
|
23993
|
-
|
|
23994
|
-
|
|
23995
|
-
|
|
23996
|
-
|
|
23997
|
-
|
|
23998
|
-
|
|
23999
|
-
|
|
24000
|
-
|
|
24001
|
-
|
|
24002
|
-
}
|
|
24003
|
-
|
|
24004
|
-
|
|
24005
|
-
|
|
24006
|
-
|
|
24007
|
-
|
|
24008
|
-
|
|
24009
|
-
|
|
24010
|
-
|
|
24011
|
-
|
|
24012
|
-
|
|
24013
|
-
|
|
24014
|
-
|
|
24015
|
-
|
|
24016
|
-
|
|
24017
|
-
|
|
24018
|
-
|
|
24019
|
-
|
|
24020
|
-
|
|
24021
|
-
|
|
24022
|
-
|
|
24023
|
-
|
|
24024
|
-
|
|
24025
|
-
|
|
24026
|
-
|
|
24027
|
-
|
|
24028
|
-
|
|
24029
|
-
|
|
24030
|
-
|
|
24031
|
-
|
|
24032
|
-
|
|
24033
|
-
|
|
24034
|
-
|
|
24035
|
-
|
|
24036
|
-
|
|
24037
|
-
|
|
24038
|
-
|
|
24039
|
-
|
|
24194
|
+
var sortedData = (this.props.orderByMethod || _.orderBy)(data, sorted.map(function(sort2) {
|
|
24195
|
+
if (sortMethodsByColumnID[sort2.id]) {
|
|
24196
|
+
return function(a2, b2) {
|
|
24197
|
+
return sortMethodsByColumnID[sort2.id](a2[sort2.id], b2[sort2.id], sort2.desc);
|
|
24198
|
+
};
|
|
24199
|
+
}
|
|
24200
|
+
return function(a2, b2) {
|
|
24201
|
+
return _this4.props.defaultSortMethod(a2[sort2.id], b2[sort2.id], sort2.desc);
|
|
24202
|
+
};
|
|
24203
|
+
}), sorted.map(function(d2) {
|
|
24204
|
+
return !d2.desc;
|
|
24205
|
+
}), this.props.indexKey);
|
|
24206
|
+
sortedData.forEach(function(row) {
|
|
24207
|
+
if (!row[_this4.props.subRowsKey]) {
|
|
24208
|
+
return;
|
|
24209
|
+
}
|
|
24210
|
+
row[_this4.props.subRowsKey] = _this4.sortData(row[_this4.props.subRowsKey], sorted, sortMethodsByColumnID);
|
|
24211
|
+
});
|
|
24212
|
+
return sortedData;
|
|
24213
|
+
}, "sortData")
|
|
24214
|
+
}, {
|
|
24215
|
+
key: "getMinRows",
|
|
24216
|
+
value: /* @__PURE__ */ __name(function getMinRows() {
|
|
24217
|
+
return _.getFirstDefined(this.props.minRows, this.getStateOrProp("pageSize"));
|
|
24218
|
+
}, "getMinRows")
|
|
24219
|
+
// User actions
|
|
24220
|
+
}, {
|
|
24221
|
+
key: "onPageChange",
|
|
24222
|
+
value: /* @__PURE__ */ __name(function onPageChange(page) {
|
|
24223
|
+
var _props = this.props, onPageChange2 = _props.onPageChange, collapseOnPageChange = _props.collapseOnPageChange;
|
|
24224
|
+
var newState = { page };
|
|
24225
|
+
if (collapseOnPageChange) {
|
|
24226
|
+
newState.expanded = {};
|
|
24227
|
+
}
|
|
24228
|
+
this.setStateWithData(newState, function() {
|
|
24229
|
+
return onPageChange2 && onPageChange2(page);
|
|
24230
|
+
});
|
|
24231
|
+
}, "onPageChange")
|
|
24232
|
+
}, {
|
|
24233
|
+
key: "onPageSizeChange",
|
|
24234
|
+
value: /* @__PURE__ */ __name(function onPageSizeChange(newPageSize) {
|
|
24235
|
+
var onPageSizeChange2 = this.props.onPageSizeChange;
|
|
24236
|
+
var _getResolvedState = this.getResolvedState(), pageSize = _getResolvedState.pageSize, page = _getResolvedState.page;
|
|
24237
|
+
var currentRow = pageSize * page;
|
|
24238
|
+
var newPage = Math.floor(currentRow / newPageSize);
|
|
24239
|
+
this.setStateWithData({
|
|
24240
|
+
pageSize: newPageSize,
|
|
24241
|
+
page: newPage
|
|
24242
|
+
}, function() {
|
|
24243
|
+
return onPageSizeChange2 && onPageSizeChange2(newPageSize, newPage);
|
|
24244
|
+
});
|
|
24245
|
+
}, "onPageSizeChange")
|
|
24246
|
+
}, {
|
|
24247
|
+
key: "sortColumn",
|
|
24248
|
+
value: /* @__PURE__ */ __name(function sortColumn(column, additive) {
|
|
24249
|
+
var _getResolvedState2 = this.getResolvedState(), sorted = _getResolvedState2.sorted, skipNextSort = _getResolvedState2.skipNextSort, defaultSortDesc = _getResolvedState2.defaultSortDesc;
|
|
24250
|
+
var firstSortDirection = Object.prototype.hasOwnProperty.call(column, "defaultSortDesc") ? column.defaultSortDesc : defaultSortDesc;
|
|
24251
|
+
var secondSortDirection = !firstSortDirection;
|
|
24252
|
+
if (skipNextSort) {
|
|
24253
|
+
this.setStateWithData({
|
|
24254
|
+
skipNextSort: false
|
|
24255
|
+
});
|
|
24256
|
+
return;
|
|
24257
|
+
}
|
|
24258
|
+
var onSortedChange = this.props.onSortedChange;
|
|
24259
|
+
var newSorted = _.clone(sorted || []).map(function(d2) {
|
|
24260
|
+
d2.desc = _.isSortingDesc(d2);
|
|
24261
|
+
return d2;
|
|
24262
|
+
});
|
|
24263
|
+
if (!_.isArray(column)) {
|
|
24264
|
+
var existingIndex = newSorted.findIndex(function(d2) {
|
|
24265
|
+
return d2.id === column.id;
|
|
24266
|
+
});
|
|
24267
|
+
if (existingIndex > -1) {
|
|
24268
|
+
var existing = newSorted[existingIndex];
|
|
24269
|
+
if (existing.desc === secondSortDirection) {
|
|
24270
|
+
if (additive) {
|
|
24271
|
+
newSorted.splice(existingIndex, 1);
|
|
24272
|
+
} else {
|
|
24273
|
+
existing.desc = firstSortDirection;
|
|
24274
|
+
newSorted = [existing];
|
|
24275
|
+
}
|
|
24276
|
+
} else {
|
|
24277
|
+
existing.desc = secondSortDirection;
|
|
24278
|
+
if (!additive) {
|
|
24279
|
+
newSorted = [existing];
|
|
24280
|
+
}
|
|
24281
|
+
}
|
|
24282
|
+
} else if (additive) {
|
|
24283
|
+
newSorted.push({
|
|
24284
|
+
id: column.id,
|
|
24285
|
+
desc: firstSortDirection
|
|
24286
|
+
});
|
|
24040
24287
|
} else {
|
|
24041
|
-
|
|
24042
|
-
|
|
24288
|
+
newSorted = [{
|
|
24289
|
+
id: column.id,
|
|
24290
|
+
desc: firstSortDirection
|
|
24291
|
+
}];
|
|
24043
24292
|
}
|
|
24044
24293
|
} else {
|
|
24045
|
-
|
|
24046
|
-
|
|
24047
|
-
|
|
24294
|
+
var _existingIndex = newSorted.findIndex(function(d2) {
|
|
24295
|
+
return d2.id === column[0].id;
|
|
24296
|
+
});
|
|
24297
|
+
if (_existingIndex > -1) {
|
|
24298
|
+
var _existing = newSorted[_existingIndex];
|
|
24299
|
+
if (_existing.desc === secondSortDirection) {
|
|
24300
|
+
if (additive) {
|
|
24301
|
+
newSorted.splice(_existingIndex, column.length);
|
|
24302
|
+
} else {
|
|
24303
|
+
column.forEach(function(d2, i) {
|
|
24304
|
+
newSorted[_existingIndex + i].desc = firstSortDirection;
|
|
24305
|
+
});
|
|
24306
|
+
}
|
|
24307
|
+
} else {
|
|
24308
|
+
column.forEach(function(d2, i) {
|
|
24309
|
+
newSorted[_existingIndex + i].desc = secondSortDirection;
|
|
24310
|
+
});
|
|
24311
|
+
}
|
|
24312
|
+
if (!additive) {
|
|
24313
|
+
newSorted = newSorted.slice(_existingIndex, column.length);
|
|
24314
|
+
}
|
|
24315
|
+
} else if (additive) {
|
|
24316
|
+
newSorted = newSorted.concat(column.map(function(d2) {
|
|
24317
|
+
return {
|
|
24318
|
+
id: d2.id,
|
|
24319
|
+
desc: firstSortDirection
|
|
24320
|
+
};
|
|
24321
|
+
}));
|
|
24322
|
+
} else {
|
|
24323
|
+
newSorted = column.map(function(d2) {
|
|
24324
|
+
return {
|
|
24325
|
+
id: d2.id,
|
|
24326
|
+
desc: firstSortDirection
|
|
24327
|
+
};
|
|
24328
|
+
});
|
|
24048
24329
|
}
|
|
24049
24330
|
}
|
|
24050
|
-
|
|
24051
|
-
|
|
24052
|
-
|
|
24053
|
-
|
|
24331
|
+
this.setStateWithData({
|
|
24332
|
+
page: !sorted.length && newSorted.length || !additive ? 0 : this.state.page,
|
|
24333
|
+
sorted: newSorted
|
|
24334
|
+
}, function() {
|
|
24335
|
+
return onSortedChange && onSortedChange(newSorted, column, additive);
|
|
24054
24336
|
});
|
|
24055
|
-
}
|
|
24056
|
-
|
|
24057
|
-
|
|
24337
|
+
}, "sortColumn")
|
|
24338
|
+
}, {
|
|
24339
|
+
key: "filterColumn",
|
|
24340
|
+
value: /* @__PURE__ */ __name(function filterColumn(column, value) {
|
|
24341
|
+
var _getResolvedState3 = this.getResolvedState(), filtered = _getResolvedState3.filtered;
|
|
24342
|
+
var onFilteredChange = this.props.onFilteredChange;
|
|
24343
|
+
var newFiltering = (filtered || []).filter(function(x2) {
|
|
24344
|
+
return x2.id !== column.id;
|
|
24345
|
+
});
|
|
24346
|
+
if (value !== "") {
|
|
24347
|
+
newFiltering.push({
|
|
24348
|
+
id: column.id,
|
|
24349
|
+
value
|
|
24350
|
+
});
|
|
24351
|
+
}
|
|
24352
|
+
this.setStateWithData({
|
|
24353
|
+
filtered: newFiltering
|
|
24354
|
+
}, function() {
|
|
24355
|
+
return onFilteredChange && onFilteredChange(newFiltering, column, value);
|
|
24356
|
+
});
|
|
24357
|
+
}, "filterColumn")
|
|
24358
|
+
}, {
|
|
24359
|
+
key: "resizeColumnStart",
|
|
24360
|
+
value: /* @__PURE__ */ __name(function resizeColumnStart(event, column, isTouch) {
|
|
24361
|
+
var _this5 = this;
|
|
24362
|
+
event.stopPropagation();
|
|
24363
|
+
var parentWidth = event.target.parentElement.getBoundingClientRect().width;
|
|
24364
|
+
var pageX = void 0;
|
|
24365
|
+
if (isTouch) {
|
|
24366
|
+
pageX = event.changedTouches[0].pageX;
|
|
24367
|
+
} else {
|
|
24368
|
+
pageX = event.pageX;
|
|
24369
|
+
}
|
|
24370
|
+
this.trapEvents = true;
|
|
24371
|
+
this.setStateWithData({
|
|
24372
|
+
currentlyResizing: {
|
|
24058
24373
|
id: column.id,
|
|
24059
|
-
|
|
24374
|
+
startX: pageX,
|
|
24375
|
+
parentWidth
|
|
24060
24376
|
}
|
|
24061
|
-
|
|
24062
|
-
|
|
24063
|
-
|
|
24064
|
-
|
|
24065
|
-
|
|
24066
|
-
const existing = newSorted[existingIndex];
|
|
24067
|
-
if (existing.desc === secondSortDirection) {
|
|
24068
|
-
if (additive) {
|
|
24069
|
-
newSorted.splice(existingIndex, column.length);
|
|
24377
|
+
}, function() {
|
|
24378
|
+
if (isTouch) {
|
|
24379
|
+
document.addEventListener("touchmove", _this5.resizeColumnMoving);
|
|
24380
|
+
document.addEventListener("touchcancel", _this5.resizeColumnEnd);
|
|
24381
|
+
document.addEventListener("touchend", _this5.resizeColumnEnd);
|
|
24070
24382
|
} else {
|
|
24071
|
-
|
|
24072
|
-
|
|
24073
|
-
|
|
24383
|
+
document.addEventListener("mousemove", _this5.resizeColumnMoving);
|
|
24384
|
+
document.addEventListener("mouseup", _this5.resizeColumnEnd);
|
|
24385
|
+
document.addEventListener("mouseleave", _this5.resizeColumnEnd);
|
|
24074
24386
|
}
|
|
24075
|
-
}
|
|
24076
|
-
|
|
24077
|
-
|
|
24387
|
+
});
|
|
24388
|
+
}, "resizeColumnStart")
|
|
24389
|
+
}, {
|
|
24390
|
+
key: "resizeColumnMoving",
|
|
24391
|
+
value: /* @__PURE__ */ __name(function resizeColumnMoving(event) {
|
|
24392
|
+
event.stopPropagation();
|
|
24393
|
+
var onResizedChange = this.props.onResizedChange;
|
|
24394
|
+
var _getResolvedState4 = this.getResolvedState(), resized = _getResolvedState4.resized, currentlyResizing = _getResolvedState4.currentlyResizing;
|
|
24395
|
+
var newResized = resized.filter(function(x2) {
|
|
24396
|
+
return x2.id !== currentlyResizing.id;
|
|
24397
|
+
});
|
|
24398
|
+
var pageX = void 0;
|
|
24399
|
+
if (event.type === "touchmove") {
|
|
24400
|
+
pageX = event.changedTouches[0].pageX;
|
|
24401
|
+
} else if (event.type === "mousemove") {
|
|
24402
|
+
pageX = event.pageX;
|
|
24403
|
+
}
|
|
24404
|
+
var newWidth = Math.max(currentlyResizing.parentWidth + pageX - currentlyResizing.startX, 11);
|
|
24405
|
+
newResized.push({
|
|
24406
|
+
id: currentlyResizing.id,
|
|
24407
|
+
value: newWidth
|
|
24408
|
+
});
|
|
24409
|
+
this.setStateWithData({
|
|
24410
|
+
resized: newResized
|
|
24411
|
+
}, function() {
|
|
24412
|
+
return onResizedChange && onResizedChange(newResized, event);
|
|
24413
|
+
});
|
|
24414
|
+
}, "resizeColumnMoving")
|
|
24415
|
+
}, {
|
|
24416
|
+
key: "resizeColumnEnd",
|
|
24417
|
+
value: /* @__PURE__ */ __name(function resizeColumnEnd(event) {
|
|
24418
|
+
event.stopPropagation();
|
|
24419
|
+
var isTouch = event.type === "touchend" || event.type === "touchcancel";
|
|
24420
|
+
if (isTouch) {
|
|
24421
|
+
document.removeEventListener("touchmove", this.resizeColumnMoving);
|
|
24422
|
+
document.removeEventListener("touchcancel", this.resizeColumnEnd);
|
|
24423
|
+
document.removeEventListener("touchend", this.resizeColumnEnd);
|
|
24424
|
+
}
|
|
24425
|
+
document.removeEventListener("mousemove", this.resizeColumnMoving);
|
|
24426
|
+
document.removeEventListener("mouseup", this.resizeColumnEnd);
|
|
24427
|
+
document.removeEventListener("mouseleave", this.resizeColumnEnd);
|
|
24428
|
+
if (!isTouch) {
|
|
24429
|
+
this.setStateWithData({
|
|
24430
|
+
skipNextSort: true,
|
|
24431
|
+
currentlyResizing: false
|
|
24078
24432
|
});
|
|
24079
24433
|
}
|
|
24080
|
-
|
|
24081
|
-
|
|
24082
|
-
|
|
24083
|
-
|
|
24084
|
-
|
|
24085
|
-
|
|
24086
|
-
|
|
24087
|
-
|
|
24088
|
-
|
|
24089
|
-
|
|
24090
|
-
|
|
24091
|
-
|
|
24092
|
-
|
|
24093
|
-
|
|
24094
|
-
}));
|
|
24095
|
-
}
|
|
24434
|
+
}, "resizeColumnEnd")
|
|
24435
|
+
}]);
|
|
24436
|
+
return _class;
|
|
24437
|
+
}(Base);
|
|
24438
|
+
}, "Methods");
|
|
24439
|
+
var _createClass$a = function() {
|
|
24440
|
+
function defineProperties2(target, props) {
|
|
24441
|
+
for (var i = 0; i < props.length; i++) {
|
|
24442
|
+
var descriptor2 = props[i];
|
|
24443
|
+
descriptor2.enumerable = descriptor2.enumerable || false;
|
|
24444
|
+
descriptor2.configurable = true;
|
|
24445
|
+
if ("value" in descriptor2)
|
|
24446
|
+
descriptor2.writable = true;
|
|
24447
|
+
Object.defineProperty(target, descriptor2.key, descriptor2);
|
|
24096
24448
|
}
|
|
24097
|
-
this.setStateWithData(
|
|
24098
|
-
{
|
|
24099
|
-
page: !sorted.length && newSorted.length || !additive ? 0 : this.state.page,
|
|
24100
|
-
sorted: newSorted
|
|
24101
|
-
},
|
|
24102
|
-
() => onSortedChange && onSortedChange(newSorted, column, additive)
|
|
24103
|
-
);
|
|
24104
24449
|
}
|
|
24105
|
-
|
|
24106
|
-
|
|
24107
|
-
|
|
24108
|
-
|
|
24109
|
-
if (
|
|
24110
|
-
|
|
24111
|
-
|
|
24112
|
-
|
|
24113
|
-
|
|
24450
|
+
__name(defineProperties2, "defineProperties");
|
|
24451
|
+
return function(Constructor, protoProps, staticProps) {
|
|
24452
|
+
if (protoProps)
|
|
24453
|
+
defineProperties2(Constructor.prototype, protoProps);
|
|
24454
|
+
if (staticProps)
|
|
24455
|
+
defineProperties2(Constructor, staticProps);
|
|
24456
|
+
return Constructor;
|
|
24457
|
+
};
|
|
24458
|
+
}();
|
|
24459
|
+
var _extends$k = Object.assign || function(target) {
|
|
24460
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
24461
|
+
var source = arguments[i];
|
|
24462
|
+
for (var key in source) {
|
|
24463
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
24464
|
+
target[key] = source[key];
|
|
24465
|
+
}
|
|
24114
24466
|
}
|
|
24115
|
-
this.setStateWithData(
|
|
24116
|
-
{
|
|
24117
|
-
filtered: newFiltering
|
|
24118
|
-
},
|
|
24119
|
-
() => onFilteredChange && onFilteredChange(newFiltering, column, value)
|
|
24120
|
-
);
|
|
24121
24467
|
}
|
|
24122
|
-
|
|
24123
|
-
|
|
24124
|
-
|
|
24125
|
-
|
|
24126
|
-
|
|
24127
|
-
pageX = event.changedTouches[0].pageX;
|
|
24128
|
-
} else {
|
|
24129
|
-
pageX = event.pageX;
|
|
24130
|
-
}
|
|
24131
|
-
this.trapEvents = true;
|
|
24132
|
-
this.setStateWithData(
|
|
24133
|
-
{
|
|
24134
|
-
currentlyResizing: {
|
|
24135
|
-
id: column.id,
|
|
24136
|
-
startX: pageX,
|
|
24137
|
-
parentWidth
|
|
24138
|
-
}
|
|
24139
|
-
},
|
|
24140
|
-
() => {
|
|
24141
|
-
if (isTouch) {
|
|
24142
|
-
document.addEventListener("touchmove", this.resizeColumnMoving);
|
|
24143
|
-
document.addEventListener("touchcancel", this.resizeColumnEnd);
|
|
24144
|
-
document.addEventListener("touchend", this.resizeColumnEnd);
|
|
24145
|
-
} else {
|
|
24146
|
-
document.addEventListener("mousemove", this.resizeColumnMoving);
|
|
24147
|
-
document.addEventListener("mouseup", this.resizeColumnEnd);
|
|
24148
|
-
document.addEventListener("mouseleave", this.resizeColumnEnd);
|
|
24149
|
-
}
|
|
24150
|
-
}
|
|
24151
|
-
);
|
|
24468
|
+
return target;
|
|
24469
|
+
};
|
|
24470
|
+
function _classCallCheck$f(instance, Constructor) {
|
|
24471
|
+
if (!(instance instanceof Constructor)) {
|
|
24472
|
+
throw new TypeError("Cannot call a class as a function");
|
|
24152
24473
|
}
|
|
24153
|
-
|
|
24154
|
-
|
|
24155
|
-
|
|
24156
|
-
|
|
24157
|
-
|
|
24158
|
-
let pageX;
|
|
24159
|
-
if (event.type === "touchmove") {
|
|
24160
|
-
pageX = event.changedTouches[0].pageX;
|
|
24161
|
-
} else if (event.type === "mousemove") {
|
|
24162
|
-
pageX = event.pageX;
|
|
24163
|
-
}
|
|
24164
|
-
const newWidth = Math.max(
|
|
24165
|
-
currentlyResizing.parentWidth + pageX - currentlyResizing.startX,
|
|
24166
|
-
11
|
|
24167
|
-
);
|
|
24168
|
-
newResized.push({
|
|
24169
|
-
id: currentlyResizing.id,
|
|
24170
|
-
value: newWidth
|
|
24171
|
-
});
|
|
24172
|
-
this.setStateWithData(
|
|
24173
|
-
{
|
|
24174
|
-
resized: newResized
|
|
24175
|
-
},
|
|
24176
|
-
() => onResizedChange && onResizedChange(newResized, event)
|
|
24177
|
-
);
|
|
24474
|
+
}
|
|
24475
|
+
__name(_classCallCheck$f, "_classCallCheck$f");
|
|
24476
|
+
function _possibleConstructorReturn$f(self2, call2) {
|
|
24477
|
+
if (!self2) {
|
|
24478
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
24178
24479
|
}
|
|
24179
|
-
|
|
24180
|
-
|
|
24181
|
-
|
|
24182
|
-
|
|
24183
|
-
|
|
24184
|
-
|
|
24185
|
-
document.removeEventListener("touchend", this.resizeColumnEnd);
|
|
24186
|
-
}
|
|
24187
|
-
document.removeEventListener("mousemove", this.resizeColumnMoving);
|
|
24188
|
-
document.removeEventListener("mouseup", this.resizeColumnEnd);
|
|
24189
|
-
document.removeEventListener("mouseleave", this.resizeColumnEnd);
|
|
24190
|
-
if (!isTouch) {
|
|
24191
|
-
this.setStateWithData({
|
|
24192
|
-
skipNextSort: true,
|
|
24193
|
-
currentlyResizing: false
|
|
24194
|
-
});
|
|
24195
|
-
}
|
|
24480
|
+
return call2 && (typeof call2 === "object" || typeof call2 === "function") ? call2 : self2;
|
|
24481
|
+
}
|
|
24482
|
+
__name(_possibleConstructorReturn$f, "_possibleConstructorReturn$f");
|
|
24483
|
+
function _inherits$f(subClass, superClass) {
|
|
24484
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
24485
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
24196
24486
|
}
|
|
24197
|
-
|
|
24198
|
-
|
|
24199
|
-
|
|
24200
|
-
|
|
24201
|
-
|
|
24202
|
-
|
|
24203
|
-
|
|
24204
|
-
|
|
24205
|
-
|
|
24487
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
|
|
24488
|
+
if (superClass)
|
|
24489
|
+
Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
24490
|
+
}
|
|
24491
|
+
__name(_inherits$f, "_inherits$f");
|
|
24492
|
+
var defaultButton = /* @__PURE__ */ __name(function defaultButton2(props) {
|
|
24493
|
+
return React$1.createElement(
|
|
24494
|
+
"button",
|
|
24495
|
+
_extends$k({ type: "button" }, props, { className: "-btn" }),
|
|
24496
|
+
props.children
|
|
24497
|
+
);
|
|
24498
|
+
}, "defaultButton");
|
|
24499
|
+
var ReactTablePagination = function(_Component) {
|
|
24500
|
+
_inherits$f(ReactTablePagination2, _Component);
|
|
24501
|
+
function ReactTablePagination2(props) {
|
|
24502
|
+
_classCallCheck$f(this, ReactTablePagination2);
|
|
24503
|
+
var _this = _possibleConstructorReturn$f(this, (ReactTablePagination2.__proto__ || Object.getPrototypeOf(ReactTablePagination2)).call(this, props));
|
|
24504
|
+
_this.getSafePage = _this.getSafePage.bind(_this);
|
|
24505
|
+
_this.changePage = _this.changePage.bind(_this);
|
|
24506
|
+
_this.applyPage = _this.applyPage.bind(_this);
|
|
24507
|
+
_this.state = {
|
|
24206
24508
|
page: props.page
|
|
24207
24509
|
};
|
|
24510
|
+
return _this;
|
|
24208
24511
|
}
|
|
24209
|
-
|
|
24210
|
-
|
|
24211
|
-
|
|
24212
|
-
|
|
24213
|
-
|
|
24214
|
-
|
|
24215
|
-
|
|
24216
|
-
|
|
24217
|
-
|
|
24218
|
-
|
|
24219
|
-
|
|
24220
|
-
|
|
24221
|
-
|
|
24222
|
-
|
|
24223
|
-
|
|
24224
|
-
|
|
24225
|
-
|
|
24226
|
-
|
|
24227
|
-
|
|
24228
|
-
|
|
24229
|
-
|
|
24230
|
-
|
|
24231
|
-
|
|
24232
|
-
|
|
24233
|
-
|
|
24234
|
-
|
|
24235
|
-
|
|
24236
|
-
|
|
24237
|
-
|
|
24238
|
-
|
|
24239
|
-
|
|
24240
|
-
|
|
24241
|
-
|
|
24242
|
-
|
|
24243
|
-
|
|
24244
|
-
|
|
24245
|
-
|
|
24246
|
-
|
|
24247
|
-
|
|
24248
|
-
|
|
24249
|
-
|
|
24250
|
-
|
|
24251
|
-
|
|
24252
|
-
|
|
24253
|
-
|
|
24254
|
-
|
|
24255
|
-
|
|
24256
|
-
|
|
24257
|
-
|
|
24258
|
-
|
|
24259
|
-
|
|
24260
|
-
|
|
24261
|
-
|
|
24262
|
-
|
|
24263
|
-
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
|
|
24267
|
-
|
|
24268
|
-
|
|
24269
|
-
|
|
24270
|
-
|
|
24271
|
-
renderPageJump,
|
|
24272
|
-
|
|
24273
|
-
|
|
24274
|
-
|
|
24275
|
-
|
|
24276
|
-
|
|
24277
|
-
|
|
24278
|
-
|
|
24279
|
-
|
|
24280
|
-
|
|
24281
|
-
|
|
24282
|
-
|
|
24283
|
-
|
|
24284
|
-
|
|
24285
|
-
|
|
24286
|
-
|
|
24287
|
-
|
|
24288
|
-
|
|
24289
|
-
|
|
24290
|
-
|
|
24291
|
-
|
|
24292
|
-
|
|
24293
|
-
|
|
24294
|
-
|
|
24295
|
-
|
|
24296
|
-
|
|
24297
|
-
|
|
24298
|
-
|
|
24299
|
-
|
|
24300
|
-
|
|
24301
|
-
|
|
24302
|
-
|
|
24303
|
-
|
|
24304
|
-
|
|
24305
|
-
|
|
24306
|
-
|
|
24307
|
-
|
|
24308
|
-
|
|
24512
|
+
__name(ReactTablePagination2, "ReactTablePagination");
|
|
24513
|
+
_createClass$a(ReactTablePagination2, [{
|
|
24514
|
+
key: "UNSAFE_componentWillReceiveProps",
|
|
24515
|
+
value: /* @__PURE__ */ __name(function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
24516
|
+
if (this.props.page !== nextProps.page) {
|
|
24517
|
+
this.setState({ page: nextProps.page });
|
|
24518
|
+
}
|
|
24519
|
+
}, "UNSAFE_componentWillReceiveProps")
|
|
24520
|
+
}, {
|
|
24521
|
+
key: "getSafePage",
|
|
24522
|
+
value: /* @__PURE__ */ __name(function getSafePage(page) {
|
|
24523
|
+
if (Number.isNaN(page)) {
|
|
24524
|
+
page = this.props.page;
|
|
24525
|
+
}
|
|
24526
|
+
return Math.min(Math.max(page, 0), this.props.pages - 1);
|
|
24527
|
+
}, "getSafePage")
|
|
24528
|
+
}, {
|
|
24529
|
+
key: "changePage",
|
|
24530
|
+
value: /* @__PURE__ */ __name(function changePage(page) {
|
|
24531
|
+
page = this.getSafePage(page);
|
|
24532
|
+
this.setState({ page });
|
|
24533
|
+
if (this.props.page !== page) {
|
|
24534
|
+
this.props.onPageChange(page);
|
|
24535
|
+
}
|
|
24536
|
+
}, "changePage")
|
|
24537
|
+
}, {
|
|
24538
|
+
key: "applyPage",
|
|
24539
|
+
value: /* @__PURE__ */ __name(function applyPage(e2) {
|
|
24540
|
+
if (e2) {
|
|
24541
|
+
e2.preventDefault();
|
|
24542
|
+
}
|
|
24543
|
+
var page = this.state.page;
|
|
24544
|
+
this.changePage(page === "" ? this.props.page : page);
|
|
24545
|
+
}, "applyPage")
|
|
24546
|
+
}, {
|
|
24547
|
+
key: "getPageJumpProperties",
|
|
24548
|
+
value: /* @__PURE__ */ __name(function getPageJumpProperties() {
|
|
24549
|
+
var _this2 = this;
|
|
24550
|
+
return {
|
|
24551
|
+
onKeyPress: /* @__PURE__ */ __name(function onKeyPress(e2) {
|
|
24552
|
+
if (e2.which === 13 || e2.keyCode === 13) {
|
|
24553
|
+
_this2.applyPage();
|
|
24554
|
+
}
|
|
24555
|
+
}, "onKeyPress"),
|
|
24556
|
+
onBlur: this.applyPage,
|
|
24557
|
+
value: this.state.page === "" ? "" : this.state.page + 1,
|
|
24558
|
+
onChange: /* @__PURE__ */ __name(function onChange(e2) {
|
|
24559
|
+
var val = e2.target.value;
|
|
24560
|
+
var page = val - 1;
|
|
24561
|
+
if (val === "") {
|
|
24562
|
+
return _this2.setState({ page: val });
|
|
24563
|
+
}
|
|
24564
|
+
_this2.setState({ page: _this2.getSafePage(page) });
|
|
24565
|
+
}, "onChange"),
|
|
24566
|
+
inputType: this.state.page === "" ? "text" : "number",
|
|
24567
|
+
pageJumpText: this.props.pageJumpText
|
|
24568
|
+
};
|
|
24569
|
+
}, "getPageJumpProperties")
|
|
24570
|
+
}, {
|
|
24571
|
+
key: "render",
|
|
24572
|
+
value: /* @__PURE__ */ __name(function render3() {
|
|
24573
|
+
var _this3 = this;
|
|
24574
|
+
var _props = this.props, pages = _props.pages, page = _props.page, showPageSizeOptions = _props.showPageSizeOptions, pageSizeOptions = _props.pageSizeOptions, pageSize = _props.pageSize, showPageJump = _props.showPageJump, canPrevious = _props.canPrevious, canNext = _props.canNext, onPageSizeChange = _props.onPageSizeChange, className = _props.className, PreviousComponent = _props.PreviousComponent, NextComponent = _props.NextComponent, renderPageJump2 = _props.renderPageJump, renderCurrentPage2 = _props.renderCurrentPage, renderTotalPagesCount2 = _props.renderTotalPagesCount, renderPageSizeOptions2 = _props.renderPageSizeOptions;
|
|
24575
|
+
return React$1.createElement(
|
|
24576
|
+
"div",
|
|
24577
|
+
{ className: classNames(className, "-pagination"), style: this.props.style },
|
|
24578
|
+
React$1.createElement(
|
|
24579
|
+
"div",
|
|
24580
|
+
{ className: "-previous" },
|
|
24581
|
+
React$1.createElement(
|
|
24582
|
+
PreviousComponent,
|
|
24583
|
+
{
|
|
24584
|
+
onClick: /* @__PURE__ */ __name(function onClick() {
|
|
24585
|
+
if (!canPrevious)
|
|
24586
|
+
return;
|
|
24587
|
+
_this3.changePage(page - 1);
|
|
24588
|
+
}, "onClick"),
|
|
24589
|
+
disabled: !canPrevious
|
|
24590
|
+
},
|
|
24591
|
+
this.props.previousText
|
|
24592
|
+
)
|
|
24593
|
+
),
|
|
24594
|
+
React$1.createElement(
|
|
24595
|
+
"div",
|
|
24596
|
+
{ className: "-center" },
|
|
24597
|
+
React$1.createElement(
|
|
24598
|
+
"span",
|
|
24599
|
+
{ className: "-pageInfo" },
|
|
24600
|
+
this.props.pageText,
|
|
24601
|
+
" ",
|
|
24602
|
+
showPageJump ? renderPageJump2(this.getPageJumpProperties()) : renderCurrentPage2(page),
|
|
24603
|
+
" ",
|
|
24604
|
+
this.props.ofText,
|
|
24605
|
+
" ",
|
|
24606
|
+
renderTotalPagesCount2(pages)
|
|
24607
|
+
),
|
|
24608
|
+
showPageSizeOptions && renderPageSizeOptions2({
|
|
24609
|
+
pageSize,
|
|
24610
|
+
rowsSelectorText: this.props.rowsSelectorText,
|
|
24611
|
+
pageSizeOptions,
|
|
24612
|
+
onPageSizeChange,
|
|
24613
|
+
rowsText: this.props.rowsText
|
|
24614
|
+
})
|
|
24615
|
+
),
|
|
24616
|
+
React$1.createElement(
|
|
24617
|
+
"div",
|
|
24618
|
+
{ className: "-next" },
|
|
24619
|
+
React$1.createElement(
|
|
24620
|
+
NextComponent,
|
|
24621
|
+
{
|
|
24622
|
+
onClick: /* @__PURE__ */ __name(function onClick() {
|
|
24623
|
+
if (!canNext)
|
|
24624
|
+
return;
|
|
24625
|
+
_this3.changePage(page + 1);
|
|
24626
|
+
}, "onClick"),
|
|
24627
|
+
disabled: !canNext
|
|
24628
|
+
},
|
|
24629
|
+
this.props.nextText
|
|
24630
|
+
)
|
|
24631
|
+
)
|
|
24632
|
+
);
|
|
24633
|
+
}, "render")
|
|
24634
|
+
}]);
|
|
24635
|
+
return ReactTablePagination2;
|
|
24636
|
+
}(React$1.Component);
|
|
24637
|
+
ReactTablePagination.defaultProps = {
|
|
24309
24638
|
PreviousComponent: defaultButton,
|
|
24310
24639
|
NextComponent: defaultButton,
|
|
24311
|
-
renderPageJump: ({
|
|
24312
|
-
onChange,
|
|
24313
|
-
|
|
24314
|
-
|
|
24315
|
-
|
|
24316
|
-
|
|
24317
|
-
|
|
24318
|
-
|
|
24319
|
-
|
|
24320
|
-
|
|
24321
|
-
|
|
24322
|
-
|
|
24323
|
-
|
|
24324
|
-
|
|
24325
|
-
|
|
24326
|
-
|
|
24640
|
+
renderPageJump: /* @__PURE__ */ __name(function renderPageJump(_ref) {
|
|
24641
|
+
var onChange = _ref.onChange, value = _ref.value, onBlur = _ref.onBlur, onKeyPress = _ref.onKeyPress, inputType = _ref.inputType, pageJumpText = _ref.pageJumpText;
|
|
24642
|
+
return React$1.createElement(
|
|
24643
|
+
"div",
|
|
24644
|
+
{ className: "-pageJump" },
|
|
24645
|
+
React$1.createElement("input", {
|
|
24646
|
+
"aria-label": pageJumpText,
|
|
24647
|
+
type: inputType,
|
|
24648
|
+
onChange,
|
|
24649
|
+
value,
|
|
24650
|
+
onBlur,
|
|
24651
|
+
onKeyPress
|
|
24652
|
+
})
|
|
24653
|
+
);
|
|
24654
|
+
}, "renderPageJump"),
|
|
24655
|
+
renderCurrentPage: /* @__PURE__ */ __name(function renderCurrentPage(page) {
|
|
24656
|
+
return React$1.createElement(
|
|
24657
|
+
"span",
|
|
24658
|
+
{ className: "-currentPage" },
|
|
24659
|
+
page + 1
|
|
24660
|
+
);
|
|
24661
|
+
}, "renderCurrentPage"),
|
|
24662
|
+
renderTotalPagesCount: /* @__PURE__ */ __name(function renderTotalPagesCount(pages) {
|
|
24663
|
+
return React$1.createElement(
|
|
24664
|
+
"span",
|
|
24665
|
+
{ className: "-totalPages" },
|
|
24666
|
+
pages || 1
|
|
24667
|
+
);
|
|
24668
|
+
}, "renderTotalPagesCount"),
|
|
24669
|
+
renderPageSizeOptions: /* @__PURE__ */ __name(function renderPageSizeOptions(_ref2) {
|
|
24670
|
+
var pageSize = _ref2.pageSize, pageSizeOptions = _ref2.pageSizeOptions, rowsSelectorText = _ref2.rowsSelectorText, onPageSizeChange = _ref2.onPageSizeChange, rowsText = _ref2.rowsText;
|
|
24671
|
+
return React$1.createElement(
|
|
24672
|
+
"span",
|
|
24673
|
+
{ className: "select-wrap -pageSizeOptions" },
|
|
24674
|
+
React$1.createElement(
|
|
24675
|
+
"select",
|
|
24676
|
+
{
|
|
24677
|
+
"aria-label": rowsSelectorText,
|
|
24678
|
+
onChange: /* @__PURE__ */ __name(function onChange(e2) {
|
|
24679
|
+
return onPageSizeChange(Number(e2.target.value));
|
|
24680
|
+
}, "onChange"),
|
|
24681
|
+
value: pageSize
|
|
24682
|
+
},
|
|
24683
|
+
pageSizeOptions.map(function(option, i) {
|
|
24684
|
+
return (
|
|
24685
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
24686
|
+
React$1.createElement(
|
|
24687
|
+
"option",
|
|
24688
|
+
{ key: i, value: option },
|
|
24689
|
+
option + " " + rowsText
|
|
24690
|
+
)
|
|
24691
|
+
);
|
|
24692
|
+
})
|
|
24693
|
+
)
|
|
24694
|
+
);
|
|
24695
|
+
}, "renderPageSizeOptions")
|
|
24696
|
+
};
|
|
24697
|
+
var _extends$j = Object.assign || function(target) {
|
|
24698
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
24699
|
+
var source = arguments[i];
|
|
24700
|
+
for (var key in source) {
|
|
24701
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
24702
|
+
target[key] = source[key];
|
|
24703
|
+
}
|
|
24327
24704
|
}
|
|
24328
|
-
|
|
24329
|
-
|
|
24330
|
-
|
|
24331
|
-
|
|
24332
|
-
|
|
24333
|
-
|
|
24334
|
-
|
|
24335
|
-
|
|
24336
|
-
|
|
24337
|
-
|
|
24338
|
-
|
|
24339
|
-
|
|
24340
|
-
|
|
24341
|
-
|
|
24342
|
-
|
|
24343
|
-
|
|
24344
|
-
|
|
24345
|
-
|
|
24346
|
-
/* @__PURE__ */ React$1.createElement("option", { key: i, value: option }, `${option} ${rowsText}`)
|
|
24347
|
-
))
|
|
24348
|
-
))
|
|
24349
|
-
});
|
|
24350
|
-
let ReactTablePagination = _ReactTablePagination;
|
|
24351
|
-
const emptyObj = /* @__PURE__ */ __name(() => ({}), "emptyObj");
|
|
24705
|
+
}
|
|
24706
|
+
return target;
|
|
24707
|
+
};
|
|
24708
|
+
function _objectWithoutProperties$5(obj, keys3) {
|
|
24709
|
+
var target = {};
|
|
24710
|
+
for (var i in obj) {
|
|
24711
|
+
if (keys3.indexOf(i) >= 0)
|
|
24712
|
+
continue;
|
|
24713
|
+
if (!Object.prototype.hasOwnProperty.call(obj, i))
|
|
24714
|
+
continue;
|
|
24715
|
+
target[i] = obj[i];
|
|
24716
|
+
}
|
|
24717
|
+
return target;
|
|
24718
|
+
}
|
|
24719
|
+
__name(_objectWithoutProperties$5, "_objectWithoutProperties$5");
|
|
24720
|
+
var emptyObj = /* @__PURE__ */ __name(function emptyObj2() {
|
|
24721
|
+
return {};
|
|
24722
|
+
}, "emptyObj");
|
|
24352
24723
|
const defaultProps$1 = {
|
|
24353
24724
|
// General
|
|
24354
24725
|
data: [],
|
|
24355
|
-
resolveData: (data)
|
|
24726
|
+
resolveData: /* @__PURE__ */ __name(function resolveData(data) {
|
|
24727
|
+
return data;
|
|
24728
|
+
}, "resolveData"),
|
|
24356
24729
|
loading: false,
|
|
24357
24730
|
showPagination: true,
|
|
24358
24731
|
showPaginationTop: false,
|
|
@@ -24376,12 +24749,12 @@ const defaultProps$1 = {
|
|
|
24376
24749
|
defaultResized: [],
|
|
24377
24750
|
defaultExpanded: {},
|
|
24378
24751
|
// eslint-disable-next-line no-unused-vars
|
|
24379
|
-
defaultFilterMethod: (filter, row, column)
|
|
24380
|
-
|
|
24752
|
+
defaultFilterMethod: /* @__PURE__ */ __name(function defaultFilterMethod(filter, row, column) {
|
|
24753
|
+
var id2 = filter.pivotId || filter.id;
|
|
24381
24754
|
return row[id2] !== void 0 ? String(row[id2]).startsWith(filter.value) : true;
|
|
24382
|
-
},
|
|
24755
|
+
}, "defaultFilterMethod"),
|
|
24383
24756
|
// eslint-disable-next-line no-unused-vars
|
|
24384
|
-
defaultSortMethod: (a2, b2, desc)
|
|
24757
|
+
defaultSortMethod: /* @__PURE__ */ __name(function defaultSortMethod(a2, b2, desc) {
|
|
24385
24758
|
a2 = a2 === null || a2 === void 0 ? "" : a2;
|
|
24386
24759
|
b2 = b2 === null || b2 === void 0 ? "" : b2;
|
|
24387
24760
|
a2 = typeof a2 === "string" ? a2.toLowerCase() : a2;
|
|
@@ -24393,7 +24766,7 @@ const defaultProps$1 = {
|
|
|
24393
24766
|
return -1;
|
|
24394
24767
|
}
|
|
24395
24768
|
return 0;
|
|
24396
|
-
},
|
|
24769
|
+
}, "defaultSortMethod"),
|
|
24397
24770
|
// Controlled State Props
|
|
24398
24771
|
// page: undefined,
|
|
24399
24772
|
// pageSize: undefined,
|
|
@@ -24420,7 +24793,9 @@ const defaultProps$1 = {
|
|
|
24420
24793
|
indexKey: "_index",
|
|
24421
24794
|
groupedByPivotKey: "_groupedByPivot",
|
|
24422
24795
|
// Server-side Callbacks
|
|
24423
|
-
onFetchData: ()
|
|
24796
|
+
onFetchData: /* @__PURE__ */ __name(function onFetchData() {
|
|
24797
|
+
return null;
|
|
24798
|
+
}, "onFetchData"),
|
|
24424
24799
|
// Classes
|
|
24425
24800
|
className: "",
|
|
24426
24801
|
style: {},
|
|
@@ -24508,106 +24883,145 @@ const defaultProps$1 = {
|
|
|
24508
24883
|
pageJumpText: "jump to page",
|
|
24509
24884
|
rowsSelectorText: "rows per page",
|
|
24510
24885
|
// Components
|
|
24511
|
-
TableComponent: (
|
|
24512
|
-
var
|
|
24513
|
-
return
|
|
24886
|
+
TableComponent: /* @__PURE__ */ __name(function TableComponent(_ref) {
|
|
24887
|
+
var children = _ref.children, className = _ref.className, rest = _objectWithoutProperties$5(_ref, ["children", "className"]);
|
|
24888
|
+
return React$1.createElement(
|
|
24514
24889
|
"div",
|
|
24515
|
-
|
|
24890
|
+
_extends$j({
|
|
24516
24891
|
className: classNames("rt-table", className),
|
|
24517
24892
|
role: "grid"
|
|
24893
|
+
// tabIndex='0'
|
|
24518
24894
|
}, rest),
|
|
24519
24895
|
children
|
|
24520
24896
|
);
|
|
24521
|
-
},
|
|
24897
|
+
}, "TableComponent"),
|
|
24522
24898
|
TheadComponent: _.makeTemplateComponent("rt-thead", "Thead"),
|
|
24523
24899
|
TbodyComponent: _.makeTemplateComponent("rt-tbody", "Tbody"),
|
|
24524
|
-
TrGroupComponent: (
|
|
24525
|
-
var
|
|
24526
|
-
return
|
|
24527
|
-
|
|
24528
|
-
|
|
24529
|
-
var _j = _i, { children, className } = _j, rest = __objRest(_j, ["children", "className"]);
|
|
24530
|
-
return /* @__PURE__ */ React$1.createElement("div", __spreadValues({ className: classNames("rt-tr", className), role: "row" }, rest), children);
|
|
24531
|
-
},
|
|
24532
|
-
ThComponent: (_k) => {
|
|
24533
|
-
var _l = _k, {
|
|
24534
|
-
toggleSort,
|
|
24535
|
-
className,
|
|
24900
|
+
TrGroupComponent: /* @__PURE__ */ __name(function TrGroupComponent(_ref2) {
|
|
24901
|
+
var children = _ref2.children, className = _ref2.className, rest = _objectWithoutProperties$5(_ref2, ["children", "className"]);
|
|
24902
|
+
return React$1.createElement(
|
|
24903
|
+
"div",
|
|
24904
|
+
_extends$j({ className: classNames("rt-tr-group", className), role: "rowgroup" }, rest),
|
|
24536
24905
|
children
|
|
24537
|
-
|
|
24538
|
-
|
|
24539
|
-
|
|
24540
|
-
|
|
24541
|
-
|
|
24906
|
+
);
|
|
24907
|
+
}, "TrGroupComponent"),
|
|
24908
|
+
TrComponent: /* @__PURE__ */ __name(function TrComponent(_ref3) {
|
|
24909
|
+
var children = _ref3.children, className = _ref3.className, rest = _objectWithoutProperties$5(_ref3, ["children", "className"]);
|
|
24910
|
+
return React$1.createElement(
|
|
24911
|
+
"div",
|
|
24912
|
+
_extends$j({ className: classNames("rt-tr", className), role: "row" }, rest),
|
|
24913
|
+
children
|
|
24914
|
+
);
|
|
24915
|
+
}, "TrComponent"),
|
|
24916
|
+
ThComponent: /* @__PURE__ */ __name(function ThComponent(_ref4) {
|
|
24917
|
+
var toggleSort = _ref4.toggleSort, className = _ref4.className, children = _ref4.children, rest = _objectWithoutProperties$5(_ref4, ["toggleSort", "className", "children"]);
|
|
24542
24918
|
return (
|
|
24543
24919
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
24544
|
-
|
|
24920
|
+
React$1.createElement(
|
|
24545
24921
|
"div",
|
|
24546
|
-
|
|
24922
|
+
_extends$j({
|
|
24547
24923
|
className: classNames("rt-th", className),
|
|
24548
|
-
onClick:
|
|
24924
|
+
onClick: /* @__PURE__ */ __name(function onClick(e2) {
|
|
24925
|
+
return toggleSort && toggleSort(e2);
|
|
24926
|
+
}, "onClick"),
|
|
24549
24927
|
role: "columnheader",
|
|
24550
24928
|
tabIndex: "-1"
|
|
24929
|
+
// Resolves eslint issues without implementing keyboard navigation incorrectly
|
|
24551
24930
|
}, rest),
|
|
24552
24931
|
children
|
|
24553
24932
|
)
|
|
24554
24933
|
);
|
|
24555
|
-
},
|
|
24556
|
-
TdComponent: (
|
|
24557
|
-
|
|
24558
|
-
|
|
24559
|
-
|
|
24934
|
+
}, "ThComponent"),
|
|
24935
|
+
TdComponent: /* @__PURE__ */ __name(function TdComponent(_ref5) {
|
|
24936
|
+
_ref5.toggleSort;
|
|
24937
|
+
var className = _ref5.className, children = _ref5.children, rest = _objectWithoutProperties$5(_ref5, ["toggleSort", "className", "children"]);
|
|
24938
|
+
return React$1.createElement(
|
|
24939
|
+
"div",
|
|
24940
|
+
_extends$j({ className: classNames("rt-td", className), role: "gridcell" }, rest),
|
|
24560
24941
|
children
|
|
24561
|
-
|
|
24562
|
-
|
|
24563
|
-
"className",
|
|
24564
|
-
"children"
|
|
24565
|
-
]);
|
|
24566
|
-
return /* @__PURE__ */ React$1.createElement("div", __spreadValues({ className: classNames("rt-td", className), role: "gridcell" }, rest), children);
|
|
24567
|
-
},
|
|
24942
|
+
);
|
|
24943
|
+
}, "TdComponent"),
|
|
24568
24944
|
TfootComponent: _.makeTemplateComponent("rt-tfoot", "Tfoot"),
|
|
24569
|
-
FilterComponent:
|
|
24570
|
-
|
|
24571
|
-
{
|
|
24945
|
+
FilterComponent: /* @__PURE__ */ __name(function FilterComponent(_ref6) {
|
|
24946
|
+
var filter = _ref6.filter, _onChange = _ref6.onChange, column = _ref6.column;
|
|
24947
|
+
return React$1.createElement("input", {
|
|
24572
24948
|
type: "text",
|
|
24573
24949
|
style: {
|
|
24574
24950
|
width: "100%"
|
|
24575
24951
|
},
|
|
24576
24952
|
placeholder: column.Placeholder,
|
|
24577
24953
|
value: filter ? filter.value : "",
|
|
24578
|
-
onChange: (
|
|
24579
|
-
|
|
24580
|
-
|
|
24581
|
-
|
|
24582
|
-
|
|
24583
|
-
|
|
24584
|
-
|
|
24585
|
-
|
|
24586
|
-
|
|
24587
|
-
|
|
24588
|
-
|
|
24589
|
-
|
|
24954
|
+
onChange: /* @__PURE__ */ __name(function onChange(event) {
|
|
24955
|
+
return _onChange(event.target.value);
|
|
24956
|
+
}, "onChange")
|
|
24957
|
+
});
|
|
24958
|
+
}, "FilterComponent"),
|
|
24959
|
+
ExpanderComponent: /* @__PURE__ */ __name(function ExpanderComponent(_ref7) {
|
|
24960
|
+
var isExpanded = _ref7.isExpanded;
|
|
24961
|
+
return React$1.createElement(
|
|
24962
|
+
"div",
|
|
24963
|
+
{ className: classNames("rt-expander", isExpanded && "-open") },
|
|
24964
|
+
"•"
|
|
24965
|
+
);
|
|
24966
|
+
}, "ExpanderComponent"),
|
|
24967
|
+
PivotValueComponent: /* @__PURE__ */ __name(function PivotValueComponent(_ref8) {
|
|
24968
|
+
var subRows = _ref8.subRows, value = _ref8.value;
|
|
24969
|
+
return React$1.createElement(
|
|
24970
|
+
"span",
|
|
24971
|
+
null,
|
|
24972
|
+
value,
|
|
24973
|
+
" ",
|
|
24974
|
+
subRows && "(" + subRows.length + ")"
|
|
24975
|
+
);
|
|
24976
|
+
}, "PivotValueComponent"),
|
|
24977
|
+
AggregatedComponent: /* @__PURE__ */ __name(function AggregatedComponent(_ref9) {
|
|
24978
|
+
var subRows = _ref9.subRows, column = _ref9.column;
|
|
24979
|
+
var previewValues = subRows.filter(function(d2) {
|
|
24980
|
+
return typeof d2[column.id] !== "undefined";
|
|
24981
|
+
}).map(function(row, i) {
|
|
24982
|
+
return (
|
|
24983
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
24984
|
+
React$1.createElement(
|
|
24985
|
+
"span",
|
|
24986
|
+
{ key: i },
|
|
24987
|
+
row[column.id],
|
|
24988
|
+
i < subRows.length - 1 ? ", " : ""
|
|
24989
|
+
)
|
|
24990
|
+
);
|
|
24991
|
+
});
|
|
24992
|
+
return React$1.createElement(
|
|
24993
|
+
"span",
|
|
24994
|
+
null,
|
|
24995
|
+
previewValues
|
|
24996
|
+
);
|
|
24997
|
+
}, "AggregatedComponent"),
|
|
24590
24998
|
PivotComponent: void 0,
|
|
24591
24999
|
// this is a computed default generated using
|
|
24592
25000
|
// the ExpanderComponent and PivotValueComponent at run-time in methods.js
|
|
24593
25001
|
PaginationComponent: ReactTablePagination,
|
|
24594
25002
|
PreviousComponent: void 0,
|
|
24595
25003
|
NextComponent: void 0,
|
|
24596
|
-
LoadingComponent: (
|
|
24597
|
-
var
|
|
24598
|
-
|
|
24599
|
-
|
|
24600
|
-
|
|
24601
|
-
|
|
24602
|
-
|
|
24603
|
-
|
|
24604
|
-
|
|
24605
|
-
|
|
24606
|
-
|
|
24607
|
-
},
|
|
25004
|
+
LoadingComponent: /* @__PURE__ */ __name(function LoadingComponent(_ref10) {
|
|
25005
|
+
var className = _ref10.className, loading = _ref10.loading, loadingText = _ref10.loadingText, rest = _objectWithoutProperties$5(_ref10, ["className", "loading", "loadingText"]);
|
|
25006
|
+
return React$1.createElement(
|
|
25007
|
+
"div",
|
|
25008
|
+
_extends$j({ className: classNames("-loading", { "-active": loading }, className) }, rest),
|
|
25009
|
+
React$1.createElement(
|
|
25010
|
+
"div",
|
|
25011
|
+
{ className: "-loading-inner" },
|
|
25012
|
+
loadingText
|
|
25013
|
+
)
|
|
25014
|
+
);
|
|
25015
|
+
}, "LoadingComponent"),
|
|
24608
25016
|
NoDataComponent: _.makeTemplateComponent("rt-noData", "NoData"),
|
|
24609
25017
|
ResizerComponent: _.makeTemplateComponent("rt-resizer", "Resizer"),
|
|
24610
|
-
PadRowComponent:
|
|
25018
|
+
PadRowComponent: /* @__PURE__ */ __name(function PadRowComponent() {
|
|
25019
|
+
return React$1.createElement(
|
|
25020
|
+
"span",
|
|
25021
|
+
null,
|
|
25022
|
+
" "
|
|
25023
|
+
);
|
|
25024
|
+
}, "PadRowComponent")
|
|
24611
25025
|
};
|
|
24612
25026
|
const propTypes = {
|
|
24613
25027
|
// General
|
|
@@ -24681,46 +25095,44 @@ const propTypes = {
|
|
|
24681
25095
|
getNoDataProps: PropTypes$1.func,
|
|
24682
25096
|
getResizerProps: PropTypes$1.func,
|
|
24683
25097
|
// Global Column Defaults
|
|
24684
|
-
columns: PropTypes$1.arrayOf(
|
|
24685
|
-
|
|
24686
|
-
|
|
24687
|
-
|
|
24688
|
-
|
|
24689
|
-
|
|
24690
|
-
|
|
24691
|
-
|
|
24692
|
-
|
|
24693
|
-
|
|
24694
|
-
|
|
24695
|
-
|
|
24696
|
-
|
|
24697
|
-
|
|
24698
|
-
|
|
24699
|
-
|
|
24700
|
-
|
|
24701
|
-
|
|
24702
|
-
|
|
24703
|
-
|
|
24704
|
-
|
|
24705
|
-
|
|
24706
|
-
|
|
24707
|
-
|
|
24708
|
-
|
|
24709
|
-
|
|
24710
|
-
|
|
24711
|
-
|
|
24712
|
-
|
|
24713
|
-
|
|
24714
|
-
|
|
24715
|
-
|
|
24716
|
-
|
|
24717
|
-
|
|
24718
|
-
|
|
24719
|
-
|
|
24720
|
-
|
|
24721
|
-
|
|
24722
|
-
})
|
|
24723
|
-
),
|
|
25098
|
+
columns: PropTypes$1.arrayOf(PropTypes$1.shape({
|
|
25099
|
+
// Renderers
|
|
25100
|
+
Cell: PropTypes$1.oneOfType([PropTypes$1.element, PropTypes$1.string, PropTypes$1.func]),
|
|
25101
|
+
Header: PropTypes$1.oneOfType([PropTypes$1.element, PropTypes$1.string, PropTypes$1.func]),
|
|
25102
|
+
Footer: PropTypes$1.oneOfType([PropTypes$1.element, PropTypes$1.string, PropTypes$1.func]),
|
|
25103
|
+
Aggregated: PropTypes$1.oneOfType([PropTypes$1.element, PropTypes$1.string, PropTypes$1.func]),
|
|
25104
|
+
Pivot: PropTypes$1.oneOfType([PropTypes$1.element, PropTypes$1.string, PropTypes$1.func]),
|
|
25105
|
+
PivotValue: PropTypes$1.oneOfType([PropTypes$1.element, PropTypes$1.string, PropTypes$1.func]),
|
|
25106
|
+
Expander: PropTypes$1.oneOfType([PropTypes$1.element, PropTypes$1.string, PropTypes$1.func]),
|
|
25107
|
+
Filter: PropTypes$1.oneOfType([PropTypes$1.element, PropTypes$1.func]),
|
|
25108
|
+
// All Columns
|
|
25109
|
+
sortable: PropTypes$1.bool,
|
|
25110
|
+
// use table default
|
|
25111
|
+
resizable: PropTypes$1.bool,
|
|
25112
|
+
// use table default
|
|
25113
|
+
filterable: PropTypes$1.bool,
|
|
25114
|
+
// use table default
|
|
25115
|
+
show: PropTypes$1.bool,
|
|
25116
|
+
minWidth: PropTypes$1.number,
|
|
25117
|
+
minResizeWidth: PropTypes$1.number,
|
|
25118
|
+
// Cells only
|
|
25119
|
+
className: PropTypes$1.string,
|
|
25120
|
+
style: PropTypes$1.object,
|
|
25121
|
+
getProps: PropTypes$1.func,
|
|
25122
|
+
// Pivot only
|
|
25123
|
+
aggregate: PropTypes$1.func,
|
|
25124
|
+
// Headers only
|
|
25125
|
+
headerClassName: PropTypes$1.string,
|
|
25126
|
+
headerStyle: PropTypes$1.object,
|
|
25127
|
+
getHeaderProps: PropTypes$1.func,
|
|
25128
|
+
// Footers only
|
|
25129
|
+
footerClassName: PropTypes$1.string,
|
|
25130
|
+
footerStyle: PropTypes$1.object,
|
|
25131
|
+
getFooterProps: PropTypes$1.func,
|
|
25132
|
+
filterMethod: PropTypes$1.func,
|
|
25133
|
+
filterAll: PropTypes$1.bool,
|
|
25134
|
+
sortMethod: PropTypes$1.func
|
|
25135
|
+
})),
|
|
24724
25136
|
// Global Expander Column Defaults
|
|
24725
25137
|
expanderDefaults: PropTypes$1.shape({
|
|
24726
25138
|
sortable: PropTypes$1.bool,
|
|
@@ -24763,48 +25175,122 @@ const propTypes = {
|
|
|
24763
25175
|
ResizerComponent: PropTypes$1.elementType,
|
|
24764
25176
|
PadRowComponent: PropTypes$1.elementType
|
|
24765
25177
|
};
|
|
24766
|
-
|
|
24767
|
-
|
|
24768
|
-
|
|
24769
|
-
|
|
24770
|
-
|
|
24771
|
-
|
|
24772
|
-
|
|
24773
|
-
|
|
24774
|
-
|
|
24775
|
-
|
|
24776
|
-
|
|
24777
|
-
|
|
24778
|
-
|
|
24779
|
-
|
|
24780
|
-
|
|
24781
|
-
|
|
24782
|
-
this.sortColumn = this.sortColumn.bind(this);
|
|
24783
|
-
this.filterColumn = this.filterColumn.bind(this);
|
|
24784
|
-
this.resizeColumnStart = this.resizeColumnStart.bind(this);
|
|
24785
|
-
this.resizeColumnEnd = this.resizeColumnEnd.bind(this);
|
|
24786
|
-
this.resizeColumnMoving = this.resizeColumnMoving.bind(this);
|
|
24787
|
-
setTimeout(() => {
|
|
25178
|
+
var _slicedToArray$3 = function() {
|
|
25179
|
+
function sliceIterator(arr, i) {
|
|
25180
|
+
var _arr = [];
|
|
25181
|
+
var _n = true;
|
|
25182
|
+
var _d = false;
|
|
25183
|
+
var _e = void 0;
|
|
25184
|
+
try {
|
|
25185
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
25186
|
+
_arr.push(_s.value);
|
|
25187
|
+
if (i && _arr.length === i)
|
|
25188
|
+
break;
|
|
25189
|
+
}
|
|
25190
|
+
} catch (err) {
|
|
25191
|
+
_d = true;
|
|
25192
|
+
_e = err;
|
|
25193
|
+
} finally {
|
|
24788
25194
|
try {
|
|
24789
|
-
|
|
24790
|
-
|
|
24791
|
-
|
|
24792
|
-
|
|
24793
|
-
|
|
24794
|
-
newResized.push({
|
|
24795
|
-
id: id2,
|
|
24796
|
-
value: width
|
|
24797
|
-
});
|
|
24798
|
-
}
|
|
24799
|
-
});
|
|
24800
|
-
this.setState({
|
|
24801
|
-
resized: newResized
|
|
24802
|
-
});
|
|
24803
|
-
} catch (e2) {
|
|
24804
|
-
console.warn("TNW: Error setting initial table column widths (please contact @tnrich if you see this error. thanks!):", e2);
|
|
25195
|
+
if (!_n && _i["return"])
|
|
25196
|
+
_i["return"]();
|
|
25197
|
+
} finally {
|
|
25198
|
+
if (_d)
|
|
25199
|
+
throw _e;
|
|
24805
25200
|
}
|
|
24806
|
-
}
|
|
24807
|
-
|
|
25201
|
+
}
|
|
25202
|
+
return _arr;
|
|
25203
|
+
}
|
|
25204
|
+
__name(sliceIterator, "sliceIterator");
|
|
25205
|
+
return function(arr, i) {
|
|
25206
|
+
if (Array.isArray(arr)) {
|
|
25207
|
+
return arr;
|
|
25208
|
+
} else if (Symbol.iterator in Object(arr)) {
|
|
25209
|
+
return sliceIterator(arr, i);
|
|
25210
|
+
} else {
|
|
25211
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
25212
|
+
}
|
|
25213
|
+
};
|
|
25214
|
+
}();
|
|
25215
|
+
var _extends$i = Object.assign || function(target) {
|
|
25216
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
25217
|
+
var source = arguments[i];
|
|
25218
|
+
for (var key in source) {
|
|
25219
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
25220
|
+
target[key] = source[key];
|
|
25221
|
+
}
|
|
25222
|
+
}
|
|
25223
|
+
}
|
|
25224
|
+
return target;
|
|
25225
|
+
};
|
|
25226
|
+
var _createClass$9 = function() {
|
|
25227
|
+
function defineProperties2(target, props) {
|
|
25228
|
+
for (var i = 0; i < props.length; i++) {
|
|
25229
|
+
var descriptor2 = props[i];
|
|
25230
|
+
descriptor2.enumerable = descriptor2.enumerable || false;
|
|
25231
|
+
descriptor2.configurable = true;
|
|
25232
|
+
if ("value" in descriptor2)
|
|
25233
|
+
descriptor2.writable = true;
|
|
25234
|
+
Object.defineProperty(target, descriptor2.key, descriptor2);
|
|
25235
|
+
}
|
|
25236
|
+
}
|
|
25237
|
+
__name(defineProperties2, "defineProperties");
|
|
25238
|
+
return function(Constructor, protoProps, staticProps) {
|
|
25239
|
+
if (protoProps)
|
|
25240
|
+
defineProperties2(Constructor.prototype, protoProps);
|
|
25241
|
+
if (staticProps)
|
|
25242
|
+
defineProperties2(Constructor, staticProps);
|
|
25243
|
+
return Constructor;
|
|
25244
|
+
};
|
|
25245
|
+
}();
|
|
25246
|
+
function _classCallCheck$e(instance, Constructor) {
|
|
25247
|
+
if (!(instance instanceof Constructor)) {
|
|
25248
|
+
throw new TypeError("Cannot call a class as a function");
|
|
25249
|
+
}
|
|
25250
|
+
}
|
|
25251
|
+
__name(_classCallCheck$e, "_classCallCheck$e");
|
|
25252
|
+
function _possibleConstructorReturn$e(self2, call2) {
|
|
25253
|
+
if (!self2) {
|
|
25254
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
25255
|
+
}
|
|
25256
|
+
return call2 && (typeof call2 === "object" || typeof call2 === "function") ? call2 : self2;
|
|
25257
|
+
}
|
|
25258
|
+
__name(_possibleConstructorReturn$e, "_possibleConstructorReturn$e");
|
|
25259
|
+
function _inherits$e(subClass, superClass) {
|
|
25260
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
25261
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
25262
|
+
}
|
|
25263
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
|
|
25264
|
+
if (superClass)
|
|
25265
|
+
Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
25266
|
+
}
|
|
25267
|
+
__name(_inherits$e, "_inherits$e");
|
|
25268
|
+
var itemSizeEstimator = /* @__PURE__ */ __name(function itemSizeEstimator2() {
|
|
25269
|
+
return 41.36;
|
|
25270
|
+
}, "itemSizeEstimator");
|
|
25271
|
+
var ReactTableDefaults = defaultProps$1;
|
|
25272
|
+
var ReactTable = function(_Methods) {
|
|
25273
|
+
_inherits$e(ReactTable2, _Methods);
|
|
25274
|
+
function ReactTable2(props) {
|
|
25275
|
+
_classCallCheck$e(this, ReactTable2);
|
|
25276
|
+
var _this = _possibleConstructorReturn$e(this, (ReactTable2.__proto__ || Object.getPrototypeOf(ReactTable2)).call(this));
|
|
25277
|
+
_this.getResolvedState = _this.getResolvedState.bind(_this);
|
|
25278
|
+
_this.getDataModel = _this.getDataModel.bind(_this);
|
|
25279
|
+
_this.getSortedData = _this.getSortedData.bind(_this);
|
|
25280
|
+
_this.fireFetchData = _this.fireFetchData.bind(_this);
|
|
25281
|
+
_this.getPropOrState = _this.getPropOrState.bind(_this);
|
|
25282
|
+
_this.getStateOrProp = _this.getStateOrProp.bind(_this);
|
|
25283
|
+
_this.filterData = _this.filterData.bind(_this);
|
|
25284
|
+
_this.sortData = _this.sortData.bind(_this);
|
|
25285
|
+
_this.getMinRows = _this.getMinRows.bind(_this);
|
|
25286
|
+
_this.onPageChange = _this.onPageChange.bind(_this);
|
|
25287
|
+
_this.onPageSizeChange = _this.onPageSizeChange.bind(_this);
|
|
25288
|
+
_this.sortColumn = _this.sortColumn.bind(_this);
|
|
25289
|
+
_this.filterColumn = _this.filterColumn.bind(_this);
|
|
25290
|
+
_this.resizeColumnStart = _this.resizeColumnStart.bind(_this);
|
|
25291
|
+
_this.resizeColumnEnd = _this.resizeColumnEnd.bind(_this);
|
|
25292
|
+
_this.resizeColumnMoving = _this.resizeColumnMoving.bind(_this);
|
|
25293
|
+
_this.state = {
|
|
24808
25294
|
page: props.defaultPage,
|
|
24809
25295
|
pageSize: props.defaultPageSize,
|
|
24810
25296
|
sorted: props.defaultSorted,
|
|
@@ -24814,673 +25300,588 @@ const _ReactTable = class _ReactTable extends Methods(Lifecycle(React$1.Componen
|
|
|
24814
25300
|
currentlyResizing: false,
|
|
24815
25301
|
skipNextSort: false
|
|
24816
25302
|
};
|
|
25303
|
+
return _this;
|
|
24817
25304
|
}
|
|
24818
|
-
|
|
24819
|
-
|
|
24820
|
-
|
|
24821
|
-
|
|
24822
|
-
|
|
24823
|
-
|
|
24824
|
-
getProps,
|
|
24825
|
-
|
|
24826
|
-
|
|
24827
|
-
|
|
24828
|
-
|
|
24829
|
-
|
|
24830
|
-
|
|
24831
|
-
|
|
24832
|
-
|
|
24833
|
-
|
|
24834
|
-
|
|
24835
|
-
|
|
24836
|
-
|
|
24837
|
-
|
|
24838
|
-
|
|
24839
|
-
|
|
24840
|
-
|
|
24841
|
-
|
|
24842
|
-
|
|
24843
|
-
|
|
24844
|
-
|
|
24845
|
-
|
|
24846
|
-
|
|
24847
|
-
|
|
24848
|
-
|
|
24849
|
-
|
|
24850
|
-
|
|
24851
|
-
|
|
24852
|
-
|
|
24853
|
-
|
|
24854
|
-
|
|
24855
|
-
|
|
24856
|
-
|
|
24857
|
-
|
|
24858
|
-
|
|
24859
|
-
|
|
24860
|
-
|
|
24861
|
-
|
|
24862
|
-
|
|
24863
|
-
indexKey,
|
|
24864
|
-
groupedByPivotKey,
|
|
24865
|
-
// State
|
|
24866
|
-
loading,
|
|
24867
|
-
pageSize,
|
|
24868
|
-
page,
|
|
24869
|
-
sorted,
|
|
24870
|
-
filtered,
|
|
24871
|
-
resized,
|
|
24872
|
-
expanded,
|
|
24873
|
-
pages,
|
|
24874
|
-
onExpandedChange,
|
|
24875
|
-
// Components
|
|
24876
|
-
TableComponent,
|
|
24877
|
-
TheadComponent,
|
|
24878
|
-
TbodyComponent,
|
|
24879
|
-
additionalBodyEl,
|
|
24880
|
-
TrGroupComponent,
|
|
24881
|
-
TrComponent,
|
|
24882
|
-
ThComponent,
|
|
24883
|
-
TdComponent,
|
|
24884
|
-
TfootComponent,
|
|
24885
|
-
PaginationComponent,
|
|
24886
|
-
LoadingComponent: LoadingComponent2,
|
|
24887
|
-
SubComponent,
|
|
24888
|
-
NoDataComponent,
|
|
24889
|
-
ResizerComponent,
|
|
24890
|
-
ExpanderComponent,
|
|
24891
|
-
PivotValueComponent,
|
|
24892
|
-
PivotComponent,
|
|
24893
|
-
AggregatedComponent,
|
|
24894
|
-
FilterComponent,
|
|
24895
|
-
PadRowComponent,
|
|
24896
|
-
// Data model
|
|
24897
|
-
resolvedData,
|
|
24898
|
-
allVisibleColumns,
|
|
24899
|
-
headerGroups,
|
|
24900
|
-
hasHeaderGroups,
|
|
24901
|
-
// Sorted Data
|
|
24902
|
-
sortedData,
|
|
24903
|
-
currentlyResizing
|
|
24904
|
-
} = resolvedState;
|
|
24905
|
-
const startRow = pageSize * page;
|
|
24906
|
-
const endRow = startRow + pageSize;
|
|
24907
|
-
let pageRows = manual ? resolvedData : sortedData.slice(startRow, endRow);
|
|
24908
|
-
const minRows = this.getMinRows();
|
|
24909
|
-
const padRows = _.range(Math.max(minRows - pageRows.length, 0));
|
|
24910
|
-
const hasColumnFooter = allVisibleColumns.some((d2) => d2.Footer);
|
|
24911
|
-
const hasFilters = filterable || allVisibleColumns.some((d2) => d2.filterable);
|
|
24912
|
-
const recurseRowsViewIndex = /* @__PURE__ */ __name((rows, path2 = [], index2 = -1) => [
|
|
24913
|
-
rows.map((row, i) => {
|
|
24914
|
-
index2 += 1;
|
|
24915
|
-
const rowWithViewIndex = __spreadProps(__spreadValues({}, row), {
|
|
24916
|
-
_viewIndex: index2
|
|
24917
|
-
});
|
|
24918
|
-
const newPath = path2.concat([i]);
|
|
24919
|
-
if (rowWithViewIndex[subRowsKey] && _.get(expanded, newPath)) {
|
|
24920
|
-
[rowWithViewIndex[subRowsKey], index2] = recurseRowsViewIndex(
|
|
24921
|
-
rowWithViewIndex[subRowsKey],
|
|
24922
|
-
newPath,
|
|
24923
|
-
index2
|
|
24924
|
-
);
|
|
24925
|
-
}
|
|
24926
|
-
return rowWithViewIndex;
|
|
24927
|
-
}),
|
|
24928
|
-
index2
|
|
24929
|
-
], "recurseRowsViewIndex");
|
|
24930
|
-
[pageRows] = recurseRowsViewIndex(pageRows);
|
|
24931
|
-
const canPrevious = page > 0;
|
|
24932
|
-
const canNext = page + 1 < pages;
|
|
24933
|
-
const rowMinWidth = _.sum(
|
|
24934
|
-
allVisibleColumns.map((d2) => {
|
|
24935
|
-
const resizedColumn = resized.find((x2) => x2.id === d2.id) || {};
|
|
25305
|
+
__name(ReactTable2, "ReactTable");
|
|
25306
|
+
_createClass$9(ReactTable2, [{
|
|
25307
|
+
key: "render",
|
|
25308
|
+
value: /* @__PURE__ */ __name(function render3() {
|
|
25309
|
+
var _this2 = this;
|
|
25310
|
+
var resolvedState = this.getResolvedState();
|
|
25311
|
+
var children = resolvedState.children, className = resolvedState.className, style2 = resolvedState.style, getProps = resolvedState.getProps, getTableProps = resolvedState.getTableProps, getTheadGroupProps = resolvedState.getTheadGroupProps, getTheadGroupTrProps = resolvedState.getTheadGroupTrProps, getTheadGroupThProps = resolvedState.getTheadGroupThProps, getTheadProps = resolvedState.getTheadProps, getTheadTrProps = resolvedState.getTheadTrProps, getTheadThProps = resolvedState.getTheadThProps, getTheadFilterProps = resolvedState.getTheadFilterProps, getTheadFilterTrProps = resolvedState.getTheadFilterTrProps, getTheadFilterThProps = resolvedState.getTheadFilterThProps, getTbodyProps = resolvedState.getTbodyProps, getTrGroupProps = resolvedState.getTrGroupProps, getTrProps = resolvedState.getTrProps, getTdProps = resolvedState.getTdProps, getTfootProps = resolvedState.getTfootProps, getTfootTrProps = resolvedState.getTfootTrProps, getTfootTdProps = resolvedState.getTfootTdProps, getPaginationProps = resolvedState.getPaginationProps, getLoadingProps = resolvedState.getLoadingProps, getNoDataProps = resolvedState.getNoDataProps, getResizerProps = resolvedState.getResizerProps, showPagination = resolvedState.showPagination, showPaginationTop = resolvedState.showPaginationTop, showPaginationBottom = resolvedState.showPaginationBottom, manual = resolvedState.manual, loadingText = resolvedState.loadingText, noDataText = resolvedState.noDataText, sortable = resolvedState.sortable, multiSort = resolvedState.multiSort, resizable = resolvedState.resizable, filterable = resolvedState.filterable, pivotIDKey = resolvedState.pivotIDKey, pivotValKey = resolvedState.pivotValKey, pivotBy = resolvedState.pivotBy, subRowsKey = resolvedState.subRowsKey, aggregatedKey = resolvedState.aggregatedKey, originalKey = resolvedState.originalKey, indexKey = resolvedState.indexKey, groupedByPivotKey = resolvedState.groupedByPivotKey, loading = resolvedState.loading, pageSize = resolvedState.pageSize, page = resolvedState.page, sorted = resolvedState.sorted, filtered = resolvedState.filtered, resized = resolvedState.resized, expanded = resolvedState.expanded, pages = resolvedState.pages, onExpandedChange = resolvedState.onExpandedChange, TableComponent2 = resolvedState.TableComponent, TheadComponent = resolvedState.TheadComponent, TbodyComponent = resolvedState.TbodyComponent, additionalBodyEl = resolvedState.additionalBodyEl, TrGroupComponent2 = resolvedState.TrGroupComponent, TrComponent2 = resolvedState.TrComponent, ThComponent2 = resolvedState.ThComponent, TdComponent2 = resolvedState.TdComponent, TfootComponent = resolvedState.TfootComponent, PaginationComponent = resolvedState.PaginationComponent, LoadingComponent3 = resolvedState.LoadingComponent, SubComponent = resolvedState.SubComponent, NoDataComponent = resolvedState.NoDataComponent, ResizerComponent = resolvedState.ResizerComponent, ExpanderComponent2 = resolvedState.ExpanderComponent, PivotValueComponent2 = resolvedState.PivotValueComponent, PivotComponent = resolvedState.PivotComponent, AggregatedComponent2 = resolvedState.AggregatedComponent, FilterComponent2 = resolvedState.FilterComponent, PadRowComponent2 = resolvedState.PadRowComponent, resolvedData = resolvedState.resolvedData, allVisibleColumns = resolvedState.allVisibleColumns, headerGroups = resolvedState.headerGroups, hasHeaderGroups = resolvedState.hasHeaderGroups, sortedData = resolvedState.sortedData, currentlyResizing = resolvedState.currentlyResizing;
|
|
25312
|
+
var startRow = pageSize * page;
|
|
25313
|
+
var endRow = startRow + pageSize;
|
|
25314
|
+
var pageRows = manual ? resolvedData : sortedData.slice(startRow, endRow);
|
|
25315
|
+
var minRows = this.getMinRows();
|
|
25316
|
+
var padRows = _.range(Math.max(minRows - pageRows.length, 0));
|
|
25317
|
+
var hasColumnFooter = allVisibleColumns.some(function(d2) {
|
|
25318
|
+
return d2.Footer;
|
|
25319
|
+
});
|
|
25320
|
+
var hasFilters = filterable || allVisibleColumns.some(function(d2) {
|
|
25321
|
+
return d2.filterable;
|
|
25322
|
+
});
|
|
25323
|
+
var recurseRowsViewIndex = /* @__PURE__ */ __name(function recurseRowsViewIndex2(rows) {
|
|
25324
|
+
var path2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
25325
|
+
var index2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1;
|
|
25326
|
+
return [rows.map(function(row, i) {
|
|
25327
|
+
index2 += 1;
|
|
25328
|
+
var rowWithViewIndex = _extends$i({}, row, {
|
|
25329
|
+
_viewIndex: index2
|
|
25330
|
+
});
|
|
25331
|
+
var newPath = path2.concat([i]);
|
|
25332
|
+
if (rowWithViewIndex[subRowsKey] && _.get(expanded, newPath)) {
|
|
25333
|
+
var _recurseRowsViewIndex = recurseRowsViewIndex2(rowWithViewIndex[subRowsKey], newPath, index2);
|
|
25334
|
+
var _recurseRowsViewIndex2 = _slicedToArray$3(_recurseRowsViewIndex, 2);
|
|
25335
|
+
rowWithViewIndex[subRowsKey] = _recurseRowsViewIndex2[0];
|
|
25336
|
+
index2 = _recurseRowsViewIndex2[1];
|
|
25337
|
+
}
|
|
25338
|
+
return rowWithViewIndex;
|
|
25339
|
+
}), index2];
|
|
25340
|
+
}, "recurseRowsViewIndex");
|
|
25341
|
+
var _recurseRowsViewIndex3 = recurseRowsViewIndex(pageRows);
|
|
25342
|
+
var _recurseRowsViewIndex4 = _slicedToArray$3(_recurseRowsViewIndex3, 1);
|
|
25343
|
+
pageRows = _recurseRowsViewIndex4[0];
|
|
25344
|
+
var canPrevious = page > 0;
|
|
25345
|
+
var canNext = page + 1 < pages;
|
|
25346
|
+
var rowMinWidth = _.sum(allVisibleColumns.map(function(d2) {
|
|
25347
|
+
var resizedColumn = resized.find(function(x2) {
|
|
25348
|
+
return x2.id === d2.id;
|
|
25349
|
+
}) || {};
|
|
24936
25350
|
return _.getFirstDefined(resizedColumn.value, d2.width, d2.minWidth);
|
|
24937
|
-
})
|
|
24938
|
-
|
|
24939
|
-
|
|
24940
|
-
|
|
24941
|
-
|
|
24942
|
-
|
|
24943
|
-
|
|
24944
|
-
|
|
24945
|
-
|
|
24946
|
-
|
|
24947
|
-
|
|
24948
|
-
|
|
24949
|
-
|
|
24950
|
-
|
|
24951
|
-
|
|
24952
|
-
|
|
24953
|
-
|
|
24954
|
-
|
|
24955
|
-
|
|
24956
|
-
|
|
24957
|
-
|
|
24958
|
-
|
|
24959
|
-
|
|
24960
|
-
|
|
24961
|
-
|
|
24962
|
-
|
|
24963
|
-
|
|
24964
|
-
|
|
24965
|
-
|
|
24966
|
-
|
|
24967
|
-
|
|
24968
|
-
|
|
24969
|
-
|
|
24970
|
-
|
|
24971
|
-
column.getHeaderProps(finalState, void 0, column,
|
|
24972
|
-
|
|
24973
|
-
|
|
24974
|
-
|
|
24975
|
-
|
|
24976
|
-
|
|
24977
|
-
|
|
24978
|
-
|
|
24979
|
-
|
|
24980
|
-
|
|
24981
|
-
|
|
24982
|
-
|
|
24983
|
-
|
|
24984
|
-
|
|
24985
|
-
|
|
24986
|
-
|
|
24987
|
-
|
|
24988
|
-
|
|
24989
|
-
|
|
24990
|
-
style: __spreadValues(__spreadValues({}, styles2), flexStyles)
|
|
24991
|
-
}, rest),
|
|
24992
|
-
_.normalizeComponent(column.Header, {
|
|
24993
|
-
data: sortedData,
|
|
24994
|
-
column
|
|
24995
|
-
})
|
|
24996
|
-
);
|
|
24997
|
-
}, "makeHeaderGroup");
|
|
24998
|
-
const makeHeaderGroups = /* @__PURE__ */ __name(() => {
|
|
24999
|
-
const theadGroupProps = _.splitProps(
|
|
25000
|
-
getTheadGroupProps(finalState, void 0, void 0, this)
|
|
25001
|
-
);
|
|
25002
|
-
const theadGroupTrProps = _.splitProps(
|
|
25003
|
-
getTheadGroupTrProps(finalState, void 0, void 0, this)
|
|
25004
|
-
);
|
|
25005
|
-
return /* @__PURE__ */ React$1.createElement(
|
|
25006
|
-
TheadComponent,
|
|
25007
|
-
__spreadValues({
|
|
25008
|
-
className: classNames("-headerGroups", theadGroupProps.className),
|
|
25009
|
-
style: __spreadProps(__spreadValues({}, theadGroupProps.style), {
|
|
25010
|
-
minWidth: `${rowMinWidth}px`
|
|
25351
|
+
}));
|
|
25352
|
+
var rowIndex = -1;
|
|
25353
|
+
var finalState = _extends$i({}, resolvedState, {
|
|
25354
|
+
startRow,
|
|
25355
|
+
endRow,
|
|
25356
|
+
pageRows,
|
|
25357
|
+
minRows,
|
|
25358
|
+
padRows,
|
|
25359
|
+
hasColumnFooter,
|
|
25360
|
+
canPrevious,
|
|
25361
|
+
canNext,
|
|
25362
|
+
rowMinWidth
|
|
25363
|
+
});
|
|
25364
|
+
var rootProps = _.splitProps(getProps(finalState, void 0, void 0, this));
|
|
25365
|
+
var tableProps = _.splitProps(getTableProps(finalState, void 0, void 0, this));
|
|
25366
|
+
var tBodyProps = _.splitProps(getTbodyProps(finalState, void 0, void 0, this));
|
|
25367
|
+
var loadingProps = getLoadingProps(finalState, void 0, void 0, this);
|
|
25368
|
+
var noDataProps = getNoDataProps(finalState, void 0, void 0, this);
|
|
25369
|
+
var makeHeaderGroup = /* @__PURE__ */ __name(function makeHeaderGroup2(column, i) {
|
|
25370
|
+
var resizedValue = /* @__PURE__ */ __name(function resizedValue2(col) {
|
|
25371
|
+
return (resized.find(function(x2) {
|
|
25372
|
+
return x2.id === col.id;
|
|
25373
|
+
}) || {}).value;
|
|
25374
|
+
}, "resizedValue");
|
|
25375
|
+
var flex2 = _.sum(column.columns.map(function(col) {
|
|
25376
|
+
return col.width || resizedValue(col) ? 0 : col.minWidth;
|
|
25377
|
+
}));
|
|
25378
|
+
var width = _.sum(column.columns.map(function(col) {
|
|
25379
|
+
return _.getFirstDefined(resizedValue(col), col.width, col.minWidth);
|
|
25380
|
+
}));
|
|
25381
|
+
var maxWidth = _.sum(column.columns.map(function(col) {
|
|
25382
|
+
return _.getFirstDefined(resizedValue(col), col.width, col.maxWidth);
|
|
25383
|
+
}));
|
|
25384
|
+
var theadGroupThProps = _.splitProps(getTheadGroupThProps(finalState, void 0, column, _this2));
|
|
25385
|
+
var columnHeaderProps = _.splitProps(column.getHeaderProps(finalState, void 0, column, _this2));
|
|
25386
|
+
var classes = [column.headerClassName, theadGroupThProps.className, columnHeaderProps.className];
|
|
25387
|
+
var styles2 = _extends$i({}, column.headerStyle, theadGroupThProps.style, columnHeaderProps.style);
|
|
25388
|
+
var rest = _extends$i({}, theadGroupThProps.rest, columnHeaderProps.rest);
|
|
25389
|
+
var flexStyles = {
|
|
25390
|
+
flex: flex2 + " 0 auto",
|
|
25391
|
+
width: _.asPx(width),
|
|
25392
|
+
maxWidth: _.asPx(maxWidth)
|
|
25393
|
+
};
|
|
25394
|
+
return React$1.createElement(
|
|
25395
|
+
ThComponent2,
|
|
25396
|
+
_extends$i({
|
|
25397
|
+
key: i + "-" + column.id,
|
|
25398
|
+
className: classNames(classes),
|
|
25399
|
+
style: _extends$i({}, styles2, flexStyles)
|
|
25400
|
+
}, rest),
|
|
25401
|
+
_.normalizeComponent(column.Header, {
|
|
25402
|
+
data: sortedData,
|
|
25403
|
+
column
|
|
25011
25404
|
})
|
|
25012
|
-
|
|
25013
|
-
|
|
25014
|
-
|
|
25015
|
-
|
|
25016
|
-
|
|
25017
|
-
|
|
25018
|
-
|
|
25019
|
-
|
|
25020
|
-
|
|
25021
|
-
|
|
25022
|
-
|
|
25023
|
-
|
|
25024
|
-
|
|
25025
|
-
|
|
25026
|
-
|
|
25027
|
-
|
|
25028
|
-
|
|
25029
|
-
|
|
25030
|
-
|
|
25031
|
-
|
|
25032
|
-
|
|
25033
|
-
|
|
25034
|
-
|
|
25035
|
-
|
|
25036
|
-
|
|
25037
|
-
|
|
25038
|
-
|
|
25039
|
-
|
|
25040
|
-
|
|
25041
|
-
|
|
25042
|
-
|
|
25043
|
-
|
|
25044
|
-
|
|
25045
|
-
|
|
25046
|
-
|
|
25047
|
-
|
|
25048
|
-
|
|
25049
|
-
|
|
25050
|
-
|
|
25051
|
-
|
|
25052
|
-
|
|
25053
|
-
|
|
25054
|
-
|
|
25055
|
-
|
|
25405
|
+
);
|
|
25406
|
+
}, "makeHeaderGroup");
|
|
25407
|
+
var makeHeaderGroups = /* @__PURE__ */ __name(function makeHeaderGroups2() {
|
|
25408
|
+
var theadGroupProps = _.splitProps(getTheadGroupProps(finalState, void 0, void 0, _this2));
|
|
25409
|
+
var theadGroupTrProps = _.splitProps(getTheadGroupTrProps(finalState, void 0, void 0, _this2));
|
|
25410
|
+
return React$1.createElement(
|
|
25411
|
+
TheadComponent,
|
|
25412
|
+
_extends$i({
|
|
25413
|
+
className: classNames("-headerGroups", theadGroupProps.className),
|
|
25414
|
+
style: _extends$i({}, theadGroupProps.style, {
|
|
25415
|
+
minWidth: rowMinWidth + "px"
|
|
25416
|
+
})
|
|
25417
|
+
}, theadGroupProps.rest),
|
|
25418
|
+
React$1.createElement(
|
|
25419
|
+
TrComponent2,
|
|
25420
|
+
_extends$i({
|
|
25421
|
+
className: theadGroupTrProps.className,
|
|
25422
|
+
style: theadGroupTrProps.style
|
|
25423
|
+
}, theadGroupTrProps.rest),
|
|
25424
|
+
headerGroups.map(makeHeaderGroup)
|
|
25425
|
+
)
|
|
25426
|
+
);
|
|
25427
|
+
}, "makeHeaderGroups");
|
|
25428
|
+
var makeHeader = /* @__PURE__ */ __name(function makeHeader2(column, i) {
|
|
25429
|
+
var resizedCol = resized.find(function(x2) {
|
|
25430
|
+
return x2.id === column.id;
|
|
25431
|
+
}) || {};
|
|
25432
|
+
var sort2 = sorted.find(function(d2) {
|
|
25433
|
+
return d2.id === column.id;
|
|
25434
|
+
});
|
|
25435
|
+
var show = typeof column.show === "function" ? column.show() : column.show;
|
|
25436
|
+
var width = _.getFirstDefined(resizedCol.value, column.width, column.minWidth);
|
|
25437
|
+
var maxWidth = _.getFirstDefined(resizedCol.value, column.width, column.maxWidth);
|
|
25438
|
+
var theadThProps = _.splitProps(getTheadThProps(finalState, void 0, column, _this2));
|
|
25439
|
+
var columnHeaderProps = _.splitProps(column.getHeaderProps(finalState, void 0, column, _this2));
|
|
25440
|
+
var classes = [column.headerClassName, theadThProps.className, columnHeaderProps.className];
|
|
25441
|
+
var styles2 = _extends$i({}, column.headerStyle, theadThProps.style, columnHeaderProps.style);
|
|
25442
|
+
var rest = _extends$i({}, theadThProps.rest, columnHeaderProps.rest);
|
|
25443
|
+
var isResizable = _.getFirstDefined(column.resizable, resizable, false);
|
|
25444
|
+
var resizer = isResizable ? React$1.createElement(ResizerComponent, _extends$i({
|
|
25445
|
+
onMouseDown: /* @__PURE__ */ __name(function onMouseDown2(e2) {
|
|
25446
|
+
return _this2.resizeColumnStart(e2, column, false);
|
|
25447
|
+
}, "onMouseDown"),
|
|
25448
|
+
onTouchStart: /* @__PURE__ */ __name(function onTouchStart(e2) {
|
|
25449
|
+
return _this2.resizeColumnStart(e2, column, true);
|
|
25450
|
+
}, "onTouchStart")
|
|
25451
|
+
}, getResizerProps("finalState", void 0, column, _this2))) : null;
|
|
25452
|
+
var isSortable = _.getFirstDefined(column.sortable, sortable, false);
|
|
25453
|
+
return React$1.createElement(
|
|
25454
|
+
ThComponent2,
|
|
25455
|
+
_extends$i({
|
|
25456
|
+
key: i + "-" + column.id,
|
|
25457
|
+
className: classNames(classes, isResizable && "rt-resizable-header", sort2 ? sort2.desc ? "-sort-desc" : "-sort-asc" : "", isSortable && "-cursor-pointer", !show && "-hidden", pivotBy && pivotBy.slice(0, -1).includes(column.id) && "rt-header-pivot"),
|
|
25458
|
+
style: _extends$i({}, styles2, {
|
|
25459
|
+
flex: width + " 0 auto",
|
|
25460
|
+
width: _.asPx(width),
|
|
25461
|
+
maxWidth: _.asPx(maxWidth)
|
|
25462
|
+
}),
|
|
25463
|
+
toggleSort: /* @__PURE__ */ __name(function toggleSort(e2) {
|
|
25464
|
+
if (isSortable)
|
|
25465
|
+
_this2.sortColumn(column, multiSort ? e2.shiftKey : false);
|
|
25466
|
+
}, "toggleSort")
|
|
25467
|
+
}, rest),
|
|
25468
|
+
React$1.createElement(
|
|
25469
|
+
"div",
|
|
25470
|
+
{ className: classNames(isResizable && "rt-resizable-header-content") },
|
|
25471
|
+
_.normalizeComponent(column.Header, {
|
|
25472
|
+
data: sortedData,
|
|
25473
|
+
column
|
|
25474
|
+
})
|
|
25056
25475
|
),
|
|
25057
|
-
|
|
25058
|
-
|
|
25059
|
-
|
|
25060
|
-
|
|
25061
|
-
|
|
25062
|
-
|
|
25063
|
-
|
|
25064
|
-
|
|
25065
|
-
|
|
25066
|
-
|
|
25067
|
-
|
|
25068
|
-
|
|
25069
|
-
|
|
25070
|
-
|
|
25071
|
-
|
|
25072
|
-
|
|
25073
|
-
|
|
25074
|
-
|
|
25075
|
-
|
|
25076
|
-
|
|
25077
|
-
|
|
25078
|
-
|
|
25079
|
-
|
|
25080
|
-
|
|
25081
|
-
|
|
25082
|
-
|
|
25083
|
-
|
|
25084
|
-
}
|
|
25085
|
-
|
|
25086
|
-
|
|
25087
|
-
|
|
25088
|
-
|
|
25089
|
-
|
|
25090
|
-
|
|
25091
|
-
|
|
25092
|
-
)
|
|
25093
|
-
|
|
25094
|
-
|
|
25095
|
-
|
|
25096
|
-
|
|
25097
|
-
|
|
25098
|
-
|
|
25099
|
-
|
|
25100
|
-
|
|
25101
|
-
|
|
25102
|
-
|
|
25103
|
-
|
|
25104
|
-
|
|
25105
|
-
|
|
25106
|
-
|
|
25107
|
-
|
|
25108
|
-
|
|
25109
|
-
];
|
|
25110
|
-
const styles2 = __spreadValues(__spreadValues(__spreadValues({}, column.headerStyle), theadFilterThProps.style), columnHeaderProps.style);
|
|
25111
|
-
const rest = __spreadValues(__spreadValues({}, theadFilterThProps.rest), columnHeaderProps.rest);
|
|
25112
|
-
const filter = filtered.find((filter2) => filter2.id === column.id);
|
|
25113
|
-
const ResolvedFilterComponent = column.Filter || FilterComponent;
|
|
25114
|
-
const isFilterable = _.getFirstDefined(column.filterable, filterable, false);
|
|
25115
|
-
return /* @__PURE__ */ React$1.createElement(
|
|
25116
|
-
ThComponent,
|
|
25117
|
-
__spreadValues({
|
|
25118
|
-
key: `${i}-${column.id}`,
|
|
25119
|
-
className: classNames(classes),
|
|
25120
|
-
style: __spreadProps(__spreadValues({}, styles2), {
|
|
25121
|
-
flex: `${width} 0 auto`,
|
|
25122
|
-
width: _.asPx(width),
|
|
25123
|
-
maxWidth: _.asPx(maxWidth)
|
|
25124
|
-
})
|
|
25125
|
-
}, rest),
|
|
25126
|
-
isFilterable ? _.normalizeComponent(
|
|
25127
|
-
ResolvedFilterComponent,
|
|
25128
|
-
{
|
|
25476
|
+
resizer
|
|
25477
|
+
);
|
|
25478
|
+
}, "makeHeader");
|
|
25479
|
+
var makeHeaders = /* @__PURE__ */ __name(function makeHeaders2() {
|
|
25480
|
+
var theadProps = _.splitProps(getTheadProps(finalState, void 0, void 0, _this2));
|
|
25481
|
+
var theadTrProps = _.splitProps(getTheadTrProps(finalState, void 0, void 0, _this2));
|
|
25482
|
+
return React$1.createElement(
|
|
25483
|
+
TheadComponent,
|
|
25484
|
+
_extends$i({
|
|
25485
|
+
className: classNames("-header", theadProps.className),
|
|
25486
|
+
style: _extends$i({}, theadProps.style, {
|
|
25487
|
+
minWidth: rowMinWidth + "px"
|
|
25488
|
+
})
|
|
25489
|
+
}, theadProps.rest),
|
|
25490
|
+
React$1.createElement(
|
|
25491
|
+
TrComponent2,
|
|
25492
|
+
_extends$i({
|
|
25493
|
+
className: theadTrProps.className,
|
|
25494
|
+
style: theadTrProps.style
|
|
25495
|
+
}, theadTrProps.rest),
|
|
25496
|
+
allVisibleColumns.map(makeHeader)
|
|
25497
|
+
)
|
|
25498
|
+
);
|
|
25499
|
+
}, "makeHeaders");
|
|
25500
|
+
var makeFilter = /* @__PURE__ */ __name(function makeFilter2(column, i) {
|
|
25501
|
+
var resizedCol = resized.find(function(x2) {
|
|
25502
|
+
return x2.id === column.id;
|
|
25503
|
+
}) || {};
|
|
25504
|
+
var width = _.getFirstDefined(resizedCol.value, column.width, column.minWidth);
|
|
25505
|
+
var maxWidth = _.getFirstDefined(resizedCol.value, column.width, column.maxWidth);
|
|
25506
|
+
var theadFilterThProps = _.splitProps(getTheadFilterThProps(finalState, void 0, column, _this2));
|
|
25507
|
+
var columnHeaderProps = _.splitProps(column.getHeaderProps(finalState, void 0, column, _this2));
|
|
25508
|
+
var classes = [column.headerClassName, theadFilterThProps.className, columnHeaderProps.className];
|
|
25509
|
+
var styles2 = _extends$i({}, column.headerStyle, theadFilterThProps.style, columnHeaderProps.style);
|
|
25510
|
+
var rest = _extends$i({}, theadFilterThProps.rest, columnHeaderProps.rest);
|
|
25511
|
+
var filter = filtered.find(function(filter2) {
|
|
25512
|
+
return filter2.id === column.id;
|
|
25513
|
+
});
|
|
25514
|
+
var ResolvedFilterComponent = column.Filter || FilterComponent2;
|
|
25515
|
+
var isFilterable = _.getFirstDefined(column.filterable, filterable, false);
|
|
25516
|
+
return React$1.createElement(
|
|
25517
|
+
ThComponent2,
|
|
25518
|
+
_extends$i({
|
|
25519
|
+
key: i + "-" + column.id,
|
|
25520
|
+
className: classNames(classes),
|
|
25521
|
+
style: _extends$i({}, styles2, {
|
|
25522
|
+
flex: width + " 0 auto",
|
|
25523
|
+
width: _.asPx(width),
|
|
25524
|
+
maxWidth: _.asPx(maxWidth)
|
|
25525
|
+
})
|
|
25526
|
+
}, rest),
|
|
25527
|
+
isFilterable ? _.normalizeComponent(ResolvedFilterComponent, {
|
|
25129
25528
|
column,
|
|
25130
25529
|
filter,
|
|
25131
|
-
onChange:
|
|
25132
|
-
|
|
25133
|
-
|
|
25134
|
-
|
|
25135
|
-
|
|
25136
|
-
|
|
25137
|
-
|
|
25138
|
-
|
|
25139
|
-
|
|
25140
|
-
|
|
25141
|
-
|
|
25142
|
-
|
|
25143
|
-
|
|
25144
|
-
|
|
25145
|
-
|
|
25146
|
-
|
|
25147
|
-
|
|
25148
|
-
|
|
25149
|
-
|
|
25150
|
-
|
|
25151
|
-
|
|
25152
|
-
|
|
25153
|
-
|
|
25154
|
-
|
|
25155
|
-
|
|
25156
|
-
|
|
25157
|
-
|
|
25158
|
-
|
|
25159
|
-
|
|
25160
|
-
|
|
25161
|
-
|
|
25162
|
-
|
|
25163
|
-
|
|
25164
|
-
|
|
25165
|
-
|
|
25166
|
-
|
|
25167
|
-
|
|
25168
|
-
|
|
25169
|
-
|
|
25170
|
-
|
|
25171
|
-
|
|
25172
|
-
|
|
25173
|
-
|
|
25174
|
-
|
|
25175
|
-
|
|
25176
|
-
|
|
25177
|
-
|
|
25178
|
-
|
|
25179
|
-
|
|
25180
|
-
|
|
25181
|
-
|
|
25182
|
-
|
|
25183
|
-
|
|
25184
|
-
|
|
25185
|
-
|
|
25186
|
-
|
|
25187
|
-
|
|
25188
|
-
|
|
25189
|
-
|
|
25190
|
-
|
|
25191
|
-
|
|
25192
|
-
|
|
25193
|
-
|
|
25194
|
-
|
|
25195
|
-
|
|
25196
|
-
|
|
25197
|
-
|
|
25198
|
-
|
|
25199
|
-
|
|
25200
|
-
|
|
25201
|
-
|
|
25202
|
-
|
|
25203
|
-
|
|
25204
|
-
|
|
25205
|
-
|
|
25206
|
-
|
|
25207
|
-
|
|
25208
|
-
|
|
25209
|
-
|
|
25210
|
-
|
|
25211
|
-
|
|
25212
|
-
|
|
25213
|
-
|
|
25214
|
-
|
|
25215
|
-
|
|
25216
|
-
|
|
25217
|
-
|
|
25218
|
-
|
|
25219
|
-
|
|
25220
|
-
|
|
25221
|
-
|
|
25222
|
-
|
|
25223
|
-
|
|
25224
|
-
|
|
25225
|
-
|
|
25226
|
-
|
|
25227
|
-
|
|
25228
|
-
|
|
25229
|
-
|
|
25230
|
-
|
|
25231
|
-
|
|
25232
|
-
|
|
25233
|
-
|
|
25234
|
-
|
|
25235
|
-
|
|
25236
|
-
|
|
25237
|
-
|
|
25238
|
-
|
|
25239
|
-
|
|
25240
|
-
|
|
25241
|
-
|
|
25242
|
-
|
|
25243
|
-
|
|
25244
|
-
|
|
25245
|
-
|
|
25246
|
-
|
|
25247
|
-
value: row[pivotValKey]
|
|
25248
|
-
}),
|
|
25249
|
-
row[pivotValKey]
|
|
25250
|
-
);
|
|
25251
|
-
} else if (isPreview) {
|
|
25252
|
-
resolvedCell = _.normalizeComponent(ResolvedAggregatedComponent, cellInfo, value);
|
|
25253
|
-
} else {
|
|
25254
|
-
resolvedCell = null;
|
|
25255
|
-
}
|
|
25256
|
-
} else if (cellInfo.aggregated) {
|
|
25257
|
-
resolvedCell = _.normalizeComponent(ResolvedAggregatedComponent, cellInfo, value);
|
|
25258
|
-
}
|
|
25259
|
-
if (cellInfo.expander) {
|
|
25260
|
-
resolvedCell = _.normalizeComponent(
|
|
25261
|
-
ResolvedExpanderComponent,
|
|
25262
|
-
cellInfo,
|
|
25263
|
-
row[pivotValKey]
|
|
25264
|
-
);
|
|
25265
|
-
if (pivotBy) {
|
|
25266
|
-
if (cellInfo.groupedByPivot) {
|
|
25267
|
-
resolvedCell = null;
|
|
25530
|
+
onChange: /* @__PURE__ */ __name(function onChange(value) {
|
|
25531
|
+
return _this2.filterColumn(column, value);
|
|
25532
|
+
}, "onChange")
|
|
25533
|
+
}, defaultProps$1.column.Filter) : null
|
|
25534
|
+
);
|
|
25535
|
+
}, "makeFilter");
|
|
25536
|
+
var makeFilters = /* @__PURE__ */ __name(function makeFilters2() {
|
|
25537
|
+
var theadFilterProps = _.splitProps(getTheadFilterProps(finalState, void 0, void 0, _this2));
|
|
25538
|
+
var theadFilterTrProps = _.splitProps(getTheadFilterTrProps(finalState, void 0, void 0, _this2));
|
|
25539
|
+
return React$1.createElement(
|
|
25540
|
+
TheadComponent,
|
|
25541
|
+
_extends$i({
|
|
25542
|
+
className: classNames("-filters", theadFilterProps.className),
|
|
25543
|
+
style: _extends$i({}, theadFilterProps.style, {
|
|
25544
|
+
minWidth: rowMinWidth + "px"
|
|
25545
|
+
})
|
|
25546
|
+
}, theadFilterProps.rest),
|
|
25547
|
+
React$1.createElement(
|
|
25548
|
+
TrComponent2,
|
|
25549
|
+
_extends$i({
|
|
25550
|
+
className: theadFilterTrProps.className,
|
|
25551
|
+
style: theadFilterTrProps.style
|
|
25552
|
+
}, theadFilterTrProps.rest),
|
|
25553
|
+
allVisibleColumns.map(makeFilter)
|
|
25554
|
+
)
|
|
25555
|
+
);
|
|
25556
|
+
}, "makeFilters");
|
|
25557
|
+
var makePageRow = /* @__PURE__ */ __name(function makePageRow2(row, i) {
|
|
25558
|
+
var path2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
25559
|
+
var rowInfo = {
|
|
25560
|
+
original: row[originalKey],
|
|
25561
|
+
row,
|
|
25562
|
+
index: row[indexKey],
|
|
25563
|
+
viewIndex: rowIndex += 1,
|
|
25564
|
+
pageSize,
|
|
25565
|
+
page,
|
|
25566
|
+
level: path2.length,
|
|
25567
|
+
nestingPath: path2.concat([i]),
|
|
25568
|
+
aggregated: row[aggregatedKey],
|
|
25569
|
+
groupedByPivot: row[groupedByPivotKey],
|
|
25570
|
+
subRows: row[subRowsKey]
|
|
25571
|
+
};
|
|
25572
|
+
var isExpanded = _.get(expanded, rowInfo.nestingPath);
|
|
25573
|
+
var trGroupProps = getTrGroupProps(finalState, rowInfo, void 0, _this2);
|
|
25574
|
+
var trProps = _.splitProps(getTrProps(finalState, rowInfo, void 0, _this2));
|
|
25575
|
+
return React$1.createElement(
|
|
25576
|
+
TrGroupComponent2,
|
|
25577
|
+
_extends$i({ key: rowInfo.nestingPath.join("_") }, trGroupProps),
|
|
25578
|
+
React$1.createElement(
|
|
25579
|
+
TrComponent2,
|
|
25580
|
+
_extends$i({
|
|
25581
|
+
className: classNames(trProps.className, row._viewIndex % 2 ? "-even" : "-odd"),
|
|
25582
|
+
style: trProps.style
|
|
25583
|
+
}, trProps.rest),
|
|
25584
|
+
allVisibleColumns.map(function(column, i2) {
|
|
25585
|
+
var resizedCol = resized.find(function(x2) {
|
|
25586
|
+
return x2.id === column.id;
|
|
25587
|
+
}) || {};
|
|
25588
|
+
var show = typeof column.show === "function" ? column.show() : column.show;
|
|
25589
|
+
var width = _.getFirstDefined(resizedCol.value, column.width, column.minWidth);
|
|
25590
|
+
var maxWidth = _.getFirstDefined(resizedCol.value, column.width, column.maxWidth);
|
|
25591
|
+
var tdProps = _.splitProps(getTdProps(finalState, rowInfo, column, _this2));
|
|
25592
|
+
var columnProps = _.splitProps(column.getProps(finalState, rowInfo, column, _this2));
|
|
25593
|
+
var classes = [tdProps.className, column.className, columnProps.className];
|
|
25594
|
+
var styles2 = _extends$i({}, tdProps.style, column.style, columnProps.style);
|
|
25595
|
+
var cellInfo = _extends$i({}, rowInfo, {
|
|
25596
|
+
isExpanded,
|
|
25597
|
+
column: _extends$i({}, column),
|
|
25598
|
+
value: rowInfo.row[column.id],
|
|
25599
|
+
pivoted: column.pivoted,
|
|
25600
|
+
expander: column.expander,
|
|
25601
|
+
resized,
|
|
25602
|
+
show,
|
|
25603
|
+
width,
|
|
25604
|
+
maxWidth,
|
|
25605
|
+
tdProps,
|
|
25606
|
+
columnProps,
|
|
25607
|
+
classes,
|
|
25608
|
+
styles: styles2
|
|
25609
|
+
});
|
|
25610
|
+
var value = cellInfo.value;
|
|
25611
|
+
var useOnExpanderClick = void 0;
|
|
25612
|
+
var isBranch = void 0;
|
|
25613
|
+
var isPreview = void 0;
|
|
25614
|
+
var onExpanderClick = /* @__PURE__ */ __name(function onExpanderClick2(e2) {
|
|
25615
|
+
var newExpanded = _.clone(expanded);
|
|
25616
|
+
if (isExpanded) {
|
|
25617
|
+
newExpanded = _.set(newExpanded, cellInfo.nestingPath, false);
|
|
25618
|
+
} else {
|
|
25619
|
+
newExpanded = _.set(newExpanded, cellInfo.nestingPath, {});
|
|
25620
|
+
}
|
|
25621
|
+
return _this2.setStateWithData({
|
|
25622
|
+
expanded: newExpanded
|
|
25623
|
+
}, function() {
|
|
25624
|
+
return onExpandedChange && onExpandedChange(newExpanded, cellInfo.nestingPath, e2, cellInfo);
|
|
25625
|
+
});
|
|
25626
|
+
}, "onExpanderClick");
|
|
25627
|
+
var resolvedCell = _.normalizeComponent(column.Cell, cellInfo, value);
|
|
25628
|
+
var ResolvedAggregatedComponent = column.Aggregated || (!column.aggregate ? AggregatedComponent2 : column.Cell);
|
|
25629
|
+
var ResolvedExpanderComponent = column.Expander || ExpanderComponent2;
|
|
25630
|
+
var ResolvedPivotValueComponent = column.PivotValue || PivotValueComponent2;
|
|
25631
|
+
var DefaultResolvedPivotComponent = PivotComponent || function(props) {
|
|
25632
|
+
return React$1.createElement(
|
|
25633
|
+
"div",
|
|
25634
|
+
null,
|
|
25635
|
+
React$1.createElement(ResolvedExpanderComponent, props),
|
|
25636
|
+
React$1.createElement(ResolvedPivotValueComponent, props)
|
|
25637
|
+
);
|
|
25638
|
+
};
|
|
25639
|
+
var ResolvedPivotComponent = column.Pivot || DefaultResolvedPivotComponent;
|
|
25640
|
+
if (cellInfo.pivoted || cellInfo.expander) {
|
|
25641
|
+
cellInfo.expandable = true;
|
|
25642
|
+
useOnExpanderClick = true;
|
|
25643
|
+
if (cellInfo.pivoted && !cellInfo.subRows && !SubComponent) {
|
|
25644
|
+
cellInfo.expandable = false;
|
|
25645
|
+
}
|
|
25268
25646
|
}
|
|
25269
|
-
if (
|
|
25270
|
-
|
|
25647
|
+
if (cellInfo.pivoted) {
|
|
25648
|
+
isBranch = rowInfo.row[pivotIDKey] === column.id && cellInfo.subRows;
|
|
25649
|
+
isPreview = pivotBy.indexOf(column.id) > pivotBy.indexOf(rowInfo.row[pivotIDKey]) && cellInfo.subRows;
|
|
25650
|
+
if (isBranch) {
|
|
25651
|
+
resolvedCell = _.normalizeComponent(ResolvedPivotComponent, _extends$i({}, cellInfo, {
|
|
25652
|
+
value: row[pivotValKey]
|
|
25653
|
+
}), row[pivotValKey]);
|
|
25654
|
+
} else if (isPreview) {
|
|
25655
|
+
resolvedCell = _.normalizeComponent(ResolvedAggregatedComponent, cellInfo, value);
|
|
25656
|
+
} else {
|
|
25657
|
+
resolvedCell = null;
|
|
25658
|
+
}
|
|
25659
|
+
} else if (cellInfo.aggregated) {
|
|
25660
|
+
resolvedCell = _.normalizeComponent(ResolvedAggregatedComponent, cellInfo, value);
|
|
25271
25661
|
}
|
|
25272
|
-
|
|
25273
|
-
|
|
25274
|
-
|
|
25275
|
-
|
|
25276
|
-
|
|
25277
|
-
|
|
25278
|
-
|
|
25279
|
-
|
|
25280
|
-
|
|
25281
|
-
|
|
25282
|
-
|
|
25283
|
-
|
|
25284
|
-
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25288
|
-
|
|
25289
|
-
|
|
25290
|
-
|
|
25291
|
-
|
|
25292
|
-
|
|
25293
|
-
|
|
25294
|
-
|
|
25295
|
-
|
|
25296
|
-
|
|
25297
|
-
|
|
25298
|
-
|
|
25299
|
-
|
|
25300
|
-
|
|
25301
|
-
|
|
25302
|
-
|
|
25303
|
-
|
|
25304
|
-
|
|
25305
|
-
|
|
25306
|
-
|
|
25307
|
-
|
|
25308
|
-
|
|
25309
|
-
|
|
25310
|
-
|
|
25311
|
-
|
|
25312
|
-
|
|
25313
|
-
|
|
25314
|
-
|
|
25315
|
-
|
|
25316
|
-
const width = _.getFirstDefined(resizedCol.value, column.width, column.minWidth);
|
|
25317
|
-
const flex2 = width;
|
|
25318
|
-
const maxWidth = _.getFirstDefined(resizedCol.value, column.width, column.maxWidth);
|
|
25319
|
-
const tdProps = _.splitProps(getTdProps(finalState, void 0, column, this));
|
|
25320
|
-
const columnProps = _.splitProps(column.getProps(finalState, void 0, column, this));
|
|
25321
|
-
const classes = [tdProps.className, column.className, columnProps.className];
|
|
25322
|
-
const styles2 = __spreadValues(__spreadValues(__spreadValues({}, tdProps.style), column.style), columnProps.style);
|
|
25323
|
-
return /* @__PURE__ */ React$1.createElement(
|
|
25324
|
-
TdComponent,
|
|
25325
|
-
__spreadValues({
|
|
25326
|
-
key: `${i}-${column.id}`,
|
|
25327
|
-
className: classNames(classes, !show && "hidden"),
|
|
25328
|
-
style: __spreadProps(__spreadValues({}, styles2), {
|
|
25329
|
-
flex: `${flex2} 0 auto`,
|
|
25330
|
-
width: _.asPx(width),
|
|
25331
|
-
maxWidth: _.asPx(maxWidth)
|
|
25332
|
-
})
|
|
25333
|
-
}, tdProps.rest),
|
|
25334
|
-
_.normalizeComponent(PadRowComponent)
|
|
25335
|
-
);
|
|
25336
|
-
}, "makePadColumn");
|
|
25337
|
-
const makePadRow = /* @__PURE__ */ __name((row, i) => {
|
|
25338
|
-
const trGroupProps = getTrGroupProps(finalState, void 0, void 0, this);
|
|
25339
|
-
const trProps = _.splitProps(getTrProps(finalState, void 0, void 0, this));
|
|
25340
|
-
return /* @__PURE__ */ React$1.createElement(TrGroupComponent, __spreadValues({ key: `pad-${i}` }, trGroupProps), /* @__PURE__ */ React$1.createElement(
|
|
25341
|
-
TrComponent,
|
|
25342
|
-
{
|
|
25343
|
-
className: classNames(
|
|
25344
|
-
"-padRow",
|
|
25345
|
-
(pageRows.length + i) % 2 ? "-even" : "-odd",
|
|
25346
|
-
trProps.className
|
|
25662
|
+
if (cellInfo.expander) {
|
|
25663
|
+
resolvedCell = _.normalizeComponent(ResolvedExpanderComponent, cellInfo, row[pivotValKey]);
|
|
25664
|
+
if (pivotBy) {
|
|
25665
|
+
if (cellInfo.groupedByPivot) {
|
|
25666
|
+
resolvedCell = null;
|
|
25667
|
+
}
|
|
25668
|
+
if (!cellInfo.subRows && !SubComponent) {
|
|
25669
|
+
resolvedCell = null;
|
|
25670
|
+
}
|
|
25671
|
+
}
|
|
25672
|
+
}
|
|
25673
|
+
var resolvedOnExpanderClick = useOnExpanderClick ? onExpanderClick : function() {
|
|
25674
|
+
};
|
|
25675
|
+
var interactionProps = {
|
|
25676
|
+
onClick: resolvedOnExpanderClick
|
|
25677
|
+
};
|
|
25678
|
+
if (tdProps.rest.onClick) {
|
|
25679
|
+
interactionProps.onClick = function(e2) {
|
|
25680
|
+
tdProps.rest.onClick(e2, function() {
|
|
25681
|
+
return resolvedOnExpanderClick(e2);
|
|
25682
|
+
});
|
|
25683
|
+
};
|
|
25684
|
+
}
|
|
25685
|
+
if (columnProps.rest.onClick) {
|
|
25686
|
+
interactionProps.onClick = function(e2) {
|
|
25687
|
+
columnProps.rest.onClick(e2, function() {
|
|
25688
|
+
return resolvedOnExpanderClick(e2);
|
|
25689
|
+
});
|
|
25690
|
+
};
|
|
25691
|
+
}
|
|
25692
|
+
return React$1.createElement(
|
|
25693
|
+
TdComponent2,
|
|
25694
|
+
_extends$i({
|
|
25695
|
+
key: i2 + "-" + column.id,
|
|
25696
|
+
className: classNames(classes, !cellInfo.expandable && !show && "hidden", cellInfo.expandable && "rt-expandable", (isBranch || isPreview) && "rt-pivot"),
|
|
25697
|
+
style: _extends$i({}, styles2, {
|
|
25698
|
+
flex: width + " 0 auto",
|
|
25699
|
+
width: _.asPx(width),
|
|
25700
|
+
maxWidth: _.asPx(maxWidth)
|
|
25701
|
+
})
|
|
25702
|
+
}, tdProps.rest, columnProps.rest, interactionProps),
|
|
25703
|
+
resolvedCell
|
|
25704
|
+
);
|
|
25705
|
+
})
|
|
25347
25706
|
),
|
|
25348
|
-
|
|
25349
|
-
|
|
25350
|
-
|
|
25351
|
-
|
|
25352
|
-
|
|
25353
|
-
|
|
25354
|
-
const resizedCol = resized.find((x2) => x2.id === column.id) || {};
|
|
25355
|
-
const show = typeof column.show === "function" ? column.show() : column.show;
|
|
25356
|
-
const width = _.getFirstDefined(resizedCol.value, column.width, column.minWidth);
|
|
25357
|
-
const maxWidth = _.getFirstDefined(resizedCol.value, column.width, column.maxWidth);
|
|
25358
|
-
const tFootTdProps = _.splitProps(getTfootTdProps(finalState, void 0, column, this));
|
|
25359
|
-
const columnProps = _.splitProps(column.getProps(finalState, void 0, column, this));
|
|
25360
|
-
const columnFooterProps = _.splitProps(
|
|
25361
|
-
column.getFooterProps(finalState, void 0, column, this)
|
|
25362
|
-
);
|
|
25363
|
-
const classes = [
|
|
25364
|
-
tFootTdProps.className,
|
|
25365
|
-
column.className,
|
|
25366
|
-
columnProps.className,
|
|
25367
|
-
columnFooterProps.className
|
|
25368
|
-
];
|
|
25369
|
-
const styles2 = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, tFootTdProps.style), column.style), columnProps.style), columnFooterProps.style);
|
|
25370
|
-
return /* @__PURE__ */ React$1.createElement(
|
|
25371
|
-
TdComponent,
|
|
25372
|
-
__spreadValues(__spreadValues(__spreadValues({
|
|
25373
|
-
key: `${i}-${column.id}`,
|
|
25374
|
-
className: classNames(classes, !show && "hidden"),
|
|
25375
|
-
style: __spreadProps(__spreadValues({}, styles2), {
|
|
25376
|
-
flex: `${width} 0 auto`,
|
|
25377
|
-
width: _.asPx(width),
|
|
25378
|
-
maxWidth: _.asPx(maxWidth)
|
|
25707
|
+
rowInfo.subRows && isExpanded && rowInfo.subRows.map(function(d2, i2) {
|
|
25708
|
+
return makePageRow2(d2, i2, rowInfo.nestingPath);
|
|
25709
|
+
}),
|
|
25710
|
+
SubComponent && !rowInfo.subRows && isExpanded && SubComponent(rowInfo, function() {
|
|
25711
|
+
var newExpanded = _.clone(expanded);
|
|
25712
|
+
_.set(newExpanded, rowInfo.nestingPath, false);
|
|
25379
25713
|
})
|
|
25380
|
-
|
|
25381
|
-
|
|
25382
|
-
|
|
25383
|
-
|
|
25384
|
-
|
|
25385
|
-
|
|
25386
|
-
|
|
25387
|
-
|
|
25388
|
-
|
|
25389
|
-
|
|
25390
|
-
|
|
25391
|
-
|
|
25392
|
-
|
|
25393
|
-
|
|
25394
|
-
|
|
25395
|
-
|
|
25714
|
+
);
|
|
25715
|
+
}, "makePageRow");
|
|
25716
|
+
var makePadColumn = /* @__PURE__ */ __name(function makePadColumn2(column, i) {
|
|
25717
|
+
var resizedCol = resized.find(function(x2) {
|
|
25718
|
+
return x2.id === column.id;
|
|
25719
|
+
}) || {};
|
|
25720
|
+
var show = typeof column.show === "function" ? column.show() : column.show;
|
|
25721
|
+
var width = _.getFirstDefined(resizedCol.value, column.width, column.minWidth);
|
|
25722
|
+
var flex2 = width;
|
|
25723
|
+
var maxWidth = _.getFirstDefined(resizedCol.value, column.width, column.maxWidth);
|
|
25724
|
+
var tdProps = _.splitProps(getTdProps(finalState, void 0, column, _this2));
|
|
25725
|
+
var columnProps = _.splitProps(column.getProps(finalState, void 0, column, _this2));
|
|
25726
|
+
var classes = [tdProps.className, column.className, columnProps.className];
|
|
25727
|
+
var styles2 = _extends$i({}, tdProps.style, column.style, columnProps.style);
|
|
25728
|
+
return React$1.createElement(
|
|
25729
|
+
TdComponent2,
|
|
25730
|
+
_extends$i({
|
|
25731
|
+
key: i + "-" + column.id,
|
|
25732
|
+
className: classNames(classes, !show && "hidden"),
|
|
25733
|
+
style: _extends$i({}, styles2, {
|
|
25734
|
+
flex: flex2 + " 0 auto",
|
|
25735
|
+
width: _.asPx(width),
|
|
25736
|
+
maxWidth: _.asPx(maxWidth)
|
|
25737
|
+
})
|
|
25738
|
+
}, tdProps.rest),
|
|
25739
|
+
_.normalizeComponent(PadRowComponent2)
|
|
25740
|
+
);
|
|
25741
|
+
}, "makePadColumn");
|
|
25742
|
+
var makePadRow = /* @__PURE__ */ __name(function makePadRow2(row, i) {
|
|
25743
|
+
var trGroupProps = getTrGroupProps(finalState, void 0, void 0, _this2);
|
|
25744
|
+
var trProps = _.splitProps(getTrProps(finalState, void 0, void 0, _this2));
|
|
25745
|
+
return React$1.createElement(
|
|
25746
|
+
TrGroupComponent2,
|
|
25747
|
+
_extends$i({ key: "pad-" + i }, trGroupProps),
|
|
25748
|
+
React$1.createElement(
|
|
25749
|
+
TrComponent2,
|
|
25750
|
+
{
|
|
25751
|
+
className: classNames("-padRow", (pageRows.length + i) % 2 ? "-even" : "-odd", trProps.className),
|
|
25752
|
+
style: trProps.style || {}
|
|
25753
|
+
},
|
|
25754
|
+
allVisibleColumns.map(makePadColumn)
|
|
25755
|
+
)
|
|
25756
|
+
);
|
|
25757
|
+
}, "makePadRow");
|
|
25758
|
+
var makeColumnFooter = /* @__PURE__ */ __name(function makeColumnFooter2(column, i) {
|
|
25759
|
+
var resizedCol = resized.find(function(x2) {
|
|
25760
|
+
return x2.id === column.id;
|
|
25761
|
+
}) || {};
|
|
25762
|
+
var show = typeof column.show === "function" ? column.show() : column.show;
|
|
25763
|
+
var width = _.getFirstDefined(resizedCol.value, column.width, column.minWidth);
|
|
25764
|
+
var maxWidth = _.getFirstDefined(resizedCol.value, column.width, column.maxWidth);
|
|
25765
|
+
var tFootTdProps = _.splitProps(getTfootTdProps(finalState, void 0, column, _this2));
|
|
25766
|
+
var columnProps = _.splitProps(column.getProps(finalState, void 0, column, _this2));
|
|
25767
|
+
var columnFooterProps = _.splitProps(column.getFooterProps(finalState, void 0, column, _this2));
|
|
25768
|
+
var classes = [tFootTdProps.className, column.className, columnProps.className, columnFooterProps.className];
|
|
25769
|
+
var styles2 = _extends$i({}, tFootTdProps.style, column.style, columnProps.style, columnFooterProps.style);
|
|
25770
|
+
return React$1.createElement(
|
|
25771
|
+
TdComponent2,
|
|
25772
|
+
_extends$i({
|
|
25773
|
+
key: i + "-" + column.id,
|
|
25774
|
+
className: classNames(classes, !show && "hidden"),
|
|
25775
|
+
style: _extends$i({}, styles2, {
|
|
25776
|
+
flex: width + " 0 auto",
|
|
25777
|
+
width: _.asPx(width),
|
|
25778
|
+
maxWidth: _.asPx(maxWidth)
|
|
25779
|
+
})
|
|
25780
|
+
}, columnProps.rest, tFootTdProps.rest, columnFooterProps.rest),
|
|
25781
|
+
_.normalizeComponent(column.Footer, {
|
|
25782
|
+
data: sortedData,
|
|
25783
|
+
column
|
|
25396
25784
|
})
|
|
25397
|
-
|
|
25398
|
-
|
|
25399
|
-
|
|
25400
|
-
|
|
25401
|
-
|
|
25402
|
-
|
|
25403
|
-
|
|
25404
|
-
|
|
25405
|
-
|
|
25406
|
-
|
|
25407
|
-
|
|
25408
|
-
|
|
25409
|
-
|
|
25410
|
-
|
|
25411
|
-
|
|
25412
|
-
|
|
25413
|
-
|
|
25414
|
-
|
|
25785
|
+
);
|
|
25786
|
+
}, "makeColumnFooter");
|
|
25787
|
+
var makeColumnFooters = /* @__PURE__ */ __name(function makeColumnFooters2() {
|
|
25788
|
+
var tFootProps = _.splitProps(getTfootProps(finalState, void 0, void 0, _this2));
|
|
25789
|
+
var tFootTrProps = _.splitProps(getTfootTrProps(finalState, void 0, void 0, _this2));
|
|
25790
|
+
return React$1.createElement(
|
|
25791
|
+
TfootComponent,
|
|
25792
|
+
_extends$i({
|
|
25793
|
+
className: tFootProps.className,
|
|
25794
|
+
style: _extends$i({}, tFootProps.style, {
|
|
25795
|
+
minWidth: rowMinWidth + "px"
|
|
25796
|
+
})
|
|
25797
|
+
}, tFootProps.rest),
|
|
25798
|
+
React$1.createElement(
|
|
25799
|
+
TrComponent2,
|
|
25800
|
+
_extends$i({
|
|
25801
|
+
className: classNames(tFootTrProps.className),
|
|
25802
|
+
style: tFootTrProps.style
|
|
25803
|
+
}, tFootTrProps.rest),
|
|
25804
|
+
allVisibleColumns.map(makeColumnFooter)
|
|
25805
|
+
)
|
|
25806
|
+
);
|
|
25807
|
+
}, "makeColumnFooters");
|
|
25808
|
+
var makePagination = /* @__PURE__ */ __name(function makePagination2(isTop) {
|
|
25809
|
+
var paginationProps = _.splitProps(getPaginationProps(finalState, void 0, void 0, _this2));
|
|
25810
|
+
return React$1.createElement(PaginationComponent, _extends$i({}, resolvedState, {
|
|
25415
25811
|
pages,
|
|
25416
25812
|
canPrevious,
|
|
25417
25813
|
canNext,
|
|
25418
|
-
onPageChange:
|
|
25419
|
-
onPageSizeChange:
|
|
25814
|
+
onPageChange: _this2.onPageChange,
|
|
25815
|
+
onPageSizeChange: _this2.onPageSizeChange,
|
|
25420
25816
|
className: paginationProps.className,
|
|
25421
25817
|
style: paginationProps.style,
|
|
25422
25818
|
isTop
|
|
25423
|
-
}
|
|
25424
|
-
);
|
|
25425
|
-
|
|
25426
|
-
|
|
25427
|
-
|
|
25428
|
-
|
|
25429
|
-
|
|
25430
|
-
|
|
25431
|
-
|
|
25432
|
-
|
|
25433
|
-
|
|
25434
|
-
|
|
25435
|
-
|
|
25436
|
-
|
|
25437
|
-
|
|
25438
|
-
|
|
25439
|
-
|
|
25440
|
-
|
|
25441
|
-
|
|
25442
|
-
|
|
25443
|
-
|
|
25444
|
-
|
|
25445
|
-
|
|
25446
|
-
|
|
25447
|
-
|
|
25448
|
-
|
|
25449
|
-
|
|
25450
|
-
|
|
25451
|
-
|
|
25452
|
-
|
|
25453
|
-
|
|
25454
|
-
|
|
25455
|
-
|
|
25456
|
-
|
|
25457
|
-
|
|
25458
|
-
|
|
25459
|
-
|
|
25460
|
-
|
|
25461
|
-
|
|
25462
|
-
|
|
25463
|
-
|
|
25464
|
-
|
|
25465
|
-
|
|
25466
|
-
|
|
25819
|
+
}, paginationProps.rest));
|
|
25820
|
+
}, "makePagination");
|
|
25821
|
+
var makeTable = /* @__PURE__ */ __name(function makeTable2() {
|
|
25822
|
+
return React$1.createElement(
|
|
25823
|
+
"div",
|
|
25824
|
+
_extends$i({
|
|
25825
|
+
className: classNames("ReactTable", className, rootProps.className),
|
|
25826
|
+
style: _extends$i({}, style2, rootProps.style)
|
|
25827
|
+
}, rootProps.rest),
|
|
25828
|
+
showPagination && showPaginationTop ? React$1.createElement(
|
|
25829
|
+
"div",
|
|
25830
|
+
{ className: "pagination-top" },
|
|
25831
|
+
makePagination(true)
|
|
25832
|
+
) : null,
|
|
25833
|
+
React$1.createElement(
|
|
25834
|
+
TableComponent2,
|
|
25835
|
+
_extends$i({
|
|
25836
|
+
className: classNames(tableProps.className, currentlyResizing ? "rt-resizing" : ""),
|
|
25837
|
+
style: tableProps.style
|
|
25838
|
+
}, tableProps.rest),
|
|
25839
|
+
hasHeaderGroups ? makeHeaderGroups() : null,
|
|
25840
|
+
makeHeaders(),
|
|
25841
|
+
hasFilters ? makeFilters() : null,
|
|
25842
|
+
React$1.createElement(
|
|
25843
|
+
TbodyComponent,
|
|
25844
|
+
_extends$i({
|
|
25845
|
+
className: classNames(tBodyProps.className),
|
|
25846
|
+
style: _extends$i({}, tBodyProps.style, {
|
|
25847
|
+
minWidth: rowMinWidth + "px"
|
|
25848
|
+
})
|
|
25849
|
+
}, tBodyProps.rest),
|
|
25850
|
+
pageRows.length < 200 ? pageRows.map(function(d2, i) {
|
|
25851
|
+
return makePageRow(d2, i);
|
|
25852
|
+
}) : React$1.createElement(ReactList, {
|
|
25853
|
+
type: "variable",
|
|
25854
|
+
itemSizeEstimator: _this2.props.itemSizeEstimator || itemSizeEstimator,
|
|
25855
|
+
itemRenderer: /* @__PURE__ */ __name(function itemRenderer(i) {
|
|
25856
|
+
return makePageRow(pageRows[i], i);
|
|
25857
|
+
}, "itemRenderer"),
|
|
25858
|
+
length: pageRows.length
|
|
25859
|
+
}),
|
|
25860
|
+
padRows.map(makePadRow),
|
|
25861
|
+
additionalBodyEl
|
|
25862
|
+
),
|
|
25863
|
+
hasColumnFooter ? makeColumnFooters() : null
|
|
25467
25864
|
),
|
|
25468
|
-
|
|
25469
|
-
|
|
25470
|
-
|
|
25471
|
-
|
|
25472
|
-
|
|
25473
|
-
|
|
25474
|
-
|
|
25475
|
-
|
|
25476
|
-
|
|
25477
|
-
|
|
25478
|
-
|
|
25479
|
-
|
|
25480
|
-
|
|
25481
|
-
|
|
25482
|
-
|
|
25483
|
-
|
|
25865
|
+
showPagination && showPaginationBottom ? React$1.createElement(
|
|
25866
|
+
"div",
|
|
25867
|
+
{ className: "pagination-bottom" },
|
|
25868
|
+
makePagination(false)
|
|
25869
|
+
) : null,
|
|
25870
|
+
!pageRows.length && React$1.createElement(
|
|
25871
|
+
NoDataComponent,
|
|
25872
|
+
noDataProps,
|
|
25873
|
+
_.normalizeComponent(noDataText)
|
|
25874
|
+
),
|
|
25875
|
+
React$1.createElement(LoadingComponent3, _extends$i({ loading, loadingText }, loadingProps))
|
|
25876
|
+
);
|
|
25877
|
+
}, "makeTable");
|
|
25878
|
+
return children ? children(finalState, makeTable, this) : makeTable();
|
|
25879
|
+
}, "render")
|
|
25880
|
+
}]);
|
|
25881
|
+
return ReactTable2;
|
|
25882
|
+
}(Methods(Lifecycle(React$1.Component)));
|
|
25883
|
+
ReactTable.propTypes = propTypes;
|
|
25884
|
+
ReactTable.defaultProps = defaultProps$1;
|
|
25484
25885
|
var dayjs_min = { exports: {} };
|
|
25485
25886
|
(function(module2, exports2) {
|
|
25486
25887
|
!function(t2, e2) {
|
|
@@ -43792,7 +44193,7 @@ function arrayEach$2(array2, iteratee) {
|
|
|
43792
44193
|
}
|
|
43793
44194
|
__name(arrayEach$2, "arrayEach$2");
|
|
43794
44195
|
var _arrayEach = arrayEach$2;
|
|
43795
|
-
var defineProperty$3 = _defineProperty$
|
|
44196
|
+
var defineProperty$3 = _defineProperty$6;
|
|
43796
44197
|
function baseAssignValue$3(object2, key, value) {
|
|
43797
44198
|
if (key == "__proto__" && defineProperty$3) {
|
|
43798
44199
|
defineProperty$3(object2, key, {
|
|
@@ -53402,8 +53803,8 @@ const renderSuggest = /* @__PURE__ */ __name((props) => {
|
|
|
53402
53803
|
});
|
|
53403
53804
|
return /* @__PURE__ */ React$1.createElement(TgSuggest, __spreadValues({}, propsToUse));
|
|
53404
53805
|
}, "renderSuggest");
|
|
53405
|
-
const BPSelect = /* @__PURE__ */ __name((
|
|
53406
|
-
var
|
|
53806
|
+
const BPSelect = /* @__PURE__ */ __name((_c) => {
|
|
53807
|
+
var _d = _c, { value, onChange } = _d, rest = __objRest(_d, ["value", "onChange"]);
|
|
53407
53808
|
return renderSelect(__spreadProps(__spreadValues({}, rest), { input: { onChange, value } }));
|
|
53408
53809
|
}, "BPSelect");
|
|
53409
53810
|
const renderSelect = /* @__PURE__ */ __name((props) => {
|
|
@@ -53538,12 +53939,12 @@ const renderBlueprintNumericInput = /* @__PURE__ */ __name((props) => {
|
|
|
53538
53939
|
})
|
|
53539
53940
|
);
|
|
53540
53941
|
}, "renderBlueprintNumericInput");
|
|
53541
|
-
const renderBlueprintRadioGroup = /* @__PURE__ */ __name((
|
|
53542
|
-
var
|
|
53942
|
+
const renderBlueprintRadioGroup = /* @__PURE__ */ __name((_e) => {
|
|
53943
|
+
var _f = _e, {
|
|
53543
53944
|
input,
|
|
53544
53945
|
options,
|
|
53545
53946
|
onFieldSubmit
|
|
53546
|
-
} =
|
|
53947
|
+
} = _f, rest = __objRest(_f, [
|
|
53547
53948
|
"input",
|
|
53548
53949
|
"options",
|
|
53549
53950
|
"onFieldSubmit"
|
|
@@ -54054,10 +54455,10 @@ const _DisplayOptions = class _DisplayOptions extends React$1.Component {
|
|
|
54054
54455
|
};
|
|
54055
54456
|
__name(_DisplayOptions, "DisplayOptions");
|
|
54056
54457
|
let DisplayOptions = _DisplayOptions;
|
|
54057
|
-
const { LoadingComponent } = ReactTableDefaults;
|
|
54458
|
+
const { LoadingComponent: LoadingComponent2 } = ReactTableDefaults;
|
|
54058
54459
|
function DisabledLoadingComponent({ disabled, loading, loadingText }) {
|
|
54059
54460
|
return /* @__PURE__ */ React$1.createElement(
|
|
54060
|
-
|
|
54461
|
+
LoadingComponent2,
|
|
54061
54462
|
{
|
|
54062
54463
|
className: disabled ? "disabled" : "",
|
|
54063
54464
|
loading,
|
|
@@ -54083,18 +54484,24 @@ const _SortableColumns = class _SortableColumns extends React$1.Component {
|
|
|
54083
54484
|
const className = e2.target.className;
|
|
54084
54485
|
return e2.target instanceof SVGElement || className.indexOf("rt-resizer") > -1;
|
|
54085
54486
|
}, "shouldCancelStart"));
|
|
54086
|
-
__publicField(this, "onSortEnd", /* @__PURE__ */ __name((
|
|
54487
|
+
__publicField(this, "onSortEnd", /* @__PURE__ */ __name((...args) => {
|
|
54488
|
+
const { oldIndex, newIndex } = args[0];
|
|
54489
|
+
document.body.classList.remove("drag-active");
|
|
54087
54490
|
this.props.moveColumn({
|
|
54088
54491
|
oldIndex,
|
|
54089
54492
|
newIndex
|
|
54090
54493
|
});
|
|
54091
54494
|
}, "onSortEnd"));
|
|
54495
|
+
__publicField(this, "onSortStart", /* @__PURE__ */ __name(() => {
|
|
54496
|
+
document.body.classList.add("drag-active");
|
|
54497
|
+
}, "onSortStart"));
|
|
54092
54498
|
}
|
|
54093
54499
|
render() {
|
|
54094
54500
|
return /* @__PURE__ */ React$1.createElement(
|
|
54095
54501
|
SortableCustomTheadComponent,
|
|
54096
54502
|
__spreadProps(__spreadValues({}, this.props), {
|
|
54097
54503
|
lockAxis: "x",
|
|
54504
|
+
onSortStart: this.onSortStart,
|
|
54098
54505
|
axis: "x",
|
|
54099
54506
|
distance: 10,
|
|
54100
54507
|
helperClass: "above-dialog",
|
|
@@ -54233,7 +54640,7 @@ function createLocation(path2, state, key, currentLocation) {
|
|
|
54233
54640
|
location2 = parsePath(path2);
|
|
54234
54641
|
location2.state = state;
|
|
54235
54642
|
} else {
|
|
54236
|
-
location2 = _extends$
|
|
54643
|
+
location2 = _extends$n({}, path2);
|
|
54237
54644
|
if (location2.pathname === void 0)
|
|
54238
54645
|
location2.pathname = "";
|
|
54239
54646
|
if (location2.search) {
|
|
@@ -56733,8 +57140,8 @@ const _DataTable = class _DataTable extends React$1.Component {
|
|
|
56733
57140
|
};
|
|
56734
57141
|
}),
|
|
56735
57142
|
branch(({ immovable }) => "true" !== immovable, sortableElement)
|
|
56736
|
-
)((
|
|
56737
|
-
var
|
|
57143
|
+
)((_g) => {
|
|
57144
|
+
var _h = _g, { toggleSort, className, children } = _h, rest = __objRest(_h, ["toggleSort", "className", "children"]);
|
|
56738
57145
|
return /* @__PURE__ */ React$1.createElement(
|
|
56739
57146
|
"div",
|
|
56740
57147
|
__spreadValues({
|
|
@@ -58861,13 +59268,13 @@ function getCellInfo({
|
|
|
58861
59268
|
};
|
|
58862
59269
|
}
|
|
58863
59270
|
__name(getCellInfo, "getCellInfo");
|
|
58864
|
-
function ColumnFilterMenu(
|
|
58865
|
-
var
|
|
59271
|
+
function ColumnFilterMenu(_i) {
|
|
59272
|
+
var _j = _i, {
|
|
58866
59273
|
FilterMenu,
|
|
58867
59274
|
filterActiveForColumn,
|
|
58868
59275
|
compact: compact3,
|
|
58869
59276
|
extraCompact
|
|
58870
|
-
} =
|
|
59277
|
+
} = _j, rest = __objRest(_j, [
|
|
58871
59278
|
"FilterMenu",
|
|
58872
59279
|
"filterActiveForColumn",
|
|
58873
59280
|
"compact",
|
|
@@ -61672,8 +62079,8 @@ function maybeStripIdFromEntities(ents, validateAgainstSchema) {
|
|
|
61672
62079
|
return toRet == null ? void 0 : toRet.map((e2) => lodashExports.omit(e2, ["_isClean"]));
|
|
61673
62080
|
}
|
|
61674
62081
|
__name(maybeStripIdFromEntities, "maybeStripIdFromEntities");
|
|
61675
|
-
const useDialog = /* @__PURE__ */ __name((
|
|
61676
|
-
var
|
|
62082
|
+
const useDialog = /* @__PURE__ */ __name((_k) => {
|
|
62083
|
+
var _l = _k, { ModalComponent } = _l, rest = __objRest(_l, ["ModalComponent"]);
|
|
61677
62084
|
const [isOpen, setOpen] = React$1.useState(false);
|
|
61678
62085
|
const [additionalProps, setAdditionalProps] = React$1.useState(false);
|
|
61679
62086
|
const comp = /* @__PURE__ */ React$1.createElement(
|
|
@@ -72265,14 +72672,14 @@ function BlueprintError({ error }) {
|
|
|
72265
72672
|
return /* @__PURE__ */ React$1.createElement("div", { className: classNames(core$5.Classes.FORM_GROUP, core$5.Classes.INTENT_DANGER) }, /* @__PURE__ */ React$1.createElement("div", { className: classNames(core$5.Classes.FORM_HELPER_TEXT, "preserve-newline") }, error));
|
|
72266
72673
|
}
|
|
72267
72674
|
__name(BlueprintError, "BlueprintError");
|
|
72268
|
-
function DropdownButton(
|
|
72269
|
-
var
|
|
72675
|
+
function DropdownButton(_m) {
|
|
72676
|
+
var _n = _m, {
|
|
72270
72677
|
disabled,
|
|
72271
72678
|
menu,
|
|
72272
72679
|
noRightIcon,
|
|
72273
72680
|
popoverProps,
|
|
72274
72681
|
className
|
|
72275
|
-
} =
|
|
72682
|
+
} = _n, rest = __objRest(_n, [
|
|
72276
72683
|
"disabled",
|
|
72277
72684
|
"menu",
|
|
72278
72685
|
"noRightIcon",
|
|
@@ -75715,14 +76122,14 @@ const EnhancedMenuItem = compose(
|
|
|
75715
76122
|
}
|
|
75716
76123
|
}),
|
|
75717
76124
|
branch(({ navTo }) => navTo, withRouter$1)
|
|
75718
|
-
)(function(
|
|
75719
|
-
var
|
|
76125
|
+
)(function(_o) {
|
|
76126
|
+
var _p = _o, {
|
|
75720
76127
|
navTo,
|
|
75721
76128
|
context,
|
|
75722
76129
|
staticContext,
|
|
75723
76130
|
didMount,
|
|
75724
76131
|
willUnmount
|
|
75725
|
-
} =
|
|
76132
|
+
} = _p, props = __objRest(_p, [
|
|
75726
76133
|
"navTo",
|
|
75727
76134
|
"context",
|
|
75728
76135
|
"staticContext",
|
|
@@ -75943,8 +76350,8 @@ function doesSearchValMatchText(searchVal, justText) {
|
|
|
75943
76350
|
);
|
|
75944
76351
|
}
|
|
75945
76352
|
__name(doesSearchValMatchText, "doesSearchValMatchText");
|
|
75946
|
-
const MenuItemWithTooltip = /* @__PURE__ */ __name((
|
|
75947
|
-
var
|
|
76353
|
+
const MenuItemWithTooltip = /* @__PURE__ */ __name((_q) => {
|
|
76354
|
+
var _r = _q, { tooltip } = _r, rest = __objRest(_r, ["tooltip"]);
|
|
75948
76355
|
let out = /* @__PURE__ */ React$1.createElement(core$5.MenuItem, __spreadValues({}, rest));
|
|
75949
76356
|
if (tooltip) {
|
|
75950
76357
|
out = /* @__PURE__ */ React$1.createElement(core$5.Tooltip, { content: tooltip }, out);
|