@pathscale/ui 0.0.95 → 0.0.97
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 +126 -116
- 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$();
|
|
@@ -11550,9 +11557,7 @@ function EnhancedTable_EnhancedTable(props) {
|
|
|
11550
11557
|
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!local.loading)() ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Row, {
|
|
11551
11558
|
get children () {
|
|
11552
11559
|
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Cell, {
|
|
11553
|
-
|
|
11554
|
-
return table.getAllColumns().length;
|
|
11555
|
-
},
|
|
11560
|
+
colSpan: totalColumns,
|
|
11556
11561
|
class: "text-center py-6",
|
|
11557
11562
|
get children () {
|
|
11558
11563
|
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!local.renderLoading)() ? local.renderLoading() : (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(loading_Loading, {
|
|
@@ -11566,9 +11571,7 @@ function EnhancedTable_EnhancedTable(props) {
|
|
|
11566
11571
|
}) : (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!(0 === tableRows().length && local.renderEmpty))() ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Row, {
|
|
11567
11572
|
get children () {
|
|
11568
11573
|
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Cell, {
|
|
11569
|
-
|
|
11570
|
-
return table.getAllColumns().length;
|
|
11571
|
-
},
|
|
11574
|
+
colSpan: totalColumns,
|
|
11572
11575
|
class: "text-center py-4",
|
|
11573
11576
|
get children () {
|
|
11574
11577
|
return local.renderEmpty();
|
|
@@ -11664,121 +11667,128 @@ function EnhancedTable_EnhancedTable(props) {
|
|
|
11664
11667
|
});
|
|
11665
11668
|
}
|
|
11666
11669
|
}),
|
|
11667
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(
|
|
11668
|
-
|
|
11670
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
11671
|
+
get when () {
|
|
11672
|
+
return shouldShowPagination();
|
|
11673
|
+
},
|
|
11669
11674
|
get children () {
|
|
11670
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.
|
|
11675
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Footer, {
|
|
11676
|
+
noCell: true,
|
|
11671
11677
|
get children () {
|
|
11672
|
-
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.
|
|
11673
|
-
colSpan: totalColumns,
|
|
11678
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Row, {
|
|
11674
11679
|
get children () {
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
class: "dropdown-end",
|
|
11678
|
-
get children () {
|
|
11679
|
-
return [
|
|
11680
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Toggle, {
|
|
11681
|
-
button: true,
|
|
11682
|
-
size: "sm",
|
|
11683
|
-
color: "neutral",
|
|
11684
|
-
get children () {
|
|
11685
|
-
return table.getState().pagination.pageSize;
|
|
11686
|
-
}
|
|
11687
|
-
}),
|
|
11688
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Menu, {
|
|
11689
|
-
class: "w-24",
|
|
11690
|
-
get children () {
|
|
11691
|
-
return [
|
|
11692
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Item, {
|
|
11693
|
-
onClick: ()=>table.setPageSize(10),
|
|
11694
|
-
get ["aria-selected"] () {
|
|
11695
|
-
return 10 === table.getState().pagination.pageSize;
|
|
11696
|
-
},
|
|
11697
|
-
get ["class"] () {
|
|
11698
|
-
return dist_clsx(10 === table.getState().pagination.pageSize && "active");
|
|
11699
|
-
},
|
|
11700
|
-
children: "10"
|
|
11701
|
-
}),
|
|
11702
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Item, {
|
|
11703
|
-
onClick: ()=>table.setPageSize(25),
|
|
11704
|
-
get ["aria-selected"] () {
|
|
11705
|
-
return 25 === table.getState().pagination.pageSize;
|
|
11706
|
-
},
|
|
11707
|
-
get ["class"] () {
|
|
11708
|
-
return dist_clsx(25 === table.getState().pagination.pageSize && "active");
|
|
11709
|
-
},
|
|
11710
|
-
children: "25"
|
|
11711
|
-
}),
|
|
11712
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Item, {
|
|
11713
|
-
onClick: ()=>table.setPageSize(50),
|
|
11714
|
-
get ["aria-selected"] () {
|
|
11715
|
-
return 50 === table.getState().pagination.pageSize;
|
|
11716
|
-
},
|
|
11717
|
-
get ["class"] () {
|
|
11718
|
-
return dist_clsx(50 === table.getState().pagination.pageSize && "active");
|
|
11719
|
-
},
|
|
11720
|
-
children: "50"
|
|
11721
|
-
}),
|
|
11722
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Item, {
|
|
11723
|
-
onClick: ()=>table.setPageSize(100),
|
|
11724
|
-
get ["aria-selected"] () {
|
|
11725
|
-
return 100 === table.getState().pagination.pageSize;
|
|
11726
|
-
},
|
|
11727
|
-
get ["class"] () {
|
|
11728
|
-
return dist_clsx(100 === table.getState().pagination.pageSize && "active");
|
|
11729
|
-
},
|
|
11730
|
-
children: "100"
|
|
11731
|
-
})
|
|
11732
|
-
];
|
|
11733
|
-
}
|
|
11734
|
-
})
|
|
11735
|
-
];
|
|
11736
|
-
}
|
|
11737
|
-
}), null);
|
|
11738
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$9, ()=>table.getState().pagination.pageIndex + 1, _el$11);
|
|
11739
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$9, ()=>table.getPageCount() || 1, null);
|
|
11740
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$12, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11741
|
-
size: "sm",
|
|
11742
|
-
get disabled () {
|
|
11743
|
-
return !table.getCanPreviousPage();
|
|
11744
|
-
},
|
|
11745
|
-
onClick: ()=>table.setPageIndex(0),
|
|
11746
|
-
get children () {
|
|
11747
|
-
return local.firstPageIcon ?? "|<<";
|
|
11748
|
-
}
|
|
11749
|
-
}), null);
|
|
11750
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$12, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11751
|
-
size: "sm",
|
|
11752
|
-
get disabled () {
|
|
11753
|
-
return !table.getCanPreviousPage();
|
|
11754
|
-
},
|
|
11755
|
-
onClick: ()=>table.previousPage(),
|
|
11756
|
-
get children () {
|
|
11757
|
-
return local.prevPageIcon ?? "<<";
|
|
11758
|
-
}
|
|
11759
|
-
}), null);
|
|
11760
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$12, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11761
|
-
size: "sm",
|
|
11762
|
-
get disabled () {
|
|
11763
|
-
return !table.getCanNextPage();
|
|
11764
|
-
},
|
|
11765
|
-
onClick: ()=>table.nextPage(),
|
|
11766
|
-
get children () {
|
|
11767
|
-
return local.nextPageIcon ?? ">>";
|
|
11768
|
-
}
|
|
11769
|
-
}), null);
|
|
11770
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$12, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11771
|
-
size: "sm",
|
|
11772
|
-
get disabled () {
|
|
11773
|
-
return !table.getCanNextPage();
|
|
11774
|
-
},
|
|
11775
|
-
onClick: ()=>table.setPageIndex(table.getPageCount() - 1),
|
|
11680
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(table_Table.Cell, {
|
|
11681
|
+
colSpan: totalColumns,
|
|
11776
11682
|
get children () {
|
|
11777
|
-
|
|
11683
|
+
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);
|
|
11684
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$6, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown, {
|
|
11685
|
+
class: "dropdown-end",
|
|
11686
|
+
get children () {
|
|
11687
|
+
return [
|
|
11688
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Toggle, {
|
|
11689
|
+
button: true,
|
|
11690
|
+
size: "sm",
|
|
11691
|
+
color: "neutral",
|
|
11692
|
+
get children () {
|
|
11693
|
+
return table.getState().pagination.pageSize;
|
|
11694
|
+
}
|
|
11695
|
+
}),
|
|
11696
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Menu, {
|
|
11697
|
+
class: "w-24",
|
|
11698
|
+
get children () {
|
|
11699
|
+
return [
|
|
11700
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Item, {
|
|
11701
|
+
onClick: ()=>table.setPageSize(10),
|
|
11702
|
+
get ["aria-selected"] () {
|
|
11703
|
+
return 10 === table.getState().pagination.pageSize;
|
|
11704
|
+
},
|
|
11705
|
+
get ["class"] () {
|
|
11706
|
+
return dist_clsx(10 === table.getState().pagination.pageSize && "active");
|
|
11707
|
+
},
|
|
11708
|
+
children: "10"
|
|
11709
|
+
}),
|
|
11710
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Item, {
|
|
11711
|
+
onClick: ()=>table.setPageSize(25),
|
|
11712
|
+
get ["aria-selected"] () {
|
|
11713
|
+
return 25 === table.getState().pagination.pageSize;
|
|
11714
|
+
},
|
|
11715
|
+
get ["class"] () {
|
|
11716
|
+
return dist_clsx(25 === table.getState().pagination.pageSize && "active");
|
|
11717
|
+
},
|
|
11718
|
+
children: "25"
|
|
11719
|
+
}),
|
|
11720
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Item, {
|
|
11721
|
+
onClick: ()=>table.setPageSize(50),
|
|
11722
|
+
get ["aria-selected"] () {
|
|
11723
|
+
return 50 === table.getState().pagination.pageSize;
|
|
11724
|
+
},
|
|
11725
|
+
get ["class"] () {
|
|
11726
|
+
return dist_clsx(50 === table.getState().pagination.pageSize && "active");
|
|
11727
|
+
},
|
|
11728
|
+
children: "50"
|
|
11729
|
+
}),
|
|
11730
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(dropdown_Dropdown.Item, {
|
|
11731
|
+
onClick: ()=>table.setPageSize(100),
|
|
11732
|
+
get ["aria-selected"] () {
|
|
11733
|
+
return 100 === table.getState().pagination.pageSize;
|
|
11734
|
+
},
|
|
11735
|
+
get ["class"] () {
|
|
11736
|
+
return dist_clsx(100 === table.getState().pagination.pageSize && "active");
|
|
11737
|
+
},
|
|
11738
|
+
children: "100"
|
|
11739
|
+
})
|
|
11740
|
+
];
|
|
11741
|
+
}
|
|
11742
|
+
})
|
|
11743
|
+
];
|
|
11744
|
+
}
|
|
11745
|
+
}), null);
|
|
11746
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$9, ()=>table.getState().pagination.pageIndex + 1, _el$11);
|
|
11747
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$9, ()=>table.getPageCount() || 1, null);
|
|
11748
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$12, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11749
|
+
size: "sm",
|
|
11750
|
+
get disabled () {
|
|
11751
|
+
return !table.getCanPreviousPage();
|
|
11752
|
+
},
|
|
11753
|
+
onClick: ()=>table.setPageIndex(0),
|
|
11754
|
+
get children () {
|
|
11755
|
+
return local.firstPageIcon ?? "|<<";
|
|
11756
|
+
}
|
|
11757
|
+
}), null);
|
|
11758
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$12, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11759
|
+
size: "sm",
|
|
11760
|
+
get disabled () {
|
|
11761
|
+
return !table.getCanPreviousPage();
|
|
11762
|
+
},
|
|
11763
|
+
onClick: ()=>table.previousPage(),
|
|
11764
|
+
get children () {
|
|
11765
|
+
return local.prevPageIcon ?? "<<";
|
|
11766
|
+
}
|
|
11767
|
+
}), null);
|
|
11768
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$12, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11769
|
+
size: "sm",
|
|
11770
|
+
get disabled () {
|
|
11771
|
+
return !table.getCanNextPage();
|
|
11772
|
+
},
|
|
11773
|
+
onClick: ()=>table.nextPage(),
|
|
11774
|
+
get children () {
|
|
11775
|
+
return local.nextPageIcon ?? ">>";
|
|
11776
|
+
}
|
|
11777
|
+
}), null);
|
|
11778
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$12, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(button_Button, {
|
|
11779
|
+
size: "sm",
|
|
11780
|
+
get disabled () {
|
|
11781
|
+
return !table.getCanNextPage();
|
|
11782
|
+
},
|
|
11783
|
+
onClick: ()=>table.setPageIndex(table.getPageCount() - 1),
|
|
11784
|
+
get children () {
|
|
11785
|
+
return local.lastPageIcon ?? ">>|";
|
|
11786
|
+
}
|
|
11787
|
+
}), null);
|
|
11788
|
+
(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")));
|
|
11789
|
+
return _el$5;
|
|
11778
11790
|
}
|
|
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;
|
|
11791
|
+
});
|
|
11782
11792
|
}
|
|
11783
11793
|
});
|
|
11784
11794
|
}
|