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