@arkyn/components 3.0.1-beta.155 → 3.0.1-beta.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/calendar/_viewService.d.ts +1 -1
- package/dist/components/fullCalendar/_viewService.d.ts +2 -2
- package/dist/hooks/useScopedParams.d.ts +1 -1
- package/dist/index.js +4683 -4347
- package/dist/modules/components/alert/alertContainer/index.js +20 -25
- package/dist/modules/components/alert/alertContent/index.js +8 -11
- package/dist/modules/components/alert/alertDescription/index.js +8 -11
- package/dist/modules/components/alert/alertIcon/index.js +19 -27
- package/dist/modules/components/alert/alertTitle/index.js +8 -11
- package/dist/modules/components/audioPlayer/index.js +75 -74
- package/dist/modules/components/audioUpload/hasFileContent/index.js +62 -54
- package/dist/modules/components/audioUpload/index.js +79 -71
- package/dist/modules/components/audioUpload/noFileContent/index.js +45 -35
- package/dist/modules/components/badge/index.js +22 -26
- package/dist/modules/components/button/index.js +32 -39
- package/dist/modules/components/calendar/_calendarProvider.js +63 -38
- package/dist/modules/components/calendar/_viewService.js +140 -132
- package/dist/modules/components/calendar/calendarContainer/index.js +7 -10
- package/dist/modules/components/calendar/calendarHeader/index.js +72 -51
- package/dist/modules/components/calendar/calendarTableBody/index.js +10 -12
- package/dist/modules/components/calendar/calendarTableContainer/index.js +7 -10
- package/dist/modules/components/calendar/calendarTableHeader/index.js +10 -13
- package/dist/modules/components/calendar/calendarTableTd/index.js +23 -20
- package/dist/modules/components/calendar/index.js +49 -31
- package/dist/modules/components/cardTab/cardTabButton/index.js +29 -19
- package/dist/modules/components/cardTab/cardTabContainer/index.js +28 -22
- package/dist/modules/components/cardTab/cardTabContext.js +11 -13
- package/dist/modules/components/checkbox/index.js +64 -37
- package/dist/modules/components/clientOnly.js +8 -8
- package/dist/modules/components/currencyInput/index.js +138 -110
- package/dist/modules/components/divider/index.js +11 -10
- package/dist/modules/components/drawer/drawerContainer/index.js +43 -40
- package/dist/modules/components/drawer/drawerContext.js +11 -13
- package/dist/modules/components/drawer/drawerHeader/index.js +27 -20
- package/dist/modules/components/facebookPixel/facebookPixel.client.js +18 -8
- package/dist/modules/components/facebookPixel/index.js +8 -8
- package/dist/modules/components/facebookPixel/pixel.js +52 -47
- package/dist/modules/components/fieldError/index.js +8 -12
- package/dist/modules/components/fieldLabel/index.js +12 -11
- package/dist/modules/components/fieldWrapper/index.js +13 -12
- package/dist/modules/components/fileUpload/hasFileContent/index.js +67 -59
- package/dist/modules/components/fileUpload/index.js +72 -65
- package/dist/modules/components/fileUpload/noFileContent/index.js +45 -35
- package/dist/modules/components/fullCalendar/_fullCalendarProvider.js +46 -33
- package/dist/modules/components/fullCalendar/_viewService.js +105 -100
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +7 -10
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +78 -70
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +33 -28
- package/dist/modules/components/fullCalendar/dayCalendar/index.js +9 -12
- package/dist/modules/components/fullCalendar/fullCalendarContainer/index.js +7 -10
- package/dist/modules/components/fullCalendar/fullCalendarHeader/index.js +70 -67
- package/dist/modules/components/fullCalendar/index.js +30 -30
- package/dist/modules/components/fullCalendar/monthlyCalendar/index.js +12 -9
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +36 -28
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +9 -11
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +9 -10
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +10 -13
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +36 -35
- package/dist/modules/components/fullCalendar/weekCalendar/index.js +11 -8
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +78 -70
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +20 -17
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +8 -9
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +19 -16
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +39 -34
- package/dist/modules/components/googleAnalytics/googleAnalytics.client.js +7 -7
- package/dist/modules/components/googleAnalytics/googleAnalytics.js +17 -17
- package/dist/modules/components/googleAnalytics/index.js +9 -9
- package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js +12 -10
- package/dist/modules/components/googleTagManager/googleTagManager.client.js +6 -6
- package/dist/modules/components/googleTagManager/googleTagManager.js +48 -44
- package/dist/modules/components/googleTagManager/index.js +27 -16
- package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js +8 -8
- package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js +20 -19
- package/dist/modules/components/iconButton/index.js +29 -31
- package/dist/modules/components/imageUpload/hasFileContent/index.js +63 -46
- package/dist/modules/components/imageUpload/index.js +82 -65
- package/dist/modules/components/imageUpload/noFileContent/index.js +45 -35
- package/dist/modules/components/input/index.js +120 -92
- package/dist/modules/components/mapView/index.js +31 -27
- package/dist/modules/components/mapView/mapView.client.js +51 -49
- package/dist/modules/components/maskedInput/index.js +112 -101
- package/dist/modules/components/modal/modalContainer/index.js +42 -49
- package/dist/modules/components/modal/modalContext.js +11 -13
- package/dist/modules/components/modal/modalFooter/index.js +7 -10
- package/dist/modules/components/modal/modalHeader/index.js +27 -20
- package/dist/modules/components/multiSelect/index.js +154 -115
- package/dist/modules/components/multiSelect/multiSelectChevron/index.js +21 -18
- package/dist/modules/components/multiSelect/multiSelectContainer/index.js +29 -13
- package/dist/modules/components/multiSelect/multiSelectContent/index.js +8 -11
- package/dist/modules/components/multiSelect/multiSelectMark/index.js +22 -19
- package/dist/modules/components/multiSelect/multiSelectOption/index.js +13 -17
- package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js +45 -35
- package/dist/modules/components/multiSelect/multiSelectOverlay/index.js +8 -11
- package/dist/modules/components/multiSelect/multiSelectSpinner/index.js +16 -13
- package/dist/modules/components/pagination/chevronButton/index.js +17 -17
- package/dist/modules/components/pagination/currentButton/index.js +7 -11
- package/dist/modules/components/pagination/index.js +83 -51
- package/dist/modules/components/pagination/pageButton/index.js +8 -12
- package/dist/modules/components/pagination/paginationService.js +48 -33
- package/dist/modules/components/pagination/spread/index.js +7 -10
- package/dist/modules/components/phoneInput/index.js +151 -103
- package/dist/modules/components/phoneInput/phoneInputContainer/index.js +19 -12
- package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/index.js +8 -11
- package/dist/modules/components/phoneInput/phoneInputCountryOption/index.js +15 -23
- package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/index.js +43 -33
- package/dist/modules/components/phoneInput/phoneInputCountrySelector/index.js +21 -25
- package/dist/modules/components/phoneInput/phoneInputMask/index.js +62 -46
- package/dist/modules/components/popover/index.js +36 -37
- package/dist/modules/components/radio/radioBox/index.js +42 -24
- package/dist/modules/components/radio/radioContext.js +18 -20
- package/dist/modules/components/radio/radioGroup/index.js +64 -41
- package/dist/modules/components/richText/blockButton/index.js +23 -20
- package/dist/modules/components/richText/element/index.js +58 -72
- package/dist/modules/components/richText/index.js +135 -143
- package/dist/modules/components/richText/insertImage/index.js +105 -94
- package/dist/modules/components/richText/insertVideo/index.js +97 -85
- package/dist/modules/components/richText/leaf/index.js +6 -9
- package/dist/modules/components/richText/markButton/index.js +22 -19
- package/dist/modules/components/richText/toolbar/index.js +7 -10
- package/dist/modules/components/searchPlaces.js +66 -57
- package/dist/modules/components/select/index.js +144 -112
- package/dist/modules/components/select/selectChevron/index.js +21 -18
- package/dist/modules/components/select/selectContainer/index.js +29 -13
- package/dist/modules/components/select/selectContent/index.js +8 -11
- package/dist/modules/components/select/selectOption/index.js +13 -17
- package/dist/modules/components/select/selectOptionsContainer/index.js +45 -35
- package/dist/modules/components/select/selectOverlay/index.js +8 -11
- package/dist/modules/components/select/selectSpinner/index.js +9 -13
- package/dist/modules/components/slider/index.js +41 -34
- package/dist/modules/components/switch/index.js +62 -35
- package/dist/modules/components/tab/tabButton/index.js +29 -19
- package/dist/modules/components/tab/tabContainer/index.js +28 -22
- package/dist/modules/components/tab/tabContext.js +10 -12
- package/dist/modules/components/table/tableBody/index.js +14 -19
- package/dist/modules/components/table/tableCaption/index.js +8 -15
- package/dist/modules/components/table/tableContainer/index.js +8 -12
- package/dist/modules/components/table/tableFooter/index.js +11 -18
- package/dist/modules/components/table/tableHeader/index.js +11 -12
- package/dist/modules/components/textarea/index.js +69 -51
- package/dist/modules/components/tooltip/index.js +45 -34
- package/dist/modules/hooks/useAutomation.js +27 -35
- package/dist/modules/hooks/useDrawer.js +19 -17
- package/dist/modules/hooks/useForm.js +6 -6
- package/dist/modules/hooks/useHydrated.js +12 -7
- package/dist/modules/hooks/useModal.js +19 -17
- package/dist/modules/hooks/useScopedParams.js +17 -17
- package/dist/modules/hooks/useScrollLock.js +19 -19
- package/dist/modules/hooks/useSearchAutomation.js +14 -31
- package/dist/modules/hooks/useSlider.js +13 -13
- package/dist/modules/hooks/useToast.js +9 -8
- package/dist/modules/index.js +144 -72
- package/dist/modules/providers/drawerProvider.js +30 -35
- package/dist/modules/providers/formProvider.js +16 -11
- package/dist/modules/providers/modalProvider.js +33 -39
- package/dist/modules/providers/placesProvider.js +16 -16
- package/dist/modules/providers/toastProvider.js +51 -45
- package/dist/modules/services/extractTextFromNode.js +6 -6
- package/dist/modules/services/fieldTemplate.js +23 -22
- package/dist/modules/services/iconRenderer.js +7 -14
- package/dist/modules/services/isBlockActive.js +14 -12
- package/dist/modules/services/isMarkActive.js +6 -6
- package/dist/modules/services/maskCurrencyValues.js +12 -11
- package/dist/modules/services/toHtml.js +6 -6
- package/dist/modules/services/toRichTextValue.js +7 -7
- package/dist/modules/services/toggleBlock.js +19 -20
- package/dist/modules/services/toggleMark.js +7 -7
- package/dist/modules/style.css +1 -0
- package/dist/modules/templates/badResponses.js +13 -13
- package/dist/modules/templates/richTextTemplates.js +14 -17
- package/dist/modules/templates/successResponses.js +4 -9
- package/dist/modules/utils/phoneInputUtilities.js +28 -18
- package/dist/modules/utils/richTextUtilities.js +75 -88
- package/dist/services/fieldTemplate.d.ts +1 -1
- package/dist/services/fieldTemplate.d.ts.map +1 -1
- package/dist/style.css +1 -0
- package/package.json +65 -65
- package/dist/components.css +0 -2
- package/dist/modules/components.css +0 -2
|
@@ -1,36 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
drawerIsOpen: s,
|
|
28
|
-
drawerData: c,
|
|
29
|
-
openDrawer: l,
|
|
30
|
-
closeDrawer: u
|
|
31
|
-
},
|
|
32
|
-
children: i
|
|
33
|
-
});
|
|
1
|
+
import { jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, createContext as D } from "react";
|
|
3
|
+
const m = D({});
|
|
4
|
+
function C(a) {
|
|
5
|
+
const { children: s = !1 } = a, [t, n] = p([]);
|
|
6
|
+
function i(e) {
|
|
7
|
+
return !!t.some((r) => r.key === e);
|
|
8
|
+
}
|
|
9
|
+
function f(e) {
|
|
10
|
+
var r;
|
|
11
|
+
return (r = t.find((o) => o.key === e)) == null ? void 0 : r.data;
|
|
12
|
+
}
|
|
13
|
+
function c(e, r) {
|
|
14
|
+
const o = i(e);
|
|
15
|
+
n(o ? (u) => [...u.filter((l) => l.key !== e), { key: e, data: r }] : [...t, { key: e, data: r }]);
|
|
16
|
+
}
|
|
17
|
+
function d(e) {
|
|
18
|
+
n(t.filter((r) => r.key !== e));
|
|
19
|
+
}
|
|
20
|
+
return /* @__PURE__ */ w(
|
|
21
|
+
m.Provider,
|
|
22
|
+
{
|
|
23
|
+
value: { drawerIsOpen: i, drawerData: f, openDrawer: c, closeDrawer: d },
|
|
24
|
+
children: s
|
|
25
|
+
}
|
|
26
|
+
);
|
|
34
27
|
}
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
export {
|
|
29
|
+
C as DrawerProvider,
|
|
30
|
+
m as drawerContext
|
|
31
|
+
};
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import { cloneElement as e, createContext as t } from "react";
|
|
2
1
|
import { jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { cloneElement as i, createContext as m } from "react";
|
|
3
|
+
const c = m({});
|
|
4
|
+
function s(e) {
|
|
5
|
+
const { children: o, fieldErrors: t, form: r } = e;
|
|
6
|
+
return /* @__PURE__ */ n(c.Provider, { value: { fieldErrors: t }, children: [
|
|
7
|
+
!r && o,
|
|
8
|
+
r && i(
|
|
9
|
+
r,
|
|
10
|
+
r.props,
|
|
11
|
+
o
|
|
12
|
+
)
|
|
13
|
+
] });
|
|
11
14
|
}
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
export {
|
|
16
|
+
s as FormProvider,
|
|
17
|
+
c as formContext
|
|
18
|
+
};
|
|
@@ -1,40 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
modalIsOpen: s,
|
|
31
|
-
modalData: c,
|
|
32
|
-
openModal: l,
|
|
33
|
-
closeModal: u,
|
|
34
|
-
closeAll: d
|
|
35
|
-
},
|
|
36
|
-
children: i
|
|
37
|
-
});
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useState as x, createContext as M } from "react";
|
|
3
|
+
const v = M({});
|
|
4
|
+
function P(i) {
|
|
5
|
+
const { children: d = !1 } = i, [t, n] = x([]);
|
|
6
|
+
function l(e) {
|
|
7
|
+
return !!t.some((o) => o.key === e);
|
|
8
|
+
}
|
|
9
|
+
function s(e) {
|
|
10
|
+
var o;
|
|
11
|
+
return (o = t.find((r) => r.key === e)) == null ? void 0 : o.data;
|
|
12
|
+
}
|
|
13
|
+
function a(e, o) {
|
|
14
|
+
const r = l(e);
|
|
15
|
+
n(r ? (u) => [...u.filter((m) => m.key !== e), { key: e, data: o }] : [...t, { key: e, data: o }]);
|
|
16
|
+
}
|
|
17
|
+
function c(e) {
|
|
18
|
+
n(t.filter((o) => o.key !== e));
|
|
19
|
+
}
|
|
20
|
+
function f() {
|
|
21
|
+
n([]);
|
|
22
|
+
}
|
|
23
|
+
return /* @__PURE__ */ p(
|
|
24
|
+
v.Provider,
|
|
25
|
+
{
|
|
26
|
+
value: { modalIsOpen: l, modalData: s, openModal: a, closeModal: c, closeAll: f },
|
|
27
|
+
children: d
|
|
28
|
+
}
|
|
29
|
+
);
|
|
38
30
|
}
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
export {
|
|
32
|
+
P as ModalProvider,
|
|
33
|
+
v as modalContext
|
|
34
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useLoadScript as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"maps"
|
|
1
|
+
import { jsx as i, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { useLoadScript as a } from "@react-google-maps/api";
|
|
3
|
+
const p = [
|
|
4
|
+
"places",
|
|
5
|
+
"marker",
|
|
6
|
+
"maps"
|
|
8
7
|
];
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
function l(e) {
|
|
9
|
+
const { apiKey: o, children: r, preventFontsLoading: n = !0 } = e, { isLoaded: t } = a({
|
|
10
|
+
googleMapsApiKey: o,
|
|
11
|
+
libraries: p,
|
|
12
|
+
preventGoogleFontsLoading: n
|
|
13
|
+
});
|
|
14
|
+
return /* @__PURE__ */ i(s, { children: r(t) });
|
|
16
15
|
}
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
export {
|
|
17
|
+
l as PlacesProvider
|
|
18
|
+
};
|
|
@@ -1,46 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
import { jsxs as f, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as s } from "react";
|
|
3
|
+
import o, { Toaster as i } from "react-hot-toast";
|
|
4
|
+
const a = s({});
|
|
5
|
+
function m({ children: t }) {
|
|
6
|
+
function r(e) {
|
|
7
|
+
switch (e.type) {
|
|
8
|
+
case "success":
|
|
9
|
+
return o.success(e.message, {
|
|
10
|
+
style: {
|
|
11
|
+
background: "#10B981",
|
|
12
|
+
color: "#ffffff",
|
|
13
|
+
padding: "12px 16px",
|
|
14
|
+
fontSize: "14px",
|
|
15
|
+
fontWeight: 600
|
|
16
|
+
},
|
|
17
|
+
iconTheme: {
|
|
18
|
+
primary: "#059669",
|
|
19
|
+
secondary: "#ffffff"
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
case "danger":
|
|
23
|
+
return o.error(e.message, {
|
|
24
|
+
style: {
|
|
25
|
+
background: "#E11D48",
|
|
26
|
+
color: "#ffffff",
|
|
27
|
+
padding: "12px 16px",
|
|
28
|
+
fontSize: "14px",
|
|
29
|
+
fontWeight: 600
|
|
30
|
+
},
|
|
31
|
+
iconTheme: {
|
|
32
|
+
primary: "#BE123C",
|
|
33
|
+
secondary: "#ffffff"
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return /* @__PURE__ */ f(a.Provider, { value: { showToast: r }, children: [
|
|
39
|
+
/* @__PURE__ */ n(
|
|
40
|
+
i,
|
|
41
|
+
{
|
|
42
|
+
position: "top-right",
|
|
43
|
+
containerStyle: { zIndex: 999999999999999 }
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
t
|
|
47
|
+
] });
|
|
44
48
|
}
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
export {
|
|
50
|
+
m as ToastProvider,
|
|
51
|
+
a as toastContext
|
|
52
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Node as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return t.map((t) => e.string(t)).join("");
|
|
1
|
+
import { Node as t } from "slate";
|
|
2
|
+
function n(o) {
|
|
3
|
+
return o.map((r) => t.string(r)).join("");
|
|
5
4
|
}
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export {
|
|
6
|
+
n as extractTextFromNode
|
|
7
|
+
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { FieldError as p } from "../components/fieldError/index.js";
|
|
3
|
+
import { FieldLabel as c } from "../components/fieldLabel/index.js";
|
|
4
|
+
import { FieldWrapper as f } from "../components/fieldWrapper/index.js";
|
|
5
|
+
function b(l) {
|
|
6
|
+
const {
|
|
7
|
+
name: t,
|
|
8
|
+
label: r,
|
|
9
|
+
showAsterisk: n,
|
|
10
|
+
className: m,
|
|
11
|
+
unShowFieldTemplate: s,
|
|
12
|
+
errorMessage: e,
|
|
13
|
+
children: i,
|
|
14
|
+
orientation: a
|
|
15
|
+
} = l;
|
|
16
|
+
return s ? i : /* @__PURE__ */ d(f, { id: t, className: m, orientation: a, children: [
|
|
17
|
+
r && /* @__PURE__ */ o(c, { showAsterisk: n, children: r }),
|
|
18
|
+
i,
|
|
19
|
+
e && /* @__PURE__ */ o(p, { children: e })
|
|
20
|
+
] });
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
export {
|
|
23
|
+
b as FieldTemplate
|
|
24
|
+
};
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return !o || !i ? /* @__PURE__ */ t(e, {}) : typeof i == "string" ? /* @__PURE__ */ t("p", {
|
|
6
|
-
className: a,
|
|
7
|
-
children: i
|
|
8
|
-
}) : /* @__PURE__ */ t(i, {
|
|
9
|
-
size: r,
|
|
10
|
-
strokeWidth: 2.5,
|
|
11
|
-
className: a
|
|
12
|
-
});
|
|
1
|
+
import { jsx as e, Fragment as t } from "react/jsx-runtime";
|
|
2
|
+
function f(i) {
|
|
3
|
+
const { iconSize: o, icon: r, className: n, show: c = !0 } = i;
|
|
4
|
+
return c ? r ? typeof r == "string" ? /* @__PURE__ */ e("p", { className: n, children: r }) : /* @__PURE__ */ e(r, { size: o, strokeWidth: 2.5, className: n }) : /* @__PURE__ */ e(t, {}) : /* @__PURE__ */ e(t, {});
|
|
13
5
|
}
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
export {
|
|
7
|
+
f as IconRenderer
|
|
8
|
+
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { Editor as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { Editor as n, Element as s } from "slate";
|
|
2
|
+
function m(t, r, c = "type") {
|
|
3
|
+
const { selection: o } = t;
|
|
4
|
+
if (!o) return !1;
|
|
5
|
+
const [i] = Array.from(
|
|
6
|
+
n.nodes(t, {
|
|
7
|
+
at: n.unhangRange(t, o),
|
|
8
|
+
match: (e) => !n.isEditor(e) && s.isElement(e) && e[c] === r
|
|
9
|
+
})
|
|
10
|
+
);
|
|
11
|
+
return !!i;
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
export {
|
|
14
|
+
m as isBlockActive
|
|
15
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Editor as e } from "slate";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return r ? r[n] === !0 : !1;
|
|
2
|
+
function s(t, o) {
|
|
3
|
+
const r = e.marks(t);
|
|
4
|
+
return r ? r[o] === !0 : !1;
|
|
6
5
|
}
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export {
|
|
7
|
+
s as isMarkActive
|
|
8
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { formatToCurrency as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return typeof e == "string" ? (n = +t(e), n % 1 != 0 && (n = n.toFixed(2))) : n = Number.isInteger(e) ? Number(e) * 10 ** 2 : e.toFixed(2), t(String(n)) / 10 ** 2;
|
|
1
|
+
import { formatToCurrency as o, removeNonNumeric as i } from "@arkyn/shared";
|
|
2
|
+
function f(e) {
|
|
3
|
+
let r = e;
|
|
4
|
+
return typeof e == "string" ? (r = +i(e), r % 1 !== 0 && (r = r.toFixed(2))) : r = Number.isInteger(e) ? Number(e) * 10 ** 2 : e.toFixed(2), +i(String(r)) / 10 ** 2;
|
|
6
5
|
}
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
function u(e, r) {
|
|
7
|
+
if (!e) return [0, o(0, r)];
|
|
8
|
+
const t = f(e), n = o(t, r);
|
|
9
|
+
return [t, n];
|
|
11
10
|
}
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
export {
|
|
12
|
+
u as maskCurrencyValues,
|
|
13
|
+
f as normalizeValue
|
|
14
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { serialize as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return t.map((t) => e(t)).join("");
|
|
1
|
+
import { serialize as t } from "../utils/richTextUtilities.js";
|
|
2
|
+
function e(o) {
|
|
3
|
+
return o.map((r) => t(r)).join("");
|
|
5
4
|
}
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export {
|
|
6
|
+
e as toHtml
|
|
7
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import f from "html-react-parser";
|
|
1
2
|
import { deserialize as e } from "../utils/richTextUtilities.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let r = t(n);
|
|
6
|
-
return Array.isArray(r) ? r.map((t) => typeof t == "string" ? { text: t } : e(t)) : typeof r == "string" ? [{ text: r }] : [e(r)];
|
|
3
|
+
function p(i) {
|
|
4
|
+
const r = f(i);
|
|
5
|
+
return Array.isArray(r) ? r.map((t) => typeof t == "string" ? { text: t } : e(t)) : typeof r == "string" ? [{ text: r }] : [e(r)];
|
|
7
6
|
}
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export {
|
|
8
|
+
p as toRichTextValue
|
|
9
|
+
};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { listTypes as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
a.wrapNodes(o, e);
|
|
18
|
-
}
|
|
1
|
+
import { Transforms as o, Editor as y, Element as d } from "slate";
|
|
2
|
+
import { listTypes as n, textAlignTypes as p } from "../templates/richTextTemplates.js";
|
|
3
|
+
import { isBlockActive as m } from "./isBlockActive.js";
|
|
4
|
+
function g(t, e) {
|
|
5
|
+
const r = p.includes(e) ? "align" : "type", i = m(t, e, r), c = n.includes(e);
|
|
6
|
+
o.unwrapNodes(t, {
|
|
7
|
+
match: (s) => !y.isEditor(s) && d.isElement(s) && n.includes(s.type) && !p.includes(e),
|
|
8
|
+
split: !0
|
|
9
|
+
});
|
|
10
|
+
let l;
|
|
11
|
+
if (p.includes(e) ? l = { align: i ? void 0 : e } : l = {
|
|
12
|
+
type: i ? "paragraph" : c ? "listItem" : e
|
|
13
|
+
}, o.setNodes(t, l), !i && c) {
|
|
14
|
+
const s = { type: e, children: [] };
|
|
15
|
+
o.wrapNodes(t, s);
|
|
16
|
+
}
|
|
19
17
|
}
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
export {
|
|
19
|
+
g as toggleBlock
|
|
20
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
e(n, r) ? t.removeMark(n, r) : t.addMark(n, r, !0);
|
|
1
|
+
import { Editor as r } from "slate";
|
|
2
|
+
import { isMarkActive as t } from "./isMarkActive.js";
|
|
3
|
+
function k(i, e) {
|
|
4
|
+
t(i, e) ? r.removeMark(i, e) : r.addMark(i, e, !0);
|
|
6
5
|
}
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export {
|
|
7
|
+
k as toggleMark
|
|
8
|
+
};
|