@paubox/ui 0.12.1 → 0.13.0
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.esm.js +40 -28
- package/package.json +1 -1
- package/src/lib/Modal/Modal.d.ts +2 -1
- package/src/lib/Pagination/Pagination.d.ts +2 -1
- package/src/lib/SearchBar/SearchBar.d.ts +2 -1
- package/src/lib/Table/ContextMenuCell.d.ts +2 -1
- package/src/lib/Table/Table.d.ts +2 -1
- package/src/lib/Table/TableBody.d.ts +2 -1
- package/src/lib/Table/TableHeader.d.ts +2 -1
package/index.esm.js
CHANGED
|
@@ -23709,7 +23709,7 @@ function _templateObject$g() {
|
|
|
23709
23709
|
}
|
|
23710
23710
|
function _templateObject1$b() {
|
|
23711
23711
|
var data = _tagged_template_literal$g([
|
|
23712
|
-
"\n flex: 1;\n border: none;\n overflow: scroll;\n min-width: 10rem;\n background-color: transparent;\n width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n\n :focus-visible {\n outline: none;\n }\n\n &::placeholder {\n color: ",
|
|
23712
|
+
"\n flex: 1;\n border: none;\n overflow: scroll;\n min-width: 10rem;\n background-color: transparent;\n width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n padding: 0;\n\n :focus-visible {\n outline: none;\n }\n\n &::placeholder {\n color: ",
|
|
23713
23713
|
";\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n\n ",
|
|
23714
23714
|
"\n"
|
|
23715
23715
|
]);
|
|
@@ -23784,13 +23784,6 @@ var MultiInput = function(_param) {
|
|
|
23784
23784
|
var _useState = _sliced_to_array$9(useState(''), 2), inputValue = _useState[0], setInputValue = _useState[1];
|
|
23785
23785
|
var _useState1 = _sliced_to_array$9(useState(false), 2), isFocused = _useState1[0], setIsFocused = _useState1[1];
|
|
23786
23786
|
var popperRef = useRef(null);
|
|
23787
|
-
var popperContentRef = useRef(null);
|
|
23788
|
-
useClickOutside([
|
|
23789
|
-
popperRef,
|
|
23790
|
-
popperContentRef
|
|
23791
|
-
], function() {
|
|
23792
|
-
setIsFocused(false);
|
|
23793
|
-
}, isFocused);
|
|
23794
23787
|
var handleKeyDown = function(e) {
|
|
23795
23788
|
if (e.key === 'Enter' && inputValue.trim()) {
|
|
23796
23789
|
e.preventDefault();
|
|
@@ -23842,11 +23835,10 @@ var MultiInput = function(_param) {
|
|
|
23842
23835
|
maxWidth: popperRef === null || popperRef === void 0 ? void 0 : (_popperRef_current = popperRef.current) === null || _popperRef_current === void 0 ? void 0 : _popperRef_current.offsetWidth,
|
|
23843
23836
|
side: "bottom",
|
|
23844
23837
|
align: "start",
|
|
23845
|
-
open: isFocused,
|
|
23838
|
+
open: isFocused && values.length > 0,
|
|
23846
23839
|
onClose: function() {
|
|
23847
23840
|
return setIsFocused(false);
|
|
23848
23841
|
},
|
|
23849
|
-
containerRefOverride: popperContentRef,
|
|
23850
23842
|
children: /*#__PURE__*/ jsx(ChipWrapper, {
|
|
23851
23843
|
sz: sz,
|
|
23852
23844
|
children: values === null || values === void 0 ? void 0 : values.map(function(value, index) {
|
|
@@ -28473,7 +28465,7 @@ var ModalHeader = styled.div(_templateObject2$5());
|
|
|
28473
28465
|
var ModalBody = styled.div(_templateObject3$4());
|
|
28474
28466
|
var ModalFooter = styled.div(_templateObject4$2(), spacing(1));
|
|
28475
28467
|
var Modal = function(param) {
|
|
28476
|
-
var open = param.open, onClose = param.onClose, loading = param.loading, title = param.title, header = param.header, children = param.children, actions = param.actions, style = param.style;
|
|
28468
|
+
var open = param.open, onClose = param.onClose, loading = param.loading, title = param.title, header = param.header, children = param.children, actions = param.actions, style = param.style, _param_testId = param.testId, testId = _param_testId === void 0 ? 'modal' : _param_testId;
|
|
28477
28469
|
return /*#__PURE__*/ jsx(StyledModal, {
|
|
28478
28470
|
open: open,
|
|
28479
28471
|
onClose: onClose,
|
|
@@ -28506,6 +28498,7 @@ var Modal = function(param) {
|
|
|
28506
28498
|
right: spacing(2),
|
|
28507
28499
|
background: 'transparent'
|
|
28508
28500
|
},
|
|
28501
|
+
"data-testid": "".concat(testId, "-close-button"),
|
|
28509
28502
|
children: /*#__PURE__*/ jsx(Close, {
|
|
28510
28503
|
fontSize: 24
|
|
28511
28504
|
})
|
|
@@ -28520,7 +28513,9 @@ var Modal = function(param) {
|
|
|
28520
28513
|
var label = _param.label, rest = _object_without_properties$3(_param, [
|
|
28521
28514
|
"label"
|
|
28522
28515
|
]);
|
|
28523
|
-
return /*#__PURE__*/ jsx(Button, _object_spread_props$7(_object_spread$7({
|
|
28516
|
+
return /*#__PURE__*/ jsx(Button, _object_spread_props$7(_object_spread$7({
|
|
28517
|
+
"data-testid": "".concat(testId, "-").concat(label.replace(' ', '-').toLowerCase(), "-button")
|
|
28518
|
+
}, rest), {
|
|
28524
28519
|
children: label
|
|
28525
28520
|
}));
|
|
28526
28521
|
})
|
|
@@ -28564,7 +28559,7 @@ function _templateObject1$6() {
|
|
|
28564
28559
|
var PaginationContainer = styled.div(_templateObject$8(), spacing(2), spacing(1), spacing(1));
|
|
28565
28560
|
var PageControls = styled.div(_templateObject1$6());
|
|
28566
28561
|
var Pagination = function(param) {
|
|
28567
|
-
var pageInfo = param.pageInfo, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, onPageSizeChange = param.onPageSizeChange, onPageChange = param.onPageChange;
|
|
28562
|
+
var pageInfo = param.pageInfo, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, onPageSizeChange = param.onPageSizeChange, onPageChange = param.onPageChange, _param_testId = param.testId, testId = _param_testId === void 0 ? 'pagination' : _param_testId;
|
|
28568
28563
|
return /*#__PURE__*/ jsxs(PaginationContainer, {
|
|
28569
28564
|
children: [
|
|
28570
28565
|
/*#__PURE__*/ jsxs(PageControls, {
|
|
@@ -28588,6 +28583,7 @@ var Pagination = function(param) {
|
|
|
28588
28583
|
style: {
|
|
28589
28584
|
fontSize: '0.75rem'
|
|
28590
28585
|
},
|
|
28586
|
+
"data-testid": "".concat(testId, "-pagesize-select"),
|
|
28591
28587
|
children: [
|
|
28592
28588
|
/*#__PURE__*/ jsx("option", {
|
|
28593
28589
|
value: "50",
|
|
@@ -28619,6 +28615,7 @@ var Pagination = function(param) {
|
|
|
28619
28615
|
padding: spacing(1),
|
|
28620
28616
|
marginLeft: spacing(1)
|
|
28621
28617
|
},
|
|
28618
|
+
"data-testid": "".concat(testId, "-prev-button"),
|
|
28622
28619
|
children: /*#__PURE__*/ jsx(ChevronLeft, {})
|
|
28623
28620
|
}),
|
|
28624
28621
|
/*#__PURE__*/ jsx(Button, {
|
|
@@ -28632,6 +28629,7 @@ var Pagination = function(param) {
|
|
|
28632
28629
|
padding: spacing(1),
|
|
28633
28630
|
marginLeft: spacing(1)
|
|
28634
28631
|
},
|
|
28632
|
+
"data-testid": "".concat(testId, "-next-button"),
|
|
28635
28633
|
children: /*#__PURE__*/ jsx(ChevronRight, {})
|
|
28636
28634
|
})
|
|
28637
28635
|
]
|
|
@@ -28917,13 +28915,14 @@ var IconWrapper = styled(IconWrapper$3)(_templateObject1$5(), neutral200, neutra
|
|
|
28917
28915
|
var StyledInput = styled(BaseInput$1)(_templateObject2$4());
|
|
28918
28916
|
var GoButton = styled(Button)(_templateObject3$3(), spacing(1), spacing(1));
|
|
28919
28917
|
var SearchBar = function(_param) {
|
|
28920
|
-
var placeholder = _param.placeholder, _param_error = _param.error, error = _param_error === void 0 ? false : _param_error, onClear = _param.onClear, onSubmit = _param.onSubmit, _param_showButton = _param.showButton, showButton = _param_showButton === void 0 ? true : _param_showButton, _param_showFilters = _param.showFilters, showFilters = _param_showFilters === void 0 ? false : _param_showFilters, props = _object_without_properties$2(_param, [
|
|
28918
|
+
var placeholder = _param.placeholder, _param_error = _param.error, error = _param_error === void 0 ? false : _param_error, onClear = _param.onClear, onSubmit = _param.onSubmit, _param_showButton = _param.showButton, showButton = _param_showButton === void 0 ? true : _param_showButton, _param_showFilters = _param.showFilters, showFilters = _param_showFilters === void 0 ? false : _param_showFilters, _param_testId = _param.testId, testId = _param_testId === void 0 ? 'search' : _param_testId, props = _object_without_properties$2(_param, [
|
|
28921
28919
|
"placeholder",
|
|
28922
28920
|
"error",
|
|
28923
28921
|
"onClear",
|
|
28924
28922
|
"onSubmit",
|
|
28925
28923
|
"showButton",
|
|
28926
|
-
"showFilters"
|
|
28924
|
+
"showFilters",
|
|
28925
|
+
"testId"
|
|
28927
28926
|
]);
|
|
28928
28927
|
var handleKeyDown = function(e) {
|
|
28929
28928
|
switch(e.key){
|
|
@@ -28949,7 +28948,8 @@ var SearchBar = function(_param) {
|
|
|
28949
28948
|
/*#__PURE__*/ jsx(StyledInput, _object_spread_props$5(_object_spread$5({}, props), {
|
|
28950
28949
|
onKeyDown: handleKeyDown,
|
|
28951
28950
|
error: error,
|
|
28952
|
-
placeholder: placeholder || 'Search'
|
|
28951
|
+
placeholder: placeholder || 'Search',
|
|
28952
|
+
"data-testid": "".concat(testId, "-input")
|
|
28953
28953
|
})),
|
|
28954
28954
|
Boolean(props.value && typeof onClear === 'function') && /*#__PURE__*/ jsx(IconButton, {
|
|
28955
28955
|
onClick: onClear,
|
|
@@ -28959,13 +28959,15 @@ var SearchBar = function(_param) {
|
|
|
28959
28959
|
style: {
|
|
28960
28960
|
position: 'absolute',
|
|
28961
28961
|
right: showButton ? spacing(10) : spacing(1)
|
|
28962
|
-
}
|
|
28962
|
+
},
|
|
28963
|
+
"data-testid": "".concat(testId, "-clear-button")
|
|
28963
28964
|
}),
|
|
28964
28965
|
showButton && /*#__PURE__*/ jsx(GoButton, {
|
|
28965
28966
|
color: "primary",
|
|
28966
28967
|
size: "large",
|
|
28967
28968
|
disabled: !props.value,
|
|
28968
28969
|
onClick: onSubmit,
|
|
28970
|
+
"data-testid": "".concat(testId, "-go-button"),
|
|
28969
28971
|
children: "Go"
|
|
28970
28972
|
})
|
|
28971
28973
|
]
|
|
@@ -33123,7 +33125,7 @@ var ResizeHandleContainer = styled.div(_templateObject3$2());
|
|
|
33123
33125
|
var ResizeHandle = styled.div(_templateObject4$1(), neutral300);
|
|
33124
33126
|
var SortIcon = styled.span(_templateObject5(), spacing(1));
|
|
33125
33127
|
var TableHeader = function(param) {
|
|
33126
|
-
var table = param.table, disableControls = param.disableControls, dense = param.dense;
|
|
33128
|
+
var table = param.table, disableControls = param.disableControls, dense = param.dense, _param_testId = param.testId, testId = _param_testId === void 0 ? 'table' : _param_testId;
|
|
33127
33129
|
return /*#__PURE__*/ jsx(StyledHeader, {
|
|
33128
33130
|
children: table.getHeaderGroups().map(function(headerGroup) {
|
|
33129
33131
|
return /*#__PURE__*/ jsx("tr", {
|
|
@@ -33152,6 +33154,7 @@ var TableHeader = function(param) {
|
|
|
33152
33154
|
width: (actionHeaders === null || actionHeaders === void 0 ? void 0 : actionHeaders.includes(header === null || header === void 0 ? void 0 : header.id)) ? "".concat(header.getSize(), "px") : '100%',
|
|
33153
33155
|
cursor: header.column.getCanSort() ? 'pointer' : 'default'
|
|
33154
33156
|
},
|
|
33157
|
+
"data-testid": header.column.getCanSort() ? "".concat(testId, "-column-header-").concat(header.id.replace(' ', '-').toLowerCase(), "-sort-button") : undefined,
|
|
33155
33158
|
children: [
|
|
33156
33159
|
flexRender(header.column.columnDef.header, header.getContext()),
|
|
33157
33160
|
header.column.getCanSort() && /*#__PURE__*/ jsxs(SortIcon, {
|
|
@@ -33240,7 +33243,7 @@ var Tr = styled.tr(_templateObject2$2(), function(props) {
|
|
|
33240
33243
|
});
|
|
33241
33244
|
var Td = styled(Typography)(_templateObject3$1(), neutral300);
|
|
33242
33245
|
var TableBody = function(param) {
|
|
33243
|
-
var table = param.table, columnWidths = param.columnWidths, enableRowSelection = param.enableRowSelection, onRowClick = param.onRowClick, dense = param.dense;
|
|
33246
|
+
var table = param.table, columnWidths = param.columnWidths, enableRowSelection = param.enableRowSelection, onRowClick = param.onRowClick, dense = param.dense, _param_testId = param.testId, testId = _param_testId === void 0 ? 'table' : _param_testId;
|
|
33244
33247
|
return /*#__PURE__*/ jsxs(StyledTableBody, {
|
|
33245
33248
|
children: [
|
|
33246
33249
|
/*#__PURE__*/ jsx("colgroup", {
|
|
@@ -33261,6 +33264,7 @@ var TableBody = function(param) {
|
|
|
33261
33264
|
background: row.getIsSelected() ? primary100 : undefined
|
|
33262
33265
|
},
|
|
33263
33266
|
enableHover: rowClickEnabled,
|
|
33267
|
+
"data-testid": "".concat(testId, "-row-").concat(row.id),
|
|
33264
33268
|
children: row.getVisibleCells().map(function(cell) {
|
|
33265
33269
|
return /*#__PURE__*/ jsx(Td, {
|
|
33266
33270
|
variant: "paragraph200Regular",
|
|
@@ -33300,7 +33304,7 @@ function _templateObject$3() {
|
|
|
33300
33304
|
}
|
|
33301
33305
|
var ContextMenuButton = styled(Button)(_templateObject$3(), spacing(0.5));
|
|
33302
33306
|
var ContextMenuCell = function(param) {
|
|
33303
|
-
var row = param.row, setOpenMenuId = param.setOpenMenuId, openMenuId = param.openMenuId, contextMenuActions = param.contextMenuActions;
|
|
33307
|
+
var row = param.row, setOpenMenuId = param.setOpenMenuId, openMenuId = param.openMenuId, contextMenuActions = param.contextMenuActions, _param_testId = param.testId, testId = _param_testId === void 0 ? 'table' : _param_testId;
|
|
33304
33308
|
var cellRef = useRef(null);
|
|
33305
33309
|
return /*#__PURE__*/ jsxs("div", {
|
|
33306
33310
|
ref: cellRef,
|
|
@@ -33313,6 +33317,7 @@ var ContextMenuCell = function(param) {
|
|
|
33313
33317
|
e.stopPropagation();
|
|
33314
33318
|
setOpenMenuId(openMenuId === row.id ? null : row.id);
|
|
33315
33319
|
},
|
|
33320
|
+
"data-testid": "".concat(testId, "-row-").concat(row.id, "-context-menu-button"),
|
|
33316
33321
|
children: /*#__PURE__*/ jsx(MoreVertical, {})
|
|
33317
33322
|
}),
|
|
33318
33323
|
/*#__PURE__*/ jsx(Popper, {
|
|
@@ -33334,7 +33339,8 @@ var ContextMenuCell = function(param) {
|
|
|
33334
33339
|
setOpenMenuId(null);
|
|
33335
33340
|
}
|
|
33336
33341
|
},
|
|
33337
|
-
label: action.label
|
|
33342
|
+
label: action.label,
|
|
33343
|
+
"data-testid": "".concat(testId, "-row-").concat(row.id, "-context-menu-").concat(action.label.replace(' ', '-').toLowerCase(), "-button")
|
|
33338
33344
|
}, index);
|
|
33339
33345
|
})
|
|
33340
33346
|
})
|
|
@@ -33484,7 +33490,7 @@ var TableContainer = styled(/*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
33484
33490
|
}))(_templateObject$2(), neutral300, spacing(1));
|
|
33485
33491
|
var TableWrapper = styled.table(_templateObject1$2());
|
|
33486
33492
|
var Table = function(param) {
|
|
33487
|
-
var columns = param.columns, _param_data = param.data, data = _param_data === void 0 ? [] : _param_data, getRowId = param.getRowId, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, pageInfo = param.pageInfo, onPageSizeChange = param.onPageSizeChange, onPageChange = param.onPageChange, sortBy = param.sortBy, sortOrder = param.sortOrder, onSortChange = param.onSortChange, _param_enableRowSelection = param.enableRowSelection, enableRowSelection = _param_enableRowSelection === void 0 ? false : _param_enableRowSelection, _param_selectedRows = param.selectedRows, selectedRows = _param_selectedRows === void 0 ? {} : _param_selectedRows, onRowSelectionChange = param.onRowSelectionChange, onRowClick = param.onRowClick, contextMenuActions = param.contextMenuActions, _param_dense = param.dense, dense = _param_dense === void 0 ? false : _param_dense, height = param.height, error = param.error;
|
|
33493
|
+
var columns = param.columns, _param_data = param.data, data = _param_data === void 0 ? [] : _param_data, getRowId = param.getRowId, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, pageInfo = param.pageInfo, onPageSizeChange = param.onPageSizeChange, onPageChange = param.onPageChange, sortBy = param.sortBy, sortOrder = param.sortOrder, onSortChange = param.onSortChange, _param_enableRowSelection = param.enableRowSelection, enableRowSelection = _param_enableRowSelection === void 0 ? false : _param_enableRowSelection, _param_selectedRows = param.selectedRows, selectedRows = _param_selectedRows === void 0 ? {} : _param_selectedRows, onRowSelectionChange = param.onRowSelectionChange, onRowClick = param.onRowClick, contextMenuActions = param.contextMenuActions, _param_dense = param.dense, dense = _param_dense === void 0 ? false : _param_dense, height = param.height, error = param.error, _param_testId = param.testId, testId = _param_testId === void 0 ? 'table' : _param_testId;
|
|
33488
33494
|
var containerRef = useRef(null);
|
|
33489
33495
|
var _useState = _sliced_to_array$1(useState({}), 2), columnSizing = _useState[0], setColumnSizing = _useState[1];
|
|
33490
33496
|
var _useState1 = _sliced_to_array$1(useState(null), 2), openMenuId = _useState1[0], setOpenMenuId = _useState1[1];
|
|
@@ -33522,7 +33528,8 @@ var Table = function(param) {
|
|
|
33522
33528
|
checked: table.getIsAllRowsSelected(),
|
|
33523
33529
|
indeterminate: table.getIsSomeRowsSelected(),
|
|
33524
33530
|
onChange: table.getToggleAllPageRowsSelectedHandler(),
|
|
33525
|
-
disabled: disableControls
|
|
33531
|
+
disabled: disableControls,
|
|
33532
|
+
"data-testid": "".concat(testId, "-header-checkbox")
|
|
33526
33533
|
});
|
|
33527
33534
|
},
|
|
33528
33535
|
cell: function(param) {
|
|
@@ -33534,7 +33541,8 @@ var Table = function(param) {
|
|
|
33534
33541
|
onClick: function(e) {
|
|
33535
33542
|
return e.stopPropagation();
|
|
33536
33543
|
},
|
|
33537
|
-
onChange: row.getToggleSelectedHandler()
|
|
33544
|
+
onChange: row.getToggleSelectedHandler(),
|
|
33545
|
+
"data-testid": "".concat(testId, "-row-").concat(row.id, "-checkbox")
|
|
33538
33546
|
});
|
|
33539
33547
|
},
|
|
33540
33548
|
enableResizing: false
|
|
@@ -33553,7 +33561,8 @@ var Table = function(param) {
|
|
|
33553
33561
|
row: row,
|
|
33554
33562
|
setOpenMenuId: setOpenMenuId,
|
|
33555
33563
|
openMenuId: openMenuId,
|
|
33556
|
-
contextMenuActions: contextMenuActions
|
|
33564
|
+
contextMenuActions: contextMenuActions,
|
|
33565
|
+
testId: testId
|
|
33557
33566
|
});
|
|
33558
33567
|
},
|
|
33559
33568
|
enableResizing: false
|
|
@@ -33662,14 +33671,16 @@ var Table = function(param) {
|
|
|
33662
33671
|
table: table,
|
|
33663
33672
|
columnWidths: columnWidths,
|
|
33664
33673
|
disableControls: disableControls,
|
|
33665
|
-
dense: dense
|
|
33674
|
+
dense: dense,
|
|
33675
|
+
testId: testId
|
|
33666
33676
|
}),
|
|
33667
33677
|
/*#__PURE__*/ jsx(TableBody, {
|
|
33668
33678
|
table: table,
|
|
33669
33679
|
columnWidths: columnWidths,
|
|
33670
33680
|
enableRowSelection: enableRowSelection,
|
|
33671
33681
|
onRowClick: onRowClick,
|
|
33672
|
-
dense: dense
|
|
33682
|
+
dense: dense,
|
|
33683
|
+
testId: testId
|
|
33673
33684
|
})
|
|
33674
33685
|
]
|
|
33675
33686
|
})
|
|
@@ -33685,7 +33696,8 @@ var Table = function(param) {
|
|
|
33685
33696
|
onPageChange: function(page) {
|
|
33686
33697
|
resetContainerScroll();
|
|
33687
33698
|
onPageChange(page);
|
|
33688
|
-
}
|
|
33699
|
+
},
|
|
33700
|
+
testId: "".concat(testId, "-pagination")
|
|
33689
33701
|
})
|
|
33690
33702
|
]
|
|
33691
33703
|
});
|
package/package.json
CHANGED
package/src/lib/Modal/Modal.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export interface ModalProps {
|
|
|
15
15
|
children?: ReactNode;
|
|
16
16
|
actions?: ModalAction[];
|
|
17
17
|
style?: CSSProperties;
|
|
18
|
+
testId?: string;
|
|
18
19
|
}
|
|
19
|
-
export declare const Modal: ({ open, onClose, loading, title, header, children, actions, style, }: ModalProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const Modal: ({ open, onClose, loading, title, header, children, actions, style, testId, }: ModalProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -9,6 +9,7 @@ interface PaginationProps {
|
|
|
9
9
|
isLoading: boolean;
|
|
10
10
|
onPageSizeChange: (size: number) => void;
|
|
11
11
|
onPageChange: (page: number) => void;
|
|
12
|
+
testId?: string;
|
|
12
13
|
}
|
|
13
|
-
export declare const Pagination: ({ pageInfo, isLoading, onPageSizeChange, onPageChange, }: PaginationProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const Pagination: ({ pageInfo, isLoading, onPageSizeChange, onPageChange, testId, }: PaginationProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -6,5 +6,6 @@ export interface SearchBarProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
6
6
|
error?: boolean;
|
|
7
7
|
showButton?: boolean;
|
|
8
8
|
showFilters?: boolean;
|
|
9
|
+
testId?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare const SearchBar: ({ placeholder, error, onClear, onSubmit, showButton, showFilters, ...props }: SearchBarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const SearchBar: ({ placeholder, error, onClear, onSubmit, showButton, showFilters, testId, ...props }: SearchBarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,7 @@ interface ContextMenuCellProps<T extends object> {
|
|
|
5
5
|
setOpenMenuId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
6
6
|
openMenuId: string | null;
|
|
7
7
|
contextMenuActions: RowAction<T>[];
|
|
8
|
+
testId?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const ContextMenuCell: <T extends object>({ row, setOpenMenuId, openMenuId, contextMenuActions, }: ContextMenuCellProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const ContextMenuCell: <T extends object>({ row, setOpenMenuId, openMenuId, contextMenuActions, testId, }: ContextMenuCellProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|
package/src/lib/Table/Table.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ interface PaginationProps {
|
|
|
48
48
|
}
|
|
49
49
|
interface TableDataProps<T> {
|
|
50
50
|
columns: TableColumn<T>[];
|
|
51
|
+
testId?: string;
|
|
51
52
|
data?: T[];
|
|
52
53
|
getRowId: (originalRow: T, index: number, parent?: Row<T> | undefined) => string;
|
|
53
54
|
isLoading?: boolean;
|
|
@@ -58,5 +59,5 @@ interface TableDataProps<T> {
|
|
|
58
59
|
}
|
|
59
60
|
export interface TableProps<T extends object> extends TableStyleProps, TableRowProps<T>, TableDataProps<T>, PaginationProps {
|
|
60
61
|
}
|
|
61
|
-
export declare const Table: <T extends object>({ columns, data, getRowId, isLoading, pageInfo, onPageSizeChange, onPageChange, sortBy, sortOrder, onSortChange, enableRowSelection, selectedRows, onRowSelectionChange, onRowClick, contextMenuActions, dense, height, error, }: TableProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
62
|
+
export declare const Table: <T extends object>({ columns, data, getRowId, isLoading, pageInfo, onPageSizeChange, onPageChange, sortBy, sortOrder, onSortChange, enableRowSelection, selectedRows, onRowSelectionChange, onRowClick, contextMenuActions, dense, height, error, testId, }: TableProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
62
63
|
export {};
|
|
@@ -6,6 +6,7 @@ interface TableBodyProps<T extends object> {
|
|
|
6
6
|
enableRowSelection?: boolean;
|
|
7
7
|
onRowClick?: (row: T) => void;
|
|
8
8
|
dense: boolean;
|
|
9
|
+
testId?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare const TableBody: <T extends object>({ table, columnWidths, enableRowSelection, onRowClick, dense, }: TableBodyProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const TableBody: <T extends object>({ table, columnWidths, enableRowSelection, onRowClick, dense, testId, }: TableBodyProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -5,6 +5,7 @@ interface TableHeaderProps<T> {
|
|
|
5
5
|
columnWidths: ColumnWidth[];
|
|
6
6
|
disableControls: boolean;
|
|
7
7
|
dense: boolean;
|
|
8
|
+
testId?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const TableHeader: <T extends object>({ table, disableControls, dense, }: TableHeaderProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const TableHeader: <T extends object>({ table, disableControls, dense, testId, }: TableHeaderProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
11
|
export {};
|