@charlesgomes/leafcode-shared-lib-react 1.0.57 → 1.0.58
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 +5 -5
- package/dist/index.d.mts +72 -2
- package/dist/index.d.ts +72 -2
- package/dist/index.js +359 -111
- package/dist/index.mjs +354 -105
- package/dist/styles/input.css +128 -0
- package/dist/styles/table.css +5 -5
- package/package.json +5 -2
package/dist/index.mjs
CHANGED
|
@@ -51,18 +51,265 @@ function Button({
|
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
// src/components/Input/Input.tsx
|
|
55
|
+
import {
|
|
56
|
+
forwardRef,
|
|
57
|
+
useState as useState2
|
|
58
|
+
} from "react";
|
|
59
|
+
|
|
60
|
+
// src/components/Tooltips/TooltipErrorInput.tsx
|
|
61
|
+
import { WarningCircle, X } from "@phosphor-icons/react";
|
|
62
|
+
import { useEffect, useState } from "react";
|
|
63
|
+
import { Tooltip } from "react-tooltip";
|
|
64
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
65
|
+
function TooltipErrorInput({
|
|
66
|
+
error,
|
|
67
|
+
name,
|
|
68
|
+
isSelect = false,
|
|
69
|
+
isInvalid = false
|
|
70
|
+
}) {
|
|
71
|
+
const [isTooltipOpen, setIsTooltipOpen] = useState(true);
|
|
72
|
+
const handleClose = () => setIsTooltipOpen(false);
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
setIsTooltipOpen(true);
|
|
75
|
+
}, [error]);
|
|
76
|
+
return /* @__PURE__ */ jsx2(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
className: `absolute ${isSelect ? isInvalid ? "right-[4.5rem]" : "right-11" : "right-2"} top-1/2 transform -translate-y-1/2 cursor-pointer z-20`,
|
|
80
|
+
children: /* @__PURE__ */ jsx2(Fragment, { children: error?.message && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
81
|
+
/* @__PURE__ */ jsx2(
|
|
82
|
+
"a",
|
|
83
|
+
{
|
|
84
|
+
"data-tooltip-id": name,
|
|
85
|
+
"data-tooltip-content": "",
|
|
86
|
+
"data-tooltip-place": "top-end",
|
|
87
|
+
onClick: () => setIsTooltipOpen(true),
|
|
88
|
+
children: /* @__PURE__ */ jsx2(WarningCircle, { size: 22, className: "text-red-400" })
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ jsx2(
|
|
92
|
+
Tooltip,
|
|
93
|
+
{
|
|
94
|
+
className: "max-w-[15rem] relative z-50 tooltip-content cursor-default",
|
|
95
|
+
id: name,
|
|
96
|
+
style: {
|
|
97
|
+
backgroundColor: "#f87171",
|
|
98
|
+
color: "#fff",
|
|
99
|
+
padding: "8px 14px"
|
|
100
|
+
},
|
|
101
|
+
opacity: 1,
|
|
102
|
+
delayShow: 300,
|
|
103
|
+
delayHide: 150,
|
|
104
|
+
clickable: true,
|
|
105
|
+
openOnClick: true,
|
|
106
|
+
isOpen: isTooltipOpen,
|
|
107
|
+
children: isTooltipOpen && /* @__PURE__ */ jsxs2("div", { className: "flex justify-between gap-1 items-center font-Roboto text-[13px] leading-[125%] transition-all", children: [
|
|
108
|
+
/* @__PURE__ */ jsx2("span", { children: error?.message }),
|
|
109
|
+
/* @__PURE__ */ jsx2(
|
|
110
|
+
"button",
|
|
111
|
+
{
|
|
112
|
+
onClick: handleClose,
|
|
113
|
+
className: "text-white hover:text-black",
|
|
114
|
+
style: {
|
|
115
|
+
border: "none",
|
|
116
|
+
background: "transparent",
|
|
117
|
+
cursor: "pointer"
|
|
118
|
+
},
|
|
119
|
+
children: /* @__PURE__ */ jsx2(X, { size: 16, weight: "bold" })
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
] })
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
] }) })
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// src/components/Input/Input.tsx
|
|
131
|
+
import { Eye, EyeSlash } from "@phosphor-icons/react";
|
|
132
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
133
|
+
var InputBase = ({
|
|
134
|
+
name,
|
|
135
|
+
label,
|
|
136
|
+
placeholder,
|
|
137
|
+
onFocus,
|
|
138
|
+
error = null,
|
|
139
|
+
disabled,
|
|
140
|
+
isUppercaseLabel = true,
|
|
141
|
+
isUppercaseText = false,
|
|
142
|
+
validationMode = "default",
|
|
143
|
+
showPasswordToggle = false,
|
|
144
|
+
onChange,
|
|
145
|
+
value,
|
|
146
|
+
colors,
|
|
147
|
+
fonts,
|
|
148
|
+
...rest
|
|
149
|
+
}, ref) => {
|
|
150
|
+
const styleVars = {
|
|
151
|
+
"--label-font-family": fonts?.labelFamily,
|
|
152
|
+
"--label-font-weight": fonts?.labelWeight,
|
|
153
|
+
"--input-font-family": fonts?.inputFamily,
|
|
154
|
+
"--input-font-weight": fonts?.inputWeight,
|
|
155
|
+
"--label-color": colors?.label,
|
|
156
|
+
"--label-bg": colors?.labelBg,
|
|
157
|
+
"--input-border": colors?.inputBorder,
|
|
158
|
+
"--input-bg": colors?.inputBg,
|
|
159
|
+
"--input-text": colors?.inputText,
|
|
160
|
+
"--input-focus-border": colors?.inputFocusBorder,
|
|
161
|
+
"--input-placeholder": colors?.inputPlaceholder,
|
|
162
|
+
"--input-error-border": colors?.inputErrorBorder,
|
|
163
|
+
"--autofill-box-shadow": colors?.autofillBoxShadow,
|
|
164
|
+
"--autofill-text-color": colors?.autofillTextColor,
|
|
165
|
+
"--autofill-color-border": colors?.autofillColorBorder,
|
|
166
|
+
"--color-password-toggle": colors?.colorPasswordToggle
|
|
167
|
+
};
|
|
168
|
+
const handleChange = (e) => {
|
|
169
|
+
let val = e.target.value;
|
|
170
|
+
if (validationMode === "restricted") {
|
|
171
|
+
val = val.replace(/[^a-zA-Z0-9_.-]/g, "");
|
|
172
|
+
val = val.replace(/^\.+/, "");
|
|
173
|
+
val = val.replace(/\.+$/, "");
|
|
174
|
+
val = val.replace(/\s+/g, "");
|
|
175
|
+
}
|
|
176
|
+
e.target.value = val;
|
|
177
|
+
onChange?.(e);
|
|
178
|
+
};
|
|
179
|
+
const [show, setShow] = useState2(false);
|
|
180
|
+
const handleClick = () => setShow(!show);
|
|
181
|
+
return /* @__PURE__ */ jsxs3(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
className: `input-wrapper ${disabled ? "is-disabled" : ""}`,
|
|
185
|
+
style: styleVars,
|
|
186
|
+
children: [
|
|
187
|
+
!!label && /* @__PURE__ */ jsx3(
|
|
188
|
+
"label",
|
|
189
|
+
{
|
|
190
|
+
className: `label-input ${isUppercaseLabel && "is-uppercase"}`,
|
|
191
|
+
htmlFor: name,
|
|
192
|
+
children: label
|
|
193
|
+
}
|
|
194
|
+
),
|
|
195
|
+
/* @__PURE__ */ jsxs3("div", { style: { position: "relative", width: "100%" }, children: [
|
|
196
|
+
/* @__PURE__ */ jsx3(
|
|
197
|
+
"input",
|
|
198
|
+
{
|
|
199
|
+
id: name,
|
|
200
|
+
name,
|
|
201
|
+
disabled,
|
|
202
|
+
type: show ? "text" : "password",
|
|
203
|
+
className: `input ${error && "input-error"} ${isUppercaseText && "is-uppercase"}`,
|
|
204
|
+
placeholder,
|
|
205
|
+
onFocus,
|
|
206
|
+
onChange: handleChange,
|
|
207
|
+
value,
|
|
208
|
+
ref,
|
|
209
|
+
...rest
|
|
210
|
+
}
|
|
211
|
+
),
|
|
212
|
+
showPasswordToggle && /* @__PURE__ */ jsx3(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
onClick: handleClick,
|
|
216
|
+
className: `password-toggle ${error ? "error" : "no-error"}`,
|
|
217
|
+
children: show ? /* @__PURE__ */ jsx3(Eye, { size: 21 }) : /* @__PURE__ */ jsx3(EyeSlash, { size: 21 })
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
] }),
|
|
221
|
+
/* @__PURE__ */ jsx3(TooltipErrorInput, { error, name })
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
};
|
|
226
|
+
var Input = forwardRef(InputBase);
|
|
227
|
+
|
|
228
|
+
// src/components/Input/TextArea.tsx
|
|
229
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
230
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
231
|
+
var TextAreaBase = ({
|
|
232
|
+
name,
|
|
233
|
+
label,
|
|
234
|
+
placeholder,
|
|
235
|
+
isUppercaseText = false,
|
|
236
|
+
isUppercaseLabel = true,
|
|
237
|
+
disabled,
|
|
238
|
+
onFocus,
|
|
239
|
+
error,
|
|
240
|
+
colors,
|
|
241
|
+
fonts,
|
|
242
|
+
height,
|
|
243
|
+
...rest
|
|
244
|
+
}, ref) => {
|
|
245
|
+
const styleVars = {
|
|
246
|
+
"--label-font-family": fonts?.labelFamily,
|
|
247
|
+
"--label-font-weight": fonts?.labelWeight,
|
|
248
|
+
"--input-font-family": fonts?.inputFamily,
|
|
249
|
+
"--input-font-weight": fonts?.inputWeight,
|
|
250
|
+
"--height-text-area": height?.heightTextArea,
|
|
251
|
+
"--label-color": colors?.label,
|
|
252
|
+
"--label-bg": colors?.labelBg,
|
|
253
|
+
"--input-border": colors?.inputBorder,
|
|
254
|
+
"--input-bg": colors?.inputBg,
|
|
255
|
+
"--input-text": colors?.inputText,
|
|
256
|
+
"--input-focus-border": colors?.inputFocusBorder,
|
|
257
|
+
"--input-placeholder": colors?.inputPlaceholder,
|
|
258
|
+
"--input-error-border": colors?.inputErrorBorder,
|
|
259
|
+
"--autofill-box-shadow": colors?.autofillBoxShadow,
|
|
260
|
+
"--autofill-text-color": colors?.autofillTextColor,
|
|
261
|
+
"--autofill-color-border": colors?.autofillColorBorder
|
|
262
|
+
};
|
|
263
|
+
return /* @__PURE__ */ jsxs4(
|
|
264
|
+
"div",
|
|
265
|
+
{
|
|
266
|
+
className: `input-wrapper ${disabled ? "is-disabled" : ""}`,
|
|
267
|
+
style: styleVars,
|
|
268
|
+
children: [
|
|
269
|
+
!!label && /* @__PURE__ */ jsx4(
|
|
270
|
+
"label",
|
|
271
|
+
{
|
|
272
|
+
className: `label-input ${isUppercaseLabel ? "is-uppercase" : ""}`,
|
|
273
|
+
htmlFor: name,
|
|
274
|
+
children: label
|
|
275
|
+
}
|
|
276
|
+
),
|
|
277
|
+
/* @__PURE__ */ jsxs4("div", { style: { position: "relative", width: "100%" }, children: [
|
|
278
|
+
/* @__PURE__ */ jsx4(
|
|
279
|
+
"textarea",
|
|
280
|
+
{
|
|
281
|
+
ref,
|
|
282
|
+
id: name,
|
|
283
|
+
name,
|
|
284
|
+
disabled,
|
|
285
|
+
className: `input textArea ${error ? "input-error" : ""} ${isUppercaseText ? "is-uppercase" : ""}`,
|
|
286
|
+
placeholder,
|
|
287
|
+
onFocus,
|
|
288
|
+
...rest
|
|
289
|
+
}
|
|
290
|
+
),
|
|
291
|
+
/* @__PURE__ */ jsx4("div", { className: "absolute top-6 right-1", children: /* @__PURE__ */ jsx4(TooltipErrorInput, { error, name }) })
|
|
292
|
+
] })
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
};
|
|
297
|
+
var TextArea = forwardRef2(
|
|
298
|
+
TextAreaBase
|
|
299
|
+
);
|
|
300
|
+
|
|
54
301
|
// src/components/ModalBase/ModalBase.tsx
|
|
55
|
-
import { X } from "@phosphor-icons/react";
|
|
302
|
+
import { X as X2 } from "@phosphor-icons/react";
|
|
56
303
|
|
|
57
304
|
// src/components/ModalBase/FooterButtons.tsx
|
|
58
|
-
import { jsx as
|
|
305
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
59
306
|
function FooterButtons({ children }) {
|
|
60
|
-
return /* @__PURE__ */
|
|
307
|
+
return /* @__PURE__ */ jsx5("div", { className: "sm:flex pt-8 justify-end text-right sm:space-x-6 space-x-0 sm:space-y-0 space-y-4 p-6", children });
|
|
61
308
|
}
|
|
62
309
|
|
|
63
310
|
// src/components/ModalBase/ModalBase.tsx
|
|
64
|
-
import { useEffect } from "react";
|
|
65
|
-
import { Fragment, jsx as
|
|
311
|
+
import { useEffect as useEffect2 } from "react";
|
|
312
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
66
313
|
function ModalBase({
|
|
67
314
|
show,
|
|
68
315
|
onHide,
|
|
@@ -74,7 +321,7 @@ function ModalBase({
|
|
|
74
321
|
btnSuccess = "Save",
|
|
75
322
|
disabledBtnSuccess
|
|
76
323
|
}) {
|
|
77
|
-
|
|
324
|
+
useEffect2(() => {
|
|
78
325
|
const handleKeyDown = (event) => {
|
|
79
326
|
if (event.key === "Escape") {
|
|
80
327
|
onHide();
|
|
@@ -85,22 +332,22 @@ function ModalBase({
|
|
|
85
332
|
document.removeEventListener("keydown", handleKeyDown);
|
|
86
333
|
};
|
|
87
334
|
}, [onHide]);
|
|
88
|
-
return /* @__PURE__ */
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
335
|
+
return /* @__PURE__ */ jsx6(Fragment2, { children: show ? /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
336
|
+
/* @__PURE__ */ jsx6("div", { className: "justify-center items-start pt-11 overflow-x-hidden overflow-y-auto fixed inset-0 z-[60] outline-none focus:outline-none", children: /* @__PURE__ */ jsx6("div", { className: "relative w-auto my-6 mx-auto max-w-xl", children: /* @__PURE__ */ jsxs5("div", { className: "border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-theme-dark outline-none focus:outline-none", children: [
|
|
337
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-start justify-between p-2", children: [
|
|
338
|
+
/* @__PURE__ */ jsx6("h3", { className: "text-lg text-center absolute top-6 left-1/2 transform -translate-x-1/2 -translate-y-1/2 font-SegoeUIVF font-bold text-light-dark-100", children: title }),
|
|
339
|
+
/* @__PURE__ */ jsx6(
|
|
93
340
|
"button",
|
|
94
341
|
{
|
|
95
342
|
className: "p-1 ml-auto mr-1 cursor-pointer",
|
|
96
343
|
onClick: onHide,
|
|
97
|
-
children: /* @__PURE__ */
|
|
344
|
+
children: /* @__PURE__ */ jsx6(X2, { size: 18, color: "#ffffff" })
|
|
98
345
|
}
|
|
99
346
|
)
|
|
100
347
|
] }),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ jsx6("div", { className: "w-full p-6", children }),
|
|
349
|
+
/* @__PURE__ */ jsxs5(FooterButtons, { children: [
|
|
350
|
+
/* @__PURE__ */ jsx6(
|
|
104
351
|
Button,
|
|
105
352
|
{
|
|
106
353
|
color: "danger",
|
|
@@ -109,7 +356,7 @@ function ModalBase({
|
|
|
109
356
|
onClick: onHide
|
|
110
357
|
}
|
|
111
358
|
),
|
|
112
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ jsx6(
|
|
113
360
|
Button,
|
|
114
361
|
{
|
|
115
362
|
type: "button",
|
|
@@ -121,15 +368,15 @@ function ModalBase({
|
|
|
121
368
|
)
|
|
122
369
|
] })
|
|
123
370
|
] }) }) }),
|
|
124
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ jsx6("div", { className: "opacity-40 fixed inset-0 z-50 bg-black" })
|
|
125
372
|
] }) : null });
|
|
126
373
|
}
|
|
127
374
|
|
|
128
375
|
// src/components/DataTableAdvancedFilter/DataTableAdvancedFilter.tsx
|
|
129
|
-
import { useEffect as
|
|
376
|
+
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
130
377
|
|
|
131
378
|
// src/components/DataTableAdvancedFilter/DataTableAdvancedFilterWrapper.tsx
|
|
132
|
-
import { useEffect as
|
|
379
|
+
import { useEffect as useEffect4, useMemo, useState as useState4 } from "react";
|
|
133
380
|
import { useQuery } from "@tanstack/react-query";
|
|
134
381
|
|
|
135
382
|
// src/primereact-compat.ts
|
|
@@ -141,8 +388,8 @@ import { Calendar } from "primereact/calendar";
|
|
|
141
388
|
import { FilterMatchMode } from "primereact/api";
|
|
142
389
|
|
|
143
390
|
// src/components/DataTableAdvancedFilter/TableHeader.tsx
|
|
144
|
-
import { X as
|
|
145
|
-
import { jsx as
|
|
391
|
+
import { X as X3 } from "@phosphor-icons/react";
|
|
392
|
+
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
146
393
|
var TableHeader = ({
|
|
147
394
|
globalFilterValue,
|
|
148
395
|
onGlobalFilterChange,
|
|
@@ -153,8 +400,8 @@ var TableHeader = ({
|
|
|
153
400
|
target: { value: "" }
|
|
154
401
|
});
|
|
155
402
|
};
|
|
156
|
-
return /* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
403
|
+
return /* @__PURE__ */ jsxs6("div", { style: { position: "relative" }, children: [
|
|
404
|
+
/* @__PURE__ */ jsx7(
|
|
158
405
|
InputText,
|
|
159
406
|
{
|
|
160
407
|
value: globalFilterValue,
|
|
@@ -163,7 +410,7 @@ var TableHeader = ({
|
|
|
163
410
|
className: "custom-input input-search"
|
|
164
411
|
}
|
|
165
412
|
),
|
|
166
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ jsx7(X3, { size: 16, className: "close-search", onClick: limparCampo })
|
|
167
414
|
] });
|
|
168
415
|
};
|
|
169
416
|
var TableHeader_default = TableHeader;
|
|
@@ -191,20 +438,20 @@ function centsToReal(value) {
|
|
|
191
438
|
}
|
|
192
439
|
|
|
193
440
|
// src/components/TooltipCustom.tsx
|
|
194
|
-
import { Tooltip } from "react-tooltip";
|
|
441
|
+
import { Tooltip as Tooltip2 } from "react-tooltip";
|
|
195
442
|
import { createPortal } from "react-dom";
|
|
196
|
-
import { jsx as
|
|
443
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
197
444
|
function TooltipCustom({ label, id }) {
|
|
198
445
|
return createPortal(
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
|
|
446
|
+
/* @__PURE__ */ jsx8(
|
|
447
|
+
Tooltip2,
|
|
201
448
|
{
|
|
202
449
|
anchorSelect: `#${id}`,
|
|
203
450
|
place: "top",
|
|
204
451
|
positionStrategy: "fixed",
|
|
205
452
|
className: "tooltip-icone",
|
|
206
453
|
style: { zIndex: 13 },
|
|
207
|
-
children: /* @__PURE__ */
|
|
454
|
+
children: /* @__PURE__ */ jsx8("div", { className: "tooltip-custom", children: label })
|
|
208
455
|
}
|
|
209
456
|
),
|
|
210
457
|
document.body
|
|
@@ -212,7 +459,7 @@ function TooltipCustom({ label, id }) {
|
|
|
212
459
|
}
|
|
213
460
|
|
|
214
461
|
// src/components/DataTableAdvancedFilter/TableActions.tsx
|
|
215
|
-
import { Fragment as
|
|
462
|
+
import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
216
463
|
function TableActions({
|
|
217
464
|
onNew,
|
|
218
465
|
onEdit,
|
|
@@ -224,9 +471,9 @@ function TableActions({
|
|
|
224
471
|
const disableButtonsNotMultiplesSelecteds = selectedRows?.length !== 1 ? true : false;
|
|
225
472
|
const enableButtonsNotMultiplesSelecteds = selectedRows?.length > 0 ? true : false;
|
|
226
473
|
const resolvedCustomActions = typeof customActions === "function" ? customActions(selectedRows) : customActions;
|
|
227
|
-
return /* @__PURE__ */
|
|
228
|
-
onNew && /* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
474
|
+
return /* @__PURE__ */ jsxs7("div", { className: "box-icones-table-actions", children: [
|
|
475
|
+
onNew && /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
476
|
+
/* @__PURE__ */ jsx9(
|
|
230
477
|
"button",
|
|
231
478
|
{
|
|
232
479
|
id: "add",
|
|
@@ -237,10 +484,10 @@ function TableActions({
|
|
|
237
484
|
enableButtonsNotMultiplesSelecteds && "disable-button-table-actions"
|
|
238
485
|
),
|
|
239
486
|
disabled: enableButtonsNotMultiplesSelecteds,
|
|
240
|
-
children: /* @__PURE__ */
|
|
487
|
+
children: /* @__PURE__ */ jsx9(Plus, { size: 18 })
|
|
241
488
|
}
|
|
242
489
|
),
|
|
243
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ jsx9(
|
|
244
491
|
TooltipCustom,
|
|
245
492
|
{
|
|
246
493
|
id: "add",
|
|
@@ -248,7 +495,7 @@ function TableActions({
|
|
|
248
495
|
}
|
|
249
496
|
)
|
|
250
497
|
] }),
|
|
251
|
-
onEdit && /* @__PURE__ */
|
|
498
|
+
onEdit && /* @__PURE__ */ jsx9(Fragment3, { children: /* @__PURE__ */ jsxs7(
|
|
252
499
|
"button",
|
|
253
500
|
{
|
|
254
501
|
id: "edit",
|
|
@@ -260,8 +507,8 @@ function TableActions({
|
|
|
260
507
|
),
|
|
261
508
|
disabled: disableButtonsNotMultiplesSelecteds,
|
|
262
509
|
children: [
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ jsx9(PencilSimple, { size: 18 }),
|
|
511
|
+
/* @__PURE__ */ jsx9(
|
|
265
512
|
TooltipCustom,
|
|
266
513
|
{
|
|
267
514
|
id: "edit",
|
|
@@ -271,7 +518,7 @@ function TableActions({
|
|
|
271
518
|
]
|
|
272
519
|
}
|
|
273
520
|
) }),
|
|
274
|
-
onDelete && /* @__PURE__ */
|
|
521
|
+
onDelete && /* @__PURE__ */ jsx9(Fragment3, { children: /* @__PURE__ */ jsxs7(
|
|
275
522
|
"button",
|
|
276
523
|
{
|
|
277
524
|
id: "delete",
|
|
@@ -283,8 +530,8 @@ function TableActions({
|
|
|
283
530
|
),
|
|
284
531
|
disabled: !enableButtonsNotMultiplesSelecteds,
|
|
285
532
|
children: [
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
533
|
+
/* @__PURE__ */ jsx9(Trash, { size: 18 }),
|
|
534
|
+
/* @__PURE__ */ jsx9(
|
|
288
535
|
TooltipCustom,
|
|
289
536
|
{
|
|
290
537
|
id: "delete",
|
|
@@ -296,7 +543,7 @@ function TableActions({
|
|
|
296
543
|
) }),
|
|
297
544
|
resolvedCustomActions?.map((action) => {
|
|
298
545
|
const id = `action-table${phraseToId(action.label)}`;
|
|
299
|
-
return /* @__PURE__ */
|
|
546
|
+
return /* @__PURE__ */ jsxs7(
|
|
300
547
|
"button",
|
|
301
548
|
{
|
|
302
549
|
id,
|
|
@@ -305,7 +552,7 @@ function TableActions({
|
|
|
305
552
|
className: cn("enable-button-table-actions", action.className),
|
|
306
553
|
children: [
|
|
307
554
|
action.icon,
|
|
308
|
-
/* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ jsx9(TooltipCustom, { id, label: action.label })
|
|
309
556
|
]
|
|
310
557
|
},
|
|
311
558
|
id
|
|
@@ -316,7 +563,7 @@ function TableActions({
|
|
|
316
563
|
|
|
317
564
|
// src/components/DataTableAdvancedFilter/ActionsColumn.tsx
|
|
318
565
|
import { PencilSimple as PencilSimple2, Trash as Trash2 } from "@phosphor-icons/react";
|
|
319
|
-
import { Fragment as
|
|
566
|
+
import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
320
567
|
function ActionsColumn({
|
|
321
568
|
row,
|
|
322
569
|
onEdit,
|
|
@@ -325,8 +572,8 @@ function ActionsColumn({
|
|
|
325
572
|
isLanguagePtBr
|
|
326
573
|
}) {
|
|
327
574
|
const resolvedCustomActions = typeof customActionsColums === "function" ? customActionsColums(row) : customActionsColums;
|
|
328
|
-
return /* @__PURE__ */
|
|
329
|
-
onEdit && /* @__PURE__ */
|
|
575
|
+
return /* @__PURE__ */ jsxs8("div", { className: "box-icones-actions-column", children: [
|
|
576
|
+
onEdit && /* @__PURE__ */ jsx10(Fragment4, { children: /* @__PURE__ */ jsxs8(
|
|
330
577
|
"button",
|
|
331
578
|
{
|
|
332
579
|
id: "edit-column",
|
|
@@ -336,8 +583,8 @@ function ActionsColumn({
|
|
|
336
583
|
onEdit && onEdit([row]);
|
|
337
584
|
},
|
|
338
585
|
children: [
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ jsx10(PencilSimple2, { size: 17, weight: "regular" }),
|
|
587
|
+
/* @__PURE__ */ jsx10(
|
|
341
588
|
TooltipCustom,
|
|
342
589
|
{
|
|
343
590
|
id: "edit-column",
|
|
@@ -347,7 +594,7 @@ function ActionsColumn({
|
|
|
347
594
|
]
|
|
348
595
|
}
|
|
349
596
|
) }),
|
|
350
|
-
onDelete && /* @__PURE__ */
|
|
597
|
+
onDelete && /* @__PURE__ */ jsx10(Fragment4, { children: /* @__PURE__ */ jsxs8(
|
|
351
598
|
"button",
|
|
352
599
|
{
|
|
353
600
|
id: "delete-column",
|
|
@@ -357,8 +604,8 @@ function ActionsColumn({
|
|
|
357
604
|
onDelete && onDelete([row]);
|
|
358
605
|
},
|
|
359
606
|
children: [
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
607
|
+
/* @__PURE__ */ jsx10(Trash2, { size: 17, weight: "regular" }),
|
|
608
|
+
/* @__PURE__ */ jsx10(
|
|
362
609
|
TooltipCustom,
|
|
363
610
|
{
|
|
364
611
|
id: "delete-column",
|
|
@@ -370,7 +617,7 @@ function ActionsColumn({
|
|
|
370
617
|
) }),
|
|
371
618
|
resolvedCustomActions?.map((action) => {
|
|
372
619
|
const id = `action-colunm-${phraseToId(action.label)}`;
|
|
373
|
-
return /* @__PURE__ */
|
|
620
|
+
return /* @__PURE__ */ jsxs8(
|
|
374
621
|
"button",
|
|
375
622
|
{
|
|
376
623
|
id,
|
|
@@ -379,7 +626,7 @@ function ActionsColumn({
|
|
|
379
626
|
className: cn("btn-icone-actions-column", action.className),
|
|
380
627
|
children: [
|
|
381
628
|
action.icon,
|
|
382
|
-
/* @__PURE__ */
|
|
629
|
+
/* @__PURE__ */ jsx10(TooltipCustom, { id, label: action.label })
|
|
383
630
|
]
|
|
384
631
|
},
|
|
385
632
|
id
|
|
@@ -389,7 +636,7 @@ function ActionsColumn({
|
|
|
389
636
|
}
|
|
390
637
|
|
|
391
638
|
// src/components/DataTableAdvancedFilter/DynamicColumns.tsx
|
|
392
|
-
import { jsx as
|
|
639
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
393
640
|
function DynamicColumns({
|
|
394
641
|
columns,
|
|
395
642
|
isMultiSelectionMode = true,
|
|
@@ -401,7 +648,7 @@ function DynamicColumns({
|
|
|
401
648
|
const array = [];
|
|
402
649
|
if (isMultiSelectionMode) {
|
|
403
650
|
array.push(
|
|
404
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ jsx11(
|
|
405
652
|
Column,
|
|
406
653
|
{
|
|
407
654
|
selectionMode: "multiple",
|
|
@@ -418,7 +665,7 @@ function DynamicColumns({
|
|
|
418
665
|
const width = isActionsCol && col?.size ? col.size + "rem" : "6rem";
|
|
419
666
|
const placeholder = isLanguagePtBr ? "Procurar" : "Search";
|
|
420
667
|
array.push(
|
|
421
|
-
/* @__PURE__ */
|
|
668
|
+
/* @__PURE__ */ jsx11(
|
|
422
669
|
Column,
|
|
423
670
|
{
|
|
424
671
|
field: isActionsCol ? void 0 : col.field,
|
|
@@ -436,7 +683,7 @@ function DynamicColumns({
|
|
|
436
683
|
resizeable: col.enableResizeable ?? true
|
|
437
684
|
},
|
|
438
685
|
style: isActionsCol ? { width, minWidth: width, position: "relative" } : {},
|
|
439
|
-
body: (rowData) => isActionsCol ? /* @__PURE__ */
|
|
686
|
+
body: (rowData) => isActionsCol ? /* @__PURE__ */ jsx11(
|
|
440
687
|
ActionsColumn,
|
|
441
688
|
{
|
|
442
689
|
row: rowData,
|
|
@@ -445,7 +692,7 @@ function DynamicColumns({
|
|
|
445
692
|
customActionsColums,
|
|
446
693
|
isLanguagePtBr
|
|
447
694
|
}
|
|
448
|
-
) : col.body ? col.body(rowData) : /* @__PURE__ */
|
|
695
|
+
) : col.body ? col.body(rowData) : /* @__PURE__ */ jsx11("span", { children: String(rowData[col.field]) }),
|
|
449
696
|
sortable: !isActionsCol ? col.enableSorting ?? true : false
|
|
450
697
|
},
|
|
451
698
|
`${String(col.field)}-${idx}`
|
|
@@ -456,10 +703,10 @@ function DynamicColumns({
|
|
|
456
703
|
}
|
|
457
704
|
|
|
458
705
|
// src/hooks/use-debounce.ts
|
|
459
|
-
import { useEffect as
|
|
706
|
+
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
460
707
|
var useDebounce = (value, delay) => {
|
|
461
|
-
const [debouncedValue, setDebouncedValue] =
|
|
462
|
-
|
|
708
|
+
const [debouncedValue, setDebouncedValue] = useState3(value);
|
|
709
|
+
useEffect3(() => {
|
|
463
710
|
const timer = setTimeout(() => {
|
|
464
711
|
setDebouncedValue(value);
|
|
465
712
|
}, delay || 500);
|
|
@@ -471,7 +718,7 @@ var useDebounce = (value, delay) => {
|
|
|
471
718
|
};
|
|
472
719
|
|
|
473
720
|
// src/components/DataTableAdvancedFilter/DataTableAdvancedFilterWrapper.tsx
|
|
474
|
-
import { Fragment as
|
|
721
|
+
import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
475
722
|
function DataTableAdvancedFilterWrapper({
|
|
476
723
|
queryKey,
|
|
477
724
|
mutationFn,
|
|
@@ -491,8 +738,8 @@ function DataTableAdvancedFilterWrapper({
|
|
|
491
738
|
state,
|
|
492
739
|
onStateChange
|
|
493
740
|
}) {
|
|
494
|
-
const [isClient, setIsClient] =
|
|
495
|
-
|
|
741
|
+
const [isClient, setIsClient] = useState4(false);
|
|
742
|
+
useEffect4(() => {
|
|
496
743
|
setIsClient(true);
|
|
497
744
|
}, []);
|
|
498
745
|
const initialState = state ?? {
|
|
@@ -502,17 +749,17 @@ function DataTableAdvancedFilterWrapper({
|
|
|
502
749
|
sortOrder: sortOrderInitial,
|
|
503
750
|
filter: ""
|
|
504
751
|
};
|
|
505
|
-
const [page, setPage] =
|
|
506
|
-
const [rows, setRows] =
|
|
507
|
-
const [first, setFirst] =
|
|
508
|
-
const [sortField, setSortField] =
|
|
509
|
-
const [sortOrder, setSortOrder] =
|
|
510
|
-
const [searchText, setSearchText] =
|
|
511
|
-
const [filters, setFilters] =
|
|
752
|
+
const [page, setPage] = useState4(initialState.page);
|
|
753
|
+
const [rows, setRows] = useState4(initialState.rows);
|
|
754
|
+
const [first, setFirst] = useState4((initialState.page - 1) * initialState.rows);
|
|
755
|
+
const [sortField, setSortField] = useState4(initialState.sortField);
|
|
756
|
+
const [sortOrder, setSortOrder] = useState4(initialState.sortOrder ?? 1);
|
|
757
|
+
const [searchText, setSearchText] = useState4(initialState.filter ?? "");
|
|
758
|
+
const [filters, setFilters] = useState4({
|
|
512
759
|
...initFilters,
|
|
513
760
|
global: { value: initialState.filter, matchMode: "contains" }
|
|
514
761
|
});
|
|
515
|
-
const [selectedRowsData, setSelectedRowsData] =
|
|
762
|
+
const [selectedRowsData, setSelectedRowsData] = useState4([]);
|
|
516
763
|
const debouncedSearch = useDebounce(searchText, 500);
|
|
517
764
|
const debouncedFilters = useMemo(() => {
|
|
518
765
|
const f = { ...filters };
|
|
@@ -537,7 +784,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
537
784
|
globalFilterFields
|
|
538
785
|
)
|
|
539
786
|
});
|
|
540
|
-
|
|
787
|
+
useEffect4(() => {
|
|
541
788
|
if (!state) return;
|
|
542
789
|
setPage(state.page);
|
|
543
790
|
setRows(state.rows);
|
|
@@ -593,7 +840,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
593
840
|
filter: searchText
|
|
594
841
|
});
|
|
595
842
|
};
|
|
596
|
-
|
|
843
|
+
useEffect4(() => {
|
|
597
844
|
emitStateChange({
|
|
598
845
|
page: 1,
|
|
599
846
|
rows,
|
|
@@ -602,7 +849,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
602
849
|
filter: debouncedSearch
|
|
603
850
|
});
|
|
604
851
|
}, [debouncedSearch]);
|
|
605
|
-
|
|
852
|
+
useEffect4(() => {
|
|
606
853
|
if (customers?.items && selectedRowsData.length > 0) {
|
|
607
854
|
const currentIds = new Set(customers.items.map((item) => item.id));
|
|
608
855
|
const filteredSelection = selectedRowsData.filter(
|
|
@@ -614,8 +861,8 @@ function DataTableAdvancedFilterWrapper({
|
|
|
614
861
|
}
|
|
615
862
|
}, [customers?.items, selectedRowsData]);
|
|
616
863
|
const TableHeaderAndTableActions = useMemo(
|
|
617
|
-
() => /* @__PURE__ */
|
|
618
|
-
globalFilterFields.length > 0 && /* @__PURE__ */
|
|
864
|
+
() => /* @__PURE__ */ jsxs9(Fragment5, { children: [
|
|
865
|
+
globalFilterFields.length > 0 && /* @__PURE__ */ jsx12(
|
|
619
866
|
TableHeader_default,
|
|
620
867
|
{
|
|
621
868
|
isLanguagePtBr,
|
|
@@ -623,7 +870,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
623
870
|
onGlobalFilterChange
|
|
624
871
|
}
|
|
625
872
|
),
|
|
626
|
-
/* @__PURE__ */
|
|
873
|
+
/* @__PURE__ */ jsx12(
|
|
627
874
|
TableActions,
|
|
628
875
|
{
|
|
629
876
|
selectedRows: selectedRowsData,
|
|
@@ -646,9 +893,9 @@ function DataTableAdvancedFilterWrapper({
|
|
|
646
893
|
customActions
|
|
647
894
|
]
|
|
648
895
|
);
|
|
649
|
-
return /* @__PURE__ */
|
|
650
|
-
disablePagination && /* @__PURE__ */
|
|
651
|
-
/* @__PURE__ */
|
|
896
|
+
return /* @__PURE__ */ jsx12(Fragment5, { children: isClient && /* @__PURE__ */ jsxs9("div", { children: [
|
|
897
|
+
disablePagination && /* @__PURE__ */ jsx12("div", { className: "disablePagination", children: TableHeaderAndTableActions }),
|
|
898
|
+
/* @__PURE__ */ jsxs9(
|
|
652
899
|
DataTable,
|
|
653
900
|
{
|
|
654
901
|
value: customers?.items ?? [],
|
|
@@ -674,7 +921,7 @@ function DataTableAdvancedFilterWrapper({
|
|
|
674
921
|
sortOrder,
|
|
675
922
|
paginatorTemplate: {
|
|
676
923
|
layout: "RowsPerPageDropdown PrevPageLink CurrentPageReport NextPageLink",
|
|
677
|
-
RowsPerPageDropdown: (options) => /* @__PURE__ */
|
|
924
|
+
RowsPerPageDropdown: (options) => /* @__PURE__ */ jsx12(
|
|
678
925
|
"select",
|
|
679
926
|
{
|
|
680
927
|
value: options.value,
|
|
@@ -683,20 +930,20 @@ function DataTableAdvancedFilterWrapper({
|
|
|
683
930
|
value: Number(e.target.value)
|
|
684
931
|
}),
|
|
685
932
|
className: "custom-input custom-select",
|
|
686
|
-
children: options.options.map((opt) => /* @__PURE__ */
|
|
933
|
+
children: options.options.map((opt) => /* @__PURE__ */ jsx12("option", { value: opt.value, children: opt.label }, opt.value))
|
|
687
934
|
}
|
|
688
935
|
),
|
|
689
|
-
PrevPageLink: (options) => /* @__PURE__ */
|
|
936
|
+
PrevPageLink: (options) => /* @__PURE__ */ jsx12(
|
|
690
937
|
"button",
|
|
691
938
|
{
|
|
692
939
|
type: "button",
|
|
693
940
|
onClick: options.onClick,
|
|
694
941
|
disabled: options.disabled,
|
|
695
942
|
className: `PrevPage ${options.disabled ? "PrevPageDisabled" : "PrevPageEnabled"}`,
|
|
696
|
-
children: /* @__PURE__ */
|
|
943
|
+
children: /* @__PURE__ */ jsx12(CaretLeft, { size: 18, color: "#fff" })
|
|
697
944
|
}
|
|
698
945
|
),
|
|
699
|
-
CurrentPageReport: (options) => /* @__PURE__ */
|
|
946
|
+
CurrentPageReport: (options) => /* @__PURE__ */ jsxs9("span", { className: "pageReport", children: [
|
|
700
947
|
isLanguagePtBr ? "Mostrando" : "Showing",
|
|
701
948
|
" ",
|
|
702
949
|
options.first,
|
|
@@ -709,21 +956,21 @@ function DataTableAdvancedFilterWrapper({
|
|
|
709
956
|
" ",
|
|
710
957
|
options.totalRecords
|
|
711
958
|
] }),
|
|
712
|
-
NextPageLink: (options) => /* @__PURE__ */
|
|
959
|
+
NextPageLink: (options) => /* @__PURE__ */ jsx12(
|
|
713
960
|
"button",
|
|
714
961
|
{
|
|
715
962
|
type: "button",
|
|
716
963
|
onClick: options.onClick,
|
|
717
964
|
disabled: options.disabled,
|
|
718
965
|
className: `NextPage ${options.disabled ? "NextPageDisabled" : "NextPageEnabled"}`,
|
|
719
|
-
children: /* @__PURE__ */
|
|
966
|
+
children: /* @__PURE__ */ jsx12(CaretRight, { size: 18, color: "#fff" })
|
|
720
967
|
}
|
|
721
968
|
)
|
|
722
969
|
},
|
|
723
970
|
paginatorPosition: "top",
|
|
724
|
-
paginatorLeft: /* @__PURE__ */
|
|
971
|
+
paginatorLeft: /* @__PURE__ */ jsx12("div", { className: "paginatorLeft", children: TableHeaderAndTableActions }),
|
|
725
972
|
currentPageReportTemplate: "Mostrando {first} a {last} de {totalRecords}",
|
|
726
|
-
emptyMessage: /* @__PURE__ */
|
|
973
|
+
emptyMessage: /* @__PURE__ */ jsx12("div", { className: "mensagem-nenhum-dado", children: /* @__PURE__ */ jsx12("p", { children: isLanguagePtBr ? "Nenhum dado encontrado" : "No data found" }) }),
|
|
727
974
|
onFilter: (e) => {
|
|
728
975
|
const newFilters = { ...e.filters };
|
|
729
976
|
Object.keys(filters).forEach((key) => {
|
|
@@ -922,7 +1169,7 @@ var localePtBr = {
|
|
|
922
1169
|
};
|
|
923
1170
|
|
|
924
1171
|
// src/components/DataTableAdvancedFilter/DataTableAdvancedFilter.tsx
|
|
925
|
-
import { Fragment as
|
|
1172
|
+
import { Fragment as Fragment6, jsx as jsx13 } from "react/jsx-runtime";
|
|
926
1173
|
function DataTableAdvancedFilter({
|
|
927
1174
|
queryKey,
|
|
928
1175
|
mutationFn,
|
|
@@ -942,21 +1189,21 @@ function DataTableAdvancedFilter({
|
|
|
942
1189
|
state,
|
|
943
1190
|
onStateChange
|
|
944
1191
|
}) {
|
|
945
|
-
const [isClient, setIsClient] =
|
|
946
|
-
|
|
1192
|
+
const [isClient, setIsClient] = useState5(false);
|
|
1193
|
+
useEffect5(() => {
|
|
947
1194
|
addLocale("pt", localePtBr);
|
|
948
1195
|
}, []);
|
|
949
|
-
|
|
1196
|
+
useEffect5(() => {
|
|
950
1197
|
locale(isLanguagePtBr ? "pt" : "en");
|
|
951
1198
|
}, [isLanguagePtBr]);
|
|
952
|
-
|
|
1199
|
+
useEffect5(() => {
|
|
953
1200
|
setIsClient(true);
|
|
954
1201
|
}, []);
|
|
955
|
-
return /* @__PURE__ */
|
|
1202
|
+
return /* @__PURE__ */ jsx13(Fragment6, { children: isClient && /* @__PURE__ */ jsx13(
|
|
956
1203
|
PrimeReactProvider,
|
|
957
1204
|
{
|
|
958
1205
|
value: isLanguagePtBr ? { locale: "pt" } : { locale: "en" },
|
|
959
|
-
children: /* @__PURE__ */
|
|
1206
|
+
children: /* @__PURE__ */ jsx13(
|
|
960
1207
|
DataTableAdvancedFilterWrapper,
|
|
961
1208
|
{
|
|
962
1209
|
rowsPerPageOptions,
|
|
@@ -986,10 +1233,10 @@ function DataTableAdvancedFilter({
|
|
|
986
1233
|
import Select from "react-select";
|
|
987
1234
|
import { Dropdown } from "primereact/dropdown";
|
|
988
1235
|
import moment2 from "moment";
|
|
989
|
-
import { jsx as
|
|
1236
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
990
1237
|
var DateFilterTemplate = (options, mask) => {
|
|
991
1238
|
const parsedValue = options.value && typeof options.value === "string" ? /* @__PURE__ */ new Date(options.value + "T00:00:00") : options.value;
|
|
992
|
-
return /* @__PURE__ */
|
|
1239
|
+
return /* @__PURE__ */ jsx14(
|
|
993
1240
|
Calendar,
|
|
994
1241
|
{
|
|
995
1242
|
value: parsedValue,
|
|
@@ -1014,7 +1261,7 @@ var DateFilterTemplate = (options, mask) => {
|
|
|
1014
1261
|
};
|
|
1015
1262
|
var DateTimeFilterTemplate = (options, mask) => {
|
|
1016
1263
|
const value = typeof options.value === "string" ? moment2(options.value).toDate() : options.value ?? null;
|
|
1017
|
-
return /* @__PURE__ */
|
|
1264
|
+
return /* @__PURE__ */ jsx14(
|
|
1018
1265
|
Calendar,
|
|
1019
1266
|
{
|
|
1020
1267
|
value,
|
|
@@ -1048,7 +1295,7 @@ var ValueFilterTemplate = (options, mask) => {
|
|
|
1048
1295
|
const valueToFilter = mask ? mask(rawValue) : rawValue;
|
|
1049
1296
|
options.filterCallback(valueToFilter, options.index);
|
|
1050
1297
|
};
|
|
1051
|
-
return /* @__PURE__ */
|
|
1298
|
+
return /* @__PURE__ */ jsx14(
|
|
1052
1299
|
InputNumber,
|
|
1053
1300
|
{
|
|
1054
1301
|
value: parsedValue,
|
|
@@ -1067,7 +1314,7 @@ var SelectFilterTemplate = (options, isLanguagePtBr = true, items = []) => {
|
|
|
1067
1314
|
{ label: isLanguagePtBr ? "N\xE3o" : "No", value: false }
|
|
1068
1315
|
];
|
|
1069
1316
|
const currentValue = selectOptions.find((opt) => opt.value === options.value) || null;
|
|
1070
|
-
return /* @__PURE__ */
|
|
1317
|
+
return /* @__PURE__ */ jsx14(
|
|
1071
1318
|
Select,
|
|
1072
1319
|
{
|
|
1073
1320
|
options: selectOptions,
|
|
@@ -1126,7 +1373,7 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1126
1373
|
const currentMatchMode = rawFilter.matchMode ?? "contains";
|
|
1127
1374
|
const currentValue = typeof rawFilter.text === "string" ? rawFilter.text : "";
|
|
1128
1375
|
const isSpecial = currentMatchMode === customMatchModes.empty || currentMatchMode === customMatchModes.notEmpty;
|
|
1129
|
-
return /* @__PURE__ */
|
|
1376
|
+
return /* @__PURE__ */ jsxs10(
|
|
1130
1377
|
"div",
|
|
1131
1378
|
{
|
|
1132
1379
|
className: "filter-wrapper",
|
|
@@ -1137,7 +1384,7 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1137
1384
|
minWidth: "200px"
|
|
1138
1385
|
},
|
|
1139
1386
|
children: [
|
|
1140
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ jsx14(
|
|
1141
1388
|
Dropdown,
|
|
1142
1389
|
{
|
|
1143
1390
|
value: currentMatchMode,
|
|
@@ -1163,7 +1410,7 @@ var CustomFilterElement = (options, isLanguagePtBr = true, items) => {
|
|
|
1163
1410
|
}
|
|
1164
1411
|
}
|
|
1165
1412
|
),
|
|
1166
|
-
!isSpecial && /* @__PURE__ */
|
|
1413
|
+
!isSpecial && /* @__PURE__ */ jsx14(
|
|
1167
1414
|
InputText,
|
|
1168
1415
|
{
|
|
1169
1416
|
value: currentValue,
|
|
@@ -1582,8 +1829,10 @@ export {
|
|
|
1582
1829
|
DateTimeFilterTemplate,
|
|
1583
1830
|
FilterMatchMode5 as FilterMatchMode,
|
|
1584
1831
|
FilterOperator2 as FilterOperator,
|
|
1832
|
+
Input,
|
|
1585
1833
|
ModalBase,
|
|
1586
1834
|
SelectFilterTemplate,
|
|
1835
|
+
TextArea,
|
|
1587
1836
|
ValueFilterTemplate,
|
|
1588
1837
|
buildDynamicCampoFilters,
|
|
1589
1838
|
buildSortingWithFilters,
|