@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.
Files changed (584) hide show
  1. package/dist/index.cjs.js +1314 -316
  2. package/dist/index.css +2 -2
  3. package/dist/index.d.ts +235 -6
  4. package/dist/index.es.js +1310 -316
  5. package/dist/src/common/classes/CwSelectList.js +12 -0
  6. package/dist/src/common/classes/CwSelectListItems.js +14 -0
  7. package/dist/src/common/functions/collections.js +18 -0
  8. package/dist/src/common/functions/colorManipulation.js +76 -0
  9. package/dist/src/common/functions/dsl/UiEventDSL.js +20 -0
  10. package/dist/src/common/functions/useSingleAndDoubleClicks.js +28 -0
  11. package/dist/src/components/control/action/button/CwButton.js +13 -0
  12. package/dist/src/components/control/action/buttons/CwButtons.js +188 -0
  13. package/dist/src/components/control/action/contextmenu/CwContextMenu.js +43 -0
  14. package/dist/src/components/control/action/contextual-menu/CwContextualMenu.js +55 -0
  15. package/dist/src/components/control/action/search/CwSearch.js +67 -0
  16. package/dist/src/components/control/action/tooltip-dialog/CwTooltipDialog.js +11 -0
  17. package/dist/src/components/control/choice/checkbox/CwCheckbox.js +15 -0
  18. package/dist/src/components/control/choice/deprecated/MultiSelect_deprecated_.js +99 -0
  19. package/dist/src/components/control/choice/dropdown/CwDropdown.js +27 -0
  20. package/dist/src/components/control/choice/dropdown/CwDropdownContainer.js +30 -0
  21. package/dist/src/components/control/choice/dropdown/CwDropdownFilter.js +10 -0
  22. package/dist/src/components/control/choice/multi-filter/CwMultiFilter.js +298 -0
  23. package/dist/src/components/control/choice/multi-filter/components/tag/CwMultiFilterTag.js +17 -0
  24. package/dist/src/components/control/choice/multiselect/CwHeadFilter.js +80 -0
  25. package/dist/src/components/control/choice/multiselect/CwMultiselect.js +393 -0
  26. package/dist/src/components/control/choice/multiselect/CwOptionList.js +36 -0
  27. package/dist/src/components/control/choice/option/CwOption.js +16 -0
  28. package/dist/src/components/control/choice/select/CwSelect.js +36 -0
  29. package/dist/src/components/control/choice/toggle/CwToggle.js +9 -0
  30. package/dist/src/components/control/input/any/CwInput.js +16 -0
  31. package/dist/src/components/control/input/color/CwColorPicker.js +210 -0
  32. package/dist/src/components/control/input/color/CwInputColor.js +142 -0
  33. package/dist/src/components/control/input/date/CwInputDate.js +29 -0
  34. package/dist/src/components/control/input/date-picker/CwInputDatePicker.js +109 -0
  35. package/dist/src/components/control/input/date-text/CwInputDateText.js +90 -0
  36. package/dist/src/components/control/input/datetime/CwInputDatetime.js +29 -0
  37. package/dist/src/components/control/input/digit/CwDigit.js +28 -0
  38. package/dist/src/components/control/input/file/CwFileUpload.js +52 -0
  39. package/dist/src/components/control/input/file/CwFileUploadMultiple.js +148 -0
  40. package/dist/src/components/control/input/image/CwInputImage.js +52 -0
  41. package/dist/src/components/control/input/image-area/CwImageArea.js +113 -0
  42. package/dist/src/components/control/input/new-dates/CwDatePicker.d.ts +42 -0
  43. package/dist/src/components/control/input/new-dates/CwDatePicker.d.ts.map +1 -0
  44. package/dist/src/components/control/input/new-dates/CwDateRangePicker.d.ts +63 -0
  45. package/dist/src/components/control/input/new-dates/CwDateRangePicker.d.ts.map +1 -0
  46. package/dist/src/components/control/input/new-dates/CwDateTimePicker.d.ts +47 -0
  47. package/dist/src/components/control/input/new-dates/CwDateTimePicker.d.ts.map +1 -0
  48. package/dist/src/components/control/input/new-dates/CwDateTimePickerCompact.d.ts +46 -0
  49. package/dist/src/components/control/input/new-dates/CwDateTimePickerCompact.d.ts.map +1 -0
  50. package/dist/src/components/control/input/new-dates/CwTimePicker.d.ts +38 -0
  51. package/dist/src/components/control/input/new-dates/CwTimePicker.d.ts.map +1 -0
  52. package/dist/src/components/control/input/new-dates/dateRangePresets.d.ts +19 -0
  53. package/dist/src/components/control/input/new-dates/dateRangePresets.d.ts.map +1 -0
  54. package/dist/src/components/control/input/number/CwInputNumber.js +11 -0
  55. package/dist/src/components/control/input/phone/CwInputPhone.js +24 -0
  56. package/dist/src/components/control/input/text/CwInputText.js +31 -0
  57. package/dist/src/components/control/input/text-area/CwTextArea.js +9 -0
  58. package/dist/src/components/control/input/time/CwTime.js +29 -0
  59. package/dist/src/components/control/input/weekday/CwWeekdaySelector.js +143 -0
  60. package/dist/src/components/custom/find-airport/CwFindAirportComp.js +240 -0
  61. package/dist/src/components/custom/scheduler/CwSchedulerComp.js +211 -0
  62. package/dist/src/components/custom/scheduler/CwSuperSchedulerComp.js +269 -0
  63. package/dist/src/components/custom/scheduler/components/EventRender.js +142 -0
  64. package/dist/src/components/custom/scheduler/components/ResourceListRender.js +12 -0
  65. package/dist/src/components/custom/scheduler/components/ResourceRender.js +26 -0
  66. package/dist/src/components/custom/scheduler/components/day_headers/DayHeader.js +13 -0
  67. package/dist/src/components/custom/scheduler/components/day_headers/MonthHeader.js +12 -0
  68. package/dist/src/components/custom/scheduler/components/day_headers/MyDaysHeader.js +62 -0
  69. package/dist/src/components/custom/scheduler/components/day_headers/WeekHeader.js +13 -0
  70. package/dist/src/components/custom/scheduler/components/resources_title_list/ResourcesTitleList.js +24 -0
  71. package/dist/src/components/custom/scheduler/components/scheduler_content_area/SchedulerContentArea.js +17 -0
  72. package/dist/src/components/custom/scheduler/components/scheduler_header/SchedulerHeader.js +26 -0
  73. package/dist/src/components/custom/scheduler/components/scheduler_timeline/SchedulerTimeLine.js +23 -0
  74. package/dist/src/components/custom/scheduler/components/time_headers/TimeHeader.js +31 -0
  75. package/dist/src/components/custom/scheduler/components/time_headers/TimeHeaderRow.js +16 -0
  76. package/dist/src/components/custom/scheduler/components/time_line/TimeLine.js +12 -0
  77. package/dist/src/components/custom/scheduler/logic/dates/addMinutesToDateFromPx.js +5 -0
  78. package/dist/src/components/custom/scheduler/logic/dates/daysBetweenTwoDates.js +15 -0
  79. package/dist/src/components/custom/scheduler/logic/dates/daysBetweenTwoDatesWithoutCeil.js +5 -0
  80. package/dist/src/components/custom/scheduler/logic/dates/getFormatedTimeForHeader.js +43 -0
  81. package/dist/src/components/custom/scheduler/logic/dates/getMonthHeaderData.js +35 -0
  82. package/dist/src/components/custom/scheduler/logic/dates/getUtcToday.js +6 -0
  83. package/dist/src/components/custom/scheduler/logic/dates/getWeekHeaderDataFromWeekRange.js +20 -0
  84. package/dist/src/components/custom/scheduler/logic/dates/listOfDatesToWeeks.js +55 -0
  85. package/dist/src/components/custom/scheduler/logic/divisions/calculateDivisionType.js +13 -0
  86. package/dist/src/components/custom/scheduler/logic/divisions/calculateDivisions.js +16 -0
  87. package/dist/src/components/custom/scheduler/logic/filtering/filterEvents.js +33 -0
  88. package/dist/src/components/custom/scheduler/logic/filtering/filterResources.js +14 -0
  89. package/dist/src/components/custom/scheduler/logic/filtering/hasSameProperties.js +10 -0
  90. package/dist/src/components/custom/scheduler/logic/onDrop/OnDrop.js +45 -0
  91. package/dist/src/components/custom/scheduler/logic/pixels/getHeightLineScheduler.js +14 -0
  92. package/dist/src/components/custom/scheduler/logic/pixels/getPixelsForEvent.js +32 -0
  93. package/dist/src/components/custom/scheduler/logic/pixels/heightScheduler.js +14 -0
  94. package/dist/src/components/custom/scheduler/logic/pixels/heightSchedulerPinned.js +9 -0
  95. package/dist/src/components/custom/scheduler/logic/state_handle/doubleClickOnResource.js +5 -0
  96. package/dist/src/components/custom/scheduler/logic/state_handle/handleResourceChange.js +11 -0
  97. package/dist/src/components/custom/scheduler/logic/state_handle/onDragOver.js +9 -0
  98. package/dist/src/components/custom/scheduler/logic/state_handle/onDropEventToResource.js +3 -0
  99. package/dist/src/components/custom/scheduler/logic/strings/compareStrings.js +7 -0
  100. package/dist/src/components/custom/scheduler/logic/strings/getGUID.js +7 -0
  101. package/dist/src/components/custom/scheduler/logic/ui/checkIfSlotAvailable.js +8 -0
  102. package/dist/src/components/custom/scheduler/logic/ui/getEventsOfResource.js +45 -0
  103. package/dist/src/components/custom/scheduler/logic/ui/getTimeHeaders.js +35 -0
  104. package/dist/src/components/custom/scheduler/logic/ui/isAllowedToMove.js +19 -0
  105. package/dist/src/components/custom/scheduler/logic/ui/updateResourceVisibility.js +15 -0
  106. package/dist/src/components/custom/scheduler/state/CblDragAndDrop.js +18 -0
  107. package/dist/src/components/custom/scheduler/state/CwSchedulerProps.js +1 -0
  108. package/dist/src/components/custom/scheduler/state/Resource.js +18 -0
  109. package/dist/src/components/custom/scheduler/state/State.js +1 -0
  110. package/dist/src/components/custom/scheduler/state/cblEvent.js +28 -0
  111. package/dist/src/components/custom/scheduler/state/cblEventCompProps.js +1 -0
  112. package/dist/src/components/custom/scheduler/state/resourceCompProps2.js +1 -0
  113. package/dist/src/components/custom/scheduler-new/presentation/NewScheduler.js +123 -0
  114. package/dist/src/components/custom/scheduler-new/presentation/NewSchedulerUiEvents.d.ts +2 -1
  115. package/dist/src/components/custom/scheduler-new/presentation/NewSchedulerUiEvents.d.ts.map +1 -1
  116. package/dist/src/components/custom/scheduler-new/presentation/NewSchedulerUiEvents.js +118 -0
  117. package/dist/src/components/custom/scheduler-new/presentation/SchedulerPresenter.js +166 -0
  118. package/dist/src/components/custom/scheduler-new/presentation/components/header/HeaderDivision.js +26 -0
  119. package/dist/src/components/custom/scheduler-new/presentation/components/header/HeaderTitle.js +8 -0
  120. package/dist/src/components/custom/scheduler-new/presentation/components/header/SchedulerHeader.js +86 -0
  121. package/dist/src/components/custom/scheduler-new/presentation/components/row/BackgroundEvent.js +60 -0
  122. package/dist/src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.js +24 -0
  123. package/dist/src/components/custom/scheduler-new/presentation/components/row/Event.js +150 -0
  124. package/dist/src/components/custom/scheduler-new/presentation/components/row/EventSideDrag.js +11 -0
  125. package/dist/src/components/custom/scheduler-new/presentation/components/row/SchedulerRow.js +176 -0
  126. package/dist/src/components/custom/scheduler-new/presentation/components/timeline/DivisionLine.js +8 -0
  127. package/dist/src/components/custom/scheduler-new/presentation/components/timeline/TimeLine.js +39 -0
  128. package/dist/src/components/custom/scheduler-new/presentation/components/timeline/WeekEndLine.js +8 -0
  129. package/dist/src/components/custom/scheduler-new/presentation/helpers.js +43 -0
  130. package/dist/src/components/custom/scheduler-new/presentation/logic/WeekendCalc.js +24 -0
  131. package/dist/src/components/custom/scheduler-new/presentation/logic/dateFromPercentage.js +7 -0
  132. package/dist/src/components/custom/scheduler-new/presentation/logic/eventIsVisible.js +7 -0
  133. package/dist/src/components/custom/scheduler-new/presentation/logic/getDefaultDivisions.js +113 -0
  134. package/dist/src/components/custom/scheduler-new/presentation/logic/getDivisions.js +21 -0
  135. package/dist/src/components/custom/scheduler-new/presentation/logic/getEventSizes.js +30 -0
  136. package/dist/src/components/custom/scheduler-new/presentation/logic/getLinesByDivisions.js +13 -0
  137. package/dist/src/components/custom/scheduler-new/presentation/logic/getPercentageFromMouseEvent.js +7 -0
  138. package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsToInnerRows.js +32 -0
  139. package/dist/src/components/custom/scheduler-new/presentation/logic/sortByCategoryAndTitle.js +12 -0
  140. package/dist/src/components/custom/scheduler-temporal/CwSchedulerComp2.js +267 -0
  141. package/dist/src/components/custom/scheduler-temporal/CwSuperSchedulerComp.js +269 -0
  142. package/dist/src/components/custom/scheduler-temporal/components/EventRender.js +142 -0
  143. package/dist/src/components/custom/scheduler-temporal/components/ResourceListRender.js +12 -0
  144. package/dist/src/components/custom/scheduler-temporal/components/ResourceRender.js +26 -0
  145. package/dist/src/components/custom/scheduler-temporal/components/day_headers/DayHeader.js +13 -0
  146. package/dist/src/components/custom/scheduler-temporal/components/day_headers/MonthHeader.js +12 -0
  147. package/dist/src/components/custom/scheduler-temporal/components/day_headers/MyDaysHeader.js +62 -0
  148. package/dist/src/components/custom/scheduler-temporal/components/day_headers/WeekHeader.js +13 -0
  149. package/dist/src/components/custom/scheduler-temporal/components/resources_title_list/ResourcesTitleList.js +22 -0
  150. package/dist/src/components/custom/scheduler-temporal/components/scheduler_content_area/SchedulerContentArea.js +17 -0
  151. package/dist/src/components/custom/scheduler-temporal/components/scheduler_header/SchedulerHeader.js +26 -0
  152. package/dist/src/components/custom/scheduler-temporal/components/scheduler_timeline/SchedulerTimeLine.js +23 -0
  153. package/dist/src/components/custom/scheduler-temporal/components/time_headers/TimeHeader.js +31 -0
  154. package/dist/src/components/custom/scheduler-temporal/components/time_headers/TimeHeaderRow.js +16 -0
  155. package/dist/src/components/custom/scheduler-temporal/components/time_line/TimeLine.js +12 -0
  156. package/dist/src/components/custom/scheduler-temporal/logic/dates/addMinutesToDateFromPx.js +5 -0
  157. package/dist/src/components/custom/scheduler-temporal/logic/dates/daysBetweenTwoDates.js +15 -0
  158. package/dist/src/components/custom/scheduler-temporal/logic/dates/daysBetweenTwoDatesWithoutCeil.js +5 -0
  159. package/dist/src/components/custom/scheduler-temporal/logic/dates/getFormatedTimeForHeader.js +43 -0
  160. package/dist/src/components/custom/scheduler-temporal/logic/dates/getMonthHeaderData.js +35 -0
  161. package/dist/src/components/custom/scheduler-temporal/logic/dates/getUtcToday.js +6 -0
  162. package/dist/src/components/custom/scheduler-temporal/logic/dates/getWeekHeaderDataFromWeekRange.js +20 -0
  163. package/dist/src/components/custom/scheduler-temporal/logic/dates/listOfDatesToWeeks.js +55 -0
  164. package/dist/src/components/custom/scheduler-temporal/logic/divisions/calculateDivisionType.js +13 -0
  165. package/dist/src/components/custom/scheduler-temporal/logic/divisions/calculateDivisions.js +16 -0
  166. package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterAndProcessResources.js +10 -0
  167. package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterEvents.js +34 -0
  168. package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterResources.js +14 -0
  169. package/dist/src/components/custom/scheduler-temporal/logic/filtering/hasSameProperties.js +10 -0
  170. package/dist/src/components/custom/scheduler-temporal/logic/onDrop/OnDrop.js +36 -0
  171. package/dist/src/components/custom/scheduler-temporal/logic/pixels/getHeightLineScheduler.js +14 -0
  172. package/dist/src/components/custom/scheduler-temporal/logic/pixels/getPixelsForEvent.js +32 -0
  173. package/dist/src/components/custom/scheduler-temporal/logic/pixels/heightScheduler.js +14 -0
  174. package/dist/src/components/custom/scheduler-temporal/logic/pixels/heightSchedulerPinned.js +9 -0
  175. package/dist/src/components/custom/scheduler-temporal/logic/state_handle/doubleClickOnResource.js +5 -0
  176. package/dist/src/components/custom/scheduler-temporal/logic/state_handle/handlePropChanges.js +178 -0
  177. package/dist/src/components/custom/scheduler-temporal/logic/state_handle/handleResourceChange.js +11 -0
  178. package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onDragOver.js +9 -0
  179. package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onDropEventToResource.js +3 -0
  180. package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onResizeEvent.js +3 -0
  181. package/dist/src/components/custom/scheduler-temporal/logic/strings/compareStrings.js +7 -0
  182. package/dist/src/components/custom/scheduler-temporal/logic/strings/getGUID.js +7 -0
  183. package/dist/src/components/custom/scheduler-temporal/logic/ui/checkIfSlotAvailable.js +9 -0
  184. package/dist/src/components/custom/scheduler-temporal/logic/ui/getEventsOfResource.js +92 -0
  185. package/dist/src/components/custom/scheduler-temporal/logic/ui/getHasPropsChanged.js +242 -0
  186. package/dist/src/components/custom/scheduler-temporal/logic/ui/getTimeHeaders.js +35 -0
  187. package/dist/src/components/custom/scheduler-temporal/logic/ui/isAllowedToMove.js +19 -0
  188. package/dist/src/components/custom/scheduler-temporal/logic/ui/shouldTriggerScroll.js +241 -0
  189. package/dist/src/components/custom/scheduler-temporal/logic/ui/updateResourceVisibility.js +15 -0
  190. package/dist/src/components/custom/scheduler-temporal/state/CblDragAndDrop.js +18 -0
  191. package/dist/src/components/custom/scheduler-temporal/state/Resource.js +18 -0
  192. package/dist/src/components/custom/scheduler-temporal/state/cblEvent.js +28 -0
  193. package/dist/src/components/custom/scheduler-temporal/state/cblEventCompProps.js +1 -0
  194. package/dist/src/components/custom/scheduler-temporal/state/resourceCompProps2.js +1 -0
  195. package/dist/src/components/custom/super-scheduler/PinRowHeader.d.ts.map +1 -1
  196. package/dist/src/components/custom/super-scheduler/PinRowHeader.js +53 -0
  197. package/dist/src/components/custom/super-scheduler/SuperScheduler.js +23 -0
  198. package/dist/src/components/custom/super-scheduler/SuperSchedulerEvents.js +15 -0
  199. package/dist/src/components/custom/super-scheduler/SuperSchedulerPresenter.js +45 -0
  200. package/dist/src/components/display/data/accordion/CwAccordionContainer.js +20 -0
  201. package/dist/src/components/display/data/generic_tooltip/CwGenericTooltip.js +138 -0
  202. package/dist/src/components/display/data/table/CwTable.d.ts.map +1 -1
  203. package/dist/src/components/display/data/table/CwTable.js +203 -0
  204. package/dist/src/components/display/graphics/icon/CwIcon.js +23 -0
  205. package/dist/src/components/display/graphics/loading/CwLoading.js +27 -0
  206. package/dist/src/components/display/graphics/loading-small/CwLoadingSmall.js +20 -0
  207. package/dist/src/components/display/text/heading/CwHeadingMain.js +5 -0
  208. package/dist/src/components/display/text/heading/CwHeadingSecond.js +5 -0
  209. package/dist/src/components/display/text/label/CwLabel.js +13 -0
  210. package/dist/src/components/display/text/message/CwMessage.js +75 -0
  211. package/dist/src/components/display/text/note/CwNote.js +78 -0
  212. package/dist/src/components/display/text/tag/CwChip.js +57 -0
  213. package/dist/src/components/display/text/tag/CwTag.js +21 -0
  214. package/dist/src/components/display/text/tooltip/CwTooltip.js +4 -0
  215. package/dist/src/components/layout/align/CwAlign.js +54 -0
  216. package/dist/src/components/layout/card/CwCard.js +55 -0
  217. package/dist/src/components/layout/card/CwCardList.js +38 -0
  218. package/dist/src/components/layout/dialog/CwDialog.js +255 -0
  219. package/dist/src/components/layout/dialog/CwDialogManager.js +44 -0
  220. package/dist/src/components/layout/list/details/CwExpandable.js +28 -0
  221. package/dist/src/components/layout/list/key-value/CwKeyValueList.d.ts +2 -3
  222. package/dist/src/components/layout/list/key-value/CwKeyValueList.d.ts.map +1 -1
  223. package/dist/src/components/layout/list/key-value/CwKeyValueList.js +23 -0
  224. package/dist/src/components/layout/list/sortable/CwSortableList.js +73 -0
  225. package/dist/src/components/layout/list/sortable/useSortableList.js +53 -0
  226. package/dist/src/components/layout/modal/CwModalReportFunctional.js +23 -0
  227. package/dist/src/components/layout/modal/hover/CwModalHover.js +61 -0
  228. package/dist/src/components/layout/modal/legacy/cw_modal.js +44 -0
  229. package/dist/src/components/layout/modal/legacy/cw_modal_confirm.js +39 -0
  230. package/dist/src/components/layout/modal/legacy/cw_modal_iframe.js +44 -0
  231. package/dist/src/components/layout/modal/legacy/cw_modal_report.js +26 -0
  232. package/dist/src/components/layout/table/grouped/CwTableGrouped.js +70 -0
  233. package/dist/src/components/layout/tabs/CwTabs.js +53 -0
  234. package/dist/src/dev/palette.d.ts +1 -1
  235. package/dist/src/dev/palette.d.ts.map +1 -1
  236. package/dist/src/index.d.ts +6 -1
  237. package/dist/src/index.d.ts.map +1 -1
  238. package/dist/src/index.js +187 -0
  239. package/dist/test/components/custom/new-scheduler/presentation/logic/getDefaultDivisions.test.js +48 -0
  240. package/dist/test/components/custom/new-scheduler/presentation/logic/hoursBetween.test.js +15 -0
  241. package/dist/test/components/custom/new-scheduler/presentation/logic/monthDivisions.test.js +42 -0
  242. package/dist/test/components/custom/new-scheduler/presentation/logic/weekendCalc.test.js +30 -0
  243. package/dist/test/components/custom/scheduler/addMinutesToDateFromPx.test.js +43 -0
  244. package/dist/test/components/custom/scheduler/checkIfSlotAvailable.test.js +30 -0
  245. package/dist/test/components/custom/scheduler/daysBetweenTwoDates.test.js +61 -0
  246. package/dist/test/components/custom/scheduler/daysBetweenTwoDatesWithoutCeilForEvent.test.js +27 -0
  247. package/dist/test/components/custom/scheduler/getGUID.test.js +30 -0
  248. package/dist/test/components/custom/scheduler/getPixelsForEvent.test.js +38 -0
  249. package/dist/test/components/custom/scheduler/getTimeHeaders.test.js +35 -0
  250. package/dist/test/components/custom/scheduler/hasSameProperties.test.js +51 -0
  251. package/dist/test/components/custom/scheduler/isAllowedToMove.test.js +28 -0
  252. package/dist/test/components/custom/scheduler/listOfDatesToWeeks.test.js +72 -0
  253. package/dist/test/jest.setup.js +1 -0
  254. package/package.json +6 -2
  255. package/dist/assets/asset-DnHaq7m- +0 -50
  256. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-full-normal.woff2 +0 -0
  257. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-grad-normal.woff2 +0 -0
  258. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-opsz-normal.woff2 +0 -0
  259. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-slnt-normal.woff2 +0 -0
  260. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-standard-normal.woff2 +0 -0
  261. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-wdth-normal.woff2 +0 -0
  262. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-wght-normal.woff2 +0 -0
  263. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-xopq-normal.woff2 +0 -0
  264. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-xtra-normal.woff2 +0 -0
  265. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-yopq-normal.woff2 +0 -0
  266. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytas-normal.woff2 +0 -0
  267. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytde-normal.woff2 +0 -0
  268. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytfi-normal.woff2 +0 -0
  269. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytlc-normal.woff2 +0 -0
  270. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ext-ytuc-normal.woff2 +0 -0
  271. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-full-normal.woff2 +0 -0
  272. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-grad-normal.woff2 +0 -0
  273. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-opsz-normal.woff2 +0 -0
  274. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-slnt-normal.woff2 +0 -0
  275. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-standard-normal.woff2 +0 -0
  276. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-wdth-normal.woff2 +0 -0
  277. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-wght-normal.woff2 +0 -0
  278. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-xopq-normal.woff2 +0 -0
  279. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-xtra-normal.woff2 +0 -0
  280. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-yopq-normal.woff2 +0 -0
  281. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytas-normal.woff2 +0 -0
  282. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytde-normal.woff2 +0 -0
  283. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytfi-normal.woff2 +0 -0
  284. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytlc-normal.woff2 +0 -0
  285. package/dist/content/fonts/roboto-flex/files/roboto-flex-cyrillic-ytuc-normal.woff2 +0 -0
  286. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-full-normal.woff2 +0 -0
  287. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-grad-normal.woff2 +0 -0
  288. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-opsz-normal.woff2 +0 -0
  289. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-slnt-normal.woff2 +0 -0
  290. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-standard-normal.woff2 +0 -0
  291. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-wdth-normal.woff2 +0 -0
  292. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-wght-normal.woff2 +0 -0
  293. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-xopq-normal.woff2 +0 -0
  294. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-xtra-normal.woff2 +0 -0
  295. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-yopq-normal.woff2 +0 -0
  296. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytas-normal.woff2 +0 -0
  297. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytde-normal.woff2 +0 -0
  298. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytfi-normal.woff2 +0 -0
  299. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytlc-normal.woff2 +0 -0
  300. package/dist/content/fonts/roboto-flex/files/roboto-flex-greek-ytuc-normal.woff2 +0 -0
  301. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-full-normal.woff2 +0 -0
  302. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-grad-normal.woff2 +0 -0
  303. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-opsz-normal.woff2 +0 -0
  304. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-slnt-normal.woff2 +0 -0
  305. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-standard-normal.woff2 +0 -0
  306. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-wdth-normal.woff2 +0 -0
  307. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-wght-normal.woff2 +0 -0
  308. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-xopq-normal.woff2 +0 -0
  309. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-xtra-normal.woff2 +0 -0
  310. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-yopq-normal.woff2 +0 -0
  311. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytas-normal.woff2 +0 -0
  312. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytde-normal.woff2 +0 -0
  313. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytfi-normal.woff2 +0 -0
  314. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytlc-normal.woff2 +0 -0
  315. package/dist/content/fonts/roboto-flex/files/roboto-flex-vietnamese-ytuc-normal.woff2 +0 -0
  316. package/dist/content/icons/cw-icons/css/cw-icons.css +0 -2784
  317. package/dist/content/icons/cw-icons/fonts/cwAvinodeFont/CblAvinodeIcon.eot +0 -0
  318. package/dist/content/icons/cw-icons/fonts/cwAvinodeFont/CblAvinodeIcon.svg +0 -11
  319. package/dist/content/icons/cw-icons/fonts/cwAvinodeFont/CblAvinodeIcon.ttf +0 -0
  320. package/dist/content/icons/cw-icons/fonts/cwAvinodeFont/CblAvinodeIcon.woff +0 -0
  321. package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.eot +0 -0
  322. package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.svg +0 -38
  323. package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.ttf +0 -0
  324. package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.woff +0 -0
  325. package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/CblCrewControl.woff2 +0 -0
  326. package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.eot +0 -0
  327. package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.svg +0 -29
  328. package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.ttf +0 -0
  329. package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.woff +0 -0
  330. package/dist/content/icons/cw-icons/fonts/cwCrewControlFont/Crew Control.woff2 +0 -0
  331. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblCrewControlReact.eot +0 -0
  332. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblCrewControlReact.svg +0 -12
  333. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblCrewControlReact.ttf +0 -0
  334. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblCrewControlReact.woff +0 -0
  335. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblDutyIcon.eot +0 -0
  336. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblDutyIcon.svg +0 -11
  337. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblDutyIcon.ttf +0 -0
  338. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/CblDutyIcon.woff +0 -0
  339. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/SessionWarning.eot +0 -0
  340. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/SessionWarning.svg +0 -12
  341. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/SessionWarning.ttf +0 -0
  342. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/SessionWarning.woff +0 -0
  343. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.eot +0 -0
  344. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.svg +0 -26
  345. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.ttf +0 -0
  346. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.woff +0 -0
  347. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblDuty.woff2 +0 -0
  348. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrol.eot +0 -0
  349. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrol.svg +0 -13
  350. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrol.ttf +0 -0
  351. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrol.woff +0 -0
  352. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.eot +0 -0
  353. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.svg +0 -29
  354. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.ttf +0 -0
  355. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.woff +0 -0
  356. package/dist/content/icons/cw-icons/fonts/cwCrewControlNewIcon/cblcrewcontrolfont.woff2 +0 -0
  357. package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.eot +0 -0
  358. package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.svg +0 -29
  359. package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.ttf +0 -0
  360. package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.woff +0 -0
  361. package/dist/content/icons/cw-icons/fonts/cwCrewFont/Crew.woff2 +0 -0
  362. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.eot +0 -0
  363. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.svg +0 -17
  364. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.ttf +0 -0
  365. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.woff +0 -0
  366. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/Crew Planning.woff2 +0 -0
  367. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.eot +0 -0
  368. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.svg +0 -20
  369. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.ttf +0 -0
  370. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.woff +0 -0
  371. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewPlanningFont.woff2 +0 -0
  372. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewSchedulingFont.eot +0 -0
  373. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewSchedulingFont.svg +0 -12
  374. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewSchedulingFont.ttf +0 -0
  375. package/dist/content/icons/cw-icons/fonts/cwCrewPlanningFont/CrewSchedulingFont.woff +0 -0
  376. package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.eot +0 -0
  377. package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.svg +0 -20
  378. package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.ttf +0 -0
  379. package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.woff +0 -0
  380. package/dist/content/icons/cw-icons/fonts/cwDispatchFont/Dispatch.woff2 +0 -0
  381. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/ArchiveEmanual.eot +0 -0
  382. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/ArchiveEmanual.svg +0 -12
  383. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/ArchiveEmanual.ttf +0 -0
  384. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/ArchiveEmanual.woff +0 -0
  385. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/CblEmanualNewIcons.eot +0 -0
  386. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/CblEmanualNewIcons.svg +0 -14
  387. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/CblEmanualNewIcons.ttf +0 -0
  388. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/CblEmanualNewIcons.woff +0 -0
  389. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.eot +0 -0
  390. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.svg +0 -38
  391. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.ttf +0 -0
  392. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.woff +0 -0
  393. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/Emanual.woff2 +0 -0
  394. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualApprovedFile.eot +0 -0
  395. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualApprovedFile.svg +0 -11
  396. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualApprovedFile.ttf +0 -0
  397. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualApprovedFile.woff +0 -0
  398. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.eot +0 -0
  399. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.svg +0 -17
  400. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.ttf +0 -0
  401. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.woff +0 -0
  402. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMark.woff2 +0 -0
  403. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMarkLink.eot +0 -0
  404. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMarkLink.svg +0 -11
  405. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMarkLink.ttf +0 -0
  406. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualBookMarkLink.woff +0 -0
  407. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFolder.eot +0 -0
  408. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFolder.svg +0 -11
  409. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFolder.ttf +0 -0
  410. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFolder.woff +0 -0
  411. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFont.eot +0 -0
  412. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFont.svg +0 -13
  413. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFont.ttf +0 -0
  414. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFont.woff +0 -0
  415. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.eot +0 -0
  416. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.svg +0 -32
  417. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.ttf +0 -0
  418. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.woff +0 -0
  419. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualFontNew.woff2 +0 -0
  420. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPendingIcon.eot +0 -0
  421. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPendingIcon.svg +0 -11
  422. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPendingIcon.ttf +0 -0
  423. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPendingIcon.woff +0 -0
  424. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishFile.eot +0 -0
  425. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishFile.svg +0 -11
  426. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishFile.ttf +0 -0
  427. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishFile.woff +0 -0
  428. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishIconFile.eot +0 -0
  429. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishIconFile.svg +0 -11
  430. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishIconFile.ttf +0 -0
  431. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualPublishIconFile.woff +0 -0
  432. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrash.eot +0 -0
  433. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrash.svg +0 -11
  434. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrash.ttf +0 -0
  435. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrash.woff +0 -0
  436. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrashRight.eot +0 -0
  437. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrashRight.svg +0 -11
  438. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrashRight.ttf +0 -0
  439. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/EmanualRestoreTrashRight.woff +0 -0
  440. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/LibraryIcon.eot +0 -0
  441. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/LibraryIcon.svg +0 -12
  442. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/LibraryIcon.ttf +0 -0
  443. package/dist/content/icons/cw-icons/fonts/cwEmanualFont/LibraryIcon.woff +0 -0
  444. package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.eot +0 -0
  445. package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.svg +0 -158
  446. package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.ttf +0 -0
  447. package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.woff +0 -0
  448. package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/Favorites.woff2 +0 -0
  449. package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/cwellt_icon.eot +0 -0
  450. package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/cwellt_icon.svg +0 -18
  451. package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/cwellt_icon.ttf +0 -0
  452. package/dist/content/icons/cw-icons/fonts/cwFavoritesElement/cwellt_icon.woff +0 -0
  453. package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.eot +0 -0
  454. package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.svg +0 -62
  455. package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.ttf +0 -0
  456. package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.woff +0 -0
  457. package/dist/content/icons/cw-icons/fonts/cwFavoritesFont/Favorites.woff2 +0 -0
  458. package/dist/content/icons/cw-icons/fonts/cwFavoritesIcons/CblFavoritesIcons.eot +0 -0
  459. package/dist/content/icons/cw-icons/fonts/cwFavoritesIcons/CblFavoritesIcons.svg +0 -43
  460. package/dist/content/icons/cw-icons/fonts/cwFavoritesIcons/CblFavoritesIcons.ttf +0 -0
  461. package/dist/content/icons/cw-icons/fonts/cwFavoritesIcons/CblFavoritesIcons.woff +0 -0
  462. package/dist/content/icons/cw-icons/fonts/cwFgIconsFonts/CblFigIcons.eot +0 -0
  463. package/dist/content/icons/cw-icons/fonts/cwFgIconsFonts/CblFigIcons.svg +0 -49
  464. package/dist/content/icons/cw-icons/fonts/cwFgIconsFonts/CblFigIcons.ttf +0 -0
  465. package/dist/content/icons/cw-icons/fonts/cwFgIconsFonts/CblFigIcons.woff +0 -0
  466. package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.eot +0 -0
  467. package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.svg +0 -41
  468. package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.ttf +0 -0
  469. package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.woff +0 -0
  470. package/dist/content/icons/cw-icons/fonts/cwFlightOpsFont/FlightOps.woff2 +0 -0
  471. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/CblUndoIcon.eot +0 -0
  472. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/CblUndoIcon.svg +0 -11
  473. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/CblUndoIcon.ttf +0 -0
  474. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/CblUndoIcon.woff +0 -0
  475. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/FlightWatchOnTimeIcon.eot +0 -0
  476. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/FlightWatchOnTimeIcon.svg +0 -11
  477. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/FlightWatchOnTimeIcon.ttf +0 -0
  478. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/FlightWatchOnTimeIcon.woff +0 -0
  479. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.eot +0 -0
  480. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.svg +0 -41
  481. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.ttf +0 -0
  482. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.woff +0 -0
  483. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/General.woff2 +0 -0
  484. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/IDCardStatusIcon.eot +0 -0
  485. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/IDCardStatusIcon.svg +0 -12
  486. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/IDCardStatusIcon.ttf +0 -0
  487. package/dist/content/icons/cw-icons/fonts/cwGeneralFont/IDCardStatusIcon.woff +0 -0
  488. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.eot +0 -0
  489. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.svg +0 -17
  490. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.ttf +0 -0
  491. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.woff +0 -0
  492. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/Favorites.woff2 +0 -0
  493. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/calculator.eot +0 -0
  494. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/calculator.svg +0 -11
  495. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/calculator.ttf +0 -0
  496. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/calculator.woff +0 -0
  497. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/icons_cwellt.eot +0 -0
  498. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/icons_cwellt.svg +0 -11
  499. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/icons_cwellt.ttf +0 -0
  500. package/dist/content/icons/cw-icons/fonts/cwNewGeneralFontIcon/icons_cwellt.woff +0 -0
  501. package/dist/content/icons/cw-icons/fonts/cwOpstoolReactFont/opstoolReactIcons.eot +0 -0
  502. package/dist/content/icons/cw-icons/fonts/cwOpstoolReactFont/opstoolReactIcons.svg +0 -12
  503. package/dist/content/icons/cw-icons/fonts/cwOpstoolReactFont/opstoolReactIcons.ttf +0 -0
  504. package/dist/content/icons/cw-icons/fonts/cwOpstoolReactFont/opstoolReactIcons.woff +0 -0
  505. package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.eot +0 -0
  506. package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.svg +0 -17
  507. package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.ttf +0 -0
  508. package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.woff +0 -0
  509. package/dist/content/icons/cw-icons/fonts/cwPaxRelationsFont/Pax Relations.woff2 +0 -0
  510. package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.eot +0 -0
  511. package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.svg +0 -50
  512. package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.ttf +0 -0
  513. package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.woff +0 -0
  514. package/dist/content/icons/cw-icons/fonts/cwSalesFont/Sales.woff2 +0 -0
  515. package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.eot +0 -0
  516. package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.svg +0 -17
  517. package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.ttf +0 -0
  518. package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.woff +0 -0
  519. package/dist/content/icons/cw-icons/fonts/cwTrainingFont/Training.woff2 +0 -0
  520. package/dist/content/icons/font-awesome/webfonts/fa-brands-400.ttf +0 -0
  521. package/dist/content/icons/font-awesome/webfonts/fa-regular-400.ttf +0 -0
  522. package/dist/content/icons/font-awesome/webfonts/fa-solid-900.ttf +0 -0
  523. package/dist/content/icons/font-awesome/webfonts/fa-v4compatibility.ttf +0 -0
  524. package/dist/index.cjs.js.map +0 -1
  525. package/dist/index.css.map +0 -1
  526. package/dist/index.d.ts.map +0 -1
  527. package/dist/index.esm.js +0 -4836
  528. package/dist/src/common/functions/reactor.d.ts +0 -2
  529. package/dist/src/common/functions/reactor.d.ts.map +0 -1
  530. package/dist/src/components/control/input/chipper/CwChip.d.ts +0 -12
  531. package/dist/src/components/control/input/chipper/CwChip.d.ts.map +0 -1
  532. package/dist/src/components/custom/scheduler/components/ClearSchedulerButton.d.ts +0 -8
  533. package/dist/src/components/custom/scheduler/components/ClearSchedulerButton.d.ts.map +0 -1
  534. package/dist/src/components/custom/scheduler/logic/filtering/filterAndProcessResources.d.ts +0 -14
  535. package/dist/src/components/custom/scheduler/logic/filtering/filterAndProcessResources.d.ts.map +0 -1
  536. package/dist/src/components/custom/scheduler/logic/pixels/calculateMaxPxFromDateRange.d.ts +0 -2
  537. package/dist/src/components/custom/scheduler/logic/pixels/calculateMaxPxFromDateRange.d.ts.map +0 -1
  538. package/dist/src/components/custom/scheduler/logic/state_handle/handleDateChange.d.ts +0 -5
  539. package/dist/src/components/custom/scheduler/logic/state_handle/handleDateChange.d.ts.map +0 -1
  540. package/dist/src/components/custom/scheduler/logic/state_handle/handlePropChanges.d.ts +0 -5
  541. package/dist/src/components/custom/scheduler/logic/state_handle/handlePropChanges.d.ts.map +0 -1
  542. package/dist/src/components/custom/scheduler/logic/state_handle/onResizeEvent.d.ts +0 -3
  543. package/dist/src/components/custom/scheduler/logic/state_handle/onResizeEvent.d.ts.map +0 -1
  544. package/dist/src/components/custom/scheduler/logic/ui/getHasPropsChanged.d.ts +0 -3
  545. package/dist/src/components/custom/scheduler/logic/ui/getHasPropsChanged.d.ts.map +0 -1
  546. package/dist/src/components/custom/scheduler/logic/ui/shouldTriggerScroll.d.ts +0 -3
  547. package/dist/src/components/custom/scheduler/logic/ui/shouldTriggerScroll.d.ts.map +0 -1
  548. package/dist/src/components/custom/scheduler/state/EventProps.d.ts +0 -7
  549. package/dist/src/components/custom/scheduler/state/EventProps.d.ts.map +0 -1
  550. package/dist/src/components/custom/scheduler-new/presentation/components/row/BackgrounEvent.d.ts +0 -1
  551. package/dist/src/components/custom/scheduler-new/presentation/components/row/BackgrounEvent.d.ts.map +0 -1
  552. package/dist/src/components/custom/scheduler-new/presentation/components/row/cancellablePromise.d.ts +0 -7
  553. package/dist/src/components/custom/scheduler-new/presentation/components/row/cancellablePromise.d.ts.map +0 -1
  554. package/dist/src/components/custom/scheduler-new/presentation/components/row/useCancellablePromise.d.ts +0 -7
  555. package/dist/src/components/custom/scheduler-new/presentation/components/row/useCancellablePromise.d.ts.map +0 -1
  556. package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsByResource.d.ts +0 -5
  557. package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsByResource.d.ts.map +0 -1
  558. package/dist/src/components/custom/scheduler-new/presentation/state/external/Event.d.ts +0 -9
  559. package/dist/src/components/custom/scheduler-new/presentation/state/external/Event.d.ts.map +0 -1
  560. package/dist/src/components/custom/scheduler-new/presentation/state/external/Row.d.ts +0 -5
  561. package/dist/src/components/custom/scheduler-new/presentation/state/external/Row.d.ts.map +0 -1
  562. package/dist/src/components/custom/scheduler-new/presentation/state/ui/EventSideDragState.d.ts +0 -6
  563. package/dist/src/components/custom/scheduler-new/presentation/state/ui/EventSideDragState.d.ts.map +0 -1
  564. package/dist/src/components/custom/scheduler-new/presentation/state/ui/HeaderDivision.d.ts +0 -5
  565. package/dist/src/components/custom/scheduler-new/presentation/state/ui/HeaderDivision.d.ts.map +0 -1
  566. package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerEventState.d.ts +0 -14
  567. package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerEventState.d.ts.map +0 -1
  568. package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerHeaderState.d.ts +0 -11
  569. package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerHeaderState.d.ts.map +0 -1
  570. package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerRow.d.ts +0 -8
  571. package/dist/src/components/custom/scheduler-new/presentation/state/ui/SchedulerRow.d.ts.map +0 -1
  572. package/dist/test/components/custom/newScheduler/presentation/logic/getDefaultDivisions.test.d.ts.map +0 -1
  573. package/dist/test/components/custom/scheduler/calculateMaxPxFromDateRange.test.d.ts +0 -2
  574. package/dist/test/components/custom/scheduler/calculateMaxPxFromDateRange.test.d.ts.map +0 -1
  575. package/dist/test/components/custom/scheduler/filterEvents.test.d.ts.map +0 -1
  576. package/dist/test/components/custom/scheduler/shouldTriggerScroll.test.d.ts.map +0 -1
  577. package/dist/test/example.test.d.ts +0 -1
  578. package/dist/test/example.test.d.ts.map +0 -1
  579. /package/dist/src/{components/custom/scheduler-new/presentation/TestScheduler.d.ts → common/interfaces/CwSelectListProps.js} +0 -0
  580. /package/dist/{test/components/custom/newScheduler/presentation/logic/getDefaultDivisions.test.d.ts → src/components/custom/scheduler-new/presentation/components/header/SchedulerHeaderState.js} +0 -0
  581. /package/dist/{test/components/custom/newScheduler/presentation/logic/hoursBetween.test.d.ts → src/components/custom/scheduler-new/presentation/state/ui/SchedulerState.js} +0 -0
  582. /package/dist/{test/components/custom/newScheduler/presentation/logic/weekendCalc.test.d.ts → src/components/custom/scheduler-new/presentation/state/ui/WeekRange.js} +0 -0
  583. /package/dist/{test/components/custom/scheduler/filterEvents.test.d.ts → src/components/custom/scheduler-temporal/state/CwSchedulerProps.js} +0 -0
  584. /package/dist/{test/components/custom/scheduler/shouldTriggerScroll.test.d.ts → src/components/custom/scheduler-temporal/state/State.js} +0 -0
package/dist/index.cjs.js CHANGED
@@ -7,9 +7,12 @@ var reactDom = require('react-dom');
7
7
  var antd = require('antd');
8
8
  var Draggable = require('react-draggable');
9
9
  var moment = require('moment');
10
+ var dateFns = require('date-fns');
11
+ var locale = require('date-fns/locale');
12
+ var reactDayPicker = require('react-day-picker');
13
+ require('react-day-picker/dist/style.css');
10
14
  var lodash = require('lodash');
11
15
  var reactWindow = require('react-window');
12
- var ideToolbox = require('@react-buddy/ide-toolbox');
13
16
 
14
17
  function _interopNamespaceDefault(e) {
15
18
  var n = Object.create(null);
@@ -709,7 +712,7 @@ function CwLoadingSmall(CwelltLoadingAppointements) {
709
712
  jsxRuntime.jsx("div", {})) }));
710
713
  }
711
714
 
712
- var styles$j = {"cw-generic-tooltip-content":"cw-generic-tooltip-module_cw-generic-tooltip-content__la-Si"};
715
+ var styles$k = {"cw-generic-tooltip-content":"cw-generic-tooltip-module_cw-generic-tooltip-content__la-Si"};
713
716
 
714
717
  // Constants moved outside to prevent recreation
715
718
  const margin = 16;
@@ -820,12 +823,12 @@ const CwGenericTooltip = ({ children, content = null, position = defaultPosition
820
823
  const { setTooltipTimeout, clearTooltipTimeout } = useTooltipDelay(() => {
821
824
  setIsVisible(true);
822
825
  }, showDelay);
823
- const { position: tooltipPosition, actualPosition } = useTooltipPosition(isVisible, containerRef, position, styles$j["cw-generic-tooltip-content"]);
826
+ const { position: tooltipPosition, actualPosition } = useTooltipPosition(isVisible, containerRef, position, styles$k["cw-generic-tooltip-content"]);
824
827
  // Memoize tooltip content creation
825
828
  const tooltipContent = React.useMemo(() => {
826
829
  if (hide || !isVisible || !content)
827
830
  return null;
828
- return reactDom.createPortal(jsxRuntime.jsx("div", { className: styles$j["cw-generic-tooltip-content"], "data-position": actualPosition, "data-visible": isVisible, style: {
831
+ return reactDom.createPortal(jsxRuntime.jsx("div", { className: styles$k["cw-generic-tooltip-content"], "data-position": actualPosition, "data-visible": isVisible, style: {
829
832
  position: 'fixed',
830
833
  top: `${tooltipPosition.top}px`,
831
834
  left: `${tooltipPosition.left}px`,
@@ -840,7 +843,7 @@ const CwGenericTooltip = ({ children, content = null, position = defaultPosition
840
843
  clearTooltipTimeout();
841
844
  setIsVisible(false);
842
845
  }, [clearTooltipTimeout]);
843
- return (jsxRuntime.jsxs("div", { ref: containerRef, className: styles$j["cw-generic-tooltip"], onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, style: overlayStyle, children: [tooltipContent, children] }));
846
+ return (jsxRuntime.jsxs("div", { ref: containerRef, className: styles$k["cw-generic-tooltip"], onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, style: overlayStyle, children: [tooltipContent, children] }));
844
847
  };
845
848
 
846
849
  // Reference for draggable modal
@@ -883,7 +886,7 @@ function CwModal(custModalProps) {
883
886
  jsxRuntime.jsx("div", { style: { display: "none" } }))] }) })] })) }));
884
887
  }
885
888
 
886
- var styles$i = {"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"};
889
+ 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"};
887
890
 
888
891
  function CwConfirmationPopup(props) {
889
892
  const { isOpen, onConfirm, onCancel, message = "Are you sure you want to proceed?", confirmText = "Confirm", cancelText = "Cancel", placement = 'bottom', children } = props;
@@ -947,12 +950,12 @@ function CwConfirmationPopup(props) {
947
950
  onCancel();
948
951
  }
949
952
  };
950
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [renderChildren(), isOpen && (jsxRuntime.jsx("div", { className: styles$i.overlayPositioned, onClick: handleOverlayClick, children: jsxRuntime.jsxs("div", { ref: popupRef, className: styles$i.popup, style: {
953
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [renderChildren(), isOpen && (jsxRuntime.jsx("div", { className: styles$j.overlayPositioned, onClick: handleOverlayClick, children: jsxRuntime.jsxs("div", { ref: popupRef, className: styles$j.popup, style: {
951
954
  position: 'absolute',
952
955
  top: `${position.top}px`,
953
956
  left: `${position.left}px`,
954
957
  transform: 'none'
955
- }, children: [jsxRuntime.jsx("p", { className: styles$i.message, children: message }), jsxRuntime.jsxs("div", { className: styles$i.buttons, children: [jsxRuntime.jsx("button", { className: `${styles$i.button} ${styles$i.confirmButton}`, onClick: onConfirm, children: confirmText }), jsxRuntime.jsx("button", { className: `${styles$i.button} ${styles$i.cancelButton}`, onClick: onCancel, children: cancelText })] })] }) }))] }));
958
+ }, children: [jsxRuntime.jsx("p", { className: styles$j.message, children: message }), jsxRuntime.jsxs("div", { className: styles$j.buttons, children: [jsxRuntime.jsx("button", { className: `${styles$j.button} ${styles$j.confirmButton}`, onClick: onConfirm, children: confirmText }), jsxRuntime.jsx("button", { className: `${styles$j.button} ${styles$j.cancelButton}`, onClick: onCancel, children: cancelText })] })] }) }))] }));
956
959
  }
957
960
 
958
961
  // Reference for draggable modal
@@ -1031,7 +1034,7 @@ class CwModalIframe extends React__namespace.Component {
1031
1034
  }
1032
1035
  }
1033
1036
 
1034
- var styles$h = {"cw-dialog-main":"cw-dialog-module_cw-dialog-main__cHxHt","cw-dialog-button-close":"cw-dialog-module_cw-dialog-button-close__9GRd8"};
1037
+ 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"};
1035
1038
 
1036
1039
  // Helper function to parse size values
1037
1040
  const parseSize = (size) => {
@@ -1247,7 +1250,7 @@ const CwDialog = props => {
1247
1250
  onClose();
1248
1251
  }
1249
1252
  }, [onClose]);
1250
- const header = React.useMemo(() => (jsxRuntime.jsxs("header", { onMouseDown: handleMouseDown, children: [jsxRuntime.jsx("span", { children: headline }), customHeader || (jsxRuntime.jsx("button", { className: styles$h["cw-dialog-button-close"], onClick: onClose }))] })), [handleMouseDown, headline, customHeader, onClose]);
1253
+ const header = React.useMemo(() => (jsxRuntime.jsxs("header", { onMouseDown: handleMouseDown, children: [jsxRuntime.jsx("span", { children: headline }), customHeader || (jsxRuntime.jsx("button", { className: styles$i["cw-dialog-button-close"], onClick: onClose }))] })), [handleMouseDown, headline, customHeader, onClose]);
1251
1254
  const content = React.useMemo(() => (jsxRuntime.jsx("section", { children: children })), [children]);
1252
1255
  const footer = React.useMemo(() => (jsxRuntime.jsx("footer", { children: customFooter || (jsxRuntime.jsx("button", { className: "cw-button-icon cwi-save", onClick: onSave })) })), [customFooter, onSave]);
1253
1256
  const resizeHandles = React.useMemo(() => size.autoHeight
@@ -1276,7 +1279,7 @@ const CwDialog = props => {
1276
1279
  : `${convertFromPx(size.height, size.heightUnit)}${size.heightUnit}`;
1277
1280
  return { displayWidth, displayHeight };
1278
1281
  }, [size.width, size.height, size.widthUnit, size.heightUnit, size.autoHeight]);
1279
- const dialogContent = (jsxRuntime.jsx("div", { "data-has-scrim": hasScrim, className: styles$h["cw-dialog-main"], onClick: handleScrimClick, children: jsxRuntime.jsxs("dialog", { ...domProps, ref: dialogRef, style: {
1282
+ const dialogContent = (jsxRuntime.jsx("div", { "data-has-scrim": hasScrim, className: styles$i["cw-dialog-main"], onClick: handleScrimClick, children: jsxRuntime.jsxs("dialog", { ...domProps, ref: dialogRef, style: {
1280
1283
  left: `${position.x}px`,
1281
1284
  top: `${position.y}px`,
1282
1285
  width: displayDimensions.displayWidth,
@@ -1323,10 +1326,10 @@ class CwReportModal extends React__namespace.Component {
1323
1326
  };
1324
1327
  }
1325
1328
  render() {
1326
- return (jsxRuntime.jsx("div", { id: "cwelltModalReportContent", children: this.state.isModal === true ? (jsxRuntime.jsxs(CwDialog, { open: this.props.visible, width: this.props.width, headline: this.props.title, customFooter: new Array(jsxRuntime.jsx("div", {})), onClose: () => {
1329
+ return (jsxRuntime.jsx("div", { id: "cwelltModalReportContent", children: this.state.isModal === true ? (jsxRuntime.jsxs(CwDialog, { open: this.props.visible, width: this.props.width, height: this.props.height, headline: this.props.title, customFooter: new Array(jsxRuntime.jsx("div", {})), onClose: () => {
1327
1330
  this.formRef?.current?.resetFields();
1328
1331
  this.props.SET_MODAL_REPORT_VISIBLE(false);
1329
- }, hideFooter: true, children: [this.props.name !== "Empty.pdf" && (jsxRuntime.jsx("div", { style: { width: "100%", height: "100%", overflowX: "auto", overflowY: "auto" }, children: jsxRuntime.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" && (jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("h1", { style: { marginLeft: "2em" }, children: [" ", "Please add a(n) ", this.props.reportName, " report in ", this.props.moduleSettings, " Settings"] }) }))] })) : (jsxRuntime.jsxs("div", { children: [this.props.name !== "Empty.pdf" && (jsxRuntime.jsx("embed", { src: "data:application/pdf;base64," + this.props.content, type: "application/pdf", width: "100%", height: "600px" })), this.props.name === "Empty.pdf" && (jsxRuntime.jsxs("div", { children: ["Please add a(n) ", this.props.reportName, " report in ", this.props.moduleSettings, " Settings"] }))] })) }));
1332
+ }, hideFooter: true, children: [this.props.name !== "Empty.pdf" && (jsxRuntime.jsx("div", { style: { width: "100%", height: "100%", overflowX: "auto", overflowY: "auto" }, children: jsxRuntime.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" && (jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("h1", { style: { marginLeft: "2em" }, children: [" ", "Please add a(n) ", this.props.reportName, " report in ", this.props.moduleSettings, " Settings"] }) }))] })) : (jsxRuntime.jsxs("div", { children: [this.props.name !== "Empty.pdf" && (jsxRuntime.jsx("embed", { src: "data:application/pdf;base64," + this.props.content, type: "application/pdf", width: "100%", height: "800px" })), this.props.name === "Empty.pdf" && (jsxRuntime.jsxs("div", { children: ["Please add a(n) ", this.props.reportName, " report in ", this.props.moduleSettings, " Settings"] }))] })) }));
1330
1333
  }
1331
1334
  }
1332
1335
 
@@ -1440,7 +1443,7 @@ function CwButton({ text, variant = 'solid', color = 'primary', className = '',
1440
1443
  return (jsxRuntime.jsx("button", { type: "button", className: buttonClass, ...buttonProps, "data-color": color, children: variant === 'icon' ? null : (children ?? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [icon && jsxRuntime.jsx("span", { className: `cwi-icons cwi-${icon}` }), text && jsxRuntime.jsx("strong", { children: text })] }))) }));
1441
1444
  }
1442
1445
 
1443
- var styles$g = {"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"};
1446
+ 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"};
1444
1447
 
1445
1448
  /**
1446
1449
  * CwCard - A simple card component for displaying content in a contained format
@@ -1464,11 +1467,11 @@ const CwCard = ({ id, title, subtitle, alignment = 'center', children, footer, o
1464
1467
  // Construct class names using CSS modules
1465
1468
  const cardClassNames = [
1466
1469
  'cw-card',
1467
- styles$g.card,
1470
+ styles$h.card,
1468
1471
  className,
1469
- clickable ? styles$g.clickable : '',
1470
- disabled ? styles$g.disabled : '',
1471
- isLoading ? styles$g.loading : '',
1472
+ clickable ? styles$h.clickable : '',
1473
+ disabled ? styles$h.disabled : '',
1474
+ isLoading ? styles$h.loading : '',
1472
1475
  ].filter(Boolean).join(' ');
1473
1476
  // Handle click event when card is clickable
1474
1477
  const handleClick = () => {
@@ -1485,15 +1488,15 @@ const CwCard = ({ id, title, subtitle, alignment = 'center', children, footer, o
1485
1488
  // Determine if footer should be rendered
1486
1489
  const hasFooter = hasChips || footer || (hasActions && direction === "row");
1487
1490
  // Actions component to reuse
1488
- const ActionsComponent = hasActions && !disabled ? (jsxRuntime.jsxs("div", { className: styles$g.actions, children: [extraActions ?? null, onEdit && jsxRuntime.jsx(CwButton, { variant: "icon", icon: "edit", onClick: onEdit }), onDelete && jsxRuntime.jsx(CwButton, { variant: "icon", icon: "delete", color: "danger", onClick: onDelete })] })) : null;
1491
+ const ActionsComponent = hasActions && !disabled ? (jsxRuntime.jsxs("div", { className: styles$h.actions, children: [extraActions ?? null, onEdit && jsxRuntime.jsx(CwButton, { variant: "icon", icon: "edit", onClick: onEdit }), onDelete && jsxRuntime.jsx(CwButton, { variant: "icon", icon: "delete", color: "danger", onClick: onDelete })] })) : null;
1489
1492
  return (jsxRuntime.jsxs("div", { ...(id && { id }), className: cardClassNames, ...(style && { style }), ...(clickable && {
1490
1493
  role: 'button',
1491
1494
  tabIndex: 0,
1492
1495
  onClick: handleClick,
1493
- }), "data-variant": variant, "data-direction": direction, children: [hasHeader && (jsxRuntime.jsxs("header", { children: [(title || subtitle) && (jsxRuntime.jsxs("div", { className: styles$g.headerContent, "data-alignment": alignment, children: [title && jsxRuntime.jsx("h5", { children: title }), subtitle && jsxRuntime.jsx("strong", { children: subtitle })] })), direction === "column" && ActionsComponent] })), jsxRuntime.jsx("div", { className: styles$g.content, children: children }), hasFooter && (jsxRuntime.jsxs("footer", { children: [hasChips && (jsxRuntime.jsx("div", { className: styles$g.footerTags, children: chips.map((chip, index) => (jsxRuntime.jsx(CwChip, { label: chip.label, colorScheme: chip.colorScheme, className: styles$g.chip, ...(chip.customColor && { customColor: chip.customColor }), ...(chip.variant && { variant: chip.variant }), ...(chip.icon && { icon: chip.icon }) }, index))) })), footer && (jsxRuntime.jsx("div", { className: styles$g.footerContent, children: footer }))] })), direction === "row" && ActionsComponent, isLoading && (jsxRuntime.jsx("div", { className: styles$g.loadingOverlay, children: jsxRuntime.jsx(CwLoading, { isLoading: isLoading, size: "small" }) }))] }));
1496
+ }), "data-variant": variant, "data-direction": direction, children: [hasHeader && (jsxRuntime.jsxs("header", { children: [(title || subtitle) && (jsxRuntime.jsxs("div", { className: styles$h.headerContent, "data-alignment": alignment, children: [title && jsxRuntime.jsx("h5", { children: title }), subtitle && jsxRuntime.jsx("strong", { children: subtitle })] })), direction === "column" && ActionsComponent] })), jsxRuntime.jsx("div", { className: styles$h.content, children: children }), hasFooter && (jsxRuntime.jsxs("footer", { children: [hasChips && (jsxRuntime.jsx("div", { className: styles$h.footerTags, children: chips.map((chip, index) => (jsxRuntime.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 && (jsxRuntime.jsx("div", { className: styles$h.footerContent, children: footer }))] })), direction === "row" && ActionsComponent, isLoading && (jsxRuntime.jsx("div", { className: styles$h.loadingOverlay, children: jsxRuntime.jsx(CwLoading, { isLoading: isLoading, size: "small" }) }))] }));
1494
1497
  };
1495
1498
 
1496
- var styles$f = {"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"};
1499
+ 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"};
1497
1500
 
1498
1501
  function CwCardList({ items, renderCard, pageSize = 10, layout = 'grid', defaultCardWidth = 320, cardGap = 16, isLoading = false, emptyState, sortOptions = [], defaultSortKey, ...htmlProps }) {
1499
1502
  const [currentPage, setCurrentPage] = React.useState(1);
@@ -1527,10 +1530,10 @@ function CwCardList({ items, renderCard, pageSize = 10, layout = 'grid', default
1527
1530
  '--card-width': `${defaultCardWidth}px`,
1528
1531
  '--card-gap': `${cardGap}px`
1529
1532
  };
1530
- return (jsxRuntime.jsxs("div", { ...htmlProps, children: [sortOptions.length > 0 && (jsxRuntime.jsxs("div", { className: styles$f.sortControls, children: [jsxRuntime.jsx("label", { htmlFor: "cardlist-sort-select", children: "Sort by:" }), jsxRuntime.jsx("select", { id: "cardlist-sort-select", value: sortKey, onChange: (e) => handleSortChange(e.target.value), className: styles$f.sortSelect, children: sortOptions.map(option => (jsxRuntime.jsx("option", { value: option.key, children: option.label }, option.key))) }), jsxRuntime.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 ? (jsxRuntime.jsx("div", { className: styles$f.loading, children: jsxRuntime.jsx(CwLoading, { isLoading: isLoading }) })) : sortedItems.length === 0 ? (jsxRuntime.jsx("div", { className: styles$f.emptyState, children: emptyState || jsxRuntime.jsx("p", { children: "No items to display" }) })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: `${styles$f.cardContainer}`, "data-layout": layout, style: gridStyle, children: visibleItems.map((item, index) => (jsxRuntime.jsx("div", { className: styles$f.cardWrapper, children: renderCard(item, index) }, index))) }), totalPages > 1 && (jsxRuntime.jsxs("div", { className: styles$f.pagination, children: [jsxRuntime.jsx("button", { disabled: currentPage === 1, onClick: () => setCurrentPage(p => Math.max(1, p - 1)), className: "cw-button-icon cwi-chevron-left" }), jsxRuntime.jsxs("span", { className: styles$f.pageInfo, children: [currentPage, " of ", totalPages] }), jsxRuntime.jsx("button", { disabled: currentPage === totalPages, onClick: () => setCurrentPage(p => Math.min(totalPages, p + 1)), className: "cw-button-icon cwi-chevron-right" })] }))] }))] }));
1533
+ return (jsxRuntime.jsxs("div", { ...htmlProps, children: [sortOptions.length > 0 && (jsxRuntime.jsxs("div", { className: styles$g.sortControls, children: [jsxRuntime.jsx("label", { htmlFor: "cardlist-sort-select", children: "Sort by:" }), jsxRuntime.jsx("select", { id: "cardlist-sort-select", value: sortKey, onChange: (e) => handleSortChange(e.target.value), className: styles$g.sortSelect, children: sortOptions.map(option => (jsxRuntime.jsx("option", { value: option.key, children: option.label }, option.key))) }), jsxRuntime.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 ? (jsxRuntime.jsx("div", { className: styles$g.loading, children: jsxRuntime.jsx(CwLoading, { isLoading: isLoading }) })) : sortedItems.length === 0 ? (jsxRuntime.jsx("div", { className: styles$g.emptyState, children: emptyState || jsxRuntime.jsx("p", { children: "No items to display" }) })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: `${styles$g.cardContainer}`, "data-layout": layout, style: gridStyle, children: visibleItems.map((item, index) => (jsxRuntime.jsx("div", { className: styles$g.cardWrapper, children: renderCard(item, index) }, index))) }), totalPages > 1 && (jsxRuntime.jsxs("div", { className: styles$g.pagination, children: [jsxRuntime.jsx("button", { disabled: currentPage === 1, onClick: () => setCurrentPage(p => Math.max(1, p - 1)), className: "cw-button-icon cwi-chevron-left" }), jsxRuntime.jsxs("span", { className: styles$g.pageInfo, children: [currentPage, " of ", totalPages] }), jsxRuntime.jsx("button", { disabled: currentPage === totalPages, onClick: () => setCurrentPage(p => Math.min(totalPages, p + 1)), className: "cw-button-icon cwi-chevron-right" })] }))] }))] }));
1531
1534
  }
1532
1535
 
1533
- var styles$e = {"cw-accordion":"cw-accordion-module_cw-accordion__ErvlW","cw-accordion-body":"cw-accordion-module_cw-accordion-body__xlI8b"};
1536
+ var styles$f = {"cw-accordion":"cw-accordion-module_cw-accordion__ErvlW","cw-accordion-body":"cw-accordion-module_cw-accordion-body__xlI8b"};
1534
1537
 
1535
1538
  /**
1536
1539
  *
@@ -1547,7 +1550,7 @@ function CwAccordionContainer(CwelltAccordionContainerProps) {
1547
1550
  setVisible_accordionBody(!isVisible_accordionBody);
1548
1551
  };
1549
1552
  // #endregion
1550
- return (jsxRuntime.jsxs("div", { className: styles$e["cw-accordion"], style: CwelltAccordionContainerProps.style, "data-open": isVisible_accordionBody, children: [jsxRuntime.jsxs("header", { onClick: () => showAccordionBody(), children: [jsxRuntime.jsx("div", { children: CwelltAccordionContainerProps.desc_text }), jsxRuntime.jsx("button", { className: "cw-button-icon" })] }), jsxRuntime.jsx("div", { className: styles$e["cw-accordion-body"], children: CwelltAccordionContainerProps.children })] }));
1553
+ return (jsxRuntime.jsxs("div", { className: styles$f["cw-accordion"], style: CwelltAccordionContainerProps.style, "data-open": isVisible_accordionBody, children: [jsxRuntime.jsxs("header", { onClick: () => showAccordionBody(), children: [jsxRuntime.jsx("div", { children: CwelltAccordionContainerProps.desc_text }), jsxRuntime.jsx("button", { className: "cw-button-icon" })] }), jsxRuntime.jsx("div", { className: styles$f["cw-accordion-body"], children: CwelltAccordionContainerProps.children })] }));
1551
1554
  }
1552
1555
 
1553
1556
  /**
@@ -1658,6 +1661,22 @@ function CwTable({ columns, data, pagination = false, pageSizeOptions = [5, 10,
1658
1661
  dataCopy.sort((a, b) => {
1659
1662
  const aVal = a[sortConfig.key];
1660
1663
  const bVal = b[sortConfig.key];
1664
+ // Handle null/undefined
1665
+ if (aVal == null && bVal == null)
1666
+ return 0;
1667
+ if (aVal == null)
1668
+ return 1;
1669
+ if (bVal == null)
1670
+ return -1;
1671
+ // Handle strings (case-insensitive)
1672
+ if (typeof aVal === 'string' && typeof bVal === 'string') {
1673
+ const comparison = aVal.localeCompare(bVal, undefined, {
1674
+ sensitivity: 'base',
1675
+ numeric: true
1676
+ });
1677
+ return comparison * (sortConfig.direction === "asc" ? 1 : -1);
1678
+ }
1679
+ // Handle numbers and other types
1661
1680
  return (aVal < bVal ? -1 : aVal > bVal ? 1 : 0) * (sortConfig.direction === "asc" ? 1 : -1);
1662
1681
  });
1663
1682
  }
@@ -1748,7 +1767,7 @@ function CwTable({ columns, data, pagination = false, pageSizeOptions = [5, 10,
1748
1767
  }, min: 1, max: totalPages }), jsxRuntime.jsxs("span", { children: ["of ", totalPages] }), jsxRuntime.jsx("button", { onClick: () => handlePageChange(currentPage + 1), disabled: currentPage === totalPages || totalPages === 1, className: "cw-button-icon cwi-chevron-right", title: "Next" }), jsxRuntime.jsx("button", { onClick: () => handlePageChange(totalPages), disabled: currentPage === totalPages || totalPages === 1, className: "cw-button-icon cwi-chevron-right-double", title: "Last" }), jsxRuntime.jsx("select", { value: localItemsPerPage, onChange: handleItemsPerPageChange, children: pageSizeOptions.map(size => (jsxRuntime.jsxs("option", { value: size, children: [size, " / page"] }, size))) })] }))] }));
1749
1768
  }
1750
1769
 
1751
- var styles$d = {"cw-tabs":"cw-tabs-module_cw-tabs__1pmji","cw-tabs-content":"cw-tabs-module_cw-tabs-content__HTp8d"};
1770
+ var styles$e = {"cw-tabs":"cw-tabs-module_cw-tabs__1pmji","cw-tabs-content":"cw-tabs-module_cw-tabs-content__HTp8d"};
1752
1771
 
1753
1772
  const TabIcon = ({ icon }) => {
1754
1773
  if (!icon)
@@ -1798,7 +1817,7 @@ function CwTabs(CwTabsProps) {
1798
1817
  const tabsListStyle = position === 'left' && CwTabsProps.tabsListWidth
1799
1818
  ? { minWidth: CwTabsProps.tabsListWidth }
1800
1819
  : undefined;
1801
- return (jsxRuntime.jsxs("div", { id: CwTabsProps.id, className: styles$d['cw-tabs'], style: CwTabsProps.style, "data-tabs-position": position, children: [jsxRuntime.jsx("ul", { style: tabsListStyle, children: CwTabsProps.tabs.map(tab => (jsxRuntime.jsxs("li", { className: `${tab.key === activeTab ? "cw-tab-active" : ""}`, onClick: () => handleTabClick(tab), "data-active": tab.key === activeTab, children: [jsxRuntime.jsx(TabIcon, { icon: tab.icon }), tab.title] }, tab.key))) }), jsxRuntime.jsx("div", { className: styles$d['cw-tabs-content'], children: activeTab !== null && CwTabsProps.tabs.find(tab => tab.key === activeTab)?.content })] }));
1820
+ return (jsxRuntime.jsxs("div", { id: CwTabsProps.id, className: styles$e['cw-tabs'], style: CwTabsProps.style, "data-tabs-position": position, children: [jsxRuntime.jsx("ul", { style: tabsListStyle, children: CwTabsProps.tabs.map(tab => (jsxRuntime.jsxs("li", { className: `${tab.key === activeTab ? "cw-tab-active" : ""}`, onClick: () => handleTabClick(tab), "data-active": tab.key === activeTab, children: [jsxRuntime.jsx(TabIcon, { icon: tab.icon }), tab.title] }, tab.key))) }), jsxRuntime.jsx("div", { className: styles$e['cw-tabs-content'], children: activeTab !== null && CwTabsProps.tabs.find(tab => tab.key === activeTab)?.content })] }));
1802
1821
  }
1803
1822
 
1804
1823
  /**
@@ -1838,15 +1857,15 @@ const CwExpandable = ({ briefing, onToggle, onOpen, onClose, children, ...detail
1838
1857
  * emptyValue="N/A"
1839
1858
  * />
1840
1859
  */
1841
- const CwKeyValueList = ({ items, className = "", emptyValue = "-", direction = "row" }) => {
1842
- return (jsxRuntime.jsx("dl", { className: `cw-keyvalue-list ${className}`, children: items.map(item => (jsxRuntime.jsxs("div", { className: `cw-keyvalue-list-item cw-flex-${direction}`, children: [jsxRuntime.jsx("dt", { children: item.label }), jsxRuntime.jsx("dd", { children: item.value !== undefined && item.value !== null && item.value !== ""
1860
+ const CwKeyValueList = ({ items, className = "", emptyValue = "-", direction = "row", ...htmlProps }) => {
1861
+ return (jsxRuntime.jsx("dl", { className: `cw-keyvalue-list ${className}`, ...htmlProps, children: items.map(item => (jsxRuntime.jsxs("div", { className: `cw-keyvalue-list-item cw-flex-${direction}`, children: [jsxRuntime.jsx("dt", { children: item.label }), jsxRuntime.jsx("dd", { children: item.value !== undefined && item.value !== null && item.value !== ""
1843
1862
  ? (React.isValidElement(item.value)
1844
1863
  ? item.value
1845
1864
  : `${item.value}${item.suffix ? ` ${item.suffix}` : ''}`)
1846
1865
  : emptyValue })] }, item.key))) }));
1847
1866
  };
1848
1867
 
1849
- var styles$c = {"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"};
1868
+ 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"};
1850
1869
 
1851
1870
  function CwSortableList({ items, onReorder, renderItem, className = '', movedItems = new Set(), emptyMessage = "No elements to show", readOnly = false, }) {
1852
1871
  const [draggedItem, setDraggedItem] = React.useState(null);
@@ -1909,15 +1928,15 @@ function CwSortableList({ items, onReorder, renderItem, className = '', movedIte
1909
1928
  }
1910
1929
  };
1911
1930
  if (items.length === 0) {
1912
- return (jsxRuntime.jsx("div", { className: `${styles$c.sortableList} ${styles$c.emptyState} ${className}`, children: jsxRuntime.jsx("div", { className: styles$c.emptyMessage, children: emptyMessage }) }));
1931
+ return (jsxRuntime.jsx("div", { className: `${styles$d.sortableList} ${styles$d.emptyState} ${className}`, children: jsxRuntime.jsx("div", { className: styles$d.emptyMessage, children: emptyMessage }) }));
1913
1932
  }
1914
- return (jsxRuntime.jsx("div", { className: `${styles$c.sortableList} ${className}`, children: items.map((item, index) => {
1933
+ return (jsxRuntime.jsx("div", { className: `${styles$d.sortableList} ${className}`, children: items.map((item, index) => {
1915
1934
  const { title, extraContent, actions, showHandle = true, expandedContent } = renderItem(item);
1916
1935
  const isDragging = draggedItem?.id === item.id;
1917
1936
  const isMoved = movedItems.has(item.id);
1918
1937
  const canExpand = Boolean(expandedContent);
1919
1938
  const isExpanded = expandedItems.has(item.id);
1920
- return (jsxRuntime.jsxs(React.Fragment, { children: [dropIndicatorIndex === index && jsxRuntime.jsx("div", { className: styles$c.dropIndicator }), jsxRuntime.jsxs("div", { className: `${styles$c.sortableItem} ${isDragging ? styles$c.dragging : ''} ${isMoved ? styles$c.moved : ''} ${readOnly ? styles$c.readOnly : ''}`, draggable: !readOnly, onDragStart: (e) => handleDragStart(e, item), onDragOver: (e) => handleDragOver(e, index), onDragEnd: handleDragEnd, children: [jsxRuntime.jsxs("header", { children: [canExpand ? (jsxRuntime.jsx(CwButton, { variant: "icon", onClick: () => toggleExpanded(item.id), type: "button", title: isExpanded ? "Collapse" : "Expand", icon: isExpanded ? "chevron-up" : "chevron-down" })) : showHandle ? (jsxRuntime.jsx("div", { className: styles$c.sortableHandle, children: jsxRuntime.jsx(CwIcon, { iconId: "grip-dots" }) })) : null, jsxRuntime.jsxs("div", { className: styles$c.sortableContent, children: [jsxRuntime.jsx("div", { className: styles$c.sortableTitle, children: title }), extraContent && jsxRuntime.jsx("div", { className: styles$c.sortableExtraContent, children: extraContent })] }), jsxRuntime.jsx("div", { className: styles$c.sortableActions, children: actions })] }), isExpanded && expandedContent && (jsxRuntime.jsx("div", { className: styles$c.expandedContent, children: expandedContent }))] }), !readOnly && dropIndicatorIndex === items.length && index === items.length - 1 && (jsxRuntime.jsx("div", { className: styles$c.dropIndicator }))] }, item.id));
1939
+ return (jsxRuntime.jsxs(React.Fragment, { children: [dropIndicatorIndex === index && jsxRuntime.jsx("div", { className: styles$d.dropIndicator }), jsxRuntime.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: [jsxRuntime.jsxs("header", { children: [canExpand ? (jsxRuntime.jsx(CwButton, { variant: "icon", onClick: () => toggleExpanded(item.id), type: "button", title: isExpanded ? "Collapse" : "Expand", icon: isExpanded ? "chevron-up" : "chevron-down" })) : showHandle ? (jsxRuntime.jsx("div", { className: styles$d.sortableHandle, children: jsxRuntime.jsx(CwIcon, { iconId: "grip-dots" }) })) : null, jsxRuntime.jsxs("div", { className: styles$d.sortableContent, children: [jsxRuntime.jsx("div", { className: styles$d.sortableTitle, children: title }), extraContent && jsxRuntime.jsx("div", { className: styles$d.sortableExtraContent, children: extraContent })] }), jsxRuntime.jsx("div", { className: styles$d.sortableActions, children: actions })] }), isExpanded && expandedContent && (jsxRuntime.jsx("div", { className: styles$d.expandedContent, children: expandedContent }))] }), !readOnly && dropIndicatorIndex === items.length && index === items.length - 1 && (jsxRuntime.jsx("div", { className: styles$d.dropIndicator }))] }, item.id));
1921
1940
  }) }));
1922
1941
  }
1923
1942
 
@@ -2094,7 +2113,7 @@ function CwFileUpload(fileUploadProps) {
2094
2113
  return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { className: "row", children: [jsxRuntime.jsx("input", { className: "cw-button", type: "file", accept: fileUploadProps.accept, readOnly: true, placeholder: "No file selected...", onChange: handleFileChange }), previewURL && (jsxRuntime.jsx("div", { className: "row", children: jsxRuntime.jsx("img", { src: previewURL, alt: "Preview", style: { maxWidth: "200px", maxHeight: "200px" } }) }))] }), error && jsxRuntime.jsx("div", { className: "row error", children: error }), jsxRuntime.jsx("div", { className: "row", children: jsxRuntime.jsxs("label", { children: ["Please note: File/image has to be in ", fileUploadProps.acceptString, " format", fileUploadProps.sizeString && `, ${fileUploadProps.sizeString}`] }) })] }));
2095
2114
  }
2096
2115
 
2097
- var styles$b = {"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"};
2116
+ 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"};
2098
2117
 
2099
2118
  function CwFileUploadMultiple(fileUploadProps) {
2100
2119
  const fileInputRef = React.useRef(null);
@@ -2236,7 +2255,7 @@ function CwFileUploadMultiple(fileUploadProps) {
2236
2255
  }
2237
2256
  }
2238
2257
  };
2239
- return (jsxRuntime.jsxs("div", { className: `${styles$b.fileUploadContainer} ${fileUploadProps.className}`, children: [jsxRuntime.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$b.hiddenInput }), selectedFiles.length === 0 ? (jsxRuntime.jsxs("div", { className: `${styles$b.uploadArea} ${fileUploadProps.disabled ? styles$b.uploadAreaDisabled : ''}`, onDragOver: handleDragOver, onDrop: handleDrop, onClick: !fileUploadProps.disabled ? handleButtonClick : undefined, children: [jsxRuntime.jsx(CwIcon, { iconId: "upload" }), jsxRuntime.jsx("p", { className: `${styles$b.uploadTitle}`, children: fileUploadProps.disabled ? 'Upload disabled' : 'Click to upload or drag and drop' }), jsxRuntime.jsxs("p", { className: `${styles$b.uploadSubtitle}`, children: [fileUploadProps.accept ? `Accepted files: ${fileUploadProps.accept}` : 'All file types accepted', !fileUploadProps.multiple && ' (Single file only)'] })] })) : (jsxRuntime.jsxs("div", { className: styles$b.filesContainer, children: [jsxRuntime.jsxs("div", { className: "cw-flex-row cw-align-between-center", children: [jsxRuntime.jsxs("small", { className: styles$b.filesCount, children: [selectedFiles.length, " file", selectedFiles.length !== 1 ? 's' : '', " selected"] }), jsxRuntime.jsx(CwButton, { onClick: removeAllFiles, disabled: fileUploadProps.disabled, color: "danger", variant: "outline", icon: "delete", text: "Clear all" })] }), selectedFiles.map((file, index) => (jsxRuntime.jsxs("div", { className: styles$b.fileItem, children: [jsxRuntime.jsxs("div", { className: styles$b.fileIcon, children: [jsxRuntime.jsx(CwIcon, { iconId: "page" }), jsxRuntime.jsx("span", { className: styles$b.fileExtension, children: getFileExtension(file.name) })] }), jsxRuntime.jsxs("div", { className: styles$b.fileInfo, children: [jsxRuntime.jsx("p", { className: styles$b.fileName, children: file.name }), jsxRuntime.jsxs("p", { className: styles$b.fileSize, children: [(file.size / 1024).toFixed(1), " KB"] })] }), jsxRuntime.jsx(CwButton, { variant: "icon", icon: "close", color: "neutral", onClick: () => removeFile(index), className: styles$b.smallButton })] }, index))), fileUploadProps.multiple && (jsxRuntime.jsx(CwButton, { text: "Add More Files", icon: "plus", variant: "outline", onClick: handleButtonClick, disabled: fileUploadProps.disabled })), !fileUploadProps.multiple && (jsxRuntime.jsx(CwButton, { text: "Change File", icon: "refresh", onClick: handleButtonClick, disabled: fileUploadProps.disabled }))] }))] }));
2258
+ return (jsxRuntime.jsxs("div", { className: `${styles$c.fileUploadContainer} ${fileUploadProps.className}`, children: [jsxRuntime.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 ? (jsxRuntime.jsxs("div", { className: `${styles$c.uploadArea} ${fileUploadProps.disabled ? styles$c.uploadAreaDisabled : ''}`, onDragOver: handleDragOver, onDrop: handleDrop, onClick: !fileUploadProps.disabled ? handleButtonClick : undefined, children: [jsxRuntime.jsx(CwIcon, { iconId: "upload" }), jsxRuntime.jsx("p", { className: `${styles$c.uploadTitle}`, children: fileUploadProps.disabled ? 'Upload disabled' : 'Click to upload or drag and drop' }), jsxRuntime.jsxs("p", { className: `${styles$c.uploadSubtitle}`, children: [fileUploadProps.accept ? `Accepted files: ${fileUploadProps.accept}` : 'All file types accepted', !fileUploadProps.multiple && ' (Single file only)'] })] })) : (jsxRuntime.jsxs("div", { className: styles$c.filesContainer, children: [jsxRuntime.jsxs("div", { className: "cw-flex-row cw-align-between-center", children: [jsxRuntime.jsxs("small", { className: styles$c.filesCount, children: [selectedFiles.length, " file", selectedFiles.length !== 1 ? 's' : '', " selected"] }), jsxRuntime.jsx(CwButton, { onClick: removeAllFiles, disabled: fileUploadProps.disabled, color: "danger", variant: "outline", icon: "delete", text: "Clear all" })] }), selectedFiles.map((file, index) => (jsxRuntime.jsxs("div", { className: styles$c.fileItem, children: [jsxRuntime.jsxs("div", { className: styles$c.fileIcon, children: [jsxRuntime.jsx(CwIcon, { iconId: "page" }), jsxRuntime.jsx("span", { className: styles$c.fileExtension, children: getFileExtension(file.name) })] }), jsxRuntime.jsxs("div", { className: styles$c.fileInfo, children: [jsxRuntime.jsx("p", { className: styles$c.fileName, children: file.name }), jsxRuntime.jsxs("p", { className: styles$c.fileSize, children: [(file.size / 1024).toFixed(1), " KB"] })] }), jsxRuntime.jsx(CwButton, { variant: "icon", icon: "close", color: "neutral", onClick: () => removeFile(index), className: styles$c.smallButton })] }, index))), fileUploadProps.multiple && (jsxRuntime.jsx(CwButton, { text: "Add More Files", icon: "plus", variant: "outline", onClick: handleButtonClick, disabled: fileUploadProps.disabled })), !fileUploadProps.multiple && (jsxRuntime.jsx(CwButton, { text: "Change File", icon: "refresh", onClick: handleButtonClick, disabled: fileUploadProps.disabled }))] }))] }));
2240
2259
  }
2241
2260
 
2242
2261
  function CwInput(CwInputProps) {
@@ -2279,7 +2298,7 @@ function CwDigit(props) {
2279
2298
  return (jsxRuntime.jsx("div", { className: "cw-input-text", children: jsxRuntime.jsxs(CwAlign, { ...alignProps, itemProp: inputProps.required === true ? "required" : "", children: [labelProps && (jsxRuntime.jsxs(CwLabel, { ...labelProps, children: [iconProps && jsxRuntime.jsx(CwIcon, { ...iconProps }), labelProps.text] })), jsxRuntime.jsx("input", { type: "number", ...inputProps }), buttonProps && jsxRuntime.jsx(CwButton, { ...buttonProps })] }) }));
2280
2299
  }
2281
2300
 
2282
- var styles$a = {"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"};
2301
+ 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"};
2283
2302
 
2284
2303
  const CwColorPicker = ({ initialColor, onChange, previewText = "Color preview" }) => {
2285
2304
  const [rgb, setRgb] = React.useState({ r: 255, g: 255, b: 255 });
@@ -2482,13 +2501,13 @@ const CwColorPicker = ({ initialColor, onChange, previewText = "Color preview" }
2482
2501
  // Calculate background color for the main area based on current hue
2483
2502
  const hueColor = hsvToRgb(hsv.h, 100, 100);
2484
2503
  const hueHex = rgbToHex(hueColor.r, hueColor.g, hueColor.b);
2485
- return (jsxRuntime.jsxs("div", { className: "cw-flex-column cw-gap-small", children: [jsxRuntime.jsxs("div", { className: "cw-flex-row cw-align-between-center cw-gap-small", children: [jsxRuntime.jsx("div", { className: styles$a.colorPreview, style: { backgroundColor: hexColor, color: getContrastColor(hexColor) }, children: previewText }), jsxRuntime.jsx("button", { type: "button", className: "cw-button", onClick: toggleInputMode, style: { minWidth: "3ch" }, children: inputMode === 'hex' ? 'RGB' : 'HEX' })] }), jsxRuntime.jsx("div", { className: "color-inputs-row", children: inputMode === 'hex' ? (jsxRuntime.jsx("input", { type: "text", value: hexColor, onChange: handleHexChange })) : (jsxRuntime.jsxs("div", { className: "cw-grid-base-3 cw-gap-small", children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("label", { children: "R:" }), jsxRuntime.jsx("input", { type: "number", name: "r", min: "0", max: "255", value: rgb.r, onChange: handleRgbChange })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("label", { children: "G:" }), jsxRuntime.jsx("input", { type: "number", name: "g", min: "0", max: "255", value: rgb.g, onChange: handleRgbChange })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("label", { children: "B:" }), jsxRuntime.jsx("input", { type: "number", name: "b", min: "0", max: "255", value: rgb.b, onChange: handleRgbChange })] })] })) }), jsxRuntime.jsxs("div", { className: styles$a.colorPickerInteractiveArea, children: [jsxRuntime.jsx("div", { className: styles$a.hueBar, ref: hueBarRef, onClick: handleHueBarClick, children: jsxRuntime.jsx("div", { className: styles$a.hueBarSlider, style: { top: `${(360 - hsv.h) / 360 * 100}%` } }) }), jsxRuntime.jsxs("div", { className: styles$a.colorArea, ref: colorAreaRef, onClick: handleColorAreaClick, children: [jsxRuntime.jsxs("div", { className: styles$a.colorAreaOverlay, children: [jsxRuntime.jsx("div", { className: styles$a.hueBackground, style: { backgroundColor: hueHex } }), jsxRuntime.jsx("div", { className: styles$a.whiteGradient }), jsxRuntime.jsx("div", { className: styles$a.blackGradient })] }), jsxRuntime.jsx("div", { className: styles$a.colorAreaCursor, style: {
2504
+ return (jsxRuntime.jsxs("div", { className: "cw-flex-column cw-gap-small", children: [jsxRuntime.jsxs("div", { className: "cw-flex-row cw-align-between-center cw-gap-small", children: [jsxRuntime.jsx("div", { className: styles$b.colorPreview, style: { backgroundColor: hexColor, color: getContrastColor(hexColor) }, children: previewText }), jsxRuntime.jsx("button", { type: "button", className: "cw-button", onClick: toggleInputMode, style: { minWidth: "3ch" }, children: inputMode === 'hex' ? 'RGB' : 'HEX' })] }), jsxRuntime.jsx("div", { className: "color-inputs-row", children: inputMode === 'hex' ? (jsxRuntime.jsx("input", { type: "text", value: hexColor, onChange: handleHexChange })) : (jsxRuntime.jsxs("div", { className: "cw-grid-base-3 cw-gap-small", children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("label", { children: "R:" }), jsxRuntime.jsx("input", { type: "number", name: "r", min: "0", max: "255", value: rgb.r, onChange: handleRgbChange })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("label", { children: "G:" }), jsxRuntime.jsx("input", { type: "number", name: "g", min: "0", max: "255", value: rgb.g, onChange: handleRgbChange })] }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("label", { children: "B:" }), jsxRuntime.jsx("input", { type: "number", name: "b", min: "0", max: "255", value: rgb.b, onChange: handleRgbChange })] })] })) }), jsxRuntime.jsxs("div", { className: styles$b.colorPickerInteractiveArea, children: [jsxRuntime.jsx("div", { className: styles$b.hueBar, ref: hueBarRef, onClick: handleHueBarClick, children: jsxRuntime.jsx("div", { className: styles$b.hueBarSlider, style: { top: `${(360 - hsv.h) / 360 * 100}%` } }) }), jsxRuntime.jsxs("div", { className: styles$b.colorArea, ref: colorAreaRef, onClick: handleColorAreaClick, children: [jsxRuntime.jsxs("div", { className: styles$b.colorAreaOverlay, children: [jsxRuntime.jsx("div", { className: styles$b.hueBackground, style: { backgroundColor: hueHex } }), jsxRuntime.jsx("div", { className: styles$b.whiteGradient }), jsxRuntime.jsx("div", { className: styles$b.blackGradient })] }), jsxRuntime.jsx("div", { className: styles$b.colorAreaCursor, style: {
2486
2505
  left: `${hsv.s}%`,
2487
2506
  top: `${100 - hsv.v}%`
2488
2507
  } })] })] })] }));
2489
2508
  };
2490
2509
 
2491
- var styles$9 = {"selectColor":"cw-input-color-module_selectColor__DTo3V","disabled":"cw-input-color-module_disabled__O1fK5","colorDropdown":"cw-input-color-module_colorDropdown__pX2bc"};
2510
+ var styles$a = {"selectColor":"cw-input-color-module_selectColor__DTo3V","disabled":"cw-input-color-module_disabled__O1fK5","colorDropdown":"cw-input-color-module_colorDropdown__pX2bc"};
2492
2511
 
2493
2512
  const CwInputColor = ({ value, onChange, previewText = "Color preview", disabled = false, width = '4rem', height = '2rem' }) => {
2494
2513
  const [isOpen, setIsOpen] = React.useState(false);
@@ -2621,11 +2640,11 @@ const CwInputColor = ({ value, onChange, previewText = "Color preview", disabled
2621
2640
  break;
2622
2641
  }
2623
2642
  };
2624
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { ref: containerRef, onClick: handleToggle, className: `${styles$9.selectColor} ${disabled ? styles$9.disabled : ''}`, style: {
2643
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { ref: containerRef, onClick: handleToggle, className: `${styles$a.selectColor} ${disabled ? styles$a.disabled : ''}`, style: {
2625
2644
  width,
2626
2645
  height,
2627
2646
  backgroundColor: value,
2628
- }, "aria-label": "Open color picker", "aria-expanded": isOpen, "aria-haspopup": "dialog", role: "button", tabIndex: disabled ? -1 : 0, onKeyDown: handleKeyDown }), isOpen && reactDom.createPortal(jsxRuntime.jsx("div", { ref: dropdownRef, className: styles$9.colorDropdown, style: dropdownStyle, role: "dialog", "aria-modal": "true", "aria-label": "Color picker", children: jsxRuntime.jsx(CwColorPicker, { initialColor: value, onChange: handleColorChange, previewText: previewText }) }), document.body)] }));
2647
+ }, "aria-label": "Open color picker", "aria-expanded": isOpen, "aria-haspopup": "dialog", role: "button", tabIndex: disabled ? -1 : 0, onKeyDown: handleKeyDown }), isOpen && reactDom.createPortal(jsxRuntime.jsx("div", { ref: dropdownRef, className: styles$a.colorDropdown, style: dropdownStyle, role: "dialog", "aria-modal": "true", "aria-label": "Color picker", children: jsxRuntime.jsx(CwColorPicker, { initialColor: value, onChange: handleColorChange, previewText: previewText }) }), document.body)] }));
2629
2648
  };
2630
2649
 
2631
2650
  /**
@@ -3118,7 +3137,7 @@ const CwImageArea = React.forwardRef((props, ref) => {
3118
3137
  });
3119
3138
  CwImageArea.displayName = "CwImageArea";
3120
3139
 
3121
- var styles$8 = {"cw-weekday-selector":"cw-weekday-selector-module_cw-weekday-selector__Iz4GZ"};
3140
+ var styles$9 = {"cw-weekday-selector":"cw-weekday-selector-module_cw-weekday-selector__Iz4GZ"};
3122
3141
 
3123
3142
  /**
3124
3143
  * This class represents a week where days can be selected or unselected
@@ -3258,7 +3277,7 @@ const CwWeekdaySelector = ({ value = "", onChange, disabled = false }) => {
3258
3277
  setSelectedDays(newWeekdays);
3259
3278
  onChange?.(newWeekdays.toString());
3260
3279
  };
3261
- return (jsxRuntime.jsx("div", { className: styles$8["cw-weekday-selector"], children: Weekdays.getFullWeek().map(day => (jsxRuntime.jsx("input", { type: "checkbox", "data-day": day, checked: selectedDays.toArray().includes(day), onChange: (e) => handleChange(day, e.target.checked), disabled: disabled }, day))) }));
3280
+ return (jsxRuntime.jsx("div", { className: styles$9["cw-weekday-selector"], children: Weekdays.getFullWeek().map(day => (jsxRuntime.jsx("input", { type: "checkbox", "data-day": day, checked: selectedDays.toArray().includes(day), onChange: (e) => handleChange(day, e.target.checked), disabled: disabled }, day))) }));
3262
3281
  };
3263
3282
 
3264
3283
  function CwCheckbox(CwCheckboxProps) {
@@ -4005,13 +4024,13 @@ function CwMultiselect(CwelltCustomFilterTabProps) {
4005
4024
  }) }, "group" + i))) })] }) }) }) }));
4006
4025
  }
4007
4026
 
4008
- var styles$7 = {"cw-multifilter-tag":"cw-multi-filter-tag-module_cw-multifilter-tag__Epda-"};
4027
+ var styles$8 = {"cw-multifilter-tag":"cw-multi-filter-tag-module_cw-multifilter-tag__Epda-"};
4009
4028
 
4010
4029
  const CwMultiFilterTag = props => {
4011
4030
  const { ID, Name, Value, Category, Removable, PrimaryColor, OnPrimaryColor, Selectable, Selected, OnSelect } = props;
4012
4031
  const BackgroundColor = `rgb(${PrimaryColor.r},${PrimaryColor.g},${PrimaryColor.b})`;
4013
4032
  const TextColor = `rgb(${OnPrimaryColor.r},${OnPrimaryColor.g},${OnPrimaryColor.b})`;
4014
- return (jsxRuntime.jsxs("li", { className: styles$7["cw-multifilter-tag"], "data-selected": !!props.Selected, "data-removable": !!props.Removable, style: {
4033
+ return (jsxRuntime.jsxs("li", { className: styles$8["cw-multifilter-tag"], "data-selected": !!props.Selected, "data-removable": !!props.Removable, style: {
4015
4034
  color: TextColor,
4016
4035
  backgroundColor: BackgroundColor,
4017
4036
  opacity: Selected && !Removable ? "0.5" : "1",
@@ -4022,7 +4041,7 @@ const CwMultiFilterTag = props => {
4022
4041
  }, children: [jsxRuntime.jsx("span", { id: ID, "data-value": Value, "data-category": Category, children: Name }), Removable && (jsxRuntime.jsx("span", { onClick: () => props.OnRemove?.(props), children: jsxRuntime.jsx(CwIcon, { iconId: "close" }) }))] }));
4023
4042
  };
4024
4043
 
4025
- var styles$6 = {"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"};
4044
+ 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"};
4026
4045
 
4027
4046
  /**
4028
4047
  * A multiple filter selector, a MULTI-SELECT even. Allows users to select and filter items based on tags.
@@ -4268,9 +4287,9 @@ const CwMultiFilter = ({ allTags, id, onChangeSelectedTags, selectedTags, style
4268
4287
  inputRef.current?.focus();
4269
4288
  }
4270
4289
  };
4271
- return (jsxRuntime.jsxs("form", { ref: componentRef, id: id, className: styles$6["cw-multi-filter"], style: style, onSubmit: (e) => {
4290
+ return (jsxRuntime.jsxs("form", { ref: componentRef, id: id, className: styles$7["cw-multi-filter"], style: style, onSubmit: (e) => {
4272
4291
  e.preventDefault();
4273
- }, children: [jsxRuntime.jsxs("div", { onClick: handleDivClick, className: styles$6["cw-multi-filter-search"], style: isPanelOpen ? { outline: "1px solid var(--cw-color-primary)", outlineOffset: "-2px" } : {}, children: [jsxRuntime.jsxs("ul", { id: id + "_selected_filters", children: [Array.from(selectedTags).map(tag => (React.createElement(CwMultiFilterTag, { ...tag, key: tag.ID, Selectable: false, Removable: true, OnRemove: () => removeTag(tag.ID) }))), jsxRuntime.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 => {
4292
+ }, children: [jsxRuntime.jsxs("div", { onClick: handleDivClick, className: styles$7["cw-multi-filter-search"], style: isPanelOpen ? { outline: "1px solid var(--cw-color-primary)", outlineOffset: "-2px" } : {}, children: [jsxRuntime.jsxs("ul", { id: id + "_selected_filters", children: [Array.from(selectedTags).map(tag => (React.createElement(CwMultiFilterTag, { ...tag, key: tag.ID, Selectable: false, Removable: true, OnRemove: () => removeTag(tag.ID) }))), jsxRuntime.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 => {
4274
4293
  switch (e.key) {
4275
4294
  case "Enter":
4276
4295
  case "Tab":
@@ -4291,7 +4310,7 @@ const CwMultiFilter = ({ allTags, id, onChangeSelectedTags, selectedTags, style
4291
4310
  } })] }), selectedTags.size > 0 ? (jsxRuntime.jsx("input", { type: "reset", value: "\u00D7", onClick: e => {
4292
4311
  e.preventDefault();
4293
4312
  onChangeSelectedTags(new Set());
4294
- } })) : null] }), jsxRuntime.jsxs("section", { className: styles$6["cw-multi-filter-catalog-container"], "data-display-none": !isPanelOpen, children: [jsxRuntime.jsxs("nav", { children: [jsxRuntime.jsx("button", { style: selectedCategory === "All"
4313
+ } })) : null] }), jsxRuntime.jsxs("section", { className: styles$7["cw-multi-filter-catalog-container"], "data-display-none": !isPanelOpen, children: [jsxRuntime.jsxs("nav", { children: [jsxRuntime.jsx("button", { style: selectedCategory === "All"
4295
4314
  ? {
4296
4315
  backgroundColor: "var(--cw-color-primary-container)",
4297
4316
  color: "var(--cw-color-primary)",
@@ -4318,7 +4337,7 @@ const CwMultiFilter = ({ allTags, id, onChangeSelectedTags, selectedTags, style
4318
4337
  } }, props.ID))) })] })] }));
4319
4338
  };
4320
4339
 
4321
- var styles$5 = {"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"};
4340
+ 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"};
4322
4341
 
4323
4342
  function CwTreeView({ data, onSelect, allowParentSelection = false, selectedId: initialSelectedId = null }) {
4324
4343
  const [expanded, setExpanded] = React.useState(new Set());
@@ -4385,10 +4404,10 @@ function CwTreeView({ data, onSelect, allowParentSelection = false, selectedId:
4385
4404
  const isLeaf = !hasChildren;
4386
4405
  const isSelected = selectedId?.toString().toLowerCase() === node.id.toString().toLowerCase();
4387
4406
  const selectable = allowParentSelection || isLeaf;
4388
- return (jsxRuntime.jsxs("div", { className: styles$5["tree-item"], children: [jsxRuntime.jsxs("div", { className: [
4389
- styles$5["tree-node"],
4390
- isSelected && styles$5["selected"],
4391
- !selectable && styles$5["non-selectable"]
4407
+ return (jsxRuntime.jsxs("div", { className: styles$6["tree-item"], children: [jsxRuntime.jsxs("div", { className: [
4408
+ styles$6["tree-node"],
4409
+ isSelected && styles$6["selected"],
4410
+ !selectable && styles$6["non-selectable"]
4392
4411
  ].filter(Boolean).join(' '), style: { paddingLeft: `${depth * 24 + 8}px` }, onClick: () => {
4393
4412
  if (selectable) {
4394
4413
  setSelectedId(node.id);
@@ -4397,7 +4416,7 @@ function CwTreeView({ data, onSelect, allowParentSelection = false, selectedId:
4397
4416
  else {
4398
4417
  toggleExpand(node.id);
4399
4418
  }
4400
- }, children: [hasChildren && (jsxRuntime.jsx(CwIcon, { size: "large", iconId: isExpanded ? "chevron-down" : "chevron-right" })), jsxRuntime.jsx("div", { className: `${styles$5["tree-label"]} ${!hasChildren ? styles$5["tree-spacer"] : ''}`, children: node.label })] }), hasChildren && isExpanded && (jsxRuntime.jsx("div", { className: styles$5["tree-children"], children: node.children.map((child) => renderNode(child, depth + 1)) }))] }, node.id));
4419
+ }, children: [hasChildren && (jsxRuntime.jsx(CwIcon, { size: "large", iconId: isExpanded ? "chevron-down" : "chevron-right" })), jsxRuntime.jsx("div", { className: `${styles$6["tree-label"]} ${!hasChildren ? styles$6["tree-spacer"] : ''}`, children: node.label })] }), hasChildren && isExpanded && (jsxRuntime.jsx("div", { className: styles$6["tree-children"], children: node.children.map((child) => renderNode(child, depth + 1)) }))] }, node.id));
4401
4420
  };
4402
4421
  // Function to search for nodes that match the search term
4403
4422
  const searchInTree = (nodes, searchTerm) => {
@@ -4421,7 +4440,7 @@ function CwTreeView({ data, onSelect, allowParentSelection = false, selectedId:
4421
4440
  return results;
4422
4441
  };
4423
4442
  const filteredData = searchInTree(data, search);
4424
- return (jsxRuntime.jsxs("div", { className: `cw-tree-view ${styles$5["tree-container"]}`, children: [jsxRuntime.jsxs("header", { children: [jsxRuntime.jsx("input", { type: "text", placeholder: "Search in tree...", value: search, onChange: (e) => setSearch(e.target.value) }), search && (jsxRuntime.jsx(CwButton, { onClick: () => setSearch(""), type: "button", icon: "close", variant: "icon", color: "neutral" }))] }), jsxRuntime.jsx("div", { className: styles$5["tree-wrapper"], children: filteredData.length > 0 ? (filteredData.map((node) => renderNode(node))) : (jsxRuntime.jsxs("div", { className: styles$5["empty-state"], children: [jsxRuntime.jsx(CwIcon, { iconId: "comment" }), search ? "No results found" : "There are no items"] })) })] }));
4443
+ return (jsxRuntime.jsxs("div", { className: `cw-tree-view ${styles$6["tree-container"]}`, children: [jsxRuntime.jsxs("header", { children: [jsxRuntime.jsx("input", { type: "text", placeholder: "Search in tree...", value: search, onChange: (e) => setSearch(e.target.value) }), search && (jsxRuntime.jsx(CwButton, { onClick: () => setSearch(""), type: "button", icon: "close", variant: "icon", color: "neutral" }))] }), jsxRuntime.jsx("div", { className: styles$6["tree-wrapper"], children: filteredData.length > 0 ? (filteredData.map((node) => renderNode(node))) : (jsxRuntime.jsxs("div", { className: styles$6["empty-state"], children: [jsxRuntime.jsx(CwIcon, { iconId: "comment" }), search ? "No results found" : "There are no items"] })) })] }));
4425
4444
  }
4426
4445
 
4427
4446
  function CwSearchInput(optionsProps) {
@@ -4503,7 +4522,7 @@ function CwSearchInput(optionsProps) {
4503
4522
  : option.description }, option.id))) }) }))] }));
4504
4523
  }
4505
4524
 
4506
- var styles$4 = {"context-menu":"cw-context-menu-module_context-menu__dbxnO","context-menu-item":"cw-context-menu-module_context-menu-item__B2W-Q"};
4525
+ var styles$5 = {"context-menu":"cw-context-menu-module_context-menu__dbxnO","context-menu-item":"cw-context-menu-module_context-menu-item__B2W-Q"};
4507
4526
 
4508
4527
  /**
4509
4528
  * A context menu that is rendered when the user clicks on a button.
@@ -4540,10 +4559,10 @@ const CwContextMenu = ({ children, options, offset, onSelect }) => {
4540
4559
  document.removeEventListener("mousedown", handleOutsideClick);
4541
4560
  };
4542
4561
  }, []);
4543
- return (jsxRuntime.jsxs("div", { onContextMenu: handleContextMenu, children: [children, isOpen && (jsxRuntime.jsx("div", { ref: menuRef, className: styles$4["context-menu"], style: {
4562
+ return (jsxRuntime.jsxs("div", { onContextMenu: handleContextMenu, children: [children, isOpen && (jsxRuntime.jsx("div", { ref: menuRef, className: styles$5["context-menu"], style: {
4544
4563
  top: position.y + (offset?.y || 0),
4545
4564
  left: position.x + (offset?.x || 0),
4546
- }, children: options.map(option => (jsxRuntime.jsx("div", { onClick: () => handleOptionClick(option), className: styles$4["context-menu-item"], children: option }, option))) }))] }));
4565
+ }, children: options.map(option => (jsxRuntime.jsx("div", { onClick: () => handleOptionClick(option), className: styles$5["context-menu-item"], children: option }, option))) }))] }));
4547
4566
  };
4548
4567
 
4549
4568
  function CwDataItem(cwBoxItemsProps) {
@@ -4788,6 +4807,1223 @@ function CwBtnDelay({ cw_btnOnclick, cw_btn_disabled }) {
4788
4807
  return jsxRuntime.jsx("button", { onClick: cw_btnOnclick, className: "cw-button-icon cwi-icons cwi-plane-delay", disabled: cw_btn_disabled });
4789
4808
  }
4790
4809
 
4810
+ 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"};
4811
+
4812
+ function CustomCaption$2({ displayMonth }) {
4813
+ const { goToMonth, nextMonth, previousMonth } = reactDayPicker.useNavigation();
4814
+ return (jsxRuntime.jsxs("header", { children: [jsxRuntime.jsx(CwButton, { type: "button", variant: "icon", icon: "chevron-left", onClick: () => previousMonth && goToMonth(previousMonth), disabled: !previousMonth, "aria-label": "Previous month" }), jsxRuntime.jsx("div", { className: styles$4.title, children: dateFns.format(displayMonth, "MMMM yyyy", { locale: locale.enGB }) }), jsxRuntime.jsx(CwButton, { type: "button", variant: "icon", icon: "chevron-right", onClick: () => nextMonth && goToMonth(nextMonth), disabled: !nextMonth, "aria-label": "Next month" })] }));
4815
+ }
4816
+ 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, }) {
4817
+ const [isOpen, setIsOpen] = React.useState(false);
4818
+ const [inputValue, setInputValue] = React.useState("");
4819
+ const containerRef = React.useRef(null);
4820
+ const inputRef = React.useRef(null);
4821
+ const prevValueRef = React.useRef(value);
4822
+ // Parse date from string based on format
4823
+ const parseDate = React.useCallback((dateString, formatStr) => {
4824
+ try {
4825
+ const cleanString = dateString.trim();
4826
+ const parts = cleanString.split(/[\/\-\.]/);
4827
+ if (parts.length !== 3)
4828
+ return undefined;
4829
+ let day;
4830
+ let month;
4831
+ let year;
4832
+ const formatLower = formatStr.toLowerCase();
4833
+ const dayIndex = formatLower.indexOf('dd');
4834
+ const monthIndex = formatLower.indexOf('mm');
4835
+ const yearIndex = formatLower.indexOf('yyyy') !== -1
4836
+ ? formatLower.indexOf('yyyy')
4837
+ : formatLower.indexOf('yy');
4838
+ const positions = [
4839
+ { type: 'day', index: dayIndex },
4840
+ { type: 'month', index: monthIndex },
4841
+ { type: 'year', index: yearIndex }
4842
+ ].sort((a, b) => a.index - b.index);
4843
+ positions.forEach((pos, idx) => {
4844
+ const value = parseInt(parts[idx], 10);
4845
+ if (pos.type === 'day')
4846
+ day = value;
4847
+ else if (pos.type === 'month')
4848
+ month = value - 1;
4849
+ else if (pos.type === 'year')
4850
+ year = value;
4851
+ });
4852
+ if (day === undefined || month === undefined || year === undefined)
4853
+ return undefined;
4854
+ if (isNaN(day) || isNaN(month) || isNaN(year))
4855
+ return undefined;
4856
+ if (year < 100) {
4857
+ year = year < 50 ? 2000 + year : 1900 + year;
4858
+ }
4859
+ const parsed = new Date(year, month, day);
4860
+ if (parsed.getDate() === day &&
4861
+ parsed.getMonth() === month &&
4862
+ parsed.getFullYear() === year) {
4863
+ return parsed;
4864
+ }
4865
+ return undefined;
4866
+ }
4867
+ catch {
4868
+ return undefined;
4869
+ }
4870
+ }, []);
4871
+ const normalizeDateForComparison = React.useCallback((date) => {
4872
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
4873
+ }, []);
4874
+ // Validate and set date - shared logic
4875
+ const validateAndSetDate = React.useCallback((dateString) => {
4876
+ const parsed = parseDate(dateString, displayFormat);
4877
+ if (parsed && !isNaN(parsed.getTime())) {
4878
+ const normalizedParsed = normalizeDateForComparison(parsed);
4879
+ const normalizedMin = minDate ? normalizeDateForComparison(minDate) : undefined;
4880
+ const normalizedMax = maxDate ? normalizeDateForComparison(maxDate) : undefined;
4881
+ const isValid = (!normalizedMin || normalizedParsed >= normalizedMin) &&
4882
+ (!normalizedMax || normalizedParsed <= normalizedMax);
4883
+ if (isValid) {
4884
+ onChange(parsed);
4885
+ return true;
4886
+ }
4887
+ }
4888
+ return false;
4889
+ }, [parseDate, displayFormat, minDate, maxDate, onChange, normalizeDateForComparison]);
4890
+ // Sync input value with prop value - only when changed externally
4891
+ React.useEffect(() => {
4892
+ const currentValue = value;
4893
+ if (currentValue !== prevValueRef.current) {
4894
+ prevValueRef.current = currentValue;
4895
+ if (currentValue) {
4896
+ setInputValue(dateFns.format(currentValue, displayFormat, { locale: locale.enGB }));
4897
+ }
4898
+ else {
4899
+ setInputValue("");
4900
+ }
4901
+ }
4902
+ }, [value, displayFormat]);
4903
+ // Close calendar when clicking outside
4904
+ React.useEffect(() => {
4905
+ const handleClickOutside = (event) => {
4906
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
4907
+ setIsOpen(false);
4908
+ }
4909
+ };
4910
+ if (isOpen) {
4911
+ document.addEventListener("mousedown", handleClickOutside);
4912
+ }
4913
+ return () => {
4914
+ document.removeEventListener("mousedown", handleClickOutside);
4915
+ };
4916
+ }, [isOpen]);
4917
+ const handleDaySelect = React.useCallback((date) => {
4918
+ onChange(date);
4919
+ setIsOpen(false);
4920
+ inputRef.current?.blur();
4921
+ }, [onChange]);
4922
+ const handleClear = React.useCallback((e) => {
4923
+ e.stopPropagation();
4924
+ onChange(undefined);
4925
+ setInputValue("");
4926
+ }, [onChange]);
4927
+ const handleInputClick = React.useCallback(() => {
4928
+ if (!disabled) {
4929
+ setIsOpen(true);
4930
+ }
4931
+ }, [disabled]);
4932
+ const handleInputChange = React.useCallback((e) => {
4933
+ const newValue = e.target.value;
4934
+ setInputValue(newValue);
4935
+ if (newValue.length >= 10) {
4936
+ validateAndSetDate(newValue);
4937
+ }
4938
+ else if (newValue === "") {
4939
+ onChange(undefined);
4940
+ }
4941
+ }, [validateAndSetDate, onChange]);
4942
+ const handleInputBlur = React.useCallback(() => {
4943
+ if (inputValue && inputValue.trim() !== "") {
4944
+ const parsed = parseDate(inputValue, displayFormat);
4945
+ if (parsed && !isNaN(parsed.getTime())) {
4946
+ const normalizedParsed = normalizeDateForComparison(parsed);
4947
+ const normalizedMin = minDate ? normalizeDateForComparison(minDate) : undefined;
4948
+ const normalizedMax = maxDate ? normalizeDateForComparison(maxDate) : undefined;
4949
+ const isValid = (!normalizedMin || normalizedParsed >= normalizedMin) &&
4950
+ (!normalizedMax || normalizedParsed <= normalizedMax);
4951
+ if (isValid) {
4952
+ onChange(parsed);
4953
+ setInputValue(dateFns.format(parsed, displayFormat, { locale: locale.enGB }));
4954
+ return;
4955
+ }
4956
+ }
4957
+ }
4958
+ if (!value) {
4959
+ setInputValue("");
4960
+ }
4961
+ else {
4962
+ setInputValue(dateFns.format(value, displayFormat, { locale: locale.enGB }));
4963
+ }
4964
+ }, [inputValue, parseDate, displayFormat, minDate, maxDate, onChange, value, normalizeDateForComparison]);
4965
+ const handleInputKeyDown = React.useCallback((e) => {
4966
+ if (e.key === "Enter") {
4967
+ e.preventDefault();
4968
+ inputRef.current?.blur();
4969
+ setIsOpen(false);
4970
+ }
4971
+ else if (e.key === "Escape") {
4972
+ setIsOpen(false);
4973
+ inputRef.current?.blur();
4974
+ }
4975
+ }, []);
4976
+ const handleTodayClick = React.useCallback(() => {
4977
+ const today = new Date();
4978
+ const isTodayValid = (!minDate || today >= minDate) &&
4979
+ (!maxDate || today <= maxDate);
4980
+ if (isTodayValid) {
4981
+ onChange(today);
4982
+ setIsOpen(false);
4983
+ }
4984
+ }, [minDate, maxDate, onChange]);
4985
+ // Memoize formatters
4986
+ const formatters = React.useMemo(() => ({
4987
+ formatCaption: (date) => dateFns.format(date, "MMMM yyyy", { locale: locale.enGB }),
4988
+ formatWeekdayName: (date) => dateFns.format(date, "EEEEEE", { locale: locale.enGB })
4989
+ }), []);
4990
+ // Memoize disabled days
4991
+ const disabledDays = React.useMemo(() => [
4992
+ ...(disabledDates || []),
4993
+ ...(minDate ? [{ before: minDate }] : []),
4994
+ ...(maxDate ? [{ after: maxDate }] : []),
4995
+ ...(disabledMatcher ? [disabledMatcher] : []),
4996
+ ], [disabledDates, minDate, maxDate, disabledMatcher]);
4997
+ return (jsxRuntime.jsx("div", { ref: containerRef, className: `cw-datepicker ${className || ""}`, children: jsxRuntime.jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsxRuntime.jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxRuntime.jsxs("div", { className: styles$4.pickerWrapper, children: [jsxRuntime.jsx("input", { ref: inputRef, type: "text", value: inputValue, placeholder: placeholder, onChange: handleInputChange, onBlur: handleInputBlur, onClick: handleInputClick, onKeyDown: handleInputKeyDown, disabled: disabled, required: required }), jsxRuntime.jsx("div", { className: styles$4.pickerIcons, children: showClear && value && !disabled ? (jsxRuntime.jsx(CwButton, { type: "button", variant: "icon", color: "neutral", icon: "close", onClick: handleClear, tabIndex: -1, "aria-label": "Clear date" })) : (jsxRuntime.jsx(CwIcon, { iconId: "calendar" })) }), isOpen && (jsxRuntime.jsxs("div", { className: styles$4.pickerPopup, "data-position": popupPosition, children: [jsxRuntime.jsx(reactDayPicker.DayPicker, { mode: "single", selected: value || undefined, defaultMonth: value || undefined, onSelect: handleDaySelect, disabled: disabledDays, locale: locale.enGB, numberOfMonths: numberOfMonths, formatters: formatters, components: {
4998
+ Caption: (props) => (jsxRuntime.jsx(CustomCaption$2, { ...props })),
4999
+ }, modifiers: {
5000
+ today: new Date(),
5001
+ }, modifiersClassNames: {
5002
+ today: "rdp-day_today",
5003
+ } }), showTodayButton && (jsxRuntime.jsx("footer", { className: "cw-flex-row cw-align-right-center", children: jsxRuntime.jsx(CwButton, { type: "button", variant: "outline", onClick: handleTodayClick, text: "Today" }) }))] }))] })] }) }));
5004
+ }
5005
+
5006
+ var rangeStyles = {"rangeWrapper":"cw-range-picker-module_rangeWrapper__1nIVs","rangePopup":"cw-range-picker-module_rangePopup__E5jd1","presetList":"cw-range-picker-module_presetList__INiLo"};
5007
+
5008
+ const PRESET_LIBRARY = {
5009
+ // === PAST DAYS ===
5010
+ past7Days: {
5011
+ key: 'past7Days',
5012
+ label: 'Past 7 days',
5013
+ getValue: () => {
5014
+ const today = new Date();
5015
+ const past = new Date(today);
5016
+ past.setDate(today.getDate() - 7);
5017
+ return { from: past, to: today };
5018
+ }
5019
+ },
5020
+ past14Days: {
5021
+ key: 'past14Days',
5022
+ label: 'Past 14 days',
5023
+ getValue: () => {
5024
+ const today = new Date();
5025
+ const past = new Date(today);
5026
+ past.setDate(today.getDate() - 14);
5027
+ return { from: past, to: today };
5028
+ }
5029
+ },
5030
+ past30Days: {
5031
+ key: 'past30Days',
5032
+ label: 'Past 30 days',
5033
+ getValue: () => {
5034
+ const today = new Date();
5035
+ const past = new Date(today);
5036
+ past.setDate(today.getDate() - 30);
5037
+ return { from: past, to: today };
5038
+ }
5039
+ },
5040
+ past90Days: {
5041
+ key: 'past90Days',
5042
+ label: 'Past 90 days',
5043
+ getValue: () => {
5044
+ const today = new Date();
5045
+ const past = new Date(today);
5046
+ past.setDate(today.getDate() - 90);
5047
+ return { from: past, to: today };
5048
+ }
5049
+ },
5050
+ // === NEXT DAYS ===
5051
+ next7Days: {
5052
+ key: 'next7Days',
5053
+ label: 'Next 7 days',
5054
+ getValue: () => {
5055
+ const today = new Date();
5056
+ const next = new Date(today);
5057
+ next.setDate(today.getDate() + 7);
5058
+ return { from: today, to: next };
5059
+ }
5060
+ },
5061
+ next14Days: {
5062
+ key: 'next14Days',
5063
+ label: 'Next 14 days',
5064
+ getValue: () => {
5065
+ const today = new Date();
5066
+ const next = new Date(today);
5067
+ next.setDate(today.getDate() + 14);
5068
+ return { from: today, to: next };
5069
+ }
5070
+ },
5071
+ next30Days: {
5072
+ key: 'next30Days',
5073
+ label: 'Next 30 days',
5074
+ getValue: () => {
5075
+ const today = new Date();
5076
+ const next = new Date(today);
5077
+ next.setDate(today.getDate() + 30);
5078
+ return { from: today, to: next };
5079
+ }
5080
+ },
5081
+ // === WEEKS ===
5082
+ thisWeek: {
5083
+ key: 'thisWeek',
5084
+ label: 'This week',
5085
+ getValue: () => {
5086
+ const today = new Date();
5087
+ const firstDay = new Date(today);
5088
+ const lastDay = new Date(today);
5089
+ const day = today.getDay();
5090
+ const diff = day === 0 ? -6 : 1 - day; // Monday as first day
5091
+ firstDay.setDate(today.getDate() + diff);
5092
+ lastDay.setDate(firstDay.getDate() + 6); // Sunday
5093
+ return { from: firstDay, to: lastDay };
5094
+ }
5095
+ },
5096
+ lastWeek: {
5097
+ key: 'lastWeek',
5098
+ label: 'Last week',
5099
+ getValue: () => {
5100
+ const today = new Date();
5101
+ const lastWeekEnd = new Date(today);
5102
+ const day = today.getDay();
5103
+ const diff = day === 0 ? -6 : 1 - day;
5104
+ lastWeekEnd.setDate(today.getDate() + diff - 1);
5105
+ const lastWeekStart = new Date(lastWeekEnd);
5106
+ lastWeekStart.setDate(lastWeekEnd.getDate() - 6);
5107
+ return { from: lastWeekStart, to: lastWeekEnd };
5108
+ }
5109
+ },
5110
+ nextWeek: {
5111
+ key: 'nextWeek',
5112
+ label: 'Next week',
5113
+ getValue: () => {
5114
+ const today = new Date();
5115
+ const nextWeekStart = new Date(today);
5116
+ const day = today.getDay();
5117
+ const diff = day === 0 ? 1 : 8 - day;
5118
+ nextWeekStart.setDate(today.getDate() + diff);
5119
+ const nextWeekEnd = new Date(nextWeekStart);
5120
+ nextWeekEnd.setDate(nextWeekStart.getDate() + 6);
5121
+ return { from: nextWeekStart, to: nextWeekEnd };
5122
+ }
5123
+ },
5124
+ // === MONTHS ===
5125
+ thisMonth: {
5126
+ key: 'thisMonth',
5127
+ label: 'This month',
5128
+ getValue: () => {
5129
+ const today = new Date();
5130
+ const firstDay = new Date(today.getFullYear(), today.getMonth(), 1);
5131
+ const lastDay = new Date(today.getFullYear(), today.getMonth() + 1, 0);
5132
+ return { from: firstDay, to: lastDay };
5133
+ }
5134
+ },
5135
+ lastMonth: {
5136
+ key: 'lastMonth',
5137
+ label: 'Last month',
5138
+ getValue: () => {
5139
+ const today = new Date();
5140
+ const firstDay = new Date(today.getFullYear(), today.getMonth() - 1, 1);
5141
+ const lastDay = new Date(today.getFullYear(), today.getMonth(), 0);
5142
+ return { from: firstDay, to: lastDay };
5143
+ }
5144
+ },
5145
+ nextMonth: {
5146
+ key: 'nextMonth',
5147
+ label: 'Next month',
5148
+ getValue: () => {
5149
+ const today = new Date();
5150
+ const firstDay = new Date(today.getFullYear(), today.getMonth() + 1, 1);
5151
+ const lastDay = new Date(today.getFullYear(), today.getMonth() + 2, 0);
5152
+ return { from: firstDay, to: lastDay };
5153
+ }
5154
+ },
5155
+ // === QUARTERS ===
5156
+ thisQuarter: {
5157
+ key: 'thisQuarter',
5158
+ label: 'This quarter',
5159
+ getValue: () => {
5160
+ const today = new Date();
5161
+ const quarter = Math.floor(today.getMonth() / 3);
5162
+ const firstDay = new Date(today.getFullYear(), quarter * 3, 1);
5163
+ const lastDay = new Date(today.getFullYear(), quarter * 3 + 3, 0);
5164
+ return { from: firstDay, to: lastDay };
5165
+ }
5166
+ },
5167
+ lastQuarter: {
5168
+ key: 'lastQuarter',
5169
+ label: 'Last quarter',
5170
+ getValue: () => {
5171
+ const today = new Date();
5172
+ const currentQuarter = Math.floor(today.getMonth() / 3);
5173
+ const lastQuarter = currentQuarter === 0 ? 3 : currentQuarter - 1;
5174
+ const year = currentQuarter === 0 ? today.getFullYear() - 1 : today.getFullYear();
5175
+ const firstDay = new Date(year, lastQuarter * 3, 1);
5176
+ const lastDay = new Date(year, lastQuarter * 3 + 3, 0);
5177
+ return { from: firstDay, to: lastDay };
5178
+ }
5179
+ },
5180
+ nextQuarter: {
5181
+ key: 'nextQuarter',
5182
+ label: 'Next quarter',
5183
+ getValue: () => {
5184
+ const today = new Date();
5185
+ const currentQuarter = Math.floor(today.getMonth() / 3);
5186
+ const nextQuarter = (currentQuarter + 1) % 4;
5187
+ const year = nextQuarter === 0 ? today.getFullYear() + 1 : today.getFullYear();
5188
+ const firstDay = new Date(year, nextQuarter * 3, 1);
5189
+ const lastDay = new Date(year, nextQuarter * 3 + 3, 0);
5190
+ return { from: firstDay, to: lastDay };
5191
+ }
5192
+ },
5193
+ // === YEAR ===
5194
+ thisYear: {
5195
+ key: 'thisYear',
5196
+ label: 'This year',
5197
+ getValue: () => {
5198
+ const today = new Date();
5199
+ const firstDay = new Date(today.getFullYear(), 0, 1);
5200
+ const lastDay = new Date(today.getFullYear(), 11, 31);
5201
+ return { from: firstDay, to: lastDay };
5202
+ }
5203
+ },
5204
+ lastYear: {
5205
+ key: 'lastYear',
5206
+ label: 'Last year',
5207
+ getValue: () => {
5208
+ const today = new Date();
5209
+ const firstDay = new Date(today.getFullYear() - 1, 0, 1);
5210
+ const lastDay = new Date(today.getFullYear() - 1, 11, 31);
5211
+ return { from: firstDay, to: lastDay };
5212
+ }
5213
+ }
5214
+ };
5215
+ /**
5216
+ * Helper function to get presets by their keys
5217
+ * @param keys - Array of preset keys from PRESET_LIBRARY
5218
+ * @returns Array of DateRangePreset objects
5219
+ *
5220
+ * @example
5221
+ * const presets = getPresetsByKeys(['thisWeek', 'past7Days', 'past30Days']);
5222
+ */
5223
+ const getPresetsByKeys = (keys) => {
5224
+ return keys
5225
+ .map(key => PRESET_LIBRARY[key])
5226
+ .filter(preset => preset !== undefined);
5227
+ };
5228
+
5229
+ function CustomCaption$1({ displayMonth }) {
5230
+ const { goToMonth, nextMonth, previousMonth } = reactDayPicker.useNavigation();
5231
+ return (jsxRuntime.jsxs("header", { children: [jsxRuntime.jsx(CwButton, { type: "button", variant: "icon", icon: "chevron-left", onClick: () => previousMonth && goToMonth(previousMonth), disabled: !previousMonth, "aria-label": "Previous month" }), jsxRuntime.jsx("div", { className: styles$4.title, children: dateFns.format(displayMonth, "MMMM yyyy", { locale: locale.enGB }) }), jsxRuntime.jsx(CwButton, { type: "button", variant: "icon", icon: "chevron-right", onClick: () => nextMonth && goToMonth(nextMonth), disabled: !nextMonth, "aria-label": "Next month" })] }));
5232
+ }
5233
+ 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, }) {
5234
+ const [isOpen, setIsOpen] = React.useState(false);
5235
+ const [inputFromValue, setInputFromValue] = React.useState("");
5236
+ const [inputToValue, setInputToValue] = React.useState("");
5237
+ const [focusedInput, setFocusedInput] = React.useState();
5238
+ const containerRef = React.useRef(null);
5239
+ const inputFromRef = React.useRef(null);
5240
+ const inputToRef = React.useRef(null);
5241
+ const prevValueRef = React.useRef(value ?? null);
5242
+ // Calculate presets to render
5243
+ const presetsToRender = React.useMemo(() => {
5244
+ let presets = [];
5245
+ // If presetKeys provided, use those from library
5246
+ if (presetKeys && presetKeys.length > 0) {
5247
+ presets = getPresetsByKeys(presetKeys);
5248
+ }
5249
+ // Add custom presets if provided
5250
+ if (customPresets && customPresets.length > 0) {
5251
+ presets = [...presets, ...customPresets];
5252
+ }
5253
+ return presets;
5254
+ }, [presetKeys, customPresets]);
5255
+ // Parse date from string based on format
5256
+ const parseDate = React.useCallback((dateString, formatStr) => {
5257
+ try {
5258
+ const cleanString = dateString.trim();
5259
+ const parts = cleanString.split(/[\/\-\.]/);
5260
+ if (parts.length !== 3)
5261
+ return undefined;
5262
+ let day;
5263
+ let month;
5264
+ let year;
5265
+ const formatLower = formatStr.toLowerCase();
5266
+ const dayIndex = formatLower.indexOf('dd');
5267
+ const monthIndex = formatLower.indexOf('mm');
5268
+ const yearIndex = formatLower.indexOf('yyyy') !== -1
5269
+ ? formatLower.indexOf('yyyy')
5270
+ : formatLower.indexOf('yy');
5271
+ const positions = [
5272
+ { type: 'day', index: dayIndex },
5273
+ { type: 'month', index: monthIndex },
5274
+ { type: 'year', index: yearIndex }
5275
+ ].sort((a, b) => a.index - b.index);
5276
+ positions.forEach((pos, idx) => {
5277
+ const value = parseInt(parts[idx], 10);
5278
+ if (pos.type === 'day')
5279
+ day = value;
5280
+ else if (pos.type === 'month')
5281
+ month = value - 1;
5282
+ else if (pos.type === 'year')
5283
+ year = value;
5284
+ });
5285
+ if (day === undefined || month === undefined || year === undefined)
5286
+ return undefined;
5287
+ if (isNaN(day) || isNaN(month) || isNaN(year))
5288
+ return undefined;
5289
+ if (year < 100) {
5290
+ year = year < 50 ? 2000 + year : 1900 + year;
5291
+ }
5292
+ const parsed = new Date(year, month, day);
5293
+ if (parsed.getDate() === day &&
5294
+ parsed.getMonth() === month &&
5295
+ parsed.getFullYear() === year) {
5296
+ return parsed;
5297
+ }
5298
+ return undefined;
5299
+ }
5300
+ catch {
5301
+ return undefined;
5302
+ }
5303
+ }, []);
5304
+ const normalizeDateForComparison = React.useCallback((date) => {
5305
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
5306
+ }, []);
5307
+ // Validate date range
5308
+ const validateRange = React.useCallback((from, to) => {
5309
+ if (!from || !to)
5310
+ return true; // Partial ranges are OK during selection
5311
+ // Check if "from" is before "to"
5312
+ if (from > to)
5313
+ return false;
5314
+ // Check max range days
5315
+ if (maxRangeDays) {
5316
+ const daysDiff = Math.floor((to.getTime() - from.getTime()) / (1000 * 60 * 60 * 24));
5317
+ if (daysDiff > maxRangeDays)
5318
+ return false;
5319
+ }
5320
+ return true;
5321
+ }, [maxRangeDays]);
5322
+ // Sync input values with prop value
5323
+ React.useEffect(() => {
5324
+ const currentValue = value ?? undefined;
5325
+ if (currentValue !== prevValueRef.current) {
5326
+ prevValueRef.current = currentValue ?? null;
5327
+ if (currentValue?.from) {
5328
+ setInputFromValue(dateFns.format(currentValue.from, displayFormat, { locale: locale.enGB }));
5329
+ }
5330
+ else {
5331
+ setInputFromValue("");
5332
+ }
5333
+ if (currentValue?.to) {
5334
+ setInputToValue(dateFns.format(currentValue.to, displayFormat, { locale: locale.enGB }));
5335
+ }
5336
+ else {
5337
+ setInputToValue("");
5338
+ }
5339
+ }
5340
+ }, [value, displayFormat]);
5341
+ // Close calendar when clicking outside
5342
+ React.useEffect(() => {
5343
+ const handleClickOutside = (event) => {
5344
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
5345
+ setIsOpen(false);
5346
+ setFocusedInput(undefined);
5347
+ }
5348
+ };
5349
+ if (isOpen) {
5350
+ document.addEventListener("mousedown", handleClickOutside);
5351
+ }
5352
+ return () => {
5353
+ document.removeEventListener("mousedown", handleClickOutside);
5354
+ };
5355
+ }, [isOpen]);
5356
+ const handleRangeSelect = React.useCallback((range) => {
5357
+ if (!range) {
5358
+ onChange(undefined);
5359
+ return;
5360
+ }
5361
+ const newRange = {
5362
+ from: range.from,
5363
+ to: range.to
5364
+ };
5365
+ // Validate range
5366
+ if (newRange.from && newRange.to && !validateRange(newRange.from, newRange.to)) {
5367
+ return; // Don't update if invalid
5368
+ }
5369
+ onChange(newRange);
5370
+ // Close if both dates are selected
5371
+ if (range.from && range.to) {
5372
+ setIsOpen(false);
5373
+ setFocusedInput(undefined);
5374
+ }
5375
+ }, [onChange, validateRange]);
5376
+ const handleClearFrom = React.useCallback((e) => {
5377
+ e.stopPropagation();
5378
+ onChange({ from: undefined, to: value?.to });
5379
+ setInputFromValue("");
5380
+ }, [onChange, value]);
5381
+ const handleClearTo = React.useCallback((e) => {
5382
+ e.stopPropagation();
5383
+ onChange({ from: value?.from, to: undefined });
5384
+ setInputToValue("");
5385
+ }, [onChange, value]);
5386
+ const handleInputFromClick = React.useCallback(() => {
5387
+ if (!disabled) {
5388
+ setIsOpen(true);
5389
+ setFocusedInput('from');
5390
+ }
5391
+ }, [disabled]);
5392
+ const handleInputToClick = React.useCallback(() => {
5393
+ if (!disabled) {
5394
+ setIsOpen(true);
5395
+ setFocusedInput('to');
5396
+ }
5397
+ }, [disabled]);
5398
+ const handleInputFromChange = React.useCallback((e) => {
5399
+ const newValue = e.target.value;
5400
+ setInputFromValue(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) {
5410
+ onChange({ from: parsed, to: value?.to });
5411
+ }
5412
+ }
5413
+ }
5414
+ else if (newValue === "") {
5415
+ onChange({ from: undefined, to: value?.to });
5416
+ }
5417
+ }, [parseDate, displayFormat, minDate, maxDate, normalizeDateForComparison, onChange, value]);
5418
+ const handleInputToChange = React.useCallback((e) => {
5419
+ const newValue = e.target.value;
5420
+ setInputToValue(newValue);
5421
+ if (newValue.length >= 10) {
5422
+ const parsed = parseDate(newValue, 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 && validateRange(value?.from, parsed)) {
5430
+ onChange({ from: value?.from, to: parsed });
5431
+ }
5432
+ }
5433
+ }
5434
+ else if (newValue === "") {
5435
+ onChange({ from: value?.from, to: undefined });
5436
+ }
5437
+ }, [parseDate, displayFormat, minDate, maxDate, normalizeDateForComparison, validateRange, onChange, value]);
5438
+ const handleInputBlur = React.useCallback((type) => {
5439
+ const inputValue = type === 'from' ? inputFromValue : inputToValue;
5440
+ const currentValue = type === 'from' ? value?.from : value?.to;
5441
+ if (inputValue && inputValue.trim() !== "") {
5442
+ const parsed = parseDate(inputValue, displayFormat);
5443
+ if (parsed && !isNaN(parsed.getTime())) {
5444
+ const normalizedParsed = normalizeDateForComparison(parsed);
5445
+ const normalizedMin = minDate ? normalizeDateForComparison(minDate) : undefined;
5446
+ const normalizedMax = maxDate ? normalizeDateForComparison(maxDate) : undefined;
5447
+ const isValid = (!normalizedMin || normalizedParsed >= normalizedMin) &&
5448
+ (!normalizedMax || normalizedParsed <= normalizedMax);
5449
+ if (isValid) {
5450
+ const newRange = type === 'from'
5451
+ ? { from: parsed, to: value?.to }
5452
+ : { from: value?.from, to: parsed };
5453
+ if (validateRange(newRange.from, newRange.to)) {
5454
+ onChange(newRange);
5455
+ if (type === 'from') {
5456
+ setInputFromValue(dateFns.format(parsed, displayFormat, { locale: locale.enGB }));
5457
+ }
5458
+ else {
5459
+ setInputToValue(dateFns.format(parsed, displayFormat, { locale: locale.enGB }));
5460
+ }
5461
+ return;
5462
+ }
5463
+ }
5464
+ }
5465
+ }
5466
+ // Reset to current value if invalid
5467
+ if (type === 'from') {
5468
+ setInputFromValue(currentValue ? dateFns.format(currentValue, displayFormat, { locale: locale.enGB }) : "");
5469
+ }
5470
+ else {
5471
+ setInputToValue(currentValue ? dateFns.format(currentValue, displayFormat, { locale: locale.enGB }) : "");
5472
+ }
5473
+ }, [inputFromValue, inputToValue, value, parseDate, displayFormat, minDate, maxDate, normalizeDateForComparison, validateRange, onChange]);
5474
+ const handleInputKeyDown = React.useCallback((e, type) => {
5475
+ if (e.key === "Enter") {
5476
+ e.preventDefault();
5477
+ if (type === 'from') {
5478
+ inputFromRef.current?.blur();
5479
+ inputToRef.current?.focus();
5480
+ }
5481
+ else {
5482
+ inputToRef.current?.blur();
5483
+ setIsOpen(false);
5484
+ }
5485
+ }
5486
+ else if (e.key === "Escape") {
5487
+ setIsOpen(false);
5488
+ if (type === 'from') {
5489
+ inputFromRef.current?.blur();
5490
+ }
5491
+ else {
5492
+ inputToRef.current?.blur();
5493
+ }
5494
+ }
5495
+ }, []);
5496
+ // Handle preset click
5497
+ const handlePresetClick = React.useCallback((preset) => {
5498
+ onChange(preset.getValue());
5499
+ setIsOpen(false);
5500
+ }, [onChange]);
5501
+ // Memoize formatters
5502
+ const formatters = React.useMemo(() => ({
5503
+ formatCaption: (date) => dateFns.format(date, "MMMM yyyy", { locale: locale.enGB }),
5504
+ formatWeekdayName: (date) => dateFns.format(date, "EEEEEE", { locale: locale.enGB })
5505
+ }), []);
5506
+ // Memoize disabled days
5507
+ const disabledDays = React.useMemo(() => {
5508
+ const baseDisabled = [
5509
+ ...(disabledDates || []),
5510
+ ...(minDate ? [{ before: minDate }] : []),
5511
+ ...(maxDate ? [{ after: maxDate }] : []),
5512
+ ...(disabledMatcher ? [disabledMatcher] : []),
5513
+ ];
5514
+ // If maxRangeDays is set and we have a "from" date, disable dates beyond the range
5515
+ if (maxRangeDays && value?.from && !value?.to) {
5516
+ const maxDate = new Date(value.from);
5517
+ maxDate.setDate(maxDate.getDate() + maxRangeDays);
5518
+ baseDisabled.push({ after: maxDate });
5519
+ }
5520
+ return baseDisabled;
5521
+ }, [disabledDates, minDate, maxDate, disabledMatcher, maxRangeDays, value]);
5522
+ const selectedRange = React.useMemo(() => {
5523
+ if (value?.from || value?.to) {
5524
+ return {
5525
+ from: value?.from || undefined,
5526
+ to: value?.to || undefined
5527
+ };
5528
+ }
5529
+ return undefined;
5530
+ }, [value]);
5531
+ return (jsxRuntime.jsx("div", { ref: containerRef, className: `cw-rangepicker ${className || ""}`, children: jsxRuntime.jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsxRuntime.jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxRuntime.jsxs("div", { className: rangeStyles.rangeWrapper, children: [jsxRuntime.jsxs("div", { className: styles$4.pickerWrapper, children: [jsxRuntime.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' }), jsxRuntime.jsx("div", { className: styles$4.pickerIcons, children: showClear && value?.from && !disabled ? (jsxRuntime.jsx(CwButton, { type: "button", variant: "icon", color: "neutral", icon: "close", onClick: handleClearFrom, tabIndex: -1, "aria-label": "Clear from date" })) : (jsxRuntime.jsx(CwIcon, { iconId: "calendar" })) })] }), jsxRuntime.jsx(CwIcon, { iconId: "arrow-right", size: "medium" }), jsxRuntime.jsxs("div", { className: styles$4.pickerWrapper, children: [jsxRuntime.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' }), jsxRuntime.jsx("div", { className: styles$4.pickerIcons, children: showClear && value?.to && !disabled ? (jsxRuntime.jsx(CwButton, { type: "button", variant: "icon", color: "neutral", icon: "close", onClick: handleClearTo, tabIndex: -1, "aria-label": "Clear to date" })) : (jsxRuntime.jsx(CwIcon, { iconId: "calendar" })) })] }), isOpen && (jsxRuntime.jsxs("div", { className: `${styles$4.pickerPopup} ${rangeStyles.rangePopup}`, "data-position": popupPosition, children: [showPresets && presetsToRender.length > 0 && (jsxRuntime.jsx("div", { className: rangeStyles.presetList, children: presetsToRender.map((preset) => (jsxRuntime.jsx("button", { type: "button", onClick: () => handlePresetClick(preset), children: preset.label }, preset.key))) })), jsxRuntime.jsx(reactDayPicker.DayPicker, { mode: "range", selected: selectedRange, onSelect: handleRangeSelect, disabled: disabledDays, locale: locale.enGB, numberOfMonths: numberOfMonths, formatters: formatters, components: {
5532
+ Caption: (props) => jsxRuntime.jsx(CustomCaption$1, { ...props }),
5533
+ }, modifiers: {
5534
+ today: new Date(),
5535
+ }, modifiersClassNames: {
5536
+ today: "rdp-day_today",
5537
+ } })] }))] })] }) }));
5538
+ }
5539
+
5540
+ 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"};
5541
+
5542
+ const isMobileDevice = () => {
5543
+ return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
5544
+ };
5545
+ function CwTimePicker({ value, onChange, interval = 15, minTime, maxTime, labelProps, alignProps, placeholder = "HH:mm", disabled, required, className, showClear = true, popupPosition = "left-bottom", useNative = isMobileDevice(), }) {
5546
+ const [isOpen, setIsOpen] = React.useState(false);
5547
+ const [inputValue, setInputValue] = React.useState("");
5548
+ const containerRef = React.useRef(null);
5549
+ const inputRef = React.useRef(null);
5550
+ const selectedItemRef = React.useRef(null);
5551
+ // Sync input value with prop value
5552
+ React.useEffect(() => {
5553
+ if (value) {
5554
+ setInputValue(value);
5555
+ }
5556
+ else {
5557
+ setInputValue("");
5558
+ }
5559
+ }, [value]);
5560
+ // Generate time options based on interval
5561
+ const generateTimeOptions = () => {
5562
+ const options = [];
5563
+ const totalMinutes = 24 * 60; // Total minutes in a day
5564
+ for (let minutes = 0; minutes < totalMinutes; minutes += interval) {
5565
+ const hours = Math.floor(minutes / 60);
5566
+ const mins = minutes % 60;
5567
+ const timeString = `${hours.toString().padStart(2, "0")}:${mins.toString().padStart(2, "0")}`;
5568
+ // Filter by min/max time if provided
5569
+ if (minTime && timeString < minTime)
5570
+ continue;
5571
+ if (maxTime && timeString > maxTime)
5572
+ continue;
5573
+ options.push(timeString);
5574
+ }
5575
+ return options;
5576
+ };
5577
+ const timeOptions = generateTimeOptions();
5578
+ // Close dropdown when clicking outside
5579
+ React.useEffect(() => {
5580
+ const handleClickOutside = (event) => {
5581
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
5582
+ setIsOpen(false);
5583
+ }
5584
+ };
5585
+ if (isOpen) {
5586
+ document.addEventListener("mousedown", handleClickOutside);
5587
+ }
5588
+ return () => {
5589
+ document.removeEventListener("mousedown", handleClickOutside);
5590
+ };
5591
+ }, [isOpen]);
5592
+ // Scroll to selected time when opening dropdown
5593
+ React.useEffect(() => {
5594
+ if (isOpen && selectedItemRef.current) {
5595
+ selectedItemRef.current.scrollIntoView({
5596
+ block: "center",
5597
+ behavior: "smooth",
5598
+ });
5599
+ }
5600
+ }, [isOpen]);
5601
+ const handleTimeSelect = (time) => {
5602
+ onChange(time);
5603
+ setInputValue(time);
5604
+ setIsOpen(false);
5605
+ inputRef.current?.blur();
5606
+ };
5607
+ const handleClear = (e) => {
5608
+ e.stopPropagation();
5609
+ onChange(undefined);
5610
+ setInputValue("");
5611
+ };
5612
+ const handleInputClick = () => {
5613
+ if (!disabled) {
5614
+ setIsOpen(true);
5615
+ }
5616
+ };
5617
+ const handleInputChange = (e) => {
5618
+ let newValue = e.target.value;
5619
+ setInputValue(newValue);
5620
+ // Auto-format as user types
5621
+ // Remove non-numeric characters except colon
5622
+ newValue = newValue.replace(/[^\d:]/g, "");
5623
+ // Auto-add colon after 2 digits
5624
+ if (newValue.length === 2 && !newValue.includes(":")) {
5625
+ newValue = newValue + ":";
5626
+ setInputValue(newValue);
5627
+ }
5628
+ // Limit to HH:mm format
5629
+ if (newValue.length > 5) {
5630
+ newValue = newValue.slice(0, 5);
5631
+ setInputValue(newValue);
5632
+ }
5633
+ // Validate and set time when complete
5634
+ if (newValue.length === 5 && newValue.includes(":")) {
5635
+ const [hours, minutes] = newValue.split(":");
5636
+ const h = parseInt(hours, 10);
5637
+ const m = parseInt(minutes, 10);
5638
+ if (h >= 0 && h <= 23 && m >= 0 && m <= 59) {
5639
+ const formattedTime = `${hours.padStart(2, "0")}:${minutes.padStart(2, "0")}`;
5640
+ // Check min/max time restrictions
5641
+ const isValid = (!minTime || formattedTime >= minTime) &&
5642
+ (!maxTime || formattedTime <= maxTime);
5643
+ if (isValid) {
5644
+ onChange(formattedTime);
5645
+ setInputValue(formattedTime);
5646
+ }
5647
+ }
5648
+ }
5649
+ else if (newValue === "") {
5650
+ onChange(undefined);
5651
+ }
5652
+ };
5653
+ const handleInputBlur = () => {
5654
+ // On blur, sync input with actual value or clear if invalid
5655
+ if (value) {
5656
+ setInputValue(value);
5657
+ }
5658
+ else if (inputValue && inputValue.length === 5) {
5659
+ // Try to validate one more time
5660
+ const [hours, minutes] = inputValue.split(":");
5661
+ const h = parseInt(hours, 10);
5662
+ const m = parseInt(minutes, 10);
5663
+ if (h >= 0 && h <= 23 && m >= 0 && m <= 59) {
5664
+ const formattedTime = `${hours.padStart(2, "0")}:${minutes.padStart(2, "0")}`;
5665
+ onChange(formattedTime);
5666
+ setInputValue(formattedTime);
5667
+ }
5668
+ else {
5669
+ setInputValue("");
5670
+ }
5671
+ }
5672
+ else {
5673
+ setInputValue("");
5674
+ }
5675
+ };
5676
+ const handleInputKeyDown = (e) => {
5677
+ if (e.key === "Enter") {
5678
+ setIsOpen(!isOpen);
5679
+ }
5680
+ else if (e.key === "Escape") {
5681
+ setIsOpen(false);
5682
+ }
5683
+ else if (e.key === "ArrowDown" && isOpen && timeOptions.length > 0) {
5684
+ e.preventDefault();
5685
+ // Focus first option in dropdown
5686
+ const firstOption = document.querySelector(".cw-timepicker-option");
5687
+ firstOption?.focus();
5688
+ }
5689
+ };
5690
+ const handleNativeChange = (e) => {
5691
+ const newValue = e.target.value;
5692
+ onChange(newValue);
5693
+ setInputValue(newValue);
5694
+ };
5695
+ // Format time for display (optional: could add 12h format here)
5696
+ const displayValue = inputValue;
5697
+ // If using native time input
5698
+ if (useNative) {
5699
+ return (jsxRuntime.jsx("div", { className: `cw-timepicker cw-timepicker-native ${className || ""}`, children: jsxRuntime.jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsxRuntime.jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxRuntime.jsx("div", { className: styles$4.pickerWrapper, children: jsxRuntime.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" }) })] }) }));
5700
+ }
5701
+ // Custom time picker
5702
+ return (jsxRuntime.jsx("div", { ref: containerRef, className: `cw-timepicker ${className || ""}`, children: jsxRuntime.jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsxRuntime.jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxRuntime.jsxs("div", { className: styles$4.pickerWrapper, children: [jsxRuntime.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 && (jsxRuntime.jsx("div", { className: styles$4.pickerIcons, children: value && !disabled ? (jsxRuntime.jsx(CwButton, { type: "button", variant: "icon", icon: "close", color: "neutral", onClick: handleClear, tabIndex: -1, "aria-label": "Clear time" })) : (jsxRuntime.jsx(CwIcon, { iconId: "clock" })) })), isOpen && (jsxRuntime.jsx("div", { className: `${styles$4.pickerPopup} ${timeStyles.timePickerPopup}`, "data-position": popupPosition, children: jsxRuntime.jsx("div", { className: timeStyles.timePickerList, children: timeOptions.map((time) => {
5703
+ const isSelected = time === value;
5704
+ return (jsxRuntime.jsx("button", { ref: isSelected ? selectedItemRef : null, type: "button", className: isSelected ? timeStyles.selected : "", onClick: () => handleTimeSelect(time), children: time }, time));
5705
+ }) }) }))] })] }) }));
5706
+ }
5707
+
5708
+ 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, }) {
5709
+ const [selectedDate, setSelectedDate] = React.useState(value);
5710
+ const [selectedTime, setSelectedTime] = React.useState(value ? `${value.getHours().toString().padStart(2, "0")}:${value.getMinutes().toString().padStart(2, "0")}` : undefined);
5711
+ const prevValueRef = React.useRef(value);
5712
+ // Combine date and time into a single Date object
5713
+ const combineDateTime = React.useCallback((date, time) => {
5714
+ if (!date)
5715
+ return undefined;
5716
+ // If no time is selected, use 00:00
5717
+ if (!time) {
5718
+ const combined = new Date(date);
5719
+ combined.setHours(0, 0, 0, 0);
5720
+ return combined;
5721
+ }
5722
+ const [hours, minutes] = time.split(':').map(Number);
5723
+ const combined = new Date(date);
5724
+ combined.setHours(hours, minutes, 0, 0);
5725
+ return combined;
5726
+ }, []);
5727
+ // Sync internal state with prop value - only when changed externally
5728
+ React.useEffect(() => {
5729
+ const currentValue = value ?? undefined;
5730
+ if (currentValue !== prevValueRef.current) {
5731
+ prevValueRef.current = currentValue;
5732
+ if (currentValue) {
5733
+ setSelectedDate(currentValue);
5734
+ setSelectedTime(`${currentValue.getHours().toString().padStart(2, "0")}:${currentValue.getMinutes().toString().padStart(2, "0")}`);
5735
+ }
5736
+ else {
5737
+ setSelectedDate(undefined);
5738
+ setSelectedTime(undefined);
5739
+ }
5740
+ }
5741
+ }, [value]);
5742
+ const handleDateChange = React.useCallback((date) => {
5743
+ setSelectedDate(date);
5744
+ const combined = combineDateTime(date, selectedTime);
5745
+ onChange(combined);
5746
+ }, [selectedTime, combineDateTime, onChange]);
5747
+ const handleTimeChange = React.useCallback((time) => {
5748
+ setSelectedTime(time);
5749
+ const combined = combineDateTime(selectedDate, time);
5750
+ onChange(combined);
5751
+ }, [selectedDate, combineDateTime, onChange]);
5752
+ const handleNowClick = React.useCallback(() => {
5753
+ const now = new Date();
5754
+ // Check if now is within allowed range
5755
+ const isNowValid = (!minDateTime || now >= minDateTime) &&
5756
+ (!maxDateTime || now <= maxDateTime);
5757
+ if (isNowValid) {
5758
+ onChange(now);
5759
+ }
5760
+ }, [minDateTime, maxDateTime, onChange]);
5761
+ // Extract min/max date from minDateTime/maxDateTime
5762
+ const minDate = minDateTime;
5763
+ const maxDate = maxDateTime;
5764
+ return (jsxRuntime.jsx("div", { className: `cw-datetimepicker cw-datetimepicker-separate ${className || ""}`, children: jsxRuntime.jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsxRuntime.jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxRuntime.jsxs("div", { className: "cw-flex-row cw-align-left-center cw-gap-small", children: [jsxRuntime.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 }), jsxRuntime.jsx(CwTimePicker, { value: selectedTime, onChange: handleTimeChange, interval: timeInterval, minTime: minTime, maxTime: maxTime, placeholder: timePlaceholder, disabled: disabled, required: required, showClear: showClear, popupPosition: popupPosition }), showNowButton && (jsxRuntime.jsx(CwButton, { type: "button", variant: "outline", onClick: handleNowClick, disabled: disabled, title: "Set to current date and time", text: "Now" }))] })] }) }));
5765
+ }
5766
+
5767
+ 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"};
5768
+
5769
+ function CustomCaption({ displayMonth }) {
5770
+ const { goToMonth, nextMonth, previousMonth } = reactDayPicker.useNavigation();
5771
+ return (jsxRuntime.jsxs("header", { children: [jsxRuntime.jsx(CwButton, { type: "button", variant: "icon", icon: "chevron-left", onClick: () => previousMonth && goToMonth(previousMonth), disabled: !previousMonth, "aria-label": "Previous month" }), jsxRuntime.jsx("div", { className: styles$4.title, children: dateFns.format(displayMonth, "MMMM yyyy", { locale: locale.enGB }) }), jsxRuntime.jsx(CwButton, { type: "button", variant: "icon", icon: "chevron-right", onClick: () => nextMonth && goToMonth(nextMonth), disabled: !nextMonth, "aria-label": "Next month" })] }));
5772
+ }
5773
+ 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, }) {
5774
+ const [isOpen, setIsOpen] = React.useState(false);
5775
+ const [inputValue, setInputValue] = React.useState("");
5776
+ const [selectedDate, setSelectedDate] = React.useState(value);
5777
+ const [selectedTime, setSelectedTime] = React.useState("");
5778
+ const containerRef = React.useRef(null);
5779
+ const inputRef = React.useRef(null);
5780
+ const timeListRef = React.useRef(null);
5781
+ const prevValueRef = React.useRef(value);
5782
+ // Generate time options based on interval - memoized
5783
+ const timeOptions = React.useMemo(() => {
5784
+ const options = [];
5785
+ const totalMinutes = 24 * 60;
5786
+ for (let minutes = 0; minutes < totalMinutes; minutes += timeInterval) {
5787
+ const hours = Math.floor(minutes / 60);
5788
+ const mins = minutes % 60;
5789
+ const timeString = `${hours.toString().padStart(2, "0")}:${mins.toString().padStart(2, "0")}`;
5790
+ if (minTime && timeString < minTime)
5791
+ continue;
5792
+ if (maxTime && timeString > maxTime)
5793
+ continue;
5794
+ options.push(timeString);
5795
+ }
5796
+ return options;
5797
+ }, [timeInterval, minTime, maxTime]);
5798
+ // Parse datetime from string: dd.MM.yyyy HH:mm
5799
+ const parseDateTime = React.useCallback((dateTimeString) => {
5800
+ try {
5801
+ const parts = dateTimeString.trim().split(' ');
5802
+ if (parts.length !== 2)
5803
+ return undefined;
5804
+ const [dateStr, timeStr] = parts;
5805
+ // Parse date part
5806
+ const dateParts = dateStr.split(/[\/\-\.]/);
5807
+ if (dateParts.length !== 3)
5808
+ return undefined;
5809
+ const day = parseInt(dateParts[0], 10);
5810
+ const month = parseInt(dateParts[1], 10) - 1;
5811
+ const year = parseInt(dateParts[2], 10);
5812
+ // Parse time part
5813
+ const timeParts = timeStr.split(':');
5814
+ if (timeParts.length !== 2)
5815
+ return undefined;
5816
+ const hours = parseInt(timeParts[0], 10);
5817
+ const minutes = parseInt(timeParts[1], 10);
5818
+ // Validate ranges
5819
+ if (isNaN(day) || isNaN(month) || isNaN(year) ||
5820
+ isNaN(hours) || isNaN(minutes) ||
5821
+ hours < 0 || hours > 23 ||
5822
+ minutes < 0 || minutes > 59) {
5823
+ return undefined;
5824
+ }
5825
+ const parsed = new Date(year, month, day, hours, minutes, 0, 0);
5826
+ // Validate the date is real
5827
+ if (parsed.getDate() === day &&
5828
+ parsed.getMonth() === month &&
5829
+ parsed.getFullYear() === year &&
5830
+ parsed.getHours() === hours &&
5831
+ parsed.getMinutes() === minutes) {
5832
+ return parsed;
5833
+ }
5834
+ return undefined;
5835
+ }
5836
+ catch {
5837
+ return undefined;
5838
+ }
5839
+ }, []);
5840
+ // Validate and set datetime - with proper datetime comparison
5841
+ const validateAndSetDateTime = React.useCallback((dateTimeString) => {
5842
+ const parsed = parseDateTime(dateTimeString);
5843
+ if (parsed && !isNaN(parsed.getTime())) {
5844
+ const isValid = (!minDateTime || parsed >= minDateTime) &&
5845
+ (!maxDateTime || parsed <= maxDateTime);
5846
+ if (isValid) {
5847
+ onChange(parsed);
5848
+ setSelectedDate(parsed);
5849
+ setSelectedTime(dateFns.format(parsed, "HH:mm"));
5850
+ return true;
5851
+ }
5852
+ }
5853
+ return false;
5854
+ }, [parseDateTime, minDateTime, maxDateTime, onChange]);
5855
+ // Sync input value with prop value - only when changed externally
5856
+ React.useEffect(() => {
5857
+ const currentValue = value;
5858
+ if (currentValue !== prevValueRef.current) {
5859
+ prevValueRef.current = currentValue;
5860
+ if (currentValue) {
5861
+ const dateStr = dateFns.format(currentValue, "dd.MM.yyyy", { locale: locale.enGB });
5862
+ const timeStr = dateFns.format(currentValue, "HH:mm", { locale: locale.enGB });
5863
+ setInputValue(`${dateStr} ${timeStr}`);
5864
+ setSelectedDate(currentValue);
5865
+ setSelectedTime(timeStr);
5866
+ }
5867
+ else {
5868
+ setInputValue("");
5869
+ setSelectedDate(undefined);
5870
+ setSelectedTime("");
5871
+ }
5872
+ }
5873
+ }, [value]);
5874
+ // Close popup when clicking outside
5875
+ React.useEffect(() => {
5876
+ const handleClickOutside = (event) => {
5877
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
5878
+ setIsOpen(false);
5879
+ }
5880
+ };
5881
+ if (isOpen) {
5882
+ document.addEventListener("mousedown", handleClickOutside);
5883
+ }
5884
+ return () => {
5885
+ document.removeEventListener("mousedown", handleClickOutside);
5886
+ };
5887
+ }, [isOpen]);
5888
+ // Scroll to selected time when opening
5889
+ React.useEffect(() => {
5890
+ if (isOpen && selectedTime && timeListRef.current) {
5891
+ const selectedElement = timeListRef.current.querySelector('.selected');
5892
+ if (selectedElement) {
5893
+ selectedElement.scrollIntoView({ block: 'center', behavior: 'smooth' });
5894
+ }
5895
+ }
5896
+ }, [isOpen, selectedTime]);
5897
+ const combineDateTime = React.useCallback((date, time) => {
5898
+ if (!date || !time)
5899
+ return undefined;
5900
+ const [hours, minutes] = time.split(':').map(Number);
5901
+ const combined = new Date(date);
5902
+ combined.setHours(hours, minutes, 0, 0);
5903
+ return combined;
5904
+ }, []);
5905
+ const handleDaySelect = React.useCallback((date) => {
5906
+ if (!date)
5907
+ return;
5908
+ setSelectedDate(date);
5909
+ // If time is already selected, combine and update
5910
+ if (selectedTime) {
5911
+ const combined = combineDateTime(date, selectedTime);
5912
+ if (combined) {
5913
+ onChange(combined);
5914
+ }
5915
+ }
5916
+ }, [selectedTime, combineDateTime, onChange]);
5917
+ const handleTimeSelect = React.useCallback((time) => {
5918
+ setSelectedTime(time);
5919
+ // If date is already selected, combine and update
5920
+ if (selectedDate) {
5921
+ const combined = combineDateTime(selectedDate, time);
5922
+ if (combined) {
5923
+ onChange(combined);
5924
+ setIsOpen(false);
5925
+ inputRef.current?.blur();
5926
+ }
5927
+ }
5928
+ }, [selectedDate, combineDateTime, onChange]);
5929
+ const handleClear = React.useCallback((e) => {
5930
+ e.stopPropagation();
5931
+ onChange(undefined);
5932
+ setInputValue("");
5933
+ setSelectedDate(undefined);
5934
+ setSelectedTime("");
5935
+ }, [onChange]);
5936
+ const handleInputClick = React.useCallback(() => {
5937
+ if (!disabled) {
5938
+ setIsOpen(true);
5939
+ }
5940
+ }, [disabled]);
5941
+ const handleInputChange = React.useCallback((e) => {
5942
+ const newValue = e.target.value;
5943
+ setInputValue(newValue);
5944
+ // Try to parse the full datetime string: dd.MM.yyyy HH:mm
5945
+ if (newValue.length >= 16) {
5946
+ validateAndSetDateTime(newValue);
5947
+ }
5948
+ else if (newValue === "") {
5949
+ onChange(undefined);
5950
+ setSelectedDate(undefined);
5951
+ setSelectedTime("");
5952
+ }
5953
+ }, [validateAndSetDateTime, onChange]);
5954
+ const handleInputBlur = React.useCallback(() => {
5955
+ // Try to parse if there's text
5956
+ if (inputValue && inputValue.trim() !== "") {
5957
+ const parsed = parseDateTime(inputValue);
5958
+ if (parsed && !isNaN(parsed.getTime())) {
5959
+ const isValid = (!minDateTime || parsed >= minDateTime) &&
5960
+ (!maxDateTime || parsed <= maxDateTime);
5961
+ if (isValid) {
5962
+ onChange(parsed);
5963
+ const dateStr = dateFns.format(parsed, "dd.MM.yyyy", { locale: locale.enGB });
5964
+ const timeStr = dateFns.format(parsed, "HH:mm", { locale: locale.enGB });
5965
+ setInputValue(`${dateStr} ${timeStr}`);
5966
+ setSelectedDate(parsed);
5967
+ setSelectedTime(timeStr);
5968
+ return;
5969
+ }
5970
+ }
5971
+ }
5972
+ // Sync with current value
5973
+ if (value) {
5974
+ const dateStr = dateFns.format(value, "dd.MM.yyyy", { locale: locale.enGB });
5975
+ const timeStr = dateFns.format(value, "HH:mm", { locale: locale.enGB });
5976
+ setInputValue(`${dateStr} ${timeStr}`);
5977
+ }
5978
+ else {
5979
+ setInputValue("");
5980
+ }
5981
+ }, [inputValue, parseDateTime, minDateTime, maxDateTime, onChange, value]);
5982
+ const handleInputKeyDown = React.useCallback((e) => {
5983
+ if (e.key === "Enter") {
5984
+ e.preventDefault();
5985
+ inputRef.current?.blur();
5986
+ setIsOpen(false);
5987
+ }
5988
+ else if (e.key === "Escape") {
5989
+ setIsOpen(false);
5990
+ inputRef.current?.blur();
5991
+ }
5992
+ }, []);
5993
+ const handleNowClick = React.useCallback(() => {
5994
+ const now = new Date();
5995
+ // Check if now is within allowed range
5996
+ const isNowValid = (!minDateTime || now >= minDateTime) &&
5997
+ (!maxDateTime || now <= maxDateTime);
5998
+ if (isNowValid) {
5999
+ onChange(now);
6000
+ setIsOpen(false);
6001
+ }
6002
+ }, [minDateTime, maxDateTime, onChange]);
6003
+ // Memoize formatters
6004
+ const formatters = React.useMemo(() => ({
6005
+ formatCaption: (date) => dateFns.format(date, "MMMM yyyy", { locale: locale.enGB }),
6006
+ formatWeekdayName: (date) => dateFns.format(date, "EEEEEE", { locale: locale.enGB })
6007
+ }), []);
6008
+ // Memoize disabled days
6009
+ const disabledDays = React.useMemo(() => [
6010
+ ...(disabledDates || []),
6011
+ ...(minDateTime ? [{ before: minDateTime }] : []),
6012
+ ...(maxDateTime ? [{ after: maxDateTime }] : []),
6013
+ ...(disabledMatcher ? [disabledMatcher] : []),
6014
+ ], [disabledDates, minDateTime, maxDateTime, disabledMatcher]);
6015
+ return (jsxRuntime.jsx("div", { ref: containerRef, className: `cw-datetimepicker ${className || ""}`, children: jsxRuntime.jsxs(CwAlign, { ...alignProps, itemProp: required ? "required" : "", children: [labelProps && (jsxRuntime.jsx(CwLabel, { ...labelProps, children: labelProps.text })), jsxRuntime.jsxs("div", { className: styles$4.pickerWrapper, children: [jsxRuntime.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" } }), jsxRuntime.jsx("div", { className: styles$4.pickerIcons, children: showClear && value && !disabled ? (jsxRuntime.jsx(CwButton, { type: "button", variant: "icon", color: "neutral", icon: "close", onClick: handleClear, tabIndex: -1, "aria-label": "Clear datetime" })) : (jsxRuntime.jsx(CwIcon, { iconId: "calendar-time" })) }), isOpen && (jsxRuntime.jsxs("div", { className: `${styles$4.pickerPopup} ${compactStyles.compactPopup}`, "data-position": popupPosition, children: [jsxRuntime.jsxs("div", { className: compactStyles.calendarWrapper, children: [jsxRuntime.jsx(reactDayPicker.DayPicker, { mode: "single", selected: selectedDate, onSelect: handleDaySelect, defaultMonth: selectedDate, disabled: disabledDays, locale: locale.enGB, numberOfMonths: numberOfMonths, formatters: formatters, components: {
6016
+ Caption: (props) => jsxRuntime.jsx(CustomCaption, { ...props }),
6017
+ }, modifiers: {
6018
+ today: new Date(),
6019
+ }, modifiersClassNames: {
6020
+ today: "rdp-day_today",
6021
+ } }), showTodayButton && (jsxRuntime.jsx("footer", { className: "cw-flex-row cw-align-center-center", children: jsxRuntime.jsx(CwButton, { type: "button", variant: "outline", icon: "check-big", onClick: handleNowClick, text: "Now" }) }))] }), jsxRuntime.jsxs("div", { className: compactStyles.timeWrapper, children: [jsxRuntime.jsxs("header", { children: [jsxRuntime.jsx(CwIcon, { iconId: "clock", size: "medium" }), jsxRuntime.jsx("span", { children: "Time" })] }), jsxRuntime.jsx("div", { ref: timeListRef, className: `${timeStyles.timePickerList} ${compactStyles.compactTimeList}`, children: timeOptions.map((time) => {
6022
+ const isSelected = time === selectedTime;
6023
+ return (jsxRuntime.jsx("button", { type: "button", className: isSelected ? timeStyles.selected : "", onClick: () => handleTimeSelect(time), children: time }, time));
6024
+ }) })] })] }))] })] }) }));
6025
+ }
6026
+
4791
6027
  const ResourcesTitleList$1 = ({ resources, canBePinned, includesPinned, onCrewPinning, onClickResourceContextMenu, ResourceTitleComponent }) => {
4792
6028
  return (jsxRuntime.jsx("td", { className: "resourceArea", style: { width: "100px" }, children: resources.map((r, _i) => (jsxRuntime.jsxs("div", { className: "resource CwelltFunctionDescription", style: { height: r.maxTop }, children: [(canBePinned || includesPinned) && (jsxRuntime.jsx(PinButton$1, { canBePinned: canBePinned, resource: r, onCrewPinning: onCrewPinning })), jsxRuntime.jsx(ResourceTitleComponent, { resource: r, handleOnClickResourceContextMenu: (e) => {
4793
6029
  if (onClickResourceContextMenu) {
@@ -7012,8 +8248,10 @@ class OnDoubleClickEvent {
7012
8248
  }
7013
8249
  class OnDragEvent {
7014
8250
  id;
7015
- constructor(id) {
8251
+ crewId;
8252
+ constructor(id, crewId) {
7016
8253
  this.id = id;
8254
+ this.crewId = crewId;
7017
8255
  }
7018
8256
  }
7019
8257
  class OnDropEvent {
@@ -7088,10 +8326,6 @@ class OnClickRowHeader {
7088
8326
  this.id = id;
7089
8327
  }
7090
8328
  }
7091
- class UpdateApi {
7092
- constructor() {
7093
- }
7094
- }
7095
8329
  class OnClickUtc {
7096
8330
  constructor() {
7097
8331
  }
@@ -7331,7 +8565,7 @@ const SchedulerEvent = ({ value, heightRem, onEvent }) => {
7331
8565
  setIsOnDrag(false);
7332
8566
  }, onDragStart: (_) => {
7333
8567
  if (value.isDraggable)
7334
- onEvent(new OnDragEvent(value.id));
8568
+ onEvent(new OnDragEvent(value.id, value.rowId));
7335
8569
  }, onDragEnd: (_) => {
7336
8570
  if (value.isDraggable)
7337
8571
  setIsOnDrag(false);
@@ -7748,205 +8982,6 @@ const getWeekendsDaysInDateRange = (initialDate, visibleDays) => {
7748
8982
 
7749
8983
  class UiEvent {
7750
8984
  }
7751
- function when(event) {
7752
- let found = false;
7753
- const actions = {
7754
- case(eventType, action) {
7755
- if (!found && event instanceof eventType) {
7756
- action(event);
7757
- found = true;
7758
- }
7759
- return actions;
7760
- },
7761
- else(action) {
7762
- if (!found) {
7763
- action(event);
7764
- }
7765
- }
7766
- };
7767
- return actions;
7768
- }
7769
-
7770
- const getListOfNumbers = (len) => Array(len)
7771
- .fill(0)
7772
- .map((_, idx) => idx);
7773
- const getRandomColor = () => {
7774
- return "#" + (0x1000000 + Math.random() * 0xffffff).toString(16).substr(1, 6);
7775
- };
7776
- const getRandomEvents = (date, visibleDays, resourceId) => {
7777
- return getListOfNumbers(visibleDays).map((e) => {
7778
- const len1 = Math.floor(Math.random() * 24) + 1;
7779
- const moment1 = moment(date).add(e, "days").add(e, "minutes");
7780
- const len2 = Math.floor(Math.random() * 25) + 1;
7781
- return {
7782
- id: crypto.randomUUID(),
7783
- rowId: resourceId.toString(),
7784
- name: "API Design",
7785
- color: getRandomColor(),
7786
- startDate: moment1.add(-len1, "hour").toDate(),
7787
- endDate: moment1.add(len2, "hour").toDate(),
7788
- };
7789
- });
7790
- };
7791
-
7792
- const eventToUiState = (it, selectedDate, visibleDays, tooltip) => {
7793
- const { left, width } = getEventSizes(selectedDate, visibleDays, it.startDate, it.endDate);
7794
- const eventState = {
7795
- ...it,
7796
- left,
7797
- width,
7798
- tooltip: tooltip,
7799
- selected: false,
7800
- isResizable: false,
7801
- isDraggable: false,
7802
- };
7803
- return eventState;
7804
- };
7805
- const SchedulerPresenter = () => {
7806
- const [events, setEvents] = React.useState([]);
7807
- const [backgroundEvents, setBackgroundEvents] = React.useState([]);
7808
- const [uiState, setUiState] = React.useState(() => {
7809
- const visibleDays = 1;
7810
- const selectedDate = new Date("2024-12-03");
7811
- const isHeaderVisible = true;
7812
- return {
7813
- isUtc: false,
7814
- selectedDate: selectedDate,
7815
- isHeaderVisible: isHeaderVisible,
7816
- visibleDays: visibleDays,
7817
- rowsHeight: 2,
7818
- visibleRows: 8,
7819
- };
7820
- });
7821
- const [resources, setResources] = React.useState([]);
7822
- const selectedEventRef = React.useRef("");
7823
- React.useEffect(() => {
7824
- updateDataFromApi();
7825
- }, []);
7826
- const updateDataFromApi = () => {
7827
- const rows = 1;
7828
- // api call here to events
7829
- const apiEvents = getListOfNumbers(rows).flatMap((e) => {
7830
- return getRandomEvents(uiState.selectedDate, uiState.visibleDays * 3, e);
7831
- });
7832
- const eventsWithSizes = apiEvents.map((it) => {
7833
- return eventToUiState(it, uiState.selectedDate, uiState.visibleDays, jsxRuntime.jsxs("div", { children: [it.startDate.getHours() + ":" + it.startDate.getMinutes(), " -", it.endDate.getHours() + ":" + it.endDate.getMinutes()] }));
7834
- });
7835
- const visibleEvents = eventsWithSizes.filter((event) => {
7836
- return eventIsVisible(event.startDate, event.endDate, uiState.selectedDate, uiState.visibleDays);
7837
- });
7838
- setEvents(visibleEvents);
7839
- const apiBackgroundEvents = getListOfNumbers(1).map((e) => {
7840
- const backgroundEvent = {
7841
- id: e.toString(),
7842
- rowId: e.toString(),
7843
- color: "orange",
7844
- isResizable: false,
7845
- isDraggable: false,
7846
- width: 100 / uiState.visibleDays,
7847
- name: "Birthday",
7848
- icons: jsxRuntime.jsx(CwIcon, { iconId: "house", style: { padding: "0.5rem" } }, "cosa"),
7849
- startDate: new Date(),
7850
- left: 0,
7851
- endDate: new Date(),
7852
- isVisible: true,
7853
- selected: false,
7854
- };
7855
- return backgroundEvent;
7856
- });
7857
- setBackgroundEvents(apiBackgroundEvents);
7858
- // api call here to rows
7859
- const apiRows = getListOfNumbers(rows).map((e) => {
7860
- return {
7861
- resourceId: e.toString(),
7862
- title: "JAC" + e,
7863
- };
7864
- });
7865
- const headerProps = apiRows.map((row) => {
7866
- return {
7867
- rowId: row.resourceId,
7868
- title: row.title,
7869
- };
7870
- });
7871
- setResources(headerProps);
7872
- };
7873
- const onEvent = (event) => {
7874
- when(event)
7875
- .case(OnClickEvent, (event) => {
7876
- console.log("onClick event: " + event.id);
7877
- })
7878
- .case(OnDoubleClickEvent, (event) => {
7879
- const eventData = resources
7880
- .map((resource) => {
7881
- const element = events
7882
- .filter((it) => {
7883
- return it.rowId === resource.rowId;
7884
- })
7885
- .find((it) => it.id == event.id);
7886
- return element;
7887
- })
7888
- .filter((it) => it !== undefined)[0];
7889
- console.log("found", eventData?.startDate, eventData?.endDate);
7890
- })
7891
- .case(OnDragEvent, (event) => {
7892
- console.log("onDrag event: " + event.id);
7893
- selectedEventRef.current = event.id;
7894
- console.log("selectedEvent set to: " + selectedEventRef.current);
7895
- })
7896
- .case(OnDropEvent, (event) => {
7897
- console.log("onDrop event: " + selectedEventRef.current + " to row: " + event.id);
7898
- setEvents((prevEvents) => {
7899
- // Find the index of the event to be updated
7900
- const eventIndex = prevEvents.findIndex((e) => e.id === selectedEventRef.current);
7901
- // If event is found, create a new array with the updated event
7902
- const updatedEvents = [...prevEvents];
7903
- updatedEvents[eventIndex] = {
7904
- ...updatedEvents[eventIndex],
7905
- rowId: event.id,
7906
- };
7907
- return updatedEvents;
7908
- });
7909
- console.log("drop on");
7910
- selectedEventRef.current = ""; // Reset the selected event ref
7911
- })
7912
- .case(OnDropCtrlEvent, (event) => {
7913
- alert(`Clicked row is ${event.id}`);
7914
- })
7915
- .case(OnClickRowEvent, (event) => {
7916
- alert(`Clicked row is ${event.id}`);
7917
- })
7918
- .case(OnRightClickEvent, (event) => {
7919
- alert(`RightClick event ${event.id}`);
7920
- })
7921
- .case(OnRightClickRow, (event) => {
7922
- alert(`RightClick row ${event.id}`);
7923
- })
7924
- .case(OnLeftDragStart, (event) => {
7925
- alert(`Start left Drag ${event.id}`);
7926
- })
7927
- .case(OnRightDragStart, (event) => {
7928
- alert(`Start Right Drag ${event.id}`);
7929
- })
7930
- .case(UpdateApi, () => {
7931
- updateDataFromApi();
7932
- })
7933
- .case(OnClickRowHeader, (event) => {
7934
- console.log(`Clicked row ${event.id}`);
7935
- })
7936
- .case(OnClickUtc, () => {
7937
- setUiState((old) => {
7938
- return { ...old, isUtc: !old.isUtc };
7939
- });
7940
- });
7941
- };
7942
- return {
7943
- state: uiState,
7944
- resources: resources,
7945
- events,
7946
- backgroundEvents,
7947
- onEvent: onEvent,
7948
- };
7949
- };
7950
8985
 
7951
8986
  const getNow = (isUtc) => {
7952
8987
  let now = new Date();
@@ -8047,10 +9082,6 @@ const height = (events, rows, rowsNumber) => {
8047
9082
  });
8048
9083
  return flatMapped.length;
8049
9084
  };
8050
- const SchedulerPreview = () => {
8051
- const { state, resources, events, backgroundEvents, onEvent } = SchedulerPresenter();
8052
- return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("button", { onClick: (_) => onEvent(new UpdateApi()), children: "update" }), jsxRuntime.jsx("button", { onClick: (_) => onEvent(new OnClickUtc()), children: state.isUtc ? "set Local" : "set UTC" }), jsxRuntime.jsx(Scheduler, { id: "test", state: state, header: { title: "Flights", classification: "ACFT" }, rows: resources, onEvent: onEvent, EventComp: SchedulerEvent, RowTitleComp: DefaultRowHeader, events: events, backgroundEvents: backgroundEvents, contextMenuItems: [] })] }));
8053
- };
8054
9085
 
8055
9086
  let topsCounter = 0;
8056
9087
  class CwSuperScheduler extends React__namespace.Component {
@@ -8406,18 +9437,18 @@ const PinRowHeader = ({ value, width, onEvent }) => {
8406
9437
  });
8407
9438
  },
8408
9439
  onMouseLeave: () => setIsContextMenuOpen(false),
8409
- }, trigger: ["contextMenu"], overlayStyle: { animationDuration: "0" }, arrow: (value.contextMenuItems?.length ?? 0) > 0, children: jsxRuntime.jsx(CwGenericTooltip, { content: value.tooltip, position: "right", dissapearsWhenHover: true, overlayStyle: value.overlayTooltipStyle, children: jsxRuntime.jsxs("div", { style: {
8410
- width: width,
8411
- background: highlightColor,
8412
- }, className: styles["super-scheduler-row-header"], children: [jsxRuntime.jsx("button", { className: "cw-button-icon cwi-pin", "data-pinned": value.isPinned, onClick: (_) => {
8413
- onEvent(value.isPinned ? new OnUnpinRow(value.rowId) : new OnPinRow(value.rowId));
8414
- } }), jsxRuntime.jsx("div", { className: styles["indicators"], children: value.indicators ?? undefined }), jsxRuntime.jsxs("div", { style: {
8415
- display: "flex",
8416
- flexDirection: "column",
8417
- justifyContent: "center",
8418
- alignItems: "flex-start",
8419
- }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("strong", { children: value.title }), value.title2 && jsxRuntime.jsxs("span", { children: ["-", value.title2] }), " ", jsxRuntime.jsx("strong", { children: value.subtitle })] }), value.subtitle && jsxRuntime.jsxs("div", { style: { opacity: 0.5 }, children: [value.title3 &&
8420
- jsxRuntime.jsxs("span", { className: styles["scheduler-crewmember-functions"], children: ["(", value.title3, ")"] }), value.subtitle2 && jsxRuntime.jsxs("span", { children: ["-", value.subtitle2] })] })] }), isLoading ? jsxRuntime.jsx("span", { className: "cwi-icons cwi-spinner" }) : undefined] }) }, value.rowId) }, value.rowId));
9440
+ }, trigger: ["contextMenu"], overlayStyle: { animationDuration: "0" }, arrow: (value.contextMenuItems?.length ?? 0) > 0, children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(CwGenericTooltip, { content: value.tooltip, position: "right", dissapearsWhenHover: true, overlayStyle: value.overlayTooltipStyle, children: jsxRuntime.jsxs("div", { style: {
9441
+ width: width,
9442
+ background: highlightColor,
9443
+ }, className: styles["super-scheduler-row-header"], children: [jsxRuntime.jsx("button", { className: "cw-button-icon cwi-pin", "data-pinned": value.isPinned, onClick: (_) => {
9444
+ onEvent(value.isPinned ? new OnUnpinRow(value.rowId) : new OnPinRow(value.rowId));
9445
+ } }), jsxRuntime.jsx("div", { className: styles["indicators"], children: value.indicators ?? undefined }), jsxRuntime.jsxs("div", { style: {
9446
+ display: "flex",
9447
+ flexDirection: "column",
9448
+ justifyContent: "center",
9449
+ alignItems: "flex-start",
9450
+ }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("strong", { children: value.title }), value.title2 && jsxRuntime.jsxs("span", { children: ["-", value.title2] }), " ", jsxRuntime.jsx("strong", { children: value.subtitle })] }), value.subtitle && jsxRuntime.jsxs("div", { style: { opacity: 0.5 }, children: [value.title3 &&
9451
+ jsxRuntime.jsxs("span", { className: styles["scheduler-crewmember-functions"], children: ["(", value.title3, ")"] }), value.subtitle2 && jsxRuntime.jsxs("span", { children: ["-", value.subtitle2] })] })] }), isLoading ? jsxRuntime.jsx("span", { className: "cwi-icons cwi-spinner" }) : undefined] }) }, value.rowId) }) }, value.rowId));
8421
9452
  };
8422
9453
 
8423
9454
  const SuperScheduler = ({ id, state, header, rows, events, pinnedOrderCategory, unPinnedOrderCategory, backgroundEvents, contextMenuItems, onEvent }) => {
@@ -8665,43 +9696,6 @@ const CwFindAirport = ({ handleChange, searchType = "OnlyDatabase", placeHolder
8665
9696
  return (jsxRuntime.jsxs("div", { className: `cw-find-airport ${className}`, style: width ? { width } : undefined, children: [jsxRuntime.jsxs("div", { className: "cw-find-airport-input-wrapper", children: [jsxRuntime.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) && (jsxRuntime.jsx("div", { className: "cw-find-airport-loading", children: jsxRuntime.jsx(CwIcon, { iconId: "spinner" }) })), inputValue && !disabled && !isInitialLoading && (jsxRuntime.jsx(CwButton, { type: "button", onClick: handleClear, "aria-label": "Clear selected airport", variant: "icon", icon: "close", color: "neutral" }))] }), showDropdown && options.length > 0 && (jsxRuntime.jsx("div", { ref: dropdownRef, className: "cw-find-airport-dropdown", role: "listbox", children: options.map((option, index) => (jsxRuntime.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))) }))] }));
8666
9697
  };
8667
9698
 
8668
- const CwPaletteTree = () => (jsxRuntime.jsxs(ideToolbox.Palette, { children: [jsxRuntime.jsx(ideToolbox.Category, { name: "buttons", children: jsxRuntime.jsxs(ideToolbox.Component, { name: "CwButton", children: [jsxRuntime.jsx(ideToolbox.Variant, { name: "solid", children: jsxRuntime.jsx(CwButton, { variant: "solid", text: "Button" }) }), jsxRuntime.jsx(ideToolbox.Variant, { name: "outline", children: jsxRuntime.jsx(CwButton, { variant: "outline", text: "Button" }) }), jsxRuntime.jsx(ideToolbox.Variant, { name: "Icon", children: jsxRuntime.jsx(CwButton, { variant: "icon", icon: "save" }) }), jsxRuntime.jsx(ideToolbox.Variant, { name: "Example", children: jsxRuntime.jsxs(CwButton, { variant: "solid", color: "danger", children: [jsxRuntime.jsx("span", { children: "Example" }), jsxRuntime.jsx("span", { children: "texmple 2" })] }) })] }) }), jsxRuntime.jsx(ideToolbox.Category, { name: "search", children: jsxRuntime.jsx(ideToolbox.Component, { name: "CwSearchInput", children: jsxRuntime.jsx(ideToolbox.Variant, { children: jsxRuntime.jsx(CwSearchInput, { placeholder: "Search", selectList: [
8669
- new CwSelectList("Search", "1", "Search something", "red")
8670
- ] }) }) }) }), jsxRuntime.jsxs(ideToolbox.Category, { name: "Scheduler-headers", children: [jsxRuntime.jsx(ideToolbox.Component, { name: "DefaultRowHeader", children: jsxRuntime.jsx(ideToolbox.Variant, { children: jsxRuntime.jsx(DefaultRowHeader, { value: {
8671
- rowId: "1",
8672
- title: "JAC",
8673
- title2: "CMD",
8674
- subtitle: "ICAO",
8675
- subtitle2: "IATA"
8676
- },
8677
- // color={"red"}
8678
- width: 180, onEvent: () => {
8679
- } }) }) }), jsxRuntime.jsxs(ideToolbox.Component, { name: "PinRowHeader", children: [jsxRuntime.jsx(ideToolbox.Variant, { children: jsxRuntime.jsx(PinRowHeader, { value: {
8680
- rowId: "1",
8681
- title: "JAC",
8682
- title2: "CMD",
8683
- subtitle: "ICAO",
8684
- subtitle2: "IATA",
8685
- isPinned: true,
8686
- contextMenuItems: [],
8687
- isLoading: false,
8688
- },
8689
- // color={"red"}
8690
- width: 180, onEvent: () => {
8691
- } }) }), jsxRuntime.jsx(ideToolbox.Variant, { name: "pinned", children: jsxRuntime.jsx(PinRowHeader, { value: {
8692
- rowId: "1",
8693
- title: "JAC",
8694
- title2: "CMD",
8695
- subtitle: "ICAO",
8696
- subtitle2: "IATA",
8697
- isPinned: true,
8698
- contextMenuItems: [],
8699
- isLoading: false,
8700
- },
8701
- // color={"red"}
8702
- width: 180, onEvent: () => {
8703
- } }) })] })] }), jsxRuntime.jsx(ideToolbox.Category, { name: "Scheduler", children: jsxRuntime.jsx(ideToolbox.Component, { name: "Scheduler", children: jsxRuntime.jsx(ideToolbox.Variant, { children: jsxRuntime.jsx(SchedulerPreview, {}) }) }) })] }));
8704
-
8705
9699
  exports.CblDragAndDrop = CblDragAndDrop;
8706
9700
  exports.CwAccordionContainer = CwAccordionContainer;
8707
9701
  exports.CwAlign = CwAlign;
@@ -8755,6 +9749,10 @@ exports.CwColorPicker = CwColorPicker;
8755
9749
  exports.CwConfirmationPopup = CwConfirmationPopup;
8756
9750
  exports.CwContextMenu = CwContextMenu;
8757
9751
  exports.CwContextualMenu = CwContextualMenu;
9752
+ exports.CwDatePicker = CwDatePicker;
9753
+ exports.CwDateRangePicker = CwDateRangePicker;
9754
+ exports.CwDateTimePicker = CwDateTimePicker;
9755
+ exports.CwDateTimePickerCompact = CwDateTimePickerCompact;
8758
9756
  exports.CwDialog = CwDialog;
8759
9757
  exports.CwDialogManager = CwDialogManager;
8760
9758
  exports.CwDigit = CwDigit;
@@ -8802,7 +9800,6 @@ exports.CwMultiselect = CwMultiselect;
8802
9800
  exports.CwNote = CwNote;
8803
9801
  exports.CwOption = CwOption;
8804
9802
  exports.CwOptionList = CwOptionList;
8805
- exports.CwPaletteTree = CwPaletteTree;
8806
9803
  exports.CwReportModal = CwReportModal;
8807
9804
  exports.CwScheduler = CwScheduler;
8808
9805
  exports.CwScheduler2 = CwScheduler2;
@@ -8818,6 +9815,7 @@ exports.CwTabs = CwTabs;
8818
9815
  exports.CwTag = CwTag;
8819
9816
  exports.CwTextArea = CwTextArea;
8820
9817
  exports.CwTime = CwTime;
9818
+ exports.CwTimePicker = CwTimePicker;
8821
9819
  exports.CwToggle = CwToggle;
8822
9820
  exports.CwTooltip = CwTooltip;
8823
9821
  exports.CwTreeView = CwTreeView;