@charlesgomes/leafcode-shared-lib-react 1.0.25 → 1.0.27

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
@@ -62,6 +62,7 @@ interface PaginatedResponse<T> {
62
62
  }
63
63
 
64
64
  interface ColumnCustom<T> {
65
+ filterId?: string;
65
66
  field: keyof T | "acoes" | "actions" | string;
66
67
  header: string;
67
68
  enableSorting?: boolean;
@@ -75,6 +76,7 @@ interface ColumnCustom<T> {
75
76
  }[];
76
77
  body?: (rowData: T) => ReactNode;
77
78
  enableResizeable?: boolean;
79
+ hidden?:boolean;
78
80
  enableFilter?: boolean;
79
81
  mask?: (value: any) => any;
80
82
  filterClear?: () => void;
@@ -100,6 +102,10 @@ declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean) =>
100
102
  label: string;
101
103
  value: string;
102
104
  }[];
105
+ declare const getDefaultFilterMatchOptionsStringArray: (isLanguagePtBr?: boolean) => {
106
+ label: string;
107
+ value: FilterMatchMode;
108
+ }[];
103
109
  declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean) => {
104
110
  label: string;
105
111
  value: FilterMatchMode;
@@ -108,5 +114,9 @@ declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean) => {
108
114
  label: string;
109
115
  value: string;
110
116
  }[];
117
+ declare const getDefaultFilterMatchOptionsEnumNotNullable: (isLanguagePtBr: boolean) => {
118
+ label: string;
119
+ value: FilterMatchMode;
120
+ }[];
111
121
 
112
- export { Button, type ColumnCustom, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, ModalBase, SelectFilterTemplate, ValueFilterTemplate, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsString };
122
+ export { Button, type ColumnCustom, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, ModalBase, SelectFilterTemplate, ValueFilterTemplate, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsEnumNotNullable, getDefaultFilterMatchOptionsString, getDefaultFilterMatchOptionsStringArray };
package/dist/index.d.ts CHANGED
@@ -62,6 +62,7 @@ interface PaginatedResponse<T> {
62
62
  }
63
63
 
64
64
  interface ColumnCustom<T> {
65
+ filterId?: string;
65
66
  field: keyof T | "acoes" | "actions" | string;
66
67
  header: string;
67
68
  enableSorting?: boolean;
@@ -75,6 +76,7 @@ interface ColumnCustom<T> {
75
76
  }[];
76
77
  body?: (rowData: T) => ReactNode;
77
78
  enableResizeable?: boolean;
79
+ hidden?:boolean;
78
80
  enableFilter?: boolean;
79
81
  mask?: (value: any) => any;
80
82
  filterClear?: () => void;
@@ -100,6 +102,10 @@ declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean) =>
100
102
  label: string;
101
103
  value: string;
102
104
  }[];
105
+ declare const getDefaultFilterMatchOptionsStringArray: (isLanguagePtBr?: boolean) => {
106
+ label: string;
107
+ value: FilterMatchMode;
108
+ }[];
103
109
  declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean) => {
104
110
  label: string;
105
111
  value: FilterMatchMode;
@@ -108,5 +114,9 @@ declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean) => {
108
114
  label: string;
109
115
  value: string;
110
116
  }[];
117
+ declare const getDefaultFilterMatchOptionsEnumNotNullable: (isLanguagePtBr: boolean) => {
118
+ label: string;
119
+ value: FilterMatchMode;
120
+ }[];
111
121
 
112
- export { Button, type ColumnCustom, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, ModalBase, SelectFilterTemplate, ValueFilterTemplate, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsString };
122
+ export { Button, type ColumnCustom, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, ModalBase, SelectFilterTemplate, ValueFilterTemplate, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsEnumNotNullable, getDefaultFilterMatchOptionsString, getDefaultFilterMatchOptionsStringArray };
package/dist/index.js CHANGED
@@ -41,7 +41,9 @@ __export(index_exports, {
41
41
  ValueFilterTemplate: () => ValueFilterTemplate,
42
42
  getDefaultFilterMatchOptionsDate: () => getDefaultFilterMatchOptionsDate,
43
43
  getDefaultFilterMatchOptionsEnum: () => getDefaultFilterMatchOptionsEnum,
44
- getDefaultFilterMatchOptionsString: () => getDefaultFilterMatchOptionsString
44
+ getDefaultFilterMatchOptionsEnumNotNullable: () => getDefaultFilterMatchOptionsEnumNotNullable,
45
+ getDefaultFilterMatchOptionsString: () => getDefaultFilterMatchOptionsString,
46
+ getDefaultFilterMatchOptionsStringArray: () => getDefaultFilterMatchOptionsStringArray
45
47
  });
46
48
  module.exports = __toCommonJS(index_exports);
47
49
 
@@ -463,6 +465,7 @@ function DynamicColumns({
463
465
  frozen: col.frozen,
464
466
  alignFrozen: col.alignFrozen,
465
467
  dataType: col.dataType,
468
+ hidden: col.hidden,
466
469
  filterElement: col.filterElement ? (options) => col.filterElement?.(options, col.mask) ?? void 0 : void 0,
467
470
  filterMatchModeOptions: col.filterMatchModeOptions,
468
471
  filterPlaceholder: !isActionsCol ? placeholder : void 0,
@@ -1131,7 +1134,8 @@ var import_api3 = require("primereact/api");
1131
1134
  var customMatchModes = {
1132
1135
  notStartsWith: "notStartsWith",
1133
1136
  notEndsWith: "notEndsWith",
1134
- empty: "empty"
1137
+ empty: "empty",
1138
+ notEmpty: "notEmpty"
1135
1139
  };
1136
1140
  var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
1137
1141
  {
@@ -1171,6 +1175,16 @@ var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
1171
1175
  value: customMatchModes.empty
1172
1176
  }
1173
1177
  ];
1178
+ var getDefaultFilterMatchOptionsStringArray = (isLanguagePtBr = true) => [
1179
+ {
1180
+ label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
1181
+ value: import_api3.FilterMatchMode.CONTAINS
1182
+ },
1183
+ {
1184
+ label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
1185
+ value: import_api3.FilterMatchMode.NOT_CONTAINS
1186
+ }
1187
+ ];
1174
1188
  var getDefaultFilterMatchOptionsDate = (isLanguagePtBr) => [
1175
1189
  {
1176
1190
  label: isLanguagePtBr ? "Data antes de" : "Date before",
@@ -1193,6 +1207,20 @@ var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr) => [
1193
1207
  {
1194
1208
  label: isLanguagePtBr ? "Vazio" : "Empty",
1195
1209
  value: customMatchModes.empty
1210
+ },
1211
+ {
1212
+ label: isLanguagePtBr ? "N\xE3o Vazio" : "NotEmpty",
1213
+ value: customMatchModes.notEmpty
1214
+ }
1215
+ ];
1216
+ var getDefaultFilterMatchOptionsEnumNotNullable = (isLanguagePtBr) => [
1217
+ {
1218
+ label: isLanguagePtBr ? "Igual" : "Equals",
1219
+ value: import_api3.FilterMatchMode.EQUALS
1220
+ },
1221
+ {
1222
+ label: isLanguagePtBr ? "Diferente" : "Not equals",
1223
+ value: import_api3.FilterMatchMode.NOT_EQUALS
1196
1224
  }
1197
1225
  ];
1198
1226
 
@@ -1211,5 +1239,7 @@ var import_api4 = require("primereact/api");
1211
1239
  ValueFilterTemplate,
1212
1240
  getDefaultFilterMatchOptionsDate,
1213
1241
  getDefaultFilterMatchOptionsEnum,
1214
- getDefaultFilterMatchOptionsString
1242
+ getDefaultFilterMatchOptionsEnumNotNullable,
1243
+ getDefaultFilterMatchOptionsString,
1244
+ getDefaultFilterMatchOptionsStringArray
1215
1245
  });
package/dist/index.mjs CHANGED
@@ -416,6 +416,7 @@ function DynamicColumns({
416
416
  frozen: col.frozen,
417
417
  alignFrozen: col.alignFrozen,
418
418
  dataType: col.dataType,
419
+ hidden: col.hidden,
419
420
  filterElement: col.filterElement ? (options) => col.filterElement?.(options, col.mask) ?? void 0 : void 0,
420
421
  filterMatchModeOptions: col.filterMatchModeOptions,
421
422
  filterPlaceholder: !isActionsCol ? placeholder : void 0,
@@ -1084,7 +1085,8 @@ import { FilterMatchMode as FilterMatchMode3 } from "primereact/api";
1084
1085
  var customMatchModes = {
1085
1086
  notStartsWith: "notStartsWith",
1086
1087
  notEndsWith: "notEndsWith",
1087
- empty: "empty"
1088
+ empty: "empty",
1089
+ notEmpty: "notEmpty"
1088
1090
  };
1089
1091
  var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
1090
1092
  {
@@ -1124,6 +1126,16 @@ var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
1124
1126
  value: customMatchModes.empty
1125
1127
  }
1126
1128
  ];
1129
+ var getDefaultFilterMatchOptionsStringArray = (isLanguagePtBr = true) => [
1130
+ {
1131
+ label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
1132
+ value: FilterMatchMode3.CONTAINS
1133
+ },
1134
+ {
1135
+ label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
1136
+ value: FilterMatchMode3.NOT_CONTAINS
1137
+ }
1138
+ ];
1127
1139
  var getDefaultFilterMatchOptionsDate = (isLanguagePtBr) => [
1128
1140
  {
1129
1141
  label: isLanguagePtBr ? "Data antes de" : "Date before",
@@ -1146,6 +1158,20 @@ var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr) => [
1146
1158
  {
1147
1159
  label: isLanguagePtBr ? "Vazio" : "Empty",
1148
1160
  value: customMatchModes.empty
1161
+ },
1162
+ {
1163
+ label: isLanguagePtBr ? "N\xE3o Vazio" : "NotEmpty",
1164
+ value: customMatchModes.notEmpty
1165
+ }
1166
+ ];
1167
+ var getDefaultFilterMatchOptionsEnumNotNullable = (isLanguagePtBr) => [
1168
+ {
1169
+ label: isLanguagePtBr ? "Igual" : "Equals",
1170
+ value: FilterMatchMode3.EQUALS
1171
+ },
1172
+ {
1173
+ label: isLanguagePtBr ? "Diferente" : "Not equals",
1174
+ value: FilterMatchMode3.NOT_EQUALS
1149
1175
  }
1150
1176
  ];
1151
1177
 
@@ -1163,5 +1189,7 @@ export {
1163
1189
  ValueFilterTemplate,
1164
1190
  getDefaultFilterMatchOptionsDate,
1165
1191
  getDefaultFilterMatchOptionsEnum,
1166
- getDefaultFilterMatchOptionsString
1192
+ getDefaultFilterMatchOptionsEnumNotNullable,
1193
+ getDefaultFilterMatchOptionsString,
1194
+ getDefaultFilterMatchOptionsStringArray
1167
1195
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charlesgomes/leafcode-shared-lib-react",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "Lib de componentes react",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",