@charlesgomes/leafcode-shared-lib-react 1.0.53 → 1.0.55
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/index.css +6 -4
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +11 -4
- package/dist/index.mjs +11 -4
- package/dist/styles/table.css +12 -4
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -419,6 +419,8 @@ th {
|
|
|
419
419
|
opacity: 1;
|
|
420
420
|
}
|
|
421
421
|
.box-icones-actions-column {
|
|
422
|
+
background: #f0f0f0;
|
|
423
|
+
border-radius: 10rem;
|
|
422
424
|
width: fit-content;
|
|
423
425
|
height: fit-content;
|
|
424
426
|
margin: auto;
|
|
@@ -426,7 +428,6 @@ th {
|
|
|
426
428
|
align-items: center;
|
|
427
429
|
justify-content: center;
|
|
428
430
|
opacity: 0;
|
|
429
|
-
gap: 0.25rem;
|
|
430
431
|
transition: opacity 0.2s ease;
|
|
431
432
|
}
|
|
432
433
|
.p-datatable .p-datatable-tbody > tr > td:last-child {
|
|
@@ -446,10 +447,8 @@ th {
|
|
|
446
447
|
background-color: #f0f0f0;
|
|
447
448
|
color: #1c1c1c;
|
|
448
449
|
cursor: pointer;
|
|
449
|
-
padding:
|
|
450
|
+
padding: 4px;
|
|
450
451
|
border: 0;
|
|
451
|
-
width: 1.5rem;
|
|
452
|
-
height: 1.5rem;
|
|
453
452
|
display: flex;
|
|
454
453
|
align-items: center;
|
|
455
454
|
justify-content: center;
|
|
@@ -523,3 +522,6 @@ th {
|
|
|
523
522
|
.react-tooltip {
|
|
524
523
|
z-index: 13 !important;
|
|
525
524
|
}
|
|
525
|
+
.p-datatable.p-datatable-gridlines .p-datatable-scrollable-table > .p-datatable-thead {
|
|
526
|
+
top: 0;
|
|
527
|
+
}
|
package/dist/index.d.mts
CHANGED
|
@@ -53,6 +53,8 @@ type IDataTableProps<T extends object> = {
|
|
|
53
53
|
sortOrderInitial?: 1 | -1;
|
|
54
54
|
isMultiSelectionMode?: boolean;
|
|
55
55
|
isLanguagePtBr?: boolean;
|
|
56
|
+
rows?: number;
|
|
57
|
+
rowsPerPageOptions?: number[];
|
|
56
58
|
state?: TableState;
|
|
57
59
|
onStateChange?: (state: TableState) => void;
|
|
58
60
|
};
|
|
@@ -90,12 +92,12 @@ interface ColumnCustom<T> {
|
|
|
90
92
|
type TableState = {
|
|
91
93
|
page: number;
|
|
92
94
|
rows: number;
|
|
93
|
-
sortField
|
|
95
|
+
sortField: string;
|
|
94
96
|
sortOrder?: 1 | -1;
|
|
95
97
|
filter?: string;
|
|
96
98
|
};
|
|
97
99
|
|
|
98
|
-
declare function DataTableAdvancedFilter<T extends object>({ queryKey, mutationFn, columns, initFilters, onNew, onEdit, onDelete, customActions, customActionsColums, disablePagination, sortFieldInitial, sortOrderInitial, isMultiSelectionMode, isLanguagePtBr, }: IDataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
100
|
+
declare function DataTableAdvancedFilter<T extends object>({ queryKey, mutationFn, columns, initFilters, onNew, onEdit, onDelete, customActions, customActionsColums, disablePagination, sortFieldInitial, sortOrderInitial, isMultiSelectionMode, isLanguagePtBr, rowsPerPageOptions, state, onStateChange, }: IDataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
99
101
|
|
|
100
102
|
interface IItemProps {
|
|
101
103
|
value: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -53,6 +53,8 @@ type IDataTableProps<T extends object> = {
|
|
|
53
53
|
sortOrderInitial?: 1 | -1;
|
|
54
54
|
isMultiSelectionMode?: boolean;
|
|
55
55
|
isLanguagePtBr?: boolean;
|
|
56
|
+
rows?: number;
|
|
57
|
+
rowsPerPageOptions?: number[];
|
|
56
58
|
state?: TableState;
|
|
57
59
|
onStateChange?: (state: TableState) => void;
|
|
58
60
|
};
|
|
@@ -90,12 +92,12 @@ interface ColumnCustom<T> {
|
|
|
90
92
|
type TableState = {
|
|
91
93
|
page: number;
|
|
92
94
|
rows: number;
|
|
93
|
-
sortField
|
|
95
|
+
sortField: string;
|
|
94
96
|
sortOrder?: 1 | -1;
|
|
95
97
|
filter?: string;
|
|
96
98
|
};
|
|
97
99
|
|
|
98
|
-
declare function DataTableAdvancedFilter<T extends object>({ queryKey, mutationFn, columns, initFilters, onNew, onEdit, onDelete, customActions, customActionsColums, disablePagination, sortFieldInitial, sortOrderInitial, isMultiSelectionMode, isLanguagePtBr, }: IDataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
100
|
+
declare function DataTableAdvancedFilter<T extends object>({ queryKey, mutationFn, columns, initFilters, onNew, onEdit, onDelete, customActions, customActionsColums, disablePagination, sortFieldInitial, sortOrderInitial, isMultiSelectionMode, isLanguagePtBr, rowsPerPageOptions, state, onStateChange, }: IDataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
99
101
|
|
|
100
102
|
interface IItemProps {
|
|
101
103
|
value: string;
|
package/dist/index.js
CHANGED
|
@@ -533,6 +533,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
533
533
|
sortOrderInitial = 1,
|
|
534
534
|
isMultiSelectionMode = true,
|
|
535
535
|
isLanguagePtBr = true,
|
|
536
|
+
rowsPerPageOptions = [10, 25, 50, 100],
|
|
536
537
|
state,
|
|
537
538
|
onStateChange
|
|
538
539
|
}) {
|
|
@@ -542,7 +543,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
542
543
|
}, []);
|
|
543
544
|
const initialState = state ?? {
|
|
544
545
|
page: 1,
|
|
545
|
-
rows:
|
|
546
|
+
rows: rowsPerPageOptions[0],
|
|
546
547
|
sortField: sortFieldInitial,
|
|
547
548
|
sortOrder: sortOrderInitial,
|
|
548
549
|
filter: ""
|
|
@@ -791,7 +792,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
791
792
|
});
|
|
792
793
|
setFilters(newFilters);
|
|
793
794
|
},
|
|
794
|
-
rowsPerPageOptions
|
|
795
|
+
rowsPerPageOptions,
|
|
795
796
|
className: "p-datatable-sm",
|
|
796
797
|
paginatorClassName: "paginatorClassName",
|
|
797
798
|
tableClassName: "tableClassName",
|
|
@@ -982,7 +983,10 @@ function DataTableAdvancedFilter({
|
|
|
982
983
|
sortFieldInitial,
|
|
983
984
|
sortOrderInitial = 1,
|
|
984
985
|
isMultiSelectionMode = true,
|
|
985
|
-
isLanguagePtBr = true
|
|
986
|
+
isLanguagePtBr = true,
|
|
987
|
+
rowsPerPageOptions = [10, 25, 50, 100],
|
|
988
|
+
state,
|
|
989
|
+
onStateChange
|
|
986
990
|
}) {
|
|
987
991
|
const [isClient, setIsClient] = (0, import_react8.useState)(false);
|
|
988
992
|
(0, import_react8.useEffect)(() => {
|
|
@@ -1001,6 +1005,7 @@ function DataTableAdvancedFilter({
|
|
|
1001
1005
|
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1002
1006
|
DataTableAdvancedFilterWrapper,
|
|
1003
1007
|
{
|
|
1008
|
+
rowsPerPageOptions,
|
|
1004
1009
|
queryKey,
|
|
1005
1010
|
mutationFn,
|
|
1006
1011
|
columns,
|
|
@@ -1014,7 +1019,9 @@ function DataTableAdvancedFilter({
|
|
|
1014
1019
|
sortFieldInitial,
|
|
1015
1020
|
sortOrderInitial,
|
|
1016
1021
|
isMultiSelectionMode,
|
|
1017
|
-
isLanguagePtBr
|
|
1022
|
+
isLanguagePtBr,
|
|
1023
|
+
state,
|
|
1024
|
+
onStateChange
|
|
1018
1025
|
}
|
|
1019
1026
|
)
|
|
1020
1027
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -478,6 +478,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
478
478
|
sortOrderInitial = 1,
|
|
479
479
|
isMultiSelectionMode = true,
|
|
480
480
|
isLanguagePtBr = true,
|
|
481
|
+
rowsPerPageOptions = [10, 25, 50, 100],
|
|
481
482
|
state,
|
|
482
483
|
onStateChange
|
|
483
484
|
}) {
|
|
@@ -487,7 +488,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
487
488
|
}, []);
|
|
488
489
|
const initialState = state ?? {
|
|
489
490
|
page: 1,
|
|
490
|
-
rows:
|
|
491
|
+
rows: rowsPerPageOptions[0],
|
|
491
492
|
sortField: sortFieldInitial,
|
|
492
493
|
sortOrder: sortOrderInitial,
|
|
493
494
|
filter: ""
|
|
@@ -736,7 +737,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
736
737
|
});
|
|
737
738
|
setFilters(newFilters);
|
|
738
739
|
},
|
|
739
|
-
rowsPerPageOptions
|
|
740
|
+
rowsPerPageOptions,
|
|
740
741
|
className: "p-datatable-sm",
|
|
741
742
|
paginatorClassName: "paginatorClassName",
|
|
742
743
|
tableClassName: "tableClassName",
|
|
@@ -927,7 +928,10 @@ function DataTableAdvancedFilter({
|
|
|
927
928
|
sortFieldInitial,
|
|
928
929
|
sortOrderInitial = 1,
|
|
929
930
|
isMultiSelectionMode = true,
|
|
930
|
-
isLanguagePtBr = true
|
|
931
|
+
isLanguagePtBr = true,
|
|
932
|
+
rowsPerPageOptions = [10, 25, 50, 100],
|
|
933
|
+
state,
|
|
934
|
+
onStateChange
|
|
931
935
|
}) {
|
|
932
936
|
const [isClient, setIsClient] = useState3(false);
|
|
933
937
|
useEffect4(() => {
|
|
@@ -946,6 +950,7 @@ function DataTableAdvancedFilter({
|
|
|
946
950
|
children: /* @__PURE__ */ jsx10(
|
|
947
951
|
DataTableAdvancedFilterWrapper,
|
|
948
952
|
{
|
|
953
|
+
rowsPerPageOptions,
|
|
949
954
|
queryKey,
|
|
950
955
|
mutationFn,
|
|
951
956
|
columns,
|
|
@@ -959,7 +964,9 @@ function DataTableAdvancedFilter({
|
|
|
959
964
|
sortFieldInitial,
|
|
960
965
|
sortOrderInitial,
|
|
961
966
|
isMultiSelectionMode,
|
|
962
|
-
isLanguagePtBr
|
|
967
|
+
isLanguagePtBr,
|
|
968
|
+
state,
|
|
969
|
+
onStateChange
|
|
963
970
|
}
|
|
964
971
|
)
|
|
965
972
|
}
|
package/dist/styles/table.css
CHANGED
|
@@ -507,6 +507,8 @@ th {
|
|
|
507
507
|
}
|
|
508
508
|
|
|
509
509
|
.box-icones-actions-column {
|
|
510
|
+
background: #f0f0f0;
|
|
511
|
+
border-radius: 10rem;
|
|
510
512
|
width: fit-content;
|
|
511
513
|
height: fit-content;
|
|
512
514
|
margin: auto;
|
|
@@ -514,7 +516,7 @@ th {
|
|
|
514
516
|
align-items: center;
|
|
515
517
|
justify-content: center;
|
|
516
518
|
opacity: 0;
|
|
517
|
-
gap: 0.25rem;
|
|
519
|
+
/* gap: 0.25rem; */
|
|
518
520
|
transition: opacity 0.2s ease;
|
|
519
521
|
}
|
|
520
522
|
|
|
@@ -538,10 +540,10 @@ th {
|
|
|
538
540
|
background-color: #f0f0f0;
|
|
539
541
|
color: #1c1c1c;
|
|
540
542
|
cursor: pointer;
|
|
541
|
-
padding:
|
|
543
|
+
padding: 4px;
|
|
542
544
|
border: 0;
|
|
543
|
-
width: 1.5rem;
|
|
544
|
-
height: 1.5rem;
|
|
545
|
+
/* width: 1.5rem;
|
|
546
|
+
height: 1.5rem; */
|
|
545
547
|
display: flex;
|
|
546
548
|
align-items: center;
|
|
547
549
|
justify-content: center;
|
|
@@ -631,3 +633,9 @@ th {
|
|
|
631
633
|
.react-tooltip {
|
|
632
634
|
z-index: 13 !important;
|
|
633
635
|
}
|
|
636
|
+
|
|
637
|
+
.p-datatable.p-datatable-gridlines
|
|
638
|
+
.p-datatable-scrollable-table
|
|
639
|
+
> .p-datatable-thead {
|
|
640
|
+
top: 0;
|
|
641
|
+
}
|