@charlesgomes/leafcode-shared-lib-react 1.0.19 → 1.0.21
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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +31 -1
- package/dist/index.mjs +30 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -104,5 +104,9 @@ declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean) => {
|
|
|
104
104
|
label: string;
|
|
105
105
|
value: FilterMatchMode;
|
|
106
106
|
}[];
|
|
107
|
+
declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean) => {
|
|
108
|
+
label: string;
|
|
109
|
+
value: string;
|
|
110
|
+
}[];
|
|
107
111
|
|
|
108
|
-
export { Button, type ColumnCustom, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, ModalBase, SelectFilterTemplate, ValueFilterTemplate, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsString };
|
|
112
|
+
export { Button, type ColumnCustom, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, ModalBase, SelectFilterTemplate, ValueFilterTemplate, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsString };
|
package/dist/index.d.ts
CHANGED
|
@@ -104,5 +104,9 @@ declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean) => {
|
|
|
104
104
|
label: string;
|
|
105
105
|
value: FilterMatchMode;
|
|
106
106
|
}[];
|
|
107
|
+
declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean) => {
|
|
108
|
+
label: string;
|
|
109
|
+
value: string;
|
|
110
|
+
}[];
|
|
107
111
|
|
|
108
|
-
export { Button, type ColumnCustom, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, ModalBase, SelectFilterTemplate, ValueFilterTemplate, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsString };
|
|
112
|
+
export { Button, type ColumnCustom, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, ModalBase, SelectFilterTemplate, ValueFilterTemplate, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsString };
|
package/dist/index.js
CHANGED
|
@@ -40,6 +40,7 @@ __export(index_exports, {
|
|
|
40
40
|
SelectFilterTemplate: () => SelectFilterTemplate,
|
|
41
41
|
ValueFilterTemplate: () => ValueFilterTemplate,
|
|
42
42
|
getDefaultFilterMatchOptionsDate: () => getDefaultFilterMatchOptionsDate,
|
|
43
|
+
getDefaultFilterMatchOptionsEnum: () => getDefaultFilterMatchOptionsEnum,
|
|
43
44
|
getDefaultFilterMatchOptionsString: () => getDefaultFilterMatchOptionsString
|
|
44
45
|
});
|
|
45
46
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -265,6 +266,7 @@ function TableActions({
|
|
|
265
266
|
"button",
|
|
266
267
|
{
|
|
267
268
|
id: "add",
|
|
269
|
+
type: "button",
|
|
268
270
|
onClick: onNew,
|
|
269
271
|
className: cn(
|
|
270
272
|
"enable-button-table-actions",
|
|
@@ -286,6 +288,7 @@ function TableActions({
|
|
|
286
288
|
"button",
|
|
287
289
|
{
|
|
288
290
|
id: "edit",
|
|
291
|
+
type: "button",
|
|
289
292
|
onClick: () => onEdit(selectedRows),
|
|
290
293
|
className: cn(
|
|
291
294
|
"enable-button-table-actions",
|
|
@@ -308,6 +311,7 @@ function TableActions({
|
|
|
308
311
|
"button",
|
|
309
312
|
{
|
|
310
313
|
id: "delete",
|
|
314
|
+
type: "button",
|
|
311
315
|
onClick: () => onDelete(selectedRows),
|
|
312
316
|
className: cn(
|
|
313
317
|
"enable-button-table-actions",
|
|
@@ -332,6 +336,7 @@ function TableActions({
|
|
|
332
336
|
"button",
|
|
333
337
|
{
|
|
334
338
|
id,
|
|
339
|
+
type: "button",
|
|
335
340
|
onClick: () => action.onClick(selectedRows),
|
|
336
341
|
className: cn("enable-button-table-actions", action.className),
|
|
337
342
|
children: [
|
|
@@ -361,6 +366,7 @@ function ActionsColumn({
|
|
|
361
366
|
"button",
|
|
362
367
|
{
|
|
363
368
|
id: "edit-column",
|
|
369
|
+
type: "button",
|
|
364
370
|
className: "btn-icone-actions-column",
|
|
365
371
|
onClick: (e) => {
|
|
366
372
|
onEdit && onEdit([row]);
|
|
@@ -381,6 +387,7 @@ function ActionsColumn({
|
|
|
381
387
|
"button",
|
|
382
388
|
{
|
|
383
389
|
id: "delete-column",
|
|
390
|
+
type: "button",
|
|
384
391
|
className: "btn-icone-actions-column",
|
|
385
392
|
onClick: (e) => {
|
|
386
393
|
onDelete && onDelete([row]);
|
|
@@ -403,6 +410,7 @@ function ActionsColumn({
|
|
|
403
410
|
"button",
|
|
404
411
|
{
|
|
405
412
|
id,
|
|
413
|
+
type: "button",
|
|
406
414
|
onClick: () => action.onClick([row]),
|
|
407
415
|
className: cn("btn-icone-actions-column", action.className),
|
|
408
416
|
children: [
|
|
@@ -706,6 +714,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
706
714
|
PrevPageLink: (options) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
707
715
|
"button",
|
|
708
716
|
{
|
|
717
|
+
type: "button",
|
|
709
718
|
onClick: options.onClick,
|
|
710
719
|
disabled: options.disabled,
|
|
711
720
|
className: `PrevPage ${options.disabled ? "PrevPageDisabled" : "PrevPageEnabled"}`,
|
|
@@ -728,6 +737,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
728
737
|
NextPageLink: (options) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
729
738
|
"button",
|
|
730
739
|
{
|
|
740
|
+
type: "button",
|
|
731
741
|
onClick: options.onClick,
|
|
732
742
|
disabled: options.disabled,
|
|
733
743
|
className: `NextPage ${options.disabled ? "NextPageDisabled" : "NextPageEnabled"}`,
|
|
@@ -1109,7 +1119,8 @@ var SelectFilterTemplate = (options, isLanguagePtBr = true, items = []) => {
|
|
|
1109
1119
|
var import_api3 = require("primereact/api");
|
|
1110
1120
|
var customMatchModes = {
|
|
1111
1121
|
notStartsWith: "notStartsWith",
|
|
1112
|
-
notEndsWith: "notEndsWith"
|
|
1122
|
+
notEndsWith: "notEndsWith",
|
|
1123
|
+
empty: "empty"
|
|
1113
1124
|
};
|
|
1114
1125
|
var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
|
|
1115
1126
|
{
|
|
@@ -1143,6 +1154,10 @@ var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
|
|
|
1143
1154
|
{
|
|
1144
1155
|
label: isLanguagePtBr ? "N\xE3o termina com" : "Does not end with",
|
|
1145
1156
|
value: customMatchModes.notEndsWith
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
label: isLanguagePtBr ? "Vazio" : "Empty",
|
|
1160
|
+
value: customMatchModes.empty
|
|
1146
1161
|
}
|
|
1147
1162
|
];
|
|
1148
1163
|
var getDefaultFilterMatchOptionsDate = (isLanguagePtBr) => [
|
|
@@ -1155,6 +1170,20 @@ var getDefaultFilterMatchOptionsDate = (isLanguagePtBr) => [
|
|
|
1155
1170
|
value: import_api3.FilterMatchMode.DATE_AFTER
|
|
1156
1171
|
}
|
|
1157
1172
|
];
|
|
1173
|
+
var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr) => [
|
|
1174
|
+
{
|
|
1175
|
+
label: isLanguagePtBr ? "Igual" : "Equals",
|
|
1176
|
+
value: import_api3.FilterMatchMode.EQUALS
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
|
|
1180
|
+
value: import_api3.FilterMatchMode.NOT_CONTAINS
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
label: isLanguagePtBr ? "Vazio" : "Empty",
|
|
1184
|
+
value: customMatchModes.empty
|
|
1185
|
+
}
|
|
1186
|
+
];
|
|
1158
1187
|
|
|
1159
1188
|
// src/index.tsx
|
|
1160
1189
|
var import_api4 = require("primereact/api");
|
|
@@ -1170,5 +1199,6 @@ var import_api4 = require("primereact/api");
|
|
|
1170
1199
|
SelectFilterTemplate,
|
|
1171
1200
|
ValueFilterTemplate,
|
|
1172
1201
|
getDefaultFilterMatchOptionsDate,
|
|
1202
|
+
getDefaultFilterMatchOptionsEnum,
|
|
1173
1203
|
getDefaultFilterMatchOptionsString
|
|
1174
1204
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -219,6 +219,7 @@ function TableActions({
|
|
|
219
219
|
"button",
|
|
220
220
|
{
|
|
221
221
|
id: "add",
|
|
222
|
+
type: "button",
|
|
222
223
|
onClick: onNew,
|
|
223
224
|
className: cn(
|
|
224
225
|
"enable-button-table-actions",
|
|
@@ -240,6 +241,7 @@ function TableActions({
|
|
|
240
241
|
"button",
|
|
241
242
|
{
|
|
242
243
|
id: "edit",
|
|
244
|
+
type: "button",
|
|
243
245
|
onClick: () => onEdit(selectedRows),
|
|
244
246
|
className: cn(
|
|
245
247
|
"enable-button-table-actions",
|
|
@@ -262,6 +264,7 @@ function TableActions({
|
|
|
262
264
|
"button",
|
|
263
265
|
{
|
|
264
266
|
id: "delete",
|
|
267
|
+
type: "button",
|
|
265
268
|
onClick: () => onDelete(selectedRows),
|
|
266
269
|
className: cn(
|
|
267
270
|
"enable-button-table-actions",
|
|
@@ -286,6 +289,7 @@ function TableActions({
|
|
|
286
289
|
"button",
|
|
287
290
|
{
|
|
288
291
|
id,
|
|
292
|
+
type: "button",
|
|
289
293
|
onClick: () => action.onClick(selectedRows),
|
|
290
294
|
className: cn("enable-button-table-actions", action.className),
|
|
291
295
|
children: [
|
|
@@ -315,6 +319,7 @@ function ActionsColumn({
|
|
|
315
319
|
"button",
|
|
316
320
|
{
|
|
317
321
|
id: "edit-column",
|
|
322
|
+
type: "button",
|
|
318
323
|
className: "btn-icone-actions-column",
|
|
319
324
|
onClick: (e) => {
|
|
320
325
|
onEdit && onEdit([row]);
|
|
@@ -335,6 +340,7 @@ function ActionsColumn({
|
|
|
335
340
|
"button",
|
|
336
341
|
{
|
|
337
342
|
id: "delete-column",
|
|
343
|
+
type: "button",
|
|
338
344
|
className: "btn-icone-actions-column",
|
|
339
345
|
onClick: (e) => {
|
|
340
346
|
onDelete && onDelete([row]);
|
|
@@ -357,6 +363,7 @@ function ActionsColumn({
|
|
|
357
363
|
"button",
|
|
358
364
|
{
|
|
359
365
|
id,
|
|
366
|
+
type: "button",
|
|
360
367
|
onClick: () => action.onClick([row]),
|
|
361
368
|
className: cn("btn-icone-actions-column", action.className),
|
|
362
369
|
children: [
|
|
@@ -660,6 +667,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
660
667
|
PrevPageLink: (options) => /* @__PURE__ */ jsx9(
|
|
661
668
|
"button",
|
|
662
669
|
{
|
|
670
|
+
type: "button",
|
|
663
671
|
onClick: options.onClick,
|
|
664
672
|
disabled: options.disabled,
|
|
665
673
|
className: `PrevPage ${options.disabled ? "PrevPageDisabled" : "PrevPageEnabled"}`,
|
|
@@ -682,6 +690,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
682
690
|
NextPageLink: (options) => /* @__PURE__ */ jsx9(
|
|
683
691
|
"button",
|
|
684
692
|
{
|
|
693
|
+
type: "button",
|
|
685
694
|
onClick: options.onClick,
|
|
686
695
|
disabled: options.disabled,
|
|
687
696
|
className: `NextPage ${options.disabled ? "NextPageDisabled" : "NextPageEnabled"}`,
|
|
@@ -1063,7 +1072,8 @@ var SelectFilterTemplate = (options, isLanguagePtBr = true, items = []) => {
|
|
|
1063
1072
|
import { FilterMatchMode as FilterMatchMode3 } from "primereact/api";
|
|
1064
1073
|
var customMatchModes = {
|
|
1065
1074
|
notStartsWith: "notStartsWith",
|
|
1066
|
-
notEndsWith: "notEndsWith"
|
|
1075
|
+
notEndsWith: "notEndsWith",
|
|
1076
|
+
empty: "empty"
|
|
1067
1077
|
};
|
|
1068
1078
|
var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
|
|
1069
1079
|
{
|
|
@@ -1097,6 +1107,10 @@ var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
|
|
|
1097
1107
|
{
|
|
1098
1108
|
label: isLanguagePtBr ? "N\xE3o termina com" : "Does not end with",
|
|
1099
1109
|
value: customMatchModes.notEndsWith
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
label: isLanguagePtBr ? "Vazio" : "Empty",
|
|
1113
|
+
value: customMatchModes.empty
|
|
1100
1114
|
}
|
|
1101
1115
|
];
|
|
1102
1116
|
var getDefaultFilterMatchOptionsDate = (isLanguagePtBr) => [
|
|
@@ -1109,6 +1123,20 @@ var getDefaultFilterMatchOptionsDate = (isLanguagePtBr) => [
|
|
|
1109
1123
|
value: FilterMatchMode3.DATE_AFTER
|
|
1110
1124
|
}
|
|
1111
1125
|
];
|
|
1126
|
+
var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr) => [
|
|
1127
|
+
{
|
|
1128
|
+
label: isLanguagePtBr ? "Igual" : "Equals",
|
|
1129
|
+
value: FilterMatchMode3.EQUALS
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
|
|
1133
|
+
value: FilterMatchMode3.NOT_CONTAINS
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
label: isLanguagePtBr ? "Vazio" : "Empty",
|
|
1137
|
+
value: customMatchModes.empty
|
|
1138
|
+
}
|
|
1139
|
+
];
|
|
1112
1140
|
|
|
1113
1141
|
// src/index.tsx
|
|
1114
1142
|
import { FilterMatchMode as FilterMatchMode4, FilterOperator } from "primereact/api";
|
|
@@ -1123,5 +1151,6 @@ export {
|
|
|
1123
1151
|
SelectFilterTemplate,
|
|
1124
1152
|
ValueFilterTemplate,
|
|
1125
1153
|
getDefaultFilterMatchOptionsDate,
|
|
1154
|
+
getDefaultFilterMatchOptionsEnum,
|
|
1126
1155
|
getDefaultFilterMatchOptionsString
|
|
1127
1156
|
};
|