@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,101 +1,106 @@
|
|
|
1
|
-
import { formatToCapitalizeFirstWordLetter as
|
|
2
|
-
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
1
|
+
import { formatToCapitalizeFirstWordLetter as M } from "@arkyn/shared";
|
|
2
|
+
class p {
|
|
3
|
+
capitalize(n) {
|
|
4
|
+
return M(n);
|
|
5
|
+
}
|
|
6
|
+
listHours(n) {
|
|
7
|
+
const [e, t] = n, s = [];
|
|
8
|
+
for (let a = e * 60; a <= t * 60; a += 30)
|
|
9
|
+
s.push(a);
|
|
10
|
+
return s;
|
|
11
|
+
}
|
|
12
|
+
formatHourLabel(n) {
|
|
13
|
+
const e = Math.floor(n / 60), t = n % 60;
|
|
14
|
+
return `${String(e).padStart(2, "0")}:${String(t).padStart(2, "0")}`;
|
|
15
|
+
}
|
|
16
|
+
getStartOfWeek(n) {
|
|
17
|
+
const e = new Date(n);
|
|
18
|
+
return e.setHours(0, 0, 0, 0), e.setDate(e.getDate() - e.getDay()), e;
|
|
19
|
+
}
|
|
20
|
+
listWeek(n, e) {
|
|
21
|
+
const t = [], s = this.getStartOfWeek(n);
|
|
22
|
+
for (let a = 0; a < 7; a++) {
|
|
23
|
+
const i = new Date(s);
|
|
24
|
+
i.setDate(s.getDate() + a);
|
|
25
|
+
const D = i.toLocaleDateString(e, {
|
|
26
|
+
weekday: "short"
|
|
27
|
+
});
|
|
28
|
+
t.push(D);
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
}
|
|
32
|
+
listWeeklyMatrix(n, e) {
|
|
33
|
+
const t = this.getStartOfWeek(n), s = n.getMonth();
|
|
34
|
+
return e.map((a) => Array.from({ length: 7 }, (i, D) => {
|
|
35
|
+
const r = new Date(t);
|
|
36
|
+
r.setDate(t.getDate() + D);
|
|
37
|
+
let o = "current";
|
|
38
|
+
return (r.getMonth() < s || r.getFullYear() < n.getFullYear()) && (o = "previous"), (r.getMonth() > s || r.getFullYear() > n.getFullYear()) && (o = "next"), {
|
|
39
|
+
day: r.getDate(),
|
|
40
|
+
month: r.getMonth(),
|
|
41
|
+
year: r.getFullYear(),
|
|
42
|
+
dayOwner: o,
|
|
43
|
+
timeInMinutes: a
|
|
44
|
+
};
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
listMonthlyMatrix(n) {
|
|
48
|
+
const e = n.getFullYear(), t = n.getMonth(), a = new Date(e, t, 1).getDay(), i = new Date(e, t + 1, 0).getDate(), D = new Date(e, t, 0).getDate(), r = Math.ceil((a + i) / 7) * 7, o = [];
|
|
49
|
+
let u = 1, g = 1;
|
|
50
|
+
for (let l = 0; l < r; l++) {
|
|
51
|
+
const c = Math.floor(l / 7);
|
|
52
|
+
if (o[c] || (o[c] = []), l < a) {
|
|
53
|
+
const h = D - (a - l - 1), y = t === 0 ? 11 : t - 1, f = t === 0 ? e - 1 : e;
|
|
54
|
+
o[c].push({
|
|
55
|
+
day: h,
|
|
56
|
+
month: y,
|
|
57
|
+
year: f,
|
|
58
|
+
dayOwner: "previous"
|
|
59
|
+
});
|
|
60
|
+
} else if (u <= i)
|
|
61
|
+
o[c].push({
|
|
62
|
+
day: u,
|
|
63
|
+
month: t,
|
|
64
|
+
year: e,
|
|
65
|
+
dayOwner: "current"
|
|
66
|
+
}), u++;
|
|
67
|
+
else {
|
|
68
|
+
const h = t === 11 ? 0 : t + 1, y = t === 11 ? e + 1 : e;
|
|
69
|
+
o[c].push({
|
|
70
|
+
day: g,
|
|
71
|
+
month: h,
|
|
72
|
+
year: y,
|
|
73
|
+
dayOwner: "next"
|
|
74
|
+
}), g++;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return o;
|
|
78
|
+
}
|
|
79
|
+
nextMonth(n, e) {
|
|
80
|
+
const t = new Date(n);
|
|
81
|
+
t.setMonth(t.getMonth() + 1), e(t);
|
|
82
|
+
}
|
|
83
|
+
nextWeek(n, e) {
|
|
84
|
+
const t = new Date(n);
|
|
85
|
+
t.setDate(t.getDate() + 7), e(t);
|
|
86
|
+
}
|
|
87
|
+
nextDay(n, e) {
|
|
88
|
+
const t = new Date(n);
|
|
89
|
+
t.setDate(t.getDate() + 1), e(t);
|
|
90
|
+
}
|
|
91
|
+
previousMonth(n, e) {
|
|
92
|
+
const t = new Date(n);
|
|
93
|
+
t.setMonth(t.getMonth() - 1), e(t);
|
|
94
|
+
}
|
|
95
|
+
previousWeek(n, e) {
|
|
96
|
+
const t = new Date(n);
|
|
97
|
+
t.setDate(t.getDate() - 7), e(t);
|
|
98
|
+
}
|
|
99
|
+
previousDay(n, e) {
|
|
100
|
+
const t = new Date(n);
|
|
101
|
+
t.setDate(t.getDate() - 1), e(t);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
p as ViewService
|
|
99
106
|
};
|
|
100
|
-
//#endregion
|
|
101
|
-
export { t as ViewService };
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return /* @__PURE__ */ e("div", {
|
|
6
|
-
className: "arkynDayCalendarContainer",
|
|
7
|
-
children: t
|
|
8
|
-
});
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
function o({ children: a }) {
|
|
4
|
+
return /* @__PURE__ */ r("div", { className: "arkynDayCalendarContainer", children: a });
|
|
9
5
|
}
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export {
|
|
7
|
+
o as DayCalendarContainer
|
|
8
|
+
};
|
|
@@ -1,71 +1,79 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
1
|
+
import { jsx as p, Fragment as F, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { useFullCalendar as H } from "../../_fullCalendarProvider.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
const u = 30, k = 205;
|
|
5
|
+
function _(c) {
|
|
6
|
+
const { events: E, viewDate: l } = H(), d = l.getDate(), g = l.getMonth(), f = l.getFullYear(), M = E.map((t, n) => ({ event: t, sourceIndex: n })).filter(({ event: t }) => t.initialDate.getDate() === d && t.initialDate.getMonth() === g && t.initialDate.getFullYear() === f).sort((t, n) => {
|
|
7
|
+
var o, a;
|
|
8
|
+
const e = t.event.initialDate.getTime(), i = n.event.initialDate.getTime();
|
|
9
|
+
if (e !== i) return e - i;
|
|
10
|
+
const s = ((o = t.event.endDate) == null ? void 0 : o.getTime()) ?? e + u * 6e4, r = ((a = n.event.endDate) == null ? void 0 : a.getTime()) ?? i + u * 6e4;
|
|
11
|
+
return s !== r ? s - r : t.sourceIndex - n.sourceIndex;
|
|
12
|
+
}), I = new Map(
|
|
13
|
+
M.map((t, n) => [t.sourceIndex, n])
|
|
14
|
+
), D = M.filter(({ event: t }) => {
|
|
15
|
+
const n = Math.floor(c.timeInMinutes / 60), e = c.timeInMinutes % 60;
|
|
16
|
+
function i() {
|
|
17
|
+
const s = t.initialDate.getHours(), r = t.initialDate.getMinutes();
|
|
18
|
+
if (s !== n) return !1;
|
|
19
|
+
if (e === 0) return r < 30 && r >= 0;
|
|
20
|
+
if (e === 30) return r >= 30 && r < 60;
|
|
21
|
+
}
|
|
22
|
+
return i() && t.initialDate.getDate() === d && t.initialDate.getMonth() === g && t.initialDate.getFullYear() === f;
|
|
23
|
+
});
|
|
24
|
+
if (D.length === 0) return /* @__PURE__ */ p(F, {});
|
|
25
|
+
function x(t, n) {
|
|
26
|
+
return `${d}-${g}-${f}-${n}-${t}`;
|
|
27
|
+
}
|
|
28
|
+
function h(t) {
|
|
29
|
+
const n = t.getHours(), e = t.getMinutes();
|
|
30
|
+
return e === 0 ? `${n}h` : `${n}h${e}`;
|
|
31
|
+
}
|
|
32
|
+
function m(t) {
|
|
33
|
+
const n = t.initialDate.getHours() * 60 + t.initialDate.getMinutes(), e = t.endDate ? t.endDate.getHours() * 60 + t.endDate.getMinutes() : n + u;
|
|
34
|
+
return {
|
|
35
|
+
startMinutes: n,
|
|
36
|
+
endMinutes: Math.max(e, n + 1)
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function O(t, n) {
|
|
40
|
+
const e = m(t), i = I.get(n);
|
|
41
|
+
return i == null ? 0 : M.reduce((s, r, o) => {
|
|
42
|
+
if (o >= i) return s;
|
|
43
|
+
const a = m(r.event);
|
|
44
|
+
return a.startMinutes < e.endMinutes && a.endMinutes > e.startMinutes ? s + 1 : s;
|
|
45
|
+
}, 0);
|
|
46
|
+
}
|
|
47
|
+
function T(t, n) {
|
|
48
|
+
const { startMinutes: e, endMinutes: i } = m(t), s = e - c.timeInMinutes, r = Math.max(i - e, 1), o = s / u * 100, a = r / u * 100, $ = O(t, n) * k;
|
|
49
|
+
return {
|
|
50
|
+
top: `${o}%`,
|
|
51
|
+
height: `${a}%`,
|
|
52
|
+
left: `${$}px`
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function C(t, n) {
|
|
56
|
+
var e;
|
|
57
|
+
t.stopPropagation(), (e = n.onClick) == null || e.call(n, n.data);
|
|
58
|
+
}
|
|
59
|
+
return D.map(({ event: t, sourceIndex: n }, e) => /* @__PURE__ */ y(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: `arkynDayCalendarEvent ${(t == null ? void 0 : t.scheme) || "primary"}`,
|
|
63
|
+
style: T(t, n),
|
|
64
|
+
onClick: (i) => C(i, t),
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ y("strong", { children: [
|
|
67
|
+
h(t.initialDate),
|
|
68
|
+
" ",
|
|
69
|
+
(t == null ? void 0 : t.endDate) && `- ${h(t.endDate)}`
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ p("p", { children: t.title })
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
x(e, n)
|
|
75
|
+
));
|
|
69
76
|
}
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
export {
|
|
78
|
+
_ as DayCalendarEvent
|
|
79
|
+
};
|
|
@@ -1,29 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useFullCalendar as
|
|
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
|
-
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useFullCalendar as f } from "../../_fullCalendarProvider.js";
|
|
3
|
+
import { ViewService as p } from "../../_viewService.js";
|
|
4
|
+
import { DayCalendarEvent as C } from "../dayCalendarEvent/index.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
function y({ hour: l, timeInMinutes: a }) {
|
|
7
|
+
const c = new p(), { blockedTimestamps: d, viewDate: o, onClickDate: n } = f();
|
|
8
|
+
function t() {
|
|
9
|
+
return d.some(
|
|
10
|
+
(e) => o >= e.initialDate && o <= e.endDate
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
function s(e) {
|
|
14
|
+
if (e.stopPropagation(), !t() && n) {
|
|
15
|
+
const i = new Date(o);
|
|
16
|
+
i.setHours(0, a, 0, 0), n(i);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return /* @__PURE__ */ m(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: `arkynDayCalendarRow ${t() ? "blocked" : ""}`,
|
|
23
|
+
"data-time": a,
|
|
24
|
+
onClick: s,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ r("p", { children: c.formatHourLabel(l) }),
|
|
27
|
+
/* @__PURE__ */ r("div", { className: "arkynDayCalendarRowContent", children: /* @__PURE__ */ r(C, { timeInMinutes: a }) })
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
);
|
|
27
31
|
}
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
export {
|
|
33
|
+
y as DayCalendarRow
|
|
34
|
+
};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useFullCalendar as o } from "../_fullCalendarProvider.js";
|
|
2
3
|
import { DayCalendarContainer as t } from "./dayCalendarContainer/index.js";
|
|
3
|
-
import { DayCalendarRow as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
let { listHours: i } = e();
|
|
8
|
-
return /* @__PURE__ */ r(t, { children: i.map((e) => /* @__PURE__ */ r(n, {
|
|
9
|
-
hour: e,
|
|
10
|
-
timeInMinutes: e
|
|
11
|
-
})) });
|
|
4
|
+
import { DayCalendarRow as e } from "./dayCalendarRow/index.js";
|
|
5
|
+
function s() {
|
|
6
|
+
const { listHours: n } = o();
|
|
7
|
+
return /* @__PURE__ */ a(t, { children: n.map((r) => /* @__PURE__ */ a(e, { hour: r, timeInMinutes: r })) });
|
|
12
8
|
}
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
export {
|
|
10
|
+
s as DayCalendar
|
|
11
|
+
};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return /* @__PURE__ */ e("div", {
|
|
6
|
-
className: "arkynFullCalendarContainer",
|
|
7
|
-
children: t
|
|
8
|
-
});
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
function l({ children: r }) {
|
|
4
|
+
return /* @__PURE__ */ n("div", { className: "arkynFullCalendarContainer", children: r });
|
|
9
5
|
}
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export {
|
|
7
|
+
l as FullCalendarContainer
|
|
8
|
+
};
|
|
@@ -1,69 +1,72 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft as s, ChevronRight as h } from "lucide-react";
|
|
2
3
|
import { CardTabButton as t } from "../../cardTab/cardTabButton/index.js";
|
|
3
|
-
import { CardTabContainer as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
4
|
+
import { CardTabContainer as m } from "../../cardTab/cardTabContainer/index.js";
|
|
5
|
+
import { IconButton as i } from "../../iconButton/index.js";
|
|
6
|
+
import { useFullCalendar as p } from "../_fullCalendarProvider.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
function g(o) {
|
|
9
|
+
const { setViewType: l, viewType: a } = o, e = p();
|
|
10
|
+
function u() {
|
|
11
|
+
switch (a) {
|
|
12
|
+
case "day":
|
|
13
|
+
return e.previousDay();
|
|
14
|
+
case "week":
|
|
15
|
+
return e.previousWeek();
|
|
16
|
+
case "month":
|
|
17
|
+
return e.previousMonth();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function c() {
|
|
21
|
+
switch (a) {
|
|
22
|
+
case "day":
|
|
23
|
+
return e.nextDay();
|
|
24
|
+
case "week":
|
|
25
|
+
return e.nextWeek();
|
|
26
|
+
case "month":
|
|
27
|
+
return e.nextMonth();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return /* @__PURE__ */ r("div", { className: "arkynFullCalendarHeader", children: [
|
|
31
|
+
/* @__PURE__ */ r(
|
|
32
|
+
m,
|
|
33
|
+
{
|
|
34
|
+
defaultValue: a,
|
|
35
|
+
onChange: (d) => l(d),
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ n(t, { value: "day", children: "Dia" }),
|
|
38
|
+
/* @__PURE__ */ n(t, { value: "week", children: "Semana" }),
|
|
39
|
+
/* @__PURE__ */ n(t, { value: "month", children: "Mês" })
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ r("div", { className: "arkynFullCalendarHeaderActions", children: [
|
|
44
|
+
/* @__PURE__ */ n(
|
|
45
|
+
i,
|
|
46
|
+
{
|
|
47
|
+
variant: "outline",
|
|
48
|
+
icon: s,
|
|
49
|
+
"aria-label": "Handle previous",
|
|
50
|
+
onClick: () => u()
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ n("p", { children: e.viewDate.toLocaleDateString("pt-BR", {
|
|
54
|
+
day: "2-digit",
|
|
55
|
+
month: "long",
|
|
56
|
+
year: "numeric"
|
|
57
|
+
}) }),
|
|
58
|
+
/* @__PURE__ */ n(
|
|
59
|
+
i,
|
|
60
|
+
{
|
|
61
|
+
variant: "outline",
|
|
62
|
+
icon: h,
|
|
63
|
+
"aria-label": "Handle next",
|
|
64
|
+
onClick: () => c()
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] })
|
|
68
|
+
] });
|
|
67
69
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
export {
|
|
71
|
+
g as FullCalendarHeader
|
|
72
|
+
};
|