@tsed/react-formio 1.10.14 → 1.11.2
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/components/card/card.component.d.ts +2 -1
- package/dist/components/loader/loader.component.d.ts +3 -3
- package/dist/components/loader/loader.stories.d.ts +15 -0
- package/dist/components/pagination/pagination.component.spec.d.ts +1 -0
- package/dist/components/pagination/pagination.stories.d.ts +0 -27
- package/dist/components/table/filters/selectColumnFilter.component.spec.d.ts +1 -0
- package/dist/index.js +18 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +10 -3
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -4
- package/src/components/card/card.component.tsx +1 -0
- package/src/components/loader/loader.component.spec.tsx +7 -6
- package/src/components/loader/loader.component.tsx +3 -3
- package/src/components/loader/loader.stories.tsx +17 -0
- package/src/components/pagination/pagination.component.spec.tsx +137 -0
- package/src/components/pagination/pagination.component.tsx +2 -1
- package/src/components/pagination/pagination.stories.tsx +13 -29
- package/src/components/table/filters/selectColumnFilter.component.spec.tsx +54 -0
- package/src/components/table/filters/selectColumnFilter.component.tsx +8 -2
package/dist/index.modern.js
CHANGED
|
@@ -1357,6 +1357,7 @@ function PaginationButton(props) {
|
|
|
1357
1357
|
otherProps = _objectWithoutPropertiesLoose(props, ["component", "children", "disabled", "active"]);
|
|
1358
1358
|
|
|
1359
1359
|
return React.createElement(Component, Object.assign({}, otherProps, {
|
|
1360
|
+
"data-testid": 'pagination-button',
|
|
1360
1361
|
disabled: disabled,
|
|
1361
1362
|
className: classnames("page-link", disabled ? "disabled" : "", active ? "" : "", props.className)
|
|
1362
1363
|
}), children);
|
|
@@ -1372,7 +1373,7 @@ function Pagination(props) {
|
|
|
1372
1373
|
nextPage,
|
|
1373
1374
|
canNextPage,
|
|
1374
1375
|
pageCount,
|
|
1375
|
-
pageIndex,
|
|
1376
|
+
pageIndex = 1,
|
|
1376
1377
|
pageOptions,
|
|
1377
1378
|
pageSize,
|
|
1378
1379
|
setPageSize,
|
|
@@ -3213,12 +3214,18 @@ function SelectColumnFilter({
|
|
|
3213
3214
|
column
|
|
3214
3215
|
}) {
|
|
3215
3216
|
const {
|
|
3217
|
+
id,
|
|
3218
|
+
preFilteredRows,
|
|
3216
3219
|
filterValue,
|
|
3217
3220
|
setFilter
|
|
3218
3221
|
} = column;
|
|
3219
3222
|
const {
|
|
3220
|
-
choices
|
|
3223
|
+
choices: customChoices
|
|
3221
3224
|
} = column;
|
|
3225
|
+
const choices = customChoices || [...new Set(preFilteredRows.map(row => row.values[id]))].filter(value => value).map(value => ({
|
|
3226
|
+
label: value,
|
|
3227
|
+
value
|
|
3228
|
+
}));
|
|
3222
3229
|
return React.createElement(Select, {
|
|
3223
3230
|
key: `filter-${column.id}`,
|
|
3224
3231
|
name: `filter-${column.id}`,
|
|
@@ -8924,7 +8931,7 @@ function Loader({
|
|
|
8924
8931
|
}
|
|
8925
8932
|
Loader.propTypes = {
|
|
8926
8933
|
isActive: PropTypes.bool,
|
|
8927
|
-
icon: PropTypes.
|
|
8934
|
+
icon: PropTypes.string,
|
|
8928
8935
|
color: PropTypes.string,
|
|
8929
8936
|
className: PropTypes.string
|
|
8930
8937
|
};
|