@cwellt_software/cwellt-reactjs-lib 1.1.6 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/content/icons/new-cw-icons/NewCwIcons.html +13 -3
- package/dist/content/icons/new-cw-icons/NewCwIcons.json +10 -1
- package/dist/content/icons/new-cw-icons/css/new-cw-icons.css +39 -2
- package/dist/content/icons/new-cw-icons/fonts/NewCwIcons.woff +0 -0
- package/dist/index.cjs.js +2169 -1653
- package/dist/index.css +1 -7
- package/dist/index.d.ts +446 -327
- package/dist/index.es.js +2167 -1607
- package/dist/src/common/classes/CwSelectList.js +12 -0
- package/dist/src/common/classes/CwSelectListItems.js +14 -0
- package/dist/src/common/functions/collections.js +18 -0
- package/dist/src/common/functions/colorManipulation.js +76 -0
- package/dist/src/common/functions/dsl/UiEventDSL.js +20 -0
- package/dist/src/common/functions/useSingleAndDoubleClicks.js +28 -0
- package/dist/src/components/control/action/button/CwButton.d.ts +5 -2
- package/dist/src/components/control/action/button/CwButton.d.ts.map +1 -1
- package/dist/src/components/control/action/button/CwButton.js +13 -0
- package/dist/src/components/control/action/buttons/CwButtons.d.ts +24 -54
- package/dist/src/components/control/action/buttons/CwButtons.d.ts.map +1 -1
- package/dist/src/components/control/action/buttons/CwButtons.js +188 -0
- package/dist/src/components/control/action/contextmenu/CwAnchoredMenu.d.ts +80 -0
- package/dist/src/components/control/action/contextmenu/CwAnchoredMenu.d.ts.map +1 -0
- package/dist/src/components/control/action/contextmenu/CwContextMenu.d.ts +0 -11
- package/dist/src/components/control/action/contextmenu/CwContextMenu.d.ts.map +1 -1
- package/dist/src/components/control/action/contextmenu/CwContextMenu.js +43 -0
- package/dist/src/components/control/action/contextual-menu/CwContextualMenu.js +55 -0
- package/dist/src/components/control/action/search/CwSearch.d.ts +6 -2
- package/dist/src/components/control/action/search/CwSearch.d.ts.map +1 -1
- package/dist/src/components/control/action/search/CwSearch.js +67 -0
- package/dist/src/components/control/action/tooltip-dialog/CwTooltipDialog.js +11 -0
- package/dist/src/components/control/choice/checkbox/CwCheckbox.js +15 -0
- package/dist/src/components/control/choice/deprecated/MultiSelect_deprecated_.js +99 -0
- package/dist/src/components/control/choice/dropdown/CwDropdown.js +27 -0
- package/dist/src/components/control/choice/dropdown/CwDropdownContainer.js +30 -0
- package/dist/src/components/control/choice/dropdown/CwDropdownFilter.js +10 -0
- package/dist/src/components/control/choice/multi-filter/CwMultiFilter.d.ts +1 -5
- package/dist/src/components/control/choice/multi-filter/CwMultiFilter.d.ts.map +1 -1
- package/dist/src/components/control/choice/multi-filter/CwMultiFilter.js +298 -0
- package/dist/src/components/control/choice/multi-filter/components/tag/CwMultiFilterTag.d.ts +2 -2
- package/dist/src/components/control/choice/multi-filter/components/tag/CwMultiFilterTag.d.ts.map +1 -1
- package/dist/src/components/control/choice/multi-filter/components/tag/CwMultiFilterTag.js +17 -0
- package/dist/src/components/control/choice/multiselect/CwHeadFilter.js +80 -0
- package/dist/src/components/control/choice/multiselect/CwMultiselect.js +393 -0
- package/dist/src/components/control/choice/multiselect/CwOptionList.js +36 -0
- package/dist/src/components/control/choice/option/CwOption.js +16 -0
- package/dist/src/components/control/choice/select/CwSelect.js +36 -0
- package/dist/src/components/control/choice/toggle/CwToggle.d.ts.map +1 -1
- package/dist/src/components/control/choice/toggle/CwToggle.js +9 -0
- package/dist/src/components/control/input/any/CwInput.js +16 -0
- package/dist/src/components/control/input/color/CwColorPicker.js +210 -0
- package/dist/src/components/control/input/color/CwInputColor.js +142 -0
- package/dist/src/components/control/input/date/CwInputDate.js +29 -0
- package/dist/src/components/control/input/date-picker/CwInputDatePicker.js +109 -0
- package/dist/src/components/control/input/date-text/CwInputDateText.js +90 -0
- package/dist/src/components/control/input/datetime/CwInputDatetime.js +29 -0
- package/dist/src/components/control/input/digit/CwDigit.js +28 -0
- package/dist/src/components/control/input/file/CwFileUpload.js +52 -0
- package/dist/src/components/control/input/file/CwFileUploadMultiple.d.ts +1 -0
- package/dist/src/components/control/input/file/CwFileUploadMultiple.d.ts.map +1 -1
- package/dist/src/components/control/input/file/CwFileUploadMultiple.js +148 -0
- package/dist/src/components/control/input/image/CwInputImage.js +52 -0
- package/dist/src/components/control/input/image-area/CwImageArea.js +113 -0
- package/dist/src/components/control/input/new-dates/CwDatePicker.d.ts +44 -0
- package/dist/src/components/control/input/new-dates/CwDatePicker.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwDateRangePicker.d.ts +65 -0
- package/dist/src/components/control/input/new-dates/CwDateRangePicker.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwDateTimePicker.d.ts +47 -0
- package/dist/src/components/control/input/new-dates/CwDateTimePicker.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwDateTimePickerCompact.d.ts +46 -0
- package/dist/src/components/control/input/new-dates/CwDateTimePickerCompact.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/CwTimePicker.d.ts +38 -0
- package/dist/src/components/control/input/new-dates/CwTimePicker.d.ts.map +1 -0
- package/dist/src/components/control/input/new-dates/dateRangePresets.d.ts +19 -0
- package/dist/src/components/control/input/new-dates/dateRangePresets.d.ts.map +1 -0
- package/dist/src/components/control/input/number/CwInputNumber.js +11 -0
- package/dist/src/components/control/input/phone/CwInputPhone.js +24 -0
- package/dist/src/components/control/input/text/CwInputText.d.ts.map +1 -1
- package/dist/src/components/control/input/text/CwInputText.js +31 -0
- package/dist/src/components/control/input/text-area/CwTextArea.js +9 -0
- package/dist/src/components/control/input/time/CwTime.js +29 -0
- package/dist/src/components/control/input/weekday/CwWeekdaySelector.js +143 -0
- package/dist/src/components/custom/find-airport/CwFindAirportComp.d.ts +4 -1
- package/dist/src/components/custom/find-airport/CwFindAirportComp.d.ts.map +1 -1
- package/dist/src/components/custom/find-airport/CwFindAirportComp.js +240 -0
- package/dist/src/components/custom/scheduler/CwSchedulerComp.js +211 -0
- package/dist/src/components/custom/scheduler/CwSuperSchedulerComp.js +269 -0
- package/dist/src/components/custom/scheduler/components/EventRender.js +142 -0
- package/dist/src/components/custom/scheduler/components/ResourceListRender.d.ts +1 -1
- package/dist/src/components/custom/scheduler/components/ResourceListRender.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler/components/ResourceListRender.js +12 -0
- package/dist/src/components/custom/scheduler/components/ResourceRender.js +26 -0
- package/dist/src/components/custom/scheduler/components/day_headers/DayHeader.js +13 -0
- package/dist/src/components/custom/scheduler/components/day_headers/MonthHeader.js +12 -0
- package/dist/src/components/custom/scheduler/components/day_headers/MyDaysHeader.js +62 -0
- package/dist/src/components/custom/scheduler/components/day_headers/WeekHeader.js +13 -0
- package/dist/src/components/custom/scheduler/components/resources_title_list/ResourcesTitleList.js +24 -0
- package/dist/src/components/custom/scheduler/components/scheduler_content_area/SchedulerContentArea.js +17 -0
- package/dist/src/components/custom/scheduler/components/scheduler_header/SchedulerHeader.js +26 -0
- package/dist/src/components/custom/scheduler/components/scheduler_timeline/SchedulerTimeLine.js +23 -0
- package/dist/src/components/custom/scheduler/components/time_headers/TimeHeader.js +31 -0
- package/dist/src/components/custom/scheduler/components/time_headers/TimeHeaderRow.js +16 -0
- package/dist/src/components/custom/scheduler/components/time_line/TimeLine.js +12 -0
- package/dist/src/components/custom/scheduler/logic/dates/addMinutesToDateFromPx.js +5 -0
- package/dist/src/components/custom/scheduler/logic/dates/daysBetweenTwoDates.js +15 -0
- package/dist/src/components/custom/scheduler/logic/dates/daysBetweenTwoDatesWithoutCeil.js +5 -0
- package/dist/src/components/custom/scheduler/logic/dates/getFormatedTimeForHeader.js +43 -0
- package/dist/src/components/custom/scheduler/logic/dates/getMonthHeaderData.js +35 -0
- package/dist/src/components/custom/scheduler/logic/dates/getUtcToday.js +6 -0
- package/dist/src/components/custom/scheduler/logic/dates/getWeekHeaderDataFromWeekRange.js +20 -0
- package/dist/src/components/custom/scheduler/logic/dates/listOfDatesToWeeks.js +55 -0
- package/dist/src/components/custom/scheduler/logic/divisions/calculateDivisionType.js +13 -0
- package/dist/src/components/custom/scheduler/logic/divisions/calculateDivisions.js +16 -0
- package/dist/src/components/custom/scheduler/logic/filtering/filterEvents.js +33 -0
- package/dist/src/components/custom/scheduler/logic/filtering/filterResources.js +14 -0
- package/dist/src/components/custom/scheduler/logic/filtering/hasSameProperties.js +10 -0
- package/dist/src/components/custom/scheduler/logic/onDrop/OnDrop.js +45 -0
- package/dist/src/components/custom/scheduler/logic/pixels/getHeightLineScheduler.js +14 -0
- package/dist/src/components/custom/scheduler/logic/pixels/getPixelsForEvent.js +32 -0
- package/dist/src/components/custom/scheduler/logic/pixels/heightScheduler.js +14 -0
- package/dist/src/components/custom/scheduler/logic/pixels/heightSchedulerPinned.js +9 -0
- package/dist/src/components/custom/scheduler/logic/state_handle/doubleClickOnResource.js +5 -0
- package/dist/src/components/custom/scheduler/logic/state_handle/handleResourceChange.js +11 -0
- package/dist/src/components/custom/scheduler/logic/state_handle/onDragOver.js +9 -0
- package/dist/src/components/custom/scheduler/logic/state_handle/onDropEventToResource.js +3 -0
- package/dist/src/components/custom/scheduler/logic/strings/compareStrings.js +7 -0
- package/dist/src/components/custom/scheduler/logic/strings/getGUID.js +7 -0
- package/dist/src/components/custom/scheduler/logic/ui/checkIfSlotAvailable.js +8 -0
- package/dist/src/components/custom/scheduler/logic/ui/getEventsOfResource.js +45 -0
- package/dist/src/components/custom/scheduler/logic/ui/getTimeHeaders.js +35 -0
- package/dist/src/components/custom/scheduler/logic/ui/isAllowedToMove.js +19 -0
- package/dist/src/components/custom/scheduler/logic/ui/updateResourceVisibility.js +15 -0
- package/dist/src/components/custom/scheduler/state/CblDragAndDrop.js +18 -0
- package/dist/src/components/custom/scheduler/state/CwSchedulerProps.js +1 -0
- package/dist/src/components/custom/scheduler/state/Resource.js +18 -0
- package/dist/src/components/custom/scheduler/state/State.js +1 -0
- package/dist/src/components/custom/scheduler/state/cblEvent.js +28 -0
- package/dist/src/components/custom/scheduler/state/cblEventCompProps.js +1 -0
- package/dist/src/components/custom/scheduler/state/resourceCompProps2.js +1 -0
- package/dist/src/components/custom/scheduler-new/presentation/NewScheduler.d.ts +3 -4
- package/dist/src/components/custom/scheduler-new/presentation/NewScheduler.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/NewScheduler.js +123 -0
- package/dist/src/components/custom/scheduler-new/presentation/NewSchedulerUiEvents.d.ts +2 -1
- package/dist/src/components/custom/scheduler-new/presentation/NewSchedulerUiEvents.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/NewSchedulerUiEvents.js +118 -0
- package/dist/src/components/custom/scheduler-new/presentation/SchedulerPresenter.js +166 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/header/HeaderDivision.js +26 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/header/HeaderTitle.js +8 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/header/SchedulerHeader.js +86 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/BackgroundEvent.js +60 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.js +24 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/Event.d.ts +2 -2
- package/dist/src/components/custom/scheduler-new/presentation/components/row/Event.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/Event.js +150 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/EventSideDrag.js +11 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.d.ts +2 -2
- package/dist/src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.js +176 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/timeline/DivisionLine.js +8 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/timeline/TimeLine.js +39 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/timeline/WeekEndLine.js +8 -0
- package/dist/src/components/custom/scheduler-new/presentation/helpers.js +43 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/WeekendCalc.js +24 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/dateFromPercentage.js +7 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/eventIsVisible.js +7 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getDefaultDivisions.js +113 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getDivisions.js +21 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getEventSizes.js +30 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getLinesByDivisions.js +13 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getPercentageFromMouseEvent.d.ts +1 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/getPercentageFromMouseEvent.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/getPercentageFromMouseEvent.js +7 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsToInnerRows.js +32 -0
- package/dist/src/components/custom/scheduler-new/presentation/logic/sortByCategoryAndTitle.js +12 -0
- package/dist/src/components/custom/scheduler-temporal/CwSchedulerComp2.js +267 -0
- package/dist/src/components/custom/scheduler-temporal/CwSuperSchedulerComp.js +269 -0
- package/dist/src/components/custom/scheduler-temporal/components/EventRender.js +142 -0
- package/dist/src/components/custom/scheduler-temporal/components/ResourceListRender.js +12 -0
- package/dist/src/components/custom/scheduler-temporal/components/ResourceRender.js +26 -0
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/DayHeader.js +13 -0
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/MonthHeader.js +12 -0
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/MyDaysHeader.js +62 -0
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/WeekHeader.js +13 -0
- package/dist/src/components/custom/scheduler-temporal/components/resources_title_list/ResourcesTitleList.js +22 -0
- package/dist/src/components/custom/scheduler-temporal/components/scheduler_content_area/SchedulerContentArea.js +17 -0
- package/dist/src/components/custom/scheduler-temporal/components/scheduler_header/SchedulerHeader.js +26 -0
- package/dist/src/components/custom/scheduler-temporal/components/scheduler_timeline/SchedulerTimeLine.js +23 -0
- package/dist/src/components/custom/scheduler-temporal/components/time_headers/TimeHeader.js +31 -0
- package/dist/src/components/custom/scheduler-temporal/components/time_headers/TimeHeaderRow.js +16 -0
- package/dist/src/components/custom/scheduler-temporal/components/time_line/TimeLine.js +12 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/addMinutesToDateFromPx.js +5 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/daysBetweenTwoDates.js +15 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/daysBetweenTwoDatesWithoutCeil.js +5 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getFormatedTimeForHeader.js +43 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getMonthHeaderData.js +35 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getUtcToday.js +6 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getWeekHeaderDataFromWeekRange.js +20 -0
- package/dist/src/components/custom/scheduler-temporal/logic/dates/listOfDatesToWeeks.js +55 -0
- package/dist/src/components/custom/scheduler-temporal/logic/divisions/calculateDivisionType.js +13 -0
- package/dist/src/components/custom/scheduler-temporal/logic/divisions/calculateDivisions.js +16 -0
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterAndProcessResources.js +10 -0
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterEvents.js +34 -0
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterResources.js +14 -0
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/hasSameProperties.js +10 -0
- package/dist/src/components/custom/scheduler-temporal/logic/onDrop/OnDrop.js +36 -0
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/getHeightLineScheduler.js +14 -0
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/getPixelsForEvent.js +32 -0
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/heightScheduler.js +14 -0
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/heightSchedulerPinned.js +9 -0
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/doubleClickOnResource.js +5 -0
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/handlePropChanges.js +178 -0
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/handleResourceChange.js +11 -0
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onDragOver.js +9 -0
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onDropEventToResource.js +3 -0
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onResizeEvent.js +3 -0
- package/dist/src/components/custom/scheduler-temporal/logic/strings/compareStrings.js +7 -0
- package/dist/src/components/custom/scheduler-temporal/logic/strings/getGUID.js +7 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/checkIfSlotAvailable.js +9 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/getEventsOfResource.js +92 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/getHasPropsChanged.js +242 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/getTimeHeaders.js +35 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/isAllowedToMove.js +19 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/shouldTriggerScroll.js +241 -0
- package/dist/src/components/custom/scheduler-temporal/logic/ui/updateResourceVisibility.js +15 -0
- package/dist/src/components/custom/scheduler-temporal/state/CblDragAndDrop.js +18 -0
- package/dist/src/components/custom/scheduler-temporal/state/Resource.js +18 -0
- package/dist/src/components/custom/scheduler-temporal/state/cblEvent.js +28 -0
- package/dist/src/components/custom/scheduler-temporal/state/cblEventCompProps.js +1 -0
- package/dist/src/components/custom/scheduler-temporal/state/resourceCompProps2.js +1 -0
- package/dist/src/components/custom/super-scheduler/PinRowHeader.d.ts +2 -2
- package/dist/src/components/custom/super-scheduler/PinRowHeader.d.ts.map +1 -1
- package/dist/src/components/custom/super-scheduler/PinRowHeader.js +53 -0
- package/dist/src/components/custom/super-scheduler/SuperScheduler.d.ts +2 -2
- package/dist/src/components/custom/super-scheduler/SuperScheduler.d.ts.map +1 -1
- package/dist/src/components/custom/super-scheduler/SuperScheduler.js +23 -0
- package/dist/src/components/custom/super-scheduler/SuperSchedulerEvents.js +15 -0
- package/dist/src/components/custom/super-scheduler/SuperSchedulerPresenter.js +45 -0
- package/dist/src/components/display/data/accordion/CwAccordionContainer.js +20 -0
- package/dist/src/components/display/data/generic_tooltip/CwGenericTooltip.d.ts +1 -0
- package/dist/src/components/display/data/generic_tooltip/CwGenericTooltip.d.ts.map +1 -1
- package/dist/src/components/display/data/generic_tooltip/CwGenericTooltip.js +138 -0
- package/dist/src/components/display/data/table/CwTable.d.ts +25 -20
- package/dist/src/components/display/data/table/CwTable.d.ts.map +1 -1
- package/dist/src/components/display/data/table/CwTable.js +203 -0
- package/dist/src/components/display/graphics/icon/CwIcon.d.ts.map +1 -1
- package/dist/src/components/display/graphics/icon/CwIcon.js +23 -0
- package/dist/src/components/display/graphics/icon/svg-icons.d.ts +6 -0
- package/dist/src/components/display/graphics/icon/svg-icons.d.ts.map +1 -0
- package/dist/src/components/display/graphics/loading/CwLoading.js +27 -0
- package/dist/src/components/display/graphics/loading-small/CwLoadingSmall.js +20 -0
- package/dist/src/components/display/text/heading/CwHeadingMain.js +5 -0
- package/dist/src/components/display/text/heading/CwHeadingSecond.js +5 -0
- package/dist/src/components/display/text/label/CwLabel.d.ts +1 -4
- package/dist/src/components/display/text/label/CwLabel.d.ts.map +1 -1
- package/dist/src/components/display/text/label/CwLabel.js +13 -0
- package/dist/src/components/display/text/message/CwMessage.js +75 -0
- package/dist/src/components/display/text/note/CwNote.js +78 -0
- package/dist/src/components/display/text/tag/CwChip.d.ts.map +1 -1
- package/dist/src/components/display/text/tag/CwChip.js +57 -0
- package/dist/src/components/display/text/tag/CwTag.js +21 -0
- package/dist/src/components/display/text/tooltip/CwTooltip.js +4 -0
- package/dist/src/components/layout/align/CwAlign.js +54 -0
- package/dist/src/components/layout/card/CwCard.js +55 -0
- package/dist/src/components/layout/card/CwCardList.js +38 -0
- package/dist/src/components/layout/dialog/CwDialog.d.ts.map +1 -1
- package/dist/src/components/layout/dialog/CwDialog.js +255 -0
- package/dist/src/components/layout/dialog/CwDialogManager.js +44 -0
- package/dist/src/components/layout/list/details/CwExpandable.js +28 -0
- package/dist/src/components/layout/list/key-value/CwKeyValueList.d.ts +2 -3
- package/dist/src/components/layout/list/key-value/CwKeyValueList.d.ts.map +1 -1
- package/dist/src/components/layout/list/key-value/CwKeyValueList.js +23 -0
- package/dist/src/components/layout/list/sortable/CwSortableList.js +73 -0
- package/dist/src/components/layout/list/sortable/useSortableList.js +53 -0
- package/dist/src/components/layout/modal/CwModalReportFunctional.d.ts.map +1 -1
- package/dist/src/components/layout/modal/CwModalReportFunctional.js +23 -0
- package/dist/src/components/layout/modal/hover/CwModalHover.js +61 -0
- package/dist/src/components/layout/modal/legacy/cw_modal.d.ts +4 -0
- package/dist/src/components/layout/modal/legacy/cw_modal.d.ts.map +1 -1
- package/dist/src/components/layout/modal/legacy/cw_modal.js +44 -0
- package/dist/src/components/layout/modal/legacy/cw_modal_confirm.js +39 -0
- package/dist/src/components/layout/modal/legacy/cw_modal_iframe.js +44 -0
- package/dist/src/components/layout/modal/legacy/cw_modal_report.js +26 -0
- package/dist/src/components/layout/table/grouped/CwTableGrouped.js +70 -0
- package/dist/src/components/layout/tabs/CwTabs.d.ts +2 -0
- package/dist/src/components/layout/tabs/CwTabs.d.ts.map +1 -1
- package/dist/src/components/layout/tabs/CwTabs.js +53 -0
- package/dist/src/dev/palette.d.ts +1 -1
- package/dist/src/dev/palette.d.ts.map +1 -1
- package/dist/src/index.d.ts +8 -12
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +187 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/getDefaultDivisions.test.js +48 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/hoursBetween.test.js +15 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/monthDivisions.test.js +42 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/weekendCalc.test.js +30 -0
- package/dist/test/components/custom/scheduler/addMinutesToDateFromPx.test.js +43 -0
- package/dist/test/components/custom/scheduler/checkIfSlotAvailable.test.js +30 -0
- package/dist/test/components/custom/scheduler/daysBetweenTwoDates.test.js +61 -0
- package/dist/test/components/custom/scheduler/daysBetweenTwoDatesWithoutCeilForEvent.test.js +27 -0
- package/dist/test/components/custom/scheduler/getGUID.test.js +30 -0
- package/dist/test/components/custom/scheduler/getPixelsForEvent.test.js +38 -0
- package/dist/test/components/custom/scheduler/getTimeHeaders.test.js +35 -0
- package/dist/test/components/custom/scheduler/hasSameProperties.test.js +51 -0
- package/dist/test/components/custom/scheduler/isAllowedToMove.test.js +28 -0
- package/dist/test/components/custom/scheduler/listOfDatesToWeeks.test.js +72 -0
- package/dist/test/jest.setup.js +1 -0
- package/package.json +11 -12
- package/dist/assets/asset-DnHaq7m- +0 -50
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-full-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-grad-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-opsz-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-slnt-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-standard-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-wdth-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-xopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-xtra-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-yopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytas-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytde-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytfi-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytlc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytuc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-full-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-grad-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-opsz-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-slnt-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-standard-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-wdth-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-wght-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-xopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-xtra-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-yopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytas-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytde-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytfi-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytlc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytuc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-full-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-grad-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-opsz-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-slnt-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-standard-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-wdth-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-wght-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-xopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-xtra-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-yopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytas-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytde-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytfi-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytlc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytuc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-full-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-grad-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-opsz-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-slnt-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-standard-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-wdth-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-wght-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-xopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-xtra-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-yopq-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytas-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytde-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytfi-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytlc-normal.woff2 +0 -0
- package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytuc-normal.woff2 +0 -0
- package/dist/content/icons/cw-icons/css/cw-icons.css +0 -2784
- package/dist/content/icons/cw-icons/fonts/cwAvinodeFont/CblAvinodeIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwAvinodeFont/CblAvinodeIcon.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwAvinodeFont/CblAvinodeIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwAvinodeFont/CblAvinodeIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.svg +0 -38
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.svg +0 -29
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblCrewControlReact.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblCrewControlReact.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblCrewControlReact.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblCrewControlReact.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblDutyIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblDutyIcon.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblDutyIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblDutyIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/SessionWarning.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/SessionWarning.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/SessionWarning.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/SessionWarning.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.svg +0 -26
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrol.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrol.svg +0 -13
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrol.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrol.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.svg +0 -29
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.svg +0 -29
- package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.svg +0 -17
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.svg +0 -20
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewSchedulingFont.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewSchedulingFont.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewSchedulingFont.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewSchedulingFont.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.svg +0 -20
- package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/ArchiveEmanual.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/ArchiveEmanual.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/ArchiveEmanual.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/ArchiveEmanual.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/CblEmanualNewIcons.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/CblEmanualNewIcons.svg +0 -14
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/CblEmanualNewIcons.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/CblEmanualNewIcons.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.svg +0 -38
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualApprovedFile.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualApprovedFile.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualApprovedFile.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualApprovedFile.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.svg +0 -17
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMarkLink.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMarkLink.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMarkLink.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMarkLink.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFolder.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFolder.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFolder.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFolder.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFont.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFont.svg +0 -13
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFont.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFont.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.svg +0 -32
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPendingIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPendingIcon.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPendingIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPendingIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishFile.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishFile.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishFile.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishFile.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishIconFile.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishIconFile.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishIconFile.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishIconFile.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrash.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrash.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrash.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrash.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrashRight.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrashRight.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrashRight.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrashRight.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/LibraryIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/LibraryIcon.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/LibraryIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwEmanualFont/LibraryIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.svg +0 -158
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/cwellt_icon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/cwellt_icon.svg +0 -18
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/cwellt_icon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/cwellt_icon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.svg +0 -62
- package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesIcons/CblFavoritesIcons.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesIcons/CblFavoritesIcons.svg +0 -43
- package/dist/content/icons/cw-icons/fonts/cwFavoritesIcons/CblFavoritesIcons.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFavoritesIcons/CblFavoritesIcons.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFgIconsFonts/CblFigIcons.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFgIconsFonts/CblFigIcons.svg +0 -49
- package/dist/content/icons/cw-icons/fonts/cwFgIconsFonts/CblFigIcons.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFgIconsFonts/CblFigIcons.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.svg +0 -41
- package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/CblUndoIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/CblUndoIcon.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/CblUndoIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/CblUndoIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/FlightWatchOnTimeIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/FlightWatchOnTimeIcon.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/FlightWatchOnTimeIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/FlightWatchOnTimeIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.svg +0 -41
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/IDCardStatusIcon.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/IDCardStatusIcon.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/IDCardStatusIcon.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwGeneralFont/IDCardStatusIcon.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.svg +0 -17
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/calculator.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/calculator.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/calculator.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/calculator.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/icons_cwellt.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/icons_cwellt.svg +0 -11
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/icons_cwellt.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/icons_cwellt.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwOpstoolReactFont/opstoolReactIcons.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwOpstoolReactFont/opstoolReactIcons.svg +0 -12
- package/dist/content/icons/cw-icons/fonts/cwOpstoolReactFont/opstoolReactIcons.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwOpstoolReactFont/opstoolReactIcons.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.svg +0 -17
- package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.svg +0 -50
- package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.woff2 +0 -0
- package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.eot +0 -0
- package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.svg +0 -17
- package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.ttf +0 -0
- package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.woff +0 -0
- package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.woff2 +0 -0
- package/dist/content/icons/font-awesome/webfonts/fa-brands-400.ttf +0 -0
- package/dist/content/icons/font-awesome/webfonts/fa-regular-400.ttf +0 -0
- package/dist/content/icons/font-awesome/webfonts/fa-solid-900.ttf +0 -0
- package/dist/content/icons/font-awesome/webfonts/fa-v4compatibility.ttf +0 -0
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.css.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.esm.js +0 -4836
- package/dist/src/common/functions/reactor.d.ts +0 -2
- package/dist/src/common/functions/reactor.d.ts.map +0 -1
- package/dist/src/components/control/input/chipper/CwChip.d.ts +0 -12
- package/dist/src/components/control/input/chipper/CwChip.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/components/ClearSchedulerButton.d.ts +0 -8
- package/dist/src/components/custom/scheduler/components/ClearSchedulerButton.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/filtering/filterAndProcessResources.d.ts +0 -14
- package/dist/src/components/custom/scheduler/logic/filtering/filterAndProcessResources.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/pixels/calculateMaxPxFromDateRange.d.ts +0 -2
- package/dist/src/components/custom/scheduler/logic/pixels/calculateMaxPxFromDateRange.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/state_handle/handleDateChange.d.ts +0 -5
- package/dist/src/components/custom/scheduler/logic/state_handle/handleDateChange.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/state_handle/handlePropChanges.d.ts +0 -5
- package/dist/src/components/custom/scheduler/logic/state_handle/handlePropChanges.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/state_handle/onResizeEvent.d.ts +0 -3
- package/dist/src/components/custom/scheduler/logic/state_handle/onResizeEvent.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/ui/getHasPropsChanged.d.ts +0 -3
- package/dist/src/components/custom/scheduler/logic/ui/getHasPropsChanged.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/logic/ui/shouldTriggerScroll.d.ts +0 -3
- package/dist/src/components/custom/scheduler/logic/ui/shouldTriggerScroll.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler/state/EventProps.d.ts +0 -7
- package/dist/src/components/custom/scheduler/state/EventProps.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/BackgrounEvent.d.ts +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/BackgrounEvent.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/cancellablePromise.d.ts +0 -7
- package/dist/src/components/custom/scheduler-new/presentation/components/row/cancellablePromise.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/useCancellablePromise.d.ts +0 -7
- package/dist/src/components/custom/scheduler-new/presentation/components/row/useCancellablePromise.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsByResource.d.ts +0 -5
- package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsByResource.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/external/Event.d.ts +0 -9
- package/dist/src/components/custom/scheduler-new/presentation/state/external/Event.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/external/Row.d.ts +0 -5
- package/dist/src/components/custom/scheduler-new/presentation/state/external/Row.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/EventSideDragState.d.ts +0 -6
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/EventSideDragState.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/HeaderDivision.d.ts +0 -5
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/HeaderDivision.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerEventState.d.ts +0 -14
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerEventState.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerHeaderState.d.ts +0 -11
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerHeaderState.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerRow.d.ts +0 -8
- package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerRow.d.ts.map +0 -1
- package/dist/test/components/custom/newScheduler/presentation/logic/getDefaultDivisions.test.d.ts.map +0 -1
- package/dist/test/components/custom/scheduler/calculateMaxPxFromDateRange.test.d.ts +0 -2
- package/dist/test/components/custom/scheduler/calculateMaxPxFromDateRange.test.d.ts.map +0 -1
- package/dist/test/components/custom/scheduler/filterEvents.test.d.ts.map +0 -1
- package/dist/test/components/custom/scheduler/shouldTriggerScroll.test.d.ts.map +0 -1
- package/dist/test/example.test.d.ts +0 -1
- package/dist/test/example.test.d.ts.map +0 -1
- /package/dist/src/{components/custom/scheduler-new/presentation/TestScheduler.d.ts → common/interfaces/CwSelectListProps.js} +0 -0
- /package/dist/{test/components/custom/newScheduler/presentation/logic/getDefaultDivisions.test.d.ts → src/components/custom/scheduler-new/presentation/components/header/SchedulerHeaderState.js} +0 -0
- /package/dist/{test/components/custom/newScheduler/presentation/logic/hoursBetween.test.d.ts → src/components/custom/scheduler-new/presentation/state/ui/SchedulerState.js} +0 -0
- /package/dist/{test/components/custom/newScheduler/presentation/logic/weekendCalc.test.d.ts → src/components/custom/scheduler-new/presentation/state/ui/WeekRange.js} +0 -0
- /package/dist/{test/components/custom/scheduler/filterEvents.test.d.ts → src/components/custom/scheduler-temporal/state/CwSchedulerProps.js} +0 -0
- /package/dist/{test/components/custom/scheduler/shouldTriggerScroll.test.d.ts → src/components/custom/scheduler-temporal/state/State.js} +0 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useCallback, useMemo, useState } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* A reusable and customizable table component.
|
|
5
|
+
*
|
|
6
|
+
* @param props - Component props to configure columns, data, styles, pagination, expanded rows, and more.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const columns: Column<User>[] = [
|
|
10
|
+
* {
|
|
11
|
+
* title: 'Name',
|
|
12
|
+
* dataIndex: 'name',
|
|
13
|
+
* key: 'name',
|
|
14
|
+
* sortable: true, // Column is sortable
|
|
15
|
+
* width: 100 // You can define the width of the column
|
|
16
|
+
* },
|
|
17
|
+
* {
|
|
18
|
+
* title: 'Age',
|
|
19
|
+
* dataIndex: 'age',
|
|
20
|
+
* key: 'age',
|
|
21
|
+
* sortable: true,
|
|
22
|
+
* render: (item) => <span>{item.age} years</span> // Custom rendering
|
|
23
|
+
* },
|
|
24
|
+
* {
|
|
25
|
+
* title: 'Address',
|
|
26
|
+
* dataIndex: 'address',
|
|
27
|
+
* key: 'address',
|
|
28
|
+
* render: (item) => (
|
|
29
|
+
* <a href={`https://maps.google.com/?q=${encodeURIComponent(item.address)}`} target="_blank" rel="noreferrer">
|
|
30
|
+
* {item.address}
|
|
31
|
+
* </a>
|
|
32
|
+
* ) // Link rendering
|
|
33
|
+
* }
|
|
34
|
+
* ];
|
|
35
|
+
*
|
|
36
|
+
* const data:User[] = [
|
|
37
|
+
* { key: '1', name: 'Mike', age: 32, address: '10 Downing Street' },
|
|
38
|
+
* { key: '2', name: 'John', age: 42, address: '11 Downing Street' },
|
|
39
|
+
* { key: '3', name: 'Andres', age: 33, address: '12 Downing Street' },
|
|
40
|
+
* { key: '4', name: 'Gabriel', age: 22, address: '13 Downing Street' },
|
|
41
|
+
* { key: '5', name: 'Sergio', age: 47, address: '14 Downing Street' },
|
|
42
|
+
* { key: '6', name: 'Zacarias', age: 61, address: '15 Downing Street' }
|
|
43
|
+
* ];
|
|
44
|
+
*
|
|
45
|
+
* const generateExpandedContent = (record) => (
|
|
46
|
+
* <div>
|
|
47
|
+
* Custom expanded content for {record.name}
|
|
48
|
+
* </div>
|
|
49
|
+
* );
|
|
50
|
+
*
|
|
51
|
+
* <CwTable<User>
|
|
52
|
+
* columns={columns}
|
|
53
|
+
* data={data}
|
|
54
|
+
* pagination={true}
|
|
55
|
+
* pageSizeOptions={[3, 5, 10]} // Optional, defaults to [5, 10, 20, 50]
|
|
56
|
+
* expandedRowRender={generateExpandedContent}
|
|
57
|
+
* onExpand={(item) => console.log('Expanded:', item)}
|
|
58
|
+
* rowKey="key" // Optional, defaults to 'key'
|
|
59
|
+
* textNoData="No data available" // Optional message when no data
|
|
60
|
+
* loading={false} // Optional, shows loading indicator
|
|
61
|
+
* scrollHeight={300} // Optional scroll height, defaults to 300
|
|
62
|
+
* stickyHeader={true} // Optional, makes header sticky on scroll
|
|
63
|
+
* classNameContainer="my-table-wrapper" // Optional wrapper class
|
|
64
|
+
* className="my-table" // Optional table class
|
|
65
|
+
* classNameRow="my-table-row" // Optional class for each row
|
|
66
|
+
* id="custom-table-id" // Optional ID for the container
|
|
67
|
+
* style={{ border: '1px solid #ccc' }} // Optional inline styles
|
|
68
|
+
* />
|
|
69
|
+
*
|
|
70
|
+
* @returns React component
|
|
71
|
+
*/
|
|
72
|
+
export function CwTable({ columns, data, pagination = false, pageSizeOptions = [5, 10, 20, 50], expandedRowRender, onExpand, className, classNameRow, style, classNameContainer, id, textNoData = "No data available at the moment", rowKey = "key", loading = false, scrollHeight, stickyHeader = false, }) {
|
|
73
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
74
|
+
const [expandedRowKey, setExpandedRowKey] = useState(null);
|
|
75
|
+
const [sortConfig, setSortConfig] = useState({
|
|
76
|
+
key: null,
|
|
77
|
+
direction: "asc"
|
|
78
|
+
});
|
|
79
|
+
const [localItemsPerPage, setLocalItemsPerPage] = useState(pageSizeOptions[0]);
|
|
80
|
+
const [columnWidths, setColumnWidths] = useState(() => columns.reduce((acc, col) => {
|
|
81
|
+
if (col.width)
|
|
82
|
+
acc[col.key] = col.width;
|
|
83
|
+
return acc;
|
|
84
|
+
}, {}));
|
|
85
|
+
const handleItemsPerPageChange = useCallback((e) => {
|
|
86
|
+
setLocalItemsPerPage(parseInt(e.target.value, 10));
|
|
87
|
+
setCurrentPage(1);
|
|
88
|
+
}, []);
|
|
89
|
+
const handleRowExpand = useCallback((item) => {
|
|
90
|
+
const itemKey = item[rowKey];
|
|
91
|
+
setExpandedRowKey((prev) => (prev === itemKey ? null : itemKey));
|
|
92
|
+
onExpand?.(item);
|
|
93
|
+
}, [rowKey, onExpand]);
|
|
94
|
+
const handleSort = useCallback((columnKey) => {
|
|
95
|
+
setSortConfig(prev => {
|
|
96
|
+
if (prev.key !== columnKey)
|
|
97
|
+
return { key: columnKey, direction: "asc" };
|
|
98
|
+
if (prev.direction === "asc")
|
|
99
|
+
return { key: columnKey, direction: "desc" };
|
|
100
|
+
return { key: null, direction: "asc" };
|
|
101
|
+
});
|
|
102
|
+
}, []);
|
|
103
|
+
const sortedData = useMemo(() => {
|
|
104
|
+
if (!data || data.length === 0)
|
|
105
|
+
return [];
|
|
106
|
+
const dataCopy = [...data];
|
|
107
|
+
if (sortConfig.key) {
|
|
108
|
+
dataCopy.sort((a, b) => {
|
|
109
|
+
const aVal = a[sortConfig.key];
|
|
110
|
+
const bVal = b[sortConfig.key];
|
|
111
|
+
return (aVal < bVal ? -1 : aVal > bVal ? 1 : 0) * (sortConfig.direction === "asc" ? 1 : -1);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return dataCopy;
|
|
115
|
+
}, [data, sortConfig]);
|
|
116
|
+
const paginatedData = useMemo(() => {
|
|
117
|
+
if (!sortedData)
|
|
118
|
+
return [];
|
|
119
|
+
if (!pagination)
|
|
120
|
+
return sortedData;
|
|
121
|
+
const start = (currentPage - 1) * localItemsPerPage;
|
|
122
|
+
return sortedData.slice(start, start + localItemsPerPage);
|
|
123
|
+
}, [sortedData, currentPage, localItemsPerPage, pagination]);
|
|
124
|
+
const totalPages = useMemo(() => {
|
|
125
|
+
return pagination ? Math.ceil(sortedData.length / localItemsPerPage) : 1;
|
|
126
|
+
}, [sortedData, localItemsPerPage, pagination]);
|
|
127
|
+
const handlePageChange = (page) => {
|
|
128
|
+
if (page >= 1 && page <= totalPages)
|
|
129
|
+
setCurrentPage(page);
|
|
130
|
+
};
|
|
131
|
+
const startResize = (e, key) => {
|
|
132
|
+
e.preventDefault();
|
|
133
|
+
const startX = e.clientX;
|
|
134
|
+
const startWidth = e.target.parentElement?.offsetWidth || 0;
|
|
135
|
+
const onMouseMove = (moveEvent) => {
|
|
136
|
+
const newWidth = Math.max(startWidth + moveEvent.clientX - startX, 50); // mínimo 50px
|
|
137
|
+
setColumnWidths(prev => ({ ...prev, [key]: newWidth }));
|
|
138
|
+
};
|
|
139
|
+
const onMouseUp = () => {
|
|
140
|
+
window.removeEventListener("mousemove", onMouseMove);
|
|
141
|
+
window.removeEventListener("mouseup", onMouseUp);
|
|
142
|
+
};
|
|
143
|
+
window.addEventListener("mousemove", onMouseMove);
|
|
144
|
+
window.addEventListener("mouseup", onMouseUp);
|
|
145
|
+
};
|
|
146
|
+
const scrollContainerStyle = useMemo(() => {
|
|
147
|
+
if (stickyHeader || scrollHeight) {
|
|
148
|
+
return {
|
|
149
|
+
maxHeight: scrollHeight ?? 300,
|
|
150
|
+
overflowY: "auto"
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
return {}; // sin altura ni scroll
|
|
154
|
+
}, [stickyHeader, scrollHeight]);
|
|
155
|
+
const getColSpan = () => columns.length + (expandedRowRender ? 1 : 0);
|
|
156
|
+
const hasClassNameRow = (item) => {
|
|
157
|
+
return typeof item === 'object' && item !== null && 'classNameRow' in item;
|
|
158
|
+
};
|
|
159
|
+
const renderTableBody = () => {
|
|
160
|
+
if (loading) {
|
|
161
|
+
return (_jsx("tr", { children: _jsx("td", { colSpan: getColSpan(), children: _jsx("div", { children: "Loading data..." }) }) }));
|
|
162
|
+
}
|
|
163
|
+
if (!paginatedData || paginatedData.length === 0) {
|
|
164
|
+
return (_jsx("tr", { children: _jsx("td", { colSpan: getColSpan(), className: "cw-table-cell-empty", style: { textAlign: "center" }, children: textNoData }) }));
|
|
165
|
+
}
|
|
166
|
+
return paginatedData.map(item => {
|
|
167
|
+
const itemKey = item[rowKey];
|
|
168
|
+
if (!itemKey)
|
|
169
|
+
console.warn("Missing row key for item", item);
|
|
170
|
+
return (_jsxs(React.Fragment, { children: [_jsxs("tr", { className: `${classNameRow ?? ""} ${hasClassNameRow(item) ? item.classNameRow : ""}`, children: [expandedRowRender && (_jsx("td", { className: "cw-table-col-action cw-table-col-expand", children: _jsx("button", { onClick: () => handleRowExpand(item), className: `cw-button-icon ${expandedRowKey === itemKey
|
|
171
|
+
? "cwi-chevron-down"
|
|
172
|
+
: "cwi-chevron-right"}` }) })), columns.map(col => (_jsx("td", { className: col.className ?? "", children: col.render ? col.render(item) : col.dataIndex ? String(item[col.dataIndex]) : "" }, `${itemKey}_${col.key}`)))] }), expandedRowRender && expandedRowKey === itemKey && (_jsx("tr", { className: "cw-table-row-expanded", children: _jsx("td", { colSpan: getColSpan(), children: expandedRowRender(item) }) }))] }, String(itemKey)));
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
return (_jsxs("div", { id: id, className: `cw-table-container ${classNameContainer ?? ""}`, style: style, children: [_jsx("div", { style: scrollContainerStyle, children: _jsxs("table", { className: `cw-table ${className ?? ""}`, style: { width: "100%" }, children: [_jsx("thead", { style: stickyHeader
|
|
176
|
+
? { position: "sticky", top: 0, background: "white", zIndex: 2 }
|
|
177
|
+
: undefined, children: _jsxs("tr", { children: [expandedRowRender && _jsx("th", {}), columns.map(col => (_jsxs("th", { onClick: () => col.sortable && col.dataIndex && handleSort(col.dataIndex), className: `${col.className ?? ""} ${sortConfig.key === col.dataIndex
|
|
178
|
+
? sortConfig.direction
|
|
179
|
+
: ""}`.trim(), style: {
|
|
180
|
+
cursor: col.sortable ? "pointer" : "default",
|
|
181
|
+
userSelect: "none",
|
|
182
|
+
width: columnWidths[col.key] ?? col.width,
|
|
183
|
+
...((col.width || columnWidths[col.key]) && {
|
|
184
|
+
minWidth: 50,
|
|
185
|
+
maxWidth: columnWidths[col.key] ?? col.width
|
|
186
|
+
}),
|
|
187
|
+
}, children: [_jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [_jsx("span", { children: col.title }), col.sortable && col.dataIndex && (_jsx("span", { style: { fontSize: "12px", marginLeft: "6px" }, children: sortConfig.key !== col.dataIndex ? "↕" : sortConfig.direction === "asc"
|
|
188
|
+
? "↑"
|
|
189
|
+
: "↓" }))] }), _jsx("span", { onMouseDown: (e) => startResize(e, col.key), className: "th-column-resizer" })] }, col.key)))] }) }), _jsx("tbody", { children: renderTableBody() })] }) }), pagination && totalPages > 1 && (_jsxs("footer", { className: "cw-table-pagination", children: [_jsx("button", { onClick: () => handlePageChange(1), disabled: currentPage === 1 || totalPages === 1, className: "cw-button-icon cwi-chevron-left-double", title: "First" }), _jsx("button", { onClick: () => handlePageChange(currentPage - 1), disabled: currentPage === 1 || totalPages === 1, className: "cw-button-icon cwi-chevron-left", title: "Previous" }), _jsx("input", { type: "number", value: currentPage, onChange: (e) => {
|
|
190
|
+
const value = parseInt(e.target.value, 10);
|
|
191
|
+
if (!isNaN(value))
|
|
192
|
+
handlePageChange(value);
|
|
193
|
+
}, onBlur: (e) => {
|
|
194
|
+
const value = parseInt(e.target.value, 10);
|
|
195
|
+
if (isNaN(value) || value < 1 || value > totalPages) {
|
|
196
|
+
handlePageChange(1);
|
|
197
|
+
}
|
|
198
|
+
}, min: 1, max: totalPages, style: {
|
|
199
|
+
width: "4rem",
|
|
200
|
+
textAlign: "center",
|
|
201
|
+
marginRight: "0.5rem"
|
|
202
|
+
} }), "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, style: { marginLeft: "1rem" }, children: pageSizeOptions.map(size => (_jsxs("option", { value: size, children: [size, " / page"] }, size))) })] }))] }));
|
|
203
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CwIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/components/display/graphics/icon/CwIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"CwIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/components/display/graphics/icon/CwIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;AAGhD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAC1F,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,MAAM,CAAC,EAAE,aAAa,GAAG,QAAQ,CAAC;IAClC,qBAAqB;IACrB,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IACrD,oBAAoB;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;CAChD;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,2CAyBxC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Icon component that supports both FontAwesome 4 and cwellt icon font
|
|
4
|
+
* @example
|
|
5
|
+
* <CwIcon iconId="house" /> // Uses cwellt icon font
|
|
6
|
+
* <CwIcon iconId="house" source="fontawesome" /> // Uses FontAwesome
|
|
7
|
+
*/
|
|
8
|
+
export function CwIcon(props) {
|
|
9
|
+
const { iconId, source = 'cwellt', color, size, ...iconProps } = props;
|
|
10
|
+
const getClassName = (baseClass) => {
|
|
11
|
+
return [
|
|
12
|
+
baseClass,
|
|
13
|
+
color && `cw-color-${color}`,
|
|
14
|
+
size && `cw-font-size-${size}`
|
|
15
|
+
].filter(Boolean).join(' ');
|
|
16
|
+
};
|
|
17
|
+
// Return appropriate icon based on source
|
|
18
|
+
if (source === 'fontawesome') {
|
|
19
|
+
return _jsx("span", { ...iconProps, className: getClassName(`fa fa-${iconId}`) });
|
|
20
|
+
}
|
|
21
|
+
// Use custom icon font
|
|
22
|
+
return _jsx("span", { ...iconProps, className: getClassName(`cwi-icons cwi-${iconId}`) });
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg-icons.d.ts","sourceRoot":"","sources":["../../../../../../src/components/display/graphics/icon/svg-icons.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;CAyBZ,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,SAAS,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './cw-loading.css';
|
|
3
|
+
/**
|
|
4
|
+
* CwLoading
|
|
5
|
+
*
|
|
6
|
+
* A versatile loading component that shows a spinner with optional text
|
|
7
|
+
* and disables the wrapped content while in loading state.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // Basic usage
|
|
11
|
+
* <CwLoading isLoading={isSubmitting}>
|
|
12
|
+
* <form>...</form>
|
|
13
|
+
* </CwLoading>
|
|
14
|
+
*
|
|
15
|
+
* // With custom text and size
|
|
16
|
+
* <CwLoading
|
|
17
|
+
* isLoading={isLoading}
|
|
18
|
+
* text="Please wait..."
|
|
19
|
+
* size="large"
|
|
20
|
+
* >
|
|
21
|
+
* <UserProfile />
|
|
22
|
+
* </CwLoading>
|
|
23
|
+
*/
|
|
24
|
+
export function CwLoading({ isLoading = false, text = '', size = 'regular', iconPosition = 'outside', iconName = 'cwi-plane-solid', animation = 'spin', children }) {
|
|
25
|
+
const iconClasses = `cwi-icons ${iconName || ''}`;
|
|
26
|
+
return (_jsxs("div", { "aria-busy": isLoading, className: isLoading ? 'cw-loading-container' : '', "data-children": !!children, children: [isLoading && (_jsxs("div", { className: "cw-loading-content", "data-size": size, "data-animation": animation, children: [_jsx("div", { className: "cw-loading", "data-icon-position": iconPosition, children: _jsx("span", { className: iconClasses }) }), text && (_jsx("p", { children: text }))] })), _jsx("div", { className: isLoading ? 'cw-loading-disabled-content' : '', children: children })] }));
|
|
27
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated since may 2025. Use <CwLoading size="small"> instead.
|
|
4
|
+
*
|
|
5
|
+
* This component will be removed in a future release.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* // Instead of:
|
|
9
|
+
* <CwLoadingSmall />
|
|
10
|
+
*
|
|
11
|
+
* // Use:
|
|
12
|
+
* <CwLoading size="small" />
|
|
13
|
+
*/
|
|
14
|
+
export function CwLoadingSmall(CwelltLoadingAppointements) {
|
|
15
|
+
return (_jsx("div", { children: CwelltLoadingAppointements.isLoading === true ? (
|
|
16
|
+
// * Show loading appointment
|
|
17
|
+
_jsx("div", { className: "cw-loading-container", children: _jsx("div", { className: "cw-loading" }) })) : (
|
|
18
|
+
// Show empty div
|
|
19
|
+
_jsx("div", {})) }));
|
|
20
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function CwHeadingMain(props) {
|
|
3
|
+
const { children, ...headingProps } = props;
|
|
4
|
+
return (_jsx("div", { className: "cw-heading", children: _jsx("h2", { className: "cwHeading_desc", ...headingProps, children: children }) }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function CwHeadingSecond(props) {
|
|
3
|
+
const { children, ...headingProps } = props;
|
|
4
|
+
return (_jsx("div", { className: "cw-heading", children: _jsx("h3", { className: "cwHeading_desc", ...headingProps, children: children }) }));
|
|
5
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as CSS from "csstype";
|
|
2
2
|
import { HTMLProps, PropsWithChildren } from "react";
|
|
3
|
-
import { CwAlignProps } from "../../../../components/layout/align/CwAlign";
|
|
4
3
|
export interface CwLabelProps extends Omit<HTMLProps<PropsWithChildren<HTMLLabelElement>>, "className"> {
|
|
5
4
|
/** Text to display on the label; Same as props.children
|
|
6
5
|
* @example text="Name:" */
|
|
@@ -14,14 +13,12 @@ export interface CwLabelProps extends Omit<HTMLProps<PropsWithChildren<HTMLLabel
|
|
|
14
13
|
labelWidth?: CSS.Property.Width;
|
|
15
14
|
/** css height */
|
|
16
15
|
labelHeight?: CSS.Property.Height;
|
|
17
|
-
/** CwAlign properties */
|
|
18
|
-
alignProps?: CwAlignProps;
|
|
19
16
|
}
|
|
20
17
|
/**
|
|
21
18
|
* Label for form controls.
|
|
22
19
|
* @example
|
|
23
20
|
* ```tsx
|
|
24
|
-
* <
|
|
21
|
+
* <CwLabel justify="right" >Username:</CwLabel>
|
|
25
22
|
* ```
|
|
26
23
|
*/
|
|
27
24
|
export declare function CwLabel(props: CwLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CwLabel.d.ts","sourceRoot":"","sources":["../../../../../../src/components/display/text/label/CwLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CwLabel.d.ts","sourceRoot":"","sources":["../../../../../../src/components/display/text/label/CwLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,EAAE,WAAW,CAAC;IACtG;+BAC2B;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;gCAC4B;IAC5B,iBAAiB;IACjB,MAAM,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC;IACjC,iBAAiB;IACjB,UAAU,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC;IAChC,iBAAiB;IACjB,WAAW,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC;CAElC;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,2CAa1C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CwAlign } from "../../../../components/layout/align/CwAlign";
|
|
3
|
+
/**
|
|
4
|
+
* Label for form controls.
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <CwLabelForm justify="right" >Username:</CwLabelForm>
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
10
|
+
export function CwLabel(props) {
|
|
11
|
+
const { justify, text, labelHeight, labelWidth, alignProps, margin, ...labelProps } = props;
|
|
12
|
+
return (_jsx("span", { className: "cw-label", children: _jsx(CwAlign, { ...alignProps, children: _jsx("label", { style: { textAlign: justify, width: labelWidth, height: labelHeight, margin: margin ?? "1px 0 0 0" }, ...labelProps, children: labelProps.children ?? text }) }) }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { createRoot } from "react-dom/client"; // Import createRoot
|
|
4
|
+
import { CwIcon } from "../../../../components/display/graphics/icon/CwIcon";
|
|
5
|
+
import { CwAlign } from "../../../../components/layout/align/CwAlign";
|
|
6
|
+
export const CW_DEFAULT_MESSAGE_DURATION = 2000;
|
|
7
|
+
export var CwMessageType;
|
|
8
|
+
(function (CwMessageType) {
|
|
9
|
+
CwMessageType["ERROR"] = "close-circle";
|
|
10
|
+
CwMessageType["WARN"] = "warning";
|
|
11
|
+
CwMessageType["INFO"] = "info-bubble";
|
|
12
|
+
CwMessageType["SUCCESS"] = "check-circle";
|
|
13
|
+
})(CwMessageType || (CwMessageType = {}));
|
|
14
|
+
export const CwMessage = props => {
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const timer = setTimeout(() => {
|
|
17
|
+
props.onClose?.();
|
|
18
|
+
}, props.duration ?? CW_DEFAULT_MESSAGE_DURATION);
|
|
19
|
+
return () => clearTimeout(timer);
|
|
20
|
+
}, [props]);
|
|
21
|
+
return (_jsx("div", { className: "cw-message", "data-message-type": Object.keys(CwMessageType).find(key => CwMessageType[key] === props.messageType), children: _jsxs(CwAlign, { justifyContent: "center", alignItems: "center", children: [props.messageType && _jsx(CwIcon, { iconId: props.messageType.toString() }), props.message] }) }));
|
|
22
|
+
};
|
|
23
|
+
export const useCwMessage = () => {
|
|
24
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
25
|
+
const [message, setMessage] = useState("");
|
|
26
|
+
const [duration, setDuration] = useState();
|
|
27
|
+
const [type, setType] = useState();
|
|
28
|
+
const showMessage = (props) => {
|
|
29
|
+
setMessage(props.message);
|
|
30
|
+
setDuration(props.duration);
|
|
31
|
+
setType(props.messageType);
|
|
32
|
+
setIsVisible(true);
|
|
33
|
+
};
|
|
34
|
+
const closeMessage = () => {
|
|
35
|
+
setIsVisible(false);
|
|
36
|
+
};
|
|
37
|
+
const RenderMessage = isVisible ? (_jsx(CwMessage, { message: message, duration: duration, messageType: type, onClose: closeMessage })) : null;
|
|
38
|
+
return { showMessage, RenderMessage };
|
|
39
|
+
};
|
|
40
|
+
export class CwMessageManager {
|
|
41
|
+
static instance;
|
|
42
|
+
messageContainer = null;
|
|
43
|
+
root;
|
|
44
|
+
constructor() {
|
|
45
|
+
this.init();
|
|
46
|
+
}
|
|
47
|
+
static getInstance() {
|
|
48
|
+
if (!CwMessageManager.instance) {
|
|
49
|
+
CwMessageManager.instance = new CwMessageManager();
|
|
50
|
+
}
|
|
51
|
+
return CwMessageManager.instance;
|
|
52
|
+
}
|
|
53
|
+
init() {
|
|
54
|
+
this.messageContainer = document.createElement("div");
|
|
55
|
+
this.messageContainer.style.setProperty("position", "fixed");
|
|
56
|
+
this.messageContainer.style.setProperty("pointer-events", "none");
|
|
57
|
+
this.messageContainer.style.setProperty("width", "100%");
|
|
58
|
+
this.messageContainer.style.setProperty("top", "0");
|
|
59
|
+
this.messageContainer.style.setProperty("z-index", "999999");
|
|
60
|
+
document.body.prepend(this.messageContainer);
|
|
61
|
+
this.root = createRoot(this.messageContainer); // Create a root at the messageContainer
|
|
62
|
+
}
|
|
63
|
+
showMessage(message, type, duration) {
|
|
64
|
+
const msg = document.createElement("div");
|
|
65
|
+
this.messageContainer?.prepend(msg);
|
|
66
|
+
const msgRoot = createRoot(msg); // Create a root for the new message
|
|
67
|
+
msgRoot.render(_jsx(CwMessage, { message: message, messageType: type, duration: duration, onClose: () => this.closeMessage(msgRoot) }));
|
|
68
|
+
}
|
|
69
|
+
closeMessage(msgRoot) {
|
|
70
|
+
msgRoot.unmount(); // Unmount the message root
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export function CwDisplayMessage(message, type, duration) {
|
|
74
|
+
CwMessageManager.getInstance().showMessage(message, type, duration);
|
|
75
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import { getContrastColor } from '../../../../common/functions/colorManipulation';
|
|
4
|
+
import { CwIcon } from '../../graphics/icon/CwIcon';
|
|
5
|
+
import './cw-note.css';
|
|
6
|
+
/**
|
|
7
|
+
* CwNote - Inline note component for instructions and contextual content
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <CwNote content="Use the search box to filter results" color="neutral" icon="search" />
|
|
11
|
+
* <CwNote
|
|
12
|
+
* content="Failed to load data"
|
|
13
|
+
* variant="solid"
|
|
14
|
+
* color="danger"
|
|
15
|
+
* icon="warning"
|
|
16
|
+
* onDismiss={() => console.log('dismissed')}
|
|
17
|
+
* />
|
|
18
|
+
* <CwNote variant="outline" color="success" icon="check">
|
|
19
|
+
* <p>Step 1: Configure your project settings</p>
|
|
20
|
+
* <p>Step 2: Validate configuration before proceeding</p>
|
|
21
|
+
* </CwNote>
|
|
22
|
+
* <CwNote className="custom-class" icon="lightbulb">
|
|
23
|
+
* <strong>Important information here</strong>
|
|
24
|
+
* </CwNote>
|
|
25
|
+
*/
|
|
26
|
+
export const CwNote = ({ content, variant = 'soft', color = 'primary', customColor, fontSize = 'regular', icon, dismissible = false, autoCloseSeconds, className = '', style = {}, children, }) => {
|
|
27
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
28
|
+
// Auto-close functionality
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (autoCloseSeconds && autoCloseSeconds > 0) {
|
|
31
|
+
const timer = setTimeout(() => {
|
|
32
|
+
setIsVisible(false);
|
|
33
|
+
}, autoCloseSeconds * 1000);
|
|
34
|
+
return () => clearTimeout(timer);
|
|
35
|
+
}
|
|
36
|
+
return undefined;
|
|
37
|
+
}, [autoCloseSeconds]);
|
|
38
|
+
// Handle manual dismiss
|
|
39
|
+
const handleDismiss = (e) => {
|
|
40
|
+
e.stopPropagation();
|
|
41
|
+
setIsVisible(false);
|
|
42
|
+
};
|
|
43
|
+
// Calculate styles for custom color
|
|
44
|
+
const messageStyle = React.useMemo(() => {
|
|
45
|
+
if (customColor) {
|
|
46
|
+
if (variant === 'outline') {
|
|
47
|
+
// For outline, customColor is used for border and text
|
|
48
|
+
return {
|
|
49
|
+
color: customColor,
|
|
50
|
+
borderColor: customColor,
|
|
51
|
+
...style
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
// For soft/solid, customColor is used for background and we calculate contrast
|
|
56
|
+
return {
|
|
57
|
+
backgroundColor: customColor,
|
|
58
|
+
color: getContrastColor(customColor),
|
|
59
|
+
...style
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return style;
|
|
64
|
+
}, [customColor, variant, style]);
|
|
65
|
+
// Build CSS classes
|
|
66
|
+
let noteClass = `cw-note cw-note-${fontSize}`;
|
|
67
|
+
if (dismissible) {
|
|
68
|
+
noteClass += ' cw-note-dismissible';
|
|
69
|
+
}
|
|
70
|
+
if (className) {
|
|
71
|
+
noteClass += ` ${className}`;
|
|
72
|
+
}
|
|
73
|
+
// Don't render if not visible
|
|
74
|
+
if (!isVisible) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return (_jsxs("div", { className: noteClass, "data-color": customColor ? undefined : color, "data-variant": variant, style: messageStyle, children: [icon && _jsx(CwIcon, { iconId: icon }), _jsx("div", { className: "cw-note-content", children: children ?? content }), dismissible && (_jsx("button", { className: "cw-note-dismiss-button", onClick: handleDismiss, "aria-label": "Dismiss note", type: "button", children: _jsx(CwIcon, { iconId: "close" }) }))] }));
|
|
78
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CwChip.d.ts","sourceRoot":"","sources":["../../../../../../src/components/display/text/tag/CwChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,eAAe,CAAC;AAEvB,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/F,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC3B,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC5B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"CwChip.d.ts","sourceRoot":"","sources":["../../../../../../src/components/display/text/tag/CwChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,eAAe,CAAC;AAEvB,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/F,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEvD,MAAM,WAAW,WAAW;IAC3B,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mCAAmC;IACnC,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sBAAsB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC5B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAiExC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { getContrastColor } from '../../../../common/functions/colorManipulation';
|
|
4
|
+
import { CwIcon } from '../../graphics/icon/CwIcon';
|
|
5
|
+
import './cw-chip.css';
|
|
6
|
+
/**
|
|
7
|
+
* CwChip - A simple chip/tag component for displaying labels or categories
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <CwChip label="Active" colorScheme="success" />
|
|
11
|
+
* <CwChip label="High Priority" colorScheme="danger" variant="solid" />
|
|
12
|
+
* <CwChip label="Custom" colorScheme="custom" customColor="#8a2be2" />
|
|
13
|
+
* <CwChip label="Outlined" colorScheme="info" variant="outline" />
|
|
14
|
+
* <CwChip label="Removable" closable onClose={() => console.log('closed')} />
|
|
15
|
+
**/
|
|
16
|
+
export const CwChip = ({ label, colorScheme = 'info', customColor, variant = 'soft', className = '', closable = false, onClose, icon, style = {}, }) => {
|
|
17
|
+
// Basic validation
|
|
18
|
+
if (closable && !onClose) {
|
|
19
|
+
console.warn('CwChip: onClose prop is required when closable is true');
|
|
20
|
+
}
|
|
21
|
+
// Calculate styles based on colorScheme, customColor and variant
|
|
22
|
+
const chipStyle = React.useMemo(() => {
|
|
23
|
+
if (customColor) {
|
|
24
|
+
if (variant === 'outline') {
|
|
25
|
+
// For outline, customColor is used for border and text
|
|
26
|
+
return {
|
|
27
|
+
color: customColor,
|
|
28
|
+
borderColor: customColor,
|
|
29
|
+
...style
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
// For soft/solid, customColor is used for background and we calculate contrast
|
|
34
|
+
return {
|
|
35
|
+
backgroundColor: customColor,
|
|
36
|
+
color: getContrastColor(customColor),
|
|
37
|
+
...style
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return style;
|
|
42
|
+
}, [colorScheme, customColor, variant, style]);
|
|
43
|
+
// Handle click on close icon
|
|
44
|
+
const handleClose = (e) => {
|
|
45
|
+
e.stopPropagation();
|
|
46
|
+
if (onClose) {
|
|
47
|
+
onClose();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
// CSS classes
|
|
51
|
+
const chipClassNames = [
|
|
52
|
+
'cw-chip',
|
|
53
|
+
className,
|
|
54
|
+
closable ? 'cw-chip-closable' : '',
|
|
55
|
+
].filter(Boolean).join(' ');
|
|
56
|
+
return (_jsxs("span", { className: chipClassNames, "data-color-scheme": colorScheme, "data-variant": variant, style: chipStyle, children: [icon && _jsx(CwIcon, { iconId: icon }), label, closable && (_jsx("button", { className: "cw-chip-close-button", onClick: handleClose, "aria-label": "Remove", type: "button", children: _jsx("span", { className: "cwi-icons cwi-close" }) }))] }));
|
|
57
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CwIcon } from "../../graphics/icon/CwIcon";
|
|
3
|
+
export function CwTag(tagProps) {
|
|
4
|
+
const hideTag = (event_clickTag) => {
|
|
5
|
+
const tag = event_clickTag.currentTarget.parentElement;
|
|
6
|
+
tag?.classList.add("tag-hidden");
|
|
7
|
+
};
|
|
8
|
+
const onClickClosableCustomTag = (event_clickClosableT) => {
|
|
9
|
+
hideTag(event_clickClosableT);
|
|
10
|
+
if (tagProps.onClickClosableTag != undefined) {
|
|
11
|
+
tagProps.onClickClosableTag(event_clickClosableT);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const onClickCustomTag = (event_clickTag) => {
|
|
15
|
+
// click option interface
|
|
16
|
+
if (tagProps.onClickTag !== undefined) {
|
|
17
|
+
tagProps.onClickTag(event_clickTag);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
return (_jsxs("div", { className: "cw-tag", style: tagProps.styleTag, onClick: event_clickTag => onClickCustomTag(event_clickTag), id: tagProps.idTag, ref: tagProps.ref, children: [_jsx("strong", { style: tagProps.styleTag_description, children: tagProps.children }), tagProps.closableTag && (_jsx(CwIcon, { iconId: "close", onClick: event_clickClosableT => onClickClosableCustomTag(event_clickClosableT) }))] }));
|
|
21
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function CwTooltip(CwelltTooltipProps) {
|
|
3
|
+
return (_jsxs("div", { className: "cwelltTooltip", children: [_jsx("div", { className: "cwelltTooltipTitle", style: CwelltTooltipProps.tooltipTitleStyle, children: _jsx("span", { children: CwelltTooltipProps.tooltipTitle }) }), CwelltTooltipProps.children] }));
|
|
4
|
+
}
|