@arkyn/components 3.0.4 → 3.0.6
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/components/richText/index.d.ts +11 -1
- package/dist/components/richText/index.d.ts.map +1 -1
- package/dist/components/richText/insertLink/index.d.ts +5 -0
- package/dist/components/richText/insertLink/index.d.ts.map +1 -0
- package/dist/components/richText/insertVideo/index.d.ts.map +1 -1
- package/dist/components/richText/leaf/index.d.ts +1 -0
- package/dist/components/richText/leaf/index.d.ts.map +1 -1
- package/dist/index.js +723 -637
- package/dist/index.js.map +1 -1
- package/dist/modules/components/richText/index.js +80 -76
- package/dist/modules/components/richText/index.js.map +1 -1
- package/dist/modules/components/richText/insertLink/index.js +68 -0
- package/dist/modules/components/richText/insertLink/index.js.map +1 -0
- package/dist/modules/components/richText/insertLink/styles.css +1 -0
- package/dist/modules/components/richText/insertVideo/index.js +45 -41
- package/dist/modules/components/richText/insertVideo/index.js.map +1 -1
- package/dist/modules/components/richText/leaf/index.js +6 -1
- package/dist/modules/components/richText/leaf/index.js.map +1 -1
- package/dist/modules/components/richText/leaf/styles.css +1 -0
- package/dist/modules/components/richText/styles.css +4 -0
- package/dist/modules/services/clearLinkMarkAtBoundary.js +12 -0
- package/dist/modules/services/clearLinkMarkAtBoundary.js.map +1 -0
- package/dist/modules/services/isValidHttpsUrl.js +12 -0
- package/dist/modules/services/isValidHttpsUrl.js.map +1 -0
- package/dist/modules/utils/richTextUtilities.js +24 -17
- package/dist/modules/utils/richTextUtilities.js.map +1 -1
- package/dist/services/clearLinkMarkAtBoundary.d.ts +4 -0
- package/dist/services/clearLinkMarkAtBoundary.d.ts.map +1 -0
- package/dist/services/isValidHttpsUrl.d.ts +3 -0
- package/dist/services/isValidHttpsUrl.d.ts.map +1 -0
- package/dist/style.css +1 -1
- package/dist/types/richTextTypes.d.ts +13 -2
- package/dist/types/richTextTypes.d.ts.map +1 -1
- package/dist/utils/richTextUtilities.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
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,
|
|
4
|
-
import { findCountryMask as
|
|
5
|
-
import
|
|
6
|
-
import { createRoot as
|
|
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, Link as L, Loader2 as R, MapPinned as z, Pause as B, Play as V, Quote as H, RefreshCw as U, Search as W, Underline as G, Video as K, X as q, XCircle as ee } from "lucide-react";
|
|
4
|
+
import { findCountryMask as te, formatToCapitalizeFirstWordLetter as J, formatToCurrency as ne, formatToPhone as re, removeNonNumeric as ie } from "@arkyn/shared";
|
|
5
|
+
import ae from "mapbox-gl";
|
|
6
|
+
import { createRoot as oe } from "react-dom/client";
|
|
7
7
|
import { InputMask as Y } from "@react-input/mask";
|
|
8
|
-
import { countries as
|
|
9
|
-
import
|
|
10
|
-
import { Editor as
|
|
11
|
-
import { withHistory as
|
|
12
|
-
import { Editable as
|
|
13
|
-
import { StandaloneSearchBox as
|
|
14
|
-
import { scroller as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
8
|
+
import { countries as se } from "@arkyn/templates";
|
|
9
|
+
import { isHotkey as ce } from "is-hotkey";
|
|
10
|
+
import { Editor as X, Element as le, Node as ue, Range as de, Text as fe, Transforms as pe, createEditor as me } from "slate";
|
|
11
|
+
import { withHistory as he } from "slate-history";
|
|
12
|
+
import { Editable as ge, Slate as _e, useSlate as ve, withReact as ye } from "slate-react";
|
|
13
|
+
import { StandaloneSearchBox as be, useLoadScript as xe } from "@react-google-maps/api";
|
|
14
|
+
import { scroller as Se } from "react-scroll";
|
|
15
|
+
import Ce, { Toaster as we } from "react-hot-toast";
|
|
16
|
+
import Te from "html-react-parser";
|
|
17
17
|
//#region src/components/alert/alertTitle/index.tsx
|
|
18
|
-
function
|
|
18
|
+
function Ee(e) {
|
|
19
19
|
let { className: t, ...n } = e;
|
|
20
20
|
return /* @__PURE__ */ p("div", {
|
|
21
21
|
className: `arkynAlertTitle ${t}`.trim(),
|
|
@@ -24,18 +24,18 @@ function Te(e) {
|
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/components/alert/alertContainer/index.tsx
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return a(
|
|
27
|
+
var De = n({});
|
|
28
|
+
function Oe() {
|
|
29
|
+
return a(De);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function ke(e) {
|
|
32
32
|
let { scheme: t, children: n, className: r, ...i } = e, a = `arkynAlertContainer ${t} ${((e) => {
|
|
33
33
|
let t = !1, n = (e) => {
|
|
34
|
-
Array.isArray(e) ? e.forEach(n) : e && typeof e == "object" && "type" in e && (e.type ===
|
|
34
|
+
Array.isArray(e) ? e.forEach(n) : e && typeof e == "object" && "type" in e && (e.type === Ee ? t = !0 : e.props && typeof e.props == "object" && e.props !== null && "children" in e.props && n(e.props.children));
|
|
35
35
|
};
|
|
36
36
|
return n(e), t;
|
|
37
37
|
})(n) ? "existsAlertTitle" : "nonExistsAlertTitle"} ${r}`, o = c(() => ({ scheme: t }), [t]);
|
|
38
|
-
return /* @__PURE__ */ p(
|
|
38
|
+
return /* @__PURE__ */ p(De.Provider, {
|
|
39
39
|
value: o,
|
|
40
40
|
children: /* @__PURE__ */ p("div", {
|
|
41
41
|
className: a.trim(),
|
|
@@ -46,7 +46,7 @@ function Oe(e) {
|
|
|
46
46
|
}
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/components/alert/alertContent/index.tsx
|
|
49
|
-
function
|
|
49
|
+
function Ae(e) {
|
|
50
50
|
let { className: t, ...n } = e;
|
|
51
51
|
return /* @__PURE__ */ p("div", {
|
|
52
52
|
className: `arkynAlertContent ${t}`.trim(),
|
|
@@ -55,7 +55,7 @@ function ke(e) {
|
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/components/alert/alertDescription/index.tsx
|
|
58
|
-
function
|
|
58
|
+
function je(e) {
|
|
59
59
|
let { className: t, ...n } = e;
|
|
60
60
|
return /* @__PURE__ */ p("div", {
|
|
61
61
|
className: `arkynAlertDescription ${t}`.trim(),
|
|
@@ -64,14 +64,14 @@ function Ae(e) {
|
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region src/components/alert/alertIcon/index.tsx
|
|
67
|
-
function
|
|
68
|
-
let { className: t, ...n } = e, { scheme: r } =
|
|
67
|
+
function Me(e) {
|
|
68
|
+
let { className: t, ...n } = e, { scheme: r } = Oe(), i = `arkynAlertIcon ${r} ${t}`;
|
|
69
69
|
switch (r) {
|
|
70
70
|
case "success": return /* @__PURE__ */ p(S, {
|
|
71
71
|
className: i,
|
|
72
72
|
...n
|
|
73
73
|
});
|
|
74
|
-
case "danger": return /* @__PURE__ */ p(
|
|
74
|
+
case "danger": return /* @__PURE__ */ p(ee, {
|
|
75
75
|
className: i,
|
|
76
76
|
...n
|
|
77
77
|
});
|
|
@@ -87,7 +87,7 @@ function je(e) {
|
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/hooks/useSlider.ts
|
|
90
|
-
function
|
|
90
|
+
function Ne(e) {
|
|
91
91
|
function t() {
|
|
92
92
|
return !e || e <= 0 ? 0 : e >= 100 ? 100 : e;
|
|
93
93
|
}
|
|
@@ -99,7 +99,7 @@ function Me(e) {
|
|
|
99
99
|
}
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region src/components/slider/index.tsx
|
|
102
|
-
function
|
|
102
|
+
function Pe(e) {
|
|
103
103
|
let { onChange: t, value: n, disabled: r = !1, onDragging: a, className: s = "", ...c } = e, [d, f] = u(!1), h = l(null), g = () => f(!0), _ = i(() => f(!1), []), v = i((e) => {
|
|
104
104
|
if (r || !d || !h.current) return;
|
|
105
105
|
let n = h.current.getBoundingClientRect(), i = e.clientX - n.left;
|
|
@@ -139,8 +139,8 @@ function Ne(e) {
|
|
|
139
139
|
}
|
|
140
140
|
//#endregion
|
|
141
141
|
//#region src/components/audioPlayer/index.tsx
|
|
142
|
-
function
|
|
143
|
-
let { onPlayAudio: t, onPauseAudio: n, disabled: r, style: i, ...a } = e, [s, c] =
|
|
142
|
+
function Fe(e) {
|
|
143
|
+
let { onPlayAudio: t, onPauseAudio: n, disabled: r, style: i, ...a } = e, [s, c] = Ne(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 = {
|
|
144
144
|
totalTime: y,
|
|
145
145
|
currentTime: v,
|
|
146
146
|
formattedCurrentTime: b,
|
|
@@ -192,10 +192,10 @@ function Pe(e) {
|
|
|
192
192
|
type: "button",
|
|
193
193
|
disabled: r,
|
|
194
194
|
onClick: E,
|
|
195
|
-
children: [d && /* @__PURE__ */ p(
|
|
195
|
+
children: [d && /* @__PURE__ */ p(B, {}), !d && /* @__PURE__ */ p(V, {})]
|
|
196
196
|
}),
|
|
197
197
|
/* @__PURE__ */ p("p", { children: b }),
|
|
198
|
-
/* @__PURE__ */ p(
|
|
198
|
+
/* @__PURE__ */ p(Pe, {
|
|
199
199
|
value: s,
|
|
200
200
|
onChange: D,
|
|
201
201
|
onDragging: g,
|
|
@@ -207,22 +207,22 @@ function Pe(e) {
|
|
|
207
207
|
}
|
|
208
208
|
//#endregion
|
|
209
209
|
//#region src/providers/formProvider.tsx
|
|
210
|
-
var
|
|
211
|
-
function
|
|
210
|
+
var Ie = n({});
|
|
211
|
+
function Le(e) {
|
|
212
212
|
let { children: n, fieldErrors: r, form: i } = e, a = c(() => ({ fieldErrors: r }), [r]);
|
|
213
|
-
return /* @__PURE__ */ m(
|
|
213
|
+
return /* @__PURE__ */ m(Ie.Provider, {
|
|
214
214
|
value: a,
|
|
215
215
|
children: [!i && n, i && t(i, i.props, n)]
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
//#endregion
|
|
219
219
|
//#region src/hooks/useForm.ts
|
|
220
|
-
function
|
|
221
|
-
return a(
|
|
220
|
+
function Z() {
|
|
221
|
+
return a(Ie);
|
|
222
222
|
}
|
|
223
223
|
//#endregion
|
|
224
224
|
//#region src/components/fieldError/index.tsx
|
|
225
|
-
function
|
|
225
|
+
function Re(e) {
|
|
226
226
|
let { children: t, className: n, ...r } = e, i = `arkynFieldError ${n}`;
|
|
227
227
|
return t ? /* @__PURE__ */ p("strong", {
|
|
228
228
|
className: i.trim(),
|
|
@@ -232,7 +232,7 @@ function Le(e) {
|
|
|
232
232
|
}
|
|
233
233
|
//#endregion
|
|
234
234
|
//#region src/components/fieldLabel/index.tsx
|
|
235
|
-
function
|
|
235
|
+
function ze(e) {
|
|
236
236
|
let { showAsterisk: t = !1, className: n = "", ...r } = e;
|
|
237
237
|
return /* @__PURE__ */ p("label", {
|
|
238
238
|
className: `arkynFieldLabel ${t ? "asteriskTrue" : "asteriskFalse"} ${n}`.trim(),
|
|
@@ -241,7 +241,7 @@ function Re(e) {
|
|
|
241
241
|
}
|
|
242
242
|
//#endregion
|
|
243
243
|
//#region src/components/fieldWrapper/index.tsx
|
|
244
|
-
function
|
|
244
|
+
function Be(e) {
|
|
245
245
|
let { children: t, className: n, orientation: r = "vertical", ...i } = e;
|
|
246
246
|
return /* @__PURE__ */ p("section", {
|
|
247
247
|
className: `arkynFieldWrapper ${n} ${r}`.trim(),
|
|
@@ -251,7 +251,7 @@ function ze(e) {
|
|
|
251
251
|
}
|
|
252
252
|
//#endregion
|
|
253
253
|
//#region src/services/iconRenderer.tsx
|
|
254
|
-
function
|
|
254
|
+
function Q(e) {
|
|
255
255
|
let { iconSize: t, icon: n, className: r, show: i = !0 } = e;
|
|
256
256
|
return !i || !n ? null : typeof n == "string" ? /* @__PURE__ */ p("p", {
|
|
257
257
|
className: r,
|
|
@@ -264,7 +264,7 @@ function Z(e) {
|
|
|
264
264
|
}
|
|
265
265
|
//#endregion
|
|
266
266
|
//#region src/components/button/index.tsx
|
|
267
|
-
function
|
|
267
|
+
function $(e) {
|
|
268
268
|
let { isLoading: t = !1, scheme: n = "primary", variant: r = "solid", loadingText: i, size: a = "md", leftIcon: o, rightIcon: s, disabled: c, className: l = "", children: u, ...d } = e, f = {
|
|
269
269
|
xs: 12,
|
|
270
270
|
sm: 16,
|
|
@@ -277,19 +277,19 @@ function Be(e) {
|
|
|
277
277
|
...d,
|
|
278
278
|
children: [/* @__PURE__ */ m("div", {
|
|
279
279
|
className: "arkynButtonSpinner",
|
|
280
|
-
children: [/* @__PURE__ */ p(
|
|
280
|
+
children: [/* @__PURE__ */ p(R, {
|
|
281
281
|
size: f,
|
|
282
282
|
strokeWidth: 2.5
|
|
283
283
|
}), i && i]
|
|
284
284
|
}), /* @__PURE__ */ m("div", {
|
|
285
285
|
className: "arkynButtonContent",
|
|
286
286
|
children: [
|
|
287
|
-
/* @__PURE__ */ p(
|
|
287
|
+
/* @__PURE__ */ p(Q, {
|
|
288
288
|
iconSize: f,
|
|
289
289
|
icon: o
|
|
290
290
|
}),
|
|
291
291
|
u,
|
|
292
|
-
/* @__PURE__ */ p(
|
|
292
|
+
/* @__PURE__ */ p(Q, {
|
|
293
293
|
iconSize: f,
|
|
294
294
|
icon: s
|
|
295
295
|
})
|
|
@@ -321,7 +321,7 @@ function He(e) {
|
|
|
321
321
|
...c,
|
|
322
322
|
children: [/* @__PURE__ */ p("div", {
|
|
323
323
|
className: "arkynIconButtonSpinner",
|
|
324
|
-
children: /* @__PURE__ */ p(
|
|
324
|
+
children: /* @__PURE__ */ p(R, {
|
|
325
325
|
size: l[i],
|
|
326
326
|
strokeWidth: 2.5
|
|
327
327
|
})
|
|
@@ -380,7 +380,7 @@ function We(e) {
|
|
|
380
380
|
return /* @__PURE__ */ m("div", {
|
|
381
381
|
className: "arkynAudioUploadHasFileContentContainer",
|
|
382
382
|
children: [
|
|
383
|
-
/* @__PURE__ */ p(
|
|
383
|
+
/* @__PURE__ */ p(Fe, { src: t }),
|
|
384
384
|
/* @__PURE__ */ p(Ve, {}),
|
|
385
385
|
/* @__PURE__ */ m("div", {
|
|
386
386
|
className: "arkynAudioUploadButtonsContainer",
|
|
@@ -395,10 +395,10 @@ function We(e) {
|
|
|
395
395
|
size: "sm",
|
|
396
396
|
isLoading: a,
|
|
397
397
|
onClick: o,
|
|
398
|
-
icon:
|
|
398
|
+
icon: U,
|
|
399
399
|
disabled: n
|
|
400
400
|
})
|
|
401
|
-
}), /* @__PURE__ */ p(
|
|
401
|
+
}), /* @__PURE__ */ p($, {
|
|
402
402
|
isLoading: a,
|
|
403
403
|
onClick: c,
|
|
404
404
|
variant: "outline",
|
|
@@ -432,7 +432,7 @@ function Ge(e) {
|
|
|
432
432
|
return /* @__PURE__ */ m("div", {
|
|
433
433
|
onDrop: s,
|
|
434
434
|
className: "arkynAudioUploadNoFileContent",
|
|
435
|
-
children: [/* @__PURE__ */ p(
|
|
435
|
+
children: [/* @__PURE__ */ p($, {
|
|
436
436
|
isLoading: n,
|
|
437
437
|
onClick: c,
|
|
438
438
|
variant: "ghost",
|
|
@@ -446,7 +446,7 @@ function Ge(e) {
|
|
|
446
446
|
//#endregion
|
|
447
447
|
//#region src/components/audioUpload/index.tsx
|
|
448
448
|
function Ke(e) {
|
|
449
|
-
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 } =
|
|
449
|
+
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);
|
|
450
450
|
async function A(e) {
|
|
451
451
|
if (_) return;
|
|
452
452
|
k(!0), T(e), C("");
|
|
@@ -470,8 +470,8 @@ function Ke(e) {
|
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
let M = y || S;
|
|
473
|
-
return /* @__PURE__ */ m(
|
|
474
|
-
n && /* @__PURE__ */ p(
|
|
473
|
+
return /* @__PURE__ */ m(Be, { children: [
|
|
474
|
+
n && /* @__PURE__ */ p(ze, {
|
|
475
475
|
showAsterisk: g,
|
|
476
476
|
children: n
|
|
477
477
|
}),
|
|
@@ -502,7 +502,7 @@ function Ke(e) {
|
|
|
502
502
|
})
|
|
503
503
|
]
|
|
504
504
|
}),
|
|
505
|
-
M && /* @__PURE__ */ p(
|
|
505
|
+
M && /* @__PURE__ */ p(Re, { children: M })
|
|
506
506
|
] });
|
|
507
507
|
}
|
|
508
508
|
//#endregion
|
|
@@ -516,12 +516,12 @@ function qe(e) {
|
|
|
516
516
|
className: `arkynBadge ${t} ${n} ${r} ${o}`.trim(),
|
|
517
517
|
...c,
|
|
518
518
|
children: [
|
|
519
|
-
/* @__PURE__ */ p(
|
|
519
|
+
/* @__PURE__ */ p(Q, {
|
|
520
520
|
iconSize: l,
|
|
521
521
|
icon: i
|
|
522
522
|
}),
|
|
523
523
|
/* @__PURE__ */ p("p", { children: s }),
|
|
524
|
-
/* @__PURE__ */ p(
|
|
524
|
+
/* @__PURE__ */ p(Q, {
|
|
525
525
|
iconSize: l,
|
|
526
526
|
icon: a
|
|
527
527
|
})
|
|
@@ -702,26 +702,26 @@ function Qe({ children: e }) {
|
|
|
702
702
|
}
|
|
703
703
|
//#endregion
|
|
704
704
|
//#region src/services/fieldTemplate.tsx
|
|
705
|
-
function
|
|
705
|
+
function $e(e) {
|
|
706
706
|
let { name: t, label: n, showAsterisk: r, className: i, unShowFieldTemplate: a, errorMessage: o, children: s, orientation: c } = e;
|
|
707
|
-
return a ? s : /* @__PURE__ */ m(
|
|
707
|
+
return a ? s : /* @__PURE__ */ m(Be, {
|
|
708
708
|
id: t,
|
|
709
709
|
className: i,
|
|
710
710
|
orientation: c,
|
|
711
711
|
children: [
|
|
712
|
-
n && /* @__PURE__ */ p(
|
|
712
|
+
n && /* @__PURE__ */ p(ze, {
|
|
713
713
|
htmlFor: t,
|
|
714
714
|
showAsterisk: r,
|
|
715
715
|
children: n
|
|
716
716
|
}),
|
|
717
717
|
s,
|
|
718
|
-
o && /* @__PURE__ */ p(
|
|
718
|
+
o && /* @__PURE__ */ p(Re, { children: o })
|
|
719
719
|
]
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
722
|
//#endregion
|
|
723
723
|
//#region src/components/select/selectChevron/index.tsx
|
|
724
|
-
function
|
|
724
|
+
function et(e) {
|
|
725
725
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
726
726
|
return n ? null : /* @__PURE__ */ p(C, {
|
|
727
727
|
className: `arkynSelectChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -736,7 +736,7 @@ function $e(e) {
|
|
|
736
736
|
}
|
|
737
737
|
//#endregion
|
|
738
738
|
//#region src/components/select/selectContainer/index.tsx
|
|
739
|
-
function
|
|
739
|
+
function tt(e) {
|
|
740
740
|
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;
|
|
741
741
|
return /* @__PURE__ */ p("section", {
|
|
742
742
|
id: d,
|
|
@@ -747,7 +747,7 @@ function et(e) {
|
|
|
747
747
|
}
|
|
748
748
|
//#endregion
|
|
749
749
|
//#region src/components/select/selectContent/index.tsx
|
|
750
|
-
function
|
|
750
|
+
function nt(e) {
|
|
751
751
|
let { children: t, size: n } = e;
|
|
752
752
|
return /* @__PURE__ */ p("div", {
|
|
753
753
|
className: `arkynSelectContent ${n}`,
|
|
@@ -756,7 +756,7 @@ function tt(e) {
|
|
|
756
756
|
}
|
|
757
757
|
//#endregion
|
|
758
758
|
//#region src/components/select/selectOption/index.tsx
|
|
759
|
-
function
|
|
759
|
+
function rt(e) {
|
|
760
760
|
let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a } = e;
|
|
761
761
|
return /* @__PURE__ */ m("button", {
|
|
762
762
|
type: "button",
|
|
@@ -771,13 +771,13 @@ function nt(e) {
|
|
|
771
771
|
}
|
|
772
772
|
//#endregion
|
|
773
773
|
//#region src/hooks/useScrollLock.ts
|
|
774
|
-
function
|
|
774
|
+
function it() {
|
|
775
775
|
return typeof window > "u" ? 0 : window.innerWidth - document.documentElement.clientWidth;
|
|
776
776
|
}
|
|
777
|
-
function
|
|
777
|
+
function at(e) {
|
|
778
778
|
o(() => {
|
|
779
779
|
if (e) {
|
|
780
|
-
let e = document.body.style.overflow, t = document.body.style.paddingRight, n =
|
|
780
|
+
let e = document.body.style.overflow, t = document.body.style.paddingRight, n = it();
|
|
781
781
|
if (n > 0) {
|
|
782
782
|
let e = window.getComputedStyle(document.body), t = parseInt(e.paddingRight, 10) || 0;
|
|
783
783
|
document.body.style.paddingRight = `${t + n}px`;
|
|
@@ -790,8 +790,8 @@ function it(e) {
|
|
|
790
790
|
}
|
|
791
791
|
//#endregion
|
|
792
792
|
//#region src/components/input/index.tsx
|
|
793
|
-
function
|
|
794
|
-
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 } =
|
|
793
|
+
function ot(e) {
|
|
794
|
+
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 = s(), I = E || F, L = x || j?.[t], z = !!L, B = n || h, V = {
|
|
795
795
|
md: 20,
|
|
796
796
|
lg: 20
|
|
797
797
|
}[T], H = C ? "right" : "left", U = H === "left" && h, W = H === "right" && h;
|
|
@@ -810,12 +810,12 @@ function at(e) {
|
|
|
810
810
|
type: "text",
|
|
811
811
|
ref: P,
|
|
812
812
|
...A
|
|
813
|
-
}) : /* @__PURE__ */ p(
|
|
813
|
+
}) : /* @__PURE__ */ p($e, {
|
|
814
814
|
name: t,
|
|
815
815
|
label: o,
|
|
816
816
|
showAsterisk: S,
|
|
817
817
|
className: c,
|
|
818
|
-
errorMessage:
|
|
818
|
+
errorMessage: L,
|
|
819
819
|
unShowFieldTemplate: b,
|
|
820
820
|
orientation: k,
|
|
821
821
|
children: /* @__PURE__ */ m("section", {
|
|
@@ -824,18 +824,18 @@ function at(e) {
|
|
|
824
824
|
onClick: G,
|
|
825
825
|
className: `arkynInput ${d ? "hasPrefix" : ""} ${n ? "disabled" : ""} ${f ? "hasSuffix" : ""} ${a} ${T} ${B || _ || h ? "opacity" : ""} ${z ? "errored" : ""} ${M ? "focused" : ""}`,
|
|
826
826
|
children: [
|
|
827
|
-
/* @__PURE__ */ p(
|
|
827
|
+
/* @__PURE__ */ p(Q, {
|
|
828
828
|
iconSize: V,
|
|
829
829
|
icon: d,
|
|
830
830
|
className: "prefix"
|
|
831
831
|
}),
|
|
832
|
-
/* @__PURE__ */ p(
|
|
832
|
+
/* @__PURE__ */ p(Q, {
|
|
833
833
|
show: U,
|
|
834
834
|
iconSize: V,
|
|
835
835
|
className: "spinner",
|
|
836
|
-
icon:
|
|
836
|
+
icon: R
|
|
837
837
|
}),
|
|
838
|
-
/* @__PURE__ */ p(
|
|
838
|
+
/* @__PURE__ */ p(Q, {
|
|
839
839
|
show: !h,
|
|
840
840
|
icon: g,
|
|
841
841
|
iconSize: V
|
|
@@ -853,18 +853,18 @@ function at(e) {
|
|
|
853
853
|
value: B ? void 0 : D,
|
|
854
854
|
...A
|
|
855
855
|
}),
|
|
856
|
-
/* @__PURE__ */ p(
|
|
856
|
+
/* @__PURE__ */ p(Q, {
|
|
857
857
|
show: !h,
|
|
858
858
|
icon: C,
|
|
859
859
|
iconSize: V
|
|
860
860
|
}),
|
|
861
|
-
/* @__PURE__ */ p(
|
|
861
|
+
/* @__PURE__ */ p(Q, {
|
|
862
862
|
show: W,
|
|
863
863
|
iconSize: V,
|
|
864
864
|
className: "spinner",
|
|
865
|
-
icon:
|
|
865
|
+
icon: R
|
|
866
866
|
}),
|
|
867
|
-
/* @__PURE__ */ p(
|
|
867
|
+
/* @__PURE__ */ p(Q, {
|
|
868
868
|
iconSize: V,
|
|
869
869
|
icon: f,
|
|
870
870
|
className: "suffix"
|
|
@@ -875,9 +875,9 @@ function at(e) {
|
|
|
875
875
|
}
|
|
876
876
|
//#endregion
|
|
877
877
|
//#region src/components/select/selectOptionsContainer/index.tsx
|
|
878
|
-
function
|
|
878
|
+
function st(e) {
|
|
879
879
|
let { children: t, isFocused: n, isSearchable: r, search: i, onSearch: a } = e, s = l(null), [c, d] = u("bottom");
|
|
880
|
-
|
|
880
|
+
at(n), o(() => {
|
|
881
881
|
n && (() => {
|
|
882
882
|
if (!s.current) return;
|
|
883
883
|
let e = s.current.parentElement;
|
|
@@ -892,11 +892,11 @@ function ot(e) {
|
|
|
892
892
|
return n ? /* @__PURE__ */ m("div", {
|
|
893
893
|
ref: s,
|
|
894
894
|
className: `arkynSelectOptionsContainer ${c}`,
|
|
895
|
-
children: [r && /* @__PURE__ */ p(
|
|
895
|
+
children: [r && /* @__PURE__ */ p(ot, {
|
|
896
896
|
type: "search",
|
|
897
897
|
name: "search-select",
|
|
898
898
|
variant: "underline",
|
|
899
|
-
leftIcon:
|
|
899
|
+
leftIcon: W,
|
|
900
900
|
value: i,
|
|
901
901
|
onChange: f
|
|
902
902
|
}), t]
|
|
@@ -904,7 +904,7 @@ function ot(e) {
|
|
|
904
904
|
}
|
|
905
905
|
//#endregion
|
|
906
906
|
//#region src/components/select/selectOverlay/index.tsx
|
|
907
|
-
function
|
|
907
|
+
function ct(e) {
|
|
908
908
|
let { isFocused: t, handleBlur: n } = e;
|
|
909
909
|
return t ? /* @__PURE__ */ p("aside", {
|
|
910
910
|
className: "arkynSelectOverlay",
|
|
@@ -913,9 +913,9 @@ function st(e) {
|
|
|
913
913
|
}
|
|
914
914
|
//#endregion
|
|
915
915
|
//#region src/components/select/selectSpinner/index.tsx
|
|
916
|
-
function
|
|
916
|
+
function lt(e) {
|
|
917
917
|
let { iconSize: t, isLoading: n } = e;
|
|
918
|
-
return n ? /* @__PURE__ */ p(
|
|
918
|
+
return n ? /* @__PURE__ */ p(R, {
|
|
919
919
|
className: "arkynSelectSpinner",
|
|
920
920
|
size: t,
|
|
921
921
|
strokeWidth: 2.5
|
|
@@ -923,8 +923,8 @@ function ct(e) {
|
|
|
923
923
|
}
|
|
924
924
|
//#endregion
|
|
925
925
|
//#region src/components/select/index.tsx
|
|
926
|
-
function
|
|
927
|
-
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: _, showAsterisk: v, leftIcon: y, onSearch: b, onChange: x, onBlur: S, notFoundText: C = "Sem opções disponíveis", onFocus: w, disabled: T = !1, prefix: E, size: D = "md", value: O, variant: k = "solid", orientation: A = "vertical", unShowFieldTemplate: j = !1 } = e, { fieldErrors: M } =
|
|
926
|
+
function ut(e) {
|
|
927
|
+
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: _, showAsterisk: v, leftIcon: y, onSearch: b, onChange: x, onBlur: S, notFoundText: C = "Sem opções disponíveis", onFocus: w, disabled: T = !1, prefix: E, size: D = "md", value: O, variant: k = "solid", orientation: A = "vertical", unShowFieldTemplate: j = !1 } = e, { fieldErrors: M } = Z(), N = l(null), P = s(), F = g || P, I = c || M?.[t], L = !!I, R = T || d || f, z = {
|
|
928
928
|
md: 20,
|
|
929
929
|
lg: 20
|
|
930
930
|
}[D], [B, V] = u(""), [H, U] = u(!1), [W, G] = u(o), K = O || W;
|
|
@@ -934,20 +934,20 @@ function lt(e) {
|
|
|
934
934
|
function ee(e) {
|
|
935
935
|
return n.find((t) => t.value === e)?.label || "";
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function te() {
|
|
938
938
|
R || !N?.current || H || (U(!0), N.current.focus(), w?.());
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function J() {
|
|
941
941
|
U(!1), S && N.current && N.current.blur();
|
|
942
942
|
}
|
|
943
943
|
function ne(e) {
|
|
944
944
|
V(e), b && b(e);
|
|
945
945
|
}
|
|
946
946
|
function re(e) {
|
|
947
|
-
q(e) ? (G(""), x && x("")) : (G(e), x && x(e)), a &&
|
|
947
|
+
q(e) ? (G(""), x && x("")) : (G(e), x && x(e)), a && J();
|
|
948
948
|
}
|
|
949
949
|
let ie = n.filter((t) => !!(e.onSearch || !e.isSearchable || t.label.toLowerCase().includes(B.toLowerCase())));
|
|
950
|
-
return /* @__PURE__ */ p(
|
|
950
|
+
return /* @__PURE__ */ p($e, {
|
|
951
951
|
name: t,
|
|
952
952
|
label: _,
|
|
953
953
|
showAsterisk: v,
|
|
@@ -955,8 +955,8 @@ function lt(e) {
|
|
|
955
955
|
errorMessage: I,
|
|
956
956
|
unShowFieldTemplate: j,
|
|
957
957
|
orientation: A,
|
|
958
|
-
children: /* @__PURE__ */ m(
|
|
959
|
-
handleContainerFocus:
|
|
958
|
+
children: /* @__PURE__ */ m(tt, {
|
|
959
|
+
handleContainerFocus: te,
|
|
960
960
|
disabled: R,
|
|
961
961
|
isError: L,
|
|
962
962
|
isFocused: H,
|
|
@@ -973,7 +973,7 @@ function lt(e) {
|
|
|
973
973
|
value: K,
|
|
974
974
|
type: "hidden"
|
|
975
975
|
}),
|
|
976
|
-
/* @__PURE__ */ p(
|
|
976
|
+
/* @__PURE__ */ p(Q, {
|
|
977
977
|
iconSize: z,
|
|
978
978
|
icon: E,
|
|
979
979
|
className: "prefix"
|
|
@@ -982,19 +982,19 @@ function lt(e) {
|
|
|
982
982
|
size: z,
|
|
983
983
|
strokeWidth: 2.5
|
|
984
984
|
}),
|
|
985
|
-
/* @__PURE__ */ m(
|
|
985
|
+
/* @__PURE__ */ m(nt, {
|
|
986
986
|
size: D,
|
|
987
987
|
children: [K !== "" && /* @__PURE__ */ p("p", {
|
|
988
988
|
className: "hasValue",
|
|
989
989
|
children: ee(K)
|
|
990
990
|
}), K === "" && /* @__PURE__ */ p("p", { children: i })]
|
|
991
991
|
}),
|
|
992
|
-
/* @__PURE__ */ m(
|
|
992
|
+
/* @__PURE__ */ m(st, {
|
|
993
993
|
isFocused: H,
|
|
994
994
|
isSearchable: h,
|
|
995
995
|
search: B,
|
|
996
996
|
onSearch: ne,
|
|
997
|
-
children: [ie.map(({ label: e, value: t }) => /* @__PURE__ */ p(
|
|
997
|
+
children: [ie.map(({ label: e, value: t }) => /* @__PURE__ */ p(rt, {
|
|
998
998
|
label: e,
|
|
999
999
|
value: t,
|
|
1000
1000
|
size: D,
|
|
@@ -1002,19 +1002,19 @@ function lt(e) {
|
|
|
1002
1002
|
optionHasSelected: q
|
|
1003
1003
|
}, t)), ie.length <= 0 && /* @__PURE__ */ p("p", { children: C })]
|
|
1004
1004
|
}),
|
|
1005
|
-
/* @__PURE__ */ p(
|
|
1005
|
+
/* @__PURE__ */ p(et, {
|
|
1006
1006
|
disabled: R,
|
|
1007
1007
|
isFocused: H,
|
|
1008
1008
|
readOnly: f,
|
|
1009
1009
|
iconSize: z,
|
|
1010
1010
|
isLoading: d
|
|
1011
1011
|
}),
|
|
1012
|
-
/* @__PURE__ */ p(
|
|
1012
|
+
/* @__PURE__ */ p(lt, {
|
|
1013
1013
|
iconSize: z,
|
|
1014
1014
|
isLoading: d
|
|
1015
1015
|
}),
|
|
1016
|
-
/* @__PURE__ */ p(
|
|
1017
|
-
handleBlur:
|
|
1016
|
+
/* @__PURE__ */ p(ct, {
|
|
1017
|
+
handleBlur: J,
|
|
1018
1018
|
isFocused: H
|
|
1019
1019
|
})
|
|
1020
1020
|
]
|
|
@@ -1023,7 +1023,7 @@ function lt(e) {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
//#endregion
|
|
1025
1025
|
//#region src/components/calendar/calendarHeader/index.tsx
|
|
1026
|
-
function
|
|
1026
|
+
function dt({ basicMode: e }) {
|
|
1027
1027
|
let t = Xe();
|
|
1028
1028
|
return e ? /* @__PURE__ */ m("div", {
|
|
1029
1029
|
className: "arkynCalendarHeader",
|
|
@@ -1054,14 +1054,14 @@ function ut({ basicMode: e }) {
|
|
|
1054
1054
|
className: "arkynCalendarButton",
|
|
1055
1055
|
onClick: () => t.nextMonth(),
|
|
1056
1056
|
children: /* @__PURE__ */ p(T, {})
|
|
1057
|
-
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(
|
|
1057
|
+
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(ut, {
|
|
1058
1058
|
name: "calendarMonth",
|
|
1059
1059
|
variant: "underline",
|
|
1060
1060
|
className: "calendarMonthSelect",
|
|
1061
1061
|
value: t.currentMonth,
|
|
1062
1062
|
options: t.listMonths,
|
|
1063
1063
|
onChange: (e) => t.changeMonth(+e)
|
|
1064
|
-
}), /* @__PURE__ */ p(
|
|
1064
|
+
}), /* @__PURE__ */ p(ut, {
|
|
1065
1065
|
name: "calendarYear",
|
|
1066
1066
|
variant: "underline",
|
|
1067
1067
|
className: "calendarYearSelect",
|
|
@@ -1073,7 +1073,7 @@ function ut({ basicMode: e }) {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
//#endregion
|
|
1075
1075
|
//#region src/components/calendar/calendarTableTd/index.tsx
|
|
1076
|
-
function
|
|
1076
|
+
function ft(e) {
|
|
1077
1077
|
let { day: t, month: n, year: r, dayOwner: i, dayType: a } = e, { changeDay: o } = Xe();
|
|
1078
1078
|
function s() {
|
|
1079
1079
|
let e = /* @__PURE__ */ new Date();
|
|
@@ -1090,15 +1090,15 @@ function dt(e) {
|
|
|
1090
1090
|
}
|
|
1091
1091
|
//#endregion
|
|
1092
1092
|
//#region src/components/calendar/calendarTableBody/index.tsx
|
|
1093
|
-
function
|
|
1093
|
+
function pt() {
|
|
1094
1094
|
return /* @__PURE__ */ p("tbody", {
|
|
1095
1095
|
className: "arkynCalendarTableBody",
|
|
1096
|
-
children: Xe().listMatrix.map((e, t) => /* @__PURE__ */ p("tr", { children: e.map((e, n) => /* @__PURE__ */ p(
|
|
1096
|
+
children: Xe().listMatrix.map((e, t) => /* @__PURE__ */ p("tr", { children: e.map((e, n) => /* @__PURE__ */ p(ft, { ...e }, `day-${t}-${n}`)) }, `week-${t}`))
|
|
1097
1097
|
});
|
|
1098
1098
|
}
|
|
1099
1099
|
//#endregion
|
|
1100
1100
|
//#region src/components/calendar/calendarTableContainer/index.tsx
|
|
1101
|
-
function
|
|
1101
|
+
function mt({ children: e }) {
|
|
1102
1102
|
return /* @__PURE__ */ p("table", {
|
|
1103
1103
|
className: "arkynCalendarTableContainer",
|
|
1104
1104
|
children: e
|
|
@@ -1106,7 +1106,7 @@ function pt({ children: e }) {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
//#endregion
|
|
1108
1108
|
//#region src/components/calendar/calendarTableHeader/index.tsx
|
|
1109
|
-
function
|
|
1109
|
+
function ht() {
|
|
1110
1110
|
let { listWeek: e } = Xe();
|
|
1111
1111
|
return /* @__PURE__ */ p("thead", {
|
|
1112
1112
|
className: "arkynCalendarTableHeader",
|
|
@@ -1115,7 +1115,7 @@ function mt() {
|
|
|
1115
1115
|
}
|
|
1116
1116
|
//#endregion
|
|
1117
1117
|
//#region src/components/calendar/index.tsx
|
|
1118
|
-
function
|
|
1118
|
+
function gt(e) {
|
|
1119
1119
|
let t = e.variant || "complete";
|
|
1120
1120
|
return e.type === "range" ? /* @__PURE__ */ p(Ze, {
|
|
1121
1121
|
value: e.value,
|
|
@@ -1125,7 +1125,7 @@ function ht(e) {
|
|
|
1125
1125
|
calendarType: "range",
|
|
1126
1126
|
onChange: e.onChange,
|
|
1127
1127
|
onChangeView: e.onChangeView,
|
|
1128
|
-
children: /* @__PURE__ */ m(Qe, { children: [/* @__PURE__ */ p(
|
|
1128
|
+
children: /* @__PURE__ */ m(Qe, { children: [/* @__PURE__ */ p(dt, { basicMode: t.includes("basic") }), /* @__PURE__ */ m(mt, { children: [/* @__PURE__ */ p(ht, {}), /* @__PURE__ */ p(pt, {})] })] })
|
|
1129
1129
|
}) : /* @__PURE__ */ p(Ze, {
|
|
1130
1130
|
value: e.value,
|
|
1131
1131
|
viewValue: e.viewValue,
|
|
@@ -1134,16 +1134,16 @@ function ht(e) {
|
|
|
1134
1134
|
calendarType: "single",
|
|
1135
1135
|
onChange: e.onChange,
|
|
1136
1136
|
onChangeView: e.onChangeView,
|
|
1137
|
-
children: /* @__PURE__ */ m(Qe, { children: [/* @__PURE__ */ p(
|
|
1137
|
+
children: /* @__PURE__ */ m(Qe, { children: [/* @__PURE__ */ p(dt, { basicMode: t.includes("basic") }), /* @__PURE__ */ m(mt, { children: [/* @__PURE__ */ p(ht, {}), /* @__PURE__ */ p(pt, {})] })] })
|
|
1138
1138
|
});
|
|
1139
1139
|
}
|
|
1140
1140
|
//#endregion
|
|
1141
1141
|
//#region src/components/cardTab/cardTabContext.tsx
|
|
1142
|
-
var
|
|
1143
|
-
function
|
|
1144
|
-
return a(
|
|
1142
|
+
var _t = n({});
|
|
1143
|
+
function vt() {
|
|
1144
|
+
return a(_t);
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function yt(e) {
|
|
1147
1147
|
let { disabled: t, currentTab: n, changeCurrentTab: r } = e, i = c(() => ({
|
|
1148
1148
|
disabled: t,
|
|
1149
1149
|
currentTab: n,
|
|
@@ -1153,15 +1153,15 @@ function vt(e) {
|
|
|
1153
1153
|
n,
|
|
1154
1154
|
r
|
|
1155
1155
|
]);
|
|
1156
|
-
return /* @__PURE__ */ p(
|
|
1156
|
+
return /* @__PURE__ */ p(_t.Provider, {
|
|
1157
1157
|
value: i,
|
|
1158
1158
|
children: e.children
|
|
1159
1159
|
});
|
|
1160
1160
|
}
|
|
1161
1161
|
//#endregion
|
|
1162
1162
|
//#region src/components/cardTab/cardTabButton/index.tsx
|
|
1163
|
-
function
|
|
1164
|
-
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } =
|
|
1163
|
+
function bt(e) {
|
|
1164
|
+
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } = vt(), u = s || n, d = `arkynCardTabButton ${u ? "isDisabled" : ""} ${c === a && a ? "isActive" : ""} ${r}`;
|
|
1165
1165
|
function f(e) {
|
|
1166
1166
|
l(a), i?.(e);
|
|
1167
1167
|
}
|
|
@@ -1176,12 +1176,12 @@ function yt(e) {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
//#endregion
|
|
1178
1178
|
//#region src/components/cardTab/cardTabContainer/index.tsx
|
|
1179
|
-
function
|
|
1179
|
+
function xt(e) {
|
|
1180
1180
|
let { children: t, onChange: n, defaultValue: r, disabled: i = !1, className: a, ...o } = e, [s, c] = u(r || ""), l = `arkynCardTabContainer ${a || ""}`;
|
|
1181
1181
|
function d(e) {
|
|
1182
1182
|
c(e), n && n(e);
|
|
1183
1183
|
}
|
|
1184
|
-
return /* @__PURE__ */ p(
|
|
1184
|
+
return /* @__PURE__ */ p(yt, {
|
|
1185
1185
|
disabled: i,
|
|
1186
1186
|
currentTab: s,
|
|
1187
1187
|
changeCurrentTab: d,
|
|
@@ -1194,13 +1194,13 @@ function bt(e) {
|
|
|
1194
1194
|
}
|
|
1195
1195
|
//#endregion
|
|
1196
1196
|
//#region src/components/checkbox/index.tsx
|
|
1197
|
-
function
|
|
1198
|
-
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 } =
|
|
1197
|
+
function St(e) {
|
|
1198
|
+
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 = s(), w = t || C, T = a || b?.[n], E = !!T, [D, O] = u(o || !1), k = typeof d == "boolean" ? d : D, A = `arkynCheckbox ${i} ${E ? "errorTrue" : "errorFalse"} ${k ? "checkedTrue" : "checkedFalse"}`;
|
|
1199
1199
|
function j() {
|
|
1200
1200
|
let e = D;
|
|
1201
1201
|
O(!e), f?.(e ? "" : v || "checked");
|
|
1202
1202
|
}
|
|
1203
|
-
return /* @__PURE__ */ p(
|
|
1203
|
+
return /* @__PURE__ */ p($e, {
|
|
1204
1204
|
name: n,
|
|
1205
1205
|
label: c,
|
|
1206
1206
|
showAsterisk: g,
|
|
@@ -1225,37 +1225,37 @@ function xt(e) {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
//#endregion
|
|
1227
1227
|
//#region src/hooks/useHydrated.ts
|
|
1228
|
-
function
|
|
1228
|
+
function Ct() {
|
|
1229
1229
|
return () => {};
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1232
|
-
return d(
|
|
1231
|
+
function wt() {
|
|
1232
|
+
return d(Ct, () => !0, () => !1);
|
|
1233
1233
|
}
|
|
1234
1234
|
//#endregion
|
|
1235
1235
|
//#region src/components/clientOnly.tsx
|
|
1236
|
-
function
|
|
1236
|
+
function Tt(e) {
|
|
1237
1237
|
let { children: t, fallback: n = null } = e;
|
|
1238
|
-
return
|
|
1238
|
+
return wt() ? t() : n;
|
|
1239
1239
|
}
|
|
1240
1240
|
//#endregion
|
|
1241
1241
|
//#region src/services/maskCurrencyValues.ts
|
|
1242
|
-
function
|
|
1242
|
+
function Et(e) {
|
|
1243
1243
|
let t = e;
|
|
1244
|
-
return typeof e == "string" ? (t = +
|
|
1244
|
+
return typeof e == "string" ? (t = +ie(e), t % 1 != 0 && (t = t.toFixed(2))) : t = Number.isInteger(e) ? Number(e) * 10 ** 2 : e.toFixed(2), ie(String(t)) / 10 ** 2;
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1247
|
-
if (!e) return [0,
|
|
1248
|
-
let n =
|
|
1249
|
-
return [n,
|
|
1246
|
+
function Dt(e, t) {
|
|
1247
|
+
if (!e) return [0, ne(0, t)];
|
|
1248
|
+
let n = Et(e);
|
|
1249
|
+
return [n, ne(n, t)];
|
|
1250
1250
|
}
|
|
1251
1251
|
//#endregion
|
|
1252
1252
|
//#region src/components/currencyInput/index.tsx
|
|
1253
|
-
function
|
|
1254
|
-
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 } =
|
|
1253
|
+
function Ot(e) {
|
|
1254
|
+
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), [L, z] = u("0"), B = l(null), V = s(), H = M || V, U = E || P?.[t], W = !!U, G = n || x, K = {
|
|
1255
1255
|
md: 20,
|
|
1256
1256
|
lg: 20
|
|
1257
|
-
}[j], q = A ? "right" : "left", ee = q === "left" && x,
|
|
1258
|
-
function
|
|
1257
|
+
}[j], q = A ? "right" : "left", ee = q === "left" && x, te = q === "right" && x;
|
|
1258
|
+
function J() {
|
|
1259
1259
|
G || !B?.current || (I(!0), B.current.focus());
|
|
1260
1260
|
}
|
|
1261
1261
|
function ne(e) {
|
|
@@ -1265,21 +1265,21 @@ function Dt(e) {
|
|
|
1265
1265
|
I(!1), T && T(e);
|
|
1266
1266
|
}
|
|
1267
1267
|
let ie = (e) => {
|
|
1268
|
-
let [t, n] =
|
|
1269
|
-
return !g || t <= g ? (z(n), [t, n]) :
|
|
1268
|
+
let [t, n] = Dt(e, _);
|
|
1269
|
+
return !g || t <= g ? (z(n), [t, n]) : Dt(e, _);
|
|
1270
1270
|
};
|
|
1271
1271
|
return o(() => {
|
|
1272
1272
|
function e() {
|
|
1273
1273
|
if (typeof f == "number") return f;
|
|
1274
1274
|
if (typeof h == "number") return h;
|
|
1275
1275
|
}
|
|
1276
|
-
let [, t] =
|
|
1276
|
+
let [, t] = Dt(e(), _);
|
|
1277
1277
|
z(t);
|
|
1278
1278
|
}, [
|
|
1279
1279
|
_,
|
|
1280
1280
|
h,
|
|
1281
1281
|
f
|
|
1282
|
-
]), /* @__PURE__ */ p(
|
|
1282
|
+
]), /* @__PURE__ */ p($e, {
|
|
1283
1283
|
name: t,
|
|
1284
1284
|
label: c,
|
|
1285
1285
|
showAsterisk: k,
|
|
@@ -1291,20 +1291,20 @@ function Dt(e) {
|
|
|
1291
1291
|
title: r,
|
|
1292
1292
|
style: i,
|
|
1293
1293
|
className: `arkynCurrencyInput ${y ? "hasPrefix" : ""} ${b ? "hasSuffix" : ""} ${a} ${j} ${G || C || x ? "opacity" : ""} ${W ? "errored" : ""} ${F ? "focused" : ""}`,
|
|
1294
|
-
onClick:
|
|
1294
|
+
onClick: J,
|
|
1295
1295
|
children: [
|
|
1296
|
-
/* @__PURE__ */ p(
|
|
1296
|
+
/* @__PURE__ */ p(Q, {
|
|
1297
1297
|
iconSize: K,
|
|
1298
1298
|
icon: y,
|
|
1299
1299
|
className: "prefix"
|
|
1300
1300
|
}),
|
|
1301
|
-
/* @__PURE__ */ p(
|
|
1301
|
+
/* @__PURE__ */ p(Q, {
|
|
1302
1302
|
show: ee,
|
|
1303
1303
|
iconSize: K,
|
|
1304
1304
|
className: "spinner",
|
|
1305
|
-
icon:
|
|
1305
|
+
icon: R
|
|
1306
1306
|
}),
|
|
1307
|
-
/* @__PURE__ */ p(
|
|
1307
|
+
/* @__PURE__ */ p(Q, {
|
|
1308
1308
|
show: !x,
|
|
1309
1309
|
icon: S,
|
|
1310
1310
|
iconSize: K
|
|
@@ -1321,28 +1321,28 @@ function Dt(e) {
|
|
|
1321
1321
|
v?.(e, String(t), String(n));
|
|
1322
1322
|
},
|
|
1323
1323
|
id: H,
|
|
1324
|
-
placeholder: G ?
|
|
1325
|
-
value: G ? void 0 :
|
|
1324
|
+
placeholder: G ? L : void 0,
|
|
1325
|
+
value: G ? void 0 : L,
|
|
1326
1326
|
...N
|
|
1327
1327
|
}),
|
|
1328
1328
|
/* @__PURE__ */ p("input", {
|
|
1329
1329
|
type: "hidden",
|
|
1330
1330
|
name: t,
|
|
1331
|
-
value:
|
|
1331
|
+
value: Et(L),
|
|
1332
1332
|
readOnly: !0
|
|
1333
1333
|
}),
|
|
1334
|
-
/* @__PURE__ */ p(
|
|
1334
|
+
/* @__PURE__ */ p(Q, {
|
|
1335
1335
|
show: !x,
|
|
1336
1336
|
icon: A,
|
|
1337
1337
|
iconSize: K
|
|
1338
1338
|
}),
|
|
1339
|
-
/* @__PURE__ */ p(
|
|
1340
|
-
show:
|
|
1339
|
+
/* @__PURE__ */ p(Q, {
|
|
1340
|
+
show: te,
|
|
1341
1341
|
iconSize: K,
|
|
1342
1342
|
className: "spinner",
|
|
1343
|
-
icon:
|
|
1343
|
+
icon: R
|
|
1344
1344
|
}),
|
|
1345
|
-
/* @__PURE__ */ p(
|
|
1345
|
+
/* @__PURE__ */ p(Q, {
|
|
1346
1346
|
iconSize: K,
|
|
1347
1347
|
icon: b,
|
|
1348
1348
|
className: "suffix"
|
|
@@ -1353,9 +1353,9 @@ function Dt(e) {
|
|
|
1353
1353
|
}
|
|
1354
1354
|
//#endregion
|
|
1355
1355
|
//#region src/components/datePicker/datePickerCalendarContainer/index.tsx
|
|
1356
|
-
function
|
|
1356
|
+
function kt(e) {
|
|
1357
1357
|
let { children: t, isFocused: n } = e, r = l(null), [i, a] = u("bottom");
|
|
1358
|
-
return
|
|
1358
|
+
return at(n), o(() => {
|
|
1359
1359
|
n && (() => {
|
|
1360
1360
|
if (!r.current) return;
|
|
1361
1361
|
let e = r.current.parentElement;
|
|
@@ -1371,7 +1371,7 @@ function Ot(e) {
|
|
|
1371
1371
|
}
|
|
1372
1372
|
//#endregion
|
|
1373
1373
|
//#region src/components/datePicker/datePickerChevron/index.tsx
|
|
1374
|
-
function
|
|
1374
|
+
function At(e) {
|
|
1375
1375
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
1376
1376
|
return n ? null : /* @__PURE__ */ p(C, {
|
|
1377
1377
|
className: `arkynDatePickerChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -1386,7 +1386,7 @@ function kt(e) {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
//#endregion
|
|
1388
1388
|
//#region src/components/datePicker/datePickerContainer/index.tsx
|
|
1389
|
-
function
|
|
1389
|
+
function jt(e) {
|
|
1390
1390
|
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;
|
|
1391
1391
|
return /* @__PURE__ */ p("section", {
|
|
1392
1392
|
id: d,
|
|
@@ -1397,7 +1397,7 @@ function At(e) {
|
|
|
1397
1397
|
}
|
|
1398
1398
|
//#endregion
|
|
1399
1399
|
//#region src/components/datePicker/datePickerContent/index.tsx
|
|
1400
|
-
function
|
|
1400
|
+
function Mt(e) {
|
|
1401
1401
|
let { children: t, size: n } = e;
|
|
1402
1402
|
return /* @__PURE__ */ p("div", {
|
|
1403
1403
|
className: `arkynDatePickerContent ${n}`,
|
|
@@ -1406,7 +1406,7 @@ function jt(e) {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
//#endregion
|
|
1408
1408
|
//#region src/components/datePicker/datePickerOverlay/index.tsx
|
|
1409
|
-
function
|
|
1409
|
+
function Nt(e) {
|
|
1410
1410
|
let { isFocused: t, handleBlur: n } = e;
|
|
1411
1411
|
return t ? /* @__PURE__ */ p("aside", {
|
|
1412
1412
|
className: "arkynDatePickerOverlay",
|
|
@@ -1415,9 +1415,9 @@ function Mt(e) {
|
|
|
1415
1415
|
}
|
|
1416
1416
|
//#endregion
|
|
1417
1417
|
//#region src/components/datePicker/datePickerSpinner/index.tsx
|
|
1418
|
-
function
|
|
1418
|
+
function Pt(e) {
|
|
1419
1419
|
let { iconSize: t, isLoading: n } = e;
|
|
1420
|
-
return n ? /* @__PURE__ */ p(
|
|
1420
|
+
return n ? /* @__PURE__ */ p(R, {
|
|
1421
1421
|
className: "arkynDatePickerSpinner",
|
|
1422
1422
|
size: t,
|
|
1423
1423
|
strokeWidth: 2.5
|
|
@@ -1425,15 +1425,15 @@ function Nt(e) {
|
|
|
1425
1425
|
}
|
|
1426
1426
|
//#endregion
|
|
1427
1427
|
//#region src/components/datePicker/index.tsx
|
|
1428
|
-
function
|
|
1428
|
+
function Ft(e) {
|
|
1429
1429
|
let t = (e) => String(e).padStart(2, "0");
|
|
1430
1430
|
return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())}`;
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function It(e) {
|
|
1433
1433
|
return e.toLocaleDateString("pt-BR");
|
|
1434
1434
|
}
|
|
1435
|
-
function
|
|
1436
|
-
let { name: t, className: n = "", placeholder: r = "Selecione uma data...", errorMessage: i, isLoading: a = !1, readOnly: o = !1, id: c, label: d, showAsterisk: f, leftIcon: h, onFocus: g, onBlur: _, disabled: v = !1, prefix: y, size: b = "md", value: x, variant: S = "solid", orientation: C = "vertical", unShowFieldTemplate: w = !1, calendarVariant: T = "complete" } = e, E = e.closeOnSelect ?? e.type === "single", { fieldErrors: D } =
|
|
1435
|
+
function Lt(e) {
|
|
1436
|
+
let { name: t, className: n = "", placeholder: r = "Selecione uma data...", errorMessage: i, isLoading: a = !1, readOnly: o = !1, id: c, label: d, showAsterisk: f, leftIcon: h, onFocus: g, onBlur: _, disabled: v = !1, prefix: y, size: b = "md", value: x, variant: S = "solid", orientation: C = "vertical", unShowFieldTemplate: w = !1, calendarVariant: T = "complete" } = e, E = e.closeOnSelect ?? e.type === "single", { fieldErrors: D } = Z(), O = l(null), k = s(), A = c || k, j = i || D?.[t], M = !!j, N = v || a || o, P = {
|
|
1437
1437
|
md: 20,
|
|
1438
1438
|
lg: 20
|
|
1439
1439
|
}[b], [F, I] = u(!1), [L, R] = u(e.type === "single" ? e.defaultValue : void 0), [z, B] = u(e.type === "range" ? e.defaultValue : void 0);
|
|
@@ -1450,8 +1450,8 @@ function It(e) {
|
|
|
1450
1450
|
x === void 0 && B(t), e.type === "range" && e.onChange?.(t), E && H();
|
|
1451
1451
|
}
|
|
1452
1452
|
if (e.type === "range") {
|
|
1453
|
-
let i = e.rangeSeparator ?? " até ", s = x === void 0 ? z : x, c = s ? JSON.stringify([
|
|
1454
|
-
return /* @__PURE__ */ p(
|
|
1453
|
+
let i = e.rangeSeparator ?? " até ", s = x === void 0 ? z : x, c = s ? JSON.stringify([Ft(s[0]), Ft(s[1])]) : "";
|
|
1454
|
+
return /* @__PURE__ */ p($e, {
|
|
1455
1455
|
name: t,
|
|
1456
1456
|
label: d,
|
|
1457
1457
|
showAsterisk: f,
|
|
@@ -1459,7 +1459,7 @@ function It(e) {
|
|
|
1459
1459
|
errorMessage: j,
|
|
1460
1460
|
unShowFieldTemplate: w,
|
|
1461
1461
|
orientation: C,
|
|
1462
|
-
children: /* @__PURE__ */ m(
|
|
1462
|
+
children: /* @__PURE__ */ m(jt, {
|
|
1463
1463
|
handleContainerFocus: V,
|
|
1464
1464
|
disabled: N,
|
|
1465
1465
|
isError: M,
|
|
@@ -1477,7 +1477,7 @@ function It(e) {
|
|
|
1477
1477
|
value: c,
|
|
1478
1478
|
type: "hidden"
|
|
1479
1479
|
}),
|
|
1480
|
-
/* @__PURE__ */ p(
|
|
1480
|
+
/* @__PURE__ */ p(Q, {
|
|
1481
1481
|
iconSize: P,
|
|
1482
1482
|
icon: y,
|
|
1483
1483
|
className: "prefix"
|
|
@@ -1486,20 +1486,20 @@ function It(e) {
|
|
|
1486
1486
|
size: P,
|
|
1487
1487
|
strokeWidth: 2.5
|
|
1488
1488
|
}),
|
|
1489
|
-
/* @__PURE__ */ p(
|
|
1489
|
+
/* @__PURE__ */ p(Mt, {
|
|
1490
1490
|
size: b,
|
|
1491
1491
|
children: s ? /* @__PURE__ */ m("p", {
|
|
1492
1492
|
className: "hasValue",
|
|
1493
1493
|
children: [
|
|
1494
|
-
|
|
1494
|
+
It(s[0]),
|
|
1495
1495
|
i,
|
|
1496
|
-
|
|
1496
|
+
It(s[1])
|
|
1497
1497
|
]
|
|
1498
1498
|
}) : /* @__PURE__ */ p("p", { children: r })
|
|
1499
1499
|
}),
|
|
1500
|
-
/* @__PURE__ */ p(
|
|
1500
|
+
/* @__PURE__ */ p(kt, {
|
|
1501
1501
|
isFocused: F,
|
|
1502
|
-
children: /* @__PURE__ */ p(
|
|
1502
|
+
children: /* @__PURE__ */ p(gt, {
|
|
1503
1503
|
type: "range",
|
|
1504
1504
|
variant: T,
|
|
1505
1505
|
value: s,
|
|
@@ -1509,18 +1509,18 @@ function It(e) {
|
|
|
1509
1509
|
onChangeView: e.onChangeView
|
|
1510
1510
|
})
|
|
1511
1511
|
}),
|
|
1512
|
-
/* @__PURE__ */ p(
|
|
1512
|
+
/* @__PURE__ */ p(At, {
|
|
1513
1513
|
disabled: N,
|
|
1514
1514
|
isFocused: F,
|
|
1515
1515
|
readOnly: o,
|
|
1516
1516
|
iconSize: P,
|
|
1517
1517
|
isLoading: a
|
|
1518
1518
|
}),
|
|
1519
|
-
/* @__PURE__ */ p(
|
|
1519
|
+
/* @__PURE__ */ p(Pt, {
|
|
1520
1520
|
iconSize: P,
|
|
1521
1521
|
isLoading: a
|
|
1522
1522
|
}),
|
|
1523
|
-
/* @__PURE__ */ p(
|
|
1523
|
+
/* @__PURE__ */ p(Nt, {
|
|
1524
1524
|
handleBlur: H,
|
|
1525
1525
|
isFocused: F
|
|
1526
1526
|
})
|
|
@@ -1528,8 +1528,8 @@ function It(e) {
|
|
|
1528
1528
|
})
|
|
1529
1529
|
});
|
|
1530
1530
|
}
|
|
1531
|
-
let G = x === void 0 ? L : x, K = G ?
|
|
1532
|
-
return /* @__PURE__ */ p(
|
|
1531
|
+
let G = x === void 0 ? L : x, K = G ? Ft(G) : "";
|
|
1532
|
+
return /* @__PURE__ */ p($e, {
|
|
1533
1533
|
name: t,
|
|
1534
1534
|
label: d,
|
|
1535
1535
|
showAsterisk: f,
|
|
@@ -1537,7 +1537,7 @@ function It(e) {
|
|
|
1537
1537
|
errorMessage: j,
|
|
1538
1538
|
unShowFieldTemplate: w,
|
|
1539
1539
|
orientation: C,
|
|
1540
|
-
children: /* @__PURE__ */ m(
|
|
1540
|
+
children: /* @__PURE__ */ m(jt, {
|
|
1541
1541
|
handleContainerFocus: V,
|
|
1542
1542
|
disabled: N,
|
|
1543
1543
|
isError: M,
|
|
@@ -1555,7 +1555,7 @@ function It(e) {
|
|
|
1555
1555
|
value: K,
|
|
1556
1556
|
type: "hidden"
|
|
1557
1557
|
}),
|
|
1558
|
-
/* @__PURE__ */ p(
|
|
1558
|
+
/* @__PURE__ */ p(Q, {
|
|
1559
1559
|
iconSize: P,
|
|
1560
1560
|
icon: y,
|
|
1561
1561
|
className: "prefix"
|
|
@@ -1564,16 +1564,16 @@ function It(e) {
|
|
|
1564
1564
|
size: P,
|
|
1565
1565
|
strokeWidth: 2.5
|
|
1566
1566
|
}),
|
|
1567
|
-
/* @__PURE__ */ p(
|
|
1567
|
+
/* @__PURE__ */ p(Mt, {
|
|
1568
1568
|
size: b,
|
|
1569
1569
|
children: G ? /* @__PURE__ */ p("p", {
|
|
1570
1570
|
className: "hasValue",
|
|
1571
|
-
children:
|
|
1571
|
+
children: It(G)
|
|
1572
1572
|
}) : /* @__PURE__ */ p("p", { children: r })
|
|
1573
1573
|
}),
|
|
1574
|
-
/* @__PURE__ */ p(
|
|
1574
|
+
/* @__PURE__ */ p(kt, {
|
|
1575
1575
|
isFocused: F,
|
|
1576
|
-
children: /* @__PURE__ */ p(
|
|
1576
|
+
children: /* @__PURE__ */ p(gt, {
|
|
1577
1577
|
type: "single",
|
|
1578
1578
|
variant: T,
|
|
1579
1579
|
value: G,
|
|
@@ -1583,18 +1583,18 @@ function It(e) {
|
|
|
1583
1583
|
onChangeView: e.onChangeView
|
|
1584
1584
|
})
|
|
1585
1585
|
}),
|
|
1586
|
-
/* @__PURE__ */ p(
|
|
1586
|
+
/* @__PURE__ */ p(At, {
|
|
1587
1587
|
disabled: N,
|
|
1588
1588
|
isFocused: F,
|
|
1589
1589
|
readOnly: o,
|
|
1590
1590
|
iconSize: P,
|
|
1591
1591
|
isLoading: a
|
|
1592
1592
|
}),
|
|
1593
|
-
/* @__PURE__ */ p(
|
|
1593
|
+
/* @__PURE__ */ p(Pt, {
|
|
1594
1594
|
iconSize: P,
|
|
1595
1595
|
isLoading: a
|
|
1596
1596
|
}),
|
|
1597
|
-
/* @__PURE__ */ p(
|
|
1597
|
+
/* @__PURE__ */ p(Nt, {
|
|
1598
1598
|
handleBlur: H,
|
|
1599
1599
|
isFocused: F
|
|
1600
1600
|
})
|
|
@@ -1604,28 +1604,28 @@ function It(e) {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
//#endregion
|
|
1606
1606
|
//#region src/components/drawer/drawerContext.tsx
|
|
1607
|
-
var
|
|
1608
|
-
function
|
|
1607
|
+
var Rt = n({});
|
|
1608
|
+
function zt(e) {
|
|
1609
1609
|
let t = c(() => ({ makeInvisible: e.makeInvisible }), [e.makeInvisible]);
|
|
1610
|
-
return /* @__PURE__ */ p(
|
|
1610
|
+
return /* @__PURE__ */ p(Rt.Provider, {
|
|
1611
1611
|
value: t,
|
|
1612
1612
|
children: e.children
|
|
1613
1613
|
});
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1616
|
-
return a(
|
|
1615
|
+
function Bt() {
|
|
1616
|
+
return a(Rt);
|
|
1617
1617
|
}
|
|
1618
1618
|
//#endregion
|
|
1619
1619
|
//#region src/components/drawer/drawerContainer/index.tsx
|
|
1620
|
-
function
|
|
1620
|
+
function Vt(e) {
|
|
1621
1621
|
let { isVisible: t, makeInvisible: n, orientation: r = "left", children: i, className: a, ...s } = e, [c, l] = u(t), [d, f] = u(!1);
|
|
1622
1622
|
o(() => {
|
|
1623
1623
|
t ? (l(!0), f(!1)) : c && f(!0);
|
|
1624
|
-
}, [t, c]),
|
|
1624
|
+
}, [t, c]), at(t);
|
|
1625
1625
|
function h(e) {
|
|
1626
1626
|
e.target === e.currentTarget && d && (f(!1), l(!1), n());
|
|
1627
1627
|
}
|
|
1628
|
-
return c ? /* @__PURE__ */ p(
|
|
1628
|
+
return c ? /* @__PURE__ */ p(zt, {
|
|
1629
1629
|
makeInvisible: () => f(!0),
|
|
1630
1630
|
children: /* @__PURE__ */ m("aside", {
|
|
1631
1631
|
className: [
|
|
@@ -1648,8 +1648,8 @@ function Bt(e) {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
//#endregion
|
|
1650
1650
|
//#region src/components/drawer/drawerHeader/index.tsx
|
|
1651
|
-
function
|
|
1652
|
-
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } =
|
|
1651
|
+
function Ht(e) {
|
|
1652
|
+
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } = Bt();
|
|
1653
1653
|
return /* @__PURE__ */ m("header", {
|
|
1654
1654
|
className: `arkynDrawerHeader ${n}`.trim(),
|
|
1655
1655
|
...i,
|
|
@@ -1658,13 +1658,13 @@ function Vt(e) {
|
|
|
1658
1658
|
type: "button",
|
|
1659
1659
|
onClick: a,
|
|
1660
1660
|
"aria-label": "Close drawer",
|
|
1661
|
-
children: /* @__PURE__ */ p(
|
|
1661
|
+
children: /* @__PURE__ */ p(q, { size: 24 })
|
|
1662
1662
|
})]
|
|
1663
1663
|
});
|
|
1664
1664
|
}
|
|
1665
1665
|
//#endregion
|
|
1666
1666
|
//#region src/components/facebookPixel/pixel.ts
|
|
1667
|
-
var
|
|
1667
|
+
var Ut = class {
|
|
1668
1668
|
pixelId;
|
|
1669
1669
|
autoConfig;
|
|
1670
1670
|
initialized;
|
|
@@ -1711,18 +1711,18 @@ var Ht = class {
|
|
|
1711
1711
|
};
|
|
1712
1712
|
//#endregion
|
|
1713
1713
|
//#region src/components/facebookPixel/facebookPixel.client.tsx
|
|
1714
|
-
function
|
|
1715
|
-
let { pixelId: t, options: n, pageView: r, track: i, trackCustom: a, trackSingle: o, trackSingleCustom: s, grantConsent: c, revokeConsent: l } = e, u = new
|
|
1714
|
+
function Wt(e) {
|
|
1715
|
+
let { pixelId: t, options: n, pageView: r, track: i, trackCustom: a, trackSingle: o, trackSingleCustom: s, grantConsent: c, revokeConsent: l } = e, u = new Ut(t, n);
|
|
1716
1716
|
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), null;
|
|
1717
1717
|
}
|
|
1718
1718
|
//#endregion
|
|
1719
1719
|
//#region src/components/facebookPixel/index.tsx
|
|
1720
|
-
function
|
|
1721
|
-
return process.env.NODE_ENV !== "production" && !e.showInDevMode ? null : /* @__PURE__ */ p(
|
|
1720
|
+
function Gt(e) {
|
|
1721
|
+
return process.env.NODE_ENV !== "production" && !e.showInDevMode ? null : /* @__PURE__ */ p(Tt, { children: () => /* @__PURE__ */ p(Wt, { ...e }) });
|
|
1722
1722
|
}
|
|
1723
1723
|
//#endregion
|
|
1724
1724
|
//#region src/components/fileUpload/hasFileContent/index.tsx
|
|
1725
|
-
function
|
|
1725
|
+
function Kt(e) {
|
|
1726
1726
|
let { disabled: t, file: n, isLoading: r, acceptFile: i, changeFileButtonText: a, handleSelectFile: o, reSendFile: s } = e;
|
|
1727
1727
|
function c() {
|
|
1728
1728
|
if (t) return;
|
|
@@ -1756,10 +1756,10 @@ function Gt(e) {
|
|
|
1756
1756
|
size: "sm",
|
|
1757
1757
|
isLoading: r,
|
|
1758
1758
|
onClick: s,
|
|
1759
|
-
icon:
|
|
1759
|
+
icon: U,
|
|
1760
1760
|
disabled: t
|
|
1761
1761
|
})
|
|
1762
|
-
}), /* @__PURE__ */ p(
|
|
1762
|
+
}), /* @__PURE__ */ p($, {
|
|
1763
1763
|
isLoading: r,
|
|
1764
1764
|
onClick: c,
|
|
1765
1765
|
variant: "outline",
|
|
@@ -1774,7 +1774,7 @@ function Gt(e) {
|
|
|
1774
1774
|
}
|
|
1775
1775
|
//#endregion
|
|
1776
1776
|
//#region src/components/fileUpload/noFileContent/index.tsx
|
|
1777
|
-
function
|
|
1777
|
+
function qt(e) {
|
|
1778
1778
|
let { dropFileText: t, isLoading: n, acceptFile: r, handleSelectFile: i, selectFileButtonText: a, disabled: o } = e;
|
|
1779
1779
|
function s(e) {
|
|
1780
1780
|
if (o) return;
|
|
@@ -1793,7 +1793,7 @@ function Kt(e) {
|
|
|
1793
1793
|
return /* @__PURE__ */ m("div", {
|
|
1794
1794
|
onDrop: s,
|
|
1795
1795
|
className: "arkynFileUploadNoFileContent",
|
|
1796
|
-
children: [/* @__PURE__ */ p(
|
|
1796
|
+
children: [/* @__PURE__ */ p($, {
|
|
1797
1797
|
isLoading: n,
|
|
1798
1798
|
onClick: c,
|
|
1799
1799
|
variant: "ghost",
|
|
@@ -1806,8 +1806,8 @@ function Kt(e) {
|
|
|
1806
1806
|
}
|
|
1807
1807
|
//#endregion
|
|
1808
1808
|
//#region src/components/fileUpload/index.tsx
|
|
1809
|
-
function
|
|
1810
|
-
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: _ } =
|
|
1809
|
+
function Jt(e) {
|
|
1810
|
+
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);
|
|
1811
1811
|
async function D(e) {
|
|
1812
1812
|
if (g) return;
|
|
1813
1813
|
E(!0), w(e), S("");
|
|
@@ -1825,8 +1825,8 @@ function qt(e) {
|
|
|
1825
1825
|
g || D(e);
|
|
1826
1826
|
}
|
|
1827
1827
|
let k = v || x;
|
|
1828
|
-
return /* @__PURE__ */ m(
|
|
1829
|
-
n && /* @__PURE__ */ p(
|
|
1828
|
+
return /* @__PURE__ */ m(Be, { children: [
|
|
1829
|
+
n && /* @__PURE__ */ p(ze, {
|
|
1830
1830
|
showAsterisk: r,
|
|
1831
1831
|
children: n
|
|
1832
1832
|
}),
|
|
@@ -1838,7 +1838,7 @@ function qt(e) {
|
|
|
1838
1838
|
name: t,
|
|
1839
1839
|
value: y || ""
|
|
1840
1840
|
}),
|
|
1841
|
-
!C && /* @__PURE__ */ p(
|
|
1841
|
+
!C && /* @__PURE__ */ p(qt, {
|
|
1842
1842
|
disabled: g,
|
|
1843
1843
|
isLoading: T,
|
|
1844
1844
|
acceptFile: s,
|
|
@@ -1846,7 +1846,7 @@ function qt(e) {
|
|
|
1846
1846
|
handleSelectFile: O,
|
|
1847
1847
|
selectFileButtonText: d
|
|
1848
1848
|
}),
|
|
1849
|
-
C && /* @__PURE__ */ p(
|
|
1849
|
+
C && /* @__PURE__ */ p(Kt, {
|
|
1850
1850
|
disabled: g,
|
|
1851
1851
|
isLoading: T,
|
|
1852
1852
|
acceptFile: s,
|
|
@@ -1857,12 +1857,12 @@ function qt(e) {
|
|
|
1857
1857
|
})
|
|
1858
1858
|
]
|
|
1859
1859
|
}),
|
|
1860
|
-
k && /* @__PURE__ */ p(
|
|
1860
|
+
k && /* @__PURE__ */ p(Re, { children: k })
|
|
1861
1861
|
] });
|
|
1862
1862
|
}
|
|
1863
1863
|
//#endregion
|
|
1864
1864
|
//#region src/components/fullCalendar/_viewService.ts
|
|
1865
|
-
var
|
|
1865
|
+
var Yt = class {
|
|
1866
1866
|
capitalize(e) {
|
|
1867
1867
|
return J(e);
|
|
1868
1868
|
}
|
|
@@ -1958,16 +1958,16 @@ var Jt = class {
|
|
|
1958
1958
|
let n = new Date(e);
|
|
1959
1959
|
n.setDate(n.getDate() - 1), t(n);
|
|
1960
1960
|
}
|
|
1961
|
-
},
|
|
1962
|
-
function
|
|
1963
|
-
return a(
|
|
1961
|
+
}, Xt = n({});
|
|
1962
|
+
function Zt() {
|
|
1963
|
+
return a(Xt);
|
|
1964
1964
|
}
|
|
1965
|
-
function
|
|
1966
|
-
let { blockedTimestamps: t, children: n, events: r, defaultViewValue: i = /* @__PURE__ */ new Date(), language: a = "pt-BR", onChangeView: o, onClickDate: s, viewValue: c } = e, l = new
|
|
1965
|
+
function Qt(e) {
|
|
1966
|
+
let { blockedTimestamps: t, children: n, events: r, defaultViewValue: i = /* @__PURE__ */ new Date(), language: a = "pt-BR", onChangeView: o, onClickDate: s, viewValue: c } = e, l = new Yt(), d = l.listHours([8, 18]), [f, m] = u(i), h = c || f;
|
|
1967
1967
|
function g(e) {
|
|
1968
1968
|
o && o(e), m(e);
|
|
1969
1969
|
}
|
|
1970
|
-
return /* @__PURE__ */ p(
|
|
1970
|
+
return /* @__PURE__ */ p(Xt.Provider, {
|
|
1971
1971
|
value: {
|
|
1972
1972
|
events: r,
|
|
1973
1973
|
blockedTimestamps: t,
|
|
@@ -1989,7 +1989,7 @@ function Xt(e) {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
//#endregion
|
|
1991
1991
|
//#region src/components/fullCalendar/dayCalendar/dayCalendarContainer/index.tsx
|
|
1992
|
-
function
|
|
1992
|
+
function $t({ children: e }) {
|
|
1993
1993
|
return /* @__PURE__ */ p("div", {
|
|
1994
1994
|
className: "arkynDayCalendarContainer",
|
|
1995
1995
|
children: e
|
|
@@ -1997,15 +1997,15 @@ function Zt({ children: e }) {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
//#endregion
|
|
1999
1999
|
//#region src/components/fullCalendar/dayCalendar/dayCalendarEvent/index.tsx
|
|
2000
|
-
var
|
|
2001
|
-
function
|
|
2002
|
-
let { events: t, viewDate: n } =
|
|
2000
|
+
var en = 30, tn = 205;
|
|
2001
|
+
function nn(e) {
|
|
2002
|
+
let { events: t, viewDate: n } = Zt(), r = n.getDate(), i = n.getMonth(), a = n.getFullYear(), o = t.map((e, t) => ({
|
|
2003
2003
|
event: e,
|
|
2004
2004
|
sourceIndex: t
|
|
2005
2005
|
})).filter(({ event: e }) => e.initialDate.getDate() === r && e.initialDate.getMonth() === i && e.initialDate.getFullYear() === a).sort((e, t) => {
|
|
2006
2006
|
let n = e.event.initialDate.getTime(), r = t.event.initialDate.getTime();
|
|
2007
2007
|
if (n !== r) return n - r;
|
|
2008
|
-
let i = e.event.endDate?.getTime() ?? n +
|
|
2008
|
+
let i = e.event.endDate?.getTime() ?? n + en * 6e4, a = t.event.endDate?.getTime() ?? r + en * 6e4;
|
|
2009
2009
|
return i === a ? e.sourceIndex - t.sourceIndex : i - a;
|
|
2010
2010
|
}), s = new Map(o.map((e, t) => [e.sourceIndex, t])), c = o.filter(({ event: t }) => {
|
|
2011
2011
|
let n = Math.floor(e.timeInMinutes / 60), o = e.timeInMinutes % 60;
|
|
@@ -2026,7 +2026,7 @@ function en(e) {
|
|
|
2026
2026
|
return n === 0 ? `${t}h` : `${t}h${n}`;
|
|
2027
2027
|
}
|
|
2028
2028
|
function d(e) {
|
|
2029
|
-
let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t +
|
|
2029
|
+
let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t + en;
|
|
2030
2030
|
return {
|
|
2031
2031
|
startMinutes: t,
|
|
2032
2032
|
endMinutes: Math.max(n, t + 1)
|
|
@@ -2041,7 +2041,7 @@ function en(e) {
|
|
|
2041
2041
|
}, 0);
|
|
2042
2042
|
}
|
|
2043
2043
|
function h(t, n) {
|
|
2044
|
-
let { startMinutes: r, endMinutes: i } = d(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), s = a /
|
|
2044
|
+
let { startMinutes: r, endMinutes: i } = d(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), s = a / en * 100, c = o / en * 100, l = f(t, n) * tn;
|
|
2045
2045
|
return {
|
|
2046
2046
|
top: `${s}%`,
|
|
2047
2047
|
height: `${c}%`,
|
|
@@ -2064,8 +2064,8 @@ function en(e) {
|
|
|
2064
2064
|
}
|
|
2065
2065
|
//#endregion
|
|
2066
2066
|
//#region src/components/fullCalendar/dayCalendar/dayCalendarRow/index.tsx
|
|
2067
|
-
function
|
|
2068
|
-
let n = new
|
|
2067
|
+
function rn({ hour: e, timeInMinutes: t }) {
|
|
2068
|
+
let n = new Yt(), { blockedTimestamps: r, viewDate: i, onClickDate: a } = Zt();
|
|
2069
2069
|
function o() {
|
|
2070
2070
|
return r.some((e) => i >= e.initialDate && i <= e.endDate);
|
|
2071
2071
|
}
|
|
@@ -2081,22 +2081,22 @@ function tn({ hour: e, timeInMinutes: t }) {
|
|
|
2081
2081
|
onClick: s,
|
|
2082
2082
|
children: [/* @__PURE__ */ p("p", { children: n.formatHourLabel(e) }), /* @__PURE__ */ p("div", {
|
|
2083
2083
|
className: "arkynDayCalendarRowContent",
|
|
2084
|
-
children: /* @__PURE__ */ p(
|
|
2084
|
+
children: /* @__PURE__ */ p(nn, { timeInMinutes: t })
|
|
2085
2085
|
})]
|
|
2086
2086
|
});
|
|
2087
2087
|
}
|
|
2088
2088
|
//#endregion
|
|
2089
2089
|
//#region src/components/fullCalendar/dayCalendar/index.tsx
|
|
2090
|
-
function
|
|
2091
|
-
let { listHours: e } =
|
|
2092
|
-
return /* @__PURE__ */ p(
|
|
2090
|
+
function an() {
|
|
2091
|
+
let { listHours: e } = Zt();
|
|
2092
|
+
return /* @__PURE__ */ p($t, { children: e.map((e) => /* @__PURE__ */ p(rn, {
|
|
2093
2093
|
hour: e,
|
|
2094
2094
|
timeInMinutes: e
|
|
2095
2095
|
}, e)) });
|
|
2096
2096
|
}
|
|
2097
2097
|
//#endregion
|
|
2098
2098
|
//#region src/components/fullCalendar/fullCalendarContainer/index.tsx
|
|
2099
|
-
function
|
|
2099
|
+
function on({ children: e }) {
|
|
2100
2100
|
return /* @__PURE__ */ p("div", {
|
|
2101
2101
|
className: "arkynFullCalendarContainer",
|
|
2102
2102
|
children: e
|
|
@@ -2104,8 +2104,8 @@ function rn({ children: e }) {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
//#endregion
|
|
2106
2106
|
//#region src/components/fullCalendar/fullCalendarHeader/index.tsx
|
|
2107
|
-
function
|
|
2108
|
-
let { setViewType: t, viewType: n } = e, r =
|
|
2107
|
+
function sn(e) {
|
|
2108
|
+
let { setViewType: t, viewType: n } = e, r = Zt();
|
|
2109
2109
|
function i() {
|
|
2110
2110
|
switch (n) {
|
|
2111
2111
|
case "day": return r.previousDay();
|
|
@@ -2122,19 +2122,19 @@ function an(e) {
|
|
|
2122
2122
|
}
|
|
2123
2123
|
return /* @__PURE__ */ m("div", {
|
|
2124
2124
|
className: "arkynFullCalendarHeader",
|
|
2125
|
-
children: [/* @__PURE__ */ m(
|
|
2125
|
+
children: [/* @__PURE__ */ m(xt, {
|
|
2126
2126
|
defaultValue: n,
|
|
2127
2127
|
onChange: (e) => t(e),
|
|
2128
2128
|
children: [
|
|
2129
|
-
/* @__PURE__ */ p(
|
|
2129
|
+
/* @__PURE__ */ p(bt, {
|
|
2130
2130
|
value: "day",
|
|
2131
2131
|
children: "Dia"
|
|
2132
2132
|
}),
|
|
2133
|
-
/* @__PURE__ */ p(
|
|
2133
|
+
/* @__PURE__ */ p(bt, {
|
|
2134
2134
|
value: "week",
|
|
2135
2135
|
children: "Semana"
|
|
2136
2136
|
}),
|
|
2137
|
-
/* @__PURE__ */ p(
|
|
2137
|
+
/* @__PURE__ */ p(bt, {
|
|
2138
2138
|
value: "month",
|
|
2139
2139
|
children: "Mês"
|
|
2140
2140
|
})
|
|
@@ -2165,8 +2165,8 @@ function an(e) {
|
|
|
2165
2165
|
}
|
|
2166
2166
|
//#endregion
|
|
2167
2167
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.tsx
|
|
2168
|
-
function
|
|
2169
|
-
let { events: t } =
|
|
2168
|
+
function cn(e) {
|
|
2169
|
+
let { events: t } = Zt(), n = t.filter((t) => t.initialDate.getDate() === e.day && t.initialDate.getMonth() === e.month && t.initialDate.getFullYear() === e.year);
|
|
2170
2170
|
if (n.length === 0) return null;
|
|
2171
2171
|
function r(t) {
|
|
2172
2172
|
return `${e.day}-${e.month}-${e.year}-${t}`;
|
|
@@ -2190,8 +2190,8 @@ function on(e) {
|
|
|
2190
2190
|
}
|
|
2191
2191
|
//#endregion
|
|
2192
2192
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.tsx
|
|
2193
|
-
function
|
|
2194
|
-
let { day: t, month: n, year: r, dayOwner: i } = e, { blockedTimestamps: a, onClickDate: o } =
|
|
2193
|
+
function ln(e) {
|
|
2194
|
+
let { day: t, month: n, year: r, dayOwner: i } = e, { blockedTimestamps: a, onClickDate: o } = Zt();
|
|
2195
2195
|
function s() {
|
|
2196
2196
|
let e = /* @__PURE__ */ new Date();
|
|
2197
2197
|
return t === e.getDate() && n === e.getMonth() && r === e.getFullYear();
|
|
@@ -2211,7 +2211,7 @@ function sn(e) {
|
|
|
2211
2211
|
children: t
|
|
2212
2212
|
}), /* @__PURE__ */ p("div", {
|
|
2213
2213
|
className: "arkynMonthlyCalendarEventContainer",
|
|
2214
|
-
children: /* @__PURE__ */ p(
|
|
2214
|
+
children: /* @__PURE__ */ p(cn, {
|
|
2215
2215
|
day: t,
|
|
2216
2216
|
month: n,
|
|
2217
2217
|
year: r
|
|
@@ -2221,15 +2221,15 @@ function sn(e) {
|
|
|
2221
2221
|
}
|
|
2222
2222
|
//#endregion
|
|
2223
2223
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.tsx
|
|
2224
|
-
function
|
|
2224
|
+
function un() {
|
|
2225
2225
|
return /* @__PURE__ */ p("tbody", {
|
|
2226
2226
|
className: "arkynMonthlyCalendarTableBody",
|
|
2227
|
-
children:
|
|
2227
|
+
children: Zt().listMonthlyMatrix.map((e, t) => /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p(ln, { ...e }, t)) }, t))
|
|
2228
2228
|
});
|
|
2229
2229
|
}
|
|
2230
2230
|
//#endregion
|
|
2231
2231
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.tsx
|
|
2232
|
-
function
|
|
2232
|
+
function dn({ children: e }) {
|
|
2233
2233
|
return /* @__PURE__ */ p("div", {
|
|
2234
2234
|
className: "arkynMonthlyCalendarTableContainer",
|
|
2235
2235
|
children: /* @__PURE__ */ p("table", { children: e })
|
|
@@ -2237,8 +2237,8 @@ function ln({ children: e }) {
|
|
|
2237
2237
|
}
|
|
2238
2238
|
//#endregion
|
|
2239
2239
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.tsx
|
|
2240
|
-
function
|
|
2241
|
-
let { listWeek: e } =
|
|
2240
|
+
function fn() {
|
|
2241
|
+
let { listWeek: e } = Zt();
|
|
2242
2242
|
return /* @__PURE__ */ p("thead", {
|
|
2243
2243
|
className: "arkynMonthlyCalendarTableHeader",
|
|
2244
2244
|
children: /* @__PURE__ */ p("tr", { children: e.map((e) => /* @__PURE__ */ p("th", { children: J(e) }, e)) })
|
|
@@ -2246,20 +2246,20 @@ function un() {
|
|
|
2246
2246
|
}
|
|
2247
2247
|
//#endregion
|
|
2248
2248
|
//#region src/components/fullCalendar/monthlyCalendar/index.tsx
|
|
2249
|
-
function
|
|
2250
|
-
return /* @__PURE__ */ m(
|
|
2249
|
+
function pn() {
|
|
2250
|
+
return /* @__PURE__ */ m(dn, { children: [/* @__PURE__ */ p(fn, {}), /* @__PURE__ */ p(un, {})] });
|
|
2251
2251
|
}
|
|
2252
2252
|
//#endregion
|
|
2253
2253
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarEvent/index.tsx
|
|
2254
|
-
var
|
|
2255
|
-
function
|
|
2256
|
-
let { events: t } =
|
|
2254
|
+
var mn = 30, hn = 40;
|
|
2255
|
+
function gn(e) {
|
|
2256
|
+
let { events: t } = Zt(), n = t.map((e, t) => ({
|
|
2257
2257
|
event: e,
|
|
2258
2258
|
sourceIndex: t
|
|
2259
2259
|
})).filter(({ event: t }) => t.initialDate.getDate() === e.day && t.initialDate.getMonth() === e.month && t.initialDate.getFullYear() === e.year).sort((e, t) => {
|
|
2260
2260
|
let n = e.event.initialDate.getTime(), r = t.event.initialDate.getTime();
|
|
2261
2261
|
if (n !== r) return n - r;
|
|
2262
|
-
let i = e.event.endDate?.getTime() ?? n +
|
|
2262
|
+
let i = e.event.endDate?.getTime() ?? n + mn * 6e4, a = t.event.endDate?.getTime() ?? r + mn * 6e4;
|
|
2263
2263
|
return i === a ? e.sourceIndex - t.sourceIndex : i - a;
|
|
2264
2264
|
}), r = new Map(n.map((e, t) => [e.sourceIndex, t])), i = n.filter(({ event: t }) => {
|
|
2265
2265
|
let n = Math.floor(e.timeInMinutes / 60), r = e.timeInMinutes % 60;
|
|
@@ -2280,7 +2280,7 @@ function mn(e) {
|
|
|
2280
2280
|
return n === 0 ? `${t}h` : `${t}h${n}`;
|
|
2281
2281
|
}
|
|
2282
2282
|
function s(e) {
|
|
2283
|
-
let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t +
|
|
2283
|
+
let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t + mn;
|
|
2284
2284
|
return {
|
|
2285
2285
|
startMinutes: t,
|
|
2286
2286
|
endMinutes: Math.max(n, t + 1)
|
|
@@ -2295,7 +2295,7 @@ function mn(e) {
|
|
|
2295
2295
|
}, 0);
|
|
2296
2296
|
}
|
|
2297
2297
|
function l(t, n) {
|
|
2298
|
-
let { startMinutes: r, endMinutes: i } = s(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), l = a /
|
|
2298
|
+
let { startMinutes: r, endMinutes: i } = s(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), l = a / mn * 100, u = o / mn * 100, d = c(t, n) * hn;
|
|
2299
2299
|
return {
|
|
2300
2300
|
top: `${l}%`,
|
|
2301
2301
|
height: `${u}%`,
|
|
@@ -2318,8 +2318,8 @@ function mn(e) {
|
|
|
2318
2318
|
}
|
|
2319
2319
|
//#endregion
|
|
2320
2320
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.tsx
|
|
2321
|
-
function
|
|
2322
|
-
let { day: t, month: n, year: r, dayOwner: i, timeInMinutes: a } = e, { blockedTimestamps: o, onClickDate: s } =
|
|
2321
|
+
function _n(e) {
|
|
2322
|
+
let { day: t, month: n, year: r, dayOwner: i, timeInMinutes: a } = e, { blockedTimestamps: o, onClickDate: s } = Zt();
|
|
2323
2323
|
function c() {
|
|
2324
2324
|
let e = new Date(r, n, t);
|
|
2325
2325
|
return o.some((t) => e >= t.initialDate && e <= t.endDate);
|
|
@@ -2337,7 +2337,7 @@ function hn(e) {
|
|
|
2337
2337
|
onClick: l,
|
|
2338
2338
|
children: /* @__PURE__ */ p("div", {
|
|
2339
2339
|
className: "arkynWeekCalendarTableTdContent",
|
|
2340
|
-
children: /* @__PURE__ */ p(
|
|
2340
|
+
children: /* @__PURE__ */ p(gn, {
|
|
2341
2341
|
day: t,
|
|
2342
2342
|
month: n,
|
|
2343
2343
|
year: r,
|
|
@@ -2348,19 +2348,19 @@ function hn(e) {
|
|
|
2348
2348
|
}
|
|
2349
2349
|
//#endregion
|
|
2350
2350
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.tsx
|
|
2351
|
-
function
|
|
2352
|
-
let e =
|
|
2351
|
+
function vn() {
|
|
2352
|
+
let e = Zt(), t = new Yt();
|
|
2353
2353
|
return /* @__PURE__ */ p("tbody", {
|
|
2354
2354
|
className: "arkynWeekCalendarTableBody",
|
|
2355
2355
|
children: e.listWeeklyMatrix.map((e) => /* @__PURE__ */ m("tr", { children: [/* @__PURE__ */ p("td", {
|
|
2356
2356
|
className: "hourTd",
|
|
2357
2357
|
children: /* @__PURE__ */ p("p", { children: t.formatHourLabel(e[0].timeInMinutes) })
|
|
2358
|
-
}), e.map((e) => /* @__PURE__ */ p(
|
|
2358
|
+
}), e.map((e) => /* @__PURE__ */ p(_n, { ...e }, `${e.year}-${e.month}-${e.day}-${e.timeInMinutes}`))] }, e[0].timeInMinutes))
|
|
2359
2359
|
});
|
|
2360
2360
|
}
|
|
2361
2361
|
//#endregion
|
|
2362
2362
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.tsx
|
|
2363
|
-
function
|
|
2363
|
+
function yn({ children: e }) {
|
|
2364
2364
|
return /* @__PURE__ */ p("div", {
|
|
2365
2365
|
className: "arkynWeekCalendarTableContainer",
|
|
2366
2366
|
children: /* @__PURE__ */ p("table", { children: e })
|
|
@@ -2368,8 +2368,8 @@ function _n({ children: e }) {
|
|
|
2368
2368
|
}
|
|
2369
2369
|
//#endregion
|
|
2370
2370
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.tsx
|
|
2371
|
-
function
|
|
2372
|
-
let { listWeek: e, listWeeklyMatrix: t } =
|
|
2371
|
+
function bn() {
|
|
2372
|
+
let { listWeek: e, listWeeklyMatrix: t } = Zt(), n = t[0] || [];
|
|
2373
2373
|
return /* @__PURE__ */ p("thead", {
|
|
2374
2374
|
className: "arkynWeekCalendarTableHeader",
|
|
2375
2375
|
children: /* @__PURE__ */ m("tr", { children: [/* @__PURE__ */ p("th", {}), e.map((e, t) => /* @__PURE__ */ p("th", { children: /* @__PURE__ */ m("div", {
|
|
@@ -2380,34 +2380,34 @@ function vn() {
|
|
|
2380
2380
|
}
|
|
2381
2381
|
//#endregion
|
|
2382
2382
|
//#region src/components/fullCalendar/weekCalendar/index.tsx
|
|
2383
|
-
function
|
|
2384
|
-
return /* @__PURE__ */ m(
|
|
2383
|
+
function xn() {
|
|
2384
|
+
return /* @__PURE__ */ m(yn, { children: [/* @__PURE__ */ p(bn, {}), /* @__PURE__ */ p(vn, {})] });
|
|
2385
2385
|
}
|
|
2386
2386
|
//#endregion
|
|
2387
2387
|
//#region src/components/fullCalendar/index.tsx
|
|
2388
|
-
function
|
|
2388
|
+
function Sn(e) {
|
|
2389
2389
|
let [t, n] = u("month");
|
|
2390
|
-
return /* @__PURE__ */ p(
|
|
2390
|
+
return /* @__PURE__ */ p(Qt, {
|
|
2391
2391
|
events: e.events || [],
|
|
2392
2392
|
viewValue: e.viewValue,
|
|
2393
2393
|
defaultViewValue: e.defaultViewValue,
|
|
2394
2394
|
onChangeView: e.onChangeView,
|
|
2395
2395
|
blockedTimestamps: e.blockedTimestamps || [],
|
|
2396
2396
|
onClickDate: e.onClickDate,
|
|
2397
|
-
children: /* @__PURE__ */ m(
|
|
2398
|
-
/* @__PURE__ */ p(
|
|
2397
|
+
children: /* @__PURE__ */ m(on, { children: [
|
|
2398
|
+
/* @__PURE__ */ p(sn, {
|
|
2399
2399
|
viewType: t,
|
|
2400
2400
|
setViewType: n
|
|
2401
2401
|
}),
|
|
2402
|
-
t === "day" && /* @__PURE__ */ p(
|
|
2403
|
-
t === "month" && /* @__PURE__ */ p(
|
|
2404
|
-
t === "week" && /* @__PURE__ */ p(
|
|
2402
|
+
t === "day" && /* @__PURE__ */ p(an, {}),
|
|
2403
|
+
t === "month" && /* @__PURE__ */ p(pn, {}),
|
|
2404
|
+
t === "week" && /* @__PURE__ */ p(xn, {})
|
|
2405
2405
|
] })
|
|
2406
2406
|
});
|
|
2407
2407
|
}
|
|
2408
2408
|
//#endregion
|
|
2409
2409
|
//#region src/components/googleAnalytics/snippets/generateGAElements.ts
|
|
2410
|
-
function
|
|
2410
|
+
function Cn(e) {
|
|
2411
2411
|
let { measurementId: t } = e;
|
|
2412
2412
|
return t || console.warn("Google Analytics Measurement ID is required"), {
|
|
2413
2413
|
src: `https://www.googletagmanager.com/gtag/js?id=${t}`,
|
|
@@ -2420,7 +2420,7 @@ function xn(e) {
|
|
|
2420
2420
|
}
|
|
2421
2421
|
//#endregion
|
|
2422
2422
|
//#region src/components/googleAnalytics/googleAnalytics.tsx
|
|
2423
|
-
var
|
|
2423
|
+
var wn = class {
|
|
2424
2424
|
initializeAsyncScript(e) {
|
|
2425
2425
|
let t = document.createElement("script");
|
|
2426
2426
|
return t.async = !0, t.src = e, t;
|
|
@@ -2430,24 +2430,24 @@ var Sn = class {
|
|
|
2430
2430
|
return t.innerHTML = e, t;
|
|
2431
2431
|
}
|
|
2432
2432
|
initialize(e) {
|
|
2433
|
-
let { measurementId: t } = e, n =
|
|
2433
|
+
let { measurementId: t } = e, n = Cn({ measurementId: t }), r = this.initializeAsyncScript(n.src), i = this.initializeInlineScript(n.script);
|
|
2434
2434
|
document.head.appendChild(r), document.head.appendChild(i);
|
|
2435
2435
|
}
|
|
2436
2436
|
};
|
|
2437
2437
|
//#endregion
|
|
2438
2438
|
//#region src/components/googleAnalytics/googleAnalytics.client.tsx
|
|
2439
|
-
function
|
|
2440
|
-
return new
|
|
2439
|
+
function Tn(e) {
|
|
2440
|
+
return new wn().initialize(e), null;
|
|
2441
2441
|
}
|
|
2442
2442
|
//#endregion
|
|
2443
2443
|
//#region src/components/googleAnalytics/index.tsx
|
|
2444
|
-
function
|
|
2444
|
+
function En(e) {
|
|
2445
2445
|
let { measurementId: t, showInDevMode: n = !1 } = e;
|
|
2446
|
-
return process.env.NODE_ENV !== "production" && !n ? null : /* @__PURE__ */ p(
|
|
2446
|
+
return process.env.NODE_ENV !== "production" && !n ? null : /* @__PURE__ */ p(Tt, { children: () => /* @__PURE__ */ p(Tn, { measurementId: t }) });
|
|
2447
2447
|
}
|
|
2448
2448
|
//#endregion
|
|
2449
2449
|
//#region src/components/googleTagManager/snippets/appendToDataLayer.ts
|
|
2450
|
-
function
|
|
2450
|
+
function Dn(e) {
|
|
2451
2451
|
let { dataLayer: t, dataLayerName: n } = e;
|
|
2452
2452
|
return `
|
|
2453
2453
|
window.${n} = window.${n} || [];
|
|
@@ -2455,7 +2455,7 @@ function Tn(e) {
|
|
|
2455
2455
|
}
|
|
2456
2456
|
//#endregion
|
|
2457
2457
|
//#region src/components/googleTagManager/snippets/generateGTMElements.ts
|
|
2458
|
-
function
|
|
2458
|
+
function On(e) {
|
|
2459
2459
|
let { id: t, events: n, dataLayer: r, dataLayerName: i, preview: a, auth: o } = e, s = `>m_auth=${o}`, c = `>m_preview=${a}`;
|
|
2460
2460
|
return t || console.warn("GTM Id is required"), {
|
|
2461
2461
|
iframe: `
|
|
@@ -2468,7 +2468,7 @@ function En(e) {
|
|
|
2468
2468
|
j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'${s}${c}>m_cookies_win=x';
|
|
2469
2469
|
f.parentNode.insertBefore(j,f);
|
|
2470
2470
|
})(window,document,'script','${i}','${t}');`,
|
|
2471
|
-
dataLayerVar:
|
|
2471
|
+
dataLayerVar: Dn({
|
|
2472
2472
|
dataLayer: r,
|
|
2473
2473
|
dataLayerName: i
|
|
2474
2474
|
})
|
|
@@ -2476,13 +2476,13 @@ function En(e) {
|
|
|
2476
2476
|
}
|
|
2477
2477
|
//#endregion
|
|
2478
2478
|
//#region src/components/googleTagManager/googleTagManager.tsx
|
|
2479
|
-
var
|
|
2479
|
+
var kn = class {
|
|
2480
2480
|
initializeDataScript(e) {
|
|
2481
2481
|
let t = document.createElement("script");
|
|
2482
2482
|
return t.innerHTML = e, t;
|
|
2483
2483
|
}
|
|
2484
2484
|
initializeGTMElements(e) {
|
|
2485
|
-
let t =
|
|
2485
|
+
let t = On(e);
|
|
2486
2486
|
return {
|
|
2487
2487
|
noScript: () => {
|
|
2488
2488
|
let e = document.createElement("noscript");
|
|
@@ -2498,7 +2498,7 @@ var Dn = class {
|
|
|
2498
2498
|
initializeDataLayer(e) {
|
|
2499
2499
|
let { dataLayer: t, dataLayerName: n } = e;
|
|
2500
2500
|
if (window[n]) return window[n].push(t);
|
|
2501
|
-
let r =
|
|
2501
|
+
let r = Dn({
|
|
2502
2502
|
dataLayer: t,
|
|
2503
2503
|
dataLayerName: n
|
|
2504
2504
|
}), i = this.initializeDataScript(r);
|
|
@@ -2518,14 +2518,14 @@ var Dn = class {
|
|
|
2518
2518
|
};
|
|
2519
2519
|
//#endregion
|
|
2520
2520
|
//#region src/components/googleTagManager/googleTagManager.client.tsx
|
|
2521
|
-
function
|
|
2522
|
-
return new
|
|
2521
|
+
function An(e) {
|
|
2522
|
+
return new kn().initialize(e), null;
|
|
2523
2523
|
}
|
|
2524
2524
|
//#endregion
|
|
2525
2525
|
//#region src/components/googleTagManager/index.tsx
|
|
2526
|
-
function
|
|
2526
|
+
function jn(e) {
|
|
2527
2527
|
let { gtmId: t, auth: n = "", preview: r = "", dataLayerName: i = "dataLayer", events: a = {}, dataLayer: o = {}, showInDevMode: s = !1 } = e;
|
|
2528
|
-
return process.env.NODE_ENV !== "production" && !s ? null : /* @__PURE__ */ p(
|
|
2528
|
+
return process.env.NODE_ENV !== "production" && !s ? null : /* @__PURE__ */ p(Tt, { children: () => /* @__PURE__ */ p(An, {
|
|
2529
2529
|
auth: n,
|
|
2530
2530
|
dataLayer: o,
|
|
2531
2531
|
dataLayerName: i,
|
|
@@ -2536,7 +2536,7 @@ function kn(e) {
|
|
|
2536
2536
|
}
|
|
2537
2537
|
//#endregion
|
|
2538
2538
|
//#region src/components/imageUpload/hasFileContent/index.tsx
|
|
2539
|
-
function
|
|
2539
|
+
function Mn(e) {
|
|
2540
2540
|
let { disabled: t, filePath: n, isLoading: r, acceptImage: i, changeImageButtonText: a, handleSelectFile: o, reSendImage: s } = e;
|
|
2541
2541
|
function c() {
|
|
2542
2542
|
if (t) return;
|
|
@@ -2560,10 +2560,10 @@ function An(e) {
|
|
|
2560
2560
|
size: "sm",
|
|
2561
2561
|
isLoading: r,
|
|
2562
2562
|
onClick: s,
|
|
2563
|
-
icon:
|
|
2563
|
+
icon: U,
|
|
2564
2564
|
disabled: t
|
|
2565
2565
|
})
|
|
2566
|
-
}), /* @__PURE__ */ p(
|
|
2566
|
+
}), /* @__PURE__ */ p($, {
|
|
2567
2567
|
isLoading: r,
|
|
2568
2568
|
onClick: c,
|
|
2569
2569
|
variant: "outline",
|
|
@@ -2576,7 +2576,7 @@ function An(e) {
|
|
|
2576
2576
|
}
|
|
2577
2577
|
//#endregion
|
|
2578
2578
|
//#region src/components/imageUpload/noFileContent/index.tsx
|
|
2579
|
-
function
|
|
2579
|
+
function Nn(e) {
|
|
2580
2580
|
let { dropImageText: t, isLoading: n, acceptImage: r, handleSelectFile: i, selectImageButtonText: a, disabled: o } = e;
|
|
2581
2581
|
function s(e) {
|
|
2582
2582
|
if (o) return;
|
|
@@ -2595,7 +2595,7 @@ function jn(e) {
|
|
|
2595
2595
|
return /* @__PURE__ */ m("div", {
|
|
2596
2596
|
onDrop: s,
|
|
2597
2597
|
className: "arkynImageUploadNoFileContent",
|
|
2598
|
-
children: [/* @__PURE__ */ p(
|
|
2598
|
+
children: [/* @__PURE__ */ p($, {
|
|
2599
2599
|
isLoading: n,
|
|
2600
2600
|
onClick: c,
|
|
2601
2601
|
variant: "ghost",
|
|
@@ -2608,8 +2608,8 @@ function jn(e) {
|
|
|
2608
2608
|
}
|
|
2609
2609
|
//#endregion
|
|
2610
2610
|
//#region src/components/imageUpload/index.tsx
|
|
2611
|
-
function
|
|
2612
|
-
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 = "vertical" } = e, { fieldErrors: x } =
|
|
2611
|
+
function Pn(e) {
|
|
2612
|
+
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 = "vertical" } = 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);
|
|
2613
2613
|
async function N(e) {
|
|
2614
2614
|
if (v) return;
|
|
2615
2615
|
M(!0), O(e), E("");
|
|
@@ -2627,7 +2627,7 @@ function Mn(e) {
|
|
|
2627
2627
|
v || (A(URL.createObjectURL(e)), N(e));
|
|
2628
2628
|
}
|
|
2629
2629
|
let F = S || T;
|
|
2630
|
-
return /* @__PURE__ */ p(
|
|
2630
|
+
return /* @__PURE__ */ p($e, {
|
|
2631
2631
|
name: t,
|
|
2632
2632
|
label: r,
|
|
2633
2633
|
showAsterisk: i,
|
|
@@ -2643,7 +2643,7 @@ function Mn(e) {
|
|
|
2643
2643
|
name: t,
|
|
2644
2644
|
value: C || ""
|
|
2645
2645
|
}),
|
|
2646
|
-
!k && /* @__PURE__ */ p(
|
|
2646
|
+
!k && /* @__PURE__ */ p(Nn, {
|
|
2647
2647
|
disabled: v,
|
|
2648
2648
|
isLoading: j,
|
|
2649
2649
|
acceptImage: l,
|
|
@@ -2651,7 +2651,7 @@ function Mn(e) {
|
|
|
2651
2651
|
handleSelectFile: P,
|
|
2652
2652
|
selectImageButtonText: h
|
|
2653
2653
|
}),
|
|
2654
|
-
k && /* @__PURE__ */ p(
|
|
2654
|
+
k && /* @__PURE__ */ p(Mn, {
|
|
2655
2655
|
disabled: v,
|
|
2656
2656
|
isLoading: j,
|
|
2657
2657
|
acceptImage: l,
|
|
@@ -2666,9 +2666,9 @@ function Mn(e) {
|
|
|
2666
2666
|
}
|
|
2667
2667
|
//#endregion
|
|
2668
2668
|
//#region src/components/mapView/mapView.client.tsx
|
|
2669
|
-
function
|
|
2669
|
+
function Fn({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i }) {
|
|
2670
2670
|
let a = l(null), s = l(null), c = e || t[0];
|
|
2671
|
-
return o(() => (
|
|
2671
|
+
return o(() => (ae.accessToken = r, a.current = new ae.Map({
|
|
2672
2672
|
container: s.current,
|
|
2673
2673
|
style: "mapbox://styles/mapbox/light-v11",
|
|
2674
2674
|
center: [c.lng, c.lat],
|
|
@@ -2677,11 +2677,11 @@ function Nn({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i
|
|
|
2677
2677
|
}), t.forEach((e) => {
|
|
2678
2678
|
let { lat: t, lng: r, popUp: i } = e, o = document.createElement("img");
|
|
2679
2679
|
o.className = "arkynMarker", o.src = "https://i.postimg.cc/mgKggjk7/Pin.png";
|
|
2680
|
-
let s = new
|
|
2680
|
+
let s = new ae.Marker(o).setLngLat([r, t]).addTo(a.current);
|
|
2681
2681
|
if (i) {
|
|
2682
2682
|
let e = document.createElement("div");
|
|
2683
|
-
|
|
2684
|
-
let t = new
|
|
2683
|
+
oe(e).render(i);
|
|
2684
|
+
let t = new ae.Popup({
|
|
2685
2685
|
offset: 25,
|
|
2686
2686
|
closeButton: !1,
|
|
2687
2687
|
className: "arkynMapViewPopup"
|
|
@@ -2716,19 +2716,19 @@ function Nn({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i
|
|
|
2716
2716
|
}
|
|
2717
2717
|
//#endregion
|
|
2718
2718
|
//#region src/components/mapView/index.tsx
|
|
2719
|
-
function
|
|
2719
|
+
function In({ className: e }) {
|
|
2720
2720
|
return /* @__PURE__ */ p("div", {
|
|
2721
2721
|
className: `arkynMapViewPinnedEmpty ${e}`,
|
|
2722
|
-
children: /* @__PURE__ */ p(
|
|
2722
|
+
children: /* @__PURE__ */ p(z, {})
|
|
2723
2723
|
});
|
|
2724
2724
|
}
|
|
2725
|
-
function
|
|
2725
|
+
function Ln(e) {
|
|
2726
2726
|
let { coordinates: t, zoom: n = 18, accessToken: r, className: i, onMarkerClick: a, ...o } = e;
|
|
2727
|
-
if (!t) return /* @__PURE__ */ p(
|
|
2727
|
+
if (!t) return /* @__PURE__ */ p(In, { className: i });
|
|
2728
2728
|
let s = Array.isArray(t) ? t : [t];
|
|
2729
|
-
return s.length === 0 ? /* @__PURE__ */ p(
|
|
2730
|
-
fallback: /* @__PURE__ */ p(
|
|
2731
|
-
children: () => /* @__PURE__ */ p(
|
|
2729
|
+
return s.length === 0 ? /* @__PURE__ */ p(In, { className: i }) : /* @__PURE__ */ p(Tt, {
|
|
2730
|
+
fallback: /* @__PURE__ */ p(In, { className: i }),
|
|
2731
|
+
children: () => /* @__PURE__ */ p(Fn, {
|
|
2732
2732
|
accessToken: r,
|
|
2733
2733
|
coordinates: s,
|
|
2734
2734
|
center: s[0],
|
|
@@ -2739,12 +2739,12 @@ function Fn(e) {
|
|
|
2739
2739
|
}
|
|
2740
2740
|
//#endregion
|
|
2741
2741
|
//#region src/components/maskedInput/index.tsx
|
|
2742
|
-
var
|
|
2742
|
+
var Rn = r((e, t) => /* @__PURE__ */ p("input", {
|
|
2743
2743
|
ref: t,
|
|
2744
2744
|
...e
|
|
2745
2745
|
}));
|
|
2746
|
-
function
|
|
2747
|
-
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 } =
|
|
2746
|
+
function zn(e) {
|
|
2747
|
+
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), L = s(), z = k || L, B = w || N?.[t], V = !!B, H = n || y, U = {
|
|
2748
2748
|
md: 20,
|
|
2749
2749
|
lg: 20
|
|
2750
2750
|
}[O], W = D ? "right" : "left", G = W === "left" && y, K = W === "right" && y;
|
|
@@ -2754,14 +2754,14 @@ function Ln(e) {
|
|
|
2754
2754
|
function ee(e) {
|
|
2755
2755
|
F(!0), S && S(e);
|
|
2756
2756
|
}
|
|
2757
|
-
function
|
|
2757
|
+
function te(e) {
|
|
2758
2758
|
F(!1), C && C(e);
|
|
2759
2759
|
}
|
|
2760
|
-
let
|
|
2761
|
-
return /* @__PURE__ */ m(
|
|
2760
|
+
let J = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${v ? "hasSuffix" : ""} ${a} ${O} ${H || x || y ? "opacity" : ""} ${V ? "errored" : ""} ${P ? "focused" : ""}`;
|
|
2761
|
+
return /* @__PURE__ */ m(Be, {
|
|
2762
2762
|
className: g,
|
|
2763
2763
|
children: [
|
|
2764
|
-
h && /* @__PURE__ */ p(
|
|
2764
|
+
h && /* @__PURE__ */ p(ze, {
|
|
2765
2765
|
showAsterisk: E,
|
|
2766
2766
|
htmlFor: z,
|
|
2767
2767
|
children: h
|
|
@@ -2770,33 +2770,33 @@ function Ln(e) {
|
|
|
2770
2770
|
title: r,
|
|
2771
2771
|
style: i,
|
|
2772
2772
|
onClick: q,
|
|
2773
|
-
className:
|
|
2773
|
+
className: J,
|
|
2774
2774
|
children: [
|
|
2775
|
-
/* @__PURE__ */ p(
|
|
2775
|
+
/* @__PURE__ */ p(Q, {
|
|
2776
2776
|
iconSize: U,
|
|
2777
2777
|
icon: _,
|
|
2778
2778
|
className: "prefix"
|
|
2779
2779
|
}),
|
|
2780
|
-
/* @__PURE__ */ p(
|
|
2780
|
+
/* @__PURE__ */ p(Q, {
|
|
2781
2781
|
show: G,
|
|
2782
2782
|
iconSize: U,
|
|
2783
2783
|
className: "spinner",
|
|
2784
|
-
icon:
|
|
2784
|
+
icon: R
|
|
2785
2785
|
}),
|
|
2786
|
-
/* @__PURE__ */ p(
|
|
2786
|
+
/* @__PURE__ */ p(Q, {
|
|
2787
2787
|
show: !y,
|
|
2788
2788
|
icon: b,
|
|
2789
2789
|
iconSize: U
|
|
2790
2790
|
}),
|
|
2791
2791
|
/* @__PURE__ */ p(Y, {
|
|
2792
|
-
component:
|
|
2792
|
+
component: Rn,
|
|
2793
2793
|
mask: c,
|
|
2794
2794
|
replacement: f,
|
|
2795
2795
|
separate: o,
|
|
2796
2796
|
showMask: d,
|
|
2797
2797
|
ref: I,
|
|
2798
2798
|
onFocus: ee,
|
|
2799
|
-
onBlur:
|
|
2799
|
+
onBlur: te,
|
|
2800
2800
|
disabled: H,
|
|
2801
2801
|
readOnly: x,
|
|
2802
2802
|
id: z,
|
|
@@ -2806,52 +2806,52 @@ function Ln(e) {
|
|
|
2806
2806
|
value: H ? void 0 : A,
|
|
2807
2807
|
...M
|
|
2808
2808
|
}),
|
|
2809
|
-
/* @__PURE__ */ p(
|
|
2809
|
+
/* @__PURE__ */ p(Q, {
|
|
2810
2810
|
show: !y,
|
|
2811
2811
|
icon: D,
|
|
2812
2812
|
iconSize: U
|
|
2813
2813
|
}),
|
|
2814
|
-
/* @__PURE__ */ p(
|
|
2814
|
+
/* @__PURE__ */ p(Q, {
|
|
2815
2815
|
show: K,
|
|
2816
2816
|
iconSize: U,
|
|
2817
2817
|
className: "spinner",
|
|
2818
|
-
icon:
|
|
2818
|
+
icon: R
|
|
2819
2819
|
}),
|
|
2820
|
-
/* @__PURE__ */ p(
|
|
2820
|
+
/* @__PURE__ */ p(Q, {
|
|
2821
2821
|
iconSize: U,
|
|
2822
2822
|
icon: v,
|
|
2823
2823
|
className: "suffix"
|
|
2824
2824
|
})
|
|
2825
2825
|
]
|
|
2826
2826
|
}),
|
|
2827
|
-
B && /* @__PURE__ */ p(
|
|
2827
|
+
B && /* @__PURE__ */ p(Re, { children: B })
|
|
2828
2828
|
]
|
|
2829
2829
|
});
|
|
2830
2830
|
}
|
|
2831
2831
|
//#endregion
|
|
2832
2832
|
//#region src/components/modal/modalContext.tsx
|
|
2833
|
-
var
|
|
2834
|
-
function
|
|
2833
|
+
var Bn = n({});
|
|
2834
|
+
function Vn(e) {
|
|
2835
2835
|
let t = c(() => ({ makeInvisible: e.makeInvisible }), [e.makeInvisible]);
|
|
2836
|
-
return /* @__PURE__ */ p(
|
|
2836
|
+
return /* @__PURE__ */ p(Bn.Provider, {
|
|
2837
2837
|
value: t,
|
|
2838
2838
|
children: e.children
|
|
2839
2839
|
});
|
|
2840
2840
|
}
|
|
2841
|
-
function
|
|
2842
|
-
return a(
|
|
2841
|
+
function Hn() {
|
|
2842
|
+
return a(Bn);
|
|
2843
2843
|
}
|
|
2844
2844
|
//#endregion
|
|
2845
2845
|
//#region src/components/modal/modalContainer/index.tsx
|
|
2846
|
-
function
|
|
2846
|
+
function Un(e) {
|
|
2847
2847
|
let { isVisible: t, makeInvisible: n, children: r, className: i = "", ...a } = e, [s, c] = u(t), [l, d] = u(!1);
|
|
2848
2848
|
o(() => {
|
|
2849
2849
|
t ? (c(!0), d(!1)) : s && d(!0);
|
|
2850
|
-
}, [t, s]),
|
|
2850
|
+
}, [t, s]), at(t);
|
|
2851
2851
|
function f(e) {
|
|
2852
2852
|
e.target === e.currentTarget && l && (d(!1), c(!1), n());
|
|
2853
2853
|
}
|
|
2854
|
-
return s ? /* @__PURE__ */ p(
|
|
2854
|
+
return s ? /* @__PURE__ */ p(Vn, {
|
|
2855
2855
|
makeInvisible: () => d(!0),
|
|
2856
2856
|
children: /* @__PURE__ */ m("aside", {
|
|
2857
2857
|
className: [
|
|
@@ -2873,7 +2873,7 @@ function Vn(e) {
|
|
|
2873
2873
|
}
|
|
2874
2874
|
//#endregion
|
|
2875
2875
|
//#region src/components/modal/modalFooter/index.tsx
|
|
2876
|
-
function
|
|
2876
|
+
function Wn(e) {
|
|
2877
2877
|
let { alignment: t = "right", className: n, ...r } = e;
|
|
2878
2878
|
return /* @__PURE__ */ p("footer", {
|
|
2879
2879
|
className: `arkynModalFooter ${t} ${n}`.trim(),
|
|
@@ -2882,8 +2882,8 @@ function Hn(e) {
|
|
|
2882
2882
|
}
|
|
2883
2883
|
//#endregion
|
|
2884
2884
|
//#region src/components/modal/modalHeader/index.tsx
|
|
2885
|
-
function
|
|
2886
|
-
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } =
|
|
2885
|
+
function Gn(e) {
|
|
2886
|
+
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } = Hn();
|
|
2887
2887
|
return /* @__PURE__ */ m("header", {
|
|
2888
2888
|
className: `arkynModalHeader ${n}`.trim(),
|
|
2889
2889
|
...i,
|
|
@@ -2892,13 +2892,13 @@ function Un(e) {
|
|
|
2892
2892
|
onClick: a,
|
|
2893
2893
|
"aria-label": "Close modal button",
|
|
2894
2894
|
className: "arkynModalHeaderCloseButton",
|
|
2895
|
-
children: /* @__PURE__ */ p(
|
|
2895
|
+
children: /* @__PURE__ */ p(q, { size: 24 })
|
|
2896
2896
|
})]
|
|
2897
2897
|
});
|
|
2898
2898
|
}
|
|
2899
2899
|
//#endregion
|
|
2900
2900
|
//#region src/components/multiSelect/multiSelectChevron/index.tsx
|
|
2901
|
-
function
|
|
2901
|
+
function Kn(e) {
|
|
2902
2902
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
2903
2903
|
return n ? null : /* @__PURE__ */ p(C, {
|
|
2904
2904
|
className: `arkynMultiSelectChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -2913,7 +2913,7 @@ function Wn(e) {
|
|
|
2913
2913
|
}
|
|
2914
2914
|
//#endregion
|
|
2915
2915
|
//#region src/components/multiSelect/multiSelectContainer/index.tsx
|
|
2916
|
-
function
|
|
2916
|
+
function qn(e) {
|
|
2917
2917
|
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;
|
|
2918
2918
|
return /* @__PURE__ */ p("section", {
|
|
2919
2919
|
id: d,
|
|
@@ -2924,7 +2924,7 @@ function Gn(e) {
|
|
|
2924
2924
|
}
|
|
2925
2925
|
//#endregion
|
|
2926
2926
|
//#region src/components/multiSelect/multiSelectContent/index.tsx
|
|
2927
|
-
function
|
|
2927
|
+
function Jn(e) {
|
|
2928
2928
|
let { children: t, size: n } = e;
|
|
2929
2929
|
return /* @__PURE__ */ p("div", {
|
|
2930
2930
|
className: `arkynMultiSelectContent ${n}`,
|
|
@@ -2933,7 +2933,7 @@ function Kn(e) {
|
|
|
2933
2933
|
}
|
|
2934
2934
|
//#endregion
|
|
2935
2935
|
//#region src/components/multiSelect/multiSelectMark/index.tsx
|
|
2936
|
-
function
|
|
2936
|
+
function Yn(e) {
|
|
2937
2937
|
let { label: t, value: n, disabled: r, handleChangeValue: i } = e;
|
|
2938
2938
|
return /* @__PURE__ */ m("div", {
|
|
2939
2939
|
className: "arkynMultiSelectMark",
|
|
@@ -2943,13 +2943,13 @@ function qn(e) {
|
|
|
2943
2943
|
onClick: (e) => {
|
|
2944
2944
|
e.stopPropagation(), i(n);
|
|
2945
2945
|
},
|
|
2946
|
-
children: /* @__PURE__ */ p(
|
|
2946
|
+
children: /* @__PURE__ */ p(q, {})
|
|
2947
2947
|
})]
|
|
2948
2948
|
});
|
|
2949
2949
|
}
|
|
2950
2950
|
//#endregion
|
|
2951
2951
|
//#region src/components/multiSelect/multiSelectOption/index.tsx
|
|
2952
|
-
function
|
|
2952
|
+
function Xn(e) {
|
|
2953
2953
|
let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a } = e;
|
|
2954
2954
|
return /* @__PURE__ */ m("div", {
|
|
2955
2955
|
onClick: () => r(i),
|
|
@@ -2963,9 +2963,9 @@ function Jn(e) {
|
|
|
2963
2963
|
}
|
|
2964
2964
|
//#endregion
|
|
2965
2965
|
//#region src/components/multiSelect/multiSelectOptionsContainer/index.tsx
|
|
2966
|
-
function
|
|
2966
|
+
function Zn(e) {
|
|
2967
2967
|
let { children: t, isFocused: n, isSearchable: r, search: i, onSearch: a } = e, s = l(null), [c, d] = u("bottom");
|
|
2968
|
-
|
|
2968
|
+
at(n), o(() => {
|
|
2969
2969
|
n && (() => {
|
|
2970
2970
|
if (!s.current) return;
|
|
2971
2971
|
let e = s.current.parentElement;
|
|
@@ -2980,11 +2980,11 @@ function Yn(e) {
|
|
|
2980
2980
|
return n ? /* @__PURE__ */ m("div", {
|
|
2981
2981
|
ref: s,
|
|
2982
2982
|
className: `arkynMultiSelectOptionsContainer ${c}`,
|
|
2983
|
-
children: [r && /* @__PURE__ */ p(
|
|
2983
|
+
children: [r && /* @__PURE__ */ p(ot, {
|
|
2984
2984
|
type: "search",
|
|
2985
2985
|
name: "search-select",
|
|
2986
2986
|
variant: "underline",
|
|
2987
|
-
leftIcon:
|
|
2987
|
+
leftIcon: W,
|
|
2988
2988
|
value: i,
|
|
2989
2989
|
onChange: f
|
|
2990
2990
|
}), t]
|
|
@@ -2992,7 +2992,7 @@ function Yn(e) {
|
|
|
2992
2992
|
}
|
|
2993
2993
|
//#endregion
|
|
2994
2994
|
//#region src/components/multiSelect/multiSelectOverlay/index.tsx
|
|
2995
|
-
function
|
|
2995
|
+
function Qn(e) {
|
|
2996
2996
|
let { isFocused: t, handleBlur: n } = e;
|
|
2997
2997
|
return t ? /* @__PURE__ */ p("aside", {
|
|
2998
2998
|
className: "arkynMultiSelectOverlay",
|
|
@@ -3001,9 +3001,9 @@ function Xn(e) {
|
|
|
3001
3001
|
}
|
|
3002
3002
|
//#endregion
|
|
3003
3003
|
//#region src/components/multiSelect/multiSelectSpinner/index.tsx
|
|
3004
|
-
function
|
|
3004
|
+
function $n(e) {
|
|
3005
3005
|
let { iconSize: t, isLoading: n } = e;
|
|
3006
|
-
return n ? /* @__PURE__ */ p(
|
|
3006
|
+
return n ? /* @__PURE__ */ p(R, {
|
|
3007
3007
|
className: "arkynMultiSelectSpinner",
|
|
3008
3008
|
size: t,
|
|
3009
3009
|
strokeWidth: 2.5
|
|
@@ -3011,8 +3011,8 @@ function Zn(e) {
|
|
|
3011
3011
|
}
|
|
3012
3012
|
//#endregion
|
|
3013
3013
|
//#region src/components/multiSelect/index.tsx
|
|
3014
|
-
function
|
|
3015
|
-
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: _, showAsterisk: v, leftIcon: y, onSearch: b, onChange: x, onBlur: S, notFoundText: C = "Sem opções disponíveis", onFocus: w, disabled: T = !1, prefix: E, size: D = "md", value: O, variant: k = "solid", unShowFieldTemplate: A = !1, orientation: j = "vertical" } = e, { fieldErrors: M } =
|
|
3014
|
+
function er(e) {
|
|
3015
|
+
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: _, showAsterisk: v, leftIcon: y, onSearch: b, onChange: x, onBlur: S, notFoundText: C = "Sem opções disponíveis", onFocus: w, disabled: T = !1, prefix: E, size: D = "md", value: O, variant: k = "solid", unShowFieldTemplate: A = !1, orientation: j = "vertical" } = e, { fieldErrors: M } = Z(), N = l(null), P = s(), F = g || P, I = c || M?.[t], L = !!I, R = T || d || f, z = {
|
|
3016
3016
|
md: 20,
|
|
3017
3017
|
lg: 20
|
|
3018
3018
|
}[D], [B, V] = u(""), [H, U] = u(!1), [W, G] = u(o), K = O || W;
|
|
@@ -3022,20 +3022,20 @@ function Qn(e) {
|
|
|
3022
3022
|
function ee(e) {
|
|
3023
3023
|
return n.find((t) => t.value === e)?.label || "";
|
|
3024
3024
|
}
|
|
3025
|
-
function
|
|
3025
|
+
function te() {
|
|
3026
3026
|
R || !N?.current || H || (U(!0), N.current.focus(), w?.());
|
|
3027
3027
|
}
|
|
3028
|
-
function
|
|
3028
|
+
function J() {
|
|
3029
3029
|
U(!1), S && N.current && N.current.blur();
|
|
3030
3030
|
}
|
|
3031
3031
|
function ne(e) {
|
|
3032
3032
|
V(e), b && b(e);
|
|
3033
3033
|
}
|
|
3034
3034
|
function re(e) {
|
|
3035
|
-
q(e) ? (G(W.filter((t) => t !== e)), x && x(W.filter((t) => t !== e))) : (G([...W, e]), x && x([...W, e])), a &&
|
|
3035
|
+
q(e) ? (G(W.filter((t) => t !== e)), x && x(W.filter((t) => t !== e))) : (G([...W, e]), x && x([...W, e])), a && J();
|
|
3036
3036
|
}
|
|
3037
3037
|
let ie = n.filter((t) => !!(e.onSearch || !e.isSearchable || t.label.toLowerCase().includes(B.toLowerCase())));
|
|
3038
|
-
return /* @__PURE__ */ p(
|
|
3038
|
+
return /* @__PURE__ */ p($e, {
|
|
3039
3039
|
name: t,
|
|
3040
3040
|
label: _,
|
|
3041
3041
|
showAsterisk: v,
|
|
@@ -3043,8 +3043,8 @@ function Qn(e) {
|
|
|
3043
3043
|
errorMessage: I,
|
|
3044
3044
|
unShowFieldTemplate: A,
|
|
3045
3045
|
orientation: j,
|
|
3046
|
-
children: /* @__PURE__ */ m(
|
|
3047
|
-
handleContainerFocus:
|
|
3046
|
+
children: /* @__PURE__ */ m(qn, {
|
|
3047
|
+
handleContainerFocus: te,
|
|
3048
3048
|
disabled: R,
|
|
3049
3049
|
isError: L,
|
|
3050
3050
|
isFocused: H,
|
|
@@ -3061,7 +3061,7 @@ function Qn(e) {
|
|
|
3061
3061
|
value: JSON.stringify(K),
|
|
3062
3062
|
type: "hidden"
|
|
3063
3063
|
}),
|
|
3064
|
-
/* @__PURE__ */ p(
|
|
3064
|
+
/* @__PURE__ */ p(Q, {
|
|
3065
3065
|
iconSize: z,
|
|
3066
3066
|
icon: E,
|
|
3067
3067
|
className: "prefix"
|
|
@@ -3070,21 +3070,21 @@ function Qn(e) {
|
|
|
3070
3070
|
size: z,
|
|
3071
3071
|
strokeWidth: 2.5
|
|
3072
3072
|
}),
|
|
3073
|
-
/* @__PURE__ */ m(
|
|
3073
|
+
/* @__PURE__ */ m(Jn, {
|
|
3074
3074
|
size: D,
|
|
3075
|
-
children: [K.map((e) => /* @__PURE__ */ p(
|
|
3075
|
+
children: [K.map((e) => /* @__PURE__ */ p(Yn, {
|
|
3076
3076
|
label: ee(e),
|
|
3077
3077
|
value: e,
|
|
3078
3078
|
handleChangeValue: re,
|
|
3079
3079
|
disabled: R
|
|
3080
3080
|
}, e)), K.length <= 0 && /* @__PURE__ */ p("p", { children: i })]
|
|
3081
3081
|
}),
|
|
3082
|
-
/* @__PURE__ */ m(
|
|
3082
|
+
/* @__PURE__ */ m(Zn, {
|
|
3083
3083
|
isFocused: H,
|
|
3084
3084
|
isSearchable: h,
|
|
3085
3085
|
search: B,
|
|
3086
3086
|
onSearch: ne,
|
|
3087
|
-
children: [ie.map(({ label: e, value: t }) => /* @__PURE__ */ p(
|
|
3087
|
+
children: [ie.map(({ label: e, value: t }) => /* @__PURE__ */ p(Xn, {
|
|
3088
3088
|
label: e,
|
|
3089
3089
|
value: t,
|
|
3090
3090
|
size: D,
|
|
@@ -3092,19 +3092,19 @@ function Qn(e) {
|
|
|
3092
3092
|
optionHasSelected: q
|
|
3093
3093
|
}, t)), ie.length <= 0 && /* @__PURE__ */ p("p", { children: C })]
|
|
3094
3094
|
}),
|
|
3095
|
-
/* @__PURE__ */ p(
|
|
3095
|
+
/* @__PURE__ */ p(Kn, {
|
|
3096
3096
|
disabled: R,
|
|
3097
3097
|
isFocused: H,
|
|
3098
3098
|
readOnly: f,
|
|
3099
3099
|
iconSize: z,
|
|
3100
3100
|
isLoading: d
|
|
3101
3101
|
}),
|
|
3102
|
-
/* @__PURE__ */ p(
|
|
3102
|
+
/* @__PURE__ */ p($n, {
|
|
3103
3103
|
iconSize: z,
|
|
3104
3104
|
isLoading: d
|
|
3105
3105
|
}),
|
|
3106
|
-
/* @__PURE__ */ p(
|
|
3107
|
-
handleBlur:
|
|
3106
|
+
/* @__PURE__ */ p(Qn, {
|
|
3107
|
+
handleBlur: J,
|
|
3108
3108
|
isFocused: H
|
|
3109
3109
|
})
|
|
3110
3110
|
]
|
|
@@ -3113,7 +3113,7 @@ function Qn(e) {
|
|
|
3113
3113
|
}
|
|
3114
3114
|
//#endregion
|
|
3115
3115
|
//#region src/components/pagination/chevronButton/index.tsx
|
|
3116
|
-
function
|
|
3116
|
+
function tr(e) {
|
|
3117
3117
|
let { orientation: t, handlePageChange: n, disabled: r } = e;
|
|
3118
3118
|
return /* @__PURE__ */ p("button", {
|
|
3119
3119
|
type: "button",
|
|
@@ -3128,7 +3128,7 @@ function $n(e) {
|
|
|
3128
3128
|
}
|
|
3129
3129
|
//#endregion
|
|
3130
3130
|
//#region src/components/pagination/currentButton/index.tsx
|
|
3131
|
-
function
|
|
3131
|
+
function nr({ currentPage: e }) {
|
|
3132
3132
|
return /* @__PURE__ */ p("button", {
|
|
3133
3133
|
type: "button",
|
|
3134
3134
|
className: "arkynPaginationCurrentButton",
|
|
@@ -3138,7 +3138,7 @@ function er({ currentPage: e }) {
|
|
|
3138
3138
|
}
|
|
3139
3139
|
//#endregion
|
|
3140
3140
|
//#region src/components/pagination/pageButton/index.tsx
|
|
3141
|
-
function
|
|
3141
|
+
function rr(e) {
|
|
3142
3142
|
let { page: t, handlePageChange: n } = e;
|
|
3143
3143
|
return /* @__PURE__ */ p("button", {
|
|
3144
3144
|
type: "button",
|
|
@@ -3149,7 +3149,7 @@ function tr(e) {
|
|
|
3149
3149
|
}
|
|
3150
3150
|
//#endregion
|
|
3151
3151
|
//#region src/components/pagination/paginationService.ts
|
|
3152
|
-
var
|
|
3152
|
+
var ir = class {
|
|
3153
3153
|
currentPage;
|
|
3154
3154
|
totalCountRegisters;
|
|
3155
3155
|
registerPerPage;
|
|
@@ -3182,7 +3182,7 @@ var nr = class {
|
|
|
3182
3182
|
};
|
|
3183
3183
|
//#endregion
|
|
3184
3184
|
//#region src/components/pagination/spread/index.tsx
|
|
3185
|
-
function
|
|
3185
|
+
function ar() {
|
|
3186
3186
|
return /* @__PURE__ */ p("p", {
|
|
3187
3187
|
className: "arkynPaginationSpread",
|
|
3188
3188
|
children: /* @__PURE__ */ p(D, {})
|
|
@@ -3190,8 +3190,8 @@ function rr() {
|
|
|
3190
3190
|
}
|
|
3191
3191
|
//#endregion
|
|
3192
3192
|
//#region src/components/pagination/index.tsx
|
|
3193
|
-
function
|
|
3194
|
-
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
|
|
3193
|
+
function or(e) {
|
|
3194
|
+
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 ir({
|
|
3195
3195
|
totalCountRegisters: t,
|
|
3196
3196
|
currentPage: r,
|
|
3197
3197
|
registerPerPage: i,
|
|
@@ -3202,29 +3202,29 @@ function ir(e) {
|
|
|
3202
3202
|
className: "arkynPagination",
|
|
3203
3203
|
...o,
|
|
3204
3204
|
children: [
|
|
3205
|
-
/* @__PURE__ */ p(
|
|
3205
|
+
/* @__PURE__ */ p(tr, {
|
|
3206
3206
|
orientation: "left",
|
|
3207
3207
|
handlePageChange: g,
|
|
3208
3208
|
disabled: s <= 1
|
|
3209
3209
|
}),
|
|
3210
|
-
s > 1 + c && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
3210
|
+
s > 1 + c && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(rr, {
|
|
3211
3211
|
page: 1,
|
|
3212
3212
|
handlePageChange: () => h(1)
|
|
3213
|
-
}), s > 2 + c && /* @__PURE__ */ p(
|
|
3214
|
-
l.map((e) => /* @__PURE__ */ p(
|
|
3213
|
+
}), s > 2 + c && /* @__PURE__ */ p(ar, {})] }),
|
|
3214
|
+
l.map((e) => /* @__PURE__ */ p(rr, {
|
|
3215
3215
|
page: e,
|
|
3216
3216
|
handlePageChange: g
|
|
3217
3217
|
}, e)),
|
|
3218
|
-
/* @__PURE__ */ p(
|
|
3219
|
-
u.map((e) => /* @__PURE__ */ p(
|
|
3218
|
+
/* @__PURE__ */ p(nr, { currentPage: s }),
|
|
3219
|
+
u.map((e) => /* @__PURE__ */ p(rr, {
|
|
3220
3220
|
page: e,
|
|
3221
3221
|
handlePageChange: _
|
|
3222
3222
|
}, e)),
|
|
3223
|
-
s + c < d && /* @__PURE__ */ m(f, { children: [s + 1 + c < d && /* @__PURE__ */ p(
|
|
3223
|
+
s + c < d && /* @__PURE__ */ m(f, { children: [s + 1 + c < d && /* @__PURE__ */ p(ar, {}), /* @__PURE__ */ p(rr, {
|
|
3224
3224
|
page: d,
|
|
3225
3225
|
handlePageChange: () => h(d)
|
|
3226
3226
|
})] }),
|
|
3227
|
-
/* @__PURE__ */ p(
|
|
3227
|
+
/* @__PURE__ */ p(tr, {
|
|
3228
3228
|
orientation: "right",
|
|
3229
3229
|
handlePageChange: _,
|
|
3230
3230
|
disabled: s >= d
|
|
@@ -3234,14 +3234,14 @@ function ir(e) {
|
|
|
3234
3234
|
}
|
|
3235
3235
|
//#endregion
|
|
3236
3236
|
//#region src/utils/phoneInputUtilities.ts
|
|
3237
|
-
function
|
|
3237
|
+
function sr(e) {
|
|
3238
3238
|
return e?.replace(/[^0-9]/g, "");
|
|
3239
3239
|
}
|
|
3240
|
-
var
|
|
3240
|
+
var cr = {
|
|
3241
3241
|
EIGHT: "(99) 9999-9999",
|
|
3242
3242
|
NINE: "(99) 99999-9999"
|
|
3243
3243
|
};
|
|
3244
|
-
function
|
|
3244
|
+
function lr(e, t, n = "9") {
|
|
3245
3245
|
let r = "", i = 0;
|
|
3246
3246
|
for (let a = 0; a < t.length; a++) if (t[a] === n) if (i < e.length) r += e[i], i++;
|
|
3247
3247
|
else break;
|
|
@@ -3249,13 +3249,13 @@ function sr(e, t, n = "9") {
|
|
|
3249
3249
|
else break;
|
|
3250
3250
|
return r;
|
|
3251
3251
|
}
|
|
3252
|
-
function
|
|
3252
|
+
function ur(e) {
|
|
3253
3253
|
return e.length > 10 ? "NINE" : "EIGHT";
|
|
3254
3254
|
}
|
|
3255
|
-
var
|
|
3255
|
+
var dr = sr(cr.NINE).length;
|
|
3256
3256
|
//#endregion
|
|
3257
3257
|
//#region src/components/phoneInput/phoneInputContainer/index.tsx
|
|
3258
|
-
function
|
|
3258
|
+
function fr(e) {
|
|
3259
3259
|
let { children: t, onFocus: n, disabled: r, isError: i, isLoading: a, isFocused: o, className: s = "", readOnly: c, variant: l, size: u } = e;
|
|
3260
3260
|
return /* @__PURE__ */ p("section", {
|
|
3261
3261
|
className: `arkynPhoneInputContainer ${l} ${u} ${r || c || a ? "opacity" : ""} ${i ? "errored" : ""} ${o ? "focused" : ""} ${s}`.trim(),
|
|
@@ -3265,7 +3265,7 @@ function ur(e) {
|
|
|
3265
3265
|
}
|
|
3266
3266
|
//#endregion
|
|
3267
3267
|
//#region src/components/phoneInput/phoneInputCountriesOverlay/index.tsx
|
|
3268
|
-
function
|
|
3268
|
+
function pr(e) {
|
|
3269
3269
|
let { isOpen: t, onClick: n } = e;
|
|
3270
3270
|
return t ? /* @__PURE__ */ p("aside", {
|
|
3271
3271
|
className: "arkynPhoneInputCountriesOverlay",
|
|
@@ -3274,7 +3274,7 @@ function dr(e) {
|
|
|
3274
3274
|
}
|
|
3275
3275
|
//#endregion
|
|
3276
3276
|
//#region src/components/phoneInput/phoneInputCountryOption/index.tsx
|
|
3277
|
-
function
|
|
3277
|
+
function mr(e) {
|
|
3278
3278
|
let { country: t, isActive: n, handleChangeValue: r, size: i } = e;
|
|
3279
3279
|
return /* @__PURE__ */ m("div", {
|
|
3280
3280
|
onClick: () => r(t),
|
|
@@ -3294,12 +3294,12 @@ function fr(e) {
|
|
|
3294
3294
|
}
|
|
3295
3295
|
//#endregion
|
|
3296
3296
|
//#region src/components/phoneInput/phoneInputCountryOptionsContainer/index.tsx
|
|
3297
|
-
function
|
|
3297
|
+
function hr(e) {
|
|
3298
3298
|
let { children: t, isOpen: n, onSearch: r, search: i, placeholder: a } = e, s = l(null), [c, d] = u("bottom");
|
|
3299
3299
|
function f(e) {
|
|
3300
3300
|
r(e.target.value);
|
|
3301
3301
|
}
|
|
3302
|
-
return
|
|
3302
|
+
return at(n), o(() => {
|
|
3303
3303
|
n && (() => {
|
|
3304
3304
|
if (!s.current) return;
|
|
3305
3305
|
let e = s.current.parentElement;
|
|
@@ -3323,7 +3323,7 @@ function pr(e) {
|
|
|
3323
3323
|
}
|
|
3324
3324
|
//#endregion
|
|
3325
3325
|
//#region src/components/phoneInput/phoneInputCountrySelector/index.tsx
|
|
3326
|
-
function
|
|
3326
|
+
function gr(e) {
|
|
3327
3327
|
let { currentCountry: t, onClick: n } = e;
|
|
3328
3328
|
return /* @__PURE__ */ m("div", {
|
|
3329
3329
|
className: "phoneInputSelectCountry",
|
|
@@ -3344,10 +3344,10 @@ function mr(e) {
|
|
|
3344
3344
|
}
|
|
3345
3345
|
//#endregion
|
|
3346
3346
|
//#region src/components/phoneInput/phoneInputMask/index.tsx
|
|
3347
|
-
var
|
|
3347
|
+
var _r = r((e, t) => /* @__PURE__ */ p("input", {
|
|
3348
3348
|
ref: t,
|
|
3349
3349
|
...e
|
|
3350
|
-
})),
|
|
3350
|
+
})), vr = r((e, t) => {
|
|
3351
3351
|
let { onFocus: n, readonly: r, onBlur: i, size: a, onChange: s, value: c, currentCountry: u, disabled: d, id: f } = e, m = l(!0), h = l(s);
|
|
3352
3352
|
h.current = s;
|
|
3353
3353
|
let g = typeof u.mask == "string" ? u.mask : u.mask[0];
|
|
@@ -3360,8 +3360,8 @@ var hr = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
3360
3360
|
}, [g]);
|
|
3361
3361
|
let _ = `phoneInputMask ${a}`;
|
|
3362
3362
|
function v(e) {
|
|
3363
|
-
let t =
|
|
3364
|
-
t.length >
|
|
3363
|
+
let t = sr(e.target.value), n = ur(t);
|
|
3364
|
+
t.length > dr || (t = lr(t, cr[n]), e.target.value = t, s(t));
|
|
3365
3365
|
}
|
|
3366
3366
|
return u.code === "+55" ? /* @__PURE__ */ p("input", {
|
|
3367
3367
|
id: f,
|
|
@@ -3379,7 +3379,7 @@ var hr = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
3379
3379
|
readOnly: r,
|
|
3380
3380
|
onChange: (e) => s(e.target.value),
|
|
3381
3381
|
className: _,
|
|
3382
|
-
component:
|
|
3382
|
+
component: _r,
|
|
3383
3383
|
onFocus: n,
|
|
3384
3384
|
onBlur: i,
|
|
3385
3385
|
disabled: d,
|
|
@@ -3391,35 +3391,35 @@ var hr = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
3391
3391
|
});
|
|
3392
3392
|
//#endregion
|
|
3393
3393
|
//#region src/components/phoneInput/index.tsx
|
|
3394
|
-
function
|
|
3395
|
-
let n =
|
|
3396
|
-
return t.code === "+55" ?
|
|
3394
|
+
function yr(e, t) {
|
|
3395
|
+
let n = ie(e), r = ie(t.code), i = e.trim().startsWith("+") && n.startsWith(r) ? n.slice(r.length) : n;
|
|
3396
|
+
return t.code === "+55" ? lr(i, cr[ur(i)]) : lr(i, typeof t.mask == "string" ? t.mask : t.mask[0], "_");
|
|
3397
3397
|
}
|
|
3398
|
-
function
|
|
3399
|
-
let { value: t, label: n, className: r = "", disabled: i = !1, errorMessage: a, isLoading: o = !1, readOnly: c = !1, size: d = "md", defaultValue: f = "", variant: h = "solid", showAsterisk: g, name: _, onChange: v, searchCountryPlaceholder: y = "Pesquisar país", notFoundCountryText: b = "Nenhum país encontrado", id: x, unShowFieldTemplate: S = !1, orientation: C = "vertical" } = e, w =
|
|
3398
|
+
function br(e) {
|
|
3399
|
+
let { value: t, label: n, className: r = "", disabled: i = !1, errorMessage: a, isLoading: o = !1, readOnly: c = !1, size: d = "md", defaultValue: f = "", variant: h = "solid", showAsterisk: g, name: _, onChange: v, searchCountryPlaceholder: y = "Pesquisar país", notFoundCountryText: b = "Nenhum país encontrado", id: x, unShowFieldTemplate: S = !1, orientation: C = "vertical" } = e, w = se.find((e) => e.iso === "BR"), T = f ? re(f) : "", E = f ? te(f)[1] : w, [D, O] = u(!1), [k, A] = u(""), [j, M] = u(!1), [N, P] = u(T), [F, I] = u(E), L = t === void 0 ? N : yr(t, F), { fieldErrors: R } = Z(), z = l(null), B = s(), V = x || B, H = a || R?.[_], U = !!H, W = i || o, G = l(null);
|
|
3400
3400
|
function K() {
|
|
3401
3401
|
W || D || j || (O(!0), G.current && G.current.focus());
|
|
3402
3402
|
}
|
|
3403
3403
|
function q() {
|
|
3404
3404
|
M(!0), O(!0);
|
|
3405
3405
|
}
|
|
3406
|
-
function
|
|
3406
|
+
function ee() {
|
|
3407
3407
|
M(!1), O(!1);
|
|
3408
3408
|
}
|
|
3409
|
-
function
|
|
3409
|
+
function J() {
|
|
3410
3410
|
O(!0);
|
|
3411
3411
|
}
|
|
3412
|
-
function
|
|
3412
|
+
function ne() {
|
|
3413
3413
|
O(!1);
|
|
3414
3414
|
}
|
|
3415
3415
|
function ae(e) {
|
|
3416
3416
|
return e.name.toLowerCase().includes(k.toLowerCase());
|
|
3417
3417
|
}
|
|
3418
|
-
function
|
|
3418
|
+
function oe(e) {
|
|
3419
3419
|
let t = F.code;
|
|
3420
|
-
return t +=
|
|
3420
|
+
return t += ie(e || L), t;
|
|
3421
3421
|
}
|
|
3422
|
-
return /* @__PURE__ */ p(
|
|
3422
|
+
return /* @__PURE__ */ p($e, {
|
|
3423
3423
|
name: _,
|
|
3424
3424
|
label: n,
|
|
3425
3425
|
showAsterisk: g,
|
|
@@ -3427,7 +3427,7 @@ function vr(e) {
|
|
|
3427
3427
|
errorMessage: H,
|
|
3428
3428
|
unShowFieldTemplate: S,
|
|
3429
3429
|
orientation: C,
|
|
3430
|
-
children: /* @__PURE__ */ m(
|
|
3430
|
+
children: /* @__PURE__ */ m(fr, {
|
|
3431
3431
|
disabled: W,
|
|
3432
3432
|
isError: U,
|
|
3433
3433
|
isLoading: o,
|
|
@@ -3437,48 +3437,48 @@ function vr(e) {
|
|
|
3437
3437
|
variant: h,
|
|
3438
3438
|
onFocus: K,
|
|
3439
3439
|
children: [
|
|
3440
|
-
/* @__PURE__ */ p(
|
|
3440
|
+
/* @__PURE__ */ p(gr, {
|
|
3441
3441
|
currentCountry: F,
|
|
3442
3442
|
onClick: q,
|
|
3443
3443
|
size: d
|
|
3444
3444
|
}),
|
|
3445
|
-
/* @__PURE__ */ m(
|
|
3445
|
+
/* @__PURE__ */ m(hr, {
|
|
3446
3446
|
isOpen: W || c ? !1 : j,
|
|
3447
3447
|
search: k,
|
|
3448
3448
|
placeholder: y,
|
|
3449
3449
|
onSearch: A,
|
|
3450
|
-
children: [
|
|
3450
|
+
children: [se.filter((e) => ae(e)).map((e) => /* @__PURE__ */ p(mr, {
|
|
3451
3451
|
country: e,
|
|
3452
3452
|
handleChangeValue: () => {
|
|
3453
3453
|
I(e), M(!1), P("");
|
|
3454
3454
|
},
|
|
3455
3455
|
isActive: e.iso === F.iso,
|
|
3456
3456
|
size: d
|
|
3457
|
-
}, e.iso)),
|
|
3457
|
+
}, e.iso)), se.filter((e) => ae(e)).length === 0 && /* @__PURE__ */ p("p", { children: b })]
|
|
3458
3458
|
}),
|
|
3459
|
-
/* @__PURE__ */ p(
|
|
3459
|
+
/* @__PURE__ */ p(pr, {
|
|
3460
3460
|
isOpen: W || c ? !1 : j,
|
|
3461
|
-
onClick:
|
|
3461
|
+
onClick: ee
|
|
3462
3462
|
}),
|
|
3463
|
-
/* @__PURE__ */ p(
|
|
3463
|
+
/* @__PURE__ */ p(vr, {
|
|
3464
3464
|
id: V,
|
|
3465
3465
|
ref: G,
|
|
3466
3466
|
readonly: c,
|
|
3467
3467
|
currentCountry: F,
|
|
3468
3468
|
value: L,
|
|
3469
3469
|
disabled: W,
|
|
3470
|
-
onBlur:
|
|
3471
|
-
onFocus:
|
|
3470
|
+
onBlur: ne,
|
|
3471
|
+
onFocus: J,
|
|
3472
3472
|
size: d,
|
|
3473
3473
|
onChange: (e) => {
|
|
3474
|
-
P(e), v?.(
|
|
3474
|
+
P(e), v?.(oe(e));
|
|
3475
3475
|
}
|
|
3476
3476
|
}),
|
|
3477
3477
|
/* @__PURE__ */ p("input", {
|
|
3478
3478
|
ref: z,
|
|
3479
3479
|
type: "hidden",
|
|
3480
3480
|
name: _,
|
|
3481
|
-
value:
|
|
3481
|
+
value: oe()
|
|
3482
3482
|
})
|
|
3483
3483
|
]
|
|
3484
3484
|
})
|
|
@@ -3486,12 +3486,12 @@ function vr(e) {
|
|
|
3486
3486
|
}
|
|
3487
3487
|
//#endregion
|
|
3488
3488
|
//#region src/components/popover/index.tsx
|
|
3489
|
-
function
|
|
3489
|
+
function xr(e) {
|
|
3490
3490
|
let { children: t, button: n, closeOnClick: r, className: i = "", orientation: a = "bottomLeft" } = e, [o, s] = u(!1), c = `arkynPopover ${a} ${o ? "visibleTrue" : "visibleFalse"} ${i}`;
|
|
3491
3491
|
function l() {
|
|
3492
3492
|
o || s(!0);
|
|
3493
3493
|
}
|
|
3494
|
-
return
|
|
3494
|
+
return at(o), /* @__PURE__ */ m("div", {
|
|
3495
3495
|
className: c,
|
|
3496
3496
|
onClick: l,
|
|
3497
3497
|
children: [
|
|
@@ -3511,10 +3511,10 @@ function yr(e) {
|
|
|
3511
3511
|
}
|
|
3512
3512
|
//#endregion
|
|
3513
3513
|
//#region src/components/radio/radioContext.tsx
|
|
3514
|
-
var
|
|
3515
|
-
function
|
|
3514
|
+
var Sr = n({});
|
|
3515
|
+
function Cr(e) {
|
|
3516
3516
|
let { children: t, size: n, isError: r, handleChange: i, value: a, disabled: o } = e;
|
|
3517
|
-
return /* @__PURE__ */ p(
|
|
3517
|
+
return /* @__PURE__ */ p(Sr.Provider, {
|
|
3518
3518
|
value: {
|
|
3519
3519
|
handleChange: i,
|
|
3520
3520
|
value: a,
|
|
@@ -3525,13 +3525,13 @@ function xr(e) {
|
|
|
3525
3525
|
children: t
|
|
3526
3526
|
});
|
|
3527
3527
|
}
|
|
3528
|
-
function
|
|
3529
|
-
return a(
|
|
3528
|
+
function wr() {
|
|
3529
|
+
return a(Sr);
|
|
3530
3530
|
}
|
|
3531
3531
|
//#endregion
|
|
3532
3532
|
//#region src/components/radio/radioBox/index.tsx
|
|
3533
|
-
function
|
|
3534
|
-
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 } =
|
|
3533
|
+
function Tr(e) {
|
|
3534
|
+
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 } = wr(), g = d === t, _ = n || u, v = r || h, y = `arkynRadioBox ${_} ${g ? "checkedTrue" : "checkedFalse"} ${f ? "errorTrue" : "errorFalse"} ${v ? "disabledTrue" : "disabledFalse"} ${a}`;
|
|
3535
3535
|
function b(e) {
|
|
3536
3536
|
o?.(e), l(t);
|
|
3537
3537
|
}
|
|
@@ -3551,13 +3551,13 @@ function Cr(e) {
|
|
|
3551
3551
|
}
|
|
3552
3552
|
//#endregion
|
|
3553
3553
|
//#region src/components/radio/radioGroup/index.tsx
|
|
3554
|
-
function
|
|
3555
|
-
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 = "vertical", ...g } = e, [_, v] = u(t), { fieldErrors: y } =
|
|
3554
|
+
function Er(e) {
|
|
3555
|
+
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 = "vertical", ...g } = e, [_, v] = u(t), { fieldErrors: y } = Z();
|
|
3556
3556
|
function b(e) {
|
|
3557
3557
|
v(e), s && s(e);
|
|
3558
3558
|
}
|
|
3559
3559
|
let x = a || y?.[n], S = !!x, C = `arkynRadioGroup ${c}`;
|
|
3560
|
-
return /* @__PURE__ */ p(
|
|
3560
|
+
return /* @__PURE__ */ p($e, {
|
|
3561
3561
|
name: n,
|
|
3562
3562
|
label: r,
|
|
3563
3563
|
showAsterisk: i,
|
|
@@ -3565,7 +3565,7 @@ function wr(e) {
|
|
|
3565
3565
|
errorMessage: x,
|
|
3566
3566
|
unShowFieldTemplate: f,
|
|
3567
3567
|
orientation: h,
|
|
3568
|
-
children: /* @__PURE__ */ m(
|
|
3568
|
+
children: /* @__PURE__ */ m(Cr, {
|
|
3569
3569
|
isError: S,
|
|
3570
3570
|
size: c,
|
|
3571
3571
|
value: o || _,
|
|
@@ -3585,32 +3585,40 @@ function wr(e) {
|
|
|
3585
3585
|
});
|
|
3586
3586
|
}
|
|
3587
3587
|
//#endregion
|
|
3588
|
+
//#region src/services/clearLinkMarkAtBoundary.ts
|
|
3589
|
+
function Dr(e) {
|
|
3590
|
+
let { selection: t } = e;
|
|
3591
|
+
if (!t || !de.isCollapsed(t)) return;
|
|
3592
|
+
let [n, r] = X.leaf(e, t.anchor);
|
|
3593
|
+
n.link && X.isEnd(e, t.anchor, r) && (X.removeMark(e, "link"), X.removeMark(e, "href"));
|
|
3594
|
+
}
|
|
3595
|
+
//#endregion
|
|
3588
3596
|
//#region src/services/extractTextFromNode.ts
|
|
3589
|
-
function
|
|
3597
|
+
function Or(e) {
|
|
3590
3598
|
return e.map((e) => ue.string(e)).join("");
|
|
3591
3599
|
}
|
|
3592
3600
|
//#endregion
|
|
3593
3601
|
//#region src/services/isMarkActive.ts
|
|
3594
|
-
function
|
|
3595
|
-
let n =
|
|
3602
|
+
function kr(e, t) {
|
|
3603
|
+
let n = X.marks(e);
|
|
3596
3604
|
return n ? n[t] === !0 : !1;
|
|
3597
3605
|
}
|
|
3598
3606
|
//#endregion
|
|
3599
3607
|
//#region src/services/toggleMark.ts
|
|
3600
|
-
function
|
|
3601
|
-
|
|
3608
|
+
function Ar(e, t) {
|
|
3609
|
+
kr(e, t) ? X.removeMark(e, t) : X.addMark(e, t, !0);
|
|
3602
3610
|
}
|
|
3603
3611
|
//#endregion
|
|
3604
3612
|
//#region src/templates/richTextTemplates.ts
|
|
3605
|
-
var
|
|
3613
|
+
var jr = {
|
|
3606
3614
|
"mod+b": "bold",
|
|
3607
3615
|
"mod+i": "italic",
|
|
3608
3616
|
"mod+u": "underline",
|
|
3609
3617
|
"mod+`": "code"
|
|
3610
|
-
},
|
|
3618
|
+
}, Mr = [{
|
|
3611
3619
|
type: "paragraph",
|
|
3612
3620
|
children: [{ text: "" }]
|
|
3613
|
-
}],
|
|
3621
|
+
}], Nr = ["listItem", "numberedList"], Pr = [
|
|
3614
3622
|
"left",
|
|
3615
3623
|
"center",
|
|
3616
3624
|
"right",
|
|
@@ -3618,38 +3626,38 @@ var Or = {
|
|
|
3618
3626
|
];
|
|
3619
3627
|
//#endregion
|
|
3620
3628
|
//#region src/services/isBlockActive.ts
|
|
3621
|
-
function
|
|
3629
|
+
function Fr(e, t, n = "type") {
|
|
3622
3630
|
let { selection: r } = e;
|
|
3623
3631
|
if (!r) return !1;
|
|
3624
|
-
let [i] = Array.from(
|
|
3625
|
-
at:
|
|
3626
|
-
match: (e) => !
|
|
3632
|
+
let [i] = Array.from(X.nodes(e, {
|
|
3633
|
+
at: X.unhangRange(e, r),
|
|
3634
|
+
match: (e) => !X.isEditor(e) && le.isElement(e) && e[n] === t
|
|
3627
3635
|
}));
|
|
3628
3636
|
return !!i;
|
|
3629
3637
|
}
|
|
3630
3638
|
//#endregion
|
|
3631
3639
|
//#region src/services/toggleBlock.ts
|
|
3632
|
-
function
|
|
3633
|
-
let n =
|
|
3634
|
-
|
|
3635
|
-
match: (e) => !
|
|
3640
|
+
function Ir(e, t) {
|
|
3641
|
+
let n = Fr(e, t, Pr.includes(t) ? "align" : "type"), r = Nr.includes(t);
|
|
3642
|
+
pe.unwrapNodes(e, {
|
|
3643
|
+
match: (e) => !X.isEditor(e) && le.isElement(e) && Nr.includes(e.type) && !Pr.includes(t),
|
|
3636
3644
|
split: !0
|
|
3637
3645
|
});
|
|
3638
3646
|
let i;
|
|
3639
|
-
if (i =
|
|
3647
|
+
if (i = Pr.includes(t) ? { align: n ? void 0 : t } : { type: n ? "paragraph" : r ? "listItem" : t }, pe.setNodes(e, i), !n && r) {
|
|
3640
3648
|
let n = {
|
|
3641
3649
|
type: t,
|
|
3642
3650
|
children: []
|
|
3643
3651
|
};
|
|
3644
|
-
|
|
3652
|
+
pe.wrapNodes(e, n);
|
|
3645
3653
|
}
|
|
3646
3654
|
}
|
|
3647
3655
|
//#endregion
|
|
3648
3656
|
//#region src/components/richText/blockButton/index.tsx
|
|
3649
|
-
function
|
|
3650
|
-
let n =
|
|
3657
|
+
function Lr({ format: e, icon: t }) {
|
|
3658
|
+
let n = ve(), r = Fr(n, e, Pr.includes(e) ? "align" : "type") ? "activeTrue" : "activeFalse";
|
|
3651
3659
|
function i(t) {
|
|
3652
|
-
t.preventDefault(),
|
|
3660
|
+
t.preventDefault(), Ir(n, e);
|
|
3653
3661
|
}
|
|
3654
3662
|
return /* @__PURE__ */ p("button", {
|
|
3655
3663
|
type: "button",
|
|
@@ -3660,7 +3668,7 @@ function Pr({ format: e, icon: t }) {
|
|
|
3660
3668
|
}
|
|
3661
3669
|
//#endregion
|
|
3662
3670
|
//#region src/components/richText/element/index.tsx
|
|
3663
|
-
function
|
|
3671
|
+
function Rr({ attributes: e, children: t, element: n }) {
|
|
3664
3672
|
let r = { textAlign: n.align };
|
|
3665
3673
|
switch (n.type) {
|
|
3666
3674
|
case "blockQuote": return /* @__PURE__ */ p("blockquote", {
|
|
@@ -3730,11 +3738,11 @@ function Fr({ attributes: e, children: t, element: n }) {
|
|
|
3730
3738
|
}
|
|
3731
3739
|
//#endregion
|
|
3732
3740
|
//#region src/components/tab/tabContext.tsx
|
|
3733
|
-
var
|
|
3734
|
-
function
|
|
3735
|
-
return a(
|
|
3741
|
+
var zr = n({});
|
|
3742
|
+
function Br() {
|
|
3743
|
+
return a(zr);
|
|
3736
3744
|
}
|
|
3737
|
-
function
|
|
3745
|
+
function Vr(e) {
|
|
3738
3746
|
let { disabled: t, currentTab: n, changeCurrentTab: r } = e, i = c(() => ({
|
|
3739
3747
|
disabled: t,
|
|
3740
3748
|
currentTab: n,
|
|
@@ -3744,15 +3752,15 @@ function Rr(e) {
|
|
|
3744
3752
|
n,
|
|
3745
3753
|
r
|
|
3746
3754
|
]);
|
|
3747
|
-
return /* @__PURE__ */ p(
|
|
3755
|
+
return /* @__PURE__ */ p(zr.Provider, {
|
|
3748
3756
|
value: i,
|
|
3749
3757
|
children: e.children
|
|
3750
3758
|
});
|
|
3751
3759
|
}
|
|
3752
3760
|
//#endregion
|
|
3753
3761
|
//#region src/components/tab/tabButton/index.tsx
|
|
3754
|
-
function
|
|
3755
|
-
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } =
|
|
3762
|
+
function Hr(e) {
|
|
3763
|
+
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } = Br(), u = s || n, d = `arkynTabButton ${u ? "isDisabled" : ""} ${c === a && a ? "isActive" : ""} ${r}`;
|
|
3756
3764
|
function f(e) {
|
|
3757
3765
|
l(a), i?.(e);
|
|
3758
3766
|
}
|
|
@@ -3767,12 +3775,12 @@ function zr(e) {
|
|
|
3767
3775
|
}
|
|
3768
3776
|
//#endregion
|
|
3769
3777
|
//#region src/components/tab/tabContainer/index.tsx
|
|
3770
|
-
function
|
|
3778
|
+
function Ur(e) {
|
|
3771
3779
|
let { children: t, onChange: n, defaultValue: r, disabled: i = !1, className: a, ...o } = e, [s, c] = u(r || ""), l = `arkynTabContainer ${a || ""}`;
|
|
3772
3780
|
function d(e) {
|
|
3773
3781
|
c(e), n && n(e);
|
|
3774
3782
|
}
|
|
3775
|
-
return /* @__PURE__ */ p(
|
|
3783
|
+
return /* @__PURE__ */ p(Vr, {
|
|
3776
3784
|
disabled: i,
|
|
3777
3785
|
currentTab: s,
|
|
3778
3786
|
changeCurrentTab: d,
|
|
@@ -3785,8 +3793,8 @@ function Br(e) {
|
|
|
3785
3793
|
}
|
|
3786
3794
|
//#endregion
|
|
3787
3795
|
//#region src/components/richText/insertImage/index.tsx
|
|
3788
|
-
function
|
|
3789
|
-
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 =
|
|
3796
|
+
function Wr(e) {
|
|
3797
|
+
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 = ve(), [l, d] = u(!1), [h, g] = u(""), [_, v] = u("url");
|
|
3790
3798
|
function y(e) {
|
|
3791
3799
|
e.preventDefault(), !(!h || h === "") && (c.insertNodes([
|
|
3792
3800
|
{
|
|
@@ -3809,26 +3817,26 @@ function Vr(e) {
|
|
|
3809
3817
|
className: "arkynRichTextInsertImage",
|
|
3810
3818
|
onMouseDown: () => d(!0),
|
|
3811
3819
|
children: /* @__PURE__ */ p(P, {})
|
|
3812
|
-
}), /* @__PURE__ */ m(
|
|
3820
|
+
}), /* @__PURE__ */ m(Un, {
|
|
3813
3821
|
isVisible: l,
|
|
3814
3822
|
makeInvisible: () => d(!1),
|
|
3815
3823
|
children: [
|
|
3816
|
-
/* @__PURE__ */ p(
|
|
3824
|
+
/* @__PURE__ */ p(Gn, { children: s }),
|
|
3817
3825
|
/* @__PURE__ */ m("div", {
|
|
3818
3826
|
className: "arkynRichTextInsertImageModalContent",
|
|
3819
3827
|
children: [
|
|
3820
|
-
/* @__PURE__ */ m(
|
|
3828
|
+
/* @__PURE__ */ m(Ur, {
|
|
3821
3829
|
defaultValue: _,
|
|
3822
3830
|
onChange: v,
|
|
3823
|
-
children: [/* @__PURE__ */ p(
|
|
3831
|
+
children: [/* @__PURE__ */ p(Hr, {
|
|
3824
3832
|
value: "url",
|
|
3825
3833
|
children: n[0]
|
|
3826
|
-
}), /* @__PURE__ */ p(
|
|
3834
|
+
}), /* @__PURE__ */ p(Hr, {
|
|
3827
3835
|
value: "file",
|
|
3828
3836
|
children: n[1]
|
|
3829
3837
|
})]
|
|
3830
3838
|
}),
|
|
3831
|
-
_ === "url" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
3839
|
+
_ === "url" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ot, {
|
|
3832
3840
|
type: "text",
|
|
3833
3841
|
name: "richTextImageURL",
|
|
3834
3842
|
label: o,
|
|
@@ -3840,7 +3848,7 @@ function Vr(e) {
|
|
|
3840
3848
|
src: h,
|
|
3841
3849
|
alt: "preview"
|
|
3842
3850
|
})] }),
|
|
3843
|
-
_ === "file" && /* @__PURE__ */ p(
|
|
3851
|
+
_ === "file" && /* @__PURE__ */ p(Pn, {
|
|
3844
3852
|
name: "richTextImageURL",
|
|
3845
3853
|
action: t,
|
|
3846
3854
|
label: a,
|
|
@@ -3850,13 +3858,13 @@ function Vr(e) {
|
|
|
3850
3858
|
})
|
|
3851
3859
|
]
|
|
3852
3860
|
}),
|
|
3853
|
-
/* @__PURE__ */ m(
|
|
3861
|
+
/* @__PURE__ */ m(Wn, { children: [/* @__PURE__ */ p($, {
|
|
3854
3862
|
type: "button",
|
|
3855
3863
|
scheme: "danger",
|
|
3856
3864
|
variant: "outline",
|
|
3857
3865
|
onClick: () => d(!1),
|
|
3858
3866
|
children: r
|
|
3859
|
-
}), /* @__PURE__ */ p(
|
|
3867
|
+
}), /* @__PURE__ */ p($, {
|
|
3860
3868
|
type: "button",
|
|
3861
3869
|
onClick: y,
|
|
3862
3870
|
children: i
|
|
@@ -3865,9 +3873,71 @@ function Vr(e) {
|
|
|
3865
3873
|
})] });
|
|
3866
3874
|
}
|
|
3867
3875
|
//#endregion
|
|
3876
|
+
//#region src/services/isValidHttpsUrl.ts
|
|
3877
|
+
function Gr(e) {
|
|
3878
|
+
try {
|
|
3879
|
+
return new URL(e).protocol === "https:";
|
|
3880
|
+
} catch {
|
|
3881
|
+
return !1;
|
|
3882
|
+
}
|
|
3883
|
+
}
|
|
3884
|
+
//#endregion
|
|
3885
|
+
//#region src/components/richText/insertLink/index.tsx
|
|
3886
|
+
function Kr(e) {
|
|
3887
|
+
let { modalCancelButton: t = "Cancelar", modalConfirmButton: n = "Confirmar", modalInputUrlLabel: r = "URL do link:", modalTitle: i = "Inserir link", invalidUrlMessage: a = "URL inválida" } = e, s = ve(), [c, l] = u(!1), [d, h] = u(""), [g, _] = u(s.selection), v = Gr(d), y = d && !v ? a : "";
|
|
3888
|
+
function b(e) {
|
|
3889
|
+
e.preventDefault(), _(s.selection), l(!0);
|
|
3890
|
+
}
|
|
3891
|
+
function x(e) {
|
|
3892
|
+
e.preventDefault(), !(!v || !g) && (pe.select(s, g), de.isCollapsed(g) ? pe.insertNodes(s, {
|
|
3893
|
+
text: d,
|
|
3894
|
+
link: !0,
|
|
3895
|
+
href: d
|
|
3896
|
+
}) : (X.addMark(s, "link", !0), X.addMark(s, "href", d)), l(!1));
|
|
3897
|
+
}
|
|
3898
|
+
return o(() => {
|
|
3899
|
+
c || (h(""), _(null));
|
|
3900
|
+
}, [c]), /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("button", {
|
|
3901
|
+
type: "button",
|
|
3902
|
+
className: "arkynRichTextInsertLink",
|
|
3903
|
+
onMouseDown: b,
|
|
3904
|
+
children: /* @__PURE__ */ p(L, {})
|
|
3905
|
+
}), /* @__PURE__ */ m(Un, {
|
|
3906
|
+
isVisible: c,
|
|
3907
|
+
makeInvisible: () => l(!1),
|
|
3908
|
+
children: [
|
|
3909
|
+
/* @__PURE__ */ p(Gn, { children: i }),
|
|
3910
|
+
/* @__PURE__ */ p("div", {
|
|
3911
|
+
className: "arkynRichTextInsertLinkModalContent",
|
|
3912
|
+
children: /* @__PURE__ */ p(ot, {
|
|
3913
|
+
type: "text",
|
|
3914
|
+
name: "richTextLinkURL",
|
|
3915
|
+
label: r,
|
|
3916
|
+
showAsterisk: !0,
|
|
3917
|
+
defaultValue: d,
|
|
3918
|
+
onChange: (e) => h(e.target.value),
|
|
3919
|
+
errorMessage: y
|
|
3920
|
+
})
|
|
3921
|
+
}),
|
|
3922
|
+
/* @__PURE__ */ m(Wn, { children: [/* @__PURE__ */ p($, {
|
|
3923
|
+
type: "button",
|
|
3924
|
+
scheme: "danger",
|
|
3925
|
+
variant: "outline",
|
|
3926
|
+
onClick: () => l(!1),
|
|
3927
|
+
children: t
|
|
3928
|
+
}), /* @__PURE__ */ p($, {
|
|
3929
|
+
disabled: !v,
|
|
3930
|
+
type: "button",
|
|
3931
|
+
onClick: x,
|
|
3932
|
+
children: n
|
|
3933
|
+
})] })
|
|
3934
|
+
]
|
|
3935
|
+
})] });
|
|
3936
|
+
}
|
|
3937
|
+
//#endregion
|
|
3868
3938
|
//#region src/components/richText/insertVideo/index.tsx
|
|
3869
|
-
function
|
|
3870
|
-
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 =
|
|
3939
|
+
function qr(e) {
|
|
3940
|
+
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 = ve(), [c, l] = u(!1), [d, h] = u(""), [g, _] = u(""), [v, y] = u("");
|
|
3871
3941
|
function b(e) {
|
|
3872
3942
|
if (e.preventDefault(), !d || d === "") return;
|
|
3873
3943
|
let t = `https://www.youtube.com/embed/${d}`;
|
|
@@ -3889,7 +3959,10 @@ function Hr(e) {
|
|
|
3889
3959
|
}
|
|
3890
3960
|
return o(() => {
|
|
3891
3961
|
if (!g || g === "") return;
|
|
3892
|
-
h(""), y("")
|
|
3962
|
+
if (h(""), y(""), !Gr(g)) {
|
|
3963
|
+
y(a);
|
|
3964
|
+
return;
|
|
3965
|
+
}
|
|
3893
3966
|
let e = new URLSearchParams(g.split("?")[1]).get("v");
|
|
3894
3967
|
e ? h(e) : y(a);
|
|
3895
3968
|
}, [g, a]), o(() => {
|
|
@@ -3898,15 +3971,15 @@ function Hr(e) {
|
|
|
3898
3971
|
type: "button",
|
|
3899
3972
|
className: "arkynRichTextInsertVideo",
|
|
3900
3973
|
onMouseDown: () => l(!0),
|
|
3901
|
-
children: /* @__PURE__ */ p(
|
|
3902
|
-
}), /* @__PURE__ */ m(
|
|
3974
|
+
children: /* @__PURE__ */ p(K, {})
|
|
3975
|
+
}), /* @__PURE__ */ m(Un, {
|
|
3903
3976
|
isVisible: c,
|
|
3904
3977
|
makeInvisible: () => l(!1),
|
|
3905
3978
|
children: [
|
|
3906
|
-
/* @__PURE__ */ p(
|
|
3979
|
+
/* @__PURE__ */ p(Gn, { children: i }),
|
|
3907
3980
|
/* @__PURE__ */ m("div", {
|
|
3908
3981
|
className: "arkynRichTextInsertVideoModalContent",
|
|
3909
|
-
children: [/* @__PURE__ */ p(
|
|
3982
|
+
children: [/* @__PURE__ */ p(ot, {
|
|
3910
3983
|
type: "text",
|
|
3911
3984
|
name: "richTextVideoURL",
|
|
3912
3985
|
label: r,
|
|
@@ -3924,13 +3997,13 @@ function Hr(e) {
|
|
|
3924
3997
|
allowFullScreen: !0
|
|
3925
3998
|
})]
|
|
3926
3999
|
}),
|
|
3927
|
-
/* @__PURE__ */ m(
|
|
4000
|
+
/* @__PURE__ */ m(Wn, { children: [/* @__PURE__ */ p($, {
|
|
3928
4001
|
type: "button",
|
|
3929
4002
|
scheme: "danger",
|
|
3930
4003
|
variant: "outline",
|
|
3931
4004
|
onClick: () => l(!1),
|
|
3932
4005
|
children: t
|
|
3933
|
-
}), /* @__PURE__ */ p(
|
|
4006
|
+
}), /* @__PURE__ */ p($, {
|
|
3934
4007
|
disabled: !d,
|
|
3935
4008
|
type: "button",
|
|
3936
4009
|
onClick: b,
|
|
@@ -3941,18 +4014,22 @@ function Hr(e) {
|
|
|
3941
4014
|
}
|
|
3942
4015
|
//#endregion
|
|
3943
4016
|
//#region src/components/richText/leaf/index.tsx
|
|
3944
|
-
function
|
|
3945
|
-
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("
|
|
4017
|
+
function Jr({ attributes: e, children: t, leaf: n }) {
|
|
4018
|
+
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 })), n.link && (t = /* @__PURE__ */ p("a", {
|
|
4019
|
+
className: "arkynLeafLink",
|
|
4020
|
+
href: n.href,
|
|
4021
|
+
children: t
|
|
4022
|
+
})), /* @__PURE__ */ p("span", {
|
|
3946
4023
|
...e,
|
|
3947
4024
|
children: t
|
|
3948
4025
|
});
|
|
3949
4026
|
}
|
|
3950
4027
|
//#endregion
|
|
3951
4028
|
//#region src/components/richText/markButton/index.tsx
|
|
3952
|
-
function
|
|
3953
|
-
let n =
|
|
4029
|
+
function Yr({ format: e, icon: t }) {
|
|
4030
|
+
let n = ve(), r = kr(n, e) ? "activeTrue" : "activeFalse";
|
|
3954
4031
|
function i(t) {
|
|
3955
|
-
t.preventDefault(),
|
|
4032
|
+
t.preventDefault(), Ar(n, e);
|
|
3956
4033
|
}
|
|
3957
4034
|
return /* @__PURE__ */ p("button", {
|
|
3958
4035
|
type: "button",
|
|
@@ -3963,7 +4040,7 @@ function Wr({ format: e, icon: t }) {
|
|
|
3963
4040
|
}
|
|
3964
4041
|
//#endregion
|
|
3965
4042
|
//#region src/components/richText/toolbar/index.tsx
|
|
3966
|
-
function
|
|
4043
|
+
function Xr({ children: e }) {
|
|
3967
4044
|
return /* @__PURE__ */ p("div", {
|
|
3968
4045
|
className: "arkynRichTextToolbar",
|
|
3969
4046
|
children: e
|
|
@@ -3971,120 +4048,122 @@ function Gr({ children: e }) {
|
|
|
3971
4048
|
}
|
|
3972
4049
|
//#endregion
|
|
3973
4050
|
//#region src/components/richText/index.tsx
|
|
3974
|
-
function
|
|
3975
|
-
let { name: t, hiddenButtons: n, imageConfig: r, videoConfig: a,
|
|
4051
|
+
function Zr(e) {
|
|
4052
|
+
let { name: t, hiddenButtons: n, imageConfig: r, videoConfig: a, linkConfig: o, className: d = "", defaultValue: f = "[]", enforceCharacterLimit: h = !1, onChangeCharactersCount: x, baseErrorMessage: S, maxLimit: C = 1e4, onChange: w, isError: T, label: D, showAsterisk: O, id: k, orientation: A = "vertical", unShowFieldTemplate: j = !1 } = e, P = c(() => he(ye(me())), []), { fieldErrors: F } = Z(), L = c(() => {
|
|
3976
4053
|
try {
|
|
3977
|
-
let e = JSON.parse(
|
|
3978
|
-
return !Array.isArray(e) || e.length === 0 ? structuredClone(
|
|
4054
|
+
let e = JSON.parse(f);
|
|
4055
|
+
return !Array.isArray(e) || e.length === 0 ? structuredClone(Mr) : e.every((e) => typeof e == "object" && !!e && "type" in e && "children" in e) ? e : structuredClone(Mr);
|
|
3979
4056
|
} catch {
|
|
3980
|
-
return structuredClone(
|
|
4057
|
+
return structuredClone(Mr);
|
|
3981
4058
|
}
|
|
3982
|
-
}, [
|
|
3983
|
-
function
|
|
3984
|
-
let t =
|
|
3985
|
-
|
|
4059
|
+
}, [f]), [R, z] = u(Or(L).length), [B, V] = u(JSON.stringify(L) || "[]"), [U, W] = u(!1), K = l(null), q = s(), ee = k || q, te = S || F?.[t], J = T || !!te, ne = i(Jr, []), re = i(Rr, []);
|
|
4060
|
+
function ie(e) {
|
|
4061
|
+
let t = Or(e);
|
|
4062
|
+
z(t.length), x?.(t.length), !(h && t.length >= C) && (V(JSON.stringify(e)), w?.(e));
|
|
3986
4063
|
}
|
|
3987
|
-
let
|
|
4064
|
+
let ae = `arkynRichText ${J || C < R ? "errorTrue" : "errorFalse"} ${U ? "focusTrue" : "focusFalse"}`, oe = C - R;
|
|
3988
4065
|
function Y(e) {
|
|
3989
4066
|
return !n?.includes(e);
|
|
3990
4067
|
}
|
|
3991
|
-
return /* @__PURE__ */ p(
|
|
4068
|
+
return /* @__PURE__ */ p($e, {
|
|
3992
4069
|
name: t,
|
|
3993
|
-
label:
|
|
3994
|
-
showAsterisk:
|
|
3995
|
-
className:
|
|
3996
|
-
errorMessage:
|
|
3997
|
-
unShowFieldTemplate:
|
|
3998
|
-
orientation:
|
|
3999
|
-
children: /* @__PURE__ */ m(
|
|
4000
|
-
editor:
|
|
4001
|
-
initialValue:
|
|
4002
|
-
onChange:
|
|
4003
|
-
onValueChange:
|
|
4070
|
+
label: D,
|
|
4071
|
+
showAsterisk: O,
|
|
4072
|
+
className: d,
|
|
4073
|
+
errorMessage: te,
|
|
4074
|
+
unShowFieldTemplate: j,
|
|
4075
|
+
orientation: A,
|
|
4076
|
+
children: /* @__PURE__ */ m(_e, {
|
|
4077
|
+
editor: P,
|
|
4078
|
+
initialValue: L,
|
|
4079
|
+
onChange: ie,
|
|
4080
|
+
onValueChange: ie,
|
|
4004
4081
|
children: [
|
|
4005
4082
|
/* @__PURE__ */ m("div", {
|
|
4006
|
-
className:
|
|
4083
|
+
className: ae,
|
|
4007
4084
|
children: [
|
|
4008
|
-
/* @__PURE__ */ m(
|
|
4009
|
-
Y("headingOne") && /* @__PURE__ */ p(
|
|
4085
|
+
/* @__PURE__ */ m(Xr, { children: [
|
|
4086
|
+
Y("headingOne") && /* @__PURE__ */ p(Lr, {
|
|
4010
4087
|
format: "headingOne",
|
|
4011
4088
|
icon: M
|
|
4012
4089
|
}),
|
|
4013
|
-
Y("headingTwo") && /* @__PURE__ */ p(
|
|
4090
|
+
Y("headingTwo") && /* @__PURE__ */ p(Lr, {
|
|
4014
4091
|
format: "headingTwo",
|
|
4015
4092
|
icon: N
|
|
4016
4093
|
}),
|
|
4017
|
-
Y("blockQuote") && /* @__PURE__ */ p(
|
|
4094
|
+
Y("blockQuote") && /* @__PURE__ */ p(Lr, {
|
|
4018
4095
|
format: "blockQuote",
|
|
4019
|
-
icon:
|
|
4096
|
+
icon: H
|
|
4020
4097
|
}),
|
|
4021
|
-
Y("bold") && /* @__PURE__ */ p(
|
|
4098
|
+
Y("bold") && /* @__PURE__ */ p(Yr, {
|
|
4022
4099
|
format: "bold",
|
|
4023
4100
|
icon: b
|
|
4024
4101
|
}),
|
|
4025
|
-
Y("italic") && /* @__PURE__ */ p(
|
|
4102
|
+
Y("italic") && /* @__PURE__ */ p(Yr, {
|
|
4026
4103
|
format: "italic",
|
|
4027
4104
|
icon: I
|
|
4028
4105
|
}),
|
|
4029
|
-
Y("underline") && /* @__PURE__ */ p(
|
|
4106
|
+
Y("underline") && /* @__PURE__ */ p(Yr, {
|
|
4030
4107
|
format: "underline",
|
|
4031
|
-
icon:
|
|
4108
|
+
icon: G
|
|
4032
4109
|
}),
|
|
4033
|
-
Y("code") && /* @__PURE__ */ p(
|
|
4110
|
+
Y("code") && /* @__PURE__ */ p(Yr, {
|
|
4034
4111
|
format: "code",
|
|
4035
4112
|
icon: E
|
|
4036
4113
|
}),
|
|
4037
|
-
Y("left") && /* @__PURE__ */ p(
|
|
4114
|
+
Y("left") && /* @__PURE__ */ p(Lr, {
|
|
4038
4115
|
format: "left",
|
|
4039
4116
|
icon: v
|
|
4040
4117
|
}),
|
|
4041
|
-
Y("right") && /* @__PURE__ */ p(
|
|
4118
|
+
Y("right") && /* @__PURE__ */ p(Lr, {
|
|
4042
4119
|
format: "right",
|
|
4043
4120
|
icon: y
|
|
4044
4121
|
}),
|
|
4045
|
-
Y("center") && /* @__PURE__ */ p(
|
|
4122
|
+
Y("center") && /* @__PURE__ */ p(Lr, {
|
|
4046
4123
|
format: "center",
|
|
4047
4124
|
icon: g
|
|
4048
4125
|
}),
|
|
4049
|
-
Y("justify") && /* @__PURE__ */ p(
|
|
4126
|
+
Y("justify") && /* @__PURE__ */ p(Lr, {
|
|
4050
4127
|
format: "justify",
|
|
4051
4128
|
icon: _
|
|
4052
4129
|
}),
|
|
4053
|
-
r && Y("image") && /* @__PURE__ */ p(
|
|
4054
|
-
Y("video") && /* @__PURE__ */ p(
|
|
4130
|
+
r && Y("image") && /* @__PURE__ */ p(Wr, { ...r }),
|
|
4131
|
+
Y("video") && /* @__PURE__ */ p(qr, { ...a }),
|
|
4132
|
+
Y("link") && /* @__PURE__ */ p(Kr, { ...o })
|
|
4055
4133
|
] }),
|
|
4056
|
-
/* @__PURE__ */ p(
|
|
4134
|
+
/* @__PURE__ */ p(ge, {
|
|
4057
4135
|
className: "editorContainer",
|
|
4058
|
-
renderElement:
|
|
4059
|
-
renderLeaf:
|
|
4136
|
+
renderElement: re,
|
|
4137
|
+
renderLeaf: ne,
|
|
4060
4138
|
spellCheck: !0,
|
|
4061
|
-
ref:
|
|
4062
|
-
id:
|
|
4063
|
-
onFocus: () =>
|
|
4064
|
-
onBlur: () =>
|
|
4139
|
+
ref: K,
|
|
4140
|
+
id: ee,
|
|
4141
|
+
onFocus: () => W(!0),
|
|
4142
|
+
onBlur: () => W(!1),
|
|
4065
4143
|
onKeyDown: (e) => {
|
|
4066
|
-
|
|
4144
|
+
(e.key === " " || e.key === "Enter") && Dr(P);
|
|
4145
|
+
for (let t in jr) if (ce(t, e)) {
|
|
4067
4146
|
e.preventDefault();
|
|
4068
|
-
let n =
|
|
4069
|
-
|
|
4147
|
+
let n = jr[t];
|
|
4148
|
+
Ar(P, n);
|
|
4070
4149
|
}
|
|
4071
4150
|
}
|
|
4072
4151
|
}),
|
|
4073
|
-
|
|
4152
|
+
oe < 0 && /* @__PURE__ */ p("div", {
|
|
4074
4153
|
className: "restatesCharacters",
|
|
4075
|
-
children:
|
|
4154
|
+
children: oe
|
|
4076
4155
|
})
|
|
4077
4156
|
]
|
|
4078
4157
|
}),
|
|
4079
4158
|
/* @__PURE__ */ p("input", {
|
|
4080
4159
|
type: "hidden",
|
|
4081
4160
|
name: t,
|
|
4082
|
-
value:
|
|
4161
|
+
value: B.slice(0, C)
|
|
4083
4162
|
}),
|
|
4084
4163
|
/* @__PURE__ */ p("input", {
|
|
4085
4164
|
type: "hidden",
|
|
4086
4165
|
name: `${t}Count`,
|
|
4087
|
-
value:
|
|
4166
|
+
value: R
|
|
4088
4167
|
})
|
|
4089
4168
|
]
|
|
4090
4169
|
})
|
|
@@ -4092,9 +4171,9 @@ function Kr(e) {
|
|
|
4092
4171
|
}
|
|
4093
4172
|
//#endregion
|
|
4094
4173
|
//#region src/components/searchPlaces.tsx
|
|
4095
|
-
function
|
|
4174
|
+
function Qr(e) {
|
|
4096
4175
|
let { onChange: t, onPlaceChanged: n, options: r, ...i } = e, [a, o] = u(null);
|
|
4097
|
-
return /* @__PURE__ */ p(
|
|
4176
|
+
return /* @__PURE__ */ p(be, {
|
|
4098
4177
|
onLoad: (e) => o(e),
|
|
4099
4178
|
onPlacesChanged: () => {
|
|
4100
4179
|
let e = a?.getPlaces(), t = e ? e[0] : null, r = t?.address_components;
|
|
@@ -4135,7 +4214,7 @@ function qr(e) {
|
|
|
4135
4214
|
}
|
|
4136
4215
|
},
|
|
4137
4216
|
options: r,
|
|
4138
|
-
children: /* @__PURE__ */ p(
|
|
4217
|
+
children: /* @__PURE__ */ p(ot, {
|
|
4139
4218
|
type: "text",
|
|
4140
4219
|
autoComplete: "off",
|
|
4141
4220
|
onChange: (e) => t?.(e.target.value),
|
|
@@ -4145,12 +4224,12 @@ function qr(e) {
|
|
|
4145
4224
|
}
|
|
4146
4225
|
//#endregion
|
|
4147
4226
|
//#region src/components/switch/index.tsx
|
|
4148
|
-
function
|
|
4227
|
+
function $r(e) {
|
|
4149
4228
|
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 = s(), C = m || S, [w, T] = u(r), E = typeof i == "boolean" ? i : w;
|
|
4150
4229
|
function D() {
|
|
4151
4230
|
T(!w), f?.(E ? o : a || "checked");
|
|
4152
4231
|
}
|
|
4153
|
-
return /* @__PURE__ */ p(
|
|
4232
|
+
return /* @__PURE__ */ p($e, {
|
|
4154
4233
|
name: c,
|
|
4155
4234
|
label: t,
|
|
4156
4235
|
showAsterisk: _,
|
|
@@ -4176,7 +4255,7 @@ function Jr(e) {
|
|
|
4176
4255
|
}
|
|
4177
4256
|
//#endregion
|
|
4178
4257
|
//#region src/components/table/tableBody/index.tsx
|
|
4179
|
-
function
|
|
4258
|
+
function ei(t) {
|
|
4180
4259
|
let { emptyMessage: n = "Nenhum dado adicionado.", className: r, children: i, ...a } = t, o = `arkynTableBody ${r}`, s = e.toArray(i).filter(Boolean), c = s.length === 0;
|
|
4181
4260
|
return /* @__PURE__ */ p("tbody", {
|
|
4182
4261
|
className: o.trim(),
|
|
@@ -4192,7 +4271,7 @@ function Yr(t) {
|
|
|
4192
4271
|
}
|
|
4193
4272
|
//#endregion
|
|
4194
4273
|
//#region src/components/table/tableCaption/index.tsx
|
|
4195
|
-
function
|
|
4274
|
+
function ti(e) {
|
|
4196
4275
|
let { className: t, children: n, ...r } = e;
|
|
4197
4276
|
return /* @__PURE__ */ p("caption", {
|
|
4198
4277
|
className: `arkynTableCaption ${t}`.trim(),
|
|
@@ -4205,7 +4284,7 @@ function Xr(e) {
|
|
|
4205
4284
|
}
|
|
4206
4285
|
//#endregion
|
|
4207
4286
|
//#region src/components/table/tableContainer/index.tsx
|
|
4208
|
-
function
|
|
4287
|
+
function ni(e) {
|
|
4209
4288
|
let { children: t, className: n, ...r } = e;
|
|
4210
4289
|
return /* @__PURE__ */ p("div", {
|
|
4211
4290
|
className: `arkynTableContainer ${n}`.trim(),
|
|
@@ -4215,7 +4294,7 @@ function Zr(e) {
|
|
|
4215
4294
|
}
|
|
4216
4295
|
//#endregion
|
|
4217
4296
|
//#region src/components/table/tableFooter/index.tsx
|
|
4218
|
-
function
|
|
4297
|
+
function ri(e) {
|
|
4219
4298
|
let { className: t, children: n, ...r } = e;
|
|
4220
4299
|
return /* @__PURE__ */ m("tfoot", {
|
|
4221
4300
|
className: `arkynTableFooter ${t}`.trim(),
|
|
@@ -4231,7 +4310,7 @@ function Qr(e) {
|
|
|
4231
4310
|
}
|
|
4232
4311
|
//#endregion
|
|
4233
4312
|
//#region src/components/table/tableHeader/index.tsx
|
|
4234
|
-
function
|
|
4313
|
+
function ii(e) {
|
|
4235
4314
|
let { className: t, children: n, ...r } = e;
|
|
4236
4315
|
return /* @__PURE__ */ m("thead", {
|
|
4237
4316
|
className: `arkynTableHeader ${t}`.trim(),
|
|
@@ -4241,8 +4320,8 @@ function $r(e) {
|
|
|
4241
4320
|
}
|
|
4242
4321
|
//#endregion
|
|
4243
4322
|
//#region src/components/textarea/index.tsx
|
|
4244
|
-
function
|
|
4245
|
-
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 } =
|
|
4323
|
+
function ai(e) {
|
|
4324
|
+
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(), k = S || O, A = i || w?.[f], j = `arkynTextarea ${t} ${n} ${a || o ? "opacityTrue" : "opacityFalse"} ${A ? "errorTrue" : "errorFalse"} ${T ? "focusedTrue" : "focusedFalse"}`, M = a ? void 0 : y;
|
|
4246
4325
|
function N() {
|
|
4247
4326
|
a || !D?.current || (E(!0), D.current.focus());
|
|
4248
4327
|
}
|
|
@@ -4252,10 +4331,10 @@ function ei(e) {
|
|
|
4252
4331
|
function F(e) {
|
|
4253
4332
|
E(!1), g && g(e);
|
|
4254
4333
|
}
|
|
4255
|
-
return /* @__PURE__ */ m(
|
|
4334
|
+
return /* @__PURE__ */ m(Be, {
|
|
4256
4335
|
className: r,
|
|
4257
4336
|
children: [
|
|
4258
|
-
c && /* @__PURE__ */ p(
|
|
4337
|
+
c && /* @__PURE__ */ p(ze, {
|
|
4259
4338
|
htmlFor: k,
|
|
4260
4339
|
showAsterisk: d,
|
|
4261
4340
|
children: c
|
|
@@ -4279,13 +4358,13 @@ function ei(e) {
|
|
|
4279
4358
|
...C
|
|
4280
4359
|
})
|
|
4281
4360
|
}),
|
|
4282
|
-
A && /* @__PURE__ */ p(
|
|
4361
|
+
A && /* @__PURE__ */ p(Re, { children: A })
|
|
4283
4362
|
]
|
|
4284
4363
|
});
|
|
4285
4364
|
}
|
|
4286
4365
|
//#endregion
|
|
4287
4366
|
//#region src/templates/badResponses.ts
|
|
4288
|
-
var
|
|
4367
|
+
var oi = [
|
|
4289
4368
|
"BadGateway",
|
|
4290
4369
|
"BadRequest",
|
|
4291
4370
|
"Conflict",
|
|
@@ -4295,13 +4374,13 @@ var ti = [
|
|
|
4295
4374
|
"ServerError",
|
|
4296
4375
|
"Unauthorized",
|
|
4297
4376
|
"UnprocessableEntity"
|
|
4298
|
-
],
|
|
4377
|
+
], si = [
|
|
4299
4378
|
"Created",
|
|
4300
4379
|
"Found",
|
|
4301
4380
|
"Success",
|
|
4302
4381
|
"Updated"
|
|
4303
|
-
],
|
|
4304
|
-
function
|
|
4382
|
+
], ci = n({});
|
|
4383
|
+
function li(e) {
|
|
4305
4384
|
let { children: t = !1 } = e, [n, r] = u([]), a = i((e) => n.some((t) => t.key === e), [n]), o = i((e) => n.find((t) => t.key === e)?.data, [n]), s = i((e, t) => {
|
|
4306
4385
|
r((n) => [...n.filter((t) => t.key !== e), {
|
|
4307
4386
|
key: e,
|
|
@@ -4324,15 +4403,15 @@ function ii(e) {
|
|
|
4324
4403
|
l,
|
|
4325
4404
|
d
|
|
4326
4405
|
]);
|
|
4327
|
-
return /* @__PURE__ */ p(
|
|
4406
|
+
return /* @__PURE__ */ p(ci.Provider, {
|
|
4328
4407
|
value: f,
|
|
4329
4408
|
children: t
|
|
4330
4409
|
});
|
|
4331
4410
|
}
|
|
4332
4411
|
//#endregion
|
|
4333
4412
|
//#region src/hooks/useModal.ts
|
|
4334
|
-
function
|
|
4335
|
-
let t = a(
|
|
4413
|
+
function ui(e) {
|
|
4414
|
+
let t = a(ci);
|
|
4336
4415
|
if (Object.entries(t).length === 0) throw Error("useModal must be used within a Provider");
|
|
4337
4416
|
if (e) {
|
|
4338
4417
|
let { modalData: n, modalIsOpen: r, openModal: i, closeModal: a } = t;
|
|
@@ -4346,10 +4425,10 @@ function ai(e) {
|
|
|
4346
4425
|
}
|
|
4347
4426
|
//#endregion
|
|
4348
4427
|
//#region src/providers/toastProvider.tsx
|
|
4349
|
-
var
|
|
4350
|
-
function
|
|
4428
|
+
var di = n({});
|
|
4429
|
+
function fi(e) {
|
|
4351
4430
|
switch (e.type) {
|
|
4352
|
-
case "success": return
|
|
4431
|
+
case "success": return Ce.success(e.message, {
|
|
4353
4432
|
style: {
|
|
4354
4433
|
background: "#10B981",
|
|
4355
4434
|
color: "#ffffff",
|
|
@@ -4362,7 +4441,7 @@ function si(e) {
|
|
|
4362
4441
|
secondary: "#ffffff"
|
|
4363
4442
|
}
|
|
4364
4443
|
});
|
|
4365
|
-
case "danger": return
|
|
4444
|
+
case "danger": return Ce.error(e.message, {
|
|
4366
4445
|
style: {
|
|
4367
4446
|
background: "#E11D48",
|
|
4368
4447
|
color: "#ffffff",
|
|
@@ -4377,11 +4456,11 @@ function si(e) {
|
|
|
4377
4456
|
});
|
|
4378
4457
|
}
|
|
4379
4458
|
}
|
|
4380
|
-
function
|
|
4381
|
-
let t = c(() => ({ showToast:
|
|
4382
|
-
return /* @__PURE__ */ m(
|
|
4459
|
+
function pi({ children: e }) {
|
|
4460
|
+
let t = c(() => ({ showToast: fi }), []);
|
|
4461
|
+
return /* @__PURE__ */ m(di.Provider, {
|
|
4383
4462
|
value: t,
|
|
4384
|
-
children: [/* @__PURE__ */ p(
|
|
4463
|
+
children: [/* @__PURE__ */ p(we, {
|
|
4385
4464
|
position: "top-right",
|
|
4386
4465
|
containerStyle: { zIndex: 999999999999999 }
|
|
4387
4466
|
}), e]
|
|
@@ -4389,21 +4468,21 @@ function ci({ children: e }) {
|
|
|
4389
4468
|
}
|
|
4390
4469
|
//#endregion
|
|
4391
4470
|
//#region src/hooks/useToast.ts
|
|
4392
|
-
function
|
|
4393
|
-
let e = a(
|
|
4471
|
+
function mi() {
|
|
4472
|
+
let e = a(di);
|
|
4394
4473
|
if (Object.entries(e).length === 0) throw Error("useToast must be used within a Provider");
|
|
4395
4474
|
return e;
|
|
4396
4475
|
}
|
|
4397
4476
|
//#endregion
|
|
4398
4477
|
//#region src/hooks/useAutomation.ts
|
|
4399
|
-
function
|
|
4400
|
-
let { closeAll: t } =
|
|
4478
|
+
function hi(e) {
|
|
4479
|
+
let { closeAll: t } = ui(), { showToast: n } = mi(), r = e?.closeModal, a = e?.message, s = e?.name, c = e?.cause?.data?.scrollTo, l = e?.cause?.fieldErrors ? Object.values(e?.cause?.fieldErrors)[0] : null, u = i(() => {
|
|
4401
4480
|
if (!(!a && !l)) {
|
|
4402
|
-
if (
|
|
4481
|
+
if (si.includes(s)) return n({
|
|
4403
4482
|
message: a,
|
|
4404
4483
|
type: "success"
|
|
4405
4484
|
});
|
|
4406
|
-
if (
|
|
4485
|
+
if (oi.includes(s)) {
|
|
4407
4486
|
if (l) return n({
|
|
4408
4487
|
message: l,
|
|
4409
4488
|
type: "danger"
|
|
@@ -4421,7 +4500,7 @@ function ui(e) {
|
|
|
4421
4500
|
n
|
|
4422
4501
|
]);
|
|
4423
4502
|
o(() => {
|
|
4424
|
-
r && t(), c &&
|
|
4503
|
+
r && t(), c && Se.scrollTo(c, {
|
|
4425
4504
|
smooth: !0,
|
|
4426
4505
|
offset: 20
|
|
4427
4506
|
}), u();
|
|
@@ -4434,8 +4513,8 @@ function ui(e) {
|
|
|
4434
4513
|
}
|
|
4435
4514
|
//#endregion
|
|
4436
4515
|
//#region src/providers/drawerProvider.tsx
|
|
4437
|
-
var
|
|
4438
|
-
function
|
|
4516
|
+
var gi = n({});
|
|
4517
|
+
function _i(e) {
|
|
4439
4518
|
let { children: t = !1 } = e, [n, r] = u([]);
|
|
4440
4519
|
function i(e) {
|
|
4441
4520
|
return !!n.some((t) => t.key === e);
|
|
@@ -4455,7 +4534,7 @@ function fi(e) {
|
|
|
4455
4534
|
function s(e) {
|
|
4456
4535
|
r(n.filter((t) => t.key !== e));
|
|
4457
4536
|
}
|
|
4458
|
-
return /* @__PURE__ */ p(
|
|
4537
|
+
return /* @__PURE__ */ p(gi.Provider, {
|
|
4459
4538
|
value: {
|
|
4460
4539
|
drawerIsOpen: i,
|
|
4461
4540
|
drawerData: a,
|
|
@@ -4467,8 +4546,8 @@ function fi(e) {
|
|
|
4467
4546
|
}
|
|
4468
4547
|
//#endregion
|
|
4469
4548
|
//#region src/hooks/useDrawer.ts
|
|
4470
|
-
function
|
|
4471
|
-
let t = a(
|
|
4549
|
+
function vi(e) {
|
|
4550
|
+
let t = a(gi);
|
|
4472
4551
|
if (Object.entries(t).length === 0) throw Error("useDrawer must be used within a Provider");
|
|
4473
4552
|
if (e) {
|
|
4474
4553
|
let { drawerData: n, drawerIsOpen: r, openDrawer: i, closeDrawer: a } = t;
|
|
@@ -4482,7 +4561,7 @@ function pi(e) {
|
|
|
4482
4561
|
}
|
|
4483
4562
|
//#endregion
|
|
4484
4563
|
//#region src/hooks/useScopedParams.ts
|
|
4485
|
-
function
|
|
4564
|
+
function yi(e, t = "") {
|
|
4486
4565
|
let n = new URLSearchParams(e), r = t ? `${t}:` : "", i = (e) => {
|
|
4487
4566
|
Object.entries(e).forEach(([e, t]) => {
|
|
4488
4567
|
t === void 0 ? n.delete(`${r}${e}`) : n.set(`${r}${e}`, String(t));
|
|
@@ -4499,8 +4578,8 @@ function mi(e, t = "") {
|
|
|
4499
4578
|
}
|
|
4500
4579
|
//#endregion
|
|
4501
4580
|
//#region src/hooks/useSearchAutomation.ts
|
|
4502
|
-
function
|
|
4503
|
-
let { closeAll: n } =
|
|
4581
|
+
function bi(e, t = "") {
|
|
4582
|
+
let { closeAll: n } = ui(), { showToast: r } = mi(), { getParam: i } = yi(e, t), a = i("closeModal") === "true", s = i("message"), c = i("name"), l = i("type");
|
|
4504
4583
|
o(() => {
|
|
4505
4584
|
a && n(), s && (l === "success" && r({
|
|
4506
4585
|
message: s,
|
|
@@ -4508,10 +4587,10 @@ function hi(e, t = "") {
|
|
|
4508
4587
|
}), l === "danger" && r({
|
|
4509
4588
|
message: s,
|
|
4510
4589
|
type: "danger"
|
|
4511
|
-
}), c &&
|
|
4590
|
+
}), c && oi.includes(c) && !oi.includes(s) && r({
|
|
4512
4591
|
message: s,
|
|
4513
4592
|
type: "danger"
|
|
4514
|
-
}), c &&
|
|
4593
|
+
}), c && si.includes(c) && !si.includes(s) && r({
|
|
4515
4594
|
message: s,
|
|
4516
4595
|
type: "success"
|
|
4517
4596
|
}));
|
|
@@ -4526,28 +4605,28 @@ function hi(e, t = "") {
|
|
|
4526
4605
|
}
|
|
4527
4606
|
//#endregion
|
|
4528
4607
|
//#region src/providers/placesProvider.tsx
|
|
4529
|
-
var
|
|
4608
|
+
var xi = [
|
|
4530
4609
|
"places",
|
|
4531
4610
|
"marker",
|
|
4532
4611
|
"maps"
|
|
4533
4612
|
];
|
|
4534
|
-
function
|
|
4535
|
-
let { apiKey: t, children: n, preventFontsLoading: r = !0 } = e, { isLoaded: i } =
|
|
4613
|
+
function Si(e) {
|
|
4614
|
+
let { apiKey: t, children: n, preventFontsLoading: r = !0 } = e, { isLoaded: i } = xe({
|
|
4536
4615
|
googleMapsApiKey: t,
|
|
4537
|
-
libraries:
|
|
4616
|
+
libraries: xi,
|
|
4538
4617
|
preventGoogleFontsLoading: r
|
|
4539
4618
|
});
|
|
4540
4619
|
return /* @__PURE__ */ p(f, { children: n(i) });
|
|
4541
4620
|
}
|
|
4542
4621
|
//#endregion
|
|
4543
4622
|
//#region src/utils/richTextUtilities.ts
|
|
4544
|
-
function
|
|
4545
|
-
if (
|
|
4623
|
+
function Ci(e) {
|
|
4624
|
+
if (fe.isText(e)) {
|
|
4546
4625
|
let t = e?.text;
|
|
4547
|
-
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;
|
|
4626
|
+
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>`), e?.link && (t = `<a href="${e.href}">${t}</a>`), t;
|
|
4548
4627
|
}
|
|
4549
4628
|
if (le.isElement(e)) {
|
|
4550
|
-
let t = e.children?.map((e) =>
|
|
4629
|
+
let t = e.children?.map((e) => Ci(e)).join(""), n = e.align || "left";
|
|
4551
4630
|
switch (e.type) {
|
|
4552
4631
|
case "video": return `<iframe src="${e.src}" class="align_${n}" />`;
|
|
4553
4632
|
case "image": return `<img src="${e.src}" class="align_${n}" />`;
|
|
@@ -4563,50 +4642,52 @@ function vi(e) {
|
|
|
4563
4642
|
}
|
|
4564
4643
|
return "";
|
|
4565
4644
|
}
|
|
4566
|
-
function
|
|
4645
|
+
function wi(e) {
|
|
4567
4646
|
if (typeof e == "string") return { text: e };
|
|
4568
|
-
let t =
|
|
4647
|
+
let t = e.props.children, n;
|
|
4648
|
+
n = Array.isArray(t) ? t.map((e) => wi(e)) : typeof t == "string" || !t ? [{ text: t || "" }] : [wi(t)];
|
|
4649
|
+
let r = e.props.className?.replace("align_", "");
|
|
4569
4650
|
switch (e.type) {
|
|
4570
4651
|
case "img": return {
|
|
4571
4652
|
type: "image",
|
|
4572
|
-
align:
|
|
4653
|
+
align: r,
|
|
4573
4654
|
src: e.props.src,
|
|
4574
4655
|
children: [{ text: "" }]
|
|
4575
4656
|
};
|
|
4576
4657
|
case "p": return {
|
|
4577
4658
|
type: "paragraph",
|
|
4578
|
-
align:
|
|
4579
|
-
children:
|
|
4659
|
+
align: r,
|
|
4660
|
+
children: n
|
|
4580
4661
|
};
|
|
4581
4662
|
case "blockquote": return {
|
|
4582
4663
|
type: "blockQuote",
|
|
4583
|
-
align:
|
|
4584
|
-
children:
|
|
4664
|
+
align: r,
|
|
4665
|
+
children: n
|
|
4585
4666
|
};
|
|
4586
4667
|
case "ul": return {
|
|
4587
4668
|
type: "bulletedList",
|
|
4588
|
-
align:
|
|
4589
|
-
children:
|
|
4669
|
+
align: r,
|
|
4670
|
+
children: n
|
|
4590
4671
|
};
|
|
4591
4672
|
case "ol": return {
|
|
4592
4673
|
type: "numberedList",
|
|
4593
|
-
align:
|
|
4594
|
-
children:
|
|
4674
|
+
align: r,
|
|
4675
|
+
children: n
|
|
4595
4676
|
};
|
|
4596
4677
|
case "li": return {
|
|
4597
4678
|
type: "listItem",
|
|
4598
|
-
align:
|
|
4599
|
-
children:
|
|
4679
|
+
align: r,
|
|
4680
|
+
children: n
|
|
4600
4681
|
};
|
|
4601
4682
|
case "h1": return {
|
|
4602
4683
|
type: "headingOne",
|
|
4603
|
-
align:
|
|
4604
|
-
children:
|
|
4684
|
+
align: r,
|
|
4685
|
+
children: n
|
|
4605
4686
|
};
|
|
4606
4687
|
case "h2": return {
|
|
4607
4688
|
type: "headingTwo",
|
|
4608
|
-
align:
|
|
4609
|
-
children:
|
|
4689
|
+
align: r,
|
|
4690
|
+
children: n
|
|
4610
4691
|
};
|
|
4611
4692
|
case "strong": return {
|
|
4612
4693
|
text: e.props.children,
|
|
@@ -4624,21 +4705,26 @@ function yi(e) {
|
|
|
4624
4705
|
text: e.props.children,
|
|
4625
4706
|
underline: !0
|
|
4626
4707
|
};
|
|
4708
|
+
case "a": return {
|
|
4709
|
+
text: e.props.children,
|
|
4710
|
+
link: !0,
|
|
4711
|
+
href: e.props.href
|
|
4712
|
+
};
|
|
4627
4713
|
default: return { text: e.props.children || "" };
|
|
4628
4714
|
}
|
|
4629
4715
|
}
|
|
4630
4716
|
//#endregion
|
|
4631
4717
|
//#region src/services/toHtml.ts
|
|
4632
|
-
function
|
|
4633
|
-
return e.map((e) =>
|
|
4718
|
+
function Ti(e) {
|
|
4719
|
+
return e.map((e) => Ci(e)).join("");
|
|
4634
4720
|
}
|
|
4635
4721
|
//#endregion
|
|
4636
4722
|
//#region src/services/toRichTextValue.ts
|
|
4637
|
-
function
|
|
4638
|
-
let t =
|
|
4639
|
-
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? { text: e } :
|
|
4723
|
+
function Ei(e) {
|
|
4724
|
+
let t = Te(e);
|
|
4725
|
+
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? { text: e } : wi(e)) : typeof t == "string" ? [{ text: t }] : [wi(t)];
|
|
4640
4726
|
}
|
|
4641
4727
|
//#endregion
|
|
4642
|
-
export {
|
|
4728
|
+
export { ke as AlertContainer, Ae as AlertContent, je as AlertDescription, Me as AlertIcon, Ee as AlertTitle, Fe as AudioPlayer, Ke as AudioUpload, qe as Badge, $ as Button, gt as Calendar, bt as CardTabButton, xt as CardTabContainer, St as Checkbox, Tt as ClientOnly, Ot as CurrencyInput, Lt as DatePicker, Ve as Divider, Vt as DrawerContainer, Ht as DrawerHeader, _i as DrawerProvider, Gt as FacebookPixel, Re as FieldError, ze as FieldLabel, Be as FieldWrapper, Jt as FileUpload, Le as FormProvider, Sn as FullCalendar, En as GoogleAnalytics, jn as GoogleTagManager, He as IconButton, Pn as ImageUpload, ot as Input, Ln as MapView, zn as MaskedInput, Un as ModalContainer, Wn as ModalFooter, Gn as ModalHeader, li as ModalProvider, er as MultiSelect, or as Pagination, br as PhoneInput, Si as PlacesProvider, xr as Popover, Tr as RadioBox, Er as RadioGroup, Zr as RichText, Qr as SearchPlaces, ut as Select, Pe as Slider, $r as Switch, Hr as TabButton, Ur as TabContainer, ei as TableBody, ti as TableCaption, ni as TableContainer, ri as TableFooter, ii as TableHeader, ai as Textarea, pi as ToastProvider, Ue as Tooltip, Ti as toHtml, Ei as toRichTextValue, hi as useAutomation, vi as useDrawer, Z as useForm, wt as useHydrated, ui as useModal, yi as useScopedParams, at as useScrollLock, bi as useSearchAutomation, Ne as useSlider, mi as useToast };
|
|
4643
4729
|
|
|
4644
4730
|
//# sourceMappingURL=index.js.map
|