@pathscale/ui 0.0.95 → 0.0.96
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/EnhancedTable.d.ts +0 -1
- package/dist/index.js +124 -110
- package/package.json +1 -1
|
@@ -36,7 +36,6 @@ export type EnhancedTableProps<TData> = Omit<TableProps, "children"> & {
|
|
|
36
36
|
collapseIcon?: JSX.Element;
|
|
37
37
|
filterPanelClass?: string;
|
|
38
38
|
paginationPosition?: "bottomLeft" | "bottomCenter" | "bottomRight";
|
|
39
|
-
/** Nuevo: íconos para paginación **/
|
|
40
39
|
firstPageIcon?: JSX.Element;
|
|
41
40
|
prevPageIcon?: JSX.Element;
|
|
42
41
|
nextPageIcon?: JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -11378,6 +11378,13 @@ function EnhancedTable_EnhancedTable(props) {
|
|
|
11378
11378
|
if (0 === rows.length && local.renderEmpty) return [];
|
|
11379
11379
|
return rows;
|
|
11380
11380
|
});
|
|
11381
|
+
const shouldShowPagination = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>{
|
|
11382
|
+
if (!local.enablePagination) return false;
|
|
11383
|
+
const pageCount = table.getPageCount();
|
|
11384
|
+
const pageSize = table.getState().pagination.pageSize;
|
|
11385
|
+
const totalRows = table.getCoreRowModel().rows.length;
|
|
11386
|
+
return pageCount > 1 || totalRows > pageSize;
|
|
11387
|
+
});
|
|
11381
11388
|
const headerGroups = ()=>table.getHeaderGroups();
|
|
11382
11389
|
const FilterIconTrigger = (props)=>(()=>{
|
|
11383
11390
|
var _el$ = EnhancedTable_tmpl$();
|
|
@@ -11664,121 +11671,128 @@ function EnhancedTable_EnhancedTable(props) {
|
|
|
11664
11671
|
});
|
|
11665
11672
|
}
|
|
11666
11673
|
}),
|
|
11667
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(
|
|
11668
|
-
|
|
11674
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
11675
|
+
get when () {
|
|
11676
|
+
return shouldShowPagination();
|
|
11677
|
+
},
|
|
11669
11678
|
get children () {
|
|
11670
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.
|
|
11679
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Footer, {
|
|
11680
|
+
noCell: true,
|
|
11671
11681
|
get children () {
|
|
11672
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.
|
|
11673
|
-
colSpan: totalColumns,
|
|
11682
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Row, {
|
|
11674
11683
|
get children () {
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
class: "dropdown-end",
|
|
11684
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Cell, {
|
|
11685
|
+
colSpan: totalColumns,
|
|
11678
11686
|
get children () {
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
|
|
11689
|
-
|
|
11690
|
-
|
|
11691
|
-
|
|
11692
|
-
|
|
11693
|
-
|
|
11694
|
-
|
|
11695
|
-
|
|
11696
|
-
|
|
11697
|
-
|
|
11698
|
-
|
|
11699
|
-
|
|
11700
|
-
|
|
11701
|
-
|
|
11702
|
-
|
|
11703
|
-
|
|
11704
|
-
|
|
11705
|
-
|
|
11706
|
-
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
11713
|
-
|
|
11714
|
-
|
|
11715
|
-
|
|
11716
|
-
|
|
11717
|
-
|
|
11718
|
-
|
|
11719
|
-
|
|
11720
|
-
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
|
|
11754
|
-
|
|
11755
|
-
|
|
11756
|
-
|
|
11757
|
-
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
|
|
11765
|
-
|
|
11766
|
-
|
|
11767
|
-
|
|
11768
|
-
|
|
11769
|
-
|
|
11770
|
-
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
|
|
11776
|
-
|
|
11777
|
-
|
|
11687
|
+
var _el$5 = EnhancedTable_tmpl$3(), _el$6 = _el$5.firstChild, _el$8 = (_el$6.firstChild, _el$6.nextSibling), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$11 = _el$0.nextSibling, _el$12 = (_el$11.nextSibling, _el$9.nextSibling);
|
|
11688
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown, {
|
|
11689
|
+
class: "dropdown-end",
|
|
11690
|
+
get children () {
|
|
11691
|
+
return [
|
|
11692
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Toggle, {
|
|
11693
|
+
button: true,
|
|
11694
|
+
size: "sm",
|
|
11695
|
+
color: "neutral",
|
|
11696
|
+
get children () {
|
|
11697
|
+
return table.getState().pagination.pageSize;
|
|
11698
|
+
}
|
|
11699
|
+
}),
|
|
11700
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Menu, {
|
|
11701
|
+
class: "w-24",
|
|
11702
|
+
get children () {
|
|
11703
|
+
return [
|
|
11704
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Item, {
|
|
11705
|
+
onClick: ()=>table.setPageSize(10),
|
|
11706
|
+
get ["aria-selected"] () {
|
|
11707
|
+
return 10 === table.getState().pagination.pageSize;
|
|
11708
|
+
},
|
|
11709
|
+
get ["class"] () {
|
|
11710
|
+
return dist_clsx(10 === table.getState().pagination.pageSize && "active");
|
|
11711
|
+
},
|
|
11712
|
+
children: "10"
|
|
11713
|
+
}),
|
|
11714
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Item, {
|
|
11715
|
+
onClick: ()=>table.setPageSize(25),
|
|
11716
|
+
get ["aria-selected"] () {
|
|
11717
|
+
return 25 === table.getState().pagination.pageSize;
|
|
11718
|
+
},
|
|
11719
|
+
get ["class"] () {
|
|
11720
|
+
return dist_clsx(25 === table.getState().pagination.pageSize && "active");
|
|
11721
|
+
},
|
|
11722
|
+
children: "25"
|
|
11723
|
+
}),
|
|
11724
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Item, {
|
|
11725
|
+
onClick: ()=>table.setPageSize(50),
|
|
11726
|
+
get ["aria-selected"] () {
|
|
11727
|
+
return 50 === table.getState().pagination.pageSize;
|
|
11728
|
+
},
|
|
11729
|
+
get ["class"] () {
|
|
11730
|
+
return dist_clsx(50 === table.getState().pagination.pageSize && "active");
|
|
11731
|
+
},
|
|
11732
|
+
children: "50"
|
|
11733
|
+
}),
|
|
11734
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Item, {
|
|
11735
|
+
onClick: ()=>table.setPageSize(100),
|
|
11736
|
+
get ["aria-selected"] () {
|
|
11737
|
+
return 100 === table.getState().pagination.pageSize;
|
|
11738
|
+
},
|
|
11739
|
+
get ["class"] () {
|
|
11740
|
+
return dist_clsx(100 === table.getState().pagination.pageSize && "active");
|
|
11741
|
+
},
|
|
11742
|
+
children: "100"
|
|
11743
|
+
})
|
|
11744
|
+
];
|
|
11745
|
+
}
|
|
11746
|
+
})
|
|
11747
|
+
];
|
|
11748
|
+
}
|
|
11749
|
+
}), null);
|
|
11750
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$9, ()=>table.getState().pagination.pageIndex + 1, _el$11);
|
|
11751
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$9, ()=>table.getPageCount() || 1, null);
|
|
11752
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$12, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11753
|
+
size: "sm",
|
|
11754
|
+
get disabled () {
|
|
11755
|
+
return !table.getCanPreviousPage();
|
|
11756
|
+
},
|
|
11757
|
+
onClick: ()=>table.setPageIndex(0),
|
|
11758
|
+
get children () {
|
|
11759
|
+
return local.firstPageIcon ?? "|<<";
|
|
11760
|
+
}
|
|
11761
|
+
}), null);
|
|
11762
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$12, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11763
|
+
size: "sm",
|
|
11764
|
+
get disabled () {
|
|
11765
|
+
return !table.getCanPreviousPage();
|
|
11766
|
+
},
|
|
11767
|
+
onClick: ()=>table.previousPage(),
|
|
11768
|
+
get children () {
|
|
11769
|
+
return local.prevPageIcon ?? "<<";
|
|
11770
|
+
}
|
|
11771
|
+
}), null);
|
|
11772
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$12, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11773
|
+
size: "sm",
|
|
11774
|
+
get disabled () {
|
|
11775
|
+
return !table.getCanNextPage();
|
|
11776
|
+
},
|
|
11777
|
+
onClick: ()=>table.nextPage(),
|
|
11778
|
+
get children () {
|
|
11779
|
+
return local.nextPageIcon ?? ">>";
|
|
11780
|
+
}
|
|
11781
|
+
}), null);
|
|
11782
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$12, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11783
|
+
size: "sm",
|
|
11784
|
+
get disabled () {
|
|
11785
|
+
return !table.getCanNextPage();
|
|
11786
|
+
},
|
|
11787
|
+
onClick: ()=>table.setPageIndex(table.getPageCount() - 1),
|
|
11788
|
+
get children () {
|
|
11789
|
+
return local.lastPageIcon ?? ">>|";
|
|
11790
|
+
}
|
|
11791
|
+
}), null);
|
|
11792
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$5, dist_clsx("flex items-center w-full", "bottomLeft" === local.paginationPosition && "justify-start", "bottomCenter" === local.paginationPosition && "justify-center", "bottomRight" === local.paginationPosition && "justify-end")));
|
|
11793
|
+
return _el$5;
|
|
11778
11794
|
}
|
|
11779
|
-
})
|
|
11780
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$5, dist_clsx("flex items-center w-full", "bottomLeft" === local.paginationPosition && "justify-start", "bottomCenter" === local.paginationPosition && "justify-center", "bottomRight" === local.paginationPosition && "justify-end")));
|
|
11781
|
-
return _el$5;
|
|
11795
|
+
});
|
|
11782
11796
|
}
|
|
11783
11797
|
});
|
|
11784
11798
|
}
|