@arkyn/components 3.0.1-beta.154 → 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/index.js +4694 -75
- package/dist/modules/components/alert/alertContainer/index.js +22 -0
- package/dist/modules/components/alert/alertContent/index.js +9 -0
- package/dist/modules/components/alert/alertDescription/index.js +9 -0
- package/dist/modules/components/alert/alertIcon/index.js +20 -0
- package/dist/modules/components/alert/alertTitle/index.js +9 -0
- package/dist/modules/components/audioPlayer/index.js +76 -0
- package/dist/modules/components/audioUpload/hasFileContent/index.js +63 -0
- package/dist/modules/components/audioUpload/index.js +80 -0
- package/dist/modules/components/audioUpload/noFileContent/index.js +46 -0
- package/dist/modules/components/badge/index.js +23 -0
- package/dist/modules/components/button/index.js +33 -0
- package/dist/modules/components/calendar/_calendarProvider.js +65 -0
- package/dist/modules/components/calendar/_viewService.js +141 -0
- package/dist/modules/components/calendar/calendarContainer/index.js +8 -0
- package/dist/modules/components/calendar/calendarHeader/index.js +73 -0
- package/dist/modules/components/calendar/calendarTableBody/index.js +11 -0
- package/dist/modules/components/calendar/calendarTableContainer/index.js +8 -0
- package/dist/modules/components/calendar/calendarTableHeader/index.js +11 -0
- package/dist/modules/components/calendar/calendarTableTd/index.js +24 -0
- package/dist/modules/components/calendar/index.js +50 -0
- package/dist/modules/components/cardTab/cardTabButton/index.js +30 -0
- package/dist/modules/components/cardTab/cardTabContainer/index.js +29 -0
- package/dist/modules/components/cardTab/cardTabContext.js +13 -0
- package/dist/modules/components/checkbox/index.js +65 -0
- package/dist/modules/components/clientOnly.js +9 -0
- package/dist/modules/components/currencyInput/index.js +140 -0
- package/dist/modules/components/divider/index.js +13 -0
- package/dist/modules/components/drawer/drawerContainer/index.js +44 -0
- package/dist/modules/components/drawer/drawerContext.js +13 -0
- package/dist/modules/components/drawer/drawerHeader/index.js +28 -0
- package/dist/modules/components/facebookPixel/facebookPixel.client.js +19 -0
- package/dist/modules/components/facebookPixel/index.js +9 -0
- package/dist/modules/components/facebookPixel/pixel.js +53 -0
- package/dist/modules/components/fieldError/index.js +9 -0
- package/dist/modules/components/fieldLabel/index.js +13 -0
- package/dist/modules/components/fieldWrapper/index.js +14 -0
- package/dist/modules/components/fileUpload/hasFileContent/index.js +68 -0
- package/dist/modules/components/fileUpload/index.js +73 -0
- package/dist/modules/components/fileUpload/noFileContent/index.js +46 -0
- package/dist/modules/components/fullCalendar/_fullCalendarProvider.js +48 -0
- package/dist/modules/components/fullCalendar/_viewService.js +106 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +8 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +79 -0
- package/dist/modules/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +34 -0
- package/dist/modules/components/fullCalendar/dayCalendar/index.js +11 -0
- package/dist/modules/components/fullCalendar/fullCalendarContainer/index.js +8 -0
- package/dist/modules/components/fullCalendar/fullCalendarHeader/index.js +72 -0
- package/dist/modules/components/fullCalendar/index.js +31 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/index.js +13 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +37 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +11 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +10 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +11 -0
- package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +37 -0
- package/dist/modules/components/fullCalendar/weekCalendar/index.js +13 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +79 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +21 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +10 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +20 -0
- package/dist/modules/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +40 -0
- package/dist/modules/components/googleAnalytics/googleAnalytics.client.js +8 -0
- package/dist/modules/components/googleAnalytics/googleAnalytics.js +18 -0
- package/dist/modules/components/googleAnalytics/index.js +10 -0
- package/dist/modules/components/googleAnalytics/snippets/generateGAElements.js +16 -0
- package/dist/modules/components/googleTagManager/googleTagManager.client.js +8 -0
- package/dist/modules/components/googleTagManager/googleTagManager.js +49 -0
- package/dist/modules/components/googleTagManager/index.js +28 -0
- package/dist/modules/components/googleTagManager/snippets/appendToDataLayer.js +9 -0
- package/dist/modules/components/googleTagManager/snippets/generateGTMElements.js +24 -0
- package/dist/modules/components/iconButton/index.js +30 -0
- package/dist/modules/components/imageUpload/hasFileContent/index.js +64 -0
- package/dist/modules/components/imageUpload/index.js +83 -0
- package/dist/modules/components/imageUpload/noFileContent/index.js +46 -0
- package/dist/modules/components/input/index.js +121 -0
- package/dist/modules/components/mapView/index.js +33 -0
- package/dist/modules/components/mapView/mapView.client.js +52 -0
- package/dist/modules/components/maskedInput/index.js +113 -0
- package/dist/modules/components/modal/modalContainer/index.js +43 -0
- package/dist/modules/components/modal/modalContext.js +13 -0
- package/dist/modules/components/modal/modalFooter/index.js +9 -0
- package/dist/modules/components/modal/modalHeader/index.js +28 -0
- package/dist/modules/components/multiSelect/index.js +155 -0
- package/dist/modules/components/multiSelect/multiSelectChevron/index.js +22 -0
- package/dist/modules/components/multiSelect/multiSelectContainer/index.js +30 -0
- package/dist/modules/components/multiSelect/multiSelectContent/index.js +9 -0
- package/dist/modules/components/multiSelect/multiSelectMark/index.js +23 -0
- package/dist/modules/components/multiSelect/multiSelectOption/index.js +14 -0
- package/dist/modules/components/multiSelect/multiSelectOptionsContainer/index.js +46 -0
- package/dist/modules/components/multiSelect/multiSelectOverlay/index.js +9 -0
- package/dist/modules/components/multiSelect/multiSelectSpinner/index.js +17 -0
- package/dist/modules/components/pagination/chevronButton/index.js +18 -0
- package/dist/modules/components/pagination/currentButton/index.js +8 -0
- package/dist/modules/components/pagination/index.js +84 -0
- package/dist/modules/components/pagination/pageButton/index.js +9 -0
- package/dist/modules/components/pagination/paginationService.js +49 -0
- package/dist/modules/components/pagination/spread/index.js +9 -0
- package/dist/modules/components/phoneInput/index.js +152 -0
- package/dist/modules/components/phoneInput/phoneInputContainer/index.js +20 -0
- package/dist/modules/components/phoneInput/phoneInputCountriesOverlay/index.js +9 -0
- package/dist/modules/components/phoneInput/phoneInputCountryOption/index.js +16 -0
- package/dist/modules/components/phoneInput/phoneInputCountryOptionsContainer/index.js +44 -0
- package/dist/modules/components/phoneInput/phoneInputCountrySelector/index.js +22 -0
- package/dist/modules/components/phoneInput/phoneInputMask/index.js +62 -0
- package/dist/modules/components/popover/index.js +37 -0
- package/dist/modules/components/radio/radioBox/index.js +43 -0
- package/dist/modules/components/radio/radioContext.js +20 -0
- package/dist/modules/components/radio/radioGroup/index.js +65 -0
- package/dist/modules/components/richText/blockButton/index.js +24 -0
- package/dist/modules/components/richText/element/index.js +59 -0
- package/dist/modules/components/richText/index.js +136 -0
- package/dist/modules/components/richText/insertImage/index.js +106 -0
- package/dist/modules/components/richText/insertVideo/index.js +98 -0
- package/dist/modules/components/richText/leaf/index.js +7 -0
- package/dist/modules/components/richText/markButton/index.js +23 -0
- package/dist/modules/components/richText/toolbar/index.js +8 -0
- package/dist/modules/components/searchPlaces.js +67 -0
- package/dist/modules/components/select/index.js +145 -0
- package/dist/modules/components/select/selectChevron/index.js +22 -0
- package/dist/modules/components/select/selectContainer/index.js +30 -0
- package/dist/modules/components/select/selectContent/index.js +9 -0
- package/dist/modules/components/select/selectOption/index.js +14 -0
- package/dist/modules/components/select/selectOptionsContainer/index.js +46 -0
- package/dist/modules/components/select/selectOverlay/index.js +9 -0
- package/dist/modules/components/select/selectSpinner/index.js +10 -0
- package/dist/modules/components/slider/index.js +42 -0
- package/dist/modules/components/switch/index.js +63 -0
- package/dist/modules/components/tab/tabButton/index.js +30 -0
- package/dist/modules/components/tab/tabContainer/index.js +29 -0
- package/dist/modules/components/tab/tabContext.js +13 -0
- package/dist/modules/components/table/tableBody/index.js +15 -0
- package/dist/modules/components/table/tableCaption/index.js +9 -0
- package/dist/modules/components/table/tableContainer/index.js +9 -0
- package/dist/modules/components/table/tableFooter/index.js +12 -0
- package/dist/modules/components/table/tableHeader/index.js +12 -0
- package/dist/modules/components/textarea/index.js +70 -0
- package/dist/modules/components/tooltip/index.js +46 -0
- package/dist/modules/hooks/useAutomation.js +28 -0
- package/dist/modules/hooks/useDrawer.js +20 -0
- package/dist/modules/hooks/useForm.js +8 -0
- package/dist/modules/hooks/useHydrated.js +15 -0
- package/dist/modules/hooks/useModal.js +20 -0
- package/dist/modules/hooks/useScopedParams.js +18 -0
- package/dist/modules/hooks/useScrollLock.js +21 -0
- package/dist/modules/hooks/useSearchAutomation.js +15 -0
- package/dist/modules/hooks/useSlider.js +14 -0
- package/dist/modules/hooks/useToast.js +11 -0
- package/dist/modules/index.js +144 -0
- package/dist/modules/providers/drawerProvider.js +31 -0
- package/dist/modules/providers/formProvider.js +18 -0
- package/dist/modules/providers/modalProvider.js +34 -0
- package/dist/modules/providers/placesProvider.js +18 -0
- package/dist/modules/providers/toastProvider.js +52 -0
- package/dist/modules/services/extractTextFromNode.js +7 -0
- package/dist/modules/services/fieldTemplate.js +24 -0
- package/dist/modules/services/iconRenderer.js +8 -0
- package/dist/modules/services/isBlockActive.js +15 -0
- package/dist/modules/services/isMarkActive.js +8 -0
- package/dist/modules/services/maskCurrencyValues.js +14 -0
- package/dist/modules/services/toHtml.js +7 -0
- package/dist/modules/services/toRichTextValue.js +9 -0
- package/dist/modules/services/toggleBlock.js +20 -0
- package/dist/modules/services/toggleMark.js +8 -0
- package/dist/modules/style.css +1 -0
- package/dist/modules/templates/badResponses.js +14 -0
- package/dist/modules/templates/richTextTemplates.js +14 -0
- package/dist/modules/templates/successResponses.js +4 -0
- package/dist/modules/utils/phoneInputUtilities.js +32 -0
- package/dist/modules/utils/richTextUtilities.js +77 -0
- package/package.json +208 -208
- package/dist/components/alert/alertContainer/index.js +0 -71
- package/dist/components/alert/alertContent/index.js +0 -26
- package/dist/components/alert/alertDescription/index.js +0 -25
- package/dist/components/alert/alertIcon/index.js +0 -43
- package/dist/components/alert/alertTitle/index.js +0 -27
- package/dist/components/audioPlayer/index.js +0 -112
- package/dist/components/audioUpload/hasFileContent/index.js +0 -26
- package/dist/components/audioUpload/index.js +0 -95
- package/dist/components/audioUpload/noFileContent/index.js +0 -29
- package/dist/components/badge/index.js +0 -41
- package/dist/components/button/index.js +0 -51
- package/dist/components/calendar/_calendarProvider.js +0 -58
- package/dist/components/calendar/_viewService.js +0 -179
- package/dist/components/calendar/calendarContainer/index.js +0 -6
- package/dist/components/calendar/calendarHeader/index.js +0 -13
- package/dist/components/calendar/calendarTableBody/index.js +0 -9
- package/dist/components/calendar/calendarTableContainer/index.js +0 -6
- package/dist/components/calendar/calendarTableHeader/index.js +0 -9
- package/dist/components/calendar/calendarTableTd/index.js +0 -15
- package/dist/components/calendar/index.js +0 -54
- package/dist/components/cardTab/cardTabButton/index.js +0 -40
- package/dist/components/cardTab/cardTabContainer/index.js +0 -42
- package/dist/components/cardTab/cardTabContext.js +0 -10
- package/dist/components/checkbox/index.js +0 -71
- package/dist/components/clientOnly.js +0 -31
- package/dist/components/currencyInput/index.js +0 -126
- package/dist/components/divider/index.js +0 -28
- package/dist/components/drawer/drawerContainer/index.js +0 -38
- package/dist/components/drawer/drawerContext.js +0 -10
- package/dist/components/drawer/drawerHeader/index.js +0 -33
- package/dist/components/facebookPixel/facebookPixel.client.js +0 -23
- package/dist/components/facebookPixel/index.js +0 -45
- package/dist/components/facebookPixel/pixel.js +0 -111
- package/dist/components/fieldError/index.js +0 -26
- package/dist/components/fieldLabel/index.js +0 -23
- package/dist/components/fieldWrapper/index.js +0 -27
- package/dist/components/fileUpload/hasFileContent/index.js +0 -34
- package/dist/components/fileUpload/index.js +0 -89
- package/dist/components/fileUpload/noFileContent/index.js +0 -29
- package/dist/components/fullCalendar/_fullCalendarProvider.js +0 -36
- package/dist/components/fullCalendar/_viewService.js +0 -144
- package/dist/components/fullCalendar/dayCalendar/dayCalendarContainer/index.js +0 -6
- package/dist/components/fullCalendar/dayCalendar/dayCalendarEvent/index.js +0 -105
- package/dist/components/fullCalendar/dayCalendar/dayCalendarRow/index.js +0 -24
- package/dist/components/fullCalendar/dayCalendar/index.js +0 -9
- package/dist/components/fullCalendar/fullCalendarContainer/index.js +0 -6
- package/dist/components/fullCalendar/fullCalendarHeader/index.js +0 -37
- package/dist/components/fullCalendar/index.js +0 -52
- package/dist/components/fullCalendar/monthlyCalendar/index.js +0 -8
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarEvent/index.js +0 -29
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js +0 -9
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js +0 -6
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js +0 -9
- package/dist/components/fullCalendar/monthlyCalendar/monthlyCalendarTableTd/index.js +0 -30
- package/dist/components/fullCalendar/weekCalendar/index.js +0 -8
- package/dist/components/fullCalendar/weekCalendar/weekCalendarEvent/index.js +0 -102
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableBody/index.js +0 -11
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableContainer/index.js +0 -6
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableHeader/index.js +0 -10
- package/dist/components/fullCalendar/weekCalendar/weekCalendarTableTd/index.js +0 -25
- package/dist/components/googleAnalytics/googleAnalytics.client.js +0 -8
- package/dist/components/googleAnalytics/googleAnalytics.js +0 -23
- package/dist/components/googleAnalytics/index.js +0 -31
- package/dist/components/googleAnalytics/snippets/generateGAElements.js +0 -16
- package/dist/components/googleTagManager/googleTagManager.client.js +0 -8
- package/dist/components/googleTagManager/googleTagManager.js +0 -52
- package/dist/components/googleTagManager/index.js +0 -47
- package/dist/components/googleTagManager/snippets/appendToDataLayer.js +0 -7
- package/dist/components/googleTagManager/snippets/generateGTMElements.js +0 -25
- package/dist/components/iconButton/index.js +0 -38
- package/dist/components/imageUpload/hasFileContent/index.js +0 -24
- package/dist/components/imageUpload/index.js +0 -101
- package/dist/components/imageUpload/noFileContent/index.js +0 -29
- package/dist/components/input/index.js +0 -94
- package/dist/components/mapView/index.js +0 -53
- package/dist/components/mapView/mapView.client.js +0 -51
- package/dist/components/maskedInput/index.js +0 -108
- package/dist/components/modal/modalContainer/index.js +0 -40
- package/dist/components/modal/modalContext.js +0 -10
- package/dist/components/modal/modalFooter/index.js +0 -32
- package/dist/components/modal/modalHeader/index.js +0 -34
- package/dist/components/multiSelect/index.js +0 -135
- package/dist/components/multiSelect/multiSelectChevron/index.js +0 -18
- package/dist/components/multiSelect/multiSelectContainer/index.js +0 -11
- package/dist/components/multiSelect/multiSelectContent/index.js +0 -8
- package/dist/components/multiSelect/multiSelectMark/index.js +0 -11
- package/dist/components/multiSelect/multiSelectOption/index.js +0 -10
- package/dist/components/multiSelect/multiSelectOptionsContainer/index.js +0 -44
- package/dist/components/multiSelect/multiSelectOverlay/index.js +0 -9
- package/dist/components/multiSelect/multiSelectSpinner/index.js +0 -10
- package/dist/components/pagination/chevronButton/index.js +0 -9
- package/dist/components/pagination/currentButton/index.js +0 -6
- package/dist/components/pagination/index.js +0 -46
- package/dist/components/pagination/pageButton/index.js +0 -7
- package/dist/components/pagination/paginationService.js +0 -62
- package/dist/components/pagination/spread/index.js +0 -7
- package/dist/components/phoneInput/index.js +0 -127
- package/dist/components/phoneInput/phoneInputContainer/index.js +0 -11
- package/dist/components/phoneInput/phoneInputCountriesOverlay/index.js +0 -9
- package/dist/components/phoneInput/phoneInputCountryOption/index.js +0 -10
- package/dist/components/phoneInput/phoneInputCountryOptionsContainer/index.js +0 -40
- package/dist/components/phoneInput/phoneInputCountrySelector/index.js +0 -9
- package/dist/components/phoneInput/phoneInputMask/index.js +0 -37
- package/dist/components/popover/index.js +0 -62
- package/dist/components/radio/radioBox/index.js +0 -48
- package/dist/components/radio/radioContext.js +0 -11
- package/dist/components/radio/radioGroup/index.js +0 -58
- package/dist/components/richText/blockButton/index.js +0 -18
- package/dist/components/richText/element/index.js +0 -26
- package/dist/components/richText/index.js +0 -136
- package/dist/components/richText/insertImage/index.js +0 -33
- package/dist/components/richText/insertVideo/index.js +0 -51
- package/dist/components/richText/leaf/index.js +0 -13
- package/dist/components/richText/markButton/index.js +0 -16
- package/dist/components/richText/toolbar/index.js +0 -6
- package/dist/components/searchPlaces.js +0 -99
- package/dist/components/select/index.js +0 -134
- package/dist/components/select/selectChevron/index.js +0 -18
- package/dist/components/select/selectContainer/index.js +0 -11
- package/dist/components/select/selectContent/index.js +0 -8
- package/dist/components/select/selectOption/index.js +0 -10
- package/dist/components/select/selectOptionsContainer/index.js +0 -44
- package/dist/components/select/selectOverlay/index.js +0 -9
- package/dist/components/select/selectSpinner/index.js +0 -10
- package/dist/components/slider/index.js +0 -79
- package/dist/components/switch/index.js +0 -66
- package/dist/components/tab/tabButton/index.js +0 -40
- package/dist/components/tab/tabContainer/index.js +0 -42
- package/dist/components/tab/tabContext.js +0 -10
- package/dist/components/table/tableBody/index.js +0 -34
- package/dist/components/table/tableCaption/index.js +0 -24
- package/dist/components/table/tableContainer/index.js +0 -37
- package/dist/components/table/tableFooter/index.js +0 -23
- package/dist/components/table/tableHeader/index.js +0 -25
- package/dist/components/textarea/index.js +0 -80
- package/dist/components/tooltip/index.js +0 -96
- package/dist/hooks/useAutomation.js +0 -74
- package/dist/hooks/useDrawer.js +0 -20
- package/dist/hooks/useForm.js +0 -35
- package/dist/hooks/useHydrated.js +0 -26
- package/dist/hooks/useModal.js +0 -20
- package/dist/hooks/useScopedParams.js +0 -55
- package/dist/hooks/useScrollLock.js +0 -46
- package/dist/hooks/useSearchAutomation.js +0 -64
- package/dist/hooks/useSlider.js +0 -35
- package/dist/hooks/useToast.js +0 -28
- package/dist/providers/drawerProvider.js +0 -54
- package/dist/providers/formProvider.js +0 -34
- package/dist/providers/modalProvider.js +0 -58
- package/dist/providers/placesProvider.js +0 -40
- package/dist/providers/toastProvider.js +0 -62
- package/dist/services/extractTextFromNode.js +0 -5
- package/dist/services/fieldTemplate.js +0 -11
- package/dist/services/iconRenderer.js +0 -13
- package/dist/services/isBlockActive.js +0 -14
- package/dist/services/isMarkActive.js +0 -6
- package/dist/services/maskCurrencyValues.js +0 -23
- package/dist/services/toHtml.js +0 -22
- package/dist/services/toRichTextValue.js +0 -34
- package/dist/services/toggleBlock.js +0 -32
- package/dist/services/toggleMark.js +0 -10
- package/dist/templates/badResponses.js +0 -12
- package/dist/templates/richTextTemplates.js +0 -12
- package/dist/templates/successResponses.js +0 -2
- package/dist/types/richTextTypes.js +0 -1
- package/dist/utils/phoneInputUtilities.js +0 -37
- package/dist/utils/richTextUtilities.js +0 -89
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { RefreshCw as F, FileImage as y, FileAudio as C, FileArchive as v, File as g } from "lucide-react";
|
|
3
|
+
import { Button as k } from "../../button/index.js";
|
|
4
|
+
import { Divider as b } from "../../divider/index.js";
|
|
5
|
+
import { IconButton as x } from "../../iconButton/index.js";
|
|
6
|
+
import { Tooltip as B } from "../../tooltip/index.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
function A(s) {
|
|
9
|
+
const {
|
|
10
|
+
disabled: n,
|
|
11
|
+
file: i,
|
|
12
|
+
isLoading: r,
|
|
13
|
+
acceptFile: p,
|
|
14
|
+
changeFileButtonText: m,
|
|
15
|
+
handleSelectFile: d,
|
|
16
|
+
reSendFile: a
|
|
17
|
+
} = s;
|
|
18
|
+
function u() {
|
|
19
|
+
if (n) return;
|
|
20
|
+
const t = document.createElement("input");
|
|
21
|
+
t.type = "file", t.accept = p, t.onchange = (h) => {
|
|
22
|
+
var c;
|
|
23
|
+
const l = (c = h.target.files) == null ? void 0 : c[0];
|
|
24
|
+
l && d(l);
|
|
25
|
+
}, t.click();
|
|
26
|
+
}
|
|
27
|
+
function f() {
|
|
28
|
+
return i.type.startsWith("image/") ? /* @__PURE__ */ e(y, {}) : i.type.startsWith("audio/") ? /* @__PURE__ */ e(C, {}) : i.type.startsWith("application/zip") ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(g, {});
|
|
29
|
+
}
|
|
30
|
+
return /* @__PURE__ */ o("div", { className: "arkynFileUploadHasFileContent", children: [
|
|
31
|
+
/* @__PURE__ */ o("section", { className: "arkynFileUploadFileContainer", children: [
|
|
32
|
+
/* @__PURE__ */ e(f, {}),
|
|
33
|
+
/* @__PURE__ */ e("p", { children: i.name })
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ e(b, {}),
|
|
36
|
+
/* @__PURE__ */ o("div", { className: "arkynFileUploadButtonsContainer", children: [
|
|
37
|
+
!!a && /* @__PURE__ */ e(B, { orientation: "bottom", text: "Reenviar arquivo", children: /* @__PURE__ */ e(
|
|
38
|
+
x,
|
|
39
|
+
{
|
|
40
|
+
type: "button",
|
|
41
|
+
"aria-label": "resend file",
|
|
42
|
+
variant: "outline",
|
|
43
|
+
scheme: "danger",
|
|
44
|
+
size: "sm",
|
|
45
|
+
isLoading: r,
|
|
46
|
+
onClick: a,
|
|
47
|
+
icon: F,
|
|
48
|
+
disabled: n
|
|
49
|
+
}
|
|
50
|
+
) }),
|
|
51
|
+
/* @__PURE__ */ e(
|
|
52
|
+
k,
|
|
53
|
+
{
|
|
54
|
+
isLoading: r,
|
|
55
|
+
onClick: u,
|
|
56
|
+
variant: "outline",
|
|
57
|
+
size: "sm",
|
|
58
|
+
type: "button",
|
|
59
|
+
disabled: n,
|
|
60
|
+
children: m
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
] })
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
export {
|
|
67
|
+
A as HasFileContent
|
|
68
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsxs as C, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l } from "react";
|
|
3
|
+
import { useForm as k } from "../../hooks/useForm.js";
|
|
4
|
+
import { FieldError as A } from "../fieldError/index.js";
|
|
5
|
+
import { FieldLabel as B } from "../fieldLabel/index.js";
|
|
6
|
+
import { FieldWrapper as D } from "../fieldWrapper/index.js";
|
|
7
|
+
import { HasFileContent as O } from "./hasFileContent/index.js";
|
|
8
|
+
import { NoFileContent as $ } from "./noFileContent/index.js";
|
|
9
|
+
/* empty css */
|
|
10
|
+
function Y(E) {
|
|
11
|
+
const {
|
|
12
|
+
name: s,
|
|
13
|
+
label: m,
|
|
14
|
+
showAsterisk: x = !1,
|
|
15
|
+
action: y,
|
|
16
|
+
fileName: g = "file",
|
|
17
|
+
method: q = "POST",
|
|
18
|
+
acceptFile: d = "*",
|
|
19
|
+
fileResponseName: f = "url",
|
|
20
|
+
changeFileButtonText: S = "Alterar arquivo",
|
|
21
|
+
selectFileButtonText: b = "Selecionar arquivo",
|
|
22
|
+
dropFileText: w = "Ou arraste e solte o arquivo aqui",
|
|
23
|
+
onChange: u,
|
|
24
|
+
disabled: o = !1
|
|
25
|
+
} = E, { fieldErrors: n } = k(), T = n == null ? void 0 : n[s], [j, H] = l(""), [L, c] = l(""), [e, U] = l(null), [h, F] = l(!1);
|
|
26
|
+
async function v(i) {
|
|
27
|
+
if (o) return;
|
|
28
|
+
F(!0), U(i), c("");
|
|
29
|
+
const p = new FormData();
|
|
30
|
+
p.append(g, i), await fetch(y, { method: q, body: p }).then(async (a) => await a.json()).then((a) => {
|
|
31
|
+
a != null && a.error ? c(a.error) : H(a == null ? void 0 : a[f]), u && u(a == null ? void 0 : a[f]);
|
|
32
|
+
}).catch((a) => {
|
|
33
|
+
console.error(a), c("Erro ao enviar o arquivo");
|
|
34
|
+
}).finally(() => F(!1));
|
|
35
|
+
}
|
|
36
|
+
function N(i) {
|
|
37
|
+
o || v(i);
|
|
38
|
+
}
|
|
39
|
+
const t = T || L;
|
|
40
|
+
return /* @__PURE__ */ C(D, { children: [
|
|
41
|
+
m && /* @__PURE__ */ r(B, { showAsterisk: x, children: m }),
|
|
42
|
+
/* @__PURE__ */ C("div", { className: `arkynFileUpload ${t ? "hasError" : "noHasError"} ${e ? "hasFile" : "noHasFile"}`, children: [
|
|
43
|
+
/* @__PURE__ */ r("input", { type: "hidden", name: s, value: j || "" }),
|
|
44
|
+
!e && /* @__PURE__ */ r(
|
|
45
|
+
$,
|
|
46
|
+
{
|
|
47
|
+
disabled: o,
|
|
48
|
+
isLoading: h,
|
|
49
|
+
acceptFile: d,
|
|
50
|
+
dropFileText: w,
|
|
51
|
+
handleSelectFile: N,
|
|
52
|
+
selectFileButtonText: b
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
e && /* @__PURE__ */ r(
|
|
56
|
+
O,
|
|
57
|
+
{
|
|
58
|
+
disabled: o,
|
|
59
|
+
isLoading: h,
|
|
60
|
+
acceptFile: d,
|
|
61
|
+
file: e,
|
|
62
|
+
handleSelectFile: N,
|
|
63
|
+
changeFileButtonText: S,
|
|
64
|
+
reSendFile: t && e ? () => v(e) : void 0
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] }),
|
|
68
|
+
t && /* @__PURE__ */ r(A, { children: t })
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
Y as FileUpload
|
|
73
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Button as h } from "../../button/index.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
function g(c) {
|
|
5
|
+
const {
|
|
6
|
+
dropFileText: a,
|
|
7
|
+
isLoading: s,
|
|
8
|
+
acceptFile: f,
|
|
9
|
+
handleSelectFile: i,
|
|
10
|
+
selectFileButtonText: p,
|
|
11
|
+
disabled: n
|
|
12
|
+
} = c;
|
|
13
|
+
function d(e) {
|
|
14
|
+
if (n) return;
|
|
15
|
+
e.preventDefault();
|
|
16
|
+
const t = e.dataTransfer.files[0];
|
|
17
|
+
t && i(t);
|
|
18
|
+
}
|
|
19
|
+
function u() {
|
|
20
|
+
if (n) return;
|
|
21
|
+
const e = document.createElement("input");
|
|
22
|
+
e.type = "file", e.accept = f, e.onchange = (t) => {
|
|
23
|
+
var l;
|
|
24
|
+
const o = (l = t.target.files) == null ? void 0 : l[0];
|
|
25
|
+
o && i(o);
|
|
26
|
+
}, e.click();
|
|
27
|
+
}
|
|
28
|
+
return /* @__PURE__ */ m("div", { onDrop: d, className: "arkynFileUploadNoFileContent", children: [
|
|
29
|
+
/* @__PURE__ */ r(
|
|
30
|
+
h,
|
|
31
|
+
{
|
|
32
|
+
isLoading: s,
|
|
33
|
+
onClick: u,
|
|
34
|
+
variant: "ghost",
|
|
35
|
+
size: "sm",
|
|
36
|
+
type: "button",
|
|
37
|
+
disabled: n,
|
|
38
|
+
children: p
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ r("p", { children: a })
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
g as NoFileContent
|
|
46
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as M } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, createContext as h, useContext as m } from "react";
|
|
3
|
+
import { ViewService as y } from "./_viewService.js";
|
|
4
|
+
const a = h({});
|
|
5
|
+
function d() {
|
|
6
|
+
return m(a);
|
|
7
|
+
}
|
|
8
|
+
function S(s) {
|
|
9
|
+
const {
|
|
10
|
+
blockedTimestamps: l,
|
|
11
|
+
children: u,
|
|
12
|
+
events: c,
|
|
13
|
+
defaultViewValue: v = /* @__PURE__ */ new Date(),
|
|
14
|
+
language: x = "pt-BR",
|
|
15
|
+
onChangeView: n,
|
|
16
|
+
onClickDate: w,
|
|
17
|
+
viewValue: p
|
|
18
|
+
} = s, e = new y(), o = e.listHours([8, 18]), [k, D] = f(v), t = p || k;
|
|
19
|
+
function i(r) {
|
|
20
|
+
n && n(r), D(r);
|
|
21
|
+
}
|
|
22
|
+
return /* @__PURE__ */ M(
|
|
23
|
+
a.Provider,
|
|
24
|
+
{
|
|
25
|
+
value: {
|
|
26
|
+
events: c,
|
|
27
|
+
blockedTimestamps: l,
|
|
28
|
+
viewDate: t,
|
|
29
|
+
listHours: o,
|
|
30
|
+
listWeek: e.listWeek(t, x),
|
|
31
|
+
listMonthlyMatrix: e.listMonthlyMatrix(t),
|
|
32
|
+
listWeeklyMatrix: e.listWeeklyMatrix(t, o),
|
|
33
|
+
nextMonth: () => e.nextMonth(t, i),
|
|
34
|
+
nextWeek: () => e.nextWeek(t, i),
|
|
35
|
+
nextDay: () => e.nextDay(t, i),
|
|
36
|
+
previousMonth: () => e.previousMonth(t, i),
|
|
37
|
+
previousWeek: () => e.previousWeek(t, i),
|
|
38
|
+
previousDay: () => e.previousDay(t, i),
|
|
39
|
+
onClickDate: w
|
|
40
|
+
},
|
|
41
|
+
children: u
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
S as FullCalendarProvider,
|
|
47
|
+
d as useFullCalendar
|
|
48
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
|
106
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
));
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
_ as DayCalendarEvent
|
|
79
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
);
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
y as DayCalendarRow
|
|
34
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useFullCalendar as o } from "../_fullCalendarProvider.js";
|
|
3
|
+
import { DayCalendarContainer as t } from "./dayCalendarContainer/index.js";
|
|
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 })) });
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
s as DayCalendar
|
|
11
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft as s, ChevronRight as h } from "lucide-react";
|
|
3
|
+
import { CardTabButton as t } from "../../cardTab/cardTabButton/index.js";
|
|
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
|
+
] });
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
g as FullCalendarHeader
|
|
72
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
y as FullCalendar
|
|
31
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
] });
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
i as MonthlyCalendar
|
|
13
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
));
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
y as MonthlyCalendarEvent
|
|
37
|
+
};
|
package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableBody/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useFullCalendar as e } from "../../_fullCalendarProvider.js";
|
|
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)) });
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
h as MonthlyCalendarTableBody
|
|
11
|
+
};
|
package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableContainer/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
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 }) });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
t as MonthlyCalendarTableContainer
|
|
10
|
+
};
|
package/dist/modules/components/fullCalendar/monthlyCalendar/monthlyCalendarTableHeader/index.js
ADDED
|
@@ -0,0 +1,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)) }) });
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
h as MonthlyCalendarTableHeader
|
|
11
|
+
};
|