@arkyn/components 3.0.11 → 3.0.12
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/README.md +1 -1
- package/dist/components/__test__/calendar.test-d.d.ts +2 -0
- package/dist/components/__test__/calendar.test-d.d.ts.map +1 -0
- package/dist/components/__test__/datePicker.test-d.d.ts +2 -0
- package/dist/components/__test__/datePicker.test-d.d.ts.map +1 -0
- package/dist/components/audioUpload/hasFileContent/index.d.ts +1 -0
- package/dist/components/audioUpload/hasFileContent/index.d.ts.map +1 -1
- package/dist/components/audioUpload/index.d.ts +9 -0
- package/dist/components/audioUpload/index.d.ts.map +1 -1
- package/dist/components/checkbox/index.d.ts.map +1 -1
- package/dist/components/radio/radioBox/index.d.ts.map +1 -1
- package/dist/components/slider/index.d.ts +7 -29
- package/dist/components/slider/index.d.ts.map +1 -1
- package/dist/components/switch/index.d.ts.map +1 -1
- package/dist/components/tooltip/index.d.ts +8 -2
- package/dist/components/tooltip/index.d.ts.map +1 -1
- package/dist/index.js +793 -710
- package/dist/index.js.map +1 -1
- package/dist/modules/components/audioUpload/hasFileContent/index.js +5 -5
- package/dist/modules/components/audioUpload/hasFileContent/index.js.map +1 -1
- package/dist/modules/components/audioUpload/index.js +30 -29
- package/dist/modules/components/audioUpload/index.js.map +1 -1
- package/dist/modules/components/checkbox/index.js +2 -0
- package/dist/modules/components/checkbox/index.js.map +1 -1
- package/dist/modules/components/radio/radioBox/index.js +2 -0
- package/dist/modules/components/radio/radioBox/index.js.map +1 -1
- package/dist/modules/components/radio/radioGroup/index.js +1 -0
- package/dist/modules/components/radio/radioGroup/index.js.map +1 -1
- package/dist/modules/components/slider/index.js +76 -27
- package/dist/modules/components/slider/index.js.map +1 -1
- package/dist/modules/components/switch/index.js +2 -0
- package/dist/modules/components/switch/index.js.map +1 -1
- package/dist/modules/components/tooltip/index.js +20 -19
- package/dist/modules/components/tooltip/index.js.map +1 -1
- package/dist/modules/utils/sanitizeTooltipHtml.js +29 -0
- package/dist/modules/utils/sanitizeTooltipHtml.js.map +1 -0
- package/dist/utils/sanitizeTooltipHtml.d.ts +16 -0
- package/dist/utils/sanitizeTooltipHtml.d.ts.map +1 -0
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
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
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 {
|
|
5
|
-
import ae from "
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import we from "
|
|
4
|
+
import { filterXSS as q } from "xss";
|
|
5
|
+
import { findCountryMask as ne, formatToCapitalizeFirstWordLetter as re, formatToCurrency as ie, formatToPhone as ae, removeNonNumeric as oe } from "@arkyn/shared";
|
|
6
|
+
import J from "mapbox-gl";
|
|
7
|
+
import { createRoot as Y } from "react-dom/client";
|
|
8
|
+
import { InputMask as se } from "@react-input/mask";
|
|
9
|
+
import { countries as X } from "@arkyn/templates";
|
|
10
|
+
import { isHotkey as ce } from "is-hotkey";
|
|
11
|
+
import { Editor as Z, Element as le, Node as ue, Range as de, Text as fe, Transforms as pe, createEditor as me } from "slate";
|
|
12
|
+
import { withHistory as he } from "slate-history";
|
|
13
|
+
import { Editable as ge, Slate as _e, useSlate as ve, withReact as ye } from "slate-react";
|
|
14
|
+
import { StandaloneSearchBox as be, useLoadScript as xe } from "@react-google-maps/api";
|
|
15
|
+
import { scroller as Se } from "react-scroll";
|
|
16
|
+
import Ce, { Toaster as we } from "react-hot-toast";
|
|
17
|
+
import Te from "html-react-parser";
|
|
17
18
|
//#region src/components/alert/alertTitle/index.tsx
|
|
18
|
-
function
|
|
19
|
+
function Ee(e) {
|
|
19
20
|
let { className: t, ...n } = e;
|
|
20
21
|
return /* @__PURE__ */ p("div", {
|
|
21
22
|
className: `arkynAlertTitle ${t}`.trim(),
|
|
@@ -24,18 +25,18 @@ function Te(e) {
|
|
|
24
25
|
}
|
|
25
26
|
//#endregion
|
|
26
27
|
//#region src/components/alert/alertContainer/index.tsx
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return a(
|
|
28
|
+
var De = n({});
|
|
29
|
+
function Oe() {
|
|
30
|
+
return a(De);
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function ke(e) {
|
|
32
33
|
let { scheme: t, children: n, className: r, ...i } = e, a = `arkynAlertContainer ${t} ${((e) => {
|
|
33
34
|
let t = !1, n = (e) => {
|
|
34
|
-
Array.isArray(e) ? e.forEach(n) : e && typeof e == "object" && "type" in e && (e.type ===
|
|
35
|
+
Array.isArray(e) ? e.forEach(n) : e && typeof e == "object" && "type" in e && (e.type === Ee ? t = !0 : e.props && typeof e.props == "object" && e.props !== null && "children" in e.props && n(e.props.children));
|
|
35
36
|
};
|
|
36
37
|
return n(e), t;
|
|
37
38
|
})(n) ? "existsAlertTitle" : "nonExistsAlertTitle"} ${r}`, o = c(() => ({ scheme: t }), [t]);
|
|
38
|
-
return /* @__PURE__ */ p(
|
|
39
|
+
return /* @__PURE__ */ p(De.Provider, {
|
|
39
40
|
value: o,
|
|
40
41
|
children: /* @__PURE__ */ p("div", {
|
|
41
42
|
className: a.trim(),
|
|
@@ -46,7 +47,7 @@ function Oe(e) {
|
|
|
46
47
|
}
|
|
47
48
|
//#endregion
|
|
48
49
|
//#region src/components/alert/alertContent/index.tsx
|
|
49
|
-
function
|
|
50
|
+
function Ae(e) {
|
|
50
51
|
let { className: t, ...n } = e;
|
|
51
52
|
return /* @__PURE__ */ p("div", {
|
|
52
53
|
className: `arkynAlertContent ${t}`.trim(),
|
|
@@ -55,7 +56,7 @@ function ke(e) {
|
|
|
55
56
|
}
|
|
56
57
|
//#endregion
|
|
57
58
|
//#region src/components/alert/alertDescription/index.tsx
|
|
58
|
-
function
|
|
59
|
+
function je(e) {
|
|
59
60
|
let { className: t, ...n } = e;
|
|
60
61
|
return /* @__PURE__ */ p("div", {
|
|
61
62
|
className: `arkynAlertDescription ${t}`.trim(),
|
|
@@ -64,8 +65,8 @@ function Ae(e) {
|
|
|
64
65
|
}
|
|
65
66
|
//#endregion
|
|
66
67
|
//#region src/components/alert/alertIcon/index.tsx
|
|
67
|
-
function
|
|
68
|
-
let { className: t, ...n } = e, { scheme: r } =
|
|
68
|
+
function Me(e) {
|
|
69
|
+
let { className: t, ...n } = e, { scheme: r } = Oe(), i = `arkynAlertIcon ${r} ${t}`;
|
|
69
70
|
switch (r) {
|
|
70
71
|
case "success": return /* @__PURE__ */ p(S, {
|
|
71
72
|
className: i,
|
|
@@ -87,7 +88,7 @@ function je(e) {
|
|
|
87
88
|
}
|
|
88
89
|
//#endregion
|
|
89
90
|
//#region src/hooks/useSlider.ts
|
|
90
|
-
function
|
|
91
|
+
function Ne(e) {
|
|
91
92
|
function t() {
|
|
92
93
|
return !e || e <= 0 ? 0 : e >= 100 ? 100 : e;
|
|
93
94
|
}
|
|
@@ -99,35 +100,84 @@ function Me(e) {
|
|
|
99
100
|
}
|
|
100
101
|
//#endregion
|
|
101
102
|
//#region src/components/slider/index.tsx
|
|
102
|
-
function
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
function Pe(e) {
|
|
104
|
+
return Math.min(Math.max(e, 0), 100);
|
|
105
|
+
}
|
|
106
|
+
function Fe(e) {
|
|
107
|
+
let { onChange: t, value: n, disabled: r = !1, onDragging: a, className: s = "", step: c = 1, ...d } = e, [f, h] = u(!1), g = l(null), _ = i((e) => {
|
|
108
|
+
if (!g.current) return null;
|
|
109
|
+
let t = g.current.getBoundingClientRect();
|
|
110
|
+
return t.width === 0 ? null : Pe((e - t.left) / t.width * 100);
|
|
111
|
+
}, []), v = () => h(!0), y = i(() => h(!1), []), b = i((e) => {
|
|
112
|
+
if (r || !f) return;
|
|
113
|
+
let n = _(e.clientX);
|
|
114
|
+
n !== null && t(n);
|
|
107
115
|
}, [
|
|
108
116
|
r,
|
|
109
|
-
|
|
110
|
-
t
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
f,
|
|
118
|
+
t,
|
|
119
|
+
_
|
|
120
|
+
]), x = i((e) => {
|
|
121
|
+
if (r || !f) return;
|
|
122
|
+
let n = e.touches[0];
|
|
123
|
+
if (!n) return;
|
|
124
|
+
let i = _(n.clientX);
|
|
125
|
+
i !== null && t(i);
|
|
126
|
+
}, [
|
|
127
|
+
r,
|
|
128
|
+
f,
|
|
129
|
+
t,
|
|
130
|
+
_
|
|
131
|
+
]), S = (e) => {
|
|
132
|
+
if (r) return;
|
|
133
|
+
let n = _(e.clientX);
|
|
134
|
+
n !== null && t(n);
|
|
135
|
+
}, C = (e) => {
|
|
136
|
+
if (r) return;
|
|
137
|
+
h(!0);
|
|
138
|
+
let n = e.touches[0];
|
|
139
|
+
if (!n) return;
|
|
140
|
+
let i = _(n.clientX);
|
|
141
|
+
i !== null && t(i);
|
|
142
|
+
}, w = (e) => {
|
|
143
|
+
if (r) return;
|
|
144
|
+
let i = c * 10, a = {
|
|
145
|
+
ArrowLeft: n - c,
|
|
146
|
+
ArrowDown: n - c,
|
|
147
|
+
ArrowRight: n + c,
|
|
148
|
+
ArrowUp: n + c,
|
|
149
|
+
PageDown: n - i,
|
|
150
|
+
PageUp: n + i,
|
|
151
|
+
Home: 0,
|
|
152
|
+
End: 100
|
|
153
|
+
}[e.key];
|
|
154
|
+
a !== void 0 && (e.preventDefault(), t(Pe(a)));
|
|
115
155
|
};
|
|
116
|
-
o(() => (
|
|
117
|
-
document.removeEventListener("mousemove",
|
|
156
|
+
o(() => (f ? (a?.(!0), document.addEventListener("mousemove", b), document.addEventListener("mouseup", y), document.addEventListener("touchmove", x), document.addEventListener("touchend", y)) : (a?.(!1), document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", y), document.removeEventListener("touchmove", x), document.removeEventListener("touchend", y)), () => {
|
|
157
|
+
document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", y), document.removeEventListener("touchmove", x), document.removeEventListener("touchend", y);
|
|
118
158
|
}), [
|
|
119
|
-
|
|
159
|
+
f,
|
|
120
160
|
a,
|
|
121
|
-
|
|
122
|
-
|
|
161
|
+
y,
|
|
162
|
+
b,
|
|
163
|
+
x
|
|
123
164
|
]);
|
|
124
|
-
let
|
|
165
|
+
let T = `arkynSliderTrack ${f ? "isDragging" : "isNotDragging"} ${r ? "isDisabled" : "isEnabled"} ${s}`;
|
|
125
166
|
return /* @__PURE__ */ m("div", {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
167
|
+
role: "slider",
|
|
168
|
+
"aria-valuemin": 0,
|
|
169
|
+
"aria-valuemax": 100,
|
|
170
|
+
"aria-valuenow": n,
|
|
171
|
+
"aria-orientation": "horizontal",
|
|
172
|
+
"aria-disabled": r || void 0,
|
|
173
|
+
tabIndex: r ? -1 : 0,
|
|
174
|
+
...d,
|
|
175
|
+
className: T,
|
|
176
|
+
onMouseDown: v,
|
|
177
|
+
onTouchStart: C,
|
|
178
|
+
onClick: S,
|
|
179
|
+
onKeyDown: w,
|
|
180
|
+
ref: g,
|
|
131
181
|
children: [/* @__PURE__ */ p("div", {
|
|
132
182
|
className: "arkynSliderFill",
|
|
133
183
|
style: { width: `${n}%` }
|
|
@@ -139,8 +189,8 @@ function Ne(e) {
|
|
|
139
189
|
}
|
|
140
190
|
//#endregion
|
|
141
191
|
//#region src/components/audioPlayer/index.tsx
|
|
142
|
-
function
|
|
143
|
-
let { onPlayAudio: t, onPauseAudio: n, disabled: r, style: i, ...a } = e, [s, c] =
|
|
192
|
+
function Ie(e) {
|
|
193
|
+
let { onPlayAudio: t, onPauseAudio: n, disabled: r, style: i, ...a } = e, [s, c] = Ne(0), [d, f] = u(!1), [h, g] = u(!1), _ = l(null), v = _.current?.currentTime || 0, y = _.current?.duration || 0, b = C(v), x = C(y), S = {
|
|
144
194
|
totalTime: y,
|
|
145
195
|
currentTime: v,
|
|
146
196
|
formattedCurrentTime: b,
|
|
@@ -195,7 +245,7 @@ function Pe(e) {
|
|
|
195
245
|
children: [d && /* @__PURE__ */ p(z, {}), !d && /* @__PURE__ */ p(B, {})]
|
|
196
246
|
}),
|
|
197
247
|
/* @__PURE__ */ p("p", { children: b }),
|
|
198
|
-
/* @__PURE__ */ p(
|
|
248
|
+
/* @__PURE__ */ p(Fe, {
|
|
199
249
|
value: s,
|
|
200
250
|
onChange: D,
|
|
201
251
|
onDragging: g,
|
|
@@ -207,10 +257,10 @@ function Pe(e) {
|
|
|
207
257
|
}
|
|
208
258
|
//#endregion
|
|
209
259
|
//#region src/providers/formProvider.tsx
|
|
210
|
-
var
|
|
211
|
-
function
|
|
260
|
+
var Le = n({});
|
|
261
|
+
function Re(e) {
|
|
212
262
|
let { children: n, fieldErrors: r, form: i } = e, a = c(() => ({ fieldErrors: r }), [r]);
|
|
213
|
-
return /* @__PURE__ */ m(
|
|
263
|
+
return /* @__PURE__ */ m(Le.Provider, {
|
|
214
264
|
value: a,
|
|
215
265
|
children: [!i && n, i && t(i, i.props, n)]
|
|
216
266
|
});
|
|
@@ -218,11 +268,11 @@ function Ie(e) {
|
|
|
218
268
|
//#endregion
|
|
219
269
|
//#region src/hooks/useForm.ts
|
|
220
270
|
function Q() {
|
|
221
|
-
return a(
|
|
271
|
+
return a(Le);
|
|
222
272
|
}
|
|
223
273
|
//#endregion
|
|
224
274
|
//#region src/components/fieldError/index.tsx
|
|
225
|
-
function
|
|
275
|
+
function ze(e) {
|
|
226
276
|
let { children: t, className: n, ...r } = e, i = `arkynFieldError ${n}`;
|
|
227
277
|
return t ? /* @__PURE__ */ p("strong", {
|
|
228
278
|
className: i.trim(),
|
|
@@ -232,7 +282,7 @@ function Le(e) {
|
|
|
232
282
|
}
|
|
233
283
|
//#endregion
|
|
234
284
|
//#region src/components/fieldLabel/index.tsx
|
|
235
|
-
function
|
|
285
|
+
function Be(e) {
|
|
236
286
|
let { showAsterisk: t = !1, className: n = "", ...r } = e;
|
|
237
287
|
return /* @__PURE__ */ p("label", {
|
|
238
288
|
className: `arkynFieldLabel ${t ? "asteriskTrue" : "asteriskFalse"} ${n}`.trim(),
|
|
@@ -241,7 +291,7 @@ function Re(e) {
|
|
|
241
291
|
}
|
|
242
292
|
//#endregion
|
|
243
293
|
//#region src/components/fieldWrapper/index.tsx
|
|
244
|
-
function
|
|
294
|
+
function Ve(e) {
|
|
245
295
|
let { children: t, className: n, orientation: r = "vertical", ...i } = e;
|
|
246
296
|
return /* @__PURE__ */ p("section", {
|
|
247
297
|
className: `arkynFieldWrapper ${n} ${r}`.trim(),
|
|
@@ -264,7 +314,7 @@ function $(e) {
|
|
|
264
314
|
}
|
|
265
315
|
//#endregion
|
|
266
316
|
//#region src/components/button/index.tsx
|
|
267
|
-
function
|
|
317
|
+
function He(e) {
|
|
268
318
|
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
319
|
xs: 12,
|
|
270
320
|
sm: 16,
|
|
@@ -299,7 +349,7 @@ function Be(e) {
|
|
|
299
349
|
}
|
|
300
350
|
//#endregion
|
|
301
351
|
//#region src/components/divider/index.tsx
|
|
302
|
-
function
|
|
352
|
+
function Ue(e) {
|
|
303
353
|
let { className: t, orientation: n = "horizontal", ...r } = e;
|
|
304
354
|
return /* @__PURE__ */ p("div", {
|
|
305
355
|
className: `arkynDivider ${n} ${t}`.trim(),
|
|
@@ -308,7 +358,7 @@ function Ve(e) {
|
|
|
308
358
|
}
|
|
309
359
|
//#endregion
|
|
310
360
|
//#region src/components/iconButton/index.tsx
|
|
311
|
-
function
|
|
361
|
+
function We(e) {
|
|
312
362
|
let { isLoading: t = !1, scheme: n = "primary", variant: r = "solid", size: i = "md", icon: a, disabled: o, className: s = "", ...c } = e, l = {
|
|
313
363
|
xs: 12,
|
|
314
364
|
sm: 16,
|
|
@@ -335,8 +385,33 @@ function He(e) {
|
|
|
335
385
|
});
|
|
336
386
|
}
|
|
337
387
|
//#endregion
|
|
388
|
+
//#region src/utils/sanitizeTooltipHtml.ts
|
|
389
|
+
var Ge = Object.fromEntries([
|
|
390
|
+
"b",
|
|
391
|
+
"strong",
|
|
392
|
+
"i",
|
|
393
|
+
"em",
|
|
394
|
+
"u",
|
|
395
|
+
"br",
|
|
396
|
+
"span",
|
|
397
|
+
"small"
|
|
398
|
+
].map((e) => [e, []]));
|
|
399
|
+
function Ke(e) {
|
|
400
|
+
return q(e, {
|
|
401
|
+
whiteList: Ge,
|
|
402
|
+
stripIgnoreTagBody: [
|
|
403
|
+
"script",
|
|
404
|
+
"style",
|
|
405
|
+
"iframe",
|
|
406
|
+
"object",
|
|
407
|
+
"embed",
|
|
408
|
+
"noscript"
|
|
409
|
+
]
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
//#endregion
|
|
338
413
|
//#region src/components/tooltip/index.tsx
|
|
339
|
-
function
|
|
414
|
+
function qe(e) {
|
|
340
415
|
let { text: t, size: n = "lg", children: r, orientation: i = "top", className: a = "", ...c } = e, d = s(), f = l(null), [h, g] = u(i);
|
|
341
416
|
return o(() => {
|
|
342
417
|
let e = () => {
|
|
@@ -361,15 +436,15 @@ function Ue(e) {
|
|
|
361
436
|
children: [r, /* @__PURE__ */ p("div", {
|
|
362
437
|
className: "arkynTooltipText",
|
|
363
438
|
id: d,
|
|
364
|
-
dangerouslySetInnerHTML: { __html: t }
|
|
439
|
+
dangerouslySetInnerHTML: { __html: Ke(t) }
|
|
365
440
|
})]
|
|
366
441
|
});
|
|
367
442
|
}
|
|
368
443
|
//#endregion
|
|
369
444
|
//#region src/components/audioUpload/hasFileContent/index.tsx
|
|
370
|
-
function
|
|
371
|
-
let { filePath: t, disabled: n, acceptAudio: r, handleSelectFile: i, isLoading: a, reSendAudio: o, changeAudioButtonText: s } = e;
|
|
372
|
-
function
|
|
445
|
+
function Je(e) {
|
|
446
|
+
let { filePath: t, disabled: n, acceptAudio: r, handleSelectFile: i, isLoading: a, reSendAudio: o, changeAudioButtonText: s, resendAudioText: c } = e;
|
|
447
|
+
function l() {
|
|
373
448
|
if (n) return;
|
|
374
449
|
let e = document.createElement("input");
|
|
375
450
|
e.type = "file", e.accept = r, e.onchange = (e) => {
|
|
@@ -380,16 +455,16 @@ function We(e) {
|
|
|
380
455
|
return /* @__PURE__ */ m("div", {
|
|
381
456
|
className: "arkynAudioUploadHasFileContentContainer",
|
|
382
457
|
children: [
|
|
383
|
-
/* @__PURE__ */ p(
|
|
384
|
-
/* @__PURE__ */ p(
|
|
458
|
+
/* @__PURE__ */ p(Ie, { src: t }),
|
|
459
|
+
/* @__PURE__ */ p(Ue, {}),
|
|
385
460
|
/* @__PURE__ */ m("div", {
|
|
386
461
|
className: "arkynAudioUploadButtonsContainer",
|
|
387
|
-
children: [!!o && /* @__PURE__ */ p(
|
|
462
|
+
children: [!!o && /* @__PURE__ */ p(qe, {
|
|
388
463
|
orientation: "bottom",
|
|
389
|
-
text:
|
|
390
|
-
children: /* @__PURE__ */ p(
|
|
464
|
+
text: c,
|
|
465
|
+
children: /* @__PURE__ */ p(We, {
|
|
391
466
|
type: "button",
|
|
392
|
-
"aria-label":
|
|
467
|
+
"aria-label": c,
|
|
393
468
|
variant: "outline",
|
|
394
469
|
scheme: "danger",
|
|
395
470
|
size: "sm",
|
|
@@ -398,9 +473,9 @@ function We(e) {
|
|
|
398
473
|
icon: H,
|
|
399
474
|
disabled: n
|
|
400
475
|
})
|
|
401
|
-
}), /* @__PURE__ */ p(
|
|
476
|
+
}), /* @__PURE__ */ p(He, {
|
|
402
477
|
isLoading: a,
|
|
403
|
-
onClick:
|
|
478
|
+
onClick: l,
|
|
404
479
|
variant: "outline",
|
|
405
480
|
size: "sm",
|
|
406
481
|
type: "button",
|
|
@@ -413,7 +488,7 @@ function We(e) {
|
|
|
413
488
|
}
|
|
414
489
|
//#endregion
|
|
415
490
|
//#region src/components/audioUpload/noFileContent/index.tsx
|
|
416
|
-
function
|
|
491
|
+
function Ye(e) {
|
|
417
492
|
let { dropAudioText: t, isLoading: n, acceptAudio: r, handleSelectFile: i, selectAudioButtonText: a, disabled: o } = e;
|
|
418
493
|
function s(e) {
|
|
419
494
|
if (o) return;
|
|
@@ -432,7 +507,7 @@ function Ge(e) {
|
|
|
432
507
|
return /* @__PURE__ */ m("div", {
|
|
433
508
|
onDrop: s,
|
|
434
509
|
className: "arkynAudioUploadNoFileContent",
|
|
435
|
-
children: [/* @__PURE__ */ p(
|
|
510
|
+
children: [/* @__PURE__ */ p(He, {
|
|
436
511
|
isLoading: n,
|
|
437
512
|
onClick: c,
|
|
438
513
|
variant: "ghost",
|
|
@@ -445,69 +520,70 @@ function Ge(e) {
|
|
|
445
520
|
}
|
|
446
521
|
//#endregion
|
|
447
522
|
//#region src/components/audioUpload/index.tsx
|
|
448
|
-
function
|
|
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",
|
|
450
|
-
async function
|
|
451
|
-
if (
|
|
452
|
-
|
|
523
|
+
function Xe(e) {
|
|
524
|
+
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", resendAudioText: d = "Reenviar áudio", invalidFileTypeText: f = "O arquivo selecionado não é um arquivo de áudio", uploadErrorText: h = "Erro ao enviar áudio", acceptAudio: g = "audio/*", action: _, defaultValue: v = "", showAsterisk: y = !1, disabled: b = !1 } = e, { fieldErrors: x } = Q(), S = x?.[t], [C, w] = u(v), [T, E] = u(""), [D, O] = u(null), [k, A] = u(v), [j, M] = u(!1);
|
|
525
|
+
async function N(e) {
|
|
526
|
+
if (b) return;
|
|
527
|
+
M(!0), O(e), E("");
|
|
453
528
|
let t = new FormData();
|
|
454
|
-
t.append(r, e), await fetch(
|
|
529
|
+
t.append(r, e), await fetch(_, {
|
|
455
530
|
method: i,
|
|
456
531
|
body: t
|
|
457
532
|
}).then(async (e) => await e.json()).then((e) => {
|
|
458
|
-
e?.error ?
|
|
533
|
+
e?.error ? E(e.error) : w(e?.[o]), a?.(e?.[o]);
|
|
459
534
|
}).catch((e) => {
|
|
460
|
-
console.error(e),
|
|
461
|
-
}).finally(() =>
|
|
535
|
+
console.error(e), E(h);
|
|
536
|
+
}).finally(() => M(!1));
|
|
462
537
|
}
|
|
463
|
-
function
|
|
464
|
-
if (!
|
|
538
|
+
function P(e) {
|
|
539
|
+
if (!b) {
|
|
465
540
|
if (e.type.indexOf("audio") === -1) {
|
|
466
|
-
|
|
541
|
+
E(f);
|
|
467
542
|
return;
|
|
468
543
|
}
|
|
469
|
-
|
|
544
|
+
A(URL.createObjectURL(e)), N(e);
|
|
470
545
|
}
|
|
471
546
|
}
|
|
472
|
-
let
|
|
473
|
-
return /* @__PURE__ */ m(
|
|
474
|
-
n && /* @__PURE__ */ p(
|
|
475
|
-
showAsterisk:
|
|
547
|
+
let F = S || T;
|
|
548
|
+
return /* @__PURE__ */ m(Ve, { children: [
|
|
549
|
+
n && /* @__PURE__ */ p(Be, {
|
|
550
|
+
showAsterisk: y,
|
|
476
551
|
children: n
|
|
477
552
|
}),
|
|
478
553
|
/* @__PURE__ */ m("div", {
|
|
479
|
-
className: `arkynAudioUpload ${
|
|
554
|
+
className: `arkynAudioUpload ${F ? "hasError" : "noHasError"} ${k ? "hasAudio" : "noHasAudio"}`,
|
|
480
555
|
children: [
|
|
481
556
|
/* @__PURE__ */ p("input", {
|
|
482
557
|
type: "hidden",
|
|
483
558
|
name: t,
|
|
484
|
-
value:
|
|
559
|
+
value: C || ""
|
|
485
560
|
}),
|
|
486
|
-
!
|
|
487
|
-
disabled:
|
|
488
|
-
isLoading:
|
|
489
|
-
acceptAudio:
|
|
561
|
+
!k && /* @__PURE__ */ p(Ye, {
|
|
562
|
+
disabled: b,
|
|
563
|
+
isLoading: j,
|
|
564
|
+
acceptAudio: g,
|
|
490
565
|
dropAudioText: c,
|
|
491
|
-
handleSelectFile:
|
|
566
|
+
handleSelectFile: P,
|
|
492
567
|
selectAudioButtonText: s
|
|
493
568
|
}),
|
|
494
|
-
|
|
495
|
-
filePath:
|
|
496
|
-
acceptAudio:
|
|
569
|
+
k && /* @__PURE__ */ p(Je, {
|
|
570
|
+
filePath: k,
|
|
571
|
+
acceptAudio: g,
|
|
497
572
|
changeAudioButtonText: l,
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
573
|
+
resendAudioText: d,
|
|
574
|
+
disabled: b,
|
|
575
|
+
handleSelectFile: P,
|
|
576
|
+
isLoading: j,
|
|
577
|
+
reSendAudio: F && D ? () => N(D) : void 0
|
|
502
578
|
})
|
|
503
579
|
]
|
|
504
580
|
}),
|
|
505
|
-
|
|
581
|
+
F && /* @__PURE__ */ p(ze, { children: F })
|
|
506
582
|
] });
|
|
507
583
|
}
|
|
508
584
|
//#endregion
|
|
509
585
|
//#region src/components/badge/index.tsx
|
|
510
|
-
function
|
|
586
|
+
function Ze(e) {
|
|
511
587
|
let { variant: t = "ghost", scheme: n = "primary", size: r = "lg", leftIcon: i, rightIcon: a, className: o = "", children: s, ...c } = e, l = {
|
|
512
588
|
md: 12,
|
|
513
589
|
lg: 14
|
|
@@ -530,7 +606,7 @@ function qe(e) {
|
|
|
530
606
|
}
|
|
531
607
|
//#endregion
|
|
532
608
|
//#region src/components/calendar/_viewService.ts
|
|
533
|
-
var
|
|
609
|
+
var Qe = class {
|
|
534
610
|
currentDay(e) {
|
|
535
611
|
return String(e.getDate()).padStart(2, "0");
|
|
536
612
|
}
|
|
@@ -541,7 +617,7 @@ var Je = class {
|
|
|
541
617
|
return String(e.getFullYear());
|
|
542
618
|
}
|
|
543
619
|
capitalize(e) {
|
|
544
|
-
return
|
|
620
|
+
return re(e);
|
|
545
621
|
}
|
|
546
622
|
parseDayType(e, t, n, r) {
|
|
547
623
|
let i = r[0].getDate(), a = r[0].getMonth(), o = r[0].getFullYear(), s = r[1].getDate(), c = r[1].getMonth(), l = r[1].getFullYear(), u = new Date(o, a, i), d = new Date(l, c, s), f = new Date(n, t, e);
|
|
@@ -658,33 +734,33 @@ var Je = class {
|
|
|
658
734
|
let n = new Date(e);
|
|
659
735
|
n.setDate(1), n.setMonth(n.getMonth() - 1), t(n);
|
|
660
736
|
}
|
|
661
|
-
},
|
|
662
|
-
function
|
|
663
|
-
return a(
|
|
737
|
+
}, $e = n({});
|
|
738
|
+
function et() {
|
|
739
|
+
return a($e);
|
|
664
740
|
}
|
|
665
|
-
var
|
|
666
|
-
function
|
|
741
|
+
var tt = new Qe();
|
|
742
|
+
function nt(e) {
|
|
667
743
|
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
744
|
let n = [new Date(e[0]), new Date(e[1])];
|
|
669
745
|
s && t === "range" && s(n), s && t === "single" && s(n[0]), v(n);
|
|
670
746
|
}, [t, s]), S = i((e) => {
|
|
671
747
|
l && l(e), g(e);
|
|
672
|
-
}, [l]), C = i((e, n, r) =>
|
|
748
|
+
}, [l]), C = i((e, n, r) => tt.changeDay(e, n, r, t, b, x, S), [
|
|
673
749
|
t,
|
|
674
750
|
b,
|
|
675
751
|
x,
|
|
676
752
|
S
|
|
677
|
-
]), w = i((e) =>
|
|
753
|
+
]), w = i((e) => tt.changeMonth(e, y, S), [y, S]), T = i((e) => tt.changeYear(e, y, S), [y, S]), E = i(() => tt.nextMonth(y, S), [y, S]), D = i(() => tt.previousMonth(y, S), [y, S]), O = c(() => ({
|
|
678
754
|
valueDate: b,
|
|
679
755
|
viewDate: y,
|
|
680
756
|
currentDate: y.toLocaleDateString(o).slice(3),
|
|
681
|
-
currentDay:
|
|
682
|
-
currentMonth:
|
|
683
|
-
currentYear:
|
|
684
|
-
listWeek:
|
|
685
|
-
listMonths:
|
|
686
|
-
listYears:
|
|
687
|
-
listMatrix:
|
|
757
|
+
currentDay: tt.currentDay(y),
|
|
758
|
+
currentMonth: tt.currentMonth(y),
|
|
759
|
+
currentYear: tt.currentYear(y),
|
|
760
|
+
listWeek: tt.listWeek(o),
|
|
761
|
+
listMonths: tt.listMonths(y, o),
|
|
762
|
+
listYears: tt.listYears(100),
|
|
763
|
+
listMatrix: tt.listMatrix(y, b),
|
|
688
764
|
changeDay: C,
|
|
689
765
|
changeMonth: w,
|
|
690
766
|
changeYear: T,
|
|
@@ -700,14 +776,14 @@ function Qe(e) {
|
|
|
700
776
|
E,
|
|
701
777
|
D
|
|
702
778
|
]);
|
|
703
|
-
return /* @__PURE__ */ p(
|
|
779
|
+
return /* @__PURE__ */ p($e.Provider, {
|
|
704
780
|
value: O,
|
|
705
781
|
children: n
|
|
706
782
|
});
|
|
707
783
|
}
|
|
708
784
|
//#endregion
|
|
709
785
|
//#region src/components/calendar/calendarContainer/index.tsx
|
|
710
|
-
function
|
|
786
|
+
function rt({ children: e }) {
|
|
711
787
|
return /* @__PURE__ */ p("div", {
|
|
712
788
|
className: "arkynCalendarContainer",
|
|
713
789
|
children: e
|
|
@@ -715,26 +791,26 @@ function $e({ children: e }) {
|
|
|
715
791
|
}
|
|
716
792
|
//#endregion
|
|
717
793
|
//#region src/services/fieldTemplate.tsx
|
|
718
|
-
function
|
|
794
|
+
function it(e) {
|
|
719
795
|
let { name: t, label: n, showAsterisk: r, className: i, unShowFieldTemplate: a, errorMessage: o, children: s, orientation: c } = e;
|
|
720
|
-
return a ? s : /* @__PURE__ */ m(
|
|
796
|
+
return a ? s : /* @__PURE__ */ m(Ve, {
|
|
721
797
|
id: t,
|
|
722
798
|
className: i,
|
|
723
799
|
orientation: c,
|
|
724
800
|
children: [
|
|
725
|
-
n && /* @__PURE__ */ p(
|
|
801
|
+
n && /* @__PURE__ */ p(Be, {
|
|
726
802
|
htmlFor: t,
|
|
727
803
|
showAsterisk: r,
|
|
728
804
|
children: n
|
|
729
805
|
}),
|
|
730
806
|
s,
|
|
731
|
-
o && /* @__PURE__ */ p(
|
|
807
|
+
o && /* @__PURE__ */ p(ze, { children: o })
|
|
732
808
|
]
|
|
733
809
|
});
|
|
734
810
|
}
|
|
735
811
|
//#endregion
|
|
736
812
|
//#region src/components/select/selectChevron/index.tsx
|
|
737
|
-
function
|
|
813
|
+
function at(e) {
|
|
738
814
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
739
815
|
return n ? null : /* @__PURE__ */ p(C, {
|
|
740
816
|
className: `arkynSelectChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -749,7 +825,7 @@ function tt(e) {
|
|
|
749
825
|
}
|
|
750
826
|
//#endregion
|
|
751
827
|
//#region src/components/select/selectContainer/index.tsx
|
|
752
|
-
function
|
|
828
|
+
function ot(e) {
|
|
753
829
|
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
830
|
return /* @__PURE__ */ p("div", {
|
|
755
831
|
ref: m,
|
|
@@ -768,7 +844,7 @@ function nt(e) {
|
|
|
768
844
|
}
|
|
769
845
|
//#endregion
|
|
770
846
|
//#region src/components/select/selectContent/index.tsx
|
|
771
|
-
function
|
|
847
|
+
function st(e) {
|
|
772
848
|
let { children: t, size: n } = e;
|
|
773
849
|
return /* @__PURE__ */ p("div", {
|
|
774
850
|
className: `arkynSelectContent ${n}`,
|
|
@@ -777,7 +853,7 @@ function rt(e) {
|
|
|
777
853
|
}
|
|
778
854
|
//#endregion
|
|
779
855
|
//#region src/components/select/selectOption/index.tsx
|
|
780
|
-
function
|
|
856
|
+
function ct(e) {
|
|
781
857
|
let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a, id: o, isHighlighted: s = !1 } = e, c = n(i);
|
|
782
858
|
return /* @__PURE__ */ m("button", {
|
|
783
859
|
type: "button",
|
|
@@ -795,7 +871,7 @@ function it(e) {
|
|
|
795
871
|
}
|
|
796
872
|
//#endregion
|
|
797
873
|
//#region src/hooks/useFlipPosition.ts
|
|
798
|
-
function
|
|
874
|
+
function lt(e, t, n) {
|
|
799
875
|
let [r, i] = u("bottom");
|
|
800
876
|
return o(() => {
|
|
801
877
|
if (!t) return;
|
|
@@ -817,13 +893,13 @@ function at(e, t, n) {
|
|
|
817
893
|
}
|
|
818
894
|
//#endregion
|
|
819
895
|
//#region src/hooks/useScrollLock.ts
|
|
820
|
-
function
|
|
896
|
+
function ut() {
|
|
821
897
|
return typeof window > "u" ? 0 : window.innerWidth - document.documentElement.clientWidth;
|
|
822
898
|
}
|
|
823
|
-
function
|
|
899
|
+
function dt(e) {
|
|
824
900
|
o(() => {
|
|
825
901
|
if (e) {
|
|
826
|
-
let e = document.body.style.overflow, t = document.body.style.paddingRight, n =
|
|
902
|
+
let e = document.body.style.overflow, t = document.body.style.paddingRight, n = ut();
|
|
827
903
|
if (n > 0) {
|
|
828
904
|
let e = window.getComputedStyle(document.body), t = parseInt(e.paddingRight, 10) || 0;
|
|
829
905
|
document.body.style.paddingRight = `${t + n}px`;
|
|
@@ -836,7 +912,7 @@ function st(e) {
|
|
|
836
912
|
}
|
|
837
913
|
//#endregion
|
|
838
914
|
//#region src/components/input/index.tsx
|
|
839
|
-
function
|
|
915
|
+
function ft(e) {
|
|
840
916
|
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 = {
|
|
841
917
|
md: 20,
|
|
842
918
|
lg: 20
|
|
@@ -856,7 +932,7 @@ function ct(e) {
|
|
|
856
932
|
type: "text",
|
|
857
933
|
ref: P,
|
|
858
934
|
...A
|
|
859
|
-
}) : /* @__PURE__ */ p(
|
|
935
|
+
}) : /* @__PURE__ */ p(it, {
|
|
860
936
|
name: t,
|
|
861
937
|
label: o,
|
|
862
938
|
showAsterisk: S,
|
|
@@ -921,9 +997,9 @@ function ct(e) {
|
|
|
921
997
|
}
|
|
922
998
|
//#endregion
|
|
923
999
|
//#region src/components/select/selectOptionsContainer/index.tsx
|
|
924
|
-
function
|
|
925
|
-
let { children: t, id: n, isFocused: r, isSearchable: i, search: a, onSearch: o } = e, s = l(null), c =
|
|
926
|
-
|
|
1000
|
+
function pt(e) {
|
|
1001
|
+
let { children: t, id: n, isFocused: r, isSearchable: i, search: a, onSearch: o } = e, s = l(null), c = lt(s, r, 300);
|
|
1002
|
+
dt(r);
|
|
927
1003
|
function u(e) {
|
|
928
1004
|
i && o(e.target.value);
|
|
929
1005
|
}
|
|
@@ -932,7 +1008,7 @@ function lt(e) {
|
|
|
932
1008
|
id: n,
|
|
933
1009
|
role: "listbox",
|
|
934
1010
|
className: `arkynSelectOptionsContainer ${c}`,
|
|
935
|
-
children: [i && /* @__PURE__ */ p(
|
|
1011
|
+
children: [i && /* @__PURE__ */ p(ft, {
|
|
936
1012
|
type: "search",
|
|
937
1013
|
name: "search-select",
|
|
938
1014
|
variant: "underline",
|
|
@@ -944,7 +1020,7 @@ function lt(e) {
|
|
|
944
1020
|
}
|
|
945
1021
|
//#endregion
|
|
946
1022
|
//#region src/components/select/selectOverlay/index.tsx
|
|
947
|
-
function
|
|
1023
|
+
function mt(e) {
|
|
948
1024
|
let { isFocused: t, handleBlur: n } = e;
|
|
949
1025
|
return t ? /* @__PURE__ */ p("aside", {
|
|
950
1026
|
className: "arkynSelectOverlay",
|
|
@@ -953,7 +1029,7 @@ function ut(e) {
|
|
|
953
1029
|
}
|
|
954
1030
|
//#endregion
|
|
955
1031
|
//#region src/components/select/selectSpinner/index.tsx
|
|
956
|
-
function
|
|
1032
|
+
function ht(e) {
|
|
957
1033
|
let { iconSize: t, isLoading: n } = e;
|
|
958
1034
|
return n ? /* @__PURE__ */ p(R, {
|
|
959
1035
|
className: "arkynSelectSpinner",
|
|
@@ -963,43 +1039,43 @@ function dt(e) {
|
|
|
963
1039
|
}
|
|
964
1040
|
//#endregion
|
|
965
1041
|
//#region src/components/select/index.tsx
|
|
966
|
-
function
|
|
1042
|
+
function gt(e) {
|
|
967
1043
|
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 = {
|
|
968
1044
|
md: 20,
|
|
969
1045
|
lg: 20
|
|
970
|
-
}[D], [V, H] = u(""), [U, W] = u(!1), [G, te] = u(o), [K, q] = u(-1),
|
|
971
|
-
function ne(e) {
|
|
972
|
-
return J === e;
|
|
973
|
-
}
|
|
1046
|
+
}[D], [V, H] = u(""), [U, W] = u(!1), [G, te] = u(o), [K, q] = u(-1), ne = O === void 0 ? G : O;
|
|
974
1047
|
function re(e) {
|
|
975
|
-
return
|
|
1048
|
+
return ne === e;
|
|
976
1049
|
}
|
|
977
1050
|
function ie(e) {
|
|
1051
|
+
return n.find((t) => t.value === e)?.label || "";
|
|
1052
|
+
}
|
|
1053
|
+
function ae(e) {
|
|
978
1054
|
return `${L}-option-${e.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
|
|
979
1055
|
}
|
|
980
|
-
function
|
|
1056
|
+
function oe() {
|
|
981
1057
|
z || !N?.current || U || (W(!0), q(-1), N.current.focus(), w?.());
|
|
982
1058
|
}
|
|
983
|
-
function
|
|
1059
|
+
function J() {
|
|
984
1060
|
W(!1), q(-1), S && N.current && N.current.blur();
|
|
985
1061
|
}
|
|
986
1062
|
function Y(e) {
|
|
987
1063
|
H(e), q(-1), b && b(e);
|
|
988
1064
|
}
|
|
989
1065
|
function se(e) {
|
|
990
|
-
|
|
1066
|
+
re(e) ? (te(""), x && x("")) : (te(e), x && x(e)), a && J();
|
|
991
1067
|
}
|
|
992
1068
|
let X = n.filter((t) => !!(e.onSearch || !e.isSearchable || t.label.toLowerCase().includes(V.toLowerCase())));
|
|
993
|
-
function
|
|
1069
|
+
function ce(e) {
|
|
994
1070
|
if (z) return;
|
|
995
1071
|
if (!U) {
|
|
996
|
-
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(),
|
|
1072
|
+
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), oe(), e.key === "ArrowDown" && q(0));
|
|
997
1073
|
return;
|
|
998
1074
|
}
|
|
999
1075
|
let t = e.target?.tagName === "INPUT", n = e.target?.tagName === "BUTTON";
|
|
1000
1076
|
switch (e.key) {
|
|
1001
1077
|
case "Escape":
|
|
1002
|
-
e.preventDefault(),
|
|
1078
|
+
e.preventDefault(), J(), P.current?.focus();
|
|
1003
1079
|
break;
|
|
1004
1080
|
case "ArrowDown":
|
|
1005
1081
|
e.preventDefault(), q((e) => X.length === 0 ? -1 : e < 0 || e + 1 >= X.length ? 0 : e + 1);
|
|
@@ -1018,8 +1094,8 @@ function ft(e) {
|
|
|
1018
1094
|
default: break;
|
|
1019
1095
|
}
|
|
1020
1096
|
}
|
|
1021
|
-
let
|
|
1022
|
-
return /* @__PURE__ */ p(
|
|
1097
|
+
let Z = K >= 0 && K < X.length ? ae(X[K].value) : void 0;
|
|
1098
|
+
return /* @__PURE__ */ p(it, {
|
|
1023
1099
|
name: t,
|
|
1024
1100
|
label: _,
|
|
1025
1101
|
showAsterisk: v,
|
|
@@ -1027,8 +1103,8 @@ function ft(e) {
|
|
|
1027
1103
|
errorMessage: R,
|
|
1028
1104
|
unShowFieldTemplate: j,
|
|
1029
1105
|
orientation: A,
|
|
1030
|
-
children: /* @__PURE__ */ m(
|
|
1031
|
-
handleContainerFocus:
|
|
1106
|
+
children: /* @__PURE__ */ m(ot, {
|
|
1107
|
+
handleContainerFocus: oe,
|
|
1032
1108
|
disabled: z,
|
|
1033
1109
|
isError: ee,
|
|
1034
1110
|
isFocused: U,
|
|
@@ -1039,15 +1115,15 @@ function ft(e) {
|
|
|
1039
1115
|
prefixExists: !!E,
|
|
1040
1116
|
id: I,
|
|
1041
1117
|
containerRef: P,
|
|
1042
|
-
onContainerKeyDown:
|
|
1118
|
+
onContainerKeyDown: ce,
|
|
1043
1119
|
tabIndex: z ? -1 : 0,
|
|
1044
1120
|
ariaControls: L,
|
|
1045
|
-
ariaActiveDescendant:
|
|
1121
|
+
ariaActiveDescendant: Z,
|
|
1046
1122
|
children: [
|
|
1047
1123
|
/* @__PURE__ */ p("input", {
|
|
1048
1124
|
ref: N,
|
|
1049
1125
|
name: t,
|
|
1050
|
-
value:
|
|
1126
|
+
value: ne,
|
|
1051
1127
|
type: "hidden"
|
|
1052
1128
|
}),
|
|
1053
1129
|
/* @__PURE__ */ p($, {
|
|
@@ -1059,42 +1135,42 @@ function ft(e) {
|
|
|
1059
1135
|
size: B,
|
|
1060
1136
|
strokeWidth: 2.5
|
|
1061
1137
|
}),
|
|
1062
|
-
/* @__PURE__ */ m(
|
|
1138
|
+
/* @__PURE__ */ m(st, {
|
|
1063
1139
|
size: D,
|
|
1064
|
-
children: [
|
|
1140
|
+
children: [ne !== "" && /* @__PURE__ */ p("p", {
|
|
1065
1141
|
className: "hasValue",
|
|
1066
|
-
children:
|
|
1067
|
-
}),
|
|
1142
|
+
children: ie(ne)
|
|
1143
|
+
}), ne === "" && /* @__PURE__ */ p("p", { children: i })]
|
|
1068
1144
|
}),
|
|
1069
|
-
/* @__PURE__ */ m(
|
|
1145
|
+
/* @__PURE__ */ m(pt, {
|
|
1070
1146
|
id: L,
|
|
1071
1147
|
isFocused: U,
|
|
1072
1148
|
isSearchable: h,
|
|
1073
1149
|
search: V,
|
|
1074
1150
|
onSearch: Y,
|
|
1075
|
-
children: [X.map(({ label: e, value: t }, n) => /* @__PURE__ */ p(
|
|
1076
|
-
id:
|
|
1151
|
+
children: [X.map(({ label: e, value: t }, n) => /* @__PURE__ */ p(ct, {
|
|
1152
|
+
id: ae(t),
|
|
1077
1153
|
label: e,
|
|
1078
1154
|
value: t,
|
|
1079
1155
|
size: D,
|
|
1080
1156
|
isHighlighted: n === K,
|
|
1081
1157
|
handleChangeValue: se,
|
|
1082
|
-
optionHasSelected:
|
|
1158
|
+
optionHasSelected: re
|
|
1083
1159
|
}, t)), X.length <= 0 && /* @__PURE__ */ p("p", { children: C })]
|
|
1084
1160
|
}),
|
|
1085
|
-
/* @__PURE__ */ p(
|
|
1161
|
+
/* @__PURE__ */ p(at, {
|
|
1086
1162
|
disabled: z,
|
|
1087
1163
|
isFocused: U,
|
|
1088
1164
|
readOnly: f,
|
|
1089
1165
|
iconSize: B,
|
|
1090
1166
|
isLoading: d
|
|
1091
1167
|
}),
|
|
1092
|
-
/* @__PURE__ */ p(
|
|
1168
|
+
/* @__PURE__ */ p(ht, {
|
|
1093
1169
|
iconSize: B,
|
|
1094
1170
|
isLoading: d
|
|
1095
1171
|
}),
|
|
1096
|
-
/* @__PURE__ */ p(
|
|
1097
|
-
handleBlur:
|
|
1172
|
+
/* @__PURE__ */ p(mt, {
|
|
1173
|
+
handleBlur: J,
|
|
1098
1174
|
isFocused: U
|
|
1099
1175
|
})
|
|
1100
1176
|
]
|
|
@@ -1103,8 +1179,8 @@ function ft(e) {
|
|
|
1103
1179
|
}
|
|
1104
1180
|
//#endregion
|
|
1105
1181
|
//#region src/components/calendar/calendarHeader/index.tsx
|
|
1106
|
-
function
|
|
1107
|
-
let t =
|
|
1182
|
+
function _t({ basicMode: e }) {
|
|
1183
|
+
let t = et();
|
|
1108
1184
|
return e ? /* @__PURE__ */ m("div", {
|
|
1109
1185
|
className: "arkynCalendarHeader",
|
|
1110
1186
|
children: [
|
|
@@ -1134,14 +1210,14 @@ function pt({ basicMode: e }) {
|
|
|
1134
1210
|
className: "arkynCalendarButton",
|
|
1135
1211
|
onClick: () => t.nextMonth(),
|
|
1136
1212
|
children: /* @__PURE__ */ p(T, {})
|
|
1137
|
-
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(
|
|
1213
|
+
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p(gt, {
|
|
1138
1214
|
name: "calendarMonth",
|
|
1139
1215
|
variant: "underline",
|
|
1140
1216
|
className: "calendarMonthSelect",
|
|
1141
1217
|
value: t.currentMonth,
|
|
1142
1218
|
options: t.listMonths,
|
|
1143
1219
|
onChange: (e) => t.changeMonth(+e)
|
|
1144
|
-
}), /* @__PURE__ */ p(
|
|
1220
|
+
}), /* @__PURE__ */ p(gt, {
|
|
1145
1221
|
name: "calendarYear",
|
|
1146
1222
|
variant: "underline",
|
|
1147
1223
|
className: "calendarYearSelect",
|
|
@@ -1153,8 +1229,8 @@ function pt({ basicMode: e }) {
|
|
|
1153
1229
|
}
|
|
1154
1230
|
//#endregion
|
|
1155
1231
|
//#region src/components/calendar/calendarTableTd/index.tsx
|
|
1156
|
-
function
|
|
1157
|
-
let { day: t, month: n, year: r, dayOwner: i, dayType: a } = e, { changeDay: o } =
|
|
1232
|
+
function vt(e) {
|
|
1233
|
+
let { day: t, month: n, year: r, dayOwner: i, dayType: a } = e, { changeDay: o } = et();
|
|
1158
1234
|
function s() {
|
|
1159
1235
|
let e = /* @__PURE__ */ new Date();
|
|
1160
1236
|
return t === e.getDate() && n === e.getMonth() && r === e.getFullYear();
|
|
@@ -1175,15 +1251,15 @@ function mt(e) {
|
|
|
1175
1251
|
}
|
|
1176
1252
|
//#endregion
|
|
1177
1253
|
//#region src/components/calendar/calendarTableBody/index.tsx
|
|
1178
|
-
function
|
|
1254
|
+
function yt() {
|
|
1179
1255
|
return /* @__PURE__ */ p("tbody", {
|
|
1180
1256
|
className: "arkynCalendarTableBody",
|
|
1181
|
-
children:
|
|
1257
|
+
children: et().listMatrix.map((e, t) => /* @__PURE__ */ p("tr", { children: e.map((e, n) => /* @__PURE__ */ p(vt, { ...e }, `day-${t}-${n}`)) }, `week-${t}`))
|
|
1182
1258
|
});
|
|
1183
1259
|
}
|
|
1184
1260
|
//#endregion
|
|
1185
1261
|
//#region src/components/calendar/calendarTableContainer/index.tsx
|
|
1186
|
-
function
|
|
1262
|
+
function bt({ children: e }) {
|
|
1187
1263
|
return /* @__PURE__ */ p("table", {
|
|
1188
1264
|
className: "arkynCalendarTableContainer",
|
|
1189
1265
|
children: e
|
|
@@ -1191,18 +1267,18 @@ function gt({ children: e }) {
|
|
|
1191
1267
|
}
|
|
1192
1268
|
//#endregion
|
|
1193
1269
|
//#region src/components/calendar/calendarTableHeader/index.tsx
|
|
1194
|
-
function
|
|
1195
|
-
let { listWeek: e } =
|
|
1270
|
+
function xt() {
|
|
1271
|
+
let { listWeek: e } = et();
|
|
1196
1272
|
return /* @__PURE__ */ p("thead", {
|
|
1197
1273
|
className: "arkynCalendarTableHeader",
|
|
1198
|
-
children: /* @__PURE__ */ p("tr", { children: e.map((e) => /* @__PURE__ */ p("th", { children:
|
|
1274
|
+
children: /* @__PURE__ */ p("tr", { children: e.map((e) => /* @__PURE__ */ p("th", { children: re(e) }, e)) })
|
|
1199
1275
|
});
|
|
1200
1276
|
}
|
|
1201
1277
|
//#endregion
|
|
1202
1278
|
//#region src/components/calendar/index.tsx
|
|
1203
|
-
function
|
|
1279
|
+
function St(e) {
|
|
1204
1280
|
let t = e.variant || "complete";
|
|
1205
|
-
return e.type === "range" ? /* @__PURE__ */ p(
|
|
1281
|
+
return e.type === "range" ? /* @__PURE__ */ p(nt, {
|
|
1206
1282
|
value: e.value,
|
|
1207
1283
|
viewValue: e.viewValue,
|
|
1208
1284
|
defaultViewValue: e.defaultViewValue,
|
|
@@ -1210,8 +1286,8 @@ function vt(e) {
|
|
|
1210
1286
|
calendarType: "range",
|
|
1211
1287
|
onChange: e.onChange,
|
|
1212
1288
|
onChangeView: e.onChangeView,
|
|
1213
|
-
children: /* @__PURE__ */ m(
|
|
1214
|
-
}) : /* @__PURE__ */ p(
|
|
1289
|
+
children: /* @__PURE__ */ m(rt, { children: [/* @__PURE__ */ p(_t, { basicMode: t.includes("basic") }), /* @__PURE__ */ m(bt, { children: [/* @__PURE__ */ p(xt, {}), /* @__PURE__ */ p(yt, {})] })] })
|
|
1290
|
+
}) : /* @__PURE__ */ p(nt, {
|
|
1215
1291
|
value: e.value,
|
|
1216
1292
|
viewValue: e.viewValue,
|
|
1217
1293
|
defaultViewValue: e.defaultViewValue,
|
|
@@ -1219,16 +1295,16 @@ function vt(e) {
|
|
|
1219
1295
|
calendarType: "single",
|
|
1220
1296
|
onChange: e.onChange,
|
|
1221
1297
|
onChangeView: e.onChangeView,
|
|
1222
|
-
children: /* @__PURE__ */ m(
|
|
1298
|
+
children: /* @__PURE__ */ m(rt, { children: [/* @__PURE__ */ p(_t, { basicMode: t.includes("basic") }), /* @__PURE__ */ m(bt, { children: [/* @__PURE__ */ p(xt, {}), /* @__PURE__ */ p(yt, {})] })] })
|
|
1223
1299
|
});
|
|
1224
1300
|
}
|
|
1225
1301
|
//#endregion
|
|
1226
1302
|
//#region src/components/cardTab/cardTabContext.tsx
|
|
1227
|
-
var
|
|
1228
|
-
function
|
|
1229
|
-
return a(
|
|
1303
|
+
var Ct = n({});
|
|
1304
|
+
function wt() {
|
|
1305
|
+
return a(Ct);
|
|
1230
1306
|
}
|
|
1231
|
-
function
|
|
1307
|
+
function Tt(e) {
|
|
1232
1308
|
let { disabled: t, currentTab: n, changeCurrentTab: r } = e, i = c(() => ({
|
|
1233
1309
|
disabled: t,
|
|
1234
1310
|
currentTab: n,
|
|
@@ -1238,15 +1314,15 @@ function xt(e) {
|
|
|
1238
1314
|
n,
|
|
1239
1315
|
r
|
|
1240
1316
|
]);
|
|
1241
|
-
return /* @__PURE__ */ p(
|
|
1317
|
+
return /* @__PURE__ */ p(Ct.Provider, {
|
|
1242
1318
|
value: i,
|
|
1243
1319
|
children: e.children
|
|
1244
1320
|
});
|
|
1245
1321
|
}
|
|
1246
1322
|
//#endregion
|
|
1247
1323
|
//#region src/components/cardTab/cardTabButton/index.tsx
|
|
1248
|
-
function
|
|
1249
|
-
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } =
|
|
1324
|
+
function Et(e) {
|
|
1325
|
+
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } = wt(), u = s || n, d = `arkynCardTabButton ${u ? "isDisabled" : ""} ${c === a && a ? "isActive" : ""} ${r}`;
|
|
1250
1326
|
function f(e) {
|
|
1251
1327
|
l(a), i?.(e);
|
|
1252
1328
|
}
|
|
@@ -1261,12 +1337,12 @@ function St(e) {
|
|
|
1261
1337
|
}
|
|
1262
1338
|
//#endregion
|
|
1263
1339
|
//#region src/components/cardTab/cardTabContainer/index.tsx
|
|
1264
|
-
function
|
|
1340
|
+
function Dt(e) {
|
|
1265
1341
|
let { children: t, onChange: n, defaultValue: r, disabled: i = !1, className: a, ...o } = e, [s, c] = u(r || ""), l = `arkynCardTabContainer ${a || ""}`;
|
|
1266
1342
|
function d(e) {
|
|
1267
1343
|
c(e), n && n(e);
|
|
1268
1344
|
}
|
|
1269
|
-
return /* @__PURE__ */ p(
|
|
1345
|
+
return /* @__PURE__ */ p(Tt, {
|
|
1270
1346
|
disabled: i,
|
|
1271
1347
|
currentTab: s,
|
|
1272
1348
|
changeCurrentTab: d,
|
|
@@ -1279,13 +1355,13 @@ function Ct(e) {
|
|
|
1279
1355
|
}
|
|
1280
1356
|
//#endregion
|
|
1281
1357
|
//#region src/components/checkbox/index.tsx
|
|
1282
|
-
function
|
|
1358
|
+
function Ot(e) {
|
|
1283
1359
|
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"}`;
|
|
1284
1360
|
function j() {
|
|
1285
1361
|
let e = D;
|
|
1286
1362
|
O(!e), f?.(e ? "" : v || "checked");
|
|
1287
1363
|
}
|
|
1288
|
-
return /* @__PURE__ */ p(
|
|
1364
|
+
return /* @__PURE__ */ p(it, {
|
|
1289
1365
|
name: n,
|
|
1290
1366
|
label: c,
|
|
1291
1367
|
showAsterisk: g,
|
|
@@ -1296,6 +1372,8 @@ function wt(e) {
|
|
|
1296
1372
|
children: /* @__PURE__ */ m("button", {
|
|
1297
1373
|
id: w,
|
|
1298
1374
|
type: "button",
|
|
1375
|
+
role: "checkbox",
|
|
1376
|
+
"aria-checked": k,
|
|
1299
1377
|
className: A,
|
|
1300
1378
|
onClick: j,
|
|
1301
1379
|
...y,
|
|
@@ -1310,61 +1388,61 @@ function wt(e) {
|
|
|
1310
1388
|
}
|
|
1311
1389
|
//#endregion
|
|
1312
1390
|
//#region src/hooks/useHydrated.ts
|
|
1313
|
-
function
|
|
1391
|
+
function kt() {
|
|
1314
1392
|
return () => {};
|
|
1315
1393
|
}
|
|
1316
|
-
function
|
|
1317
|
-
return d(
|
|
1394
|
+
function At() {
|
|
1395
|
+
return d(kt, () => !0, () => !1);
|
|
1318
1396
|
}
|
|
1319
1397
|
//#endregion
|
|
1320
1398
|
//#region src/components/clientOnly.tsx
|
|
1321
|
-
function
|
|
1399
|
+
function jt(e) {
|
|
1322
1400
|
let { children: t, fallback: n = null } = e;
|
|
1323
|
-
return
|
|
1401
|
+
return At() ? t() : n;
|
|
1324
1402
|
}
|
|
1325
1403
|
//#endregion
|
|
1326
1404
|
//#region src/services/maskCurrencyValues.ts
|
|
1327
|
-
function
|
|
1405
|
+
function Mt(e) {
|
|
1328
1406
|
let t = e;
|
|
1329
|
-
return typeof e == "string" ? (t = +
|
|
1407
|
+
return typeof e == "string" ? (t = +oe(e), t % 1 != 0 && (t = t.toFixed(2))) : t = Number.isInteger(e) ? Number(e) * 10 ** 2 : e.toFixed(2), oe(String(t)) / 10 ** 2;
|
|
1330
1408
|
}
|
|
1331
|
-
function
|
|
1332
|
-
if (!e) return [0,
|
|
1333
|
-
let n =
|
|
1334
|
-
return [n,
|
|
1409
|
+
function Nt(e, t) {
|
|
1410
|
+
if (!e) return [0, ie(0, t)];
|
|
1411
|
+
let n = Mt(e);
|
|
1412
|
+
return [n, ie(n, t)];
|
|
1335
1413
|
}
|
|
1336
1414
|
//#endregion
|
|
1337
1415
|
//#region src/components/currencyInput/index.tsx
|
|
1338
|
-
function
|
|
1416
|
+
function Pt(e) {
|
|
1339
1417
|
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 = {
|
|
1340
1418
|
md: 20,
|
|
1341
1419
|
lg: 20
|
|
1342
1420
|
}[j], te = A ? "right" : "left", K = te === "left" && x, q = te === "right" && x;
|
|
1343
|
-
function
|
|
1421
|
+
function ne() {
|
|
1344
1422
|
W || !z?.current || (I(!0), z.current.focus());
|
|
1345
1423
|
}
|
|
1346
|
-
function
|
|
1424
|
+
function re(e) {
|
|
1347
1425
|
I(!0), w && w(e);
|
|
1348
1426
|
}
|
|
1349
|
-
function
|
|
1427
|
+
function ie(e) {
|
|
1350
1428
|
I(!1), T && T(e);
|
|
1351
1429
|
}
|
|
1352
|
-
let
|
|
1353
|
-
let [t, n] =
|
|
1354
|
-
return !g || t <= g ? (ee(n), [t, n]) :
|
|
1430
|
+
let ae = (e) => {
|
|
1431
|
+
let [t, n] = Nt(e, _);
|
|
1432
|
+
return !g || t <= g ? (ee(n), [t, n]) : Nt(e, _);
|
|
1355
1433
|
};
|
|
1356
1434
|
return o(() => {
|
|
1357
1435
|
function e() {
|
|
1358
1436
|
if (typeof f == "number") return f;
|
|
1359
1437
|
if (typeof h == "number") return h;
|
|
1360
1438
|
}
|
|
1361
|
-
let [, t] =
|
|
1439
|
+
let [, t] = Nt(e(), _);
|
|
1362
1440
|
ee(t);
|
|
1363
1441
|
}, [
|
|
1364
1442
|
_,
|
|
1365
1443
|
h,
|
|
1366
1444
|
f
|
|
1367
|
-
]), /* @__PURE__ */ p(
|
|
1445
|
+
]), /* @__PURE__ */ p(it, {
|
|
1368
1446
|
name: t,
|
|
1369
1447
|
label: c,
|
|
1370
1448
|
showAsterisk: k,
|
|
@@ -1376,7 +1454,7 @@ function At(e) {
|
|
|
1376
1454
|
title: r,
|
|
1377
1455
|
style: i,
|
|
1378
1456
|
className: `arkynCurrencyInput ${y ? "hasPrefix" : ""} ${b ? "hasSuffix" : ""} ${a} ${j} ${W || C || x ? "opacity" : ""} ${U ? "errored" : ""} ${F ? "focused" : ""}`,
|
|
1379
|
-
onClick:
|
|
1457
|
+
onClick: ne,
|
|
1380
1458
|
children: [
|
|
1381
1459
|
/* @__PURE__ */ p($, {
|
|
1382
1460
|
iconSize: G,
|
|
@@ -1398,11 +1476,11 @@ function At(e) {
|
|
|
1398
1476
|
disabled: W,
|
|
1399
1477
|
readOnly: C,
|
|
1400
1478
|
ref: z,
|
|
1401
|
-
onFocus:
|
|
1402
|
-
onBlur:
|
|
1479
|
+
onFocus: re,
|
|
1480
|
+
onBlur: ie,
|
|
1403
1481
|
onChange: (e) => {
|
|
1404
1482
|
e.preventDefault();
|
|
1405
|
-
let [t, n] =
|
|
1483
|
+
let [t, n] = ae(e.target.value);
|
|
1406
1484
|
v?.(e, String(t), String(n));
|
|
1407
1485
|
},
|
|
1408
1486
|
id: V,
|
|
@@ -1413,7 +1491,7 @@ function At(e) {
|
|
|
1413
1491
|
/* @__PURE__ */ p("input", {
|
|
1414
1492
|
type: "hidden",
|
|
1415
1493
|
name: t,
|
|
1416
|
-
value:
|
|
1494
|
+
value: Mt(L),
|
|
1417
1495
|
readOnly: !0
|
|
1418
1496
|
}),
|
|
1419
1497
|
/* @__PURE__ */ p($, {
|
|
@@ -1438,9 +1516,9 @@ function At(e) {
|
|
|
1438
1516
|
}
|
|
1439
1517
|
//#endregion
|
|
1440
1518
|
//#region src/components/datePicker/datePickerCalendarContainer/index.tsx
|
|
1441
|
-
function
|
|
1442
|
-
let { children: t, id: n, isFocused: r } = e, i = l(null), a =
|
|
1443
|
-
return
|
|
1519
|
+
function Ft(e) {
|
|
1520
|
+
let { children: t, id: n, isFocused: r } = e, i = l(null), a = lt(i, r, 420);
|
|
1521
|
+
return dt(r), r ? /* @__PURE__ */ p("div", {
|
|
1444
1522
|
ref: i,
|
|
1445
1523
|
id: n,
|
|
1446
1524
|
role: "dialog",
|
|
@@ -1451,7 +1529,7 @@ function jt(e) {
|
|
|
1451
1529
|
}
|
|
1452
1530
|
//#endregion
|
|
1453
1531
|
//#region src/components/datePicker/datePickerChevron/index.tsx
|
|
1454
|
-
function
|
|
1532
|
+
function It(e) {
|
|
1455
1533
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
1456
1534
|
return n ? null : /* @__PURE__ */ p(C, {
|
|
1457
1535
|
className: `arkynDatePickerChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -1466,7 +1544,7 @@ function Mt(e) {
|
|
|
1466
1544
|
}
|
|
1467
1545
|
//#endregion
|
|
1468
1546
|
//#region src/components/datePicker/datePickerContainer/index.tsx
|
|
1469
|
-
function
|
|
1547
|
+
function Lt(e) {
|
|
1470
1548
|
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
1549
|
return /* @__PURE__ */ p("div", {
|
|
1472
1550
|
ref: m,
|
|
@@ -1484,7 +1562,7 @@ function Nt(e) {
|
|
|
1484
1562
|
}
|
|
1485
1563
|
//#endregion
|
|
1486
1564
|
//#region src/components/datePicker/datePickerContent/index.tsx
|
|
1487
|
-
function
|
|
1565
|
+
function Rt(e) {
|
|
1488
1566
|
let { children: t, size: n } = e;
|
|
1489
1567
|
return /* @__PURE__ */ p("div", {
|
|
1490
1568
|
className: `arkynDatePickerContent ${n}`,
|
|
@@ -1493,7 +1571,7 @@ function Pt(e) {
|
|
|
1493
1571
|
}
|
|
1494
1572
|
//#endregion
|
|
1495
1573
|
//#region src/components/datePicker/datePickerOverlay/index.tsx
|
|
1496
|
-
function
|
|
1574
|
+
function zt(e) {
|
|
1497
1575
|
let { isFocused: t, handleBlur: n } = e;
|
|
1498
1576
|
return t ? /* @__PURE__ */ p("aside", {
|
|
1499
1577
|
className: "arkynDatePickerOverlay",
|
|
@@ -1502,7 +1580,7 @@ function Ft(e) {
|
|
|
1502
1580
|
}
|
|
1503
1581
|
//#endregion
|
|
1504
1582
|
//#region src/components/datePicker/datePickerSpinner/index.tsx
|
|
1505
|
-
function
|
|
1583
|
+
function Bt(e) {
|
|
1506
1584
|
let { iconSize: t, isLoading: n } = e;
|
|
1507
1585
|
return n ? /* @__PURE__ */ p(R, {
|
|
1508
1586
|
className: "arkynDatePickerSpinner",
|
|
@@ -1512,14 +1590,14 @@ function It(e) {
|
|
|
1512
1590
|
}
|
|
1513
1591
|
//#endregion
|
|
1514
1592
|
//#region src/components/datePicker/index.tsx
|
|
1515
|
-
function
|
|
1593
|
+
function Vt(e) {
|
|
1516
1594
|
let t = (e) => String(e).padStart(2, "0");
|
|
1517
1595
|
return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())}`;
|
|
1518
1596
|
}
|
|
1519
|
-
function
|
|
1597
|
+
function Ht(e) {
|
|
1520
1598
|
return e.toLocaleDateString("pt-BR");
|
|
1521
1599
|
}
|
|
1522
|
-
function
|
|
1600
|
+
function Ut(e) {
|
|
1523
1601
|
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 = {
|
|
1524
1602
|
md: 20,
|
|
1525
1603
|
lg: 20
|
|
@@ -1546,8 +1624,8 @@ function zt(e) {
|
|
|
1546
1624
|
x === void 0 && V(t), e.type === "range" && e.onChange?.(t), E && U();
|
|
1547
1625
|
}
|
|
1548
1626
|
if (e.type === "range") {
|
|
1549
|
-
let i = e.rangeSeparator ?? " até ", s = x === void 0 ? B : x, c = s ? JSON.stringify([
|
|
1550
|
-
return /* @__PURE__ */ p(
|
|
1627
|
+
let i = e.rangeSeparator ?? " até ", s = x === void 0 ? B : x, c = s ? JSON.stringify([Vt(s[0]), Vt(s[1])]) : "";
|
|
1628
|
+
return /* @__PURE__ */ p(it, {
|
|
1551
1629
|
name: t,
|
|
1552
1630
|
label: d,
|
|
1553
1631
|
showAsterisk: f,
|
|
@@ -1555,7 +1633,7 @@ function zt(e) {
|
|
|
1555
1633
|
errorMessage: N,
|
|
1556
1634
|
unShowFieldTemplate: w,
|
|
1557
1635
|
orientation: C,
|
|
1558
|
-
children: /* @__PURE__ */ m(
|
|
1636
|
+
children: /* @__PURE__ */ m(Lt, {
|
|
1559
1637
|
handleContainerFocus: H,
|
|
1560
1638
|
disabled: F,
|
|
1561
1639
|
isError: P,
|
|
@@ -1586,21 +1664,21 @@ function zt(e) {
|
|
|
1586
1664
|
size: I,
|
|
1587
1665
|
strokeWidth: 2.5
|
|
1588
1666
|
}),
|
|
1589
|
-
/* @__PURE__ */ p(
|
|
1667
|
+
/* @__PURE__ */ p(Rt, {
|
|
1590
1668
|
size: b,
|
|
1591
1669
|
children: s ? /* @__PURE__ */ m("p", {
|
|
1592
1670
|
className: "hasValue",
|
|
1593
1671
|
children: [
|
|
1594
|
-
|
|
1672
|
+
Ht(s[0]),
|
|
1595
1673
|
i,
|
|
1596
|
-
|
|
1674
|
+
Ht(s[1])
|
|
1597
1675
|
]
|
|
1598
1676
|
}) : /* @__PURE__ */ p("p", { children: r })
|
|
1599
1677
|
}),
|
|
1600
|
-
/* @__PURE__ */ p(
|
|
1678
|
+
/* @__PURE__ */ p(Ft, {
|
|
1601
1679
|
id: M,
|
|
1602
1680
|
isFocused: L,
|
|
1603
|
-
children: /* @__PURE__ */ p(
|
|
1681
|
+
children: /* @__PURE__ */ p(St, {
|
|
1604
1682
|
type: "range",
|
|
1605
1683
|
variant: T,
|
|
1606
1684
|
value: s,
|
|
@@ -1610,18 +1688,18 @@ function zt(e) {
|
|
|
1610
1688
|
onChangeView: e.onChangeView
|
|
1611
1689
|
})
|
|
1612
1690
|
}),
|
|
1613
|
-
/* @__PURE__ */ p(
|
|
1691
|
+
/* @__PURE__ */ p(It, {
|
|
1614
1692
|
disabled: F,
|
|
1615
1693
|
isFocused: L,
|
|
1616
1694
|
readOnly: o,
|
|
1617
1695
|
iconSize: I,
|
|
1618
1696
|
isLoading: a
|
|
1619
1697
|
}),
|
|
1620
|
-
/* @__PURE__ */ p(
|
|
1698
|
+
/* @__PURE__ */ p(Bt, {
|
|
1621
1699
|
iconSize: I,
|
|
1622
1700
|
isLoading: a
|
|
1623
1701
|
}),
|
|
1624
|
-
/* @__PURE__ */ p(
|
|
1702
|
+
/* @__PURE__ */ p(zt, {
|
|
1625
1703
|
handleBlur: U,
|
|
1626
1704
|
isFocused: L
|
|
1627
1705
|
})
|
|
@@ -1629,8 +1707,8 @@ function zt(e) {
|
|
|
1629
1707
|
})
|
|
1630
1708
|
});
|
|
1631
1709
|
}
|
|
1632
|
-
let K = x === void 0 ? ee : x, q = K ?
|
|
1633
|
-
return /* @__PURE__ */ p(
|
|
1710
|
+
let K = x === void 0 ? ee : x, q = K ? Vt(K) : "";
|
|
1711
|
+
return /* @__PURE__ */ p(it, {
|
|
1634
1712
|
name: t,
|
|
1635
1713
|
label: d,
|
|
1636
1714
|
showAsterisk: f,
|
|
@@ -1638,7 +1716,7 @@ function zt(e) {
|
|
|
1638
1716
|
errorMessage: N,
|
|
1639
1717
|
unShowFieldTemplate: w,
|
|
1640
1718
|
orientation: C,
|
|
1641
|
-
children: /* @__PURE__ */ m(
|
|
1719
|
+
children: /* @__PURE__ */ m(Lt, {
|
|
1642
1720
|
handleContainerFocus: H,
|
|
1643
1721
|
disabled: F,
|
|
1644
1722
|
isError: P,
|
|
@@ -1669,17 +1747,17 @@ function zt(e) {
|
|
|
1669
1747
|
size: I,
|
|
1670
1748
|
strokeWidth: 2.5
|
|
1671
1749
|
}),
|
|
1672
|
-
/* @__PURE__ */ p(
|
|
1750
|
+
/* @__PURE__ */ p(Rt, {
|
|
1673
1751
|
size: b,
|
|
1674
1752
|
children: K ? /* @__PURE__ */ p("p", {
|
|
1675
1753
|
className: "hasValue",
|
|
1676
|
-
children:
|
|
1754
|
+
children: Ht(K)
|
|
1677
1755
|
}) : /* @__PURE__ */ p("p", { children: r })
|
|
1678
1756
|
}),
|
|
1679
|
-
/* @__PURE__ */ p(
|
|
1757
|
+
/* @__PURE__ */ p(Ft, {
|
|
1680
1758
|
id: M,
|
|
1681
1759
|
isFocused: L,
|
|
1682
|
-
children: /* @__PURE__ */ p(
|
|
1760
|
+
children: /* @__PURE__ */ p(St, {
|
|
1683
1761
|
type: "single",
|
|
1684
1762
|
variant: T,
|
|
1685
1763
|
value: K,
|
|
@@ -1689,18 +1767,18 @@ function zt(e) {
|
|
|
1689
1767
|
onChangeView: e.onChangeView
|
|
1690
1768
|
})
|
|
1691
1769
|
}),
|
|
1692
|
-
/* @__PURE__ */ p(
|
|
1770
|
+
/* @__PURE__ */ p(It, {
|
|
1693
1771
|
disabled: F,
|
|
1694
1772
|
isFocused: L,
|
|
1695
1773
|
readOnly: o,
|
|
1696
1774
|
iconSize: I,
|
|
1697
1775
|
isLoading: a
|
|
1698
1776
|
}),
|
|
1699
|
-
/* @__PURE__ */ p(
|
|
1777
|
+
/* @__PURE__ */ p(Bt, {
|
|
1700
1778
|
iconSize: I,
|
|
1701
1779
|
isLoading: a
|
|
1702
1780
|
}),
|
|
1703
|
-
/* @__PURE__ */ p(
|
|
1781
|
+
/* @__PURE__ */ p(zt, {
|
|
1704
1782
|
handleBlur: U,
|
|
1705
1783
|
isFocused: L
|
|
1706
1784
|
})
|
|
@@ -1710,7 +1788,7 @@ function zt(e) {
|
|
|
1710
1788
|
}
|
|
1711
1789
|
//#endregion
|
|
1712
1790
|
//#region src/hooks/useEscapeKey.ts
|
|
1713
|
-
function
|
|
1791
|
+
function Wt(e, t) {
|
|
1714
1792
|
let n = l(t);
|
|
1715
1793
|
n.current = t, o(() => {
|
|
1716
1794
|
if (!e) return;
|
|
@@ -1724,7 +1802,7 @@ function Bt(e, t) {
|
|
|
1724
1802
|
}
|
|
1725
1803
|
//#endregion
|
|
1726
1804
|
//#region src/hooks/useFocusTrap.ts
|
|
1727
|
-
var
|
|
1805
|
+
var Gt = [
|
|
1728
1806
|
"a[href]",
|
|
1729
1807
|
"area[href]",
|
|
1730
1808
|
"button:not([disabled])",
|
|
@@ -1734,10 +1812,10 @@ var Vt = [
|
|
|
1734
1812
|
"iframe",
|
|
1735
1813
|
"[tabindex]:not([tabindex='-1'])"
|
|
1736
1814
|
].join(", ");
|
|
1737
|
-
function
|
|
1738
|
-
return Array.from(e.querySelectorAll(
|
|
1815
|
+
function Kt(e) {
|
|
1816
|
+
return Array.from(e.querySelectorAll(Gt));
|
|
1739
1817
|
}
|
|
1740
|
-
function
|
|
1818
|
+
function qt(e, t) {
|
|
1741
1819
|
let n = l(null);
|
|
1742
1820
|
o(() => {
|
|
1743
1821
|
if (!e) return;
|
|
@@ -1745,11 +1823,11 @@ function Ut(e, t) {
|
|
|
1745
1823
|
if (!r) return;
|
|
1746
1824
|
let i = r;
|
|
1747
1825
|
n.current = document.activeElement;
|
|
1748
|
-
let [a] =
|
|
1826
|
+
let [a] = Kt(i);
|
|
1749
1827
|
(a ?? i).focus();
|
|
1750
1828
|
function o(e) {
|
|
1751
1829
|
if (e.key !== "Tab") return;
|
|
1752
|
-
let t =
|
|
1830
|
+
let t = Kt(i);
|
|
1753
1831
|
if (t.length === 0) {
|
|
1754
1832
|
e.preventDefault(), i.focus();
|
|
1755
1833
|
return;
|
|
@@ -1764,30 +1842,30 @@ function Ut(e, t) {
|
|
|
1764
1842
|
}
|
|
1765
1843
|
//#endregion
|
|
1766
1844
|
//#region src/components/drawer/drawerContext.tsx
|
|
1767
|
-
var
|
|
1768
|
-
function
|
|
1845
|
+
var Jt = n({});
|
|
1846
|
+
function Yt(e) {
|
|
1769
1847
|
let t = c(() => ({ makeInvisible: e.makeInvisible }), [e.makeInvisible]);
|
|
1770
|
-
return /* @__PURE__ */ p(
|
|
1848
|
+
return /* @__PURE__ */ p(Jt.Provider, {
|
|
1771
1849
|
value: t,
|
|
1772
1850
|
children: e.children
|
|
1773
1851
|
});
|
|
1774
1852
|
}
|
|
1775
|
-
function
|
|
1776
|
-
return a(
|
|
1853
|
+
function Xt() {
|
|
1854
|
+
return a(Jt);
|
|
1777
1855
|
}
|
|
1778
1856
|
//#endregion
|
|
1779
1857
|
//#region src/components/drawer/drawerContainer/index.tsx
|
|
1780
|
-
function
|
|
1858
|
+
function Zt(e) {
|
|
1781
1859
|
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);
|
|
1782
1860
|
o(() => {
|
|
1783
1861
|
t ? (d(!0), h(!1)) : c && h(!0);
|
|
1784
|
-
}, [t, c]),
|
|
1862
|
+
}, [t, c]), dt(t);
|
|
1785
1863
|
let _ = c && !f;
|
|
1786
|
-
|
|
1864
|
+
Wt(_, () => h(!0)), qt(_, g);
|
|
1787
1865
|
function v(e) {
|
|
1788
1866
|
e.target === e.currentTarget && f && (h(!1), d(!1), n());
|
|
1789
1867
|
}
|
|
1790
|
-
return c ? /* @__PURE__ */ p(
|
|
1868
|
+
return c ? /* @__PURE__ */ p(Yt, {
|
|
1791
1869
|
makeInvisible: () => h(!0),
|
|
1792
1870
|
children: /* @__PURE__ */ m("aside", {
|
|
1793
1871
|
className: [
|
|
@@ -1814,8 +1892,8 @@ function qt(e) {
|
|
|
1814
1892
|
}
|
|
1815
1893
|
//#endregion
|
|
1816
1894
|
//#region src/components/drawer/drawerHeader/index.tsx
|
|
1817
|
-
function
|
|
1818
|
-
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } =
|
|
1895
|
+
function Qt(e) {
|
|
1896
|
+
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } = Xt();
|
|
1819
1897
|
return /* @__PURE__ */ m("header", {
|
|
1820
1898
|
className: `arkynDrawerHeader ${n}`.trim(),
|
|
1821
1899
|
...i,
|
|
@@ -1830,7 +1908,7 @@ function Jt(e) {
|
|
|
1830
1908
|
}
|
|
1831
1909
|
//#endregion
|
|
1832
1910
|
//#region src/components/facebookPixel/pixel.ts
|
|
1833
|
-
var
|
|
1911
|
+
var $t = class {
|
|
1834
1912
|
pixelId;
|
|
1835
1913
|
autoConfig;
|
|
1836
1914
|
initialized;
|
|
@@ -1877,18 +1955,18 @@ var Yt = class {
|
|
|
1877
1955
|
};
|
|
1878
1956
|
//#endregion
|
|
1879
1957
|
//#region src/components/facebookPixel/facebookPixel.client.tsx
|
|
1880
|
-
function
|
|
1881
|
-
let { pixelId: t, options: n, pageView: r, track: i, trackCustom: a, trackSingle: o, trackSingleCustom: s, grantConsent: c, revokeConsent: l } = e, u = new
|
|
1958
|
+
function en(e) {
|
|
1959
|
+
let { pixelId: t, options: n, pageView: r, track: i, trackCustom: a, trackSingle: o, trackSingleCustom: s, grantConsent: c, revokeConsent: l } = e, u = new $t(t, n);
|
|
1882
1960
|
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;
|
|
1883
1961
|
}
|
|
1884
1962
|
//#endregion
|
|
1885
1963
|
//#region src/components/facebookPixel/index.tsx
|
|
1886
|
-
function
|
|
1887
|
-
return process.env.NODE_ENV !== "production" && !e.showInDevMode ? null : /* @__PURE__ */ p(
|
|
1964
|
+
function tn(e) {
|
|
1965
|
+
return process.env.NODE_ENV !== "production" && !e.showInDevMode ? null : /* @__PURE__ */ p(jt, { children: () => /* @__PURE__ */ p(en, { ...e }) });
|
|
1888
1966
|
}
|
|
1889
1967
|
//#endregion
|
|
1890
1968
|
//#region src/components/fileUpload/hasFileContent/index.tsx
|
|
1891
|
-
function
|
|
1969
|
+
function nn(e) {
|
|
1892
1970
|
let { disabled: t, file: n, isLoading: r, acceptFile: i, changeFileButtonText: a, handleSelectFile: o, reSendFile: s } = e;
|
|
1893
1971
|
function c() {
|
|
1894
1972
|
if (t) return;
|
|
@@ -1908,13 +1986,13 @@ function Qt(e) {
|
|
|
1908
1986
|
className: "arkynFileUploadFileContainer",
|
|
1909
1987
|
children: [/* @__PURE__ */ p(l, {}), /* @__PURE__ */ p("p", { children: n.name })]
|
|
1910
1988
|
}),
|
|
1911
|
-
/* @__PURE__ */ p(
|
|
1989
|
+
/* @__PURE__ */ p(Ue, {}),
|
|
1912
1990
|
/* @__PURE__ */ m("div", {
|
|
1913
1991
|
className: "arkynFileUploadButtonsContainer",
|
|
1914
|
-
children: [!!s && /* @__PURE__ */ p(
|
|
1992
|
+
children: [!!s && /* @__PURE__ */ p(qe, {
|
|
1915
1993
|
orientation: "bottom",
|
|
1916
1994
|
text: "Reenviar arquivo",
|
|
1917
|
-
children: /* @__PURE__ */ p(
|
|
1995
|
+
children: /* @__PURE__ */ p(We, {
|
|
1918
1996
|
type: "button",
|
|
1919
1997
|
"aria-label": "resend file",
|
|
1920
1998
|
variant: "outline",
|
|
@@ -1925,7 +2003,7 @@ function Qt(e) {
|
|
|
1925
2003
|
icon: H,
|
|
1926
2004
|
disabled: t
|
|
1927
2005
|
})
|
|
1928
|
-
}), /* @__PURE__ */ p(
|
|
2006
|
+
}), /* @__PURE__ */ p(He, {
|
|
1929
2007
|
isLoading: r,
|
|
1930
2008
|
onClick: c,
|
|
1931
2009
|
variant: "outline",
|
|
@@ -1940,7 +2018,7 @@ function Qt(e) {
|
|
|
1940
2018
|
}
|
|
1941
2019
|
//#endregion
|
|
1942
2020
|
//#region src/components/fileUpload/noFileContent/index.tsx
|
|
1943
|
-
function
|
|
2021
|
+
function rn(e) {
|
|
1944
2022
|
let { dropFileText: t, isLoading: n, acceptFile: r, handleSelectFile: i, selectFileButtonText: a, disabled: o } = e;
|
|
1945
2023
|
function s(e) {
|
|
1946
2024
|
if (o) return;
|
|
@@ -1959,7 +2037,7 @@ function $t(e) {
|
|
|
1959
2037
|
return /* @__PURE__ */ m("div", {
|
|
1960
2038
|
onDrop: s,
|
|
1961
2039
|
className: "arkynFileUploadNoFileContent",
|
|
1962
|
-
children: [/* @__PURE__ */ p(
|
|
2040
|
+
children: [/* @__PURE__ */ p(He, {
|
|
1963
2041
|
isLoading: n,
|
|
1964
2042
|
onClick: c,
|
|
1965
2043
|
variant: "ghost",
|
|
@@ -1972,7 +2050,7 @@ function $t(e) {
|
|
|
1972
2050
|
}
|
|
1973
2051
|
//#endregion
|
|
1974
2052
|
//#region src/components/fileUpload/index.tsx
|
|
1975
|
-
function
|
|
2053
|
+
function an(e) {
|
|
1976
2054
|
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);
|
|
1977
2055
|
async function D(e) {
|
|
1978
2056
|
if (g) return;
|
|
@@ -1991,8 +2069,8 @@ function en(e) {
|
|
|
1991
2069
|
g || D(e);
|
|
1992
2070
|
}
|
|
1993
2071
|
let k = v || x;
|
|
1994
|
-
return /* @__PURE__ */ m(
|
|
1995
|
-
n && /* @__PURE__ */ p(
|
|
2072
|
+
return /* @__PURE__ */ m(Ve, { children: [
|
|
2073
|
+
n && /* @__PURE__ */ p(Be, {
|
|
1996
2074
|
showAsterisk: r,
|
|
1997
2075
|
children: n
|
|
1998
2076
|
}),
|
|
@@ -2004,7 +2082,7 @@ function en(e) {
|
|
|
2004
2082
|
name: t,
|
|
2005
2083
|
value: y || ""
|
|
2006
2084
|
}),
|
|
2007
|
-
!C && /* @__PURE__ */ p(
|
|
2085
|
+
!C && /* @__PURE__ */ p(rn, {
|
|
2008
2086
|
disabled: g,
|
|
2009
2087
|
isLoading: T,
|
|
2010
2088
|
acceptFile: s,
|
|
@@ -2012,7 +2090,7 @@ function en(e) {
|
|
|
2012
2090
|
handleSelectFile: O,
|
|
2013
2091
|
selectFileButtonText: d
|
|
2014
2092
|
}),
|
|
2015
|
-
C && /* @__PURE__ */ p(
|
|
2093
|
+
C && /* @__PURE__ */ p(nn, {
|
|
2016
2094
|
disabled: g,
|
|
2017
2095
|
isLoading: T,
|
|
2018
2096
|
acceptFile: s,
|
|
@@ -2023,14 +2101,14 @@ function en(e) {
|
|
|
2023
2101
|
})
|
|
2024
2102
|
]
|
|
2025
2103
|
}),
|
|
2026
|
-
k && /* @__PURE__ */ p(
|
|
2104
|
+
k && /* @__PURE__ */ p(ze, { children: k })
|
|
2027
2105
|
] });
|
|
2028
2106
|
}
|
|
2029
2107
|
//#endregion
|
|
2030
2108
|
//#region src/components/fullCalendar/_viewService.ts
|
|
2031
|
-
var
|
|
2109
|
+
var on = class {
|
|
2032
2110
|
capitalize(e) {
|
|
2033
|
-
return
|
|
2111
|
+
return re(e);
|
|
2034
2112
|
}
|
|
2035
2113
|
listHours(e) {
|
|
2036
2114
|
let [t, n] = e, r = [];
|
|
@@ -2124,16 +2202,16 @@ var tn = class {
|
|
|
2124
2202
|
let n = new Date(e);
|
|
2125
2203
|
n.setDate(n.getDate() - 1), t(n);
|
|
2126
2204
|
}
|
|
2127
|
-
},
|
|
2128
|
-
function
|
|
2129
|
-
return a(
|
|
2205
|
+
}, sn = n({});
|
|
2206
|
+
function cn() {
|
|
2207
|
+
return a(sn);
|
|
2130
2208
|
}
|
|
2131
|
-
function
|
|
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
|
|
2209
|
+
function ln(e) {
|
|
2210
|
+
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 on(), d = l.listHours([8, 18]), [f, m] = u(i), h = c || f;
|
|
2133
2211
|
function g(e) {
|
|
2134
2212
|
o && o(e), m(e);
|
|
2135
2213
|
}
|
|
2136
|
-
return /* @__PURE__ */ p(
|
|
2214
|
+
return /* @__PURE__ */ p(sn.Provider, {
|
|
2137
2215
|
value: {
|
|
2138
2216
|
events: r,
|
|
2139
2217
|
blockedTimestamps: t,
|
|
@@ -2155,7 +2233,7 @@ function an(e) {
|
|
|
2155
2233
|
}
|
|
2156
2234
|
//#endregion
|
|
2157
2235
|
//#region src/components/fullCalendar/dayCalendar/dayCalendarContainer/index.tsx
|
|
2158
|
-
function
|
|
2236
|
+
function un({ children: e }) {
|
|
2159
2237
|
return /* @__PURE__ */ p("div", {
|
|
2160
2238
|
className: "arkynDayCalendarContainer",
|
|
2161
2239
|
children: e
|
|
@@ -2163,15 +2241,15 @@ function on({ children: e }) {
|
|
|
2163
2241
|
}
|
|
2164
2242
|
//#endregion
|
|
2165
2243
|
//#region src/components/fullCalendar/dayCalendar/dayCalendarEvent/index.tsx
|
|
2166
|
-
var
|
|
2167
|
-
function
|
|
2168
|
-
let { events: t, viewDate: n } =
|
|
2244
|
+
var dn = 30, fn = 205;
|
|
2245
|
+
function pn(e) {
|
|
2246
|
+
let { events: t, viewDate: n } = cn(), r = n.getDate(), i = n.getMonth(), a = n.getFullYear(), o = t.map((e, t) => ({
|
|
2169
2247
|
event: e,
|
|
2170
2248
|
sourceIndex: t
|
|
2171
2249
|
})).filter(({ event: e }) => e.initialDate.getDate() === r && e.initialDate.getMonth() === i && e.initialDate.getFullYear() === a).sort((e, t) => {
|
|
2172
2250
|
let n = e.event.initialDate.getTime(), r = t.event.initialDate.getTime();
|
|
2173
2251
|
if (n !== r) return n - r;
|
|
2174
|
-
let i = e.event.endDate?.getTime() ?? n +
|
|
2252
|
+
let i = e.event.endDate?.getTime() ?? n + dn * 6e4, a = t.event.endDate?.getTime() ?? r + dn * 6e4;
|
|
2175
2253
|
return i === a ? e.sourceIndex - t.sourceIndex : i - a;
|
|
2176
2254
|
}), s = new Map(o.map((e, t) => [e.sourceIndex, t])), c = o.filter(({ event: t }) => {
|
|
2177
2255
|
let n = Math.floor(e.timeInMinutes / 60), o = e.timeInMinutes % 60;
|
|
@@ -2192,7 +2270,7 @@ function ln(e) {
|
|
|
2192
2270
|
return n === 0 ? `${t}h` : `${t}h${n}`;
|
|
2193
2271
|
}
|
|
2194
2272
|
function d(e) {
|
|
2195
|
-
let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t +
|
|
2273
|
+
let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t + dn;
|
|
2196
2274
|
return {
|
|
2197
2275
|
startMinutes: t,
|
|
2198
2276
|
endMinutes: Math.max(n, t + 1)
|
|
@@ -2207,7 +2285,7 @@ function ln(e) {
|
|
|
2207
2285
|
}, 0);
|
|
2208
2286
|
}
|
|
2209
2287
|
function h(t, n) {
|
|
2210
|
-
let { startMinutes: r, endMinutes: i } = d(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), s = a /
|
|
2288
|
+
let { startMinutes: r, endMinutes: i } = d(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), s = a / dn * 100, c = o / dn * 100, l = f(t, n) * fn;
|
|
2211
2289
|
return {
|
|
2212
2290
|
top: `${s}%`,
|
|
2213
2291
|
height: `${c}%`,
|
|
@@ -2230,8 +2308,8 @@ function ln(e) {
|
|
|
2230
2308
|
}
|
|
2231
2309
|
//#endregion
|
|
2232
2310
|
//#region src/components/fullCalendar/dayCalendar/dayCalendarRow/index.tsx
|
|
2233
|
-
function
|
|
2234
|
-
let n = new
|
|
2311
|
+
function mn({ hour: e, timeInMinutes: t }) {
|
|
2312
|
+
let n = new on(), { blockedTimestamps: r, viewDate: i, onClickDate: a } = cn();
|
|
2235
2313
|
function o() {
|
|
2236
2314
|
return r.some((e) => i >= e.initialDate && i <= e.endDate);
|
|
2237
2315
|
}
|
|
@@ -2247,22 +2325,22 @@ function un({ hour: e, timeInMinutes: t }) {
|
|
|
2247
2325
|
onClick: s,
|
|
2248
2326
|
children: [/* @__PURE__ */ p("p", { children: n.formatHourLabel(e) }), /* @__PURE__ */ p("div", {
|
|
2249
2327
|
className: "arkynDayCalendarRowContent",
|
|
2250
|
-
children: /* @__PURE__ */ p(
|
|
2328
|
+
children: /* @__PURE__ */ p(pn, { timeInMinutes: t })
|
|
2251
2329
|
})]
|
|
2252
2330
|
});
|
|
2253
2331
|
}
|
|
2254
2332
|
//#endregion
|
|
2255
2333
|
//#region src/components/fullCalendar/dayCalendar/index.tsx
|
|
2256
|
-
function
|
|
2257
|
-
let { listHours: e } =
|
|
2258
|
-
return /* @__PURE__ */ p(
|
|
2334
|
+
function hn() {
|
|
2335
|
+
let { listHours: e } = cn();
|
|
2336
|
+
return /* @__PURE__ */ p(un, { children: e.map((e) => /* @__PURE__ */ p(mn, {
|
|
2259
2337
|
hour: e,
|
|
2260
2338
|
timeInMinutes: e
|
|
2261
2339
|
}, e)) });
|
|
2262
2340
|
}
|
|
2263
2341
|
//#endregion
|
|
2264
2342
|
//#region src/components/fullCalendar/fullCalendarContainer/index.tsx
|
|
2265
|
-
function
|
|
2343
|
+
function gn({ children: e }) {
|
|
2266
2344
|
return /* @__PURE__ */ p("div", {
|
|
2267
2345
|
className: "arkynFullCalendarContainer",
|
|
2268
2346
|
children: e
|
|
@@ -2270,8 +2348,8 @@ function fn({ children: e }) {
|
|
|
2270
2348
|
}
|
|
2271
2349
|
//#endregion
|
|
2272
2350
|
//#region src/components/fullCalendar/fullCalendarHeader/index.tsx
|
|
2273
|
-
function
|
|
2274
|
-
let { setViewType: t, viewType: n } = e, r =
|
|
2351
|
+
function _n(e) {
|
|
2352
|
+
let { setViewType: t, viewType: n } = e, r = cn();
|
|
2275
2353
|
function i() {
|
|
2276
2354
|
switch (n) {
|
|
2277
2355
|
case "day": return r.previousDay();
|
|
@@ -2288,19 +2366,19 @@ function pn(e) {
|
|
|
2288
2366
|
}
|
|
2289
2367
|
return /* @__PURE__ */ m("div", {
|
|
2290
2368
|
className: "arkynFullCalendarHeader",
|
|
2291
|
-
children: [/* @__PURE__ */ m(
|
|
2369
|
+
children: [/* @__PURE__ */ m(Dt, {
|
|
2292
2370
|
defaultValue: n,
|
|
2293
2371
|
onChange: (e) => t(e),
|
|
2294
2372
|
children: [
|
|
2295
|
-
/* @__PURE__ */ p(
|
|
2373
|
+
/* @__PURE__ */ p(Et, {
|
|
2296
2374
|
value: "day",
|
|
2297
2375
|
children: "Dia"
|
|
2298
2376
|
}),
|
|
2299
|
-
/* @__PURE__ */ p(
|
|
2377
|
+
/* @__PURE__ */ p(Et, {
|
|
2300
2378
|
value: "week",
|
|
2301
2379
|
children: "Semana"
|
|
2302
2380
|
}),
|
|
2303
|
-
/* @__PURE__ */ p(
|
|
2381
|
+
/* @__PURE__ */ p(Et, {
|
|
2304
2382
|
value: "month",
|
|
2305
2383
|
children: "Mês"
|
|
2306
2384
|
})
|
|
@@ -2308,7 +2386,7 @@ function pn(e) {
|
|
|
2308
2386
|
}), /* @__PURE__ */ m("div", {
|
|
2309
2387
|
className: "arkynFullCalendarHeaderActions",
|
|
2310
2388
|
children: [
|
|
2311
|
-
/* @__PURE__ */ p(
|
|
2389
|
+
/* @__PURE__ */ p(We, {
|
|
2312
2390
|
variant: "outline",
|
|
2313
2391
|
icon: w,
|
|
2314
2392
|
"aria-label": "Handle previous",
|
|
@@ -2319,7 +2397,7 @@ function pn(e) {
|
|
|
2319
2397
|
month: "long",
|
|
2320
2398
|
year: "numeric"
|
|
2321
2399
|
}) }),
|
|
2322
|
-
/* @__PURE__ */ p(
|
|
2400
|
+
/* @__PURE__ */ p(We, {
|
|
2323
2401
|
variant: "outline",
|
|
2324
2402
|
icon: T,
|
|
2325
2403
|
"aria-label": "Handle next",
|
|
@@ -2331,8 +2409,8 @@ function pn(e) {
|
|
|
2331
2409
|
}
|
|
2332
2410
|
//#endregion
|
|
2333
2411
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.tsx
|
|
2334
|
-
function
|
|
2335
|
-
let { events: t } =
|
|
2412
|
+
function vn(e) {
|
|
2413
|
+
let { events: t } = cn(), n = t.filter((t) => t.initialDate.getDate() === e.day && t.initialDate.getMonth() === e.month && t.initialDate.getFullYear() === e.year);
|
|
2336
2414
|
if (n.length === 0) return null;
|
|
2337
2415
|
function r(t) {
|
|
2338
2416
|
return `${e.day}-${e.month}-${e.year}-${t}`;
|
|
@@ -2356,8 +2434,8 @@ function mn(e) {
|
|
|
2356
2434
|
}
|
|
2357
2435
|
//#endregion
|
|
2358
2436
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.tsx
|
|
2359
|
-
function
|
|
2360
|
-
let { day: t, month: n, year: r, dayOwner: i } = e, { blockedTimestamps: a, onClickDate: o } =
|
|
2437
|
+
function yn(e) {
|
|
2438
|
+
let { day: t, month: n, year: r, dayOwner: i } = e, { blockedTimestamps: a, onClickDate: o } = cn();
|
|
2361
2439
|
function s() {
|
|
2362
2440
|
let e = /* @__PURE__ */ new Date();
|
|
2363
2441
|
return t === e.getDate() && n === e.getMonth() && r === e.getFullYear();
|
|
@@ -2377,7 +2455,7 @@ function hn(e) {
|
|
|
2377
2455
|
children: t
|
|
2378
2456
|
}), /* @__PURE__ */ p("div", {
|
|
2379
2457
|
className: "arkynMonthlyCalendarEventContainer",
|
|
2380
|
-
children: /* @__PURE__ */ p(
|
|
2458
|
+
children: /* @__PURE__ */ p(vn, {
|
|
2381
2459
|
day: t,
|
|
2382
2460
|
month: n,
|
|
2383
2461
|
year: r
|
|
@@ -2387,15 +2465,15 @@ function hn(e) {
|
|
|
2387
2465
|
}
|
|
2388
2466
|
//#endregion
|
|
2389
2467
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.tsx
|
|
2390
|
-
function
|
|
2468
|
+
function bn() {
|
|
2391
2469
|
return /* @__PURE__ */ p("tbody", {
|
|
2392
2470
|
className: "arkynMonthlyCalendarTableBody",
|
|
2393
|
-
children:
|
|
2471
|
+
children: cn().listMonthlyMatrix.map((e, t) => /* @__PURE__ */ p("tr", { children: e.map((e, t) => /* @__PURE__ */ p(yn, { ...e }, t)) }, t))
|
|
2394
2472
|
});
|
|
2395
2473
|
}
|
|
2396
2474
|
//#endregion
|
|
2397
2475
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.tsx
|
|
2398
|
-
function
|
|
2476
|
+
function xn({ children: e }) {
|
|
2399
2477
|
return /* @__PURE__ */ p("div", {
|
|
2400
2478
|
className: "arkynMonthlyCalendarTableContainer",
|
|
2401
2479
|
children: /* @__PURE__ */ p("table", { children: e })
|
|
@@ -2403,29 +2481,29 @@ function _n({ children: e }) {
|
|
|
2403
2481
|
}
|
|
2404
2482
|
//#endregion
|
|
2405
2483
|
//#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.tsx
|
|
2406
|
-
function
|
|
2407
|
-
let { listWeek: e } =
|
|
2484
|
+
function Sn() {
|
|
2485
|
+
let { listWeek: e } = cn();
|
|
2408
2486
|
return /* @__PURE__ */ p("thead", {
|
|
2409
2487
|
className: "arkynMonthlyCalendarTableHeader",
|
|
2410
|
-
children: /* @__PURE__ */ p("tr", { children: e.map((e) => /* @__PURE__ */ p("th", { children:
|
|
2488
|
+
children: /* @__PURE__ */ p("tr", { children: e.map((e) => /* @__PURE__ */ p("th", { children: re(e) }, e)) })
|
|
2411
2489
|
});
|
|
2412
2490
|
}
|
|
2413
2491
|
//#endregion
|
|
2414
2492
|
//#region src/components/fullCalendar/monthlyCalendar/index.tsx
|
|
2415
|
-
function
|
|
2416
|
-
return /* @__PURE__ */ m(
|
|
2493
|
+
function Cn() {
|
|
2494
|
+
return /* @__PURE__ */ m(xn, { children: [/* @__PURE__ */ p(Sn, {}), /* @__PURE__ */ p(bn, {})] });
|
|
2417
2495
|
}
|
|
2418
2496
|
//#endregion
|
|
2419
2497
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarEvent/index.tsx
|
|
2420
|
-
var
|
|
2421
|
-
function
|
|
2422
|
-
let { events: t } =
|
|
2498
|
+
var wn = 30, Tn = 40;
|
|
2499
|
+
function En(e) {
|
|
2500
|
+
let { events: t } = cn(), n = t.map((e, t) => ({
|
|
2423
2501
|
event: e,
|
|
2424
2502
|
sourceIndex: t
|
|
2425
2503
|
})).filter(({ event: t }) => t.initialDate.getDate() === e.day && t.initialDate.getMonth() === e.month && t.initialDate.getFullYear() === e.year).sort((e, t) => {
|
|
2426
2504
|
let n = e.event.initialDate.getTime(), r = t.event.initialDate.getTime();
|
|
2427
2505
|
if (n !== r) return n - r;
|
|
2428
|
-
let i = e.event.endDate?.getTime() ?? n +
|
|
2506
|
+
let i = e.event.endDate?.getTime() ?? n + wn * 6e4, a = t.event.endDate?.getTime() ?? r + wn * 6e4;
|
|
2429
2507
|
return i === a ? e.sourceIndex - t.sourceIndex : i - a;
|
|
2430
2508
|
}), r = new Map(n.map((e, t) => [e.sourceIndex, t])), i = n.filter(({ event: t }) => {
|
|
2431
2509
|
let n = Math.floor(e.timeInMinutes / 60), r = e.timeInMinutes % 60;
|
|
@@ -2446,7 +2524,7 @@ function Sn(e) {
|
|
|
2446
2524
|
return n === 0 ? `${t}h` : `${t}h${n}`;
|
|
2447
2525
|
}
|
|
2448
2526
|
function s(e) {
|
|
2449
|
-
let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t +
|
|
2527
|
+
let t = e.initialDate.getHours() * 60 + e.initialDate.getMinutes(), n = e.endDate ? e.endDate.getHours() * 60 + e.endDate.getMinutes() : t + wn;
|
|
2450
2528
|
return {
|
|
2451
2529
|
startMinutes: t,
|
|
2452
2530
|
endMinutes: Math.max(n, t + 1)
|
|
@@ -2461,7 +2539,7 @@ function Sn(e) {
|
|
|
2461
2539
|
}, 0);
|
|
2462
2540
|
}
|
|
2463
2541
|
function l(t, n) {
|
|
2464
|
-
let { startMinutes: r, endMinutes: i } = s(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), l = a /
|
|
2542
|
+
let { startMinutes: r, endMinutes: i } = s(t), a = r - e.timeInMinutes, o = Math.max(i - r, 1), l = a / wn * 100, u = o / wn * 100, d = c(t, n) * Tn;
|
|
2465
2543
|
return {
|
|
2466
2544
|
top: `${l}%`,
|
|
2467
2545
|
height: `${u}%`,
|
|
@@ -2484,8 +2562,8 @@ function Sn(e) {
|
|
|
2484
2562
|
}
|
|
2485
2563
|
//#endregion
|
|
2486
2564
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.tsx
|
|
2487
|
-
function
|
|
2488
|
-
let { day: t, month: n, year: r, dayOwner: i, timeInMinutes: a } = e, { blockedTimestamps: o, onClickDate: s } =
|
|
2565
|
+
function Dn(e) {
|
|
2566
|
+
let { day: t, month: n, year: r, dayOwner: i, timeInMinutes: a } = e, { blockedTimestamps: o, onClickDate: s } = cn();
|
|
2489
2567
|
function c() {
|
|
2490
2568
|
let e = new Date(r, n, t);
|
|
2491
2569
|
return o.some((t) => e >= t.initialDate && e <= t.endDate);
|
|
@@ -2503,7 +2581,7 @@ function Cn(e) {
|
|
|
2503
2581
|
onClick: l,
|
|
2504
2582
|
children: /* @__PURE__ */ p("div", {
|
|
2505
2583
|
className: "arkynWeekCalendarTableTdContent",
|
|
2506
|
-
children: /* @__PURE__ */ p(
|
|
2584
|
+
children: /* @__PURE__ */ p(En, {
|
|
2507
2585
|
day: t,
|
|
2508
2586
|
month: n,
|
|
2509
2587
|
year: r,
|
|
@@ -2514,19 +2592,19 @@ function Cn(e) {
|
|
|
2514
2592
|
}
|
|
2515
2593
|
//#endregion
|
|
2516
2594
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.tsx
|
|
2517
|
-
function
|
|
2518
|
-
let e =
|
|
2595
|
+
function On() {
|
|
2596
|
+
let e = cn(), t = new on();
|
|
2519
2597
|
return /* @__PURE__ */ p("tbody", {
|
|
2520
2598
|
className: "arkynWeekCalendarTableBody",
|
|
2521
2599
|
children: e.listWeeklyMatrix.map((e) => /* @__PURE__ */ m("tr", { children: [/* @__PURE__ */ p("td", {
|
|
2522
2600
|
className: "hourTd",
|
|
2523
2601
|
children: /* @__PURE__ */ p("p", { children: t.formatHourLabel(e[0].timeInMinutes) })
|
|
2524
|
-
}), e.map((e) => /* @__PURE__ */ p(
|
|
2602
|
+
}), e.map((e) => /* @__PURE__ */ p(Dn, { ...e }, `${e.year}-${e.month}-${e.day}-${e.timeInMinutes}`))] }, e[0].timeInMinutes))
|
|
2525
2603
|
});
|
|
2526
2604
|
}
|
|
2527
2605
|
//#endregion
|
|
2528
2606
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.tsx
|
|
2529
|
-
function
|
|
2607
|
+
function kn({ children: e }) {
|
|
2530
2608
|
return /* @__PURE__ */ p("div", {
|
|
2531
2609
|
className: "arkynWeekCalendarTableContainer",
|
|
2532
2610
|
children: /* @__PURE__ */ p("table", { children: e })
|
|
@@ -2534,57 +2612,57 @@ function Tn({ children: e }) {
|
|
|
2534
2612
|
}
|
|
2535
2613
|
//#endregion
|
|
2536
2614
|
//#region src/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.tsx
|
|
2537
|
-
function
|
|
2538
|
-
let { listWeek: e, listWeeklyMatrix: t } =
|
|
2615
|
+
function An() {
|
|
2616
|
+
let { listWeek: e, listWeeklyMatrix: t } = cn(), n = t[0] || [];
|
|
2539
2617
|
return /* @__PURE__ */ p("thead", {
|
|
2540
2618
|
className: "arkynWeekCalendarTableHeader",
|
|
2541
2619
|
children: /* @__PURE__ */ m("tr", { children: [/* @__PURE__ */ p("th", {}), e.map((e, t) => /* @__PURE__ */ p("th", { children: /* @__PURE__ */ m("div", {
|
|
2542
2620
|
className: "arkynWeekCalendarTableHeaderContent",
|
|
2543
|
-
children: [/* @__PURE__ */ p("span", { children:
|
|
2621
|
+
children: [/* @__PURE__ */ p("span", { children: re(e) }), /* @__PURE__ */ p("strong", { children: n[t]?.day })]
|
|
2544
2622
|
}) }, e))] })
|
|
2545
2623
|
});
|
|
2546
2624
|
}
|
|
2547
2625
|
//#endregion
|
|
2548
2626
|
//#region src/components/fullCalendar/weekCalendar/index.tsx
|
|
2549
|
-
function
|
|
2550
|
-
return /* @__PURE__ */ m(
|
|
2627
|
+
function jn() {
|
|
2628
|
+
return /* @__PURE__ */ m(kn, { children: [/* @__PURE__ */ p(An, {}), /* @__PURE__ */ p(On, {})] });
|
|
2551
2629
|
}
|
|
2552
2630
|
//#endregion
|
|
2553
2631
|
//#region src/components/fullCalendar/index.tsx
|
|
2554
|
-
function
|
|
2632
|
+
function Mn(e) {
|
|
2555
2633
|
let [t, n] = u("month");
|
|
2556
|
-
return /* @__PURE__ */ p(
|
|
2634
|
+
return /* @__PURE__ */ p(ln, {
|
|
2557
2635
|
events: e.events || [],
|
|
2558
2636
|
viewValue: e.viewValue,
|
|
2559
2637
|
defaultViewValue: e.defaultViewValue,
|
|
2560
2638
|
onChangeView: e.onChangeView,
|
|
2561
2639
|
blockedTimestamps: e.blockedTimestamps || [],
|
|
2562
2640
|
onClickDate: e.onClickDate,
|
|
2563
|
-
children: /* @__PURE__ */ m(
|
|
2564
|
-
/* @__PURE__ */ p(
|
|
2641
|
+
children: /* @__PURE__ */ m(gn, { children: [
|
|
2642
|
+
/* @__PURE__ */ p(_n, {
|
|
2565
2643
|
viewType: t,
|
|
2566
2644
|
setViewType: n
|
|
2567
2645
|
}),
|
|
2568
|
-
t === "day" && /* @__PURE__ */ p(
|
|
2569
|
-
t === "month" && /* @__PURE__ */ p(
|
|
2570
|
-
t === "week" && /* @__PURE__ */ p(
|
|
2646
|
+
t === "day" && /* @__PURE__ */ p(hn, {}),
|
|
2647
|
+
t === "month" && /* @__PURE__ */ p(Cn, {}),
|
|
2648
|
+
t === "week" && /* @__PURE__ */ p(jn, {})
|
|
2571
2649
|
] })
|
|
2572
2650
|
});
|
|
2573
2651
|
}
|
|
2574
2652
|
//#endregion
|
|
2575
2653
|
//#region src/utils/escapeForInlineScript.ts
|
|
2576
|
-
function
|
|
2654
|
+
function Nn(e) {
|
|
2577
2655
|
return JSON.stringify(e ?? "").replace(/</g, "\\u003C");
|
|
2578
2656
|
}
|
|
2579
|
-
function
|
|
2657
|
+
function Pn(e) {
|
|
2580
2658
|
return JSON.stringify(e).replace(/</g, "\\u003C");
|
|
2581
2659
|
}
|
|
2582
|
-
function
|
|
2660
|
+
function Fn(e) {
|
|
2583
2661
|
return /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e);
|
|
2584
2662
|
}
|
|
2585
2663
|
//#endregion
|
|
2586
2664
|
//#region src/components/googleAnalytics/snippets/generateGAElements.ts
|
|
2587
|
-
function
|
|
2665
|
+
function In(e) {
|
|
2588
2666
|
let { measurementId: t } = e;
|
|
2589
2667
|
return t || console.warn("Google Analytics Measurement ID is required"), {
|
|
2590
2668
|
src: `https://www.googletagmanager.com/gtag/js?id=${encodeURIComponent(t)}`,
|
|
@@ -2592,12 +2670,12 @@ function Mn(e) {
|
|
|
2592
2670
|
window.dataLayer = window.dataLayer || [];
|
|
2593
2671
|
function gtag(){dataLayer.push(arguments);}
|
|
2594
2672
|
gtag('js', new Date());
|
|
2595
|
-
gtag('config', ${
|
|
2673
|
+
gtag('config', ${Nn(t)});`
|
|
2596
2674
|
};
|
|
2597
2675
|
}
|
|
2598
2676
|
//#endregion
|
|
2599
2677
|
//#region src/components/googleAnalytics/googleAnalytics.tsx
|
|
2600
|
-
var
|
|
2678
|
+
var Ln = class {
|
|
2601
2679
|
initializeAsyncScript(e) {
|
|
2602
2680
|
let t = document.createElement("script");
|
|
2603
2681
|
return t.async = !0, t.src = e, t;
|
|
@@ -2607,40 +2685,40 @@ var Nn = class {
|
|
|
2607
2685
|
return t.innerHTML = e, t;
|
|
2608
2686
|
}
|
|
2609
2687
|
initialize(e) {
|
|
2610
|
-
let { measurementId: t } = e, n =
|
|
2688
|
+
let { measurementId: t } = e, n = In({ measurementId: t }), r = this.initializeAsyncScript(n.src), i = this.initializeInlineScript(n.script);
|
|
2611
2689
|
document.head.appendChild(r), document.head.appendChild(i);
|
|
2612
2690
|
}
|
|
2613
2691
|
};
|
|
2614
2692
|
//#endregion
|
|
2615
2693
|
//#region src/components/googleAnalytics/googleAnalytics.client.tsx
|
|
2616
|
-
function
|
|
2617
|
-
return new
|
|
2694
|
+
function Rn(e) {
|
|
2695
|
+
return new Ln().initialize(e), null;
|
|
2618
2696
|
}
|
|
2619
2697
|
//#endregion
|
|
2620
2698
|
//#region src/components/googleAnalytics/index.tsx
|
|
2621
|
-
function
|
|
2699
|
+
function zn(e) {
|
|
2622
2700
|
let { measurementId: t, showInDevMode: n = !1 } = e;
|
|
2623
|
-
return process.env.NODE_ENV !== "production" && !n ? null : /* @__PURE__ */ p(
|
|
2701
|
+
return process.env.NODE_ENV !== "production" && !n ? null : /* @__PURE__ */ p(jt, { children: () => /* @__PURE__ */ p(Rn, { measurementId: t }) });
|
|
2624
2702
|
}
|
|
2625
2703
|
//#endregion
|
|
2626
2704
|
//#region src/components/googleTagManager/snippets/appendToDataLayer.ts
|
|
2627
|
-
function
|
|
2628
|
-
let { dataLayer: t, dataLayerName: n } = e, r =
|
|
2705
|
+
function Bn(e) {
|
|
2706
|
+
let { dataLayer: t, dataLayerName: n } = e, r = Fn(n) ? n : "dataLayer";
|
|
2629
2707
|
return r !== n && console.warn(`Invalid dataLayerName "${n}", falling back to "dataLayer"`), `
|
|
2630
2708
|
window.${r} = window.${r} || [];
|
|
2631
|
-
window.${r}.push(${
|
|
2709
|
+
window.${r}.push(${Pn(t)})`;
|
|
2632
2710
|
}
|
|
2633
2711
|
//#endregion
|
|
2634
2712
|
//#region src/components/googleTagManager/snippets/generateGTMElements.ts
|
|
2635
|
-
function
|
|
2713
|
+
function Vn(e) {
|
|
2636
2714
|
return encodeURIComponent(e).replace(/'/g, "%27");
|
|
2637
2715
|
}
|
|
2638
|
-
function
|
|
2639
|
-
let { id: t, events: n, dataLayer: r, dataLayerName: i, preview: a, auth: o } = e, s = `>m_auth=${
|
|
2716
|
+
function Hn(e) {
|
|
2717
|
+
let { id: t, events: n, dataLayer: r, dataLayerName: i, preview: a, auth: o } = e, s = `>m_auth=${Vn(o)}`, c = `>m_preview=${Vn(a)}`, l = Vn(t);
|
|
2640
2718
|
t || console.warn("GTM Id is required");
|
|
2641
2719
|
let u = `
|
|
2642
2720
|
<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 =
|
|
2721
|
+
height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>`, d = Fn(i) ? i : "dataLayer";
|
|
2644
2722
|
return {
|
|
2645
2723
|
iframe: u,
|
|
2646
2724
|
script: `
|
|
@@ -2649,8 +2727,8 @@ function Rn(e) {
|
|
|
2649
2727
|
var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
|
|
2650
2728
|
j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'${s}${c}>m_cookies_win=x';
|
|
2651
2729
|
f.parentNode.insertBefore(j,f);
|
|
2652
|
-
})(window,document,'script',${
|
|
2653
|
-
dataLayerVar:
|
|
2730
|
+
})(window,document,'script',${Nn(d)},${Nn(t)});`,
|
|
2731
|
+
dataLayerVar: Bn({
|
|
2654
2732
|
dataLayer: r,
|
|
2655
2733
|
dataLayerName: i
|
|
2656
2734
|
})
|
|
@@ -2658,13 +2736,13 @@ function Rn(e) {
|
|
|
2658
2736
|
}
|
|
2659
2737
|
//#endregion
|
|
2660
2738
|
//#region src/components/googleTagManager/googleTagManager.tsx
|
|
2661
|
-
var
|
|
2739
|
+
var Un = class {
|
|
2662
2740
|
initializeDataScript(e) {
|
|
2663
2741
|
let t = document.createElement("script");
|
|
2664
2742
|
return t.innerHTML = e, t;
|
|
2665
2743
|
}
|
|
2666
2744
|
initializeGTMElements(e) {
|
|
2667
|
-
let t =
|
|
2745
|
+
let t = Hn(e);
|
|
2668
2746
|
return {
|
|
2669
2747
|
noScript: () => {
|
|
2670
2748
|
let e = document.createElement("noscript");
|
|
@@ -2680,7 +2758,7 @@ var zn = class {
|
|
|
2680
2758
|
initializeDataLayer(e) {
|
|
2681
2759
|
let { dataLayer: t, dataLayerName: n } = e;
|
|
2682
2760
|
if (window[n]) return window[n].push(t);
|
|
2683
|
-
let r =
|
|
2761
|
+
let r = Bn({
|
|
2684
2762
|
dataLayer: t,
|
|
2685
2763
|
dataLayerName: n
|
|
2686
2764
|
}), i = this.initializeDataScript(r);
|
|
@@ -2700,14 +2778,14 @@ var zn = class {
|
|
|
2700
2778
|
};
|
|
2701
2779
|
//#endregion
|
|
2702
2780
|
//#region src/components/googleTagManager/googleTagManager.client.tsx
|
|
2703
|
-
function
|
|
2704
|
-
return new
|
|
2781
|
+
function Wn(e) {
|
|
2782
|
+
return new Un().initialize(e), null;
|
|
2705
2783
|
}
|
|
2706
2784
|
//#endregion
|
|
2707
2785
|
//#region src/components/googleTagManager/index.tsx
|
|
2708
|
-
function
|
|
2786
|
+
function Gn(e) {
|
|
2709
2787
|
let { gtmId: t, auth: n = "", preview: r = "", dataLayerName: i = "dataLayer", events: a = {}, dataLayer: o = {}, showInDevMode: s = !1 } = e;
|
|
2710
|
-
return process.env.NODE_ENV !== "production" && !s ? null : /* @__PURE__ */ p(
|
|
2788
|
+
return process.env.NODE_ENV !== "production" && !s ? null : /* @__PURE__ */ p(jt, { children: () => /* @__PURE__ */ p(Wn, {
|
|
2711
2789
|
auth: n,
|
|
2712
2790
|
dataLayer: o,
|
|
2713
2791
|
dataLayerName: i,
|
|
@@ -2718,7 +2796,7 @@ function Vn(e) {
|
|
|
2718
2796
|
}
|
|
2719
2797
|
//#endregion
|
|
2720
2798
|
//#region src/components/imageUpload/hasFileContent/index.tsx
|
|
2721
|
-
function
|
|
2799
|
+
function Kn(e) {
|
|
2722
2800
|
let { disabled: t, filePath: n, isLoading: r, acceptImage: i, changeImageButtonText: a, handleSelectFile: o, reSendImage: s } = e;
|
|
2723
2801
|
function c() {
|
|
2724
2802
|
if (t) return;
|
|
@@ -2731,10 +2809,10 @@ function Hn(e) {
|
|
|
2731
2809
|
return /* @__PURE__ */ m("div", {
|
|
2732
2810
|
className: "arkynImageUploadHasFileContent",
|
|
2733
2811
|
style: { backgroundImage: `url("${n}")` },
|
|
2734
|
-
children: [s && /* @__PURE__ */ p(
|
|
2812
|
+
children: [s && /* @__PURE__ */ p(qe, {
|
|
2735
2813
|
orientation: "bottom",
|
|
2736
2814
|
text: "Reenviar imagem",
|
|
2737
|
-
children: /* @__PURE__ */ p(
|
|
2815
|
+
children: /* @__PURE__ */ p(We, {
|
|
2738
2816
|
type: "button",
|
|
2739
2817
|
"aria-label": "resend image",
|
|
2740
2818
|
variant: "outline",
|
|
@@ -2745,7 +2823,7 @@ function Hn(e) {
|
|
|
2745
2823
|
icon: H,
|
|
2746
2824
|
disabled: t
|
|
2747
2825
|
})
|
|
2748
|
-
}), /* @__PURE__ */ p(
|
|
2826
|
+
}), /* @__PURE__ */ p(He, {
|
|
2749
2827
|
isLoading: r,
|
|
2750
2828
|
onClick: c,
|
|
2751
2829
|
variant: "outline",
|
|
@@ -2758,7 +2836,7 @@ function Hn(e) {
|
|
|
2758
2836
|
}
|
|
2759
2837
|
//#endregion
|
|
2760
2838
|
//#region src/components/imageUpload/noFileContent/index.tsx
|
|
2761
|
-
function
|
|
2839
|
+
function qn(e) {
|
|
2762
2840
|
let { dropImageText: t, isLoading: n, acceptImage: r, handleSelectFile: i, selectImageButtonText: a, disabled: o } = e;
|
|
2763
2841
|
function s(e) {
|
|
2764
2842
|
if (o) return;
|
|
@@ -2777,7 +2855,7 @@ function Un(e) {
|
|
|
2777
2855
|
return /* @__PURE__ */ m("div", {
|
|
2778
2856
|
onDrop: s,
|
|
2779
2857
|
className: "arkynImageUploadNoFileContent",
|
|
2780
|
-
children: [/* @__PURE__ */ p(
|
|
2858
|
+
children: [/* @__PURE__ */ p(He, {
|
|
2781
2859
|
isLoading: n,
|
|
2782
2860
|
onClick: c,
|
|
2783
2861
|
variant: "ghost",
|
|
@@ -2790,7 +2868,7 @@ function Un(e) {
|
|
|
2790
2868
|
}
|
|
2791
2869
|
//#endregion
|
|
2792
2870
|
//#region src/components/imageUpload/index.tsx
|
|
2793
|
-
function
|
|
2871
|
+
function Jn(e) {
|
|
2794
2872
|
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);
|
|
2795
2873
|
async function N(e) {
|
|
2796
2874
|
if (v) return;
|
|
@@ -2809,7 +2887,7 @@ function Wn(e) {
|
|
|
2809
2887
|
v || (A(URL.createObjectURL(e)), N(e));
|
|
2810
2888
|
}
|
|
2811
2889
|
let F = S || T;
|
|
2812
|
-
return /* @__PURE__ */ p(
|
|
2890
|
+
return /* @__PURE__ */ p(it, {
|
|
2813
2891
|
name: t,
|
|
2814
2892
|
label: r,
|
|
2815
2893
|
showAsterisk: i,
|
|
@@ -2825,7 +2903,7 @@ function Wn(e) {
|
|
|
2825
2903
|
name: t,
|
|
2826
2904
|
value: C || ""
|
|
2827
2905
|
}),
|
|
2828
|
-
!k && /* @__PURE__ */ p(
|
|
2906
|
+
!k && /* @__PURE__ */ p(qn, {
|
|
2829
2907
|
disabled: v,
|
|
2830
2908
|
isLoading: j,
|
|
2831
2909
|
acceptImage: l,
|
|
@@ -2833,7 +2911,7 @@ function Wn(e) {
|
|
|
2833
2911
|
handleSelectFile: P,
|
|
2834
2912
|
selectImageButtonText: h
|
|
2835
2913
|
}),
|
|
2836
|
-
k && /* @__PURE__ */ p(
|
|
2914
|
+
k && /* @__PURE__ */ p(Kn, {
|
|
2837
2915
|
disabled: v,
|
|
2838
2916
|
isLoading: j,
|
|
2839
2917
|
acceptImage: l,
|
|
@@ -2848,9 +2926,9 @@ function Wn(e) {
|
|
|
2848
2926
|
}
|
|
2849
2927
|
//#endregion
|
|
2850
2928
|
//#region src/components/mapView/mapView.client.tsx
|
|
2851
|
-
function
|
|
2929
|
+
function Yn({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i }) {
|
|
2852
2930
|
let a = l(null), s = l(null), c = e || t[0];
|
|
2853
|
-
return o(() => (
|
|
2931
|
+
return o(() => (J.accessToken = r, a.current = new J.Map({
|
|
2854
2932
|
container: s.current,
|
|
2855
2933
|
style: "mapbox://styles/mapbox/light-v11",
|
|
2856
2934
|
center: [c.lng, c.lat],
|
|
@@ -2859,11 +2937,11 @@ function Gn({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i
|
|
|
2859
2937
|
}), t.forEach((e) => {
|
|
2860
2938
|
let { lat: t, lng: r, popUp: i } = e, o = document.createElement("img");
|
|
2861
2939
|
o.className = "arkynMarker", o.src = "https://i.postimg.cc/mgKggjk7/Pin.png";
|
|
2862
|
-
let s = new
|
|
2940
|
+
let s = new J.Marker(o).setLngLat([r, t]).addTo(a.current);
|
|
2863
2941
|
if (i) {
|
|
2864
2942
|
let e = document.createElement("div");
|
|
2865
|
-
|
|
2866
|
-
let t = new
|
|
2943
|
+
Y(e).render(i);
|
|
2944
|
+
let t = new J.Popup({
|
|
2867
2945
|
offset: 25,
|
|
2868
2946
|
closeButton: !1,
|
|
2869
2947
|
className: "arkynMapViewPopup"
|
|
@@ -2898,19 +2976,19 @@ function Gn({ center: e, coordinates: t, onMarkerClick: n, accessToken: r, ...i
|
|
|
2898
2976
|
}
|
|
2899
2977
|
//#endregion
|
|
2900
2978
|
//#region src/components/mapView/index.tsx
|
|
2901
|
-
function
|
|
2979
|
+
function Xn({ className: e }) {
|
|
2902
2980
|
return /* @__PURE__ */ p("div", {
|
|
2903
2981
|
className: `arkynMapViewPinnedEmpty ${e}`,
|
|
2904
2982
|
children: /* @__PURE__ */ p(ee, {})
|
|
2905
2983
|
});
|
|
2906
2984
|
}
|
|
2907
|
-
function
|
|
2985
|
+
function Zn(e) {
|
|
2908
2986
|
let { coordinates: t, zoom: n = 18, accessToken: r, className: i, onMarkerClick: a, ...o } = e;
|
|
2909
|
-
if (!t) return /* @__PURE__ */ p(
|
|
2987
|
+
if (!t) return /* @__PURE__ */ p(Xn, { className: i });
|
|
2910
2988
|
let s = Array.isArray(t) ? t : [t];
|
|
2911
|
-
return s.length === 0 ? /* @__PURE__ */ p(
|
|
2912
|
-
fallback: /* @__PURE__ */ p(
|
|
2913
|
-
children: () => /* @__PURE__ */ p(
|
|
2989
|
+
return s.length === 0 ? /* @__PURE__ */ p(Xn, { className: i }) : /* @__PURE__ */ p(jt, {
|
|
2990
|
+
fallback: /* @__PURE__ */ p(Xn, { className: i }),
|
|
2991
|
+
children: () => /* @__PURE__ */ p(Yn, {
|
|
2914
2992
|
accessToken: r,
|
|
2915
2993
|
coordinates: s,
|
|
2916
2994
|
center: s[0],
|
|
@@ -2921,11 +2999,11 @@ function qn(e) {
|
|
|
2921
2999
|
}
|
|
2922
3000
|
//#endregion
|
|
2923
3001
|
//#region src/components/maskedInput/index.tsx
|
|
2924
|
-
var
|
|
3002
|
+
var Qn = r((e, t) => /* @__PURE__ */ p("input", {
|
|
2925
3003
|
ref: t,
|
|
2926
3004
|
...e
|
|
2927
3005
|
}));
|
|
2928
|
-
function
|
|
3006
|
+
function $n(e) {
|
|
2929
3007
|
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 = {
|
|
2930
3008
|
md: 20,
|
|
2931
3009
|
lg: 20
|
|
@@ -2939,11 +3017,11 @@ function Yn(e) {
|
|
|
2939
3017
|
function q(e) {
|
|
2940
3018
|
F(!1), C && C(e);
|
|
2941
3019
|
}
|
|
2942
|
-
let
|
|
2943
|
-
return /* @__PURE__ */ m(
|
|
3020
|
+
let ne = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${v ? "hasSuffix" : ""} ${a} ${O} ${V || x || y ? "opacity" : ""} ${B ? "errored" : ""} ${P ? "focused" : ""}`;
|
|
3021
|
+
return /* @__PURE__ */ m(Ve, {
|
|
2944
3022
|
className: g,
|
|
2945
3023
|
children: [
|
|
2946
|
-
h && /* @__PURE__ */ p(
|
|
3024
|
+
h && /* @__PURE__ */ p(Be, {
|
|
2947
3025
|
showAsterisk: E,
|
|
2948
3026
|
htmlFor: ee,
|
|
2949
3027
|
children: h
|
|
@@ -2952,7 +3030,7 @@ function Yn(e) {
|
|
|
2952
3030
|
title: r,
|
|
2953
3031
|
style: i,
|
|
2954
3032
|
onClick: te,
|
|
2955
|
-
className:
|
|
3033
|
+
className: ne,
|
|
2956
3034
|
children: [
|
|
2957
3035
|
/* @__PURE__ */ p($, {
|
|
2958
3036
|
iconSize: H,
|
|
@@ -2970,8 +3048,8 @@ function Yn(e) {
|
|
|
2970
3048
|
icon: b,
|
|
2971
3049
|
iconSize: H
|
|
2972
3050
|
}),
|
|
2973
|
-
/* @__PURE__ */ p(
|
|
2974
|
-
component:
|
|
3051
|
+
/* @__PURE__ */ p(se, {
|
|
3052
|
+
component: Qn,
|
|
2975
3053
|
mask: c,
|
|
2976
3054
|
replacement: f,
|
|
2977
3055
|
separate: o,
|
|
@@ -3006,36 +3084,36 @@ function Yn(e) {
|
|
|
3006
3084
|
})
|
|
3007
3085
|
]
|
|
3008
3086
|
}),
|
|
3009
|
-
z && /* @__PURE__ */ p(
|
|
3087
|
+
z && /* @__PURE__ */ p(ze, { children: z })
|
|
3010
3088
|
]
|
|
3011
3089
|
});
|
|
3012
3090
|
}
|
|
3013
3091
|
//#endregion
|
|
3014
3092
|
//#region src/components/modal/modalContext.tsx
|
|
3015
|
-
var
|
|
3016
|
-
function
|
|
3093
|
+
var er = n({});
|
|
3094
|
+
function tr(e) {
|
|
3017
3095
|
let t = c(() => ({ makeInvisible: e.makeInvisible }), [e.makeInvisible]);
|
|
3018
|
-
return /* @__PURE__ */ p(
|
|
3096
|
+
return /* @__PURE__ */ p(er.Provider, {
|
|
3019
3097
|
value: t,
|
|
3020
3098
|
children: e.children
|
|
3021
3099
|
});
|
|
3022
3100
|
}
|
|
3023
|
-
function
|
|
3024
|
-
return a(
|
|
3101
|
+
function nr() {
|
|
3102
|
+
return a(er);
|
|
3025
3103
|
}
|
|
3026
3104
|
//#endregion
|
|
3027
3105
|
//#region src/components/modal/modalContainer/index.tsx
|
|
3028
|
-
function
|
|
3106
|
+
function rr(e) {
|
|
3029
3107
|
let { isVisible: t, makeInvisible: n, children: r, className: i = "", ...a } = e, [s, c] = u(t), [d, f] = u(!1), h = l(null);
|
|
3030
3108
|
o(() => {
|
|
3031
3109
|
t ? (c(!0), f(!1)) : s && f(!0);
|
|
3032
|
-
}, [t, s]),
|
|
3110
|
+
}, [t, s]), dt(t);
|
|
3033
3111
|
let g = s && !d;
|
|
3034
|
-
|
|
3112
|
+
Wt(g, () => f(!0)), qt(g, h);
|
|
3035
3113
|
function _(e) {
|
|
3036
3114
|
e.target === e.currentTarget && d && (f(!1), c(!1), n());
|
|
3037
3115
|
}
|
|
3038
|
-
return s ? /* @__PURE__ */ p(
|
|
3116
|
+
return s ? /* @__PURE__ */ p(tr, {
|
|
3039
3117
|
makeInvisible: () => f(!0),
|
|
3040
3118
|
children: /* @__PURE__ */ m("aside", {
|
|
3041
3119
|
className: [
|
|
@@ -3061,7 +3139,7 @@ function $n(e) {
|
|
|
3061
3139
|
}
|
|
3062
3140
|
//#endregion
|
|
3063
3141
|
//#region src/components/modal/modalFooter/index.tsx
|
|
3064
|
-
function
|
|
3142
|
+
function ir(e) {
|
|
3065
3143
|
let { alignment: t = "right", className: n, ...r } = e;
|
|
3066
3144
|
return /* @__PURE__ */ p("footer", {
|
|
3067
3145
|
className: `arkynModalFooter ${t} ${n}`.trim(),
|
|
@@ -3070,8 +3148,8 @@ function er(e) {
|
|
|
3070
3148
|
}
|
|
3071
3149
|
//#endregion
|
|
3072
3150
|
//#region src/components/modal/modalHeader/index.tsx
|
|
3073
|
-
function
|
|
3074
|
-
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } =
|
|
3151
|
+
function ar(e) {
|
|
3152
|
+
let { showCloseButton: t = !0, className: n, children: r, ...i } = e, { makeInvisible: a } = nr();
|
|
3075
3153
|
return /* @__PURE__ */ m("header", {
|
|
3076
3154
|
className: `arkynModalHeader ${n}`.trim(),
|
|
3077
3155
|
...i,
|
|
@@ -3086,7 +3164,7 @@ function tr(e) {
|
|
|
3086
3164
|
}
|
|
3087
3165
|
//#endregion
|
|
3088
3166
|
//#region src/components/multiSelect/multiSelectChevron/index.tsx
|
|
3089
|
-
function
|
|
3167
|
+
function or(e) {
|
|
3090
3168
|
let { iconSize: t, isLoading: n, disabled: r, readOnly: i, isFocused: a } = e;
|
|
3091
3169
|
return n ? null : /* @__PURE__ */ p(C, {
|
|
3092
3170
|
className: `arkynMultiSelectChevron ${r || i ? "notAnimate" : ""} ${a ? "focused" : ""}`,
|
|
@@ -3101,7 +3179,7 @@ function nr(e) {
|
|
|
3101
3179
|
}
|
|
3102
3180
|
//#endregion
|
|
3103
3181
|
//#region src/components/multiSelect/multiSelectContainer/index.tsx
|
|
3104
|
-
function
|
|
3182
|
+
function sr(e) {
|
|
3105
3183
|
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
3184
|
return /* @__PURE__ */ p("div", {
|
|
3107
3185
|
ref: m,
|
|
@@ -3120,7 +3198,7 @@ function rr(e) {
|
|
|
3120
3198
|
}
|
|
3121
3199
|
//#endregion
|
|
3122
3200
|
//#region src/components/multiSelect/multiSelectContent/index.tsx
|
|
3123
|
-
function
|
|
3201
|
+
function cr(e) {
|
|
3124
3202
|
let { children: t, size: n } = e;
|
|
3125
3203
|
return /* @__PURE__ */ p("div", {
|
|
3126
3204
|
className: `arkynMultiSelectContent ${n}`,
|
|
@@ -3129,7 +3207,7 @@ function ir(e) {
|
|
|
3129
3207
|
}
|
|
3130
3208
|
//#endregion
|
|
3131
3209
|
//#region src/components/multiSelect/multiSelectMark/index.tsx
|
|
3132
|
-
function
|
|
3210
|
+
function lr(e) {
|
|
3133
3211
|
let { label: t, value: n, disabled: r, handleChangeValue: i } = e;
|
|
3134
3212
|
return /* @__PURE__ */ m("div", {
|
|
3135
3213
|
className: "arkynMultiSelectMark",
|
|
@@ -3145,7 +3223,7 @@ function ar(e) {
|
|
|
3145
3223
|
}
|
|
3146
3224
|
//#endregion
|
|
3147
3225
|
//#region src/components/multiSelect/multiSelectOption/index.tsx
|
|
3148
|
-
function
|
|
3226
|
+
function ur(e) {
|
|
3149
3227
|
let { label: t, optionHasSelected: n, handleChangeValue: r, value: i, size: a, id: o, isHighlighted: s = !1 } = e, c = n(i);
|
|
3150
3228
|
return /* @__PURE__ */ m("button", {
|
|
3151
3229
|
type: "button",
|
|
@@ -3163,9 +3241,9 @@ function or(e) {
|
|
|
3163
3241
|
}
|
|
3164
3242
|
//#endregion
|
|
3165
3243
|
//#region src/components/multiSelect/multiSelectOptionsContainer/index.tsx
|
|
3166
|
-
function
|
|
3167
|
-
let { children: t, id: n, isFocused: r, isSearchable: i, search: a, onSearch: o } = e, s = l(null), c =
|
|
3168
|
-
|
|
3244
|
+
function dr(e) {
|
|
3245
|
+
let { children: t, id: n, isFocused: r, isSearchable: i, search: a, onSearch: o } = e, s = l(null), c = lt(s, r, 300);
|
|
3246
|
+
dt(r);
|
|
3169
3247
|
function u(e) {
|
|
3170
3248
|
i && o(e.target.value);
|
|
3171
3249
|
}
|
|
@@ -3175,7 +3253,7 @@ function sr(e) {
|
|
|
3175
3253
|
role: "listbox",
|
|
3176
3254
|
"aria-multiselectable": "true",
|
|
3177
3255
|
className: `arkynMultiSelectOptionsContainer ${c}`,
|
|
3178
|
-
children: [i && /* @__PURE__ */ p(
|
|
3256
|
+
children: [i && /* @__PURE__ */ p(ft, {
|
|
3179
3257
|
type: "search",
|
|
3180
3258
|
name: "search-select",
|
|
3181
3259
|
variant: "underline",
|
|
@@ -3187,7 +3265,7 @@ function sr(e) {
|
|
|
3187
3265
|
}
|
|
3188
3266
|
//#endregion
|
|
3189
3267
|
//#region src/components/multiSelect/multiSelectOverlay/index.tsx
|
|
3190
|
-
function
|
|
3268
|
+
function fr(e) {
|
|
3191
3269
|
let { isFocused: t, handleBlur: n } = e;
|
|
3192
3270
|
return t ? /* @__PURE__ */ p("aside", {
|
|
3193
3271
|
className: "arkynMultiSelectOverlay",
|
|
@@ -3196,7 +3274,7 @@ function cr(e) {
|
|
|
3196
3274
|
}
|
|
3197
3275
|
//#endregion
|
|
3198
3276
|
//#region src/components/multiSelect/multiSelectSpinner/index.tsx
|
|
3199
|
-
function
|
|
3277
|
+
function pr(e) {
|
|
3200
3278
|
let { iconSize: t, isLoading: n } = e;
|
|
3201
3279
|
return n ? /* @__PURE__ */ p(R, {
|
|
3202
3280
|
className: "arkynMultiSelectSpinner",
|
|
@@ -3206,43 +3284,43 @@ function lr(e) {
|
|
|
3206
3284
|
}
|
|
3207
3285
|
//#endregion
|
|
3208
3286
|
//#region src/components/multiSelect/index.tsx
|
|
3209
|
-
function
|
|
3287
|
+
function mr(e) {
|
|
3210
3288
|
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 = {
|
|
3211
3289
|
md: 20,
|
|
3212
3290
|
lg: 20
|
|
3213
|
-
}[D], [V, H] = u(""), [U, W] = u(!1), [G, te] = u(o), [K, q] = u(-1),
|
|
3214
|
-
function ne(e) {
|
|
3215
|
-
return J.includes(e);
|
|
3216
|
-
}
|
|
3291
|
+
}[D], [V, H] = u(""), [U, W] = u(!1), [G, te] = u(o), [K, q] = u(-1), ne = O || G;
|
|
3217
3292
|
function re(e) {
|
|
3218
|
-
return
|
|
3293
|
+
return ne.includes(e);
|
|
3219
3294
|
}
|
|
3220
3295
|
function ie(e) {
|
|
3296
|
+
return n.find((t) => t.value === e)?.label || "";
|
|
3297
|
+
}
|
|
3298
|
+
function ae(e) {
|
|
3221
3299
|
return `${L}-option-${e.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
|
|
3222
3300
|
}
|
|
3223
|
-
function
|
|
3301
|
+
function oe() {
|
|
3224
3302
|
z || !N?.current || U || (W(!0), q(-1), N.current.focus(), w?.());
|
|
3225
3303
|
}
|
|
3226
|
-
function
|
|
3304
|
+
function J() {
|
|
3227
3305
|
W(!1), q(-1), S && N.current && N.current.blur();
|
|
3228
3306
|
}
|
|
3229
3307
|
function Y(e) {
|
|
3230
3308
|
H(e), q(-1), b && b(e);
|
|
3231
3309
|
}
|
|
3232
3310
|
function se(e) {
|
|
3233
|
-
|
|
3311
|
+
re(e) ? (te(G.filter((t) => t !== e)), x && x(G.filter((t) => t !== e))) : (te([...G, e]), x && x([...G, e])), a && J();
|
|
3234
3312
|
}
|
|
3235
3313
|
let X = n.filter((t) => !!(e.onSearch || !e.isSearchable || t.label.toLowerCase().includes(V.toLowerCase())));
|
|
3236
|
-
function
|
|
3314
|
+
function ce(e) {
|
|
3237
3315
|
if (z) return;
|
|
3238
3316
|
if (!U) {
|
|
3239
|
-
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(),
|
|
3317
|
+
(e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), oe(), e.key === "ArrowDown" && q(0));
|
|
3240
3318
|
return;
|
|
3241
3319
|
}
|
|
3242
3320
|
let t = e.target?.tagName === "INPUT", n = e.target?.tagName === "BUTTON";
|
|
3243
3321
|
switch (e.key) {
|
|
3244
3322
|
case "Escape":
|
|
3245
|
-
e.preventDefault(),
|
|
3323
|
+
e.preventDefault(), J(), P.current?.focus();
|
|
3246
3324
|
break;
|
|
3247
3325
|
case "ArrowDown":
|
|
3248
3326
|
e.preventDefault(), q((e) => X.length === 0 ? -1 : e < 0 || e + 1 >= X.length ? 0 : e + 1);
|
|
@@ -3261,8 +3339,8 @@ function ur(e) {
|
|
|
3261
3339
|
default: break;
|
|
3262
3340
|
}
|
|
3263
3341
|
}
|
|
3264
|
-
let
|
|
3265
|
-
return /* @__PURE__ */ p(
|
|
3342
|
+
let Z = K >= 0 && K < X.length ? ae(X[K].value) : void 0;
|
|
3343
|
+
return /* @__PURE__ */ p(it, {
|
|
3266
3344
|
name: t,
|
|
3267
3345
|
label: _,
|
|
3268
3346
|
showAsterisk: v,
|
|
@@ -3270,8 +3348,8 @@ function ur(e) {
|
|
|
3270
3348
|
errorMessage: R,
|
|
3271
3349
|
unShowFieldTemplate: A,
|
|
3272
3350
|
orientation: j,
|
|
3273
|
-
children: /* @__PURE__ */ m(
|
|
3274
|
-
handleContainerFocus:
|
|
3351
|
+
children: /* @__PURE__ */ m(sr, {
|
|
3352
|
+
handleContainerFocus: oe,
|
|
3275
3353
|
disabled: z,
|
|
3276
3354
|
isError: ee,
|
|
3277
3355
|
isFocused: U,
|
|
@@ -3282,15 +3360,15 @@ function ur(e) {
|
|
|
3282
3360
|
prefixExists: !!E,
|
|
3283
3361
|
id: I,
|
|
3284
3362
|
containerRef: P,
|
|
3285
|
-
onContainerKeyDown:
|
|
3363
|
+
onContainerKeyDown: ce,
|
|
3286
3364
|
tabIndex: z ? -1 : 0,
|
|
3287
3365
|
ariaControls: L,
|
|
3288
|
-
ariaActiveDescendant:
|
|
3366
|
+
ariaActiveDescendant: Z,
|
|
3289
3367
|
children: [
|
|
3290
3368
|
/* @__PURE__ */ p("input", {
|
|
3291
3369
|
ref: N,
|
|
3292
3370
|
name: t,
|
|
3293
|
-
value: JSON.stringify(
|
|
3371
|
+
value: JSON.stringify(ne),
|
|
3294
3372
|
type: "hidden"
|
|
3295
3373
|
}),
|
|
3296
3374
|
/* @__PURE__ */ p($, {
|
|
@@ -3302,44 +3380,44 @@ function ur(e) {
|
|
|
3302
3380
|
size: B,
|
|
3303
3381
|
strokeWidth: 2.5
|
|
3304
3382
|
}),
|
|
3305
|
-
/* @__PURE__ */ m(
|
|
3383
|
+
/* @__PURE__ */ m(cr, {
|
|
3306
3384
|
size: D,
|
|
3307
|
-
children: [
|
|
3308
|
-
label:
|
|
3385
|
+
children: [ne.map((e) => /* @__PURE__ */ p(lr, {
|
|
3386
|
+
label: ie(e),
|
|
3309
3387
|
value: e,
|
|
3310
3388
|
handleChangeValue: se,
|
|
3311
3389
|
disabled: z
|
|
3312
|
-
}, e)),
|
|
3390
|
+
}, e)), ne.length <= 0 && /* @__PURE__ */ p("p", { children: i })]
|
|
3313
3391
|
}),
|
|
3314
|
-
/* @__PURE__ */ m(
|
|
3392
|
+
/* @__PURE__ */ m(dr, {
|
|
3315
3393
|
id: L,
|
|
3316
3394
|
isFocused: U,
|
|
3317
3395
|
isSearchable: h,
|
|
3318
3396
|
search: V,
|
|
3319
3397
|
onSearch: Y,
|
|
3320
|
-
children: [X.map(({ label: e, value: t }, n) => /* @__PURE__ */ p(
|
|
3321
|
-
id:
|
|
3398
|
+
children: [X.map(({ label: e, value: t }, n) => /* @__PURE__ */ p(ur, {
|
|
3399
|
+
id: ae(t),
|
|
3322
3400
|
label: e,
|
|
3323
3401
|
value: t,
|
|
3324
3402
|
size: D,
|
|
3325
3403
|
isHighlighted: n === K,
|
|
3326
3404
|
handleChangeValue: se,
|
|
3327
|
-
optionHasSelected:
|
|
3405
|
+
optionHasSelected: re
|
|
3328
3406
|
}, t)), X.length <= 0 && /* @__PURE__ */ p("p", { children: C })]
|
|
3329
3407
|
}),
|
|
3330
|
-
/* @__PURE__ */ p(
|
|
3408
|
+
/* @__PURE__ */ p(or, {
|
|
3331
3409
|
disabled: z,
|
|
3332
3410
|
isFocused: U,
|
|
3333
3411
|
readOnly: f,
|
|
3334
3412
|
iconSize: B,
|
|
3335
3413
|
isLoading: d
|
|
3336
3414
|
}),
|
|
3337
|
-
/* @__PURE__ */ p(
|
|
3415
|
+
/* @__PURE__ */ p(pr, {
|
|
3338
3416
|
iconSize: B,
|
|
3339
3417
|
isLoading: d
|
|
3340
3418
|
}),
|
|
3341
|
-
/* @__PURE__ */ p(
|
|
3342
|
-
handleBlur:
|
|
3419
|
+
/* @__PURE__ */ p(fr, {
|
|
3420
|
+
handleBlur: J,
|
|
3343
3421
|
isFocused: U
|
|
3344
3422
|
})
|
|
3345
3423
|
]
|
|
@@ -3348,7 +3426,7 @@ function ur(e) {
|
|
|
3348
3426
|
}
|
|
3349
3427
|
//#endregion
|
|
3350
3428
|
//#region src/components/pagination/chevronButton/index.tsx
|
|
3351
|
-
function
|
|
3429
|
+
function hr(e) {
|
|
3352
3430
|
let { orientation: t, handlePageChange: n, disabled: r } = e;
|
|
3353
3431
|
return /* @__PURE__ */ p("button", {
|
|
3354
3432
|
type: "button",
|
|
@@ -3363,7 +3441,7 @@ function dr(e) {
|
|
|
3363
3441
|
}
|
|
3364
3442
|
//#endregion
|
|
3365
3443
|
//#region src/components/pagination/currentButton/index.tsx
|
|
3366
|
-
function
|
|
3444
|
+
function gr({ currentPage: e }) {
|
|
3367
3445
|
return /* @__PURE__ */ p("button", {
|
|
3368
3446
|
type: "button",
|
|
3369
3447
|
className: "arkynPaginationCurrentButton",
|
|
@@ -3373,7 +3451,7 @@ function fr({ currentPage: e }) {
|
|
|
3373
3451
|
}
|
|
3374
3452
|
//#endregion
|
|
3375
3453
|
//#region src/components/pagination/pageButton/index.tsx
|
|
3376
|
-
function
|
|
3454
|
+
function _r(e) {
|
|
3377
3455
|
let { page: t, handlePageChange: n } = e;
|
|
3378
3456
|
return /* @__PURE__ */ p("button", {
|
|
3379
3457
|
type: "button",
|
|
@@ -3384,7 +3462,7 @@ function pr(e) {
|
|
|
3384
3462
|
}
|
|
3385
3463
|
//#endregion
|
|
3386
3464
|
//#region src/components/pagination/paginationService.ts
|
|
3387
|
-
var
|
|
3465
|
+
var vr = class {
|
|
3388
3466
|
currentPage;
|
|
3389
3467
|
totalCountRegisters;
|
|
3390
3468
|
registerPerPage;
|
|
@@ -3417,7 +3495,7 @@ var mr = class {
|
|
|
3417
3495
|
};
|
|
3418
3496
|
//#endregion
|
|
3419
3497
|
//#region src/components/pagination/spread/index.tsx
|
|
3420
|
-
function
|
|
3498
|
+
function yr() {
|
|
3421
3499
|
return /* @__PURE__ */ p("p", {
|
|
3422
3500
|
className: "arkynPaginationSpread",
|
|
3423
3501
|
children: /* @__PURE__ */ p(D, {})
|
|
@@ -3425,8 +3503,8 @@ function hr() {
|
|
|
3425
3503
|
}
|
|
3426
3504
|
//#endregion
|
|
3427
3505
|
//#region src/components/pagination/index.tsx
|
|
3428
|
-
function
|
|
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
|
|
3506
|
+
function br(e) {
|
|
3507
|
+
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 vr({
|
|
3430
3508
|
totalCountRegisters: t,
|
|
3431
3509
|
currentPage: r,
|
|
3432
3510
|
registerPerPage: i,
|
|
@@ -3437,29 +3515,29 @@ function gr(e) {
|
|
|
3437
3515
|
className: "arkynPagination",
|
|
3438
3516
|
...o,
|
|
3439
3517
|
children: [
|
|
3440
|
-
/* @__PURE__ */ p(
|
|
3518
|
+
/* @__PURE__ */ p(hr, {
|
|
3441
3519
|
orientation: "left",
|
|
3442
3520
|
handlePageChange: g,
|
|
3443
3521
|
disabled: s <= 1
|
|
3444
3522
|
}),
|
|
3445
|
-
s > 1 + c && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
3523
|
+
s > 1 + c && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(_r, {
|
|
3446
3524
|
page: 1,
|
|
3447
3525
|
handlePageChange: () => h(1)
|
|
3448
|
-
}), s > 2 + c && /* @__PURE__ */ p(
|
|
3449
|
-
l.map((e) => /* @__PURE__ */ p(
|
|
3526
|
+
}), s > 2 + c && /* @__PURE__ */ p(yr, {})] }),
|
|
3527
|
+
l.map((e) => /* @__PURE__ */ p(_r, {
|
|
3450
3528
|
page: e,
|
|
3451
3529
|
handlePageChange: g
|
|
3452
3530
|
}, e)),
|
|
3453
|
-
/* @__PURE__ */ p(
|
|
3454
|
-
u.map((e) => /* @__PURE__ */ p(
|
|
3531
|
+
/* @__PURE__ */ p(gr, { currentPage: s }),
|
|
3532
|
+
u.map((e) => /* @__PURE__ */ p(_r, {
|
|
3455
3533
|
page: e,
|
|
3456
3534
|
handlePageChange: _
|
|
3457
3535
|
}, e)),
|
|
3458
|
-
s + c < d && /* @__PURE__ */ m(f, { children: [s + 1 + c < d && /* @__PURE__ */ p(
|
|
3536
|
+
s + c < d && /* @__PURE__ */ m(f, { children: [s + 1 + c < d && /* @__PURE__ */ p(yr, {}), /* @__PURE__ */ p(_r, {
|
|
3459
3537
|
page: d,
|
|
3460
3538
|
handlePageChange: () => h(d)
|
|
3461
3539
|
})] }),
|
|
3462
|
-
/* @__PURE__ */ p(
|
|
3540
|
+
/* @__PURE__ */ p(hr, {
|
|
3463
3541
|
orientation: "right",
|
|
3464
3542
|
handlePageChange: _,
|
|
3465
3543
|
disabled: s >= d
|
|
@@ -3469,14 +3547,14 @@ function gr(e) {
|
|
|
3469
3547
|
}
|
|
3470
3548
|
//#endregion
|
|
3471
3549
|
//#region src/utils/phoneInputUtilities.ts
|
|
3472
|
-
function
|
|
3550
|
+
function xr(e) {
|
|
3473
3551
|
return e?.replace(/[^0-9]/g, "");
|
|
3474
3552
|
}
|
|
3475
|
-
var
|
|
3553
|
+
var Sr = {
|
|
3476
3554
|
EIGHT: "(99) 9999-9999",
|
|
3477
3555
|
NINE: "(99) 99999-9999"
|
|
3478
3556
|
};
|
|
3479
|
-
function
|
|
3557
|
+
function Cr(e, t, n = "9") {
|
|
3480
3558
|
let r = "", i = 0;
|
|
3481
3559
|
for (let a = 0; a < t.length; a++) if (t[a] === n) if (i < e.length) r += e[i], i++;
|
|
3482
3560
|
else break;
|
|
@@ -3484,13 +3562,13 @@ function yr(e, t, n = "9") {
|
|
|
3484
3562
|
else break;
|
|
3485
3563
|
return r;
|
|
3486
3564
|
}
|
|
3487
|
-
function
|
|
3565
|
+
function wr(e) {
|
|
3488
3566
|
return e.length > 10 ? "NINE" : "EIGHT";
|
|
3489
3567
|
}
|
|
3490
|
-
var
|
|
3568
|
+
var Tr = xr(Sr.NINE).length;
|
|
3491
3569
|
//#endregion
|
|
3492
3570
|
//#region src/components/phoneInput/phoneInputContainer/index.tsx
|
|
3493
|
-
function
|
|
3571
|
+
function Er(e) {
|
|
3494
3572
|
let { children: t, onFocus: n, disabled: r, isError: i, isLoading: a, isFocused: o, className: s = "", readOnly: c, variant: l, size: u } = e;
|
|
3495
3573
|
return /* @__PURE__ */ p("section", {
|
|
3496
3574
|
className: `arkynPhoneInputContainer ${l} ${u} ${r || c || a ? "opacity" : ""} ${i ? "errored" : ""} ${o ? "focused" : ""} ${s}`.trim(),
|
|
@@ -3500,7 +3578,7 @@ function Sr(e) {
|
|
|
3500
3578
|
}
|
|
3501
3579
|
//#endregion
|
|
3502
3580
|
//#region src/components/phoneInput/phoneInputCountriesOverlay/index.tsx
|
|
3503
|
-
function
|
|
3581
|
+
function Dr(e) {
|
|
3504
3582
|
let { isOpen: t, onClick: n } = e;
|
|
3505
3583
|
return t ? /* @__PURE__ */ p("aside", {
|
|
3506
3584
|
className: "arkynPhoneInputCountriesOverlay",
|
|
@@ -3509,7 +3587,7 @@ function Cr(e) {
|
|
|
3509
3587
|
}
|
|
3510
3588
|
//#endregion
|
|
3511
3589
|
//#region src/components/phoneInput/phoneInputCountryOption/index.tsx
|
|
3512
|
-
function
|
|
3590
|
+
function Or(e) {
|
|
3513
3591
|
let { country: t, isActive: n, handleChangeValue: r, size: i } = e;
|
|
3514
3592
|
return /* @__PURE__ */ m("div", {
|
|
3515
3593
|
onClick: () => r(t),
|
|
@@ -3529,12 +3607,12 @@ function wr(e) {
|
|
|
3529
3607
|
}
|
|
3530
3608
|
//#endregion
|
|
3531
3609
|
//#region src/components/phoneInput/phoneInputCountryOptionsContainer/index.tsx
|
|
3532
|
-
function
|
|
3610
|
+
function kr(e) {
|
|
3533
3611
|
let { children: t, isOpen: n, onSearch: r, search: i, placeholder: a } = e, s = l(null), [c, d] = u("bottom");
|
|
3534
3612
|
function f(e) {
|
|
3535
3613
|
r(e.target.value);
|
|
3536
3614
|
}
|
|
3537
|
-
return
|
|
3615
|
+
return dt(n), o(() => {
|
|
3538
3616
|
n && (() => {
|
|
3539
3617
|
if (!s.current) return;
|
|
3540
3618
|
let e = s.current.parentElement;
|
|
@@ -3558,7 +3636,7 @@ function Tr(e) {
|
|
|
3558
3636
|
}
|
|
3559
3637
|
//#endregion
|
|
3560
3638
|
//#region src/components/phoneInput/phoneInputCountrySelector/index.tsx
|
|
3561
|
-
function
|
|
3639
|
+
function Ar(e) {
|
|
3562
3640
|
let { currentCountry: t, onClick: n } = e;
|
|
3563
3641
|
return /* @__PURE__ */ m("div", {
|
|
3564
3642
|
className: "phoneInputSelectCountry",
|
|
@@ -3573,16 +3651,16 @@ function Er(e) {
|
|
|
3573
3651
|
className: "chevronDown",
|
|
3574
3652
|
strokeWidth: 2.5
|
|
3575
3653
|
}),
|
|
3576
|
-
/* @__PURE__ */ p(
|
|
3654
|
+
/* @__PURE__ */ p(Ue, { orientation: "vertical" })
|
|
3577
3655
|
]
|
|
3578
3656
|
});
|
|
3579
3657
|
}
|
|
3580
3658
|
//#endregion
|
|
3581
3659
|
//#region src/components/phoneInput/phoneInputMask/index.tsx
|
|
3582
|
-
var
|
|
3660
|
+
var jr = r((e, t) => /* @__PURE__ */ p("input", {
|
|
3583
3661
|
ref: t,
|
|
3584
3662
|
...e
|
|
3585
|
-
})),
|
|
3663
|
+
})), Mr = r((e, t) => {
|
|
3586
3664
|
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);
|
|
3587
3665
|
h.current = s;
|
|
3588
3666
|
let g = typeof u.mask == "string" ? u.mask : u.mask[0];
|
|
@@ -3595,8 +3673,8 @@ var Dr = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
3595
3673
|
}, [g]);
|
|
3596
3674
|
let _ = `phoneInputMask ${a}`;
|
|
3597
3675
|
function v(e) {
|
|
3598
|
-
let t =
|
|
3599
|
-
t.length >
|
|
3676
|
+
let t = xr(e.target.value), n = wr(t);
|
|
3677
|
+
t.length > Tr || (t = Cr(t, Sr[n]), e.target.value = t, s(t));
|
|
3600
3678
|
}
|
|
3601
3679
|
return u.code === "+55" ? /* @__PURE__ */ p("input", {
|
|
3602
3680
|
id: f,
|
|
@@ -3608,13 +3686,13 @@ var Dr = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
3608
3686
|
disabled: d,
|
|
3609
3687
|
readOnly: r,
|
|
3610
3688
|
ref: t
|
|
3611
|
-
}) : /* @__PURE__ */ p(
|
|
3689
|
+
}) : /* @__PURE__ */ p(se, {
|
|
3612
3690
|
id: f,
|
|
3613
3691
|
value: c,
|
|
3614
3692
|
readOnly: r,
|
|
3615
3693
|
onChange: (e) => s(e.target.value),
|
|
3616
3694
|
className: _,
|
|
3617
|
-
component:
|
|
3695
|
+
component: jr,
|
|
3618
3696
|
onFocus: n,
|
|
3619
3697
|
onBlur: i,
|
|
3620
3698
|
disabled: d,
|
|
@@ -3626,12 +3704,12 @@ var Dr = r((e, t) => /* @__PURE__ */ p("input", {
|
|
|
3626
3704
|
});
|
|
3627
3705
|
//#endregion
|
|
3628
3706
|
//#region src/components/phoneInput/index.tsx
|
|
3629
|
-
function
|
|
3630
|
-
let n =
|
|
3631
|
-
return t.code === "+55" ?
|
|
3707
|
+
function Nr(e, t) {
|
|
3708
|
+
let n = oe(e), r = oe(t.code), i = e.trim().startsWith("+") && n.startsWith(r) ? n.slice(r.length) : n;
|
|
3709
|
+
return t.code === "+55" ? Cr(i, Sr[wr(i)]) : Cr(i, typeof t.mask == "string" ? t.mask : t.mask[0], "_");
|
|
3632
3710
|
}
|
|
3633
|
-
function
|
|
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 =
|
|
3711
|
+
function Pr(e) {
|
|
3712
|
+
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 = X.find((e) => e.iso === "BR"), T = f ? ae(f) : "", E = f ? ne(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 : Nr(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
3713
|
function G() {
|
|
3636
3714
|
U || D || j || (O(!0), W.current && W.current.focus());
|
|
3637
3715
|
}
|
|
@@ -3641,20 +3719,20 @@ function Ar(e) {
|
|
|
3641
3719
|
function K() {
|
|
3642
3720
|
M(!1), O(!1);
|
|
3643
3721
|
}
|
|
3644
|
-
function
|
|
3722
|
+
function q() {
|
|
3645
3723
|
O(!0);
|
|
3646
3724
|
}
|
|
3647
|
-
function
|
|
3725
|
+
function re() {
|
|
3648
3726
|
O(!1);
|
|
3649
3727
|
}
|
|
3650
|
-
function
|
|
3728
|
+
function ie(e) {
|
|
3651
3729
|
return e.name.toLowerCase().includes(k.toLowerCase());
|
|
3652
3730
|
}
|
|
3653
|
-
function
|
|
3731
|
+
function J(e) {
|
|
3654
3732
|
let t = F.code;
|
|
3655
|
-
return t +=
|
|
3733
|
+
return t += oe(e || L), t;
|
|
3656
3734
|
}
|
|
3657
|
-
return /* @__PURE__ */ p(
|
|
3735
|
+
return /* @__PURE__ */ p(it, {
|
|
3658
3736
|
name: _,
|
|
3659
3737
|
label: n,
|
|
3660
3738
|
showAsterisk: g,
|
|
@@ -3662,7 +3740,7 @@ function Ar(e) {
|
|
|
3662
3740
|
errorMessage: V,
|
|
3663
3741
|
unShowFieldTemplate: S,
|
|
3664
3742
|
orientation: C,
|
|
3665
|
-
children: /* @__PURE__ */ m(
|
|
3743
|
+
children: /* @__PURE__ */ m(Er, {
|
|
3666
3744
|
disabled: U,
|
|
3667
3745
|
isError: H,
|
|
3668
3746
|
isLoading: o,
|
|
@@ -3672,48 +3750,48 @@ function Ar(e) {
|
|
|
3672
3750
|
variant: h,
|
|
3673
3751
|
onFocus: G,
|
|
3674
3752
|
children: [
|
|
3675
|
-
/* @__PURE__ */ p(
|
|
3753
|
+
/* @__PURE__ */ p(Ar, {
|
|
3676
3754
|
currentCountry: F,
|
|
3677
3755
|
onClick: te,
|
|
3678
3756
|
size: d
|
|
3679
3757
|
}),
|
|
3680
|
-
/* @__PURE__ */ m(
|
|
3758
|
+
/* @__PURE__ */ m(kr, {
|
|
3681
3759
|
isOpen: U || c ? !1 : j,
|
|
3682
3760
|
search: k,
|
|
3683
3761
|
placeholder: y,
|
|
3684
3762
|
onSearch: A,
|
|
3685
|
-
children: [
|
|
3763
|
+
children: [X.filter((e) => ie(e)).map((e) => /* @__PURE__ */ p(Or, {
|
|
3686
3764
|
country: e,
|
|
3687
3765
|
handleChangeValue: () => {
|
|
3688
3766
|
I(e), M(!1), P("");
|
|
3689
3767
|
},
|
|
3690
3768
|
isActive: e.iso === F.iso,
|
|
3691
3769
|
size: d
|
|
3692
|
-
}, e.iso)),
|
|
3770
|
+
}, e.iso)), X.filter((e) => ie(e)).length === 0 && /* @__PURE__ */ p("p", { children: b })]
|
|
3693
3771
|
}),
|
|
3694
|
-
/* @__PURE__ */ p(
|
|
3772
|
+
/* @__PURE__ */ p(Dr, {
|
|
3695
3773
|
isOpen: U || c ? !1 : j,
|
|
3696
3774
|
onClick: K
|
|
3697
3775
|
}),
|
|
3698
|
-
/* @__PURE__ */ p(
|
|
3776
|
+
/* @__PURE__ */ p(Mr, {
|
|
3699
3777
|
id: B,
|
|
3700
3778
|
ref: W,
|
|
3701
3779
|
readonly: c,
|
|
3702
3780
|
currentCountry: F,
|
|
3703
3781
|
value: L,
|
|
3704
3782
|
disabled: U,
|
|
3705
|
-
onBlur:
|
|
3706
|
-
onFocus:
|
|
3783
|
+
onBlur: re,
|
|
3784
|
+
onFocus: q,
|
|
3707
3785
|
size: d,
|
|
3708
3786
|
onChange: (e) => {
|
|
3709
|
-
P(e), v?.(
|
|
3787
|
+
P(e), v?.(J(e));
|
|
3710
3788
|
}
|
|
3711
3789
|
}),
|
|
3712
3790
|
/* @__PURE__ */ p("input", {
|
|
3713
3791
|
ref: ee,
|
|
3714
3792
|
type: "hidden",
|
|
3715
3793
|
name: _,
|
|
3716
|
-
value:
|
|
3794
|
+
value: J()
|
|
3717
3795
|
})
|
|
3718
3796
|
]
|
|
3719
3797
|
})
|
|
@@ -3721,12 +3799,12 @@ function Ar(e) {
|
|
|
3721
3799
|
}
|
|
3722
3800
|
//#endregion
|
|
3723
3801
|
//#region src/components/popover/index.tsx
|
|
3724
|
-
function
|
|
3802
|
+
function Fr(e) {
|
|
3725
3803
|
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
3804
|
function f() {
|
|
3727
3805
|
o || s(!0);
|
|
3728
3806
|
}
|
|
3729
|
-
return
|
|
3807
|
+
return dt(o), Wt(o, () => s(!1)), qt(o, c), /* @__PURE__ */ m("div", {
|
|
3730
3808
|
className: d,
|
|
3731
3809
|
onClick: f,
|
|
3732
3810
|
children: [
|
|
@@ -3750,10 +3828,10 @@ function jr(e) {
|
|
|
3750
3828
|
}
|
|
3751
3829
|
//#endregion
|
|
3752
3830
|
//#region src/components/radio/radioContext.tsx
|
|
3753
|
-
var
|
|
3754
|
-
function
|
|
3831
|
+
var Ir = n({});
|
|
3832
|
+
function Lr(e) {
|
|
3755
3833
|
let { children: t, size: n, isError: r, handleChange: i, value: a, disabled: o } = e;
|
|
3756
|
-
return /* @__PURE__ */ p(
|
|
3834
|
+
return /* @__PURE__ */ p(Ir.Provider, {
|
|
3757
3835
|
value: {
|
|
3758
3836
|
handleChange: i,
|
|
3759
3837
|
value: a,
|
|
@@ -3764,13 +3842,13 @@ function Nr(e) {
|
|
|
3764
3842
|
children: t
|
|
3765
3843
|
});
|
|
3766
3844
|
}
|
|
3767
|
-
function
|
|
3768
|
-
return a(
|
|
3845
|
+
function Rr() {
|
|
3846
|
+
return a(Ir);
|
|
3769
3847
|
}
|
|
3770
3848
|
//#endregion
|
|
3771
3849
|
//#region src/components/radio/radioBox/index.tsx
|
|
3772
|
-
function
|
|
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 } =
|
|
3850
|
+
function zr(e) {
|
|
3851
|
+
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 } = Rr(), g = d === t, _ = n || u, v = r || h, y = `arkynRadioBox ${_} ${g ? "checkedTrue" : "checkedFalse"} ${f ? "errorTrue" : "errorFalse"} ${v ? "disabledTrue" : "disabledFalse"} ${a}`;
|
|
3774
3852
|
function b(e) {
|
|
3775
3853
|
o?.(e), l(t);
|
|
3776
3854
|
}
|
|
@@ -3781,6 +3859,8 @@ function Fr(e) {
|
|
|
3781
3859
|
className: y.trim(),
|
|
3782
3860
|
children: [/* @__PURE__ */ p("button", {
|
|
3783
3861
|
type: "button",
|
|
3862
|
+
role: "radio",
|
|
3863
|
+
"aria-checked": g,
|
|
3784
3864
|
disabled: v,
|
|
3785
3865
|
onClick: b,
|
|
3786
3866
|
onFocus: x,
|
|
@@ -3790,13 +3870,13 @@ function Fr(e) {
|
|
|
3790
3870
|
}
|
|
3791
3871
|
//#endregion
|
|
3792
3872
|
//#region src/components/radio/radioGroup/index.tsx
|
|
3793
|
-
function
|
|
3873
|
+
function Br(e) {
|
|
3794
3874
|
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();
|
|
3795
3875
|
function b(e) {
|
|
3796
3876
|
v(e), s && s(e);
|
|
3797
3877
|
}
|
|
3798
3878
|
let x = a || y?.[n], S = !!x, C = `arkynRadioGroup ${c}`;
|
|
3799
|
-
return /* @__PURE__ */ p(
|
|
3879
|
+
return /* @__PURE__ */ p(it, {
|
|
3800
3880
|
name: n,
|
|
3801
3881
|
label: r,
|
|
3802
3882
|
showAsterisk: i,
|
|
@@ -3804,7 +3884,7 @@ function Ir(e) {
|
|
|
3804
3884
|
errorMessage: x,
|
|
3805
3885
|
unShowFieldTemplate: f,
|
|
3806
3886
|
orientation: h,
|
|
3807
|
-
children: /* @__PURE__ */ m(
|
|
3887
|
+
children: /* @__PURE__ */ m(Lr, {
|
|
3808
3888
|
isError: S,
|
|
3809
3889
|
size: c,
|
|
3810
3890
|
value: o || _,
|
|
@@ -3817,6 +3897,7 @@ function Ir(e) {
|
|
|
3817
3897
|
name: n,
|
|
3818
3898
|
value: o || _
|
|
3819
3899
|
}), /* @__PURE__ */ p("div", {
|
|
3900
|
+
role: "radiogroup",
|
|
3820
3901
|
className: C.trim(),
|
|
3821
3902
|
...g
|
|
3822
3903
|
})]
|
|
@@ -3825,39 +3906,39 @@ function Ir(e) {
|
|
|
3825
3906
|
}
|
|
3826
3907
|
//#endregion
|
|
3827
3908
|
//#region src/services/clearLinkMarkAtBoundary.ts
|
|
3828
|
-
function
|
|
3909
|
+
function Vr(e) {
|
|
3829
3910
|
let { selection: t } = e;
|
|
3830
|
-
if (!t || !
|
|
3911
|
+
if (!t || !de.isCollapsed(t)) return;
|
|
3831
3912
|
let [n, r] = Z.leaf(e, t.anchor);
|
|
3832
3913
|
n.link && Z.isEnd(e, t.anchor, r) && (Z.removeMark(e, "link"), Z.removeMark(e, "href"));
|
|
3833
3914
|
}
|
|
3834
3915
|
//#endregion
|
|
3835
3916
|
//#region src/services/extractTextFromNode.ts
|
|
3836
|
-
function
|
|
3837
|
-
return e.map((e) =>
|
|
3917
|
+
function Hr(e) {
|
|
3918
|
+
return e.map((e) => ue.string(e)).join("");
|
|
3838
3919
|
}
|
|
3839
3920
|
//#endregion
|
|
3840
3921
|
//#region src/services/isMarkActive.ts
|
|
3841
|
-
function
|
|
3922
|
+
function Ur(e, t) {
|
|
3842
3923
|
let n = Z.marks(e);
|
|
3843
3924
|
return n ? n[t] === !0 : !1;
|
|
3844
3925
|
}
|
|
3845
3926
|
//#endregion
|
|
3846
3927
|
//#region src/services/toggleMark.ts
|
|
3847
|
-
function
|
|
3848
|
-
|
|
3928
|
+
function Wr(e, t) {
|
|
3929
|
+
Ur(e, t) ? Z.removeMark(e, t) : Z.addMark(e, t, !0);
|
|
3849
3930
|
}
|
|
3850
3931
|
//#endregion
|
|
3851
3932
|
//#region src/templates/richTextTemplates.ts
|
|
3852
|
-
var
|
|
3933
|
+
var Gr = {
|
|
3853
3934
|
"mod+b": "bold",
|
|
3854
3935
|
"mod+i": "italic",
|
|
3855
3936
|
"mod+u": "underline",
|
|
3856
3937
|
"mod+`": "code"
|
|
3857
|
-
},
|
|
3938
|
+
}, Kr = [{
|
|
3858
3939
|
type: "paragraph",
|
|
3859
3940
|
children: [{ text: "" }]
|
|
3860
|
-
}],
|
|
3941
|
+
}], qr = ["listItem", "numberedList"], Jr = [
|
|
3861
3942
|
"left",
|
|
3862
3943
|
"center",
|
|
3863
3944
|
"right",
|
|
@@ -3865,38 +3946,38 @@ var Vr = {
|
|
|
3865
3946
|
];
|
|
3866
3947
|
//#endregion
|
|
3867
3948
|
//#region src/services/isBlockActive.ts
|
|
3868
|
-
function
|
|
3949
|
+
function Yr(e, t, n = "type") {
|
|
3869
3950
|
let { selection: r } = e;
|
|
3870
3951
|
if (!r) return !1;
|
|
3871
3952
|
let [i] = Array.from(Z.nodes(e, {
|
|
3872
3953
|
at: Z.unhangRange(e, r),
|
|
3873
|
-
match: (e) => !Z.isEditor(e) &&
|
|
3954
|
+
match: (e) => !Z.isEditor(e) && le.isElement(e) && e[n] === t
|
|
3874
3955
|
}));
|
|
3875
3956
|
return !!i;
|
|
3876
3957
|
}
|
|
3877
3958
|
//#endregion
|
|
3878
3959
|
//#region src/services/toggleBlock.ts
|
|
3879
|
-
function
|
|
3880
|
-
let n =
|
|
3881
|
-
|
|
3882
|
-
match: (e) => !Z.isEditor(e) &&
|
|
3960
|
+
function Xr(e, t) {
|
|
3961
|
+
let n = Yr(e, t, Jr.includes(t) ? "align" : "type"), r = qr.includes(t);
|
|
3962
|
+
pe.unwrapNodes(e, {
|
|
3963
|
+
match: (e) => !Z.isEditor(e) && le.isElement(e) && qr.includes(e.type) && !Jr.includes(t),
|
|
3883
3964
|
split: !0
|
|
3884
3965
|
});
|
|
3885
3966
|
let i;
|
|
3886
|
-
if (i =
|
|
3967
|
+
if (i = Jr.includes(t) ? { align: n ? void 0 : t } : { type: n ? "paragraph" : r ? "listItem" : t }, pe.setNodes(e, i), !n && r) {
|
|
3887
3968
|
let n = {
|
|
3888
3969
|
type: t,
|
|
3889
3970
|
children: []
|
|
3890
3971
|
};
|
|
3891
|
-
|
|
3972
|
+
pe.wrapNodes(e, n);
|
|
3892
3973
|
}
|
|
3893
3974
|
}
|
|
3894
3975
|
//#endregion
|
|
3895
3976
|
//#region src/components/richText/blockButton/index.tsx
|
|
3896
|
-
function
|
|
3897
|
-
let n =
|
|
3977
|
+
function Zr({ format: e, icon: t }) {
|
|
3978
|
+
let n = ve(), r = Yr(n, e, Jr.includes(e) ? "align" : "type") ? "activeTrue" : "activeFalse";
|
|
3898
3979
|
function i(t) {
|
|
3899
|
-
t.preventDefault(),
|
|
3980
|
+
t.preventDefault(), Xr(n, e);
|
|
3900
3981
|
}
|
|
3901
3982
|
return /* @__PURE__ */ p("button", {
|
|
3902
3983
|
type: "button",
|
|
@@ -3907,7 +3988,7 @@ function qr({ format: e, icon: t }) {
|
|
|
3907
3988
|
}
|
|
3908
3989
|
//#endregion
|
|
3909
3990
|
//#region src/components/richText/element/index.tsx
|
|
3910
|
-
function
|
|
3991
|
+
function Qr({ attributes: e, children: t, element: n }) {
|
|
3911
3992
|
let r = { textAlign: n.align };
|
|
3912
3993
|
switch (n.type) {
|
|
3913
3994
|
case "blockQuote": return /* @__PURE__ */ p("blockquote", {
|
|
@@ -3977,11 +4058,11 @@ function Jr({ attributes: e, children: t, element: n }) {
|
|
|
3977
4058
|
}
|
|
3978
4059
|
//#endregion
|
|
3979
4060
|
//#region src/components/tab/tabContext.tsx
|
|
3980
|
-
var
|
|
3981
|
-
function
|
|
3982
|
-
return a(
|
|
4061
|
+
var $r = n({});
|
|
4062
|
+
function ei() {
|
|
4063
|
+
return a($r);
|
|
3983
4064
|
}
|
|
3984
|
-
function
|
|
4065
|
+
function ti(e) {
|
|
3985
4066
|
let { disabled: t, currentTab: n, changeCurrentTab: r } = e, i = c(() => ({
|
|
3986
4067
|
disabled: t,
|
|
3987
4068
|
currentTab: n,
|
|
@@ -3991,15 +4072,15 @@ function Zr(e) {
|
|
|
3991
4072
|
n,
|
|
3992
4073
|
r
|
|
3993
4074
|
]);
|
|
3994
|
-
return /* @__PURE__ */ p(
|
|
4075
|
+
return /* @__PURE__ */ p($r.Provider, {
|
|
3995
4076
|
value: i,
|
|
3996
4077
|
children: e.children
|
|
3997
4078
|
});
|
|
3998
4079
|
}
|
|
3999
4080
|
//#endregion
|
|
4000
4081
|
//#region src/components/tab/tabButton/index.tsx
|
|
4001
|
-
function
|
|
4002
|
-
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } =
|
|
4082
|
+
function ni(e) {
|
|
4083
|
+
let { children: t, disabled: n = !1, className: r = "", onClick: i, value: a, ...o } = e, { disabled: s, currentTab: c, changeCurrentTab: l } = ei(), u = s || n, d = `arkynTabButton ${u ? "isDisabled" : ""} ${c === a && a ? "isActive" : ""} ${r}`;
|
|
4003
4084
|
function f(e) {
|
|
4004
4085
|
l(a), i?.(e);
|
|
4005
4086
|
}
|
|
@@ -4014,12 +4095,12 @@ function Qr(e) {
|
|
|
4014
4095
|
}
|
|
4015
4096
|
//#endregion
|
|
4016
4097
|
//#region src/components/tab/tabContainer/index.tsx
|
|
4017
|
-
function
|
|
4098
|
+
function ri(e) {
|
|
4018
4099
|
let { children: t, onChange: n, defaultValue: r, disabled: i = !1, className: a, ...o } = e, [s, c] = u(r || ""), l = `arkynTabContainer ${a || ""}`;
|
|
4019
4100
|
function d(e) {
|
|
4020
4101
|
c(e), n && n(e);
|
|
4021
4102
|
}
|
|
4022
|
-
return /* @__PURE__ */ p(
|
|
4103
|
+
return /* @__PURE__ */ p(ti, {
|
|
4023
4104
|
disabled: i,
|
|
4024
4105
|
currentTab: s,
|
|
4025
4106
|
changeCurrentTab: d,
|
|
@@ -4032,8 +4113,8 @@ function $r(e) {
|
|
|
4032
4113
|
}
|
|
4033
4114
|
//#endregion
|
|
4034
4115
|
//#region src/components/richText/insertImage/index.tsx
|
|
4035
|
-
function
|
|
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 =
|
|
4116
|
+
function ii(e) {
|
|
4117
|
+
let { action: t, tabLabels: n = ["Adicionar URL", "Upload de arquivo"], modalCancelButton: r = "Cancelar", modalConfirmButton: i = "Confirmar", modalInputImageLabel: a = "Imagem:", modalInputUrlLabel: o = "URL da imagem:", modalTitle: s = "Inserir imagem" } = e, c = ve(), [l, d] = u(!1), [h, g] = u(""), [_, v] = u("url");
|
|
4037
4118
|
function y(e) {
|
|
4038
4119
|
e.preventDefault(), !(!h || h === "") && (c.insertNodes([
|
|
4039
4120
|
{
|
|
@@ -4056,26 +4137,26 @@ function ei(e) {
|
|
|
4056
4137
|
className: "arkynRichTextInsertImage",
|
|
4057
4138
|
onMouseDown: () => d(!0),
|
|
4058
4139
|
children: /* @__PURE__ */ p(P, {})
|
|
4059
|
-
}), /* @__PURE__ */ m(
|
|
4140
|
+
}), /* @__PURE__ */ m(rr, {
|
|
4060
4141
|
isVisible: l,
|
|
4061
4142
|
makeInvisible: () => d(!1),
|
|
4062
4143
|
children: [
|
|
4063
|
-
/* @__PURE__ */ p(
|
|
4144
|
+
/* @__PURE__ */ p(ar, { children: s }),
|
|
4064
4145
|
/* @__PURE__ */ m("div", {
|
|
4065
4146
|
className: "arkynRichTextInsertImageModalContent",
|
|
4066
4147
|
children: [
|
|
4067
|
-
/* @__PURE__ */ m(
|
|
4148
|
+
/* @__PURE__ */ m(ri, {
|
|
4068
4149
|
defaultValue: _,
|
|
4069
4150
|
onChange: v,
|
|
4070
|
-
children: [/* @__PURE__ */ p(
|
|
4151
|
+
children: [/* @__PURE__ */ p(ni, {
|
|
4071
4152
|
value: "url",
|
|
4072
4153
|
children: n[0]
|
|
4073
|
-
}), /* @__PURE__ */ p(
|
|
4154
|
+
}), /* @__PURE__ */ p(ni, {
|
|
4074
4155
|
value: "file",
|
|
4075
4156
|
children: n[1]
|
|
4076
4157
|
})]
|
|
4077
4158
|
}),
|
|
4078
|
-
_ === "url" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(
|
|
4159
|
+
_ === "url" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ft, {
|
|
4079
4160
|
type: "text",
|
|
4080
4161
|
name: "richTextImageURL",
|
|
4081
4162
|
label: o,
|
|
@@ -4087,7 +4168,7 @@ function ei(e) {
|
|
|
4087
4168
|
src: h,
|
|
4088
4169
|
alt: "preview"
|
|
4089
4170
|
})] }),
|
|
4090
|
-
_ === "file" && /* @__PURE__ */ p(
|
|
4171
|
+
_ === "file" && /* @__PURE__ */ p(Jn, {
|
|
4091
4172
|
name: "richTextImageURL",
|
|
4092
4173
|
action: t,
|
|
4093
4174
|
label: a,
|
|
@@ -4097,13 +4178,13 @@ function ei(e) {
|
|
|
4097
4178
|
})
|
|
4098
4179
|
]
|
|
4099
4180
|
}),
|
|
4100
|
-
/* @__PURE__ */ m(
|
|
4181
|
+
/* @__PURE__ */ m(ir, { children: [/* @__PURE__ */ p(He, {
|
|
4101
4182
|
type: "button",
|
|
4102
4183
|
scheme: "danger",
|
|
4103
4184
|
variant: "outline",
|
|
4104
4185
|
onClick: () => d(!1),
|
|
4105
4186
|
children: r
|
|
4106
|
-
}), /* @__PURE__ */ p(
|
|
4187
|
+
}), /* @__PURE__ */ p(He, {
|
|
4107
4188
|
type: "button",
|
|
4108
4189
|
onClick: y,
|
|
4109
4190
|
children: i
|
|
@@ -4113,7 +4194,7 @@ function ei(e) {
|
|
|
4113
4194
|
}
|
|
4114
4195
|
//#endregion
|
|
4115
4196
|
//#region src/services/isValidHttpsUrl.ts
|
|
4116
|
-
function
|
|
4197
|
+
function ai(e) {
|
|
4117
4198
|
try {
|
|
4118
4199
|
return new URL(e).protocol === "https:";
|
|
4119
4200
|
} catch {
|
|
@@ -4122,13 +4203,13 @@ function ti(e) {
|
|
|
4122
4203
|
}
|
|
4123
4204
|
//#endregion
|
|
4124
4205
|
//#region src/components/richText/insertLink/index.tsx
|
|
4125
|
-
function
|
|
4126
|
-
let { modalCancelButton: t = "Cancelar", modalConfirmButton: n = "Confirmar", modalInputUrlLabel: r = "URL do link:", modalTitle: i = "Inserir link", invalidUrlMessage: a = "URL inválida" } = e, s =
|
|
4206
|
+
function oi(e) {
|
|
4207
|
+
let { modalCancelButton: t = "Cancelar", modalConfirmButton: n = "Confirmar", modalInputUrlLabel: r = "URL do link:", modalTitle: i = "Inserir link", invalidUrlMessage: a = "URL inválida" } = e, s = ve(), [c, l] = u(!1), [d, h] = u(""), [g, _] = u(s.selection), v = ai(d), y = d && !v ? a : "";
|
|
4127
4208
|
function b(e) {
|
|
4128
4209
|
e.preventDefault(), _(s.selection), l(!0);
|
|
4129
4210
|
}
|
|
4130
4211
|
function x(e) {
|
|
4131
|
-
e.preventDefault(), !(!v || !g) && (
|
|
4212
|
+
e.preventDefault(), !(!v || !g) && (pe.select(s, g), de.isCollapsed(g) ? pe.insertNodes(s, {
|
|
4132
4213
|
text: d,
|
|
4133
4214
|
link: !0,
|
|
4134
4215
|
href: d
|
|
@@ -4141,14 +4222,14 @@ function ni(e) {
|
|
|
4141
4222
|
className: "arkynRichTextInsertLink",
|
|
4142
4223
|
onMouseDown: b,
|
|
4143
4224
|
children: /* @__PURE__ */ p(L, {})
|
|
4144
|
-
}), /* @__PURE__ */ m(
|
|
4225
|
+
}), /* @__PURE__ */ m(rr, {
|
|
4145
4226
|
isVisible: c,
|
|
4146
4227
|
makeInvisible: () => l(!1),
|
|
4147
4228
|
children: [
|
|
4148
|
-
/* @__PURE__ */ p(
|
|
4229
|
+
/* @__PURE__ */ p(ar, { children: i }),
|
|
4149
4230
|
/* @__PURE__ */ p("div", {
|
|
4150
4231
|
className: "arkynRichTextInsertLinkModalContent",
|
|
4151
|
-
children: /* @__PURE__ */ p(
|
|
4232
|
+
children: /* @__PURE__ */ p(ft, {
|
|
4152
4233
|
type: "text",
|
|
4153
4234
|
name: "richTextLinkURL",
|
|
4154
4235
|
label: r,
|
|
@@ -4158,13 +4239,13 @@ function ni(e) {
|
|
|
4158
4239
|
errorMessage: y
|
|
4159
4240
|
})
|
|
4160
4241
|
}),
|
|
4161
|
-
/* @__PURE__ */ m(
|
|
4242
|
+
/* @__PURE__ */ m(ir, { children: [/* @__PURE__ */ p(He, {
|
|
4162
4243
|
type: "button",
|
|
4163
4244
|
scheme: "danger",
|
|
4164
4245
|
variant: "outline",
|
|
4165
4246
|
onClick: () => l(!1),
|
|
4166
4247
|
children: t
|
|
4167
|
-
}), /* @__PURE__ */ p(
|
|
4248
|
+
}), /* @__PURE__ */ p(He, {
|
|
4168
4249
|
disabled: !v,
|
|
4169
4250
|
type: "button",
|
|
4170
4251
|
onClick: x,
|
|
@@ -4175,8 +4256,8 @@ function ni(e) {
|
|
|
4175
4256
|
}
|
|
4176
4257
|
//#endregion
|
|
4177
4258
|
//#region src/components/richText/insertVideo/index.tsx
|
|
4178
|
-
function
|
|
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 =
|
|
4259
|
+
function si(e) {
|
|
4260
|
+
let { modalCancelButton: t = "Cancelar", modalConfirmButton: n = "Confirmar", modalInputUrlLabel: r = "URL do vídeo:", modalTitle: i = "Inserir vídeo", invalidUrlMessage: a = "URL inválida" } = e, s = ve(), [c, l] = u(!1), [d, h] = u(""), [g, _] = u(""), [v, y] = u("");
|
|
4180
4261
|
function b(e) {
|
|
4181
4262
|
if (e.preventDefault(), !d || d === "") return;
|
|
4182
4263
|
let t = `https://www.youtube.com/embed/${d}`;
|
|
@@ -4198,7 +4279,7 @@ function ri(e) {
|
|
|
4198
4279
|
}
|
|
4199
4280
|
return o(() => {
|
|
4200
4281
|
if (!g || g === "") return;
|
|
4201
|
-
if (h(""), y(""), !
|
|
4282
|
+
if (h(""), y(""), !ai(g)) {
|
|
4202
4283
|
y(a);
|
|
4203
4284
|
return;
|
|
4204
4285
|
}
|
|
@@ -4211,14 +4292,14 @@ function ri(e) {
|
|
|
4211
4292
|
className: "arkynRichTextInsertVideo",
|
|
4212
4293
|
onMouseDown: () => l(!0),
|
|
4213
4294
|
children: /* @__PURE__ */ p(G, {})
|
|
4214
|
-
}), /* @__PURE__ */ m(
|
|
4295
|
+
}), /* @__PURE__ */ m(rr, {
|
|
4215
4296
|
isVisible: c,
|
|
4216
4297
|
makeInvisible: () => l(!1),
|
|
4217
4298
|
children: [
|
|
4218
|
-
/* @__PURE__ */ p(
|
|
4299
|
+
/* @__PURE__ */ p(ar, { children: i }),
|
|
4219
4300
|
/* @__PURE__ */ m("div", {
|
|
4220
4301
|
className: "arkynRichTextInsertVideoModalContent",
|
|
4221
|
-
children: [/* @__PURE__ */ p(
|
|
4302
|
+
children: [/* @__PURE__ */ p(ft, {
|
|
4222
4303
|
type: "text",
|
|
4223
4304
|
name: "richTextVideoURL",
|
|
4224
4305
|
label: r,
|
|
@@ -4236,13 +4317,13 @@ function ri(e) {
|
|
|
4236
4317
|
allowFullScreen: !0
|
|
4237
4318
|
})]
|
|
4238
4319
|
}),
|
|
4239
|
-
/* @__PURE__ */ m(
|
|
4320
|
+
/* @__PURE__ */ m(ir, { children: [/* @__PURE__ */ p(He, {
|
|
4240
4321
|
type: "button",
|
|
4241
4322
|
scheme: "danger",
|
|
4242
4323
|
variant: "outline",
|
|
4243
4324
|
onClick: () => l(!1),
|
|
4244
4325
|
children: t
|
|
4245
|
-
}), /* @__PURE__ */ p(
|
|
4326
|
+
}), /* @__PURE__ */ p(He, {
|
|
4246
4327
|
disabled: !d,
|
|
4247
4328
|
type: "button",
|
|
4248
4329
|
onClick: b,
|
|
@@ -4253,7 +4334,7 @@ function ri(e) {
|
|
|
4253
4334
|
}
|
|
4254
4335
|
//#endregion
|
|
4255
4336
|
//#region src/components/richText/leaf/index.tsx
|
|
4256
|
-
function
|
|
4337
|
+
function ci({ attributes: e, children: t, leaf: n }) {
|
|
4257
4338
|
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", {
|
|
4258
4339
|
className: "arkynLeafLink",
|
|
4259
4340
|
href: n.href,
|
|
@@ -4265,10 +4346,10 @@ function ii({ attributes: e, children: t, leaf: n }) {
|
|
|
4265
4346
|
}
|
|
4266
4347
|
//#endregion
|
|
4267
4348
|
//#region src/components/richText/markButton/index.tsx
|
|
4268
|
-
function
|
|
4269
|
-
let n =
|
|
4349
|
+
function li({ format: e, icon: t }) {
|
|
4350
|
+
let n = ve(), r = Ur(n, e) ? "activeTrue" : "activeFalse";
|
|
4270
4351
|
function i(t) {
|
|
4271
|
-
t.preventDefault(),
|
|
4352
|
+
t.preventDefault(), Wr(n, e);
|
|
4272
4353
|
}
|
|
4273
4354
|
return /* @__PURE__ */ p("button", {
|
|
4274
4355
|
type: "button",
|
|
@@ -4279,7 +4360,7 @@ function ai({ format: e, icon: t }) {
|
|
|
4279
4360
|
}
|
|
4280
4361
|
//#endregion
|
|
4281
4362
|
//#region src/components/richText/toolbar/index.tsx
|
|
4282
|
-
function
|
|
4363
|
+
function ui({ children: e }) {
|
|
4283
4364
|
return /* @__PURE__ */ p("div", {
|
|
4284
4365
|
className: "arkynRichTextToolbar",
|
|
4285
4366
|
children: e
|
|
@@ -4287,24 +4368,24 @@ function oi({ children: e }) {
|
|
|
4287
4368
|
}
|
|
4288
4369
|
//#endregion
|
|
4289
4370
|
//#region src/components/richText/index.tsx
|
|
4290
|
-
function
|
|
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(() =>
|
|
4371
|
+
function di(e) {
|
|
4372
|
+
let { name: t, hiddenButtons: n, imageConfig: r, videoConfig: a, linkConfig: o, className: d = "", defaultValue: f = "[]", enforceCharacterLimit: h = !1, onChangeCharactersCount: x, baseErrorMessage: S, maxLimit: C = 1e4, onChange: w, isError: T, label: D, showAsterisk: O, id: k, orientation: A = "vertical", unShowFieldTemplate: j = !1 } = e, P = c(() => he(ye(me())), []), { fieldErrors: F } = Q(), L = c(() => {
|
|
4292
4373
|
try {
|
|
4293
4374
|
let e = JSON.parse(f);
|
|
4294
|
-
return !Array.isArray(e) || e.length === 0 ? structuredClone(
|
|
4375
|
+
return !Array.isArray(e) || e.length === 0 ? structuredClone(Kr) : e.every((e) => typeof e == "object" && !!e && "type" in e && "children" in e) ? e : structuredClone(Kr);
|
|
4295
4376
|
} catch {
|
|
4296
|
-
return structuredClone(
|
|
4377
|
+
return structuredClone(Kr);
|
|
4297
4378
|
}
|
|
4298
|
-
}, [f]), [R, ee] = u(
|
|
4299
|
-
function
|
|
4300
|
-
let t =
|
|
4379
|
+
}, [f]), [R, ee] = u(Hr(L).length), [z, B] = u(JSON.stringify(L) || "[]"), [H, U] = u(!1), G = l(null), te = s(), K = k || te, q = S || F?.[t], ne = T || !!q, re = i(ci, []), ie = i(Qr, []);
|
|
4380
|
+
function ae(e) {
|
|
4381
|
+
let t = Hr(e);
|
|
4301
4382
|
ee(t.length), x?.(t.length), !(h && t.length >= C) && (B(JSON.stringify(e)), w?.(e));
|
|
4302
4383
|
}
|
|
4303
|
-
let
|
|
4384
|
+
let oe = `arkynRichText ${ne || C < R ? "errorTrue" : "errorFalse"} ${H ? "focusTrue" : "focusFalse"}`, J = C - R;
|
|
4304
4385
|
function Y(e) {
|
|
4305
4386
|
return !n?.includes(e);
|
|
4306
4387
|
}
|
|
4307
|
-
return /* @__PURE__ */ p(
|
|
4388
|
+
return /* @__PURE__ */ p(it, {
|
|
4308
4389
|
name: t,
|
|
4309
4390
|
label: D,
|
|
4310
4391
|
showAsterisk: O,
|
|
@@ -4312,85 +4393,85 @@ function si(e) {
|
|
|
4312
4393
|
errorMessage: q,
|
|
4313
4394
|
unShowFieldTemplate: j,
|
|
4314
4395
|
orientation: A,
|
|
4315
|
-
children: /* @__PURE__ */ m(
|
|
4396
|
+
children: /* @__PURE__ */ m(_e, {
|
|
4316
4397
|
editor: P,
|
|
4317
4398
|
initialValue: L,
|
|
4318
|
-
onChange:
|
|
4319
|
-
onValueChange:
|
|
4399
|
+
onChange: ae,
|
|
4400
|
+
onValueChange: ae,
|
|
4320
4401
|
children: [
|
|
4321
4402
|
/* @__PURE__ */ m("div", {
|
|
4322
|
-
className:
|
|
4403
|
+
className: oe,
|
|
4323
4404
|
children: [
|
|
4324
|
-
/* @__PURE__ */ m(
|
|
4325
|
-
Y("headingOne") && /* @__PURE__ */ p(
|
|
4405
|
+
/* @__PURE__ */ m(ui, { children: [
|
|
4406
|
+
Y("headingOne") && /* @__PURE__ */ p(Zr, {
|
|
4326
4407
|
format: "headingOne",
|
|
4327
4408
|
icon: M
|
|
4328
4409
|
}),
|
|
4329
|
-
Y("headingTwo") && /* @__PURE__ */ p(
|
|
4410
|
+
Y("headingTwo") && /* @__PURE__ */ p(Zr, {
|
|
4330
4411
|
format: "headingTwo",
|
|
4331
4412
|
icon: N
|
|
4332
4413
|
}),
|
|
4333
|
-
Y("blockQuote") && /* @__PURE__ */ p(
|
|
4414
|
+
Y("blockQuote") && /* @__PURE__ */ p(Zr, {
|
|
4334
4415
|
format: "blockQuote",
|
|
4335
4416
|
icon: V
|
|
4336
4417
|
}),
|
|
4337
|
-
Y("bold") && /* @__PURE__ */ p(
|
|
4418
|
+
Y("bold") && /* @__PURE__ */ p(li, {
|
|
4338
4419
|
format: "bold",
|
|
4339
4420
|
icon: b
|
|
4340
4421
|
}),
|
|
4341
|
-
Y("italic") && /* @__PURE__ */ p(
|
|
4422
|
+
Y("italic") && /* @__PURE__ */ p(li, {
|
|
4342
4423
|
format: "italic",
|
|
4343
4424
|
icon: I
|
|
4344
4425
|
}),
|
|
4345
|
-
Y("underline") && /* @__PURE__ */ p(
|
|
4426
|
+
Y("underline") && /* @__PURE__ */ p(li, {
|
|
4346
4427
|
format: "underline",
|
|
4347
4428
|
icon: W
|
|
4348
4429
|
}),
|
|
4349
|
-
Y("code") && /* @__PURE__ */ p(
|
|
4430
|
+
Y("code") && /* @__PURE__ */ p(li, {
|
|
4350
4431
|
format: "code",
|
|
4351
4432
|
icon: E
|
|
4352
4433
|
}),
|
|
4353
|
-
Y("left") && /* @__PURE__ */ p(
|
|
4434
|
+
Y("left") && /* @__PURE__ */ p(Zr, {
|
|
4354
4435
|
format: "left",
|
|
4355
4436
|
icon: v
|
|
4356
4437
|
}),
|
|
4357
|
-
Y("right") && /* @__PURE__ */ p(
|
|
4438
|
+
Y("right") && /* @__PURE__ */ p(Zr, {
|
|
4358
4439
|
format: "right",
|
|
4359
4440
|
icon: y
|
|
4360
4441
|
}),
|
|
4361
|
-
Y("center") && /* @__PURE__ */ p(
|
|
4442
|
+
Y("center") && /* @__PURE__ */ p(Zr, {
|
|
4362
4443
|
format: "center",
|
|
4363
4444
|
icon: g
|
|
4364
4445
|
}),
|
|
4365
|
-
Y("justify") && /* @__PURE__ */ p(
|
|
4446
|
+
Y("justify") && /* @__PURE__ */ p(Zr, {
|
|
4366
4447
|
format: "justify",
|
|
4367
4448
|
icon: _
|
|
4368
4449
|
}),
|
|
4369
|
-
r && Y("image") && /* @__PURE__ */ p(
|
|
4370
|
-
Y("video") && /* @__PURE__ */ p(
|
|
4371
|
-
Y("link") && /* @__PURE__ */ p(
|
|
4450
|
+
r && Y("image") && /* @__PURE__ */ p(ii, { ...r }),
|
|
4451
|
+
Y("video") && /* @__PURE__ */ p(si, { ...a }),
|
|
4452
|
+
Y("link") && /* @__PURE__ */ p(oi, { ...o })
|
|
4372
4453
|
] }),
|
|
4373
|
-
/* @__PURE__ */ p(
|
|
4454
|
+
/* @__PURE__ */ p(ge, {
|
|
4374
4455
|
className: "editorContainer",
|
|
4375
|
-
renderElement:
|
|
4376
|
-
renderLeaf:
|
|
4456
|
+
renderElement: ie,
|
|
4457
|
+
renderLeaf: re,
|
|
4377
4458
|
spellCheck: !0,
|
|
4378
4459
|
ref: G,
|
|
4379
4460
|
id: K,
|
|
4380
4461
|
onFocus: () => U(!0),
|
|
4381
4462
|
onBlur: () => U(!1),
|
|
4382
4463
|
onKeyDown: (e) => {
|
|
4383
|
-
(e.key === " " || e.key === "Enter") &&
|
|
4384
|
-
for (let t in
|
|
4464
|
+
(e.key === " " || e.key === "Enter") && Vr(P);
|
|
4465
|
+
for (let t in Gr) if (ce(t, e)) {
|
|
4385
4466
|
e.preventDefault();
|
|
4386
|
-
let n =
|
|
4387
|
-
|
|
4467
|
+
let n = Gr[t];
|
|
4468
|
+
Wr(P, n);
|
|
4388
4469
|
}
|
|
4389
4470
|
}
|
|
4390
4471
|
}),
|
|
4391
|
-
|
|
4472
|
+
J < 0 && /* @__PURE__ */ p("div", {
|
|
4392
4473
|
className: "restatesCharacters",
|
|
4393
|
-
children:
|
|
4474
|
+
children: J
|
|
4394
4475
|
})
|
|
4395
4476
|
]
|
|
4396
4477
|
}),
|
|
@@ -4410,9 +4491,9 @@ function si(e) {
|
|
|
4410
4491
|
}
|
|
4411
4492
|
//#endregion
|
|
4412
4493
|
//#region src/components/searchPlaces.tsx
|
|
4413
|
-
function
|
|
4494
|
+
function fi(e) {
|
|
4414
4495
|
let { onChange: t, onPlaceChanged: n, options: r, ...i } = e, [a, o] = u(null);
|
|
4415
|
-
return /* @__PURE__ */ p(
|
|
4496
|
+
return /* @__PURE__ */ p(be, {
|
|
4416
4497
|
onLoad: (e) => o(e),
|
|
4417
4498
|
onPlacesChanged: () => {
|
|
4418
4499
|
let e = a?.getPlaces(), t = e ? e[0] : null, r = t?.address_components ?? [];
|
|
@@ -4453,7 +4534,7 @@ function ci(e) {
|
|
|
4453
4534
|
}
|
|
4454
4535
|
},
|
|
4455
4536
|
options: r,
|
|
4456
|
-
children: /* @__PURE__ */ p(
|
|
4537
|
+
children: /* @__PURE__ */ p(ft, {
|
|
4457
4538
|
type: "text",
|
|
4458
4539
|
autoComplete: "off",
|
|
4459
4540
|
onChange: (e) => t?.(e.target.value),
|
|
@@ -4463,12 +4544,12 @@ function ci(e) {
|
|
|
4463
4544
|
}
|
|
4464
4545
|
//#endregion
|
|
4465
4546
|
//#region src/components/switch/index.tsx
|
|
4466
|
-
function
|
|
4547
|
+
function pi(e) {
|
|
4467
4548
|
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;
|
|
4468
4549
|
function D() {
|
|
4469
4550
|
T(!w), f?.(E ? o : a || "checked");
|
|
4470
4551
|
}
|
|
4471
|
-
return /* @__PURE__ */ p(
|
|
4552
|
+
return /* @__PURE__ */ p(it, {
|
|
4472
4553
|
name: c,
|
|
4473
4554
|
label: t,
|
|
4474
4555
|
showAsterisk: _,
|
|
@@ -4478,6 +4559,8 @@ function li(e) {
|
|
|
4478
4559
|
orientation: h,
|
|
4479
4560
|
children: /* @__PURE__ */ p("button", {
|
|
4480
4561
|
type: "button",
|
|
4562
|
+
role: "switch",
|
|
4563
|
+
"aria-checked": E,
|
|
4481
4564
|
onClick: D,
|
|
4482
4565
|
className: `arkynSwitch ${E ? "checkedTrue" : "checkedFalse"} ${n} ${d}`,
|
|
4483
4566
|
...b,
|
|
@@ -4494,7 +4577,7 @@ function li(e) {
|
|
|
4494
4577
|
}
|
|
4495
4578
|
//#endregion
|
|
4496
4579
|
//#region src/components/table/tableBody/index.tsx
|
|
4497
|
-
function
|
|
4580
|
+
function mi(t) {
|
|
4498
4581
|
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;
|
|
4499
4582
|
return /* @__PURE__ */ p("tbody", {
|
|
4500
4583
|
className: o.trim(),
|
|
@@ -4510,7 +4593,7 @@ function ui(t) {
|
|
|
4510
4593
|
}
|
|
4511
4594
|
//#endregion
|
|
4512
4595
|
//#region src/components/table/tableCaption/index.tsx
|
|
4513
|
-
function
|
|
4596
|
+
function hi(e) {
|
|
4514
4597
|
let { className: t, children: n, ...r } = e;
|
|
4515
4598
|
return /* @__PURE__ */ p("caption", {
|
|
4516
4599
|
className: `arkynTableCaption ${t}`.trim(),
|
|
@@ -4523,7 +4606,7 @@ function di(e) {
|
|
|
4523
4606
|
}
|
|
4524
4607
|
//#endregion
|
|
4525
4608
|
//#region src/components/table/tableContainer/index.tsx
|
|
4526
|
-
function
|
|
4609
|
+
function gi(e) {
|
|
4527
4610
|
let { children: t, className: n, ...r } = e;
|
|
4528
4611
|
return /* @__PURE__ */ p("div", {
|
|
4529
4612
|
className: `arkynTableContainer ${n}`.trim(),
|
|
@@ -4533,7 +4616,7 @@ function fi(e) {
|
|
|
4533
4616
|
}
|
|
4534
4617
|
//#endregion
|
|
4535
4618
|
//#region src/components/table/tableFooter/index.tsx
|
|
4536
|
-
function
|
|
4619
|
+
function _i(e) {
|
|
4537
4620
|
let { className: t, children: n, ...r } = e;
|
|
4538
4621
|
return /* @__PURE__ */ m("tfoot", {
|
|
4539
4622
|
className: `arkynTableFooter ${t}`.trim(),
|
|
@@ -4549,7 +4632,7 @@ function pi(e) {
|
|
|
4549
4632
|
}
|
|
4550
4633
|
//#endregion
|
|
4551
4634
|
//#region src/components/table/tableHeader/index.tsx
|
|
4552
|
-
function
|
|
4635
|
+
function vi(e) {
|
|
4553
4636
|
let { className: t, children: n, ...r } = e;
|
|
4554
4637
|
return /* @__PURE__ */ m("thead", {
|
|
4555
4638
|
className: `arkynTableHeader ${t}`.trim(),
|
|
@@ -4559,7 +4642,7 @@ function mi(e) {
|
|
|
4559
4642
|
}
|
|
4560
4643
|
//#endregion
|
|
4561
4644
|
//#region src/components/textarea/index.tsx
|
|
4562
|
-
function
|
|
4645
|
+
function yi(e) {
|
|
4563
4646
|
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;
|
|
4564
4647
|
function N() {
|
|
4565
4648
|
a || !D?.current || (E(!0), D.current.focus());
|
|
@@ -4570,10 +4653,10 @@ function hi(e) {
|
|
|
4570
4653
|
function F(e) {
|
|
4571
4654
|
E(!1), g && g(e);
|
|
4572
4655
|
}
|
|
4573
|
-
return /* @__PURE__ */ m(
|
|
4656
|
+
return /* @__PURE__ */ m(Ve, {
|
|
4574
4657
|
className: r,
|
|
4575
4658
|
children: [
|
|
4576
|
-
c && /* @__PURE__ */ p(
|
|
4659
|
+
c && /* @__PURE__ */ p(Be, {
|
|
4577
4660
|
htmlFor: k,
|
|
4578
4661
|
showAsterisk: d,
|
|
4579
4662
|
children: c
|
|
@@ -4597,13 +4680,13 @@ function hi(e) {
|
|
|
4597
4680
|
...C
|
|
4598
4681
|
})
|
|
4599
4682
|
}),
|
|
4600
|
-
A && /* @__PURE__ */ p(
|
|
4683
|
+
A && /* @__PURE__ */ p(ze, { children: A })
|
|
4601
4684
|
]
|
|
4602
4685
|
});
|
|
4603
4686
|
}
|
|
4604
4687
|
//#endregion
|
|
4605
4688
|
//#region src/templates/badResponses.ts
|
|
4606
|
-
var
|
|
4689
|
+
var bi = [
|
|
4607
4690
|
"BadGateway",
|
|
4608
4691
|
"BadRequest",
|
|
4609
4692
|
"Conflict",
|
|
@@ -4613,13 +4696,13 @@ var gi = [
|
|
|
4613
4696
|
"ServerError",
|
|
4614
4697
|
"Unauthorized",
|
|
4615
4698
|
"UnprocessableEntity"
|
|
4616
|
-
],
|
|
4699
|
+
], xi = [
|
|
4617
4700
|
"Created",
|
|
4618
4701
|
"Found",
|
|
4619
4702
|
"Success",
|
|
4620
4703
|
"Updated"
|
|
4621
|
-
],
|
|
4622
|
-
function
|
|
4704
|
+
], Si = n({});
|
|
4705
|
+
function Ci(e) {
|
|
4623
4706
|
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) => {
|
|
4624
4707
|
r((n) => [...n.filter((t) => t.key !== e), {
|
|
4625
4708
|
key: e,
|
|
@@ -4642,15 +4725,15 @@ function yi(e) {
|
|
|
4642
4725
|
l,
|
|
4643
4726
|
d
|
|
4644
4727
|
]);
|
|
4645
|
-
return /* @__PURE__ */ p(
|
|
4728
|
+
return /* @__PURE__ */ p(Si.Provider, {
|
|
4646
4729
|
value: f,
|
|
4647
4730
|
children: t
|
|
4648
4731
|
});
|
|
4649
4732
|
}
|
|
4650
4733
|
//#endregion
|
|
4651
4734
|
//#region src/hooks/useModal.ts
|
|
4652
|
-
function
|
|
4653
|
-
let t = a(
|
|
4735
|
+
function wi(e) {
|
|
4736
|
+
let t = a(Si);
|
|
4654
4737
|
if (Object.entries(t).length === 0) throw Error("useModal must be used within a Provider");
|
|
4655
4738
|
if (e) {
|
|
4656
4739
|
let { modalData: n, modalIsOpen: r, openModal: i, closeModal: a } = t;
|
|
@@ -4664,10 +4747,10 @@ function bi(e) {
|
|
|
4664
4747
|
}
|
|
4665
4748
|
//#endregion
|
|
4666
4749
|
//#region src/providers/toastProvider.tsx
|
|
4667
|
-
var
|
|
4668
|
-
function
|
|
4750
|
+
var Ti = n({});
|
|
4751
|
+
function Ei(e) {
|
|
4669
4752
|
switch (e.type) {
|
|
4670
|
-
case "success": return
|
|
4753
|
+
case "success": return Ce.success(e.message, {
|
|
4671
4754
|
style: {
|
|
4672
4755
|
background: "#10B981",
|
|
4673
4756
|
color: "#ffffff",
|
|
@@ -4680,7 +4763,7 @@ function Si(e) {
|
|
|
4680
4763
|
secondary: "#ffffff"
|
|
4681
4764
|
}
|
|
4682
4765
|
});
|
|
4683
|
-
case "danger": return
|
|
4766
|
+
case "danger": return Ce.error(e.message, {
|
|
4684
4767
|
style: {
|
|
4685
4768
|
background: "#E11D48",
|
|
4686
4769
|
color: "#ffffff",
|
|
@@ -4695,11 +4778,11 @@ function Si(e) {
|
|
|
4695
4778
|
});
|
|
4696
4779
|
}
|
|
4697
4780
|
}
|
|
4698
|
-
function
|
|
4699
|
-
let t = c(() => ({ showToast:
|
|
4700
|
-
return /* @__PURE__ */ m(
|
|
4781
|
+
function Di({ children: e }) {
|
|
4782
|
+
let t = c(() => ({ showToast: Ei }), []);
|
|
4783
|
+
return /* @__PURE__ */ m(Ti.Provider, {
|
|
4701
4784
|
value: t,
|
|
4702
|
-
children: [/* @__PURE__ */ p(
|
|
4785
|
+
children: [/* @__PURE__ */ p(we, {
|
|
4703
4786
|
position: "top-right",
|
|
4704
4787
|
containerStyle: { zIndex: 999999999999999 }
|
|
4705
4788
|
}), e]
|
|
@@ -4707,29 +4790,29 @@ function Ci({ children: e }) {
|
|
|
4707
4790
|
}
|
|
4708
4791
|
//#endregion
|
|
4709
4792
|
//#region src/hooks/useToast.ts
|
|
4710
|
-
function
|
|
4711
|
-
let e = a(
|
|
4793
|
+
function Oi() {
|
|
4794
|
+
let e = a(Ti);
|
|
4712
4795
|
if (Object.entries(e).length === 0) throw Error("useToast must be used within a Provider");
|
|
4713
4796
|
return e;
|
|
4714
4797
|
}
|
|
4715
4798
|
//#endregion
|
|
4716
4799
|
//#region src/hooks/useAutomation.ts
|
|
4717
|
-
function
|
|
4718
|
-
let { closeAll: t } =
|
|
4800
|
+
function ki(e) {
|
|
4801
|
+
let { closeAll: t } = wi(), { showToast: n } = Oi();
|
|
4719
4802
|
o(() => {
|
|
4720
4803
|
let r = e?.closeModal, i = e?.message, a = e?.name, o = e?.cause?.data?.scrollTo, s = e?.cause?.fieldErrors ? Object.values(e?.cause?.fieldErrors)[0] : null;
|
|
4721
|
-
if (r && t(), o &&
|
|
4804
|
+
if (r && t(), o && Se.scrollTo(o, {
|
|
4722
4805
|
smooth: !0,
|
|
4723
4806
|
offset: 20
|
|
4724
4807
|
}), !(!i && !s)) {
|
|
4725
|
-
if (
|
|
4808
|
+
if (xi.includes(a)) {
|
|
4726
4809
|
n({
|
|
4727
4810
|
message: i,
|
|
4728
4811
|
type: "success"
|
|
4729
4812
|
});
|
|
4730
4813
|
return;
|
|
4731
4814
|
}
|
|
4732
|
-
if (
|
|
4815
|
+
if (bi.includes(a)) {
|
|
4733
4816
|
if (s) {
|
|
4734
4817
|
n({
|
|
4735
4818
|
message: s,
|
|
@@ -4751,7 +4834,7 @@ function Ti(e) {
|
|
|
4751
4834
|
}
|
|
4752
4835
|
//#endregion
|
|
4753
4836
|
//#region src/hooks/useCopyToClipboard.ts
|
|
4754
|
-
function
|
|
4837
|
+
function Ai(e) {
|
|
4755
4838
|
let t = document.createElement("textarea");
|
|
4756
4839
|
t.value = e, t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select();
|
|
4757
4840
|
try {
|
|
@@ -4760,13 +4843,13 @@ function Ei(e) {
|
|
|
4760
4843
|
document.body.removeChild(t);
|
|
4761
4844
|
}
|
|
4762
4845
|
}
|
|
4763
|
-
function
|
|
4846
|
+
function ji() {
|
|
4764
4847
|
async function e(e) {
|
|
4765
4848
|
try {
|
|
4766
4849
|
return await navigator.clipboard.writeText(e), !0;
|
|
4767
4850
|
} catch {
|
|
4768
4851
|
try {
|
|
4769
|
-
return
|
|
4852
|
+
return Ai(e);
|
|
4770
4853
|
} catch {
|
|
4771
4854
|
return !1;
|
|
4772
4855
|
}
|
|
@@ -4776,8 +4859,8 @@ function Di() {
|
|
|
4776
4859
|
}
|
|
4777
4860
|
//#endregion
|
|
4778
4861
|
//#region src/providers/drawerProvider.tsx
|
|
4779
|
-
var
|
|
4780
|
-
function
|
|
4862
|
+
var Mi = n({});
|
|
4863
|
+
function Ni(e) {
|
|
4781
4864
|
let { children: t = !1 } = e, [n, r] = u([]);
|
|
4782
4865
|
function i(e) {
|
|
4783
4866
|
return !!n.some((t) => t.key === e);
|
|
@@ -4797,7 +4880,7 @@ function ki(e) {
|
|
|
4797
4880
|
function s(e) {
|
|
4798
4881
|
r(n.filter((t) => t.key !== e));
|
|
4799
4882
|
}
|
|
4800
|
-
return /* @__PURE__ */ p(
|
|
4883
|
+
return /* @__PURE__ */ p(Mi.Provider, {
|
|
4801
4884
|
value: {
|
|
4802
4885
|
drawerIsOpen: i,
|
|
4803
4886
|
drawerData: a,
|
|
@@ -4809,8 +4892,8 @@ function ki(e) {
|
|
|
4809
4892
|
}
|
|
4810
4893
|
//#endregion
|
|
4811
4894
|
//#region src/hooks/useDrawer.ts
|
|
4812
|
-
function
|
|
4813
|
-
let t = a(
|
|
4895
|
+
function Pi(e) {
|
|
4896
|
+
let t = a(Mi);
|
|
4814
4897
|
if (Object.entries(t).length === 0) throw Error("useDrawer must be used within a Provider");
|
|
4815
4898
|
if (e) {
|
|
4816
4899
|
let { drawerData: n, drawerIsOpen: r, openDrawer: i, closeDrawer: a } = t;
|
|
@@ -4824,7 +4907,7 @@ function Ai(e) {
|
|
|
4824
4907
|
}
|
|
4825
4908
|
//#endregion
|
|
4826
4909
|
//#region src/hooks/useScopedParams.ts
|
|
4827
|
-
function
|
|
4910
|
+
function Fi(e, t = "") {
|
|
4828
4911
|
let n = new URLSearchParams(e), r = t ? `${t}:` : "", i = (e) => {
|
|
4829
4912
|
Object.entries(e).forEach(([e, t]) => {
|
|
4830
4913
|
t === void 0 ? n.delete(`${r}${e}`) : n.set(`${r}${e}`, String(t));
|
|
@@ -4841,8 +4924,8 @@ function ji(e, t = "") {
|
|
|
4841
4924
|
}
|
|
4842
4925
|
//#endregion
|
|
4843
4926
|
//#region src/hooks/useSearchAutomation.ts
|
|
4844
|
-
function
|
|
4845
|
-
let { closeAll: n } =
|
|
4927
|
+
function Ii(e, t = "") {
|
|
4928
|
+
let { closeAll: n } = wi(), { showToast: r } = Oi(), { getParam: i } = Fi(e, t), a = i("closeModal") === "true", s = i("message"), c = i("name"), l = i("type");
|
|
4846
4929
|
o(() => {
|
|
4847
4930
|
a && n(), s && (l === "success" && r({
|
|
4848
4931
|
message: s,
|
|
@@ -4850,10 +4933,10 @@ function Mi(e, t = "") {
|
|
|
4850
4933
|
}), l === "danger" && r({
|
|
4851
4934
|
message: s,
|
|
4852
4935
|
type: "danger"
|
|
4853
|
-
}), c &&
|
|
4936
|
+
}), c && bi.includes(c) && !bi.includes(s) && r({
|
|
4854
4937
|
message: s,
|
|
4855
4938
|
type: "danger"
|
|
4856
|
-
}), c &&
|
|
4939
|
+
}), c && xi.includes(c) && !xi.includes(s) && r({
|
|
4857
4940
|
message: s,
|
|
4858
4941
|
type: "success"
|
|
4859
4942
|
}));
|
|
@@ -4868,28 +4951,28 @@ function Mi(e, t = "") {
|
|
|
4868
4951
|
}
|
|
4869
4952
|
//#endregion
|
|
4870
4953
|
//#region src/providers/placesProvider.tsx
|
|
4871
|
-
var
|
|
4954
|
+
var Li = [
|
|
4872
4955
|
"places",
|
|
4873
4956
|
"marker",
|
|
4874
4957
|
"maps"
|
|
4875
4958
|
];
|
|
4876
|
-
function
|
|
4877
|
-
let { apiKey: t, children: n, preventFontsLoading: r = !0 } = e, { isLoaded: i } =
|
|
4959
|
+
function Ri(e) {
|
|
4960
|
+
let { apiKey: t, children: n, preventFontsLoading: r = !0 } = e, { isLoaded: i } = xe({
|
|
4878
4961
|
googleMapsApiKey: t,
|
|
4879
|
-
libraries:
|
|
4962
|
+
libraries: Li,
|
|
4880
4963
|
preventGoogleFontsLoading: r
|
|
4881
4964
|
});
|
|
4882
4965
|
return /* @__PURE__ */ p(f, { children: n(i) });
|
|
4883
4966
|
}
|
|
4884
4967
|
//#endregion
|
|
4885
4968
|
//#region src/utils/richTextUtilities.ts
|
|
4886
|
-
function
|
|
4887
|
-
if (
|
|
4969
|
+
function zi(e) {
|
|
4970
|
+
if (fe.isText(e)) {
|
|
4888
4971
|
let t = e?.text;
|
|
4889
4972
|
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;
|
|
4890
4973
|
}
|
|
4891
|
-
if (
|
|
4892
|
-
let t = e.children?.map((e) =>
|
|
4974
|
+
if (le.isElement(e)) {
|
|
4975
|
+
let t = e.children?.map((e) => zi(e)).join(""), n = e.align || "left";
|
|
4893
4976
|
switch (e.type) {
|
|
4894
4977
|
case "video": return `<iframe src="${e.src}" class="align_${n}" />`;
|
|
4895
4978
|
case "image": return `<img src="${e.src}" class="align_${n}" />`;
|
|
@@ -4905,10 +4988,10 @@ function Fi(e) {
|
|
|
4905
4988
|
}
|
|
4906
4989
|
return "";
|
|
4907
4990
|
}
|
|
4908
|
-
function
|
|
4991
|
+
function Bi(e) {
|
|
4909
4992
|
if (typeof e == "string") return { text: e };
|
|
4910
4993
|
let t = e.props.children, n;
|
|
4911
|
-
n = Array.isArray(t) ? t.map((e) =>
|
|
4994
|
+
n = Array.isArray(t) ? t.map((e) => Bi(e)) : typeof t == "string" || !t ? [{ text: t || "" }] : [Bi(t)];
|
|
4912
4995
|
let r = e.props.className?.replace("align_", "");
|
|
4913
4996
|
switch (e.type) {
|
|
4914
4997
|
case "img": return {
|
|
@@ -4978,16 +5061,16 @@ function Ii(e) {
|
|
|
4978
5061
|
}
|
|
4979
5062
|
//#endregion
|
|
4980
5063
|
//#region src/services/toHtml.ts
|
|
4981
|
-
function
|
|
4982
|
-
return e.map((e) =>
|
|
5064
|
+
function Vi(e) {
|
|
5065
|
+
return e.map((e) => zi(e)).join("");
|
|
4983
5066
|
}
|
|
4984
5067
|
//#endregion
|
|
4985
5068
|
//#region src/services/toRichTextValue.ts
|
|
4986
|
-
function
|
|
4987
|
-
let t =
|
|
4988
|
-
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? { text: e } :
|
|
5069
|
+
function Hi(e) {
|
|
5070
|
+
let t = Te(e);
|
|
5071
|
+
return Array.isArray(t) ? t.map((e) => typeof e == "string" ? { text: e } : Bi(e)) : typeof t == "string" ? [{ text: t }] : [Bi(t)];
|
|
4989
5072
|
}
|
|
4990
5073
|
//#endregion
|
|
4991
|
-
export {
|
|
5074
|
+
export { ke as AlertContainer, Ae as AlertContent, je as AlertDescription, Me as AlertIcon, Ee as AlertTitle, Ie as AudioPlayer, Xe as AudioUpload, Ze as Badge, He as Button, St as Calendar, Et as CardTabButton, Dt as CardTabContainer, Ot as Checkbox, jt as ClientOnly, Pt as CurrencyInput, Ut as DatePicker, Ue as Divider, Zt as DrawerContainer, Qt as DrawerHeader, Ni as DrawerProvider, tn as FacebookPixel, ze as FieldError, Be as FieldLabel, Ve as FieldWrapper, an as FileUpload, Re as FormProvider, Mn as FullCalendar, zn as GoogleAnalytics, Gn as GoogleTagManager, We as IconButton, Jn as ImageUpload, ft as Input, Zn as MapView, $n as MaskedInput, rr as ModalContainer, ir as ModalFooter, ar as ModalHeader, Ci as ModalProvider, mr as MultiSelect, br as Pagination, Pr as PhoneInput, Ri as PlacesProvider, Fr as Popover, zr as RadioBox, Br as RadioGroup, di as RichText, fi as SearchPlaces, gt as Select, Fe as Slider, pi as Switch, ni as TabButton, ri as TabContainer, mi as TableBody, hi as TableCaption, gi as TableContainer, _i as TableFooter, vi as TableHeader, yi as Textarea, Di as ToastProvider, qe as Tooltip, Vi as toHtml, Hi as toRichTextValue, ki as useAutomation, ji as useCopyToClipboard, Pi as useDrawer, Q as useForm, At as useHydrated, wi as useModal, Fi as useScopedParams, dt as useScrollLock, Ii as useSearchAutomation, Ne as useSlider, Oi as useToast };
|
|
4992
5075
|
|
|
4993
5076
|
//# sourceMappingURL=index.js.map
|