@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,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
i(() => {
|
|
29
|
-
l && s(), f && a.scrollTo(f, {
|
|
30
|
-
smooth: !0,
|
|
31
|
-
offset: 20
|
|
32
|
-
}), m();
|
|
33
|
-
}, [o]);
|
|
1
|
+
import { useEffect as h } from "react";
|
|
2
|
+
import { scroller as A } from "react-scroll";
|
|
3
|
+
import { useModal as j } from "./useModal.js";
|
|
4
|
+
import { useToast as v } from "./useToast.js";
|
|
5
|
+
import { badResponses as w } from "../templates/badResponses.js";
|
|
6
|
+
import { successResponses as x } from "../templates/successResponses.js";
|
|
7
|
+
function B(c) {
|
|
8
|
+
var t, T, g, y;
|
|
9
|
+
const { closeAll: E } = j(), { showToast: i } = v(), b = c == null ? void 0 : c.closeModal, l = c == null ? void 0 : c.message, r = c == null ? void 0 : c.name, d = (T = (t = c == null ? void 0 : c.cause) == null ? void 0 : t.data) == null ? void 0 : T.scrollTo, u = (g = c == null ? void 0 : c.cause) != null && g.fieldErrors ? Object.values((y = c == null ? void 0 : c.cause) == null ? void 0 : y.fieldErrors)[0] : null;
|
|
10
|
+
function M() {
|
|
11
|
+
if (!(!l && !u)) {
|
|
12
|
+
if (x.includes(r))
|
|
13
|
+
return i({ message: l, type: "success" });
|
|
14
|
+
if (w.includes(r)) {
|
|
15
|
+
if (u)
|
|
16
|
+
return i({ message: u, type: "danger" });
|
|
17
|
+
if (l !== "Unprocessable entity")
|
|
18
|
+
return i({ message: l, type: "danger" });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
h(() => {
|
|
23
|
+
b && E(), d && A.scrollTo(d, { smooth: !0, offset: 20 }), M();
|
|
24
|
+
}, [c]);
|
|
34
25
|
}
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
export {
|
|
27
|
+
B as useAutomation
|
|
28
|
+
};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { useContext as D } from "react";
|
|
2
|
+
import { drawerContext as p } from "../providers/drawerProvider.js";
|
|
3
|
+
function l(r) {
|
|
4
|
+
const e = D(p);
|
|
5
|
+
if (Object.entries(e).length === 0)
|
|
6
|
+
throw new Error("useDrawer must be used within a Provider");
|
|
7
|
+
if (r) {
|
|
8
|
+
const {
|
|
9
|
+
drawerData: t,
|
|
10
|
+
drawerIsOpen: o,
|
|
11
|
+
openDrawer: n,
|
|
12
|
+
closeDrawer: a
|
|
13
|
+
} = e, s = o(r), w = t(r);
|
|
14
|
+
return { drawerIsOpen: s, drawerData: w, openDrawer: (c) => n(r, c), closeDrawer: () => a(r) };
|
|
15
|
+
} else
|
|
16
|
+
return e;
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
export {
|
|
19
|
+
l as useDrawer
|
|
20
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { formContext as e } from "../providers/formProvider.js";
|
|
2
1
|
import { useContext as t } from "react";
|
|
3
|
-
|
|
4
|
-
function
|
|
5
|
-
|
|
2
|
+
import { formContext as o } from "../providers/formProvider.js";
|
|
3
|
+
function m() {
|
|
4
|
+
return t(o);
|
|
6
5
|
}
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export {
|
|
7
|
+
m as useForm
|
|
8
|
+
};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { useSyncExternalStore as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { useSyncExternalStore as r } from "react";
|
|
2
|
+
function e() {
|
|
3
|
+
return () => {
|
|
4
|
+
};
|
|
5
5
|
}
|
|
6
6
|
function n() {
|
|
7
|
-
|
|
7
|
+
return r(
|
|
8
|
+
e,
|
|
9
|
+
() => !0,
|
|
10
|
+
() => !1
|
|
11
|
+
);
|
|
8
12
|
}
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
export {
|
|
14
|
+
n as useHydrated
|
|
15
|
+
};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { useContext as r } from "react";
|
|
2
|
+
import { modalContext as M } from "../providers/modalProvider.js";
|
|
3
|
+
function x(o) {
|
|
4
|
+
const t = r(M);
|
|
5
|
+
if (Object.entries(t).length === 0)
|
|
6
|
+
throw new Error("useModal must be used within a Provider");
|
|
7
|
+
if (o) {
|
|
8
|
+
const {
|
|
9
|
+
modalData: e,
|
|
10
|
+
modalIsOpen: n,
|
|
11
|
+
openModal: a,
|
|
12
|
+
closeModal: l
|
|
13
|
+
} = t, s = n(o), d = e(o);
|
|
14
|
+
return { modalIsOpen: s, modalData: d, openModal: (c) => a(o, c), closeModal: () => l(o) };
|
|
15
|
+
} else
|
|
16
|
+
return t;
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
export {
|
|
19
|
+
x as useModal
|
|
20
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
1
|
+
function i(n, c = "") {
|
|
2
|
+
const t = new URLSearchParams(n), a = c ? `${c}:` : "", o = (r) => {
|
|
3
|
+
Object.entries(r).forEach(([e, s]) => {
|
|
4
|
+
s === void 0 ? t.delete(`${a}${e}`) : t.set(`${a}${e}`, String(s));
|
|
5
|
+
});
|
|
6
|
+
};
|
|
7
|
+
return {
|
|
8
|
+
getParam: (r) => t.get(`${a}${r}`),
|
|
9
|
+
getScopedSearch: (r) => {
|
|
10
|
+
o(r);
|
|
11
|
+
let e = t.toString();
|
|
12
|
+
return e && (e = "?" + e), e;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
16
15
|
}
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
export {
|
|
17
|
+
i as useScopedParams
|
|
18
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { useEffect as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return typeof window > "u" ? 0 : window.innerWidth - document.documentElement.clientWidth;
|
|
1
|
+
import { useEffect as c } from "react";
|
|
2
|
+
function l() {
|
|
3
|
+
return typeof window > "u" ? 0 : window.innerWidth - document.documentElement.clientWidth;
|
|
5
4
|
}
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
function u(t) {
|
|
6
|
+
c(() => {
|
|
7
|
+
if (t) {
|
|
8
|
+
const e = document.body.style.overflow, n = document.body.style.paddingRight, o = l();
|
|
9
|
+
if (o > 0) {
|
|
10
|
+
const d = window.getComputedStyle(document.body), i = parseInt(d.paddingRight) || 0;
|
|
11
|
+
document.body.style.paddingRight = `${i + o}px`;
|
|
12
|
+
}
|
|
13
|
+
return document.body.style.overflow = "hidden", () => {
|
|
14
|
+
document.body.style.overflow = e, document.body.style.paddingRight = n;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}, [t]);
|
|
19
18
|
}
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
export {
|
|
20
|
+
u as useScrollLock
|
|
21
|
+
};
|
|
@@ -1,32 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
message: f,
|
|
13
|
-
type: "success"
|
|
14
|
-
}), m === "danger" && l({
|
|
15
|
-
message: f,
|
|
16
|
-
type: "danger"
|
|
17
|
-
}), p && n.includes(p) && !n.includes(f) && l({
|
|
18
|
-
message: f,
|
|
19
|
-
type: "danger"
|
|
20
|
-
}), p && r.includes(p) && !r.includes(f) && l({
|
|
21
|
-
message: f,
|
|
22
|
-
type: "success"
|
|
23
|
-
}));
|
|
24
|
-
}, [
|
|
25
|
-
d,
|
|
26
|
-
f,
|
|
27
|
-
p,
|
|
28
|
-
m
|
|
29
|
-
]);
|
|
1
|
+
import { useEffect as u } from "react";
|
|
2
|
+
import { useModal as f } from "./useModal.js";
|
|
3
|
+
import { useToast as d } from "./useToast.js";
|
|
4
|
+
import { badResponses as r } from "../templates/badResponses.js";
|
|
5
|
+
import { successResponses as a } from "../templates/successResponses.js";
|
|
6
|
+
import { useScopedParams as l } from "./useScopedParams.js";
|
|
7
|
+
function R(m, i = "") {
|
|
8
|
+
const { closeAll: p } = f(), { showToast: o } = d(), { getParam: t } = l(m, i), n = t("closeModal") === "true", s = t("message"), e = t("name"), c = t("type");
|
|
9
|
+
u(() => {
|
|
10
|
+
n && p(), s && (c === "success" && o({ message: s, type: "success" }), c === "danger" && o({ message: s, type: "danger" }), e && r.includes(e) && !r.includes(s) && o({ message: s, type: "danger" }), e && a.includes(e) && !a.includes(s) && o({ message: s, type: "success" }));
|
|
11
|
+
}, [n, s, e, c]);
|
|
30
12
|
}
|
|
31
|
-
|
|
32
|
-
|
|
13
|
+
export {
|
|
14
|
+
R as useSearchAutomation
|
|
15
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
|
|
3
|
-
function t(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return [r, a];
|
|
1
|
+
import { useState as f } from "react";
|
|
2
|
+
function c(r) {
|
|
3
|
+
function t() {
|
|
4
|
+
return !r || r <= 0 ? 0 : r >= 100 ? 100 : r;
|
|
5
|
+
}
|
|
6
|
+
const [i, e] = f(t());
|
|
7
|
+
function u(n) {
|
|
8
|
+
return n <= 0 ? e(0) : n >= 100 ? e(100) : e(n);
|
|
9
|
+
}
|
|
10
|
+
return [i, u];
|
|
12
11
|
}
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
export {
|
|
13
|
+
c as useSlider
|
|
14
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { toastContext as e } from "../providers/toastProvider.js";
|
|
2
|
-
import { useContext as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { useContext as o } from "react";
|
|
3
|
+
function s() {
|
|
4
|
+
const t = o(e);
|
|
5
|
+
if (Object.entries(t).length === 0)
|
|
6
|
+
throw new Error("useToast must be used within a Provider");
|
|
7
|
+
return t;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
export {
|
|
10
|
+
s as useToast
|
|
11
|
+
};
|
package/dist/modules/index.js
CHANGED
|
@@ -1,72 +1,144 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import { DrawerProvider as
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import { toHtml as
|
|
71
|
-
import { toRichTextValue as
|
|
72
|
-
export {
|
|
1
|
+
import { AlertContainer as e } from "./components/alert/alertContainer/index.js";
|
|
2
|
+
import { AlertContent as p } from "./components/alert/alertContent/index.js";
|
|
3
|
+
import { AlertDescription as x } from "./components/alert/alertDescription/index.js";
|
|
4
|
+
import { AlertIcon as a } from "./components/alert/alertIcon/index.js";
|
|
5
|
+
import { AlertTitle as i } from "./components/alert/alertTitle/index.js";
|
|
6
|
+
import { AudioPlayer as d } from "./components/audioPlayer/index.js";
|
|
7
|
+
import { AudioUpload as c } from "./components/audioUpload/index.js";
|
|
8
|
+
import { Badge as T } from "./components/badge/index.js";
|
|
9
|
+
import { Button as P } from "./components/button/index.js";
|
|
10
|
+
import { Calendar as A } from "./components/calendar/index.js";
|
|
11
|
+
import { CardTabButton as M } from "./components/cardTab/cardTabButton/index.js";
|
|
12
|
+
import { CardTabContainer as g } from "./components/cardTab/cardTabContainer/index.js";
|
|
13
|
+
import { Checkbox as v } from "./components/checkbox/index.js";
|
|
14
|
+
import { ClientOnly as I } from "./components/clientOnly.js";
|
|
15
|
+
import { CurrencyInput as y } from "./components/currencyInput/index.js";
|
|
16
|
+
import { Divider as H } from "./components/divider/index.js";
|
|
17
|
+
import { DrawerContainer as R } from "./components/drawer/drawerContainer/index.js";
|
|
18
|
+
import { DrawerHeader as U } from "./components/drawer/drawerHeader/index.js";
|
|
19
|
+
import { FacebookPixel as V } from "./components/facebookPixel/index.js";
|
|
20
|
+
import { FieldError as O } from "./components/fieldError/index.js";
|
|
21
|
+
import { FieldLabel as j } from "./components/fieldLabel/index.js";
|
|
22
|
+
import { FieldWrapper as z } from "./components/fieldWrapper/index.js";
|
|
23
|
+
import { FileUpload as K } from "./components/fileUpload/index.js";
|
|
24
|
+
import { FullCalendar as Q } from "./components/fullCalendar/index.js";
|
|
25
|
+
import { GoogleAnalytics as Y } from "./components/googleAnalytics/index.js";
|
|
26
|
+
import { GoogleTagManager as _ } from "./components/googleTagManager/index.js";
|
|
27
|
+
import { IconButton as oo } from "./components/iconButton/index.js";
|
|
28
|
+
import { ImageUpload as eo } from "./components/imageUpload/index.js";
|
|
29
|
+
import { Input as po } from "./components/input/index.js";
|
|
30
|
+
import { MapView as xo } from "./components/mapView/index.js";
|
|
31
|
+
import { MaskedInput as ao } from "./components/maskedInput/index.js";
|
|
32
|
+
import { ModalContainer as io } from "./components/modal/modalContainer/index.js";
|
|
33
|
+
import { ModalFooter as uo } from "./components/modal/modalFooter/index.js";
|
|
34
|
+
import { ModalHeader as so } from "./components/modal/modalHeader/index.js";
|
|
35
|
+
import { MultiSelect as Co } from "./components/multiSelect/index.js";
|
|
36
|
+
import { Pagination as bo } from "./components/pagination/index.js";
|
|
37
|
+
import { PhoneInput as Fo } from "./components/phoneInput/index.js";
|
|
38
|
+
import { Popover as So } from "./components/popover/index.js";
|
|
39
|
+
import { RadioBox as ho } from "./components/radio/radioBox/index.js";
|
|
40
|
+
import { RadioGroup as Bo } from "./components/radio/radioGroup/index.js";
|
|
41
|
+
import { RichText as wo } from "./components/richText/index.js";
|
|
42
|
+
import { SearchPlaces as Do } from "./components/searchPlaces.js";
|
|
43
|
+
import { Select as ko } from "./components/select/index.js";
|
|
44
|
+
import { Slider as Go } from "./components/slider/index.js";
|
|
45
|
+
import { Switch as Lo } from "./components/switch/index.js";
|
|
46
|
+
import { TabButton as Eo } from "./components/tab/tabButton/index.js";
|
|
47
|
+
import { TabContainer as Wo } from "./components/tab/tabContainer/index.js";
|
|
48
|
+
import { TableBody as qo } from "./components/table/tableBody/index.js";
|
|
49
|
+
import { TableCaption as Jo } from "./components/table/tableCaption/index.js";
|
|
50
|
+
import { TableContainer as No } from "./components/table/tableContainer/index.js";
|
|
51
|
+
import { TableFooter as Xo } from "./components/table/tableFooter/index.js";
|
|
52
|
+
import { TableHeader as Zo } from "./components/table/tableHeader/index.js";
|
|
53
|
+
import { Textarea as $o } from "./components/textarea/index.js";
|
|
54
|
+
import { Tooltip as rr } from "./components/tooltip/index.js";
|
|
55
|
+
import { useAutomation as tr } from "./hooks/useAutomation.js";
|
|
56
|
+
import { useDrawer as mr } from "./hooks/useDrawer.js";
|
|
57
|
+
import { useForm as fr } from "./hooks/useForm.js";
|
|
58
|
+
import { useHydrated as lr } from "./hooks/useHydrated.js";
|
|
59
|
+
import { useModal as nr } from "./hooks/useModal.js";
|
|
60
|
+
import { useScopedParams as ur } from "./hooks/useScopedParams.js";
|
|
61
|
+
import { useScrollLock as sr } from "./hooks/useScrollLock.js";
|
|
62
|
+
import { useSearchAutomation as Cr } from "./hooks/useSearchAutomation.js";
|
|
63
|
+
import { useSlider as br } from "./hooks/useSlider.js";
|
|
64
|
+
import { useToast as Fr } from "./hooks/useToast.js";
|
|
65
|
+
import { DrawerProvider as Sr } from "./providers/drawerProvider.js";
|
|
66
|
+
import { FormProvider as hr } from "./providers/formProvider.js";
|
|
67
|
+
import { ModalProvider as Br } from "./providers/modalProvider.js";
|
|
68
|
+
import { PlacesProvider as wr } from "./providers/placesProvider.js";
|
|
69
|
+
import { ToastProvider as Dr } from "./providers/toastProvider.js";
|
|
70
|
+
import { toHtml as kr } from "./services/toHtml.js";
|
|
71
|
+
import { toRichTextValue as Gr } from "./services/toRichTextValue.js";
|
|
72
|
+
export {
|
|
73
|
+
e as AlertContainer,
|
|
74
|
+
p as AlertContent,
|
|
75
|
+
x as AlertDescription,
|
|
76
|
+
a as AlertIcon,
|
|
77
|
+
i as AlertTitle,
|
|
78
|
+
d as AudioPlayer,
|
|
79
|
+
c as AudioUpload,
|
|
80
|
+
T as Badge,
|
|
81
|
+
P as Button,
|
|
82
|
+
A as Calendar,
|
|
83
|
+
M as CardTabButton,
|
|
84
|
+
g as CardTabContainer,
|
|
85
|
+
v as Checkbox,
|
|
86
|
+
I as ClientOnly,
|
|
87
|
+
y as CurrencyInput,
|
|
88
|
+
H as Divider,
|
|
89
|
+
R as DrawerContainer,
|
|
90
|
+
U as DrawerHeader,
|
|
91
|
+
Sr as DrawerProvider,
|
|
92
|
+
V as FacebookPixel,
|
|
93
|
+
O as FieldError,
|
|
94
|
+
j as FieldLabel,
|
|
95
|
+
z as FieldWrapper,
|
|
96
|
+
K as FileUpload,
|
|
97
|
+
hr as FormProvider,
|
|
98
|
+
Q as FullCalendar,
|
|
99
|
+
Y as GoogleAnalytics,
|
|
100
|
+
_ as GoogleTagManager,
|
|
101
|
+
oo as IconButton,
|
|
102
|
+
eo as ImageUpload,
|
|
103
|
+
po as Input,
|
|
104
|
+
xo as MapView,
|
|
105
|
+
ao as MaskedInput,
|
|
106
|
+
io as ModalContainer,
|
|
107
|
+
uo as ModalFooter,
|
|
108
|
+
so as ModalHeader,
|
|
109
|
+
Br as ModalProvider,
|
|
110
|
+
Co as MultiSelect,
|
|
111
|
+
bo as Pagination,
|
|
112
|
+
Fo as PhoneInput,
|
|
113
|
+
wr as PlacesProvider,
|
|
114
|
+
So as Popover,
|
|
115
|
+
ho as RadioBox,
|
|
116
|
+
Bo as RadioGroup,
|
|
117
|
+
wo as RichText,
|
|
118
|
+
Do as SearchPlaces,
|
|
119
|
+
ko as Select,
|
|
120
|
+
Go as Slider,
|
|
121
|
+
Lo as Switch,
|
|
122
|
+
Eo as TabButton,
|
|
123
|
+
Wo as TabContainer,
|
|
124
|
+
qo as TableBody,
|
|
125
|
+
Jo as TableCaption,
|
|
126
|
+
No as TableContainer,
|
|
127
|
+
Xo as TableFooter,
|
|
128
|
+
Zo as TableHeader,
|
|
129
|
+
$o as Textarea,
|
|
130
|
+
Dr as ToastProvider,
|
|
131
|
+
rr as Tooltip,
|
|
132
|
+
kr as toHtml,
|
|
133
|
+
Gr as toRichTextValue,
|
|
134
|
+
tr as useAutomation,
|
|
135
|
+
mr as useDrawer,
|
|
136
|
+
fr as useForm,
|
|
137
|
+
lr as useHydrated,
|
|
138
|
+
nr as useModal,
|
|
139
|
+
ur as useScopedParams,
|
|
140
|
+
sr as useScrollLock,
|
|
141
|
+
Cr as useSearchAutomation,
|
|
142
|
+
br as useSlider,
|
|
143
|
+
Fr as useToast
|
|
144
|
+
};
|