@cwellt_software/cwellt-reactjs-lib 1.1.6 → 1.2.0
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/content/icons/new-cw-icons/NewCwIcons.html +13 -3
- package/dist/content/icons/new-cw-icons/NewCwIcons.json +10 -1
- package/dist/content/icons/new-cw-icons/css/new-cw-icons.css +39 -2
- package/dist/content/icons/new-cw-icons/fonts/NewCwIcons.woff +0 -0
- package/dist/index.cjs.js +2169 -1653
- package/dist/index.css +1 -7
- package/dist/index.d.ts +446 -327
- package/dist/index.es.js +2167 -1607
- package/dist/src/common/classes/CwSelectList.js +12 -0
- package/dist/src/common/classes/CwSelectListItems.js +14 -0
- package/dist/src/common/functions/collections.js +18 -0
- package/dist/src/common/functions/colorManipulation.js +76 -0
- package/dist/src/common/functions/dsl/UiEventDSL.js +20 -0
- package/dist/src/common/functions/useSingleAndDoubleClicks.js +28 -0
- package/dist/src/components/control/action/button/CwButton.d.ts +5 -2
- package/dist/src/components/control/action/button/CwButton.d.ts.map +1 -1
- package/dist/src/components/control/action/button/CwButton.js +13 -0
- package/dist/src/components/control/action/buttons/CwButtons.d.ts +24 -54
- package/dist/src/components/control/action/buttons/CwButtons.d.ts.map +1 -1
- package/dist/src/components/control/action/buttons/CwButtons.js +188 -0
- package/dist/src/components/control/action/contextmenu/CwAnchoredMenu.d.ts +80 -0
- package/dist/src/components/control/action/contextmenu/CwAnchoredMenu.d.ts.map +1 -0
- package/dist/src/components/control/action/contextmenu/CwContextMenu.d.ts +0 -11
- package/dist/src/components/control/action/contextmenu/CwContextMenu.d.ts.map +1 -1
- package/dist/src/components/control/action/contextmenu/CwContextMenu.js +43 -0
- package/dist/src/components/control/action/contextual-menu/CwContextualMenu.js +55 -0
- package/dist/src/components/control/action/search/CwSearch.d.ts +6 -2
- package/dist/src/components/control/action/search/CwSearch.d.ts.map +1 -1
- package/dist/src/components/control/action/search/CwSearch.js +67 -0
- package/dist/src/components/control/action/tooltip-dialog/CwTooltipDialog.js +11 -0
- package/dist/src/components/control/choice/checkbox/CwCheckbox.js +15 -0
- package/dist/src/components/control/choice/deprecated/MultiSelect_deprecated_.js +99 -0
- package/dist/src/components/control/choice/dropdown/CwDropdown.js +27 -0
- package/dist/src/components/control/choice/dropdown/CwDropdownContainer.js +30 -0
- package/dist/src/components/control/choice/dropdown/CwDropdownFilter.js +10 -0
- package/dist/src/components/control/choice/multi-filter/CwMultiFilter.d.ts +1 -5
- package/dist/src/components/control/choice/multi-filter/CwMultiFilter.d.ts.map +1 -1
- package/dist/src/components/control/choice/multi-filter/CwMultiFilter.js +298 -0
- package/dist/src/components/control/choice/multi-filter/components/tag/CwMultiFilterTag.d.ts +2 -2
- package/dist/src/components/control/choice/multi-filter/components/tag/CwMultiFilterTag.d.ts.map +1 -1
- package/dist/src/components/control/choice/multi-filter/components/tag/CwMultiFilterTag.js +17 -0
- package/dist/src/components/control/choice/multiselect/CwHeadFilter.js +80 -0
- package/dist/src/components/control/choice/multiselect/CwMultiselect.js +393 -0
- package/dist/src/components/control/choice/multiselect/CwOptionList.js +36 -0
- package/dist/src/components/control/choice/option/CwOption.js +16 -0
- package/dist/src/components/control/choice/select/CwSelect.js +36 -0
- package/dist/src/components/control/choice/toggle/CwToggle.d.ts.map +1 -1
- package/dist/src/components/control/choice/toggle/CwToggle.js +9 -0
- package/dist/src/components/control/input/any/CwInput.js +16 -0
- package/dist/src/components/control/input/color/CwColorPicker.js +210 -0
- package/dist/src/components/control/input/color/CwInputColor.js +142 -0
- package/dist/src/components/control/input/date/CwInputDate.js +29 -0
- package/dist/src/components/control/input/date-picker/CwInputDatePicker.js +109 -0
- package/dist/src/components/control/input/date-text/CwInputDateText.js +90 -0
- package/dist/src/components/control/input/datetime/CwInputDatetime.js +29 -0
- package/dist/src/components/control/input/digit/CwDigit.js +28 -0
- package/dist/src/components/control/input/file/CwFileUpload.js +52 -0
- package/dist/src/components/control/input/file/CwFileUploadMultiple.d.ts +1 -0
- package/dist/src/components/control/input/file/CwFileUploadMultiple.d.ts.map +1 -1
- package/dist/src/components/control/input/file/CwFileUploadMultiple.js +148 -0
- package/dist/src/components/control/input/image/CwInputImage.js +52 -0
- package/dist/src/components/control/input/image-area/CwImageArea.js +113 -0
- package/dist/src/components/control/input/new-dates/CwDatePicker.d.ts +44 -0
- package/dist/src/components/control/input/new-dates/CwDatePicker.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwDateRangePicker.d.ts +65 -0
- package/dist/src/components/control/input/new-dates/CwDateRangePicker.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwDateTimePicker.d.ts +47 -0
- package/dist/src/components/control/input/new-dates/CwDateTimePicker.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwDateTimePickerCompact.d.ts +46 -0
- package/dist/src/components/control/input/new-dates/CwDateTimePickerCompact.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwTimePicker.d.ts +38 -0
- package/dist/src/components/control/input/new-dates/CwTimePicker.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/dateRangePresets.d.ts +19 -0
- package/dist/src/components/control/input/new-dates/dateRangePresets.d.ts.map +1 -0
- package/dist/src/components/control/input/number/CwInputNumber.js +11 -0
- package/dist/src/components/control/input/phone/CwInputPhone.js +24 -0
- package/dist/src/components/control/input/text/CwInputText.d.ts.map +1 -1
- package/dist/src/components/control/input/text/CwInputText.js +31 -0
- package/dist/src/components/control/input/text-area/CwTextArea.js +9 -0
- package/dist/src/components/control/input/time/CwTime.js +29 -0
- package/dist/src/components/control/input/weekday/CwWeekdaySelector.js +143 -0
- package/dist/src/components/custom/find-airport/CwFindAirportComp.d.ts +4 -1
- package/dist/src/components/custom/find-airport/CwFindAirportComp.d.ts.map +1 -1
- package/dist/src/components/custom/find-airport/CwFindAirportComp.js +240 -0
- package/dist/src/components/custom/scheduler/CwSchedulerComp.js +211 -0
- package/dist/src/components/custom/scheduler/CwSuperSchedulerComp.js +269 -0
- package/dist/src/components/custom/scheduler/components/EventRender.js +142 -0
- package/dist/src/components/custom/scheduler/components/ResourceListRender.d.ts +1 -1
- package/dist/src/components/custom/scheduler/components/ResourceListRender.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/components/ResourceListRender.js +12 -0
- package/dist/src/components/custom/scheduler/components/ResourceRender.js +26 -0
- package/dist/src/components/custom/scheduler/components/day_headers/DayHeader.js +13 -0
- package/dist/src/components/custom/scheduler/components/day_headers/MonthHeader.js +12 -0
- package/dist/src/components/custom/scheduler/components/day_headers/MyDaysHeader.js +62 -0
- package/dist/src/components/custom/scheduler/components/day_headers/WeekHeader.js +13 -0
- package/dist/src/components/custom/scheduler/components/resources_title_list/ResourcesTitleList.js +24 -0
- package/dist/src/components/custom/scheduler/components/scheduler_content_area/SchedulerContentArea.js +17 -0
- package/dist/src/components/custom/scheduler/components/scheduler_header/SchedulerHeader.js +26 -0
- package/dist/src/components/custom/scheduler/components/scheduler_timeline/SchedulerTimeLine.js +23 -0
- package/dist/src/components/custom/scheduler/components/time_headers/TimeHeader.js +31 -0
- package/dist/src/components/custom/scheduler/components/time_headers/TimeHeaderRow.js +16 -0
- package/dist/src/components/custom/scheduler/components/time_line/TimeLine.js +12 -0
- package/dist/src/components/custom/scheduler/logic/dates/addMinutesToDateFromPx.js +5 -0
- package/dist/src/components/custom/scheduler/logic/dates/daysBetweenTwoDates.js +15 -0
- package/dist/src/components/custom/scheduler/logic/dates/daysBetweenTwoDatesWithoutCeil.js +5 -0
- package/dist/src/components/custom/scheduler/logic/dates/getFormatedTimeForHeader.js +43 -0
- package/dist/src/components/custom/scheduler/logic/dates/getMonthHeaderData.js +35 -0
- package/dist/src/components/custom/scheduler/logic/dates/getUtcToday.js +6 -0
- package/dist/src/components/custom/scheduler/logic/dates/getWeekHeaderDataFromWeekRange.js +20 -0
- package/dist/src/components/custom/scheduler/logic/dates/listOfDatesToWeeks.js +55 -0
- package/dist/src/components/custom/scheduler/logic/divisions/calculateDivisionType.js +13 -0
- package/dist/src/components/custom/scheduler/logic/divisions/calculateDivisions.js +16 -0
- package/dist/src/components/custom/scheduler/logic/filtering/filterEvents.js +33 -0
- package/dist/src/components/custom/scheduler/logic/filtering/filterResources.js +14 -0
- package/dist/src/components/custom/scheduler/logic/filtering/hasSameProperties.js +10 -0
- package/dist/src/components/custom/scheduler/logic/onDrop/OnDrop.js +45 -0
- package/dist/src/components/custom/scheduler/logic/pixels/getHeightLineScheduler.js +14 -0
- package/dist/src/components/custom/scheduler/logic/pixels/getPixelsForEvent.js +32 -0
- package/dist/src/components/custom/scheduler/logic/pixels/heightScheduler.js +14 -0
- package/dist/src/components/custom/scheduler/logic/pixels/heightSchedulerPinned.js +9 -0
- package/dist/src/components/custom/scheduler/logic/state_handle/doubleClickOnResource.js +5 -0
- package/dist/src/components/custom/scheduler/logic/state_handle/handleResourceChange.js +11 -0
- package/dist/src/components/custom/scheduler/logic/state_handle/onDragOver.js +9 -0
- package/dist/src/components/custom/scheduler/logic/state_handle/onDropEventToResource.js +3 -0
- package/dist/src/components/custom/scheduler/logic/strings/compareStrings.js +7 -0
- package/dist/src/components/custom/scheduler/logic/strings/getGUID.js +7 -0
- package/dist/src/components/custom/scheduler/logic/ui/checkIfSlotAvailable.js +8 -0
- package/dist/src/components/custom/scheduler/logic/ui/getEventsOfResource.js +45 -0
- package/dist/src/components/custom/scheduler/logic/ui/getTimeHeaders.js +35 -0
- package/dist/src/components/custom/scheduler/logic/ui/isAllowedToMove.js +19 -0
- package/dist/src/components/custom/scheduler/logic/ui/updateResourceVisibility.js +15 -0
- package/dist/src/components/custom/scheduler/state/CblDragAndDrop.js +18 -0
- package/dist/src/components/custom/scheduler/state/CwSchedulerProps.js +1 -0
- package/dist/src/components/custom/scheduler/state/Resource.js +18 -0
- package/dist/src/components/custom/scheduler/state/State.js +1 -0
- package/dist/src/components/custom/scheduler/state/cblEvent.js +28 -0
- package/dist/src/components/custom/scheduler/state/cblEventCompProps.js +1 -0
- package/dist/src/components/custom/scheduler/state/resourceCompProps2.js +1 -0
- package/dist/src/components/custom/scheduler-new/presentation/NewScheduler.d.ts +3 -4
- package/dist/src/components/custom/scheduler-new/presentation/NewScheduler.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/NewScheduler.js +123 -0
- package/dist/src/components/custom/scheduler-new/presentation/NewSchedulerUiEvents.d.ts +2 -1
- package/dist/src/components/custom/scheduler-new/presentation/NewSchedulerUiEvents.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/NewSchedulerUiEvents.js +118 -0
- package/dist/src/components/custom/scheduler-new/presentation/SchedulerPresenter.js +166 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/header/HeaderDivision.js +26 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/header/HeaderTitle.js +8 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/header/SchedulerHeader.js +86 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/BackgroundEvent.js +60 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.js +24 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/Event.d.ts +2 -2
- package/dist/src/components/custom/scheduler-new/presentation/components/row/Event.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/Event.js +150 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/EventSideDrag.js +11 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.d.ts +2 -2
- package/dist/src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.js +176 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/timeline/DivisionLine.js +8 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/timeline/TimeLine.js +39 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/timeline/WeekEndLine.js +8 -0
- package/dist/src/components/custom/scheduler-new/presentation/helpers.js +43 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/WeekendCalc.js +24 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/dateFromPercentage.js +7 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/eventIsVisible.js +7 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getDefaultDivisions.js +113 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getDivisions.js +21 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getEventSizes.js +30 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getLinesByDivisions.js +13 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getPercentageFromMouseEvent.d.ts +1 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getPercentageFromMouseEvent.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/getPercentageFromMouseEvent.js +7 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsToInnerRows.js +32 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/sortByCategoryAndTitle.js +12 -0
- package/dist/src/components/custom/scheduler-temporal/CwSchedulerComp2.js +267 -0
- package/dist/src/components/custom/scheduler-temporal/CwSuperSchedulerComp.js +269 -0
- package/dist/src/components/custom/scheduler-temporal/components/EventRender.js +142 -0
- package/dist/src/components/custom/scheduler-temporal/components/ResourceListRender.js +12 -0
- package/dist/src/components/custom/scheduler-temporal/components/ResourceRender.js +26 -0
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/DayHeader.js +13 -0
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/MonthHeader.js +12 -0
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/MyDaysHeader.js +62 -0
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/WeekHeader.js +13 -0
- package/dist/src/components/custom/scheduler-temporal/components/resources_title_list/ResourcesTitleList.js +22 -0
- package/dist/src/components/custom/scheduler-temporal/components/scheduler_content_area/SchedulerContentArea.js +17 -0
- package/dist/src/components/custom/scheduler-temporal/components/scheduler_header/SchedulerHeader.js +26 -0
- package/dist/src/components/custom/scheduler-temporal/components/scheduler_timeline/SchedulerTimeLine.js +23 -0
- package/dist/src/components/custom/scheduler-temporal/components/time_headers/TimeHeader.js +31 -0
- package/dist/src/components/custom/scheduler-temporal/components/time_headers/TimeHeaderRow.js +16 -0
- package/dist/src/components/custom/scheduler-temporal/components/time_line/TimeLine.js +12 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/addMinutesToDateFromPx.js +5 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/daysBetweenTwoDates.js +15 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/daysBetweenTwoDatesWithoutCeil.js +5 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getFormatedTimeForHeader.js +43 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getMonthHeaderData.js +35 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getUtcToday.js +6 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getWeekHeaderDataFromWeekRange.js +20 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/listOfDatesToWeeks.js +55 -0
- package/dist/src/components/custom/scheduler-temporal/logic/divisions/calculateDivisionType.js +13 -0
- package/dist/src/components/custom/scheduler-temporal/logic/divisions/calculateDivisions.js +16 -0
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterAndProcessResources.js +10 -0
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterEvents.js +34 -0
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterResources.js +14 -0
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/hasSameProperties.js +10 -0
- package/dist/src/components/custom/scheduler-temporal/logic/onDrop/OnDrop.js +36 -0
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/getHeightLineScheduler.js +14 -0
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/getPixelsForEvent.js +32 -0
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/heightScheduler.js +14 -0
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/heightSchedulerPinned.js +9 -0
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/doubleClickOnResource.js +5 -0
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/handlePropChanges.js +178 -0
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/handleResourceChange.js +11 -0
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onDragOver.js +9 -0
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onDropEventToResource.js +3 -0
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onResizeEvent.js +3 -0
- package/dist/src/components/custom/scheduler-temporal/logic/strings/compareStrings.js +7 -0
- package/dist/src/components/custom/scheduler-temporal/logic/strings/getGUID.js +7 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/checkIfSlotAvailable.js +9 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/getEventsOfResource.js +92 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/getHasPropsChanged.js +242 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/getTimeHeaders.js +35 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/isAllowedToMove.js +19 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/shouldTriggerScroll.js +241 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/updateResourceVisibility.js +15 -0
- package/dist/src/components/custom/scheduler-temporal/state/CblDragAndDrop.js +18 -0
- package/dist/src/components/custom/scheduler-temporal/state/Resource.js +18 -0
- package/dist/src/components/custom/scheduler-temporal/state/cblEvent.js +28 -0
- package/dist/src/components/custom/scheduler-temporal/state/cblEventCompProps.js +1 -0
- package/dist/src/components/custom/scheduler-temporal/state/resourceCompProps2.js +1 -0
- package/dist/src/components/custom/super-scheduler/PinRowHeader.d.ts +2 -2
- package/dist/src/components/custom/super-scheduler/PinRowHeader.d.ts.map +1 -1
- package/dist/src/components/custom/super-scheduler/PinRowHeader.js +53 -0
- package/dist/src/components/custom/super-scheduler/SuperScheduler.d.ts +2 -2
- package/dist/src/components/custom/super-scheduler/SuperScheduler.d.ts.map +1 -1
- package/dist/src/components/custom/super-scheduler/SuperScheduler.js +23 -0
- package/dist/src/components/custom/super-scheduler/SuperSchedulerEvents.js +15 -0
- package/dist/src/components/custom/super-scheduler/SuperSchedulerPresenter.js +45 -0
- package/dist/src/components/display/data/accordion/CwAccordionContainer.js +20 -0
- package/dist/src/components/display/data/generic_tooltip/CwGenericTooltip.d.ts +1 -0
- package/dist/src/components/display/data/generic_tooltip/CwGenericTooltip.d.ts.map +1 -1
- package/dist/src/components/display/data/generic_tooltip/CwGenericTooltip.js +138 -0
- package/dist/src/components/display/data/table/CwTable.d.ts +25 -20
- package/dist/src/components/display/data/table/CwTable.d.ts.map +1 -1
- package/dist/src/components/display/data/table/CwTable.js +203 -0
- package/dist/src/components/display/graphics/icon/CwIcon.d.ts.map +1 -1
- package/dist/src/components/display/graphics/icon/CwIcon.js +23 -0
- package/dist/src/components/display/graphics/icon/svg-icons.d.ts +6 -0
- package/dist/src/components/display/graphics/icon/svg-icons.d.ts.map +1 -0
- package/dist/src/components/display/graphics/loading/CwLoading.js +27 -0
- package/dist/src/components/display/graphics/loading-small/CwLoadingSmall.js +20 -0
- package/dist/src/components/display/text/heading/CwHeadingMain.js +5 -0
- package/dist/src/components/display/text/heading/CwHeadingSecond.js +5 -0
- package/dist/src/components/display/text/label/CwLabel.d.ts +1 -4
- package/dist/src/components/display/text/label/CwLabel.d.ts.map +1 -1
- package/dist/src/components/display/text/label/CwLabel.js +13 -0
- package/dist/src/components/display/text/message/CwMessage.js +75 -0
- package/dist/src/components/display/text/note/CwNote.js +78 -0
- package/dist/src/components/display/text/tag/CwChip.d.ts.map +1 -1
- package/dist/src/components/display/text/tag/CwChip.js +57 -0
- package/dist/src/components/display/text/tag/CwTag.js +21 -0
- package/dist/src/components/display/text/tooltip/CwTooltip.js +4 -0
- package/dist/src/components/layout/align/CwAlign.js +54 -0
- package/dist/src/components/layout/card/CwCard.js +55 -0
- package/dist/src/components/layout/card/CwCardList.js +38 -0
- package/dist/src/components/layout/dialog/CwDialog.d.ts.map +1 -1
- package/dist/src/components/layout/dialog/CwDialog.js +255 -0
- package/dist/src/components/layout/dialog/CwDialogManager.js +44 -0
- package/dist/src/components/layout/list/details/CwExpandable.js +28 -0
- package/dist/src/components/layout/list/key-value/CwKeyValueList.d.ts +2 -3
- package/dist/src/components/layout/list/key-value/CwKeyValueList.d.ts.map +1 -1
- package/dist/src/components/layout/list/key-value/CwKeyValueList.js +23 -0
- package/dist/src/components/layout/list/sortable/CwSortableList.js +73 -0
- package/dist/src/components/layout/list/sortable/useSortableList.js +53 -0
- package/dist/src/components/layout/modal/CwModalReportFunctional.d.ts.map +1 -1
- package/dist/src/components/layout/modal/CwModalReportFunctional.js +23 -0
- package/dist/src/components/layout/modal/hover/CwModalHover.js +61 -0
- package/dist/src/components/layout/modal/legacy/cw_modal.d.ts +4 -0
- package/dist/src/components/layout/modal/legacy/cw_modal.d.ts.map +1 -1
- package/dist/src/components/layout/modal/legacy/cw_modal.js +44 -0
- package/dist/src/components/layout/modal/legacy/cw_modal_confirm.js +39 -0
- package/dist/src/components/layout/modal/legacy/cw_modal_iframe.js +44 -0
- package/dist/src/components/layout/modal/legacy/cw_modal_report.js +26 -0
- package/dist/src/components/layout/table/grouped/CwTableGrouped.js +70 -0
- package/dist/src/components/layout/tabs/CwTabs.d.ts +2 -0
- package/dist/src/components/layout/tabs/CwTabs.d.ts.map +1 -1
- package/dist/src/components/layout/tabs/CwTabs.js +53 -0
- package/dist/src/dev/palette.d.ts +1 -1
- package/dist/src/dev/palette.d.ts.map +1 -1
- package/dist/src/index.d.ts +8 -12
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +187 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/getDefaultDivisions.test.js +48 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/hoursBetween.test.js +15 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/monthDivisions.test.js +42 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/weekendCalc.test.js +30 -0
- package/dist/test/components/custom/scheduler/addMinutesToDateFromPx.test.js +43 -0
- package/dist/test/components/custom/scheduler/checkIfSlotAvailable.test.js +30 -0
- package/dist/test/components/custom/scheduler/daysBetweenTwoDates.test.js +61 -0
- package/dist/test/components/custom/scheduler/daysBetweenTwoDatesWithoutCeilForEvent.test.js +27 -0
- package/dist/test/components/custom/scheduler/getGUID.test.js +30 -0
- package/dist/test/components/custom/scheduler/getPixelsForEvent.test.js +38 -0
- package/dist/test/components/custom/scheduler/getTimeHeaders.test.js +35 -0
- package/dist/test/components/custom/scheduler/hasSameProperties.test.js +51 -0
- package/dist/test/components/custom/scheduler/isAllowedToMove.test.js +28 -0
- package/dist/test/components/custom/scheduler/listOfDatesToWeeks.test.js +72 -0
- package/dist/test/jest.setup.js +1 -0
- package/package.json +11 -12
- package/dist/assets/asset-DnHaq7m- +0 -50
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-full-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-grad-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-opsz-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-slnt-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-standard-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-wdth-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-xopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-xtra-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-yopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytas-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytde-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytfi-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytlc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytuc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-full-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-grad-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-opsz-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-slnt-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-standard-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-wdth-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-wght-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-xopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-xtra-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-yopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytas-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytde-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytfi-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytlc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytuc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-full-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-grad-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-opsz-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-slnt-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-standard-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-wdth-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-wght-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-xopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-xtra-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-yopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytas-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytde-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytfi-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytlc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytuc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-full-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-grad-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-opsz-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-slnt-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-standard-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-wdth-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-wght-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-xopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-xtra-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-yopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytas-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytde-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytfi-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytlc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytuc-normal.woff2 +0 -0
- package/dist/content/icons/cw-icons/css/cw-icons.css +0 -2784
- package/dist/content/icons/cw-icons/fonts/cwAvinodeFont/CblAvinodeIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwAvinodeFont/CblAvinodeIcon.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwAvinodeFont/CblAvinodeIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwAvinodeFont/CblAvinodeIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.svg +0 -38
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.svg +0 -29
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblCrewControlReact.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblCrewControlReact.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblCrewControlReact.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblCrewControlReact.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblDutyIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblDutyIcon.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblDutyIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblDutyIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/SessionWarning.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/SessionWarning.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/SessionWarning.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/SessionWarning.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.svg +0 -26
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrol.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrol.svg +0 -13
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrol.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrol.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.svg +0 -29
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.svg +0 -29
- package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.svg +0 -17
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.svg +0 -20
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewSchedulingFont.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewSchedulingFont.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewSchedulingFont.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewSchedulingFont.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.svg +0 -20
- package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/ArchiveEmanual.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/ArchiveEmanual.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/ArchiveEmanual.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/ArchiveEmanual.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/CblEmanualNewIcons.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/CblEmanualNewIcons.svg +0 -14
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/CblEmanualNewIcons.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/CblEmanualNewIcons.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.svg +0 -38
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualApprovedFile.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualApprovedFile.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualApprovedFile.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualApprovedFile.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.svg +0 -17
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMarkLink.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMarkLink.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMarkLink.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMarkLink.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFolder.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFolder.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFolder.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFolder.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFont.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFont.svg +0 -13
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFont.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFont.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.svg +0 -32
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPendingIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPendingIcon.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPendingIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPendingIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishFile.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishFile.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishFile.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishFile.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishIconFile.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishIconFile.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishIconFile.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishIconFile.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrash.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrash.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrash.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrash.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrashRight.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrashRight.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrashRight.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrashRight.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/LibraryIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/LibraryIcon.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/LibraryIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/LibraryIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.svg +0 -158
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/cwellt_icon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/cwellt_icon.svg +0 -18
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/cwellt_icon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/cwellt_icon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.svg +0 -62
- package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesIcons/CblFavoritesIcons.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesIcons/CblFavoritesIcons.svg +0 -43
- package/dist/content/icons/cw-icons/fonts/cwFavoritesIcons/CblFavoritesIcons.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesIcons/CblFavoritesIcons.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFgIconsFonts/CblFigIcons.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFgIconsFonts/CblFigIcons.svg +0 -49
- package/dist/content/icons/cw-icons/fonts/cwFgIconsFonts/CblFigIcons.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFgIconsFonts/CblFigIcons.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.svg +0 -41
- package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/CblUndoIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/CblUndoIcon.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/CblUndoIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/CblUndoIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/FlightWatchOnTimeIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/FlightWatchOnTimeIcon.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/FlightWatchOnTimeIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/FlightWatchOnTimeIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.svg +0 -41
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/IDCardStatusIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/IDCardStatusIcon.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/IDCardStatusIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/IDCardStatusIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.svg +0 -17
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/calculator.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/calculator.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/calculator.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/calculator.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/icons_cwellt.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/icons_cwellt.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/icons_cwellt.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/icons_cwellt.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwOpstoolReactFont/opstoolReactIcons.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwOpstoolReactFont/opstoolReactIcons.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwOpstoolReactFont/opstoolReactIcons.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwOpstoolReactFont/opstoolReactIcons.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.svg +0 -17
- package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.svg +0 -50
- package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.svg +0 -17
- package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.woff2 +0 -0
- package/dist/content/icons/font-awesome/webfonts/fa-brands-400.ttf +0 -0
- package/dist/content/icons/font-awesome/webfonts/fa-regular-400.ttf +0 -0
- package/dist/content/icons/font-awesome/webfonts/fa-solid-900.ttf +0 -0
- package/dist/content/icons/font-awesome/webfonts/fa-v4compatibility.ttf +0 -0
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.css.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.esm.js +0 -4836
- package/dist/src/common/functions/reactor.d.ts +0 -2
- package/dist/src/common/functions/reactor.d.ts.map +0 -1
- package/dist/src/components/control/input/chipper/CwChip.d.ts +0 -12
- package/dist/src/components/control/input/chipper/CwChip.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/components/ClearSchedulerButton.d.ts +0 -8
- package/dist/src/components/custom/scheduler/components/ClearSchedulerButton.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/filtering/filterAndProcessResources.d.ts +0 -14
- package/dist/src/components/custom/scheduler/logic/filtering/filterAndProcessResources.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/pixels/calculateMaxPxFromDateRange.d.ts +0 -2
- package/dist/src/components/custom/scheduler/logic/pixels/calculateMaxPxFromDateRange.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/state_handle/handleDateChange.d.ts +0 -5
- package/dist/src/components/custom/scheduler/logic/state_handle/handleDateChange.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/state_handle/handlePropChanges.d.ts +0 -5
- package/dist/src/components/custom/scheduler/logic/state_handle/handlePropChanges.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/state_handle/onResizeEvent.d.ts +0 -3
- package/dist/src/components/custom/scheduler/logic/state_handle/onResizeEvent.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/ui/getHasPropsChanged.d.ts +0 -3
- package/dist/src/components/custom/scheduler/logic/ui/getHasPropsChanged.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/ui/shouldTriggerScroll.d.ts +0 -3
- package/dist/src/components/custom/scheduler/logic/ui/shouldTriggerScroll.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/state/EventProps.d.ts +0 -7
- package/dist/src/components/custom/scheduler/state/EventProps.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/BackgrounEvent.d.ts +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/BackgrounEvent.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/cancellablePromise.d.ts +0 -7
- package/dist/src/components/custom/scheduler-new/presentation/components/row/cancellablePromise.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/useCancellablePromise.d.ts +0 -7
- package/dist/src/components/custom/scheduler-new/presentation/components/row/useCancellablePromise.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsByResource.d.ts +0 -5
- package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsByResource.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/external/Event.d.ts +0 -9
- package/dist/src/components/custom/scheduler-new/presentation/state/external/Event.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/external/Row.d.ts +0 -5
- package/dist/src/components/custom/scheduler-new/presentation/state/external/Row.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/EventSideDragState.d.ts +0 -6
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/EventSideDragState.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/HeaderDivision.d.ts +0 -5
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/HeaderDivision.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerEventState.d.ts +0 -14
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerEventState.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerHeaderState.d.ts +0 -11
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerHeaderState.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerRow.d.ts +0 -8
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerRow.d.ts.map +0 -1
- package/dist/test/components/custom/newScheduler/presentation/logic/getDefaultDivisions.test.d.ts.map +0 -1
- package/dist/test/components/custom/scheduler/calculateMaxPxFromDateRange.test.d.ts +0 -2
- package/dist/test/components/custom/scheduler/calculateMaxPxFromDateRange.test.d.ts.map +0 -1
- package/dist/test/components/custom/scheduler/filterEvents.test.d.ts.map +0 -1
- package/dist/test/components/custom/scheduler/shouldTriggerScroll.test.d.ts.map +0 -1
- package/dist/test/example.test.d.ts +0 -1
- package/dist/test/example.test.d.ts.map +0 -1
- /package/dist/src/{components/custom/scheduler-new/presentation/TestScheduler.d.ts → common/interfaces/CwSelectListProps.js} +0 -0
- /package/dist/{test/components/custom/newScheduler/presentation/logic/getDefaultDivisions.test.d.ts → src/components/custom/scheduler-new/presentation/components/header/SchedulerHeaderState.js} +0 -0
- /package/dist/{test/components/custom/newScheduler/presentation/logic/hoursBetween.test.d.ts → src/components/custom/scheduler-new/presentation/state/ui/SchedulerState.js} +0 -0
- /package/dist/{test/components/custom/newScheduler/presentation/logic/weekendCalc.test.d.ts → src/components/custom/scheduler-new/presentation/state/ui/WeekRange.js} +0 -0
- /package/dist/{test/components/custom/scheduler/filterEvents.test.d.ts → src/components/custom/scheduler-temporal/state/CwSchedulerProps.js} +0 -0
- /package/dist/{test/components/custom/scheduler/shouldTriggerScroll.test.d.ts → src/components/custom/scheduler-temporal/state/State.js} +0 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Dropdown } from "antd";
|
|
3
|
+
import { memo, useState } from "react";
|
|
4
|
+
import useSingleAndDoubleClicks from "../../../../../../common/functions/useSingleAndDoubleClicks";
|
|
5
|
+
import { OnClickContextMenu, OnClickRowEvent, OnDoubleClickRowEvent, OnDropCtrlEvent, OnDropEvent, OnRightClickRow, } from "../../NewSchedulerUiEvents";
|
|
6
|
+
import { dateFromPercentage } from "../../logic/dateFromPercentage";
|
|
7
|
+
import { getPercentageFromMouseEvent } from "../../logic/getPercentageFromMouseEvent";
|
|
8
|
+
import { separateEventsToInnerRows } from "../../logic/separateEventsToInnerRows";
|
|
9
|
+
import { DivisionLine } from "../timeline/DivisionLine";
|
|
10
|
+
import { TimeLine } from "../timeline/TimeLine";
|
|
11
|
+
import { WeekEndLine } from "../timeline/WeekEndLine";
|
|
12
|
+
import { BackgroundEvent } from "./BackgroundEvent";
|
|
13
|
+
import { DefaultRowHeader } from "./DefaultRowHeader";
|
|
14
|
+
import { SchedulerEvent } from "./Event";
|
|
15
|
+
const onClickMenuItem = (e, event) => {
|
|
16
|
+
e.domEvent.nativeEvent.preventDefault();
|
|
17
|
+
e.domEvent.nativeEvent.stopPropagation();
|
|
18
|
+
e.domEvent.nativeEvent.stopImmediatePropagation();
|
|
19
|
+
e.domEvent.preventDefault();
|
|
20
|
+
e.domEvent.stopPropagation();
|
|
21
|
+
event();
|
|
22
|
+
};
|
|
23
|
+
export const SchedulerRow = memo((props) => {
|
|
24
|
+
const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);
|
|
25
|
+
const { events, backgroundEvents, rowHeader, contextMenuItems, RowTitleComp, EventComp, BackgroundEventComp, weekendLines, divisionLines, timeLinePercentage, selectedDate, visibleDays, onEvent, } = props;
|
|
26
|
+
const internalRows = separateEventsToInnerRows(events);
|
|
27
|
+
const { handleClick, handleDoubleClick } = useSingleAndDoubleClicks((e) => {
|
|
28
|
+
e.stopPropagation();
|
|
29
|
+
e.preventDefault();
|
|
30
|
+
onEvent(new OnClickRowEvent(rowHeader.value.rowId));
|
|
31
|
+
}, (e) => {
|
|
32
|
+
e.stopPropagation();
|
|
33
|
+
e.preventDefault();
|
|
34
|
+
onEvent(new OnDoubleClickRowEvent(rowHeader.value.rowId));
|
|
35
|
+
});
|
|
36
|
+
return (_jsxs("div", { style: {
|
|
37
|
+
display: "flex",
|
|
38
|
+
minHeight: props.rowHeightInRem + "rem",
|
|
39
|
+
}, children: [_jsx(RowTitleComp, { ...rowHeader }), _jsx(Dropdown, { open: isContextMenuOpen, onOpenChange: setIsContextMenuOpen, placement: "bottom", menu: {
|
|
40
|
+
items: contextMenuItems,
|
|
41
|
+
onClick: (e) => {
|
|
42
|
+
onClickMenuItem(e, () => {
|
|
43
|
+
onEvent(new OnClickContextMenu(rowHeader.value.rowId, e.key));
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
onMouseLeave: () => setIsContextMenuOpen(false),
|
|
47
|
+
}, trigger: ["contextMenu"], overlayStyle: { animationDuration: "0" }, arrow: (contextMenuItems?.length ?? 0) > 0, children: _jsxs("div", { style: {
|
|
48
|
+
flex: 1,
|
|
49
|
+
display: "flex",
|
|
50
|
+
flexDirection: "column",
|
|
51
|
+
position: "relative",
|
|
52
|
+
}, onDrop: (e) => {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
const percentage = getPercentageFromMouseEvent(e);
|
|
55
|
+
const date = dateFromPercentage(selectedDate, visibleDays, percentage);
|
|
56
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/NavigatorUAData/platform
|
|
57
|
+
// change for navigator.userAgentData.platform when acepted in all browsers
|
|
58
|
+
const isMac = navigator.platform.toUpperCase().includes("MAC");
|
|
59
|
+
const isCtrlOrAltPressed = isMac ? e.altKey : e.ctrlKey;
|
|
60
|
+
if (isCtrlOrAltPressed) {
|
|
61
|
+
onEvent(new OnDropCtrlEvent(rowHeader.value.rowId, date));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
onEvent(new OnDropEvent(rowHeader.value.rowId, date));
|
|
65
|
+
}
|
|
66
|
+
}, onDragOver: (e) => {
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
}, onClick: handleClick, onDoubleClick: handleDoubleClick, onContextMenu: (e) => {
|
|
69
|
+
e.preventDefault();
|
|
70
|
+
e.stopPropagation();
|
|
71
|
+
const percentage = getPercentageFromMouseEvent(e);
|
|
72
|
+
const date = dateFromPercentage(selectedDate, visibleDays, percentage);
|
|
73
|
+
onEvent(new OnRightClickRow(rowHeader.value.rowId, date));
|
|
74
|
+
}, children: [weekendLines.map((weekend) => (_jsx(WeekEndLine, { height: "100%", left: weekend.left, widthPercentage: weekend.width }, weekend.left))), divisionLines.map((division) => (_jsx(DivisionLine, { height: "100%", left: division.left }, division.left))), backgroundEvents.length > 0 && backgroundEvents.some((e) => e.isVisible) && (_jsx("div", { style: {
|
|
75
|
+
height: "100%",
|
|
76
|
+
position: internalRows.length > 0 ? "absolute" : "relative",
|
|
77
|
+
width: "100%",
|
|
78
|
+
pointerEvents: "none",
|
|
79
|
+
}, children: backgroundEvents.map((event) => {
|
|
80
|
+
return _jsx(BackgroundEventComp, { value: { ...event }, onEvent: onEvent, heightRem: props.rowHeightInRem * Math.max(1, internalRows.length) }, event.id);
|
|
81
|
+
}) })), backgroundEvents.length === 0 && internalRows.length === 0 && (_jsx("div", { style: { position: "relative", height: props.rowHeightInRem + "rem" } })), internalRows.map((internalRow, index) => {
|
|
82
|
+
return (_jsx("div", { style: {
|
|
83
|
+
position: "relative",
|
|
84
|
+
height: props.rowHeightInRem + "rem",
|
|
85
|
+
pointerEvents: "none"
|
|
86
|
+
}, children: internalRow.map((event) => (_jsx(EventComp, { value: event, heightRem: props.rowHeightInRem, onEvent: onEvent }, event.id))) }, index));
|
|
87
|
+
}), !(timeLinePercentage < 0 || timeLinePercentage > 100) && (_jsx(TimeLine, { color: "red", left: `${timeLinePercentage}%`, top: "0px", height: `100%` }))] }) }, rowHeader.value.rowId)] }));
|
|
88
|
+
}, (prevProps, nextProps) => {
|
|
89
|
+
// This memo is necessary to prevent re-render all the rows when a user makes drag and drop
|
|
90
|
+
const getEventKey = (event) => {
|
|
91
|
+
// Adjust these properties based on what uniquely identifies an event in your application
|
|
92
|
+
return `${event.id}-${event.startDate}-${event.endDate}`;
|
|
93
|
+
};
|
|
94
|
+
if (prevProps.timeLinePercentage != nextProps.timeLinePercentage) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
if (prevProps.rowHeader !== nextProps.rowHeader) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
// Create Sets of event keys for efficient comparison
|
|
101
|
+
const prevEventKeys = new Set(prevProps.events.map((it) => getEventKey(it)));
|
|
102
|
+
const nextEventKeys = new Set(nextProps.events.map((it) => getEventKey(it)));
|
|
103
|
+
// Check if both sets have the same size
|
|
104
|
+
if (prevEventKeys.size !== nextEventKeys.size) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
// Check if every event in prevProps exists in nextProps
|
|
108
|
+
for (const eventKey of prevEventKeys) {
|
|
109
|
+
if (!nextEventKeys.has(eventKey)) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// If we got here, the events are the same
|
|
114
|
+
return true;
|
|
115
|
+
});
|
|
116
|
+
export const SchedulerRowPreview = () => {
|
|
117
|
+
const logOnEvent = (event) => {
|
|
118
|
+
console.log("Event:", event);
|
|
119
|
+
};
|
|
120
|
+
const events = [
|
|
121
|
+
{
|
|
122
|
+
id: "event-1",
|
|
123
|
+
name: "Sample Event",
|
|
124
|
+
rowId: "1",
|
|
125
|
+
color: "#4287f5",
|
|
126
|
+
startDate: new Date(),
|
|
127
|
+
endDate: new Date(Date.now() + 3600000),
|
|
128
|
+
isResizable: true,
|
|
129
|
+
isDraggable: true,
|
|
130
|
+
left: 0,
|
|
131
|
+
width: 100,
|
|
132
|
+
tooltip: _jsx("div", { children: "Sample Tooltip" }),
|
|
133
|
+
selected: false,
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: `${it}`,
|
|
137
|
+
name: `event ${it}`,
|
|
138
|
+
rowId: `${it}`,
|
|
139
|
+
color: "red",
|
|
140
|
+
startDate: new Date("2024-12-03T18:40:00.000Z"),
|
|
141
|
+
endDate: new Date("2024-12-03T18:50:00.000Z"),
|
|
142
|
+
isResizable: true,
|
|
143
|
+
isDraggable: true,
|
|
144
|
+
left: 0,
|
|
145
|
+
width: 30,
|
|
146
|
+
tooltip: _jsx("div", { children: "Sample Tooltip" }),
|
|
147
|
+
selected: false,
|
|
148
|
+
},
|
|
149
|
+
];
|
|
150
|
+
return (_jsx(SchedulerRow, { EventComp: SchedulerEvent, events: events, backgroundEvents: [
|
|
151
|
+
{
|
|
152
|
+
id: "event-1",
|
|
153
|
+
name: "Sample Event",
|
|
154
|
+
rowId: "1",
|
|
155
|
+
isResizable: false,
|
|
156
|
+
isDraggable: false,
|
|
157
|
+
color: "#4287f5",
|
|
158
|
+
startDate: new Date(),
|
|
159
|
+
endDate: new Date(Date.now() + 3600000),
|
|
160
|
+
left: 0,
|
|
161
|
+
width: 100,
|
|
162
|
+
tooltip: _jsx("div", { children: "Sample Tooltip" }),
|
|
163
|
+
isVisible: true,
|
|
164
|
+
selected: false,
|
|
165
|
+
},
|
|
166
|
+
], onEvent: logOnEvent, RowTitleComp: DefaultRowHeader, rowHeader: {
|
|
167
|
+
value: {
|
|
168
|
+
rowId: "1",
|
|
169
|
+
title: "Default Header",
|
|
170
|
+
},
|
|
171
|
+
width: 200,
|
|
172
|
+
onEvent: () => {
|
|
173
|
+
},
|
|
174
|
+
}, BackgroundEventComp: BackgroundEvent, rowHeightInRem: 2, timeLinePercentage: 50, weekendLines: [], divisionLines: [], visibleDays: 3, selectedDate: new Date() }));
|
|
175
|
+
};
|
|
176
|
+
export default SchedulerRow;
|
package/dist/src/components/custom/scheduler-new/presentation/components/timeline/DivisionLine.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TimeLine } from "./TimeLine";
|
|
3
|
+
export const DivisionLine = ({ left, top = "0px", height }) => {
|
|
4
|
+
return (_jsx(TimeLine, { color: "rgba(255,255,255,1)", left: left + "%", height: height, width: 1 + "px", top: top }));
|
|
5
|
+
};
|
|
6
|
+
export const _preview = () => {
|
|
7
|
+
return (_jsx("div", { style: { height: "100px" }, children: _jsx(DivisionLine, { left: 100, height: "100px" }) }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import styles from "../../styles/scheduler-header.module.css";
|
|
4
|
+
const getNow = (isUtc) => {
|
|
5
|
+
let now = new Date();
|
|
6
|
+
if (isUtc) {
|
|
7
|
+
now = new Date(now.getTime() + now.getTimezoneOffset() * 60_000);
|
|
8
|
+
}
|
|
9
|
+
return now;
|
|
10
|
+
};
|
|
11
|
+
export const TimeLine = ({ left, top = "0px", height, color, width = "2px", zIndexNumber = 0, isHeader, isUtc = false }) => {
|
|
12
|
+
const [currentTime, setCurrentTime] = useState(getNow(isUtc));
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const interval = setInterval(() => {
|
|
15
|
+
setCurrentTime(getNow(isUtc));
|
|
16
|
+
}, 60000); // Actualiza cada minuto
|
|
17
|
+
return () => clearInterval(interval);
|
|
18
|
+
}, [isUtc]);
|
|
19
|
+
const timeString = currentTime.toLocaleTimeString([], {
|
|
20
|
+
hour: '2-digit',
|
|
21
|
+
minute: '2-digit',
|
|
22
|
+
hour12: false
|
|
23
|
+
});
|
|
24
|
+
return (_jsx("div", { style: {
|
|
25
|
+
position: "absolute",
|
|
26
|
+
top: top,
|
|
27
|
+
height: height,
|
|
28
|
+
left: left,
|
|
29
|
+
width: width,
|
|
30
|
+
background: color,
|
|
31
|
+
pointerEvents: "none",
|
|
32
|
+
zIndex: zIndexNumber,
|
|
33
|
+
}, className: styles["scheduler-timeline-now"], children: isHeader && (_jsx("span", { style: {
|
|
34
|
+
color: color,
|
|
35
|
+
}, className: styles["scheduler-timeline-label"], children: timeString })) }));
|
|
36
|
+
};
|
|
37
|
+
export const _preview = () => {
|
|
38
|
+
return (_jsx("div", { style: { height: "100px" }, children: _jsx(TimeLine, { color: "red", left: "100px", height: "100px" }) }));
|
|
39
|
+
};
|
package/dist/src/components/custom/scheduler-new/presentation/components/timeline/WeekEndLine.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TimeLine } from "./TimeLine";
|
|
3
|
+
export const WeekEndLine = ({ left, top = "0px", height, widthPercentage }) => {
|
|
4
|
+
return (_jsx(TimeLine, { color: "rgba(0,0,0,0.05)", left: left + "%", height: height, width: widthPercentage + "%", top: top }));
|
|
5
|
+
};
|
|
6
|
+
export const _preview = () => {
|
|
7
|
+
return (_jsx("div", { style: { height: "100px" }, children: _jsx(WeekEndLine, { left: 100, height: "100px", widthPercentage: 20 }) }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import moment from "moment";
|
|
2
|
+
export const getListOfNumbers = (len) => Array(len)
|
|
3
|
+
.fill(0)
|
|
4
|
+
.map((_, idx) => idx);
|
|
5
|
+
const getRandomColor = () => {
|
|
6
|
+
return "#" + (0x1000000 + Math.random() * 0xffffff).toString(16).substr(1, 6);
|
|
7
|
+
};
|
|
8
|
+
export const getRandomEvents = (date, visibleDays, resourceId) => {
|
|
9
|
+
return getListOfNumbers(visibleDays).map((e) => {
|
|
10
|
+
const len1 = Math.floor(Math.random() * 24) + 1;
|
|
11
|
+
const moment1 = moment(date).add(e, "days").add(e, "minutes");
|
|
12
|
+
const len2 = Math.floor(Math.random() * 25) + 1;
|
|
13
|
+
return {
|
|
14
|
+
id: crypto.randomUUID(),
|
|
15
|
+
rowId: resourceId.toString(),
|
|
16
|
+
name: "API Design",
|
|
17
|
+
color: getRandomColor(),
|
|
18
|
+
startDate: moment1.add(-len1, "hour").toDate(),
|
|
19
|
+
endDate: moment1.add(len2, "hour").toDate(),
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
export const isLight = (color) => {
|
|
24
|
+
// extract values of red, green and blue from color
|
|
25
|
+
const clrarr = color.match(/\d+/g)?.map((num) => +num);
|
|
26
|
+
// Check if clrarr is valid and has the necessary values
|
|
27
|
+
if (clrarr && clrarr.length === 3) {
|
|
28
|
+
if (clrarr[0] + clrarr[1] + clrarr[2] >= (255 * 3) / 2)
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
};
|
|
33
|
+
export function hexToRGB(hex) {
|
|
34
|
+
hex = hex.replaceAll("#", "").trim();
|
|
35
|
+
const r = parseInt(hex.slice(0, 2), 16);
|
|
36
|
+
const g = parseInt(hex.slice(2, 4), 16);
|
|
37
|
+
const b = parseInt(hex.slice(4, 6), 16);
|
|
38
|
+
return { r, g, b };
|
|
39
|
+
}
|
|
40
|
+
export const getColorLuminanceOf = (r, g, b, a = 1) => {
|
|
41
|
+
a; // discard
|
|
42
|
+
return 0.299 * r + 0.587 * g + 0.114 * b;
|
|
43
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getEventSizes } from "./getEventSizes";
|
|
2
|
+
export const getWeekendLinesByDatesVisible = (initialDate, visibleDays) => {
|
|
3
|
+
const dateString = initialDate.toISOString().split('T')[0];
|
|
4
|
+
const todayAtO = new Date(dateString);
|
|
5
|
+
const days = getWeekendsDaysInDateRange(todayAtO, visibleDays);
|
|
6
|
+
return days.map(it => {
|
|
7
|
+
const endDate = new Date(it);
|
|
8
|
+
endDate.setDate(it.getDate() + 1);
|
|
9
|
+
const weekLine = getEventSizes(initialDate, visibleDays, it, endDate);
|
|
10
|
+
return weekLine;
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export const getWeekendsDaysInDateRange = (initialDate, visibleDays) => {
|
|
14
|
+
const weekends = [];
|
|
15
|
+
for (let i = 0; i < visibleDays; i++) {
|
|
16
|
+
const currentDate = new Date(initialDate);
|
|
17
|
+
currentDate.setDate(initialDate.getDate() + i);
|
|
18
|
+
const dayOfWeek = currentDate.getDay(); // 0 is Sunday, 6 is Saturday
|
|
19
|
+
if (dayOfWeek === 0 || dayOfWeek === 6) {
|
|
20
|
+
weekends.push(currentDate);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return weekends;
|
|
24
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import moment from "moment";
|
|
2
|
+
export function dateFromPercentage(startDate, visibleDays, percentage) {
|
|
3
|
+
const endTime = moment(startDate).add(visibleDays, "day").toDate();
|
|
4
|
+
const timeSpan = endTime.getTime() - startDate.getTime();
|
|
5
|
+
const clickedDate = new Date(startDate.getTime() + (timeSpan * percentage));
|
|
6
|
+
return clickedDate;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import moment from "moment";
|
|
2
|
+
export const eventIsVisible = (startDate, endDate, selectedDate, visibleDays) => {
|
|
3
|
+
const schedulerEnd = moment(selectedDate).add(visibleDays, "days").toDate();
|
|
4
|
+
const isBefore = selectedDate > startDate && selectedDate > endDate;
|
|
5
|
+
const isAfter = schedulerEnd < startDate && schedulerEnd < endDate;
|
|
6
|
+
return !isBefore && !isAfter;
|
|
7
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import moment from "moment";
|
|
2
|
+
import { calculateDivisionsByDays, getHoursFromDivisions } from "./getDivisions";
|
|
3
|
+
export const getDefaultDivisions = (visibleDays, selectedDate) => {
|
|
4
|
+
if (visibleDays <= 15) {
|
|
5
|
+
return getDayDivisions(visibleDays, selectedDate);
|
|
6
|
+
}
|
|
7
|
+
if (visibleDays <= 30) {
|
|
8
|
+
return getWeekDivisions(visibleDays, selectedDate);
|
|
9
|
+
}
|
|
10
|
+
// from 31 to infinity
|
|
11
|
+
return getMonthDivisions(visibleDays, selectedDate);
|
|
12
|
+
};
|
|
13
|
+
const getDayDivisions = (visibleDays, selectedDate) => {
|
|
14
|
+
const divisionsNumber = calculateDivisionsByDays(visibleDays);
|
|
15
|
+
const divisions = getHoursFromDivisions(divisionsNumber);
|
|
16
|
+
const calculatedDivision = [];
|
|
17
|
+
for (let i = 0; i < visibleDays; i++) {
|
|
18
|
+
const currentDate = moment(selectedDate).add(i, "days");
|
|
19
|
+
calculatedDivision.push({
|
|
20
|
+
top: currentDate.format("DD.MM.YYYY"),
|
|
21
|
+
bottom: divisions,
|
|
22
|
+
startDate: currentDate.toDate(),
|
|
23
|
+
endDate: currentDate.toDate()
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return calculatedDivision;
|
|
27
|
+
};
|
|
28
|
+
const getWeekDivisions = (visibleDays, selectedDate) => {
|
|
29
|
+
const weeks = getWeeksByDays(visibleDays, selectedDate);
|
|
30
|
+
const divisions = weeks.map((week) => {
|
|
31
|
+
const days = Array.from({ length: week.days }, (_, i) => moment(week.start).add(i, "days").date().toString());
|
|
32
|
+
const weekEnd = moment(week.start).add(week.days - 1, "days");
|
|
33
|
+
const top = days.length > 2
|
|
34
|
+
? moment(week.start).format("DD.MM.YYYY") + " - " + moment(week.start).add(week.days - 1, "days").format("DD.MM.YYYY")
|
|
35
|
+
: moment(week.start).format("DD.MM.YYYY");
|
|
36
|
+
const division = {
|
|
37
|
+
top: top,
|
|
38
|
+
bottom: days,
|
|
39
|
+
startDate: moment(week.start).toDate(),
|
|
40
|
+
endDate: weekEnd.toDate()
|
|
41
|
+
};
|
|
42
|
+
return division;
|
|
43
|
+
});
|
|
44
|
+
return divisions;
|
|
45
|
+
};
|
|
46
|
+
const getMonthDivisions = (visibleDays, selectedDate) => {
|
|
47
|
+
const months = getMonthsByDays(visibleDays, selectedDate);
|
|
48
|
+
const divisions = months.map((month) => {
|
|
49
|
+
const days = Array.from({ length: month.days }, (_, i) => moment(month.start).add(i, "days").date().toString());
|
|
50
|
+
const monthEnd = moment(month.start).add(month.days - 1, "days");
|
|
51
|
+
const division = {
|
|
52
|
+
top: moment(month.start).format("MM.YYYY"),
|
|
53
|
+
bottom: days,
|
|
54
|
+
startDate: moment(month.start).toDate(), // Añadir fecha de inicio
|
|
55
|
+
endDate: monthEnd.toDate()
|
|
56
|
+
};
|
|
57
|
+
return division;
|
|
58
|
+
});
|
|
59
|
+
return divisions;
|
|
60
|
+
};
|
|
61
|
+
export const getMonthsByDays = (visibleDays, selectedDate) => {
|
|
62
|
+
if (visibleDays <= 0) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
const month = [];
|
|
66
|
+
let temporalDay = moment(selectedDate);
|
|
67
|
+
for (let i = 0; i < visibleDays; i++) {
|
|
68
|
+
const currentDay = moment(selectedDate).add(i, "days");
|
|
69
|
+
const isLastLoop = i + 1 === visibleDays;
|
|
70
|
+
if (isLastLoop) {
|
|
71
|
+
month.push({
|
|
72
|
+
start: temporalDay.toDate(),
|
|
73
|
+
days: Math.abs(temporalDay.diff(currentDay, "days")) + 1,
|
|
74
|
+
});
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
if (currentDay.date() === currentDay.daysInMonth()) {
|
|
78
|
+
month.push({
|
|
79
|
+
start: temporalDay.toDate(),
|
|
80
|
+
days: Math.abs(temporalDay.diff(currentDay, "days")) + 1,
|
|
81
|
+
});
|
|
82
|
+
temporalDay = currentDay.add(1, "days");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return month;
|
|
86
|
+
};
|
|
87
|
+
const SUNDAY = 0;
|
|
88
|
+
export const getWeeksByDays = (visibleDays, selectedDate) => {
|
|
89
|
+
if (visibleDays <= 0) {
|
|
90
|
+
return [];
|
|
91
|
+
}
|
|
92
|
+
const weeks = [];
|
|
93
|
+
let temporalDay = moment(selectedDate);
|
|
94
|
+
for (let i = 0; i < visibleDays; i++) {
|
|
95
|
+
const currentDay = moment(selectedDate).add(i, "days");
|
|
96
|
+
const isLastLoop = i + 1 === visibleDays;
|
|
97
|
+
if (isLastLoop) {
|
|
98
|
+
weeks.push({
|
|
99
|
+
start: temporalDay.toDate(),
|
|
100
|
+
days: Math.abs(temporalDay.diff(currentDay, "days")) + 1,
|
|
101
|
+
});
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
if (currentDay.day() === SUNDAY) {
|
|
105
|
+
weeks.push({
|
|
106
|
+
start: temporalDay.toDate(),
|
|
107
|
+
days: Math.abs(temporalDay.diff(currentDay, "days")) + 1,
|
|
108
|
+
});
|
|
109
|
+
temporalDay = currentDay.add(1, "days");
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return weeks;
|
|
113
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import moment from "moment";
|
|
2
|
+
export const calculateDivisionsByDays = (days) => {
|
|
3
|
+
if (days <= 3) {
|
|
4
|
+
return 8;
|
|
5
|
+
}
|
|
6
|
+
if (days <= 7) {
|
|
7
|
+
return 3;
|
|
8
|
+
}
|
|
9
|
+
return 2;
|
|
10
|
+
};
|
|
11
|
+
export const getHoursFromDivisions = (divisions) => {
|
|
12
|
+
const hoursInterval = 24 / divisions;
|
|
13
|
+
const array = [];
|
|
14
|
+
for (let i = 0; i < divisions; i++) {
|
|
15
|
+
const newHour = moment(new Date(1, 1, 1))
|
|
16
|
+
.add(hoursInterval * i, "hours")
|
|
17
|
+
.format("HH:mm");
|
|
18
|
+
array.push(newHour);
|
|
19
|
+
}
|
|
20
|
+
return array;
|
|
21
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { eventIsVisible } from "./eventIsVisible";
|
|
2
|
+
export const hoursBetween = (date1, date2) => {
|
|
3
|
+
const oneHourInMillis = 60 * 60 * 1000; // hours*minutes*seconds*milliseconds
|
|
4
|
+
const timeDiff = date2.getTime() - date1.getTime();
|
|
5
|
+
return timeDiff / oneHourInMillis;
|
|
6
|
+
};
|
|
7
|
+
export const getEventSizes = (schedulerDate, totalDays, startDate, endDate) => {
|
|
8
|
+
if (!eventIsVisible(startDate, endDate, schedulerDate, totalDays)) {
|
|
9
|
+
return {
|
|
10
|
+
left: 0,
|
|
11
|
+
width: 0,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
const totalHours = totalDays * 24;
|
|
15
|
+
const dateString = schedulerDate.toISOString().split('T')[0];
|
|
16
|
+
const schedulerDateAtZero = new Date(dateString);
|
|
17
|
+
let startHours = hoursBetween(schedulerDateAtZero, startDate);
|
|
18
|
+
let durationHours = hoursBetween(startDate, endDate);
|
|
19
|
+
const startOutOfScheduler = startHours < 0;
|
|
20
|
+
if (startOutOfScheduler) {
|
|
21
|
+
durationHours += startHours;
|
|
22
|
+
startHours = 0;
|
|
23
|
+
}
|
|
24
|
+
const left = (startHours / totalHours) * 100;
|
|
25
|
+
const width = (durationHours * 100) / totalHours;
|
|
26
|
+
return {
|
|
27
|
+
left,
|
|
28
|
+
width,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function getLinesByDivisions(headerDivision, _) {
|
|
2
|
+
const lines = headerDivision.flatMap((division) => {
|
|
3
|
+
return division.bottom;
|
|
4
|
+
});
|
|
5
|
+
const left = 100 / lines.length;
|
|
6
|
+
const finalLines = lines.map((_, index) => {
|
|
7
|
+
return {
|
|
8
|
+
left: left * index,
|
|
9
|
+
width: 1,
|
|
10
|
+
};
|
|
11
|
+
}).filter((_, index) => index !== 0);
|
|
12
|
+
return finalLines;
|
|
13
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPercentageFromMouseEvent.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/custom/scheduler-new/presentation/logic/getPercentageFromMouseEvent.ts"],"names":[],"mappings":"AAAA,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG,MAAM,CAMvG"}
|
|
1
|
+
{"version":3,"file":"getPercentageFromMouseEvent.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/custom/scheduler-new/presentation/logic/getPercentageFromMouseEvent.ts"],"names":[],"mappings":"AAAA,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG,MAAM,CAMvG;AAED,wBAAgB,wBAAwB,CACvC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,GAClB,MAAM,CAMR"}
|
package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsToInnerRows.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const eventsCollide = (event1, event2) => {
|
|
2
|
+
const eventInsideOther = event1.startDate <= event2.startDate && event1.endDate >= event2.endDate;
|
|
3
|
+
const eventCollideStart = event1.endDate > event2.startDate && event1.endDate < event2.endDate;
|
|
4
|
+
const eventCollideEnd = event2.endDate > event1.startDate && event2.endDate < event1.endDate;
|
|
5
|
+
return eventInsideOther || eventCollideStart || eventCollideEnd;
|
|
6
|
+
};
|
|
7
|
+
// Function to separate events into non-colliding rows
|
|
8
|
+
export const separateEventsToInnerRows = (events) => {
|
|
9
|
+
const sortedEvents = [...events].sort((a, b) => {
|
|
10
|
+
const aOrder = a.order ?? Number.MAX_SAFE_INTEGER;
|
|
11
|
+
const bOrder = b.order ?? Number.MAX_SAFE_INTEGER;
|
|
12
|
+
if (aOrder !== bOrder) {
|
|
13
|
+
return aOrder - bOrder; // Prioridad al order si ambos están definidos
|
|
14
|
+
}
|
|
15
|
+
return a.startDate.getTime() - b.startDate.getTime();
|
|
16
|
+
});
|
|
17
|
+
const rows = [];
|
|
18
|
+
for (const event of sortedEvents) {
|
|
19
|
+
let placed = false;
|
|
20
|
+
for (const row of rows) {
|
|
21
|
+
if (!row.some((existingEvent) => eventsCollide(existingEvent, event))) {
|
|
22
|
+
row.push(event);
|
|
23
|
+
placed = true;
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (!placed) {
|
|
28
|
+
rows.push([event]);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return rows;
|
|
32
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const sortByCategoryAndTitle = (previous, next, orderCategories) => {
|
|
2
|
+
for (const orderCategory of orderCategories) {
|
|
3
|
+
const prevOrder = previous[orderCategory];
|
|
4
|
+
const nextOrder = next[orderCategory];
|
|
5
|
+
if (prevOrder !== nextOrder) {
|
|
6
|
+
return prevOrder > nextOrder ? 1 : -1;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
const prevTitle = previous["title"];
|
|
10
|
+
const nextTitle = next["title"];
|
|
11
|
+
return prevTitle > nextTitle ? 1 : -1;
|
|
12
|
+
};
|