@arkyn/components 3.0.1-beta.140 → 3.0.1-beta.141
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/bundle.js +985 -968
- package/dist/components/checkbox/index.d.ts +5 -1
- package/dist/components/checkbox/index.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +6 -6
- package/dist/components/currencyInput/index.d.ts +5 -0
- package/dist/components/currencyInput/index.d.ts.map +1 -1
- package/dist/components/currencyInput/index.js +6 -5
- package/dist/components/imageUpload/index.d.ts +4 -0
- package/dist/components/imageUpload/index.d.ts.map +1 -1
- package/dist/components/imageUpload/index.js +5 -5
- package/dist/components/input/index.d.ts +4 -0
- package/dist/components/input/index.d.ts.map +1 -1
- package/dist/components/input/index.js +5 -5
- package/dist/components/multiSelect/index.d.ts +4 -0
- package/dist/components/multiSelect/index.d.ts.map +1 -1
- package/dist/components/multiSelect/index.js +5 -5
- package/dist/components/phoneInput/index.d.ts +48 -0
- package/dist/components/phoneInput/index.d.ts.map +1 -1
- package/dist/components/phoneInput/index.js +60 -16
- package/dist/components/radio/radioGroup/index.d.ts +4 -0
- package/dist/components/radio/radioGroup/index.d.ts.map +1 -1
- package/dist/components/radio/radioGroup/index.js +5 -5
- package/dist/components/richText/index.d.ts +2 -0
- package/dist/components/richText/index.d.ts.map +1 -1
- package/dist/components/richText/index.js +12 -12
- package/dist/components/select/index.d.ts +4 -0
- package/dist/components/select/index.d.ts.map +1 -1
- package/dist/components/select/index.js +5 -5
- package/dist/components/switch/index.d.ts +5 -1
- package/dist/components/switch/index.d.ts.map +1 -1
- package/dist/components/switch/index.js +6 -6
- package/dist/hooks/useAutomation.d.ts +29 -24
- package/dist/hooks/useAutomation.d.ts.map +1 -1
- package/dist/hooks/useAutomation.js +50 -38
- package/dist/services/fieldTemplate.d.ts +14 -0
- package/dist/services/fieldTemplate.d.ts.map +1 -0
- package/dist/services/fieldTemplate.js +11 -0
- package/dist/types/richTextTypes.d.ts +3 -0
- package/dist/types/richTextTypes.d.ts.map +1 -1
- package/package.json +3 -1
package/dist/bundle.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { Children as e, cloneElement as t, createContext as n, forwardRef as r, useCallback as i, useContext as a, useEffect as o, useId as s, useMemo as c, useRef as l, useState as u, useSyncExternalStore as d } from "react";
|
|
2
2
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
3
|
-
import { AlertTriangle as h, AlignCenter as g, AlignJustify as _, AlignLeft as v, AlignRight as y, Bold as b, Check as x, CheckCircle2 as S, ChevronDown as C, ChevronLeft as w, ChevronRight as T, Code as E, Ellipsis as D, File as O, FileArchive as k, FileAudio as A, FileImage as j, Heading1 as M, Heading2 as N, Image as P, Info as F, Italic as I, Loader2 as L, MapPinned as R, Pause as z, Play as B, Quote as V, RefreshCw as H, Search as U, Underline as W, Video as G, X as
|
|
4
|
-
import { findCountryMask as
|
|
5
|
-
import { AnimatePresence as
|
|
6
|
-
import
|
|
7
|
-
import { createRoot as
|
|
8
|
-
import { InputMask as
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import
|
|
3
|
+
import { AlertTriangle as h, AlignCenter as g, AlignJustify as _, AlignLeft as v, AlignRight as y, Bold as b, Check as x, CheckCircle2 as S, ChevronDown as C, ChevronLeft as w, ChevronRight as T, Code as E, Ellipsis as D, File as O, FileArchive as k, FileAudio as A, FileImage as j, Heading1 as M, Heading2 as N, Image as P, Info as F, Italic as I, Loader2 as L, MapPinned as R, Pause as z, Play as B, Quote as V, RefreshCw as H, Search as U, Underline as W, Video as G, X as K, XCircle as q } from "lucide-react";
|
|
4
|
+
import { findCountryMask as ee, formatToCapitalizeFirstWordLetter as te, formatToCurrency as J, formatToPhone as ne, removeNonNumeric as re } from "@arkyn/shared";
|
|
5
|
+
import { AnimatePresence as Y, motion as X } from "framer-motion";
|
|
6
|
+
import ie from "mapbox-gl";
|
|
7
|
+
import { createRoot as ae } from "react-dom/client";
|
|
8
|
+
import { InputMask as oe } from "@react-input/mask";
|
|
9
|
+
import { FieldTemplate as se } from "@components/services/fieldTemplate";
|
|
10
|
+
import { countries as ce } from "@arkyn/templates";
|
|
11
|
+
import le from "is-hotkey";
|
|
12
|
+
import { Editor as ue, Element as de, Node as fe, Text as pe, Transforms as me, createEditor as he } from "slate";
|
|
13
|
+
import { withHistory as ge } from "slate-history";
|
|
14
|
+
import { Editable as _e, Slate as ve, useSlate as ye, withReact as be } from "slate-react";
|
|
15
|
+
import { StandaloneSearchBox as xe, useLoadScript as Se } from "@react-google-maps/api";
|
|
16
|
+
import { scroller as Ce } from "react-scroll";
|
|
17
|
+
import we, { Toaster as Te } from "react-hot-toast";
|
|
18
|
+
import Ee from "html-react-parser";
|
|
17
19
|
//#region src/components/alert/alertTitle/index.tsx
|
|
18
|
-
function
|
|
20
|
+
function De(e) {
|
|
19
21
|
let { className: t, ...n } = e;
|
|
20
22
|
return /* @__PURE__ */ p("div", {
|
|
21
23
|
className: `arkynAlertTitle ${t}`.trim(),
|
|
@@ -24,18 +26,18 @@ function Oe(e) {
|
|
|
24
26
|
}
|
|
25
27
|
//#endregion
|
|
26
28
|
//#region src/components/alert/alertContainer/index.tsx
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return a(
|
|
29
|
+
var Oe = n({});
|
|
30
|
+
function ke() {
|
|
31
|
+
return a(Oe);
|
|
30
32
|
}
|
|
31
|
-
function
|
|
33
|
+
function Ae(e) {
|
|
32
34
|
let { schema: t, children: n, className: r, ...i } = e, a = `arkynAlertContainer ${t} ${((e) => {
|
|
33
35
|
let t = !1, n = (e) => {
|
|
34
|
-
Array.isArray(e) ? e.forEach(n) : e && typeof e == "object" && "type" in e && (e.type ===
|
|
36
|
+
Array.isArray(e) ? e.forEach(n) : e && typeof e == "object" && "type" in e && (e.type === De ? t = !0 : e.props && typeof e.props == "object" && e.props !== null && "children" in e.props && n(e.props.children));
|
|
35
37
|
};
|
|
36
38
|
return n(e), t;
|
|
37
39
|
})(n) ? "existsAlertTitle" : "nonExistsAlertTitle"} ${r}`;
|
|
38
|
-
return /* @__PURE__ */ p(
|
|
40
|
+
return /* @__PURE__ */ p(Oe.Provider, {
|
|
39
41
|
value: e,
|
|
40
42
|
children: /* @__PURE__ */ p("div", {
|
|
41
43
|
className: a.trim(),
|
|
@@ -46,7 +48,7 @@ function je(e) {
|
|
|
46
48
|
}
|
|
47
49
|
//#endregion
|
|
48
50
|
//#region src/components/alert/alertContent/index.tsx
|
|
49
|
-
function
|
|
51
|
+
function je(e) {
|
|
50
52
|
let { className: t, ...n } = e;
|
|
51
53
|
return /* @__PURE__ */ p("div", {
|
|
52
54
|
className: `arkynAlertContent ${t}`.trim(),
|
|
@@ -55,7 +57,7 @@ function Me(e) {
|
|
|
55
57
|
}
|
|
56
58
|
//#endregion
|
|
57
59
|
//#region src/components/alert/alertDescription/index.tsx
|
|
58
|
-
function
|
|
60
|
+
function Me(e) {
|
|
59
61
|
let { className: t, ...n } = e;
|
|
60
62
|
return /* @__PURE__ */ p("div", {
|
|
61
63
|
className: `arkynAlertDescription ${t}`.trim(),
|
|
@@ -64,14 +66,14 @@ function Ne(e) {
|
|
|
64
66
|
}
|
|
65
67
|
//#endregion
|
|
66
68
|
//#region src/components/alert/alertIcon/index.tsx
|
|
67
|
-
function
|
|
68
|
-
let { className: t, ...n } = e, { schema: r } =
|
|
69
|
+
function Ne(e) {
|
|
70
|
+
let { className: t, ...n } = e, { schema: r } = ke(), i = `arkynAlertIcon ${r} ${t}`;
|
|
69
71
|
switch (r) {
|
|
70
72
|
case "success": return /* @__PURE__ */ p(S, {
|
|
71
73
|
className: i,
|
|
72
74
|
...n
|
|
73
75
|
});
|
|
74
|
-
case "danger": return /* @__PURE__ */ p(
|
|
76
|
+
case "danger": return /* @__PURE__ */ p(q, {
|
|
75
77
|
className: i,
|
|
76
78
|
...n
|
|
77
79
|
});
|
|
@@ -87,7 +89,7 @@ function Pe(e) {
|
|
|
87
89
|
}
|
|
88
90
|
//#endregion
|
|
89
91
|
//#region src/hooks/useSlider.ts
|
|
90
|
-
function
|
|
92
|
+
function Pe(e) {
|
|
91
93
|
function t() {
|
|
92
94
|
return !e || e <= 0 ? 0 : e >= 100 ? 100 : e;
|
|
93
95
|
}
|
|
@@ -99,7 +101,7 @@ function Fe(e) {
|
|
|
99
101
|
}
|
|
100
102
|
//#endregion
|
|
101
103
|
//#region src/components/slider/index.tsx
|
|
102
|
-
function
|
|
104
|
+
function Fe(e) {
|
|
103
105
|
let { onChange: t, value: n, disabled: r = !1, onDragging: i, className: a = "", ...s } = e, [c, d] = u(!1), f = l(null), h = () => d(!0), g = () => d(!1), _ = (e) => {
|
|
104
106
|
if (r || !c || !f.current) return;
|
|
105
107
|
let n = f.current.getBoundingClientRect(), i = e.clientX - n.left;
|
|
@@ -130,8 +132,8 @@ function Ie(e) {
|
|
|
130
132
|
}
|
|
131
133
|
//#endregion
|
|
132
134
|
//#region src/components/audioPlayer/index.tsx
|
|
133
|
-
function
|
|
134
|
-
let { onPlayAudio: t, onPauseAudio: n, disabled: r, style: i, ...a } = e, [s, c] =
|
|
135
|
+
function Ie(e) {
|
|
136
|
+
let { onPlayAudio: t, onPauseAudio: n, disabled: r, style: i, ...a } = e, [s, c] = Pe(0), [d, f] = u(!1), [h, g] = u(!1), _ = l(null), v = _.current?.currentTime || 0, y = _.current?.duration || 0, b = C(v), x = C(y), S = {
|
|
135
137
|
totalTime: y,
|
|
136
138
|
currentTime: v,
|
|
137
139
|
formattedCurrentTime: b,
|
|
@@ -186,7 +188,7 @@ function Le(e) {
|
|
|
186
188
|
children: [d && /* @__PURE__ */ p(z, {}), !d && /* @__PURE__ */ p(B, {})]
|
|
187
189
|
}),
|
|
188
190
|
/* @__PURE__ */ p("p", { children: b }),
|
|
189
|
-
/* @__PURE__ */ p(
|
|
191
|
+
/* @__PURE__ */ p(Fe, {
|
|
190
192
|
value: s,
|
|
191
193
|
onChange: D,
|
|
192
194
|
onDragging: g,
|
|
@@ -198,22 +200,22 @@ function Le(e) {
|
|
|
198
200
|
}
|
|
199
201
|
//#endregion
|
|
200
202
|
//#region src/providers/formProvider.tsx
|
|
201
|
-
var
|
|
202
|
-
function
|
|
203
|
+
var Le = n({});
|
|
204
|
+
function Re(e) {
|
|
203
205
|
let { children: n, fieldErrors: r, form: i } = e;
|
|
204
|
-
return /* @__PURE__ */ m(
|
|
206
|
+
return /* @__PURE__ */ m(Le.Provider, {
|
|
205
207
|
value: { fieldErrors: r },
|
|
206
208
|
children: [!i && n, i && t(i, i.props, n)]
|
|
207
209
|
});
|
|
208
210
|
}
|
|
209
211
|
//#endregion
|
|
210
212
|
//#region src/hooks/useForm.ts
|
|
211
|
-
function
|
|
212
|
-
return a(
|
|
213
|
+
function Z() {
|
|
214
|
+
return a(Le);
|
|
213
215
|
}
|
|
214
216
|
//#endregion
|
|
215
217
|
//#region src/components/fieldError/index.tsx
|
|
216
|
-
function
|
|
218
|
+
function ze(e) {
|
|
217
219
|
let { children: t, className: n, ...r } = e, i = `arkynFieldError ${n}`;
|
|
218
220
|
return t ? /* @__PURE__ */ p("strong", {
|
|
219
221
|
className: i.trim(),
|
|
@@ -223,7 +225,7 @@ function Y(e) {
|
|
|
223
225
|
}
|
|
224
226
|
//#endregion
|
|
225
227
|
//#region src/components/fieldLabel/index.tsx
|
|
226
|
-
function
|
|
228
|
+
function Be(e) {
|
|
227
229
|
let { showAsterisk: t = !1, className: n = "", ...r } = e;
|
|
228
230
|
return /* @__PURE__ */ p("label", {
|
|
229
231
|
className: `arkynFieldLabel ${t ? "asteriskTrue" : "asteriskFalse"} ${n}`.trim(),
|
|
@@ -232,7 +234,7 @@ function X(e) {
|
|
|
232
234
|
}
|
|
233
235
|
//#endregion
|
|
234
236
|
//#region src/components/fieldWrapper/index.tsx
|
|
235
|
-
function
|
|
237
|
+
function Ve(e) {
|
|
236
238
|
let { children: t, className: n, orientation: r = "vertical", ...i } = e;
|
|
237
239
|
return /* @__PURE__ */ p("section", {
|
|
238
240
|
className: `arkynFieldWrapper ${n} ${r}`.trim(),
|
|
@@ -290,7 +292,7 @@ function $(e) {
|
|
|
290
292
|
}
|
|
291
293
|
//#endregion
|
|
292
294
|
//#region src/components/divider/index.tsx
|
|
293
|
-
function
|
|
295
|
+
function He(e) {
|
|
294
296
|
let { className: t, orientation: n = "horizontal", ...r } = e;
|
|
295
297
|
return /* @__PURE__ */ p("div", {
|
|
296
298
|
className: `arkynDivider ${n} ${t}`.trim(),
|
|
@@ -299,7 +301,7 @@ function Be(e) {
|
|
|
299
301
|
}
|
|
300
302
|
//#endregion
|
|
301
303
|
//#region src/components/iconButton/index.tsx
|
|
302
|
-
function
|
|
304
|
+
function Ue(e) {
|
|
303
305
|
let { isLoading: t = !1, scheme: n = "primary", variant: r = "solid", size: i = "md", icon: a, disabled: o, className: s = "", ...c } = e, l = {
|
|
304
306
|
xs: 12,
|
|
305
307
|
sm: 16,
|
|
@@ -327,7 +329,7 @@ function Ve(e) {
|
|
|
327
329
|
}
|
|
328
330
|
//#endregion
|
|
329
331
|
//#region src/components/tooltip/index.tsx
|
|
330
|
-
function
|
|
332
|
+
function We(e) {
|
|
331
333
|
let { text: t, size: n = "lg", children: r, orientation: i = "top", className: a = "", ...c } = e, d = s(), f = l(null), [h, g] = u(i);
|
|
332
334
|
return o(() => {
|
|
333
335
|
let e = () => {
|
|
@@ -358,7 +360,7 @@ function He(e) {
|
|
|
358
360
|
}
|
|
359
361
|
//#endregion
|
|
360
362
|
//#region src/components/audioUpload/hasFileContent/index.tsx
|
|
361
|
-
function
|
|
363
|
+
function Ge(e) {
|
|
362
364
|
let { filePath: t, disabled: n, acceptAudio: r, handleSelectFile: i, isLoading: a, reSendAudio: o, changeAudioButtonText: s } = e;
|
|
363
365
|
function c() {
|
|
364
366
|
if (n) return;
|
|
@@ -371,14 +373,14 @@ function Ue(e) {
|
|
|
371
373
|
return /* @__PURE__ */ m("div", {
|
|
372
374
|
className: "arkynAudioUploadHasFileContentContainer",
|
|
373
375
|
children: [
|
|
374
|
-
/* @__PURE__ */ p(
|
|
375
|
-
/* @__PURE__ */ p(
|
|
376
|
+
/* @__PURE__ */ p(Ie, { src: t }),
|
|
377
|
+
/* @__PURE__ */ p(He, {}),
|
|
376
378
|
/* @__PURE__ */ m("div", {
|
|
377
379
|
className: "arkynAudioUploadButtonsContainer",
|
|
378
|
-
children: [!!o && /* @__PURE__ */ p(
|
|
380
|
+
children: [!!o && /* @__PURE__ */ p(We, {
|
|
379
381
|
orientation: "bottom",
|
|
380
382
|
text: "Reenviar áudio",
|
|
381
|
-
children: /* @__PURE__ */ p(
|
|
383
|
+
children: /* @__PURE__ */ p(Ue, {
|
|
382
384
|
type: "button",
|
|
383
385
|
"aria-label": "resend image",
|
|
384
386
|
variant: "outline",
|
|
@@ -404,7 +406,7 @@ function Ue(e) {
|
|
|
404
406
|
}
|
|
405
407
|
//#endregion
|
|
406
408
|
//#region src/components/audioUpload/noFileContent/index.tsx
|
|
407
|
-
function
|
|
409
|
+
function Ke(e) {
|
|
408
410
|
let { dropAudioText: t, isLoading: n, acceptAudio: r, handleSelectFile: i, selectAudioButtonText: a, disabled: o } = e;
|
|
409
411
|
function s(e) {
|
|
410
412
|
if (o) return;
|
|
@@ -436,8 +438,8 @@ function We(e) {
|
|
|
436
438
|
}
|
|
437
439
|
//#endregion
|
|
438
440
|
//#region src/components/audioUpload/index.tsx
|
|
439
|
-
function
|
|
440
|
-
let { name: t, label: n, fileName: r = "file", method: i = "POST", onChange: a, fileResponseName: o = "url", selectAudioButtonText: s = "Selecionar arquivo de áudio", dropAudioText: c = "Ou arraste e solte um arquivo de áudio aqui", changeAudioButtonText: l = "Trocar arquivo de áudio", acceptAudio: d = "audio/*", action: f, defaultValue: h = "", showAsterisk: g = !1, disabled: _ = !1 } = e, { fieldErrors: v } =
|
|
441
|
+
function qe(e) {
|
|
442
|
+
let { name: t, label: n, fileName: r = "file", method: i = "POST", onChange: a, fileResponseName: o = "url", selectAudioButtonText: s = "Selecionar arquivo de áudio", dropAudioText: c = "Ou arraste e solte um arquivo de áudio aqui", changeAudioButtonText: l = "Trocar arquivo de áudio", acceptAudio: d = "audio/*", action: f, defaultValue: h = "", showAsterisk: g = !1, disabled: _ = !1 } = e, { fieldErrors: v } = Z(), y = v?.[t], [b, x] = u(h), [S, C] = u(""), [w, T] = u(null), [E, D] = u(h), [O, k] = u(!1);
|
|
441
443
|
async function A(e) {
|
|
442
444
|
if (_) return;
|
|
443
445
|
k(!0), T(e), C("");
|
|
@@ -461,8 +463,8 @@ function Ge(e) {
|
|
|
461
463
|
}
|
|
462
464
|
}
|
|
463
465
|
let M = y || S;
|
|
464
|
-
return /* @__PURE__ */ m(
|
|
465
|
-
n && /* @__PURE__ */ p(
|
|
466
|
+
return /* @__PURE__ */ m(Ve, { children: [
|
|
467
|
+
n && /* @__PURE__ */ p(Be, {
|
|
466
468
|
showAsterisk: g,
|
|
467
469
|
children: n
|
|
468
470
|
}),
|
|
@@ -474,7 +476,7 @@ function Ge(e) {
|
|
|
474
476
|
name: t,
|
|
475
477
|
value: b || ""
|
|
476
478
|
}),
|
|
477
|
-
!E && /* @__PURE__ */ p(
|
|
479
|
+
!E && /* @__PURE__ */ p(Ke, {
|
|
478
480
|
disabled: _,
|
|
479
481
|
isLoading: O,
|
|
480
482
|
acceptAudio: d,
|
|
@@ -482,7 +484,7 @@ function Ge(e) {
|
|
|
482
484
|
handleSelectFile: j,
|
|
483
485
|
selectAudioButtonText: s
|
|
484
486
|
}),
|
|
485
|
-
E && /* @__PURE__ */ p(
|
|
487
|
+
E && /* @__PURE__ */ p(Ge, {
|
|
486
488
|
filePath: E,
|
|
487
489
|
acceptAudio: d,
|
|
488
490
|
changeAudioButtonText: l,
|
|
@@ -493,12 +495,12 @@ function Ge(e) {
|
|
|
493
495
|
})
|
|
494
496
|
]
|
|
495
497
|
}),
|
|
496
|
-
M && /* @__PURE__ */ p(
|
|
498
|
+
M && /* @__PURE__ */ p(ze, { children: M })
|
|
497
499
|
] });
|
|
498
500
|
}
|
|
499
501
|
//#endregion
|
|
500
502
|
//#region src/components/badge/index.tsx
|
|
501
|
-
function
|
|
503
|
+
function Je(e) {
|
|
502
504
|
let { variant: t = "ghost", scheme: n = "primary", size: r = "lg", leftIcon: i, rightIcon: a, className: o = "", children: s, ...c } = e, l = {
|
|
503
505
|
md: 12,
|
|
504
506
|
lg: 14
|
|
@@ -521,7 +523,7 @@ function Ke(e) {
|
|
|
521
523
|
}
|
|
522
524
|
//#endregion
|
|
523
525
|
//#region src/components/calendar/_viewService.ts
|
|
524
|
-
var
|
|
526
|
+
var Ye = class {
|
|
525
527
|
currentDay(e) {
|
|
526
528
|
return String(e.getDate()).padStart(2, "0");
|
|
527
529
|
}
|
|
@@ -532,7 +534,7 @@ var qe = class {
|
|
|
532
534
|
return String(e.getFullYear());
|
|
533
535
|
}
|
|
534
536
|
capitalize(e) {
|
|
535
|
-
return
|
|
537
|
+
return te(e);
|
|
536
538
|
}
|
|
537
539
|
parseDayType(e, t, n, r) {
|
|
538
540
|
let i = r[0].getDate(), a = r[0].getMonth(), o = r[0].getFullYear(), s = r[1].getDate(), c = r[1].getMonth(), l = r[1].getFullYear(), u = new Date(o, a, i), d = new Date(l, c, s), f = new Date(n, t, e);
|
|
@@ -649,12 +651,12 @@ var qe = class {
|
|
|
649
651
|
let n = new Date(e);
|
|
650
652
|
n.setDate(1), n.setMonth(n.getMonth() - 1), t(n);
|
|
651
653
|
}
|
|
652
|
-
},
|
|
653
|
-
function
|
|
654
|
-
return a(
|
|
654
|
+
}, Xe = n({});
|
|
655
|
+
function Ze() {
|
|
656
|
+
return a(Xe);
|
|
655
657
|
}
|
|
656
|
-
function
|
|
657
|
-
let t = e.language || "pt-BR", n = e.calendarType === "single" ? [e.defaultValue || /* @__PURE__ */ new Date(), e.defaultValue || /* @__PURE__ */ new Date()] : e.defaultValue || [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()], [r, i] = u(/* @__PURE__ */ new Date()), [a, o] = u(n), s = new
|
|
658
|
+
function Qe(e) {
|
|
659
|
+
let t = e.language || "pt-BR", n = e.calendarType === "single" ? [e.defaultValue || /* @__PURE__ */ new Date(), e.defaultValue || /* @__PURE__ */ new Date()] : e.defaultValue || [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()], [r, i] = u(/* @__PURE__ */ new Date()), [a, o] = u(n), s = new Ye();
|
|
658
660
|
function c(t) {
|
|
659
661
|
let n = [new Date(t[0]), new Date(t[1])];
|
|
660
662
|
e.onChange && e.calendarType === "range" && e.onChange(n), e.onChange && e.calendarType === "single" && e.onChange(n[0]), o(n);
|
|
@@ -662,7 +664,7 @@ function Xe(e) {
|
|
|
662
664
|
function l(t) {
|
|
663
665
|
e.onChangeView && e.onChangeView(t), i(t);
|
|
664
666
|
}
|
|
665
|
-
return /* @__PURE__ */ p(
|
|
667
|
+
return /* @__PURE__ */ p(Xe.Provider, {
|
|
666
668
|
value: {
|
|
667
669
|
valueDate: a,
|
|
668
670
|
viewDate: r,
|
|
@@ -685,15 +687,33 @@ function Xe(e) {
|
|
|
685
687
|
}
|
|
686
688
|
//#endregion
|
|
687
689
|
//#region src/components/calendar/calendarContainer/index.tsx
|
|
688
|
-
function
|
|
690
|
+
function $e({ children: e }) {
|
|
689
691
|
return /* @__PURE__ */ p("div", {
|
|
690
692
|
className: "arkynCalendarContainer",
|
|
691
693
|
children: e
|
|
692
694
|
});
|
|
693
695
|
}
|
|
694
696
|
//#endregion
|
|
697
|
+
//#region src/services/fieldTemplate.tsx
|
|
698
|
+
function et(e) {
|
|
699
|
+
let { name: t, label: n, showAsterisk: r, className: i, unShowFieldTemplate: a, errorMessage: o, children: s, orientation: c } = e;
|
|
700
|
+
return a ? s : /* @__PURE__ */ m(Ve, {
|
|
701
|
+
id: t,
|
|
702
|
+
className: i,
|
|
703
|
+
orientation: c,
|
|
704
|
+
children: [
|
|
705
|
+
n && /* @__PURE__ */ p(Be, {
|
|
706
|
+
showAsterisk: r,
|
|
707
|
+
children: n
|
|
708
|
+
}),
|
|
709
|
+
s,
|
|
710
|
+
o && /* @__PURE__ */ p(ze, { children: o })
|
|
711
|
+
]
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
//#endregion
|
|
695
715
|
//#region src/components/select/selectChevron/index.tsx
|
|
696
|
-
function
|
|
716
|
+
function tt(e) {
|
|
697
717
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
698
718
|
return n ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(C, {
|
|
699
719
|
className: `arkynSelectChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -708,7 +728,7 @@ function Qe(e) {
|
|
|
708
728
|
}
|
|
709
729
|
//#endregion
|
|
710
730
|
//#region src/components/select/selectContainer/index.tsx
|
|
711
|
-
function
|
|
731
|
+
function nt(e) {
|
|
712
732
|
let { children: t, handleContainerFocus: n, disabled: r, isError: i, isLoading: a, isFocused: o, className: s, readOnly: c, variant: l, size: u, id: d, prefixExists: f } = e;
|
|
713
733
|
return /* @__PURE__ */ p("section", {
|
|
714
734
|
id: d,
|
|
@@ -719,7 +739,7 @@ function $e(e) {
|
|
|
719
739
|
}
|
|
720
740
|
//#endregion
|
|
721
741
|
//#region src/components/select/selectContent/index.tsx
|
|
722
|
-
function
|
|
742
|
+
function rt(e) {
|
|
723
743
|
let { children: t, size: n } = e;
|
|
724
744
|
return /* @__PURE__ */ p("div", {
|
|
725
745
|
className: `arkynSelectContent ${n}`,
|
|
@@ -728,7 +748,7 @@ function et(e) {
|
|
|
728
748
|
}
|
|
729
749
|
//#endregion
|
|
730
750
|
//#region src/components/select/selectOption/index.tsx
|
|
731
|
-
function
|
|
751
|
+
function it(e) {
|
|
732
752
|
let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a } = e;
|
|
733
753
|
return /* @__PURE__ */ m("div", {
|
|
734
754
|
onClick: () => r(i),
|
|
@@ -742,13 +762,13 @@ function tt(e) {
|
|
|
742
762
|
}
|
|
743
763
|
//#endregion
|
|
744
764
|
//#region src/hooks/useScrollLock.ts
|
|
745
|
-
function
|
|
765
|
+
function at() {
|
|
746
766
|
return typeof window > "u" ? 0 : window.innerWidth - document.documentElement.clientWidth;
|
|
747
767
|
}
|
|
748
|
-
function
|
|
768
|
+
function ot(e) {
|
|
749
769
|
o(() => {
|
|
750
770
|
if (e) {
|
|
751
|
-
let e = document.body.style.overflow, t = document.body.style.paddingRight, n =
|
|
771
|
+
let e = document.body.style.overflow, t = document.body.style.paddingRight, n = at();
|
|
752
772
|
if (n > 0) {
|
|
753
773
|
let e = window.getComputedStyle(document.body), t = parseInt(e.paddingRight) || 0;
|
|
754
774
|
document.body.style.paddingRight = `${t + n}px`;
|
|
@@ -761,98 +781,94 @@ function rt(e) {
|
|
|
761
781
|
}
|
|
762
782
|
//#endregion
|
|
763
783
|
//#region src/components/input/index.tsx
|
|
764
|
-
function
|
|
765
|
-
let { name: t, disabled: n, title: r, style: i, variant: a = "solid", label: o, className: c = "", prefix: d, suffix: f, isLoading: h = !1, leftIcon: g, readOnly: _, onFocus: v, onBlur: y,
|
|
784
|
+
function st(e) {
|
|
785
|
+
let { name: t, disabled: n, title: r, style: i, variant: a = "solid", label: o, className: c = "", prefix: d, suffix: f, isLoading: h = !1, leftIcon: g, readOnly: _, onFocus: v, onBlur: y, unShowFieldTemplate: b = !1, errorMessage: x, showAsterisk: S, rightIcon: C, type: w = "text", size: T = "md", id: E, value: D, placeholder: O, orientation: k, ...A } = e, { fieldErrors: j } = Z(), [M, N] = u(!1), P = l(null), F = E || s(), I = x || j?.[t], R = !!I, z = n || h, B = {
|
|
766
786
|
md: 20,
|
|
767
787
|
lg: 20
|
|
768
|
-
}[
|
|
769
|
-
function
|
|
770
|
-
|
|
788
|
+
}[T], V = C ? "right" : "left", H = V === "left" && h, U = V === "right" && h;
|
|
789
|
+
function W() {
|
|
790
|
+
z || !P?.current || (N(!0), P.current.focus());
|
|
771
791
|
}
|
|
772
|
-
function
|
|
773
|
-
|
|
792
|
+
function G(e) {
|
|
793
|
+
N(!0), v && v(e);
|
|
774
794
|
}
|
|
775
|
-
function
|
|
776
|
-
|
|
795
|
+
function K(e) {
|
|
796
|
+
N(!1), y && y(e);
|
|
777
797
|
}
|
|
778
|
-
|
|
798
|
+
return w === "hidden" ? /* @__PURE__ */ p("input", {
|
|
779
799
|
style: { display: "none" },
|
|
780
800
|
readOnly: !0,
|
|
781
801
|
type: "text",
|
|
782
|
-
ref:
|
|
783
|
-
...
|
|
784
|
-
})
|
|
785
|
-
|
|
786
|
-
|
|
802
|
+
ref: P,
|
|
803
|
+
...A
|
|
804
|
+
}) : /* @__PURE__ */ p(et, {
|
|
805
|
+
name: t,
|
|
806
|
+
label: o,
|
|
807
|
+
showAsterisk: S,
|
|
787
808
|
className: c,
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
})
|
|
845
|
-
]
|
|
846
|
-
}),
|
|
847
|
-
P && /* @__PURE__ */ p(Y, { children: P })
|
|
848
|
-
]
|
|
809
|
+
errorMessage: I,
|
|
810
|
+
unShowFieldTemplate: b,
|
|
811
|
+
orientation: k,
|
|
812
|
+
children: /* @__PURE__ */ m("section", {
|
|
813
|
+
title: r,
|
|
814
|
+
style: i,
|
|
815
|
+
onClick: W,
|
|
816
|
+
className: `arkynInput ${d ? "hasPrefix" : ""} ${n ? "disabled" : ""} ${f ? "hasSuffix" : ""} ${a} ${T} ${z || _ || h ? "opacity" : ""} ${R ? "errored" : ""} ${M ? "focused" : ""}`,
|
|
817
|
+
children: [
|
|
818
|
+
/* @__PURE__ */ p(Q, {
|
|
819
|
+
iconSize: B,
|
|
820
|
+
icon: d,
|
|
821
|
+
className: "prefix"
|
|
822
|
+
}),
|
|
823
|
+
/* @__PURE__ */ p(Q, {
|
|
824
|
+
show: H,
|
|
825
|
+
iconSize: B,
|
|
826
|
+
className: "spinner",
|
|
827
|
+
icon: L
|
|
828
|
+
}),
|
|
829
|
+
/* @__PURE__ */ p(Q, {
|
|
830
|
+
show: !h,
|
|
831
|
+
icon: g,
|
|
832
|
+
iconSize: B
|
|
833
|
+
}),
|
|
834
|
+
/* @__PURE__ */ p("input", {
|
|
835
|
+
disabled: z,
|
|
836
|
+
readOnly: _,
|
|
837
|
+
ref: P,
|
|
838
|
+
onFocus: G,
|
|
839
|
+
onBlur: K,
|
|
840
|
+
type: w,
|
|
841
|
+
id: F,
|
|
842
|
+
name: t,
|
|
843
|
+
placeholder: z && D || O,
|
|
844
|
+
value: z ? void 0 : D,
|
|
845
|
+
...A
|
|
846
|
+
}),
|
|
847
|
+
/* @__PURE__ */ p(Q, {
|
|
848
|
+
show: !h,
|
|
849
|
+
icon: C,
|
|
850
|
+
iconSize: B
|
|
851
|
+
}),
|
|
852
|
+
/* @__PURE__ */ p(Q, {
|
|
853
|
+
show: U,
|
|
854
|
+
iconSize: B,
|
|
855
|
+
className: "spinner",
|
|
856
|
+
icon: L
|
|
857
|
+
}),
|
|
858
|
+
/* @__PURE__ */ p(Q, {
|
|
859
|
+
iconSize: B,
|
|
860
|
+
icon: f,
|
|
861
|
+
className: "suffix"
|
|
862
|
+
})
|
|
863
|
+
]
|
|
864
|
+
})
|
|
849
865
|
});
|
|
850
866
|
}
|
|
851
867
|
//#endregion
|
|
852
868
|
//#region src/components/select/selectOptionsContainer/index.tsx
|
|
853
|
-
function
|
|
869
|
+
function ct(e) {
|
|
854
870
|
let { children: t, isFocused: n, isSearchable: r, search: i, onSearch: a } = e, s = l(null), [c, d] = u("bottom");
|
|
855
|
-
|
|
871
|
+
ot(n), o(() => {
|
|
856
872
|
n && (() => {
|
|
857
873
|
if (!s.current) return;
|
|
858
874
|
let e = s.current.parentElement;
|
|
@@ -867,7 +883,7 @@ function at(e) {
|
|
|
867
883
|
return n ? /* @__PURE__ */ m("div", {
|
|
868
884
|
ref: s,
|
|
869
885
|
className: `arkynSelectOptionsContainer ${c}`,
|
|
870
|
-
children: [r && /* @__PURE__ */ p(
|
|
886
|
+
children: [r && /* @__PURE__ */ p(st, {
|
|
871
887
|
type: "search",
|
|
872
888
|
name: "search-select",
|
|
873
889
|
variant: "underline",
|
|
@@ -879,7 +895,7 @@ function at(e) {
|
|
|
879
895
|
}
|
|
880
896
|
//#endregion
|
|
881
897
|
//#region src/components/select/selectOverlay/index.tsx
|
|
882
|
-
function
|
|
898
|
+
function lt(e) {
|
|
883
899
|
let { isFocused: t, handleBlur: n } = e;
|
|
884
900
|
return t ? /* @__PURE__ */ p("aside", {
|
|
885
901
|
className: "arkynSelectOverlay",
|
|
@@ -888,7 +904,7 @@ function ot(e) {
|
|
|
888
904
|
}
|
|
889
905
|
//#endregion
|
|
890
906
|
//#region src/components/select/selectSpinner/index.tsx
|
|
891
|
-
function
|
|
907
|
+
function ut(e) {
|
|
892
908
|
let { iconSize: t, isLoading: n } = e;
|
|
893
909
|
return n ? /* @__PURE__ */ p(L, {
|
|
894
910
|
className: "arkynSelectSpinner",
|
|
@@ -898,109 +914,108 @@ function st(e) {
|
|
|
898
914
|
}
|
|
899
915
|
//#endregion
|
|
900
916
|
//#region src/components/select/index.tsx
|
|
901
|
-
function
|
|
902
|
-
let { name: t, options: n, className: r = "", placeholder: i = "Selecione...", closeOnSelect: a = !0, defaultValue: o = "", errorMessage: c, isLoading: d = !1, readOnly: f = !1, isSearchable: h = !1, id: g, label: _, optionMaxHeight: v, showAsterisk: y, leftIcon: b, onSearch: x, onChange: S, onBlur: C, notFoundText: w = "Sem opções disponíveis", onFocus: T, disabled: E = !1, prefix: D, size: O = "md", value: k, variant: A = "solid" } = e, { fieldErrors:
|
|
917
|
+
function dt(e) {
|
|
918
|
+
let { name: t, options: n, className: r = "", placeholder: i = "Selecione...", closeOnSelect: a = !0, defaultValue: o = "", errorMessage: c, isLoading: d = !1, readOnly: f = !1, isSearchable: h = !1, id: g, label: _, optionMaxHeight: v, showAsterisk: y, leftIcon: b, onSearch: x, onChange: S, onBlur: C, notFoundText: w = "Sem opções disponíveis", onFocus: T, disabled: E = !1, prefix: D, size: O = "md", value: k, variant: A = "solid", orientation: j = "horizontal", unShowFieldTemplate: M = !1 } = e, { fieldErrors: N } = Z(), P = l(null), F = g || s(), I = c || N?.[t], L = !!I, R = E || d || f, z = {
|
|
903
919
|
md: 20,
|
|
904
920
|
lg: 20
|
|
905
|
-
}[O], [
|
|
906
|
-
function
|
|
907
|
-
return
|
|
921
|
+
}[O], [B, V] = u(""), [H, U] = u(!1), [W, G] = u(o), K = k || W;
|
|
922
|
+
function q(e) {
|
|
923
|
+
return K === e;
|
|
908
924
|
}
|
|
909
925
|
function ee(e) {
|
|
910
926
|
return n.find((t) => t.value === e)?.label || "";
|
|
911
927
|
}
|
|
912
928
|
function te() {
|
|
913
|
-
|
|
929
|
+
R || !P?.current || H || (U(!0), P.current.focus(), T && T());
|
|
914
930
|
}
|
|
915
|
-
function
|
|
916
|
-
|
|
931
|
+
function J() {
|
|
932
|
+
U(!1), C && P.current && P.current.blur();
|
|
917
933
|
}
|
|
918
|
-
function
|
|
919
|
-
|
|
934
|
+
function ne(e) {
|
|
935
|
+
V(e), x && x(e);
|
|
920
936
|
}
|
|
921
|
-
function
|
|
922
|
-
|
|
937
|
+
function re(e) {
|
|
938
|
+
q(e) ? (G(""), S && S("")) : (G(e), S && S(e)), a && J();
|
|
923
939
|
}
|
|
924
|
-
let
|
|
925
|
-
return /* @__PURE__ */
|
|
940
|
+
let Y = n.filter((t) => !!(e.onSearch || !e.isSearchable || t.label.toLowerCase().includes(B.toLowerCase())));
|
|
941
|
+
return /* @__PURE__ */ p(et, {
|
|
942
|
+
name: t,
|
|
943
|
+
label: _,
|
|
944
|
+
showAsterisk: y,
|
|
926
945
|
className: r,
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
/* @__PURE__ */
|
|
946
|
+
errorMessage: I,
|
|
947
|
+
unShowFieldTemplate: M,
|
|
948
|
+
orientation: j,
|
|
949
|
+
children: /* @__PURE__ */ m(nt, {
|
|
950
|
+
handleContainerFocus: te,
|
|
951
|
+
disabled: R,
|
|
952
|
+
isError: L,
|
|
953
|
+
isFocused: H,
|
|
954
|
+
isLoading: d,
|
|
955
|
+
readOnly: f,
|
|
956
|
+
size: O,
|
|
957
|
+
variant: A,
|
|
958
|
+
prefixExists: !!D,
|
|
959
|
+
id: F,
|
|
960
|
+
children: [
|
|
961
|
+
/* @__PURE__ */ p("input", {
|
|
962
|
+
ref: P,
|
|
963
|
+
name: t,
|
|
964
|
+
value: K,
|
|
965
|
+
type: "hidden"
|
|
966
|
+
}),
|
|
967
|
+
/* @__PURE__ */ p(Q, {
|
|
968
|
+
iconSize: z,
|
|
969
|
+
icon: D,
|
|
970
|
+
className: "prefix"
|
|
971
|
+
}),
|
|
972
|
+
b && /* @__PURE__ */ p(b, {
|
|
973
|
+
size: z,
|
|
974
|
+
strokeWidth: 2.5
|
|
975
|
+
}),
|
|
976
|
+
/* @__PURE__ */ m(rt, {
|
|
977
|
+
size: O,
|
|
978
|
+
children: [K !== "" && /* @__PURE__ */ p("p", {
|
|
979
|
+
className: "hasValue",
|
|
980
|
+
children: ee(K)
|
|
981
|
+
}), K === "" && /* @__PURE__ */ p("p", { children: i })]
|
|
982
|
+
}),
|
|
983
|
+
/* @__PURE__ */ m(ct, {
|
|
984
|
+
isFocused: H,
|
|
985
|
+
isSearchable: h,
|
|
986
|
+
search: B,
|
|
987
|
+
onSearch: ne,
|
|
988
|
+
children: [Y.map(({ label: e, value: t }) => /* @__PURE__ */ p(it, {
|
|
989
|
+
label: e,
|
|
990
|
+
value: t,
|
|
960
991
|
size: O,
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
readOnly: f,
|
|
983
|
-
iconSize: L,
|
|
984
|
-
isLoading: d
|
|
985
|
-
}),
|
|
986
|
-
/* @__PURE__ */ p(st, {
|
|
987
|
-
iconSize: L,
|
|
988
|
-
isLoading: d
|
|
989
|
-
}),
|
|
990
|
-
/* @__PURE__ */ p(ot, {
|
|
991
|
-
handleBlur: ne,
|
|
992
|
-
isFocused: B
|
|
993
|
-
})
|
|
994
|
-
]
|
|
995
|
-
}),
|
|
996
|
-
P && /* @__PURE__ */ p(Y, { children: P })
|
|
997
|
-
]
|
|
992
|
+
handleChangeValue: re,
|
|
993
|
+
optionHasSelected: q
|
|
994
|
+
}, t)), Y.length <= 0 && /* @__PURE__ */ p("p", { children: w })]
|
|
995
|
+
}),
|
|
996
|
+
/* @__PURE__ */ p(tt, {
|
|
997
|
+
disabled: R,
|
|
998
|
+
isFocused: H,
|
|
999
|
+
readOnly: f,
|
|
1000
|
+
iconSize: z,
|
|
1001
|
+
isLoading: d
|
|
1002
|
+
}),
|
|
1003
|
+
/* @__PURE__ */ p(ut, {
|
|
1004
|
+
iconSize: z,
|
|
1005
|
+
isLoading: d
|
|
1006
|
+
}),
|
|
1007
|
+
/* @__PURE__ */ p(lt, {
|
|
1008
|
+
handleBlur: J,
|
|
1009
|
+
isFocused: H
|
|
1010
|
+
})
|
|
1011
|
+
]
|
|
1012
|
+
})
|
|
998
1013
|
});
|
|
999
1014
|
}
|
|
1000
1015
|
//#endregion
|
|
1001
1016
|
//#region src/components/calendar/calendarHeader/index.tsx
|
|
1002
|
-
function
|
|
1003
|
-
let t =
|
|
1017
|
+
function ft({ basicMode: e }) {
|
|
1018
|
+
let t = Ze();
|
|
1004
1019
|
return e ? /* @__PURE__ */ m("div", {
|
|
1005
1020
|
className: "arkynCalendarHeader",
|
|
1006
1021
|
children: [
|
|
@@ -1026,14 +1041,14 @@ function lt({ basicMode: e }) {
|
|
|
1026
1041
|
className: "arkynCalendarButton",
|
|
1027
1042
|
onClick: () => t.nextMonth(),
|
|
1028
1043
|
children: /* @__PURE__ */ p(T, {})
|
|
1029
|
-
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(
|
|
1044
|
+
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(dt, {
|
|
1030
1045
|
name: "calendarMonth",
|
|
1031
1046
|
variant: "underline",
|
|
1032
1047
|
className: "calendarMonthSelect",
|
|
1033
1048
|
value: t.currentMonth,
|
|
1034
1049
|
options: t.listMonths,
|
|
1035
1050
|
onChange: (e) => t.changeMonth(+e)
|
|
1036
|
-
}), /* @__PURE__ */ p(
|
|
1051
|
+
}), /* @__PURE__ */ p(dt, {
|
|
1037
1052
|
name: "calendarYear",
|
|
1038
1053
|
variant: "underline",
|
|
1039
1054
|
className: "calendarYearSelect",
|
|
@@ -1045,8 +1060,8 @@ function lt({ basicMode: e }) {
|
|
|
1045
1060
|
}
|
|
1046
1061
|
//#endregion
|
|
1047
1062
|
//#region src/components/calendar/calendarTableTd/index.tsx
|
|
1048
|
-
function
|
|
1049
|
-
let { day: t, month: n, year: r, dayOwner: i, dayType: a } = e, { changeDay: o } =
|
|
1063
|
+
function pt(e) {
|
|
1064
|
+
let { day: t, month: n, year: r, dayOwner: i, dayType: a } = e, { changeDay: o } = Ze();
|
|
1050
1065
|
function s() {
|
|
1051
1066
|
let e = /* @__PURE__ */ new Date();
|
|
1052
1067
|
return t === e.getDate() && n === e.getMonth() && r === e.getFullYear();
|
|
@@ -1062,15 +1077,15 @@ function ut(e) {
|
|
|
1062
1077
|
}
|
|
1063
1078
|
//#endregion
|
|
1064
1079
|
//#region src/components/calendar/calendarTableBody/index.tsx
|
|
1065
|
-
function
|
|
1080
|
+
function mt() {
|
|
1066
1081
|
return /* @__PURE__ */ p("tbody", {
|
|
1067
1082
|
className: "arkynCalendarTableBody",
|
|
1068
|
-
children:
|
|
1083
|
+
children: Ze().listMatrix.map((e, t) => /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p(pt, { ...e }, t)) }, t))
|
|
1069
1084
|
});
|
|
1070
1085
|
}
|
|
1071
1086
|
//#endregion
|
|
1072
1087
|
//#region src/components/calendar/calendarTableContainer/index.tsx
|
|
1073
|
-
function
|
|
1088
|
+
function ht({ children: e }) {
|
|
1074
1089
|
return /* @__PURE__ */ p("table", {
|
|
1075
1090
|
className: "arkynCalendarTableContainer",
|
|
1076
1091
|
children: e
|
|
@@ -1078,47 +1093,47 @@ function ft({ children: e }) {
|
|
|
1078
1093
|
}
|
|
1079
1094
|
//#endregion
|
|
1080
1095
|
//#region src/components/calendar/calendarTableHeader/index.tsx
|
|
1081
|
-
function
|
|
1082
|
-
let { listWeek: e } =
|
|
1096
|
+
function gt() {
|
|
1097
|
+
let { listWeek: e } = Ze();
|
|
1083
1098
|
return /* @__PURE__ */ p("thead", {
|
|
1084
1099
|
className: "arkynCalendarTableHeader",
|
|
1085
|
-
children: /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p("th", { children:
|
|
1100
|
+
children: /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p("th", { children: te(e) }, t)) })
|
|
1086
1101
|
});
|
|
1087
1102
|
}
|
|
1088
1103
|
//#endregion
|
|
1089
1104
|
//#region src/components/calendar/index.tsx
|
|
1090
|
-
function
|
|
1105
|
+
function _t(e) {
|
|
1091
1106
|
let t = e.variant || "complete";
|
|
1092
|
-
return e.type === "range" ? /* @__PURE__ */ p(
|
|
1107
|
+
return e.type === "range" ? /* @__PURE__ */ p(Qe, {
|
|
1093
1108
|
defaultValue: e.defaultValue,
|
|
1094
1109
|
calendarType: "range",
|
|
1095
1110
|
onChange: e.onChange,
|
|
1096
1111
|
onChangeView: e.onChangeView,
|
|
1097
|
-
children: /* @__PURE__ */ m(
|
|
1098
|
-
}) : /* @__PURE__ */ p(
|
|
1112
|
+
children: /* @__PURE__ */ m($e, { children: [/* @__PURE__ */ p(ft, { basicMode: t.includes("basic") }), /* @__PURE__ */ m(ht, { children: [/* @__PURE__ */ p(gt, {}), /* @__PURE__ */ p(mt, {})] })] })
|
|
1113
|
+
}) : /* @__PURE__ */ p(Qe, {
|
|
1099
1114
|
defaultValue: e.defaultValue,
|
|
1100
1115
|
calendarType: "single",
|
|
1101
1116
|
onChange: e.onChange,
|
|
1102
1117
|
onChangeView: e.onChangeView,
|
|
1103
|
-
children: /* @__PURE__ */ m(
|
|
1118
|
+
children: /* @__PURE__ */ m($e, { children: [/* @__PURE__ */ p(ft, { basicMode: t.includes("basic") }), /* @__PURE__ */ m(ht, { children: [/* @__PURE__ */ p(gt, {}), /* @__PURE__ */ p(mt, {})] })] })
|
|
1104
1119
|
});
|
|
1105
1120
|
}
|
|
1106
1121
|
//#endregion
|
|
1107
1122
|
//#region src/components/cardTab/cardTabContext.tsx
|
|
1108
|
-
var
|
|
1109
|
-
function
|
|
1110
|
-
return a(
|
|
1123
|
+
var vt = n({});
|
|
1124
|
+
function yt() {
|
|
1125
|
+
return a(vt);
|
|
1111
1126
|
}
|
|
1112
|
-
function
|
|
1113
|
-
return /* @__PURE__ */ p(
|
|
1127
|
+
function bt(e) {
|
|
1128
|
+
return /* @__PURE__ */ p(vt.Provider, {
|
|
1114
1129
|
value: e,
|
|
1115
1130
|
children: e.children
|
|
1116
1131
|
});
|
|
1117
1132
|
}
|
|
1118
1133
|
//#endregion
|
|
1119
1134
|
//#region src/components/cardTab/cardTabButton/index.tsx
|
|
1120
|
-
function
|
|
1121
|
-
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } =
|
|
1135
|
+
function xt(e) {
|
|
1136
|
+
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } = yt(), u = s || n, d = `arkynCardTabButton ${u ? "isDisabled" : ""} ${c === a && a ? "isActive" : ""} ${r}`;
|
|
1122
1137
|
function f(e) {
|
|
1123
1138
|
l(a), i && i(e);
|
|
1124
1139
|
}
|
|
@@ -1133,12 +1148,12 @@ function vt(e) {
|
|
|
1133
1148
|
}
|
|
1134
1149
|
//#endregion
|
|
1135
1150
|
//#region src/components/cardTab/cardTabContainer/index.tsx
|
|
1136
|
-
function
|
|
1151
|
+
function St(e) {
|
|
1137
1152
|
let { children: t, onChange: n, defaultValue: r, disabled: i = !1, className: a, ...o } = e, [s, c] = u(r || ""), l = `arkynCardTabContainer ${a || ""}`;
|
|
1138
1153
|
function d(e) {
|
|
1139
1154
|
c(e), n && n(e);
|
|
1140
1155
|
}
|
|
1141
|
-
return /* @__PURE__ */ p(
|
|
1156
|
+
return /* @__PURE__ */ p(bt, {
|
|
1142
1157
|
disabled: i,
|
|
1143
1158
|
currentTab: s,
|
|
1144
1159
|
changeCurrentTab: d,
|
|
@@ -1151,193 +1166,187 @@ function yt(e) {
|
|
|
1151
1166
|
}
|
|
1152
1167
|
//#endregion
|
|
1153
1168
|
//#region src/components/checkbox/index.tsx
|
|
1154
|
-
function
|
|
1155
|
-
let { id: t, name: n, className: r = "", size: i = "md", errorMessage: a, defaultChecked: o = !1, label: c, checked: d = null, onCheck: f, orientation: h = "horizontalReverse",
|
|
1156
|
-
function
|
|
1157
|
-
let e =
|
|
1158
|
-
|
|
1169
|
+
function Ct(e) {
|
|
1170
|
+
let { id: t, name: n, className: r = "", size: i = "md", errorMessage: a, defaultChecked: o = !1, label: c, checked: d = null, onCheck: f, orientation: h = "horizontalReverse", showAsterisk: g, unShowFieldTemplate: _, value: v, ...y } = e, { fieldErrors: b } = Z(), S = l(null), C = t || s(), w = a || b?.[n], T = !!w, [E, D] = u(o || !1), O = typeof d == "boolean" ? d : E, k = `arkynCheckbox ${i} ${T ? "errorTrue" : "errorFalse"} ${O ? "checkedTrue" : "checkedFalse"}`;
|
|
1171
|
+
function A() {
|
|
1172
|
+
let e = E;
|
|
1173
|
+
D(!e), f && f(e ? "" : v || "checked");
|
|
1159
1174
|
}
|
|
1160
|
-
return /* @__PURE__ */
|
|
1161
|
-
|
|
1175
|
+
return /* @__PURE__ */ p(et, {
|
|
1176
|
+
name: n,
|
|
1177
|
+
label: c,
|
|
1178
|
+
showAsterisk: g,
|
|
1162
1179
|
className: r,
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
}), /* @__PURE__ */ p(x, {})]
|
|
1180
|
-
}),
|
|
1181
|
-
S && /* @__PURE__ */ p(Y, { children: S })
|
|
1182
|
-
]
|
|
1180
|
+
errorMessage: w,
|
|
1181
|
+
unShowFieldTemplate: _,
|
|
1182
|
+
orientation: h,
|
|
1183
|
+
children: /* @__PURE__ */ m("button", {
|
|
1184
|
+
id: C,
|
|
1185
|
+
type: "button",
|
|
1186
|
+
className: k,
|
|
1187
|
+
onClick: A,
|
|
1188
|
+
...y,
|
|
1189
|
+
children: [/* @__PURE__ */ p("input", {
|
|
1190
|
+
type: "hidden",
|
|
1191
|
+
name: n,
|
|
1192
|
+
ref: S,
|
|
1193
|
+
value: O ? v || "checked" : ""
|
|
1194
|
+
}), /* @__PURE__ */ p(x, {})]
|
|
1195
|
+
})
|
|
1183
1196
|
});
|
|
1184
1197
|
}
|
|
1185
1198
|
//#endregion
|
|
1186
1199
|
//#region src/hooks/useHydrated.ts
|
|
1187
|
-
function
|
|
1200
|
+
function wt() {
|
|
1188
1201
|
return () => {};
|
|
1189
1202
|
}
|
|
1190
|
-
function
|
|
1191
|
-
return d(
|
|
1203
|
+
function Tt() {
|
|
1204
|
+
return d(wt, () => !0, () => !1);
|
|
1192
1205
|
}
|
|
1193
1206
|
//#endregion
|
|
1194
1207
|
//#region src/components/clientOnly.tsx
|
|
1195
|
-
function
|
|
1208
|
+
function Et(e) {
|
|
1196
1209
|
let { children: t, fallback: n = null } = e;
|
|
1197
|
-
return
|
|
1210
|
+
return Tt() ? /* @__PURE__ */ p(f, { children: t() }) : /* @__PURE__ */ p(f, { children: n });
|
|
1198
1211
|
}
|
|
1199
1212
|
//#endregion
|
|
1200
1213
|
//#region src/services/maskCurrencyValues.ts
|
|
1201
|
-
function
|
|
1214
|
+
function Dt(e) {
|
|
1202
1215
|
let t = e;
|
|
1203
|
-
return typeof e == "string" ? (t = +
|
|
1216
|
+
return typeof e == "string" ? (t = +re(e), t % 1 != 0 && (t = t.toFixed(2))) : t = Number.isInteger(e) ? Number(e) * 10 ** 2 : e.toFixed(2), re(String(t)) / 10 ** 2;
|
|
1204
1217
|
}
|
|
1205
|
-
function
|
|
1206
|
-
if (!e) return [0,
|
|
1207
|
-
let n =
|
|
1208
|
-
return [n,
|
|
1218
|
+
function Ot(e, t) {
|
|
1219
|
+
if (!e) return [0, J(0, t)];
|
|
1220
|
+
let n = Dt(e);
|
|
1221
|
+
return [n, J(n, t)];
|
|
1209
1222
|
}
|
|
1210
1223
|
//#endregion
|
|
1211
1224
|
//#region src/components/currencyInput/index.tsx
|
|
1212
|
-
function
|
|
1213
|
-
let { name: t, disabled: n, title: r, style: i, variant: a = "solid", label: c, className: d = "", value: f, defaultValue: h, max: g = 1e9, locale: _, onChange: v, prefix: y, suffix: b, isLoading: x = !1, leftIcon: S, readOnly: C, onFocus: w, onBlur: T, errorMessage: E,
|
|
1225
|
+
function kt(e) {
|
|
1226
|
+
let { name: t, disabled: n, title: r, style: i, variant: a = "solid", label: c, className: d = "", value: f, defaultValue: h, max: g = 1e9, locale: _, onChange: v, prefix: y, suffix: b, isLoading: x = !1, leftIcon: S, readOnly: C, onFocus: w, onBlur: T, errorMessage: E, unShowFieldTemplate: D, orientation: O, showAsterisk: k, rightIcon: A, size: j = "md", id: M, ...N } = e, { fieldErrors: P } = Z(), [F, I] = u(!1), [R, z] = u("0"), B = l(null), V = M || s(), H = E || P?.[t], U = !!H, W = n || x, G = {
|
|
1214
1227
|
md: 20,
|
|
1215
1228
|
lg: 20
|
|
1216
|
-
}[
|
|
1229
|
+
}[j], K = A ? "right" : "left", q = K === "left" && x, ee = K === "right" && x;
|
|
1217
1230
|
function te() {
|
|
1218
|
-
|
|
1231
|
+
W || !B?.current || (I(!0), B.current.focus());
|
|
1219
1232
|
}
|
|
1220
|
-
function
|
|
1221
|
-
|
|
1233
|
+
function J(e) {
|
|
1234
|
+
I(!0), w && w(e);
|
|
1222
1235
|
}
|
|
1223
|
-
function
|
|
1224
|
-
|
|
1236
|
+
function ne(e) {
|
|
1237
|
+
I(!1), T && T(e);
|
|
1225
1238
|
}
|
|
1226
|
-
let
|
|
1227
|
-
let [t, n] =
|
|
1228
|
-
return !g || t <= g ? (
|
|
1229
|
-
}, q = (e) => {
|
|
1230
|
-
e.preventDefault();
|
|
1231
|
-
let [t, n] = K(e.target.value);
|
|
1232
|
-
v && v(e, String(t), String(n));
|
|
1239
|
+
let re = (e) => {
|
|
1240
|
+
let [t, n] = Ot(e, _);
|
|
1241
|
+
return !g || t <= g ? (z(n), [t, n]) : Ot(e, _);
|
|
1233
1242
|
};
|
|
1234
|
-
o(() => {
|
|
1243
|
+
return o(() => {
|
|
1235
1244
|
function e() {
|
|
1236
1245
|
if (typeof f == "number") return f;
|
|
1237
1246
|
if (typeof h == "number") return h;
|
|
1238
1247
|
}
|
|
1239
|
-
let [, t] =
|
|
1240
|
-
|
|
1248
|
+
let [, t] = Ot(e(), _);
|
|
1249
|
+
z(t);
|
|
1241
1250
|
}, [
|
|
1242
1251
|
_,
|
|
1243
1252
|
h,
|
|
1244
1253
|
f
|
|
1245
|
-
])
|
|
1246
|
-
|
|
1247
|
-
|
|
1254
|
+
]), /* @__PURE__ */ p(et, {
|
|
1255
|
+
name: t,
|
|
1256
|
+
label: c,
|
|
1257
|
+
showAsterisk: k,
|
|
1248
1258
|
className: d,
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
]
|
|
1259
|
+
errorMessage: H,
|
|
1260
|
+
unShowFieldTemplate: D,
|
|
1261
|
+
orientation: O,
|
|
1262
|
+
children: /* @__PURE__ */ m("section", {
|
|
1263
|
+
title: r,
|
|
1264
|
+
style: i,
|
|
1265
|
+
className: `arkynCurrencyInput ${y ? "hasPrefix" : ""} ${b ? "hasSuffix" : ""} ${a} ${j} ${W || C || x ? "opacity" : ""} ${U ? "errored" : ""} ${F ? "focused" : ""}`,
|
|
1266
|
+
onClick: te,
|
|
1267
|
+
children: [
|
|
1268
|
+
/* @__PURE__ */ p(Q, {
|
|
1269
|
+
iconSize: G,
|
|
1270
|
+
icon: y,
|
|
1271
|
+
className: "prefix"
|
|
1272
|
+
}),
|
|
1273
|
+
/* @__PURE__ */ p(Q, {
|
|
1274
|
+
show: q,
|
|
1275
|
+
iconSize: G,
|
|
1276
|
+
className: "spinner",
|
|
1277
|
+
icon: L
|
|
1278
|
+
}),
|
|
1279
|
+
/* @__PURE__ */ p(Q, {
|
|
1280
|
+
show: !x,
|
|
1281
|
+
icon: S,
|
|
1282
|
+
iconSize: G
|
|
1283
|
+
}),
|
|
1284
|
+
/* @__PURE__ */ p("input", {
|
|
1285
|
+
disabled: W,
|
|
1286
|
+
readOnly: C,
|
|
1287
|
+
ref: B,
|
|
1288
|
+
onFocus: J,
|
|
1289
|
+
onBlur: ne,
|
|
1290
|
+
onChange: (e) => {
|
|
1291
|
+
e.preventDefault();
|
|
1292
|
+
let [t, n] = re(e.target.value);
|
|
1293
|
+
v && v(e, String(t), String(n));
|
|
1294
|
+
},
|
|
1295
|
+
id: V,
|
|
1296
|
+
placeholder: W ? R : void 0,
|
|
1297
|
+
value: W ? void 0 : R,
|
|
1298
|
+
...N
|
|
1299
|
+
}),
|
|
1300
|
+
/* @__PURE__ */ p("input", {
|
|
1301
|
+
type: "hidden",
|
|
1302
|
+
name: t,
|
|
1303
|
+
value: Dt(R),
|
|
1304
|
+
readOnly: !0
|
|
1305
|
+
}),
|
|
1306
|
+
/* @__PURE__ */ p(Q, {
|
|
1307
|
+
show: !x,
|
|
1308
|
+
icon: A,
|
|
1309
|
+
iconSize: G
|
|
1310
|
+
}),
|
|
1311
|
+
/* @__PURE__ */ p(Q, {
|
|
1312
|
+
show: ee,
|
|
1313
|
+
iconSize: G,
|
|
1314
|
+
className: "spinner",
|
|
1315
|
+
icon: L
|
|
1316
|
+
}),
|
|
1317
|
+
/* @__PURE__ */ p(Q, {
|
|
1318
|
+
iconSize: G,
|
|
1319
|
+
icon: b,
|
|
1320
|
+
className: "suffix"
|
|
1321
|
+
})
|
|
1322
|
+
]
|
|
1323
|
+
})
|
|
1315
1324
|
});
|
|
1316
1325
|
}
|
|
1317
1326
|
//#endregion
|
|
1318
1327
|
//#region src/components/drawer/drawerContext.tsx
|
|
1319
|
-
var
|
|
1320
|
-
function
|
|
1321
|
-
return /* @__PURE__ */ p(
|
|
1328
|
+
var At = n({});
|
|
1329
|
+
function jt(e) {
|
|
1330
|
+
return /* @__PURE__ */ p(At.Provider, {
|
|
1322
1331
|
value: { makeInvisible: e.makeInvisible },
|
|
1323
1332
|
children: e.children
|
|
1324
1333
|
});
|
|
1325
1334
|
}
|
|
1326
|
-
function
|
|
1327
|
-
return a(
|
|
1335
|
+
function Mt() {
|
|
1336
|
+
return a(At);
|
|
1328
1337
|
}
|
|
1329
1338
|
//#endregion
|
|
1330
1339
|
//#region src/components/drawer/drawerContainer/index.tsx
|
|
1331
|
-
function
|
|
1340
|
+
function Nt(e) {
|
|
1332
1341
|
let { isVisible: t, makeInvisible: n, orientation: r = "left", children: i, className: a, ...o } = e;
|
|
1333
|
-
|
|
1342
|
+
ot(t);
|
|
1334
1343
|
let s = r === "left" ? "-100%" : "100%", c = `arkynDrawerContainer ${r} ${t ? "visibleTrue" : "visibleFalse"} ${a}`;
|
|
1335
|
-
return /* @__PURE__ */ p(
|
|
1344
|
+
return /* @__PURE__ */ p(jt, {
|
|
1336
1345
|
makeInvisible: n,
|
|
1337
|
-
children: /* @__PURE__ */ p(
|
|
1346
|
+
children: /* @__PURE__ */ p(Y, { children: t && /* @__PURE__ */ m("aside", {
|
|
1338
1347
|
className: c.trim(),
|
|
1339
1348
|
...o,
|
|
1340
|
-
children: [/* @__PURE__ */ p(
|
|
1349
|
+
children: [/* @__PURE__ */ p(X.div, {
|
|
1341
1350
|
className: "arkynDrawerContainerOverlay",
|
|
1342
1351
|
transition: {
|
|
1343
1352
|
duration: .15,
|
|
@@ -1347,7 +1356,7 @@ function At(e) {
|
|
|
1347
1356
|
animate: { opacity: 1 },
|
|
1348
1357
|
exit: { opacity: 0 },
|
|
1349
1358
|
onClick: n
|
|
1350
|
-
}), /* @__PURE__ */ p(
|
|
1359
|
+
}), /* @__PURE__ */ p(X.div, {
|
|
1351
1360
|
className: "arkynDrawerContainerContent",
|
|
1352
1361
|
transition: {
|
|
1353
1362
|
ease: "easeOut",
|
|
@@ -1363,8 +1372,8 @@ function At(e) {
|
|
|
1363
1372
|
}
|
|
1364
1373
|
//#endregion
|
|
1365
1374
|
//#region src/components/drawer/drawerHeader/index.tsx
|
|
1366
|
-
function
|
|
1367
|
-
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } =
|
|
1375
|
+
function Pt(e) {
|
|
1376
|
+
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } = Mt();
|
|
1368
1377
|
return /* @__PURE__ */ m("header", {
|
|
1369
1378
|
className: `arkynDrawerHeader ${n}`.trim(),
|
|
1370
1379
|
...i,
|
|
@@ -1373,13 +1382,13 @@ function jt(e) {
|
|
|
1373
1382
|
type: "button",
|
|
1374
1383
|
onClick: a,
|
|
1375
1384
|
"aria-label": "Close drawer",
|
|
1376
|
-
children: /* @__PURE__ */ p(
|
|
1385
|
+
children: /* @__PURE__ */ p(K, { size: 24 })
|
|
1377
1386
|
})]
|
|
1378
1387
|
});
|
|
1379
1388
|
}
|
|
1380
1389
|
//#endregion
|
|
1381
1390
|
//#region src/components/facebookPixel/pixel.ts
|
|
1382
|
-
var
|
|
1391
|
+
var Ft = class {
|
|
1383
1392
|
pixelId;
|
|
1384
1393
|
autoConfig;
|
|
1385
1394
|
initialized;
|
|
@@ -1426,18 +1435,18 @@ var Mt = class {
|
|
|
1426
1435
|
};
|
|
1427
1436
|
//#endregion
|
|
1428
1437
|
//#region src/components/facebookPixel/facebookPixel.client.tsx
|
|
1429
|
-
function
|
|
1430
|
-
let { pixelId: t, options: n, pageView: r, track: i, trackCustom: a, trackSingle: o, trackSingleCustom: s, grantConsent: c, revokeConsent: l } = e, u = new
|
|
1438
|
+
function It(e) {
|
|
1439
|
+
let { pixelId: t, options: n, pageView: r, track: i, trackCustom: a, trackSingle: o, trackSingleCustom: s, grantConsent: c, revokeConsent: l } = e, u = new Ft(t, n);
|
|
1431
1440
|
return u.init(), r && u.pageView(), c && u.grantConsent(), l && u.revokeConsent(), i && u.track(...i), a && u.trackCustom(...a), o && u.trackSingle(t, ...o), s && u.trackSingleCustom(t, ...s), /* @__PURE__ */ p(f, {});
|
|
1432
1441
|
}
|
|
1433
1442
|
//#endregion
|
|
1434
1443
|
//#region src/components/facebookPixel/index.tsx
|
|
1435
|
-
function
|
|
1436
|
-
return process.env.NODE_ENV !== "production" && !e.showInDevMode ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(
|
|
1444
|
+
function Lt(e) {
|
|
1445
|
+
return process.env.NODE_ENV !== "production" && !e.showInDevMode ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(Et, { children: () => /* @__PURE__ */ p(It, { ...e }) });
|
|
1437
1446
|
}
|
|
1438
1447
|
//#endregion
|
|
1439
1448
|
//#region src/components/fileUpload/hasFileContent/index.tsx
|
|
1440
|
-
function
|
|
1449
|
+
function Rt(e) {
|
|
1441
1450
|
let { disabled: t, file: n, isLoading: r, acceptFile: i, changeFileButtonText: a, handleSelectFile: o, reSendFile: s } = e;
|
|
1442
1451
|
function c() {
|
|
1443
1452
|
if (t) return;
|
|
@@ -1457,13 +1466,13 @@ function Ft(e) {
|
|
|
1457
1466
|
className: "arkynFileUploadFileContainer",
|
|
1458
1467
|
children: [/* @__PURE__ */ p(l, {}), /* @__PURE__ */ p("p", { children: n.name })]
|
|
1459
1468
|
}),
|
|
1460
|
-
/* @__PURE__ */ p(
|
|
1469
|
+
/* @__PURE__ */ p(He, {}),
|
|
1461
1470
|
/* @__PURE__ */ m("div", {
|
|
1462
1471
|
className: "arkynFileUploadButtonsContainer",
|
|
1463
|
-
children: [!!s && /* @__PURE__ */ p(
|
|
1472
|
+
children: [!!s && /* @__PURE__ */ p(We, {
|
|
1464
1473
|
orientation: "bottom",
|
|
1465
1474
|
text: "Reenviar arquivo",
|
|
1466
|
-
children: /* @__PURE__ */ p(
|
|
1475
|
+
children: /* @__PURE__ */ p(Ue, {
|
|
1467
1476
|
type: "button",
|
|
1468
1477
|
"aria-label": "resend file",
|
|
1469
1478
|
variant: "outline",
|
|
@@ -1489,7 +1498,7 @@ function Ft(e) {
|
|
|
1489
1498
|
}
|
|
1490
1499
|
//#endregion
|
|
1491
1500
|
//#region src/components/fileUpload/noFileContent/index.tsx
|
|
1492
|
-
function
|
|
1501
|
+
function zt(e) {
|
|
1493
1502
|
let { dropFileText: t, isLoading: n, acceptFile: r, handleSelectFile: i, selectFileButtonText: a, disabled: o } = e;
|
|
1494
1503
|
function s(e) {
|
|
1495
1504
|
if (o) return;
|
|
@@ -1521,8 +1530,8 @@ function It(e) {
|
|
|
1521
1530
|
}
|
|
1522
1531
|
//#endregion
|
|
1523
1532
|
//#region src/components/fileUpload/index.tsx
|
|
1524
|
-
function
|
|
1525
|
-
let { name: t, label: n, showAsterisk: r = !1, action: i, fileName: a = "file", method: o = "POST", acceptFile: s = "*", fileResponseName: c = "url", changeFileButtonText: l = "Alterar arquivo", selectFileButtonText: d = "Selecionar arquivo", dropFileText: f = "Ou arraste e solte o arquivo aqui", onChange: h, disabled: g = !1 } = e, { fieldErrors: _ } =
|
|
1533
|
+
function Bt(e) {
|
|
1534
|
+
let { name: t, label: n, showAsterisk: r = !1, action: i, fileName: a = "file", method: o = "POST", acceptFile: s = "*", fileResponseName: c = "url", changeFileButtonText: l = "Alterar arquivo", selectFileButtonText: d = "Selecionar arquivo", dropFileText: f = "Ou arraste e solte o arquivo aqui", onChange: h, disabled: g = !1 } = e, { fieldErrors: _ } = Z(), v = _?.[t], [y, b] = u(""), [x, S] = u(""), [C, w] = u(null), [T, E] = u(!1);
|
|
1526
1535
|
async function D(e) {
|
|
1527
1536
|
if (g) return;
|
|
1528
1537
|
E(!0), w(e), S("");
|
|
@@ -1540,8 +1549,8 @@ function Lt(e) {
|
|
|
1540
1549
|
g || D(e);
|
|
1541
1550
|
}
|
|
1542
1551
|
let k = v || x;
|
|
1543
|
-
return /* @__PURE__ */ m(
|
|
1544
|
-
n && /* @__PURE__ */ p(
|
|
1552
|
+
return /* @__PURE__ */ m(Ve, { children: [
|
|
1553
|
+
n && /* @__PURE__ */ p(Be, {
|
|
1545
1554
|
showAsterisk: r,
|
|
1546
1555
|
children: n
|
|
1547
1556
|
}),
|
|
@@ -1553,7 +1562,7 @@ function Lt(e) {
|
|
|
1553
1562
|
name: t,
|
|
1554
1563
|
value: y || ""
|
|
1555
1564
|
}),
|
|
1556
|
-
!C && /* @__PURE__ */ p(
|
|
1565
|
+
!C && /* @__PURE__ */ p(zt, {
|
|
1557
1566
|
disabled: g,
|
|
1558
1567
|
isLoading: T,
|
|
1559
1568
|
acceptFile: s,
|
|
@@ -1561,7 +1570,7 @@ function Lt(e) {
|
|
|
1561
1570
|
handleSelectFile: O,
|
|
1562
1571
|
selectFileButtonText: d
|
|
1563
1572
|
}),
|
|
1564
|
-
C && /* @__PURE__ */ p(
|
|
1573
|
+
C && /* @__PURE__ */ p(Rt, {
|
|
1565
1574
|
disabled: g,
|
|
1566
1575
|
isLoading: T,
|
|
1567
1576
|
acceptFile: s,
|
|
@@ -1572,12 +1581,12 @@ function Lt(e) {
|
|
|
1572
1581
|
})
|
|
1573
1582
|
]
|
|
1574
1583
|
}),
|
|
1575
|
-
k && /* @__PURE__ */ p(
|
|
1584
|
+
k && /* @__PURE__ */ p(ze, { children: k })
|
|
1576
1585
|
] });
|
|
1577
1586
|
}
|
|
1578
1587
|
//#endregion
|
|
1579
1588
|
//#region src/components/googleAnalytics/snippets/generateGAElements.ts
|
|
1580
|
-
function
|
|
1589
|
+
function Vt(e) {
|
|
1581
1590
|
let { measurementId: t } = e;
|
|
1582
1591
|
return t || console.warn("Google Analytics Measurement ID is required"), {
|
|
1583
1592
|
src: `https://www.googletagmanager.com/gtag/js?id=${t}`,
|
|
@@ -1590,7 +1599,7 @@ function Rt(e) {
|
|
|
1590
1599
|
}
|
|
1591
1600
|
//#endregion
|
|
1592
1601
|
//#region src/components/googleAnalytics/googleAnalytics.tsx
|
|
1593
|
-
var
|
|
1602
|
+
var Ht = class {
|
|
1594
1603
|
initializeAsyncScript(e) {
|
|
1595
1604
|
let t = document.createElement("script");
|
|
1596
1605
|
return t.async = !0, t.src = e, t;
|
|
@@ -1600,24 +1609,24 @@ var zt = class {
|
|
|
1600
1609
|
return t.innerHTML = e, t;
|
|
1601
1610
|
}
|
|
1602
1611
|
initialize(e) {
|
|
1603
|
-
let { measurementId: t } = e, n =
|
|
1612
|
+
let { measurementId: t } = e, n = Vt({ measurementId: t }), r = this.initializeAsyncScript(n.src), i = this.initializeInlineScript(n.script);
|
|
1604
1613
|
document.head.appendChild(r), document.head.appendChild(i);
|
|
1605
1614
|
}
|
|
1606
1615
|
};
|
|
1607
1616
|
//#endregion
|
|
1608
1617
|
//#region src/components/googleAnalytics/googleAnalytics.client.tsx
|
|
1609
|
-
function
|
|
1610
|
-
return new
|
|
1618
|
+
function Ut(e) {
|
|
1619
|
+
return new Ht().initialize(e), /* @__PURE__ */ p(f, {});
|
|
1611
1620
|
}
|
|
1612
1621
|
//#endregion
|
|
1613
1622
|
//#region src/components/googleAnalytics/index.tsx
|
|
1614
|
-
function
|
|
1623
|
+
function Wt(e) {
|
|
1615
1624
|
let { measurementId: t, showInDevMode: n = !1 } = e;
|
|
1616
|
-
return process.env.NODE_ENV !== "production" && !n ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(
|
|
1625
|
+
return process.env.NODE_ENV !== "production" && !n ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(Et, { children: () => /* @__PURE__ */ p(Ut, { measurementId: t }) });
|
|
1617
1626
|
}
|
|
1618
1627
|
//#endregion
|
|
1619
1628
|
//#region src/components/googleTagManager/snippets/appendToDataLayer.ts
|
|
1620
|
-
function
|
|
1629
|
+
function Gt(e) {
|
|
1621
1630
|
let { dataLayer: t, dataLayerName: n } = e;
|
|
1622
1631
|
return `
|
|
1623
1632
|
window.${n} = window.${n} || [];
|
|
@@ -1625,7 +1634,7 @@ function Ht(e) {
|
|
|
1625
1634
|
}
|
|
1626
1635
|
//#endregion
|
|
1627
1636
|
//#region src/components/googleTagManager/snippets/generateGTMElements.ts
|
|
1628
|
-
function
|
|
1637
|
+
function Kt(e) {
|
|
1629
1638
|
let { id: t, events: n, dataLayer: r, dataLayerName: i, preview: a, auth: o } = e, s = `>m_auth=${o}`, c = `>m_preview=${a}`;
|
|
1630
1639
|
return t || console.warn("GTM Id is required"), {
|
|
1631
1640
|
iframe: `
|
|
@@ -1638,7 +1647,7 @@ function Ut(e) {
|
|
|
1638
1647
|
j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'${s}${c}>m_cookies_win=x';
|
|
1639
1648
|
f.parentNode.insertBefore(j,f);
|
|
1640
1649
|
})(window,document,'script','${i}','${t}');`,
|
|
1641
|
-
dataLayerVar:
|
|
1650
|
+
dataLayerVar: Gt({
|
|
1642
1651
|
dataLayer: r,
|
|
1643
1652
|
dataLayerName: i
|
|
1644
1653
|
})
|
|
@@ -1646,13 +1655,13 @@ function Ut(e) {
|
|
|
1646
1655
|
}
|
|
1647
1656
|
//#endregion
|
|
1648
1657
|
//#region src/components/googleTagManager/googleTagManager.tsx
|
|
1649
|
-
var
|
|
1658
|
+
var qt = class {
|
|
1650
1659
|
initializeDataScript(e) {
|
|
1651
1660
|
let t = document.createElement("script");
|
|
1652
1661
|
return t.innerHTML = e, t;
|
|
1653
1662
|
}
|
|
1654
1663
|
initializeGTMElements(e) {
|
|
1655
|
-
let t =
|
|
1664
|
+
let t = Kt(e);
|
|
1656
1665
|
return {
|
|
1657
1666
|
noScript: () => {
|
|
1658
1667
|
let e = document.createElement("noscript");
|
|
@@ -1668,7 +1677,7 @@ var Wt = class {
|
|
|
1668
1677
|
initializeDataLayer(e) {
|
|
1669
1678
|
let { dataLayer: t, dataLayerName: n } = e;
|
|
1670
1679
|
if (window[n]) return window[n].push(t);
|
|
1671
|
-
let r =
|
|
1680
|
+
let r = Gt({
|
|
1672
1681
|
dataLayer: t,
|
|
1673
1682
|
dataLayerName: n
|
|
1674
1683
|
}), i = this.initializeDataScript(r);
|
|
@@ -1688,14 +1697,14 @@ var Wt = class {
|
|
|
1688
1697
|
};
|
|
1689
1698
|
//#endregion
|
|
1690
1699
|
//#region src/components/googleTagManager/googleTagManager.client.tsx
|
|
1691
|
-
function
|
|
1692
|
-
return new
|
|
1700
|
+
function Jt(e) {
|
|
1701
|
+
return new qt().initialize(e), /* @__PURE__ */ p(f, {});
|
|
1693
1702
|
}
|
|
1694
1703
|
//#endregion
|
|
1695
1704
|
//#region src/components/googleTagManager/index.tsx
|
|
1696
|
-
function
|
|
1705
|
+
function Yt(e) {
|
|
1697
1706
|
let { gtmId: t, auth: n = "", preview: r = "", dataLayerName: i = "dataLayer", events: a = {}, dataLayer: o = {}, showInDevMode: s = !1 } = e;
|
|
1698
|
-
return process.env.NODE_ENV !== "production" && !s ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(
|
|
1707
|
+
return process.env.NODE_ENV !== "production" && !s ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(Et, { children: () => /* @__PURE__ */ p(Jt, {
|
|
1699
1708
|
auth: n,
|
|
1700
1709
|
dataLayer: o,
|
|
1701
1710
|
dataLayerName: i,
|
|
@@ -1706,7 +1715,7 @@ function Kt(e) {
|
|
|
1706
1715
|
}
|
|
1707
1716
|
//#endregion
|
|
1708
1717
|
//#region src/components/imageUpload/hasFileContent/index.tsx
|
|
1709
|
-
function
|
|
1718
|
+
function Xt(e) {
|
|
1710
1719
|
let { disabled: t, filePath: n, isLoading: r, acceptImage: i, changeImageButtonText: a, handleSelectFile: o, reSendImage: s } = e;
|
|
1711
1720
|
function c() {
|
|
1712
1721
|
if (t) return;
|
|
@@ -1719,10 +1728,10 @@ function qt(e) {
|
|
|
1719
1728
|
return /* @__PURE__ */ m("div", {
|
|
1720
1729
|
className: "arkynImageUploadHasFileContent",
|
|
1721
1730
|
style: { backgroundImage: `url("${n}")` },
|
|
1722
|
-
children: [s && /* @__PURE__ */ p(
|
|
1731
|
+
children: [s && /* @__PURE__ */ p(We, {
|
|
1723
1732
|
orientation: "bottom",
|
|
1724
1733
|
text: "Reenviar imagem",
|
|
1725
|
-
children: /* @__PURE__ */ p(
|
|
1734
|
+
children: /* @__PURE__ */ p(Ue, {
|
|
1726
1735
|
type: "button",
|
|
1727
1736
|
"aria-label": "resend image",
|
|
1728
1737
|
variant: "outline",
|
|
@@ -1746,7 +1755,7 @@ function qt(e) {
|
|
|
1746
1755
|
}
|
|
1747
1756
|
//#endregion
|
|
1748
1757
|
//#region src/components/imageUpload/noFileContent/index.tsx
|
|
1749
|
-
function
|
|
1758
|
+
function Zt(e) {
|
|
1750
1759
|
let { dropImageText: t, isLoading: n, acceptImage: r, handleSelectFile: i, selectImageButtonText: a, disabled: o } = e;
|
|
1751
1760
|
function s(e) {
|
|
1752
1761
|
if (o) return;
|
|
@@ -1778,68 +1787,67 @@ function Jt(e) {
|
|
|
1778
1787
|
}
|
|
1779
1788
|
//#endregion
|
|
1780
1789
|
//#region src/components/imageUpload/index.tsx
|
|
1781
|
-
function
|
|
1782
|
-
let { name: t, defaultValue: n = "", label: r, showAsterisk: i = !1, action: a, fileName: o = "file", className: s = "", method: c = "POST", acceptImage: l = "image/*", fileResponseName: d = "url", changeImageButtonText: f = "Alterar imagem", selectImageButtonText: h = "Selecionar imagem", dropImageText: g = "Ou arraste e solte a imagem aqui", onChange: _, disabled: v = !1 } = e, { fieldErrors:
|
|
1783
|
-
async function
|
|
1790
|
+
function Qt(e) {
|
|
1791
|
+
let { name: t, defaultValue: n = "", label: r, showAsterisk: i = !1, action: a, fileName: o = "file", className: s = "", method: c = "POST", acceptImage: l = "image/*", fileResponseName: d = "url", changeImageButtonText: f = "Alterar imagem", selectImageButtonText: h = "Selecionar imagem", dropImageText: g = "Ou arraste e solte a imagem aqui", onChange: _, disabled: v = !1, unShowFieldTemplate: y = !1, orientation: b = "horizontal" } = e, { fieldErrors: x } = Z(), S = x?.[t], [C, w] = u(n), [T, E] = u(""), [D, O] = u(null), [k, A] = u(n), [j, M] = u(!1);
|
|
1792
|
+
async function N(e) {
|
|
1784
1793
|
if (v) return;
|
|
1785
|
-
|
|
1794
|
+
M(!0), O(e), E("");
|
|
1786
1795
|
let t = new FormData();
|
|
1787
1796
|
t.append(o, e), await fetch(a, {
|
|
1788
1797
|
method: c,
|
|
1789
1798
|
body: t
|
|
1790
1799
|
}).then(async (e) => await e.json()).then((e) => {
|
|
1791
|
-
e?.error ?
|
|
1800
|
+
e?.error ? E(e.error) : w(e?.[d]), _ && _(e?.[d]);
|
|
1792
1801
|
}).catch((e) => {
|
|
1793
|
-
console.error(e),
|
|
1794
|
-
}).finally(() =>
|
|
1802
|
+
console.error(e), E("Erro ao enviar imagem");
|
|
1803
|
+
}).finally(() => M(!1));
|
|
1795
1804
|
}
|
|
1796
|
-
function
|
|
1797
|
-
v || (
|
|
1805
|
+
function P(e) {
|
|
1806
|
+
v || (A(URL.createObjectURL(e)), N(e));
|
|
1798
1807
|
}
|
|
1799
|
-
let
|
|
1800
|
-
return /* @__PURE__ */
|
|
1808
|
+
let F = S || T;
|
|
1809
|
+
return /* @__PURE__ */ p(et, {
|
|
1810
|
+
name: t,
|
|
1811
|
+
label: r,
|
|
1812
|
+
showAsterisk: i,
|
|
1801
1813
|
className: s,
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
]
|
|
1833
|
-
}),
|
|
1834
|
-
N && /* @__PURE__ */ p(Y, { children: N })
|
|
1835
|
-
]
|
|
1814
|
+
errorMessage: F,
|
|
1815
|
+
unShowFieldTemplate: y,
|
|
1816
|
+
orientation: b,
|
|
1817
|
+
children: /* @__PURE__ */ m("div", {
|
|
1818
|
+
className: `arkynImageUpload ${F ? "hasError" : "noHasError"} ${k ? "hasImage" : "noHasImage"}`,
|
|
1819
|
+
children: [
|
|
1820
|
+
/* @__PURE__ */ p("input", {
|
|
1821
|
+
type: "hidden",
|
|
1822
|
+
name: t,
|
|
1823
|
+
value: C || ""
|
|
1824
|
+
}),
|
|
1825
|
+
!k && /* @__PURE__ */ p(Zt, {
|
|
1826
|
+
disabled: v,
|
|
1827
|
+
isLoading: j,
|
|
1828
|
+
acceptImage: l,
|
|
1829
|
+
dropImageText: g,
|
|
1830
|
+
handleSelectFile: P,
|
|
1831
|
+
selectImageButtonText: h
|
|
1832
|
+
}),
|
|
1833
|
+
k && /* @__PURE__ */ p(Xt, {
|
|
1834
|
+
disabled: v,
|
|
1835
|
+
isLoading: j,
|
|
1836
|
+
acceptImage: l,
|
|
1837
|
+
filePath: k,
|
|
1838
|
+
handleSelectFile: P,
|
|
1839
|
+
changeImageButtonText: f,
|
|
1840
|
+
reSendImage: F && D ? () => N(D) : void 0
|
|
1841
|
+
})
|
|
1842
|
+
]
|
|
1843
|
+
})
|
|
1836
1844
|
});
|
|
1837
1845
|
}
|
|
1838
1846
|
//#endregion
|
|
1839
1847
|
//#region src/components/mapView/mapView.client.tsx
|
|
1840
|
-
function
|
|
1848
|
+
function $t({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i }) {
|
|
1841
1849
|
let a = l(null), s = l(null), c = e || t[0];
|
|
1842
|
-
return o(() => (
|
|
1850
|
+
return o(() => (ie.accessToken = r, a.current = new ie.Map({
|
|
1843
1851
|
container: s.current,
|
|
1844
1852
|
style: "mapbox://styles/mapbox/light-v11",
|
|
1845
1853
|
center: [c.lng, c.lat],
|
|
@@ -1848,11 +1856,11 @@ function Xt({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i
|
|
|
1848
1856
|
}), t.forEach((e) => {
|
|
1849
1857
|
let { lat: t, lng: r, popUp: i } = e, o = document.createElement("img");
|
|
1850
1858
|
o.className = "arkynMarker", o.src = "https://i.postimg.cc/mgKggjk7/Pin.png";
|
|
1851
|
-
let s = new
|
|
1859
|
+
let s = new ie.Marker(o).setLngLat([r, t]).addTo(a.current);
|
|
1852
1860
|
if (i) {
|
|
1853
1861
|
let e = document.createElement("div");
|
|
1854
|
-
|
|
1855
|
-
let t = new
|
|
1862
|
+
ae(e).render(i);
|
|
1863
|
+
let t = new ie.Popup({
|
|
1856
1864
|
offset: 25,
|
|
1857
1865
|
closeButton: !1,
|
|
1858
1866
|
className: "arkynMapViewPopup"
|
|
@@ -1881,19 +1889,19 @@ function Xt({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i
|
|
|
1881
1889
|
}
|
|
1882
1890
|
//#endregion
|
|
1883
1891
|
//#region src/components/mapView/index.tsx
|
|
1884
|
-
function
|
|
1892
|
+
function en({ className: e }) {
|
|
1885
1893
|
return /* @__PURE__ */ p("div", {
|
|
1886
1894
|
className: "arkynMapViewPinnedEmpty " + e,
|
|
1887
1895
|
children: /* @__PURE__ */ p(R, {})
|
|
1888
1896
|
});
|
|
1889
1897
|
}
|
|
1890
|
-
function
|
|
1898
|
+
function tn(e) {
|
|
1891
1899
|
let { coordinates: t, zoom: n = 18, accessToken: r, className: i, onMarkerClick: a, ...o } = e;
|
|
1892
|
-
if (!t) return /* @__PURE__ */ p(
|
|
1900
|
+
if (!t) return /* @__PURE__ */ p(en, { className: i });
|
|
1893
1901
|
let s = Array.isArray(t) ? t : [t];
|
|
1894
|
-
return s.length === 0 ? /* @__PURE__ */ p(
|
|
1895
|
-
fallback: /* @__PURE__ */ p(
|
|
1896
|
-
children: () => /* @__PURE__ */ p(
|
|
1902
|
+
return s.length === 0 ? /* @__PURE__ */ p(en, { className: i }) : /* @__PURE__ */ p(Et, {
|
|
1903
|
+
fallback: /* @__PURE__ */ p(en, { className: i }),
|
|
1904
|
+
children: () => /* @__PURE__ */ p($t, {
|
|
1897
1905
|
accessToken: r,
|
|
1898
1906
|
coordinates: s,
|
|
1899
1907
|
center: s[0],
|
|
@@ -1904,29 +1912,29 @@ function Qt(e) {
|
|
|
1904
1912
|
}
|
|
1905
1913
|
//#endregion
|
|
1906
1914
|
//#region src/components/maskedInput/index.tsx
|
|
1907
|
-
var
|
|
1915
|
+
var nn = r((e, t) => /* @__PURE__ */ p("input", {
|
|
1908
1916
|
ref: t,
|
|
1909
1917
|
...e
|
|
1910
1918
|
}));
|
|
1911
|
-
function
|
|
1912
|
-
let { name: t, disabled: n, title: r, style: i, variant: a = "solid", separate: o, mask: c, showMask: d, replacement: f, label: h, className: g = "", prefix: _, suffix: v, isLoading: y = !1, leftIcon: b, readOnly: x, onFocus: S, onBlur: C, errorMessage: w, defaultValue: T, showAsterisk: E, rightIcon: D, size: O = "md", id: k, value: A, placeholder: j, ...M } = e, { fieldErrors: N } =
|
|
1919
|
+
function rn(e) {
|
|
1920
|
+
let { name: t, disabled: n, title: r, style: i, variant: a = "solid", separate: o, mask: c, showMask: d, replacement: f, label: h, className: g = "", prefix: _, suffix: v, isLoading: y = !1, leftIcon: b, readOnly: x, onFocus: S, onBlur: C, errorMessage: w, defaultValue: T, showAsterisk: E, rightIcon: D, size: O = "md", id: k, value: A, placeholder: j, ...M } = e, { fieldErrors: N } = Z(), [P, F] = u(!1), I = l(null), R = k || s(), z = w || N?.[t], B = !!z, V = n || y, H = {
|
|
1913
1921
|
md: 20,
|
|
1914
1922
|
lg: 20
|
|
1915
1923
|
}[O], U = D ? "right" : "left", W = U === "left" && y, G = U === "right" && y;
|
|
1916
|
-
function
|
|
1924
|
+
function K() {
|
|
1917
1925
|
V || !I?.current || (F(!0), I.current.focus());
|
|
1918
1926
|
}
|
|
1919
|
-
function
|
|
1927
|
+
function q(e) {
|
|
1920
1928
|
F(!0), S && S(e);
|
|
1921
1929
|
}
|
|
1922
|
-
function
|
|
1930
|
+
function ee(e) {
|
|
1923
1931
|
F(!1), C && C(e);
|
|
1924
1932
|
}
|
|
1925
|
-
let
|
|
1926
|
-
return /* @__PURE__ */ m(
|
|
1933
|
+
let te = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${v ? "hasSuffix" : ""} ${a} ${O} ${V || x || y ? "opacity" : ""} ${B ? "errored" : ""} ${P ? "focused" : ""}`;
|
|
1934
|
+
return /* @__PURE__ */ m(Ve, {
|
|
1927
1935
|
className: g,
|
|
1928
1936
|
children: [
|
|
1929
|
-
h && /* @__PURE__ */ p(
|
|
1937
|
+
h && /* @__PURE__ */ p(Be, {
|
|
1930
1938
|
showAsterisk: E,
|
|
1931
1939
|
htmlFor: R,
|
|
1932
1940
|
children: h
|
|
@@ -1934,8 +1942,8 @@ function en(e) {
|
|
|
1934
1942
|
/* @__PURE__ */ m("section", {
|
|
1935
1943
|
title: r,
|
|
1936
1944
|
style: i,
|
|
1937
|
-
onClick:
|
|
1938
|
-
className:
|
|
1945
|
+
onClick: K,
|
|
1946
|
+
className: te,
|
|
1939
1947
|
children: [
|
|
1940
1948
|
/* @__PURE__ */ p(Q, {
|
|
1941
1949
|
iconSize: H,
|
|
@@ -1953,15 +1961,15 @@ function en(e) {
|
|
|
1953
1961
|
icon: b,
|
|
1954
1962
|
iconSize: H
|
|
1955
1963
|
}),
|
|
1956
|
-
/* @__PURE__ */ p(
|
|
1957
|
-
component:
|
|
1964
|
+
/* @__PURE__ */ p(oe, {
|
|
1965
|
+
component: nn,
|
|
1958
1966
|
mask: c,
|
|
1959
1967
|
replacement: f,
|
|
1960
1968
|
separate: o,
|
|
1961
1969
|
showMask: d,
|
|
1962
1970
|
ref: I,
|
|
1963
|
-
onFocus:
|
|
1964
|
-
onBlur:
|
|
1971
|
+
onFocus: q,
|
|
1972
|
+
onBlur: ee,
|
|
1965
1973
|
disabled: V,
|
|
1966
1974
|
readOnly: x,
|
|
1967
1975
|
id: R,
|
|
@@ -1989,34 +1997,34 @@ function en(e) {
|
|
|
1989
1997
|
})
|
|
1990
1998
|
]
|
|
1991
1999
|
}),
|
|
1992
|
-
z && /* @__PURE__ */ p(
|
|
2000
|
+
z && /* @__PURE__ */ p(ze, { children: z })
|
|
1993
2001
|
]
|
|
1994
2002
|
});
|
|
1995
2003
|
}
|
|
1996
2004
|
//#endregion
|
|
1997
2005
|
//#region src/components/modal/modalContext.tsx
|
|
1998
|
-
var
|
|
1999
|
-
function
|
|
2000
|
-
return /* @__PURE__ */ p(
|
|
2006
|
+
var an = n({});
|
|
2007
|
+
function on(e) {
|
|
2008
|
+
return /* @__PURE__ */ p(an.Provider, {
|
|
2001
2009
|
value: { makeInvisible: e.makeInvisible },
|
|
2002
2010
|
children: e.children
|
|
2003
2011
|
});
|
|
2004
2012
|
}
|
|
2005
|
-
function
|
|
2006
|
-
return a(
|
|
2013
|
+
function sn() {
|
|
2014
|
+
return a(an);
|
|
2007
2015
|
}
|
|
2008
2016
|
//#endregion
|
|
2009
2017
|
//#region src/components/modal/modalContainer/index.tsx
|
|
2010
|
-
function
|
|
2018
|
+
function cn(e) {
|
|
2011
2019
|
let { isVisible: t, makeInvisible: n, children: r, className: i = "", ...a } = e;
|
|
2012
|
-
|
|
2020
|
+
ot(t);
|
|
2013
2021
|
let o = `arkynModalContainer ${t ? "visibleTrue" : "visibleFalse"} ${i}`;
|
|
2014
|
-
return /* @__PURE__ */ p(
|
|
2022
|
+
return /* @__PURE__ */ p(on, {
|
|
2015
2023
|
makeInvisible: n,
|
|
2016
|
-
children: /* @__PURE__ */ p(
|
|
2024
|
+
children: /* @__PURE__ */ p(Y, { children: t && /* @__PURE__ */ m("aside", {
|
|
2017
2025
|
className: o.trim(),
|
|
2018
2026
|
...a,
|
|
2019
|
-
children: [/* @__PURE__ */ p(
|
|
2027
|
+
children: [/* @__PURE__ */ p(X.div, {
|
|
2020
2028
|
className: "arkynModalContainerOverlay",
|
|
2021
2029
|
transition: {
|
|
2022
2030
|
duration: .15,
|
|
@@ -2026,7 +2034,7 @@ function an(e) {
|
|
|
2026
2034
|
animate: { opacity: 1 },
|
|
2027
2035
|
exit: { opacity: 0 },
|
|
2028
2036
|
onClick: n
|
|
2029
|
-
}), /* @__PURE__ */ p(
|
|
2037
|
+
}), /* @__PURE__ */ p(X.div, {
|
|
2030
2038
|
className: "arkynModalContainerContent",
|
|
2031
2039
|
transition: {
|
|
2032
2040
|
duration: .15,
|
|
@@ -2051,7 +2059,7 @@ function an(e) {
|
|
|
2051
2059
|
}
|
|
2052
2060
|
//#endregion
|
|
2053
2061
|
//#region src/components/modal/modalFooter/index.tsx
|
|
2054
|
-
function
|
|
2062
|
+
function ln(e) {
|
|
2055
2063
|
let { alignment: t = "right", className: n, ...r } = e;
|
|
2056
2064
|
return /* @__PURE__ */ p("footer", {
|
|
2057
2065
|
className: `arkynModalFooter ${t} ${n}`.trim(),
|
|
@@ -2060,8 +2068,8 @@ function on(e) {
|
|
|
2060
2068
|
}
|
|
2061
2069
|
//#endregion
|
|
2062
2070
|
//#region src/components/modal/modalHeader/index.tsx
|
|
2063
|
-
function
|
|
2064
|
-
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } =
|
|
2071
|
+
function un(e) {
|
|
2072
|
+
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } = sn();
|
|
2065
2073
|
return /* @__PURE__ */ m("header", {
|
|
2066
2074
|
className: `arkynModalHeader ${n}`.trim(),
|
|
2067
2075
|
...i,
|
|
@@ -2070,13 +2078,13 @@ function sn(e) {
|
|
|
2070
2078
|
onClick: a,
|
|
2071
2079
|
"aria-label": "Close modal button",
|
|
2072
2080
|
className: "arkynModalHeaderCloseButton",
|
|
2073
|
-
children: /* @__PURE__ */ p(
|
|
2081
|
+
children: /* @__PURE__ */ p(K, { size: 24 })
|
|
2074
2082
|
})]
|
|
2075
2083
|
});
|
|
2076
2084
|
}
|
|
2077
2085
|
//#endregion
|
|
2078
2086
|
//#region src/components/multiSelect/multiSelectChevron/index.tsx
|
|
2079
|
-
function
|
|
2087
|
+
function dn(e) {
|
|
2080
2088
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
2081
2089
|
return n ? /* @__PURE__ */ p(f, {}) : /* @__PURE__ */ p(C, {
|
|
2082
2090
|
className: `arkynMultiSelectChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -2091,7 +2099,7 @@ function cn(e) {
|
|
|
2091
2099
|
}
|
|
2092
2100
|
//#endregion
|
|
2093
2101
|
//#region src/components/multiSelect/multiSelectContainer/index.tsx
|
|
2094
|
-
function
|
|
2102
|
+
function fn(e) {
|
|
2095
2103
|
let { children: t, handleContainerFocus: n, disabled: r, isError: i, isLoading: a, isFocused: o, className: s, readOnly: c, variant: l, size: u, id: d, prefixExists: f } = e;
|
|
2096
2104
|
return /* @__PURE__ */ p("section", {
|
|
2097
2105
|
id: d,
|
|
@@ -2102,7 +2110,7 @@ function ln(e) {
|
|
|
2102
2110
|
}
|
|
2103
2111
|
//#endregion
|
|
2104
2112
|
//#region src/components/multiSelect/multiSelectContent/index.tsx
|
|
2105
|
-
function
|
|
2113
|
+
function pn(e) {
|
|
2106
2114
|
let { children: t, size: n } = e;
|
|
2107
2115
|
return /* @__PURE__ */ p("div", {
|
|
2108
2116
|
className: `arkynMultiSelectContent ${n}`,
|
|
@@ -2111,7 +2119,7 @@ function un(e) {
|
|
|
2111
2119
|
}
|
|
2112
2120
|
//#endregion
|
|
2113
2121
|
//#region src/components/multiSelect/multiSelectMark/index.tsx
|
|
2114
|
-
function
|
|
2122
|
+
function mn(e) {
|
|
2115
2123
|
let { label: t, value: n, disabled: r, handleChangeValue: i } = e;
|
|
2116
2124
|
return /* @__PURE__ */ m("div", {
|
|
2117
2125
|
className: "arkynMultiSelectMark",
|
|
@@ -2121,13 +2129,13 @@ function dn(e) {
|
|
|
2121
2129
|
onClick: (e) => {
|
|
2122
2130
|
e.stopPropagation(), i(n);
|
|
2123
2131
|
},
|
|
2124
|
-
children: /* @__PURE__ */ p(
|
|
2132
|
+
children: /* @__PURE__ */ p(K, {})
|
|
2125
2133
|
})]
|
|
2126
2134
|
});
|
|
2127
2135
|
}
|
|
2128
2136
|
//#endregion
|
|
2129
2137
|
//#region src/components/multiSelect/multiSelectOption/index.tsx
|
|
2130
|
-
function
|
|
2138
|
+
function hn(e) {
|
|
2131
2139
|
let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a } = e;
|
|
2132
2140
|
return /* @__PURE__ */ m("div", {
|
|
2133
2141
|
onClick: () => r(i),
|
|
@@ -2141,9 +2149,9 @@ function fn(e) {
|
|
|
2141
2149
|
}
|
|
2142
2150
|
//#endregion
|
|
2143
2151
|
//#region src/components/multiSelect/multiSelectOptionsContainer/index.tsx
|
|
2144
|
-
function
|
|
2152
|
+
function gn(e) {
|
|
2145
2153
|
let { children: t, isFocused: n, isSearchable: r, search: i, onSearch: a } = e, s = l(null), [c, d] = u("bottom");
|
|
2146
|
-
|
|
2154
|
+
ot(n), o(() => {
|
|
2147
2155
|
n && (() => {
|
|
2148
2156
|
if (!s.current) return;
|
|
2149
2157
|
let e = s.current.parentElement;
|
|
@@ -2158,7 +2166,7 @@ function pn(e) {
|
|
|
2158
2166
|
return n ? /* @__PURE__ */ m("div", {
|
|
2159
2167
|
ref: s,
|
|
2160
2168
|
className: `arkynMultiSelectOptionsContainer ${c}`,
|
|
2161
|
-
children: [r && /* @__PURE__ */ p(
|
|
2169
|
+
children: [r && /* @__PURE__ */ p(st, {
|
|
2162
2170
|
type: "search",
|
|
2163
2171
|
name: "search-select",
|
|
2164
2172
|
variant: "underline",
|
|
@@ -2170,7 +2178,7 @@ function pn(e) {
|
|
|
2170
2178
|
}
|
|
2171
2179
|
//#endregion
|
|
2172
2180
|
//#region src/components/multiSelect/multiSelectOverlay/index.tsx
|
|
2173
|
-
function
|
|
2181
|
+
function _n(e) {
|
|
2174
2182
|
let { isFocused: t, handleBlur: n } = e;
|
|
2175
2183
|
return t ? /* @__PURE__ */ p("aside", {
|
|
2176
2184
|
className: "arkynMultiSelectOverlay",
|
|
@@ -2179,7 +2187,7 @@ function mn(e) {
|
|
|
2179
2187
|
}
|
|
2180
2188
|
//#endregion
|
|
2181
2189
|
//#region src/components/multiSelect/multiSelectSpinner/index.tsx
|
|
2182
|
-
function
|
|
2190
|
+
function vn(e) {
|
|
2183
2191
|
let { iconSize: t, isLoading: n } = e;
|
|
2184
2192
|
return n ? /* @__PURE__ */ p(L, {
|
|
2185
2193
|
className: "arkynMultiSelectSpinner",
|
|
@@ -2189,110 +2197,109 @@ function hn(e) {
|
|
|
2189
2197
|
}
|
|
2190
2198
|
//#endregion
|
|
2191
2199
|
//#region src/components/multiSelect/index.tsx
|
|
2192
|
-
function
|
|
2193
|
-
let { name: t, options: n, className: r = "", placeholder: i = "Selecione...", closeOnSelect: a = !1, defaultValue: o = [], errorMessage: c, isLoading: d = !1, readOnly: f = !1, isSearchable: h = !1, id: g, label: _, optionMaxHeight: v, showAsterisk: y, leftIcon: b, onSearch: x, onChange: S, onBlur: C, notFoundText: w = "Sem opções disponíveis", onFocus: T, disabled: E = !1, prefix: D, size: O = "md", value: k, variant: A = "solid" } = e, { fieldErrors:
|
|
2200
|
+
function yn(e) {
|
|
2201
|
+
let { name: t, options: n, className: r = "", placeholder: i = "Selecione...", closeOnSelect: a = !1, defaultValue: o = [], errorMessage: c, isLoading: d = !1, readOnly: f = !1, isSearchable: h = !1, id: g, label: _, optionMaxHeight: v, showAsterisk: y, leftIcon: b, onSearch: x, onChange: S, onBlur: C, notFoundText: w = "Sem opções disponíveis", onFocus: T, disabled: E = !1, prefix: D, size: O = "md", value: k, variant: A = "solid", unShowFieldTemplate: j = !1, orientation: M = "horizontal" } = e, { fieldErrors: N } = Z(), P = l(null), F = g || s(), I = c || N?.[t], L = !!I, R = E || d || f, z = {
|
|
2194
2202
|
md: 20,
|
|
2195
2203
|
lg: 20
|
|
2196
|
-
}[O], [
|
|
2197
|
-
function
|
|
2198
|
-
return
|
|
2204
|
+
}[O], [B, V] = u(""), [H, U] = u(!1), [W, G] = u(o), K = k || W;
|
|
2205
|
+
function q(e) {
|
|
2206
|
+
return K.includes(e);
|
|
2199
2207
|
}
|
|
2200
2208
|
function ee(e) {
|
|
2201
2209
|
return n.find((t) => t.value === e)?.label || "";
|
|
2202
2210
|
}
|
|
2203
2211
|
function te() {
|
|
2204
|
-
|
|
2212
|
+
R || !P?.current || H || (U(!0), P.current.focus(), T && T());
|
|
2205
2213
|
}
|
|
2206
|
-
function
|
|
2207
|
-
|
|
2214
|
+
function J() {
|
|
2215
|
+
U(!1), C && P.current && P.current.blur();
|
|
2208
2216
|
}
|
|
2209
|
-
function
|
|
2210
|
-
|
|
2217
|
+
function ne(e) {
|
|
2218
|
+
V(e), x && x(e);
|
|
2211
2219
|
}
|
|
2212
|
-
function
|
|
2213
|
-
|
|
2220
|
+
function re(e) {
|
|
2221
|
+
q(e) ? (G(W.filter((t) => t !== e)), S && S(W.filter((t) => t !== e))) : (G([...W, e]), S && S([...W, e])), a && J();
|
|
2214
2222
|
}
|
|
2215
|
-
let
|
|
2216
|
-
return /* @__PURE__ */
|
|
2223
|
+
let Y = n.filter((t) => !!(e.onSearch || !e.isSearchable || t.label.toLowerCase().includes(B.toLowerCase())));
|
|
2224
|
+
return /* @__PURE__ */ p(se, {
|
|
2225
|
+
name: t,
|
|
2226
|
+
label: _,
|
|
2227
|
+
showAsterisk: y,
|
|
2217
2228
|
className: r,
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
/* @__PURE__ */
|
|
2229
|
+
errorMessage: I,
|
|
2230
|
+
unShowFieldTemplate: j,
|
|
2231
|
+
orientation: M,
|
|
2232
|
+
children: /* @__PURE__ */ m(fn, {
|
|
2233
|
+
handleContainerFocus: te,
|
|
2234
|
+
disabled: R,
|
|
2235
|
+
isError: L,
|
|
2236
|
+
isFocused: H,
|
|
2237
|
+
isLoading: d,
|
|
2238
|
+
readOnly: f,
|
|
2239
|
+
size: O,
|
|
2240
|
+
variant: A,
|
|
2241
|
+
prefixExists: !!D,
|
|
2242
|
+
id: F,
|
|
2243
|
+
children: [
|
|
2244
|
+
/* @__PURE__ */ p("input", {
|
|
2245
|
+
ref: P,
|
|
2246
|
+
name: t,
|
|
2247
|
+
value: JSON.stringify(K),
|
|
2248
|
+
type: "hidden"
|
|
2249
|
+
}),
|
|
2250
|
+
/* @__PURE__ */ p(Q, {
|
|
2251
|
+
iconSize: z,
|
|
2252
|
+
icon: D,
|
|
2253
|
+
className: "prefix"
|
|
2254
|
+
}),
|
|
2255
|
+
b && /* @__PURE__ */ p(b, {
|
|
2256
|
+
size: z,
|
|
2257
|
+
strokeWidth: 2.5
|
|
2258
|
+
}),
|
|
2259
|
+
/* @__PURE__ */ m(pn, {
|
|
2260
|
+
size: O,
|
|
2261
|
+
children: [K.map((e) => /* @__PURE__ */ p(mn, {
|
|
2262
|
+
label: ee(e),
|
|
2263
|
+
value: e,
|
|
2264
|
+
handleChangeValue: re,
|
|
2265
|
+
disabled: R
|
|
2266
|
+
}, e)), K.length <= 0 && /* @__PURE__ */ p("p", { children: i })]
|
|
2267
|
+
}),
|
|
2268
|
+
/* @__PURE__ */ m(gn, {
|
|
2269
|
+
isFocused: H,
|
|
2270
|
+
isSearchable: h,
|
|
2271
|
+
search: B,
|
|
2272
|
+
onSearch: ne,
|
|
2273
|
+
children: [Y.map(({ label: e, value: t }) => /* @__PURE__ */ p(hn, {
|
|
2274
|
+
label: e,
|
|
2275
|
+
value: t,
|
|
2251
2276
|
size: O,
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
disabled: I,
|
|
2274
|
-
isFocused: B,
|
|
2275
|
-
readOnly: f,
|
|
2276
|
-
iconSize: L,
|
|
2277
|
-
isLoading: d
|
|
2278
|
-
}),
|
|
2279
|
-
/* @__PURE__ */ p(hn, {
|
|
2280
|
-
iconSize: L,
|
|
2281
|
-
isLoading: d
|
|
2282
|
-
}),
|
|
2283
|
-
/* @__PURE__ */ p(mn, {
|
|
2284
|
-
handleBlur: ne,
|
|
2285
|
-
isFocused: B
|
|
2286
|
-
})
|
|
2287
|
-
]
|
|
2288
|
-
}),
|
|
2289
|
-
P && /* @__PURE__ */ p(Y, { children: P })
|
|
2290
|
-
]
|
|
2277
|
+
handleChangeValue: re,
|
|
2278
|
+
optionHasSelected: q
|
|
2279
|
+
}, t)), Y.length <= 0 && /* @__PURE__ */ p("p", { children: w })]
|
|
2280
|
+
}),
|
|
2281
|
+
/* @__PURE__ */ p(dn, {
|
|
2282
|
+
disabled: R,
|
|
2283
|
+
isFocused: H,
|
|
2284
|
+
readOnly: f,
|
|
2285
|
+
iconSize: z,
|
|
2286
|
+
isLoading: d
|
|
2287
|
+
}),
|
|
2288
|
+
/* @__PURE__ */ p(vn, {
|
|
2289
|
+
iconSize: z,
|
|
2290
|
+
isLoading: d
|
|
2291
|
+
}),
|
|
2292
|
+
/* @__PURE__ */ p(_n, {
|
|
2293
|
+
handleBlur: J,
|
|
2294
|
+
isFocused: H
|
|
2295
|
+
})
|
|
2296
|
+
]
|
|
2297
|
+
})
|
|
2291
2298
|
});
|
|
2292
2299
|
}
|
|
2293
2300
|
//#endregion
|
|
2294
2301
|
//#region src/components/pagination/chevronButton/index.tsx
|
|
2295
|
-
function
|
|
2302
|
+
function bn(e) {
|
|
2296
2303
|
let { orientation: t, handlePageChange: n, disabled: r } = e;
|
|
2297
2304
|
return /* @__PURE__ */ p("button", {
|
|
2298
2305
|
className: "arkynChevronPageButton",
|
|
@@ -2306,7 +2313,7 @@ function _n(e) {
|
|
|
2306
2313
|
}
|
|
2307
2314
|
//#endregion
|
|
2308
2315
|
//#region src/components/pagination/currentButton/index.tsx
|
|
2309
|
-
function
|
|
2316
|
+
function xn({ currentPage: e }) {
|
|
2310
2317
|
return /* @__PURE__ */ p("button", {
|
|
2311
2318
|
className: "arkynPaginationCurrentButton",
|
|
2312
2319
|
disabled: !0,
|
|
@@ -2315,7 +2322,7 @@ function vn({ currentPage: e }) {
|
|
|
2315
2322
|
}
|
|
2316
2323
|
//#endregion
|
|
2317
2324
|
//#region src/components/pagination/pageButton/index.tsx
|
|
2318
|
-
function
|
|
2325
|
+
function Sn(e) {
|
|
2319
2326
|
let { page: t, handlePageChange: n } = e;
|
|
2320
2327
|
return /* @__PURE__ */ p("button", {
|
|
2321
2328
|
className: "arkynPaginationPageButton",
|
|
@@ -2325,7 +2332,7 @@ function yn(e) {
|
|
|
2325
2332
|
}
|
|
2326
2333
|
//#endregion
|
|
2327
2334
|
//#region src/components/pagination/paginationService.ts
|
|
2328
|
-
var
|
|
2335
|
+
var Cn = class {
|
|
2329
2336
|
currentPage;
|
|
2330
2337
|
totalCountRegisters;
|
|
2331
2338
|
registerPerPage;
|
|
@@ -2358,7 +2365,7 @@ var bn = class {
|
|
|
2358
2365
|
};
|
|
2359
2366
|
//#endregion
|
|
2360
2367
|
//#region src/components/pagination/spread/index.tsx
|
|
2361
|
-
function
|
|
2368
|
+
function wn() {
|
|
2362
2369
|
return /* @__PURE__ */ p("p", {
|
|
2363
2370
|
className: "arkynPaginationSpread",
|
|
2364
2371
|
children: /* @__PURE__ */ p(D, {})
|
|
@@ -2366,8 +2373,8 @@ function xn() {
|
|
|
2366
2373
|
}
|
|
2367
2374
|
//#endregion
|
|
2368
2375
|
//#region src/components/pagination/index.tsx
|
|
2369
|
-
function
|
|
2370
|
-
let { totalCountRegisters: t, siblingsCount: n, currentPage: r, registerPerPage: i, onChange: a, ...o } = e, { currentPage: s, siblingsCount: c, previousPages: l, nextPages: u, lastPage: d, handlePageChange: h, handleMinusChange: g, handlePlusChange: _ } = new
|
|
2376
|
+
function Tn(e) {
|
|
2377
|
+
let { totalCountRegisters: t, siblingsCount: n, currentPage: r, registerPerPage: i, onChange: a, ...o } = e, { currentPage: s, siblingsCount: c, previousPages: l, nextPages: u, lastPage: d, handlePageChange: h, handleMinusChange: g, handlePlusChange: _ } = new Cn({
|
|
2371
2378
|
totalCountRegisters: t,
|
|
2372
2379
|
currentPage: r,
|
|
2373
2380
|
registerPerPage: i,
|
|
@@ -2378,29 +2385,29 @@ function Sn(e) {
|
|
|
2378
2385
|
className: "arkynPagination",
|
|
2379
2386
|
...o,
|
|
2380
2387
|
children: [
|
|
2381
|
-
/* @__PURE__ */ p(
|
|
2388
|
+
/* @__PURE__ */ p(bn, {
|
|
2382
2389
|
orientation: "left",
|
|
2383
2390
|
handlePageChange: g,
|
|
2384
2391
|
disabled: s <= 1
|
|
2385
2392
|
}),
|
|
2386
|
-
s > 1 + c && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
2393
|
+
s > 1 + c && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Sn, {
|
|
2387
2394
|
page: 1,
|
|
2388
2395
|
handlePageChange: () => h(1)
|
|
2389
|
-
}), s > 2 + c && /* @__PURE__ */ p(
|
|
2390
|
-
l.map((e, t) => /* @__PURE__ */ p(
|
|
2396
|
+
}), s > 2 + c && /* @__PURE__ */ p(wn, {})] }),
|
|
2397
|
+
l.map((e, t) => /* @__PURE__ */ p(Sn, {
|
|
2391
2398
|
page: e,
|
|
2392
2399
|
handlePageChange: g
|
|
2393
2400
|
}, t)),
|
|
2394
|
-
/* @__PURE__ */ p(
|
|
2395
|
-
u.map((e, t) => /* @__PURE__ */ p(
|
|
2401
|
+
/* @__PURE__ */ p(xn, { currentPage: s }),
|
|
2402
|
+
u.map((e, t) => /* @__PURE__ */ p(Sn, {
|
|
2396
2403
|
page: e,
|
|
2397
2404
|
handlePageChange: _
|
|
2398
2405
|
}, t)),
|
|
2399
|
-
s + c < d && /* @__PURE__ */ m(f, { children: [s + 1 + c < d && /* @__PURE__ */ p(
|
|
2406
|
+
s + c < d && /* @__PURE__ */ m(f, { children: [s + 1 + c < d && /* @__PURE__ */ p(wn, {}), /* @__PURE__ */ p(Sn, {
|
|
2400
2407
|
page: d,
|
|
2401
2408
|
handlePageChange: () => h(d)
|
|
2402
2409
|
})] }),
|
|
2403
|
-
/* @__PURE__ */ p(
|
|
2410
|
+
/* @__PURE__ */ p(bn, {
|
|
2404
2411
|
orientation: "right",
|
|
2405
2412
|
handlePageChange: _,
|
|
2406
2413
|
disabled: s >= d
|
|
@@ -2410,7 +2417,7 @@ function Sn(e) {
|
|
|
2410
2417
|
}
|
|
2411
2418
|
//#endregion
|
|
2412
2419
|
//#region src/components/phoneInput/phoneInputContainer/index.tsx
|
|
2413
|
-
function
|
|
2420
|
+
function En(e) {
|
|
2414
2421
|
let { children: t, onFocus: n, disabled: r, isError: i, isLoading: a, isFocused: o, className: s = "", readOnly: c, variant: l, size: u } = e;
|
|
2415
2422
|
return /* @__PURE__ */ p("section", {
|
|
2416
2423
|
className: `arkynPhoneInputContainer ${l} ${u} ${r || c || a ? "opacity" : ""} ${i ? "errored" : ""} ${o ? "focused" : ""} ${s}`.trim(),
|
|
@@ -2420,7 +2427,7 @@ function Cn(e) {
|
|
|
2420
2427
|
}
|
|
2421
2428
|
//#endregion
|
|
2422
2429
|
//#region src/components/phoneInput/phoneInputCountriesOverlay/index.tsx
|
|
2423
|
-
function
|
|
2430
|
+
function Dn(e) {
|
|
2424
2431
|
let { isOpen: t, onClick: n } = e;
|
|
2425
2432
|
return t ? /* @__PURE__ */ p("aside", {
|
|
2426
2433
|
className: "arkynPhoneInputCountriesOverlay",
|
|
@@ -2429,7 +2436,7 @@ function wn(e) {
|
|
|
2429
2436
|
}
|
|
2430
2437
|
//#endregion
|
|
2431
2438
|
//#region src/components/phoneInput/phoneInputCountryOption/index.tsx
|
|
2432
|
-
function
|
|
2439
|
+
function On(e) {
|
|
2433
2440
|
let { country: t, isActive: n, handleChangeValue: r, size: i } = e;
|
|
2434
2441
|
return /* @__PURE__ */ m("div", {
|
|
2435
2442
|
onClick: () => r(t),
|
|
@@ -2449,12 +2456,12 @@ function Tn(e) {
|
|
|
2449
2456
|
}
|
|
2450
2457
|
//#endregion
|
|
2451
2458
|
//#region src/components/phoneInput/phoneInputCountryOptionsContainer/index.tsx
|
|
2452
|
-
function
|
|
2459
|
+
function kn(e) {
|
|
2453
2460
|
let { children: t, isOpen: n, onSearch: r, search: i, placeholder: a } = e, s = l(null), [c, d] = u("bottom");
|
|
2454
2461
|
function h(e) {
|
|
2455
2462
|
r(e.target.value);
|
|
2456
2463
|
}
|
|
2457
|
-
return
|
|
2464
|
+
return ot(n), o(() => {
|
|
2458
2465
|
n && (() => {
|
|
2459
2466
|
if (!s.current) return;
|
|
2460
2467
|
let e = s.current.parentElement;
|
|
@@ -2478,7 +2485,7 @@ function En(e) {
|
|
|
2478
2485
|
}
|
|
2479
2486
|
//#endregion
|
|
2480
2487
|
//#region src/components/phoneInput/phoneInputCountrySelector/index.tsx
|
|
2481
|
-
function
|
|
2488
|
+
function An(e) {
|
|
2482
2489
|
let { currentCountry: t, onClick: n } = e;
|
|
2483
2490
|
return /* @__PURE__ */ m("div", {
|
|
2484
2491
|
className: "phoneInputSelectCountry",
|
|
@@ -2493,20 +2500,20 @@ function Dn(e) {
|
|
|
2493
2500
|
className: "chevronDown",
|
|
2494
2501
|
strokeWidth: 2.5
|
|
2495
2502
|
}),
|
|
2496
|
-
/* @__PURE__ */ p(
|
|
2503
|
+
/* @__PURE__ */ p(He, { orientation: "vertical" })
|
|
2497
2504
|
]
|
|
2498
2505
|
});
|
|
2499
2506
|
}
|
|
2500
2507
|
//#endregion
|
|
2501
2508
|
//#region src/utils/phoneInputUtilities.ts
|
|
2502
|
-
function
|
|
2509
|
+
function jn(e) {
|
|
2503
2510
|
return e && e.replace(/[^0-9]/g, "");
|
|
2504
2511
|
}
|
|
2505
|
-
var
|
|
2512
|
+
var Mn = {
|
|
2506
2513
|
EIGHT: "(99) 9999-9999",
|
|
2507
2514
|
NINE: "(99) 99999-9999"
|
|
2508
2515
|
};
|
|
2509
|
-
function
|
|
2516
|
+
function Nn(e, t) {
|
|
2510
2517
|
let n = "", r = 0;
|
|
2511
2518
|
for (let i = 0; i < t.length; i++) if (t[i] === "9") if (r < e.length) n += e[r], r++;
|
|
2512
2519
|
else break;
|
|
@@ -2514,21 +2521,21 @@ function An(e, t) {
|
|
|
2514
2521
|
else break;
|
|
2515
2522
|
return n;
|
|
2516
2523
|
}
|
|
2517
|
-
function
|
|
2524
|
+
function Pn(e) {
|
|
2518
2525
|
return e.length > 10 ? "NINE" : "EIGHT";
|
|
2519
2526
|
}
|
|
2520
|
-
var
|
|
2527
|
+
var Fn = jn(Mn.NINE).length, In = r((e, t) => /* @__PURE__ */ p("input", {
|
|
2521
2528
|
ref: t,
|
|
2522
2529
|
...e
|
|
2523
|
-
})),
|
|
2530
|
+
})), Ln = r((e, t) => {
|
|
2524
2531
|
let { onFocus: n, readonly: r, onBlur: i, size: a, onChange: s, value: c, currentCountry: l, disabled: d, id: f } = e, [m, h] = u(!1), g = typeof l.mask == "string" ? l.mask : l.mask[0];
|
|
2525
2532
|
o(() => {
|
|
2526
2533
|
m ? s(g) : h(!0);
|
|
2527
2534
|
}, [l]);
|
|
2528
2535
|
let _ = `phoneInputMask ${a}`;
|
|
2529
2536
|
function v(e) {
|
|
2530
|
-
let t =
|
|
2531
|
-
t.length >
|
|
2537
|
+
let t = jn(e.target.value), n = Pn(t);
|
|
2538
|
+
t.length > Fn || (t = Nn(t, Mn[n]), e.target.value = t, s(t));
|
|
2532
2539
|
}
|
|
2533
2540
|
return l.code === "+55" ? /* @__PURE__ */ p("input", {
|
|
2534
2541
|
id: f,
|
|
@@ -2539,13 +2546,13 @@ var Mn = On(kn.NINE).length, Nn = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
2539
2546
|
onBlur: i,
|
|
2540
2547
|
disabled: d,
|
|
2541
2548
|
ref: t
|
|
2542
|
-
}) : /* @__PURE__ */ p(
|
|
2549
|
+
}) : /* @__PURE__ */ p(oe, {
|
|
2543
2550
|
id: f,
|
|
2544
2551
|
value: c,
|
|
2545
2552
|
readOnly: r,
|
|
2546
2553
|
onChange: (e) => s(e.target.value),
|
|
2547
2554
|
className: _,
|
|
2548
|
-
component:
|
|
2555
|
+
component: In,
|
|
2549
2556
|
onFocus: n,
|
|
2550
2557
|
onBlur: i,
|
|
2551
2558
|
disabled: d,
|
|
@@ -2557,110 +2564,108 @@ var Mn = On(kn.NINE).length, Nn = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
2557
2564
|
});
|
|
2558
2565
|
//#endregion
|
|
2559
2566
|
//#region src/components/phoneInput/index.tsx
|
|
2560
|
-
function
|
|
2561
|
-
let { defaultCountryIso: t, value: n, label: r, className: i = "", disabled: a = !1, errorMessage: o, isLoading: c = !1, readOnly: d = !1, size: f = "md", defaultValue: h = "", variant: g = "solid", showAsterisk: _, name: v, onChange: y, searchCountryPlaceholder: b = "Pesquisar país", notFoundCountryText: x = "Nenhum país encontrado", id: S } = e,
|
|
2562
|
-
function
|
|
2563
|
-
|
|
2564
|
-
}
|
|
2565
|
-
function G() {
|
|
2566
|
-
j(!0), D(!0);
|
|
2567
|
+
function Rn(e) {
|
|
2568
|
+
let { defaultCountryIso: t, value: n, label: r, className: i = "", disabled: a = !1, errorMessage: o, isLoading: c = !1, readOnly: d = !1, size: f = "md", defaultValue: h = "", variant: g = "solid", showAsterisk: _, name: v, onChange: y, searchCountryPlaceholder: b = "Pesquisar país", notFoundCountryText: x = "Nenhum país encontrado", id: S, unShowFieldTemplate: C = !1, orientation: w = "horizontal" } = e, T = ce.find((e) => e.iso === "BR"), E = h ? ne(h) : "", D = h ? ee(h)[1] : T, [O, k] = u(!1), [A, j] = u(""), [M, N] = u(!1), [P, F] = u(E), I = n === void 0 ? P : n, [L, R] = u(D), { fieldErrors: z } = Z(), B = l(null), V = S || s(), H = o || z?.[v], U = !!H, W = a || c, G = l(null);
|
|
2569
|
+
function K() {
|
|
2570
|
+
W || O || M || (k(!0), G.current && G.current.focus());
|
|
2567
2571
|
}
|
|
2568
|
-
function
|
|
2569
|
-
|
|
2572
|
+
function q() {
|
|
2573
|
+
N(!0), k(!0);
|
|
2570
2574
|
}
|
|
2571
2575
|
function te() {
|
|
2572
|
-
|
|
2576
|
+
N(!1), k(!1);
|
|
2573
2577
|
}
|
|
2574
|
-
function
|
|
2575
|
-
|
|
2578
|
+
function J() {
|
|
2579
|
+
k(!0);
|
|
2576
2580
|
}
|
|
2577
|
-
function
|
|
2578
|
-
|
|
2581
|
+
function Y() {
|
|
2582
|
+
k(!1);
|
|
2579
2583
|
}
|
|
2580
|
-
function
|
|
2581
|
-
|
|
2582
|
-
return t += ie(e || P), t;
|
|
2584
|
+
function X(e) {
|
|
2585
|
+
return e.name.toLowerCase().includes(A.toLowerCase());
|
|
2583
2586
|
}
|
|
2584
|
-
|
|
2587
|
+
function ie(e) {
|
|
2588
|
+
let t = L.code;
|
|
2589
|
+
return t += re(e || I), t;
|
|
2590
|
+
}
|
|
2591
|
+
return /* @__PURE__ */ p(et, {
|
|
2592
|
+
name: v,
|
|
2593
|
+
label: r,
|
|
2594
|
+
showAsterisk: _,
|
|
2585
2595
|
className: i,
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2596
|
+
errorMessage: H,
|
|
2597
|
+
unShowFieldTemplate: C,
|
|
2598
|
+
orientation: w,
|
|
2599
|
+
children: /* @__PURE__ */ m(En, {
|
|
2600
|
+
disabled: W,
|
|
2601
|
+
isError: U,
|
|
2602
|
+
isLoading: c,
|
|
2603
|
+
isFocused: O,
|
|
2604
|
+
readOnly: d,
|
|
2605
|
+
size: f,
|
|
2606
|
+
variant: g,
|
|
2607
|
+
onFocus: K,
|
|
2608
|
+
children: [
|
|
2609
|
+
/* @__PURE__ */ p(An, {
|
|
2610
|
+
currentCountry: L,
|
|
2611
|
+
onClick: q,
|
|
2612
|
+
size: f
|
|
2613
|
+
}),
|
|
2614
|
+
/* @__PURE__ */ m(kn, {
|
|
2615
|
+
isOpen: W || d ? !1 : M,
|
|
2616
|
+
search: A,
|
|
2617
|
+
placeholder: b,
|
|
2618
|
+
onSearch: j,
|
|
2619
|
+
children: [ce.filter((e) => X(e)).map((e) => /* @__PURE__ */ p(On, {
|
|
2620
|
+
country: e,
|
|
2621
|
+
handleChangeValue: () => {
|
|
2622
|
+
R(e), N(!1), F("");
|
|
2623
|
+
},
|
|
2624
|
+
isActive: e.iso === L.iso,
|
|
2605
2625
|
size: f
|
|
2606
|
-
}),
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
}
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
size: f,
|
|
2635
|
-
onChange: (e) => {
|
|
2636
|
-
N(e), y && y(ae(e));
|
|
2637
|
-
}
|
|
2638
|
-
}),
|
|
2639
|
-
/* @__PURE__ */ p("input", {
|
|
2640
|
-
ref: R,
|
|
2641
|
-
type: "hidden",
|
|
2642
|
-
name: v,
|
|
2643
|
-
value: ae()
|
|
2644
|
-
})
|
|
2645
|
-
]
|
|
2646
|
-
}),
|
|
2647
|
-
B && /* @__PURE__ */ p(Y, { children: B })
|
|
2648
|
-
]
|
|
2626
|
+
}, e.iso)), ce.filter((e) => X(e)).length === 0 && /* @__PURE__ */ p("p", { children: x })]
|
|
2627
|
+
}),
|
|
2628
|
+
/* @__PURE__ */ p(Dn, {
|
|
2629
|
+
isOpen: W || d ? !1 : M,
|
|
2630
|
+
onClick: te
|
|
2631
|
+
}),
|
|
2632
|
+
/* @__PURE__ */ p(Ln, {
|
|
2633
|
+
id: V,
|
|
2634
|
+
ref: G,
|
|
2635
|
+
readonly: d,
|
|
2636
|
+
currentCountry: L,
|
|
2637
|
+
value: I,
|
|
2638
|
+
disabled: W,
|
|
2639
|
+
onBlur: Y,
|
|
2640
|
+
onFocus: J,
|
|
2641
|
+
size: f,
|
|
2642
|
+
onChange: (e) => {
|
|
2643
|
+
F(e), y && y(ie(e));
|
|
2644
|
+
}
|
|
2645
|
+
}),
|
|
2646
|
+
/* @__PURE__ */ p("input", {
|
|
2647
|
+
ref: B,
|
|
2648
|
+
type: "hidden",
|
|
2649
|
+
name: v,
|
|
2650
|
+
value: ie()
|
|
2651
|
+
})
|
|
2652
|
+
]
|
|
2653
|
+
})
|
|
2649
2654
|
});
|
|
2650
2655
|
}
|
|
2651
2656
|
//#endregion
|
|
2652
2657
|
//#region src/components/popover/index.tsx
|
|
2653
|
-
function
|
|
2658
|
+
function zn(e) {
|
|
2654
2659
|
let { children: t, button: n, closeOnClick: r, className: i = "", orientation: a = "bottomLeft" } = e, [o, s] = u(!1), c = `arkynPopover ${a} ${o ? "visibleTrue" : "visibleFalse"} ${i}`;
|
|
2655
2660
|
function l() {
|
|
2656
2661
|
o || s(!0);
|
|
2657
2662
|
}
|
|
2658
|
-
return
|
|
2663
|
+
return ot(o), /* @__PURE__ */ m("div", {
|
|
2659
2664
|
className: c,
|
|
2660
2665
|
onClick: l,
|
|
2661
2666
|
children: [
|
|
2662
2667
|
n,
|
|
2663
|
-
/* @__PURE__ */ p(
|
|
2668
|
+
/* @__PURE__ */ p(X.div, {
|
|
2664
2669
|
style: { visibility: o ? "visible" : "hidden" },
|
|
2665
2670
|
transition: {
|
|
2666
2671
|
ease: "easeOut",
|
|
@@ -2682,10 +2687,10 @@ function In(e) {
|
|
|
2682
2687
|
}
|
|
2683
2688
|
//#endregion
|
|
2684
2689
|
//#region src/components/radio/radioContext.tsx
|
|
2685
|
-
var
|
|
2686
|
-
function
|
|
2690
|
+
var Bn = n({});
|
|
2691
|
+
function Vn(e) {
|
|
2687
2692
|
let { children: t, size: n, isError: r, handleChange: i, value: a, disabled: o } = e;
|
|
2688
|
-
return /* @__PURE__ */ p(
|
|
2693
|
+
return /* @__PURE__ */ p(Bn.Provider, {
|
|
2689
2694
|
value: {
|
|
2690
2695
|
handleChange: i,
|
|
2691
2696
|
value: a,
|
|
@@ -2696,13 +2701,13 @@ function Rn(e) {
|
|
|
2696
2701
|
children: t
|
|
2697
2702
|
});
|
|
2698
2703
|
}
|
|
2699
|
-
function
|
|
2700
|
-
return a(
|
|
2704
|
+
function Hn() {
|
|
2705
|
+
return a(Bn);
|
|
2701
2706
|
}
|
|
2702
2707
|
//#endregion
|
|
2703
2708
|
//#region src/components/radio/radioBox/index.tsx
|
|
2704
|
-
function
|
|
2705
|
-
let { value: t, size: n, disabled: r, children: i, className: a = "", onClick: o, onFocus: s, ...c } = e, { handleChange: l, size: u, value: d, isError: f, disabled: h } =
|
|
2709
|
+
function Un(e) {
|
|
2710
|
+
let { value: t, size: n, disabled: r, children: i, className: a = "", onClick: o, onFocus: s, ...c } = e, { handleChange: l, size: u, value: d, isError: f, disabled: h } = Hn(), g = d === t, _ = n || u, v = r || h, y = `arkynRadioBox ${_} ${g ? "checkedTrue" : "checkedFalse"} ${f ? "errorTrue" : "errorFalse"} ${v ? "disabledTrue" : "disabledFalse"} ${a}`;
|
|
2706
2711
|
function b(e) {
|
|
2707
2712
|
o && o(e), l(t);
|
|
2708
2713
|
}
|
|
@@ -2722,62 +2727,61 @@ function Bn(e) {
|
|
|
2722
2727
|
}
|
|
2723
2728
|
//#endregion
|
|
2724
2729
|
//#region src/components/radio/radioGroup/index.tsx
|
|
2725
|
-
function
|
|
2726
|
-
let { defaultValue: t = "", name: n, label: r, showAsterisk: i, errorMessage: a, value: o, onChange: s, size: c = "md", className: l = "", disabled: d = !1,
|
|
2727
|
-
function
|
|
2728
|
-
|
|
2730
|
+
function Wn(e) {
|
|
2731
|
+
let { defaultValue: t = "", name: n, label: r, showAsterisk: i, errorMessage: a, value: o, onChange: s, size: c = "md", className: l = "", disabled: d = !1, unShowFieldTemplate: f = !1, orientation: h = "horizontal", ...g } = e, [_, v] = u(t), { fieldErrors: y } = Z();
|
|
2732
|
+
function b(e) {
|
|
2733
|
+
v(e), s && s(e);
|
|
2729
2734
|
}
|
|
2730
|
-
let
|
|
2731
|
-
return /* @__PURE__ */
|
|
2735
|
+
let x = a || y?.[n], S = !!x, C = `arkynRadioGroup ${c}`;
|
|
2736
|
+
return /* @__PURE__ */ p(et, {
|
|
2737
|
+
name: n,
|
|
2738
|
+
label: r,
|
|
2739
|
+
showAsterisk: i,
|
|
2732
2740
|
className: l,
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
})]
|
|
2754
|
-
}),
|
|
2755
|
-
y && /* @__PURE__ */ p(Y, { children: y })
|
|
2756
|
-
]
|
|
2741
|
+
errorMessage: x,
|
|
2742
|
+
unShowFieldTemplate: f,
|
|
2743
|
+
orientation: h,
|
|
2744
|
+
children: /* @__PURE__ */ m(Vn, {
|
|
2745
|
+
isError: S,
|
|
2746
|
+
size: c,
|
|
2747
|
+
value: o || _,
|
|
2748
|
+
handleChange: b,
|
|
2749
|
+
disabled: d,
|
|
2750
|
+
children: [/* @__PURE__ */ p("input", {
|
|
2751
|
+
style: { display: "none" },
|
|
2752
|
+
type: "text",
|
|
2753
|
+
readOnly: !0,
|
|
2754
|
+
name: n,
|
|
2755
|
+
value: o || _
|
|
2756
|
+
}), /* @__PURE__ */ p("div", {
|
|
2757
|
+
className: C.trim(),
|
|
2758
|
+
...g
|
|
2759
|
+
})]
|
|
2760
|
+
})
|
|
2757
2761
|
});
|
|
2758
2762
|
}
|
|
2759
2763
|
//#endregion
|
|
2760
2764
|
//#region src/services/isBlockActive.ts
|
|
2761
|
-
function
|
|
2765
|
+
function Gn(e, t, n = "type") {
|
|
2762
2766
|
let { selection: r } = e;
|
|
2763
2767
|
if (!r) return !1;
|
|
2764
|
-
let [i] = Array.from(
|
|
2765
|
-
at:
|
|
2766
|
-
match: (e) => !
|
|
2768
|
+
let [i] = Array.from(ue.nodes(e, {
|
|
2769
|
+
at: ue.unhangRange(e, r),
|
|
2770
|
+
match: (e) => !ue.isEditor(e) && de.isElement(e) && e[n] === t
|
|
2767
2771
|
}));
|
|
2768
2772
|
return !!i;
|
|
2769
2773
|
}
|
|
2770
2774
|
//#endregion
|
|
2771
2775
|
//#region src/templates/richTextTemplates.ts
|
|
2772
|
-
var
|
|
2776
|
+
var Kn = {
|
|
2773
2777
|
"mod+b": "bold",
|
|
2774
2778
|
"mod+i": "italic",
|
|
2775
2779
|
"mod+u": "underline",
|
|
2776
2780
|
"mod+`": "code"
|
|
2777
|
-
},
|
|
2781
|
+
}, qn = [{
|
|
2778
2782
|
type: "paragraph",
|
|
2779
2783
|
children: [{ text: "" }]
|
|
2780
|
-
}],
|
|
2784
|
+
}], Jn = ["listItem", "numberedList"], Yn = [
|
|
2781
2785
|
"left",
|
|
2782
2786
|
"center",
|
|
2783
2787
|
"right",
|
|
@@ -2785,27 +2789,27 @@ var Un = {
|
|
|
2785
2789
|
];
|
|
2786
2790
|
//#endregion
|
|
2787
2791
|
//#region src/services/toggleBlock.ts
|
|
2788
|
-
function
|
|
2789
|
-
let n =
|
|
2790
|
-
|
|
2791
|
-
match: (e) => !
|
|
2792
|
+
function Xn(e, t) {
|
|
2793
|
+
let n = Gn(e, t, Yn.includes(t) ? "align" : "type"), r = Jn.includes(t);
|
|
2794
|
+
me.unwrapNodes(e, {
|
|
2795
|
+
match: (e) => !ue.isEditor(e) && de.isElement(e) && Jn.includes(e.type) && !Yn.includes(t),
|
|
2792
2796
|
split: !0
|
|
2793
2797
|
});
|
|
2794
2798
|
let i;
|
|
2795
|
-
if (i =
|
|
2799
|
+
if (i = Yn.includes(t) ? { align: n ? void 0 : t } : { type: n ? "paragraph" : r ? "listItem" : t }, me.setNodes(e, i), !n && r) {
|
|
2796
2800
|
let n = {
|
|
2797
2801
|
type: t,
|
|
2798
2802
|
children: []
|
|
2799
2803
|
};
|
|
2800
|
-
|
|
2804
|
+
me.wrapNodes(e, n);
|
|
2801
2805
|
}
|
|
2802
2806
|
}
|
|
2803
2807
|
//#endregion
|
|
2804
2808
|
//#region src/components/richText/blockButton/index.tsx
|
|
2805
|
-
function
|
|
2806
|
-
let n =
|
|
2809
|
+
function Zn({ format: e, icon: t }) {
|
|
2810
|
+
let n = ye(), r = Gn(n, e, Yn.includes(e) ? "align" : "type") ? "activeTrue" : "activeFalse";
|
|
2807
2811
|
function i(t) {
|
|
2808
|
-
t.preventDefault(),
|
|
2812
|
+
t.preventDefault(), Xn(n, e);
|
|
2809
2813
|
}
|
|
2810
2814
|
return /* @__PURE__ */ p("button", {
|
|
2811
2815
|
type: "button",
|
|
@@ -2816,7 +2820,7 @@ function Jn({ format: e, icon: t }) {
|
|
|
2816
2820
|
}
|
|
2817
2821
|
//#endregion
|
|
2818
2822
|
//#region src/components/richText/element/index.tsx
|
|
2819
|
-
function
|
|
2823
|
+
function Qn({ attributes: e, children: t, element: n }) {
|
|
2820
2824
|
let r = { textAlign: n.align };
|
|
2821
2825
|
switch (n.type) {
|
|
2822
2826
|
case "blockQuote": return /* @__PURE__ */ p("blockquote", {
|
|
@@ -2886,20 +2890,20 @@ function Yn({ attributes: e, children: t, element: n }) {
|
|
|
2886
2890
|
}
|
|
2887
2891
|
//#endregion
|
|
2888
2892
|
//#region src/components/tab/tabContext.tsx
|
|
2889
|
-
var
|
|
2890
|
-
function
|
|
2891
|
-
return a(
|
|
2893
|
+
var $n = n({});
|
|
2894
|
+
function er() {
|
|
2895
|
+
return a($n);
|
|
2892
2896
|
}
|
|
2893
|
-
function
|
|
2894
|
-
return /* @__PURE__ */ p(
|
|
2897
|
+
function tr(e) {
|
|
2898
|
+
return /* @__PURE__ */ p($n.Provider, {
|
|
2895
2899
|
value: e,
|
|
2896
2900
|
children: e.children
|
|
2897
2901
|
});
|
|
2898
2902
|
}
|
|
2899
2903
|
//#endregion
|
|
2900
2904
|
//#region src/components/tab/tabButton/index.tsx
|
|
2901
|
-
function
|
|
2902
|
-
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } =
|
|
2905
|
+
function nr(e) {
|
|
2906
|
+
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } = er(), u = s || n, d = `arkynTabButton ${u ? "isDisabled" : ""} ${c === a && a ? "isActive" : ""} ${r}`;
|
|
2903
2907
|
function f(e) {
|
|
2904
2908
|
l(a), i && i(e);
|
|
2905
2909
|
}
|
|
@@ -2914,12 +2918,12 @@ function $n(e) {
|
|
|
2914
2918
|
}
|
|
2915
2919
|
//#endregion
|
|
2916
2920
|
//#region src/components/tab/tabContainer/index.tsx
|
|
2917
|
-
function
|
|
2921
|
+
function rr(e) {
|
|
2918
2922
|
let { children: t, onChange: n, defaultValue: r, disabled: i = !1, className: a, ...o } = e, [s, c] = u(r || ""), l = `arkynTabContainer ${a || ""}`;
|
|
2919
2923
|
function d(e) {
|
|
2920
2924
|
c(e), n && n(e);
|
|
2921
2925
|
}
|
|
2922
|
-
return /* @__PURE__ */ p(
|
|
2926
|
+
return /* @__PURE__ */ p(tr, {
|
|
2923
2927
|
disabled: i,
|
|
2924
2928
|
currentTab: s,
|
|
2925
2929
|
changeCurrentTab: d,
|
|
@@ -2932,8 +2936,8 @@ function er(e) {
|
|
|
2932
2936
|
}
|
|
2933
2937
|
//#endregion
|
|
2934
2938
|
//#region src/components/richText/insertImage/index.tsx
|
|
2935
|
-
function
|
|
2936
|
-
let { action: t, tabLabels: n = ["Adicionar URL", "Upload de arquivo"], modalCancelButton: r = "Cancelar", modalConfirmButton: i = "Confirmar", modalInputImageLabel: a = "Imagem:", modalInputUrlLabel: o = "URL da imagem:", modalTitle: s = "Inserir imagem" } = e, c =
|
|
2939
|
+
function ir(e) {
|
|
2940
|
+
let { action: t, tabLabels: n = ["Adicionar URL", "Upload de arquivo"], modalCancelButton: r = "Cancelar", modalConfirmButton: i = "Confirmar", modalInputImageLabel: a = "Imagem:", modalInputUrlLabel: o = "URL da imagem:", modalTitle: s = "Inserir imagem" } = e, c = ye(), [l, d] = u(!1), [h, g] = u(""), [_, v] = u("url");
|
|
2937
2941
|
function y(e) {
|
|
2938
2942
|
e.preventDefault(), !(!h || h === "") && (c.insertNodes([
|
|
2939
2943
|
{
|
|
@@ -2956,26 +2960,26 @@ function tr(e) {
|
|
|
2956
2960
|
className: "arkynRichTextInsertImage",
|
|
2957
2961
|
onMouseDown: () => d(!0),
|
|
2958
2962
|
children: /* @__PURE__ */ p(P, {})
|
|
2959
|
-
}), /* @__PURE__ */ m(
|
|
2963
|
+
}), /* @__PURE__ */ m(cn, {
|
|
2960
2964
|
isVisible: l,
|
|
2961
2965
|
makeInvisible: () => d(!1),
|
|
2962
2966
|
children: [
|
|
2963
|
-
/* @__PURE__ */ p(
|
|
2967
|
+
/* @__PURE__ */ p(un, { children: s }),
|
|
2964
2968
|
/* @__PURE__ */ m("div", {
|
|
2965
2969
|
className: "arkynRichTextInsertImageModalContent",
|
|
2966
2970
|
children: [
|
|
2967
|
-
/* @__PURE__ */ m(
|
|
2971
|
+
/* @__PURE__ */ m(rr, {
|
|
2968
2972
|
defaultValue: _,
|
|
2969
2973
|
onChange: v,
|
|
2970
|
-
children: [/* @__PURE__ */ p(
|
|
2974
|
+
children: [/* @__PURE__ */ p(nr, {
|
|
2971
2975
|
value: "url",
|
|
2972
2976
|
children: n[0]
|
|
2973
|
-
}), /* @__PURE__ */ p(
|
|
2977
|
+
}), /* @__PURE__ */ p(nr, {
|
|
2974
2978
|
value: "file",
|
|
2975
2979
|
children: n[1]
|
|
2976
2980
|
})]
|
|
2977
2981
|
}),
|
|
2978
|
-
_ === "url" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
2982
|
+
_ === "url" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(st, {
|
|
2979
2983
|
type: "text",
|
|
2980
2984
|
name: "richTextImageURL",
|
|
2981
2985
|
label: o,
|
|
@@ -2987,7 +2991,7 @@ function tr(e) {
|
|
|
2987
2991
|
src: h,
|
|
2988
2992
|
alt: "preview"
|
|
2989
2993
|
})] }),
|
|
2990
|
-
_ === "file" && /* @__PURE__ */ p(
|
|
2994
|
+
_ === "file" && /* @__PURE__ */ p(Qt, {
|
|
2991
2995
|
name: "richTextImageURL",
|
|
2992
2996
|
action: t,
|
|
2993
2997
|
label: a,
|
|
@@ -2997,7 +3001,7 @@ function tr(e) {
|
|
|
2997
3001
|
})
|
|
2998
3002
|
]
|
|
2999
3003
|
}),
|
|
3000
|
-
/* @__PURE__ */ m(
|
|
3004
|
+
/* @__PURE__ */ m(ln, { children: [/* @__PURE__ */ p($, {
|
|
3001
3005
|
type: "button",
|
|
3002
3006
|
scheme: "danger",
|
|
3003
3007
|
variant: "outline",
|
|
@@ -3013,8 +3017,8 @@ function tr(e) {
|
|
|
3013
3017
|
}
|
|
3014
3018
|
//#endregion
|
|
3015
3019
|
//#region src/components/richText/insertVideo/index.tsx
|
|
3016
|
-
function
|
|
3017
|
-
let { modalCancelButton: t = "Cancelar", modalConfirmButton: n = "Confirmar", modalInputUrlLabel: r = "URL do vídeo:", modalTitle: i = "Inserir vídeo", invalidUrlMessage: a = "URL inválida" } = e, s =
|
|
3020
|
+
function ar(e) {
|
|
3021
|
+
let { modalCancelButton: t = "Cancelar", modalConfirmButton: n = "Confirmar", modalInputUrlLabel: r = "URL do vídeo:", modalTitle: i = "Inserir vídeo", invalidUrlMessage: a = "URL inválida" } = e, s = ye(), [c, l] = u(!1), [d, h] = u(""), [g, _] = u(""), [v, y] = u("");
|
|
3018
3022
|
function b(e) {
|
|
3019
3023
|
if (e.preventDefault(), !d || d === "") return;
|
|
3020
3024
|
let t = `https://www.youtube.com/embed/${d}`;
|
|
@@ -3046,14 +3050,14 @@ function nr(e) {
|
|
|
3046
3050
|
className: "arkynRichTextInsertVideo",
|
|
3047
3051
|
onMouseDown: () => l(!0),
|
|
3048
3052
|
children: /* @__PURE__ */ p(G, {})
|
|
3049
|
-
}), /* @__PURE__ */ m(
|
|
3053
|
+
}), /* @__PURE__ */ m(cn, {
|
|
3050
3054
|
isVisible: c,
|
|
3051
3055
|
makeInvisible: () => l(!1),
|
|
3052
3056
|
children: [
|
|
3053
|
-
/* @__PURE__ */ p(
|
|
3057
|
+
/* @__PURE__ */ p(un, { children: i }),
|
|
3054
3058
|
/* @__PURE__ */ m("div", {
|
|
3055
3059
|
className: "arkynRichTextInsertVideoModalContent",
|
|
3056
|
-
children: [/* @__PURE__ */ p(
|
|
3060
|
+
children: [/* @__PURE__ */ p(st, {
|
|
3057
3061
|
type: "text",
|
|
3058
3062
|
name: "richTextVideoURL",
|
|
3059
3063
|
label: r,
|
|
@@ -3071,7 +3075,7 @@ function nr(e) {
|
|
|
3071
3075
|
allowFullScreen: !0
|
|
3072
3076
|
})]
|
|
3073
3077
|
}),
|
|
3074
|
-
/* @__PURE__ */ m(
|
|
3078
|
+
/* @__PURE__ */ m(ln, { children: [/* @__PURE__ */ p($, {
|
|
3075
3079
|
type: "button",
|
|
3076
3080
|
scheme: "danger",
|
|
3077
3081
|
variant: "outline",
|
|
@@ -3088,7 +3092,7 @@ function nr(e) {
|
|
|
3088
3092
|
}
|
|
3089
3093
|
//#endregion
|
|
3090
3094
|
//#region src/components/richText/leaf/index.tsx
|
|
3091
|
-
function
|
|
3095
|
+
function or({ attributes: e, children: t, leaf: n }) {
|
|
3092
3096
|
return n.bold && (t = /* @__PURE__ */ p("strong", { children: t })), n.code && (t = /* @__PURE__ */ p("code", { children: t })), n.italic && (t = /* @__PURE__ */ p("em", { children: t })), n.underline && (t = /* @__PURE__ */ p("u", { children: t })), /* @__PURE__ */ p("span", {
|
|
3093
3097
|
...e,
|
|
3094
3098
|
children: t
|
|
@@ -3096,21 +3100,21 @@ function rr({ attributes: e, children: t, leaf: n }) {
|
|
|
3096
3100
|
}
|
|
3097
3101
|
//#endregion
|
|
3098
3102
|
//#region src/services/isMarkActive.ts
|
|
3099
|
-
function
|
|
3100
|
-
let n =
|
|
3103
|
+
function sr(e, t) {
|
|
3104
|
+
let n = ue.marks(e);
|
|
3101
3105
|
return n ? n[t] === !0 : !1;
|
|
3102
3106
|
}
|
|
3103
3107
|
//#endregion
|
|
3104
3108
|
//#region src/services/toggleMark.ts
|
|
3105
|
-
function
|
|
3106
|
-
|
|
3109
|
+
function cr(e, t) {
|
|
3110
|
+
sr(e, t) ? ue.removeMark(e, t) : ue.addMark(e, t, !0);
|
|
3107
3111
|
}
|
|
3108
3112
|
//#endregion
|
|
3109
3113
|
//#region src/components/richText/markButton/index.tsx
|
|
3110
|
-
function
|
|
3111
|
-
let n =
|
|
3114
|
+
function lr({ format: e, icon: t }) {
|
|
3115
|
+
let n = ye(), r = sr(n, e) ? "activeTrue" : "activeFalse";
|
|
3112
3116
|
function i(t) {
|
|
3113
|
-
t.preventDefault(),
|
|
3117
|
+
t.preventDefault(), cr(n, e);
|
|
3114
3118
|
}
|
|
3115
3119
|
return /* @__PURE__ */ p("button", {
|
|
3116
3120
|
type: "button",
|
|
@@ -3121,7 +3125,7 @@ function or({ format: e, icon: t }) {
|
|
|
3121
3125
|
}
|
|
3122
3126
|
//#endregion
|
|
3123
3127
|
//#region src/components/richText/toolbar/index.tsx
|
|
3124
|
-
function
|
|
3128
|
+
function ur({ children: e }) {
|
|
3125
3129
|
return /* @__PURE__ */ p("div", {
|
|
3126
3130
|
className: "arkynRichTextToolbar",
|
|
3127
3131
|
children: e
|
|
@@ -3129,135 +3133,137 @@ function sr({ children: e }) {
|
|
|
3129
3133
|
}
|
|
3130
3134
|
//#endregion
|
|
3131
3135
|
//#region src/services/extractTextFromNode.ts
|
|
3132
|
-
function
|
|
3133
|
-
return e.map((e) =>
|
|
3136
|
+
function dr(e) {
|
|
3137
|
+
return e.map((e) => fe.string(e)).join("");
|
|
3134
3138
|
}
|
|
3135
3139
|
//#endregion
|
|
3136
3140
|
//#region src/components/richText/index.tsx
|
|
3137
|
-
function
|
|
3138
|
-
let { name: t, hiddenButtons: n, imageConfig: r, videoConfig: a,
|
|
3139
|
-
function
|
|
3141
|
+
function fr(e) {
|
|
3142
|
+
let { name: t, hiddenButtons: n, imageConfig: r, videoConfig: a, className: o = "", defaultValue: d = "[]", enforceCharacterLimit: f = !1, onChangeCharactersCount: h, baseErrorMessage: x, maxLimit: S = 1e4, onChange: C, isError: w, label: T, showAsterisk: D, id: O, orientation: k = "horizontal", unShowFieldTemplate: A = !1 } = e, j = c(() => ge(be(he())), []), { fieldErrors: P } = Z();
|
|
3143
|
+
function F() {
|
|
3140
3144
|
try {
|
|
3141
|
-
let e = JSON.parse(
|
|
3142
|
-
return !Array.isArray(e) || e.length <= 0 ?
|
|
3145
|
+
let e = JSON.parse(d);
|
|
3146
|
+
return !Array.isArray(e) || e.length <= 0 ? qn : e.every((e) => typeof e == "object" && !!e && "type" in e && "children" in e) ? e : qn;
|
|
3143
3147
|
} catch {
|
|
3144
|
-
return
|
|
3148
|
+
return qn;
|
|
3145
3149
|
}
|
|
3146
3150
|
}
|
|
3147
|
-
let [
|
|
3151
|
+
let [L, R] = u(dr(F()).length), [z, B] = u(JSON.stringify(F()) || "[]"), [H, U] = u(!1), G = l(null), K = O || s(), q = x || P?.[t], ee = w || !!q, te = i(or, []), J = i(Qn, []);
|
|
3148
3152
|
function ne(e) {
|
|
3149
|
-
let t =
|
|
3150
|
-
|
|
3153
|
+
let t = dr(e);
|
|
3154
|
+
R(t.length), h && h(t.length), !(f && t.length >= S) && (B(JSON.stringify(e)), C && C(e), j.children = e, me.setNodes(j, { children: e }));
|
|
3151
3155
|
}
|
|
3152
|
-
let re = `arkynRichText ${
|
|
3153
|
-
function
|
|
3156
|
+
let re = `arkynRichText ${ee || S < L ? "errorTrue" : "errorFalse"} ${H ? "focusTrue" : "focusFalse"}`, Y = S - L;
|
|
3157
|
+
function X(e) {
|
|
3154
3158
|
return !n?.includes(e);
|
|
3155
3159
|
}
|
|
3156
|
-
return /* @__PURE__ */
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3160
|
+
return /* @__PURE__ */ p(et, {
|
|
3161
|
+
name: t,
|
|
3162
|
+
label: T,
|
|
3163
|
+
showAsterisk: D,
|
|
3164
|
+
className: o,
|
|
3165
|
+
errorMessage: q,
|
|
3166
|
+
unShowFieldTemplate: A,
|
|
3167
|
+
orientation: k,
|
|
3168
|
+
children: /* @__PURE__ */ m(ve, {
|
|
3169
|
+
editor: j,
|
|
3170
|
+
initialValue: F(),
|
|
3164
3171
|
onChange: ne,
|
|
3165
3172
|
onValueChange: ne,
|
|
3166
3173
|
children: [
|
|
3167
3174
|
/* @__PURE__ */ m("div", {
|
|
3168
3175
|
className: re,
|
|
3169
3176
|
children: [
|
|
3170
|
-
/* @__PURE__ */ m(
|
|
3171
|
-
|
|
3177
|
+
/* @__PURE__ */ m(ur, { children: [
|
|
3178
|
+
X("headingOne") && /* @__PURE__ */ p(Zn, {
|
|
3172
3179
|
format: "headingOne",
|
|
3173
3180
|
icon: M
|
|
3174
3181
|
}),
|
|
3175
|
-
|
|
3182
|
+
X("headingTwo") && /* @__PURE__ */ p(Zn, {
|
|
3176
3183
|
format: "headingTwo",
|
|
3177
3184
|
icon: N
|
|
3178
3185
|
}),
|
|
3179
|
-
|
|
3186
|
+
X("blockQuote") && /* @__PURE__ */ p(Zn, {
|
|
3180
3187
|
format: "blockQuote",
|
|
3181
3188
|
icon: V
|
|
3182
3189
|
}),
|
|
3183
|
-
|
|
3190
|
+
X("bold") && /* @__PURE__ */ p(lr, {
|
|
3184
3191
|
format: "bold",
|
|
3185
3192
|
icon: b
|
|
3186
3193
|
}),
|
|
3187
|
-
|
|
3194
|
+
X("italic") && /* @__PURE__ */ p(lr, {
|
|
3188
3195
|
format: "italic",
|
|
3189
3196
|
icon: I
|
|
3190
3197
|
}),
|
|
3191
|
-
|
|
3198
|
+
X("underline") && /* @__PURE__ */ p(lr, {
|
|
3192
3199
|
format: "underline",
|
|
3193
3200
|
icon: W
|
|
3194
3201
|
}),
|
|
3195
|
-
|
|
3202
|
+
X("code") && /* @__PURE__ */ p(lr, {
|
|
3196
3203
|
format: "code",
|
|
3197
3204
|
icon: E
|
|
3198
3205
|
}),
|
|
3199
|
-
|
|
3206
|
+
X("left") && /* @__PURE__ */ p(Zn, {
|
|
3200
3207
|
format: "left",
|
|
3201
3208
|
icon: v
|
|
3202
3209
|
}),
|
|
3203
|
-
|
|
3210
|
+
X("right") && /* @__PURE__ */ p(Zn, {
|
|
3204
3211
|
format: "right",
|
|
3205
3212
|
icon: y
|
|
3206
3213
|
}),
|
|
3207
|
-
|
|
3214
|
+
X("center") && /* @__PURE__ */ p(Zn, {
|
|
3208
3215
|
format: "center",
|
|
3209
3216
|
icon: g
|
|
3210
3217
|
}),
|
|
3211
|
-
|
|
3218
|
+
X("justify") && /* @__PURE__ */ p(Zn, {
|
|
3212
3219
|
format: "justify",
|
|
3213
3220
|
icon: _
|
|
3214
3221
|
}),
|
|
3215
|
-
r &&
|
|
3216
|
-
|
|
3222
|
+
r && X("image") && /* @__PURE__ */ p(ir, { ...r }),
|
|
3223
|
+
X("video") && /* @__PURE__ */ p(ar, { ...a })
|
|
3217
3224
|
] }),
|
|
3218
|
-
/* @__PURE__ */ p(
|
|
3225
|
+
/* @__PURE__ */ p(_e, {
|
|
3219
3226
|
className: "editorContainer",
|
|
3220
|
-
renderElement:
|
|
3221
|
-
renderLeaf:
|
|
3227
|
+
renderElement: J,
|
|
3228
|
+
renderLeaf: te,
|
|
3222
3229
|
spellCheck: !0,
|
|
3223
|
-
ref:
|
|
3224
|
-
id:
|
|
3225
|
-
onFocus: () =>
|
|
3226
|
-
onBlur: () =>
|
|
3230
|
+
ref: G,
|
|
3231
|
+
id: K,
|
|
3232
|
+
onFocus: () => U(!0),
|
|
3233
|
+
onBlur: () => U(!1),
|
|
3227
3234
|
onKeyDown: (e) => {
|
|
3228
|
-
for (let t in
|
|
3235
|
+
for (let t in Kn) if (le(t, e)) {
|
|
3229
3236
|
e.preventDefault();
|
|
3230
|
-
let n =
|
|
3231
|
-
|
|
3237
|
+
let n = Kn[t];
|
|
3238
|
+
cr(j, n);
|
|
3232
3239
|
}
|
|
3233
3240
|
}
|
|
3234
3241
|
}),
|
|
3235
|
-
|
|
3242
|
+
Y < 0 && /* @__PURE__ */ p("div", {
|
|
3236
3243
|
className: "restatesCharacters",
|
|
3237
|
-
children:
|
|
3244
|
+
children: Y
|
|
3238
3245
|
})
|
|
3239
3246
|
]
|
|
3240
3247
|
}),
|
|
3241
3248
|
/* @__PURE__ */ p("input", {
|
|
3242
3249
|
type: "hidden",
|
|
3243
3250
|
name: t,
|
|
3244
|
-
value:
|
|
3251
|
+
value: z.slice(0, S)
|
|
3245
3252
|
}),
|
|
3246
3253
|
/* @__PURE__ */ p("input", {
|
|
3247
3254
|
type: "hidden",
|
|
3248
3255
|
name: `${t}Count`,
|
|
3249
|
-
value:
|
|
3256
|
+
value: L
|
|
3250
3257
|
})
|
|
3251
3258
|
]
|
|
3252
|
-
})
|
|
3253
|
-
|
|
3254
|
-
] });
|
|
3259
|
+
})
|
|
3260
|
+
});
|
|
3255
3261
|
}
|
|
3256
3262
|
//#endregion
|
|
3257
3263
|
//#region src/components/searchPlaces.tsx
|
|
3258
|
-
function
|
|
3264
|
+
function pr(e) {
|
|
3259
3265
|
let { onChange: t, onPlaceChanged: n, options: r, ...i } = e, [a, o] = u(null);
|
|
3260
|
-
return /* @__PURE__ */ p(
|
|
3266
|
+
return /* @__PURE__ */ p(xe, {
|
|
3261
3267
|
onLoad: (e) => o(e),
|
|
3262
3268
|
onPlacesChanged: () => {
|
|
3263
3269
|
let e = a?.getPlaces(), t = e ? e[0] : null, r = t?.address_components;
|
|
@@ -3298,7 +3304,7 @@ function ur(e) {
|
|
|
3298
3304
|
}
|
|
3299
3305
|
},
|
|
3300
3306
|
options: r,
|
|
3301
|
-
children: /* @__PURE__ */ p(
|
|
3307
|
+
children: /* @__PURE__ */ p(st, {
|
|
3302
3308
|
type: "text",
|
|
3303
3309
|
autoComplete: "off",
|
|
3304
3310
|
onChange: (e) => t && t(e.target.value),
|
|
@@ -3308,36 +3314,38 @@ function ur(e) {
|
|
|
3308
3314
|
}
|
|
3309
3315
|
//#endregion
|
|
3310
3316
|
//#region src/components/switch/index.tsx
|
|
3311
|
-
function
|
|
3312
|
-
let { label: t, size: n = "lg", defaultChecked: r = !1, checked: i = null, value: a, unCheckedValue: o = "", name: c, className: d = "", onCheck: f, id:
|
|
3313
|
-
function
|
|
3314
|
-
|
|
3315
|
-
}
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3317
|
+
function mr(e) {
|
|
3318
|
+
let { label: t, size: n = "lg", defaultChecked: r = !1, checked: i = null, value: a, unCheckedValue: o = "", name: c, className: d = "", onCheck: f, id: m, orientation: h = "horizontalReverse", className: g = "", showAsterisk: _, errorMessage: v, unShowFieldTemplate: y = !1, ...b } = e, x = l(null), S = m || s(), [C, w] = u(r), T = typeof i == "boolean" ? i : C;
|
|
3319
|
+
function E() {
|
|
3320
|
+
w(!C), f && f(T ? o : a || "checked");
|
|
3321
|
+
}
|
|
3322
|
+
return /* @__PURE__ */ p(et, {
|
|
3323
|
+
name: c,
|
|
3324
|
+
label: t,
|
|
3325
|
+
showAsterisk: _,
|
|
3326
|
+
className: g,
|
|
3327
|
+
errorMessage: v,
|
|
3328
|
+
unShowFieldTemplate: y,
|
|
3329
|
+
orientation: h,
|
|
3330
|
+
children: /* @__PURE__ */ p("button", {
|
|
3323
3331
|
type: "button",
|
|
3324
|
-
onClick:
|
|
3325
|
-
className:
|
|
3326
|
-
...
|
|
3332
|
+
onClick: E,
|
|
3333
|
+
className: `arkynSwitch ${T ? "checkedTrue" : "checkedFalse"} ${n} ${d}`,
|
|
3334
|
+
...b,
|
|
3327
3335
|
children: /* @__PURE__ */ p("input", {
|
|
3328
|
-
id:
|
|
3336
|
+
id: S,
|
|
3329
3337
|
type: "hidden",
|
|
3330
3338
|
name: c,
|
|
3331
|
-
ref:
|
|
3332
|
-
onClick:
|
|
3333
|
-
value:
|
|
3339
|
+
ref: x,
|
|
3340
|
+
onClick: E,
|
|
3341
|
+
value: T ? a || "checked" : o
|
|
3334
3342
|
})
|
|
3335
|
-
})
|
|
3343
|
+
})
|
|
3336
3344
|
});
|
|
3337
3345
|
}
|
|
3338
3346
|
//#endregion
|
|
3339
3347
|
//#region src/components/table/tableBody/index.tsx
|
|
3340
|
-
function
|
|
3348
|
+
function hr(t) {
|
|
3341
3349
|
let { emptyMessage: n = "Nenhum dado adicionado.", className: r, children: i, ...a } = t, o = `arkynTableBody ${r}`, s = e.count(i) === 0;
|
|
3342
3350
|
return /* @__PURE__ */ p("tbody", {
|
|
3343
3351
|
className: o.trim(),
|
|
@@ -3353,7 +3361,7 @@ function fr(t) {
|
|
|
3353
3361
|
}
|
|
3354
3362
|
//#endregion
|
|
3355
3363
|
//#region src/components/table/tableCaption/index.tsx
|
|
3356
|
-
function
|
|
3364
|
+
function gr(e) {
|
|
3357
3365
|
let { className: t, children: n, ...r } = e;
|
|
3358
3366
|
return /* @__PURE__ */ p("caption", {
|
|
3359
3367
|
className: `arkynTableCaption ${t}`.trim(),
|
|
@@ -3366,7 +3374,7 @@ function pr(e) {
|
|
|
3366
3374
|
}
|
|
3367
3375
|
//#endregion
|
|
3368
3376
|
//#region src/components/table/tableContainer/index.tsx
|
|
3369
|
-
function
|
|
3377
|
+
function _r(e) {
|
|
3370
3378
|
let { children: t, className: n, ...r } = e;
|
|
3371
3379
|
return /* @__PURE__ */ p("div", {
|
|
3372
3380
|
className: `arkynTableContainer ${n}`.trim(),
|
|
@@ -3376,7 +3384,7 @@ function mr(e) {
|
|
|
3376
3384
|
}
|
|
3377
3385
|
//#endregion
|
|
3378
3386
|
//#region src/components/table/tableFooter/index.tsx
|
|
3379
|
-
function
|
|
3387
|
+
function vr(e) {
|
|
3380
3388
|
let { className: t, children: n, ...r } = e;
|
|
3381
3389
|
return /* @__PURE__ */ m("tfoot", {
|
|
3382
3390
|
className: `arkynTableFooter ${t}`.trim(),
|
|
@@ -3392,7 +3400,7 @@ function hr(e) {
|
|
|
3392
3400
|
}
|
|
3393
3401
|
//#endregion
|
|
3394
3402
|
//#region src/components/table/tableHeader/index.tsx
|
|
3395
|
-
function
|
|
3403
|
+
function yr(e) {
|
|
3396
3404
|
let { className: t, children: n, ...r } = e;
|
|
3397
3405
|
return /* @__PURE__ */ m("thead", {
|
|
3398
3406
|
className: `arkynTableHeader ${t}`.trim(),
|
|
@@ -3402,8 +3410,8 @@ function gr(e) {
|
|
|
3402
3410
|
}
|
|
3403
3411
|
//#endregion
|
|
3404
3412
|
//#region src/components/textarea/index.tsx
|
|
3405
|
-
function
|
|
3406
|
-
let { variant: t = "solid", size: n = "md", className: r, errorMessage: i, disabled: a = !1, readOnly: o = !1, label: c, showAsterisk: d, name: f, onFocus: h, onBlur: g, title: _, style: v, value: y, defaultValue: b, placeholder: x, id: S, ...C } = e, { fieldErrors: w } =
|
|
3413
|
+
function br(e) {
|
|
3414
|
+
let { variant: t = "solid", size: n = "md", className: r, errorMessage: i, disabled: a = !1, readOnly: o = !1, label: c, showAsterisk: d, name: f, onFocus: h, onBlur: g, title: _, style: v, value: y, defaultValue: b, placeholder: x, id: S, ...C } = e, { fieldErrors: w } = Z(), [T, E] = u(!1), D = l(null), O = S || s(), k = i || w?.[f], A = `arkynTextarea ${t} ${n} ${a || o ? "opacityTrue" : "opacityFalse"} ${k ? "errorTrue" : "errorFalse"} ${T ? "focusedTrue" : "focusedFalse"}`;
|
|
3407
3415
|
function j() {
|
|
3408
3416
|
a || !D?.current || (E(!0), D.current.focus());
|
|
3409
3417
|
}
|
|
@@ -3413,10 +3421,10 @@ function _r(e) {
|
|
|
3413
3421
|
function N(e) {
|
|
3414
3422
|
E(!1), g && g(e);
|
|
3415
3423
|
}
|
|
3416
|
-
return /* @__PURE__ */ m(
|
|
3424
|
+
return /* @__PURE__ */ m(Ve, {
|
|
3417
3425
|
className: r,
|
|
3418
3426
|
children: [
|
|
3419
|
-
c && /* @__PURE__ */ p(
|
|
3427
|
+
c && /* @__PURE__ */ p(Be, {
|
|
3420
3428
|
htmlFor: O,
|
|
3421
3429
|
showAsterisk: d,
|
|
3422
3430
|
children: c
|
|
@@ -3440,14 +3448,14 @@ function _r(e) {
|
|
|
3440
3448
|
...C
|
|
3441
3449
|
})
|
|
3442
3450
|
}),
|
|
3443
|
-
k && /* @__PURE__ */ p(
|
|
3451
|
+
k && /* @__PURE__ */ p(ze, { children: k })
|
|
3444
3452
|
]
|
|
3445
3453
|
});
|
|
3446
3454
|
}
|
|
3447
3455
|
//#endregion
|
|
3448
3456
|
//#region src/providers/modalProvider.tsx
|
|
3449
|
-
var
|
|
3450
|
-
function
|
|
3457
|
+
var xr = n({});
|
|
3458
|
+
function Sr(e) {
|
|
3451
3459
|
let { children: t = !1 } = e, [n, r] = u([]);
|
|
3452
3460
|
function i(e) {
|
|
3453
3461
|
return !!n.some((t) => t.key === e);
|
|
@@ -3470,7 +3478,7 @@ function yr(e) {
|
|
|
3470
3478
|
function c() {
|
|
3471
3479
|
r([]);
|
|
3472
3480
|
}
|
|
3473
|
-
return /* @__PURE__ */ p(
|
|
3481
|
+
return /* @__PURE__ */ p(xr.Provider, {
|
|
3474
3482
|
value: {
|
|
3475
3483
|
modalIsOpen: i,
|
|
3476
3484
|
modalData: a,
|
|
@@ -3483,8 +3491,8 @@ function yr(e) {
|
|
|
3483
3491
|
}
|
|
3484
3492
|
//#endregion
|
|
3485
3493
|
//#region src/hooks/useModal.ts
|
|
3486
|
-
function
|
|
3487
|
-
let t = a(
|
|
3494
|
+
function Cr(e) {
|
|
3495
|
+
let t = a(xr);
|
|
3488
3496
|
if (Object.entries(t).length === 0) throw Error("useModal must be used within a Provider");
|
|
3489
3497
|
if (e) {
|
|
3490
3498
|
let { modalData: n, modalIsOpen: r, openModal: i, closeModal: a } = t;
|
|
@@ -3498,11 +3506,11 @@ function br(e) {
|
|
|
3498
3506
|
}
|
|
3499
3507
|
//#endregion
|
|
3500
3508
|
//#region src/providers/toastProvider.tsx
|
|
3501
|
-
var
|
|
3502
|
-
function
|
|
3509
|
+
var wr = n({});
|
|
3510
|
+
function Tr({ children: e }) {
|
|
3503
3511
|
function t(e) {
|
|
3504
3512
|
switch (e.type) {
|
|
3505
|
-
case "success": return
|
|
3513
|
+
case "success": return we.success(e.message, {
|
|
3506
3514
|
style: {
|
|
3507
3515
|
background: "#10B981",
|
|
3508
3516
|
color: "#ffffff",
|
|
@@ -3515,7 +3523,7 @@ function Sr({ children: e }) {
|
|
|
3515
3523
|
secondary: "#ffffff"
|
|
3516
3524
|
}
|
|
3517
3525
|
});
|
|
3518
|
-
case "danger": return
|
|
3526
|
+
case "danger": return we.error(e.message, {
|
|
3519
3527
|
style: {
|
|
3520
3528
|
background: "#E11D48",
|
|
3521
3529
|
color: "#ffffff",
|
|
@@ -3530,9 +3538,9 @@ function Sr({ children: e }) {
|
|
|
3530
3538
|
});
|
|
3531
3539
|
}
|
|
3532
3540
|
}
|
|
3533
|
-
return /* @__PURE__ */ m(
|
|
3541
|
+
return /* @__PURE__ */ m(wr.Provider, {
|
|
3534
3542
|
value: { showToast: t },
|
|
3535
|
-
children: [/* @__PURE__ */ p(
|
|
3543
|
+
children: [/* @__PURE__ */ p(Te, {
|
|
3536
3544
|
position: "top-right",
|
|
3537
3545
|
containerStyle: { zIndex: 999999999999999 }
|
|
3538
3546
|
}), e]
|
|
@@ -3540,14 +3548,14 @@ function Sr({ children: e }) {
|
|
|
3540
3548
|
}
|
|
3541
3549
|
//#endregion
|
|
3542
3550
|
//#region src/hooks/useToast.ts
|
|
3543
|
-
function
|
|
3544
|
-
let e = a(
|
|
3551
|
+
function Er() {
|
|
3552
|
+
let e = a(wr);
|
|
3545
3553
|
if (Object.entries(e).length === 0) throw Error("useToast must be used within a Provider");
|
|
3546
3554
|
return e;
|
|
3547
3555
|
}
|
|
3548
3556
|
//#endregion
|
|
3549
3557
|
//#region src/templates/badResponses.ts
|
|
3550
|
-
var
|
|
3558
|
+
var Dr = [
|
|
3551
3559
|
"BadGateway",
|
|
3552
3560
|
"BadRequest",
|
|
3553
3561
|
"Conflict",
|
|
@@ -3557,7 +3565,7 @@ var wr = [
|
|
|
3557
3565
|
"ServerError",
|
|
3558
3566
|
"Unauthorized",
|
|
3559
3567
|
"UnprocessableEntity"
|
|
3560
|
-
],
|
|
3568
|
+
], Or = [
|
|
3561
3569
|
"Created",
|
|
3562
3570
|
"Found",
|
|
3563
3571
|
"Success",
|
|
@@ -3565,28 +3573,37 @@ var wr = [
|
|
|
3565
3573
|
];
|
|
3566
3574
|
//#endregion
|
|
3567
3575
|
//#region src/hooks/useAutomation.ts
|
|
3568
|
-
function
|
|
3569
|
-
let { closeAll: t } =
|
|
3576
|
+
function kr(e) {
|
|
3577
|
+
let { closeAll: t } = Cr(), { showToast: n } = Er(), r = e?.closeModal, i = e?.message, a = e?.name, s = e?.cause?.data?.scrollTo, c = e?.cause?.fieldErrors ? Object.values(e?.cause?.fieldErrors)[0] : null;
|
|
3578
|
+
function l() {
|
|
3579
|
+
if (!(!i && !c)) {
|
|
3580
|
+
if (Or.includes(a)) return n({
|
|
3581
|
+
message: i,
|
|
3582
|
+
type: "success"
|
|
3583
|
+
});
|
|
3584
|
+
if (Dr.includes(a)) {
|
|
3585
|
+
if (c) return n({
|
|
3586
|
+
message: c,
|
|
3587
|
+
type: "danger"
|
|
3588
|
+
});
|
|
3589
|
+
if (i !== "Unprocessable entity") return n({
|
|
3590
|
+
message: i,
|
|
3591
|
+
type: "danger"
|
|
3592
|
+
});
|
|
3593
|
+
}
|
|
3594
|
+
}
|
|
3595
|
+
}
|
|
3570
3596
|
o(() => {
|
|
3571
|
-
r && t(),
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
}),
|
|
3575
|
-
message: i,
|
|
3576
|
-
type: "danger"
|
|
3577
|
-
}), wr.includes(a) && !wr.includes(i) && n({
|
|
3578
|
-
message: i,
|
|
3579
|
-
type: "danger"
|
|
3580
|
-
}), Tr.includes(a) && !Tr.includes(i) && n({
|
|
3581
|
-
message: i,
|
|
3582
|
-
type: "success"
|
|
3583
|
-
}));
|
|
3597
|
+
r && t(), s && Ce.scrollTo(s, {
|
|
3598
|
+
smooth: !0,
|
|
3599
|
+
offset: 20
|
|
3600
|
+
}), l();
|
|
3584
3601
|
}, [e]);
|
|
3585
3602
|
}
|
|
3586
3603
|
//#endregion
|
|
3587
3604
|
//#region src/providers/drawerProvider.tsx
|
|
3588
|
-
var
|
|
3589
|
-
function
|
|
3605
|
+
var Ar = n({});
|
|
3606
|
+
function jr(e) {
|
|
3590
3607
|
let { children: t = !1 } = e, [n, r] = u([]);
|
|
3591
3608
|
function i(e) {
|
|
3592
3609
|
return !!n.some((t) => t.key === e);
|
|
@@ -3606,7 +3623,7 @@ function Or(e) {
|
|
|
3606
3623
|
function s(e) {
|
|
3607
3624
|
r(n.filter((t) => t.key !== e));
|
|
3608
3625
|
}
|
|
3609
|
-
return /* @__PURE__ */ p(
|
|
3626
|
+
return /* @__PURE__ */ p(Ar.Provider, {
|
|
3610
3627
|
value: {
|
|
3611
3628
|
drawerIsOpen: i,
|
|
3612
3629
|
drawerData: a,
|
|
@@ -3618,8 +3635,8 @@ function Or(e) {
|
|
|
3618
3635
|
}
|
|
3619
3636
|
//#endregion
|
|
3620
3637
|
//#region src/hooks/useDrawer.ts
|
|
3621
|
-
function
|
|
3622
|
-
let t = a(
|
|
3638
|
+
function Mr(e) {
|
|
3639
|
+
let t = a(Ar);
|
|
3623
3640
|
if (Object.entries(t).length === 0) throw Error("useDrawer must be used within a Provider");
|
|
3624
3641
|
if (e) {
|
|
3625
3642
|
let { drawerData: n, drawerIsOpen: r, openDrawer: i, closeDrawer: a } = t;
|
|
@@ -3633,7 +3650,7 @@ function kr(e) {
|
|
|
3633
3650
|
}
|
|
3634
3651
|
//#endregion
|
|
3635
3652
|
//#region src/hooks/useScopedParams.ts
|
|
3636
|
-
function
|
|
3653
|
+
function Nr(e, t = "") {
|
|
3637
3654
|
let n = new URLSearchParams(e), r = t ? `${t}:` : "", i = (e) => {
|
|
3638
3655
|
Object.entries(e).forEach(([e, t]) => {
|
|
3639
3656
|
t === void 0 ? n.delete(`${r}${e}`) : n.set(`${r}${e}`, String(t));
|
|
@@ -3650,8 +3667,8 @@ function Ar(e, t = "") {
|
|
|
3650
3667
|
}
|
|
3651
3668
|
//#endregion
|
|
3652
3669
|
//#region src/hooks/useSearchAutomation.ts
|
|
3653
|
-
function
|
|
3654
|
-
let { closeAll: n } =
|
|
3670
|
+
function Pr(e, t = "") {
|
|
3671
|
+
let { closeAll: n } = Cr(), { showToast: r } = Er(), { getParam: i } = Nr(e, t), a = i("closeModal") === "true", s = i("message"), c = i("name"), l = i("type");
|
|
3655
3672
|
o(() => {
|
|
3656
3673
|
a && n(), s && (l === "success" && r({
|
|
3657
3674
|
message: s,
|
|
@@ -3659,10 +3676,10 @@ function jr(e, t = "") {
|
|
|
3659
3676
|
}), l === "danger" && r({
|
|
3660
3677
|
message: s,
|
|
3661
3678
|
type: "danger"
|
|
3662
|
-
}), c &&
|
|
3679
|
+
}), c && Dr.includes(c) && !Dr.includes(s) && r({
|
|
3663
3680
|
message: s,
|
|
3664
3681
|
type: "danger"
|
|
3665
|
-
}), c &&
|
|
3682
|
+
}), c && Or.includes(c) && !Or.includes(s) && r({
|
|
3666
3683
|
message: s,
|
|
3667
3684
|
type: "success"
|
|
3668
3685
|
}));
|
|
@@ -3675,28 +3692,28 @@ function jr(e, t = "") {
|
|
|
3675
3692
|
}
|
|
3676
3693
|
//#endregion
|
|
3677
3694
|
//#region src/providers/placesProvider.tsx
|
|
3678
|
-
var
|
|
3695
|
+
var Fr = [
|
|
3679
3696
|
"places",
|
|
3680
3697
|
"marker",
|
|
3681
3698
|
"maps"
|
|
3682
3699
|
];
|
|
3683
|
-
function
|
|
3684
|
-
let { apiKey: t, children: n, preventFontsLoading: r = !0 } = e, { isLoaded: i } =
|
|
3700
|
+
function Ir(e) {
|
|
3701
|
+
let { apiKey: t, children: n, preventFontsLoading: r = !0 } = e, { isLoaded: i } = Se({
|
|
3685
3702
|
googleMapsApiKey: t,
|
|
3686
|
-
libraries:
|
|
3703
|
+
libraries: Fr,
|
|
3687
3704
|
preventGoogleFontsLoading: r
|
|
3688
3705
|
});
|
|
3689
3706
|
return /* @__PURE__ */ p(f, { children: n(i) });
|
|
3690
3707
|
}
|
|
3691
3708
|
//#endregion
|
|
3692
3709
|
//#region src/utils/richTextUtilities.ts
|
|
3693
|
-
function
|
|
3694
|
-
if (
|
|
3710
|
+
function Lr(e) {
|
|
3711
|
+
if (pe.isText(e)) {
|
|
3695
3712
|
let t = e?.text;
|
|
3696
3713
|
return e?.bold && (t = `<strong>${t}</strong>`), e?.code && (t = `<code>${t}</code>`), e?.italic && (t = `<em>${t}</em>`), e?.underline && (t = `<u>${t}</u>`), t;
|
|
3697
3714
|
}
|
|
3698
|
-
if (
|
|
3699
|
-
let t = e.children?.map((e) =>
|
|
3715
|
+
if (de.isElement(e)) {
|
|
3716
|
+
let t = e.children?.map((e) => Lr(e)).join(""), n = e.align || "left";
|
|
3700
3717
|
switch (e.type) {
|
|
3701
3718
|
case "video": return `<iframe src="${e.src}" class="align_${n}" />`;
|
|
3702
3719
|
case "image": return `<img src="${e.src}" class="align_${n}" />`;
|
|
@@ -3712,9 +3729,9 @@ function Pr(e) {
|
|
|
3712
3729
|
}
|
|
3713
3730
|
return "";
|
|
3714
3731
|
}
|
|
3715
|
-
function
|
|
3732
|
+
function Rr(e) {
|
|
3716
3733
|
if (typeof e == "string") return { text: e };
|
|
3717
|
-
let t = Array.isArray(e.props.children) ? e.props.children.map((e) =>
|
|
3734
|
+
let t = Array.isArray(e.props.children) ? e.props.children.map((e) => Rr(e)) : [{ text: e.props.children || "" }], n = e.props.className?.replace("align_", "");
|
|
3718
3735
|
switch (e.type) {
|
|
3719
3736
|
case "img": return {
|
|
3720
3737
|
type: "image",
|
|
@@ -3778,14 +3795,14 @@ function Fr(e) {
|
|
|
3778
3795
|
}
|
|
3779
3796
|
//#endregion
|
|
3780
3797
|
//#region src/services/toHtml.ts
|
|
3781
|
-
function
|
|
3782
|
-
return e.map((e) =>
|
|
3798
|
+
function zr(e) {
|
|
3799
|
+
return e.map((e) => Lr(e)).join("");
|
|
3783
3800
|
}
|
|
3784
3801
|
//#endregion
|
|
3785
3802
|
//#region src/services/toRichTextValue.ts
|
|
3786
|
-
function
|
|
3787
|
-
let t =
|
|
3788
|
-
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? { text: e } :
|
|
3803
|
+
function Br(e) {
|
|
3804
|
+
let t = Ee(e);
|
|
3805
|
+
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? { text: e } : Rr(e)) : typeof t == "string" ? [{ text: t }] : [Rr(t)];
|
|
3789
3806
|
}
|
|
3790
3807
|
//#endregion
|
|
3791
|
-
export {
|
|
3808
|
+
export { Ae as AlertContainer, je as AlertContent, Me as AlertDescription, Ne as AlertIcon, De as AlertTitle, Ie as AudioPlayer, qe as AudioUpload, Je as Badge, $ as Button, _t as Calendar, xt as CardTabButton, St as CardTabContainer, Ct as Checkbox, Et as ClientOnly, kt as CurrencyInput, He as Divider, Nt as DrawerContainer, Pt as DrawerHeader, jr as DrawerProvider, Lt as FacebookPixel, ze as FieldError, Be as FieldLabel, Ve as FieldWrapper, Bt as FileUpload, Re as FormProvider, Wt as GoogleAnalytics, Yt as GoogleTagManager, Ue as IconButton, Qt as ImageUpload, st as Input, tn as MapView, rn as MaskedInput, cn as ModalContainer, ln as ModalFooter, un as ModalHeader, Sr as ModalProvider, yn as MultiSelect, Tn as Pagination, Rn as PhoneInput, Ir as PlacesProvider, zn as Popover, Un as RadioBox, Wn as RadioGroup, fr as RichText, pr as SearchPlaces, dt as Select, Fe as Slider, mr as Switch, nr as TabButton, rr as TabContainer, hr as TableBody, gr as TableCaption, _r as TableContainer, vr as TableFooter, yr as TableHeader, br as Textarea, Tr as ToastProvider, We as Tooltip, zr as toHtml, Br as toRichTextValue, kr as useAutomation, Mr as useDrawer, Z as useForm, Tt as useHydrated, Cr as useModal, Nr as useScopedParams, ot as useScrollLock, Pr as useSearchAutomation, Pe as useSlider, Er as useToast };
|