@cwellt_software/cwellt-reactjs-lib 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1314 -316
- package/dist/index.css +2 -2
- package/dist/index.d.ts +235 -6
- package/dist/index.es.js +1310 -316
- 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.js +13 -0
- package/dist/src/components/control/action/buttons/CwButtons.js +188 -0
- 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.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.js +298 -0
- 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.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.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 +42 -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 +63 -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.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.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.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.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.js +24 -0
- 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.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.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.map +1 -1
- package/dist/src/components/custom/super-scheduler/PinRowHeader.js +53 -0
- 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.js +138 -0
- 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.js +23 -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.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.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.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.js +23 -0
- package/dist/src/components/layout/modal/hover/CwModalHover.js +61 -0
- 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.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 +6 -1
- 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 +6 -2
- 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
package/dist/index.es.js
CHANGED
|
@@ -6,9 +6,12 @@ import { createPortal } from 'react-dom';
|
|
|
6
6
|
import { Tooltip, Modal, Select, Tag, Dropdown, Menu } from 'antd';
|
|
7
7
|
import Draggable from 'react-draggable';
|
|
8
8
|
import moment from 'moment';
|
|
9
|
+
import { format } from 'date-fns';
|
|
10
|
+
import { enGB } from 'date-fns/locale';
|
|
11
|
+
import { DayPicker, useNavigation } from 'react-day-picker';
|
|
12
|
+
import 'react-day-picker/dist/style.css';
|
|
9
13
|
import lodash from 'lodash';
|
|
10
14
|
import { VariableSizeList } from 'react-window';
|
|
11
|
-
import { Palette, Category, Component as Component$1, Variant } from '@react-buddy/ide-toolbox';
|
|
12
15
|
|
|
13
16
|
class CwSelectList {
|
|
14
17
|
type;
|
|
@@ -689,7 +692,7 @@ function CwLoadingSmall(CwelltLoadingAppointements) {
|
|
|
689
692
|
jsx("div", {})) }));
|
|
690
693
|
}
|
|
691
694
|
|
|
692
|
-
var styles$
|
|
695
|
+
var styles$k = {"cw-generic-tooltip-content":"cw-generic-tooltip-module_cw-generic-tooltip-content__la-Si"};
|
|
693
696
|
|
|
694
697
|
// Constants moved outside to prevent recreation
|
|
695
698
|
const margin = 16;
|
|
@@ -800,12 +803,12 @@ const CwGenericTooltip = ({ children, content = null, position = defaultPosition
|
|
|
800
803
|
const { setTooltipTimeout, clearTooltipTimeout } = useTooltipDelay(() => {
|
|
801
804
|
setIsVisible(true);
|
|
802
805
|
}, showDelay);
|
|
803
|
-
const { position: tooltipPosition, actualPosition } = useTooltipPosition(isVisible, containerRef, position, styles$
|
|
806
|
+
const { position: tooltipPosition, actualPosition } = useTooltipPosition(isVisible, containerRef, position, styles$k["cw-generic-tooltip-content"]);
|
|
804
807
|
// Memoize tooltip content creation
|
|
805
808
|
const tooltipContent = useMemo(() => {
|
|
806
809
|
if (hide || !isVisible || !content)
|
|
807
810
|
return null;
|
|
808
|
-
return createPortal(jsx("div", { className: styles$
|
|
811
|
+
return createPortal(jsx("div", { className: styles$k["cw-generic-tooltip-content"], "data-position": actualPosition, "data-visible": isVisible, style: {
|
|
809
812
|
position: 'fixed',
|
|
810
813
|
top: `${tooltipPosition.top}px`,
|
|
811
814
|
left: `${tooltipPosition.left}px`,
|
|
@@ -820,7 +823,7 @@ const CwGenericTooltip = ({ children, content = null, position = defaultPosition
|
|
|
820
823
|
clearTooltipTimeout();
|
|
821
824
|
setIsVisible(false);
|
|
822
825
|
}, [clearTooltipTimeout]);
|
|
823
|
-
return (jsxs("div", { ref: containerRef, className: styles$
|
|
826
|
+
return (jsxs("div", { ref: containerRef, className: styles$k["cw-generic-tooltip"], onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, style: overlayStyle, children: [tooltipContent, children] }));
|
|
824
827
|
};
|
|
825
828
|
|
|
826
829
|
// Reference for draggable modal
|
|
@@ -863,7 +866,7 @@ function CwModal(custModalProps) {
|
|
|
863
866
|
jsx("div", { style: { display: "none" } }))] }) })] })) }));
|
|
864
867
|
}
|
|
865
868
|
|
|
866
|
-
var styles$
|
|
869
|
+
var styles$j = {"overlayPositioned":"CwConfirmationPopup-module_overlayPositioned__11qYB","popup":"CwConfirmationPopup-module_popup__ahPjM","message":"CwConfirmationPopup-module_message__MnNL4","buttons":"CwConfirmationPopup-module_buttons__fGYYE","button":"CwConfirmationPopup-module_button__ugYQE","confirmButton":"CwConfirmationPopup-module_confirmButton__rTP4S","cancelButton":"CwConfirmationPopup-module_cancelButton__Ry694"};
|
|
867
870
|
|
|
868
871
|
function CwConfirmationPopup(props) {
|
|
869
872
|
const { isOpen, onConfirm, onCancel, message = "Are you sure you want to proceed?", confirmText = "Confirm", cancelText = "Cancel", placement = 'bottom', children } = props;
|
|
@@ -927,12 +930,12 @@ function CwConfirmationPopup(props) {
|
|
|
927
930
|
onCancel();
|
|
928
931
|
}
|
|
929
932
|
};
|
|
930
|
-
return (jsxs(Fragment, { children: [renderChildren(), isOpen && (jsx("div", { className: styles$
|
|
933
|
+
return (jsxs(Fragment, { children: [renderChildren(), isOpen && (jsx("div", { className: styles$j.overlayPositioned, onClick: handleOverlayClick, children: jsxs("div", { ref: popupRef, className: styles$j.popup, style: {
|
|
931
934
|
position: 'absolute',
|
|
932
935
|
top: `${position.top}px`,
|
|
933
936
|
left: `${position.left}px`,
|
|
934
937
|
transform: 'none'
|
|
935
|
-
}, children: [jsx("p", { className: styles$
|
|
938
|
+
}, children: [jsx("p", { className: styles$j.message, children: message }), jsxs("div", { className: styles$j.buttons, children: [jsx("button", { className: `${styles$j.button} ${styles$j.confirmButton}`, onClick: onConfirm, children: confirmText }), jsx("button", { className: `${styles$j.button} ${styles$j.cancelButton}`, onClick: onCancel, children: cancelText })] })] }) }))] }));
|
|
936
939
|
}
|
|
937
940
|
|
|
938
941
|
// Reference for draggable modal
|
|
@@ -1011,7 +1014,7 @@ class CwModalIframe extends React.Component {
|
|
|
1011
1014
|
}
|
|
1012
1015
|
}
|
|
1013
1016
|
|
|
1014
|
-
var styles$
|
|
1017
|
+
var styles$i = {"cw-dialog-main":"cw-dialog-module_cw-dialog-main__cHxHt","cw-dialog-button-close":"cw-dialog-module_cw-dialog-button-close__9GRd8"};
|
|
1015
1018
|
|
|
1016
1019
|
// Helper function to parse size values
|
|
1017
1020
|
const parseSize = (size) => {
|
|
@@ -1227,7 +1230,7 @@ const CwDialog = props => {
|
|
|
1227
1230
|
onClose();
|
|
1228
1231
|
}
|
|
1229
1232
|
}, [onClose]);
|
|
1230
|
-
const header = useMemo(() => (jsxs("header", { onMouseDown: handleMouseDown, children: [jsx("span", { children: headline }), customHeader || (jsx("button", { className: styles$
|
|
1233
|
+
const header = useMemo(() => (jsxs("header", { onMouseDown: handleMouseDown, children: [jsx("span", { children: headline }), customHeader || (jsx("button", { className: styles$i["cw-dialog-button-close"], onClick: onClose }))] })), [handleMouseDown, headline, customHeader, onClose]);
|
|
1231
1234
|
const content = useMemo(() => (jsx("section", { children: children })), [children]);
|
|
1232
1235
|
const footer = useMemo(() => (jsx("footer", { children: customFooter || (jsx("button", { className: "cw-button-icon cwi-save", onClick: onSave })) })), [customFooter, onSave]);
|
|
1233
1236
|
const resizeHandles = useMemo(() => size.autoHeight
|
|
@@ -1256,7 +1259,7 @@ const CwDialog = props => {
|
|
|
1256
1259
|
: `${convertFromPx(size.height, size.heightUnit)}${size.heightUnit}`;
|
|
1257
1260
|
return { displayWidth, displayHeight };
|
|
1258
1261
|
}, [size.width, size.height, size.widthUnit, size.heightUnit, size.autoHeight]);
|
|
1259
|
-
const dialogContent = (jsx("div", { "data-has-scrim": hasScrim, className: styles$
|
|
1262
|
+
const dialogContent = (jsx("div", { "data-has-scrim": hasScrim, className: styles$i["cw-dialog-main"], onClick: handleScrimClick, children: jsxs("dialog", { ...domProps, ref: dialogRef, style: {
|
|
1260
1263
|
left: `${position.x}px`,
|
|
1261
1264
|
top: `${position.y}px`,
|
|
1262
1265
|
width: displayDimensions.displayWidth,
|
|
@@ -1303,10 +1306,10 @@ class CwReportModal extends React.Component {
|
|
|
1303
1306
|
};
|
|
1304
1307
|
}
|
|
1305
1308
|
render() {
|
|
1306
|
-
return (jsx("div", { id: "cwelltModalReportContent", children: this.state.isModal === true ? (jsxs(CwDialog, { open: this.props.visible, width: this.props.width, headline: this.props.title, customFooter: new Array(jsx("div", {})), onClose: () => {
|
|
1309
|
+
return (jsx("div", { id: "cwelltModalReportContent", children: this.state.isModal === true ? (jsxs(CwDialog, { open: this.props.visible, width: this.props.width, height: this.props.height, headline: this.props.title, customFooter: new Array(jsx("div", {})), onClose: () => {
|
|
1307
1310
|
this.formRef?.current?.resetFields();
|
|
1308
1311
|
this.props.SET_MODAL_REPORT_VISIBLE(false);
|
|
1309
|
-
}, hideFooter: true, children: [this.props.name !== "Empty.pdf" && (jsx("div", { style: { width: "100%", height: "100%", overflowX: "auto", overflowY: "auto" }, children: jsx("embed", { src: "data:application/pdf;base64," + this.props.content, type: "application/pdf", style: { width: "100%", height: "100%", display: "block" } }) })), this.props.name === "Empty.pdf" && (jsx("div", { children: jsxs("h1", { style: { marginLeft: "2em" }, children: [" ", "Please add a(n) ", this.props.reportName, " report in ", this.props.moduleSettings, " Settings"] }) }))] })) : (jsxs("div", { children: [this.props.name !== "Empty.pdf" && (jsx("embed", { src: "data:application/pdf;base64," + this.props.content, type: "application/pdf", width: "100%", height: "
|
|
1312
|
+
}, hideFooter: true, children: [this.props.name !== "Empty.pdf" && (jsx("div", { style: { width: "100%", height: "100%", overflowX: "auto", overflowY: "auto" }, children: jsx("embed", { src: "data:application/pdf;base64," + this.props.content, type: "application/pdf", style: { width: "100%", height: "100%", display: "block" } }) })), this.props.name === "Empty.pdf" && (jsx("div", { children: jsxs("h1", { style: { marginLeft: "2em" }, children: [" ", "Please add a(n) ", this.props.reportName, " report in ", this.props.moduleSettings, " Settings"] }) }))] })) : (jsxs("div", { children: [this.props.name !== "Empty.pdf" && (jsx("embed", { src: "data:application/pdf;base64," + this.props.content, type: "application/pdf", width: "100%", height: "800px" })), this.props.name === "Empty.pdf" && (jsxs("div", { children: ["Please add a(n) ", this.props.reportName, " report in ", this.props.moduleSettings, " Settings"] }))] })) }));
|
|
1310
1313
|
}
|
|
1311
1314
|
}
|
|
1312
1315
|
|
|
@@ -1420,7 +1423,7 @@ function CwButton({ text, variant = 'solid', color = 'primary', className = '',
|
|
|
1420
1423
|
return (jsx("button", { type: "button", className: buttonClass, ...buttonProps, "data-color": color, children: variant === 'icon' ? null : (children ?? (jsxs(Fragment, { children: [icon && jsx("span", { className: `cwi-icons cwi-${icon}` }), text && jsx("strong", { children: text })] }))) }));
|
|
1421
1424
|
}
|
|
1422
1425
|
|
|
1423
|
-
var styles$
|
|
1426
|
+
var styles$h = {"card":"cw-card-module_card__HJUT0","clickable":"cw-card-module_clickable__Y-V3X","disabled":"cw-card-module_disabled__0wHh1","loading":"cw-card-module_loading__-fzlx","content":"cw-card-module_content__ma9qy","headerContent":"cw-card-module_headerContent__x4Jfl","footerTags":"cw-card-module_footerTags__80sSW","loadingOverlay":"cw-card-module_loadingOverlay__8-zVV"};
|
|
1424
1427
|
|
|
1425
1428
|
/**
|
|
1426
1429
|
* CwCard - A simple card component for displaying content in a contained format
|
|
@@ -1444,11 +1447,11 @@ const CwCard = ({ id, title, subtitle, alignment = 'center', children, footer, o
|
|
|
1444
1447
|
// Construct class names using CSS modules
|
|
1445
1448
|
const cardClassNames = [
|
|
1446
1449
|
'cw-card',
|
|
1447
|
-
styles$
|
|
1450
|
+
styles$h.card,
|
|
1448
1451
|
className,
|
|
1449
|
-
clickable ? styles$
|
|
1450
|
-
disabled ? styles$
|
|
1451
|
-
isLoading ? styles$
|
|
1452
|
+
clickable ? styles$h.clickable : '',
|
|
1453
|
+
disabled ? styles$h.disabled : '',
|
|
1454
|
+
isLoading ? styles$h.loading : '',
|
|
1452
1455
|
].filter(Boolean).join(' ');
|
|
1453
1456
|
// Handle click event when card is clickable
|
|
1454
1457
|
const handleClick = () => {
|
|
@@ -1465,15 +1468,15 @@ const CwCard = ({ id, title, subtitle, alignment = 'center', children, footer, o
|
|
|
1465
1468
|
// Determine if footer should be rendered
|
|
1466
1469
|
const hasFooter = hasChips || footer || (hasActions && direction === "row");
|
|
1467
1470
|
// Actions component to reuse
|
|
1468
|
-
const ActionsComponent = hasActions && !disabled ? (jsxs("div", { className: styles$
|
|
1471
|
+
const ActionsComponent = hasActions && !disabled ? (jsxs("div", { className: styles$h.actions, children: [extraActions ?? null, onEdit && jsx(CwButton, { variant: "icon", icon: "edit", onClick: onEdit }), onDelete && jsx(CwButton, { variant: "icon", icon: "delete", color: "danger", onClick: onDelete })] })) : null;
|
|
1469
1472
|
return (jsxs("div", { ...(id && { id }), className: cardClassNames, ...(style && { style }), ...(clickable && {
|
|
1470
1473
|
role: 'button',
|
|
1471
1474
|
tabIndex: 0,
|
|
1472
1475
|
onClick: handleClick,
|
|
1473
|
-
}), "data-variant": variant, "data-direction": direction, children: [hasHeader && (jsxs("header", { children: [(title || subtitle) && (jsxs("div", { className: styles$
|
|
1476
|
+
}), "data-variant": variant, "data-direction": direction, children: [hasHeader && (jsxs("header", { children: [(title || subtitle) && (jsxs("div", { className: styles$h.headerContent, "data-alignment": alignment, children: [title && jsx("h5", { children: title }), subtitle && jsx("strong", { children: subtitle })] })), direction === "column" && ActionsComponent] })), jsx("div", { className: styles$h.content, children: children }), hasFooter && (jsxs("footer", { children: [hasChips && (jsx("div", { className: styles$h.footerTags, children: chips.map((chip, index) => (jsx(CwChip, { label: chip.label, colorScheme: chip.colorScheme, className: styles$h.chip, ...(chip.customColor && { customColor: chip.customColor }), ...(chip.variant && { variant: chip.variant }), ...(chip.icon && { icon: chip.icon }) }, index))) })), footer && (jsx("div", { className: styles$h.footerContent, children: footer }))] })), direction === "row" && ActionsComponent, isLoading && (jsx("div", { className: styles$h.loadingOverlay, children: jsx(CwLoading, { isLoading: isLoading, size: "small" }) }))] }));
|
|
1474
1477
|
};
|
|
1475
1478
|
|
|
1476
|
-
var styles$
|
|
1479
|
+
var styles$g = {"cardContainer":"cw-card-list-module_cardContainer__l3YEh","pagination":"cw-card-list-module_pagination__5Ay78","pageInfo":"cw-card-list-module_pageInfo__uiMel","loading":"cw-card-list-module_loading__cYpND","emptyState":"cw-card-list-module_emptyState__RlqiS","sortControls":"cw-card-list-module_sortControls__mWgZA"};
|
|
1477
1480
|
|
|
1478
1481
|
function CwCardList({ items, renderCard, pageSize = 10, layout = 'grid', defaultCardWidth = 320, cardGap = 16, isLoading = false, emptyState, sortOptions = [], defaultSortKey, ...htmlProps }) {
|
|
1479
1482
|
const [currentPage, setCurrentPage] = useState(1);
|
|
@@ -1507,10 +1510,10 @@ function CwCardList({ items, renderCard, pageSize = 10, layout = 'grid', default
|
|
|
1507
1510
|
'--card-width': `${defaultCardWidth}px`,
|
|
1508
1511
|
'--card-gap': `${cardGap}px`
|
|
1509
1512
|
};
|
|
1510
|
-
return (jsxs("div", { ...htmlProps, children: [sortOptions.length > 0 && (jsxs("div", { className: styles$
|
|
1513
|
+
return (jsxs("div", { ...htmlProps, children: [sortOptions.length > 0 && (jsxs("div", { className: styles$g.sortControls, children: [jsx("label", { htmlFor: "cardlist-sort-select", children: "Sort by:" }), jsx("select", { id: "cardlist-sort-select", value: sortKey, onChange: (e) => handleSortChange(e.target.value), className: styles$g.sortSelect, children: sortOptions.map(option => (jsx("option", { value: option.key, children: option.label }, option.key))) }), jsx("button", { onClick: () => setSortDirection(prev => prev === 'asc' ? 'desc' : 'asc'), className: `cw-button-icon ${sortDirection === 'asc' ? 'cwi-arrow-up' : 'cwi-arrow-down'}`, title: `Sort ${sortDirection === 'asc' ? 'descending' : 'ascending'}` })] })), isLoading ? (jsx("div", { className: styles$g.loading, children: jsx(CwLoading, { isLoading: isLoading }) })) : sortedItems.length === 0 ? (jsx("div", { className: styles$g.emptyState, children: emptyState || jsx("p", { children: "No items to display" }) })) : (jsxs(Fragment, { children: [jsx("div", { className: `${styles$g.cardContainer}`, "data-layout": layout, style: gridStyle, children: visibleItems.map((item, index) => (jsx("div", { className: styles$g.cardWrapper, children: renderCard(item, index) }, index))) }), totalPages > 1 && (jsxs("div", { className: styles$g.pagination, children: [jsx("button", { disabled: currentPage === 1, onClick: () => setCurrentPage(p => Math.max(1, p - 1)), className: "cw-button-icon cwi-chevron-left" }), jsxs("span", { className: styles$g.pageInfo, children: [currentPage, " of ", totalPages] }), jsx("button", { disabled: currentPage === totalPages, onClick: () => setCurrentPage(p => Math.min(totalPages, p + 1)), className: "cw-button-icon cwi-chevron-right" })] }))] }))] }));
|
|
1511
1514
|
}
|
|
1512
1515
|
|
|
1513
|
-
var styles$
|
|
1516
|
+
var styles$f = {"cw-accordion":"cw-accordion-module_cw-accordion__ErvlW","cw-accordion-body":"cw-accordion-module_cw-accordion-body__xlI8b"};
|
|
1514
1517
|
|
|
1515
1518
|
/**
|
|
1516
1519
|
*
|
|
@@ -1527,7 +1530,7 @@ function CwAccordionContainer(CwelltAccordionContainerProps) {
|
|
|
1527
1530
|
setVisible_accordionBody(!isVisible_accordionBody);
|
|
1528
1531
|
};
|
|
1529
1532
|
// #endregion
|
|
1530
|
-
return (jsxs("div", { className: styles$
|
|
1533
|
+
return (jsxs("div", { className: styles$f["cw-accordion"], style: CwelltAccordionContainerProps.style, "data-open": isVisible_accordionBody, children: [jsxs("header", { onClick: () => showAccordionBody(), children: [jsx("div", { children: CwelltAccordionContainerProps.desc_text }), jsx("button", { className: "cw-button-icon" })] }), jsx("div", { className: styles$f["cw-accordion-body"], children: CwelltAccordionContainerProps.children })] }));
|
|
1531
1534
|
}
|
|
1532
1535
|
|
|
1533
1536
|
/**
|
|
@@ -1638,6 +1641,22 @@ function CwTable({ columns, data, pagination = false, pageSizeOptions = [5, 10,
|
|
|
1638
1641
|
dataCopy.sort((a, b) => {
|
|
1639
1642
|
const aVal = a[sortConfig.key];
|
|
1640
1643
|
const bVal = b[sortConfig.key];
|
|
1644
|
+
// Handle null/undefined
|
|
1645
|
+
if (aVal == null && bVal == null)
|
|
1646
|
+
return 0;
|
|
1647
|
+
if (aVal == null)
|
|
1648
|
+
return 1;
|
|
1649
|
+
if (bVal == null)
|
|
1650
|
+
return -1;
|
|
1651
|
+
// Handle strings (case-insensitive)
|
|
1652
|
+
if (typeof aVal === 'string' && typeof bVal === 'string') {
|
|
1653
|
+
const comparison = aVal.localeCompare(bVal, undefined, {
|
|
1654
|
+
sensitivity: 'base',
|
|
1655
|
+
numeric: true
|
|
1656
|
+
});
|
|
1657
|
+
return comparison * (sortConfig.direction === "asc" ? 1 : -1);
|
|
1658
|
+
}
|
|
1659
|
+
// Handle numbers and other types
|
|
1641
1660
|
return (aVal < bVal ? -1 : aVal > bVal ? 1 : 0) * (sortConfig.direction === "asc" ? 1 : -1);
|
|
1642
1661
|
});
|
|
1643
1662
|
}
|
|
@@ -1728,7 +1747,7 @@ function CwTable({ columns, data, pagination = false, pageSizeOptions = [5, 10,
|
|
|
1728
1747
|
}, min: 1, max: totalPages }), jsxs("span", { children: ["of ", totalPages] }), jsx("button", { onClick: () => handlePageChange(currentPage + 1), disabled: currentPage === totalPages || totalPages === 1, className: "cw-button-icon cwi-chevron-right", title: "Next" }), jsx("button", { onClick: () => handlePageChange(totalPages), disabled: currentPage === totalPages || totalPages === 1, className: "cw-button-icon cwi-chevron-right-double", title: "Last" }), jsx("select", { value: localItemsPerPage, onChange: handleItemsPerPageChange, children: pageSizeOptions.map(size => (jsxs("option", { value: size, children: [size, " / page"] }, size))) })] }))] }));
|
|
1729
1748
|
}
|
|
1730
1749
|
|
|
1731
|
-
var styles$
|
|
1750
|
+
var styles$e = {"cw-tabs":"cw-tabs-module_cw-tabs__1pmji","cw-tabs-content":"cw-tabs-module_cw-tabs-content__HTp8d"};
|
|
1732
1751
|
|
|
1733
1752
|
const TabIcon = ({ icon }) => {
|
|
1734
1753
|
if (!icon)
|
|
@@ -1778,7 +1797,7 @@ function CwTabs(CwTabsProps) {
|
|
|
1778
1797
|
const tabsListStyle = position === 'left' && CwTabsProps.tabsListWidth
|
|
1779
1798
|
? { minWidth: CwTabsProps.tabsListWidth }
|
|
1780
1799
|
: undefined;
|
|
1781
|
-
return (jsxs("div", { id: CwTabsProps.id, className: styles$
|
|
1800
|
+
return (jsxs("div", { id: CwTabsProps.id, className: styles$e['cw-tabs'], style: CwTabsProps.style, "data-tabs-position": position, children: [jsx("ul", { style: tabsListStyle, children: CwTabsProps.tabs.map(tab => (jsxs("li", { className: `${tab.key === activeTab ? "cw-tab-active" : ""}`, onClick: () => handleTabClick(tab), "data-active": tab.key === activeTab, children: [jsx(TabIcon, { icon: tab.icon }), tab.title] }, tab.key))) }), jsx("div", { className: styles$e['cw-tabs-content'], children: activeTab !== null && CwTabsProps.tabs.find(tab => tab.key === activeTab)?.content })] }));
|
|
1782
1801
|
}
|
|
1783
1802
|
|
|
1784
1803
|
/**
|
|
@@ -1818,15 +1837,15 @@ const CwExpandable = ({ briefing, onToggle, onOpen, onClose, children, ...detail
|
|
|
1818
1837
|
* emptyValue="N/A"
|
|
1819
1838
|
* />
|
|
1820
1839
|
*/
|
|
1821
|
-
const CwKeyValueList = ({ items, className = "", emptyValue = "-", direction = "row" }) => {
|
|
1822
|
-
return (jsx("dl", { className: `cw-keyvalue-list ${className}`, children: items.map(item => (jsxs("div", { className: `cw-keyvalue-list-item cw-flex-${direction}`, children: [jsx("dt", { children: item.label }), jsx("dd", { children: item.value !== undefined && item.value !== null && item.value !== ""
|
|
1840
|
+
const CwKeyValueList = ({ items, className = "", emptyValue = "-", direction = "row", ...htmlProps }) => {
|
|
1841
|
+
return (jsx("dl", { className: `cw-keyvalue-list ${className}`, ...htmlProps, children: items.map(item => (jsxs("div", { className: `cw-keyvalue-list-item cw-flex-${direction}`, children: [jsx("dt", { children: item.label }), jsx("dd", { children: item.value !== undefined && item.value !== null && item.value !== ""
|
|
1823
1842
|
? (React__default.isValidElement(item.value)
|
|
1824
1843
|
? item.value
|
|
1825
1844
|
: `${item.value}${item.suffix ? ` ${item.suffix}` : ''}`)
|
|
1826
1845
|
: emptyValue })] }, item.key))) }));
|
|
1827
1846
|
};
|
|
1828
1847
|
|
|
1829
|
-
var styles$
|
|
1848
|
+
var styles$d = {"sortableList":"cw-sortable-list-module_sortableList__PyLO-","sortableItem":"cw-sortable-list-module_sortableItem__FAnn2","readOnly":"cw-sortable-list-module_readOnly__r7GcH","dragging":"cw-sortable-list-module_dragging__MD715","moved":"cw-sortable-list-module_moved__sE6-N","expandedContent":"cw-sortable-list-module_expandedContent__Kocna","sortableHandle":"cw-sortable-list-module_sortableHandle__HvYBK","sortableContent":"cw-sortable-list-module_sortableContent__C6JhR","sortableTitle":"cw-sortable-list-module_sortableTitle__EgWXr","sortableExtraContent":"cw-sortable-list-module_sortableExtraContent__s4LSv","sortableActions":"cw-sortable-list-module_sortableActions__gwQOU","dropIndicator":"cw-sortable-list-module_dropIndicator__MNSF-","emptyMessage":"cw-sortable-list-module_emptyMessage__gMpaL"};
|
|
1830
1849
|
|
|
1831
1850
|
function CwSortableList({ items, onReorder, renderItem, className = '', movedItems = new Set(), emptyMessage = "No elements to show", readOnly = false, }) {
|
|
1832
1851
|
const [draggedItem, setDraggedItem] = useState(null);
|
|
@@ -1889,15 +1908,15 @@ function CwSortableList({ items, onReorder, renderItem, className = '', movedIte
|
|
|
1889
1908
|
}
|
|
1890
1909
|
};
|
|
1891
1910
|
if (items.length === 0) {
|
|
1892
|
-
return (jsx("div", { className: `${styles$
|
|
1911
|
+
return (jsx("div", { className: `${styles$d.sortableList} ${styles$d.emptyState} ${className}`, children: jsx("div", { className: styles$d.emptyMessage, children: emptyMessage }) }));
|
|
1893
1912
|
}
|
|
1894
|
-
return (jsx("div", { className: `${styles$
|
|
1913
|
+
return (jsx("div", { className: `${styles$d.sortableList} ${className}`, children: items.map((item, index) => {
|
|
1895
1914
|
const { title, extraContent, actions, showHandle = true, expandedContent } = renderItem(item);
|
|
1896
1915
|
const isDragging = draggedItem?.id === item.id;
|
|
1897
1916
|
const isMoved = movedItems.has(item.id);
|
|
1898
1917
|
const canExpand = Boolean(expandedContent);
|
|
1899
1918
|
const isExpanded = expandedItems.has(item.id);
|
|
1900
|
-
return (jsxs(React__default.Fragment, { children: [dropIndicatorIndex === index && jsx("div", { className: styles$
|
|
1919
|
+
return (jsxs(React__default.Fragment, { children: [dropIndicatorIndex === index && jsx("div", { className: styles$d.dropIndicator }), jsxs("div", { className: `${styles$d.sortableItem} ${isDragging ? styles$d.dragging : ''} ${isMoved ? styles$d.moved : ''} ${readOnly ? styles$d.readOnly : ''}`, draggable: !readOnly, onDragStart: (e) => handleDragStart(e, item), onDragOver: (e) => handleDragOver(e, index), onDragEnd: handleDragEnd, children: [jsxs("header", { children: [canExpand ? (jsx(CwButton, { variant: "icon", onClick: () => toggleExpanded(item.id), type: "button", title: isExpanded ? "Collapse" : "Expand", icon: isExpanded ? "chevron-up" : "chevron-down" })) : showHandle ? (jsx("div", { className: styles$d.sortableHandle, children: jsx(CwIcon, { iconId: "grip-dots" }) })) : null, jsxs("div", { className: styles$d.sortableContent, children: [jsx("div", { className: styles$d.sortableTitle, children: title }), extraContent && jsx("div", { className: styles$d.sortableExtraContent, children: extraContent })] }), jsx("div", { className: styles$d.sortableActions, children: actions })] }), isExpanded && expandedContent && (jsx("div", { className: styles$d.expandedContent, children: expandedContent }))] }), !readOnly && dropIndicatorIndex === items.length && index === items.length - 1 && (jsx("div", { className: styles$d.dropIndicator }))] }, item.id));
|
|
1901
1920
|
}) }));
|
|
1902
1921
|
}
|
|
1903
1922
|
|
|
@@ -2074,7 +2093,7 @@ function CwFileUpload(fileUploadProps) {
|
|
|
2074
2093
|
return (jsxs("div", { children: [jsxs("div", { className: "row", children: [jsx("input", { className: "cw-button", type: "file", accept: fileUploadProps.accept, readOnly: true, placeholder: "No file selected...", onChange: handleFileChange }), previewURL && (jsx("div", { className: "row", children: jsx("img", { src: previewURL, alt: "Preview", style: { maxWidth: "200px", maxHeight: "200px" } }) }))] }), error && jsx("div", { className: "row error", children: error }), jsx("div", { className: "row", children: jsxs("label", { children: ["Please note: File/image has to be in ", fileUploadProps.acceptString, " format", fileUploadProps.sizeString && `, ${fileUploadProps.sizeString}`] }) })] }));
|
|
2075
2094
|
}
|
|
2076
2095
|
|
|
2077
|
-
var styles$
|
|
2096
|
+
var styles$c = {"fileUploadContainer":"cw-file-upload-multiple-module_fileUploadContainer__liEc1","hiddenInput":"cw-file-upload-multiple-module_hiddenInput__TZBBI","uploadArea":"cw-file-upload-multiple-module_uploadArea__DdOhs","uploadAreaDisabled":"cw-file-upload-multiple-module_uploadAreaDisabled__VWeFX","uploadTitle":"cw-file-upload-multiple-module_uploadTitle__gjRk8","uploadSubtitle":"cw-file-upload-multiple-module_uploadSubtitle__Z0S5t","filesContainer":"cw-file-upload-multiple-module_filesContainer__g44PY","fileItem":"cw-file-upload-multiple-module_fileItem__w27Dg","fileIcon":"cw-file-upload-multiple-module_fileIcon__iJJUX","fileExtension":"cw-file-upload-multiple-module_fileExtension__vOuHv","fileInfo":"cw-file-upload-multiple-module_fileInfo__R5ZTv","fileName":"cw-file-upload-multiple-module_fileName__DjepK","fileSize":"cw-file-upload-multiple-module_fileSize__b8GSm","smallButton":"cw-file-upload-multiple-module_smallButton__siUAh"};
|
|
2078
2097
|
|
|
2079
2098
|
function CwFileUploadMultiple(fileUploadProps) {
|
|
2080
2099
|
const fileInputRef = useRef(null);
|
|
@@ -2216,7 +2235,7 @@ function CwFileUploadMultiple(fileUploadProps) {
|
|
|
2216
2235
|
}
|
|
2217
2236
|
}
|
|
2218
2237
|
};
|
|
2219
|
-
return (jsxs("div", { className: `${styles$
|
|
2238
|
+
return (jsxs("div", { className: `${styles$c.fileUploadContainer} ${fileUploadProps.className}`, children: [jsx("input", { ref: fileInputRef, type: "file", name: fileUploadProps.name, accept: fileUploadProps.accept, multiple: fileUploadProps.multiple, onChange: handleFileSelect, disabled: fileUploadProps.disabled, "aria-label": "files", className: styles$c.hiddenInput }), selectedFiles.length === 0 ? (jsxs("div", { className: `${styles$c.uploadArea} ${fileUploadProps.disabled ? styles$c.uploadAreaDisabled : ''}`, onDragOver: handleDragOver, onDrop: handleDrop, onClick: !fileUploadProps.disabled ? handleButtonClick : undefined, children: [jsx(CwIcon, { iconId: "upload" }), jsx("p", { className: `${styles$c.uploadTitle}`, children: fileUploadProps.disabled ? 'Upload disabled' : 'Click to upload or drag and drop' }), jsxs("p", { className: `${styles$c.uploadSubtitle}`, children: [fileUploadProps.accept ? `Accepted files: ${fileUploadProps.accept}` : 'All file types accepted', !fileUploadProps.multiple && ' (Single file only)'] })] })) : (jsxs("div", { className: styles$c.filesContainer, children: [jsxs("div", { className: "cw-flex-row cw-align-between-center", children: [jsxs("small", { className: styles$c.filesCount, children: [selectedFiles.length, " file", selectedFiles.length !== 1 ? 's' : '', " selected"] }), jsx(CwButton, { onClick: removeAllFiles, disabled: fileUploadProps.disabled, color: "danger", variant: "outline", icon: "delete", text: "Clear all" })] }), selectedFiles.map((file, index) => (jsxs("div", { className: styles$c.fileItem, children: [jsxs("div", { className: styles$c.fileIcon, children: [jsx(CwIcon, { iconId: "page" }), jsx("span", { className: styles$c.fileExtension, children: getFileExtension(file.name) })] }), jsxs("div", { className: styles$c.fileInfo, children: [jsx("p", { className: styles$c.fileName, children: file.name }), jsxs("p", { className: styles$c.fileSize, children: [(file.size / 1024).toFixed(1), " KB"] })] }), jsx(CwButton, { variant: "icon", icon: "close", color: "neutral", onClick: () => removeFile(index), className: styles$c.smallButton })] }, index))), fileUploadProps.multiple && (jsx(CwButton, { text: "Add More Files", icon: "plus", variant: "outline", onClick: handleButtonClick, disabled: fileUploadProps.disabled })), !fileUploadProps.multiple && (jsx(CwButton, { text: "Change File", icon: "refresh", onClick: handleButtonClick, disabled: fileUploadProps.disabled }))] }))] }));
|
|
2220
2239
|
}
|
|
2221
2240
|
|
|
2222
2241
|
function CwInput(CwInputProps) {
|
|
@@ -2259,7 +2278,7 @@ function CwDigit(props) {
|
|
|
2259
2278
|
return (jsx("div", { className: "cw-input-text", children: jsxs(CwAlign, { ...alignProps, itemProp: inputProps.required === true ? "required" : "", children: [labelProps && (jsxs(CwLabel, { ...labelProps, children: [iconProps && jsx(CwIcon, { ...iconProps }), labelProps.text] })), jsx("input", { type: "number", ...inputProps }), buttonProps && jsx(CwButton, { ...buttonProps })] }) }));
|
|
2260
2279
|
}
|
|
2261
2280
|
|
|
2262
|
-
var styles$
|
|
2281
|
+
var styles$b = {"colorPreview":"cw-color-picker-module_colorPreview__ylJcD","hueBar":"cw-color-picker-module_hueBar__bFhyC","hueBarSlider":"cw-color-picker-module_hueBarSlider__D53IV","colorPickerInteractiveArea":"cw-color-picker-module_colorPickerInteractiveArea__KZFR1","colorArea":"cw-color-picker-module_colorArea__xgpSE","colorAreaOverlay":"cw-color-picker-module_colorAreaOverlay__pmgOc","hueBackground":"cw-color-picker-module_hueBackground__Mks78","whiteGradient":"cw-color-picker-module_whiteGradient__Bt-fU","blackGradient":"cw-color-picker-module_blackGradient__VnEKJ","colorAreaCursor":"cw-color-picker-module_colorAreaCursor__lotg3"};
|
|
2263
2282
|
|
|
2264
2283
|
const CwColorPicker = ({ initialColor, onChange, previewText = "Color preview" }) => {
|
|
2265
2284
|
const [rgb, setRgb] = useState({ r: 255, g: 255, b: 255 });
|
|
@@ -2462,13 +2481,13 @@ const CwColorPicker = ({ initialColor, onChange, previewText = "Color preview" }
|
|
|
2462
2481
|
// Calculate background color for the main area based on current hue
|
|
2463
2482
|
const hueColor = hsvToRgb(hsv.h, 100, 100);
|
|
2464
2483
|
const hueHex = rgbToHex(hueColor.r, hueColor.g, hueColor.b);
|
|
2465
|
-
return (jsxs("div", { className: "cw-flex-column cw-gap-small", children: [jsxs("div", { className: "cw-flex-row cw-align-between-center cw-gap-small", children: [jsx("div", { className: styles$
|
|
2484
|
+
return (jsxs("div", { className: "cw-flex-column cw-gap-small", children: [jsxs("div", { className: "cw-flex-row cw-align-between-center cw-gap-small", children: [jsx("div", { className: styles$b.colorPreview, style: { backgroundColor: hexColor, color: getContrastColor(hexColor) }, children: previewText }), jsx("button", { type: "button", className: "cw-button", onClick: toggleInputMode, style: { minWidth: "3ch" }, children: inputMode === 'hex' ? 'RGB' : 'HEX' })] }), jsx("div", { className: "color-inputs-row", children: inputMode === 'hex' ? (jsx("input", { type: "text", value: hexColor, onChange: handleHexChange })) : (jsxs("div", { className: "cw-grid-base-3 cw-gap-small", children: [jsxs("div", { children: [jsx("label", { children: "R:" }), jsx("input", { type: "number", name: "r", min: "0", max: "255", value: rgb.r, onChange: handleRgbChange })] }), jsxs("div", { children: [jsx("label", { children: "G:" }), jsx("input", { type: "number", name: "g", min: "0", max: "255", value: rgb.g, onChange: handleRgbChange })] }), jsxs("div", { children: [jsx("label", { children: "B:" }), jsx("input", { type: "number", name: "b", min: "0", max: "255", value: rgb.b, onChange: handleRgbChange })] })] })) }), jsxs("div", { className: styles$b.colorPickerInteractiveArea, children: [jsx("div", { className: styles$b.hueBar, ref: hueBarRef, onClick: handleHueBarClick, children: jsx("div", { className: styles$b.hueBarSlider, style: { top: `${(360 - hsv.h) / 360 * 100}%` } }) }), jsxs("div", { className: styles$b.colorArea, ref: colorAreaRef, onClick: handleColorAreaClick, children: [jsxs("div", { className: styles$b.colorAreaOverlay, children: [jsx("div", { className: styles$b.hueBackground, style: { backgroundColor: hueHex } }), jsx("div", { className: styles$b.whiteGradient }), jsx("div", { className: styles$b.blackGradient })] }), jsx("div", { className: styles$b.colorAreaCursor, style: {
|
|
2466
2485
|
left: `${hsv.s}%`,
|
|
2467
2486
|
top: `${100 - hsv.v}%`
|
|
2468
2487
|
} })] })] })] }));
|
|
2469
2488
|
};
|
|
2470
2489
|
|
|
2471
|
-
var styles$
|
|
2490
|
+
var styles$a = {"selectColor":"cw-input-color-module_selectColor__DTo3V","disabled":"cw-input-color-module_disabled__O1fK5","colorDropdown":"cw-input-color-module_colorDropdown__pX2bc"};
|
|
2472
2491
|
|
|
2473
2492
|
const CwInputColor = ({ value, onChange, previewText = "Color preview", disabled = false, width = '4rem', height = '2rem' }) => {
|
|
2474
2493
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -2601,11 +2620,11 @@ const CwInputColor = ({ value, onChange, previewText = "Color preview", disabled
|
|
|
2601
2620
|
break;
|
|
2602
2621
|
}
|
|
2603
2622
|
};
|
|
2604
|
-
return (jsxs(Fragment, { children: [jsx("div", { ref: containerRef, onClick: handleToggle, className: `${styles$
|
|
2623
|
+
return (jsxs(Fragment, { children: [jsx("div", { ref: containerRef, onClick: handleToggle, className: `${styles$a.selectColor} ${disabled ? styles$a.disabled : ''}`, style: {
|
|
2605
2624
|
width,
|
|
2606
2625
|
height,
|
|
2607
2626
|
backgroundColor: value,
|
|
2608
|
-
}, "aria-label": "Open color picker", "aria-expanded": isOpen, "aria-haspopup": "dialog", role: "button", tabIndex: disabled ? -1 : 0, onKeyDown: handleKeyDown }), isOpen && createPortal(jsx("div", { ref: dropdownRef, className: styles$
|
|
2627
|
+
}, "aria-label": "Open color picker", "aria-expanded": isOpen, "aria-haspopup": "dialog", role: "button", tabIndex: disabled ? -1 : 0, onKeyDown: handleKeyDown }), isOpen && createPortal(jsx("div", { ref: dropdownRef, className: styles$a.colorDropdown, style: dropdownStyle, role: "dialog", "aria-modal": "true", "aria-label": "Color picker", children: jsx(CwColorPicker, { initialColor: value, onChange: handleColorChange, previewText: previewText }) }), document.body)] }));
|
|
2609
2628
|
};
|
|
2610
2629
|
|
|
2611
2630
|
/**
|
|
@@ -3098,7 +3117,7 @@ const CwImageArea = forwardRef((props, ref) => {
|
|
|
3098
3117
|
});
|
|
3099
3118
|
CwImageArea.displayName = "CwImageArea";
|
|
3100
3119
|
|
|
3101
|
-
var styles$
|
|
3120
|
+
var styles$9 = {"cw-weekday-selector":"cw-weekday-selector-module_cw-weekday-selector__Iz4GZ"};
|
|
3102
3121
|
|
|
3103
3122
|
/**
|
|
3104
3123
|
* This class represents a week where days can be selected or unselected
|
|
@@ -3238,7 +3257,7 @@ const CwWeekdaySelector = ({ value = "", onChange, disabled = false }) => {
|
|
|
3238
3257
|
setSelectedDays(newWeekdays);
|
|
3239
3258
|
onChange?.(newWeekdays.toString());
|
|
3240
3259
|
};
|
|
3241
|
-
return (jsx("div", { className: styles$
|
|
3260
|
+
return (jsx("div", { className: styles$9["cw-weekday-selector"], children: Weekdays.getFullWeek().map(day => (jsx("input", { type: "checkbox", "data-day": day, checked: selectedDays.toArray().includes(day), onChange: (e) => handleChange(day, e.target.checked), disabled: disabled }, day))) }));
|
|
3242
3261
|
};
|
|
3243
3262
|
|
|
3244
3263
|
function CwCheckbox(CwCheckboxProps) {
|
|
@@ -3985,13 +4004,13 @@ function CwMultiselect(CwelltCustomFilterTabProps) {
|
|
|
3985
4004
|
}) }, "group" + i))) })] }) }) }) }));
|
|
3986
4005
|
}
|
|
3987
4006
|
|
|
3988
|
-
var styles$
|
|
4007
|
+
var styles$8 = {"cw-multifilter-tag":"cw-multi-filter-tag-module_cw-multifilter-tag__Epda-"};
|
|
3989
4008
|
|
|
3990
4009
|
const CwMultiFilterTag = props => {
|
|
3991
4010
|
const { ID, Name, Value, Category, Removable, PrimaryColor, OnPrimaryColor, Selectable, Selected, OnSelect } = props;
|
|
3992
4011
|
const BackgroundColor = `rgb(${PrimaryColor.r},${PrimaryColor.g},${PrimaryColor.b})`;
|
|
3993
4012
|
const TextColor = `rgb(${OnPrimaryColor.r},${OnPrimaryColor.g},${OnPrimaryColor.b})`;
|
|
3994
|
-
return (jsxs("li", { className: styles$
|
|
4013
|
+
return (jsxs("li", { className: styles$8["cw-multifilter-tag"], "data-selected": !!props.Selected, "data-removable": !!props.Removable, style: {
|
|
3995
4014
|
color: TextColor,
|
|
3996
4015
|
backgroundColor: BackgroundColor,
|
|
3997
4016
|
opacity: Selected && !Removable ? "0.5" : "1",
|
|
@@ -4002,7 +4021,7 @@ const CwMultiFilterTag = props => {
|
|
|
4002
4021
|
}, children: [jsx("span", { id: ID, "data-value": Value, "data-category": Category, children: Name }), Removable && (jsx("span", { onClick: () => props.OnRemove?.(props), children: jsx(CwIcon, { iconId: "close" }) }))] }));
|
|
4003
4022
|
};
|
|
4004
4023
|
|
|
4005
|
-
var styles$
|
|
4024
|
+
var styles$7 = {"cw-multi-filter-catalog-container":"cw-multi-filter-module_cw-multi-filter-catalog-container__S3nsq","cw-multi-filter":"cw-multi-filter-module_cw-multi-filter__zipBK","cw-multi-filter-search":"cw-multi-filter-module_cw-multi-filter-search__eyHr0"};
|
|
4006
4025
|
|
|
4007
4026
|
/**
|
|
4008
4027
|
* A multiple filter selector, a MULTI-SELECT even. Allows users to select and filter items based on tags.
|
|
@@ -4248,9 +4267,9 @@ const CwMultiFilter = ({ allTags, id, onChangeSelectedTags, selectedTags, style
|
|
|
4248
4267
|
inputRef.current?.focus();
|
|
4249
4268
|
}
|
|
4250
4269
|
};
|
|
4251
|
-
return (jsxs("form", { ref: componentRef, id: id, className: styles$
|
|
4270
|
+
return (jsxs("form", { ref: componentRef, id: id, className: styles$7["cw-multi-filter"], style: style, onSubmit: (e) => {
|
|
4252
4271
|
e.preventDefault();
|
|
4253
|
-
}, children: [jsxs("div", { onClick: handleDivClick, className: styles$
|
|
4272
|
+
}, children: [jsxs("div", { onClick: handleDivClick, className: styles$7["cw-multi-filter-search"], style: isPanelOpen ? { outline: "1px solid var(--cw-color-primary)", outlineOffset: "-2px" } : {}, children: [jsxs("ul", { id: id + "_selected_filters", children: [Array.from(selectedTags).map(tag => (createElement(CwMultiFilterTag, { ...tag, key: tag.ID, Selectable: false, Removable: true, OnRemove: () => removeTag(tag.ID) }))), jsx("input", { type: "text", id: id + "_input", ref: inputRef, value: inputTextValue, spellCheck: false, onFocus: () => setIsPanelOpen(true), onChange: e => handleInputText(e.target.value), autoComplete: "off", placeholder: "Write to filter", onKeyDown: e => {
|
|
4254
4273
|
switch (e.key) {
|
|
4255
4274
|
case "Enter":
|
|
4256
4275
|
case "Tab":
|
|
@@ -4271,7 +4290,7 @@ const CwMultiFilter = ({ allTags, id, onChangeSelectedTags, selectedTags, style
|
|
|
4271
4290
|
} })] }), selectedTags.size > 0 ? (jsx("input", { type: "reset", value: "\u00D7", onClick: e => {
|
|
4272
4291
|
e.preventDefault();
|
|
4273
4292
|
onChangeSelectedTags(new Set());
|
|
4274
|
-
} })) : null] }), jsxs("section", { className: styles$
|
|
4293
|
+
} })) : null] }), jsxs("section", { className: styles$7["cw-multi-filter-catalog-container"], "data-display-none": !isPanelOpen, children: [jsxs("nav", { children: [jsx("button", { style: selectedCategory === "All"
|
|
4275
4294
|
? {
|
|
4276
4295
|
backgroundColor: "var(--cw-color-primary-container)",
|
|
4277
4296
|
color: "var(--cw-color-primary)",
|
|
@@ -4298,7 +4317,7 @@ const CwMultiFilter = ({ allTags, id, onChangeSelectedTags, selectedTags, style
|
|
|
4298
4317
|
} }, props.ID))) })] })] }));
|
|
4299
4318
|
};
|
|
4300
4319
|
|
|
4301
|
-
var styles$
|
|
4320
|
+
var styles$6 = {"tree-container":"cw-tree-view-module_tree-container__NN-HJ","tree-wrapper":"cw-tree-view-module_tree-wrapper__keBZI","tree-item":"cw-tree-view-module_tree-item__prE9N","tree-node":"cw-tree-view-module_tree-node__wfro9","selected":"cw-tree-view-module_selected__XJQ0w","non-selectable":"cw-tree-view-module_non-selectable__YuPSx","tree-children":"cw-tree-view-module_tree-children__ji8CZ","empty-state":"cw-tree-view-module_empty-state__yvRjo","tree-label":"cw-tree-view-module_tree-label__ss3Nf","tree-spacer":"cw-tree-view-module_tree-spacer__E9Ud2"};
|
|
4302
4321
|
|
|
4303
4322
|
function CwTreeView({ data, onSelect, allowParentSelection = false, selectedId: initialSelectedId = null }) {
|
|
4304
4323
|
const [expanded, setExpanded] = useState(new Set());
|
|
@@ -4365,10 +4384,10 @@ function CwTreeView({ data, onSelect, allowParentSelection = false, selectedId:
|
|
|
4365
4384
|
const isLeaf = !hasChildren;
|
|
4366
4385
|
const isSelected = selectedId?.toString().toLowerCase() === node.id.toString().toLowerCase();
|
|
4367
4386
|
const selectable = allowParentSelection || isLeaf;
|
|
4368
|
-
return (jsxs("div", { className: styles$
|
|
4369
|
-
styles$
|
|
4370
|
-
isSelected && styles$
|
|
4371
|
-
!selectable && styles$
|
|
4387
|
+
return (jsxs("div", { className: styles$6["tree-item"], children: [jsxs("div", { className: [
|
|
4388
|
+
styles$6["tree-node"],
|
|
4389
|
+
isSelected && styles$6["selected"],
|
|
4390
|
+
!selectable && styles$6["non-selectable"]
|
|
4372
4391
|
].filter(Boolean).join(' '), style: { paddingLeft: `${depth * 24 + 8}px` }, onClick: () => {
|
|
4373
4392
|
if (selectable) {
|
|
4374
4393
|
setSelectedId(node.id);
|
|
@@ -4377,7 +4396,7 @@ function CwTreeView({ data, onSelect, allowParentSelection = false, selectedId:
|
|
|
4377
4396
|
else {
|
|
4378
4397
|
toggleExpand(node.id);
|
|
4379
4398
|
}
|
|
4380
|
-
}, children: [hasChildren && (jsx(CwIcon, { size: "large", iconId: isExpanded ? "chevron-down" : "chevron-right" })), jsx("div", { className: `${styles$
|
|
4399
|
+
}, children: [hasChildren && (jsx(CwIcon, { size: "large", iconId: isExpanded ? "chevron-down" : "chevron-right" })), jsx("div", { className: `${styles$6["tree-label"]} ${!hasChildren ? styles$6["tree-spacer"] : ''}`, children: node.label })] }), hasChildren && isExpanded && (jsx("div", { className: styles$6["tree-children"], children: node.children.map((child) => renderNode(child, depth + 1)) }))] }, node.id));
|
|
4381
4400
|
};
|
|
4382
4401
|
// Function to search for nodes that match the search term
|
|
4383
4402
|
const searchInTree = (nodes, searchTerm) => {
|
|
@@ -4401,7 +4420,7 @@ function CwTreeView({ data, onSelect, allowParentSelection = false, selectedId:
|
|
|
4401
4420
|
return results;
|
|
4402
4421
|
};
|
|
4403
4422
|
const filteredData = searchInTree(data, search);
|
|
4404
|
-
return (jsxs("div", { className: `cw-tree-view ${styles$
|
|
4423
|
+
return (jsxs("div", { className: `cw-tree-view ${styles$6["tree-container"]}`, children: [jsxs("header", { children: [jsx("input", { type: "text", placeholder: "Search in tree...", value: search, onChange: (e) => setSearch(e.target.value) }), search && (jsx(CwButton, { onClick: () => setSearch(""), type: "button", icon: "close", variant: "icon", color: "neutral" }))] }), jsx("div", { className: styles$6["tree-wrapper"], children: filteredData.length > 0 ? (filteredData.map((node) => renderNode(node))) : (jsxs("div", { className: styles$6["empty-state"], children: [jsx(CwIcon, { iconId: "comment" }), search ? "No results found" : "There are no items"] })) })] }));
|
|
4405
4424
|
}
|
|
4406
4425
|
|
|
4407
4426
|
function CwSearchInput(optionsProps) {
|
|
@@ -4483,7 +4502,7 @@ function CwSearchInput(optionsProps) {
|
|
|
4483
4502
|
: option.description }, option.id))) }) }))] }));
|
|
4484
4503
|
}
|
|
4485
4504
|
|
|
4486
|
-
var styles$
|
|
4505
|
+
var styles$5 = {"context-menu":"cw-context-menu-module_context-menu__dbxnO","context-menu-item":"cw-context-menu-module_context-menu-item__B2W-Q"};
|
|
4487
4506
|
|
|
4488
4507
|
/**
|
|
4489
4508
|
* A context menu that is rendered when the user clicks on a button.
|
|
@@ -4520,10 +4539,10 @@ const CwContextMenu = ({ children, options, offset, onSelect }) => {
|
|
|
4520
4539
|
document.removeEventListener("mousedown", handleOutsideClick);
|
|
4521
4540
|
};
|
|
4522
4541
|
}, []);
|
|
4523
|
-
return (jsxs("div", { onContextMenu: handleContextMenu, children: [children, isOpen && (jsx("div", { ref: menuRef, className: styles$
|
|
4542
|
+
return (jsxs("div", { onContextMenu: handleContextMenu, children: [children, isOpen && (jsx("div", { ref: menuRef, className: styles$5["context-menu"], style: {
|
|
4524
4543
|
top: position.y + (offset?.y || 0),
|
|
4525
4544
|
left: position.x + (offset?.x || 0),
|
|
4526
|
-
}, children: options.map(option => (jsx("div", { onClick: () => handleOptionClick(option), className: styles$
|
|
4545
|
+
}, children: options.map(option => (jsx("div", { onClick: () => handleOptionClick(option), className: styles$5["context-menu-item"], children: option }, option))) }))] }));
|
|
4527
4546
|
};
|
|
4528
4547
|
|
|
4529
4548
|
function CwDataItem(cwBoxItemsProps) {
|
|
@@ -4768,6 +4787,1223 @@ function CwBtnDelay({ cw_btnOnclick, cw_btn_disabled }) {
|
|
|
4768
4787
|
return jsx("button", { onClick: cw_btnOnclick, className: "cw-button-icon cwi-icons cwi-plane-delay", disabled: cw_btn_disabled });
|
|
4769
4788
|
}
|
|
4770
4789
|
|
|
4790
|
+
var styles$4 = {"pickerWrapper":"cw-pickers-base-module_pickerWrapper__Fb9Zo","pickerIcons":"cw-pickers-base-module_pickerIcons__dyd2-","pickerPopup":"cw-pickers-base-module_pickerPopup__dkxJo","title":"cw-pickers-base-module_title__cE7qI"};
|
|
4791
|
+
|
|
4792
|
+
function CustomCaption$2({ displayMonth }) {
|
|
4793
|
+
const { goToMonth, nextMonth, previousMonth } = useNavigation();
|
|
4794
|
+
return (jsxs("header", { children: [jsx(CwButton, { type: "button", variant: "icon", icon: "chevron-left", onClick: () => previousMonth && goToMonth(previousMonth), disabled: !previousMonth, "aria-label": "Previous month" }), jsx("div", { className: styles$4.title, children: format(displayMonth, "MMMM yyyy", { locale: enGB }) }), jsx(CwButton, { type: "button", variant: "icon", icon: "chevron-right", onClick: () => nextMonth && goToMonth(nextMonth), disabled: !nextMonth, "aria-label": "Next month" })] }));
|
|
4795
|
+
}
|
|
4796
|
+
function CwDatePicker({ value, onChange, minDate, maxDate, disabledDates, disabledMatcher, labelProps, alignProps, placeholder = "Select a date", displayFormat = "dd.MM.yyyy", disabled, required, className, showClear = true, popupPosition = "left-bottom", numberOfMonths = 1, showTodayButton = false, }) {
|
|
4797
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
4798
|
+
const [inputValue, setInputValue] = useState("");
|
|
4799
|
+
const containerRef = useRef(null);
|
|
4800
|
+
const inputRef = useRef(null);
|
|
4801
|
+
const prevValueRef = useRef(value);
|
|
4802
|
+
// Parse date from string based on format
|
|
4803
|
+
const parseDate = useCallback((dateString, formatStr) => {
|
|
4804
|
+
try {
|
|
4805
|
+
const cleanString = dateString.trim();
|
|
4806
|
+
const parts = cleanString.split(/[\/\-\.]/);
|
|
4807
|
+
if (parts.length !== 3)
|
|
4808
|
+
return undefined;
|
|
4809
|
+
let day;
|
|
4810
|
+
let month;
|
|
4811
|
+
let year;
|
|
4812
|
+
const formatLower = formatStr.toLowerCase();
|
|
4813
|
+
const dayIndex = formatLower.indexOf('dd');
|
|
4814
|
+
const monthIndex = formatLower.indexOf('mm');
|
|
4815
|
+
const yearIndex = formatLower.indexOf('yyyy') !== -1
|
|
4816
|
+
? formatLower.indexOf('yyyy')
|
|
4817
|
+
: formatLower.indexOf('yy');
|
|
4818
|
+
const positions = [
|
|
4819
|
+
{ type: 'day', index: dayIndex },
|
|
4820
|
+
{ type: 'month', index: monthIndex },
|
|
4821
|
+
{ type: 'year', index: yearIndex }
|
|
4822
|
+
].sort((a, b) => a.index - b.index);
|
|
4823
|
+
positions.forEach((pos, idx) => {
|
|
4824
|
+
const value = parseInt(parts[idx], 10);
|
|
4825
|
+
if (pos.type === 'day')
|
|
4826
|
+
day = value;
|
|
4827
|
+
else if (pos.type === 'month')
|
|
4828
|
+
month = value - 1;
|
|
4829
|
+
else if (pos.type === 'year')
|
|
4830
|
+
year = value;
|
|
4831
|
+
});
|
|
4832
|
+
if (day === undefined || month === undefined || year === undefined)
|
|
4833
|
+
return undefined;
|
|
4834
|
+
if (isNaN(day) || isNaN(month) || isNaN(year))
|
|
4835
|
+
return undefined;
|
|
4836
|
+
if (year < 100) {
|
|
4837
|
+
year = year < 50 ? 2000 + year : 1900 + year;
|
|
4838
|
+
}
|
|
4839
|
+
const parsed = new Date(year, month, day);
|
|
4840
|
+
if (parsed.getDate() === day &&
|
|
4841
|
+
parsed.getMonth() === month &&
|
|
4842
|
+
parsed.getFullYear() === year) {
|
|
4843
|
+
return parsed;
|
|
4844
|
+
}
|
|
4845
|
+
return undefined;
|
|
4846
|
+
}
|
|
4847
|
+
catch {
|
|
4848
|
+
return undefined;
|
|
4849
|
+
}
|
|
4850
|
+
}, []);
|
|
4851
|
+
const normalizeDateForComparison = useCallback((date) => {
|
|
4852
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
4853
|
+
}, []);
|
|
4854
|
+
// Validate and set date - shared logic
|
|
4855
|
+
const validateAndSetDate = useCallback((dateString) => {
|
|
4856
|
+
const parsed = parseDate(dateString, displayFormat);
|
|
4857
|
+
if (parsed && !isNaN(parsed.getTime())) {
|
|
4858
|
+
const normalizedParsed = normalizeDateForComparison(parsed);
|
|
4859
|
+
const normalizedMin = minDate ? normalizeDateForComparison(minDate) : undefined;
|
|
4860
|
+
const normalizedMax = maxDate ? normalizeDateForComparison(maxDate) : undefined;
|
|
4861
|
+
const isValid = (!normalizedMin || normalizedParsed >= normalizedMin) &&
|
|
4862
|
+
(!normalizedMax || normalizedParsed <= normalizedMax);
|
|
4863
|
+
if (isValid) {
|
|
4864
|
+
onChange(parsed);
|
|
4865
|
+
return true;
|
|
4866
|
+
}
|
|
4867
|
+
}
|
|
4868
|
+
return false;
|
|
4869
|
+
}, [parseDate, displayFormat, minDate, maxDate, onChange, normalizeDateForComparison]);
|
|
4870
|
+
// Sync input value with prop value - only when changed externally
|
|
4871
|
+
useEffect(() => {
|
|
4872
|
+
const currentValue = value;
|
|
4873
|
+
if (currentValue !== prevValueRef.current) {
|
|
4874
|
+
prevValueRef.current = currentValue;
|
|
4875
|
+
if (currentValue) {
|
|
4876
|
+
setInputValue(format(currentValue, displayFormat, { locale: enGB }));
|
|
4877
|
+
}
|
|
4878
|
+
else {
|
|
4879
|
+
setInputValue("");
|
|
4880
|
+
}
|
|
4881
|
+
}
|
|
4882
|
+
}, [value, displayFormat]);
|
|
4883
|
+
// Close calendar when clicking outside
|
|
4884
|
+
useEffect(() => {
|
|
4885
|
+
const handleClickOutside = (event) => {
|
|
4886
|
+
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
4887
|
+
setIsOpen(false);
|
|
4888
|
+
}
|
|
4889
|
+
};
|
|
4890
|
+
if (isOpen) {
|
|
4891
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
4892
|
+
}
|
|
4893
|
+
return () => {
|
|
4894
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
4895
|
+
};
|
|
4896
|
+
}, [isOpen]);
|
|
4897
|
+
const handleDaySelect = useCallback((date) => {
|
|
4898
|
+
onChange(date);
|
|
4899
|
+
setIsOpen(false);
|
|
4900
|
+
inputRef.current?.blur();
|
|
4901
|
+
}, [onChange]);
|
|
4902
|
+
const handleClear = useCallback((e) => {
|
|
4903
|
+
e.stopPropagation();
|
|
4904
|
+
onChange(undefined);
|
|
4905
|
+
setInputValue("");
|
|
4906
|
+
}, [onChange]);
|
|
4907
|
+
const handleInputClick = useCallback(() => {
|
|
4908
|
+
if (!disabled) {
|
|
4909
|
+
setIsOpen(true);
|
|
4910
|
+
}
|
|
4911
|
+
}, [disabled]);
|
|
4912
|
+
const handleInputChange = useCallback((e) => {
|
|
4913
|
+
const newValue = e.target.value;
|
|
4914
|
+
setInputValue(newValue);
|
|
4915
|
+
if (newValue.length >= 10) {
|
|
4916
|
+
validateAndSetDate(newValue);
|
|
4917
|
+
}
|
|
4918
|
+
else if (newValue === "") {
|
|
4919
|
+
onChange(undefined);
|
|
4920
|
+
}
|
|
4921
|
+
}, [validateAndSetDate, onChange]);
|
|
4922
|
+
const handleInputBlur = useCallback(() => {
|
|
4923
|
+
if (inputValue && inputValue.trim() !== "") {
|
|
4924
|
+
const parsed = parseDate(inputValue, displayFormat);
|
|
4925
|
+
if (parsed && !isNaN(parsed.getTime())) {
|
|
4926
|
+
const normalizedParsed = normalizeDateForComparison(parsed);
|
|
4927
|
+
const normalizedMin = minDate ? normalizeDateForComparison(minDate) : undefined;
|
|
4928
|
+
const normalizedMax = maxDate ? normalizeDateForComparison(maxDate) : undefined;
|
|
4929
|
+
const isValid = (!normalizedMin || normalizedParsed >= normalizedMin) &&
|
|
4930
|
+
(!normalizedMax || normalizedParsed <= normalizedMax);
|
|
4931
|
+
if (isValid) {
|
|
4932
|
+
onChange(parsed);
|
|
4933
|
+
setInputValue(format(parsed, displayFormat, { locale: enGB }));
|
|
4934
|
+
return;
|
|
4935
|
+
}
|
|
4936
|
+
}
|
|
4937
|
+
}
|
|
4938
|
+
if (!value) {
|
|
4939
|
+
setInputValue("");
|
|
4940
|
+
}
|
|
4941
|
+
else {
|
|
4942
|
+
setInputValue(format(value, displayFormat, { locale: enGB }));
|
|
4943
|
+
}
|
|
4944
|
+
}, [inputValue, parseDate, displayFormat, minDate, maxDate, onChange, value, normalizeDateForComparison]);
|
|
4945
|
+
const handleInputKeyDown = useCallback((e) => {
|
|
4946
|
+
if (e.key === "Enter") {
|
|
4947
|
+
e.preventDefault();
|
|
4948
|
+
inputRef.current?.blur();
|
|
4949
|
+
setIsOpen(false);
|
|
4950
|
+
}
|
|
4951
|
+
else if (e.key === "Escape") {
|
|
4952
|
+
setIsOpen(false);
|
|
4953
|
+
inputRef.current?.blur();
|
|
4954
|
+
}
|
|
4955
|
+
}, []);
|
|
4956
|
+
const handleTodayClick = useCallback(() => {
|
|
4957
|
+
const today = new Date();
|
|
4958
|
+
const isTodayValid = (!minDate || today >= minDate) &&
|
|
4959
|
+
(!maxDate || today <= maxDate);
|
|
4960
|
+
if (isTodayValid) {
|
|
4961
|
+
onChange(today);
|
|
4962
|
+
setIsOpen(false);
|
|
4963
|
+
}
|
|
4964
|
+
}, [minDate, maxDate, onChange]);
|
|
4965
|
+
// Memoize formatters
|
|
4966
|
+
const formatters = useMemo(() => ({
|
|
4967
|
+
formatCaption: (date) => format(date, "MMMM yyyy", { locale: enGB }),
|
|
4968
|
+
formatWeekdayName: (date) => format(date, "EEEEEE", { locale: enGB })
|
|
4969
|
+
}), []);
|
|
4970
|
+
// Memoize disabled days
|
|
4971
|
+
const disabledDays = useMemo(() => [
|
|
4972
|
+
...(disabledDates || []),
|
|
4973
|
+
...(minDate ? [{ before: minDate }] : []),
|
|
4974
|
+
...(maxDate ? [{ after: maxDate }] : []),
|
|
4975
|
+
...(disabledMatcher ? [disabledMatcher] : []),
|
|
4976
|
+
], [disabledDates, minDate, maxDate, disabledMatcher]);
|
|
4977
|
+
return (jsx("div", { ref: containerRef, className: `cw-datepicker ${className || ""}`, children: jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxs("div", { className: styles$4.pickerWrapper, children: [jsx("input", { ref: inputRef, type: "text", value: inputValue, placeholder: placeholder, onChange: handleInputChange, onBlur: handleInputBlur, onClick: handleInputClick, onKeyDown: handleInputKeyDown, disabled: disabled, required: required }), jsx("div", { className: styles$4.pickerIcons, children: showClear && value && !disabled ? (jsx(CwButton, { type: "button", variant: "icon", color: "neutral", icon: "close", onClick: handleClear, tabIndex: -1, "aria-label": "Clear date" })) : (jsx(CwIcon, { iconId: "calendar" })) }), isOpen && (jsxs("div", { className: styles$4.pickerPopup, "data-position": popupPosition, children: [jsx(DayPicker, { mode: "single", selected: value || undefined, defaultMonth: value || undefined, onSelect: handleDaySelect, disabled: disabledDays, locale: enGB, numberOfMonths: numberOfMonths, formatters: formatters, components: {
|
|
4978
|
+
Caption: (props) => (jsx(CustomCaption$2, { ...props })),
|
|
4979
|
+
}, modifiers: {
|
|
4980
|
+
today: new Date(),
|
|
4981
|
+
}, modifiersClassNames: {
|
|
4982
|
+
today: "rdp-day_today",
|
|
4983
|
+
} }), showTodayButton && (jsx("footer", { className: "cw-flex-row cw-align-right-center", children: jsx(CwButton, { type: "button", variant: "outline", onClick: handleTodayClick, text: "Today" }) }))] }))] })] }) }));
|
|
4984
|
+
}
|
|
4985
|
+
|
|
4986
|
+
var rangeStyles = {"rangeWrapper":"cw-range-picker-module_rangeWrapper__1nIVs","rangePopup":"cw-range-picker-module_rangePopup__E5jd1","presetList":"cw-range-picker-module_presetList__INiLo"};
|
|
4987
|
+
|
|
4988
|
+
const PRESET_LIBRARY = {
|
|
4989
|
+
// === PAST DAYS ===
|
|
4990
|
+
past7Days: {
|
|
4991
|
+
key: 'past7Days',
|
|
4992
|
+
label: 'Past 7 days',
|
|
4993
|
+
getValue: () => {
|
|
4994
|
+
const today = new Date();
|
|
4995
|
+
const past = new Date(today);
|
|
4996
|
+
past.setDate(today.getDate() - 7);
|
|
4997
|
+
return { from: past, to: today };
|
|
4998
|
+
}
|
|
4999
|
+
},
|
|
5000
|
+
past14Days: {
|
|
5001
|
+
key: 'past14Days',
|
|
5002
|
+
label: 'Past 14 days',
|
|
5003
|
+
getValue: () => {
|
|
5004
|
+
const today = new Date();
|
|
5005
|
+
const past = new Date(today);
|
|
5006
|
+
past.setDate(today.getDate() - 14);
|
|
5007
|
+
return { from: past, to: today };
|
|
5008
|
+
}
|
|
5009
|
+
},
|
|
5010
|
+
past30Days: {
|
|
5011
|
+
key: 'past30Days',
|
|
5012
|
+
label: 'Past 30 days',
|
|
5013
|
+
getValue: () => {
|
|
5014
|
+
const today = new Date();
|
|
5015
|
+
const past = new Date(today);
|
|
5016
|
+
past.setDate(today.getDate() - 30);
|
|
5017
|
+
return { from: past, to: today };
|
|
5018
|
+
}
|
|
5019
|
+
},
|
|
5020
|
+
past90Days: {
|
|
5021
|
+
key: 'past90Days',
|
|
5022
|
+
label: 'Past 90 days',
|
|
5023
|
+
getValue: () => {
|
|
5024
|
+
const today = new Date();
|
|
5025
|
+
const past = new Date(today);
|
|
5026
|
+
past.setDate(today.getDate() - 90);
|
|
5027
|
+
return { from: past, to: today };
|
|
5028
|
+
}
|
|
5029
|
+
},
|
|
5030
|
+
// === NEXT DAYS ===
|
|
5031
|
+
next7Days: {
|
|
5032
|
+
key: 'next7Days',
|
|
5033
|
+
label: 'Next 7 days',
|
|
5034
|
+
getValue: () => {
|
|
5035
|
+
const today = new Date();
|
|
5036
|
+
const next = new Date(today);
|
|
5037
|
+
next.setDate(today.getDate() + 7);
|
|
5038
|
+
return { from: today, to: next };
|
|
5039
|
+
}
|
|
5040
|
+
},
|
|
5041
|
+
next14Days: {
|
|
5042
|
+
key: 'next14Days',
|
|
5043
|
+
label: 'Next 14 days',
|
|
5044
|
+
getValue: () => {
|
|
5045
|
+
const today = new Date();
|
|
5046
|
+
const next = new Date(today);
|
|
5047
|
+
next.setDate(today.getDate() + 14);
|
|
5048
|
+
return { from: today, to: next };
|
|
5049
|
+
}
|
|
5050
|
+
},
|
|
5051
|
+
next30Days: {
|
|
5052
|
+
key: 'next30Days',
|
|
5053
|
+
label: 'Next 30 days',
|
|
5054
|
+
getValue: () => {
|
|
5055
|
+
const today = new Date();
|
|
5056
|
+
const next = new Date(today);
|
|
5057
|
+
next.setDate(today.getDate() + 30);
|
|
5058
|
+
return { from: today, to: next };
|
|
5059
|
+
}
|
|
5060
|
+
},
|
|
5061
|
+
// === WEEKS ===
|
|
5062
|
+
thisWeek: {
|
|
5063
|
+
key: 'thisWeek',
|
|
5064
|
+
label: 'This week',
|
|
5065
|
+
getValue: () => {
|
|
5066
|
+
const today = new Date();
|
|
5067
|
+
const firstDay = new Date(today);
|
|
5068
|
+
const lastDay = new Date(today);
|
|
5069
|
+
const day = today.getDay();
|
|
5070
|
+
const diff = day === 0 ? -6 : 1 - day; // Monday as first day
|
|
5071
|
+
firstDay.setDate(today.getDate() + diff);
|
|
5072
|
+
lastDay.setDate(firstDay.getDate() + 6); // Sunday
|
|
5073
|
+
return { from: firstDay, to: lastDay };
|
|
5074
|
+
}
|
|
5075
|
+
},
|
|
5076
|
+
lastWeek: {
|
|
5077
|
+
key: 'lastWeek',
|
|
5078
|
+
label: 'Last week',
|
|
5079
|
+
getValue: () => {
|
|
5080
|
+
const today = new Date();
|
|
5081
|
+
const lastWeekEnd = new Date(today);
|
|
5082
|
+
const day = today.getDay();
|
|
5083
|
+
const diff = day === 0 ? -6 : 1 - day;
|
|
5084
|
+
lastWeekEnd.setDate(today.getDate() + diff - 1);
|
|
5085
|
+
const lastWeekStart = new Date(lastWeekEnd);
|
|
5086
|
+
lastWeekStart.setDate(lastWeekEnd.getDate() - 6);
|
|
5087
|
+
return { from: lastWeekStart, to: lastWeekEnd };
|
|
5088
|
+
}
|
|
5089
|
+
},
|
|
5090
|
+
nextWeek: {
|
|
5091
|
+
key: 'nextWeek',
|
|
5092
|
+
label: 'Next week',
|
|
5093
|
+
getValue: () => {
|
|
5094
|
+
const today = new Date();
|
|
5095
|
+
const nextWeekStart = new Date(today);
|
|
5096
|
+
const day = today.getDay();
|
|
5097
|
+
const diff = day === 0 ? 1 : 8 - day;
|
|
5098
|
+
nextWeekStart.setDate(today.getDate() + diff);
|
|
5099
|
+
const nextWeekEnd = new Date(nextWeekStart);
|
|
5100
|
+
nextWeekEnd.setDate(nextWeekStart.getDate() + 6);
|
|
5101
|
+
return { from: nextWeekStart, to: nextWeekEnd };
|
|
5102
|
+
}
|
|
5103
|
+
},
|
|
5104
|
+
// === MONTHS ===
|
|
5105
|
+
thisMonth: {
|
|
5106
|
+
key: 'thisMonth',
|
|
5107
|
+
label: 'This month',
|
|
5108
|
+
getValue: () => {
|
|
5109
|
+
const today = new Date();
|
|
5110
|
+
const firstDay = new Date(today.getFullYear(), today.getMonth(), 1);
|
|
5111
|
+
const lastDay = new Date(today.getFullYear(), today.getMonth() + 1, 0);
|
|
5112
|
+
return { from: firstDay, to: lastDay };
|
|
5113
|
+
}
|
|
5114
|
+
},
|
|
5115
|
+
lastMonth: {
|
|
5116
|
+
key: 'lastMonth',
|
|
5117
|
+
label: 'Last month',
|
|
5118
|
+
getValue: () => {
|
|
5119
|
+
const today = new Date();
|
|
5120
|
+
const firstDay = new Date(today.getFullYear(), today.getMonth() - 1, 1);
|
|
5121
|
+
const lastDay = new Date(today.getFullYear(), today.getMonth(), 0);
|
|
5122
|
+
return { from: firstDay, to: lastDay };
|
|
5123
|
+
}
|
|
5124
|
+
},
|
|
5125
|
+
nextMonth: {
|
|
5126
|
+
key: 'nextMonth',
|
|
5127
|
+
label: 'Next month',
|
|
5128
|
+
getValue: () => {
|
|
5129
|
+
const today = new Date();
|
|
5130
|
+
const firstDay = new Date(today.getFullYear(), today.getMonth() + 1, 1);
|
|
5131
|
+
const lastDay = new Date(today.getFullYear(), today.getMonth() + 2, 0);
|
|
5132
|
+
return { from: firstDay, to: lastDay };
|
|
5133
|
+
}
|
|
5134
|
+
},
|
|
5135
|
+
// === QUARTERS ===
|
|
5136
|
+
thisQuarter: {
|
|
5137
|
+
key: 'thisQuarter',
|
|
5138
|
+
label: 'This quarter',
|
|
5139
|
+
getValue: () => {
|
|
5140
|
+
const today = new Date();
|
|
5141
|
+
const quarter = Math.floor(today.getMonth() / 3);
|
|
5142
|
+
const firstDay = new Date(today.getFullYear(), quarter * 3, 1);
|
|
5143
|
+
const lastDay = new Date(today.getFullYear(), quarter * 3 + 3, 0);
|
|
5144
|
+
return { from: firstDay, to: lastDay };
|
|
5145
|
+
}
|
|
5146
|
+
},
|
|
5147
|
+
lastQuarter: {
|
|
5148
|
+
key: 'lastQuarter',
|
|
5149
|
+
label: 'Last quarter',
|
|
5150
|
+
getValue: () => {
|
|
5151
|
+
const today = new Date();
|
|
5152
|
+
const currentQuarter = Math.floor(today.getMonth() / 3);
|
|
5153
|
+
const lastQuarter = currentQuarter === 0 ? 3 : currentQuarter - 1;
|
|
5154
|
+
const year = currentQuarter === 0 ? today.getFullYear() - 1 : today.getFullYear();
|
|
5155
|
+
const firstDay = new Date(year, lastQuarter * 3, 1);
|
|
5156
|
+
const lastDay = new Date(year, lastQuarter * 3 + 3, 0);
|
|
5157
|
+
return { from: firstDay, to: lastDay };
|
|
5158
|
+
}
|
|
5159
|
+
},
|
|
5160
|
+
nextQuarter: {
|
|
5161
|
+
key: 'nextQuarter',
|
|
5162
|
+
label: 'Next quarter',
|
|
5163
|
+
getValue: () => {
|
|
5164
|
+
const today = new Date();
|
|
5165
|
+
const currentQuarter = Math.floor(today.getMonth() / 3);
|
|
5166
|
+
const nextQuarter = (currentQuarter + 1) % 4;
|
|
5167
|
+
const year = nextQuarter === 0 ? today.getFullYear() + 1 : today.getFullYear();
|
|
5168
|
+
const firstDay = new Date(year, nextQuarter * 3, 1);
|
|
5169
|
+
const lastDay = new Date(year, nextQuarter * 3 + 3, 0);
|
|
5170
|
+
return { from: firstDay, to: lastDay };
|
|
5171
|
+
}
|
|
5172
|
+
},
|
|
5173
|
+
// === YEAR ===
|
|
5174
|
+
thisYear: {
|
|
5175
|
+
key: 'thisYear',
|
|
5176
|
+
label: 'This year',
|
|
5177
|
+
getValue: () => {
|
|
5178
|
+
const today = new Date();
|
|
5179
|
+
const firstDay = new Date(today.getFullYear(), 0, 1);
|
|
5180
|
+
const lastDay = new Date(today.getFullYear(), 11, 31);
|
|
5181
|
+
return { from: firstDay, to: lastDay };
|
|
5182
|
+
}
|
|
5183
|
+
},
|
|
5184
|
+
lastYear: {
|
|
5185
|
+
key: 'lastYear',
|
|
5186
|
+
label: 'Last year',
|
|
5187
|
+
getValue: () => {
|
|
5188
|
+
const today = new Date();
|
|
5189
|
+
const firstDay = new Date(today.getFullYear() - 1, 0, 1);
|
|
5190
|
+
const lastDay = new Date(today.getFullYear() - 1, 11, 31);
|
|
5191
|
+
return { from: firstDay, to: lastDay };
|
|
5192
|
+
}
|
|
5193
|
+
}
|
|
5194
|
+
};
|
|
5195
|
+
/**
|
|
5196
|
+
* Helper function to get presets by their keys
|
|
5197
|
+
* @param keys - Array of preset keys from PRESET_LIBRARY
|
|
5198
|
+
* @returns Array of DateRangePreset objects
|
|
5199
|
+
*
|
|
5200
|
+
* @example
|
|
5201
|
+
* const presets = getPresetsByKeys(['thisWeek', 'past7Days', 'past30Days']);
|
|
5202
|
+
*/
|
|
5203
|
+
const getPresetsByKeys = (keys) => {
|
|
5204
|
+
return keys
|
|
5205
|
+
.map(key => PRESET_LIBRARY[key])
|
|
5206
|
+
.filter(preset => preset !== undefined);
|
|
5207
|
+
};
|
|
5208
|
+
|
|
5209
|
+
function CustomCaption$1({ displayMonth }) {
|
|
5210
|
+
const { goToMonth, nextMonth, previousMonth } = useNavigation();
|
|
5211
|
+
return (jsxs("header", { children: [jsx(CwButton, { type: "button", variant: "icon", icon: "chevron-left", onClick: () => previousMonth && goToMonth(previousMonth), disabled: !previousMonth, "aria-label": "Previous month" }), jsx("div", { className: styles$4.title, children: format(displayMonth, "MMMM yyyy", { locale: enGB }) }), jsx(CwButton, { type: "button", variant: "icon", icon: "chevron-right", onClick: () => nextMonth && goToMonth(nextMonth), disabled: !nextMonth, "aria-label": "Next month" })] }));
|
|
5212
|
+
}
|
|
5213
|
+
function CwDateRangePicker({ value, onChange, minDate, maxDate, disabledDates, disabledMatcher, maxRangeDays, labelProps, alignProps, placeholderFrom = "From date", placeholderTo = "To date", displayFormat = "dd.MM.yyyy", disabled, required, className, showClear = true, popupPosition = "left-bottom", numberOfMonths = 2, showPresets = false, presetKeys, customPresets, }) {
|
|
5214
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
5215
|
+
const [inputFromValue, setInputFromValue] = useState("");
|
|
5216
|
+
const [inputToValue, setInputToValue] = useState("");
|
|
5217
|
+
const [focusedInput, setFocusedInput] = useState();
|
|
5218
|
+
const containerRef = useRef(null);
|
|
5219
|
+
const inputFromRef = useRef(null);
|
|
5220
|
+
const inputToRef = useRef(null);
|
|
5221
|
+
const prevValueRef = useRef(value ?? null);
|
|
5222
|
+
// Calculate presets to render
|
|
5223
|
+
const presetsToRender = useMemo(() => {
|
|
5224
|
+
let presets = [];
|
|
5225
|
+
// If presetKeys provided, use those from library
|
|
5226
|
+
if (presetKeys && presetKeys.length > 0) {
|
|
5227
|
+
presets = getPresetsByKeys(presetKeys);
|
|
5228
|
+
}
|
|
5229
|
+
// Add custom presets if provided
|
|
5230
|
+
if (customPresets && customPresets.length > 0) {
|
|
5231
|
+
presets = [...presets, ...customPresets];
|
|
5232
|
+
}
|
|
5233
|
+
return presets;
|
|
5234
|
+
}, [presetKeys, customPresets]);
|
|
5235
|
+
// Parse date from string based on format
|
|
5236
|
+
const parseDate = useCallback((dateString, formatStr) => {
|
|
5237
|
+
try {
|
|
5238
|
+
const cleanString = dateString.trim();
|
|
5239
|
+
const parts = cleanString.split(/[\/\-\.]/);
|
|
5240
|
+
if (parts.length !== 3)
|
|
5241
|
+
return undefined;
|
|
5242
|
+
let day;
|
|
5243
|
+
let month;
|
|
5244
|
+
let year;
|
|
5245
|
+
const formatLower = formatStr.toLowerCase();
|
|
5246
|
+
const dayIndex = formatLower.indexOf('dd');
|
|
5247
|
+
const monthIndex = formatLower.indexOf('mm');
|
|
5248
|
+
const yearIndex = formatLower.indexOf('yyyy') !== -1
|
|
5249
|
+
? formatLower.indexOf('yyyy')
|
|
5250
|
+
: formatLower.indexOf('yy');
|
|
5251
|
+
const positions = [
|
|
5252
|
+
{ type: 'day', index: dayIndex },
|
|
5253
|
+
{ type: 'month', index: monthIndex },
|
|
5254
|
+
{ type: 'year', index: yearIndex }
|
|
5255
|
+
].sort((a, b) => a.index - b.index);
|
|
5256
|
+
positions.forEach((pos, idx) => {
|
|
5257
|
+
const value = parseInt(parts[idx], 10);
|
|
5258
|
+
if (pos.type === 'day')
|
|
5259
|
+
day = value;
|
|
5260
|
+
else if (pos.type === 'month')
|
|
5261
|
+
month = value - 1;
|
|
5262
|
+
else if (pos.type === 'year')
|
|
5263
|
+
year = value;
|
|
5264
|
+
});
|
|
5265
|
+
if (day === undefined || month === undefined || year === undefined)
|
|
5266
|
+
return undefined;
|
|
5267
|
+
if (isNaN(day) || isNaN(month) || isNaN(year))
|
|
5268
|
+
return undefined;
|
|
5269
|
+
if (year < 100) {
|
|
5270
|
+
year = year < 50 ? 2000 + year : 1900 + year;
|
|
5271
|
+
}
|
|
5272
|
+
const parsed = new Date(year, month, day);
|
|
5273
|
+
if (parsed.getDate() === day &&
|
|
5274
|
+
parsed.getMonth() === month &&
|
|
5275
|
+
parsed.getFullYear() === year) {
|
|
5276
|
+
return parsed;
|
|
5277
|
+
}
|
|
5278
|
+
return undefined;
|
|
5279
|
+
}
|
|
5280
|
+
catch {
|
|
5281
|
+
return undefined;
|
|
5282
|
+
}
|
|
5283
|
+
}, []);
|
|
5284
|
+
const normalizeDateForComparison = useCallback((date) => {
|
|
5285
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
5286
|
+
}, []);
|
|
5287
|
+
// Validate date range
|
|
5288
|
+
const validateRange = useCallback((from, to) => {
|
|
5289
|
+
if (!from || !to)
|
|
5290
|
+
return true; // Partial ranges are OK during selection
|
|
5291
|
+
// Check if "from" is before "to"
|
|
5292
|
+
if (from > to)
|
|
5293
|
+
return false;
|
|
5294
|
+
// Check max range days
|
|
5295
|
+
if (maxRangeDays) {
|
|
5296
|
+
const daysDiff = Math.floor((to.getTime() - from.getTime()) / (1000 * 60 * 60 * 24));
|
|
5297
|
+
if (daysDiff > maxRangeDays)
|
|
5298
|
+
return false;
|
|
5299
|
+
}
|
|
5300
|
+
return true;
|
|
5301
|
+
}, [maxRangeDays]);
|
|
5302
|
+
// Sync input values with prop value
|
|
5303
|
+
useEffect(() => {
|
|
5304
|
+
const currentValue = value ?? undefined;
|
|
5305
|
+
if (currentValue !== prevValueRef.current) {
|
|
5306
|
+
prevValueRef.current = currentValue ?? null;
|
|
5307
|
+
if (currentValue?.from) {
|
|
5308
|
+
setInputFromValue(format(currentValue.from, displayFormat, { locale: enGB }));
|
|
5309
|
+
}
|
|
5310
|
+
else {
|
|
5311
|
+
setInputFromValue("");
|
|
5312
|
+
}
|
|
5313
|
+
if (currentValue?.to) {
|
|
5314
|
+
setInputToValue(format(currentValue.to, displayFormat, { locale: enGB }));
|
|
5315
|
+
}
|
|
5316
|
+
else {
|
|
5317
|
+
setInputToValue("");
|
|
5318
|
+
}
|
|
5319
|
+
}
|
|
5320
|
+
}, [value, displayFormat]);
|
|
5321
|
+
// Close calendar when clicking outside
|
|
5322
|
+
useEffect(() => {
|
|
5323
|
+
const handleClickOutside = (event) => {
|
|
5324
|
+
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
5325
|
+
setIsOpen(false);
|
|
5326
|
+
setFocusedInput(undefined);
|
|
5327
|
+
}
|
|
5328
|
+
};
|
|
5329
|
+
if (isOpen) {
|
|
5330
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
5331
|
+
}
|
|
5332
|
+
return () => {
|
|
5333
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
5334
|
+
};
|
|
5335
|
+
}, [isOpen]);
|
|
5336
|
+
const handleRangeSelect = useCallback((range) => {
|
|
5337
|
+
if (!range) {
|
|
5338
|
+
onChange(undefined);
|
|
5339
|
+
return;
|
|
5340
|
+
}
|
|
5341
|
+
const newRange = {
|
|
5342
|
+
from: range.from,
|
|
5343
|
+
to: range.to
|
|
5344
|
+
};
|
|
5345
|
+
// Validate range
|
|
5346
|
+
if (newRange.from && newRange.to && !validateRange(newRange.from, newRange.to)) {
|
|
5347
|
+
return; // Don't update if invalid
|
|
5348
|
+
}
|
|
5349
|
+
onChange(newRange);
|
|
5350
|
+
// Close if both dates are selected
|
|
5351
|
+
if (range.from && range.to) {
|
|
5352
|
+
setIsOpen(false);
|
|
5353
|
+
setFocusedInput(undefined);
|
|
5354
|
+
}
|
|
5355
|
+
}, [onChange, validateRange]);
|
|
5356
|
+
const handleClearFrom = useCallback((e) => {
|
|
5357
|
+
e.stopPropagation();
|
|
5358
|
+
onChange({ from: undefined, to: value?.to });
|
|
5359
|
+
setInputFromValue("");
|
|
5360
|
+
}, [onChange, value]);
|
|
5361
|
+
const handleClearTo = useCallback((e) => {
|
|
5362
|
+
e.stopPropagation();
|
|
5363
|
+
onChange({ from: value?.from, to: undefined });
|
|
5364
|
+
setInputToValue("");
|
|
5365
|
+
}, [onChange, value]);
|
|
5366
|
+
const handleInputFromClick = useCallback(() => {
|
|
5367
|
+
if (!disabled) {
|
|
5368
|
+
setIsOpen(true);
|
|
5369
|
+
setFocusedInput('from');
|
|
5370
|
+
}
|
|
5371
|
+
}, [disabled]);
|
|
5372
|
+
const handleInputToClick = useCallback(() => {
|
|
5373
|
+
if (!disabled) {
|
|
5374
|
+
setIsOpen(true);
|
|
5375
|
+
setFocusedInput('to');
|
|
5376
|
+
}
|
|
5377
|
+
}, [disabled]);
|
|
5378
|
+
const handleInputFromChange = useCallback((e) => {
|
|
5379
|
+
const newValue = e.target.value;
|
|
5380
|
+
setInputFromValue(newValue);
|
|
5381
|
+
if (newValue.length >= 10) {
|
|
5382
|
+
const parsed = parseDate(newValue, displayFormat);
|
|
5383
|
+
if (parsed && !isNaN(parsed.getTime())) {
|
|
5384
|
+
const normalizedParsed = normalizeDateForComparison(parsed);
|
|
5385
|
+
const normalizedMin = minDate ? normalizeDateForComparison(minDate) : undefined;
|
|
5386
|
+
const normalizedMax = maxDate ? normalizeDateForComparison(maxDate) : undefined;
|
|
5387
|
+
const isValid = (!normalizedMin || normalizedParsed >= normalizedMin) &&
|
|
5388
|
+
(!normalizedMax || normalizedParsed <= normalizedMax);
|
|
5389
|
+
if (isValid) {
|
|
5390
|
+
onChange({ from: parsed, to: value?.to });
|
|
5391
|
+
}
|
|
5392
|
+
}
|
|
5393
|
+
}
|
|
5394
|
+
else if (newValue === "") {
|
|
5395
|
+
onChange({ from: undefined, to: value?.to });
|
|
5396
|
+
}
|
|
5397
|
+
}, [parseDate, displayFormat, minDate, maxDate, normalizeDateForComparison, onChange, value]);
|
|
5398
|
+
const handleInputToChange = useCallback((e) => {
|
|
5399
|
+
const newValue = e.target.value;
|
|
5400
|
+
setInputToValue(newValue);
|
|
5401
|
+
if (newValue.length >= 10) {
|
|
5402
|
+
const parsed = parseDate(newValue, displayFormat);
|
|
5403
|
+
if (parsed && !isNaN(parsed.getTime())) {
|
|
5404
|
+
const normalizedParsed = normalizeDateForComparison(parsed);
|
|
5405
|
+
const normalizedMin = minDate ? normalizeDateForComparison(minDate) : undefined;
|
|
5406
|
+
const normalizedMax = maxDate ? normalizeDateForComparison(maxDate) : undefined;
|
|
5407
|
+
const isValid = (!normalizedMin || normalizedParsed >= normalizedMin) &&
|
|
5408
|
+
(!normalizedMax || normalizedParsed <= normalizedMax);
|
|
5409
|
+
if (isValid && validateRange(value?.from, parsed)) {
|
|
5410
|
+
onChange({ from: value?.from, to: parsed });
|
|
5411
|
+
}
|
|
5412
|
+
}
|
|
5413
|
+
}
|
|
5414
|
+
else if (newValue === "") {
|
|
5415
|
+
onChange({ from: value?.from, to: undefined });
|
|
5416
|
+
}
|
|
5417
|
+
}, [parseDate, displayFormat, minDate, maxDate, normalizeDateForComparison, validateRange, onChange, value]);
|
|
5418
|
+
const handleInputBlur = useCallback((type) => {
|
|
5419
|
+
const inputValue = type === 'from' ? inputFromValue : inputToValue;
|
|
5420
|
+
const currentValue = type === 'from' ? value?.from : value?.to;
|
|
5421
|
+
if (inputValue && inputValue.trim() !== "") {
|
|
5422
|
+
const parsed = parseDate(inputValue, displayFormat);
|
|
5423
|
+
if (parsed && !isNaN(parsed.getTime())) {
|
|
5424
|
+
const normalizedParsed = normalizeDateForComparison(parsed);
|
|
5425
|
+
const normalizedMin = minDate ? normalizeDateForComparison(minDate) : undefined;
|
|
5426
|
+
const normalizedMax = maxDate ? normalizeDateForComparison(maxDate) : undefined;
|
|
5427
|
+
const isValid = (!normalizedMin || normalizedParsed >= normalizedMin) &&
|
|
5428
|
+
(!normalizedMax || normalizedParsed <= normalizedMax);
|
|
5429
|
+
if (isValid) {
|
|
5430
|
+
const newRange = type === 'from'
|
|
5431
|
+
? { from: parsed, to: value?.to }
|
|
5432
|
+
: { from: value?.from, to: parsed };
|
|
5433
|
+
if (validateRange(newRange.from, newRange.to)) {
|
|
5434
|
+
onChange(newRange);
|
|
5435
|
+
if (type === 'from') {
|
|
5436
|
+
setInputFromValue(format(parsed, displayFormat, { locale: enGB }));
|
|
5437
|
+
}
|
|
5438
|
+
else {
|
|
5439
|
+
setInputToValue(format(parsed, displayFormat, { locale: enGB }));
|
|
5440
|
+
}
|
|
5441
|
+
return;
|
|
5442
|
+
}
|
|
5443
|
+
}
|
|
5444
|
+
}
|
|
5445
|
+
}
|
|
5446
|
+
// Reset to current value if invalid
|
|
5447
|
+
if (type === 'from') {
|
|
5448
|
+
setInputFromValue(currentValue ? format(currentValue, displayFormat, { locale: enGB }) : "");
|
|
5449
|
+
}
|
|
5450
|
+
else {
|
|
5451
|
+
setInputToValue(currentValue ? format(currentValue, displayFormat, { locale: enGB }) : "");
|
|
5452
|
+
}
|
|
5453
|
+
}, [inputFromValue, inputToValue, value, parseDate, displayFormat, minDate, maxDate, normalizeDateForComparison, validateRange, onChange]);
|
|
5454
|
+
const handleInputKeyDown = useCallback((e, type) => {
|
|
5455
|
+
if (e.key === "Enter") {
|
|
5456
|
+
e.preventDefault();
|
|
5457
|
+
if (type === 'from') {
|
|
5458
|
+
inputFromRef.current?.blur();
|
|
5459
|
+
inputToRef.current?.focus();
|
|
5460
|
+
}
|
|
5461
|
+
else {
|
|
5462
|
+
inputToRef.current?.blur();
|
|
5463
|
+
setIsOpen(false);
|
|
5464
|
+
}
|
|
5465
|
+
}
|
|
5466
|
+
else if (e.key === "Escape") {
|
|
5467
|
+
setIsOpen(false);
|
|
5468
|
+
if (type === 'from') {
|
|
5469
|
+
inputFromRef.current?.blur();
|
|
5470
|
+
}
|
|
5471
|
+
else {
|
|
5472
|
+
inputToRef.current?.blur();
|
|
5473
|
+
}
|
|
5474
|
+
}
|
|
5475
|
+
}, []);
|
|
5476
|
+
// Handle preset click
|
|
5477
|
+
const handlePresetClick = useCallback((preset) => {
|
|
5478
|
+
onChange(preset.getValue());
|
|
5479
|
+
setIsOpen(false);
|
|
5480
|
+
}, [onChange]);
|
|
5481
|
+
// Memoize formatters
|
|
5482
|
+
const formatters = useMemo(() => ({
|
|
5483
|
+
formatCaption: (date) => format(date, "MMMM yyyy", { locale: enGB }),
|
|
5484
|
+
formatWeekdayName: (date) => format(date, "EEEEEE", { locale: enGB })
|
|
5485
|
+
}), []);
|
|
5486
|
+
// Memoize disabled days
|
|
5487
|
+
const disabledDays = useMemo(() => {
|
|
5488
|
+
const baseDisabled = [
|
|
5489
|
+
...(disabledDates || []),
|
|
5490
|
+
...(minDate ? [{ before: minDate }] : []),
|
|
5491
|
+
...(maxDate ? [{ after: maxDate }] : []),
|
|
5492
|
+
...(disabledMatcher ? [disabledMatcher] : []),
|
|
5493
|
+
];
|
|
5494
|
+
// If maxRangeDays is set and we have a "from" date, disable dates beyond the range
|
|
5495
|
+
if (maxRangeDays && value?.from && !value?.to) {
|
|
5496
|
+
const maxDate = new Date(value.from);
|
|
5497
|
+
maxDate.setDate(maxDate.getDate() + maxRangeDays);
|
|
5498
|
+
baseDisabled.push({ after: maxDate });
|
|
5499
|
+
}
|
|
5500
|
+
return baseDisabled;
|
|
5501
|
+
}, [disabledDates, minDate, maxDate, disabledMatcher, maxRangeDays, value]);
|
|
5502
|
+
const selectedRange = useMemo(() => {
|
|
5503
|
+
if (value?.from || value?.to) {
|
|
5504
|
+
return {
|
|
5505
|
+
from: value?.from || undefined,
|
|
5506
|
+
to: value?.to || undefined
|
|
5507
|
+
};
|
|
5508
|
+
}
|
|
5509
|
+
return undefined;
|
|
5510
|
+
}, [value]);
|
|
5511
|
+
return (jsx("div", { ref: containerRef, className: `cw-rangepicker ${className || ""}`, children: jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxs("div", { className: rangeStyles.rangeWrapper, children: [jsxs("div", { className: styles$4.pickerWrapper, children: [jsx("input", { ref: inputFromRef, type: "text", value: inputFromValue, placeholder: placeholderFrom, onChange: handleInputFromChange, onBlur: () => handleInputBlur('from'), onClick: handleInputFromClick, onKeyDown: (e) => handleInputKeyDown(e, 'from'), disabled: disabled, required: required, "data-focused": focusedInput === 'from' }), jsx("div", { className: styles$4.pickerIcons, children: showClear && value?.from && !disabled ? (jsx(CwButton, { type: "button", variant: "icon", color: "neutral", icon: "close", onClick: handleClearFrom, tabIndex: -1, "aria-label": "Clear from date" })) : (jsx(CwIcon, { iconId: "calendar" })) })] }), jsx(CwIcon, { iconId: "arrow-right", size: "medium" }), jsxs("div", { className: styles$4.pickerWrapper, children: [jsx("input", { ref: inputToRef, type: "text", value: inputToValue, placeholder: placeholderTo, onChange: handleInputToChange, onBlur: () => handleInputBlur('to'), onClick: handleInputToClick, onKeyDown: (e) => handleInputKeyDown(e, 'to'), disabled: disabled, required: required, "data-focused": focusedInput === 'to' }), jsx("div", { className: styles$4.pickerIcons, children: showClear && value?.to && !disabled ? (jsx(CwButton, { type: "button", variant: "icon", color: "neutral", icon: "close", onClick: handleClearTo, tabIndex: -1, "aria-label": "Clear to date" })) : (jsx(CwIcon, { iconId: "calendar" })) })] }), isOpen && (jsxs("div", { className: `${styles$4.pickerPopup} ${rangeStyles.rangePopup}`, "data-position": popupPosition, children: [showPresets && presetsToRender.length > 0 && (jsx("div", { className: rangeStyles.presetList, children: presetsToRender.map((preset) => (jsx("button", { type: "button", onClick: () => handlePresetClick(preset), children: preset.label }, preset.key))) })), jsx(DayPicker, { mode: "range", selected: selectedRange, onSelect: handleRangeSelect, disabled: disabledDays, locale: enGB, numberOfMonths: numberOfMonths, formatters: formatters, components: {
|
|
5512
|
+
Caption: (props) => jsx(CustomCaption$1, { ...props }),
|
|
5513
|
+
}, modifiers: {
|
|
5514
|
+
today: new Date(),
|
|
5515
|
+
}, modifiersClassNames: {
|
|
5516
|
+
today: "rdp-day_today",
|
|
5517
|
+
} })] }))] })] }) }));
|
|
5518
|
+
}
|
|
5519
|
+
|
|
5520
|
+
var timeStyles = {"timePickerPopup":"cw-time-picker-module_timePickerPopup__BN63t","timePickerList":"cw-time-picker-module_timePickerList__E88pr","selected":"cw-time-picker-module_selected__qVnfL","hasIcons":"cw-time-picker-module_hasIcons__ZiGUf","notIcons":"cw-time-picker-module_notIcons__3icu1"};
|
|
5521
|
+
|
|
5522
|
+
const isMobileDevice = () => {
|
|
5523
|
+
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
5524
|
+
};
|
|
5525
|
+
function CwTimePicker({ value, onChange, interval = 15, minTime, maxTime, labelProps, alignProps, placeholder = "HH:mm", disabled, required, className, showClear = true, popupPosition = "left-bottom", useNative = isMobileDevice(), }) {
|
|
5526
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
5527
|
+
const [inputValue, setInputValue] = useState("");
|
|
5528
|
+
const containerRef = useRef(null);
|
|
5529
|
+
const inputRef = useRef(null);
|
|
5530
|
+
const selectedItemRef = useRef(null);
|
|
5531
|
+
// Sync input value with prop value
|
|
5532
|
+
useEffect(() => {
|
|
5533
|
+
if (value) {
|
|
5534
|
+
setInputValue(value);
|
|
5535
|
+
}
|
|
5536
|
+
else {
|
|
5537
|
+
setInputValue("");
|
|
5538
|
+
}
|
|
5539
|
+
}, [value]);
|
|
5540
|
+
// Generate time options based on interval
|
|
5541
|
+
const generateTimeOptions = () => {
|
|
5542
|
+
const options = [];
|
|
5543
|
+
const totalMinutes = 24 * 60; // Total minutes in a day
|
|
5544
|
+
for (let minutes = 0; minutes < totalMinutes; minutes += interval) {
|
|
5545
|
+
const hours = Math.floor(minutes / 60);
|
|
5546
|
+
const mins = minutes % 60;
|
|
5547
|
+
const timeString = `${hours.toString().padStart(2, "0")}:${mins.toString().padStart(2, "0")}`;
|
|
5548
|
+
// Filter by min/max time if provided
|
|
5549
|
+
if (minTime && timeString < minTime)
|
|
5550
|
+
continue;
|
|
5551
|
+
if (maxTime && timeString > maxTime)
|
|
5552
|
+
continue;
|
|
5553
|
+
options.push(timeString);
|
|
5554
|
+
}
|
|
5555
|
+
return options;
|
|
5556
|
+
};
|
|
5557
|
+
const timeOptions = generateTimeOptions();
|
|
5558
|
+
// Close dropdown when clicking outside
|
|
5559
|
+
useEffect(() => {
|
|
5560
|
+
const handleClickOutside = (event) => {
|
|
5561
|
+
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
5562
|
+
setIsOpen(false);
|
|
5563
|
+
}
|
|
5564
|
+
};
|
|
5565
|
+
if (isOpen) {
|
|
5566
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
5567
|
+
}
|
|
5568
|
+
return () => {
|
|
5569
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
5570
|
+
};
|
|
5571
|
+
}, [isOpen]);
|
|
5572
|
+
// Scroll to selected time when opening dropdown
|
|
5573
|
+
useEffect(() => {
|
|
5574
|
+
if (isOpen && selectedItemRef.current) {
|
|
5575
|
+
selectedItemRef.current.scrollIntoView({
|
|
5576
|
+
block: "center",
|
|
5577
|
+
behavior: "smooth",
|
|
5578
|
+
});
|
|
5579
|
+
}
|
|
5580
|
+
}, [isOpen]);
|
|
5581
|
+
const handleTimeSelect = (time) => {
|
|
5582
|
+
onChange(time);
|
|
5583
|
+
setInputValue(time);
|
|
5584
|
+
setIsOpen(false);
|
|
5585
|
+
inputRef.current?.blur();
|
|
5586
|
+
};
|
|
5587
|
+
const handleClear = (e) => {
|
|
5588
|
+
e.stopPropagation();
|
|
5589
|
+
onChange(undefined);
|
|
5590
|
+
setInputValue("");
|
|
5591
|
+
};
|
|
5592
|
+
const handleInputClick = () => {
|
|
5593
|
+
if (!disabled) {
|
|
5594
|
+
setIsOpen(true);
|
|
5595
|
+
}
|
|
5596
|
+
};
|
|
5597
|
+
const handleInputChange = (e) => {
|
|
5598
|
+
let newValue = e.target.value;
|
|
5599
|
+
setInputValue(newValue);
|
|
5600
|
+
// Auto-format as user types
|
|
5601
|
+
// Remove non-numeric characters except colon
|
|
5602
|
+
newValue = newValue.replace(/[^\d:]/g, "");
|
|
5603
|
+
// Auto-add colon after 2 digits
|
|
5604
|
+
if (newValue.length === 2 && !newValue.includes(":")) {
|
|
5605
|
+
newValue = newValue + ":";
|
|
5606
|
+
setInputValue(newValue);
|
|
5607
|
+
}
|
|
5608
|
+
// Limit to HH:mm format
|
|
5609
|
+
if (newValue.length > 5) {
|
|
5610
|
+
newValue = newValue.slice(0, 5);
|
|
5611
|
+
setInputValue(newValue);
|
|
5612
|
+
}
|
|
5613
|
+
// Validate and set time when complete
|
|
5614
|
+
if (newValue.length === 5 && newValue.includes(":")) {
|
|
5615
|
+
const [hours, minutes] = newValue.split(":");
|
|
5616
|
+
const h = parseInt(hours, 10);
|
|
5617
|
+
const m = parseInt(minutes, 10);
|
|
5618
|
+
if (h >= 0 && h <= 23 && m >= 0 && m <= 59) {
|
|
5619
|
+
const formattedTime = `${hours.padStart(2, "0")}:${minutes.padStart(2, "0")}`;
|
|
5620
|
+
// Check min/max time restrictions
|
|
5621
|
+
const isValid = (!minTime || formattedTime >= minTime) &&
|
|
5622
|
+
(!maxTime || formattedTime <= maxTime);
|
|
5623
|
+
if (isValid) {
|
|
5624
|
+
onChange(formattedTime);
|
|
5625
|
+
setInputValue(formattedTime);
|
|
5626
|
+
}
|
|
5627
|
+
}
|
|
5628
|
+
}
|
|
5629
|
+
else if (newValue === "") {
|
|
5630
|
+
onChange(undefined);
|
|
5631
|
+
}
|
|
5632
|
+
};
|
|
5633
|
+
const handleInputBlur = () => {
|
|
5634
|
+
// On blur, sync input with actual value or clear if invalid
|
|
5635
|
+
if (value) {
|
|
5636
|
+
setInputValue(value);
|
|
5637
|
+
}
|
|
5638
|
+
else if (inputValue && inputValue.length === 5) {
|
|
5639
|
+
// Try to validate one more time
|
|
5640
|
+
const [hours, minutes] = inputValue.split(":");
|
|
5641
|
+
const h = parseInt(hours, 10);
|
|
5642
|
+
const m = parseInt(minutes, 10);
|
|
5643
|
+
if (h >= 0 && h <= 23 && m >= 0 && m <= 59) {
|
|
5644
|
+
const formattedTime = `${hours.padStart(2, "0")}:${minutes.padStart(2, "0")}`;
|
|
5645
|
+
onChange(formattedTime);
|
|
5646
|
+
setInputValue(formattedTime);
|
|
5647
|
+
}
|
|
5648
|
+
else {
|
|
5649
|
+
setInputValue("");
|
|
5650
|
+
}
|
|
5651
|
+
}
|
|
5652
|
+
else {
|
|
5653
|
+
setInputValue("");
|
|
5654
|
+
}
|
|
5655
|
+
};
|
|
5656
|
+
const handleInputKeyDown = (e) => {
|
|
5657
|
+
if (e.key === "Enter") {
|
|
5658
|
+
setIsOpen(!isOpen);
|
|
5659
|
+
}
|
|
5660
|
+
else if (e.key === "Escape") {
|
|
5661
|
+
setIsOpen(false);
|
|
5662
|
+
}
|
|
5663
|
+
else if (e.key === "ArrowDown" && isOpen && timeOptions.length > 0) {
|
|
5664
|
+
e.preventDefault();
|
|
5665
|
+
// Focus first option in dropdown
|
|
5666
|
+
const firstOption = document.querySelector(".cw-timepicker-option");
|
|
5667
|
+
firstOption?.focus();
|
|
5668
|
+
}
|
|
5669
|
+
};
|
|
5670
|
+
const handleNativeChange = (e) => {
|
|
5671
|
+
const newValue = e.target.value;
|
|
5672
|
+
onChange(newValue);
|
|
5673
|
+
setInputValue(newValue);
|
|
5674
|
+
};
|
|
5675
|
+
// Format time for display (optional: could add 12h format here)
|
|
5676
|
+
const displayValue = inputValue;
|
|
5677
|
+
// If using native time input
|
|
5678
|
+
if (useNative) {
|
|
5679
|
+
return (jsx("div", { className: `cw-timepicker cw-timepicker-native ${className || ""}`, children: jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsx("div", { className: styles$4.pickerWrapper, children: jsx("input", { type: "time", value: displayValue, onChange: handleNativeChange, min: minTime, max: maxTime, step: interval * 60, disabled: disabled, required: required, placeholder: placeholder, className: "cw-timepicker-native" }) })] }) }));
|
|
5680
|
+
}
|
|
5681
|
+
// Custom time picker
|
|
5682
|
+
return (jsx("div", { ref: containerRef, className: `cw-timepicker ${className || ""}`, children: jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxs("div", { className: styles$4.pickerWrapper, children: [jsx("input", { ref: inputRef, type: "text", value: inputValue, placeholder: placeholder, onChange: handleInputChange, onBlur: handleInputBlur, onClick: handleInputClick, onKeyDown: handleInputKeyDown, disabled: disabled, required: required, maxLength: 5, className: showClear ? timeStyles.hasIcons : timeStyles.notIcons }), showClear && (jsx("div", { className: styles$4.pickerIcons, children: value && !disabled ? (jsx(CwButton, { type: "button", variant: "icon", icon: "close", color: "neutral", onClick: handleClear, tabIndex: -1, "aria-label": "Clear time" })) : (jsx(CwIcon, { iconId: "clock" })) })), isOpen && (jsx("div", { className: `${styles$4.pickerPopup} ${timeStyles.timePickerPopup}`, "data-position": popupPosition, children: jsx("div", { className: timeStyles.timePickerList, children: timeOptions.map((time) => {
|
|
5683
|
+
const isSelected = time === value;
|
|
5684
|
+
return (jsx("button", { ref: isSelected ? selectedItemRef : null, type: "button", className: isSelected ? timeStyles.selected : "", onClick: () => handleTimeSelect(time), children: time }, time));
|
|
5685
|
+
}) }) }))] })] }) }));
|
|
5686
|
+
}
|
|
5687
|
+
|
|
5688
|
+
function CwDateTimePicker({ value, onChange, minDateTime, maxDateTime, disabledDates, disabledMatcher, timeInterval = 15, minTime, maxTime, labelProps, alignProps, datePlaceholder = "dd.MM.yyyy", timePlaceholder = "HH:mm", disabled, required, className, showClear = true, popupPosition = "left-bottom", numberOfMonths = 1, showNowButton = false, }) {
|
|
5689
|
+
const [selectedDate, setSelectedDate] = useState(value);
|
|
5690
|
+
const [selectedTime, setSelectedTime] = useState(value ? `${value.getHours().toString().padStart(2, "0")}:${value.getMinutes().toString().padStart(2, "0")}` : undefined);
|
|
5691
|
+
const prevValueRef = useRef(value);
|
|
5692
|
+
// Combine date and time into a single Date object
|
|
5693
|
+
const combineDateTime = useCallback((date, time) => {
|
|
5694
|
+
if (!date)
|
|
5695
|
+
return undefined;
|
|
5696
|
+
// If no time is selected, use 00:00
|
|
5697
|
+
if (!time) {
|
|
5698
|
+
const combined = new Date(date);
|
|
5699
|
+
combined.setHours(0, 0, 0, 0);
|
|
5700
|
+
return combined;
|
|
5701
|
+
}
|
|
5702
|
+
const [hours, minutes] = time.split(':').map(Number);
|
|
5703
|
+
const combined = new Date(date);
|
|
5704
|
+
combined.setHours(hours, minutes, 0, 0);
|
|
5705
|
+
return combined;
|
|
5706
|
+
}, []);
|
|
5707
|
+
// Sync internal state with prop value - only when changed externally
|
|
5708
|
+
useEffect(() => {
|
|
5709
|
+
const currentValue = value ?? undefined;
|
|
5710
|
+
if (currentValue !== prevValueRef.current) {
|
|
5711
|
+
prevValueRef.current = currentValue;
|
|
5712
|
+
if (currentValue) {
|
|
5713
|
+
setSelectedDate(currentValue);
|
|
5714
|
+
setSelectedTime(`${currentValue.getHours().toString().padStart(2, "0")}:${currentValue.getMinutes().toString().padStart(2, "0")}`);
|
|
5715
|
+
}
|
|
5716
|
+
else {
|
|
5717
|
+
setSelectedDate(undefined);
|
|
5718
|
+
setSelectedTime(undefined);
|
|
5719
|
+
}
|
|
5720
|
+
}
|
|
5721
|
+
}, [value]);
|
|
5722
|
+
const handleDateChange = useCallback((date) => {
|
|
5723
|
+
setSelectedDate(date);
|
|
5724
|
+
const combined = combineDateTime(date, selectedTime);
|
|
5725
|
+
onChange(combined);
|
|
5726
|
+
}, [selectedTime, combineDateTime, onChange]);
|
|
5727
|
+
const handleTimeChange = useCallback((time) => {
|
|
5728
|
+
setSelectedTime(time);
|
|
5729
|
+
const combined = combineDateTime(selectedDate, time);
|
|
5730
|
+
onChange(combined);
|
|
5731
|
+
}, [selectedDate, combineDateTime, onChange]);
|
|
5732
|
+
const handleNowClick = useCallback(() => {
|
|
5733
|
+
const now = new Date();
|
|
5734
|
+
// Check if now is within allowed range
|
|
5735
|
+
const isNowValid = (!minDateTime || now >= minDateTime) &&
|
|
5736
|
+
(!maxDateTime || now <= maxDateTime);
|
|
5737
|
+
if (isNowValid) {
|
|
5738
|
+
onChange(now);
|
|
5739
|
+
}
|
|
5740
|
+
}, [minDateTime, maxDateTime, onChange]);
|
|
5741
|
+
// Extract min/max date from minDateTime/maxDateTime
|
|
5742
|
+
const minDate = minDateTime;
|
|
5743
|
+
const maxDate = maxDateTime;
|
|
5744
|
+
return (jsx("div", { className: `cw-datetimepicker cw-datetimepicker-separate ${className || ""}`, children: jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxs("div", { className: "cw-flex-row cw-align-left-center cw-gap-small", children: [jsx(CwDatePicker, { value: selectedDate, onChange: handleDateChange, minDate: minDate, maxDate: maxDate, disabledDates: disabledDates, disabledMatcher: disabledMatcher, placeholder: datePlaceholder, disabled: disabled, required: required, showClear: showClear, numberOfMonths: numberOfMonths, popupPosition: popupPosition }), jsx(CwTimePicker, { value: selectedTime, onChange: handleTimeChange, interval: timeInterval, minTime: minTime, maxTime: maxTime, placeholder: timePlaceholder, disabled: disabled, required: required, showClear: showClear, popupPosition: popupPosition }), showNowButton && (jsx(CwButton, { type: "button", variant: "outline", onClick: handleNowClick, disabled: disabled, title: "Set to current date and time", text: "Now" }))] })] }) }));
|
|
5745
|
+
}
|
|
5746
|
+
|
|
5747
|
+
var compactStyles = {"compactPopup":"cw-datetime-compact-module_compactPopup__GiuNY","calendarWrapper":"cw-datetime-compact-module_calendarWrapper__P4Nlq","timeWrapper":"cw-datetime-compact-module_timeWrapper__uMe-A","compactTimeList":"cw-datetime-compact-module_compactTimeList__MzSQT"};
|
|
5748
|
+
|
|
5749
|
+
function CustomCaption({ displayMonth }) {
|
|
5750
|
+
const { goToMonth, nextMonth, previousMonth } = useNavigation();
|
|
5751
|
+
return (jsxs("header", { children: [jsx(CwButton, { type: "button", variant: "icon", icon: "chevron-left", onClick: () => previousMonth && goToMonth(previousMonth), disabled: !previousMonth, "aria-label": "Previous month" }), jsx("div", { className: styles$4.title, children: format(displayMonth, "MMMM yyyy", { locale: enGB }) }), jsx(CwButton, { type: "button", variant: "icon", icon: "chevron-right", onClick: () => nextMonth && goToMonth(nextMonth), disabled: !nextMonth, "aria-label": "Next month" })] }));
|
|
5752
|
+
}
|
|
5753
|
+
function CwDateTimePickerCompact({ value, onChange, minDateTime, maxDateTime, disabledDates, disabledMatcher, timeInterval = 15, minTime, maxTime, labelProps, alignProps, placeholder = "dd.mm.yyyy HH:mm", disabled, required, className, showClear = true, popupPosition = "left-bottom", numberOfMonths = 1, showTodayButton = false, }) {
|
|
5754
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
5755
|
+
const [inputValue, setInputValue] = useState("");
|
|
5756
|
+
const [selectedDate, setSelectedDate] = useState(value);
|
|
5757
|
+
const [selectedTime, setSelectedTime] = useState("");
|
|
5758
|
+
const containerRef = useRef(null);
|
|
5759
|
+
const inputRef = useRef(null);
|
|
5760
|
+
const timeListRef = useRef(null);
|
|
5761
|
+
const prevValueRef = useRef(value);
|
|
5762
|
+
// Generate time options based on interval - memoized
|
|
5763
|
+
const timeOptions = useMemo(() => {
|
|
5764
|
+
const options = [];
|
|
5765
|
+
const totalMinutes = 24 * 60;
|
|
5766
|
+
for (let minutes = 0; minutes < totalMinutes; minutes += timeInterval) {
|
|
5767
|
+
const hours = Math.floor(minutes / 60);
|
|
5768
|
+
const mins = minutes % 60;
|
|
5769
|
+
const timeString = `${hours.toString().padStart(2, "0")}:${mins.toString().padStart(2, "0")}`;
|
|
5770
|
+
if (minTime && timeString < minTime)
|
|
5771
|
+
continue;
|
|
5772
|
+
if (maxTime && timeString > maxTime)
|
|
5773
|
+
continue;
|
|
5774
|
+
options.push(timeString);
|
|
5775
|
+
}
|
|
5776
|
+
return options;
|
|
5777
|
+
}, [timeInterval, minTime, maxTime]);
|
|
5778
|
+
// Parse datetime from string: dd.MM.yyyy HH:mm
|
|
5779
|
+
const parseDateTime = useCallback((dateTimeString) => {
|
|
5780
|
+
try {
|
|
5781
|
+
const parts = dateTimeString.trim().split(' ');
|
|
5782
|
+
if (parts.length !== 2)
|
|
5783
|
+
return undefined;
|
|
5784
|
+
const [dateStr, timeStr] = parts;
|
|
5785
|
+
// Parse date part
|
|
5786
|
+
const dateParts = dateStr.split(/[\/\-\.]/);
|
|
5787
|
+
if (dateParts.length !== 3)
|
|
5788
|
+
return undefined;
|
|
5789
|
+
const day = parseInt(dateParts[0], 10);
|
|
5790
|
+
const month = parseInt(dateParts[1], 10) - 1;
|
|
5791
|
+
const year = parseInt(dateParts[2], 10);
|
|
5792
|
+
// Parse time part
|
|
5793
|
+
const timeParts = timeStr.split(':');
|
|
5794
|
+
if (timeParts.length !== 2)
|
|
5795
|
+
return undefined;
|
|
5796
|
+
const hours = parseInt(timeParts[0], 10);
|
|
5797
|
+
const minutes = parseInt(timeParts[1], 10);
|
|
5798
|
+
// Validate ranges
|
|
5799
|
+
if (isNaN(day) || isNaN(month) || isNaN(year) ||
|
|
5800
|
+
isNaN(hours) || isNaN(minutes) ||
|
|
5801
|
+
hours < 0 || hours > 23 ||
|
|
5802
|
+
minutes < 0 || minutes > 59) {
|
|
5803
|
+
return undefined;
|
|
5804
|
+
}
|
|
5805
|
+
const parsed = new Date(year, month, day, hours, minutes, 0, 0);
|
|
5806
|
+
// Validate the date is real
|
|
5807
|
+
if (parsed.getDate() === day &&
|
|
5808
|
+
parsed.getMonth() === month &&
|
|
5809
|
+
parsed.getFullYear() === year &&
|
|
5810
|
+
parsed.getHours() === hours &&
|
|
5811
|
+
parsed.getMinutes() === minutes) {
|
|
5812
|
+
return parsed;
|
|
5813
|
+
}
|
|
5814
|
+
return undefined;
|
|
5815
|
+
}
|
|
5816
|
+
catch {
|
|
5817
|
+
return undefined;
|
|
5818
|
+
}
|
|
5819
|
+
}, []);
|
|
5820
|
+
// Validate and set datetime - with proper datetime comparison
|
|
5821
|
+
const validateAndSetDateTime = useCallback((dateTimeString) => {
|
|
5822
|
+
const parsed = parseDateTime(dateTimeString);
|
|
5823
|
+
if (parsed && !isNaN(parsed.getTime())) {
|
|
5824
|
+
const isValid = (!minDateTime || parsed >= minDateTime) &&
|
|
5825
|
+
(!maxDateTime || parsed <= maxDateTime);
|
|
5826
|
+
if (isValid) {
|
|
5827
|
+
onChange(parsed);
|
|
5828
|
+
setSelectedDate(parsed);
|
|
5829
|
+
setSelectedTime(format(parsed, "HH:mm"));
|
|
5830
|
+
return true;
|
|
5831
|
+
}
|
|
5832
|
+
}
|
|
5833
|
+
return false;
|
|
5834
|
+
}, [parseDateTime, minDateTime, maxDateTime, onChange]);
|
|
5835
|
+
// Sync input value with prop value - only when changed externally
|
|
5836
|
+
useEffect(() => {
|
|
5837
|
+
const currentValue = value;
|
|
5838
|
+
if (currentValue !== prevValueRef.current) {
|
|
5839
|
+
prevValueRef.current = currentValue;
|
|
5840
|
+
if (currentValue) {
|
|
5841
|
+
const dateStr = format(currentValue, "dd.MM.yyyy", { locale: enGB });
|
|
5842
|
+
const timeStr = format(currentValue, "HH:mm", { locale: enGB });
|
|
5843
|
+
setInputValue(`${dateStr} ${timeStr}`);
|
|
5844
|
+
setSelectedDate(currentValue);
|
|
5845
|
+
setSelectedTime(timeStr);
|
|
5846
|
+
}
|
|
5847
|
+
else {
|
|
5848
|
+
setInputValue("");
|
|
5849
|
+
setSelectedDate(undefined);
|
|
5850
|
+
setSelectedTime("");
|
|
5851
|
+
}
|
|
5852
|
+
}
|
|
5853
|
+
}, [value]);
|
|
5854
|
+
// Close popup when clicking outside
|
|
5855
|
+
useEffect(() => {
|
|
5856
|
+
const handleClickOutside = (event) => {
|
|
5857
|
+
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
5858
|
+
setIsOpen(false);
|
|
5859
|
+
}
|
|
5860
|
+
};
|
|
5861
|
+
if (isOpen) {
|
|
5862
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
5863
|
+
}
|
|
5864
|
+
return () => {
|
|
5865
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
5866
|
+
};
|
|
5867
|
+
}, [isOpen]);
|
|
5868
|
+
// Scroll to selected time when opening
|
|
5869
|
+
useEffect(() => {
|
|
5870
|
+
if (isOpen && selectedTime && timeListRef.current) {
|
|
5871
|
+
const selectedElement = timeListRef.current.querySelector('.selected');
|
|
5872
|
+
if (selectedElement) {
|
|
5873
|
+
selectedElement.scrollIntoView({ block: 'center', behavior: 'smooth' });
|
|
5874
|
+
}
|
|
5875
|
+
}
|
|
5876
|
+
}, [isOpen, selectedTime]);
|
|
5877
|
+
const combineDateTime = useCallback((date, time) => {
|
|
5878
|
+
if (!date || !time)
|
|
5879
|
+
return undefined;
|
|
5880
|
+
const [hours, minutes] = time.split(':').map(Number);
|
|
5881
|
+
const combined = new Date(date);
|
|
5882
|
+
combined.setHours(hours, minutes, 0, 0);
|
|
5883
|
+
return combined;
|
|
5884
|
+
}, []);
|
|
5885
|
+
const handleDaySelect = useCallback((date) => {
|
|
5886
|
+
if (!date)
|
|
5887
|
+
return;
|
|
5888
|
+
setSelectedDate(date);
|
|
5889
|
+
// If time is already selected, combine and update
|
|
5890
|
+
if (selectedTime) {
|
|
5891
|
+
const combined = combineDateTime(date, selectedTime);
|
|
5892
|
+
if (combined) {
|
|
5893
|
+
onChange(combined);
|
|
5894
|
+
}
|
|
5895
|
+
}
|
|
5896
|
+
}, [selectedTime, combineDateTime, onChange]);
|
|
5897
|
+
const handleTimeSelect = useCallback((time) => {
|
|
5898
|
+
setSelectedTime(time);
|
|
5899
|
+
// If date is already selected, combine and update
|
|
5900
|
+
if (selectedDate) {
|
|
5901
|
+
const combined = combineDateTime(selectedDate, time);
|
|
5902
|
+
if (combined) {
|
|
5903
|
+
onChange(combined);
|
|
5904
|
+
setIsOpen(false);
|
|
5905
|
+
inputRef.current?.blur();
|
|
5906
|
+
}
|
|
5907
|
+
}
|
|
5908
|
+
}, [selectedDate, combineDateTime, onChange]);
|
|
5909
|
+
const handleClear = useCallback((e) => {
|
|
5910
|
+
e.stopPropagation();
|
|
5911
|
+
onChange(undefined);
|
|
5912
|
+
setInputValue("");
|
|
5913
|
+
setSelectedDate(undefined);
|
|
5914
|
+
setSelectedTime("");
|
|
5915
|
+
}, [onChange]);
|
|
5916
|
+
const handleInputClick = useCallback(() => {
|
|
5917
|
+
if (!disabled) {
|
|
5918
|
+
setIsOpen(true);
|
|
5919
|
+
}
|
|
5920
|
+
}, [disabled]);
|
|
5921
|
+
const handleInputChange = useCallback((e) => {
|
|
5922
|
+
const newValue = e.target.value;
|
|
5923
|
+
setInputValue(newValue);
|
|
5924
|
+
// Try to parse the full datetime string: dd.MM.yyyy HH:mm
|
|
5925
|
+
if (newValue.length >= 16) {
|
|
5926
|
+
validateAndSetDateTime(newValue);
|
|
5927
|
+
}
|
|
5928
|
+
else if (newValue === "") {
|
|
5929
|
+
onChange(undefined);
|
|
5930
|
+
setSelectedDate(undefined);
|
|
5931
|
+
setSelectedTime("");
|
|
5932
|
+
}
|
|
5933
|
+
}, [validateAndSetDateTime, onChange]);
|
|
5934
|
+
const handleInputBlur = useCallback(() => {
|
|
5935
|
+
// Try to parse if there's text
|
|
5936
|
+
if (inputValue && inputValue.trim() !== "") {
|
|
5937
|
+
const parsed = parseDateTime(inputValue);
|
|
5938
|
+
if (parsed && !isNaN(parsed.getTime())) {
|
|
5939
|
+
const isValid = (!minDateTime || parsed >= minDateTime) &&
|
|
5940
|
+
(!maxDateTime || parsed <= maxDateTime);
|
|
5941
|
+
if (isValid) {
|
|
5942
|
+
onChange(parsed);
|
|
5943
|
+
const dateStr = format(parsed, "dd.MM.yyyy", { locale: enGB });
|
|
5944
|
+
const timeStr = format(parsed, "HH:mm", { locale: enGB });
|
|
5945
|
+
setInputValue(`${dateStr} ${timeStr}`);
|
|
5946
|
+
setSelectedDate(parsed);
|
|
5947
|
+
setSelectedTime(timeStr);
|
|
5948
|
+
return;
|
|
5949
|
+
}
|
|
5950
|
+
}
|
|
5951
|
+
}
|
|
5952
|
+
// Sync with current value
|
|
5953
|
+
if (value) {
|
|
5954
|
+
const dateStr = format(value, "dd.MM.yyyy", { locale: enGB });
|
|
5955
|
+
const timeStr = format(value, "HH:mm", { locale: enGB });
|
|
5956
|
+
setInputValue(`${dateStr} ${timeStr}`);
|
|
5957
|
+
}
|
|
5958
|
+
else {
|
|
5959
|
+
setInputValue("");
|
|
5960
|
+
}
|
|
5961
|
+
}, [inputValue, parseDateTime, minDateTime, maxDateTime, onChange, value]);
|
|
5962
|
+
const handleInputKeyDown = useCallback((e) => {
|
|
5963
|
+
if (e.key === "Enter") {
|
|
5964
|
+
e.preventDefault();
|
|
5965
|
+
inputRef.current?.blur();
|
|
5966
|
+
setIsOpen(false);
|
|
5967
|
+
}
|
|
5968
|
+
else if (e.key === "Escape") {
|
|
5969
|
+
setIsOpen(false);
|
|
5970
|
+
inputRef.current?.blur();
|
|
5971
|
+
}
|
|
5972
|
+
}, []);
|
|
5973
|
+
const handleNowClick = useCallback(() => {
|
|
5974
|
+
const now = new Date();
|
|
5975
|
+
// Check if now is within allowed range
|
|
5976
|
+
const isNowValid = (!minDateTime || now >= minDateTime) &&
|
|
5977
|
+
(!maxDateTime || now <= maxDateTime);
|
|
5978
|
+
if (isNowValid) {
|
|
5979
|
+
onChange(now);
|
|
5980
|
+
setIsOpen(false);
|
|
5981
|
+
}
|
|
5982
|
+
}, [minDateTime, maxDateTime, onChange]);
|
|
5983
|
+
// Memoize formatters
|
|
5984
|
+
const formatters = useMemo(() => ({
|
|
5985
|
+
formatCaption: (date) => format(date, "MMMM yyyy", { locale: enGB }),
|
|
5986
|
+
formatWeekdayName: (date) => format(date, "EEEEEE", { locale: enGB })
|
|
5987
|
+
}), []);
|
|
5988
|
+
// Memoize disabled days
|
|
5989
|
+
const disabledDays = useMemo(() => [
|
|
5990
|
+
...(disabledDates || []),
|
|
5991
|
+
...(minDateTime ? [{ before: minDateTime }] : []),
|
|
5992
|
+
...(maxDateTime ? [{ after: maxDateTime }] : []),
|
|
5993
|
+
...(disabledMatcher ? [disabledMatcher] : []),
|
|
5994
|
+
], [disabledDates, minDateTime, maxDateTime, disabledMatcher]);
|
|
5995
|
+
return (jsx("div", { ref: containerRef, className: `cw-datetimepicker ${className || ""}`, children: jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxs("div", { className: styles$4.pickerWrapper, children: [jsx("input", { ref: inputRef, type: "text", value: inputValue, placeholder: placeholder, onChange: handleInputChange, onBlur: handleInputBlur, onClick: handleInputClick, onKeyDown: handleInputKeyDown, disabled: disabled, required: required, maxLength: 16, style: { width: "24ch" } }), jsx("div", { className: styles$4.pickerIcons, children: showClear && value && !disabled ? (jsx(CwButton, { type: "button", variant: "icon", color: "neutral", icon: "close", onClick: handleClear, tabIndex: -1, "aria-label": "Clear datetime" })) : (jsx(CwIcon, { iconId: "calendar-time" })) }), isOpen && (jsxs("div", { className: `${styles$4.pickerPopup} ${compactStyles.compactPopup}`, "data-position": popupPosition, children: [jsxs("div", { className: compactStyles.calendarWrapper, children: [jsx(DayPicker, { mode: "single", selected: selectedDate, onSelect: handleDaySelect, defaultMonth: selectedDate, disabled: disabledDays, locale: enGB, numberOfMonths: numberOfMonths, formatters: formatters, components: {
|
|
5996
|
+
Caption: (props) => jsx(CustomCaption, { ...props }),
|
|
5997
|
+
}, modifiers: {
|
|
5998
|
+
today: new Date(),
|
|
5999
|
+
}, modifiersClassNames: {
|
|
6000
|
+
today: "rdp-day_today",
|
|
6001
|
+
} }), showTodayButton && (jsx("footer", { className: "cw-flex-row cw-align-center-center", children: jsx(CwButton, { type: "button", variant: "outline", icon: "check-big", onClick: handleNowClick, text: "Now" }) }))] }), jsxs("div", { className: compactStyles.timeWrapper, children: [jsxs("header", { children: [jsx(CwIcon, { iconId: "clock", size: "medium" }), jsx("span", { children: "Time" })] }), jsx("div", { ref: timeListRef, className: `${timeStyles.timePickerList} ${compactStyles.compactTimeList}`, children: timeOptions.map((time) => {
|
|
6002
|
+
const isSelected = time === selectedTime;
|
|
6003
|
+
return (jsx("button", { type: "button", className: isSelected ? timeStyles.selected : "", onClick: () => handleTimeSelect(time), children: time }, time));
|
|
6004
|
+
}) })] })] }))] })] }) }));
|
|
6005
|
+
}
|
|
6006
|
+
|
|
4771
6007
|
const ResourcesTitleList$1 = ({ resources, canBePinned, includesPinned, onCrewPinning, onClickResourceContextMenu, ResourceTitleComponent }) => {
|
|
4772
6008
|
return (jsx("td", { className: "resourceArea", style: { width: "100px" }, children: resources.map((r, _i) => (jsxs("div", { className: "resource CwelltFunctionDescription", style: { height: r.maxTop }, children: [(canBePinned || includesPinned) && (jsx(PinButton$1, { canBePinned: canBePinned, resource: r, onCrewPinning: onCrewPinning })), jsx(ResourceTitleComponent, { resource: r, handleOnClickResourceContextMenu: (e) => {
|
|
4773
6009
|
if (onClickResourceContextMenu) {
|
|
@@ -6992,8 +8228,10 @@ class OnDoubleClickEvent {
|
|
|
6992
8228
|
}
|
|
6993
8229
|
class OnDragEvent {
|
|
6994
8230
|
id;
|
|
6995
|
-
|
|
8231
|
+
crewId;
|
|
8232
|
+
constructor(id, crewId) {
|
|
6996
8233
|
this.id = id;
|
|
8234
|
+
this.crewId = crewId;
|
|
6997
8235
|
}
|
|
6998
8236
|
}
|
|
6999
8237
|
class OnDropEvent {
|
|
@@ -7068,10 +8306,6 @@ class OnClickRowHeader {
|
|
|
7068
8306
|
this.id = id;
|
|
7069
8307
|
}
|
|
7070
8308
|
}
|
|
7071
|
-
class UpdateApi {
|
|
7072
|
-
constructor() {
|
|
7073
|
-
}
|
|
7074
|
-
}
|
|
7075
8309
|
class OnClickUtc {
|
|
7076
8310
|
constructor() {
|
|
7077
8311
|
}
|
|
@@ -7311,7 +8545,7 @@ const SchedulerEvent = ({ value, heightRem, onEvent }) => {
|
|
|
7311
8545
|
setIsOnDrag(false);
|
|
7312
8546
|
}, onDragStart: (_) => {
|
|
7313
8547
|
if (value.isDraggable)
|
|
7314
|
-
onEvent(new OnDragEvent(value.id));
|
|
8548
|
+
onEvent(new OnDragEvent(value.id, value.rowId));
|
|
7315
8549
|
}, onDragEnd: (_) => {
|
|
7316
8550
|
if (value.isDraggable)
|
|
7317
8551
|
setIsOnDrag(false);
|
|
@@ -7728,205 +8962,6 @@ const getWeekendsDaysInDateRange = (initialDate, visibleDays) => {
|
|
|
7728
8962
|
|
|
7729
8963
|
class UiEvent {
|
|
7730
8964
|
}
|
|
7731
|
-
function when(event) {
|
|
7732
|
-
let found = false;
|
|
7733
|
-
const actions = {
|
|
7734
|
-
case(eventType, action) {
|
|
7735
|
-
if (!found && event instanceof eventType) {
|
|
7736
|
-
action(event);
|
|
7737
|
-
found = true;
|
|
7738
|
-
}
|
|
7739
|
-
return actions;
|
|
7740
|
-
},
|
|
7741
|
-
else(action) {
|
|
7742
|
-
if (!found) {
|
|
7743
|
-
action(event);
|
|
7744
|
-
}
|
|
7745
|
-
}
|
|
7746
|
-
};
|
|
7747
|
-
return actions;
|
|
7748
|
-
}
|
|
7749
|
-
|
|
7750
|
-
const getListOfNumbers = (len) => Array(len)
|
|
7751
|
-
.fill(0)
|
|
7752
|
-
.map((_, idx) => idx);
|
|
7753
|
-
const getRandomColor = () => {
|
|
7754
|
-
return "#" + (0x1000000 + Math.random() * 0xffffff).toString(16).substr(1, 6);
|
|
7755
|
-
};
|
|
7756
|
-
const getRandomEvents = (date, visibleDays, resourceId) => {
|
|
7757
|
-
return getListOfNumbers(visibleDays).map((e) => {
|
|
7758
|
-
const len1 = Math.floor(Math.random() * 24) + 1;
|
|
7759
|
-
const moment1 = moment(date).add(e, "days").add(e, "minutes");
|
|
7760
|
-
const len2 = Math.floor(Math.random() * 25) + 1;
|
|
7761
|
-
return {
|
|
7762
|
-
id: crypto.randomUUID(),
|
|
7763
|
-
rowId: resourceId.toString(),
|
|
7764
|
-
name: "API Design",
|
|
7765
|
-
color: getRandomColor(),
|
|
7766
|
-
startDate: moment1.add(-len1, "hour").toDate(),
|
|
7767
|
-
endDate: moment1.add(len2, "hour").toDate(),
|
|
7768
|
-
};
|
|
7769
|
-
});
|
|
7770
|
-
};
|
|
7771
|
-
|
|
7772
|
-
const eventToUiState = (it, selectedDate, visibleDays, tooltip) => {
|
|
7773
|
-
const { left, width } = getEventSizes(selectedDate, visibleDays, it.startDate, it.endDate);
|
|
7774
|
-
const eventState = {
|
|
7775
|
-
...it,
|
|
7776
|
-
left,
|
|
7777
|
-
width,
|
|
7778
|
-
tooltip: tooltip,
|
|
7779
|
-
selected: false,
|
|
7780
|
-
isResizable: false,
|
|
7781
|
-
isDraggable: false,
|
|
7782
|
-
};
|
|
7783
|
-
return eventState;
|
|
7784
|
-
};
|
|
7785
|
-
const SchedulerPresenter = () => {
|
|
7786
|
-
const [events, setEvents] = useState([]);
|
|
7787
|
-
const [backgroundEvents, setBackgroundEvents] = useState([]);
|
|
7788
|
-
const [uiState, setUiState] = useState(() => {
|
|
7789
|
-
const visibleDays = 1;
|
|
7790
|
-
const selectedDate = new Date("2024-12-03");
|
|
7791
|
-
const isHeaderVisible = true;
|
|
7792
|
-
return {
|
|
7793
|
-
isUtc: false,
|
|
7794
|
-
selectedDate: selectedDate,
|
|
7795
|
-
isHeaderVisible: isHeaderVisible,
|
|
7796
|
-
visibleDays: visibleDays,
|
|
7797
|
-
rowsHeight: 2,
|
|
7798
|
-
visibleRows: 8,
|
|
7799
|
-
};
|
|
7800
|
-
});
|
|
7801
|
-
const [resources, setResources] = useState([]);
|
|
7802
|
-
const selectedEventRef = useRef("");
|
|
7803
|
-
useEffect(() => {
|
|
7804
|
-
updateDataFromApi();
|
|
7805
|
-
}, []);
|
|
7806
|
-
const updateDataFromApi = () => {
|
|
7807
|
-
const rows = 1;
|
|
7808
|
-
// api call here to events
|
|
7809
|
-
const apiEvents = getListOfNumbers(rows).flatMap((e) => {
|
|
7810
|
-
return getRandomEvents(uiState.selectedDate, uiState.visibleDays * 3, e);
|
|
7811
|
-
});
|
|
7812
|
-
const eventsWithSizes = apiEvents.map((it) => {
|
|
7813
|
-
return eventToUiState(it, uiState.selectedDate, uiState.visibleDays, jsxs("div", { children: [it.startDate.getHours() + ":" + it.startDate.getMinutes(), " -", it.endDate.getHours() + ":" + it.endDate.getMinutes()] }));
|
|
7814
|
-
});
|
|
7815
|
-
const visibleEvents = eventsWithSizes.filter((event) => {
|
|
7816
|
-
return eventIsVisible(event.startDate, event.endDate, uiState.selectedDate, uiState.visibleDays);
|
|
7817
|
-
});
|
|
7818
|
-
setEvents(visibleEvents);
|
|
7819
|
-
const apiBackgroundEvents = getListOfNumbers(1).map((e) => {
|
|
7820
|
-
const backgroundEvent = {
|
|
7821
|
-
id: e.toString(),
|
|
7822
|
-
rowId: e.toString(),
|
|
7823
|
-
color: "orange",
|
|
7824
|
-
isResizable: false,
|
|
7825
|
-
isDraggable: false,
|
|
7826
|
-
width: 100 / uiState.visibleDays,
|
|
7827
|
-
name: "Birthday",
|
|
7828
|
-
icons: jsx(CwIcon, { iconId: "house", style: { padding: "0.5rem" } }, "cosa"),
|
|
7829
|
-
startDate: new Date(),
|
|
7830
|
-
left: 0,
|
|
7831
|
-
endDate: new Date(),
|
|
7832
|
-
isVisible: true,
|
|
7833
|
-
selected: false,
|
|
7834
|
-
};
|
|
7835
|
-
return backgroundEvent;
|
|
7836
|
-
});
|
|
7837
|
-
setBackgroundEvents(apiBackgroundEvents);
|
|
7838
|
-
// api call here to rows
|
|
7839
|
-
const apiRows = getListOfNumbers(rows).map((e) => {
|
|
7840
|
-
return {
|
|
7841
|
-
resourceId: e.toString(),
|
|
7842
|
-
title: "JAC" + e,
|
|
7843
|
-
};
|
|
7844
|
-
});
|
|
7845
|
-
const headerProps = apiRows.map((row) => {
|
|
7846
|
-
return {
|
|
7847
|
-
rowId: row.resourceId,
|
|
7848
|
-
title: row.title,
|
|
7849
|
-
};
|
|
7850
|
-
});
|
|
7851
|
-
setResources(headerProps);
|
|
7852
|
-
};
|
|
7853
|
-
const onEvent = (event) => {
|
|
7854
|
-
when(event)
|
|
7855
|
-
.case(OnClickEvent, (event) => {
|
|
7856
|
-
console.log("onClick event: " + event.id);
|
|
7857
|
-
})
|
|
7858
|
-
.case(OnDoubleClickEvent, (event) => {
|
|
7859
|
-
const eventData = resources
|
|
7860
|
-
.map((resource) => {
|
|
7861
|
-
const element = events
|
|
7862
|
-
.filter((it) => {
|
|
7863
|
-
return it.rowId === resource.rowId;
|
|
7864
|
-
})
|
|
7865
|
-
.find((it) => it.id == event.id);
|
|
7866
|
-
return element;
|
|
7867
|
-
})
|
|
7868
|
-
.filter((it) => it !== undefined)[0];
|
|
7869
|
-
console.log("found", eventData?.startDate, eventData?.endDate);
|
|
7870
|
-
})
|
|
7871
|
-
.case(OnDragEvent, (event) => {
|
|
7872
|
-
console.log("onDrag event: " + event.id);
|
|
7873
|
-
selectedEventRef.current = event.id;
|
|
7874
|
-
console.log("selectedEvent set to: " + selectedEventRef.current);
|
|
7875
|
-
})
|
|
7876
|
-
.case(OnDropEvent, (event) => {
|
|
7877
|
-
console.log("onDrop event: " + selectedEventRef.current + " to row: " + event.id);
|
|
7878
|
-
setEvents((prevEvents) => {
|
|
7879
|
-
// Find the index of the event to be updated
|
|
7880
|
-
const eventIndex = prevEvents.findIndex((e) => e.id === selectedEventRef.current);
|
|
7881
|
-
// If event is found, create a new array with the updated event
|
|
7882
|
-
const updatedEvents = [...prevEvents];
|
|
7883
|
-
updatedEvents[eventIndex] = {
|
|
7884
|
-
...updatedEvents[eventIndex],
|
|
7885
|
-
rowId: event.id,
|
|
7886
|
-
};
|
|
7887
|
-
return updatedEvents;
|
|
7888
|
-
});
|
|
7889
|
-
console.log("drop on");
|
|
7890
|
-
selectedEventRef.current = ""; // Reset the selected event ref
|
|
7891
|
-
})
|
|
7892
|
-
.case(OnDropCtrlEvent, (event) => {
|
|
7893
|
-
alert(`Clicked row is ${event.id}`);
|
|
7894
|
-
})
|
|
7895
|
-
.case(OnClickRowEvent, (event) => {
|
|
7896
|
-
alert(`Clicked row is ${event.id}`);
|
|
7897
|
-
})
|
|
7898
|
-
.case(OnRightClickEvent, (event) => {
|
|
7899
|
-
alert(`RightClick event ${event.id}`);
|
|
7900
|
-
})
|
|
7901
|
-
.case(OnRightClickRow, (event) => {
|
|
7902
|
-
alert(`RightClick row ${event.id}`);
|
|
7903
|
-
})
|
|
7904
|
-
.case(OnLeftDragStart, (event) => {
|
|
7905
|
-
alert(`Start left Drag ${event.id}`);
|
|
7906
|
-
})
|
|
7907
|
-
.case(OnRightDragStart, (event) => {
|
|
7908
|
-
alert(`Start Right Drag ${event.id}`);
|
|
7909
|
-
})
|
|
7910
|
-
.case(UpdateApi, () => {
|
|
7911
|
-
updateDataFromApi();
|
|
7912
|
-
})
|
|
7913
|
-
.case(OnClickRowHeader, (event) => {
|
|
7914
|
-
console.log(`Clicked row ${event.id}`);
|
|
7915
|
-
})
|
|
7916
|
-
.case(OnClickUtc, () => {
|
|
7917
|
-
setUiState((old) => {
|
|
7918
|
-
return { ...old, isUtc: !old.isUtc };
|
|
7919
|
-
});
|
|
7920
|
-
});
|
|
7921
|
-
};
|
|
7922
|
-
return {
|
|
7923
|
-
state: uiState,
|
|
7924
|
-
resources: resources,
|
|
7925
|
-
events,
|
|
7926
|
-
backgroundEvents,
|
|
7927
|
-
onEvent: onEvent,
|
|
7928
|
-
};
|
|
7929
|
-
};
|
|
7930
8965
|
|
|
7931
8966
|
const getNow = (isUtc) => {
|
|
7932
8967
|
let now = new Date();
|
|
@@ -8027,10 +9062,6 @@ const height = (events, rows, rowsNumber) => {
|
|
|
8027
9062
|
});
|
|
8028
9063
|
return flatMapped.length;
|
|
8029
9064
|
};
|
|
8030
|
-
const SchedulerPreview = () => {
|
|
8031
|
-
const { state, resources, events, backgroundEvents, onEvent } = SchedulerPresenter();
|
|
8032
|
-
return (jsxs("div", { children: [jsx("button", { onClick: (_) => onEvent(new UpdateApi()), children: "update" }), jsx("button", { onClick: (_) => onEvent(new OnClickUtc()), children: state.isUtc ? "set Local" : "set UTC" }), jsx(Scheduler, { id: "test", state: state, header: { title: "Flights", classification: "ACFT" }, rows: resources, onEvent: onEvent, EventComp: SchedulerEvent, RowTitleComp: DefaultRowHeader, events: events, backgroundEvents: backgroundEvents, contextMenuItems: [] })] }));
|
|
8033
|
-
};
|
|
8034
9065
|
|
|
8035
9066
|
let topsCounter = 0;
|
|
8036
9067
|
class CwSuperScheduler extends React.Component {
|
|
@@ -8386,18 +9417,18 @@ const PinRowHeader = ({ value, width, onEvent }) => {
|
|
|
8386
9417
|
});
|
|
8387
9418
|
},
|
|
8388
9419
|
onMouseLeave: () => setIsContextMenuOpen(false),
|
|
8389
|
-
}, trigger: ["contextMenu"], overlayStyle: { animationDuration: "0" }, arrow: (value.contextMenuItems?.length ?? 0) > 0, children: jsx(CwGenericTooltip, { content: value.tooltip, position: "right", dissapearsWhenHover: true, overlayStyle: value.overlayTooltipStyle, children: jsxs("div", { style: {
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
9420
|
+
}, trigger: ["contextMenu"], overlayStyle: { animationDuration: "0" }, arrow: (value.contextMenuItems?.length ?? 0) > 0, children: jsx("div", { children: jsx(CwGenericTooltip, { content: value.tooltip, position: "right", dissapearsWhenHover: true, overlayStyle: value.overlayTooltipStyle, children: jsxs("div", { style: {
|
|
9421
|
+
width: width,
|
|
9422
|
+
background: highlightColor,
|
|
9423
|
+
}, className: styles["super-scheduler-row-header"], children: [jsx("button", { className: "cw-button-icon cwi-pin", "data-pinned": value.isPinned, onClick: (_) => {
|
|
9424
|
+
onEvent(value.isPinned ? new OnUnpinRow(value.rowId) : new OnPinRow(value.rowId));
|
|
9425
|
+
} }), jsx("div", { className: styles["indicators"], children: value.indicators ?? undefined }), jsxs("div", { style: {
|
|
9426
|
+
display: "flex",
|
|
9427
|
+
flexDirection: "column",
|
|
9428
|
+
justifyContent: "center",
|
|
9429
|
+
alignItems: "flex-start",
|
|
9430
|
+
}, 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 &&
|
|
9431
|
+
jsxs("span", { className: styles["scheduler-crewmember-functions"], children: ["(", value.title3, ")"] }), value.subtitle2 && jsxs("span", { children: ["-", value.subtitle2] })] })] }), isLoading ? jsx("span", { className: "cwi-icons cwi-spinner" }) : undefined] }) }, value.rowId) }) }, value.rowId));
|
|
8401
9432
|
};
|
|
8402
9433
|
|
|
8403
9434
|
const SuperScheduler = ({ id, state, header, rows, events, pinnedOrderCategory, unPinnedOrderCategory, backgroundEvents, contextMenuItems, onEvent }) => {
|
|
@@ -8645,41 +9676,4 @@ const CwFindAirport = ({ handleChange, searchType = "OnlyDatabase", placeHolder
|
|
|
8645
9676
|
return (jsxs("div", { className: `cw-find-airport ${className}`, style: width ? { width } : undefined, children: [jsxs("div", { className: "cw-find-airport-input-wrapper", children: [jsx("input", { ref: inputRef, type: "text", value: inputValue, onChange: handleInputChange, onKeyDown: handleKeyDown, onFocus: handleInputFocus, placeholder: isInitialLoading ? "Loading…" : placeHolder, disabled: disabled, required: required, autoComplete: "off", "aria-expanded": showDropdown, "aria-haspopup": "listbox", role: "combobox", title: tooltipText }), (isLoading || isInitialLoading) && (jsx("div", { className: "cw-find-airport-loading", children: jsx(CwIcon, { iconId: "spinner" }) })), inputValue && !disabled && !isInitialLoading && (jsx(CwButton, { type: "button", onClick: handleClear, "aria-label": "Clear selected airport", variant: "icon", icon: "close", color: "neutral" }))] }), showDropdown && options.length > 0 && (jsx("div", { ref: dropdownRef, className: "cw-find-airport-dropdown", role: "listbox", children: options.map((option, index) => (jsx("div", { className: `cw-find-airport-option ${index === highlightedIndex ? "highlighted" : ""}`, onClick: () => handleOptionSelect(option.value), role: "option", "aria-selected": index === highlightedIndex, children: option.text }, option.value))) }))] }));
|
|
8646
9677
|
};
|
|
8647
9678
|
|
|
8648
|
-
|
|
8649
|
-
new CwSelectList("Search", "1", "Search something", "red")
|
|
8650
|
-
] }) }) }) }), jsxs(Category, { name: "Scheduler-headers", children: [jsx(Component$1, { name: "DefaultRowHeader", children: jsx(Variant, { children: jsx(DefaultRowHeader, { value: {
|
|
8651
|
-
rowId: "1",
|
|
8652
|
-
title: "JAC",
|
|
8653
|
-
title2: "CMD",
|
|
8654
|
-
subtitle: "ICAO",
|
|
8655
|
-
subtitle2: "IATA"
|
|
8656
|
-
},
|
|
8657
|
-
// color={"red"}
|
|
8658
|
-
width: 180, onEvent: () => {
|
|
8659
|
-
} }) }) }), jsxs(Component$1, { name: "PinRowHeader", children: [jsx(Variant, { children: jsx(PinRowHeader, { value: {
|
|
8660
|
-
rowId: "1",
|
|
8661
|
-
title: "JAC",
|
|
8662
|
-
title2: "CMD",
|
|
8663
|
-
subtitle: "ICAO",
|
|
8664
|
-
subtitle2: "IATA",
|
|
8665
|
-
isPinned: true,
|
|
8666
|
-
contextMenuItems: [],
|
|
8667
|
-
isLoading: false,
|
|
8668
|
-
},
|
|
8669
|
-
// color={"red"}
|
|
8670
|
-
width: 180, onEvent: () => {
|
|
8671
|
-
} }) }), jsx(Variant, { name: "pinned", children: jsx(PinRowHeader, { value: {
|
|
8672
|
-
rowId: "1",
|
|
8673
|
-
title: "JAC",
|
|
8674
|
-
title2: "CMD",
|
|
8675
|
-
subtitle: "ICAO",
|
|
8676
|
-
subtitle2: "IATA",
|
|
8677
|
-
isPinned: true,
|
|
8678
|
-
contextMenuItems: [],
|
|
8679
|
-
isLoading: false,
|
|
8680
|
-
},
|
|
8681
|
-
// color={"red"}
|
|
8682
|
-
width: 180, onEvent: () => {
|
|
8683
|
-
} }) })] })] }), jsx(Category, { name: "Scheduler", children: jsx(Component$1, { name: "Scheduler", children: jsx(Variant, { children: jsx(SchedulerPreview, {}) }) }) })] }));
|
|
8684
|
-
|
|
8685
|
-
export { CblDragAndDrop, CwAccordionContainer, CwAlign, CwBtnAdd, CwBtnAddFolder, CwBtnAirport, CwBtnAlert, CwBtnApprove, CwBtnBookMark, CwBtnBulkDuty, CwBtnCancel, CwBtnCrewPlanning, CwBtnDelay, CwBtnDelete, CwBtnDownLoadAllInfo, CwBtnDownload, CwBtnDropDownMenu, CwBtnEdit, CwBtnEditFolder, CwBtnFiles, CwBtnGeneratePairing, CwBtnGoBackFolder, CwBtnHide, CwBtnImportRequests, CwBtnMVT, CwBtnNavFirstItemView, CwBtnNavLastItemView, CwBtnNavNextDay, CwBtnNavPreviewItem, CwBtnPairing, CwBtnPrint, CwBtnPropertyFolder, CwBtnPublish, CwBtnRefresh, CwBtnReleasePeriod, CwBtnSave, CwBtnSearch, CwBtnSelect, CwBtnShare, CwBtnStatistic, CwBtnUploadFiles, CwBtnVacations, CwBtnView, CwButton, CwButtonDef, CwCard, CwCardList, CwCheckbox, CwChip, CwColorPicker, CwConfirmationPopup, CwContextMenu, CwContextualMenu, CwDialog, CwDialogManager, CwDigit, CwDisplayMessage, CwDropdown, CwDropdownContainer, CwDropdownFilter, CwExpandable, CwFileUpload, CwFileUploadMultiple, CwFindAirport, CwFloatingButton, CwGenericTooltip, CwHeadFilter, CwHeadingMain, CwHeadingSecond, CwIcon, CwImageArea, CwImageGallery, CwImageZoom, CwInput, CwInputColor, CwInputDate, CwInputDatePicker, CwInputDateText, CwInputDatetime, CwInputImage, CwInputNumber, CwInputPhone, CwInputText, CwKeyValueList, CwLabel, CwLoading, CwLoadingSmall, CwMessage, CwMessageManager, CwMessageType, CwModal, CwModalConfirm, CwModalHover, CwModalIframe, CwModalReportFunctional, CwMultiFilter, CwMultiFilterTag, CwMultiselect, CwNote, CwOption, CwOptionList, CwPaletteTree, CwReportModal, CwScheduler, CwScheduler2, CwSearchInput, CwSelect, CwSelectList, CwSelectListItems, CwSortableList, CwSuperScheduler, CwTable, CwTableGrouped, CwTabs, CwTag, CwTextArea, CwTime, CwToggle, CwTooltip, CwTreeView, CwWeekdaySelector, DefaultRowHeader, MultiSelect, OnClearPinned, OnClickContextMenu, OnClickEvent, OnClickRowEvent, OnClickRowHeader, OnClickUtc, OnDoubleClickEvent, OnDoubleClickRowEvent, OnDragEvent, OnDropCtrlEvent, OnDropEvent, OnEndClickHeaderEvent, OnLeftDragStart, OnMultiClickEvent, OnPinRow, OnRangeClickEvent, OnRightClickEvent, OnRightClickRow, OnRightDragStart, OnStartClickHeaderEvent, OnUnpinRow, PinRowHeader, Resource, Scheduler, SchedulerEvent, SuperScheduler, UiEvent, Weekdays, cblEvent, eventIsVisible, getDefaultDivisions, getEventSizes, itemsToMultiFilterTags, useCwMessage, useSortableList };
|
|
9679
|
+
export { CblDragAndDrop, CwAccordionContainer, CwAlign, CwBtnAdd, CwBtnAddFolder, CwBtnAirport, CwBtnAlert, CwBtnApprove, CwBtnBookMark, CwBtnBulkDuty, CwBtnCancel, CwBtnCrewPlanning, CwBtnDelay, CwBtnDelete, CwBtnDownLoadAllInfo, CwBtnDownload, CwBtnDropDownMenu, CwBtnEdit, CwBtnEditFolder, CwBtnFiles, CwBtnGeneratePairing, CwBtnGoBackFolder, CwBtnHide, CwBtnImportRequests, CwBtnMVT, CwBtnNavFirstItemView, CwBtnNavLastItemView, CwBtnNavNextDay, CwBtnNavPreviewItem, CwBtnPairing, CwBtnPrint, CwBtnPropertyFolder, CwBtnPublish, CwBtnRefresh, CwBtnReleasePeriod, CwBtnSave, CwBtnSearch, CwBtnSelect, CwBtnShare, CwBtnStatistic, CwBtnUploadFiles, CwBtnVacations, CwBtnView, CwButton, CwButtonDef, CwCard, CwCardList, CwCheckbox, CwChip, CwColorPicker, CwConfirmationPopup, CwContextMenu, CwContextualMenu, CwDatePicker, CwDateRangePicker, CwDateTimePicker, CwDateTimePickerCompact, CwDialog, CwDialogManager, CwDigit, CwDisplayMessage, CwDropdown, CwDropdownContainer, CwDropdownFilter, CwExpandable, CwFileUpload, CwFileUploadMultiple, CwFindAirport, CwFloatingButton, CwGenericTooltip, CwHeadFilter, CwHeadingMain, CwHeadingSecond, CwIcon, CwImageArea, CwImageGallery, CwImageZoom, CwInput, CwInputColor, CwInputDate, CwInputDatePicker, CwInputDateText, CwInputDatetime, CwInputImage, CwInputNumber, CwInputPhone, CwInputText, CwKeyValueList, CwLabel, CwLoading, CwLoadingSmall, CwMessage, CwMessageManager, CwMessageType, CwModal, CwModalConfirm, CwModalHover, CwModalIframe, CwModalReportFunctional, CwMultiFilter, CwMultiFilterTag, CwMultiselect, CwNote, CwOption, CwOptionList, CwReportModal, CwScheduler, CwScheduler2, CwSearchInput, CwSelect, CwSelectList, CwSelectListItems, CwSortableList, CwSuperScheduler, CwTable, CwTableGrouped, CwTabs, CwTag, CwTextArea, CwTime, CwTimePicker, CwToggle, CwTooltip, CwTreeView, CwWeekdaySelector, DefaultRowHeader, MultiSelect, OnClearPinned, OnClickContextMenu, OnClickEvent, OnClickRowEvent, OnClickRowHeader, OnClickUtc, OnDoubleClickEvent, OnDoubleClickRowEvent, OnDragEvent, OnDropCtrlEvent, OnDropEvent, OnEndClickHeaderEvent, OnLeftDragStart, OnMultiClickEvent, OnPinRow, OnRangeClickEvent, OnRightClickEvent, OnRightClickRow, OnRightDragStart, OnStartClickHeaderEvent, OnUnpinRow, PinRowHeader, Resource, Scheduler, SchedulerEvent, SuperScheduler, UiEvent, Weekdays, cblEvent, eventIsVisible, getDefaultDivisions, getEventSizes, itemsToMultiFilterTags, useCwMessage, useSortableList };
|