@arkyn/components 3.0.8 → 3.0.10
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/calendar/_calendarProvider.d.ts.map +1 -1
- package/dist/components/calendar/calendarTableTd/index.d.ts.map +1 -1
- package/dist/components/currencyInput/index.d.ts +1 -1
- package/dist/components/datePicker/datePickerCalendarContainer/index.d.ts +1 -0
- package/dist/components/datePicker/datePickerCalendarContainer/index.d.ts.map +1 -1
- package/dist/components/datePicker/datePickerContainer/index.d.ts +5 -1
- package/dist/components/datePicker/datePickerContainer/index.d.ts.map +1 -1
- package/dist/components/datePicker/index.d.ts.map +1 -1
- package/dist/components/drawer/drawerContainer/index.d.ts.map +1 -1
- package/dist/components/googleAnalytics/snippets/generateGAElements.d.ts.map +1 -1
- package/dist/components/googleTagManager/snippets/appendToDataLayer.d.ts.map +1 -1
- package/dist/components/googleTagManager/snippets/generateGTMElements.d.ts.map +1 -1
- package/dist/components/imageUpload/index.d.ts +1 -1
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/modal/modalContainer/index.d.ts.map +1 -1
- package/dist/components/multiSelect/index.d.ts +1 -1
- package/dist/components/multiSelect/index.d.ts.map +1 -1
- package/dist/components/multiSelect/multiSelectContainer/index.d.ts +6 -1
- package/dist/components/multiSelect/multiSelectContainer/index.d.ts.map +1 -1
- package/dist/components/multiSelect/multiSelectOption/index.d.ts +2 -0
- package/dist/components/multiSelect/multiSelectOption/index.d.ts.map +1 -1
- package/dist/components/multiSelect/multiSelectOptionsContainer/index.d.ts +1 -0
- package/dist/components/multiSelect/multiSelectOptionsContainer/index.d.ts.map +1 -1
- package/dist/components/popover/index.d.ts.map +1 -1
- package/dist/components/richText/index.d.ts +1 -1
- package/dist/components/richText/index.d.ts.map +1 -1
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/index.d.ts.map +1 -1
- package/dist/components/select/selectContainer/index.d.ts +6 -1
- package/dist/components/select/selectContainer/index.d.ts.map +1 -1
- package/dist/components/select/selectOption/index.d.ts +2 -0
- package/dist/components/select/selectOption/index.d.ts.map +1 -1
- package/dist/components/select/selectOptionsContainer/index.d.ts +1 -0
- package/dist/components/select/selectOptionsContainer/index.d.ts.map +1 -1
- package/dist/hooks/useEscapeKey.d.ts +24 -0
- package/dist/hooks/useEscapeKey.d.ts.map +1 -0
- package/dist/hooks/useFlipPosition.d.ts +38 -0
- package/dist/hooks/useFlipPosition.d.ts.map +1 -0
- package/dist/hooks/useFocusTrap.d.ts +28 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -0
- package/dist/index.js +1120 -881
- package/dist/index.js.map +1 -1
- package/dist/modules/components/calendar/_calendarProvider.js +47 -34
- package/dist/modules/components/calendar/_calendarProvider.js.map +1 -1
- package/dist/modules/components/calendar/calendarTableTd/index.js +7 -2
- package/dist/modules/components/calendar/calendarTableTd/index.js.map +1 -1
- package/dist/modules/components/calendar/calendarTableTd/styles.css +1 -1
- package/dist/modules/components/calendar/styles.css +2 -2
- package/dist/modules/components/currencyInput/index.js.map +1 -1
- package/dist/modules/components/datePicker/datePickerCalendarContainer/index.js +12 -16
- package/dist/modules/components/datePicker/datePickerCalendarContainer/index.js.map +1 -1
- package/dist/modules/components/datePicker/datePickerContainer/index.js +9 -2
- package/dist/modules/components/datePicker/datePickerContainer/index.js.map +1 -1
- package/dist/modules/components/datePicker/index.js +63 -44
- package/dist/modules/components/datePicker/index.js.map +1 -1
- package/dist/modules/components/datePicker/styles.css +4 -4
- package/dist/modules/components/drawer/drawerContainer/index.js +31 -23
- package/dist/modules/components/drawer/drawerContainer/index.js.map +1 -1
- package/dist/modules/components/facebookPixel/pixel.js +1 -1
- package/dist/modules/components/facebookPixel/pixel.js.map +1 -1
- package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js +7 -6
- package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js.map +1 -1
- package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js +7 -6
- package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js.map +1 -1
- package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js +20 -14
- package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js.map +1 -1
- package/dist/modules/components/imageUpload/index.js.map +1 -1
- package/dist/modules/components/input/index.js.map +1 -1
- package/dist/modules/components/modal/modalContainer/index.js +30 -22
- package/dist/modules/components/modal/modalContainer/index.js.map +1 -1
- package/dist/modules/components/multiSelect/index.js +119 -79
- package/dist/modules/components/multiSelect/index.js.map +1 -1
- package/dist/modules/components/multiSelect/multiSelectContainer/index.js +10 -2
- package/dist/modules/components/multiSelect/multiSelectContainer/index.js.map +1 -1
- package/dist/modules/components/multiSelect/multiSelectOption/index.js +7 -3
- package/dist/modules/components/multiSelect/multiSelectOption/index.js.map +1 -1
- package/dist/modules/components/multiSelect/multiSelectOption/styles.css +1 -1
- package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js +19 -23
- package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js.map +1 -1
- package/dist/modules/components/multiSelect/styles.css +1 -1
- package/dist/modules/components/popover/index.js +23 -17
- package/dist/modules/components/popover/index.js.map +1 -1
- package/dist/modules/components/richText/index.js +1 -1
- package/dist/modules/components/richText/index.js.map +1 -1
- package/dist/modules/components/searchPlaces.js +1 -1
- package/dist/modules/components/searchPlaces.js.map +1 -1
- package/dist/modules/components/select/index.js +120 -80
- package/dist/modules/components/select/index.js.map +1 -1
- package/dist/modules/components/select/selectContainer/index.js +10 -2
- package/dist/modules/components/select/selectContainer/index.js.map +1 -1
- package/dist/modules/components/select/selectOption/index.js +5 -2
- package/dist/modules/components/select/selectOption/index.js.map +1 -1
- package/dist/modules/components/select/selectOption/styles.css +1 -1
- package/dist/modules/components/select/selectOptionsContainer/index.js +18 -23
- package/dist/modules/components/select/selectOptionsContainer/index.js.map +1 -1
- package/dist/modules/components/select/styles.css +1 -1
- package/dist/modules/hooks/useEscapeKey.js +18 -0
- package/dist/modules/hooks/useEscapeKey.js.map +1 -0
- package/dist/modules/hooks/useFlipPosition.js +26 -0
- package/dist/modules/hooks/useFlipPosition.js.map +1 -0
- package/dist/modules/hooks/useFocusTrap.js +44 -0
- package/dist/modules/hooks/useFocusTrap.js.map +1 -0
- package/dist/modules/utils/escapeForInlineScript.js +14 -0
- package/dist/modules/utils/escapeForInlineScript.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/utils/escapeForInlineScript.d.ts +23 -0
- package/dist/utils/escapeForInlineScript.d.ts.map +1 -0
- package/package.json +16 -13
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, Link as L, Loader2 as R, MapPinned as
|
|
4
|
-
import { findCountryMask 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 ee, Pause as z, Play as B, Quote as V, RefreshCw as H, Search as U, Underline as W, Video as G, X as te, XCircle as K } from "lucide-react";
|
|
4
|
+
import { findCountryMask as q, formatToCapitalizeFirstWordLetter as J, formatToCurrency as ne, formatToPhone as re, removeNonNumeric as ie } from "@arkyn/shared";
|
|
5
5
|
import ae from "mapbox-gl";
|
|
6
6
|
import { createRoot as oe } from "react-dom/client";
|
|
7
7
|
import { InputMask as Y } from "@react-input/mask";
|
|
8
8
|
import { countries as se } from "@arkyn/templates";
|
|
9
|
-
import { isHotkey as
|
|
10
|
-
import { Editor as
|
|
11
|
-
import { withHistory as
|
|
12
|
-
import { Editable as
|
|
13
|
-
import { StandaloneSearchBox as
|
|
14
|
-
import { scroller as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
9
|
+
import { isHotkey as X } from "is-hotkey";
|
|
10
|
+
import { Editor as Z, Element as ce, Node as le, Range as ue, Text as de, Transforms as fe, createEditor as pe } from "slate";
|
|
11
|
+
import { withHistory as me } from "slate-history";
|
|
12
|
+
import { Editable as he, Slate as ge, useSlate as _e, withReact as ve } from "slate-react";
|
|
13
|
+
import { StandaloneSearchBox as ye, useLoadScript as be } from "@react-google-maps/api";
|
|
14
|
+
import { scroller as xe } from "react-scroll";
|
|
15
|
+
import Se, { Toaster as Ce } from "react-hot-toast";
|
|
16
|
+
import we from "html-react-parser";
|
|
17
17
|
//#region src/components/alert/alertTitle/index.tsx
|
|
18
|
-
function
|
|
18
|
+
function Te(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 Ee(e) {
|
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/components/alert/alertContainer/index.tsx
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return a(
|
|
27
|
+
var Ee = n({});
|
|
28
|
+
function De() {
|
|
29
|
+
return a(Ee);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Oe(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 === Te ? 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(Ee.Provider, {
|
|
39
39
|
value: o,
|
|
40
40
|
children: /* @__PURE__ */ p("div", {
|
|
41
41
|
className: a.trim(),
|
|
@@ -46,7 +46,7 @@ function ke(e) {
|
|
|
46
46
|
}
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/components/alert/alertContent/index.tsx
|
|
49
|
-
function
|
|
49
|
+
function ke(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 Ae(e) {
|
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/components/alert/alertDescription/index.tsx
|
|
58
|
-
function
|
|
58
|
+
function Ae(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 je(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 je(e) {
|
|
68
|
+
let { className: t, ...n } = e, { scheme: r } = De(), 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(K, {
|
|
75
75
|
className: i,
|
|
76
76
|
...n
|
|
77
77
|
});
|
|
@@ -87,7 +87,7 @@ function Me(e) {
|
|
|
87
87
|
}
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/hooks/useSlider.ts
|
|
90
|
-
function
|
|
90
|
+
function Me(e) {
|
|
91
91
|
function t() {
|
|
92
92
|
return !e || e <= 0 ? 0 : e >= 100 ? 100 : e;
|
|
93
93
|
}
|
|
@@ -99,7 +99,7 @@ function Ne(e) {
|
|
|
99
99
|
}
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region src/components/slider/index.tsx
|
|
102
|
-
function
|
|
102
|
+
function Ne(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 Pe(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 Pe(e) {
|
|
143
|
+
let { onPlayAudio: t, onPauseAudio: n, disabled: r, style: i, ...a } = e, [s, c] = Me(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 Fe(e) {
|
|
|
192
192
|
type: "button",
|
|
193
193
|
disabled: r,
|
|
194
194
|
onClick: E,
|
|
195
|
-
children: [d && /* @__PURE__ */ p(
|
|
195
|
+
children: [d && /* @__PURE__ */ p(z, {}), !d && /* @__PURE__ */ p(B, {})]
|
|
196
196
|
}),
|
|
197
197
|
/* @__PURE__ */ p("p", { children: b }),
|
|
198
|
-
/* @__PURE__ */ p(
|
|
198
|
+
/* @__PURE__ */ p(Ne, {
|
|
199
199
|
value: s,
|
|
200
200
|
onChange: D,
|
|
201
201
|
onDragging: g,
|
|
@@ -207,22 +207,22 @@ function Fe(e) {
|
|
|
207
207
|
}
|
|
208
208
|
//#endregion
|
|
209
209
|
//#region src/providers/formProvider.tsx
|
|
210
|
-
var
|
|
211
|
-
function
|
|
210
|
+
var Fe = n({});
|
|
211
|
+
function Ie(e) {
|
|
212
212
|
let { children: n, fieldErrors: r, form: i } = e, a = c(() => ({ fieldErrors: r }), [r]);
|
|
213
|
-
return /* @__PURE__ */ m(
|
|
213
|
+
return /* @__PURE__ */ m(Fe.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 Q() {
|
|
221
|
+
return a(Fe);
|
|
222
222
|
}
|
|
223
223
|
//#endregion
|
|
224
224
|
//#region src/components/fieldError/index.tsx
|
|
225
|
-
function
|
|
225
|
+
function Le(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 Re(e) {
|
|
|
232
232
|
}
|
|
233
233
|
//#endregion
|
|
234
234
|
//#region src/components/fieldLabel/index.tsx
|
|
235
|
-
function
|
|
235
|
+
function Re(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 ze(e) {
|
|
|
241
241
|
}
|
|
242
242
|
//#endregion
|
|
243
243
|
//#region src/components/fieldWrapper/index.tsx
|
|
244
|
-
function
|
|
244
|
+
function ze(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 Be(e) {
|
|
|
251
251
|
}
|
|
252
252
|
//#endregion
|
|
253
253
|
//#region src/services/iconRenderer.tsx
|
|
254
|
-
function
|
|
254
|
+
function $(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 Q(e) {
|
|
|
264
264
|
}
|
|
265
265
|
//#endregion
|
|
266
266
|
//#region src/components/button/index.tsx
|
|
267
|
-
function
|
|
267
|
+
function Be(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,
|
|
@@ -284,12 +284,12 @@ function $(e) {
|
|
|
284
284
|
}), /* @__PURE__ */ m("div", {
|
|
285
285
|
className: "arkynButtonContent",
|
|
286
286
|
children: [
|
|
287
|
-
/* @__PURE__ */ p(
|
|
287
|
+
/* @__PURE__ */ p($, {
|
|
288
288
|
iconSize: f,
|
|
289
289
|
icon: o
|
|
290
290
|
}),
|
|
291
291
|
u,
|
|
292
|
-
/* @__PURE__ */ p(
|
|
292
|
+
/* @__PURE__ */ p($, {
|
|
293
293
|
iconSize: f,
|
|
294
294
|
icon: s
|
|
295
295
|
})
|
|
@@ -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(Pe, { 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: H,
|
|
399
399
|
disabled: n
|
|
400
400
|
})
|
|
401
|
-
}), /* @__PURE__ */ p(
|
|
401
|
+
}), /* @__PURE__ */ p(Be, {
|
|
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(Be, {
|
|
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 } = Q(), 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(ze, { children: [
|
|
474
|
+
n && /* @__PURE__ */ p(Re, {
|
|
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(Le, { 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($, {
|
|
520
520
|
iconSize: l,
|
|
521
521
|
icon: i
|
|
522
522
|
}),
|
|
523
523
|
/* @__PURE__ */ p("p", { children: s }),
|
|
524
|
-
/* @__PURE__ */ p(
|
|
524
|
+
/* @__PURE__ */ p($, {
|
|
525
525
|
iconSize: l,
|
|
526
526
|
icon: a
|
|
527
527
|
})
|
|
@@ -662,39 +662,52 @@ var Je = class {
|
|
|
662
662
|
function Xe() {
|
|
663
663
|
return a(Ye);
|
|
664
664
|
}
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
665
|
+
var Ze = new Je();
|
|
666
|
+
function Qe(e) {
|
|
667
|
+
let { calendarType: t, children: n, defaultValue: r, defaultViewValue: a = /* @__PURE__ */ new Date(), language: o = "pt-BR", onChange: s, onChangeView: l, value: d, viewValue: f } = e, m = t === "single" ? [r || /* @__PURE__ */ new Date(), r || /* @__PURE__ */ new Date()] : r || [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()], [h, g] = u(a), [_, v] = u(m), y = f || h, b = d ? t === "single" ? [d, d] : d : _, x = i((e) => {
|
|
668
668
|
let n = [new Date(e[0]), new Date(e[1])];
|
|
669
|
-
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
669
|
+
s && t === "range" && s(n), s && t === "single" && s(n[0]), v(n);
|
|
670
|
+
}, [t, s]), S = i((e) => {
|
|
671
|
+
l && l(e), g(e);
|
|
672
|
+
}, [l]), C = i((e, n, r) => Ze.changeDay(e, n, r, t, b, x, S), [
|
|
673
|
+
t,
|
|
674
|
+
b,
|
|
675
|
+
x,
|
|
676
|
+
S
|
|
677
|
+
]), w = i((e) => Ze.changeMonth(e, y, S), [y, S]), T = i((e) => Ze.changeYear(e, y, S), [y, S]), E = i(() => Ze.nextMonth(y, S), [y, S]), D = i(() => Ze.previousMonth(y, S), [y, S]), O = c(() => ({
|
|
678
|
+
valueDate: b,
|
|
679
|
+
viewDate: y,
|
|
680
|
+
currentDate: y.toLocaleDateString(o).slice(3),
|
|
681
|
+
currentDay: Ze.currentDay(y),
|
|
682
|
+
currentMonth: Ze.currentMonth(y),
|
|
683
|
+
currentYear: Ze.currentYear(y),
|
|
684
|
+
listWeek: Ze.listWeek(o),
|
|
685
|
+
listMonths: Ze.listMonths(y, o),
|
|
686
|
+
listYears: Ze.listYears(100),
|
|
687
|
+
listMatrix: Ze.listMatrix(y, b),
|
|
688
|
+
changeDay: C,
|
|
689
|
+
changeMonth: w,
|
|
690
|
+
changeYear: T,
|
|
691
|
+
nextMonth: E,
|
|
692
|
+
previousMonth: D
|
|
693
|
+
}), [
|
|
694
|
+
b,
|
|
695
|
+
y,
|
|
696
|
+
o,
|
|
697
|
+
C,
|
|
698
|
+
w,
|
|
699
|
+
T,
|
|
700
|
+
E,
|
|
701
|
+
D
|
|
702
|
+
]);
|
|
674
703
|
return /* @__PURE__ */ p(Ye.Provider, {
|
|
675
|
-
value:
|
|
676
|
-
valueDate: v,
|
|
677
|
-
viewDate: _,
|
|
678
|
-
currentDate: _.toLocaleDateString(a).slice(3),
|
|
679
|
-
currentDay: y.currentDay(_),
|
|
680
|
-
currentMonth: y.currentMonth(_),
|
|
681
|
-
currentYear: y.currentYear(_),
|
|
682
|
-
listWeek: y.listWeek(a),
|
|
683
|
-
listMonths: y.listMonths(_, a),
|
|
684
|
-
listYears: y.listYears(100),
|
|
685
|
-
listMatrix: y.listMatrix(_, v),
|
|
686
|
-
changeDay: (e, n, r) => y.changeDay(e, n, r, t, v, b, x),
|
|
687
|
-
changeMonth: (e) => y.changeMonth(e, _, x),
|
|
688
|
-
changeYear: (e) => y.changeYear(e, _, x),
|
|
689
|
-
nextMonth: () => y.nextMonth(_, x),
|
|
690
|
-
previousMonth: () => y.previousMonth(_, x)
|
|
691
|
-
},
|
|
704
|
+
value: O,
|
|
692
705
|
children: n
|
|
693
706
|
});
|
|
694
707
|
}
|
|
695
708
|
//#endregion
|
|
696
709
|
//#region src/components/calendar/calendarContainer/index.tsx
|
|
697
|
-
function
|
|
710
|
+
function $e({ children: e }) {
|
|
698
711
|
return /* @__PURE__ */ p("div", {
|
|
699
712
|
className: "arkynCalendarContainer",
|
|
700
713
|
children: e
|
|
@@ -702,26 +715,26 @@ function Qe({ children: e }) {
|
|
|
702
715
|
}
|
|
703
716
|
//#endregion
|
|
704
717
|
//#region src/services/fieldTemplate.tsx
|
|
705
|
-
function
|
|
718
|
+
function et(e) {
|
|
706
719
|
let { name: t, label: n, showAsterisk: r, className: i, unShowFieldTemplate: a, errorMessage: o, children: s, orientation: c } = e;
|
|
707
|
-
return a ? s : /* @__PURE__ */ m(
|
|
720
|
+
return a ? s : /* @__PURE__ */ m(ze, {
|
|
708
721
|
id: t,
|
|
709
722
|
className: i,
|
|
710
723
|
orientation: c,
|
|
711
724
|
children: [
|
|
712
|
-
n && /* @__PURE__ */ p(
|
|
725
|
+
n && /* @__PURE__ */ p(Re, {
|
|
713
726
|
htmlFor: t,
|
|
714
727
|
showAsterisk: r,
|
|
715
728
|
children: n
|
|
716
729
|
}),
|
|
717
730
|
s,
|
|
718
|
-
o && /* @__PURE__ */ p(
|
|
731
|
+
o && /* @__PURE__ */ p(Le, { children: o })
|
|
719
732
|
]
|
|
720
733
|
});
|
|
721
734
|
}
|
|
722
735
|
//#endregion
|
|
723
736
|
//#region src/components/select/selectChevron/index.tsx
|
|
724
|
-
function
|
|
737
|
+
function tt(e) {
|
|
725
738
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
726
739
|
return n ? null : /* @__PURE__ */ p(C, {
|
|
727
740
|
className: `arkynSelectChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -736,18 +749,26 @@ function et(e) {
|
|
|
736
749
|
}
|
|
737
750
|
//#endregion
|
|
738
751
|
//#region src/components/select/selectContainer/index.tsx
|
|
739
|
-
function
|
|
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
|
-
return /* @__PURE__ */ p("
|
|
752
|
+
function nt(e) {
|
|
753
|
+
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, containerRef: m, onContainerKeyDown: h, tabIndex: g, ariaControls: _, ariaActiveDescendant: v } = e;
|
|
754
|
+
return /* @__PURE__ */ p("div", {
|
|
755
|
+
ref: m,
|
|
742
756
|
id: d,
|
|
757
|
+
tabIndex: g,
|
|
758
|
+
role: "combobox",
|
|
759
|
+
"aria-haspopup": "listbox",
|
|
760
|
+
"aria-expanded": o,
|
|
761
|
+
"aria-controls": _,
|
|
762
|
+
"aria-activedescendant": v,
|
|
743
763
|
className: `arkynSelectContainer ${f ? "hasPrefix" : ""} ${l} ${u} ${r || c || a ? "opacity" : ""} ${i ? "errored" : ""} ${o ? "focused" : ""} ${s}`,
|
|
744
764
|
onClick: n,
|
|
765
|
+
onKeyDown: h,
|
|
745
766
|
children: t
|
|
746
767
|
});
|
|
747
768
|
}
|
|
748
769
|
//#endregion
|
|
749
770
|
//#region src/components/select/selectContent/index.tsx
|
|
750
|
-
function
|
|
771
|
+
function rt(e) {
|
|
751
772
|
let { children: t, size: n } = e;
|
|
752
773
|
return /* @__PURE__ */ p("div", {
|
|
753
774
|
className: `arkynSelectContent ${n}`,
|
|
@@ -756,12 +777,15 @@ function nt(e) {
|
|
|
756
777
|
}
|
|
757
778
|
//#endregion
|
|
758
779
|
//#region src/components/select/selectOption/index.tsx
|
|
759
|
-
function
|
|
760
|
-
let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a } = e;
|
|
780
|
+
function it(e) {
|
|
781
|
+
let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a, id: o, isHighlighted: s = !1 } = e, c = n(i);
|
|
761
782
|
return /* @__PURE__ */ m("button", {
|
|
762
783
|
type: "button",
|
|
784
|
+
id: o,
|
|
785
|
+
role: "option",
|
|
786
|
+
"aria-selected": c,
|
|
763
787
|
onClick: () => r(i),
|
|
764
|
-
className: `arkynSelectOption ${a} ${
|
|
788
|
+
className: `arkynSelectOption ${a} ${c ? "active" : ""} ${s ? "highlighted" : ""}`,
|
|
765
789
|
children: [
|
|
766
790
|
t,
|
|
767
791
|
" ",
|
|
@@ -770,14 +794,36 @@ function rt(e) {
|
|
|
770
794
|
});
|
|
771
795
|
}
|
|
772
796
|
//#endregion
|
|
797
|
+
//#region src/hooks/useFlipPosition.ts
|
|
798
|
+
function at(e, t, n) {
|
|
799
|
+
let [r, i] = u("bottom");
|
|
800
|
+
return o(() => {
|
|
801
|
+
if (!t) return;
|
|
802
|
+
function r() {
|
|
803
|
+
if (!e.current) return;
|
|
804
|
+
let t = e.current.parentElement;
|
|
805
|
+
if (!t) return;
|
|
806
|
+
let r = t.getBoundingClientRect();
|
|
807
|
+
window.innerHeight - r.bottom < n && r.top > n ? i("top") : i("bottom");
|
|
808
|
+
}
|
|
809
|
+
return r(), window.addEventListener("resize", r), () => {
|
|
810
|
+
window.removeEventListener("resize", r);
|
|
811
|
+
};
|
|
812
|
+
}, [
|
|
813
|
+
e,
|
|
814
|
+
t,
|
|
815
|
+
n
|
|
816
|
+
]), r;
|
|
817
|
+
}
|
|
818
|
+
//#endregion
|
|
773
819
|
//#region src/hooks/useScrollLock.ts
|
|
774
|
-
function
|
|
820
|
+
function ot() {
|
|
775
821
|
return typeof window > "u" ? 0 : window.innerWidth - document.documentElement.clientWidth;
|
|
776
822
|
}
|
|
777
|
-
function
|
|
823
|
+
function st(e) {
|
|
778
824
|
o(() => {
|
|
779
825
|
if (e) {
|
|
780
|
-
let e = document.body.style.overflow, t = document.body.style.paddingRight, n =
|
|
826
|
+
let e = document.body.style.overflow, t = document.body.style.paddingRight, n = ot();
|
|
781
827
|
if (n > 0) {
|
|
782
828
|
let e = window.getComputedStyle(document.body), t = parseInt(e.paddingRight, 10) || 0;
|
|
783
829
|
document.body.style.paddingRight = `${t + n}px`;
|
|
@@ -790,18 +836,18 @@ function at(e) {
|
|
|
790
836
|
}
|
|
791
837
|
//#endregion
|
|
792
838
|
//#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 } =
|
|
839
|
+
function ct(e) {
|
|
840
|
+
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 } = Q(), [M, N] = u(!1), P = l(null), F = s(), I = E || F, L = x || j?.[t], ee = !!L, z = n || h, B = {
|
|
795
841
|
md: 20,
|
|
796
842
|
lg: 20
|
|
797
|
-
}[T],
|
|
798
|
-
function
|
|
799
|
-
|
|
843
|
+
}[T], V = C ? "right" : "left", H = V === "left" && h, U = V === "right" && h;
|
|
844
|
+
function W() {
|
|
845
|
+
z || !P?.current || (N(!0), P.current.focus());
|
|
800
846
|
}
|
|
801
|
-
function
|
|
847
|
+
function G(e) {
|
|
802
848
|
N(!0), v && v(e);
|
|
803
849
|
}
|
|
804
|
-
function
|
|
850
|
+
function te(e) {
|
|
805
851
|
N(!1), y && y(e);
|
|
806
852
|
}
|
|
807
853
|
return w === "hidden" ? /* @__PURE__ */ p("input", {
|
|
@@ -810,7 +856,7 @@ function ot(e) {
|
|
|
810
856
|
type: "text",
|
|
811
857
|
ref: P,
|
|
812
858
|
...A
|
|
813
|
-
}) : /* @__PURE__ */ p(
|
|
859
|
+
}) : /* @__PURE__ */ p(et, {
|
|
814
860
|
name: t,
|
|
815
861
|
label: o,
|
|
816
862
|
showAsterisk: S,
|
|
@@ -821,51 +867,51 @@ function ot(e) {
|
|
|
821
867
|
children: /* @__PURE__ */ m("section", {
|
|
822
868
|
title: r,
|
|
823
869
|
style: i,
|
|
824
|
-
onClick:
|
|
825
|
-
className: `arkynInput ${d ? "hasPrefix" : ""} ${n ? "disabled" : ""} ${f ? "hasSuffix" : ""} ${a} ${T} ${
|
|
870
|
+
onClick: W,
|
|
871
|
+
className: `arkynInput ${d ? "hasPrefix" : ""} ${n ? "disabled" : ""} ${f ? "hasSuffix" : ""} ${a} ${T} ${z || _ || h ? "opacity" : ""} ${ee ? "errored" : ""} ${M ? "focused" : ""}`,
|
|
826
872
|
children: [
|
|
827
|
-
/* @__PURE__ */ p(
|
|
828
|
-
iconSize:
|
|
873
|
+
/* @__PURE__ */ p($, {
|
|
874
|
+
iconSize: B,
|
|
829
875
|
icon: d,
|
|
830
876
|
className: "prefix"
|
|
831
877
|
}),
|
|
832
|
-
/* @__PURE__ */ p(
|
|
833
|
-
show:
|
|
834
|
-
iconSize:
|
|
878
|
+
/* @__PURE__ */ p($, {
|
|
879
|
+
show: H,
|
|
880
|
+
iconSize: B,
|
|
835
881
|
className: "spinner",
|
|
836
882
|
icon: R
|
|
837
883
|
}),
|
|
838
|
-
/* @__PURE__ */ p(
|
|
884
|
+
/* @__PURE__ */ p($, {
|
|
839
885
|
show: !h,
|
|
840
886
|
icon: g,
|
|
841
|
-
iconSize:
|
|
887
|
+
iconSize: B
|
|
842
888
|
}),
|
|
843
889
|
/* @__PURE__ */ p("input", {
|
|
844
|
-
disabled:
|
|
890
|
+
disabled: z,
|
|
845
891
|
readOnly: _,
|
|
846
892
|
ref: P,
|
|
847
|
-
onFocus:
|
|
848
|
-
onBlur:
|
|
893
|
+
onFocus: G,
|
|
894
|
+
onBlur: te,
|
|
849
895
|
type: w,
|
|
850
896
|
id: I,
|
|
851
897
|
name: t,
|
|
852
|
-
placeholder:
|
|
853
|
-
value:
|
|
898
|
+
placeholder: z && D || O,
|
|
899
|
+
value: z ? void 0 : D,
|
|
854
900
|
...A
|
|
855
901
|
}),
|
|
856
|
-
/* @__PURE__ */ p(
|
|
902
|
+
/* @__PURE__ */ p($, {
|
|
857
903
|
show: !h,
|
|
858
904
|
icon: C,
|
|
859
|
-
iconSize:
|
|
905
|
+
iconSize: B
|
|
860
906
|
}),
|
|
861
|
-
/* @__PURE__ */ p(
|
|
862
|
-
show:
|
|
863
|
-
iconSize:
|
|
907
|
+
/* @__PURE__ */ p($, {
|
|
908
|
+
show: U,
|
|
909
|
+
iconSize: B,
|
|
864
910
|
className: "spinner",
|
|
865
911
|
icon: R
|
|
866
912
|
}),
|
|
867
|
-
/* @__PURE__ */ p(
|
|
868
|
-
iconSize:
|
|
913
|
+
/* @__PURE__ */ p($, {
|
|
914
|
+
iconSize: B,
|
|
869
915
|
icon: f,
|
|
870
916
|
className: "suffix"
|
|
871
917
|
})
|
|
@@ -875,36 +921,30 @@ function ot(e) {
|
|
|
875
921
|
}
|
|
876
922
|
//#endregion
|
|
877
923
|
//#region src/components/select/selectOptionsContainer/index.tsx
|
|
878
|
-
function
|
|
879
|
-
let { children: t,
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
let e = s.current.parentElement;
|
|
884
|
-
if (!e) return;
|
|
885
|
-
let t = e.getBoundingClientRect();
|
|
886
|
-
window.innerHeight - t.bottom < 300 && t.top > 300 ? d("top") : d("bottom");
|
|
887
|
-
})();
|
|
888
|
-
}, [n]);
|
|
889
|
-
function f(e) {
|
|
890
|
-
r && a(e.target.value);
|
|
924
|
+
function lt(e) {
|
|
925
|
+
let { children: t, id: n, isFocused: r, isSearchable: i, search: a, onSearch: o } = e, s = l(null), c = at(s, r, 300);
|
|
926
|
+
st(r);
|
|
927
|
+
function u(e) {
|
|
928
|
+
i && o(e.target.value);
|
|
891
929
|
}
|
|
892
|
-
return
|
|
930
|
+
return r ? /* @__PURE__ */ m("div", {
|
|
893
931
|
ref: s,
|
|
932
|
+
id: n,
|
|
933
|
+
role: "listbox",
|
|
894
934
|
className: `arkynSelectOptionsContainer ${c}`,
|
|
895
|
-
children: [
|
|
935
|
+
children: [i && /* @__PURE__ */ p(ct, {
|
|
896
936
|
type: "search",
|
|
897
937
|
name: "search-select",
|
|
898
938
|
variant: "underline",
|
|
899
|
-
leftIcon:
|
|
900
|
-
value:
|
|
901
|
-
onChange:
|
|
939
|
+
leftIcon: U,
|
|
940
|
+
value: a,
|
|
941
|
+
onChange: u
|
|
902
942
|
}), t]
|
|
903
943
|
}) : null;
|
|
904
944
|
}
|
|
905
945
|
//#endregion
|
|
906
946
|
//#region src/components/select/selectOverlay/index.tsx
|
|
907
|
-
function
|
|
947
|
+
function ut(e) {
|
|
908
948
|
let { isFocused: t, handleBlur: n } = e;
|
|
909
949
|
return t ? /* @__PURE__ */ p("aside", {
|
|
910
950
|
className: "arkynSelectOverlay",
|
|
@@ -913,7 +953,7 @@ function ct(e) {
|
|
|
913
953
|
}
|
|
914
954
|
//#endregion
|
|
915
955
|
//#region src/components/select/selectSpinner/index.tsx
|
|
916
|
-
function
|
|
956
|
+
function dt(e) {
|
|
917
957
|
let { iconSize: t, isLoading: n } = e;
|
|
918
958
|
return n ? /* @__PURE__ */ p(R, {
|
|
919
959
|
className: "arkynSelectSpinner",
|
|
@@ -923,99 +963,139 @@ function lt(e) {
|
|
|
923
963
|
}
|
|
924
964
|
//#endregion
|
|
925
965
|
//#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 } =
|
|
966
|
+
function ft(e) {
|
|
967
|
+
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 } = Q(), N = l(null), P = l(null), F = s(), I = g || F, L = `${I}-listbox`, R = c || M?.[t], ee = !!R, z = T || d || f, B = {
|
|
928
968
|
md: 20,
|
|
929
969
|
lg: 20
|
|
930
|
-
}[D], [
|
|
931
|
-
function
|
|
932
|
-
return
|
|
970
|
+
}[D], [V, H] = u(""), [U, W] = u(!1), [G, te] = u(o), [K, q] = u(-1), J = O === void 0 ? G : O;
|
|
971
|
+
function ne(e) {
|
|
972
|
+
return J === e;
|
|
933
973
|
}
|
|
934
|
-
function
|
|
974
|
+
function re(e) {
|
|
935
975
|
return n.find((t) => t.value === e)?.label || "";
|
|
936
976
|
}
|
|
937
|
-
function
|
|
938
|
-
|
|
977
|
+
function ie(e) {
|
|
978
|
+
return `${L}-option-${e.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
|
|
939
979
|
}
|
|
940
|
-
function
|
|
941
|
-
U(!1),
|
|
980
|
+
function ae() {
|
|
981
|
+
z || !N?.current || U || (W(!0), q(-1), N.current.focus(), w?.());
|
|
942
982
|
}
|
|
943
|
-
function
|
|
944
|
-
|
|
983
|
+
function oe() {
|
|
984
|
+
W(!1), q(-1), S && N.current && N.current.blur();
|
|
945
985
|
}
|
|
946
|
-
function
|
|
947
|
-
|
|
986
|
+
function Y(e) {
|
|
987
|
+
H(e), q(-1), b && b(e);
|
|
988
|
+
}
|
|
989
|
+
function se(e) {
|
|
990
|
+
ne(e) ? (te(""), x && x("")) : (te(e), x && x(e)), a && oe();
|
|
948
991
|
}
|
|
949
|
-
let
|
|
950
|
-
|
|
992
|
+
let X = n.filter((t) => !!(e.onSearch || !e.isSearchable || t.label.toLowerCase().includes(V.toLowerCase())));
|
|
993
|
+
function Z(e) {
|
|
994
|
+
if (z) return;
|
|
995
|
+
if (!U) {
|
|
996
|
+
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), ae(), e.key === "ArrowDown" && q(0));
|
|
997
|
+
return;
|
|
998
|
+
}
|
|
999
|
+
let t = e.target?.tagName === "INPUT", n = e.target?.tagName === "BUTTON";
|
|
1000
|
+
switch (e.key) {
|
|
1001
|
+
case "Escape":
|
|
1002
|
+
e.preventDefault(), oe(), P.current?.focus();
|
|
1003
|
+
break;
|
|
1004
|
+
case "ArrowDown":
|
|
1005
|
+
e.preventDefault(), q((e) => X.length === 0 ? -1 : e < 0 || e + 1 >= X.length ? 0 : e + 1);
|
|
1006
|
+
break;
|
|
1007
|
+
case "ArrowUp":
|
|
1008
|
+
e.preventDefault(), q((e) => X.length === 0 ? -1 : e < 0 || e - 1 < 0 ? X.length - 1 : e - 1);
|
|
1009
|
+
break;
|
|
1010
|
+
case " ":
|
|
1011
|
+
if (t || n) return;
|
|
1012
|
+
e.preventDefault(), K >= 0 && K < X.length && se(X[K].value);
|
|
1013
|
+
break;
|
|
1014
|
+
case "Enter":
|
|
1015
|
+
if (n) return;
|
|
1016
|
+
e.preventDefault(), K >= 0 && K < X.length && se(X[K].value);
|
|
1017
|
+
break;
|
|
1018
|
+
default: break;
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
let ce = K >= 0 && K < X.length ? ie(X[K].value) : void 0;
|
|
1022
|
+
return /* @__PURE__ */ p(et, {
|
|
951
1023
|
name: t,
|
|
952
1024
|
label: _,
|
|
953
1025
|
showAsterisk: v,
|
|
954
1026
|
className: r,
|
|
955
|
-
errorMessage:
|
|
1027
|
+
errorMessage: R,
|
|
956
1028
|
unShowFieldTemplate: j,
|
|
957
1029
|
orientation: A,
|
|
958
|
-
children: /* @__PURE__ */ m(
|
|
959
|
-
handleContainerFocus:
|
|
960
|
-
disabled:
|
|
961
|
-
isError:
|
|
962
|
-
isFocused:
|
|
1030
|
+
children: /* @__PURE__ */ m(nt, {
|
|
1031
|
+
handleContainerFocus: ae,
|
|
1032
|
+
disabled: z,
|
|
1033
|
+
isError: ee,
|
|
1034
|
+
isFocused: U,
|
|
963
1035
|
isLoading: d,
|
|
964
1036
|
readOnly: f,
|
|
965
1037
|
size: D,
|
|
966
1038
|
variant: k,
|
|
967
1039
|
prefixExists: !!E,
|
|
968
|
-
id:
|
|
1040
|
+
id: I,
|
|
1041
|
+
containerRef: P,
|
|
1042
|
+
onContainerKeyDown: Z,
|
|
1043
|
+
tabIndex: z ? -1 : 0,
|
|
1044
|
+
ariaControls: L,
|
|
1045
|
+
ariaActiveDescendant: ce,
|
|
969
1046
|
children: [
|
|
970
1047
|
/* @__PURE__ */ p("input", {
|
|
971
1048
|
ref: N,
|
|
972
1049
|
name: t,
|
|
973
|
-
value:
|
|
1050
|
+
value: J,
|
|
974
1051
|
type: "hidden"
|
|
975
1052
|
}),
|
|
976
|
-
/* @__PURE__ */ p(
|
|
977
|
-
iconSize:
|
|
1053
|
+
/* @__PURE__ */ p($, {
|
|
1054
|
+
iconSize: B,
|
|
978
1055
|
icon: E,
|
|
979
1056
|
className: "prefix"
|
|
980
1057
|
}),
|
|
981
1058
|
y && /* @__PURE__ */ p(y, {
|
|
982
|
-
size:
|
|
1059
|
+
size: B,
|
|
983
1060
|
strokeWidth: 2.5
|
|
984
1061
|
}),
|
|
985
|
-
/* @__PURE__ */ m(
|
|
1062
|
+
/* @__PURE__ */ m(rt, {
|
|
986
1063
|
size: D,
|
|
987
|
-
children: [
|
|
1064
|
+
children: [J !== "" && /* @__PURE__ */ p("p", {
|
|
988
1065
|
className: "hasValue",
|
|
989
|
-
children:
|
|
990
|
-
}),
|
|
1066
|
+
children: re(J)
|
|
1067
|
+
}), J === "" && /* @__PURE__ */ p("p", { children: i })]
|
|
991
1068
|
}),
|
|
992
|
-
/* @__PURE__ */ m(
|
|
993
|
-
|
|
1069
|
+
/* @__PURE__ */ m(lt, {
|
|
1070
|
+
id: L,
|
|
1071
|
+
isFocused: U,
|
|
994
1072
|
isSearchable: h,
|
|
995
|
-
search:
|
|
996
|
-
onSearch:
|
|
997
|
-
children: [
|
|
1073
|
+
search: V,
|
|
1074
|
+
onSearch: Y,
|
|
1075
|
+
children: [X.map(({ label: e, value: t }, n) => /* @__PURE__ */ p(it, {
|
|
1076
|
+
id: ie(t),
|
|
998
1077
|
label: e,
|
|
999
1078
|
value: t,
|
|
1000
1079
|
size: D,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1080
|
+
isHighlighted: n === K,
|
|
1081
|
+
handleChangeValue: se,
|
|
1082
|
+
optionHasSelected: ne
|
|
1083
|
+
}, t)), X.length <= 0 && /* @__PURE__ */ p("p", { children: C })]
|
|
1004
1084
|
}),
|
|
1005
|
-
/* @__PURE__ */ p(
|
|
1006
|
-
disabled:
|
|
1007
|
-
isFocused:
|
|
1085
|
+
/* @__PURE__ */ p(tt, {
|
|
1086
|
+
disabled: z,
|
|
1087
|
+
isFocused: U,
|
|
1008
1088
|
readOnly: f,
|
|
1009
|
-
iconSize:
|
|
1089
|
+
iconSize: B,
|
|
1010
1090
|
isLoading: d
|
|
1011
1091
|
}),
|
|
1012
|
-
/* @__PURE__ */ p(
|
|
1013
|
-
iconSize:
|
|
1092
|
+
/* @__PURE__ */ p(dt, {
|
|
1093
|
+
iconSize: B,
|
|
1014
1094
|
isLoading: d
|
|
1015
1095
|
}),
|
|
1016
|
-
/* @__PURE__ */ p(
|
|
1017
|
-
handleBlur:
|
|
1018
|
-
isFocused:
|
|
1096
|
+
/* @__PURE__ */ p(ut, {
|
|
1097
|
+
handleBlur: oe,
|
|
1098
|
+
isFocused: U
|
|
1019
1099
|
})
|
|
1020
1100
|
]
|
|
1021
1101
|
})
|
|
@@ -1023,7 +1103,7 @@ function ut(e) {
|
|
|
1023
1103
|
}
|
|
1024
1104
|
//#endregion
|
|
1025
1105
|
//#region src/components/calendar/calendarHeader/index.tsx
|
|
1026
|
-
function
|
|
1106
|
+
function pt({ basicMode: e }) {
|
|
1027
1107
|
let t = Xe();
|
|
1028
1108
|
return e ? /* @__PURE__ */ m("div", {
|
|
1029
1109
|
className: "arkynCalendarHeader",
|
|
@@ -1054,14 +1134,14 @@ function dt({ basicMode: e }) {
|
|
|
1054
1134
|
className: "arkynCalendarButton",
|
|
1055
1135
|
onClick: () => t.nextMonth(),
|
|
1056
1136
|
children: /* @__PURE__ */ p(T, {})
|
|
1057
|
-
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(
|
|
1137
|
+
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(ft, {
|
|
1058
1138
|
name: "calendarMonth",
|
|
1059
1139
|
variant: "underline",
|
|
1060
1140
|
className: "calendarMonthSelect",
|
|
1061
1141
|
value: t.currentMonth,
|
|
1062
1142
|
options: t.listMonths,
|
|
1063
1143
|
onChange: (e) => t.changeMonth(+e)
|
|
1064
|
-
}), /* @__PURE__ */ p(
|
|
1144
|
+
}), /* @__PURE__ */ p(ft, {
|
|
1065
1145
|
name: "calendarYear",
|
|
1066
1146
|
variant: "underline",
|
|
1067
1147
|
className: "calendarYearSelect",
|
|
@@ -1073,32 +1153,37 @@ function dt({ basicMode: e }) {
|
|
|
1073
1153
|
}
|
|
1074
1154
|
//#endregion
|
|
1075
1155
|
//#region src/components/calendar/calendarTableTd/index.tsx
|
|
1076
|
-
function
|
|
1156
|
+
function mt(e) {
|
|
1077
1157
|
let { day: t, month: n, year: r, dayOwner: i, dayType: a } = e, { changeDay: o } = Xe();
|
|
1078
1158
|
function s() {
|
|
1079
1159
|
let e = /* @__PURE__ */ new Date();
|
|
1080
1160
|
return t === e.getDate() && n === e.getMonth() && r === e.getFullYear();
|
|
1081
1161
|
}
|
|
1162
|
+
function c() {
|
|
1163
|
+
o(t, n, r);
|
|
1164
|
+
}
|
|
1082
1165
|
return /* @__PURE__ */ p("td", {
|
|
1083
|
-
onClick: () => o(t, n, r),
|
|
1084
1166
|
className: `arkynCalendarTableTd ${i} ${a} ${s() ? "today" : ""}`,
|
|
1085
|
-
children: /* @__PURE__ */ m("
|
|
1167
|
+
children: /* @__PURE__ */ m("button", {
|
|
1168
|
+
type: "button",
|
|
1086
1169
|
className: "textGroup",
|
|
1170
|
+
"aria-pressed": a === "checkedDay",
|
|
1171
|
+
onClick: c,
|
|
1087
1172
|
children: [/* @__PURE__ */ p("span", {}), /* @__PURE__ */ p("p", { children: t })]
|
|
1088
1173
|
})
|
|
1089
1174
|
});
|
|
1090
1175
|
}
|
|
1091
1176
|
//#endregion
|
|
1092
1177
|
//#region src/components/calendar/calendarTableBody/index.tsx
|
|
1093
|
-
function
|
|
1178
|
+
function ht() {
|
|
1094
1179
|
return /* @__PURE__ */ p("tbody", {
|
|
1095
1180
|
className: "arkynCalendarTableBody",
|
|
1096
|
-
children: Xe().listMatrix.map((e, t) => /* @__PURE__ */ p("tr", { children: e.map((e, n) => /* @__PURE__ */ p(
|
|
1181
|
+
children: Xe().listMatrix.map((e, t) => /* @__PURE__ */ p("tr", { children: e.map((e, n) => /* @__PURE__ */ p(mt, { ...e }, `day-${t}-${n}`)) }, `week-${t}`))
|
|
1097
1182
|
});
|
|
1098
1183
|
}
|
|
1099
1184
|
//#endregion
|
|
1100
1185
|
//#region src/components/calendar/calendarTableContainer/index.tsx
|
|
1101
|
-
function
|
|
1186
|
+
function gt({ children: e }) {
|
|
1102
1187
|
return /* @__PURE__ */ p("table", {
|
|
1103
1188
|
className: "arkynCalendarTableContainer",
|
|
1104
1189
|
children: e
|
|
@@ -1106,7 +1191,7 @@ function mt({ children: e }) {
|
|
|
1106
1191
|
}
|
|
1107
1192
|
//#endregion
|
|
1108
1193
|
//#region src/components/calendar/calendarTableHeader/index.tsx
|
|
1109
|
-
function
|
|
1194
|
+
function _t() {
|
|
1110
1195
|
let { listWeek: e } = Xe();
|
|
1111
1196
|
return /* @__PURE__ */ p("thead", {
|
|
1112
1197
|
className: "arkynCalendarTableHeader",
|
|
@@ -1115,9 +1200,9 @@ function ht() {
|
|
|
1115
1200
|
}
|
|
1116
1201
|
//#endregion
|
|
1117
1202
|
//#region src/components/calendar/index.tsx
|
|
1118
|
-
function
|
|
1203
|
+
function vt(e) {
|
|
1119
1204
|
let t = e.variant || "complete";
|
|
1120
|
-
return e.type === "range" ? /* @__PURE__ */ p(
|
|
1205
|
+
return e.type === "range" ? /* @__PURE__ */ p(Qe, {
|
|
1121
1206
|
value: e.value,
|
|
1122
1207
|
viewValue: e.viewValue,
|
|
1123
1208
|
defaultViewValue: e.defaultViewValue,
|
|
@@ -1125,8 +1210,8 @@ function gt(e) {
|
|
|
1125
1210
|
calendarType: "range",
|
|
1126
1211
|
onChange: e.onChange,
|
|
1127
1212
|
onChangeView: e.onChangeView,
|
|
1128
|
-
children: /* @__PURE__ */ m(
|
|
1129
|
-
}) : /* @__PURE__ */ p(
|
|
1213
|
+
children: /* @__PURE__ */ m($e, { children: [/* @__PURE__ */ p(pt, { basicMode: t.includes("basic") }), /* @__PURE__ */ m(gt, { children: [/* @__PURE__ */ p(_t, {}), /* @__PURE__ */ p(ht, {})] })] })
|
|
1214
|
+
}) : /* @__PURE__ */ p(Qe, {
|
|
1130
1215
|
value: e.value,
|
|
1131
1216
|
viewValue: e.viewValue,
|
|
1132
1217
|
defaultViewValue: e.defaultViewValue,
|
|
@@ -1134,16 +1219,16 @@ function gt(e) {
|
|
|
1134
1219
|
calendarType: "single",
|
|
1135
1220
|
onChange: e.onChange,
|
|
1136
1221
|
onChangeView: e.onChangeView,
|
|
1137
|
-
children: /* @__PURE__ */ m(
|
|
1222
|
+
children: /* @__PURE__ */ m($e, { children: [/* @__PURE__ */ p(pt, { basicMode: t.includes("basic") }), /* @__PURE__ */ m(gt, { children: [/* @__PURE__ */ p(_t, {}), /* @__PURE__ */ p(ht, {})] })] })
|
|
1138
1223
|
});
|
|
1139
1224
|
}
|
|
1140
1225
|
//#endregion
|
|
1141
1226
|
//#region src/components/cardTab/cardTabContext.tsx
|
|
1142
|
-
var
|
|
1143
|
-
function
|
|
1144
|
-
return a(
|
|
1227
|
+
var yt = n({});
|
|
1228
|
+
function bt() {
|
|
1229
|
+
return a(yt);
|
|
1145
1230
|
}
|
|
1146
|
-
function
|
|
1231
|
+
function xt(e) {
|
|
1147
1232
|
let { disabled: t, currentTab: n, changeCurrentTab: r } = e, i = c(() => ({
|
|
1148
1233
|
disabled: t,
|
|
1149
1234
|
currentTab: n,
|
|
@@ -1153,15 +1238,15 @@ function yt(e) {
|
|
|
1153
1238
|
n,
|
|
1154
1239
|
r
|
|
1155
1240
|
]);
|
|
1156
|
-
return /* @__PURE__ */ p(
|
|
1241
|
+
return /* @__PURE__ */ p(yt.Provider, {
|
|
1157
1242
|
value: i,
|
|
1158
1243
|
children: e.children
|
|
1159
1244
|
});
|
|
1160
1245
|
}
|
|
1161
1246
|
//#endregion
|
|
1162
1247
|
//#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 } =
|
|
1248
|
+
function St(e) {
|
|
1249
|
+
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } = bt(), u = s || n, d = `arkynCardTabButton ${u ? "isDisabled" : ""} ${c === a && a ? "isActive" : ""} ${r}`;
|
|
1165
1250
|
function f(e) {
|
|
1166
1251
|
l(a), i?.(e);
|
|
1167
1252
|
}
|
|
@@ -1176,12 +1261,12 @@ function bt(e) {
|
|
|
1176
1261
|
}
|
|
1177
1262
|
//#endregion
|
|
1178
1263
|
//#region src/components/cardTab/cardTabContainer/index.tsx
|
|
1179
|
-
function
|
|
1264
|
+
function Ct(e) {
|
|
1180
1265
|
let { children: t, onChange: n, defaultValue: r, disabled: i = !1, className: a, ...o } = e, [s, c] = u(r || ""), l = `arkynCardTabContainer ${a || ""}`;
|
|
1181
1266
|
function d(e) {
|
|
1182
1267
|
c(e), n && n(e);
|
|
1183
1268
|
}
|
|
1184
|
-
return /* @__PURE__ */ p(
|
|
1269
|
+
return /* @__PURE__ */ p(xt, {
|
|
1185
1270
|
disabled: i,
|
|
1186
1271
|
currentTab: s,
|
|
1187
1272
|
changeCurrentTab: d,
|
|
@@ -1194,13 +1279,13 @@ function xt(e) {
|
|
|
1194
1279
|
}
|
|
1195
1280
|
//#endregion
|
|
1196
1281
|
//#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 } =
|
|
1282
|
+
function wt(e) {
|
|
1283
|
+
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 } = Q(), 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
1284
|
function j() {
|
|
1200
1285
|
let e = D;
|
|
1201
1286
|
O(!e), f?.(e ? "" : v || "checked");
|
|
1202
1287
|
}
|
|
1203
|
-
return /* @__PURE__ */ p(
|
|
1288
|
+
return /* @__PURE__ */ p(et, {
|
|
1204
1289
|
name: n,
|
|
1205
1290
|
label: c,
|
|
1206
1291
|
showAsterisk: g,
|
|
@@ -1225,38 +1310,38 @@ function St(e) {
|
|
|
1225
1310
|
}
|
|
1226
1311
|
//#endregion
|
|
1227
1312
|
//#region src/hooks/useHydrated.ts
|
|
1228
|
-
function
|
|
1313
|
+
function Tt() {
|
|
1229
1314
|
return () => {};
|
|
1230
1315
|
}
|
|
1231
|
-
function
|
|
1232
|
-
return d(
|
|
1316
|
+
function Et() {
|
|
1317
|
+
return d(Tt, () => !0, () => !1);
|
|
1233
1318
|
}
|
|
1234
1319
|
//#endregion
|
|
1235
1320
|
//#region src/components/clientOnly.tsx
|
|
1236
|
-
function
|
|
1321
|
+
function Dt(e) {
|
|
1237
1322
|
let { children: t, fallback: n = null } = e;
|
|
1238
|
-
return
|
|
1323
|
+
return Et() ? t() : n;
|
|
1239
1324
|
}
|
|
1240
1325
|
//#endregion
|
|
1241
1326
|
//#region src/services/maskCurrencyValues.ts
|
|
1242
|
-
function
|
|
1327
|
+
function Ot(e) {
|
|
1243
1328
|
let t = e;
|
|
1244
1329
|
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
1330
|
}
|
|
1246
|
-
function
|
|
1331
|
+
function kt(e, t) {
|
|
1247
1332
|
if (!e) return [0, ne(0, t)];
|
|
1248
|
-
let n =
|
|
1333
|
+
let n = Ot(e);
|
|
1249
1334
|
return [n, ne(n, t)];
|
|
1250
1335
|
}
|
|
1251
1336
|
//#endregion
|
|
1252
1337
|
//#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 } =
|
|
1338
|
+
function At(e) {
|
|
1339
|
+
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 } = Q(), [F, I] = u(!1), [L, ee] = u("0"), z = l(null), B = s(), V = M || B, H = E || P?.[t], U = !!H, W = n || x, G = {
|
|
1255
1340
|
md: 20,
|
|
1256
1341
|
lg: 20
|
|
1257
|
-
}[j],
|
|
1342
|
+
}[j], te = A ? "right" : "left", K = te === "left" && x, q = te === "right" && x;
|
|
1258
1343
|
function J() {
|
|
1259
|
-
|
|
1344
|
+
W || !z?.current || (I(!0), z.current.focus());
|
|
1260
1345
|
}
|
|
1261
1346
|
function ne(e) {
|
|
1262
1347
|
I(!0), w && w(e);
|
|
@@ -1265,54 +1350,54 @@ function Ot(e) {
|
|
|
1265
1350
|
I(!1), T && T(e);
|
|
1266
1351
|
}
|
|
1267
1352
|
let ie = (e) => {
|
|
1268
|
-
let [t, n] =
|
|
1269
|
-
return !g || t <= g ? (
|
|
1353
|
+
let [t, n] = kt(e, _);
|
|
1354
|
+
return !g || t <= g ? (ee(n), [t, n]) : kt(e, _);
|
|
1270
1355
|
};
|
|
1271
1356
|
return o(() => {
|
|
1272
1357
|
function e() {
|
|
1273
1358
|
if (typeof f == "number") return f;
|
|
1274
1359
|
if (typeof h == "number") return h;
|
|
1275
1360
|
}
|
|
1276
|
-
let [, t] =
|
|
1277
|
-
|
|
1361
|
+
let [, t] = kt(e(), _);
|
|
1362
|
+
ee(t);
|
|
1278
1363
|
}, [
|
|
1279
1364
|
_,
|
|
1280
1365
|
h,
|
|
1281
1366
|
f
|
|
1282
|
-
]), /* @__PURE__ */ p(
|
|
1367
|
+
]), /* @__PURE__ */ p(et, {
|
|
1283
1368
|
name: t,
|
|
1284
1369
|
label: c,
|
|
1285
1370
|
showAsterisk: k,
|
|
1286
1371
|
className: d,
|
|
1287
|
-
errorMessage:
|
|
1372
|
+
errorMessage: H,
|
|
1288
1373
|
unShowFieldTemplate: D,
|
|
1289
1374
|
orientation: O,
|
|
1290
1375
|
children: /* @__PURE__ */ m("section", {
|
|
1291
1376
|
title: r,
|
|
1292
1377
|
style: i,
|
|
1293
|
-
className: `arkynCurrencyInput ${y ? "hasPrefix" : ""} ${b ? "hasSuffix" : ""} ${a} ${j} ${
|
|
1378
|
+
className: `arkynCurrencyInput ${y ? "hasPrefix" : ""} ${b ? "hasSuffix" : ""} ${a} ${j} ${W || C || x ? "opacity" : ""} ${U ? "errored" : ""} ${F ? "focused" : ""}`,
|
|
1294
1379
|
onClick: J,
|
|
1295
1380
|
children: [
|
|
1296
|
-
/* @__PURE__ */ p(
|
|
1297
|
-
iconSize:
|
|
1381
|
+
/* @__PURE__ */ p($, {
|
|
1382
|
+
iconSize: G,
|
|
1298
1383
|
icon: y,
|
|
1299
1384
|
className: "prefix"
|
|
1300
1385
|
}),
|
|
1301
|
-
/* @__PURE__ */ p(
|
|
1302
|
-
show:
|
|
1303
|
-
iconSize:
|
|
1386
|
+
/* @__PURE__ */ p($, {
|
|
1387
|
+
show: K,
|
|
1388
|
+
iconSize: G,
|
|
1304
1389
|
className: "spinner",
|
|
1305
1390
|
icon: R
|
|
1306
1391
|
}),
|
|
1307
|
-
/* @__PURE__ */ p(
|
|
1392
|
+
/* @__PURE__ */ p($, {
|
|
1308
1393
|
show: !x,
|
|
1309
1394
|
icon: S,
|
|
1310
|
-
iconSize:
|
|
1395
|
+
iconSize: G
|
|
1311
1396
|
}),
|
|
1312
1397
|
/* @__PURE__ */ p("input", {
|
|
1313
|
-
disabled:
|
|
1398
|
+
disabled: W,
|
|
1314
1399
|
readOnly: C,
|
|
1315
|
-
ref:
|
|
1400
|
+
ref: z,
|
|
1316
1401
|
onFocus: ne,
|
|
1317
1402
|
onBlur: re,
|
|
1318
1403
|
onChange: (e) => {
|
|
@@ -1320,30 +1405,30 @@ function Ot(e) {
|
|
|
1320
1405
|
let [t, n] = ie(e.target.value);
|
|
1321
1406
|
v?.(e, String(t), String(n));
|
|
1322
1407
|
},
|
|
1323
|
-
id:
|
|
1324
|
-
placeholder:
|
|
1325
|
-
value:
|
|
1408
|
+
id: V,
|
|
1409
|
+
placeholder: W ? L : void 0,
|
|
1410
|
+
value: W ? void 0 : L,
|
|
1326
1411
|
...N
|
|
1327
1412
|
}),
|
|
1328
1413
|
/* @__PURE__ */ p("input", {
|
|
1329
1414
|
type: "hidden",
|
|
1330
1415
|
name: t,
|
|
1331
|
-
value:
|
|
1416
|
+
value: Ot(L),
|
|
1332
1417
|
readOnly: !0
|
|
1333
1418
|
}),
|
|
1334
|
-
/* @__PURE__ */ p(
|
|
1419
|
+
/* @__PURE__ */ p($, {
|
|
1335
1420
|
show: !x,
|
|
1336
1421
|
icon: A,
|
|
1337
|
-
iconSize:
|
|
1422
|
+
iconSize: G
|
|
1338
1423
|
}),
|
|
1339
|
-
/* @__PURE__ */ p(
|
|
1340
|
-
show:
|
|
1341
|
-
iconSize:
|
|
1424
|
+
/* @__PURE__ */ p($, {
|
|
1425
|
+
show: q,
|
|
1426
|
+
iconSize: G,
|
|
1342
1427
|
className: "spinner",
|
|
1343
1428
|
icon: R
|
|
1344
1429
|
}),
|
|
1345
|
-
/* @__PURE__ */ p(
|
|
1346
|
-
iconSize:
|
|
1430
|
+
/* @__PURE__ */ p($, {
|
|
1431
|
+
iconSize: G,
|
|
1347
1432
|
icon: b,
|
|
1348
1433
|
className: "suffix"
|
|
1349
1434
|
})
|
|
@@ -1353,25 +1438,20 @@ function Ot(e) {
|
|
|
1353
1438
|
}
|
|
1354
1439
|
//#endregion
|
|
1355
1440
|
//#region src/components/datePicker/datePickerCalendarContainer/index.tsx
|
|
1356
|
-
function
|
|
1357
|
-
let { children: t,
|
|
1358
|
-
return
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
window.innerHeight - t.bottom < 420 && t.top > 420 ? a("top") : a("bottom");
|
|
1365
|
-
})();
|
|
1366
|
-
}, [n]), n ? /* @__PURE__ */ p("div", {
|
|
1367
|
-
ref: r,
|
|
1368
|
-
className: `arkynDatePickerCalendarContainer ${i}`,
|
|
1441
|
+
function jt(e) {
|
|
1442
|
+
let { children: t, id: n, isFocused: r } = e, i = l(null), a = at(i, r, 420);
|
|
1443
|
+
return st(r), r ? /* @__PURE__ */ p("div", {
|
|
1444
|
+
ref: i,
|
|
1445
|
+
id: n,
|
|
1446
|
+
role: "dialog",
|
|
1447
|
+
"aria-modal": "false",
|
|
1448
|
+
className: `arkynDatePickerCalendarContainer ${a}`,
|
|
1369
1449
|
children: t
|
|
1370
1450
|
}) : null;
|
|
1371
1451
|
}
|
|
1372
1452
|
//#endregion
|
|
1373
1453
|
//#region src/components/datePicker/datePickerChevron/index.tsx
|
|
1374
|
-
function
|
|
1454
|
+
function Mt(e) {
|
|
1375
1455
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
1376
1456
|
return n ? null : /* @__PURE__ */ p(C, {
|
|
1377
1457
|
className: `arkynDatePickerChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -1386,18 +1466,25 @@ function At(e) {
|
|
|
1386
1466
|
}
|
|
1387
1467
|
//#endregion
|
|
1388
1468
|
//#region src/components/datePicker/datePickerContainer/index.tsx
|
|
1389
|
-
function
|
|
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
|
-
return /* @__PURE__ */ p("
|
|
1469
|
+
function Nt(e) {
|
|
1470
|
+
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, containerRef: m, onContainerKeyDown: h, tabIndex: g, ariaControls: _ } = e;
|
|
1471
|
+
return /* @__PURE__ */ p("div", {
|
|
1472
|
+
ref: m,
|
|
1392
1473
|
id: d,
|
|
1474
|
+
tabIndex: g,
|
|
1475
|
+
role: "combobox",
|
|
1476
|
+
"aria-haspopup": "dialog",
|
|
1477
|
+
"aria-expanded": o,
|
|
1478
|
+
"aria-controls": _,
|
|
1393
1479
|
className: `arkynDatePickerContainer ${f ? "hasPrefix" : ""} ${l} ${u} ${r || c || a ? "opacity" : ""} ${i ? "errored" : ""} ${o ? "focused" : ""} ${s}`,
|
|
1394
1480
|
onClick: n,
|
|
1481
|
+
onKeyDown: h,
|
|
1395
1482
|
children: t
|
|
1396
1483
|
});
|
|
1397
1484
|
}
|
|
1398
1485
|
//#endregion
|
|
1399
1486
|
//#region src/components/datePicker/datePickerContent/index.tsx
|
|
1400
|
-
function
|
|
1487
|
+
function Pt(e) {
|
|
1401
1488
|
let { children: t, size: n } = e;
|
|
1402
1489
|
return /* @__PURE__ */ p("div", {
|
|
1403
1490
|
className: `arkynDatePickerContent ${n}`,
|
|
@@ -1406,7 +1493,7 @@ function Mt(e) {
|
|
|
1406
1493
|
}
|
|
1407
1494
|
//#endregion
|
|
1408
1495
|
//#region src/components/datePicker/datePickerOverlay/index.tsx
|
|
1409
|
-
function
|
|
1496
|
+
function Ft(e) {
|
|
1410
1497
|
let { isFocused: t, handleBlur: n } = e;
|
|
1411
1498
|
return t ? /* @__PURE__ */ p("aside", {
|
|
1412
1499
|
className: "arkynDatePickerOverlay",
|
|
@@ -1415,7 +1502,7 @@ function Nt(e) {
|
|
|
1415
1502
|
}
|
|
1416
1503
|
//#endregion
|
|
1417
1504
|
//#region src/components/datePicker/datePickerSpinner/index.tsx
|
|
1418
|
-
function
|
|
1505
|
+
function It(e) {
|
|
1419
1506
|
let { iconSize: t, isLoading: n } = e;
|
|
1420
1507
|
return n ? /* @__PURE__ */ p(R, {
|
|
1421
1508
|
className: "arkynDatePickerSpinner",
|
|
@@ -1425,51 +1512,64 @@ function Pt(e) {
|
|
|
1425
1512
|
}
|
|
1426
1513
|
//#endregion
|
|
1427
1514
|
//#region src/components/datePicker/index.tsx
|
|
1428
|
-
function
|
|
1515
|
+
function Lt(e) {
|
|
1429
1516
|
let t = (e) => String(e).padStart(2, "0");
|
|
1430
1517
|
return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())}`;
|
|
1431
1518
|
}
|
|
1432
|
-
function
|
|
1519
|
+
function Rt(e) {
|
|
1433
1520
|
return e.toLocaleDateString("pt-BR");
|
|
1434
1521
|
}
|
|
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 } =
|
|
1522
|
+
function zt(e) {
|
|
1523
|
+
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 } = Q(), O = l(null), k = l(null), A = s(), j = c || A, M = `${j}-calendar`, N = i || D?.[t], P = !!N, F = v || a || o, I = {
|
|
1437
1524
|
md: 20,
|
|
1438
1525
|
lg: 20
|
|
1439
|
-
}[b], [
|
|
1440
|
-
function V() {
|
|
1441
|
-
N || !O?.current || F || (I(!0), O.current.focus(), g?.());
|
|
1442
|
-
}
|
|
1526
|
+
}[b], [L, R] = u(!1), [ee, z] = u(e.type === "single" ? e.defaultValue : void 0), [B, V] = u(e.type === "range" ? e.defaultValue : void 0);
|
|
1443
1527
|
function H() {
|
|
1444
|
-
|
|
1528
|
+
F || !O?.current || L || (R(!0), O.current.focus(), g?.());
|
|
1445
1529
|
}
|
|
1446
|
-
function U(
|
|
1447
|
-
|
|
1530
|
+
function U() {
|
|
1531
|
+
R(!1), _ && O.current && O.current.blur();
|
|
1448
1532
|
}
|
|
1449
|
-
function W(
|
|
1450
|
-
|
|
1533
|
+
function W(e) {
|
|
1534
|
+
if (!F) {
|
|
1535
|
+
if (!L) {
|
|
1536
|
+
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), H());
|
|
1537
|
+
return;
|
|
1538
|
+
}
|
|
1539
|
+
e.key === "Escape" && (e.preventDefault(), U(), k.current?.focus());
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
function G(t) {
|
|
1543
|
+
x === void 0 && z(t), e.type === "single" && e.onChange?.(t), E && U();
|
|
1544
|
+
}
|
|
1545
|
+
function te(t) {
|
|
1546
|
+
x === void 0 && V(t), e.type === "range" && e.onChange?.(t), E && U();
|
|
1451
1547
|
}
|
|
1452
1548
|
if (e.type === "range") {
|
|
1453
|
-
let i = e.rangeSeparator ?? " até ", s = x === void 0 ?
|
|
1454
|
-
return /* @__PURE__ */ p(
|
|
1549
|
+
let i = e.rangeSeparator ?? " até ", s = x === void 0 ? B : x, c = s ? JSON.stringify([Lt(s[0]), Lt(s[1])]) : "";
|
|
1550
|
+
return /* @__PURE__ */ p(et, {
|
|
1455
1551
|
name: t,
|
|
1456
1552
|
label: d,
|
|
1457
1553
|
showAsterisk: f,
|
|
1458
1554
|
className: n,
|
|
1459
|
-
errorMessage:
|
|
1555
|
+
errorMessage: N,
|
|
1460
1556
|
unShowFieldTemplate: w,
|
|
1461
1557
|
orientation: C,
|
|
1462
|
-
children: /* @__PURE__ */ m(
|
|
1463
|
-
handleContainerFocus:
|
|
1464
|
-
disabled:
|
|
1465
|
-
isError:
|
|
1466
|
-
isFocused:
|
|
1558
|
+
children: /* @__PURE__ */ m(Nt, {
|
|
1559
|
+
handleContainerFocus: H,
|
|
1560
|
+
disabled: F,
|
|
1561
|
+
isError: P,
|
|
1562
|
+
isFocused: L,
|
|
1467
1563
|
isLoading: a,
|
|
1468
1564
|
readOnly: o,
|
|
1469
1565
|
size: b,
|
|
1470
1566
|
variant: S,
|
|
1471
1567
|
prefixExists: !!y,
|
|
1472
|
-
id:
|
|
1568
|
+
id: j,
|
|
1569
|
+
containerRef: k,
|
|
1570
|
+
onContainerKeyDown: W,
|
|
1571
|
+
tabIndex: F ? -1 : 0,
|
|
1572
|
+
ariaControls: M,
|
|
1473
1573
|
children: [
|
|
1474
1574
|
/* @__PURE__ */ p("input", {
|
|
1475
1575
|
ref: O,
|
|
@@ -1477,169 +1577,235 @@ function Lt(e) {
|
|
|
1477
1577
|
value: c,
|
|
1478
1578
|
type: "hidden"
|
|
1479
1579
|
}),
|
|
1480
|
-
/* @__PURE__ */ p(
|
|
1481
|
-
iconSize:
|
|
1580
|
+
/* @__PURE__ */ p($, {
|
|
1581
|
+
iconSize: I,
|
|
1482
1582
|
icon: y,
|
|
1483
1583
|
className: "prefix"
|
|
1484
1584
|
}),
|
|
1485
1585
|
h && /* @__PURE__ */ p(h, {
|
|
1486
|
-
size:
|
|
1586
|
+
size: I,
|
|
1487
1587
|
strokeWidth: 2.5
|
|
1488
1588
|
}),
|
|
1489
|
-
/* @__PURE__ */ p(
|
|
1589
|
+
/* @__PURE__ */ p(Pt, {
|
|
1490
1590
|
size: b,
|
|
1491
1591
|
children: s ? /* @__PURE__ */ m("p", {
|
|
1492
1592
|
className: "hasValue",
|
|
1493
1593
|
children: [
|
|
1494
|
-
|
|
1594
|
+
Rt(s[0]),
|
|
1495
1595
|
i,
|
|
1496
|
-
|
|
1596
|
+
Rt(s[1])
|
|
1497
1597
|
]
|
|
1498
1598
|
}) : /* @__PURE__ */ p("p", { children: r })
|
|
1499
1599
|
}),
|
|
1500
|
-
/* @__PURE__ */ p(
|
|
1501
|
-
|
|
1502
|
-
|
|
1600
|
+
/* @__PURE__ */ p(jt, {
|
|
1601
|
+
id: M,
|
|
1602
|
+
isFocused: L,
|
|
1603
|
+
children: /* @__PURE__ */ p(vt, {
|
|
1503
1604
|
type: "range",
|
|
1504
1605
|
variant: T,
|
|
1505
1606
|
value: s,
|
|
1506
|
-
onChange:
|
|
1607
|
+
onChange: te,
|
|
1507
1608
|
viewValue: e.viewValue,
|
|
1508
1609
|
defaultViewValue: e.defaultViewValue,
|
|
1509
1610
|
onChangeView: e.onChangeView
|
|
1510
1611
|
})
|
|
1511
1612
|
}),
|
|
1512
|
-
/* @__PURE__ */ p(
|
|
1513
|
-
disabled:
|
|
1514
|
-
isFocused:
|
|
1613
|
+
/* @__PURE__ */ p(Mt, {
|
|
1614
|
+
disabled: F,
|
|
1615
|
+
isFocused: L,
|
|
1515
1616
|
readOnly: o,
|
|
1516
|
-
iconSize:
|
|
1617
|
+
iconSize: I,
|
|
1517
1618
|
isLoading: a
|
|
1518
1619
|
}),
|
|
1519
|
-
/* @__PURE__ */ p(
|
|
1520
|
-
iconSize:
|
|
1620
|
+
/* @__PURE__ */ p(It, {
|
|
1621
|
+
iconSize: I,
|
|
1521
1622
|
isLoading: a
|
|
1522
1623
|
}),
|
|
1523
|
-
/* @__PURE__ */ p(
|
|
1524
|
-
handleBlur:
|
|
1525
|
-
isFocused:
|
|
1624
|
+
/* @__PURE__ */ p(Ft, {
|
|
1625
|
+
handleBlur: U,
|
|
1626
|
+
isFocused: L
|
|
1526
1627
|
})
|
|
1527
1628
|
]
|
|
1528
1629
|
})
|
|
1529
1630
|
});
|
|
1530
1631
|
}
|
|
1531
|
-
let
|
|
1532
|
-
return /* @__PURE__ */ p(
|
|
1632
|
+
let K = x === void 0 ? ee : x, q = K ? Lt(K) : "";
|
|
1633
|
+
return /* @__PURE__ */ p(et, {
|
|
1533
1634
|
name: t,
|
|
1534
1635
|
label: d,
|
|
1535
1636
|
showAsterisk: f,
|
|
1536
1637
|
className: n,
|
|
1537
|
-
errorMessage:
|
|
1638
|
+
errorMessage: N,
|
|
1538
1639
|
unShowFieldTemplate: w,
|
|
1539
1640
|
orientation: C,
|
|
1540
|
-
children: /* @__PURE__ */ m(
|
|
1541
|
-
handleContainerFocus:
|
|
1542
|
-
disabled:
|
|
1543
|
-
isError:
|
|
1544
|
-
isFocused:
|
|
1641
|
+
children: /* @__PURE__ */ m(Nt, {
|
|
1642
|
+
handleContainerFocus: H,
|
|
1643
|
+
disabled: F,
|
|
1644
|
+
isError: P,
|
|
1645
|
+
isFocused: L,
|
|
1545
1646
|
isLoading: a,
|
|
1546
1647
|
readOnly: o,
|
|
1547
1648
|
size: b,
|
|
1548
1649
|
variant: S,
|
|
1549
1650
|
prefixExists: !!y,
|
|
1550
|
-
id:
|
|
1651
|
+
id: j,
|
|
1652
|
+
containerRef: k,
|
|
1653
|
+
onContainerKeyDown: W,
|
|
1654
|
+
tabIndex: F ? -1 : 0,
|
|
1655
|
+
ariaControls: M,
|
|
1551
1656
|
children: [
|
|
1552
1657
|
/* @__PURE__ */ p("input", {
|
|
1553
1658
|
ref: O,
|
|
1554
1659
|
name: t,
|
|
1555
|
-
value:
|
|
1660
|
+
value: q,
|
|
1556
1661
|
type: "hidden"
|
|
1557
1662
|
}),
|
|
1558
|
-
/* @__PURE__ */ p(
|
|
1559
|
-
iconSize:
|
|
1663
|
+
/* @__PURE__ */ p($, {
|
|
1664
|
+
iconSize: I,
|
|
1560
1665
|
icon: y,
|
|
1561
1666
|
className: "prefix"
|
|
1562
1667
|
}),
|
|
1563
1668
|
h && /* @__PURE__ */ p(h, {
|
|
1564
|
-
size:
|
|
1669
|
+
size: I,
|
|
1565
1670
|
strokeWidth: 2.5
|
|
1566
1671
|
}),
|
|
1567
|
-
/* @__PURE__ */ p(
|
|
1672
|
+
/* @__PURE__ */ p(Pt, {
|
|
1568
1673
|
size: b,
|
|
1569
|
-
children:
|
|
1674
|
+
children: K ? /* @__PURE__ */ p("p", {
|
|
1570
1675
|
className: "hasValue",
|
|
1571
|
-
children:
|
|
1676
|
+
children: Rt(K)
|
|
1572
1677
|
}) : /* @__PURE__ */ p("p", { children: r })
|
|
1573
1678
|
}),
|
|
1574
|
-
/* @__PURE__ */ p(
|
|
1575
|
-
|
|
1576
|
-
|
|
1679
|
+
/* @__PURE__ */ p(jt, {
|
|
1680
|
+
id: M,
|
|
1681
|
+
isFocused: L,
|
|
1682
|
+
children: /* @__PURE__ */ p(vt, {
|
|
1577
1683
|
type: "single",
|
|
1578
1684
|
variant: T,
|
|
1579
|
-
value:
|
|
1580
|
-
onChange:
|
|
1685
|
+
value: K,
|
|
1686
|
+
onChange: G,
|
|
1581
1687
|
viewValue: e.viewValue,
|
|
1582
1688
|
defaultViewValue: e.defaultViewValue,
|
|
1583
1689
|
onChangeView: e.onChangeView
|
|
1584
1690
|
})
|
|
1585
1691
|
}),
|
|
1586
|
-
/* @__PURE__ */ p(
|
|
1587
|
-
disabled:
|
|
1588
|
-
isFocused:
|
|
1692
|
+
/* @__PURE__ */ p(Mt, {
|
|
1693
|
+
disabled: F,
|
|
1694
|
+
isFocused: L,
|
|
1589
1695
|
readOnly: o,
|
|
1590
|
-
iconSize:
|
|
1696
|
+
iconSize: I,
|
|
1591
1697
|
isLoading: a
|
|
1592
1698
|
}),
|
|
1593
|
-
/* @__PURE__ */ p(
|
|
1594
|
-
iconSize:
|
|
1699
|
+
/* @__PURE__ */ p(It, {
|
|
1700
|
+
iconSize: I,
|
|
1595
1701
|
isLoading: a
|
|
1596
1702
|
}),
|
|
1597
|
-
/* @__PURE__ */ p(
|
|
1598
|
-
handleBlur:
|
|
1599
|
-
isFocused:
|
|
1703
|
+
/* @__PURE__ */ p(Ft, {
|
|
1704
|
+
handleBlur: U,
|
|
1705
|
+
isFocused: L
|
|
1600
1706
|
})
|
|
1601
1707
|
]
|
|
1602
1708
|
})
|
|
1603
1709
|
});
|
|
1604
1710
|
}
|
|
1605
1711
|
//#endregion
|
|
1712
|
+
//#region src/hooks/useEscapeKey.ts
|
|
1713
|
+
function Bt(e, t) {
|
|
1714
|
+
let n = l(t);
|
|
1715
|
+
n.current = t, o(() => {
|
|
1716
|
+
if (!e) return;
|
|
1717
|
+
function t(e) {
|
|
1718
|
+
e.key === "Escape" && n.current();
|
|
1719
|
+
}
|
|
1720
|
+
return document.addEventListener("keydown", t), () => {
|
|
1721
|
+
document.removeEventListener("keydown", t);
|
|
1722
|
+
};
|
|
1723
|
+
}, [e]);
|
|
1724
|
+
}
|
|
1725
|
+
//#endregion
|
|
1726
|
+
//#region src/hooks/useFocusTrap.ts
|
|
1727
|
+
var Vt = [
|
|
1728
|
+
"a[href]",
|
|
1729
|
+
"area[href]",
|
|
1730
|
+
"button:not([disabled])",
|
|
1731
|
+
"input:not([disabled])",
|
|
1732
|
+
"select:not([disabled])",
|
|
1733
|
+
"textarea:not([disabled])",
|
|
1734
|
+
"iframe",
|
|
1735
|
+
"[tabindex]:not([tabindex='-1'])"
|
|
1736
|
+
].join(", ");
|
|
1737
|
+
function Ht(e) {
|
|
1738
|
+
return Array.from(e.querySelectorAll(Vt));
|
|
1739
|
+
}
|
|
1740
|
+
function Ut(e, t) {
|
|
1741
|
+
let n = l(null);
|
|
1742
|
+
o(() => {
|
|
1743
|
+
if (!e) return;
|
|
1744
|
+
let r = t.current;
|
|
1745
|
+
if (!r) return;
|
|
1746
|
+
let i = r;
|
|
1747
|
+
n.current = document.activeElement;
|
|
1748
|
+
let [a] = Ht(i);
|
|
1749
|
+
(a ?? i).focus();
|
|
1750
|
+
function o(e) {
|
|
1751
|
+
if (e.key !== "Tab") return;
|
|
1752
|
+
let t = Ht(i);
|
|
1753
|
+
if (t.length === 0) {
|
|
1754
|
+
e.preventDefault(), i.focus();
|
|
1755
|
+
return;
|
|
1756
|
+
}
|
|
1757
|
+
let n = t[0], r = t[t.length - 1], a = document.activeElement;
|
|
1758
|
+
e.shiftKey && a === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && a === r && (e.preventDefault(), n.focus());
|
|
1759
|
+
}
|
|
1760
|
+
return document.addEventListener("keydown", o), () => {
|
|
1761
|
+
document.removeEventListener("keydown", o), n.current?.focus(), n.current = null;
|
|
1762
|
+
};
|
|
1763
|
+
}, [e, t]);
|
|
1764
|
+
}
|
|
1765
|
+
//#endregion
|
|
1606
1766
|
//#region src/components/drawer/drawerContext.tsx
|
|
1607
|
-
var
|
|
1608
|
-
function
|
|
1767
|
+
var Wt = n({});
|
|
1768
|
+
function Gt(e) {
|
|
1609
1769
|
let t = c(() => ({ makeInvisible: e.makeInvisible }), [e.makeInvisible]);
|
|
1610
|
-
return /* @__PURE__ */ p(
|
|
1770
|
+
return /* @__PURE__ */ p(Wt.Provider, {
|
|
1611
1771
|
value: t,
|
|
1612
1772
|
children: e.children
|
|
1613
1773
|
});
|
|
1614
1774
|
}
|
|
1615
|
-
function
|
|
1616
|
-
return a(
|
|
1775
|
+
function Kt() {
|
|
1776
|
+
return a(Wt);
|
|
1617
1777
|
}
|
|
1618
1778
|
//#endregion
|
|
1619
1779
|
//#region src/components/drawer/drawerContainer/index.tsx
|
|
1620
|
-
function
|
|
1621
|
-
let { isVisible: t, makeInvisible: n, orientation: r = "left", children: i, className: a, ...s } = e, [c,
|
|
1780
|
+
function qt(e) {
|
|
1781
|
+
let { isVisible: t, makeInvisible: n, orientation: r = "left", children: i, className: a, ...s } = e, [c, d] = u(t), [f, h] = u(!1), g = l(null);
|
|
1622
1782
|
o(() => {
|
|
1623
|
-
t ? (
|
|
1624
|
-
}, [t, c]),
|
|
1625
|
-
|
|
1626
|
-
|
|
1783
|
+
t ? (d(!0), h(!1)) : c && h(!0);
|
|
1784
|
+
}, [t, c]), st(t);
|
|
1785
|
+
let _ = c && !f;
|
|
1786
|
+
Bt(_, () => h(!0)), Ut(_, g);
|
|
1787
|
+
function v(e) {
|
|
1788
|
+
e.target === e.currentTarget && f && (h(!1), d(!1), n());
|
|
1627
1789
|
}
|
|
1628
|
-
return c ? /* @__PURE__ */ p(
|
|
1629
|
-
makeInvisible: () =>
|
|
1790
|
+
return c ? /* @__PURE__ */ p(Gt, {
|
|
1791
|
+
makeInvisible: () => h(!0),
|
|
1630
1792
|
children: /* @__PURE__ */ m("aside", {
|
|
1631
1793
|
className: [
|
|
1632
1794
|
"arkynDrawerContainer",
|
|
1633
1795
|
r,
|
|
1634
|
-
|
|
1796
|
+
f ? "exiting" : "",
|
|
1635
1797
|
a
|
|
1636
1798
|
].filter(Boolean).join(" "),
|
|
1637
1799
|
...s,
|
|
1638
1800
|
children: [/* @__PURE__ */ p("div", {
|
|
1639
1801
|
className: "arkynDrawerContainerOverlay",
|
|
1640
|
-
onClick: () =>
|
|
1641
|
-
onAnimationEnd:
|
|
1802
|
+
onClick: () => h(!0),
|
|
1803
|
+
onAnimationEnd: v
|
|
1642
1804
|
}), /* @__PURE__ */ p("div", {
|
|
1805
|
+
ref: g,
|
|
1806
|
+
role: "dialog",
|
|
1807
|
+
"aria-modal": "true",
|
|
1808
|
+
tabIndex: -1,
|
|
1643
1809
|
className: "arkynDrawerContainerContent",
|
|
1644
1810
|
children: i
|
|
1645
1811
|
})]
|
|
@@ -1648,8 +1814,8 @@ function Vt(e) {
|
|
|
1648
1814
|
}
|
|
1649
1815
|
//#endregion
|
|
1650
1816
|
//#region src/components/drawer/drawerHeader/index.tsx
|
|
1651
|
-
function
|
|
1652
|
-
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } =
|
|
1817
|
+
function Jt(e) {
|
|
1818
|
+
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } = Kt();
|
|
1653
1819
|
return /* @__PURE__ */ m("header", {
|
|
1654
1820
|
className: `arkynDrawerHeader ${n}`.trim(),
|
|
1655
1821
|
...i,
|
|
@@ -1658,18 +1824,18 @@ function Ht(e) {
|
|
|
1658
1824
|
type: "button",
|
|
1659
1825
|
onClick: a,
|
|
1660
1826
|
"aria-label": "Close drawer",
|
|
1661
|
-
children: /* @__PURE__ */ p(
|
|
1827
|
+
children: /* @__PURE__ */ p(te, { size: 24 })
|
|
1662
1828
|
})]
|
|
1663
1829
|
});
|
|
1664
1830
|
}
|
|
1665
1831
|
//#endregion
|
|
1666
1832
|
//#region src/components/facebookPixel/pixel.ts
|
|
1667
|
-
var
|
|
1833
|
+
var Yt = class {
|
|
1668
1834
|
pixelId;
|
|
1669
1835
|
autoConfig;
|
|
1670
1836
|
initialized;
|
|
1671
1837
|
constructor(e, t) {
|
|
1672
|
-
this.pixelId = e, this.autoConfig = t?.autoConfig
|
|
1838
|
+
this.pixelId = e, this.autoConfig = t?.autoConfig ?? !0, this.initialized = !1;
|
|
1673
1839
|
}
|
|
1674
1840
|
loadFacebookPixel() {
|
|
1675
1841
|
if (window.fbq) return;
|
|
@@ -1711,18 +1877,18 @@ var Ut = class {
|
|
|
1711
1877
|
};
|
|
1712
1878
|
//#endregion
|
|
1713
1879
|
//#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
|
|
1880
|
+
function Xt(e) {
|
|
1881
|
+
let { pixelId: t, options: n, pageView: r, track: i, trackCustom: a, trackSingle: o, trackSingleCustom: s, grantConsent: c, revokeConsent: l } = e, u = new Yt(t, n);
|
|
1716
1882
|
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
1883
|
}
|
|
1718
1884
|
//#endregion
|
|
1719
1885
|
//#region src/components/facebookPixel/index.tsx
|
|
1720
|
-
function
|
|
1721
|
-
return process.env.NODE_ENV !== "production" && !e.showInDevMode ? null : /* @__PURE__ */ p(
|
|
1886
|
+
function Zt(e) {
|
|
1887
|
+
return process.env.NODE_ENV !== "production" && !e.showInDevMode ? null : /* @__PURE__ */ p(Dt, { children: () => /* @__PURE__ */ p(Xt, { ...e }) });
|
|
1722
1888
|
}
|
|
1723
1889
|
//#endregion
|
|
1724
1890
|
//#region src/components/fileUpload/hasFileContent/index.tsx
|
|
1725
|
-
function
|
|
1891
|
+
function Qt(e) {
|
|
1726
1892
|
let { disabled: t, file: n, isLoading: r, acceptFile: i, changeFileButtonText: a, handleSelectFile: o, reSendFile: s } = e;
|
|
1727
1893
|
function c() {
|
|
1728
1894
|
if (t) return;
|
|
@@ -1756,10 +1922,10 @@ function Kt(e) {
|
|
|
1756
1922
|
size: "sm",
|
|
1757
1923
|
isLoading: r,
|
|
1758
1924
|
onClick: s,
|
|
1759
|
-
icon:
|
|
1925
|
+
icon: H,
|
|
1760
1926
|
disabled: t
|
|
1761
1927
|
})
|
|
1762
|
-
}), /* @__PURE__ */ p(
|
|
1928
|
+
}), /* @__PURE__ */ p(Be, {
|
|
1763
1929
|
isLoading: r,
|
|
1764
1930
|
onClick: c,
|
|
1765
1931
|
variant: "outline",
|
|
@@ -1774,7 +1940,7 @@ function Kt(e) {
|
|
|
1774
1940
|
}
|
|
1775
1941
|
//#endregion
|
|
1776
1942
|
//#region src/components/fileUpload/noFileContent/index.tsx
|
|
1777
|
-
function
|
|
1943
|
+
function $t(e) {
|
|
1778
1944
|
let { dropFileText: t, isLoading: n, acceptFile: r, handleSelectFile: i, selectFileButtonText: a, disabled: o } = e;
|
|
1779
1945
|
function s(e) {
|
|
1780
1946
|
if (o) return;
|
|
@@ -1793,7 +1959,7 @@ function qt(e) {
|
|
|
1793
1959
|
return /* @__PURE__ */ m("div", {
|
|
1794
1960
|
onDrop: s,
|
|
1795
1961
|
className: "arkynFileUploadNoFileContent",
|
|
1796
|
-
children: [/* @__PURE__ */ p(
|
|
1962
|
+
children: [/* @__PURE__ */ p(Be, {
|
|
1797
1963
|
isLoading: n,
|
|
1798
1964
|
onClick: c,
|
|
1799
1965
|
variant: "ghost",
|
|
@@ -1806,8 +1972,8 @@ function qt(e) {
|
|
|
1806
1972
|
}
|
|
1807
1973
|
//#endregion
|
|
1808
1974
|
//#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: _ } =
|
|
1975
|
+
function en(e) {
|
|
1976
|
+
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: _ } = Q(), v = _?.[t], [y, b] = u(""), [x, S] = u(""), [C, w] = u(null), [T, E] = u(!1);
|
|
1811
1977
|
async function D(e) {
|
|
1812
1978
|
if (g) return;
|
|
1813
1979
|
E(!0), w(e), S("");
|
|
@@ -1825,8 +1991,8 @@ function Jt(e) {
|
|
|
1825
1991
|
g || D(e);
|
|
1826
1992
|
}
|
|
1827
1993
|
let k = v || x;
|
|
1828
|
-
return /* @__PURE__ */ m(
|
|
1829
|
-
n && /* @__PURE__ */ p(
|
|
1994
|
+
return /* @__PURE__ */ m(ze, { children: [
|
|
1995
|
+
n && /* @__PURE__ */ p(Re, {
|
|
1830
1996
|
showAsterisk: r,
|
|
1831
1997
|
children: n
|
|
1832
1998
|
}),
|
|
@@ -1838,7 +2004,7 @@ function Jt(e) {
|
|
|
1838
2004
|
name: t,
|
|
1839
2005
|
value: y || ""
|
|
1840
2006
|
}),
|
|
1841
|
-
!C && /* @__PURE__ */ p(
|
|
2007
|
+
!C && /* @__PURE__ */ p($t, {
|
|
1842
2008
|
disabled: g,
|
|
1843
2009
|
isLoading: T,
|
|
1844
2010
|
acceptFile: s,
|
|
@@ -1846,7 +2012,7 @@ function Jt(e) {
|
|
|
1846
2012
|
handleSelectFile: O,
|
|
1847
2013
|
selectFileButtonText: d
|
|
1848
2014
|
}),
|
|
1849
|
-
C && /* @__PURE__ */ p(
|
|
2015
|
+
C && /* @__PURE__ */ p(Qt, {
|
|
1850
2016
|
disabled: g,
|
|
1851
2017
|
isLoading: T,
|
|
1852
2018
|
acceptFile: s,
|
|
@@ -1857,12 +2023,12 @@ function Jt(e) {
|
|
|
1857
2023
|
})
|
|
1858
2024
|
]
|
|
1859
2025
|
}),
|
|
1860
|
-
k && /* @__PURE__ */ p(
|
|
2026
|
+
k && /* @__PURE__ */ p(Le, { children: k })
|
|
1861
2027
|
] });
|
|
1862
2028
|
}
|
|
1863
2029
|
//#endregion
|
|
1864
2030
|
//#region src/components/fullCalendar/_viewService.ts
|
|
1865
|
-
var
|
|
2031
|
+
var tn = class {
|
|
1866
2032
|
capitalize(e) {
|
|
1867
2033
|
return J(e);
|
|
1868
2034
|
}
|
|
@@ -1958,16 +2124,16 @@ var Yt = class {
|
|
|
1958
2124
|
let n = new Date(e);
|
|
1959
2125
|
n.setDate(n.getDate() - 1), t(n);
|
|
1960
2126
|
}
|
|
1961
|
-
},
|
|
1962
|
-
function
|
|
1963
|
-
return a(
|
|
2127
|
+
}, nn = n({});
|
|
2128
|
+
function rn() {
|
|
2129
|
+
return a(nn);
|
|
1964
2130
|
}
|
|
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
|
|
2131
|
+
function an(e) {
|
|
2132
|
+
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 tn(), d = l.listHours([8, 18]), [f, m] = u(i), h = c || f;
|
|
1967
2133
|
function g(e) {
|
|
1968
2134
|
o && o(e), m(e);
|
|
1969
2135
|
}
|
|
1970
|
-
return /* @__PURE__ */ p(
|
|
2136
|
+
return /* @__PURE__ */ p(nn.Provider, {
|
|
1971
2137
|
value: {
|
|
1972
2138
|
events: r,
|
|
1973
2139
|
blockedTimestamps: t,
|
|
@@ -1989,7 +2155,7 @@ function Qt(e) {
|
|
|
1989
2155
|
}
|
|
1990
2156
|
//#endregion
|
|
1991
2157
|
//#region src/components/fullCalendar/dayCalendar/dayCalendarContainer/index.tsx
|
|
1992
|
-
function
|
|
2158
|
+
function on({ children: e }) {
|
|
1993
2159
|
return /* @__PURE__ */ p("div", {
|
|
1994
2160
|
className: "arkynDayCalendarContainer",
|
|
1995
2161
|
children: e
|
|
@@ -1997,15 +2163,15 @@ function $t({ children: e }) {
|
|
|
1997
2163
|
}
|
|
1998
2164
|
//#endregion
|
|
1999
2165
|
//#region src/components/fullCalendar/dayCalendar/dayCalendarEvent/index.tsx
|
|
2000
|
-
var
|
|
2001
|
-
function
|
|
2002
|
-
let { events: t, viewDate: n } =
|
|
2166
|
+
var sn = 30, cn = 205;
|
|
2167
|
+
function ln(e) {
|
|
2168
|
+
let { events: t, viewDate: n } = rn(), r = n.getDate(), i = n.getMonth(), a = n.getFullYear(), o = t.map((e, t) => ({
|
|
2003
2169
|
event: e,
|
|
2004
2170
|
sourceIndex: t
|
|
2005
2171
|
})).filter(({ event: e }) => e.initialDate.getDate() === r && e.initialDate.getMonth() === i && e.initialDate.getFullYear() === a).sort((e, t) => {
|
|
2006
2172
|
let n = e.event.initialDate.getTime(), r = t.event.initialDate.getTime();
|
|
2007
2173
|
if (n !== r) return n - r;
|
|
2008
|
-
let i = e.event.endDate?.getTime() ?? n +
|
|
2174
|
+
let i = e.event.endDate?.getTime() ?? n + sn * 6e4, a = t.event.endDate?.getTime() ?? r + sn * 6e4;
|
|
2009
2175
|
return i === a ? e.sourceIndex - t.sourceIndex : i - a;
|
|
2010
2176
|
}), s = new Map(o.map((e, t) => [e.sourceIndex, t])), c = o.filter(({ event: t }) => {
|
|
2011
2177
|
let n = Math.floor(e.timeInMinutes / 60), o = e.timeInMinutes % 60;
|
|
@@ -2026,7 +2192,7 @@ function nn(e) {
|
|
|
2026
2192
|
return n === 0 ? `${t}h` : `${t}h${n}`;
|
|
2027
2193
|
}
|
|
2028
2194
|
function d(e) {
|
|
2029
|
-
let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t +
|
|
2195
|
+
let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t + sn;
|
|
2030
2196
|
return {
|
|
2031
2197
|
startMinutes: t,
|
|
2032
2198
|
endMinutes: Math.max(n, t + 1)
|
|
@@ -2041,7 +2207,7 @@ function nn(e) {
|
|
|
2041
2207
|
}, 0);
|
|
2042
2208
|
}
|
|
2043
2209
|
function h(t, n) {
|
|
2044
|
-
let { startMinutes: r, endMinutes: i } = d(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), s = a /
|
|
2210
|
+
let { startMinutes: r, endMinutes: i } = d(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), s = a / sn * 100, c = o / sn * 100, l = f(t, n) * cn;
|
|
2045
2211
|
return {
|
|
2046
2212
|
top: `${s}%`,
|
|
2047
2213
|
height: `${c}%`,
|
|
@@ -2064,8 +2230,8 @@ function nn(e) {
|
|
|
2064
2230
|
}
|
|
2065
2231
|
//#endregion
|
|
2066
2232
|
//#region src/components/fullCalendar/dayCalendar/dayCalendarRow/index.tsx
|
|
2067
|
-
function
|
|
2068
|
-
let n = new
|
|
2233
|
+
function un({ hour: e, timeInMinutes: t }) {
|
|
2234
|
+
let n = new tn(), { blockedTimestamps: r, viewDate: i, onClickDate: a } = rn();
|
|
2069
2235
|
function o() {
|
|
2070
2236
|
return r.some((e) => i >= e.initialDate && i <= e.endDate);
|
|
2071
2237
|
}
|
|
@@ -2081,22 +2247,22 @@ function rn({ hour: e, timeInMinutes: t }) {
|
|
|
2081
2247
|
onClick: s,
|
|
2082
2248
|
children: [/* @__PURE__ */ p("p", { children: n.formatHourLabel(e) }), /* @__PURE__ */ p("div", {
|
|
2083
2249
|
className: "arkynDayCalendarRowContent",
|
|
2084
|
-
children: /* @__PURE__ */ p(
|
|
2250
|
+
children: /* @__PURE__ */ p(ln, { timeInMinutes: t })
|
|
2085
2251
|
})]
|
|
2086
2252
|
});
|
|
2087
2253
|
}
|
|
2088
2254
|
//#endregion
|
|
2089
2255
|
//#region src/components/fullCalendar/dayCalendar/index.tsx
|
|
2090
|
-
function
|
|
2091
|
-
let { listHours: e } =
|
|
2092
|
-
return /* @__PURE__ */ p(
|
|
2256
|
+
function dn() {
|
|
2257
|
+
let { listHours: e } = rn();
|
|
2258
|
+
return /* @__PURE__ */ p(on, { children: e.map((e) => /* @__PURE__ */ p(un, {
|
|
2093
2259
|
hour: e,
|
|
2094
2260
|
timeInMinutes: e
|
|
2095
2261
|
}, e)) });
|
|
2096
2262
|
}
|
|
2097
2263
|
//#endregion
|
|
2098
2264
|
//#region src/components/fullCalendar/fullCalendarContainer/index.tsx
|
|
2099
|
-
function
|
|
2265
|
+
function fn({ children: e }) {
|
|
2100
2266
|
return /* @__PURE__ */ p("div", {
|
|
2101
2267
|
className: "arkynFullCalendarContainer",
|
|
2102
2268
|
children: e
|
|
@@ -2104,8 +2270,8 @@ function on({ children: e }) {
|
|
|
2104
2270
|
}
|
|
2105
2271
|
//#endregion
|
|
2106
2272
|
//#region src/components/fullCalendar/fullCalendarHeader/index.tsx
|
|
2107
|
-
function
|
|
2108
|
-
let { setViewType: t, viewType: n } = e, r =
|
|
2273
|
+
function pn(e) {
|
|
2274
|
+
let { setViewType: t, viewType: n } = e, r = rn();
|
|
2109
2275
|
function i() {
|
|
2110
2276
|
switch (n) {
|
|
2111
2277
|
case "day": return r.previousDay();
|
|
@@ -2122,19 +2288,19 @@ function sn(e) {
|
|
|
2122
2288
|
}
|
|
2123
2289
|
return /* @__PURE__ */ m("div", {
|
|
2124
2290
|
className: "arkynFullCalendarHeader",
|
|
2125
|
-
children: [/* @__PURE__ */ m(
|
|
2291
|
+
children: [/* @__PURE__ */ m(Ct, {
|
|
2126
2292
|
defaultValue: n,
|
|
2127
2293
|
onChange: (e) => t(e),
|
|
2128
2294
|
children: [
|
|
2129
|
-
/* @__PURE__ */ p(
|
|
2295
|
+
/* @__PURE__ */ p(St, {
|
|
2130
2296
|
value: "day",
|
|
2131
2297
|
children: "Dia"
|
|
2132
2298
|
}),
|
|
2133
|
-
/* @__PURE__ */ p(
|
|
2299
|
+
/* @__PURE__ */ p(St, {
|
|
2134
2300
|
value: "week",
|
|
2135
2301
|
children: "Semana"
|
|
2136
2302
|
}),
|
|
2137
|
-
/* @__PURE__ */ p(
|
|
2303
|
+
/* @__PURE__ */ p(St, {
|
|
2138
2304
|
value: "month",
|
|
2139
2305
|
children: "Mês"
|
|
2140
2306
|
})
|
|
@@ -2165,8 +2331,8 @@ function sn(e) {
|
|
|
2165
2331
|
}
|
|
2166
2332
|
//#endregion
|
|
2167
2333
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.tsx
|
|
2168
|
-
function
|
|
2169
|
-
let { events: t } =
|
|
2334
|
+
function mn(e) {
|
|
2335
|
+
let { events: t } = rn(), n = t.filter((t) => t.initialDate.getDate() === e.day && t.initialDate.getMonth() === e.month && t.initialDate.getFullYear() === e.year);
|
|
2170
2336
|
if (n.length === 0) return null;
|
|
2171
2337
|
function r(t) {
|
|
2172
2338
|
return `${e.day}-${e.month}-${e.year}-${t}`;
|
|
@@ -2190,8 +2356,8 @@ function cn(e) {
|
|
|
2190
2356
|
}
|
|
2191
2357
|
//#endregion
|
|
2192
2358
|
//#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 } =
|
|
2359
|
+
function hn(e) {
|
|
2360
|
+
let { day: t, month: n, year: r, dayOwner: i } = e, { blockedTimestamps: a, onClickDate: o } = rn();
|
|
2195
2361
|
function s() {
|
|
2196
2362
|
let e = /* @__PURE__ */ new Date();
|
|
2197
2363
|
return t === e.getDate() && n === e.getMonth() && r === e.getFullYear();
|
|
@@ -2211,7 +2377,7 @@ function ln(e) {
|
|
|
2211
2377
|
children: t
|
|
2212
2378
|
}), /* @__PURE__ */ p("div", {
|
|
2213
2379
|
className: "arkynMonthlyCalendarEventContainer",
|
|
2214
|
-
children: /* @__PURE__ */ p(
|
|
2380
|
+
children: /* @__PURE__ */ p(mn, {
|
|
2215
2381
|
day: t,
|
|
2216
2382
|
month: n,
|
|
2217
2383
|
year: r
|
|
@@ -2221,15 +2387,15 @@ function ln(e) {
|
|
|
2221
2387
|
}
|
|
2222
2388
|
//#endregion
|
|
2223
2389
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.tsx
|
|
2224
|
-
function
|
|
2390
|
+
function gn() {
|
|
2225
2391
|
return /* @__PURE__ */ p("tbody", {
|
|
2226
2392
|
className: "arkynMonthlyCalendarTableBody",
|
|
2227
|
-
children:
|
|
2393
|
+
children: rn().listMonthlyMatrix.map((e, t) => /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p(hn, { ...e }, t)) }, t))
|
|
2228
2394
|
});
|
|
2229
2395
|
}
|
|
2230
2396
|
//#endregion
|
|
2231
2397
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.tsx
|
|
2232
|
-
function
|
|
2398
|
+
function _n({ children: e }) {
|
|
2233
2399
|
return /* @__PURE__ */ p("div", {
|
|
2234
2400
|
className: "arkynMonthlyCalendarTableContainer",
|
|
2235
2401
|
children: /* @__PURE__ */ p("table", { children: e })
|
|
@@ -2237,8 +2403,8 @@ function dn({ children: e }) {
|
|
|
2237
2403
|
}
|
|
2238
2404
|
//#endregion
|
|
2239
2405
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.tsx
|
|
2240
|
-
function
|
|
2241
|
-
let { listWeek: e } =
|
|
2406
|
+
function vn() {
|
|
2407
|
+
let { listWeek: e } = rn();
|
|
2242
2408
|
return /* @__PURE__ */ p("thead", {
|
|
2243
2409
|
className: "arkynMonthlyCalendarTableHeader",
|
|
2244
2410
|
children: /* @__PURE__ */ p("tr", { children: e.map((e) => /* @__PURE__ */ p("th", { children: J(e) }, e)) })
|
|
@@ -2246,20 +2412,20 @@ function fn() {
|
|
|
2246
2412
|
}
|
|
2247
2413
|
//#endregion
|
|
2248
2414
|
//#region src/components/fullCalendar/monthlyCalendar/index.tsx
|
|
2249
|
-
function
|
|
2250
|
-
return /* @__PURE__ */ m(
|
|
2415
|
+
function yn() {
|
|
2416
|
+
return /* @__PURE__ */ m(_n, { children: [/* @__PURE__ */ p(vn, {}), /* @__PURE__ */ p(gn, {})] });
|
|
2251
2417
|
}
|
|
2252
2418
|
//#endregion
|
|
2253
2419
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarEvent/index.tsx
|
|
2254
|
-
var
|
|
2255
|
-
function
|
|
2256
|
-
let { events: t } =
|
|
2420
|
+
var bn = 30, xn = 40;
|
|
2421
|
+
function Sn(e) {
|
|
2422
|
+
let { events: t } = rn(), n = t.map((e, t) => ({
|
|
2257
2423
|
event: e,
|
|
2258
2424
|
sourceIndex: t
|
|
2259
2425
|
})).filter(({ event: t }) => t.initialDate.getDate() === e.day && t.initialDate.getMonth() === e.month && t.initialDate.getFullYear() === e.year).sort((e, t) => {
|
|
2260
2426
|
let n = e.event.initialDate.getTime(), r = t.event.initialDate.getTime();
|
|
2261
2427
|
if (n !== r) return n - r;
|
|
2262
|
-
let i = e.event.endDate?.getTime() ?? n +
|
|
2428
|
+
let i = e.event.endDate?.getTime() ?? n + bn * 6e4, a = t.event.endDate?.getTime() ?? r + bn * 6e4;
|
|
2263
2429
|
return i === a ? e.sourceIndex - t.sourceIndex : i - a;
|
|
2264
2430
|
}), r = new Map(n.map((e, t) => [e.sourceIndex, t])), i = n.filter(({ event: t }) => {
|
|
2265
2431
|
let n = Math.floor(e.timeInMinutes / 60), r = e.timeInMinutes % 60;
|
|
@@ -2280,7 +2446,7 @@ function gn(e) {
|
|
|
2280
2446
|
return n === 0 ? `${t}h` : `${t}h${n}`;
|
|
2281
2447
|
}
|
|
2282
2448
|
function s(e) {
|
|
2283
|
-
let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t +
|
|
2449
|
+
let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t + bn;
|
|
2284
2450
|
return {
|
|
2285
2451
|
startMinutes: t,
|
|
2286
2452
|
endMinutes: Math.max(n, t + 1)
|
|
@@ -2295,7 +2461,7 @@ function gn(e) {
|
|
|
2295
2461
|
}, 0);
|
|
2296
2462
|
}
|
|
2297
2463
|
function l(t, n) {
|
|
2298
|
-
let { startMinutes: r, endMinutes: i } = s(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), l = a /
|
|
2464
|
+
let { startMinutes: r, endMinutes: i } = s(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), l = a / bn * 100, u = o / bn * 100, d = c(t, n) * xn;
|
|
2299
2465
|
return {
|
|
2300
2466
|
top: `${l}%`,
|
|
2301
2467
|
height: `${u}%`,
|
|
@@ -2318,8 +2484,8 @@ function gn(e) {
|
|
|
2318
2484
|
}
|
|
2319
2485
|
//#endregion
|
|
2320
2486
|
//#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 } =
|
|
2487
|
+
function Cn(e) {
|
|
2488
|
+
let { day: t, month: n, year: r, dayOwner: i, timeInMinutes: a } = e, { blockedTimestamps: o, onClickDate: s } = rn();
|
|
2323
2489
|
function c() {
|
|
2324
2490
|
let e = new Date(r, n, t);
|
|
2325
2491
|
return o.some((t) => e >= t.initialDate && e <= t.endDate);
|
|
@@ -2337,7 +2503,7 @@ function _n(e) {
|
|
|
2337
2503
|
onClick: l,
|
|
2338
2504
|
children: /* @__PURE__ */ p("div", {
|
|
2339
2505
|
className: "arkynWeekCalendarTableTdContent",
|
|
2340
|
-
children: /* @__PURE__ */ p(
|
|
2506
|
+
children: /* @__PURE__ */ p(Sn, {
|
|
2341
2507
|
day: t,
|
|
2342
2508
|
month: n,
|
|
2343
2509
|
year: r,
|
|
@@ -2348,19 +2514,19 @@ function _n(e) {
|
|
|
2348
2514
|
}
|
|
2349
2515
|
//#endregion
|
|
2350
2516
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.tsx
|
|
2351
|
-
function
|
|
2352
|
-
let e =
|
|
2517
|
+
function wn() {
|
|
2518
|
+
let e = rn(), t = new tn();
|
|
2353
2519
|
return /* @__PURE__ */ p("tbody", {
|
|
2354
2520
|
className: "arkynWeekCalendarTableBody",
|
|
2355
2521
|
children: e.listWeeklyMatrix.map((e) => /* @__PURE__ */ m("tr", { children: [/* @__PURE__ */ p("td", {
|
|
2356
2522
|
className: "hourTd",
|
|
2357
2523
|
children: /* @__PURE__ */ p("p", { children: t.formatHourLabel(e[0].timeInMinutes) })
|
|
2358
|
-
}), e.map((e) => /* @__PURE__ */ p(
|
|
2524
|
+
}), e.map((e) => /* @__PURE__ */ p(Cn, { ...e }, `${e.year}-${e.month}-${e.day}-${e.timeInMinutes}`))] }, e[0].timeInMinutes))
|
|
2359
2525
|
});
|
|
2360
2526
|
}
|
|
2361
2527
|
//#endregion
|
|
2362
2528
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.tsx
|
|
2363
|
-
function
|
|
2529
|
+
function Tn({ children: e }) {
|
|
2364
2530
|
return /* @__PURE__ */ p("div", {
|
|
2365
2531
|
className: "arkynWeekCalendarTableContainer",
|
|
2366
2532
|
children: /* @__PURE__ */ p("table", { children: e })
|
|
@@ -2368,8 +2534,8 @@ function yn({ children: e }) {
|
|
|
2368
2534
|
}
|
|
2369
2535
|
//#endregion
|
|
2370
2536
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.tsx
|
|
2371
|
-
function
|
|
2372
|
-
let { listWeek: e, listWeeklyMatrix: t } =
|
|
2537
|
+
function En() {
|
|
2538
|
+
let { listWeek: e, listWeeklyMatrix: t } = rn(), n = t[0] || [];
|
|
2373
2539
|
return /* @__PURE__ */ p("thead", {
|
|
2374
2540
|
className: "arkynWeekCalendarTableHeader",
|
|
2375
2541
|
children: /* @__PURE__ */ m("tr", { children: [/* @__PURE__ */ p("th", {}), e.map((e, t) => /* @__PURE__ */ p("th", { children: /* @__PURE__ */ m("div", {
|
|
@@ -2380,47 +2546,58 @@ function bn() {
|
|
|
2380
2546
|
}
|
|
2381
2547
|
//#endregion
|
|
2382
2548
|
//#region src/components/fullCalendar/weekCalendar/index.tsx
|
|
2383
|
-
function
|
|
2384
|
-
return /* @__PURE__ */ m(
|
|
2549
|
+
function Dn() {
|
|
2550
|
+
return /* @__PURE__ */ m(Tn, { children: [/* @__PURE__ */ p(En, {}), /* @__PURE__ */ p(wn, {})] });
|
|
2385
2551
|
}
|
|
2386
2552
|
//#endregion
|
|
2387
2553
|
//#region src/components/fullCalendar/index.tsx
|
|
2388
|
-
function
|
|
2554
|
+
function On(e) {
|
|
2389
2555
|
let [t, n] = u("month");
|
|
2390
|
-
return /* @__PURE__ */ p(
|
|
2556
|
+
return /* @__PURE__ */ p(an, {
|
|
2391
2557
|
events: e.events || [],
|
|
2392
2558
|
viewValue: e.viewValue,
|
|
2393
2559
|
defaultViewValue: e.defaultViewValue,
|
|
2394
2560
|
onChangeView: e.onChangeView,
|
|
2395
2561
|
blockedTimestamps: e.blockedTimestamps || [],
|
|
2396
2562
|
onClickDate: e.onClickDate,
|
|
2397
|
-
children: /* @__PURE__ */ m(
|
|
2398
|
-
/* @__PURE__ */ p(
|
|
2563
|
+
children: /* @__PURE__ */ m(fn, { children: [
|
|
2564
|
+
/* @__PURE__ */ p(pn, {
|
|
2399
2565
|
viewType: t,
|
|
2400
2566
|
setViewType: n
|
|
2401
2567
|
}),
|
|
2402
|
-
t === "day" && /* @__PURE__ */ p(
|
|
2403
|
-
t === "month" && /* @__PURE__ */ p(
|
|
2404
|
-
t === "week" && /* @__PURE__ */ p(
|
|
2568
|
+
t === "day" && /* @__PURE__ */ p(dn, {}),
|
|
2569
|
+
t === "month" && /* @__PURE__ */ p(yn, {}),
|
|
2570
|
+
t === "week" && /* @__PURE__ */ p(Dn, {})
|
|
2405
2571
|
] })
|
|
2406
2572
|
});
|
|
2407
2573
|
}
|
|
2408
2574
|
//#endregion
|
|
2575
|
+
//#region src/utils/escapeForInlineScript.ts
|
|
2576
|
+
function kn(e) {
|
|
2577
|
+
return JSON.stringify(e ?? "").replace(/</g, "\\u003C");
|
|
2578
|
+
}
|
|
2579
|
+
function An(e) {
|
|
2580
|
+
return JSON.stringify(e).replace(/</g, "\\u003C");
|
|
2581
|
+
}
|
|
2582
|
+
function jn(e) {
|
|
2583
|
+
return /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e);
|
|
2584
|
+
}
|
|
2585
|
+
//#endregion
|
|
2409
2586
|
//#region src/components/googleAnalytics/snippets/generateGAElements.ts
|
|
2410
|
-
function
|
|
2587
|
+
function Mn(e) {
|
|
2411
2588
|
let { measurementId: t } = e;
|
|
2412
2589
|
return t || console.warn("Google Analytics Measurement ID is required"), {
|
|
2413
|
-
src: `https://www.googletagmanager.com/gtag/js?id=${t}`,
|
|
2590
|
+
src: `https://www.googletagmanager.com/gtag/js?id=${encodeURIComponent(t)}`,
|
|
2414
2591
|
script: `
|
|
2415
2592
|
window.dataLayer = window.dataLayer || [];
|
|
2416
2593
|
function gtag(){dataLayer.push(arguments);}
|
|
2417
2594
|
gtag('js', new Date());
|
|
2418
|
-
gtag('config',
|
|
2595
|
+
gtag('config', ${kn(t)});`
|
|
2419
2596
|
};
|
|
2420
2597
|
}
|
|
2421
2598
|
//#endregion
|
|
2422
2599
|
//#region src/components/googleAnalytics/googleAnalytics.tsx
|
|
2423
|
-
var
|
|
2600
|
+
var Nn = class {
|
|
2424
2601
|
initializeAsyncScript(e) {
|
|
2425
2602
|
let t = document.createElement("script");
|
|
2426
2603
|
return t.async = !0, t.src = e, t;
|
|
@@ -2430,45 +2607,50 @@ var wn = class {
|
|
|
2430
2607
|
return t.innerHTML = e, t;
|
|
2431
2608
|
}
|
|
2432
2609
|
initialize(e) {
|
|
2433
|
-
let { measurementId: t } = e, n =
|
|
2610
|
+
let { measurementId: t } = e, n = Mn({ measurementId: t }), r = this.initializeAsyncScript(n.src), i = this.initializeInlineScript(n.script);
|
|
2434
2611
|
document.head.appendChild(r), document.head.appendChild(i);
|
|
2435
2612
|
}
|
|
2436
2613
|
};
|
|
2437
2614
|
//#endregion
|
|
2438
2615
|
//#region src/components/googleAnalytics/googleAnalytics.client.tsx
|
|
2439
|
-
function
|
|
2440
|
-
return new
|
|
2616
|
+
function Pn(e) {
|
|
2617
|
+
return new Nn().initialize(e), null;
|
|
2441
2618
|
}
|
|
2442
2619
|
//#endregion
|
|
2443
2620
|
//#region src/components/googleAnalytics/index.tsx
|
|
2444
|
-
function
|
|
2621
|
+
function Fn(e) {
|
|
2445
2622
|
let { measurementId: t, showInDevMode: n = !1 } = e;
|
|
2446
|
-
return process.env.NODE_ENV !== "production" && !n ? null : /* @__PURE__ */ p(
|
|
2623
|
+
return process.env.NODE_ENV !== "production" && !n ? null : /* @__PURE__ */ p(Dt, { children: () => /* @__PURE__ */ p(Pn, { measurementId: t }) });
|
|
2447
2624
|
}
|
|
2448
2625
|
//#endregion
|
|
2449
2626
|
//#region src/components/googleTagManager/snippets/appendToDataLayer.ts
|
|
2450
|
-
function
|
|
2451
|
-
let { dataLayer: t, dataLayerName: n } = e;
|
|
2452
|
-
return `
|
|
2453
|
-
window.${
|
|
2454
|
-
window.${
|
|
2627
|
+
function In(e) {
|
|
2628
|
+
let { dataLayer: t, dataLayerName: n } = e, r = jn(n) ? n : "dataLayer";
|
|
2629
|
+
return r !== n && console.warn(`Invalid dataLayerName "${n}", falling back to "dataLayer"`), `
|
|
2630
|
+
window.${r} = window.${r} || [];
|
|
2631
|
+
window.${r}.push(${An(t)})`;
|
|
2455
2632
|
}
|
|
2456
2633
|
//#endregion
|
|
2457
2634
|
//#region src/components/googleTagManager/snippets/generateGTMElements.ts
|
|
2458
|
-
function
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2635
|
+
function Ln(e) {
|
|
2636
|
+
return encodeURIComponent(e).replace(/'/g, "%27");
|
|
2637
|
+
}
|
|
2638
|
+
function Rn(e) {
|
|
2639
|
+
let { id: t, events: n, dataLayer: r, dataLayerName: i, preview: a, auth: o } = e, s = `>m_auth=${Ln(o)}`, c = `>m_preview=${Ln(a)}`, l = Ln(t);
|
|
2640
|
+
t || console.warn("GTM Id is required");
|
|
2641
|
+
let u = `
|
|
2642
|
+
<iframe src="https://www.googletagmanager.com/ns.html?id=${l}${s}${c}>m_cookies_win=x"
|
|
2643
|
+
height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>`, d = jn(i) ? i : "dataLayer";
|
|
2644
|
+
return {
|
|
2645
|
+
iframe: u,
|
|
2464
2646
|
script: `
|
|
2465
2647
|
(function(w,d,s,l,i){w[l]=w[l]||[];
|
|
2466
|
-
w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', ${JSON.stringify(n).slice(1, -1)}});
|
|
2648
|
+
w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', ${JSON.stringify(n).slice(1, -1).replace(/</g, "\\u003C")}});
|
|
2467
2649
|
var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
|
|
2468
2650
|
j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'${s}${c}>m_cookies_win=x';
|
|
2469
2651
|
f.parentNode.insertBefore(j,f);
|
|
2470
|
-
})(window,document,'script'
|
|
2471
|
-
dataLayerVar:
|
|
2652
|
+
})(window,document,'script',${kn(d)},${kn(t)});`,
|
|
2653
|
+
dataLayerVar: In({
|
|
2472
2654
|
dataLayer: r,
|
|
2473
2655
|
dataLayerName: i
|
|
2474
2656
|
})
|
|
@@ -2476,13 +2658,13 @@ function On(e) {
|
|
|
2476
2658
|
}
|
|
2477
2659
|
//#endregion
|
|
2478
2660
|
//#region src/components/googleTagManager/googleTagManager.tsx
|
|
2479
|
-
var
|
|
2661
|
+
var zn = class {
|
|
2480
2662
|
initializeDataScript(e) {
|
|
2481
2663
|
let t = document.createElement("script");
|
|
2482
2664
|
return t.innerHTML = e, t;
|
|
2483
2665
|
}
|
|
2484
2666
|
initializeGTMElements(e) {
|
|
2485
|
-
let t =
|
|
2667
|
+
let t = Rn(e);
|
|
2486
2668
|
return {
|
|
2487
2669
|
noScript: () => {
|
|
2488
2670
|
let e = document.createElement("noscript");
|
|
@@ -2498,7 +2680,7 @@ var kn = class {
|
|
|
2498
2680
|
initializeDataLayer(e) {
|
|
2499
2681
|
let { dataLayer: t, dataLayerName: n } = e;
|
|
2500
2682
|
if (window[n]) return window[n].push(t);
|
|
2501
|
-
let r =
|
|
2683
|
+
let r = In({
|
|
2502
2684
|
dataLayer: t,
|
|
2503
2685
|
dataLayerName: n
|
|
2504
2686
|
}), i = this.initializeDataScript(r);
|
|
@@ -2518,14 +2700,14 @@ var kn = class {
|
|
|
2518
2700
|
};
|
|
2519
2701
|
//#endregion
|
|
2520
2702
|
//#region src/components/googleTagManager/googleTagManager.client.tsx
|
|
2521
|
-
function
|
|
2522
|
-
return new
|
|
2703
|
+
function Bn(e) {
|
|
2704
|
+
return new zn().initialize(e), null;
|
|
2523
2705
|
}
|
|
2524
2706
|
//#endregion
|
|
2525
2707
|
//#region src/components/googleTagManager/index.tsx
|
|
2526
|
-
function
|
|
2708
|
+
function Vn(e) {
|
|
2527
2709
|
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(
|
|
2710
|
+
return process.env.NODE_ENV !== "production" && !s ? null : /* @__PURE__ */ p(Dt, { children: () => /* @__PURE__ */ p(Bn, {
|
|
2529
2711
|
auth: n,
|
|
2530
2712
|
dataLayer: o,
|
|
2531
2713
|
dataLayerName: i,
|
|
@@ -2536,7 +2718,7 @@ function jn(e) {
|
|
|
2536
2718
|
}
|
|
2537
2719
|
//#endregion
|
|
2538
2720
|
//#region src/components/imageUpload/hasFileContent/index.tsx
|
|
2539
|
-
function
|
|
2721
|
+
function Hn(e) {
|
|
2540
2722
|
let { disabled: t, filePath: n, isLoading: r, acceptImage: i, changeImageButtonText: a, handleSelectFile: o, reSendImage: s } = e;
|
|
2541
2723
|
function c() {
|
|
2542
2724
|
if (t) return;
|
|
@@ -2560,10 +2742,10 @@ function Mn(e) {
|
|
|
2560
2742
|
size: "sm",
|
|
2561
2743
|
isLoading: r,
|
|
2562
2744
|
onClick: s,
|
|
2563
|
-
icon:
|
|
2745
|
+
icon: H,
|
|
2564
2746
|
disabled: t
|
|
2565
2747
|
})
|
|
2566
|
-
}), /* @__PURE__ */ p(
|
|
2748
|
+
}), /* @__PURE__ */ p(Be, {
|
|
2567
2749
|
isLoading: r,
|
|
2568
2750
|
onClick: c,
|
|
2569
2751
|
variant: "outline",
|
|
@@ -2576,7 +2758,7 @@ function Mn(e) {
|
|
|
2576
2758
|
}
|
|
2577
2759
|
//#endregion
|
|
2578
2760
|
//#region src/components/imageUpload/noFileContent/index.tsx
|
|
2579
|
-
function
|
|
2761
|
+
function Un(e) {
|
|
2580
2762
|
let { dropImageText: t, isLoading: n, acceptImage: r, handleSelectFile: i, selectImageButtonText: a, disabled: o } = e;
|
|
2581
2763
|
function s(e) {
|
|
2582
2764
|
if (o) return;
|
|
@@ -2595,7 +2777,7 @@ function Nn(e) {
|
|
|
2595
2777
|
return /* @__PURE__ */ m("div", {
|
|
2596
2778
|
onDrop: s,
|
|
2597
2779
|
className: "arkynImageUploadNoFileContent",
|
|
2598
|
-
children: [/* @__PURE__ */ p(
|
|
2780
|
+
children: [/* @__PURE__ */ p(Be, {
|
|
2599
2781
|
isLoading: n,
|
|
2600
2782
|
onClick: c,
|
|
2601
2783
|
variant: "ghost",
|
|
@@ -2608,8 +2790,8 @@ function Nn(e) {
|
|
|
2608
2790
|
}
|
|
2609
2791
|
//#endregion
|
|
2610
2792
|
//#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 } =
|
|
2793
|
+
function Wn(e) {
|
|
2794
|
+
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 } = Q(), S = x?.[t], [C, w] = u(n), [T, E] = u(""), [D, O] = u(null), [k, A] = u(n), [j, M] = u(!1);
|
|
2613
2795
|
async function N(e) {
|
|
2614
2796
|
if (v) return;
|
|
2615
2797
|
M(!0), O(e), E("");
|
|
@@ -2627,7 +2809,7 @@ function Pn(e) {
|
|
|
2627
2809
|
v || (A(URL.createObjectURL(e)), N(e));
|
|
2628
2810
|
}
|
|
2629
2811
|
let F = S || T;
|
|
2630
|
-
return /* @__PURE__ */ p(
|
|
2812
|
+
return /* @__PURE__ */ p(et, {
|
|
2631
2813
|
name: t,
|
|
2632
2814
|
label: r,
|
|
2633
2815
|
showAsterisk: i,
|
|
@@ -2643,7 +2825,7 @@ function Pn(e) {
|
|
|
2643
2825
|
name: t,
|
|
2644
2826
|
value: C || ""
|
|
2645
2827
|
}),
|
|
2646
|
-
!k && /* @__PURE__ */ p(
|
|
2828
|
+
!k && /* @__PURE__ */ p(Un, {
|
|
2647
2829
|
disabled: v,
|
|
2648
2830
|
isLoading: j,
|
|
2649
2831
|
acceptImage: l,
|
|
@@ -2651,7 +2833,7 @@ function Pn(e) {
|
|
|
2651
2833
|
handleSelectFile: P,
|
|
2652
2834
|
selectImageButtonText: h
|
|
2653
2835
|
}),
|
|
2654
|
-
k && /* @__PURE__ */ p(
|
|
2836
|
+
k && /* @__PURE__ */ p(Hn, {
|
|
2655
2837
|
disabled: v,
|
|
2656
2838
|
isLoading: j,
|
|
2657
2839
|
acceptImage: l,
|
|
@@ -2666,7 +2848,7 @@ function Pn(e) {
|
|
|
2666
2848
|
}
|
|
2667
2849
|
//#endregion
|
|
2668
2850
|
//#region src/components/mapView/mapView.client.tsx
|
|
2669
|
-
function
|
|
2851
|
+
function Gn({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i }) {
|
|
2670
2852
|
let a = l(null), s = l(null), c = e || t[0];
|
|
2671
2853
|
return o(() => (ae.accessToken = r, a.current = new ae.Map({
|
|
2672
2854
|
container: s.current,
|
|
@@ -2716,19 +2898,19 @@ function Fn({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i
|
|
|
2716
2898
|
}
|
|
2717
2899
|
//#endregion
|
|
2718
2900
|
//#region src/components/mapView/index.tsx
|
|
2719
|
-
function
|
|
2901
|
+
function Kn({ className: e }) {
|
|
2720
2902
|
return /* @__PURE__ */ p("div", {
|
|
2721
2903
|
className: `arkynMapViewPinnedEmpty ${e}`,
|
|
2722
|
-
children: /* @__PURE__ */ p(
|
|
2904
|
+
children: /* @__PURE__ */ p(ee, {})
|
|
2723
2905
|
});
|
|
2724
2906
|
}
|
|
2725
|
-
function
|
|
2907
|
+
function qn(e) {
|
|
2726
2908
|
let { coordinates: t, zoom: n = 18, accessToken: r, className: i, onMarkerClick: a, ...o } = e;
|
|
2727
|
-
if (!t) return /* @__PURE__ */ p(
|
|
2909
|
+
if (!t) return /* @__PURE__ */ p(Kn, { className: i });
|
|
2728
2910
|
let s = Array.isArray(t) ? t : [t];
|
|
2729
|
-
return s.length === 0 ? /* @__PURE__ */ p(
|
|
2730
|
-
fallback: /* @__PURE__ */ p(
|
|
2731
|
-
children: () => /* @__PURE__ */ p(
|
|
2911
|
+
return s.length === 0 ? /* @__PURE__ */ p(Kn, { className: i }) : /* @__PURE__ */ p(Dt, {
|
|
2912
|
+
fallback: /* @__PURE__ */ p(Kn, { className: i }),
|
|
2913
|
+
children: () => /* @__PURE__ */ p(Gn, {
|
|
2732
2914
|
accessToken: r,
|
|
2733
2915
|
coordinates: s,
|
|
2734
2916
|
center: s[0],
|
|
@@ -2739,132 +2921,138 @@ function Ln(e) {
|
|
|
2739
2921
|
}
|
|
2740
2922
|
//#endregion
|
|
2741
2923
|
//#region src/components/maskedInput/index.tsx
|
|
2742
|
-
var
|
|
2924
|
+
var Jn = r((e, t) => /* @__PURE__ */ p("input", {
|
|
2743
2925
|
ref: t,
|
|
2744
2926
|
...e
|
|
2745
2927
|
}));
|
|
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 } =
|
|
2928
|
+
function Yn(e) {
|
|
2929
|
+
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 } = Q(), [P, F] = u(!1), I = l(null), L = s(), ee = k || L, z = w || N?.[t], B = !!z, V = n || y, H = {
|
|
2748
2930
|
md: 20,
|
|
2749
2931
|
lg: 20
|
|
2750
|
-
}[O],
|
|
2751
|
-
function
|
|
2752
|
-
|
|
2932
|
+
}[O], U = D ? "right" : "left", W = U === "left" && y, G = U === "right" && y;
|
|
2933
|
+
function te() {
|
|
2934
|
+
V || !I?.current || (F(!0), I.current.focus());
|
|
2753
2935
|
}
|
|
2754
|
-
function
|
|
2936
|
+
function K(e) {
|
|
2755
2937
|
F(!0), S && S(e);
|
|
2756
2938
|
}
|
|
2757
|
-
function
|
|
2939
|
+
function q(e) {
|
|
2758
2940
|
F(!1), C && C(e);
|
|
2759
2941
|
}
|
|
2760
|
-
let J = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${v ? "hasSuffix" : ""} ${a} ${O} ${
|
|
2761
|
-
return /* @__PURE__ */ m(
|
|
2942
|
+
let J = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${v ? "hasSuffix" : ""} ${a} ${O} ${V || x || y ? "opacity" : ""} ${B ? "errored" : ""} ${P ? "focused" : ""}`;
|
|
2943
|
+
return /* @__PURE__ */ m(ze, {
|
|
2762
2944
|
className: g,
|
|
2763
2945
|
children: [
|
|
2764
|
-
h && /* @__PURE__ */ p(
|
|
2946
|
+
h && /* @__PURE__ */ p(Re, {
|
|
2765
2947
|
showAsterisk: E,
|
|
2766
|
-
htmlFor:
|
|
2948
|
+
htmlFor: ee,
|
|
2767
2949
|
children: h
|
|
2768
2950
|
}),
|
|
2769
2951
|
/* @__PURE__ */ m("section", {
|
|
2770
2952
|
title: r,
|
|
2771
2953
|
style: i,
|
|
2772
|
-
onClick:
|
|
2954
|
+
onClick: te,
|
|
2773
2955
|
className: J,
|
|
2774
2956
|
children: [
|
|
2775
|
-
/* @__PURE__ */ p(
|
|
2776
|
-
iconSize:
|
|
2957
|
+
/* @__PURE__ */ p($, {
|
|
2958
|
+
iconSize: H,
|
|
2777
2959
|
icon: _,
|
|
2778
2960
|
className: "prefix"
|
|
2779
2961
|
}),
|
|
2780
|
-
/* @__PURE__ */ p(
|
|
2781
|
-
show:
|
|
2782
|
-
iconSize:
|
|
2962
|
+
/* @__PURE__ */ p($, {
|
|
2963
|
+
show: W,
|
|
2964
|
+
iconSize: H,
|
|
2783
2965
|
className: "spinner",
|
|
2784
2966
|
icon: R
|
|
2785
2967
|
}),
|
|
2786
|
-
/* @__PURE__ */ p(
|
|
2968
|
+
/* @__PURE__ */ p($, {
|
|
2787
2969
|
show: !y,
|
|
2788
2970
|
icon: b,
|
|
2789
|
-
iconSize:
|
|
2971
|
+
iconSize: H
|
|
2790
2972
|
}),
|
|
2791
2973
|
/* @__PURE__ */ p(Y, {
|
|
2792
|
-
component:
|
|
2974
|
+
component: Jn,
|
|
2793
2975
|
mask: c,
|
|
2794
2976
|
replacement: f,
|
|
2795
2977
|
separate: o,
|
|
2796
2978
|
showMask: d,
|
|
2797
2979
|
ref: I,
|
|
2798
|
-
onFocus:
|
|
2799
|
-
onBlur:
|
|
2800
|
-
disabled:
|
|
2980
|
+
onFocus: K,
|
|
2981
|
+
onBlur: q,
|
|
2982
|
+
disabled: V,
|
|
2801
2983
|
readOnly: x,
|
|
2802
|
-
id:
|
|
2984
|
+
id: ee,
|
|
2803
2985
|
name: t,
|
|
2804
2986
|
defaultValue: T || void 0,
|
|
2805
|
-
placeholder:
|
|
2806
|
-
value:
|
|
2987
|
+
placeholder: V && A || j,
|
|
2988
|
+
value: V ? void 0 : A,
|
|
2807
2989
|
...M
|
|
2808
2990
|
}),
|
|
2809
|
-
/* @__PURE__ */ p(
|
|
2991
|
+
/* @__PURE__ */ p($, {
|
|
2810
2992
|
show: !y,
|
|
2811
2993
|
icon: D,
|
|
2812
|
-
iconSize:
|
|
2994
|
+
iconSize: H
|
|
2813
2995
|
}),
|
|
2814
|
-
/* @__PURE__ */ p(
|
|
2815
|
-
show:
|
|
2816
|
-
iconSize:
|
|
2996
|
+
/* @__PURE__ */ p($, {
|
|
2997
|
+
show: G,
|
|
2998
|
+
iconSize: H,
|
|
2817
2999
|
className: "spinner",
|
|
2818
3000
|
icon: R
|
|
2819
3001
|
}),
|
|
2820
|
-
/* @__PURE__ */ p(
|
|
2821
|
-
iconSize:
|
|
3002
|
+
/* @__PURE__ */ p($, {
|
|
3003
|
+
iconSize: H,
|
|
2822
3004
|
icon: v,
|
|
2823
3005
|
className: "suffix"
|
|
2824
3006
|
})
|
|
2825
3007
|
]
|
|
2826
3008
|
}),
|
|
2827
|
-
|
|
3009
|
+
z && /* @__PURE__ */ p(Le, { children: z })
|
|
2828
3010
|
]
|
|
2829
3011
|
});
|
|
2830
3012
|
}
|
|
2831
3013
|
//#endregion
|
|
2832
3014
|
//#region src/components/modal/modalContext.tsx
|
|
2833
|
-
var
|
|
2834
|
-
function
|
|
3015
|
+
var Xn = n({});
|
|
3016
|
+
function Zn(e) {
|
|
2835
3017
|
let t = c(() => ({ makeInvisible: e.makeInvisible }), [e.makeInvisible]);
|
|
2836
|
-
return /* @__PURE__ */ p(
|
|
3018
|
+
return /* @__PURE__ */ p(Xn.Provider, {
|
|
2837
3019
|
value: t,
|
|
2838
3020
|
children: e.children
|
|
2839
3021
|
});
|
|
2840
3022
|
}
|
|
2841
|
-
function
|
|
2842
|
-
return a(
|
|
3023
|
+
function Qn() {
|
|
3024
|
+
return a(Xn);
|
|
2843
3025
|
}
|
|
2844
3026
|
//#endregion
|
|
2845
3027
|
//#region src/components/modal/modalContainer/index.tsx
|
|
2846
|
-
function
|
|
2847
|
-
let { isVisible: t, makeInvisible: n, children: r, className: i = "", ...a } = e, [s, c] = u(t), [
|
|
3028
|
+
function $n(e) {
|
|
3029
|
+
let { isVisible: t, makeInvisible: n, children: r, className: i = "", ...a } = e, [s, c] = u(t), [d, f] = u(!1), h = l(null);
|
|
2848
3030
|
o(() => {
|
|
2849
|
-
t ? (c(!0),
|
|
2850
|
-
}, [t, s]),
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
3031
|
+
t ? (c(!0), f(!1)) : s && f(!0);
|
|
3032
|
+
}, [t, s]), st(t);
|
|
3033
|
+
let g = s && !d;
|
|
3034
|
+
Bt(g, () => f(!0)), Ut(g, h);
|
|
3035
|
+
function _(e) {
|
|
3036
|
+
e.target === e.currentTarget && d && (f(!1), c(!1), n());
|
|
3037
|
+
}
|
|
3038
|
+
return s ? /* @__PURE__ */ p(Zn, {
|
|
3039
|
+
makeInvisible: () => f(!0),
|
|
2856
3040
|
children: /* @__PURE__ */ m("aside", {
|
|
2857
3041
|
className: [
|
|
2858
3042
|
"arkynModalContainer",
|
|
2859
|
-
|
|
3043
|
+
d ? "exiting" : "",
|
|
2860
3044
|
i
|
|
2861
3045
|
].filter(Boolean).join(" ").trim(),
|
|
2862
3046
|
...a,
|
|
2863
3047
|
children: [/* @__PURE__ */ p("div", {
|
|
2864
3048
|
className: "arkynModalContainerOverlay",
|
|
2865
|
-
onClick: () =>
|
|
2866
|
-
onAnimationEnd:
|
|
3049
|
+
onClick: () => f(!0),
|
|
3050
|
+
onAnimationEnd: _
|
|
2867
3051
|
}), /* @__PURE__ */ p("div", {
|
|
3052
|
+
ref: h,
|
|
3053
|
+
role: "dialog",
|
|
3054
|
+
"aria-modal": "true",
|
|
3055
|
+
tabIndex: -1,
|
|
2868
3056
|
className: "arkynModalContainerContent",
|
|
2869
3057
|
children: r
|
|
2870
3058
|
})]
|
|
@@ -2873,7 +3061,7 @@ function Un(e) {
|
|
|
2873
3061
|
}
|
|
2874
3062
|
//#endregion
|
|
2875
3063
|
//#region src/components/modal/modalFooter/index.tsx
|
|
2876
|
-
function
|
|
3064
|
+
function er(e) {
|
|
2877
3065
|
let { alignment: t = "right", className: n, ...r } = e;
|
|
2878
3066
|
return /* @__PURE__ */ p("footer", {
|
|
2879
3067
|
className: `arkynModalFooter ${t} ${n}`.trim(),
|
|
@@ -2882,8 +3070,8 @@ function Wn(e) {
|
|
|
2882
3070
|
}
|
|
2883
3071
|
//#endregion
|
|
2884
3072
|
//#region src/components/modal/modalHeader/index.tsx
|
|
2885
|
-
function
|
|
2886
|
-
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } =
|
|
3073
|
+
function tr(e) {
|
|
3074
|
+
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } = Qn();
|
|
2887
3075
|
return /* @__PURE__ */ m("header", {
|
|
2888
3076
|
className: `arkynModalHeader ${n}`.trim(),
|
|
2889
3077
|
...i,
|
|
@@ -2892,13 +3080,13 @@ function Gn(e) {
|
|
|
2892
3080
|
onClick: a,
|
|
2893
3081
|
"aria-label": "Close modal button",
|
|
2894
3082
|
className: "arkynModalHeaderCloseButton",
|
|
2895
|
-
children: /* @__PURE__ */ p(
|
|
3083
|
+
children: /* @__PURE__ */ p(te, { size: 24 })
|
|
2896
3084
|
})]
|
|
2897
3085
|
});
|
|
2898
3086
|
}
|
|
2899
3087
|
//#endregion
|
|
2900
3088
|
//#region src/components/multiSelect/multiSelectChevron/index.tsx
|
|
2901
|
-
function
|
|
3089
|
+
function nr(e) {
|
|
2902
3090
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
2903
3091
|
return n ? null : /* @__PURE__ */ p(C, {
|
|
2904
3092
|
className: `arkynMultiSelectChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -2913,18 +3101,26 @@ function Kn(e) {
|
|
|
2913
3101
|
}
|
|
2914
3102
|
//#endregion
|
|
2915
3103
|
//#region src/components/multiSelect/multiSelectContainer/index.tsx
|
|
2916
|
-
function
|
|
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
|
-
return /* @__PURE__ */ p("
|
|
3104
|
+
function rr(e) {
|
|
3105
|
+
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, containerRef: m, onContainerKeyDown: h, tabIndex: g, ariaControls: _, ariaActiveDescendant: v } = e;
|
|
3106
|
+
return /* @__PURE__ */ p("div", {
|
|
3107
|
+
ref: m,
|
|
2919
3108
|
id: d,
|
|
3109
|
+
tabIndex: g,
|
|
3110
|
+
role: "combobox",
|
|
3111
|
+
"aria-haspopup": "listbox",
|
|
3112
|
+
"aria-expanded": o,
|
|
3113
|
+
"aria-controls": _,
|
|
3114
|
+
"aria-activedescendant": v,
|
|
2920
3115
|
className: `arkynMultiSelectContainer ${f ? "hasPrefix" : ""} ${l} ${u} ${r || c || a ? "opacity" : ""} ${i ? "errored" : ""} ${o ? "focused" : ""} ${s}`,
|
|
2921
3116
|
onClick: n,
|
|
3117
|
+
onKeyDown: h,
|
|
2922
3118
|
children: t
|
|
2923
3119
|
});
|
|
2924
3120
|
}
|
|
2925
3121
|
//#endregion
|
|
2926
3122
|
//#region src/components/multiSelect/multiSelectContent/index.tsx
|
|
2927
|
-
function
|
|
3123
|
+
function ir(e) {
|
|
2928
3124
|
let { children: t, size: n } = e;
|
|
2929
3125
|
return /* @__PURE__ */ p("div", {
|
|
2930
3126
|
className: `arkynMultiSelectContent ${n}`,
|
|
@@ -2933,7 +3129,7 @@ function Jn(e) {
|
|
|
2933
3129
|
}
|
|
2934
3130
|
//#endregion
|
|
2935
3131
|
//#region src/components/multiSelect/multiSelectMark/index.tsx
|
|
2936
|
-
function
|
|
3132
|
+
function ar(e) {
|
|
2937
3133
|
let { label: t, value: n, disabled: r, handleChangeValue: i } = e;
|
|
2938
3134
|
return /* @__PURE__ */ m("div", {
|
|
2939
3135
|
className: "arkynMultiSelectMark",
|
|
@@ -2943,17 +3139,21 @@ function Yn(e) {
|
|
|
2943
3139
|
onClick: (e) => {
|
|
2944
3140
|
e.stopPropagation(), i(n);
|
|
2945
3141
|
},
|
|
2946
|
-
children: /* @__PURE__ */ p(
|
|
3142
|
+
children: /* @__PURE__ */ p(te, {})
|
|
2947
3143
|
})]
|
|
2948
3144
|
});
|
|
2949
3145
|
}
|
|
2950
3146
|
//#endregion
|
|
2951
3147
|
//#region src/components/multiSelect/multiSelectOption/index.tsx
|
|
2952
|
-
function
|
|
2953
|
-
let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a } = e;
|
|
2954
|
-
return /* @__PURE__ */ m("
|
|
3148
|
+
function or(e) {
|
|
3149
|
+
let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a, id: o, isHighlighted: s = !1 } = e, c = n(i);
|
|
3150
|
+
return /* @__PURE__ */ m("button", {
|
|
3151
|
+
type: "button",
|
|
3152
|
+
id: o,
|
|
3153
|
+
role: "option",
|
|
3154
|
+
"aria-selected": c,
|
|
2955
3155
|
onClick: () => r(i),
|
|
2956
|
-
className: `arkynMultiSelectOption ${a} ${
|
|
3156
|
+
className: `arkynMultiSelectOption ${a} ${c ? "active" : ""} ${s ? "highlighted" : ""}`,
|
|
2957
3157
|
children: [
|
|
2958
3158
|
t,
|
|
2959
3159
|
" ",
|
|
@@ -2963,36 +3163,31 @@ function Xn(e) {
|
|
|
2963
3163
|
}
|
|
2964
3164
|
//#endregion
|
|
2965
3165
|
//#region src/components/multiSelect/multiSelectOptionsContainer/index.tsx
|
|
2966
|
-
function
|
|
2967
|
-
let { children: t,
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
let e = s.current.parentElement;
|
|
2972
|
-
if (!e) return;
|
|
2973
|
-
let t = e.getBoundingClientRect();
|
|
2974
|
-
window.innerHeight - t.bottom < 300 && t.top > 300 ? d("top") : d("bottom");
|
|
2975
|
-
})();
|
|
2976
|
-
}, [n]);
|
|
2977
|
-
function f(e) {
|
|
2978
|
-
r && a(e.target.value);
|
|
3166
|
+
function sr(e) {
|
|
3167
|
+
let { children: t, id: n, isFocused: r, isSearchable: i, search: a, onSearch: o } = e, s = l(null), c = at(s, r, 300);
|
|
3168
|
+
st(r);
|
|
3169
|
+
function u(e) {
|
|
3170
|
+
i && o(e.target.value);
|
|
2979
3171
|
}
|
|
2980
|
-
return
|
|
3172
|
+
return r ? /* @__PURE__ */ m("div", {
|
|
2981
3173
|
ref: s,
|
|
3174
|
+
id: n,
|
|
3175
|
+
role: "listbox",
|
|
3176
|
+
"aria-multiselectable": "true",
|
|
2982
3177
|
className: `arkynMultiSelectOptionsContainer ${c}`,
|
|
2983
|
-
children: [
|
|
3178
|
+
children: [i && /* @__PURE__ */ p(ct, {
|
|
2984
3179
|
type: "search",
|
|
2985
3180
|
name: "search-select",
|
|
2986
3181
|
variant: "underline",
|
|
2987
|
-
leftIcon:
|
|
2988
|
-
value:
|
|
2989
|
-
onChange:
|
|
3182
|
+
leftIcon: U,
|
|
3183
|
+
value: a,
|
|
3184
|
+
onChange: u
|
|
2990
3185
|
}), t]
|
|
2991
3186
|
}) : null;
|
|
2992
3187
|
}
|
|
2993
3188
|
//#endregion
|
|
2994
3189
|
//#region src/components/multiSelect/multiSelectOverlay/index.tsx
|
|
2995
|
-
function
|
|
3190
|
+
function cr(e) {
|
|
2996
3191
|
let { isFocused: t, handleBlur: n } = e;
|
|
2997
3192
|
return t ? /* @__PURE__ */ p("aside", {
|
|
2998
3193
|
className: "arkynMultiSelectOverlay",
|
|
@@ -3001,7 +3196,7 @@ function Qn(e) {
|
|
|
3001
3196
|
}
|
|
3002
3197
|
//#endregion
|
|
3003
3198
|
//#region src/components/multiSelect/multiSelectSpinner/index.tsx
|
|
3004
|
-
function
|
|
3199
|
+
function lr(e) {
|
|
3005
3200
|
let { iconSize: t, isLoading: n } = e;
|
|
3006
3201
|
return n ? /* @__PURE__ */ p(R, {
|
|
3007
3202
|
className: "arkynMultiSelectSpinner",
|
|
@@ -3011,101 +3206,141 @@ function $n(e) {
|
|
|
3011
3206
|
}
|
|
3012
3207
|
//#endregion
|
|
3013
3208
|
//#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 } =
|
|
3209
|
+
function ur(e) {
|
|
3210
|
+
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 } = Q(), N = l(null), P = l(null), F = s(), I = g || F, L = `${I}-listbox`, R = c || M?.[t], ee = !!R, z = T || d || f, B = {
|
|
3016
3211
|
md: 20,
|
|
3017
3212
|
lg: 20
|
|
3018
|
-
}[D], [
|
|
3019
|
-
function
|
|
3020
|
-
return
|
|
3213
|
+
}[D], [V, H] = u(""), [U, W] = u(!1), [G, te] = u(o), [K, q] = u(-1), J = O || G;
|
|
3214
|
+
function ne(e) {
|
|
3215
|
+
return J.includes(e);
|
|
3021
3216
|
}
|
|
3022
|
-
function
|
|
3217
|
+
function re(e) {
|
|
3023
3218
|
return n.find((t) => t.value === e)?.label || "";
|
|
3024
3219
|
}
|
|
3025
|
-
function
|
|
3026
|
-
|
|
3220
|
+
function ie(e) {
|
|
3221
|
+
return `${L}-option-${e.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
|
|
3027
3222
|
}
|
|
3028
|
-
function
|
|
3029
|
-
U(!1),
|
|
3223
|
+
function ae() {
|
|
3224
|
+
z || !N?.current || U || (W(!0), q(-1), N.current.focus(), w?.());
|
|
3030
3225
|
}
|
|
3031
|
-
function
|
|
3032
|
-
|
|
3226
|
+
function oe() {
|
|
3227
|
+
W(!1), q(-1), S && N.current && N.current.blur();
|
|
3033
3228
|
}
|
|
3034
|
-
function
|
|
3035
|
-
|
|
3229
|
+
function Y(e) {
|
|
3230
|
+
H(e), q(-1), b && b(e);
|
|
3231
|
+
}
|
|
3232
|
+
function se(e) {
|
|
3233
|
+
ne(e) ? (te(G.filter((t) => t !== e)), x && x(G.filter((t) => t !== e))) : (te([...G, e]), x && x([...G, e])), a && oe();
|
|
3234
|
+
}
|
|
3235
|
+
let X = n.filter((t) => !!(e.onSearch || !e.isSearchable || t.label.toLowerCase().includes(V.toLowerCase())));
|
|
3236
|
+
function Z(e) {
|
|
3237
|
+
if (z) return;
|
|
3238
|
+
if (!U) {
|
|
3239
|
+
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), ae(), e.key === "ArrowDown" && q(0));
|
|
3240
|
+
return;
|
|
3241
|
+
}
|
|
3242
|
+
let t = e.target?.tagName === "INPUT", n = e.target?.tagName === "BUTTON";
|
|
3243
|
+
switch (e.key) {
|
|
3244
|
+
case "Escape":
|
|
3245
|
+
e.preventDefault(), oe(), P.current?.focus();
|
|
3246
|
+
break;
|
|
3247
|
+
case "ArrowDown":
|
|
3248
|
+
e.preventDefault(), q((e) => X.length === 0 ? -1 : e < 0 || e + 1 >= X.length ? 0 : e + 1);
|
|
3249
|
+
break;
|
|
3250
|
+
case "ArrowUp":
|
|
3251
|
+
e.preventDefault(), q((e) => X.length === 0 ? -1 : e < 0 || e - 1 < 0 ? X.length - 1 : e - 1);
|
|
3252
|
+
break;
|
|
3253
|
+
case " ":
|
|
3254
|
+
if (t || n) return;
|
|
3255
|
+
e.preventDefault(), K >= 0 && K < X.length && se(X[K].value);
|
|
3256
|
+
break;
|
|
3257
|
+
case "Enter":
|
|
3258
|
+
if (n) return;
|
|
3259
|
+
e.preventDefault(), K >= 0 && K < X.length && se(X[K].value);
|
|
3260
|
+
break;
|
|
3261
|
+
default: break;
|
|
3262
|
+
}
|
|
3036
3263
|
}
|
|
3037
|
-
let
|
|
3038
|
-
return /* @__PURE__ */ p(
|
|
3264
|
+
let ce = K >= 0 && K < X.length ? ie(X[K].value) : void 0;
|
|
3265
|
+
return /* @__PURE__ */ p(et, {
|
|
3039
3266
|
name: t,
|
|
3040
3267
|
label: _,
|
|
3041
3268
|
showAsterisk: v,
|
|
3042
3269
|
className: r,
|
|
3043
|
-
errorMessage:
|
|
3270
|
+
errorMessage: R,
|
|
3044
3271
|
unShowFieldTemplate: A,
|
|
3045
3272
|
orientation: j,
|
|
3046
|
-
children: /* @__PURE__ */ m(
|
|
3047
|
-
handleContainerFocus:
|
|
3048
|
-
disabled:
|
|
3049
|
-
isError:
|
|
3050
|
-
isFocused:
|
|
3273
|
+
children: /* @__PURE__ */ m(rr, {
|
|
3274
|
+
handleContainerFocus: ae,
|
|
3275
|
+
disabled: z,
|
|
3276
|
+
isError: ee,
|
|
3277
|
+
isFocused: U,
|
|
3051
3278
|
isLoading: d,
|
|
3052
3279
|
readOnly: f,
|
|
3053
3280
|
size: D,
|
|
3054
3281
|
variant: k,
|
|
3055
3282
|
prefixExists: !!E,
|
|
3056
|
-
id:
|
|
3283
|
+
id: I,
|
|
3284
|
+
containerRef: P,
|
|
3285
|
+
onContainerKeyDown: Z,
|
|
3286
|
+
tabIndex: z ? -1 : 0,
|
|
3287
|
+
ariaControls: L,
|
|
3288
|
+
ariaActiveDescendant: ce,
|
|
3057
3289
|
children: [
|
|
3058
3290
|
/* @__PURE__ */ p("input", {
|
|
3059
3291
|
ref: N,
|
|
3060
3292
|
name: t,
|
|
3061
|
-
value: JSON.stringify(
|
|
3293
|
+
value: JSON.stringify(J),
|
|
3062
3294
|
type: "hidden"
|
|
3063
3295
|
}),
|
|
3064
|
-
/* @__PURE__ */ p(
|
|
3065
|
-
iconSize:
|
|
3296
|
+
/* @__PURE__ */ p($, {
|
|
3297
|
+
iconSize: B,
|
|
3066
3298
|
icon: E,
|
|
3067
3299
|
className: "prefix"
|
|
3068
3300
|
}),
|
|
3069
3301
|
y && /* @__PURE__ */ p(y, {
|
|
3070
|
-
size:
|
|
3302
|
+
size: B,
|
|
3071
3303
|
strokeWidth: 2.5
|
|
3072
3304
|
}),
|
|
3073
|
-
/* @__PURE__ */ m(
|
|
3305
|
+
/* @__PURE__ */ m(ir, {
|
|
3074
3306
|
size: D,
|
|
3075
|
-
children: [
|
|
3076
|
-
label:
|
|
3307
|
+
children: [J.map((e) => /* @__PURE__ */ p(ar, {
|
|
3308
|
+
label: re(e),
|
|
3077
3309
|
value: e,
|
|
3078
|
-
handleChangeValue:
|
|
3079
|
-
disabled:
|
|
3080
|
-
}, e)),
|
|
3310
|
+
handleChangeValue: se,
|
|
3311
|
+
disabled: z
|
|
3312
|
+
}, e)), J.length <= 0 && /* @__PURE__ */ p("p", { children: i })]
|
|
3081
3313
|
}),
|
|
3082
|
-
/* @__PURE__ */ m(
|
|
3083
|
-
|
|
3314
|
+
/* @__PURE__ */ m(sr, {
|
|
3315
|
+
id: L,
|
|
3316
|
+
isFocused: U,
|
|
3084
3317
|
isSearchable: h,
|
|
3085
|
-
search:
|
|
3086
|
-
onSearch:
|
|
3087
|
-
children: [
|
|
3318
|
+
search: V,
|
|
3319
|
+
onSearch: Y,
|
|
3320
|
+
children: [X.map(({ label: e, value: t }, n) => /* @__PURE__ */ p(or, {
|
|
3321
|
+
id: ie(t),
|
|
3088
3322
|
label: e,
|
|
3089
3323
|
value: t,
|
|
3090
3324
|
size: D,
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3325
|
+
isHighlighted: n === K,
|
|
3326
|
+
handleChangeValue: se,
|
|
3327
|
+
optionHasSelected: ne
|
|
3328
|
+
}, t)), X.length <= 0 && /* @__PURE__ */ p("p", { children: C })]
|
|
3094
3329
|
}),
|
|
3095
|
-
/* @__PURE__ */ p(
|
|
3096
|
-
disabled:
|
|
3097
|
-
isFocused:
|
|
3330
|
+
/* @__PURE__ */ p(nr, {
|
|
3331
|
+
disabled: z,
|
|
3332
|
+
isFocused: U,
|
|
3098
3333
|
readOnly: f,
|
|
3099
|
-
iconSize:
|
|
3334
|
+
iconSize: B,
|
|
3100
3335
|
isLoading: d
|
|
3101
3336
|
}),
|
|
3102
|
-
/* @__PURE__ */ p(
|
|
3103
|
-
iconSize:
|
|
3337
|
+
/* @__PURE__ */ p(lr, {
|
|
3338
|
+
iconSize: B,
|
|
3104
3339
|
isLoading: d
|
|
3105
3340
|
}),
|
|
3106
|
-
/* @__PURE__ */ p(
|
|
3107
|
-
handleBlur:
|
|
3108
|
-
isFocused:
|
|
3341
|
+
/* @__PURE__ */ p(cr, {
|
|
3342
|
+
handleBlur: oe,
|
|
3343
|
+
isFocused: U
|
|
3109
3344
|
})
|
|
3110
3345
|
]
|
|
3111
3346
|
})
|
|
@@ -3113,7 +3348,7 @@ function er(e) {
|
|
|
3113
3348
|
}
|
|
3114
3349
|
//#endregion
|
|
3115
3350
|
//#region src/components/pagination/chevronButton/index.tsx
|
|
3116
|
-
function
|
|
3351
|
+
function dr(e) {
|
|
3117
3352
|
let { orientation: t, handlePageChange: n, disabled: r } = e;
|
|
3118
3353
|
return /* @__PURE__ */ p("button", {
|
|
3119
3354
|
type: "button",
|
|
@@ -3128,7 +3363,7 @@ function tr(e) {
|
|
|
3128
3363
|
}
|
|
3129
3364
|
//#endregion
|
|
3130
3365
|
//#region src/components/pagination/currentButton/index.tsx
|
|
3131
|
-
function
|
|
3366
|
+
function fr({ currentPage: e }) {
|
|
3132
3367
|
return /* @__PURE__ */ p("button", {
|
|
3133
3368
|
type: "button",
|
|
3134
3369
|
className: "arkynPaginationCurrentButton",
|
|
@@ -3138,7 +3373,7 @@ function nr({ currentPage: e }) {
|
|
|
3138
3373
|
}
|
|
3139
3374
|
//#endregion
|
|
3140
3375
|
//#region src/components/pagination/pageButton/index.tsx
|
|
3141
|
-
function
|
|
3376
|
+
function pr(e) {
|
|
3142
3377
|
let { page: t, handlePageChange: n } = e;
|
|
3143
3378
|
return /* @__PURE__ */ p("button", {
|
|
3144
3379
|
type: "button",
|
|
@@ -3149,7 +3384,7 @@ function rr(e) {
|
|
|
3149
3384
|
}
|
|
3150
3385
|
//#endregion
|
|
3151
3386
|
//#region src/components/pagination/paginationService.ts
|
|
3152
|
-
var
|
|
3387
|
+
var mr = class {
|
|
3153
3388
|
currentPage;
|
|
3154
3389
|
totalCountRegisters;
|
|
3155
3390
|
registerPerPage;
|
|
@@ -3182,7 +3417,7 @@ var ir = class {
|
|
|
3182
3417
|
};
|
|
3183
3418
|
//#endregion
|
|
3184
3419
|
//#region src/components/pagination/spread/index.tsx
|
|
3185
|
-
function
|
|
3420
|
+
function hr() {
|
|
3186
3421
|
return /* @__PURE__ */ p("p", {
|
|
3187
3422
|
className: "arkynPaginationSpread",
|
|
3188
3423
|
children: /* @__PURE__ */ p(D, {})
|
|
@@ -3190,8 +3425,8 @@ function ar() {
|
|
|
3190
3425
|
}
|
|
3191
3426
|
//#endregion
|
|
3192
3427
|
//#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
|
|
3428
|
+
function gr(e) {
|
|
3429
|
+
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 mr({
|
|
3195
3430
|
totalCountRegisters: t,
|
|
3196
3431
|
currentPage: r,
|
|
3197
3432
|
registerPerPage: i,
|
|
@@ -3202,29 +3437,29 @@ function or(e) {
|
|
|
3202
3437
|
className: "arkynPagination",
|
|
3203
3438
|
...o,
|
|
3204
3439
|
children: [
|
|
3205
|
-
/* @__PURE__ */ p(
|
|
3440
|
+
/* @__PURE__ */ p(dr, {
|
|
3206
3441
|
orientation: "left",
|
|
3207
3442
|
handlePageChange: g,
|
|
3208
3443
|
disabled: s <= 1
|
|
3209
3444
|
}),
|
|
3210
|
-
s > 1 + c && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
3445
|
+
s > 1 + c && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(pr, {
|
|
3211
3446
|
page: 1,
|
|
3212
3447
|
handlePageChange: () => h(1)
|
|
3213
|
-
}), s > 2 + c && /* @__PURE__ */ p(
|
|
3214
|
-
l.map((e) => /* @__PURE__ */ p(
|
|
3448
|
+
}), s > 2 + c && /* @__PURE__ */ p(hr, {})] }),
|
|
3449
|
+
l.map((e) => /* @__PURE__ */ p(pr, {
|
|
3215
3450
|
page: e,
|
|
3216
3451
|
handlePageChange: g
|
|
3217
3452
|
}, e)),
|
|
3218
|
-
/* @__PURE__ */ p(
|
|
3219
|
-
u.map((e) => /* @__PURE__ */ p(
|
|
3453
|
+
/* @__PURE__ */ p(fr, { currentPage: s }),
|
|
3454
|
+
u.map((e) => /* @__PURE__ */ p(pr, {
|
|
3220
3455
|
page: e,
|
|
3221
3456
|
handlePageChange: _
|
|
3222
3457
|
}, e)),
|
|
3223
|
-
s + c < d && /* @__PURE__ */ m(f, { children: [s + 1 + c < d && /* @__PURE__ */ p(
|
|
3458
|
+
s + c < d && /* @__PURE__ */ m(f, { children: [s + 1 + c < d && /* @__PURE__ */ p(hr, {}), /* @__PURE__ */ p(pr, {
|
|
3224
3459
|
page: d,
|
|
3225
3460
|
handlePageChange: () => h(d)
|
|
3226
3461
|
})] }),
|
|
3227
|
-
/* @__PURE__ */ p(
|
|
3462
|
+
/* @__PURE__ */ p(dr, {
|
|
3228
3463
|
orientation: "right",
|
|
3229
3464
|
handlePageChange: _,
|
|
3230
3465
|
disabled: s >= d
|
|
@@ -3234,14 +3469,14 @@ function or(e) {
|
|
|
3234
3469
|
}
|
|
3235
3470
|
//#endregion
|
|
3236
3471
|
//#region src/utils/phoneInputUtilities.ts
|
|
3237
|
-
function
|
|
3472
|
+
function _r(e) {
|
|
3238
3473
|
return e?.replace(/[^0-9]/g, "");
|
|
3239
3474
|
}
|
|
3240
|
-
var
|
|
3475
|
+
var vr = {
|
|
3241
3476
|
EIGHT: "(99) 9999-9999",
|
|
3242
3477
|
NINE: "(99) 99999-9999"
|
|
3243
3478
|
};
|
|
3244
|
-
function
|
|
3479
|
+
function yr(e, t, n = "9") {
|
|
3245
3480
|
let r = "", i = 0;
|
|
3246
3481
|
for (let a = 0; a < t.length; a++) if (t[a] === n) if (i < e.length) r += e[i], i++;
|
|
3247
3482
|
else break;
|
|
@@ -3249,13 +3484,13 @@ function lr(e, t, n = "9") {
|
|
|
3249
3484
|
else break;
|
|
3250
3485
|
return r;
|
|
3251
3486
|
}
|
|
3252
|
-
function
|
|
3487
|
+
function br(e) {
|
|
3253
3488
|
return e.length > 10 ? "NINE" : "EIGHT";
|
|
3254
3489
|
}
|
|
3255
|
-
var
|
|
3490
|
+
var xr = _r(vr.NINE).length;
|
|
3256
3491
|
//#endregion
|
|
3257
3492
|
//#region src/components/phoneInput/phoneInputContainer/index.tsx
|
|
3258
|
-
function
|
|
3493
|
+
function Sr(e) {
|
|
3259
3494
|
let { children: t, onFocus: n, disabled: r, isError: i, isLoading: a, isFocused: o, className: s = "", readOnly: c, variant: l, size: u } = e;
|
|
3260
3495
|
return /* @__PURE__ */ p("section", {
|
|
3261
3496
|
className: `arkynPhoneInputContainer ${l} ${u} ${r || c || a ? "opacity" : ""} ${i ? "errored" : ""} ${o ? "focused" : ""} ${s}`.trim(),
|
|
@@ -3265,7 +3500,7 @@ function fr(e) {
|
|
|
3265
3500
|
}
|
|
3266
3501
|
//#endregion
|
|
3267
3502
|
//#region src/components/phoneInput/phoneInputCountriesOverlay/index.tsx
|
|
3268
|
-
function
|
|
3503
|
+
function Cr(e) {
|
|
3269
3504
|
let { isOpen: t, onClick: n } = e;
|
|
3270
3505
|
return t ? /* @__PURE__ */ p("aside", {
|
|
3271
3506
|
className: "arkynPhoneInputCountriesOverlay",
|
|
@@ -3274,7 +3509,7 @@ function pr(e) {
|
|
|
3274
3509
|
}
|
|
3275
3510
|
//#endregion
|
|
3276
3511
|
//#region src/components/phoneInput/phoneInputCountryOption/index.tsx
|
|
3277
|
-
function
|
|
3512
|
+
function wr(e) {
|
|
3278
3513
|
let { country: t, isActive: n, handleChangeValue: r, size: i } = e;
|
|
3279
3514
|
return /* @__PURE__ */ m("div", {
|
|
3280
3515
|
onClick: () => r(t),
|
|
@@ -3294,12 +3529,12 @@ function mr(e) {
|
|
|
3294
3529
|
}
|
|
3295
3530
|
//#endregion
|
|
3296
3531
|
//#region src/components/phoneInput/phoneInputCountryOptionsContainer/index.tsx
|
|
3297
|
-
function
|
|
3532
|
+
function Tr(e) {
|
|
3298
3533
|
let { children: t, isOpen: n, onSearch: r, search: i, placeholder: a } = e, s = l(null), [c, d] = u("bottom");
|
|
3299
3534
|
function f(e) {
|
|
3300
3535
|
r(e.target.value);
|
|
3301
3536
|
}
|
|
3302
|
-
return
|
|
3537
|
+
return st(n), o(() => {
|
|
3303
3538
|
n && (() => {
|
|
3304
3539
|
if (!s.current) return;
|
|
3305
3540
|
let e = s.current.parentElement;
|
|
@@ -3323,7 +3558,7 @@ function hr(e) {
|
|
|
3323
3558
|
}
|
|
3324
3559
|
//#endregion
|
|
3325
3560
|
//#region src/components/phoneInput/phoneInputCountrySelector/index.tsx
|
|
3326
|
-
function
|
|
3561
|
+
function Er(e) {
|
|
3327
3562
|
let { currentCountry: t, onClick: n } = e;
|
|
3328
3563
|
return /* @__PURE__ */ m("div", {
|
|
3329
3564
|
className: "phoneInputSelectCountry",
|
|
@@ -3344,10 +3579,10 @@ function gr(e) {
|
|
|
3344
3579
|
}
|
|
3345
3580
|
//#endregion
|
|
3346
3581
|
//#region src/components/phoneInput/phoneInputMask/index.tsx
|
|
3347
|
-
var
|
|
3582
|
+
var Dr = r((e, t) => /* @__PURE__ */ p("input", {
|
|
3348
3583
|
ref: t,
|
|
3349
3584
|
...e
|
|
3350
|
-
})),
|
|
3585
|
+
})), Or = r((e, t) => {
|
|
3351
3586
|
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
3587
|
h.current = s;
|
|
3353
3588
|
let g = typeof u.mask == "string" ? u.mask : u.mask[0];
|
|
@@ -3360,8 +3595,8 @@ var _r = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
3360
3595
|
}, [g]);
|
|
3361
3596
|
let _ = `phoneInputMask ${a}`;
|
|
3362
3597
|
function v(e) {
|
|
3363
|
-
let t =
|
|
3364
|
-
t.length >
|
|
3598
|
+
let t = _r(e.target.value), n = br(t);
|
|
3599
|
+
t.length > xr || (t = yr(t, vr[n]), e.target.value = t, s(t));
|
|
3365
3600
|
}
|
|
3366
3601
|
return u.code === "+55" ? /* @__PURE__ */ p("input", {
|
|
3367
3602
|
id: f,
|
|
@@ -3379,7 +3614,7 @@ var _r = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
3379
3614
|
readOnly: r,
|
|
3380
3615
|
onChange: (e) => s(e.target.value),
|
|
3381
3616
|
className: _,
|
|
3382
|
-
component:
|
|
3617
|
+
component: Dr,
|
|
3383
3618
|
onFocus: n,
|
|
3384
3619
|
onBlur: i,
|
|
3385
3620
|
disabled: d,
|
|
@@ -3391,19 +3626,19 @@ var _r = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
3391
3626
|
});
|
|
3392
3627
|
//#endregion
|
|
3393
3628
|
//#region src/components/phoneInput/index.tsx
|
|
3394
|
-
function
|
|
3629
|
+
function kr(e, t) {
|
|
3395
3630
|
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" ?
|
|
3631
|
+
return t.code === "+55" ? yr(i, vr[br(i)]) : yr(i, typeof t.mask == "string" ? t.mask : t.mask[0], "_");
|
|
3397
3632
|
}
|
|
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 = se.find((e) => e.iso === "BR"), T = f ? re(f) : "", E = f ?
|
|
3400
|
-
function
|
|
3401
|
-
|
|
3633
|
+
function Ar(e) {
|
|
3634
|
+
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 ? q(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 : kr(t, F), { fieldErrors: R } = Q(), ee = l(null), z = s(), B = x || z, V = a || R?.[_], H = !!V, U = i || o, W = l(null);
|
|
3635
|
+
function G() {
|
|
3636
|
+
U || D || j || (O(!0), W.current && W.current.focus());
|
|
3402
3637
|
}
|
|
3403
|
-
function
|
|
3638
|
+
function te() {
|
|
3404
3639
|
M(!0), O(!0);
|
|
3405
3640
|
}
|
|
3406
|
-
function
|
|
3641
|
+
function K() {
|
|
3407
3642
|
M(!1), O(!1);
|
|
3408
3643
|
}
|
|
3409
3644
|
function J() {
|
|
@@ -3419,35 +3654,35 @@ function br(e) {
|
|
|
3419
3654
|
let t = F.code;
|
|
3420
3655
|
return t += ie(e || L), t;
|
|
3421
3656
|
}
|
|
3422
|
-
return /* @__PURE__ */ p(
|
|
3657
|
+
return /* @__PURE__ */ p(et, {
|
|
3423
3658
|
name: _,
|
|
3424
3659
|
label: n,
|
|
3425
3660
|
showAsterisk: g,
|
|
3426
3661
|
className: r,
|
|
3427
|
-
errorMessage:
|
|
3662
|
+
errorMessage: V,
|
|
3428
3663
|
unShowFieldTemplate: S,
|
|
3429
3664
|
orientation: C,
|
|
3430
|
-
children: /* @__PURE__ */ m(
|
|
3431
|
-
disabled:
|
|
3432
|
-
isError:
|
|
3665
|
+
children: /* @__PURE__ */ m(Sr, {
|
|
3666
|
+
disabled: U,
|
|
3667
|
+
isError: H,
|
|
3433
3668
|
isLoading: o,
|
|
3434
3669
|
isFocused: D,
|
|
3435
3670
|
readOnly: c,
|
|
3436
3671
|
size: d,
|
|
3437
3672
|
variant: h,
|
|
3438
|
-
onFocus:
|
|
3673
|
+
onFocus: G,
|
|
3439
3674
|
children: [
|
|
3440
|
-
/* @__PURE__ */ p(
|
|
3675
|
+
/* @__PURE__ */ p(Er, {
|
|
3441
3676
|
currentCountry: F,
|
|
3442
|
-
onClick:
|
|
3677
|
+
onClick: te,
|
|
3443
3678
|
size: d
|
|
3444
3679
|
}),
|
|
3445
|
-
/* @__PURE__ */ m(
|
|
3446
|
-
isOpen:
|
|
3680
|
+
/* @__PURE__ */ m(Tr, {
|
|
3681
|
+
isOpen: U || c ? !1 : j,
|
|
3447
3682
|
search: k,
|
|
3448
3683
|
placeholder: y,
|
|
3449
3684
|
onSearch: A,
|
|
3450
|
-
children: [se.filter((e) => ae(e)).map((e) => /* @__PURE__ */ p(
|
|
3685
|
+
children: [se.filter((e) => ae(e)).map((e) => /* @__PURE__ */ p(wr, {
|
|
3451
3686
|
country: e,
|
|
3452
3687
|
handleChangeValue: () => {
|
|
3453
3688
|
I(e), M(!1), P("");
|
|
@@ -3456,17 +3691,17 @@ function br(e) {
|
|
|
3456
3691
|
size: d
|
|
3457
3692
|
}, e.iso)), se.filter((e) => ae(e)).length === 0 && /* @__PURE__ */ p("p", { children: b })]
|
|
3458
3693
|
}),
|
|
3459
|
-
/* @__PURE__ */ p(
|
|
3460
|
-
isOpen:
|
|
3461
|
-
onClick:
|
|
3694
|
+
/* @__PURE__ */ p(Cr, {
|
|
3695
|
+
isOpen: U || c ? !1 : j,
|
|
3696
|
+
onClick: K
|
|
3462
3697
|
}),
|
|
3463
|
-
/* @__PURE__ */ p(
|
|
3464
|
-
id:
|
|
3465
|
-
ref:
|
|
3698
|
+
/* @__PURE__ */ p(Or, {
|
|
3699
|
+
id: B,
|
|
3700
|
+
ref: W,
|
|
3466
3701
|
readonly: c,
|
|
3467
3702
|
currentCountry: F,
|
|
3468
3703
|
value: L,
|
|
3469
|
-
disabled:
|
|
3704
|
+
disabled: U,
|
|
3470
3705
|
onBlur: ne,
|
|
3471
3706
|
onFocus: J,
|
|
3472
3707
|
size: d,
|
|
@@ -3475,7 +3710,7 @@ function br(e) {
|
|
|
3475
3710
|
}
|
|
3476
3711
|
}),
|
|
3477
3712
|
/* @__PURE__ */ p("input", {
|
|
3478
|
-
ref:
|
|
3713
|
+
ref: ee,
|
|
3479
3714
|
type: "hidden",
|
|
3480
3715
|
name: _,
|
|
3481
3716
|
value: oe()
|
|
@@ -3486,17 +3721,21 @@ function br(e) {
|
|
|
3486
3721
|
}
|
|
3487
3722
|
//#endregion
|
|
3488
3723
|
//#region src/components/popover/index.tsx
|
|
3489
|
-
function
|
|
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
|
-
function
|
|
3724
|
+
function jr(e) {
|
|
3725
|
+
let { children: t, button: n, closeOnClick: r, className: i = "", orientation: a = "bottomLeft" } = e, [o, s] = u(!1), c = l(null), d = `arkynPopover ${a} ${o ? "visibleTrue" : "visibleFalse"} ${i}`;
|
|
3726
|
+
function f() {
|
|
3492
3727
|
o || s(!0);
|
|
3493
3728
|
}
|
|
3494
|
-
return
|
|
3495
|
-
className:
|
|
3496
|
-
onClick:
|
|
3729
|
+
return st(o), Bt(o, () => s(!1)), Ut(o, c), /* @__PURE__ */ m("div", {
|
|
3730
|
+
className: d,
|
|
3731
|
+
onClick: f,
|
|
3497
3732
|
children: [
|
|
3498
3733
|
n,
|
|
3499
3734
|
/* @__PURE__ */ p("div", {
|
|
3735
|
+
ref: c,
|
|
3736
|
+
role: "dialog",
|
|
3737
|
+
"aria-modal": "true",
|
|
3738
|
+
tabIndex: -1,
|
|
3500
3739
|
style: { visibility: o ? "visible" : "hidden" },
|
|
3501
3740
|
onClick: () => r && s(!1),
|
|
3502
3741
|
className: "arkynPopoverContent",
|
|
@@ -3511,10 +3750,10 @@ function xr(e) {
|
|
|
3511
3750
|
}
|
|
3512
3751
|
//#endregion
|
|
3513
3752
|
//#region src/components/radio/radioContext.tsx
|
|
3514
|
-
var
|
|
3515
|
-
function
|
|
3753
|
+
var Mr = n({});
|
|
3754
|
+
function Nr(e) {
|
|
3516
3755
|
let { children: t, size: n, isError: r, handleChange: i, value: a, disabled: o } = e;
|
|
3517
|
-
return /* @__PURE__ */ p(
|
|
3756
|
+
return /* @__PURE__ */ p(Mr.Provider, {
|
|
3518
3757
|
value: {
|
|
3519
3758
|
handleChange: i,
|
|
3520
3759
|
value: a,
|
|
@@ -3525,13 +3764,13 @@ function Cr(e) {
|
|
|
3525
3764
|
children: t
|
|
3526
3765
|
});
|
|
3527
3766
|
}
|
|
3528
|
-
function
|
|
3529
|
-
return a(
|
|
3767
|
+
function Pr() {
|
|
3768
|
+
return a(Mr);
|
|
3530
3769
|
}
|
|
3531
3770
|
//#endregion
|
|
3532
3771
|
//#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 } =
|
|
3772
|
+
function Fr(e) {
|
|
3773
|
+
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 } = Pr(), g = d === t, _ = n || u, v = r || h, y = `arkynRadioBox ${_} ${g ? "checkedTrue" : "checkedFalse"} ${f ? "errorTrue" : "errorFalse"} ${v ? "disabledTrue" : "disabledFalse"} ${a}`;
|
|
3535
3774
|
function b(e) {
|
|
3536
3775
|
o?.(e), l(t);
|
|
3537
3776
|
}
|
|
@@ -3551,13 +3790,13 @@ function Tr(e) {
|
|
|
3551
3790
|
}
|
|
3552
3791
|
//#endregion
|
|
3553
3792
|
//#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 } =
|
|
3793
|
+
function Ir(e) {
|
|
3794
|
+
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 } = Q();
|
|
3556
3795
|
function b(e) {
|
|
3557
3796
|
v(e), s && s(e);
|
|
3558
3797
|
}
|
|
3559
3798
|
let x = a || y?.[n], S = !!x, C = `arkynRadioGroup ${c}`;
|
|
3560
|
-
return /* @__PURE__ */ p(
|
|
3799
|
+
return /* @__PURE__ */ p(et, {
|
|
3561
3800
|
name: n,
|
|
3562
3801
|
label: r,
|
|
3563
3802
|
showAsterisk: i,
|
|
@@ -3565,7 +3804,7 @@ function Er(e) {
|
|
|
3565
3804
|
errorMessage: x,
|
|
3566
3805
|
unShowFieldTemplate: f,
|
|
3567
3806
|
orientation: h,
|
|
3568
|
-
children: /* @__PURE__ */ m(
|
|
3807
|
+
children: /* @__PURE__ */ m(Nr, {
|
|
3569
3808
|
isError: S,
|
|
3570
3809
|
size: c,
|
|
3571
3810
|
value: o || _,
|
|
@@ -3586,39 +3825,39 @@ function Er(e) {
|
|
|
3586
3825
|
}
|
|
3587
3826
|
//#endregion
|
|
3588
3827
|
//#region src/services/clearLinkMarkAtBoundary.ts
|
|
3589
|
-
function
|
|
3828
|
+
function Lr(e) {
|
|
3590
3829
|
let { selection: t } = e;
|
|
3591
|
-
if (!t || !
|
|
3592
|
-
let [n, r] =
|
|
3593
|
-
n.link &&
|
|
3830
|
+
if (!t || !ue.isCollapsed(t)) return;
|
|
3831
|
+
let [n, r] = Z.leaf(e, t.anchor);
|
|
3832
|
+
n.link && Z.isEnd(e, t.anchor, r) && (Z.removeMark(e, "link"), Z.removeMark(e, "href"));
|
|
3594
3833
|
}
|
|
3595
3834
|
//#endregion
|
|
3596
3835
|
//#region src/services/extractTextFromNode.ts
|
|
3597
|
-
function
|
|
3598
|
-
return e.map((e) =>
|
|
3836
|
+
function Rr(e) {
|
|
3837
|
+
return e.map((e) => le.string(e)).join("");
|
|
3599
3838
|
}
|
|
3600
3839
|
//#endregion
|
|
3601
3840
|
//#region src/services/isMarkActive.ts
|
|
3602
|
-
function
|
|
3603
|
-
let n =
|
|
3841
|
+
function zr(e, t) {
|
|
3842
|
+
let n = Z.marks(e);
|
|
3604
3843
|
return n ? n[t] === !0 : !1;
|
|
3605
3844
|
}
|
|
3606
3845
|
//#endregion
|
|
3607
3846
|
//#region src/services/toggleMark.ts
|
|
3608
|
-
function
|
|
3609
|
-
|
|
3847
|
+
function Br(e, t) {
|
|
3848
|
+
zr(e, t) ? Z.removeMark(e, t) : Z.addMark(e, t, !0);
|
|
3610
3849
|
}
|
|
3611
3850
|
//#endregion
|
|
3612
3851
|
//#region src/templates/richTextTemplates.ts
|
|
3613
|
-
var
|
|
3852
|
+
var Vr = {
|
|
3614
3853
|
"mod+b": "bold",
|
|
3615
3854
|
"mod+i": "italic",
|
|
3616
3855
|
"mod+u": "underline",
|
|
3617
3856
|
"mod+`": "code"
|
|
3618
|
-
},
|
|
3857
|
+
}, Hr = [{
|
|
3619
3858
|
type: "paragraph",
|
|
3620
3859
|
children: [{ text: "" }]
|
|
3621
|
-
}],
|
|
3860
|
+
}], Ur = ["listItem", "numberedList"], Wr = [
|
|
3622
3861
|
"left",
|
|
3623
3862
|
"center",
|
|
3624
3863
|
"right",
|
|
@@ -3626,38 +3865,38 @@ var jr = {
|
|
|
3626
3865
|
];
|
|
3627
3866
|
//#endregion
|
|
3628
3867
|
//#region src/services/isBlockActive.ts
|
|
3629
|
-
function
|
|
3868
|
+
function Gr(e, t, n = "type") {
|
|
3630
3869
|
let { selection: r } = e;
|
|
3631
3870
|
if (!r) return !1;
|
|
3632
|
-
let [i] = Array.from(
|
|
3633
|
-
at:
|
|
3634
|
-
match: (e) => !
|
|
3871
|
+
let [i] = Array.from(Z.nodes(e, {
|
|
3872
|
+
at: Z.unhangRange(e, r),
|
|
3873
|
+
match: (e) => !Z.isEditor(e) && ce.isElement(e) && e[n] === t
|
|
3635
3874
|
}));
|
|
3636
3875
|
return !!i;
|
|
3637
3876
|
}
|
|
3638
3877
|
//#endregion
|
|
3639
3878
|
//#region src/services/toggleBlock.ts
|
|
3640
|
-
function
|
|
3641
|
-
let n =
|
|
3642
|
-
|
|
3643
|
-
match: (e) => !
|
|
3879
|
+
function Kr(e, t) {
|
|
3880
|
+
let n = Gr(e, t, Wr.includes(t) ? "align" : "type"), r = Ur.includes(t);
|
|
3881
|
+
fe.unwrapNodes(e, {
|
|
3882
|
+
match: (e) => !Z.isEditor(e) && ce.isElement(e) && Ur.includes(e.type) && !Wr.includes(t),
|
|
3644
3883
|
split: !0
|
|
3645
3884
|
});
|
|
3646
3885
|
let i;
|
|
3647
|
-
if (i =
|
|
3886
|
+
if (i = Wr.includes(t) ? { align: n ? void 0 : t } : { type: n ? "paragraph" : r ? "listItem" : t }, fe.setNodes(e, i), !n && r) {
|
|
3648
3887
|
let n = {
|
|
3649
3888
|
type: t,
|
|
3650
3889
|
children: []
|
|
3651
3890
|
};
|
|
3652
|
-
|
|
3891
|
+
fe.wrapNodes(e, n);
|
|
3653
3892
|
}
|
|
3654
3893
|
}
|
|
3655
3894
|
//#endregion
|
|
3656
3895
|
//#region src/components/richText/blockButton/index.tsx
|
|
3657
|
-
function
|
|
3658
|
-
let n =
|
|
3896
|
+
function qr({ format: e, icon: t }) {
|
|
3897
|
+
let n = _e(), r = Gr(n, e, Wr.includes(e) ? "align" : "type") ? "activeTrue" : "activeFalse";
|
|
3659
3898
|
function i(t) {
|
|
3660
|
-
t.preventDefault(),
|
|
3899
|
+
t.preventDefault(), Kr(n, e);
|
|
3661
3900
|
}
|
|
3662
3901
|
return /* @__PURE__ */ p("button", {
|
|
3663
3902
|
type: "button",
|
|
@@ -3668,7 +3907,7 @@ function Lr({ format: e, icon: t }) {
|
|
|
3668
3907
|
}
|
|
3669
3908
|
//#endregion
|
|
3670
3909
|
//#region src/components/richText/element/index.tsx
|
|
3671
|
-
function
|
|
3910
|
+
function Jr({ attributes: e, children: t, element: n }) {
|
|
3672
3911
|
let r = { textAlign: n.align };
|
|
3673
3912
|
switch (n.type) {
|
|
3674
3913
|
case "blockQuote": return /* @__PURE__ */ p("blockquote", {
|
|
@@ -3738,11 +3977,11 @@ function Rr({ attributes: e, children: t, element: n }) {
|
|
|
3738
3977
|
}
|
|
3739
3978
|
//#endregion
|
|
3740
3979
|
//#region src/components/tab/tabContext.tsx
|
|
3741
|
-
var
|
|
3742
|
-
function
|
|
3743
|
-
return a(
|
|
3980
|
+
var Yr = n({});
|
|
3981
|
+
function Xr() {
|
|
3982
|
+
return a(Yr);
|
|
3744
3983
|
}
|
|
3745
|
-
function
|
|
3984
|
+
function Zr(e) {
|
|
3746
3985
|
let { disabled: t, currentTab: n, changeCurrentTab: r } = e, i = c(() => ({
|
|
3747
3986
|
disabled: t,
|
|
3748
3987
|
currentTab: n,
|
|
@@ -3752,15 +3991,15 @@ function Vr(e) {
|
|
|
3752
3991
|
n,
|
|
3753
3992
|
r
|
|
3754
3993
|
]);
|
|
3755
|
-
return /* @__PURE__ */ p(
|
|
3994
|
+
return /* @__PURE__ */ p(Yr.Provider, {
|
|
3756
3995
|
value: i,
|
|
3757
3996
|
children: e.children
|
|
3758
3997
|
});
|
|
3759
3998
|
}
|
|
3760
3999
|
//#endregion
|
|
3761
4000
|
//#region src/components/tab/tabButton/index.tsx
|
|
3762
|
-
function
|
|
3763
|
-
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } =
|
|
4001
|
+
function Qr(e) {
|
|
4002
|
+
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } = Xr(), u = s || n, d = `arkynTabButton ${u ? "isDisabled" : ""} ${c === a && a ? "isActive" : ""} ${r}`;
|
|
3764
4003
|
function f(e) {
|
|
3765
4004
|
l(a), i?.(e);
|
|
3766
4005
|
}
|
|
@@ -3775,12 +4014,12 @@ function Hr(e) {
|
|
|
3775
4014
|
}
|
|
3776
4015
|
//#endregion
|
|
3777
4016
|
//#region src/components/tab/tabContainer/index.tsx
|
|
3778
|
-
function
|
|
4017
|
+
function $r(e) {
|
|
3779
4018
|
let { children: t, onChange: n, defaultValue: r, disabled: i = !1, className: a, ...o } = e, [s, c] = u(r || ""), l = `arkynTabContainer ${a || ""}`;
|
|
3780
4019
|
function d(e) {
|
|
3781
4020
|
c(e), n && n(e);
|
|
3782
4021
|
}
|
|
3783
|
-
return /* @__PURE__ */ p(
|
|
4022
|
+
return /* @__PURE__ */ p(Zr, {
|
|
3784
4023
|
disabled: i,
|
|
3785
4024
|
currentTab: s,
|
|
3786
4025
|
changeCurrentTab: d,
|
|
@@ -3793,8 +4032,8 @@ function Ur(e) {
|
|
|
3793
4032
|
}
|
|
3794
4033
|
//#endregion
|
|
3795
4034
|
//#region src/components/richText/insertImage/index.tsx
|
|
3796
|
-
function
|
|
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 =
|
|
4035
|
+
function ei(e) {
|
|
4036
|
+
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 = _e(), [l, d] = u(!1), [h, g] = u(""), [_, v] = u("url");
|
|
3798
4037
|
function y(e) {
|
|
3799
4038
|
e.preventDefault(), !(!h || h === "") && (c.insertNodes([
|
|
3800
4039
|
{
|
|
@@ -3817,26 +4056,26 @@ function Wr(e) {
|
|
|
3817
4056
|
className: "arkynRichTextInsertImage",
|
|
3818
4057
|
onMouseDown: () => d(!0),
|
|
3819
4058
|
children: /* @__PURE__ */ p(P, {})
|
|
3820
|
-
}), /* @__PURE__ */ m(
|
|
4059
|
+
}), /* @__PURE__ */ m($n, {
|
|
3821
4060
|
isVisible: l,
|
|
3822
4061
|
makeInvisible: () => d(!1),
|
|
3823
4062
|
children: [
|
|
3824
|
-
/* @__PURE__ */ p(
|
|
4063
|
+
/* @__PURE__ */ p(tr, { children: s }),
|
|
3825
4064
|
/* @__PURE__ */ m("div", {
|
|
3826
4065
|
className: "arkynRichTextInsertImageModalContent",
|
|
3827
4066
|
children: [
|
|
3828
|
-
/* @__PURE__ */ m(
|
|
4067
|
+
/* @__PURE__ */ m($r, {
|
|
3829
4068
|
defaultValue: _,
|
|
3830
4069
|
onChange: v,
|
|
3831
|
-
children: [/* @__PURE__ */ p(
|
|
4070
|
+
children: [/* @__PURE__ */ p(Qr, {
|
|
3832
4071
|
value: "url",
|
|
3833
4072
|
children: n[0]
|
|
3834
|
-
}), /* @__PURE__ */ p(
|
|
4073
|
+
}), /* @__PURE__ */ p(Qr, {
|
|
3835
4074
|
value: "file",
|
|
3836
4075
|
children: n[1]
|
|
3837
4076
|
})]
|
|
3838
4077
|
}),
|
|
3839
|
-
_ === "url" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
4078
|
+
_ === "url" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ct, {
|
|
3840
4079
|
type: "text",
|
|
3841
4080
|
name: "richTextImageURL",
|
|
3842
4081
|
label: o,
|
|
@@ -3848,7 +4087,7 @@ function Wr(e) {
|
|
|
3848
4087
|
src: h,
|
|
3849
4088
|
alt: "preview"
|
|
3850
4089
|
})] }),
|
|
3851
|
-
_ === "file" && /* @__PURE__ */ p(
|
|
4090
|
+
_ === "file" && /* @__PURE__ */ p(Wn, {
|
|
3852
4091
|
name: "richTextImageURL",
|
|
3853
4092
|
action: t,
|
|
3854
4093
|
label: a,
|
|
@@ -3858,13 +4097,13 @@ function Wr(e) {
|
|
|
3858
4097
|
})
|
|
3859
4098
|
]
|
|
3860
4099
|
}),
|
|
3861
|
-
/* @__PURE__ */ m(
|
|
4100
|
+
/* @__PURE__ */ m(er, { children: [/* @__PURE__ */ p(Be, {
|
|
3862
4101
|
type: "button",
|
|
3863
4102
|
scheme: "danger",
|
|
3864
4103
|
variant: "outline",
|
|
3865
4104
|
onClick: () => d(!1),
|
|
3866
4105
|
children: r
|
|
3867
|
-
}), /* @__PURE__ */ p(
|
|
4106
|
+
}), /* @__PURE__ */ p(Be, {
|
|
3868
4107
|
type: "button",
|
|
3869
4108
|
onClick: y,
|
|
3870
4109
|
children: i
|
|
@@ -3874,7 +4113,7 @@ function Wr(e) {
|
|
|
3874
4113
|
}
|
|
3875
4114
|
//#endregion
|
|
3876
4115
|
//#region src/services/isValidHttpsUrl.ts
|
|
3877
|
-
function
|
|
4116
|
+
function ti(e) {
|
|
3878
4117
|
try {
|
|
3879
4118
|
return new URL(e).protocol === "https:";
|
|
3880
4119
|
} catch {
|
|
@@ -3883,17 +4122,17 @@ function Gr(e) {
|
|
|
3883
4122
|
}
|
|
3884
4123
|
//#endregion
|
|
3885
4124
|
//#region src/components/richText/insertLink/index.tsx
|
|
3886
|
-
function
|
|
3887
|
-
let { modalCancelButton: t = "Cancelar", modalConfirmButton: n = "Confirmar", modalInputUrlLabel: r = "URL do link:", modalTitle: i = "Inserir link", invalidUrlMessage: a = "URL inválida" } = e, s =
|
|
4125
|
+
function ni(e) {
|
|
4126
|
+
let { modalCancelButton: t = "Cancelar", modalConfirmButton: n = "Confirmar", modalInputUrlLabel: r = "URL do link:", modalTitle: i = "Inserir link", invalidUrlMessage: a = "URL inválida" } = e, s = _e(), [c, l] = u(!1), [d, h] = u(""), [g, _] = u(s.selection), v = ti(d), y = d && !v ? a : "";
|
|
3888
4127
|
function b(e) {
|
|
3889
4128
|
e.preventDefault(), _(s.selection), l(!0);
|
|
3890
4129
|
}
|
|
3891
4130
|
function x(e) {
|
|
3892
|
-
e.preventDefault(), !(!v || !g) && (
|
|
4131
|
+
e.preventDefault(), !(!v || !g) && (fe.select(s, g), ue.isCollapsed(g) ? fe.insertNodes(s, {
|
|
3893
4132
|
text: d,
|
|
3894
4133
|
link: !0,
|
|
3895
4134
|
href: d
|
|
3896
|
-
}) : (
|
|
4135
|
+
}) : (Z.addMark(s, "link", !0), Z.addMark(s, "href", d)), l(!1));
|
|
3897
4136
|
}
|
|
3898
4137
|
return o(() => {
|
|
3899
4138
|
c || (h(""), _(null));
|
|
@@ -3902,14 +4141,14 @@ function Kr(e) {
|
|
|
3902
4141
|
className: "arkynRichTextInsertLink",
|
|
3903
4142
|
onMouseDown: b,
|
|
3904
4143
|
children: /* @__PURE__ */ p(L, {})
|
|
3905
|
-
}), /* @__PURE__ */ m(
|
|
4144
|
+
}), /* @__PURE__ */ m($n, {
|
|
3906
4145
|
isVisible: c,
|
|
3907
4146
|
makeInvisible: () => l(!1),
|
|
3908
4147
|
children: [
|
|
3909
|
-
/* @__PURE__ */ p(
|
|
4148
|
+
/* @__PURE__ */ p(tr, { children: i }),
|
|
3910
4149
|
/* @__PURE__ */ p("div", {
|
|
3911
4150
|
className: "arkynRichTextInsertLinkModalContent",
|
|
3912
|
-
children: /* @__PURE__ */ p(
|
|
4151
|
+
children: /* @__PURE__ */ p(ct, {
|
|
3913
4152
|
type: "text",
|
|
3914
4153
|
name: "richTextLinkURL",
|
|
3915
4154
|
label: r,
|
|
@@ -3919,13 +4158,13 @@ function Kr(e) {
|
|
|
3919
4158
|
errorMessage: y
|
|
3920
4159
|
})
|
|
3921
4160
|
}),
|
|
3922
|
-
/* @__PURE__ */ m(
|
|
4161
|
+
/* @__PURE__ */ m(er, { children: [/* @__PURE__ */ p(Be, {
|
|
3923
4162
|
type: "button",
|
|
3924
4163
|
scheme: "danger",
|
|
3925
4164
|
variant: "outline",
|
|
3926
4165
|
onClick: () => l(!1),
|
|
3927
4166
|
children: t
|
|
3928
|
-
}), /* @__PURE__ */ p(
|
|
4167
|
+
}), /* @__PURE__ */ p(Be, {
|
|
3929
4168
|
disabled: !v,
|
|
3930
4169
|
type: "button",
|
|
3931
4170
|
onClick: x,
|
|
@@ -3936,8 +4175,8 @@ function Kr(e) {
|
|
|
3936
4175
|
}
|
|
3937
4176
|
//#endregion
|
|
3938
4177
|
//#region src/components/richText/insertVideo/index.tsx
|
|
3939
|
-
function
|
|
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 =
|
|
4178
|
+
function ri(e) {
|
|
4179
|
+
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 = _e(), [c, l] = u(!1), [d, h] = u(""), [g, _] = u(""), [v, y] = u("");
|
|
3941
4180
|
function b(e) {
|
|
3942
4181
|
if (e.preventDefault(), !d || d === "") return;
|
|
3943
4182
|
let t = `https://www.youtube.com/embed/${d}`;
|
|
@@ -3959,7 +4198,7 @@ function qr(e) {
|
|
|
3959
4198
|
}
|
|
3960
4199
|
return o(() => {
|
|
3961
4200
|
if (!g || g === "") return;
|
|
3962
|
-
if (h(""), y(""), !
|
|
4201
|
+
if (h(""), y(""), !ti(g)) {
|
|
3963
4202
|
y(a);
|
|
3964
4203
|
return;
|
|
3965
4204
|
}
|
|
@@ -3971,15 +4210,15 @@ function qr(e) {
|
|
|
3971
4210
|
type: "button",
|
|
3972
4211
|
className: "arkynRichTextInsertVideo",
|
|
3973
4212
|
onMouseDown: () => l(!0),
|
|
3974
|
-
children: /* @__PURE__ */ p(
|
|
3975
|
-
}), /* @__PURE__ */ m(
|
|
4213
|
+
children: /* @__PURE__ */ p(G, {})
|
|
4214
|
+
}), /* @__PURE__ */ m($n, {
|
|
3976
4215
|
isVisible: c,
|
|
3977
4216
|
makeInvisible: () => l(!1),
|
|
3978
4217
|
children: [
|
|
3979
|
-
/* @__PURE__ */ p(
|
|
4218
|
+
/* @__PURE__ */ p(tr, { children: i }),
|
|
3980
4219
|
/* @__PURE__ */ m("div", {
|
|
3981
4220
|
className: "arkynRichTextInsertVideoModalContent",
|
|
3982
|
-
children: [/* @__PURE__ */ p(
|
|
4221
|
+
children: [/* @__PURE__ */ p(ct, {
|
|
3983
4222
|
type: "text",
|
|
3984
4223
|
name: "richTextVideoURL",
|
|
3985
4224
|
label: r,
|
|
@@ -3997,13 +4236,13 @@ function qr(e) {
|
|
|
3997
4236
|
allowFullScreen: !0
|
|
3998
4237
|
})]
|
|
3999
4238
|
}),
|
|
4000
|
-
/* @__PURE__ */ m(
|
|
4239
|
+
/* @__PURE__ */ m(er, { children: [/* @__PURE__ */ p(Be, {
|
|
4001
4240
|
type: "button",
|
|
4002
4241
|
scheme: "danger",
|
|
4003
4242
|
variant: "outline",
|
|
4004
4243
|
onClick: () => l(!1),
|
|
4005
4244
|
children: t
|
|
4006
|
-
}), /* @__PURE__ */ p(
|
|
4245
|
+
}), /* @__PURE__ */ p(Be, {
|
|
4007
4246
|
disabled: !d,
|
|
4008
4247
|
type: "button",
|
|
4009
4248
|
onClick: b,
|
|
@@ -4014,7 +4253,7 @@ function qr(e) {
|
|
|
4014
4253
|
}
|
|
4015
4254
|
//#endregion
|
|
4016
4255
|
//#region src/components/richText/leaf/index.tsx
|
|
4017
|
-
function
|
|
4256
|
+
function ii({ attributes: e, children: t, leaf: n }) {
|
|
4018
4257
|
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
4258
|
className: "arkynLeafLink",
|
|
4020
4259
|
href: n.href,
|
|
@@ -4026,10 +4265,10 @@ function Jr({ attributes: e, children: t, leaf: n }) {
|
|
|
4026
4265
|
}
|
|
4027
4266
|
//#endregion
|
|
4028
4267
|
//#region src/components/richText/markButton/index.tsx
|
|
4029
|
-
function
|
|
4030
|
-
let n =
|
|
4268
|
+
function ai({ format: e, icon: t }) {
|
|
4269
|
+
let n = _e(), r = zr(n, e) ? "activeTrue" : "activeFalse";
|
|
4031
4270
|
function i(t) {
|
|
4032
|
-
t.preventDefault(),
|
|
4271
|
+
t.preventDefault(), Br(n, e);
|
|
4033
4272
|
}
|
|
4034
4273
|
return /* @__PURE__ */ p("button", {
|
|
4035
4274
|
type: "button",
|
|
@@ -4040,7 +4279,7 @@ function Yr({ format: e, icon: t }) {
|
|
|
4040
4279
|
}
|
|
4041
4280
|
//#endregion
|
|
4042
4281
|
//#region src/components/richText/toolbar/index.tsx
|
|
4043
|
-
function
|
|
4282
|
+
function oi({ children: e }) {
|
|
4044
4283
|
return /* @__PURE__ */ p("div", {
|
|
4045
4284
|
className: "arkynRichTextToolbar",
|
|
4046
4285
|
children: e
|
|
@@ -4048,32 +4287,32 @@ function Xr({ children: e }) {
|
|
|
4048
4287
|
}
|
|
4049
4288
|
//#endregion
|
|
4050
4289
|
//#region src/components/richText/index.tsx
|
|
4051
|
-
function
|
|
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(() =>
|
|
4290
|
+
function si(e) {
|
|
4291
|
+
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(() => me(ve(pe())), []), { fieldErrors: F } = Q(), L = c(() => {
|
|
4053
4292
|
try {
|
|
4054
4293
|
let e = JSON.parse(f);
|
|
4055
|
-
return !Array.isArray(e) || e.length === 0 ? structuredClone(
|
|
4294
|
+
return !Array.isArray(e) || e.length === 0 ? structuredClone(Hr) : e.every((e) => typeof e == "object" && !!e && "type" in e && "children" in e) ? e : structuredClone(Hr);
|
|
4056
4295
|
} catch {
|
|
4057
|
-
return structuredClone(
|
|
4296
|
+
return structuredClone(Hr);
|
|
4058
4297
|
}
|
|
4059
|
-
}, [f]), [R,
|
|
4298
|
+
}, [f]), [R, ee] = u(Rr(L).length), [z, B] = u(JSON.stringify(L) || "[]"), [H, U] = u(!1), G = l(null), te = s(), K = k || te, q = S || F?.[t], J = T || !!q, ne = i(ii, []), re = i(Jr, []);
|
|
4060
4299
|
function ie(e) {
|
|
4061
|
-
let t =
|
|
4062
|
-
|
|
4300
|
+
let t = Rr(e);
|
|
4301
|
+
ee(t.length), x?.(t.length), !(h && t.length >= C) && (B(JSON.stringify(e)), w?.(e));
|
|
4063
4302
|
}
|
|
4064
|
-
let ae = `arkynRichText ${J || C < R ? "errorTrue" : "errorFalse"} ${
|
|
4303
|
+
let ae = `arkynRichText ${J || C < R ? "errorTrue" : "errorFalse"} ${H ? "focusTrue" : "focusFalse"}`, oe = C - R;
|
|
4065
4304
|
function Y(e) {
|
|
4066
4305
|
return !n?.includes(e);
|
|
4067
4306
|
}
|
|
4068
|
-
return /* @__PURE__ */ p(
|
|
4307
|
+
return /* @__PURE__ */ p(et, {
|
|
4069
4308
|
name: t,
|
|
4070
4309
|
label: D,
|
|
4071
4310
|
showAsterisk: O,
|
|
4072
4311
|
className: d,
|
|
4073
|
-
errorMessage:
|
|
4312
|
+
errorMessage: q,
|
|
4074
4313
|
unShowFieldTemplate: j,
|
|
4075
4314
|
orientation: A,
|
|
4076
|
-
children: /* @__PURE__ */ m(
|
|
4315
|
+
children: /* @__PURE__ */ m(ge, {
|
|
4077
4316
|
editor: P,
|
|
4078
4317
|
initialValue: L,
|
|
4079
4318
|
onChange: ie,
|
|
@@ -4082,70 +4321,70 @@ function Zr(e) {
|
|
|
4082
4321
|
/* @__PURE__ */ m("div", {
|
|
4083
4322
|
className: ae,
|
|
4084
4323
|
children: [
|
|
4085
|
-
/* @__PURE__ */ m(
|
|
4086
|
-
Y("headingOne") && /* @__PURE__ */ p(
|
|
4324
|
+
/* @__PURE__ */ m(oi, { children: [
|
|
4325
|
+
Y("headingOne") && /* @__PURE__ */ p(qr, {
|
|
4087
4326
|
format: "headingOne",
|
|
4088
4327
|
icon: M
|
|
4089
4328
|
}),
|
|
4090
|
-
Y("headingTwo") && /* @__PURE__ */ p(
|
|
4329
|
+
Y("headingTwo") && /* @__PURE__ */ p(qr, {
|
|
4091
4330
|
format: "headingTwo",
|
|
4092
4331
|
icon: N
|
|
4093
4332
|
}),
|
|
4094
|
-
Y("blockQuote") && /* @__PURE__ */ p(
|
|
4333
|
+
Y("blockQuote") && /* @__PURE__ */ p(qr, {
|
|
4095
4334
|
format: "blockQuote",
|
|
4096
|
-
icon:
|
|
4335
|
+
icon: V
|
|
4097
4336
|
}),
|
|
4098
|
-
Y("bold") && /* @__PURE__ */ p(
|
|
4337
|
+
Y("bold") && /* @__PURE__ */ p(ai, {
|
|
4099
4338
|
format: "bold",
|
|
4100
4339
|
icon: b
|
|
4101
4340
|
}),
|
|
4102
|
-
Y("italic") && /* @__PURE__ */ p(
|
|
4341
|
+
Y("italic") && /* @__PURE__ */ p(ai, {
|
|
4103
4342
|
format: "italic",
|
|
4104
4343
|
icon: I
|
|
4105
4344
|
}),
|
|
4106
|
-
Y("underline") && /* @__PURE__ */ p(
|
|
4345
|
+
Y("underline") && /* @__PURE__ */ p(ai, {
|
|
4107
4346
|
format: "underline",
|
|
4108
|
-
icon:
|
|
4347
|
+
icon: W
|
|
4109
4348
|
}),
|
|
4110
|
-
Y("code") && /* @__PURE__ */ p(
|
|
4349
|
+
Y("code") && /* @__PURE__ */ p(ai, {
|
|
4111
4350
|
format: "code",
|
|
4112
4351
|
icon: E
|
|
4113
4352
|
}),
|
|
4114
|
-
Y("left") && /* @__PURE__ */ p(
|
|
4353
|
+
Y("left") && /* @__PURE__ */ p(qr, {
|
|
4115
4354
|
format: "left",
|
|
4116
4355
|
icon: v
|
|
4117
4356
|
}),
|
|
4118
|
-
Y("right") && /* @__PURE__ */ p(
|
|
4357
|
+
Y("right") && /* @__PURE__ */ p(qr, {
|
|
4119
4358
|
format: "right",
|
|
4120
4359
|
icon: y
|
|
4121
4360
|
}),
|
|
4122
|
-
Y("center") && /* @__PURE__ */ p(
|
|
4361
|
+
Y("center") && /* @__PURE__ */ p(qr, {
|
|
4123
4362
|
format: "center",
|
|
4124
4363
|
icon: g
|
|
4125
4364
|
}),
|
|
4126
|
-
Y("justify") && /* @__PURE__ */ p(
|
|
4365
|
+
Y("justify") && /* @__PURE__ */ p(qr, {
|
|
4127
4366
|
format: "justify",
|
|
4128
4367
|
icon: _
|
|
4129
4368
|
}),
|
|
4130
|
-
r && Y("image") && /* @__PURE__ */ p(
|
|
4131
|
-
Y("video") && /* @__PURE__ */ p(
|
|
4132
|
-
Y("link") && /* @__PURE__ */ p(
|
|
4369
|
+
r && Y("image") && /* @__PURE__ */ p(ei, { ...r }),
|
|
4370
|
+
Y("video") && /* @__PURE__ */ p(ri, { ...a }),
|
|
4371
|
+
Y("link") && /* @__PURE__ */ p(ni, { ...o })
|
|
4133
4372
|
] }),
|
|
4134
|
-
/* @__PURE__ */ p(
|
|
4373
|
+
/* @__PURE__ */ p(he, {
|
|
4135
4374
|
className: "editorContainer",
|
|
4136
4375
|
renderElement: re,
|
|
4137
4376
|
renderLeaf: ne,
|
|
4138
4377
|
spellCheck: !0,
|
|
4139
|
-
ref:
|
|
4140
|
-
id:
|
|
4141
|
-
onFocus: () =>
|
|
4142
|
-
onBlur: () =>
|
|
4378
|
+
ref: G,
|
|
4379
|
+
id: K,
|
|
4380
|
+
onFocus: () => U(!0),
|
|
4381
|
+
onBlur: () => U(!1),
|
|
4143
4382
|
onKeyDown: (e) => {
|
|
4144
|
-
(e.key === " " || e.key === "Enter") &&
|
|
4145
|
-
for (let t in
|
|
4383
|
+
(e.key === " " || e.key === "Enter") && Lr(P);
|
|
4384
|
+
for (let t in Vr) if (X(t, e)) {
|
|
4146
4385
|
e.preventDefault();
|
|
4147
|
-
let n =
|
|
4148
|
-
|
|
4386
|
+
let n = Vr[t];
|
|
4387
|
+
Br(P, n);
|
|
4149
4388
|
}
|
|
4150
4389
|
}
|
|
4151
4390
|
}),
|
|
@@ -4158,7 +4397,7 @@ function Zr(e) {
|
|
|
4158
4397
|
/* @__PURE__ */ p("input", {
|
|
4159
4398
|
type: "hidden",
|
|
4160
4399
|
name: t,
|
|
4161
|
-
value:
|
|
4400
|
+
value: z
|
|
4162
4401
|
}),
|
|
4163
4402
|
/* @__PURE__ */ p("input", {
|
|
4164
4403
|
type: "hidden",
|
|
@@ -4171,12 +4410,12 @@ function Zr(e) {
|
|
|
4171
4410
|
}
|
|
4172
4411
|
//#endregion
|
|
4173
4412
|
//#region src/components/searchPlaces.tsx
|
|
4174
|
-
function
|
|
4413
|
+
function ci(e) {
|
|
4175
4414
|
let { onChange: t, onPlaceChanged: n, options: r, ...i } = e, [a, o] = u(null);
|
|
4176
|
-
return /* @__PURE__ */ p(
|
|
4415
|
+
return /* @__PURE__ */ p(ye, {
|
|
4177
4416
|
onLoad: (e) => o(e),
|
|
4178
4417
|
onPlacesChanged: () => {
|
|
4179
|
-
let e = a?.getPlaces(), t = e ? e[0] : null, r = t?.address_components;
|
|
4418
|
+
let e = a?.getPlaces(), t = e ? e[0] : null, r = t?.address_components ?? [];
|
|
4180
4419
|
function i(e) {
|
|
4181
4420
|
let t = r.find((t) => t.types[0] === e);
|
|
4182
4421
|
return t ? t.long_name : "";
|
|
@@ -4214,7 +4453,7 @@ function Qr(e) {
|
|
|
4214
4453
|
}
|
|
4215
4454
|
},
|
|
4216
4455
|
options: r,
|
|
4217
|
-
children: /* @__PURE__ */ p(
|
|
4456
|
+
children: /* @__PURE__ */ p(ct, {
|
|
4218
4457
|
type: "text",
|
|
4219
4458
|
autoComplete: "off",
|
|
4220
4459
|
onChange: (e) => t?.(e.target.value),
|
|
@@ -4224,12 +4463,12 @@ function Qr(e) {
|
|
|
4224
4463
|
}
|
|
4225
4464
|
//#endregion
|
|
4226
4465
|
//#region src/components/switch/index.tsx
|
|
4227
|
-
function
|
|
4466
|
+
function li(e) {
|
|
4228
4467
|
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;
|
|
4229
4468
|
function D() {
|
|
4230
4469
|
T(!w), f?.(E ? o : a || "checked");
|
|
4231
4470
|
}
|
|
4232
|
-
return /* @__PURE__ */ p(
|
|
4471
|
+
return /* @__PURE__ */ p(et, {
|
|
4233
4472
|
name: c,
|
|
4234
4473
|
label: t,
|
|
4235
4474
|
showAsterisk: _,
|
|
@@ -4255,7 +4494,7 @@ function $r(e) {
|
|
|
4255
4494
|
}
|
|
4256
4495
|
//#endregion
|
|
4257
4496
|
//#region src/components/table/tableBody/index.tsx
|
|
4258
|
-
function
|
|
4497
|
+
function ui(t) {
|
|
4259
4498
|
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;
|
|
4260
4499
|
return /* @__PURE__ */ p("tbody", {
|
|
4261
4500
|
className: o.trim(),
|
|
@@ -4271,7 +4510,7 @@ function ei(t) {
|
|
|
4271
4510
|
}
|
|
4272
4511
|
//#endregion
|
|
4273
4512
|
//#region src/components/table/tableCaption/index.tsx
|
|
4274
|
-
function
|
|
4513
|
+
function di(e) {
|
|
4275
4514
|
let { className: t, children: n, ...r } = e;
|
|
4276
4515
|
return /* @__PURE__ */ p("caption", {
|
|
4277
4516
|
className: `arkynTableCaption ${t}`.trim(),
|
|
@@ -4284,7 +4523,7 @@ function ti(e) {
|
|
|
4284
4523
|
}
|
|
4285
4524
|
//#endregion
|
|
4286
4525
|
//#region src/components/table/tableContainer/index.tsx
|
|
4287
|
-
function
|
|
4526
|
+
function fi(e) {
|
|
4288
4527
|
let { children: t, className: n, ...r } = e;
|
|
4289
4528
|
return /* @__PURE__ */ p("div", {
|
|
4290
4529
|
className: `arkynTableContainer ${n}`.trim(),
|
|
@@ -4294,7 +4533,7 @@ function ni(e) {
|
|
|
4294
4533
|
}
|
|
4295
4534
|
//#endregion
|
|
4296
4535
|
//#region src/components/table/tableFooter/index.tsx
|
|
4297
|
-
function
|
|
4536
|
+
function pi(e) {
|
|
4298
4537
|
let { className: t, children: n, ...r } = e;
|
|
4299
4538
|
return /* @__PURE__ */ m("tfoot", {
|
|
4300
4539
|
className: `arkynTableFooter ${t}`.trim(),
|
|
@@ -4310,7 +4549,7 @@ function ri(e) {
|
|
|
4310
4549
|
}
|
|
4311
4550
|
//#endregion
|
|
4312
4551
|
//#region src/components/table/tableHeader/index.tsx
|
|
4313
|
-
function
|
|
4552
|
+
function mi(e) {
|
|
4314
4553
|
let { className: t, children: n, ...r } = e;
|
|
4315
4554
|
return /* @__PURE__ */ m("thead", {
|
|
4316
4555
|
className: `arkynTableHeader ${t}`.trim(),
|
|
@@ -4320,8 +4559,8 @@ function ii(e) {
|
|
|
4320
4559
|
}
|
|
4321
4560
|
//#endregion
|
|
4322
4561
|
//#region src/components/textarea/index.tsx
|
|
4323
|
-
function
|
|
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 } =
|
|
4562
|
+
function hi(e) {
|
|
4563
|
+
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 } = Q(), [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;
|
|
4325
4564
|
function N() {
|
|
4326
4565
|
a || !D?.current || (E(!0), D.current.focus());
|
|
4327
4566
|
}
|
|
@@ -4331,10 +4570,10 @@ function ai(e) {
|
|
|
4331
4570
|
function F(e) {
|
|
4332
4571
|
E(!1), g && g(e);
|
|
4333
4572
|
}
|
|
4334
|
-
return /* @__PURE__ */ m(
|
|
4573
|
+
return /* @__PURE__ */ m(ze, {
|
|
4335
4574
|
className: r,
|
|
4336
4575
|
children: [
|
|
4337
|
-
c && /* @__PURE__ */ p(
|
|
4576
|
+
c && /* @__PURE__ */ p(Re, {
|
|
4338
4577
|
htmlFor: k,
|
|
4339
4578
|
showAsterisk: d,
|
|
4340
4579
|
children: c
|
|
@@ -4358,13 +4597,13 @@ function ai(e) {
|
|
|
4358
4597
|
...C
|
|
4359
4598
|
})
|
|
4360
4599
|
}),
|
|
4361
|
-
A && /* @__PURE__ */ p(
|
|
4600
|
+
A && /* @__PURE__ */ p(Le, { children: A })
|
|
4362
4601
|
]
|
|
4363
4602
|
});
|
|
4364
4603
|
}
|
|
4365
4604
|
//#endregion
|
|
4366
4605
|
//#region src/templates/badResponses.ts
|
|
4367
|
-
var
|
|
4606
|
+
var gi = [
|
|
4368
4607
|
"BadGateway",
|
|
4369
4608
|
"BadRequest",
|
|
4370
4609
|
"Conflict",
|
|
@@ -4374,13 +4613,13 @@ var oi = [
|
|
|
4374
4613
|
"ServerError",
|
|
4375
4614
|
"Unauthorized",
|
|
4376
4615
|
"UnprocessableEntity"
|
|
4377
|
-
],
|
|
4616
|
+
], _i = [
|
|
4378
4617
|
"Created",
|
|
4379
4618
|
"Found",
|
|
4380
4619
|
"Success",
|
|
4381
4620
|
"Updated"
|
|
4382
|
-
],
|
|
4383
|
-
function
|
|
4621
|
+
], vi = n({});
|
|
4622
|
+
function yi(e) {
|
|
4384
4623
|
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) => {
|
|
4385
4624
|
r((n) => [...n.filter((t) => t.key !== e), {
|
|
4386
4625
|
key: e,
|
|
@@ -4403,15 +4642,15 @@ function li(e) {
|
|
|
4403
4642
|
l,
|
|
4404
4643
|
d
|
|
4405
4644
|
]);
|
|
4406
|
-
return /* @__PURE__ */ p(
|
|
4645
|
+
return /* @__PURE__ */ p(vi.Provider, {
|
|
4407
4646
|
value: f,
|
|
4408
4647
|
children: t
|
|
4409
4648
|
});
|
|
4410
4649
|
}
|
|
4411
4650
|
//#endregion
|
|
4412
4651
|
//#region src/hooks/useModal.ts
|
|
4413
|
-
function
|
|
4414
|
-
let t = a(
|
|
4652
|
+
function bi(e) {
|
|
4653
|
+
let t = a(vi);
|
|
4415
4654
|
if (Object.entries(t).length === 0) throw Error("useModal must be used within a Provider");
|
|
4416
4655
|
if (e) {
|
|
4417
4656
|
let { modalData: n, modalIsOpen: r, openModal: i, closeModal: a } = t;
|
|
@@ -4425,10 +4664,10 @@ function ui(e) {
|
|
|
4425
4664
|
}
|
|
4426
4665
|
//#endregion
|
|
4427
4666
|
//#region src/providers/toastProvider.tsx
|
|
4428
|
-
var
|
|
4429
|
-
function
|
|
4667
|
+
var xi = n({});
|
|
4668
|
+
function Si(e) {
|
|
4430
4669
|
switch (e.type) {
|
|
4431
|
-
case "success": return
|
|
4670
|
+
case "success": return Se.success(e.message, {
|
|
4432
4671
|
style: {
|
|
4433
4672
|
background: "#10B981",
|
|
4434
4673
|
color: "#ffffff",
|
|
@@ -4441,7 +4680,7 @@ function fi(e) {
|
|
|
4441
4680
|
secondary: "#ffffff"
|
|
4442
4681
|
}
|
|
4443
4682
|
});
|
|
4444
|
-
case "danger": return
|
|
4683
|
+
case "danger": return Se.error(e.message, {
|
|
4445
4684
|
style: {
|
|
4446
4685
|
background: "#E11D48",
|
|
4447
4686
|
color: "#ffffff",
|
|
@@ -4456,11 +4695,11 @@ function fi(e) {
|
|
|
4456
4695
|
});
|
|
4457
4696
|
}
|
|
4458
4697
|
}
|
|
4459
|
-
function
|
|
4460
|
-
let t = c(() => ({ showToast:
|
|
4461
|
-
return /* @__PURE__ */ m(
|
|
4698
|
+
function Ci({ children: e }) {
|
|
4699
|
+
let t = c(() => ({ showToast: Si }), []);
|
|
4700
|
+
return /* @__PURE__ */ m(xi.Provider, {
|
|
4462
4701
|
value: t,
|
|
4463
|
-
children: [/* @__PURE__ */ p(
|
|
4702
|
+
children: [/* @__PURE__ */ p(Ce, {
|
|
4464
4703
|
position: "top-right",
|
|
4465
4704
|
containerStyle: { zIndex: 999999999999999 }
|
|
4466
4705
|
}), e]
|
|
@@ -4468,21 +4707,21 @@ function pi({ children: e }) {
|
|
|
4468
4707
|
}
|
|
4469
4708
|
//#endregion
|
|
4470
4709
|
//#region src/hooks/useToast.ts
|
|
4471
|
-
function
|
|
4472
|
-
let e = a(
|
|
4710
|
+
function wi() {
|
|
4711
|
+
let e = a(xi);
|
|
4473
4712
|
if (Object.entries(e).length === 0) throw Error("useToast must be used within a Provider");
|
|
4474
4713
|
return e;
|
|
4475
4714
|
}
|
|
4476
4715
|
//#endregion
|
|
4477
4716
|
//#region src/hooks/useAutomation.ts
|
|
4478
|
-
function
|
|
4479
|
-
let { closeAll: t } =
|
|
4717
|
+
function Ti(e) {
|
|
4718
|
+
let { closeAll: t } = bi(), { showToast: n } = wi(), 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(() => {
|
|
4480
4719
|
if (!(!a && !l)) {
|
|
4481
|
-
if (
|
|
4720
|
+
if (_i.includes(s)) return n({
|
|
4482
4721
|
message: a,
|
|
4483
4722
|
type: "success"
|
|
4484
4723
|
});
|
|
4485
|
-
if (
|
|
4724
|
+
if (gi.includes(s)) {
|
|
4486
4725
|
if (l) return n({
|
|
4487
4726
|
message: l,
|
|
4488
4727
|
type: "danger"
|
|
@@ -4500,7 +4739,7 @@ function hi(e) {
|
|
|
4500
4739
|
n
|
|
4501
4740
|
]);
|
|
4502
4741
|
o(() => {
|
|
4503
|
-
r && t(), c &&
|
|
4742
|
+
r && t(), c && xe.scrollTo(c, {
|
|
4504
4743
|
smooth: !0,
|
|
4505
4744
|
offset: 20
|
|
4506
4745
|
}), u();
|
|
@@ -4513,7 +4752,7 @@ function hi(e) {
|
|
|
4513
4752
|
}
|
|
4514
4753
|
//#endregion
|
|
4515
4754
|
//#region src/hooks/useCopyToClipboard.ts
|
|
4516
|
-
function
|
|
4755
|
+
function Ei(e) {
|
|
4517
4756
|
let t = document.createElement("textarea");
|
|
4518
4757
|
t.value = e, t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select();
|
|
4519
4758
|
try {
|
|
@@ -4522,13 +4761,13 @@ function gi(e) {
|
|
|
4522
4761
|
document.body.removeChild(t);
|
|
4523
4762
|
}
|
|
4524
4763
|
}
|
|
4525
|
-
function
|
|
4764
|
+
function Di() {
|
|
4526
4765
|
async function e(e) {
|
|
4527
4766
|
try {
|
|
4528
4767
|
return await navigator.clipboard.writeText(e), !0;
|
|
4529
4768
|
} catch {
|
|
4530
4769
|
try {
|
|
4531
|
-
return
|
|
4770
|
+
return Ei(e);
|
|
4532
4771
|
} catch {
|
|
4533
4772
|
return !1;
|
|
4534
4773
|
}
|
|
@@ -4538,8 +4777,8 @@ function _i() {
|
|
|
4538
4777
|
}
|
|
4539
4778
|
//#endregion
|
|
4540
4779
|
//#region src/providers/drawerProvider.tsx
|
|
4541
|
-
var
|
|
4542
|
-
function
|
|
4780
|
+
var Oi = n({});
|
|
4781
|
+
function ki(e) {
|
|
4543
4782
|
let { children: t = !1 } = e, [n, r] = u([]);
|
|
4544
4783
|
function i(e) {
|
|
4545
4784
|
return !!n.some((t) => t.key === e);
|
|
@@ -4559,7 +4798,7 @@ function yi(e) {
|
|
|
4559
4798
|
function s(e) {
|
|
4560
4799
|
r(n.filter((t) => t.key !== e));
|
|
4561
4800
|
}
|
|
4562
|
-
return /* @__PURE__ */ p(
|
|
4801
|
+
return /* @__PURE__ */ p(Oi.Provider, {
|
|
4563
4802
|
value: {
|
|
4564
4803
|
drawerIsOpen: i,
|
|
4565
4804
|
drawerData: a,
|
|
@@ -4571,8 +4810,8 @@ function yi(e) {
|
|
|
4571
4810
|
}
|
|
4572
4811
|
//#endregion
|
|
4573
4812
|
//#region src/hooks/useDrawer.ts
|
|
4574
|
-
function
|
|
4575
|
-
let t = a(
|
|
4813
|
+
function Ai(e) {
|
|
4814
|
+
let t = a(Oi);
|
|
4576
4815
|
if (Object.entries(t).length === 0) throw Error("useDrawer must be used within a Provider");
|
|
4577
4816
|
if (e) {
|
|
4578
4817
|
let { drawerData: n, drawerIsOpen: r, openDrawer: i, closeDrawer: a } = t;
|
|
@@ -4586,7 +4825,7 @@ function bi(e) {
|
|
|
4586
4825
|
}
|
|
4587
4826
|
//#endregion
|
|
4588
4827
|
//#region src/hooks/useScopedParams.ts
|
|
4589
|
-
function
|
|
4828
|
+
function ji(e, t = "") {
|
|
4590
4829
|
let n = new URLSearchParams(e), r = t ? `${t}:` : "", i = (e) => {
|
|
4591
4830
|
Object.entries(e).forEach(([e, t]) => {
|
|
4592
4831
|
t === void 0 ? n.delete(`${r}${e}`) : n.set(`${r}${e}`, String(t));
|
|
@@ -4603,8 +4842,8 @@ function xi(e, t = "") {
|
|
|
4603
4842
|
}
|
|
4604
4843
|
//#endregion
|
|
4605
4844
|
//#region src/hooks/useSearchAutomation.ts
|
|
4606
|
-
function
|
|
4607
|
-
let { closeAll: n } =
|
|
4845
|
+
function Mi(e, t = "") {
|
|
4846
|
+
let { closeAll: n } = bi(), { showToast: r } = wi(), { getParam: i } = ji(e, t), a = i("closeModal") === "true", s = i("message"), c = i("name"), l = i("type");
|
|
4608
4847
|
o(() => {
|
|
4609
4848
|
a && n(), s && (l === "success" && r({
|
|
4610
4849
|
message: s,
|
|
@@ -4612,10 +4851,10 @@ function Si(e, t = "") {
|
|
|
4612
4851
|
}), l === "danger" && r({
|
|
4613
4852
|
message: s,
|
|
4614
4853
|
type: "danger"
|
|
4615
|
-
}), c &&
|
|
4854
|
+
}), c && gi.includes(c) && !gi.includes(s) && r({
|
|
4616
4855
|
message: s,
|
|
4617
4856
|
type: "danger"
|
|
4618
|
-
}), c &&
|
|
4857
|
+
}), c && _i.includes(c) && !_i.includes(s) && r({
|
|
4619
4858
|
message: s,
|
|
4620
4859
|
type: "success"
|
|
4621
4860
|
}));
|
|
@@ -4630,28 +4869,28 @@ function Si(e, t = "") {
|
|
|
4630
4869
|
}
|
|
4631
4870
|
//#endregion
|
|
4632
4871
|
//#region src/providers/placesProvider.tsx
|
|
4633
|
-
var
|
|
4872
|
+
var Ni = [
|
|
4634
4873
|
"places",
|
|
4635
4874
|
"marker",
|
|
4636
4875
|
"maps"
|
|
4637
4876
|
];
|
|
4638
|
-
function
|
|
4639
|
-
let { apiKey: t, children: n, preventFontsLoading: r = !0 } = e, { isLoaded: i } =
|
|
4877
|
+
function Pi(e) {
|
|
4878
|
+
let { apiKey: t, children: n, preventFontsLoading: r = !0 } = e, { isLoaded: i } = be({
|
|
4640
4879
|
googleMapsApiKey: t,
|
|
4641
|
-
libraries:
|
|
4880
|
+
libraries: Ni,
|
|
4642
4881
|
preventGoogleFontsLoading: r
|
|
4643
4882
|
});
|
|
4644
4883
|
return /* @__PURE__ */ p(f, { children: n(i) });
|
|
4645
4884
|
}
|
|
4646
4885
|
//#endregion
|
|
4647
4886
|
//#region src/utils/richTextUtilities.ts
|
|
4648
|
-
function
|
|
4649
|
-
if (
|
|
4887
|
+
function Fi(e) {
|
|
4888
|
+
if (de.isText(e)) {
|
|
4650
4889
|
let t = e?.text;
|
|
4651
4890
|
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;
|
|
4652
4891
|
}
|
|
4653
|
-
if (
|
|
4654
|
-
let t = e.children?.map((e) =>
|
|
4892
|
+
if (ce.isElement(e)) {
|
|
4893
|
+
let t = e.children?.map((e) => Fi(e)).join(""), n = e.align || "left";
|
|
4655
4894
|
switch (e.type) {
|
|
4656
4895
|
case "video": return `<iframe src="${e.src}" class="align_${n}" />`;
|
|
4657
4896
|
case "image": return `<img src="${e.src}" class="align_${n}" />`;
|
|
@@ -4667,10 +4906,10 @@ function Ti(e) {
|
|
|
4667
4906
|
}
|
|
4668
4907
|
return "";
|
|
4669
4908
|
}
|
|
4670
|
-
function
|
|
4909
|
+
function Ii(e) {
|
|
4671
4910
|
if (typeof e == "string") return { text: e };
|
|
4672
4911
|
let t = e.props.children, n;
|
|
4673
|
-
n = Array.isArray(t) ? t.map((e) =>
|
|
4912
|
+
n = Array.isArray(t) ? t.map((e) => Ii(e)) : typeof t == "string" || !t ? [{ text: t || "" }] : [Ii(t)];
|
|
4674
4913
|
let r = e.props.className?.replace("align_", "");
|
|
4675
4914
|
switch (e.type) {
|
|
4676
4915
|
case "img": return {
|
|
@@ -4740,16 +4979,16 @@ function Ei(e) {
|
|
|
4740
4979
|
}
|
|
4741
4980
|
//#endregion
|
|
4742
4981
|
//#region src/services/toHtml.ts
|
|
4743
|
-
function
|
|
4744
|
-
return e.map((e) =>
|
|
4982
|
+
function Li(e) {
|
|
4983
|
+
return e.map((e) => Fi(e)).join("");
|
|
4745
4984
|
}
|
|
4746
4985
|
//#endregion
|
|
4747
4986
|
//#region src/services/toRichTextValue.ts
|
|
4748
|
-
function
|
|
4749
|
-
let t =
|
|
4750
|
-
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? { text: e } :
|
|
4987
|
+
function Ri(e) {
|
|
4988
|
+
let t = we(e);
|
|
4989
|
+
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? { text: e } : Ii(e)) : typeof t == "string" ? [{ text: t }] : [Ii(t)];
|
|
4751
4990
|
}
|
|
4752
4991
|
//#endregion
|
|
4753
|
-
export {
|
|
4992
|
+
export { Oe as AlertContainer, ke as AlertContent, Ae as AlertDescription, je as AlertIcon, Te as AlertTitle, Pe as AudioPlayer, Ke as AudioUpload, qe as Badge, Be as Button, vt as Calendar, St as CardTabButton, Ct as CardTabContainer, wt as Checkbox, Dt as ClientOnly, At as CurrencyInput, zt as DatePicker, Ve as Divider, qt as DrawerContainer, Jt as DrawerHeader, ki as DrawerProvider, Zt as FacebookPixel, Le as FieldError, Re as FieldLabel, ze as FieldWrapper, en as FileUpload, Ie as FormProvider, On as FullCalendar, Fn as GoogleAnalytics, Vn as GoogleTagManager, He as IconButton, Wn as ImageUpload, ct as Input, qn as MapView, Yn as MaskedInput, $n as ModalContainer, er as ModalFooter, tr as ModalHeader, yi as ModalProvider, ur as MultiSelect, gr as Pagination, Ar as PhoneInput, Pi as PlacesProvider, jr as Popover, Fr as RadioBox, Ir as RadioGroup, si as RichText, ci as SearchPlaces, ft as Select, Ne as Slider, li as Switch, Qr as TabButton, $r as TabContainer, ui as TableBody, di as TableCaption, fi as TableContainer, pi as TableFooter, mi as TableHeader, hi as Textarea, Ci as ToastProvider, Ue as Tooltip, Li as toHtml, Ri as toRichTextValue, Ti as useAutomation, Di as useCopyToClipboard, Ai as useDrawer, Q as useForm, Et as useHydrated, bi as useModal, ji as useScopedParams, st as useScrollLock, Mi as useSearchAutomation, Me as useSlider, wi as useToast };
|
|
4754
4993
|
|
|
4755
4994
|
//# sourceMappingURL=index.js.map
|