@charlesgomes/leafcode-shared-lib-react 1.0.24 → 1.0.26
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 +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +44 -4
- package/dist/index.mjs +41 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -100,6 +100,10 @@ declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean) =>
|
|
|
100
100
|
label: string;
|
|
101
101
|
value: string;
|
|
102
102
|
}[];
|
|
103
|
+
declare const getDefaultFilterMatchOptionsStringArray: (isLanguagePtBr?: boolean) => {
|
|
104
|
+
label: string;
|
|
105
|
+
value: FilterMatchMode;
|
|
106
|
+
}[];
|
|
103
107
|
declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean) => {
|
|
104
108
|
label: string;
|
|
105
109
|
value: FilterMatchMode;
|
|
@@ -108,5 +112,9 @@ declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean) => {
|
|
|
108
112
|
label: string;
|
|
109
113
|
value: string;
|
|
110
114
|
}[];
|
|
115
|
+
declare const getDefaultFilterMatchOptionsEnumNotNullable: (isLanguagePtBr: boolean) => {
|
|
116
|
+
label: string;
|
|
117
|
+
value: FilterMatchMode;
|
|
118
|
+
}[];
|
|
111
119
|
|
|
112
|
-
export { Button, type ColumnCustom, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, ModalBase, SelectFilterTemplate, ValueFilterTemplate, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsString };
|
|
120
|
+
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
|
@@ -100,6 +100,10 @@ declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean) =>
|
|
|
100
100
|
label: string;
|
|
101
101
|
value: string;
|
|
102
102
|
}[];
|
|
103
|
+
declare const getDefaultFilterMatchOptionsStringArray: (isLanguagePtBr?: boolean) => {
|
|
104
|
+
label: string;
|
|
105
|
+
value: FilterMatchMode;
|
|
106
|
+
}[];
|
|
103
107
|
declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean) => {
|
|
104
108
|
label: string;
|
|
105
109
|
value: FilterMatchMode;
|
|
@@ -108,5 +112,9 @@ declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean) => {
|
|
|
108
112
|
label: string;
|
|
109
113
|
value: string;
|
|
110
114
|
}[];
|
|
115
|
+
declare const getDefaultFilterMatchOptionsEnumNotNullable: (isLanguagePtBr: boolean) => {
|
|
116
|
+
label: string;
|
|
117
|
+
value: FilterMatchMode;
|
|
118
|
+
}[];
|
|
111
119
|
|
|
112
|
-
export { Button, type ColumnCustom, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, ModalBase, SelectFilterTemplate, ValueFilterTemplate, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsString };
|
|
120
|
+
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
|
-
|
|
44
|
+
getDefaultFilterMatchOptionsEnumNotNullable: () => getDefaultFilterMatchOptionsEnumNotNullable,
|
|
45
|
+
getDefaultFilterMatchOptionsString: () => getDefaultFilterMatchOptionsString,
|
|
46
|
+
getDefaultFilterMatchOptionsStringArray: () => getDefaultFilterMatchOptionsStringArray
|
|
45
47
|
});
|
|
46
48
|
module.exports = __toCommonJS(index_exports);
|
|
47
49
|
|
|
@@ -749,7 +751,18 @@ function DataTableAdvancedFilterWrapper({
|
|
|
749
751
|
paginatorLeft: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "paginatorLeft", children: TableHeaderAndTableActions }),
|
|
750
752
|
currentPageReportTemplate: "Mostrando {first} a {last} de {totalRecords}",
|
|
751
753
|
emptyMessage: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mensagem-nenhum-dado", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { children: isLanguagePtBr ? "Nenhum dado encontrado" : "No data found" }) }),
|
|
752
|
-
onFilter: (e) =>
|
|
754
|
+
onFilter: (e) => {
|
|
755
|
+
const newFilters = { ...e.filters };
|
|
756
|
+
Object.keys(filters).forEach((key) => {
|
|
757
|
+
if (filters[key]?.collection && newFilters[key]) {
|
|
758
|
+
newFilters[key] = {
|
|
759
|
+
...newFilters[key],
|
|
760
|
+
collection: filters[key].collection
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
});
|
|
764
|
+
setFilters(newFilters);
|
|
765
|
+
},
|
|
753
766
|
rowsPerPageOptions: [10, 25, 50, 100],
|
|
754
767
|
className: "p-datatable-sm",
|
|
755
768
|
paginatorClassName: "paginatorClassName",
|
|
@@ -1120,7 +1133,8 @@ var import_api3 = require("primereact/api");
|
|
|
1120
1133
|
var customMatchModes = {
|
|
1121
1134
|
notStartsWith: "notStartsWith",
|
|
1122
1135
|
notEndsWith: "notEndsWith",
|
|
1123
|
-
empty: "empty"
|
|
1136
|
+
empty: "empty",
|
|
1137
|
+
notEmpty: "notEmpty"
|
|
1124
1138
|
};
|
|
1125
1139
|
var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
|
|
1126
1140
|
{
|
|
@@ -1160,6 +1174,16 @@ var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
|
|
|
1160
1174
|
value: customMatchModes.empty
|
|
1161
1175
|
}
|
|
1162
1176
|
];
|
|
1177
|
+
var getDefaultFilterMatchOptionsStringArray = (isLanguagePtBr = true) => [
|
|
1178
|
+
{
|
|
1179
|
+
label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
|
|
1180
|
+
value: import_api3.FilterMatchMode.CONTAINS
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
|
|
1184
|
+
value: import_api3.FilterMatchMode.NOT_CONTAINS
|
|
1185
|
+
}
|
|
1186
|
+
];
|
|
1163
1187
|
var getDefaultFilterMatchOptionsDate = (isLanguagePtBr) => [
|
|
1164
1188
|
{
|
|
1165
1189
|
label: isLanguagePtBr ? "Data antes de" : "Date before",
|
|
@@ -1182,6 +1206,20 @@ var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr) => [
|
|
|
1182
1206
|
{
|
|
1183
1207
|
label: isLanguagePtBr ? "Vazio" : "Empty",
|
|
1184
1208
|
value: customMatchModes.empty
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
label: isLanguagePtBr ? "N\xE3o Vazio" : "NotEmpty",
|
|
1212
|
+
value: customMatchModes.notEmpty
|
|
1213
|
+
}
|
|
1214
|
+
];
|
|
1215
|
+
var getDefaultFilterMatchOptionsEnumNotNullable = (isLanguagePtBr) => [
|
|
1216
|
+
{
|
|
1217
|
+
label: isLanguagePtBr ? "Igual" : "Equals",
|
|
1218
|
+
value: import_api3.FilterMatchMode.EQUALS
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
label: isLanguagePtBr ? "Diferente" : "Not equals",
|
|
1222
|
+
value: import_api3.FilterMatchMode.NOT_EQUALS
|
|
1185
1223
|
}
|
|
1186
1224
|
];
|
|
1187
1225
|
|
|
@@ -1200,5 +1238,7 @@ var import_api4 = require("primereact/api");
|
|
|
1200
1238
|
ValueFilterTemplate,
|
|
1201
1239
|
getDefaultFilterMatchOptionsDate,
|
|
1202
1240
|
getDefaultFilterMatchOptionsEnum,
|
|
1203
|
-
|
|
1241
|
+
getDefaultFilterMatchOptionsEnumNotNullable,
|
|
1242
|
+
getDefaultFilterMatchOptionsString,
|
|
1243
|
+
getDefaultFilterMatchOptionsStringArray
|
|
1204
1244
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -702,7 +702,18 @@ function DataTableAdvancedFilterWrapper({
|
|
|
702
702
|
paginatorLeft: /* @__PURE__ */ jsx9("div", { className: "paginatorLeft", children: TableHeaderAndTableActions }),
|
|
703
703
|
currentPageReportTemplate: "Mostrando {first} a {last} de {totalRecords}",
|
|
704
704
|
emptyMessage: /* @__PURE__ */ jsx9("div", { className: "mensagem-nenhum-dado", children: /* @__PURE__ */ jsx9("p", { children: isLanguagePtBr ? "Nenhum dado encontrado" : "No data found" }) }),
|
|
705
|
-
onFilter: (e) =>
|
|
705
|
+
onFilter: (e) => {
|
|
706
|
+
const newFilters = { ...e.filters };
|
|
707
|
+
Object.keys(filters).forEach((key) => {
|
|
708
|
+
if (filters[key]?.collection && newFilters[key]) {
|
|
709
|
+
newFilters[key] = {
|
|
710
|
+
...newFilters[key],
|
|
711
|
+
collection: filters[key].collection
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
});
|
|
715
|
+
setFilters(newFilters);
|
|
716
|
+
},
|
|
706
717
|
rowsPerPageOptions: [10, 25, 50, 100],
|
|
707
718
|
className: "p-datatable-sm",
|
|
708
719
|
paginatorClassName: "paginatorClassName",
|
|
@@ -1073,7 +1084,8 @@ import { FilterMatchMode as FilterMatchMode3 } from "primereact/api";
|
|
|
1073
1084
|
var customMatchModes = {
|
|
1074
1085
|
notStartsWith: "notStartsWith",
|
|
1075
1086
|
notEndsWith: "notEndsWith",
|
|
1076
|
-
empty: "empty"
|
|
1087
|
+
empty: "empty",
|
|
1088
|
+
notEmpty: "notEmpty"
|
|
1077
1089
|
};
|
|
1078
1090
|
var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
|
|
1079
1091
|
{
|
|
@@ -1113,6 +1125,16 @@ var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
|
|
|
1113
1125
|
value: customMatchModes.empty
|
|
1114
1126
|
}
|
|
1115
1127
|
];
|
|
1128
|
+
var getDefaultFilterMatchOptionsStringArray = (isLanguagePtBr = true) => [
|
|
1129
|
+
{
|
|
1130
|
+
label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
|
|
1131
|
+
value: FilterMatchMode3.CONTAINS
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
|
|
1135
|
+
value: FilterMatchMode3.NOT_CONTAINS
|
|
1136
|
+
}
|
|
1137
|
+
];
|
|
1116
1138
|
var getDefaultFilterMatchOptionsDate = (isLanguagePtBr) => [
|
|
1117
1139
|
{
|
|
1118
1140
|
label: isLanguagePtBr ? "Data antes de" : "Date before",
|
|
@@ -1135,6 +1157,20 @@ var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr) => [
|
|
|
1135
1157
|
{
|
|
1136
1158
|
label: isLanguagePtBr ? "Vazio" : "Empty",
|
|
1137
1159
|
value: customMatchModes.empty
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
label: isLanguagePtBr ? "N\xE3o Vazio" : "NotEmpty",
|
|
1163
|
+
value: customMatchModes.notEmpty
|
|
1164
|
+
}
|
|
1165
|
+
];
|
|
1166
|
+
var getDefaultFilterMatchOptionsEnumNotNullable = (isLanguagePtBr) => [
|
|
1167
|
+
{
|
|
1168
|
+
label: isLanguagePtBr ? "Igual" : "Equals",
|
|
1169
|
+
value: FilterMatchMode3.EQUALS
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
label: isLanguagePtBr ? "Diferente" : "Not equals",
|
|
1173
|
+
value: FilterMatchMode3.NOT_EQUALS
|
|
1138
1174
|
}
|
|
1139
1175
|
];
|
|
1140
1176
|
|
|
@@ -1152,5 +1188,7 @@ export {
|
|
|
1152
1188
|
ValueFilterTemplate,
|
|
1153
1189
|
getDefaultFilterMatchOptionsDate,
|
|
1154
1190
|
getDefaultFilterMatchOptionsEnum,
|
|
1155
|
-
|
|
1191
|
+
getDefaultFilterMatchOptionsEnumNotNullable,
|
|
1192
|
+
getDefaultFilterMatchOptionsString,
|
|
1193
|
+
getDefaultFilterMatchOptionsStringArray
|
|
1156
1194
|
};
|