@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.
Files changed (178) hide show
  1. package/dist/components/calendar/_viewService.d.ts +1 -1
  2. package/dist/components/fullCalendar/_viewService.d.ts +2 -2
  3. package/dist/hooks/useScopedParams.d.ts +1 -1
  4. package/dist/index.js +4683 -4347
  5. package/dist/modules/components/alert/alertContainer/index.js +20 -25
  6. package/dist/modules/components/alert/alertContent/index.js +8 -11
  7. package/dist/modules/components/alert/alertDescription/index.js +8 -11
  8. package/dist/modules/components/alert/alertIcon/index.js +19 -27
  9. package/dist/modules/components/alert/alertTitle/index.js +8 -11
  10. package/dist/modules/components/audioPlayer/index.js +75 -74
  11. package/dist/modules/components/audioUpload/hasFileContent/index.js +62 -54
  12. package/dist/modules/components/audioUpload/index.js +79 -71
  13. package/dist/modules/components/audioUpload/noFileContent/index.js +45 -35
  14. package/dist/modules/components/badge/index.js +22 -26
  15. package/dist/modules/components/button/index.js +32 -39
  16. package/dist/modules/components/calendar/_calendarProvider.js +63 -38
  17. package/dist/modules/components/calendar/_viewService.js +140 -132
  18. package/dist/modules/components/calendar/calendarContainer/index.js +7 -10
  19. package/dist/modules/components/calendar/calendarHeader/index.js +72 -51
  20. package/dist/modules/components/calendar/calendarTableBody/index.js +10 -12
  21. package/dist/modules/components/calendar/calendarTableContainer/index.js +7 -10
  22. package/dist/modules/components/calendar/calendarTableHeader/index.js +10 -13
  23. package/dist/modules/components/calendar/calendarTableTd/index.js +23 -20
  24. package/dist/modules/components/calendar/index.js +49 -31
  25. package/dist/modules/components/cardTab/cardTabButton/index.js +29 -19
  26. package/dist/modules/components/cardTab/cardTabContainer/index.js +28 -22
  27. package/dist/modules/components/cardTab/cardTabContext.js +11 -13
  28. package/dist/modules/components/checkbox/index.js +64 -37
  29. package/dist/modules/components/clientOnly.js +8 -8
  30. package/dist/modules/components/currencyInput/index.js +138 -110
  31. package/dist/modules/components/divider/index.js +11 -10
  32. package/dist/modules/components/drawer/drawerContainer/index.js +43 -40
  33. package/dist/modules/components/drawer/drawerContext.js +11 -13
  34. package/dist/modules/components/drawer/drawerHeader/index.js +27 -20
  35. package/dist/modules/components/facebookPixel/facebookPixel.client.js +18 -8
  36. package/dist/modules/components/facebookPixel/index.js +8 -8
  37. package/dist/modules/components/facebookPixel/pixel.js +52 -47
  38. package/dist/modules/components/fieldError/index.js +8 -12
  39. package/dist/modules/components/fieldLabel/index.js +12 -11
  40. package/dist/modules/components/fieldWrapper/index.js +13 -12
  41. package/dist/modules/components/fileUpload/hasFileContent/index.js +67 -59
  42. package/dist/modules/components/fileUpload/index.js +72 -65
  43. package/dist/modules/components/fileUpload/noFileContent/index.js +45 -35
  44. package/dist/modules/components/fullCalendar/_fullCalendarProvider.js +46 -33
  45. package/dist/modules/components/fullCalendar/_viewService.js +105 -100
  46. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +7 -10
  47. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +78 -70
  48. package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +33 -28
  49. package/dist/modules/components/fullCalendar/dayCalendar/index.js +9 -12
  50. package/dist/modules/components/fullCalendar/fullCalendarContainer/index.js +7 -10
  51. package/dist/modules/components/fullCalendar/fullCalendarHeader/index.js +70 -67
  52. package/dist/modules/components/fullCalendar/index.js +30 -30
  53. package/dist/modules/components/fullCalendar/monthlyCalendar/index.js +12 -9
  54. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +36 -28
  55. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +9 -11
  56. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +9 -10
  57. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +10 -13
  58. package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +36 -35
  59. package/dist/modules/components/fullCalendar/weekCalendar/index.js +11 -8
  60. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +78 -70
  61. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +20 -17
  62. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +8 -9
  63. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +19 -16
  64. package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +39 -34
  65. package/dist/modules/components/googleAnalytics/googleAnalytics.client.js +7 -7
  66. package/dist/modules/components/googleAnalytics/googleAnalytics.js +17 -17
  67. package/dist/modules/components/googleAnalytics/index.js +9 -9
  68. package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js +12 -10
  69. package/dist/modules/components/googleTagManager/googleTagManager.client.js +6 -6
  70. package/dist/modules/components/googleTagManager/googleTagManager.js +48 -44
  71. package/dist/modules/components/googleTagManager/index.js +27 -16
  72. package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js +8 -8
  73. package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js +20 -19
  74. package/dist/modules/components/iconButton/index.js +29 -31
  75. package/dist/modules/components/imageUpload/hasFileContent/index.js +63 -46
  76. package/dist/modules/components/imageUpload/index.js +82 -65
  77. package/dist/modules/components/imageUpload/noFileContent/index.js +45 -35
  78. package/dist/modules/components/input/index.js +120 -92
  79. package/dist/modules/components/mapView/index.js +31 -27
  80. package/dist/modules/components/mapView/mapView.client.js +51 -49
  81. package/dist/modules/components/maskedInput/index.js +112 -101
  82. package/dist/modules/components/modal/modalContainer/index.js +42 -49
  83. package/dist/modules/components/modal/modalContext.js +11 -13
  84. package/dist/modules/components/modal/modalFooter/index.js +7 -10
  85. package/dist/modules/components/modal/modalHeader/index.js +27 -20
  86. package/dist/modules/components/multiSelect/index.js +154 -115
  87. package/dist/modules/components/multiSelect/multiSelectChevron/index.js +21 -18
  88. package/dist/modules/components/multiSelect/multiSelectContainer/index.js +29 -13
  89. package/dist/modules/components/multiSelect/multiSelectContent/index.js +8 -11
  90. package/dist/modules/components/multiSelect/multiSelectMark/index.js +22 -19
  91. package/dist/modules/components/multiSelect/multiSelectOption/index.js +13 -17
  92. package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js +45 -35
  93. package/dist/modules/components/multiSelect/multiSelectOverlay/index.js +8 -11
  94. package/dist/modules/components/multiSelect/multiSelectSpinner/index.js +16 -13
  95. package/dist/modules/components/pagination/chevronButton/index.js +17 -17
  96. package/dist/modules/components/pagination/currentButton/index.js +7 -11
  97. package/dist/modules/components/pagination/index.js +83 -51
  98. package/dist/modules/components/pagination/pageButton/index.js +8 -12
  99. package/dist/modules/components/pagination/paginationService.js +48 -33
  100. package/dist/modules/components/pagination/spread/index.js +7 -10
  101. package/dist/modules/components/phoneInput/index.js +151 -103
  102. package/dist/modules/components/phoneInput/phoneInputContainer/index.js +19 -12
  103. package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/index.js +8 -11
  104. package/dist/modules/components/phoneInput/phoneInputCountryOption/index.js +15 -23
  105. package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/index.js +43 -33
  106. package/dist/modules/components/phoneInput/phoneInputCountrySelector/index.js +21 -25
  107. package/dist/modules/components/phoneInput/phoneInputMask/index.js +62 -46
  108. package/dist/modules/components/popover/index.js +36 -37
  109. package/dist/modules/components/radio/radioBox/index.js +42 -24
  110. package/dist/modules/components/radio/radioContext.js +18 -20
  111. package/dist/modules/components/radio/radioGroup/index.js +64 -41
  112. package/dist/modules/components/richText/blockButton/index.js +23 -20
  113. package/dist/modules/components/richText/element/index.js +58 -72
  114. package/dist/modules/components/richText/index.js +135 -143
  115. package/dist/modules/components/richText/insertImage/index.js +105 -94
  116. package/dist/modules/components/richText/insertVideo/index.js +97 -85
  117. package/dist/modules/components/richText/leaf/index.js +6 -9
  118. package/dist/modules/components/richText/markButton/index.js +22 -19
  119. package/dist/modules/components/richText/toolbar/index.js +7 -10
  120. package/dist/modules/components/searchPlaces.js +66 -57
  121. package/dist/modules/components/select/index.js +144 -112
  122. package/dist/modules/components/select/selectChevron/index.js +21 -18
  123. package/dist/modules/components/select/selectContainer/index.js +29 -13
  124. package/dist/modules/components/select/selectContent/index.js +8 -11
  125. package/dist/modules/components/select/selectOption/index.js +13 -17
  126. package/dist/modules/components/select/selectOptionsContainer/index.js +45 -35
  127. package/dist/modules/components/select/selectOverlay/index.js +8 -11
  128. package/dist/modules/components/select/selectSpinner/index.js +9 -13
  129. package/dist/modules/components/slider/index.js +41 -34
  130. package/dist/modules/components/switch/index.js +62 -35
  131. package/dist/modules/components/tab/tabButton/index.js +29 -19
  132. package/dist/modules/components/tab/tabContainer/index.js +28 -22
  133. package/dist/modules/components/tab/tabContext.js +10 -12
  134. package/dist/modules/components/table/tableBody/index.js +14 -19
  135. package/dist/modules/components/table/tableCaption/index.js +8 -15
  136. package/dist/modules/components/table/tableContainer/index.js +8 -12
  137. package/dist/modules/components/table/tableFooter/index.js +11 -18
  138. package/dist/modules/components/table/tableHeader/index.js +11 -12
  139. package/dist/modules/components/textarea/index.js +69 -51
  140. package/dist/modules/components/tooltip/index.js +45 -34
  141. package/dist/modules/hooks/useAutomation.js +27 -35
  142. package/dist/modules/hooks/useDrawer.js +19 -17
  143. package/dist/modules/hooks/useForm.js +6 -6
  144. package/dist/modules/hooks/useHydrated.js +12 -7
  145. package/dist/modules/hooks/useModal.js +19 -17
  146. package/dist/modules/hooks/useScopedParams.js +17 -17
  147. package/dist/modules/hooks/useScrollLock.js +19 -19
  148. package/dist/modules/hooks/useSearchAutomation.js +14 -31
  149. package/dist/modules/hooks/useSlider.js +13 -13
  150. package/dist/modules/hooks/useToast.js +9 -8
  151. package/dist/modules/index.js +144 -72
  152. package/dist/modules/providers/drawerProvider.js +30 -35
  153. package/dist/modules/providers/formProvider.js +16 -11
  154. package/dist/modules/providers/modalProvider.js +33 -39
  155. package/dist/modules/providers/placesProvider.js +16 -16
  156. package/dist/modules/providers/toastProvider.js +51 -45
  157. package/dist/modules/services/extractTextFromNode.js +6 -6
  158. package/dist/modules/services/fieldTemplate.js +23 -22
  159. package/dist/modules/services/iconRenderer.js +7 -14
  160. package/dist/modules/services/isBlockActive.js +14 -12
  161. package/dist/modules/services/isMarkActive.js +6 -6
  162. package/dist/modules/services/maskCurrencyValues.js +12 -11
  163. package/dist/modules/services/toHtml.js +6 -6
  164. package/dist/modules/services/toRichTextValue.js +7 -7
  165. package/dist/modules/services/toggleBlock.js +19 -20
  166. package/dist/modules/services/toggleMark.js +7 -7
  167. package/dist/modules/style.css +1 -0
  168. package/dist/modules/templates/badResponses.js +13 -13
  169. package/dist/modules/templates/richTextTemplates.js +14 -17
  170. package/dist/modules/templates/successResponses.js +4 -9
  171. package/dist/modules/utils/phoneInputUtilities.js +28 -18
  172. package/dist/modules/utils/richTextUtilities.js +75 -88
  173. package/dist/services/fieldTemplate.d.ts +1 -1
  174. package/dist/services/fieldTemplate.d.ts.map +1 -1
  175. package/dist/style.css +1 -0
  176. package/package.json +65 -65
  177. package/dist/components.css +0 -2
  178. package/dist/modules/components.css +0 -2
@@ -1,31 +1,31 @@
1
- import { FullCalendarProvider as e } from "./_fullCalendarProvider.js";
2
- import { DayCalendar as t } from "./dayCalendar/index.js";
3
- import { FullCalendarContainer as n } from "./fullCalendarContainer/index.js";
4
- import { FullCalendarHeader as r } from "./fullCalendarHeader/index.js";
5
- import { MonthlyCalendar as i } from "./monthlyCalendar/index.js";
6
- import { WeekCalendar as a } from "./weekCalendar/index.js";
7
- import { useState as o } from "react";
8
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
- //#region src/components/fullCalendar/index.tsx
10
- function l(l) {
11
- let [u, d] = o("month");
12
- return /* @__PURE__ */ s(e, {
13
- events: l.events || [],
14
- viewValue: l.viewValue,
15
- defaultViewValue: l.defaultViewValue,
16
- onChangeView: l.onChangeView,
17
- blockedTimestamps: l.blockedTimestamps || [],
18
- onClickDate: l.onClickDate,
19
- children: /* @__PURE__ */ c(n, { children: [
20
- /* @__PURE__ */ s(r, {
21
- viewType: u,
22
- setViewType: d
23
- }),
24
- u === "day" && /* @__PURE__ */ s(t, {}),
25
- u === "month" && /* @__PURE__ */ s(i, {}),
26
- u === "week" && /* @__PURE__ */ s(a, {})
27
- ] })
28
- });
1
+ import { jsx as a, jsxs as t } from "react/jsx-runtime";
2
+ import { useState as n } from "react";
3
+ import { FullCalendarProvider as i } from "./_fullCalendarProvider.js";
4
+ import { DayCalendar as o } from "./dayCalendar/index.js";
5
+ import { FullCalendarContainer as m } from "./fullCalendarContainer/index.js";
6
+ import { FullCalendarHeader as d } from "./fullCalendarHeader/index.js";
7
+ import { MonthlyCalendar as u } from "./monthlyCalendar/index.js";
8
+ import { WeekCalendar as C } from "./weekCalendar/index.js";
9
+ function y(e) {
10
+ const [l, r] = n("month");
11
+ return /* @__PURE__ */ a(
12
+ i,
13
+ {
14
+ events: e.events || [],
15
+ viewValue: e.viewValue,
16
+ defaultViewValue: e.defaultViewValue,
17
+ onChangeView: e.onChangeView,
18
+ blockedTimestamps: e.blockedTimestamps || [],
19
+ onClickDate: e.onClickDate,
20
+ children: /* @__PURE__ */ t(m, { children: [
21
+ /* @__PURE__ */ a(d, { viewType: l, setViewType: r }),
22
+ l === "day" && /* @__PURE__ */ a(o, {}),
23
+ l === "month" && /* @__PURE__ */ a(u, {}),
24
+ l === "week" && /* @__PURE__ */ a(C, {})
25
+ ] })
26
+ }
27
+ );
29
28
  }
30
- //#endregion
31
- export { l as FullCalendar };
29
+ export {
30
+ y as FullCalendar
31
+ };
@@ -1,10 +1,13 @@
1
- import { MonthlyCalendarTableBody as e } from "./monthlyCalendarTableBody/index.js";
2
- import { MonthlyCalendarTableContainer as t } from "./monthlyCalendarTableContainer/index.js";
3
- import { MonthlyCalendarTableHeader as n } from "./monthlyCalendarTableHeader/index.js";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- //#region src/components/fullCalendar/monthlyCalendar/index.tsx
6
- function a() {
7
- return /* @__PURE__ */ i(t, { children: [/* @__PURE__ */ r(n, {}), /* @__PURE__ */ r(e, {})] });
1
+ import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
+ import { MonthlyCalendarTableBody as n } from "./monthlyCalendarTableBody/index.js";
3
+ import { MonthlyCalendarTableContainer as a } from "./monthlyCalendarTableContainer/index.js";
4
+ import { MonthlyCalendarTableHeader as e } from "./monthlyCalendarTableHeader/index.js";
5
+ function i() {
6
+ return /* @__PURE__ */ o(a, { children: [
7
+ /* @__PURE__ */ r(e, {}),
8
+ /* @__PURE__ */ r(n, {})
9
+ ] });
8
10
  }
9
- //#endregion
10
- export { a as MonthlyCalendar };
11
+ export {
12
+ i as MonthlyCalendar
13
+ };
@@ -1,29 +1,37 @@
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/monthlyCalendar/monthlyCalendarEvent/index.tsx
5
- function i(i) {
6
- let { events: a } = e(), o = a.filter((e) => e.initialDate.getDate() === i.day && e.initialDate.getMonth() === i.month && e.initialDate.getFullYear() === i.year);
7
- if (o.length === 0) return /* @__PURE__ */ n(t, {});
8
- function s(e) {
9
- return `${i.day}-${i.month}-${i.year}-${e}`;
10
- }
11
- function c(e) {
12
- let t = e.getHours(), n = e.getMinutes();
13
- return n === 0 ? `${t}h` : `${t}h${n}`;
14
- }
15
- function l(e, t) {
16
- e.stopPropagation(), t.onClick?.(t.data);
17
- }
18
- return o.map((e, t) => /* @__PURE__ */ r("div", {
19
- className: `arkynMonthlyCalendarEvent ${e?.scheme || "primary"}`,
20
- onClick: (t) => l(t, e),
21
- children: [/* @__PURE__ */ r("strong", { children: [
22
- c(e.initialDate),
23
- " ",
24
- e?.endDate && `- ${c(e.endDate)}`
25
- ] }), /* @__PURE__ */ n("p", { children: e.title })]
26
- }, s(t)));
1
+ import { jsx as o, Fragment as s, jsxs as u } from "react/jsx-runtime";
2
+ import { useFullCalendar as d } from "../../_fullCalendarProvider.js";
3
+ /* empty css */
4
+ function y(t) {
5
+ const { events: c } = d(), l = c.filter((i) => i.initialDate.getDate() === t.day && i.initialDate.getMonth() === t.month && i.initialDate.getFullYear() === t.year);
6
+ if (l.length === 0) return /* @__PURE__ */ o(s, {});
7
+ function m(i) {
8
+ return `${t.day}-${t.month}-${t.year}-${i}`;
9
+ }
10
+ function a(i) {
11
+ const r = i.getHours(), n = i.getMinutes();
12
+ return n === 0 ? `${r}h` : `${r}h${n}`;
13
+ }
14
+ function h(i, r) {
15
+ var n;
16
+ i.stopPropagation(), (n = r.onClick) == null || n.call(r, r.data);
17
+ }
18
+ return l.map((i, r) => /* @__PURE__ */ u(
19
+ "div",
20
+ {
21
+ className: `arkynMonthlyCalendarEvent ${(i == null ? void 0 : i.scheme) || "primary"}`,
22
+ onClick: (n) => h(n, i),
23
+ children: [
24
+ /* @__PURE__ */ u("strong", { children: [
25
+ a(i.initialDate),
26
+ " ",
27
+ (i == null ? void 0 : i.endDate) && `- ${a(i.endDate)}`
28
+ ] }),
29
+ /* @__PURE__ */ o("p", { children: i.title })
30
+ ]
31
+ },
32
+ m(r)
33
+ ));
27
34
  }
28
- //#endregion
29
- export { i as MonthlyCalendarEvent };
35
+ export {
36
+ y as MonthlyCalendarEvent
37
+ };
@@ -1,13 +1,11 @@
1
+ import { jsx as l } from "react/jsx-runtime";
1
2
  import { useFullCalendar as e } from "../../_fullCalendarProvider.js";
2
- import { MonthlyCalendarTableTd as t } from "../monthlyCalendarTableTd/index.js";
3
- /* empty css */
4
- import { jsx as n } from "react/jsx-runtime";
5
- //#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.tsx
6
- function r() {
7
- return /* @__PURE__ */ n("tbody", {
8
- className: "arkynMonthlyCalendarTableBody",
9
- children: e().listMonthlyMatrix.map((e, r) => /* @__PURE__ */ n("tr", { children: e.map((e, r) => /* @__PURE__ */ n(t, { ...e }, r)) }, r))
10
- });
3
+ import { MonthlyCalendarTableTd as d } from "../monthlyCalendarTableTd/index.js";
4
+ /* empty css */
5
+ function h() {
6
+ const r = e();
7
+ return /* @__PURE__ */ l("tbody", { className: "arkynMonthlyCalendarTableBody", children: r.listMonthlyMatrix.map((a, o) => /* @__PURE__ */ l("tr", { children: a.map((n, t) => /* @__PURE__ */ l(d, { ...n }, t)) }, o)) });
11
8
  }
12
- //#endregion
13
- export { r as MonthlyCalendarTableBody };
9
+ export {
10
+ h as MonthlyCalendarTableBody
11
+ };
@@ -1,11 +1,10 @@
1
- /* empty css */
2
- import { jsx as e } from "react/jsx-runtime";
3
- //#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.tsx
4
- function t({ children: t }) {
5
- return /* @__PURE__ */ e("div", {
6
- className: "arkynMonthlyCalendarTableContainer",
7
- children: /* @__PURE__ */ e("table", { children: t })
8
- });
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ /* empty css */
3
+ function t({
4
+ children: a
5
+ }) {
6
+ return /* @__PURE__ */ n("div", { className: "arkynMonthlyCalendarTableContainer", children: /* @__PURE__ */ n("table", { children: a }) });
9
7
  }
10
- //#endregion
11
- export { t as MonthlyCalendarTableContainer };
8
+ export {
9
+ t as MonthlyCalendarTableContainer
10
+ };
@@ -1,14 +1,11 @@
1
- import { useFullCalendar as e } from "../../_fullCalendarProvider.js";
2
- /* empty css */
3
- import { jsx as t } from "react/jsx-runtime";
4
- import { formatToCapitalizeFirstWordLetter as n } from "@arkyn/shared";
5
- //#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.tsx
6
- function r() {
7
- let { listWeek: r } = e();
8
- return /* @__PURE__ */ t("thead", {
9
- className: "arkynMonthlyCalendarTableHeader",
10
- children: /* @__PURE__ */ t("tr", { children: r.map((e, r) => /* @__PURE__ */ t("th", { children: n(e) }, r)) })
11
- });
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { formatToCapitalizeFirstWordLetter as l } from "@arkyn/shared";
3
+ import { useFullCalendar as o } from "../../_fullCalendarProvider.js";
4
+ /* empty css */
5
+ function h() {
6
+ const { listWeek: e } = o();
7
+ return /* @__PURE__ */ r("thead", { className: "arkynMonthlyCalendarTableHeader", children: /* @__PURE__ */ r("tr", { children: e.map((t, a) => /* @__PURE__ */ r("th", { children: l(t) }, a)) }) });
12
8
  }
13
- //#endregion
14
- export { r as MonthlyCalendarTableHeader };
9
+ export {
10
+ h as MonthlyCalendarTableHeader
11
+ };
@@ -1,36 +1,37 @@
1
- import { useFullCalendar as e } from "../../_fullCalendarProvider.js";
2
- import { MonthlyCalendarEvent as t } from "../monthlyCalendarEvent/index.js";
3
- /* empty css */
4
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
- //#region src/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.tsx
6
- function i(i) {
7
- let { day: a, month: o, year: s, dayOwner: c } = i, { blockedTimestamps: l, onClickDate: u } = e();
8
- function d() {
9
- let e = /* @__PURE__ */ new Date();
10
- return a === e.getDate() && o === e.getMonth() && s === e.getFullYear();
11
- }
12
- function f() {
13
- let e = new Date(s, o, a);
14
- return l.some((t) => e >= t.initialDate && e <= t.endDate);
15
- }
16
- function p(e) {
17
- e.stopPropagation(), !f() && u && u(new Date(s, o, a));
18
- }
19
- return /* @__PURE__ */ r("td", {
20
- className: `arkynMonthlyCalendarTableTd ${c} ${f() ? "blocked" : ""}`,
21
- onClick: p,
22
- children: [/* @__PURE__ */ n("p", {
23
- className: d() ? "today" : "",
24
- children: a
25
- }), /* @__PURE__ */ n("div", {
26
- className: "arkynMonthlyCalendarEventContainer",
27
- children: /* @__PURE__ */ n(t, {
28
- day: a,
29
- month: o,
30
- year: s
31
- })
32
- })]
33
- });
1
+ import { jsxs as y, jsx as r } from "react/jsx-runtime";
2
+ import { useFullCalendar as h } from "../../_fullCalendarProvider.js";
3
+ import { MonthlyCalendarEvent as f } from "../monthlyCalendarEvent/index.js";
4
+ /* empty css */
5
+ function T(d) {
6
+ const { day: e, month: t, year: a, dayOwner: c } = d, { blockedTimestamps: s, onClickDate: l } = h();
7
+ function m() {
8
+ const n = /* @__PURE__ */ new Date();
9
+ return e === n.getDate() && t === n.getMonth() && a === n.getFullYear();
10
+ }
11
+ function i() {
12
+ const n = new Date(a, t, e);
13
+ return s.some(
14
+ (o) => n >= o.initialDate && n <= o.endDate
15
+ );
16
+ }
17
+ function u(n) {
18
+ if (n.stopPropagation(), !i() && l) {
19
+ const o = new Date(a, t, e);
20
+ l(o);
21
+ }
22
+ }
23
+ return /* @__PURE__ */ y(
24
+ "td",
25
+ {
26
+ className: `arkynMonthlyCalendarTableTd ${c} ${i() ? "blocked" : ""}`,
27
+ onClick: u,
28
+ children: [
29
+ /* @__PURE__ */ r("p", { className: m() ? "today" : "", children: e }),
30
+ /* @__PURE__ */ r("div", { className: "arkynMonthlyCalendarEventContainer", children: /* @__PURE__ */ r(f, { day: e, month: t, year: a }) })
31
+ ]
32
+ }
33
+ );
34
34
  }
35
- //#endregion
36
- export { i as MonthlyCalendarTableTd };
35
+ export {
36
+ T as MonthlyCalendarTableTd
37
+ };
@@ -1,10 +1,13 @@
1
- import { WeekCalendarTableBody as e } from "./weekCalendarTableBody/index.js";
2
- import { WeekCalendarTableContainer as t } from "./weekCalendarTableContainer/index.js";
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { WeekCalendarTableBody as a } from "./weekCalendarTableBody/index.js";
3
+ import { WeekCalendarTableContainer as o } from "./weekCalendarTableContainer/index.js";
3
4
  import { WeekCalendarTableHeader as n } from "./weekCalendarTableHeader/index.js";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- //#region src/components/fullCalendar/weekCalendar/index.tsx
6
- function a() {
7
- return /* @__PURE__ */ i(t, { children: [/* @__PURE__ */ r(n, {}), /* @__PURE__ */ r(e, {})] });
5
+ function i() {
6
+ return /* @__PURE__ */ r(o, { children: [
7
+ /* @__PURE__ */ e(n, {}),
8
+ /* @__PURE__ */ e(a, {})
9
+ ] });
8
10
  }
9
- //#endregion
10
- export { a as WeekCalendar };
11
+ export {
12
+ i as WeekCalendar
13
+ };
@@ -1,71 +1,79 @@
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/weekCalendar/weekCalendarEvent/index.tsx
5
- var i = 30, a = 40;
6
- function o(o) {
7
- let { events: s } = e(), c = s.map((e, t) => ({
8
- event: e,
9
- sourceIndex: t
10
- })).filter(({ event: e }) => e.initialDate.getDate() === o.day && e.initialDate.getMonth() === o.month && e.initialDate.getFullYear() === o.year).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
- }), l = new Map(c.map((e, t) => [e.sourceIndex, t])), u = c.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() === o.day && e.initialDate.getMonth() === o.month && e.initialDate.getFullYear() === o.year;
24
- });
25
- if (u.length === 0) return /* @__PURE__ */ n(t, {});
26
- function d(e, t) {
27
- return `${o.day}-${o.month}-${o.year}-${t}-${e}`;
28
- }
29
- function f(e) {
30
- let t = e.getHours(), n = e.getMinutes();
31
- return n === 0 ? `${t}h` : `${t}h${n}`;
32
- }
33
- function p(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 m(e, t) {
41
- let n = p(e), r = l.get(t);
42
- return r == null ? 0 : c.reduce((e, t, i) => {
43
- if (i >= r) return e;
44
- let a = p(t.event);
45
- return a.startMinutes < n.endMinutes && a.endMinutes > n.startMinutes ? e + 1 : e;
46
- }, 0);
47
- }
48
- function h(e, t) {
49
- let { startMinutes: n, endMinutes: r } = p(e), s = n - o.timeInMinutes, c = Math.max(r - n, 1), l = s / i * 100, u = c / i * 100, d = m(e, t) * a;
50
- return {
51
- top: `${l}%`,
52
- height: `${u}%`,
53
- left: `${d}px`
54
- };
55
- }
56
- function g(e, t) {
57
- e.stopPropagation(), t.onClick?.(t.data);
58
- }
59
- return u.map(({ event: e, sourceIndex: t }, i) => /* @__PURE__ */ r("div", {
60
- className: `arkynWeekCalendarEvent ${e?.scheme || "primary"}`,
61
- style: h(e, t),
62
- onClick: (t) => g(t, e),
63
- children: [/* @__PURE__ */ r("strong", { children: [
64
- f(e.initialDate),
65
- " ",
66
- e?.endDate && `- ${f(e.endDate)}`
67
- ] }), /* @__PURE__ */ n("p", { children: e.title })]
68
- }, d(i, t)));
1
+ import { jsx as M, Fragment as O, jsxs as h } from "react/jsx-runtime";
2
+ import { useFullCalendar as k } from "../../_fullCalendarProvider.js";
3
+ /* empty css */
4
+ const c = 30, T = 40;
5
+ function S(i) {
6
+ const { events: D } = k(), l = D.map((t, n) => ({ event: t, sourceIndex: n })).filter(({ event: t }) => t.initialDate.getDate() === i.day && t.initialDate.getMonth() === i.month && t.initialDate.getFullYear() === i.year).sort((t, n) => {
7
+ var o, u;
8
+ const e = t.event.initialDate.getTime(), r = n.event.initialDate.getTime();
9
+ if (e !== r) return e - r;
10
+ const s = ((o = t.event.endDate) == null ? void 0 : o.getTime()) ?? e + c * 6e4, a = ((u = n.event.endDate) == null ? void 0 : u.getTime()) ?? r + c * 6e4;
11
+ return s !== a ? s - a : t.sourceIndex - n.sourceIndex;
12
+ }), y = new Map(
13
+ l.map((t, n) => [t.sourceIndex, n])
14
+ ), f = l.filter(({ event: t }) => {
15
+ const n = Math.floor(i.timeInMinutes / 60), e = i.timeInMinutes % 60;
16
+ function r() {
17
+ const s = t.initialDate.getHours(), a = t.initialDate.getMinutes();
18
+ if (s !== n) return !1;
19
+ if (e === 0) return a < 30 && a >= 0;
20
+ if (e === 30) return a >= 30 && a < 60;
21
+ }
22
+ return r() && t.initialDate.getDate() === i.day && t.initialDate.getMonth() === i.month && t.initialDate.getFullYear() === i.year;
23
+ });
24
+ if (f.length === 0) return /* @__PURE__ */ M(O, {});
25
+ function E(t, n) {
26
+ return `${i.day}-${i.month}-${i.year}-${n}-${t}`;
27
+ }
28
+ function g(t) {
29
+ const n = t.getHours(), e = t.getMinutes();
30
+ return e === 0 ? `${n}h` : `${n}h${e}`;
31
+ }
32
+ function d(t) {
33
+ const n = t.initialDate.getHours() * 60 + t.initialDate.getMinutes(), e = t.endDate ? t.endDate.getHours() * 60 + t.endDate.getMinutes() : n + c;
34
+ return {
35
+ startMinutes: n,
36
+ endMinutes: Math.max(e, n + 1)
37
+ };
38
+ }
39
+ function I(t, n) {
40
+ const e = d(t), r = y.get(n);
41
+ return r == null ? 0 : l.reduce((s, a, o) => {
42
+ if (o >= r) return s;
43
+ const u = d(a.event);
44
+ return u.startMinutes < e.endMinutes && u.endMinutes > e.startMinutes ? s + 1 : s;
45
+ }, 0);
46
+ }
47
+ function $(t, n) {
48
+ const { startMinutes: e, endMinutes: r } = d(t), s = e - i.timeInMinutes, a = Math.max(r - e, 1), o = s / c * 100, u = a / c * 100, m = I(t, n) * T;
49
+ return {
50
+ top: `${o}%`,
51
+ height: `${u}%`,
52
+ left: `${m}px`
53
+ };
54
+ }
55
+ function x(t, n) {
56
+ var e;
57
+ t.stopPropagation(), (e = n.onClick) == null || e.call(n, n.data);
58
+ }
59
+ return f.map(({ event: t, sourceIndex: n }, e) => /* @__PURE__ */ h(
60
+ "div",
61
+ {
62
+ className: `arkynWeekCalendarEvent ${(t == null ? void 0 : t.scheme) || "primary"}`,
63
+ style: $(t, n),
64
+ onClick: (r) => x(r, t),
65
+ children: [
66
+ /* @__PURE__ */ h("strong", { children: [
67
+ g(t.initialDate),
68
+ " ",
69
+ (t == null ? void 0 : t.endDate) && `- ${g(t.endDate)}`
70
+ ] }),
71
+ /* @__PURE__ */ M("p", { children: t.title })
72
+ ]
73
+ },
74
+ E(e, n)
75
+ ));
69
76
  }
70
- //#endregion
71
- export { o as WeekCalendarEvent };
77
+ export {
78
+ S as WeekCalendarEvent
79
+ };
@@ -1,18 +1,21 @@
1
- import { ViewService as e } from "../../_viewService.js";
2
- import { useFullCalendar as t } from "../../_fullCalendarProvider.js";
3
- import { WeekCalendarTableTd as n } from "../weekCalendarTableTd/index.js";
4
- /* empty css */
5
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
- //#region src/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.tsx
7
- function a() {
8
- let a = t(), o = new e();
9
- return /* @__PURE__ */ r("tbody", {
10
- className: "arkynWeekCalendarTableBody",
11
- children: a.listWeeklyMatrix.map((e) => /* @__PURE__ */ i("tr", { children: [/* @__PURE__ */ r("td", {
12
- className: "hourTd",
13
- children: /* @__PURE__ */ r("p", { children: o.formatHourLabel(e[0].timeInMinutes) })
14
- }), e.map((e, t) => /* @__PURE__ */ r(n, { ...e }, `${e.year}-${e.month}-${e.day}-${e.timeInMinutes}-${t}`))] }, e[0].timeInMinutes))
15
- });
1
+ import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
+ import { useFullCalendar as d } from "../../_fullCalendarProvider.js";
3
+ import { ViewService as o } from "../../_viewService.js";
4
+ import { WeekCalendarTableTd as s } from "../weekCalendarTableTd/index.js";
5
+ /* empty css */
6
+ function y() {
7
+ const n = d(), t = new o();
8
+ return /* @__PURE__ */ r("tbody", { className: "arkynWeekCalendarTableBody", children: n.listWeeklyMatrix.map((a) => /* @__PURE__ */ m("tr", { children: [
9
+ /* @__PURE__ */ r("td", { className: "hourTd", children: /* @__PURE__ */ r("p", { children: t.formatHourLabel(a[0].timeInMinutes) }) }),
10
+ a.map((e, i) => /* @__PURE__ */ r(
11
+ s,
12
+ {
13
+ ...e
14
+ },
15
+ `${e.year}-${e.month}-${e.day}-${e.timeInMinutes}-${i}`
16
+ ))
17
+ ] }, a[0].timeInMinutes)) });
16
18
  }
17
- //#endregion
18
- export { a as WeekCalendarTableBody };
19
+ export {
20
+ y as WeekCalendarTableBody
21
+ };
@@ -1,11 +1,10 @@
1
- /* empty css */
2
1
  import { jsx as e } from "react/jsx-runtime";
3
- //#region src/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.tsx
4
- function t({ children: t }) {
5
- return /* @__PURE__ */ e("div", {
6
- className: "arkynWeekCalendarTableContainer",
7
- children: /* @__PURE__ */ e("table", { children: t })
8
- });
2
+ /* empty css */
3
+ function t({
4
+ children: a
5
+ }) {
6
+ return /* @__PURE__ */ e("div", { className: "arkynWeekCalendarTableContainer", children: /* @__PURE__ */ e("table", { children: a }) });
9
7
  }
10
- //#endregion
11
- export { t as WeekCalendarTableContainer };
8
+ export {
9
+ t as WeekCalendarTableContainer
10
+ };
@@ -1,17 +1,20 @@
1
- import { useFullCalendar as e } from "../../_fullCalendarProvider.js";
2
- /* empty css */
3
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
- import { formatToCapitalizeFirstWordLetter as r } from "@arkyn/shared";
5
- //#region src/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.tsx
6
- function i() {
7
- let { listWeek: i, listWeeklyMatrix: a } = e(), o = a[0] || [];
8
- return /* @__PURE__ */ t("thead", {
9
- className: "arkynWeekCalendarTableHeader",
10
- children: /* @__PURE__ */ n("tr", { children: [/* @__PURE__ */ t("th", {}), i.map((e, i) => /* @__PURE__ */ t("th", { children: /* @__PURE__ */ n("div", {
11
- className: "arkynWeekCalendarTableHeaderContent",
12
- children: [/* @__PURE__ */ t("span", { children: r(e) }), /* @__PURE__ */ t("strong", { children: o[i]?.day })]
13
- }) }, i))] })
14
- });
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { formatToCapitalizeFirstWordLetter as d } from "@arkyn/shared";
3
+ import { useFullCalendar as s } from "../../_fullCalendarProvider.js";
4
+ /* empty css */
5
+ function k() {
6
+ const { listWeek: l, listWeeklyMatrix: n } = s(), i = n[0] || [];
7
+ return /* @__PURE__ */ e("thead", { className: "arkynWeekCalendarTableHeader", children: /* @__PURE__ */ t("tr", { children: [
8
+ /* @__PURE__ */ e("th", {}),
9
+ l.map((o, r) => {
10
+ var a;
11
+ return /* @__PURE__ */ e("th", { children: /* @__PURE__ */ t("div", { className: "arkynWeekCalendarTableHeaderContent", children: [
12
+ /* @__PURE__ */ e("span", { children: d(o) }),
13
+ /* @__PURE__ */ e("strong", { children: (a = i[r]) == null ? void 0 : a.day })
14
+ ] }) }, r);
15
+ })
16
+ ] }) });
15
17
  }
16
- //#endregion
17
- export { i as WeekCalendarTableHeader };
18
+ export {
19
+ k as WeekCalendarTableHeader
20
+ };