@nulogy/components 10.2.1 → 10.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +86 -69
- package/dist/main.module.js +86 -69
- package/dist/src/AsyncSelect/AsyncSelectComponents.d.ts +5 -0
- package/dist/src/Select/SelectOption.d.ts +10 -3
- package/dist/src/SortingTable/SortingTable.d.ts +2 -2
- package/dist/src/SortingTable/SortingTable.story.d.ts +2 -19
- package/dist/src/Table/BaseTable.d.ts +19 -3
- package/dist/src/Table/BaseTable.story.d.ts +12 -66
- package/dist/src/Table/StatefulTable.d.ts +13 -17
- package/dist/src/Table/Table.d.ts +7 -7
- package/dist/src/Table/Table.types.d.ts +9 -14
- package/dist/src/Table/TableFoot.d.ts +11 -11
- package/dist/src/Table/TableHead.d.ts +3 -3
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -21970,6 +21970,32 @@
|
|
|
21970
21970
|
};
|
|
21971
21971
|
};
|
|
21972
21972
|
|
|
21973
|
+
var getSubset = function getSubset(o, propObj) {
|
|
21974
|
+
var fields = Object.keys(propObj);
|
|
21975
|
+
return pick.apply(void 0, [o].concat(fields));
|
|
21976
|
+
};
|
|
21977
|
+
var omitSubset = function omitSubset(o, propObj) {
|
|
21978
|
+
var fields = Object.keys(propObj);
|
|
21979
|
+
var objectProps = Object.keys(o);
|
|
21980
|
+
return objectProps.reduce(function (a, x) {
|
|
21981
|
+
if (!fields.includes(x)) a[x] = o[x];
|
|
21982
|
+
return a;
|
|
21983
|
+
}, {});
|
|
21984
|
+
};
|
|
21985
|
+
|
|
21986
|
+
var pick = function pick(o) {
|
|
21987
|
+
var objectProps = Object.keys(o);
|
|
21988
|
+
|
|
21989
|
+
for (var _len = arguments.length, fields = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
21990
|
+
fields[_key - 1] = arguments[_key];
|
|
21991
|
+
}
|
|
21992
|
+
|
|
21993
|
+
return fields.reduce(function (a, x) {
|
|
21994
|
+
if (objectProps.includes(x)) a[x] = o[x];
|
|
21995
|
+
return a;
|
|
21996
|
+
}, {});
|
|
21997
|
+
};
|
|
21998
|
+
|
|
21973
21999
|
var StyledOption = styled__default["default"].div.withConfig({
|
|
21974
22000
|
displayName: "SelectOption__StyledOption",
|
|
21975
22001
|
componentId: "sc-i7ae6z-0"
|
|
@@ -22012,41 +22038,16 @@
|
|
|
22012
22038
|
}
|
|
22013
22039
|
}, size);
|
|
22014
22040
|
});
|
|
22015
|
-
function SelectOption(props) {
|
|
22041
|
+
function SelectOption$1(props) {
|
|
22042
|
+
var size = useComponentSize(props.size);
|
|
22016
22043
|
return /*#__PURE__*/React__default["default"].createElement(StyledOption, {
|
|
22017
22044
|
isSelected: props.isSelected,
|
|
22018
22045
|
isFocused: props.isFocused,
|
|
22019
|
-
size:
|
|
22046
|
+
size: size,
|
|
22020
22047
|
"data-testid": "select-option"
|
|
22021
|
-
}, /*#__PURE__*/React__default["default"].createElement(WindowedSelect.components.Option, Object.assign({}, props)));
|
|
22048
|
+
}, /*#__PURE__*/React__default["default"].createElement(WindowedSelect.components.Option, Object.assign({}, props), props.children));
|
|
22022
22049
|
}
|
|
22023
22050
|
|
|
22024
|
-
var getSubset = function getSubset(o, propObj) {
|
|
22025
|
-
var fields = Object.keys(propObj);
|
|
22026
|
-
return pick.apply(void 0, [o].concat(fields));
|
|
22027
|
-
};
|
|
22028
|
-
var omitSubset = function omitSubset(o, propObj) {
|
|
22029
|
-
var fields = Object.keys(propObj);
|
|
22030
|
-
var objectProps = Object.keys(o);
|
|
22031
|
-
return objectProps.reduce(function (a, x) {
|
|
22032
|
-
if (!fields.includes(x)) a[x] = o[x];
|
|
22033
|
-
return a;
|
|
22034
|
-
}, {});
|
|
22035
|
-
};
|
|
22036
|
-
|
|
22037
|
-
var pick = function pick(o) {
|
|
22038
|
-
var objectProps = Object.keys(o);
|
|
22039
|
-
|
|
22040
|
-
for (var _len = arguments.length, fields = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
22041
|
-
fields[_key - 1] = arguments[_key];
|
|
22042
|
-
}
|
|
22043
|
-
|
|
22044
|
-
return fields.reduce(function (a, x) {
|
|
22045
|
-
if (objectProps.includes(x)) a[x] = o[x];
|
|
22046
|
-
return a;
|
|
22047
|
-
}, {});
|
|
22048
|
-
};
|
|
22049
|
-
|
|
22050
22051
|
var SelectControl$1 = function SelectControl(props) {
|
|
22051
22052
|
// eslint-disable-next-line react/prop-types
|
|
22052
22053
|
var isFocused = props.isFocused;
|
|
@@ -22055,32 +22056,32 @@
|
|
|
22055
22056
|
}, /*#__PURE__*/React__default["default"].createElement(components.Control, Object.assign({
|
|
22056
22057
|
className: isFocused ? "nds-select--is-focused" : null,
|
|
22057
22058
|
isFocused: isFocused
|
|
22058
|
-
}, props)));
|
|
22059
|
+
}, props), props.children));
|
|
22059
22060
|
};
|
|
22060
22061
|
var SelectMultiValue$1 = function SelectMultiValue(props) {
|
|
22061
22062
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22062
22063
|
"data-testid": "select-multivalue"
|
|
22063
|
-
}, /*#__PURE__*/React__default["default"].createElement(components.MultiValue, Object.assign({}, props)));
|
|
22064
|
+
}, /*#__PURE__*/React__default["default"].createElement(components.MultiValue, Object.assign({}, props), props.children));
|
|
22064
22065
|
};
|
|
22065
22066
|
var SelectClearIndicator$1 = function SelectClearIndicator(props) {
|
|
22066
22067
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22067
22068
|
"data-testid": "select-clear"
|
|
22068
|
-
}, /*#__PURE__*/React__default["default"].createElement(components.ClearIndicator, Object.assign({}, props)));
|
|
22069
|
+
}, /*#__PURE__*/React__default["default"].createElement(components.ClearIndicator, Object.assign({}, props), props.children));
|
|
22069
22070
|
};
|
|
22070
22071
|
var SelectDropdownIndicator$1 = function SelectDropdownIndicator(props) {
|
|
22071
22072
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22072
22073
|
"data-testid": "select-arrow"
|
|
22073
|
-
}, /*#__PURE__*/React__default["default"].createElement(components.DropdownIndicator, Object.assign({}, props)));
|
|
22074
|
+
}, /*#__PURE__*/React__default["default"].createElement(components.DropdownIndicator, Object.assign({}, props), props.children));
|
|
22074
22075
|
};
|
|
22075
22076
|
var SelectContainer$1 = function SelectContainer(props) {
|
|
22076
22077
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22077
22078
|
"data-testid": "select-container"
|
|
22078
|
-
}, /*#__PURE__*/React__default["default"].createElement(components.SelectContainer, Object.assign({}, props)));
|
|
22079
|
+
}, /*#__PURE__*/React__default["default"].createElement(components.SelectContainer, Object.assign({}, props), props.children));
|
|
22079
22080
|
};
|
|
22080
22081
|
var SelectInput$1 = function SelectInput(props) {
|
|
22081
22082
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22082
22083
|
"data-testid": "select-input"
|
|
22083
|
-
}, /*#__PURE__*/React__default["default"].createElement(components.Input, Object.assign({}, props)));
|
|
22084
|
+
}, /*#__PURE__*/React__default["default"].createElement(components.Input, Object.assign({}, props), props.children));
|
|
22084
22085
|
};
|
|
22085
22086
|
var SelectMenu$1 = function SelectMenu(props) {
|
|
22086
22087
|
if (!props.selectProps.inputValue && props.options.length === 0) {
|
|
@@ -22089,8 +22090,17 @@
|
|
|
22089
22090
|
|
|
22090
22091
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
22091
22092
|
"data-testid": "select-dropdown"
|
|
22092
|
-
}, /*#__PURE__*/React__default["default"].createElement(components.Menu, Object.assign({}, props)));
|
|
22093
|
+
}, /*#__PURE__*/React__default["default"].createElement(components.Menu, Object.assign({}, props), props.children));
|
|
22093
22094
|
};
|
|
22095
|
+
function SelectOption(props) {
|
|
22096
|
+
var size = useComponentSize(props.size);
|
|
22097
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledOption, {
|
|
22098
|
+
isSelected: props.isSelected,
|
|
22099
|
+
isFocused: props.isFocused,
|
|
22100
|
+
size: size,
|
|
22101
|
+
"data-testid": "select-option"
|
|
22102
|
+
}, /*#__PURE__*/React__default["default"].createElement(components.Option, Object.assign({}, props), props.children));
|
|
22103
|
+
}
|
|
22094
22104
|
|
|
22095
22105
|
var AsyncSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
22096
22106
|
var autocomplete = _a.autocomplete,
|
|
@@ -22176,7 +22186,7 @@
|
|
|
22176
22186
|
Option: function Option(props) {
|
|
22177
22187
|
return /*#__PURE__*/React__default["default"].createElement(SelectOption, Object.assign({
|
|
22178
22188
|
size: componentSize
|
|
22179
|
-
}, props));
|
|
22189
|
+
}, props), props.children);
|
|
22180
22190
|
},
|
|
22181
22191
|
Control: SelectControl$1,
|
|
22182
22192
|
MultiValue: SelectMultiValue$1,
|
|
@@ -49303,7 +49313,7 @@
|
|
|
49303
49313
|
isMulti: multiselect,
|
|
49304
49314
|
components: Object.assign({
|
|
49305
49315
|
Option: function Option(props) {
|
|
49306
|
-
return /*#__PURE__*/React__default["default"].createElement(SelectOption, Object.assign({
|
|
49316
|
+
return /*#__PURE__*/React__default["default"].createElement(SelectOption$1, Object.assign({
|
|
49307
49317
|
size: componentSize
|
|
49308
49318
|
}, props));
|
|
49309
49319
|
},
|
|
@@ -49430,27 +49440,34 @@
|
|
|
49430
49440
|
};
|
|
49431
49441
|
});
|
|
49432
49442
|
|
|
49433
|
-
|
|
49434
|
-
var
|
|
49435
|
-
|
|
49436
|
-
|
|
49437
|
-
|
|
49438
|
-
|
|
49439
|
-
|
|
49440
|
-
|
|
49441
|
-
|
|
49442
|
-
|
|
49443
|
-
dataKey =
|
|
49444
|
-
|
|
49445
|
-
return headerFormatter({
|
|
49443
|
+
function renderHeaderCellContent(_ref2) {
|
|
49444
|
+
var _ref2$headerFormatter = _ref2.headerFormatter,
|
|
49445
|
+
headerFormatter = _ref2$headerFormatter === void 0 ? function (_ref3) {
|
|
49446
|
+
var label = _ref3.label;
|
|
49447
|
+
return label;
|
|
49448
|
+
} : _ref2$headerFormatter,
|
|
49449
|
+
align = _ref2.align,
|
|
49450
|
+
label = _ref2.label,
|
|
49451
|
+
width = _ref2.width,
|
|
49452
|
+
metadata = _ref2.metadata,
|
|
49453
|
+
dataKey = _ref2.dataKey,
|
|
49454
|
+
key = _ref2.key;
|
|
49455
|
+
return key ? headerFormatter({
|
|
49456
|
+
align: align,
|
|
49457
|
+
label: label,
|
|
49458
|
+
width: width,
|
|
49459
|
+
metadata: metadata,
|
|
49460
|
+
key: key
|
|
49461
|
+
}) : headerFormatter({
|
|
49446
49462
|
align: align,
|
|
49447
49463
|
label: label,
|
|
49448
|
-
|
|
49449
|
-
|
|
49464
|
+
width: width,
|
|
49465
|
+
metadata: metadata,
|
|
49466
|
+
dataKey: dataKey
|
|
49450
49467
|
});
|
|
49451
|
-
}
|
|
49468
|
+
}
|
|
49452
49469
|
|
|
49453
|
-
|
|
49470
|
+
function TableHead(_ref4) {
|
|
49454
49471
|
var columns = _ref4.columns,
|
|
49455
49472
|
compact = _ref4.compact,
|
|
49456
49473
|
sticky = _ref4.sticky;
|
|
@@ -49471,7 +49488,7 @@
|
|
|
49471
49488
|
};
|
|
49472
49489
|
|
|
49473
49490
|
return /*#__PURE__*/React__default["default"].createElement("thead", null, /*#__PURE__*/React__default["default"].createElement(StyledHeaderRow, null, renderColumns(columns)));
|
|
49474
|
-
}
|
|
49491
|
+
}
|
|
49475
49492
|
|
|
49476
49493
|
var columnPropType = PropTypes__default["default"].shape({
|
|
49477
49494
|
align: PropTypes__default["default"].oneOf(["right", "left", "center"]),
|
|
@@ -49760,14 +49777,14 @@
|
|
|
49760
49777
|
compact: PropTypes__default["default"].bool.isRequired
|
|
49761
49778
|
};
|
|
49762
49779
|
|
|
49763
|
-
|
|
49780
|
+
function TableFoot(_ref3) {
|
|
49764
49781
|
var columns = _ref3.columns,
|
|
49765
49782
|
rows = _ref3.rows,
|
|
49766
49783
|
keyField = _ref3.keyField,
|
|
49767
49784
|
loading = _ref3.loading,
|
|
49768
49785
|
compact = _ref3.compact;
|
|
49769
49786
|
return /*#__PURE__*/React__default["default"].createElement("tfoot", null, renderRows(rows, columns, keyField, loading, compact));
|
|
49770
|
-
}
|
|
49787
|
+
}
|
|
49771
49788
|
|
|
49772
49789
|
TableFoot.propTypes = {
|
|
49773
49790
|
columns: columnsPropType.isRequired,
|
|
@@ -49792,7 +49809,7 @@
|
|
|
49792
49809
|
position: "relative"
|
|
49793
49810
|
});
|
|
49794
49811
|
|
|
49795
|
-
|
|
49812
|
+
function BaseTable(_a) {
|
|
49796
49813
|
var columns = _a.columns,
|
|
49797
49814
|
rows = _a.rows,
|
|
49798
49815
|
_a$noRowsContent = _a.noRowsContent,
|
|
@@ -49838,7 +49855,7 @@
|
|
|
49838
49855
|
loading: loading,
|
|
49839
49856
|
compact: compact
|
|
49840
49857
|
}));
|
|
49841
|
-
}
|
|
49858
|
+
}
|
|
49842
49859
|
|
|
49843
49860
|
BaseTable.propTypes = Object.assign(Object.assign({}, propTypes.space), {
|
|
49844
49861
|
columns: PropTypes__default["default"].any,
|
|
@@ -50347,7 +50364,7 @@
|
|
|
50347
50364
|
active: false
|
|
50348
50365
|
};
|
|
50349
50366
|
|
|
50350
|
-
|
|
50367
|
+
function Table(_a) {
|
|
50351
50368
|
var hasSelectableRows = _a.hasSelectableRows,
|
|
50352
50369
|
rowsPerPage = _a.rowsPerPage,
|
|
50353
50370
|
hasExpandableRows = _a.hasExpandableRows,
|
|
@@ -50374,7 +50391,7 @@
|
|
|
50374
50391
|
paginationCss: paginationCss,
|
|
50375
50392
|
paginationProps: paginationProps
|
|
50376
50393
|
}, props)) : /*#__PURE__*/React__default["default"].createElement(BaseTable, Object.assign({}, props));
|
|
50377
|
-
}
|
|
50394
|
+
}
|
|
50378
50395
|
|
|
50379
50396
|
Table.SortingHeader = SortingColumnHeader;
|
|
50380
50397
|
|
|
@@ -50385,7 +50402,7 @@
|
|
|
50385
50402
|
});
|
|
50386
50403
|
};
|
|
50387
50404
|
|
|
50388
|
-
|
|
50405
|
+
function applySort(rows, sortColumn, columns) {
|
|
50389
50406
|
return [].concat(rows).sort(function (a, b) {
|
|
50390
50407
|
var column = columns.find(function (col) {
|
|
50391
50408
|
return col.dataKey === sortColumn;
|
|
@@ -50393,14 +50410,14 @@
|
|
|
50393
50410
|
var numeric = column.numeric;
|
|
50394
50411
|
return numericAlphabeticalSort(a[sortColumn], b[sortColumn], numeric);
|
|
50395
50412
|
});
|
|
50396
|
-
}
|
|
50413
|
+
}
|
|
50397
50414
|
|
|
50398
|
-
|
|
50415
|
+
function sortRows(rows, columns, sortState) {
|
|
50399
50416
|
var sortedRows = applySort(rows, sortState.sortColumn, columns);
|
|
50400
50417
|
return sortState.ascending ? sortedRows : sortedRows.reverse();
|
|
50401
|
-
}
|
|
50418
|
+
}
|
|
50402
50419
|
|
|
50403
|
-
|
|
50420
|
+
function SortingTable(_a) {
|
|
50404
50421
|
var incomingColumns = _a.columns,
|
|
50405
50422
|
incomingRows = _a.rows,
|
|
50406
50423
|
initialSortColumn = _a.initialSortColumn,
|
|
@@ -50459,7 +50476,7 @@
|
|
|
50459
50476
|
columns: columns,
|
|
50460
50477
|
rows: rows
|
|
50461
50478
|
}, props));
|
|
50462
|
-
}
|
|
50479
|
+
}
|
|
50463
50480
|
|
|
50464
50481
|
var StatusIndicatorValues = {
|
|
50465
50482
|
neutral: "neutral",
|
|
@@ -52432,7 +52449,7 @@
|
|
|
52432
52449
|
exports.SelectInput = SelectInput;
|
|
52433
52450
|
exports.SelectMenu = SelectMenu;
|
|
52434
52451
|
exports.SelectMultiValue = SelectMultiValue;
|
|
52435
|
-
exports.SelectOption = SelectOption;
|
|
52452
|
+
exports.SelectOption = SelectOption$1;
|
|
52436
52453
|
exports.Sidebar = Sidebar;
|
|
52437
52454
|
exports.SmallNavBar = SmallNavBar$1;
|
|
52438
52455
|
exports.SortingTable = SortingTable;
|
package/dist/main.module.js
CHANGED
|
@@ -21953,6 +21953,32 @@ var customStyles = function customStyles(_ref6) {
|
|
|
21953
21953
|
};
|
|
21954
21954
|
};
|
|
21955
21955
|
|
|
21956
|
+
var getSubset = function getSubset(o, propObj) {
|
|
21957
|
+
var fields = Object.keys(propObj);
|
|
21958
|
+
return pick.apply(void 0, [o].concat(fields));
|
|
21959
|
+
};
|
|
21960
|
+
var omitSubset = function omitSubset(o, propObj) {
|
|
21961
|
+
var fields = Object.keys(propObj);
|
|
21962
|
+
var objectProps = Object.keys(o);
|
|
21963
|
+
return objectProps.reduce(function (a, x) {
|
|
21964
|
+
if (!fields.includes(x)) a[x] = o[x];
|
|
21965
|
+
return a;
|
|
21966
|
+
}, {});
|
|
21967
|
+
};
|
|
21968
|
+
|
|
21969
|
+
var pick = function pick(o) {
|
|
21970
|
+
var objectProps = Object.keys(o);
|
|
21971
|
+
|
|
21972
|
+
for (var _len = arguments.length, fields = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
21973
|
+
fields[_key - 1] = arguments[_key];
|
|
21974
|
+
}
|
|
21975
|
+
|
|
21976
|
+
return fields.reduce(function (a, x) {
|
|
21977
|
+
if (objectProps.includes(x)) a[x] = o[x];
|
|
21978
|
+
return a;
|
|
21979
|
+
}, {});
|
|
21980
|
+
};
|
|
21981
|
+
|
|
21956
21982
|
var StyledOption = styled.div.withConfig({
|
|
21957
21983
|
displayName: "SelectOption__StyledOption",
|
|
21958
21984
|
componentId: "sc-i7ae6z-0"
|
|
@@ -21995,41 +22021,16 @@ var StyledOption = styled.div.withConfig({
|
|
|
21995
22021
|
}
|
|
21996
22022
|
}, size);
|
|
21997
22023
|
});
|
|
21998
|
-
function SelectOption(props) {
|
|
22024
|
+
function SelectOption$1(props) {
|
|
22025
|
+
var size = useComponentSize(props.size);
|
|
21999
22026
|
return /*#__PURE__*/React__default.createElement(StyledOption, {
|
|
22000
22027
|
isSelected: props.isSelected,
|
|
22001
22028
|
isFocused: props.isFocused,
|
|
22002
|
-
size:
|
|
22029
|
+
size: size,
|
|
22003
22030
|
"data-testid": "select-option"
|
|
22004
|
-
}, /*#__PURE__*/React__default.createElement(components$1.Option, Object.assign({}, props)));
|
|
22031
|
+
}, /*#__PURE__*/React__default.createElement(components$1.Option, Object.assign({}, props), props.children));
|
|
22005
22032
|
}
|
|
22006
22033
|
|
|
22007
|
-
var getSubset = function getSubset(o, propObj) {
|
|
22008
|
-
var fields = Object.keys(propObj);
|
|
22009
|
-
return pick.apply(void 0, [o].concat(fields));
|
|
22010
|
-
};
|
|
22011
|
-
var omitSubset = function omitSubset(o, propObj) {
|
|
22012
|
-
var fields = Object.keys(propObj);
|
|
22013
|
-
var objectProps = Object.keys(o);
|
|
22014
|
-
return objectProps.reduce(function (a, x) {
|
|
22015
|
-
if (!fields.includes(x)) a[x] = o[x];
|
|
22016
|
-
return a;
|
|
22017
|
-
}, {});
|
|
22018
|
-
};
|
|
22019
|
-
|
|
22020
|
-
var pick = function pick(o) {
|
|
22021
|
-
var objectProps = Object.keys(o);
|
|
22022
|
-
|
|
22023
|
-
for (var _len = arguments.length, fields = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
22024
|
-
fields[_key - 1] = arguments[_key];
|
|
22025
|
-
}
|
|
22026
|
-
|
|
22027
|
-
return fields.reduce(function (a, x) {
|
|
22028
|
-
if (objectProps.includes(x)) a[x] = o[x];
|
|
22029
|
-
return a;
|
|
22030
|
-
}, {});
|
|
22031
|
-
};
|
|
22032
|
-
|
|
22033
22034
|
var SelectControl$1 = function SelectControl(props) {
|
|
22034
22035
|
// eslint-disable-next-line react/prop-types
|
|
22035
22036
|
var isFocused = props.isFocused;
|
|
@@ -22038,32 +22039,32 @@ var SelectControl$1 = function SelectControl(props) {
|
|
|
22038
22039
|
}, /*#__PURE__*/React__default.createElement(components.Control, Object.assign({
|
|
22039
22040
|
className: isFocused ? "nds-select--is-focused" : null,
|
|
22040
22041
|
isFocused: isFocused
|
|
22041
|
-
}, props)));
|
|
22042
|
+
}, props), props.children));
|
|
22042
22043
|
};
|
|
22043
22044
|
var SelectMultiValue$1 = function SelectMultiValue(props) {
|
|
22044
22045
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
22045
22046
|
"data-testid": "select-multivalue"
|
|
22046
|
-
}, /*#__PURE__*/React__default.createElement(components.MultiValue, Object.assign({}, props)));
|
|
22047
|
+
}, /*#__PURE__*/React__default.createElement(components.MultiValue, Object.assign({}, props), props.children));
|
|
22047
22048
|
};
|
|
22048
22049
|
var SelectClearIndicator$1 = function SelectClearIndicator(props) {
|
|
22049
22050
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
22050
22051
|
"data-testid": "select-clear"
|
|
22051
|
-
}, /*#__PURE__*/React__default.createElement(components.ClearIndicator, Object.assign({}, props)));
|
|
22052
|
+
}, /*#__PURE__*/React__default.createElement(components.ClearIndicator, Object.assign({}, props), props.children));
|
|
22052
22053
|
};
|
|
22053
22054
|
var SelectDropdownIndicator$1 = function SelectDropdownIndicator(props) {
|
|
22054
22055
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
22055
22056
|
"data-testid": "select-arrow"
|
|
22056
|
-
}, /*#__PURE__*/React__default.createElement(components.DropdownIndicator, Object.assign({}, props)));
|
|
22057
|
+
}, /*#__PURE__*/React__default.createElement(components.DropdownIndicator, Object.assign({}, props), props.children));
|
|
22057
22058
|
};
|
|
22058
22059
|
var SelectContainer$1 = function SelectContainer(props) {
|
|
22059
22060
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
22060
22061
|
"data-testid": "select-container"
|
|
22061
|
-
}, /*#__PURE__*/React__default.createElement(components.SelectContainer, Object.assign({}, props)));
|
|
22062
|
+
}, /*#__PURE__*/React__default.createElement(components.SelectContainer, Object.assign({}, props), props.children));
|
|
22062
22063
|
};
|
|
22063
22064
|
var SelectInput$1 = function SelectInput(props) {
|
|
22064
22065
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
22065
22066
|
"data-testid": "select-input"
|
|
22066
|
-
}, /*#__PURE__*/React__default.createElement(components.Input, Object.assign({}, props)));
|
|
22067
|
+
}, /*#__PURE__*/React__default.createElement(components.Input, Object.assign({}, props), props.children));
|
|
22067
22068
|
};
|
|
22068
22069
|
var SelectMenu$1 = function SelectMenu(props) {
|
|
22069
22070
|
if (!props.selectProps.inputValue && props.options.length === 0) {
|
|
@@ -22072,8 +22073,17 @@ var SelectMenu$1 = function SelectMenu(props) {
|
|
|
22072
22073
|
|
|
22073
22074
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
22074
22075
|
"data-testid": "select-dropdown"
|
|
22075
|
-
}, /*#__PURE__*/React__default.createElement(components.Menu, Object.assign({}, props)));
|
|
22076
|
+
}, /*#__PURE__*/React__default.createElement(components.Menu, Object.assign({}, props), props.children));
|
|
22076
22077
|
};
|
|
22078
|
+
function SelectOption(props) {
|
|
22079
|
+
var size = useComponentSize(props.size);
|
|
22080
|
+
return /*#__PURE__*/React__default.createElement(StyledOption, {
|
|
22081
|
+
isSelected: props.isSelected,
|
|
22082
|
+
isFocused: props.isFocused,
|
|
22083
|
+
size: size,
|
|
22084
|
+
"data-testid": "select-option"
|
|
22085
|
+
}, /*#__PURE__*/React__default.createElement(components.Option, Object.assign({}, props), props.children));
|
|
22086
|
+
}
|
|
22077
22087
|
|
|
22078
22088
|
var AsyncSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
22079
22089
|
var autocomplete = _a.autocomplete,
|
|
@@ -22159,7 +22169,7 @@ var AsyncSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
22159
22169
|
Option: function Option(props) {
|
|
22160
22170
|
return /*#__PURE__*/React__default.createElement(SelectOption, Object.assign({
|
|
22161
22171
|
size: componentSize
|
|
22162
|
-
}, props));
|
|
22172
|
+
}, props), props.children);
|
|
22163
22173
|
},
|
|
22164
22174
|
Control: SelectControl$1,
|
|
22165
22175
|
MultiValue: SelectMultiValue$1,
|
|
@@ -49286,7 +49296,7 @@ var ReactSelect = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
|
|
|
49286
49296
|
isMulti: multiselect,
|
|
49287
49297
|
components: Object.assign({
|
|
49288
49298
|
Option: function Option(props) {
|
|
49289
|
-
return /*#__PURE__*/React__default.createElement(SelectOption, Object.assign({
|
|
49299
|
+
return /*#__PURE__*/React__default.createElement(SelectOption$1, Object.assign({
|
|
49290
49300
|
size: componentSize
|
|
49291
49301
|
}, props));
|
|
49292
49302
|
},
|
|
@@ -49413,27 +49423,34 @@ var StyledHeaderRow = styled.tr.withConfig({
|
|
|
49413
49423
|
};
|
|
49414
49424
|
});
|
|
49415
49425
|
|
|
49416
|
-
|
|
49417
|
-
var
|
|
49418
|
-
|
|
49419
|
-
|
|
49420
|
-
|
|
49421
|
-
|
|
49422
|
-
|
|
49423
|
-
|
|
49424
|
-
|
|
49425
|
-
|
|
49426
|
-
dataKey =
|
|
49427
|
-
|
|
49428
|
-
return headerFormatter({
|
|
49426
|
+
function renderHeaderCellContent(_ref2) {
|
|
49427
|
+
var _ref2$headerFormatter = _ref2.headerFormatter,
|
|
49428
|
+
headerFormatter = _ref2$headerFormatter === void 0 ? function (_ref3) {
|
|
49429
|
+
var label = _ref3.label;
|
|
49430
|
+
return label;
|
|
49431
|
+
} : _ref2$headerFormatter,
|
|
49432
|
+
align = _ref2.align,
|
|
49433
|
+
label = _ref2.label,
|
|
49434
|
+
width = _ref2.width,
|
|
49435
|
+
metadata = _ref2.metadata,
|
|
49436
|
+
dataKey = _ref2.dataKey,
|
|
49437
|
+
key = _ref2.key;
|
|
49438
|
+
return key ? headerFormatter({
|
|
49439
|
+
align: align,
|
|
49440
|
+
label: label,
|
|
49441
|
+
width: width,
|
|
49442
|
+
metadata: metadata,
|
|
49443
|
+
key: key
|
|
49444
|
+
}) : headerFormatter({
|
|
49429
49445
|
align: align,
|
|
49430
49446
|
label: label,
|
|
49431
|
-
|
|
49432
|
-
|
|
49447
|
+
width: width,
|
|
49448
|
+
metadata: metadata,
|
|
49449
|
+
dataKey: dataKey
|
|
49433
49450
|
});
|
|
49434
|
-
}
|
|
49451
|
+
}
|
|
49435
49452
|
|
|
49436
|
-
|
|
49453
|
+
function TableHead(_ref4) {
|
|
49437
49454
|
var columns = _ref4.columns,
|
|
49438
49455
|
compact = _ref4.compact,
|
|
49439
49456
|
sticky = _ref4.sticky;
|
|
@@ -49454,7 +49471,7 @@ var TableHead = function TableHead(_ref4) {
|
|
|
49454
49471
|
};
|
|
49455
49472
|
|
|
49456
49473
|
return /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement(StyledHeaderRow, null, renderColumns(columns)));
|
|
49457
|
-
}
|
|
49474
|
+
}
|
|
49458
49475
|
|
|
49459
49476
|
var columnPropType = PropTypes.shape({
|
|
49460
49477
|
align: PropTypes.oneOf(["right", "left", "center"]),
|
|
@@ -49743,14 +49760,14 @@ TableFooterRow.propTypes = {
|
|
|
49743
49760
|
compact: PropTypes.bool.isRequired
|
|
49744
49761
|
};
|
|
49745
49762
|
|
|
49746
|
-
|
|
49763
|
+
function TableFoot(_ref3) {
|
|
49747
49764
|
var columns = _ref3.columns,
|
|
49748
49765
|
rows = _ref3.rows,
|
|
49749
49766
|
keyField = _ref3.keyField,
|
|
49750
49767
|
loading = _ref3.loading,
|
|
49751
49768
|
compact = _ref3.compact;
|
|
49752
49769
|
return /*#__PURE__*/React__default.createElement("tfoot", null, renderRows(rows, columns, keyField, loading, compact));
|
|
49753
|
-
}
|
|
49770
|
+
}
|
|
49754
49771
|
|
|
49755
49772
|
TableFoot.propTypes = {
|
|
49756
49773
|
columns: columnsPropType.isRequired,
|
|
@@ -49775,7 +49792,7 @@ var StyledTable = styled.table.withConfig({
|
|
|
49775
49792
|
position: "relative"
|
|
49776
49793
|
});
|
|
49777
49794
|
|
|
49778
|
-
|
|
49795
|
+
function BaseTable(_a) {
|
|
49779
49796
|
var columns = _a.columns,
|
|
49780
49797
|
rows = _a.rows,
|
|
49781
49798
|
_a$noRowsContent = _a.noRowsContent,
|
|
@@ -49821,7 +49838,7 @@ var BaseTable = function BaseTable(_a) {
|
|
|
49821
49838
|
loading: loading,
|
|
49822
49839
|
compact: compact
|
|
49823
49840
|
}));
|
|
49824
|
-
}
|
|
49841
|
+
}
|
|
49825
49842
|
|
|
49826
49843
|
BaseTable.propTypes = Object.assign(Object.assign({}, propTypes.space), {
|
|
49827
49844
|
columns: PropTypes.any,
|
|
@@ -50330,7 +50347,7 @@ SortingColumnHeader.defaultProps = {
|
|
|
50330
50347
|
active: false
|
|
50331
50348
|
};
|
|
50332
50349
|
|
|
50333
|
-
|
|
50350
|
+
function Table(_a) {
|
|
50334
50351
|
var hasSelectableRows = _a.hasSelectableRows,
|
|
50335
50352
|
rowsPerPage = _a.rowsPerPage,
|
|
50336
50353
|
hasExpandableRows = _a.hasExpandableRows,
|
|
@@ -50357,7 +50374,7 @@ var Table = function Table(_a) {
|
|
|
50357
50374
|
paginationCss: paginationCss,
|
|
50358
50375
|
paginationProps: paginationProps
|
|
50359
50376
|
}, props)) : /*#__PURE__*/React__default.createElement(BaseTable, Object.assign({}, props));
|
|
50360
|
-
}
|
|
50377
|
+
}
|
|
50361
50378
|
|
|
50362
50379
|
Table.SortingHeader = SortingColumnHeader;
|
|
50363
50380
|
|
|
@@ -50368,7 +50385,7 @@ var numericAlphabeticalSort = function numericAlphabeticalSort(a, b, numeric) {
|
|
|
50368
50385
|
});
|
|
50369
50386
|
};
|
|
50370
50387
|
|
|
50371
|
-
|
|
50388
|
+
function applySort(rows, sortColumn, columns) {
|
|
50372
50389
|
return [].concat(rows).sort(function (a, b) {
|
|
50373
50390
|
var column = columns.find(function (col) {
|
|
50374
50391
|
return col.dataKey === sortColumn;
|
|
@@ -50376,14 +50393,14 @@ var applySort = function applySort(rows, sortColumn, columns) {
|
|
|
50376
50393
|
var numeric = column.numeric;
|
|
50377
50394
|
return numericAlphabeticalSort(a[sortColumn], b[sortColumn], numeric);
|
|
50378
50395
|
});
|
|
50379
|
-
}
|
|
50396
|
+
}
|
|
50380
50397
|
|
|
50381
|
-
|
|
50398
|
+
function sortRows(rows, columns, sortState) {
|
|
50382
50399
|
var sortedRows = applySort(rows, sortState.sortColumn, columns);
|
|
50383
50400
|
return sortState.ascending ? sortedRows : sortedRows.reverse();
|
|
50384
|
-
}
|
|
50401
|
+
}
|
|
50385
50402
|
|
|
50386
|
-
|
|
50403
|
+
function SortingTable(_a) {
|
|
50387
50404
|
var incomingColumns = _a.columns,
|
|
50388
50405
|
incomingRows = _a.rows,
|
|
50389
50406
|
initialSortColumn = _a.initialSortColumn,
|
|
@@ -50442,7 +50459,7 @@ var SortingTable = function SortingTable(_a) {
|
|
|
50442
50459
|
columns: columns,
|
|
50443
50460
|
rows: rows
|
|
50444
50461
|
}, props));
|
|
50445
|
-
}
|
|
50462
|
+
}
|
|
50446
50463
|
|
|
50447
50464
|
var StatusIndicatorValues = {
|
|
50448
50465
|
neutral: "neutral",
|
|
@@ -52342,4 +52359,4 @@ TruncatedText.defaultProps = {
|
|
|
52342
52359
|
tooltipProps: undefined
|
|
52343
52360
|
};
|
|
52344
52361
|
|
|
52345
|
-
export { ALL_NDS_LOCALES, Alert$1 as Alert, AnimatedBox, ApplicationFrame, AsyncSelect, Banner, Box, BrandLogoContainer, NavBar$1 as BrandedNavBar, Branding, Breadcrumbs, Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, DesktopMenu$1 as DesktopMenu, Divider$1 as Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, EnvironmentBanner, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Header, Heading1, Heading2, Heading3, Heading4, HelpText, Icon, IconicButton, InlineIcon, InlineValidation, Input, Link, List, ListItem, LoadingAnimation, MenuTrigger$1 as MenuTrigger, Modal, NDSProvider, NavBar, NavBarBackground$1 as NavBarBackground, NotificationTypes, Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, ReactSelect as Select, SelectClearIndicator, SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption, Sidebar, SmallNavBar$1 as SmallNavBar, SortingTable, StatusIndicator, StatusIndicatorValues, Summary, SummaryDivider, SummaryItem, Switch$1 as Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToastContainer, ToggleComponent as Toggle, Tooltip, TruncatedText, addStyledProps, Theme as theme, toast, useWindowDimensions };
|
|
52362
|
+
export { ALL_NDS_LOCALES, Alert$1 as Alert, AnimatedBox, ApplicationFrame, AsyncSelect, Banner, Box, BrandLogoContainer, NavBar$1 as BrandedNavBar, Branding, Breadcrumbs, Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, DesktopMenu$1 as DesktopMenu, Divider$1 as Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, EnvironmentBanner, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Header, Heading1, Heading2, Heading3, Heading4, HelpText, Icon, IconicButton, InlineIcon, InlineValidation, Input, Link, List, ListItem, LoadingAnimation, MenuTrigger$1 as MenuTrigger, Modal, NDSProvider, NavBar, NavBarBackground$1 as NavBarBackground, NotificationTypes, Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, ReactSelect as Select, SelectClearIndicator, SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption$1 as SelectOption, Sidebar, SmallNavBar$1 as SmallNavBar, SortingTable, StatusIndicator, StatusIndicatorValues, Summary, SummaryDivider, SummaryItem, Switch$1 as Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToastContainer, ToggleComponent as Toggle, Tooltip, TruncatedText, addStyledProps, Theme as theme, toast, useWindowDimensions };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ClearIndicatorProps, ContainerProps, ControlProps, DropdownIndicatorProps, InputProps, MenuProps, MultiValueProps } from "react-select";
|
|
3
3
|
import { GroupBase } from "react-select";
|
|
4
|
+
import { OptionProps } from "react-windowed-select";
|
|
5
|
+
import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
|
|
4
6
|
export declare const SelectControl: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ControlProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
5
7
|
export declare const SelectMultiValue: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MultiValueProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
6
8
|
export declare const SelectClearIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ClearIndicatorProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
@@ -8,3 +10,6 @@ export declare const SelectDropdownIndicator: <Option, IsMulti extends boolean,
|
|
|
8
10
|
export declare const SelectContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ContainerProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
9
11
|
export declare const SelectInput: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: InputProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
10
12
|
export declare const SelectMenu: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuProps<Option, IsMulti, Group>) => React.JSX.Element;
|
|
13
|
+
export declare function SelectOption<Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: OptionProps<Option, IsMulti, Group> & {
|
|
14
|
+
size?: ComponentSize;
|
|
15
|
+
}): React.JSX.Element;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { OptionProps } from "react-windowed-select";
|
|
3
|
-
import { GroupBase } from "react-select";
|
|
4
3
|
import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
|
|
5
|
-
|
|
4
|
+
type SelectOptionProps = {
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
isFocused: boolean;
|
|
6
7
|
size: ComponentSize;
|
|
7
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export declare const StyledOption: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, SelectOptionProps, never>;
|
|
10
|
+
interface CustomOptionProps extends OptionProps {
|
|
11
|
+
size?: ComponentSize;
|
|
12
|
+
}
|
|
13
|
+
export declare function SelectOption(props: CustomOptionProps): React.JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { TableProps } from "../Table";
|
|
3
|
-
type SortingTableProps = TableProps & {
|
|
3
|
+
type SortingTableProps<ColumnMetadata> = TableProps<ColumnMetadata> & {
|
|
4
4
|
initialSortColumn: string;
|
|
5
5
|
};
|
|
6
|
-
declare
|
|
6
|
+
declare function SortingTable<ColumnMetadata>({ columns: incomingColumns, rows: incomingRows, initialSortColumn, ...props }: SortingTableProps<ColumnMetadata>): React.JSX.Element;
|
|
7
7
|
export default SortingTable;
|
|
@@ -1,25 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { SortingTable } from ".";
|
|
2
3
|
declare const _default: {
|
|
3
4
|
title: string;
|
|
4
|
-
component:
|
|
5
|
-
selectedRows?: string[];
|
|
6
|
-
onRowSelectionChange?: (...args: any[]) => any;
|
|
7
|
-
onRowExpansionChange?: (...args: any[]) => any;
|
|
8
|
-
rowsPerPage?: number;
|
|
9
|
-
onPageChange?: (...args: any[]) => any;
|
|
10
|
-
selectAllAriaLabel?: string;
|
|
11
|
-
deselectAllAriaLabel?: string;
|
|
12
|
-
paginationCss?: any;
|
|
13
|
-
paginationProps?: any;
|
|
14
|
-
expandedRows?: any[];
|
|
15
|
-
hasSelectableRows?: boolean;
|
|
16
|
-
hasExpandableRows?: boolean;
|
|
17
|
-
onSelectRow?: (...args: any[]) => any;
|
|
18
|
-
onSelectHeader?: (...args: any[]) => any;
|
|
19
|
-
isHeaderSelected?: any;
|
|
20
|
-
} & {
|
|
21
|
-
initialSortColumn: string;
|
|
22
|
-
}>;
|
|
5
|
+
component: typeof SortingTable;
|
|
23
6
|
};
|
|
24
7
|
export default _default;
|
|
25
8
|
export declare const _SortingTable: () => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { RowType, Columns } from "./Table.types";
|
|
3
|
-
export type BaseTableProps = {
|
|
4
|
-
columns: Columns
|
|
3
|
+
export type BaseTableProps<ColumnMetaData> = {
|
|
4
|
+
columns: Columns<ColumnMetaData>;
|
|
5
5
|
rows: RowType[];
|
|
6
6
|
noRowsContent?: string;
|
|
7
7
|
keyField?: string;
|
|
@@ -17,5 +17,21 @@ export type BaseTableProps = {
|
|
|
17
17
|
onMouseEnter?: any;
|
|
18
18
|
onMouseLeave?: any;
|
|
19
19
|
};
|
|
20
|
-
declare
|
|
20
|
+
declare function BaseTable<ColumnMetaData>({ columns, rows, noRowsContent, keyField, id, loading, footerRows, rowHovers, compact, className, stickyHeader, onRowMouseEnter, onRowMouseLeave, ...props }: BaseTableProps<ColumnMetaData>): React.JSX.Element;
|
|
21
|
+
declare namespace BaseTable {
|
|
22
|
+
var propTypes: any;
|
|
23
|
+
var defaultProps: {
|
|
24
|
+
noRowsContent: string;
|
|
25
|
+
keyField: string;
|
|
26
|
+
id: any;
|
|
27
|
+
loading: boolean;
|
|
28
|
+
footerRows: any[];
|
|
29
|
+
rowHovers: boolean;
|
|
30
|
+
compact: boolean;
|
|
31
|
+
className: any;
|
|
32
|
+
stickyHeader: boolean;
|
|
33
|
+
onRowMouseEnter: () => void;
|
|
34
|
+
onRowMouseLeave: () => void;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
21
37
|
export default BaseTable;
|
|
@@ -3,70 +3,16 @@ declare const _default: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const WithData:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export declare const WithStickyHeader: {
|
|
19
|
-
(): React.JSX.Element;
|
|
20
|
-
story: {
|
|
21
|
-
name: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export declare const WithLotsOfRowsAndColumns: {
|
|
25
|
-
(): React.JSX.Element;
|
|
26
|
-
story: {
|
|
27
|
-
name: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export declare const WithCustomColumnWidths: {
|
|
31
|
-
(): React.JSX.Element;
|
|
32
|
-
story: {
|
|
33
|
-
name: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export declare const WithACustomCellComponent: {
|
|
37
|
-
(): React.JSX.Element;
|
|
38
|
-
story: {
|
|
39
|
-
name: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export declare const WithCellAlignment: {
|
|
43
|
-
(): React.JSX.Element;
|
|
44
|
-
story: {
|
|
45
|
-
name: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
export declare const WithACellFormatter: {
|
|
49
|
-
(): React.JSX.Element;
|
|
50
|
-
story: {
|
|
51
|
-
name: string;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
export declare const WithACustomColumnLabelComponent: {
|
|
55
|
-
(): React.JSX.Element;
|
|
56
|
-
story: {
|
|
57
|
-
name: string;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
export declare const WithFullWidthSection: {
|
|
61
|
-
(): React.JSX.Element;
|
|
62
|
-
story: {
|
|
63
|
-
name: string;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
export declare const WithAFooter: {
|
|
67
|
-
(): React.JSX.Element;
|
|
68
|
-
story: {
|
|
69
|
-
name: string;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
6
|
+
export declare const WithData: () => React.JSX.Element;
|
|
7
|
+
export declare const WithNoData: () => React.JSX.Element;
|
|
8
|
+
export declare const WithStickyHeader: () => React.JSX.Element;
|
|
9
|
+
export declare const WithLotsOfRowsAndColumns: () => React.JSX.Element;
|
|
10
|
+
export declare const WithCustomColumnWidths: () => React.JSX.Element;
|
|
11
|
+
export declare const WithACustomCellComponent: () => React.JSX.Element;
|
|
12
|
+
export declare const WithCellAlignment: () => React.JSX.Element;
|
|
13
|
+
export declare const WithACellFormatter: () => React.JSX.Element;
|
|
14
|
+
export declare const WithACustomColumnLabelComponent: () => React.JSX.Element;
|
|
15
|
+
export declare const WithMetadata: () => React.JSX.Element;
|
|
16
|
+
export declare const WithFullWidthSection: () => React.JSX.Element;
|
|
17
|
+
export declare const WithAFooter: () => React.JSX.Element;
|
|
72
18
|
export declare const WithRowBorder: () => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from "react";
|
|
2
2
|
import { BaseTableProps } from "./BaseTable";
|
|
3
|
-
export type StatefulTableProps = BaseTableProps & {
|
|
3
|
+
export type StatefulTableProps<ColumnMetaData> = BaseTableProps<ColumnMetaData> & {
|
|
4
4
|
selectedRows?: string[];
|
|
5
5
|
onRowSelectionChange?: (...args: any[]) => any;
|
|
6
6
|
onRowExpansionChange?: (...args: any[]) => any;
|
|
@@ -24,7 +24,7 @@ type StatefulTableState = {
|
|
|
24
24
|
currentPage: number;
|
|
25
25
|
paginatedRows: any;
|
|
26
26
|
};
|
|
27
|
-
declare class StatefulTable extends Component<StatefulTableProps
|
|
27
|
+
declare class StatefulTable<ColumnMetaData> extends Component<StatefulTableProps<ColumnMetaData>, StatefulTableState> {
|
|
28
28
|
static defaultProps: {
|
|
29
29
|
hasSelectableRows: boolean;
|
|
30
30
|
selectedRows: any[];
|
|
@@ -34,21 +34,17 @@ declare class StatefulTable extends Component<StatefulTableProps, StatefulTableS
|
|
|
34
34
|
deselectAllAriaLabel: any;
|
|
35
35
|
paginationCss: any;
|
|
36
36
|
paginationProps: {};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
onRowMouseEnter?: (...args: any[]) => any;
|
|
49
|
-
onRowMouseLeave?: (...args: any[]) => any;
|
|
50
|
-
onMouseEnter?: any;
|
|
51
|
-
onMouseLeave?: any;
|
|
37
|
+
noRowsContent: string;
|
|
38
|
+
keyField: string;
|
|
39
|
+
id: any;
|
|
40
|
+
loading: boolean;
|
|
41
|
+
footerRows: any[];
|
|
42
|
+
rowHovers: boolean;
|
|
43
|
+
compact: boolean;
|
|
44
|
+
className: any;
|
|
45
|
+
stickyHeader: boolean;
|
|
46
|
+
onRowMouseEnter: () => void;
|
|
47
|
+
onRowMouseLeave: () => void;
|
|
52
48
|
};
|
|
53
49
|
constructor(props: any);
|
|
54
50
|
static getDerivedStateFromProps(nextProps: any, prevState: any): {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StatefulTableProps } from "./StatefulTable";
|
|
3
3
|
import { ColumnType, RowType, CellInfoType } from "./Table.types";
|
|
4
|
-
export type TableProps = StatefulTableProps
|
|
5
|
-
export type TableColumnType = ColumnType
|
|
4
|
+
export type TableProps<ColumnMetadata> = StatefulTableProps<ColumnMetadata>;
|
|
5
|
+
export type TableColumnType<ColumnMetadata> = ColumnType<ColumnMetadata>;
|
|
6
6
|
export type TableRowType = RowType;
|
|
7
|
-
export type TableCellInfoType = CellInfoType
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
SortingHeader: {
|
|
7
|
+
export type TableCellInfoType<ColumnMetadata> = CellInfoType<ColumnMetadata>;
|
|
8
|
+
declare function Table<ColumnMetadata>({ hasSelectableRows, rowsPerPage, hasExpandableRows, selectedRows, onRowSelectionChange, onRowExpansionChange, onPageChange, selectAllAriaLabel, deselectAllAriaLabel, paginationCss, paginationProps, ...props }: TableProps<ColumnMetadata>): React.JSX.Element;
|
|
9
|
+
declare namespace Table {
|
|
10
|
+
var SortingHeader: {
|
|
11
11
|
({ onChange, label, ascending, active, ariaLabel }: {
|
|
12
12
|
onChange: any;
|
|
13
13
|
label: any;
|
|
@@ -29,5 +29,5 @@ declare const Table: {
|
|
|
29
29
|
active: boolean;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
}
|
|
32
|
+
}
|
|
33
33
|
export default Table;
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import type { Key } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
export type RowType = unknown;
|
|
4
|
-
export interface CellInfoType {
|
|
4
|
+
export interface CellInfoType<ColumnMetadata> {
|
|
5
5
|
cellData: unknown;
|
|
6
|
-
column: ColumnType
|
|
6
|
+
column: ColumnType<ColumnMetadata>;
|
|
7
7
|
row: RowType;
|
|
8
8
|
}
|
|
9
|
-
interface ColumnInfoType {
|
|
10
|
-
align?: ColumnAlignment;
|
|
11
|
-
label: string;
|
|
12
|
-
dataKey?: Key;
|
|
13
|
-
width?: string | number;
|
|
14
|
-
}
|
|
15
9
|
type ColumnAlignment = "left" | "right" | "center";
|
|
16
|
-
export type ColumnType = {
|
|
10
|
+
export type ColumnType<ColumnMetadata> = {
|
|
17
11
|
align?: ColumnAlignment;
|
|
18
12
|
label?: string;
|
|
19
|
-
cellFormatter?: (cell: CellInfoType) => React.ReactNode;
|
|
20
|
-
cellRenderer?: (cell: CellInfoType) => React.ReactNode;
|
|
21
|
-
headerRenderer?: (column:
|
|
22
|
-
headerFormatter?: (column:
|
|
13
|
+
cellFormatter?: (cell: CellInfoType<ColumnMetadata>) => React.ReactNode;
|
|
14
|
+
cellRenderer?: (cell: CellInfoType<ColumnMetadata>) => React.ReactNode;
|
|
15
|
+
headerRenderer?: (column: ColumnType<ColumnMetadata>) => React.ReactNode;
|
|
16
|
+
headerFormatter?: (column: ColumnType<ColumnMetadata>) => React.ReactNode;
|
|
23
17
|
width?: string | number;
|
|
18
|
+
metadata?: ColumnMetadata;
|
|
24
19
|
} & ({
|
|
25
20
|
key: Key;
|
|
26
21
|
dataKey?: never | undefined;
|
|
@@ -28,7 +23,7 @@ export type ColumnType = {
|
|
|
28
23
|
dataKey: Key;
|
|
29
24
|
key?: never | undefined;
|
|
30
25
|
});
|
|
31
|
-
export type Columns = ColumnType[];
|
|
26
|
+
export type Columns<ColumnMetadata> = ColumnType<ColumnMetadata>[];
|
|
32
27
|
export declare const columnPropType: PropTypes.Requireable<PropTypes.InferProps<{
|
|
33
28
|
align: PropTypes.Requireable<string>;
|
|
34
29
|
label: PropTypes.Requireable<string>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { RowType, Columns } from "./Table.types";
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
propTypes: {
|
|
4
|
+
declare function TableFoot<ColumnMetadata>({ columns, rows, keyField, loading, compact, }: {
|
|
5
|
+
columns: Columns<ColumnMetadata>;
|
|
6
|
+
rows: RowType[];
|
|
7
|
+
keyField?: string;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
compact?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare namespace TableFoot {
|
|
12
|
+
var propTypes: {
|
|
13
13
|
columns: PropTypes.Validator<PropTypes.InferProps<{
|
|
14
14
|
align: PropTypes.Requireable<string>;
|
|
15
15
|
label: PropTypes.Requireable<string>;
|
|
@@ -27,10 +27,10 @@ declare const TableFoot: {
|
|
|
27
27
|
loading: PropTypes.Requireable<boolean>;
|
|
28
28
|
compact: PropTypes.Requireable<boolean>;
|
|
29
29
|
};
|
|
30
|
-
defaultProps: {
|
|
30
|
+
var defaultProps: {
|
|
31
31
|
keyField: string;
|
|
32
32
|
loading: boolean;
|
|
33
33
|
compact: boolean;
|
|
34
34
|
};
|
|
35
|
-
}
|
|
35
|
+
}
|
|
36
36
|
export default TableFoot;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Columns } from "./Table.types";
|
|
3
|
-
interface TableHeadProps {
|
|
4
|
-
columns: Columns
|
|
3
|
+
interface TableHeadProps<ColumnMetadata> {
|
|
4
|
+
columns: Columns<ColumnMetadata>;
|
|
5
5
|
compact?: boolean;
|
|
6
6
|
sticky?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare
|
|
8
|
+
declare function TableHead<ColumnMetadata>({ columns, compact, sticky }: TableHeadProps<ColumnMetadata>): React.JSX.Element;
|
|
9
9
|
export default TableHead;
|