@tsed/react-formio 2.2.0 → 2.2.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/table/hooks/useCustomTable.hook.d.ts +5 -0
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +7 -5
- package/dist/index.modern.js.map +1 -1
- package/package.json +3 -3
- package/src/components/pagination/pagination.component.tsx +1 -6
- package/src/components/table/hooks/useCustomTable.hook.tsx +6 -0
- package/src/components/table/table.component.tsx +2 -0
package/dist/index.modern.js
CHANGED
|
@@ -324,12 +324,10 @@ function Pagination(props) {
|
|
|
324
324
|
className: "ml-3"
|
|
325
325
|
}, i18n("items per page"))), pageOptions && /*#__PURE__*/React.createElement("li", {
|
|
326
326
|
className: "mb-3 mr-3 flex items-center"
|
|
327
|
-
}, /*#__PURE__*/React.createElement("span", null, i18n("Page"), "\xA0"), /*#__PURE__*/React.createElement("strong", null, pageIndex + 1, " of ", pageOptions.length), totalLength !== undefined && /*#__PURE__*/React.createElement("
|
|
328
|
-
className: "ml-3"
|
|
329
|
-
}, i18n("Totals"), ": ", /*#__PURE__*/React.createElement("strong", null, new Intl.NumberFormat(undefined).format(totalLength)), " ", i18n("items"))), totalLength !== undefined && /*#__PURE__*/React.createElement("li", {
|
|
327
|
+
}, /*#__PURE__*/React.createElement("span", null, i18n("Page"), "\xA0"), /*#__PURE__*/React.createElement("strong", null, pageIndex + 1, " of ", pageOptions.length)), totalLength !== undefined && /*#__PURE__*/React.createElement("li", {
|
|
330
328
|
className: "mb-3 flex items-center",
|
|
331
329
|
"data-testid": "pagination-total-items"
|
|
332
|
-
}, i18n("
|
|
330
|
+
}, i18n("Total"), ": ", /*#__PURE__*/React.createElement("strong", null, new Intl.NumberFormat(undefined).format(totalLength)), " ", i18n("items")));
|
|
333
331
|
}
|
|
334
332
|
|
|
335
333
|
function DefaultArrowSort({
|
|
@@ -694,7 +692,7 @@ function useOperations({
|
|
|
694
692
|
};
|
|
695
693
|
}
|
|
696
694
|
|
|
697
|
-
const _excluded$9 = ["children", "className", "columns", "data", "onChange", "onClick", "onDrag", "onDrop", "operations", "pageSizes", "filters", "filterId", "pageSize", "pageIndex", "sortBy", "isLoading", "disableFilters", "disablePagination", "ArrowSort", "ColumnFilter", "EmptyData", "Loader", "Pagination", "Row", "CellHeader", "CellOperations", "i18n"];
|
|
695
|
+
const _excluded$9 = ["children", "className", "columns", "data", "onChange", "onClick", "onDrag", "onDrop", "operations", "pageSizes", "filters", "filterId", "pageSize", "pageIndex", "totalLength", "sortBy", "isLoading", "disableFilters", "disablePagination", "ArrowSort", "ColumnFilter", "EmptyData", "Loader", "Pagination", "Row", "CellHeader", "CellOperations", "i18n"];
|
|
698
696
|
function getOperationCallback(operations, onClick) {
|
|
699
697
|
return (data, action) => {
|
|
700
698
|
const operation = operations.find(operation => operation.action === action || operation.alias === action);
|
|
@@ -730,6 +728,7 @@ function useCustomTable(props) {
|
|
|
730
728
|
filterId: controlledFilterId,
|
|
731
729
|
pageSize: controlledPageSize,
|
|
732
730
|
pageIndex: controlledPageIndex,
|
|
731
|
+
totalLength,
|
|
733
732
|
sortBy: controlledSortBy,
|
|
734
733
|
isLoading,
|
|
735
734
|
disableFilters,
|
|
@@ -819,6 +818,7 @@ function useCustomTable(props) {
|
|
|
819
818
|
pageIndex,
|
|
820
819
|
pageSize,
|
|
821
820
|
pageSizes,
|
|
821
|
+
totalLength,
|
|
822
822
|
setPageSize,
|
|
823
823
|
i18n,
|
|
824
824
|
children,
|
|
@@ -846,6 +846,7 @@ function Table(props) {
|
|
|
846
846
|
pageSize,
|
|
847
847
|
pageSizes,
|
|
848
848
|
setPageSize,
|
|
849
|
+
totalLength,
|
|
849
850
|
i18n,
|
|
850
851
|
enableDragNDrop,
|
|
851
852
|
children,
|
|
@@ -884,6 +885,7 @@ function Table(props) {
|
|
|
884
885
|
})) : null), isLoading ? /*#__PURE__*/React.createElement(Loader, null) : null, !data.length ? /*#__PURE__*/React.createElement(EmptyData, null) : null, !isLoading && data.length && !disablePagination ? /*#__PURE__*/React.createElement("div", {
|
|
885
886
|
className: "overflow-hidden"
|
|
886
887
|
}, /*#__PURE__*/React.createElement(Pagination, _extends({}, tableInstance, {
|
|
888
|
+
totalLength: totalLength,
|
|
887
889
|
className: "text-sm",
|
|
888
890
|
pageIndex: pageIndex,
|
|
889
891
|
pageSize: pageSize,
|