@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,166 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { when } from "../../../../common/functions/dsl/UiEventDSL";
|
|
4
|
+
import { CwIcon } from "../../../display/graphics/icon/CwIcon";
|
|
5
|
+
import { getListOfNumbers, getRandomEvents } from "./helpers";
|
|
6
|
+
import { eventIsVisible } from "./logic/eventIsVisible";
|
|
7
|
+
import { getEventSizes } from "./logic/getEventSizes";
|
|
8
|
+
import { OnClickEvent, OnClickRowEvent, OnClickRowHeader, OnClickUtc, OnDoubleClickEvent, OnDragEvent, OnDropCtrlEvent, OnDropEvent, OnLeftDragStart, OnRightClickEvent, OnRightClickRow, OnRightDragStart, UpdateApi, } from "./NewSchedulerUiEvents";
|
|
9
|
+
export const eventToUiState = (it, selectedDate, visibleDays, tooltip) => {
|
|
10
|
+
const { left, width } = getEventSizes(selectedDate, visibleDays, it.startDate, it.endDate);
|
|
11
|
+
const eventState = {
|
|
12
|
+
...it,
|
|
13
|
+
left,
|
|
14
|
+
width,
|
|
15
|
+
tooltip: tooltip,
|
|
16
|
+
selected: false,
|
|
17
|
+
isResizable: false,
|
|
18
|
+
isDraggable: false,
|
|
19
|
+
};
|
|
20
|
+
return eventState;
|
|
21
|
+
};
|
|
22
|
+
export const SchedulerPresenter = () => {
|
|
23
|
+
const [events, setEvents] = useState([]);
|
|
24
|
+
const [backgroundEvents, setBackgroundEvents] = useState([]);
|
|
25
|
+
const [uiState, setUiState] = useState(() => {
|
|
26
|
+
const visibleDays = 1;
|
|
27
|
+
const selectedDate = new Date("2024-12-03");
|
|
28
|
+
const isHeaderVisible = true;
|
|
29
|
+
return {
|
|
30
|
+
isUtc: false,
|
|
31
|
+
selectedDate: selectedDate,
|
|
32
|
+
isHeaderVisible: isHeaderVisible,
|
|
33
|
+
visibleDays: visibleDays,
|
|
34
|
+
rowsHeight: 2,
|
|
35
|
+
visibleRows: 8,
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
const [resources, setResources] = useState([]);
|
|
39
|
+
const selectedEventRef = useRef("");
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
updateDataFromApi();
|
|
42
|
+
}, []);
|
|
43
|
+
const updateDataFromApi = () => {
|
|
44
|
+
const rows = 1;
|
|
45
|
+
// api call here to events
|
|
46
|
+
const apiEvents = getListOfNumbers(rows).flatMap((e) => {
|
|
47
|
+
return getRandomEvents(uiState.selectedDate, uiState.visibleDays * 3, e);
|
|
48
|
+
});
|
|
49
|
+
const eventsWithSizes = apiEvents.map((it) => {
|
|
50
|
+
return eventToUiState(it, uiState.selectedDate, uiState.visibleDays, _jsxs("div", { children: [it.startDate.getHours() + ":" + it.startDate.getMinutes(), " -", it.endDate.getHours() + ":" + it.endDate.getMinutes()] }));
|
|
51
|
+
});
|
|
52
|
+
const visibleEvents = eventsWithSizes.filter((event) => {
|
|
53
|
+
return eventIsVisible(event.startDate, event.endDate, uiState.selectedDate, uiState.visibleDays);
|
|
54
|
+
});
|
|
55
|
+
setEvents(visibleEvents);
|
|
56
|
+
const apiBackgroundEvents = getListOfNumbers(1).map((e) => {
|
|
57
|
+
const backgroundEvent = {
|
|
58
|
+
id: e.toString(),
|
|
59
|
+
rowId: e.toString(),
|
|
60
|
+
color: "orange",
|
|
61
|
+
isResizable: false,
|
|
62
|
+
isDraggable: false,
|
|
63
|
+
width: 100 / uiState.visibleDays,
|
|
64
|
+
name: "Birthday",
|
|
65
|
+
icons: _jsx(CwIcon, { iconId: "house", style: { padding: "0.5rem" } }, "cosa"),
|
|
66
|
+
startDate: new Date(),
|
|
67
|
+
left: 0,
|
|
68
|
+
endDate: new Date(),
|
|
69
|
+
isVisible: true,
|
|
70
|
+
selected: false,
|
|
71
|
+
};
|
|
72
|
+
return backgroundEvent;
|
|
73
|
+
});
|
|
74
|
+
setBackgroundEvents(apiBackgroundEvents);
|
|
75
|
+
// api call here to rows
|
|
76
|
+
const apiRows = getListOfNumbers(rows).map((e) => {
|
|
77
|
+
return {
|
|
78
|
+
resourceId: e.toString(),
|
|
79
|
+
title: "JAC" + e,
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
const headerProps = apiRows.map((row) => {
|
|
83
|
+
return {
|
|
84
|
+
rowId: row.resourceId,
|
|
85
|
+
title: row.title,
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
setResources(headerProps);
|
|
89
|
+
};
|
|
90
|
+
const onEvent = (event) => {
|
|
91
|
+
when(event)
|
|
92
|
+
.case(OnClickEvent, (event) => {
|
|
93
|
+
console.log("onClick event: " + event.id);
|
|
94
|
+
})
|
|
95
|
+
.case(OnDoubleClickEvent, (event) => {
|
|
96
|
+
const eventData = resources
|
|
97
|
+
.map((resource) => {
|
|
98
|
+
const element = events
|
|
99
|
+
.filter((it) => {
|
|
100
|
+
return it.rowId === resource.rowId;
|
|
101
|
+
})
|
|
102
|
+
.find((it) => it.id == event.id);
|
|
103
|
+
return element;
|
|
104
|
+
})
|
|
105
|
+
.filter((it) => it !== undefined)[0];
|
|
106
|
+
console.log("found", eventData?.startDate, eventData?.endDate);
|
|
107
|
+
})
|
|
108
|
+
.case(OnDragEvent, (event) => {
|
|
109
|
+
console.log("onDrag event: " + event.id);
|
|
110
|
+
selectedEventRef.current = event.id;
|
|
111
|
+
console.log("selectedEvent set to: " + selectedEventRef.current);
|
|
112
|
+
})
|
|
113
|
+
.case(OnDropEvent, (event) => {
|
|
114
|
+
console.log("onDrop event: " + selectedEventRef.current + " to row: " + event.id);
|
|
115
|
+
setEvents((prevEvents) => {
|
|
116
|
+
// Find the index of the event to be updated
|
|
117
|
+
const eventIndex = prevEvents.findIndex((e) => e.id === selectedEventRef.current);
|
|
118
|
+
// If event is found, create a new array with the updated event
|
|
119
|
+
const updatedEvents = [...prevEvents];
|
|
120
|
+
updatedEvents[eventIndex] = {
|
|
121
|
+
...updatedEvents[eventIndex],
|
|
122
|
+
rowId: event.id,
|
|
123
|
+
};
|
|
124
|
+
return updatedEvents;
|
|
125
|
+
});
|
|
126
|
+
console.log("drop on");
|
|
127
|
+
selectedEventRef.current = ""; // Reset the selected event ref
|
|
128
|
+
})
|
|
129
|
+
.case(OnDropCtrlEvent, (event) => {
|
|
130
|
+
alert(`Clicked row is ${event.id}`);
|
|
131
|
+
})
|
|
132
|
+
.case(OnClickRowEvent, (event) => {
|
|
133
|
+
alert(`Clicked row is ${event.id}`);
|
|
134
|
+
})
|
|
135
|
+
.case(OnRightClickEvent, (event) => {
|
|
136
|
+
alert(`RightClick event ${event.id}`);
|
|
137
|
+
})
|
|
138
|
+
.case(OnRightClickRow, (event) => {
|
|
139
|
+
alert(`RightClick row ${event.id}`);
|
|
140
|
+
})
|
|
141
|
+
.case(OnLeftDragStart, (event) => {
|
|
142
|
+
alert(`Start left Drag ${event.id}`);
|
|
143
|
+
})
|
|
144
|
+
.case(OnRightDragStart, (event) => {
|
|
145
|
+
alert(`Start Right Drag ${event.id}`);
|
|
146
|
+
})
|
|
147
|
+
.case(UpdateApi, () => {
|
|
148
|
+
updateDataFromApi();
|
|
149
|
+
})
|
|
150
|
+
.case(OnClickRowHeader, (event) => {
|
|
151
|
+
console.log(`Clicked row ${event.id}`);
|
|
152
|
+
})
|
|
153
|
+
.case(OnClickUtc, () => {
|
|
154
|
+
setUiState((old) => {
|
|
155
|
+
return { ...old, isUtc: !old.isUtc };
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
return {
|
|
160
|
+
state: uiState,
|
|
161
|
+
resources: resources,
|
|
162
|
+
events,
|
|
163
|
+
backgroundEvents,
|
|
164
|
+
onEvent: onEvent,
|
|
165
|
+
};
|
|
166
|
+
};
|
package/dist/src/components/custom/scheduler-new/presentation/components/header/HeaderDivision.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import moment from "moment";
|
|
3
|
+
import styles from "../../styles/scheduler-header.module.css";
|
|
4
|
+
export const SchedulerHeaderDivision = ({ topDivisions, bottomDivisions, classification, topWidth, startDate, endDate }) => {
|
|
5
|
+
const isToday = () => {
|
|
6
|
+
if (!startDate)
|
|
7
|
+
return false;
|
|
8
|
+
const today = moment();
|
|
9
|
+
if (endDate) {
|
|
10
|
+
return today.isBetween(startDate, endDate, 'day', '[]');
|
|
11
|
+
}
|
|
12
|
+
return today.isSame(startDate, 'day');
|
|
13
|
+
};
|
|
14
|
+
return (_jsxs("div", { style: {
|
|
15
|
+
width: topWidth,
|
|
16
|
+
cursor: "pointer"
|
|
17
|
+
}, children: [_jsx("div", { className: `${styles["scheduler-dates"]} ${isToday() ? styles["current-day"] : ""}`, children: _jsx("span", { children: topDivisions }) }), _jsx("div", { style: { display: "flex", justifyContent: "space-between", flex: 1 }, children: bottomDivisions.map((element) => (_jsx("div", { className: styles["scheduler-hours"], children: _jsx("span", { children: element }) }, classification + element + topDivisions))) })] }));
|
|
18
|
+
};
|
|
19
|
+
export const _preview = () => {
|
|
20
|
+
const today = new Date();
|
|
21
|
+
return (_jsx(SchedulerHeaderDivision, { topDivisions: new Date().toLocaleDateString(), bottomDivisions: [
|
|
22
|
+
new Date(1, 1, 1).toLocaleDateString(),
|
|
23
|
+
new Date(1, 2, 3).toLocaleDateString(),
|
|
24
|
+
new Date(2, 2, 2).toLocaleDateString(),
|
|
25
|
+
], classification: "test", startDate: today, endDate: today }));
|
|
26
|
+
};
|
package/dist/src/components/custom/scheduler-new/presentation/components/header/HeaderTitle.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styles from "../../styles/scheduler-header.module.css";
|
|
3
|
+
export const HeaderTitle = ({ title, dividerText, width }) => {
|
|
4
|
+
return (_jsxs("div", { className: styles["scheduler-header-title"], style: { width: width }, children: [_jsx("div", { children: _jsx("h5", { children: title }) }), _jsx("div", { children: _jsx("span", { children: dividerText }) })] }));
|
|
5
|
+
};
|
|
6
|
+
export const _preview = () => {
|
|
7
|
+
return _jsx(HeaderTitle, { title: "Test title", dividerText: "Divider test", width: 5 });
|
|
8
|
+
};
|
package/dist/src/components/custom/scheduler-new/presentation/components/header/SchedulerHeader.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import moment from "moment";
|
|
3
|
+
import { dateFromPercentage } from "../../logic/dateFromPercentage";
|
|
4
|
+
import { getPercentageFromMouseEvent } from "../../logic/getPercentageFromMouseEvent";
|
|
5
|
+
import { OnEndClickHeaderEvent, OnStartClickHeaderEvent } from "../../NewSchedulerUiEvents";
|
|
6
|
+
import styles from "../../styles/scheduler-header.module.css";
|
|
7
|
+
import { TimeLine } from "../timeline/TimeLine";
|
|
8
|
+
import { SchedulerHeaderDivision } from "./HeaderDivision";
|
|
9
|
+
import { HeaderTitle } from "./HeaderTitle";
|
|
10
|
+
export const SchedulerHeader = ({ content, divisions, visibleDays, selectedDate, width, onEvent, timeLinePercentage, isUtc }) => {
|
|
11
|
+
const topWidth = (100 / visibleDays);
|
|
12
|
+
const { title, classification } = content;
|
|
13
|
+
return (_jsxs("div", { style: { display: "flex" }, children: [_jsx(HeaderTitle, { title: title, dividerText: classification, width: width }), _jsxs("div", { className: styles["scheduler-header-divisions"], style: { flex: 1, display: "flex", position: "relative" }, onMouseDown: (e) => {
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
const clickPercentage = getPercentageFromMouseEvent(e);
|
|
16
|
+
const date = dateFromPercentage(selectedDate, visibleDays, clickPercentage);
|
|
17
|
+
onEvent(new OnStartClickHeaderEvent(date));
|
|
18
|
+
}, onMouseUp: (e) => {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
const clickPercentage = getPercentageFromMouseEvent(e);
|
|
21
|
+
const date = dateFromPercentage(selectedDate, visibleDays, clickPercentage);
|
|
22
|
+
onEvent(new OnEndClickHeaderEvent(date));
|
|
23
|
+
}, children: [divisions.map((day) => {
|
|
24
|
+
const thisTopWidth = visibleDays > 15
|
|
25
|
+
? topWidth * day.bottom.length
|
|
26
|
+
: topWidth;
|
|
27
|
+
const dateStr = day.startDate ? moment(day.startDate) : moment(day.top, "DD.MM.YYYY");
|
|
28
|
+
const startDate = dateStr.toDate();
|
|
29
|
+
const endDate = day.endDate ? moment(day.endDate).toDate() : undefined;
|
|
30
|
+
return (_jsx(SchedulerHeaderDivision, { topDivisions: day.top, bottomDivisions: day.bottom, classification: classification, topWidth: thisTopWidth + "%", startDate: startDate, endDate: endDate }, day.top + classification));
|
|
31
|
+
}), !(timeLinePercentage < 0 || timeLinePercentage > 100) && (_jsx(TimeLine, { color: "red", left: `${timeLinePercentage}%`, top: "50%", height: "50%", isHeader: true, isUtc: isUtc }))] })] }));
|
|
32
|
+
};
|
|
33
|
+
export const _preview = () => {
|
|
34
|
+
const header = {
|
|
35
|
+
width: 100,
|
|
36
|
+
content: {
|
|
37
|
+
title: "Flights",
|
|
38
|
+
classification: "Aircraft/Time",
|
|
39
|
+
},
|
|
40
|
+
isUtc: true,
|
|
41
|
+
divisions: [
|
|
42
|
+
{
|
|
43
|
+
top: "Aug 21",
|
|
44
|
+
bottom: ["12am", "3am", "6am", "9am", "12pm", "3pm", "6pm", "9pm"],
|
|
45
|
+
startDate: new Date(2024, 7, 21), // Mes es 0-based, así que 7 es Agosto
|
|
46
|
+
endDate: new Date(2024, 7, 21)
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
top: "Aug 22",
|
|
50
|
+
bottom: ["12am", "3am", "6am", "9am", "12pm", "3pm", "6pm", "9pm"],
|
|
51
|
+
startDate: new Date(2024, 7, 22),
|
|
52
|
+
endDate: new Date(2024, 7, 22)
|
|
53
|
+
},
|
|
54
|
+
/*{
|
|
55
|
+
top: "Aug 23",
|
|
56
|
+
bottom: ["12am", "3am", "6am", "9am", "12pm", "3pm", "6pm", "9pm"]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
top: "Aug 24",
|
|
60
|
+
bottom: ["12am", "3am", "6am", "9am", "12pm", "3pm", "6pm", "9pm"]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
top: "Aug 25",
|
|
64
|
+
bottom: ["12am", "3am", "6am", "9am", "12pm", "3pm", "6pm", "9pm"]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
top: "Aug 26",
|
|
68
|
+
bottom: ["12am", "3am", "6am", "9am", "12pm", "3pm", "6pm", "9pm"]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
top: "Aug 27",
|
|
72
|
+
bottom: ["12am", "3am", "6am", "9am", "12pm", "3pm", "6pm", "9pm"]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
top: "Aug 28",
|
|
76
|
+
bottom: ["12am", "3am", "6am", "9am", "12pm", "3pm", "6pm", "9pm"]
|
|
77
|
+
}*/
|
|
78
|
+
],
|
|
79
|
+
visibleDays: 2,
|
|
80
|
+
selectedDate: new Date(),
|
|
81
|
+
timeLinePercentage: 50,
|
|
82
|
+
onEvent: () => {
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
return _jsx(SchedulerHeader, { ...header });
|
|
86
|
+
};
|
package/dist/src/components/custom/scheduler-new/presentation/components/row/BackgroundEvent.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getContrastColor, getHSLColor } from '../../../../../../common/functions/colorManipulation';
|
|
3
|
+
import { CwGenericTooltip } from "../../../../../display/data/generic_tooltip/CwGenericTooltip";
|
|
4
|
+
import styles from "../../styles/new-scheduler.module.css";
|
|
5
|
+
export const BackgroundEvent = ({ value, heightRem }) => {
|
|
6
|
+
const backColor = getHSLColor(value.color, value.alpha ?? 0.5);
|
|
7
|
+
const textColor = getContrastColor(value.color);
|
|
8
|
+
return value.isVisible ? (_jsx("div", { style: {
|
|
9
|
+
left: `${value.left}%`,
|
|
10
|
+
width: `${value.width}%`,
|
|
11
|
+
position: "absolute",
|
|
12
|
+
height: `${heightRem}rem`,
|
|
13
|
+
pointerEvents: "auto",
|
|
14
|
+
}, children: _jsx(CwGenericTooltip, { content: value.tooltip, position: "bottom", dissapearsWhenHover: true, showDelay: 200, children: _jsx("div", { style: {
|
|
15
|
+
overflow: "hidden",
|
|
16
|
+
backgroundColor: backColor,
|
|
17
|
+
height: `${heightRem}rem`,
|
|
18
|
+
}, children: _jsx("div", { style: {
|
|
19
|
+
display: "flex",
|
|
20
|
+
flexDirection: "row",
|
|
21
|
+
width: "100%",
|
|
22
|
+
contentVisibility: "auto",
|
|
23
|
+
height: `${heightRem}rem`,
|
|
24
|
+
}, children: _jsxs("div", { style: {
|
|
25
|
+
width: value.width + "%",
|
|
26
|
+
fontSize: "var(--cw-font-size-smallest)",
|
|
27
|
+
padding: "0.25rem",
|
|
28
|
+
color: textColor,
|
|
29
|
+
alignItems: "flex-end"
|
|
30
|
+
}, className: styles["scheduler-event-container"], children: [value.icons ? _jsx("div", { style: {
|
|
31
|
+
display: "flex",
|
|
32
|
+
flexDirection: "row",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
whiteSpace: "nowrap",
|
|
35
|
+
color: textColor,
|
|
36
|
+
}, children: value.icons }) : null, _jsx("span", { className: styles["scheduler-event-text"], children: value.name })] }) }) }) }) })) : null;
|
|
37
|
+
};
|
|
38
|
+
export const BackgroundEventPreview = () => {
|
|
39
|
+
const event = {
|
|
40
|
+
value: {
|
|
41
|
+
id: "",
|
|
42
|
+
startDate: new Date(),
|
|
43
|
+
endDate: new Date(),
|
|
44
|
+
rowId: "",
|
|
45
|
+
color: "orange",
|
|
46
|
+
left: 0,
|
|
47
|
+
width: 30,
|
|
48
|
+
name: "Birthday",
|
|
49
|
+
icons: _jsx("span", { className: "cwi-icons cwi-birthday" }),
|
|
50
|
+
isVisible: true,
|
|
51
|
+
isDraggable: false,
|
|
52
|
+
isResizable: false,
|
|
53
|
+
selected: false,
|
|
54
|
+
},
|
|
55
|
+
heightRem: 2,
|
|
56
|
+
onEvent: () => {
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
return _jsx(BackgroundEvent, { ...event });
|
|
60
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultRowHeader.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"DefaultRowHeader.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mDAAmD,CAAC;AAIjF,MAAM,WAAW,WAAW;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,WAAW;IACpD,KAAK,EAAE,CAAC,CAAC;IAET,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,cAAc,CAAC,WAAW,CAAC,CA0B5D,CAAC"}
|
package/dist/src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { OnClickRowHeader } from "../../NewSchedulerUiEvents";
|
|
3
|
+
import styles from "../../styles/scheduler-row.module.css";
|
|
4
|
+
export const DefaultRowHeader = ({ value, width, onEvent }) => {
|
|
5
|
+
return (_jsxs("div", { style: {
|
|
6
|
+
width: width,
|
|
7
|
+
// background: color,
|
|
8
|
+
}, onClick: (_) => {
|
|
9
|
+
onEvent(new OnClickRowHeader(value.rowId));
|
|
10
|
+
}, className: styles["scheduler-row-header"], children: [_jsxs("div", { children: [_jsx("strong", { children: value.title }), value.title2 && _jsxs("span", { children: ["-", value.title2] }), " ", _jsx("strong", { children: value.subtitle })] }), value.subtitle && _jsxs("div", { style: { opacity: 0.5 }, children: [value.title3 && _jsxs("span", { className: styles["scheduler-crewmember-functions"], children: ["(", value.title3, ")"] }), value.subtitle2 && _jsxs("span", { children: ["-", value.subtitle2] })] })] }));
|
|
11
|
+
};
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
const _preview = () => {
|
|
14
|
+
return _jsx(DefaultRowHeader, { value: {
|
|
15
|
+
rowId: "1",
|
|
16
|
+
title: "JAC",
|
|
17
|
+
title2: "CMD",
|
|
18
|
+
subtitle: "ICAO",
|
|
19
|
+
subtitle2: "IATA"
|
|
20
|
+
},
|
|
21
|
+
// color={"red"}
|
|
22
|
+
width: 180, onEvent: () => {
|
|
23
|
+
} });
|
|
24
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ItemType } from "antd/lib/menu/hooks/useItems";
|
|
2
1
|
import { type FC, type ReactElement, type ReactNode } from "react";
|
|
3
2
|
import type { OnEvent } from "../../../../../../common/functions/dsl/UiEventDSL";
|
|
3
|
+
import { type MenuOption } from "../../../../../control/action/contextmenu/CwAnchoredMenu";
|
|
4
4
|
export interface SchedulerEventDm {
|
|
5
5
|
id: string;
|
|
6
6
|
name: string;
|
|
@@ -18,7 +18,7 @@ export interface SchedulerEventDm {
|
|
|
18
18
|
icons?: ReactElement;
|
|
19
19
|
rectangleColors?: string[];
|
|
20
20
|
tooltip?: ReactNode;
|
|
21
|
-
contextMenuItems?:
|
|
21
|
+
contextMenuItems?: MenuOption[];
|
|
22
22
|
primaryTimeMarkerColor?: string;
|
|
23
23
|
secondaryTimeMarkerColor?: string;
|
|
24
24
|
eventType?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Event.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/custom/scheduler-new/presentation/components/row/Event.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Event.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/custom/scheduler-new/presentation/components/row/Event.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,EAAE,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mDAAmD,CAAC;AAEjF,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,0DAA0D,CAAC;AAe3G,MAAM,WAAW,gBAAgB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC;IAChC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,gBAAgB;IAC9D,KAAK,EAAE,CAAC,CAAC;IACT,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAmMpE,CAAC;AAEF,eAAO,MAAM,QAAQ,+CA8BpB,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Dropdown } from "antd";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { getContrastColor, getHSLColor } from '../../../../../../common/functions/colorManipulation';
|
|
5
|
+
import useSingleAndDoubleClicks from "../../../../../../common/functions/useSingleAndDoubleClicks";
|
|
6
|
+
import { CwGenericTooltip } from "../../../../../display/data/generic_tooltip/CwGenericTooltip";
|
|
7
|
+
import { OnClickContextMenu, OnClickEvent, OnDoubleClickEvent, OnDragEvent, OnLeftDragStart, OnMultiClickEvent, OnRangeClickEvent, OnRightClickEvent, OnRightDragStart, } from "../../NewSchedulerUiEvents";
|
|
8
|
+
import styles from "../../styles/new-scheduler.module.css";
|
|
9
|
+
import { EventSideDrag } from "./EventSideDrag";
|
|
10
|
+
export const SchedulerEvent = ({ value, heightRem, onEvent }) => {
|
|
11
|
+
const [isOnDrag, setIsOnDrag] = useState(false);
|
|
12
|
+
const [isContextMenuOpen, setIsContextMenuOpen] = useState(false);
|
|
13
|
+
// Calculate colors of the event
|
|
14
|
+
const backColor = getHSLColor(value.color, value.alpha ?? 0.75);
|
|
15
|
+
const textColor = getContrastColor(value.color);
|
|
16
|
+
const eventTransparent = value.alpha ? value.alpha < 0.7 : false;
|
|
17
|
+
const canClick = value.isDraggable || value.isClickable === true;
|
|
18
|
+
const { handleClick, handleDoubleClick } = useSingleAndDoubleClicks((e) => {
|
|
19
|
+
e.stopPropagation();
|
|
20
|
+
e.preventDefault();
|
|
21
|
+
if (!canClick) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/NavigatorUAData/platform
|
|
25
|
+
// change for navigator.userAgentData.platform when acepted in all browsers
|
|
26
|
+
const isMac = navigator.platform.toUpperCase().includes("MAC");
|
|
27
|
+
const isCtrlOrAltPressed = isMac ? e.altKey : e.ctrlKey;
|
|
28
|
+
if (e.shiftKey) {
|
|
29
|
+
onEvent(new OnRangeClickEvent(value.id));
|
|
30
|
+
}
|
|
31
|
+
else if (isCtrlOrAltPressed) {
|
|
32
|
+
onEvent(new OnMultiClickEvent(value.id));
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
onEvent(new OnClickEvent(value.id));
|
|
36
|
+
}
|
|
37
|
+
}, (e) => {
|
|
38
|
+
e.stopPropagation();
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
onEvent(new OnDoubleClickEvent(value.id));
|
|
41
|
+
});
|
|
42
|
+
return (_jsx(Dropdown, { open: isContextMenuOpen, onOpenChange: setIsContextMenuOpen, placement: "bottom", menu: {
|
|
43
|
+
items: value.contextMenuItems,
|
|
44
|
+
onClick: (e) => {
|
|
45
|
+
e.domEvent.nativeEvent.preventDefault();
|
|
46
|
+
e.domEvent.nativeEvent.stopPropagation();
|
|
47
|
+
e.domEvent.nativeEvent.stopImmediatePropagation();
|
|
48
|
+
e.domEvent.preventDefault();
|
|
49
|
+
e.domEvent.stopPropagation();
|
|
50
|
+
onEvent(new OnClickContextMenu(value.id, e.key));
|
|
51
|
+
},
|
|
52
|
+
onMouseLeave: () => setIsContextMenuOpen(false),
|
|
53
|
+
}, trigger: ["contextMenu"], overlayStyle: { animationDuration: "0" }, arrow: (value.contextMenuItems?.length ?? 0) > 0, children: _jsx("div", { style: {
|
|
54
|
+
top: "2px",
|
|
55
|
+
left: `${value.left}%`,
|
|
56
|
+
width: `${value.width}%`,
|
|
57
|
+
position: "absolute",
|
|
58
|
+
zIndex: isOnDrag ? 999 : undefined,
|
|
59
|
+
contentVisibility: "auto",
|
|
60
|
+
pointerEvents: "auto",
|
|
61
|
+
}, onClick: handleClick, onDoubleClick: handleDoubleClick, draggable: value.isDraggable, onMouseDown: (_) => {
|
|
62
|
+
if (value.isDraggable)
|
|
63
|
+
setIsOnDrag(true);
|
|
64
|
+
}, onMouseLeave: (_) => {
|
|
65
|
+
if (value.isDraggable)
|
|
66
|
+
setIsOnDrag(false);
|
|
67
|
+
}, onDragStart: (_) => {
|
|
68
|
+
if (value.isDraggable)
|
|
69
|
+
onEvent(new OnDragEvent(value.id));
|
|
70
|
+
}, onDragEnd: (_) => {
|
|
71
|
+
if (value.isDraggable)
|
|
72
|
+
setIsOnDrag(false);
|
|
73
|
+
}, onContextMenu: (e) => {
|
|
74
|
+
e.stopPropagation();
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
onEvent(new OnRightClickEvent(value.id));
|
|
77
|
+
}, children: _jsx(CwGenericTooltip, { content: value.tooltip, position: "bottom", hide: isOnDrag, dissapearsWhenHover: true, showDelay: 200, children: _jsxs("div", { style: {
|
|
78
|
+
border: value.selected ? "2px solid black" : "none",
|
|
79
|
+
backgroundColor: backColor,
|
|
80
|
+
height: `calc(${heightRem}rem - 4px)`,
|
|
81
|
+
opacity: eventTransparent ? 0.5 : 1,
|
|
82
|
+
}, className: styles["scheduler-event"], children: [_jsxs("div", { style: {
|
|
83
|
+
display: "flex",
|
|
84
|
+
flexDirection: "row",
|
|
85
|
+
alignItems: "stretch",
|
|
86
|
+
width: "100%",
|
|
87
|
+
cursor: value.isDraggable ? "pointer" : "default",
|
|
88
|
+
height: `calc(${heightRem}rem - 10px)`,
|
|
89
|
+
}, children: [value.isResizable && (_jsx(EventSideDrag, { left: true, heightRem: heightRem * 0.7, onStartEvent: () => {
|
|
90
|
+
onEvent(new OnLeftDragStart(value.id));
|
|
91
|
+
} })), _jsxs("div", { className: styles["scheduler-event-container"], children: [_jsx("div", { style: {
|
|
92
|
+
display: "flex",
|
|
93
|
+
flexDirection: "row",
|
|
94
|
+
alignItems: "center",
|
|
95
|
+
whiteSpace: "nowrap",
|
|
96
|
+
color: textColor,
|
|
97
|
+
}, children: value.icons }), _jsx("span", { style: {
|
|
98
|
+
padding: "0.1rem",
|
|
99
|
+
color: textColor,
|
|
100
|
+
display: "flex",
|
|
101
|
+
flex: 1,
|
|
102
|
+
alignItems: "center",
|
|
103
|
+
width: "100%",
|
|
104
|
+
}, children: value.rectangleColors && value.rectangleColors.length > 0 ? (_jsx("div", { style: {
|
|
105
|
+
display: "flex",
|
|
106
|
+
width: "100%",
|
|
107
|
+
}, children: value.rectangleColors.map((item, i) => (_jsx("div", { className: "cwellt_rectangle_indicator", style: {
|
|
108
|
+
backgroundColor: item,
|
|
109
|
+
flex: 1,
|
|
110
|
+
height: "8px",
|
|
111
|
+
margin: 0,
|
|
112
|
+
padding: 0,
|
|
113
|
+
} }, value.id + "_" + i))) })) : (value.name) })] }), value.isResizable && (_jsx(EventSideDrag, { heightRem: heightRem * 0.7, onStartEvent: () => {
|
|
114
|
+
onEvent(new OnRightDragStart(value.id));
|
|
115
|
+
} }))] }), value.primaryTimeMarkerColor && (_jsx("div", { className: styles["time-marker"], style: {
|
|
116
|
+
backgroundColor: value.primaryTimeMarkerColor,
|
|
117
|
+
} })), value.secondaryTimeMarkerColor && (_jsx("div", { className: styles["time-marker"], style: {
|
|
118
|
+
backgroundColor: value.secondaryTimeMarkerColor,
|
|
119
|
+
} }))] }) }) }, value.id) }, value.id));
|
|
120
|
+
};
|
|
121
|
+
export const _preview = () => {
|
|
122
|
+
const props = {
|
|
123
|
+
value: {
|
|
124
|
+
id: "",
|
|
125
|
+
rowId: "1",
|
|
126
|
+
name: "test",
|
|
127
|
+
color: "red",
|
|
128
|
+
startDate: new Date(),
|
|
129
|
+
endDate: new Date(),
|
|
130
|
+
isDraggable: true,
|
|
131
|
+
isResizable: true,
|
|
132
|
+
icons: _jsx("span", { className: "cwi-icons cwi-plane" }),
|
|
133
|
+
left: 0,
|
|
134
|
+
width: 10,
|
|
135
|
+
tooltip: _jsx("div", {}),
|
|
136
|
+
contextMenuItems: [
|
|
137
|
+
{
|
|
138
|
+
key: "removeRemarks",
|
|
139
|
+
label: _jsx("span", { className: "cwellt_contextMenu", children: "DELETE Remark" }),
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
selected: false,
|
|
143
|
+
},
|
|
144
|
+
heightRem: 10,
|
|
145
|
+
onEvent: (uiEvent) => {
|
|
146
|
+
console.log("event: " + uiEvent);
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
return _jsx(SchedulerEvent, { ...props });
|
|
150
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export const EventSideDrag = ({ left = false, heightRem, onStartEvent }) => {
|
|
3
|
+
return (_jsx("span", { draggable: true, onDragStart: (e) => {
|
|
4
|
+
e.stopPropagation();
|
|
5
|
+
onStartEvent(e.clientX);
|
|
6
|
+
}, style: {
|
|
7
|
+
cursor: left ? "w-resize" : "e-resize",
|
|
8
|
+
width: "0.3rem",
|
|
9
|
+
height: `${heightRem}rem`,
|
|
10
|
+
} }));
|
|
11
|
+
};
|
package/dist/src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ItemType } from "antd/lib/menu/hooks/useItems";
|
|
2
1
|
import { ReactElement, type ComponentType } from "react";
|
|
3
2
|
import { OnEvent } from "../../../../../../common/functions/dsl/UiEventDSL";
|
|
3
|
+
import { type MenuOption } from "../../../../../control/action/contextmenu/CwAnchoredMenu";
|
|
4
4
|
import { LineState } from "../../state/ui/SchedulerState";
|
|
5
5
|
import { BackgroundEventDm } from "./BackgroundEvent";
|
|
6
6
|
import { RowHeaderDm, type RowHeaderProps } from "./DefaultRowHeader";
|
|
@@ -9,7 +9,7 @@ export interface SchedulerRowProps<T extends RowHeaderDm, P extends SchedulerEve
|
|
|
9
9
|
events: P[];
|
|
10
10
|
backgroundEvents: BackgroundEventDm[];
|
|
11
11
|
rowHeader: RowHeaderProps<T>;
|
|
12
|
-
contextMenuItems?:
|
|
12
|
+
contextMenuItems?: MenuOption[];
|
|
13
13
|
EventComp: ComponentType<SchedulerEventState<P>>;
|
|
14
14
|
RowTitleComp: ComponentType<RowHeaderProps<T>>;
|
|
15
15
|
BackgroundEventComp: ComponentType<SchedulerEventState<BackgroundEventDm>>;
|
package/dist/src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchedulerRow.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchedulerRow.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,YAAY,EAAoB,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,mDAAmD,CAAC;AAE5E,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,0DAA0D,CAAC;AAY3G,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAI1D,OAAO,EAAmB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAoB,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAkB,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGhF,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,SAAS,gBAAgB;IACnF,MAAM,EAAE,CAAC,EAAE,CAAC;IACZ,gBAAgB,EAAE,iBAAiB,EAAE,CAAC;IACtC,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC7B,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC;IAChC,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,YAAY,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,mBAAmB,EAAE,aAAa,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC3E,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,SAAS,EAAE,CAAC;IAC1B,aAAa,EAAE,SAAS,EAAE,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,IAAI,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAwLpB,CAAC,CAAqB,SAAX,WAAW,EAAE,CAA0B,SAAhB,gBAAgB,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,KACrF,YAAY,CAAC;AAEf,eAAO,MAAM,mBAAmB,+CA4E/B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|