@charlesgomes/leafcode-shared-lib-react 1.0.18 → 1.0.19

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.d.mts CHANGED
@@ -53,6 +53,7 @@ type IDataTableProps<T extends object> = {
53
53
  sortOrderInitial?: 1 | -1;
54
54
  isMultiSelectionMode?: boolean;
55
55
  isLanguagePtBr?: boolean;
56
+ replaceUrl?: boolean;
56
57
  };
57
58
 
58
59
  interface PaginatedResponse<T> {
@@ -83,7 +84,7 @@ interface ColumnCustom<T> {
83
84
  alignFrozen?: "left" | "right";
84
85
  }
85
86
 
86
- 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;
87
+ declare function DataTableAdvancedFilter<T extends object>({ queryKey, mutationFn, columns, initFilters, onNew, onEdit, onDelete, customActions, customActionsColums, disablePagination, sortFieldInitial, sortOrderInitial, isMultiSelectionMode, isLanguagePtBr, replaceUrl }: IDataTableProps<T>): react_jsx_runtime.JSX.Element;
87
88
 
88
89
  interface IItemProps {
89
90
  value: string;
package/dist/index.d.ts CHANGED
@@ -53,6 +53,7 @@ type IDataTableProps<T extends object> = {
53
53
  sortOrderInitial?: 1 | -1;
54
54
  isMultiSelectionMode?: boolean;
55
55
  isLanguagePtBr?: boolean;
56
+ replaceUrl?: boolean;
56
57
  };
57
58
 
58
59
  interface PaginatedResponse<T> {
@@ -83,7 +84,7 @@ interface ColumnCustom<T> {
83
84
  alignFrozen?: "left" | "right";
84
85
  }
85
86
 
86
- 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;
87
+ declare function DataTableAdvancedFilter<T extends object>({ queryKey, mutationFn, columns, initFilters, onNew, onEdit, onDelete, customActions, customActionsColums, disablePagination, sortFieldInitial, sortOrderInitial, isMultiSelectionMode, isLanguagePtBr, replaceUrl }: IDataTableProps<T>): react_jsx_runtime.JSX.Element;
87
88
 
88
89
  interface IItemProps {
89
90
  value: string;
package/dist/index.js CHANGED
@@ -526,7 +526,8 @@ function DataTableAdvancedFilterWrapper({
526
526
  sortFieldInitial,
527
527
  sortOrderInitial = 1,
528
528
  isMultiSelectionMode = true,
529
- isLanguagePtBr = true
529
+ isLanguagePtBr = true,
530
+ replaceUrl = true
530
531
  }) {
531
532
  const [isClient, setIsClient] = (0, import_react6.useState)(false);
532
533
  (0, import_react6.useEffect)(() => {
@@ -575,7 +576,7 @@ function DataTableAdvancedFilterWrapper({
575
576
  )
576
577
  });
577
578
  const updateUrlParams = (params) => {
578
- if (typeof window === "undefined") return;
579
+ if (typeof window === "undefined" || !replaceUrl) return;
579
580
  const urlParams = new URLSearchParams(window.location.search);
580
581
  Object.entries(params).forEach(([key, value]) => {
581
582
  if (value === void 0 || value === null || value === "") {
@@ -930,7 +931,8 @@ function DataTableAdvancedFilter({
930
931
  sortFieldInitial,
931
932
  sortOrderInitial = 1,
932
933
  isMultiSelectionMode = true,
933
- isLanguagePtBr = true
934
+ isLanguagePtBr = true,
935
+ replaceUrl = true
934
936
  }) {
935
937
  const [isClient, setIsClient] = (0, import_react8.useState)(false);
936
938
  (0, import_react8.useEffect)(() => {
@@ -962,7 +964,8 @@ function DataTableAdvancedFilter({
962
964
  sortFieldInitial,
963
965
  sortOrderInitial,
964
966
  isMultiSelectionMode,
965
- isLanguagePtBr
967
+ isLanguagePtBr,
968
+ replaceUrl
966
969
  }
967
970
  )
968
971
  }
package/dist/index.mjs CHANGED
@@ -480,7 +480,8 @@ function DataTableAdvancedFilterWrapper({
480
480
  sortFieldInitial,
481
481
  sortOrderInitial = 1,
482
482
  isMultiSelectionMode = true,
483
- isLanguagePtBr = true
483
+ isLanguagePtBr = true,
484
+ replaceUrl = true
484
485
  }) {
485
486
  const [isClient, setIsClient] = useState2(false);
486
487
  useEffect3(() => {
@@ -529,7 +530,7 @@ function DataTableAdvancedFilterWrapper({
529
530
  )
530
531
  });
531
532
  const updateUrlParams = (params) => {
532
- if (typeof window === "undefined") return;
533
+ if (typeof window === "undefined" || !replaceUrl) return;
533
534
  const urlParams = new URLSearchParams(window.location.search);
534
535
  Object.entries(params).forEach(([key, value]) => {
535
536
  if (value === void 0 || value === null || value === "") {
@@ -884,7 +885,8 @@ function DataTableAdvancedFilter({
884
885
  sortFieldInitial,
885
886
  sortOrderInitial = 1,
886
887
  isMultiSelectionMode = true,
887
- isLanguagePtBr = true
888
+ isLanguagePtBr = true,
889
+ replaceUrl = true
888
890
  }) {
889
891
  const [isClient, setIsClient] = useState3(false);
890
892
  useEffect4(() => {
@@ -916,7 +918,8 @@ function DataTableAdvancedFilter({
916
918
  sortFieldInitial,
917
919
  sortOrderInitial,
918
920
  isMultiSelectionMode,
919
- isLanguagePtBr
921
+ isLanguagePtBr,
922
+ replaceUrl
920
923
  }
921
924
  )
922
925
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charlesgomes/leafcode-shared-lib-react",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "Lib de componentes react",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",