@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,40 +1,35 @@
|
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
) })
|
|
35
|
-
}
|
|
36
|
-
);
|
|
1
|
+
import { useFullCalendar as e } from "../../_fullCalendarProvider.js";
|
|
2
|
+
import { WeekCalendarEvent as t } from "../weekCalendarEvent/index.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.tsx
|
|
6
|
+
function r(r) {
|
|
7
|
+
let { day: i, month: a, year: o, dayOwner: s, timeInMinutes: c } = r, { blockedTimestamps: l, onClickDate: u } = e();
|
|
8
|
+
function d() {
|
|
9
|
+
let e = new Date(o, a, i);
|
|
10
|
+
return l.some((t) => e >= t.initialDate && e <= t.endDate);
|
|
11
|
+
}
|
|
12
|
+
function f(e) {
|
|
13
|
+
if (e.stopPropagation(), !d() && u) {
|
|
14
|
+
let e = new Date(o, a, i);
|
|
15
|
+
e.setHours(0, c, 0, 0), u(e);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return /* @__PURE__ */ n("td", {
|
|
19
|
+
className: `arkynWeekCalendarTableTd ${s} ${d() ? "blocked" : ""}`,
|
|
20
|
+
"data-day": i,
|
|
21
|
+
"data-time": c,
|
|
22
|
+
onClick: f,
|
|
23
|
+
children: /* @__PURE__ */ n("div", {
|
|
24
|
+
className: "arkynWeekCalendarTableTdContent",
|
|
25
|
+
children: /* @__PURE__ */ n(t, {
|
|
26
|
+
day: i,
|
|
27
|
+
month: a,
|
|
28
|
+
year: o,
|
|
29
|
+
timeInMinutes: c
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
});
|
|
37
33
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
34
|
+
//#endregion
|
|
35
|
+
export { r as WeekCalendarTableTd };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { GoogleAnalytics as e } from "./googleAnalytics.js";
|
|
2
|
+
import { Fragment as t, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/googleAnalytics/googleAnalytics.client.tsx
|
|
4
|
+
function r(r) {
|
|
5
|
+
return new e().initialize(r), /* @__PURE__ */ n(t, {});
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { r as GoogleAnalyticsClient };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { generateGAElements as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
a as GoogleAnalytics
|
|
1
|
+
import { generateGAElements as e } from "./snippets/generateGAElements.js";
|
|
2
|
+
//#region src/components/googleAnalytics/googleAnalytics.tsx
|
|
3
|
+
var t = class {
|
|
4
|
+
initializeAsyncScript(e) {
|
|
5
|
+
let t = document.createElement("script");
|
|
6
|
+
return t.async = !0, t.src = e, t;
|
|
7
|
+
}
|
|
8
|
+
initializeInlineScript(e) {
|
|
9
|
+
let t = document.createElement("script");
|
|
10
|
+
return t.innerHTML = e, t;
|
|
11
|
+
}
|
|
12
|
+
initialize(t) {
|
|
13
|
+
let { measurementId: n } = t, r = e({ measurementId: n }), i = this.initializeAsyncScript(r.src), a = this.initializeInlineScript(r.script);
|
|
14
|
+
document.head.appendChild(i), document.head.appendChild(a);
|
|
15
|
+
}
|
|
18
16
|
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { t as GoogleAnalytics };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ClientOnly as e } from "../clientOnly.js";
|
|
2
|
+
import { GoogleAnalyticsClient as t } from "./googleAnalytics.client.js";
|
|
3
|
+
import { Fragment as n, jsx as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/googleAnalytics/index.tsx
|
|
5
|
+
function i(i) {
|
|
6
|
+
let { measurementId: a, showInDevMode: o = !1 } = i;
|
|
7
|
+
return process.env.NODE_ENV !== "production" && !o ? /* @__PURE__ */ r(n, {}) : /* @__PURE__ */ r(e, { children: () => /* @__PURE__ */ r(t, { measurementId: a }) });
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { i as GoogleAnalytics };
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//#region src/components/googleAnalytics/snippets/generateGAElements.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let { measurementId: t } = e;
|
|
4
|
+
return t || console.warn("Google Analytics Measurement ID is required"), {
|
|
5
|
+
src: `https://www.googletagmanager.com/gtag/js?id=${t}`,
|
|
6
|
+
script: `
|
|
5
7
|
window.dataLayer = window.dataLayer || [];
|
|
6
8
|
function gtag(){dataLayer.push(arguments);}
|
|
7
9
|
gtag('js', new Date());
|
|
8
|
-
gtag('config', '${
|
|
9
|
-
|
|
10
|
-
src: a,
|
|
11
|
-
script: n
|
|
12
|
-
};
|
|
10
|
+
gtag('config', '${t}');`
|
|
11
|
+
};
|
|
13
12
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as generateGAElements };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as o, Fragment as a } from "react/jsx-runtime";
|
|
2
1
|
import { GoogleTagManager as e } from "./googleTagManager.js";
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { Fragment as t, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/googleTagManager/googleTagManager.client.tsx
|
|
4
|
+
function r(r) {
|
|
5
|
+
return new e().initialize(r), /* @__PURE__ */ n(t, {});
|
|
5
6
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { r as GoogleTagManagerClient };
|
|
@@ -1,49 +1,45 @@
|
|
|
1
|
-
import { appendToDataLayer as
|
|
2
|
-
import { generateGTMElements as
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
});
|
|
44
|
-
n && document.head.appendChild(o.dataScript), document.head.insertBefore(o.script(), document.head.childNodes[0]), document.body.insertBefore(o.noScript(), document.body.childNodes[0]);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
export {
|
|
48
|
-
u as GoogleTagManager
|
|
1
|
+
import { appendToDataLayer as e } from "./snippets/appendToDataLayer.js";
|
|
2
|
+
import { generateGTMElements as t } from "./snippets/generateGTMElements.js";
|
|
3
|
+
//#region src/components/googleTagManager/googleTagManager.tsx
|
|
4
|
+
var n = class {
|
|
5
|
+
initializeDataScript(e) {
|
|
6
|
+
let t = document.createElement("script");
|
|
7
|
+
return t.innerHTML = e, t;
|
|
8
|
+
}
|
|
9
|
+
initializeGTMElements(e) {
|
|
10
|
+
let n = t(e);
|
|
11
|
+
return {
|
|
12
|
+
noScript: () => {
|
|
13
|
+
let e = document.createElement("noscript");
|
|
14
|
+
return e.innerHTML = n.iframe, e;
|
|
15
|
+
},
|
|
16
|
+
script: () => {
|
|
17
|
+
let e = document.createElement("script");
|
|
18
|
+
return e.innerHTML = n.script, e;
|
|
19
|
+
},
|
|
20
|
+
dataScript: this.initializeDataScript(n.dataLayerVar)
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
initializeDataLayer(t) {
|
|
24
|
+
let { dataLayer: n, dataLayerName: r } = t;
|
|
25
|
+
if (window[r]) return window[r].push(n);
|
|
26
|
+
let i = e({
|
|
27
|
+
dataLayer: n,
|
|
28
|
+
dataLayerName: r
|
|
29
|
+
}), a = this.initializeDataScript(i);
|
|
30
|
+
document.head.insertBefore(a, document.head.childNodes[0]);
|
|
31
|
+
}
|
|
32
|
+
initialize(e) {
|
|
33
|
+
let { events: t, gtmId: n, dataLayer: r, auth: i = "", preview: a = "", dataLayerName: o = "dataLayer" } = e, s = this.initializeGTMElements({
|
|
34
|
+
id: n,
|
|
35
|
+
events: t,
|
|
36
|
+
dataLayer: r || void 0,
|
|
37
|
+
dataLayerName: o,
|
|
38
|
+
auth: i,
|
|
39
|
+
preview: a
|
|
40
|
+
});
|
|
41
|
+
r && document.head.appendChild(s.dataScript), document.head.insertBefore(s.script(), document.head.childNodes[0]), document.body.insertBefore(s.noScript(), document.body.childNodes[0]);
|
|
42
|
+
}
|
|
49
43
|
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { n as GoogleTagManager };
|
|
@@ -1,28 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
p,
|
|
16
|
-
{
|
|
17
|
-
auth: o,
|
|
18
|
-
dataLayer: m,
|
|
19
|
-
dataLayerName: n,
|
|
20
|
-
events: i,
|
|
21
|
-
gtmId: a,
|
|
22
|
-
preview: t
|
|
23
|
-
}
|
|
24
|
-
) });
|
|
1
|
+
import { ClientOnly as e } from "../clientOnly.js";
|
|
2
|
+
import { GoogleTagManagerClient as t } from "./googleTagManager.client.js";
|
|
3
|
+
import { Fragment as n, jsx as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/googleTagManager/index.tsx
|
|
5
|
+
function i(i) {
|
|
6
|
+
let { gtmId: a, auth: o = "", preview: s = "", dataLayerName: c = "dataLayer", events: l = {}, dataLayer: u = {}, showInDevMode: d = !1 } = i;
|
|
7
|
+
return process.env.NODE_ENV !== "production" && !d ? /* @__PURE__ */ r(n, {}) : /* @__PURE__ */ r(e, { children: () => /* @__PURE__ */ r(t, {
|
|
8
|
+
auth: o,
|
|
9
|
+
dataLayer: u,
|
|
10
|
+
dataLayerName: c,
|
|
11
|
+
events: l,
|
|
12
|
+
gtmId: a,
|
|
13
|
+
preview: s
|
|
14
|
+
}) });
|
|
25
15
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { i as GoogleTagManager };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
window.${
|
|
1
|
+
//#region src/components/googleTagManager/snippets/appendToDataLayer.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let { dataLayer: t, dataLayerName: n } = e;
|
|
4
|
+
return `
|
|
5
|
+
window.${n} = window.${n} || [];
|
|
6
|
+
window.${n}.push(${JSON.stringify(t)})`;
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as appendToDataLayer };
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { appendToDataLayer as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { appendToDataLayer as e } from "./appendToDataLayer.js";
|
|
2
|
+
//#region src/components/googleTagManager/snippets/generateGTMElements.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
let { id: n, events: r, dataLayer: i, dataLayerName: a, preview: o, auth: s } = t, c = `>m_auth=${s}`, l = `>m_preview=${o}`;
|
|
5
|
+
return n || console.warn("GTM Id is required"), {
|
|
6
|
+
iframe: `
|
|
7
|
+
<iframe src="https://www.googletagmanager.com/ns.html?id=${n}${c}${l}>m_cookies_win=x"
|
|
8
|
+
height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>`,
|
|
9
|
+
script: `
|
|
8
10
|
(function(w,d,s,l,i){w[l]=w[l]||[];
|
|
9
|
-
w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', ${JSON.stringify(
|
|
10
|
-
r
|
|
11
|
-
).slice(1, -1)}});
|
|
11
|
+
w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', ${JSON.stringify(r).slice(1, -1)}});
|
|
12
12
|
var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
|
|
13
|
-
j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'${
|
|
13
|
+
j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'${c}${l}>m_cookies_win=x';
|
|
14
14
|
f.parentNode.insertBefore(j,f);
|
|
15
|
-
})(window,document,'script','${
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
})(window,document,'script','${a}','${n}');`,
|
|
16
|
+
dataLayerVar: e({
|
|
17
|
+
dataLayer: i,
|
|
18
|
+
dataLayerName: a
|
|
19
|
+
})
|
|
20
|
+
};
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { t as generateGTMElements };
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
|
|
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
|
+
/* empty css */
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
import { Loader2 as n } from "lucide-react";
|
|
4
|
+
//#region src/components/iconButton/index.tsx
|
|
5
|
+
function r(r) {
|
|
6
|
+
let { isLoading: i = !1, scheme: a = "primary", variant: o = "solid", size: s = "md", icon: c, disabled: l, className: u = "", ...d } = r, f = {
|
|
7
|
+
xs: 12,
|
|
8
|
+
sm: 16,
|
|
9
|
+
md: 20,
|
|
10
|
+
lg: 24
|
|
11
|
+
}, p = `arkynIconButton ${o} ${a} ${s} ${i ? "loadingTrue" : "loadingFalse"} ${u}`;
|
|
12
|
+
return /* @__PURE__ */ t("button", {
|
|
13
|
+
disabled: l || i,
|
|
14
|
+
className: p.trim(),
|
|
15
|
+
...d,
|
|
16
|
+
children: [/* @__PURE__ */ e("div", {
|
|
17
|
+
className: "arkynIconButtonSpinner",
|
|
18
|
+
children: /* @__PURE__ */ e(n, {
|
|
19
|
+
size: f[s],
|
|
20
|
+
strokeWidth: 2.5
|
|
21
|
+
})
|
|
22
|
+
}), /* @__PURE__ */ e("div", {
|
|
23
|
+
className: "arkynIconButtonContent",
|
|
24
|
+
children: /* @__PURE__ */ e(c, {
|
|
25
|
+
size: f[s],
|
|
26
|
+
strokeWidth: 2.5
|
|
27
|
+
})
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
27
30
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { r as IconButton };
|
|
@@ -1,64 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
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
|
-
/* @__PURE__ */ n(
|
|
47
|
-
h,
|
|
48
|
-
{
|
|
49
|
-
isLoading: i,
|
|
50
|
-
onClick: u,
|
|
51
|
-
variant: "outline",
|
|
52
|
-
size: "sm",
|
|
53
|
-
type: "button",
|
|
54
|
-
disabled: t,
|
|
55
|
-
children: s
|
|
56
|
-
}
|
|
57
|
-
)
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
);
|
|
1
|
+
import { Button as e } from "../../button/index.js";
|
|
2
|
+
import { IconButton as t } from "../../iconButton/index.js";
|
|
3
|
+
import { Tooltip as n } from "../../tooltip/index.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import { RefreshCw as a } from "lucide-react";
|
|
7
|
+
//#region src/components/imageUpload/hasFileContent/index.tsx
|
|
8
|
+
function o(o) {
|
|
9
|
+
let { disabled: s, filePath: c, isLoading: l, acceptImage: u, changeImageButtonText: d, handleSelectFile: f, reSendImage: p } = o;
|
|
10
|
+
function m() {
|
|
11
|
+
if (s) return;
|
|
12
|
+
let e = document.createElement("input");
|
|
13
|
+
e.type = "file", e.accept = u, e.onchange = (e) => {
|
|
14
|
+
let t = e.target.files?.[0];
|
|
15
|
+
t && f(t);
|
|
16
|
+
}, e.click();
|
|
17
|
+
}
|
|
18
|
+
return /* @__PURE__ */ i("div", {
|
|
19
|
+
className: "arkynImageUploadHasFileContent",
|
|
20
|
+
style: { backgroundImage: `url("${c}")` },
|
|
21
|
+
children: [p && /* @__PURE__ */ r(n, {
|
|
22
|
+
orientation: "bottom",
|
|
23
|
+
text: "Reenviar imagem",
|
|
24
|
+
children: /* @__PURE__ */ r(t, {
|
|
25
|
+
type: "button",
|
|
26
|
+
"aria-label": "resend image",
|
|
27
|
+
variant: "outline",
|
|
28
|
+
scheme: "danger",
|
|
29
|
+
size: "sm",
|
|
30
|
+
isLoading: l,
|
|
31
|
+
onClick: p,
|
|
32
|
+
icon: a,
|
|
33
|
+
disabled: s
|
|
34
|
+
})
|
|
35
|
+
}), /* @__PURE__ */ r(e, {
|
|
36
|
+
isLoading: l,
|
|
37
|
+
onClick: m,
|
|
38
|
+
variant: "outline",
|
|
39
|
+
size: "sm",
|
|
40
|
+
type: "button",
|
|
41
|
+
disabled: s,
|
|
42
|
+
children: d
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
61
45
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { o as HasFileContent };
|