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