guestbell-forms 3.0.39 → 3.0.41

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 (342) hide show
  1. package/.env.bat +1 -0
  2. package/.eslintrc.json +21 -14
  3. package/build/components/base/input/BaseInput.d.ts +99 -99
  4. package/build/components/base/input/BaseInput.js +4 -0
  5. package/build/components/base/input/BaseInput.js.map +1 -1
  6. package/build/components/base/input/index.d.ts +1 -1
  7. package/build/components/bookingCalendar/BookingCalendar.d.ts +47 -46
  8. package/build/components/bookingCalendar/BookingCalendar.js +38 -14
  9. package/build/components/bookingCalendar/BookingCalendar.js.map +1 -1
  10. package/build/components/bookingCalendar/bookingCalendarControls/BookingCalendarControls.d.ts +17 -17
  11. package/build/components/bookingCalendar/bookingCalendarControls/BookingCalendarControls.js +12 -12
  12. package/build/components/bookingCalendar/bookingCalendarControls/BookingCalendarControls.js.map +1 -1
  13. package/build/components/bookingCalendar/bookingCalendarControls/classes.d.ts +9 -9
  14. package/build/components/bookingCalendar/bookingCalendarControls/index.d.ts +2 -2
  15. package/build/components/bookingCalendar/bookingCalendarDatePicker/BookingCalendarDatePicker.d.ts +13 -13
  16. package/build/components/bookingCalendar/bookingCalendarDatePicker/BookingCalendarDatePicker.js +3 -3
  17. package/build/components/bookingCalendar/bookingCalendarDatePicker/BookingCalendarDatePicker.js.map +1 -1
  18. package/build/components/bookingCalendar/bookingCalendarDatePicker/classes.d.ts +5 -5
  19. package/build/components/bookingCalendar/bookingCalendarDatePicker/index.d.ts +2 -2
  20. package/build/components/bookingCalendar/bookingCalendarGrid/BookingCalendarGrid.d.ts +10 -10
  21. package/build/components/bookingCalendar/bookingCalendarGrid/classes.d.ts +5 -5
  22. package/build/components/bookingCalendar/bookingCalendarItem/BookingCalendarItem.d.ts +57 -57
  23. package/build/components/bookingCalendar/bookingCalendarItem/BookingCalendarItem.js +2 -1
  24. package/build/components/bookingCalendar/bookingCalendarItem/BookingCalendarItem.js.map +1 -1
  25. package/build/components/bookingCalendar/bookingCalendarItem/classes.d.ts +4 -4
  26. package/build/components/bookingCalendar/bookingCalendarItem/index.d.ts +2 -2
  27. package/build/components/bookingCalendar/bookingCalendarLane/BookingCalendarLane.d.ts +16 -16
  28. package/build/components/bookingCalendar/bookingCalendarLane/classes.d.ts +4 -4
  29. package/build/components/bookingCalendar/bookingCalendarLane/index.d.ts +2 -2
  30. package/build/components/bookingCalendar/bookingCalendarLaneHeader/BookingCalendarLaneHeader.d.ts +7 -7
  31. package/build/components/bookingCalendar/bookingCalendarLaneHeader/classes.d.ts +4 -4
  32. package/build/components/bookingCalendar/bookingCalendarLaneHeader/index.d.ts +1 -1
  33. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeader.d.ts +11 -11
  34. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeader.js +3 -3
  35. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeader.js.map +1 -1
  36. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeaderRenderItem.d.ts +4 -5
  37. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeaderRenderItem.js.map +1 -1
  38. package/build/components/bookingCalendar/bookingCalendarLanesHeader/classes.d.ts +5 -5
  39. package/build/components/bookingCalendar/bookingCalendarLanesHeader/index.d.ts +2 -2
  40. package/build/components/bookingCalendar/bookingCalendarRenderItem/BookingCalendarRenderItem.d.ts +9 -9
  41. package/build/components/bookingCalendar/bookingCalendarRenderItem/classes.d.ts +6 -6
  42. package/build/components/bookingCalendar/bookingCalendarRenderItem/index.d.ts +1 -1
  43. package/build/components/bookingCalendar/bookingCalendarSelection/BookingCalendarSelection.d.ts +38 -37
  44. package/build/components/bookingCalendar/bookingCalendarSelection/BookingCalendarSelection.js +7 -4
  45. package/build/components/bookingCalendar/bookingCalendarSelection/BookingCalendarSelection.js.map +1 -1
  46. package/build/components/bookingCalendar/bookingCalendarSelection/classes.d.ts +5 -0
  47. package/build/components/bookingCalendar/bookingCalendarSelection/classes.js +12 -0
  48. package/build/components/bookingCalendar/bookingCalendarSelection/classes.js.map +1 -0
  49. package/build/components/bookingCalendar/bookingCalendarTimeAxis/BookingCalendarTimeAxis.d.ts +11 -11
  50. package/build/components/bookingCalendar/bookingCalendarTimeAxis/classes.d.ts +5 -5
  51. package/build/components/bookingCalendar/classes.d.ts +11 -11
  52. package/build/components/bookingCalendar/common.d.ts +24 -23
  53. package/build/components/bookingCalendar/common.js +3 -4
  54. package/build/components/bookingCalendar/common.js.map +1 -1
  55. package/build/components/bookingCalendar/index.d.ts +3 -3
  56. package/build/components/bookingCalendar/utils.d.ts +55 -50
  57. package/build/components/bookingCalendar/utils.js +2 -1
  58. package/build/components/bookingCalendar/utils.js.map +1 -1
  59. package/build/components/button/Button.d.ts +81 -81
  60. package/build/components/button/Button.js +1 -0
  61. package/build/components/button/Button.js.map +1 -1
  62. package/build/components/button/index.d.ts +2 -2
  63. package/build/components/checkbox/Checkbox.d.ts +23 -23
  64. package/build/components/checkbox/index.d.ts +2 -2
  65. package/build/components/dropdown/Dropdown.d.ts +44 -44
  66. package/build/components/dropdown/index.d.ts +2 -2
  67. package/build/components/dynamicSubmit/DynamicSubmit.d.ts +54 -54
  68. package/build/components/dynamicSubmit/DynamicSubmit.js.map +1 -1
  69. package/build/components/dynamicSubmit/index.d.ts +2 -2
  70. package/build/components/externalValidationComponent/ExternalValidationComponent.d.ts +15 -15
  71. package/build/components/externalValidationComponent/index.d.ts +2 -2
  72. package/build/components/form/Form.d.ts +47 -47
  73. package/build/components/form/FormContext.d.ts +30 -30
  74. package/build/components/form/FormValidationSummary.d.ts +38 -38
  75. package/build/components/form/FormValidationSummary.js.map +1 -1
  76. package/build/components/form/index.d.ts +5 -5
  77. package/build/components/form/withFormContext.d.ts +3 -3
  78. package/build/components/inputGroup/InputGroup.d.ts +15 -17
  79. package/build/components/inputGroup/index.d.ts +2 -2
  80. package/build/components/inputHeader/InputHeader.d.ts +97 -97
  81. package/build/components/inputHeader/InputHeader.js.map +1 -1
  82. package/build/components/inputHeader/InputHeaderContext.d.ts +24 -24
  83. package/build/components/inputHeader/index.d.ts +2 -2
  84. package/build/components/inputHeader/withInputHeaderContext.d.ts +3 -3
  85. package/build/components/money/Money.d.ts +78 -78
  86. package/build/components/money/Money.js.map +1 -1
  87. package/build/components/money/index.d.ts +2 -2
  88. package/build/components/numberInput/NumberInput.d.ts +28 -28
  89. package/build/components/numberInput/index.d.ts +2 -2
  90. package/build/components/openingHours/openingHoursDay/OpeningHoursDay.d.ts +84 -84
  91. package/build/components/openingHours/openingHoursDay/OpeningHoursDay.js +3 -3
  92. package/build/components/openingHours/openingHoursDay/OpeningHoursDay.js.map +1 -1
  93. package/build/components/openingHours/openingHoursDay/index.d.ts +2 -2
  94. package/build/components/openingHours/openingHoursSpecial/OpeningHoursSpecial.d.ts +92 -90
  95. package/build/components/openingHours/openingHoursSpecial/OpeningHoursSpecial.js.map +1 -1
  96. package/build/components/openingHours/openingHoursSpecial/index.d.ts +2 -2
  97. package/build/components/openingHours/openingHoursWeek/OpeningHoursWeek.d.ts +109 -109
  98. package/build/components/openingHours/openingHoursWeek/index.d.ts +2 -2
  99. package/build/components/openingHours/utils/OpeningHoursUtil.d.ts +21 -21
  100. package/build/components/radio/Radio.d.ts +20 -20
  101. package/build/components/radio/index.d.ts +2 -2
  102. package/build/components/radioContainer/RadioContainer.d.ts +17 -16
  103. package/build/components/radioContainer/RadioContainer.js.map +1 -1
  104. package/build/components/radioContainer/index.d.ts +2 -2
  105. package/build/components/select/Select.d.ts +79 -79
  106. package/build/components/select/index.d.ts +2 -2
  107. package/build/components/submit/Submit.d.ts +137 -137
  108. package/build/components/submit/index.d.ts +2 -2
  109. package/build/components/submit/subComponents/SubmitValidationSummary.d.ts +5 -5
  110. package/build/components/tags/Tags.d.ts +92 -92
  111. package/build/components/tags/Tags.js +2 -0
  112. package/build/components/tags/Tags.js.map +1 -1
  113. package/build/components/tags/index.d.ts +2 -2
  114. package/build/components/tags/subComponents/TagsSuggestions.d.ts +34 -34
  115. package/build/components/tags/subComponents/TagsSuggestions.js +2 -2
  116. package/build/components/tags/subComponents/TagsSuggestions.js.map +1 -1
  117. package/build/components/text/Text.d.ts +31 -31
  118. package/build/components/text/index.d.ts +2 -2
  119. package/build/components/textArea/TextArea.d.ts +28 -28
  120. package/build/components/textArea/TextArea.js +1 -0
  121. package/build/components/textArea/TextArea.js.map +1 -1
  122. package/build/components/textArea/index.d.ts +2 -2
  123. package/build/components/themeProvider/ThemeContext.d.ts +9 -9
  124. package/build/components/themeProvider/ThemeProvider.d.ts +8 -7
  125. package/build/components/themeProvider/ThemeProvider.js.map +1 -1
  126. package/build/components/themeProvider/index.d.ts +4 -4
  127. package/build/components/themeProvider/withThemeContext.d.ts +4 -4
  128. package/build/components/time/Time.d.ts +32 -32
  129. package/build/components/time/Time.js +3 -3
  130. package/build/components/time/Time.js.map +1 -1
  131. package/build/components/time/index.d.ts +2 -2
  132. package/build/components/timeSpan/TimeSpan.d.ts +46 -46
  133. package/build/components/timeSpan/TimeSpan.js +6 -6
  134. package/build/components/timeSpan/TimeSpan.js.map +1 -1
  135. package/build/components/timeSpan/index.d.ts +2 -2
  136. package/build/components/utils/Guid.d.ts +2 -2
  137. package/build/components/utils/ShallowEqual.d.ts +16 -16
  138. package/build/components/utils/TimeUtil.d.ts +6 -6
  139. package/build/components/utils/Typescript.d.ts +5 -5
  140. package/build/dist/guestbell-forms.css +154 -170
  141. package/build/dist/guestbell-forms.css.map +1 -1
  142. package/build/dist/guestbell-forms.js +15 -24
  143. package/build/dist/guestbell-forms.js.map +1 -1
  144. package/build/dist/guestbell-forms.min.css +1 -1
  145. package/build/dist/guestbell-forms.min.js +1 -1
  146. package/build/dist/guestbell-forms.min.js.map +1 -1
  147. package/build/dist/report.html +3 -3
  148. package/build/index.d.ts +24 -24
  149. package/build/scss/components/bookingCalendar/bookingCalendar.scss +32 -7
  150. package/build/types/ElementOverrideProp.d.ts +3 -3
  151. package/build/types/Theme.d.ts +4 -4
  152. package/build/types/ThemeOverrides.d.ts +45 -45
  153. package/build/validators/EmailValidator.d.ts +4 -4
  154. package/build/validators/LatitudeValidator.d.ts +4 -4
  155. package/build/validators/LongitudeValidator.d.ts +4 -4
  156. package/build/validators/NumberValidator.d.ts +12 -12
  157. package/build/validators/NumberValidator.js +1 -0
  158. package/build/validators/NumberValidator.js.map +1 -1
  159. package/build/validators/UrlValidator.d.ts +4 -4
  160. package/build/validators/base.d.ts +4 -4
  161. package/build/validators/index.d.ts +6 -6
  162. package/package.json +130 -136
  163. package/src/lib/components/base/input/BaseInput.tsx +526 -0
  164. package/src/lib/components/base/input/index.tsx +1 -0
  165. package/src/lib/components/bookingCalendar/BookingCalendar.tsx +399 -0
  166. package/src/lib/components/bookingCalendar/bookingCalendarControls/BookingCalendarControls.tsx +249 -0
  167. package/src/lib/components/bookingCalendar/bookingCalendarControls/classes.ts +20 -0
  168. package/src/lib/components/bookingCalendar/bookingCalendarControls/index.ts +2 -0
  169. package/src/lib/components/bookingCalendar/bookingCalendarDatePicker/BookingCalendarDatePicker.tsx +104 -0
  170. package/src/lib/components/bookingCalendar/bookingCalendarDatePicker/classes.ts +9 -0
  171. package/src/lib/components/bookingCalendar/bookingCalendarDatePicker/index.ts +2 -0
  172. package/src/lib/components/bookingCalendar/bookingCalendarGrid/BookingCalendarGrid.tsx +56 -0
  173. package/src/lib/components/bookingCalendar/bookingCalendarGrid/classes.ts +9 -0
  174. package/src/lib/components/bookingCalendar/bookingCalendarItem/BookingCalendarItem.tsx +98 -0
  175. package/src/lib/components/bookingCalendar/bookingCalendarItem/classes.ts +7 -0
  176. package/src/lib/components/bookingCalendar/bookingCalendarItem/index.ts +2 -0
  177. package/src/lib/components/bookingCalendar/bookingCalendarLane/BookingCalendarLane.tsx +69 -0
  178. package/src/lib/components/bookingCalendar/bookingCalendarLane/classes.ts +7 -0
  179. package/src/lib/components/bookingCalendar/bookingCalendarLane/index.ts +2 -0
  180. package/src/lib/components/bookingCalendar/bookingCalendarLaneHeader/BookingCalendarLaneHeader.tsx +28 -0
  181. package/src/lib/components/bookingCalendar/bookingCalendarLaneHeader/classes.ts +7 -0
  182. package/src/lib/components/bookingCalendar/bookingCalendarLaneHeader/index.ts +1 -0
  183. package/src/lib/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeader.tsx +57 -0
  184. package/src/lib/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeaderRenderItem.tsx +53 -0
  185. package/src/lib/components/bookingCalendar/bookingCalendarLanesHeader/classes.ts +9 -0
  186. package/src/lib/components/bookingCalendar/bookingCalendarLanesHeader/index.ts +2 -0
  187. package/src/lib/components/bookingCalendar/bookingCalendarRenderItem/BookingCalendarRenderItem.tsx +57 -0
  188. package/src/lib/components/bookingCalendar/bookingCalendarRenderItem/classes.ts +11 -0
  189. package/src/lib/components/bookingCalendar/bookingCalendarRenderItem/index.ts +1 -0
  190. package/src/lib/components/bookingCalendar/bookingCalendarSelection/BookingCalendarSelection.tsx +225 -0
  191. package/src/lib/components/bookingCalendar/bookingCalendarSelection/classes.ts +10 -0
  192. package/src/lib/components/bookingCalendar/bookingCalendarTimeAxis/BookingCalendarTimeAxis.tsx +53 -0
  193. package/src/lib/components/bookingCalendar/bookingCalendarTimeAxis/classes.ts +9 -0
  194. package/src/lib/components/bookingCalendar/classes.ts +21 -0
  195. package/src/lib/components/bookingCalendar/common.ts +62 -0
  196. package/src/lib/components/bookingCalendar/index.ts +3 -0
  197. package/src/lib/components/bookingCalendar/utils.ts +350 -0
  198. package/src/lib/components/button/Button.tsx +193 -0
  199. package/src/lib/components/button/index.tsx +2 -0
  200. package/src/lib/components/checkbox/Checkbox.tsx +178 -0
  201. package/src/lib/components/checkbox/index.tsx +2 -0
  202. package/src/lib/components/dropdown/Dropdown.tsx +135 -0
  203. package/src/lib/components/dropdown/index.tsx +2 -0
  204. package/src/lib/components/dynamicSubmit/DynamicSubmit.tsx +153 -0
  205. package/src/lib/components/dynamicSubmit/index.tsx +2 -0
  206. package/src/lib/components/externalValidationComponent/ExternalValidationComponent.tsx +78 -0
  207. package/src/lib/components/externalValidationComponent/index.tsx +2 -0
  208. package/src/lib/components/form/Form.tsx +276 -0
  209. package/src/lib/components/form/FormContext.ts +49 -0
  210. package/src/lib/components/form/FormValidationSummary.tsx +122 -0
  211. package/src/lib/components/form/index.tsx +5 -0
  212. package/src/lib/components/form/withFormContext.tsx +20 -0
  213. package/src/lib/components/inputGroup/InputGroup.tsx +60 -0
  214. package/src/lib/components/inputGroup/index.tsx +2 -0
  215. package/src/lib/components/inputHeader/InputHeader.tsx +448 -0
  216. package/src/lib/components/inputHeader/InputHeaderContext.ts +42 -0
  217. package/src/lib/components/inputHeader/index.tsx +2 -0
  218. package/src/lib/components/inputHeader/withInputHeaderContext.tsx +24 -0
  219. package/src/lib/components/money/Money.tsx +298 -0
  220. package/src/lib/components/money/index.tsx +2 -0
  221. package/src/lib/components/numberInput/NumberInput.tsx +186 -0
  222. package/src/lib/components/numberInput/index.tsx +2 -0
  223. package/src/lib/components/openingHours/openingHoursDay/OpeningHoursDay.tsx +394 -0
  224. package/src/lib/components/openingHours/openingHoursDay/index.tsx +2 -0
  225. package/src/lib/components/openingHours/openingHoursSpecial/OpeningHoursSpecial.tsx +227 -0
  226. package/src/lib/components/openingHours/openingHoursSpecial/index.tsx +2 -0
  227. package/src/lib/components/openingHours/openingHoursWeek/OpeningHoursWeek.tsx +283 -0
  228. package/src/lib/components/openingHours/openingHoursWeek/index.tsx +2 -0
  229. package/src/lib/components/openingHours/utils/OpeningHoursUtil.tsx +111 -0
  230. package/src/lib/components/radio/Radio.tsx +87 -0
  231. package/src/lib/components/radio/index.tsx +2 -0
  232. package/src/lib/components/radioContainer/RadioContainer.tsx +50 -0
  233. package/src/lib/components/radioContainer/index.tsx +2 -0
  234. package/src/lib/components/select/Select.tsx +335 -0
  235. package/src/lib/components/select/index.tsx +2 -0
  236. package/src/lib/components/submit/Submit.tsx +117 -0
  237. package/src/lib/components/submit/index.tsx +2 -0
  238. package/src/lib/components/submit/subComponents/SubmitValidationSummary.tsx +55 -0
  239. package/src/lib/components/tags/Tags.tsx +702 -0
  240. package/src/lib/components/tags/index.tsx +2 -0
  241. package/src/lib/components/tags/subComponents/TagsSuggestions.tsx +150 -0
  242. package/src/lib/components/text/Text.tsx +200 -0
  243. package/src/lib/components/text/index.tsx +2 -0
  244. package/src/lib/components/textArea/TextArea.tsx +109 -0
  245. package/src/lib/components/textArea/index.tsx +2 -0
  246. package/src/lib/components/themeProvider/ThemeContext.ts +16 -0
  247. package/src/lib/components/themeProvider/ThemeProvider.tsx +21 -0
  248. package/src/lib/components/themeProvider/index.tsx +4 -0
  249. package/src/lib/components/themeProvider/withThemeContext.tsx +30 -0
  250. package/src/lib/components/time/Time.tsx +296 -0
  251. package/src/lib/components/time/index.tsx +2 -0
  252. package/src/lib/components/timeSpan/TimeSpan.tsx +378 -0
  253. package/src/lib/components/timeSpan/index.tsx +2 -0
  254. package/src/lib/components/utils/Guid.ts +9 -0
  255. package/src/lib/components/utils/ShallowEqual.ts +75 -0
  256. package/src/lib/components/utils/TimeUtil.ts +22 -0
  257. package/src/lib/components/utils/Typescript.ts +11 -0
  258. package/src/lib/declarations/import.d.ts +1 -0
  259. package/src/lib/index.ts +24 -0
  260. package/src/lib/scss/components/base/index.scss +1 -0
  261. package/src/lib/scss/components/base/input/index.scss +1 -0
  262. package/src/lib/scss/components/base/input/input.scss +237 -0
  263. package/src/lib/scss/components/bookingCalendar/bookingCalendar.scss +274 -0
  264. package/src/lib/scss/components/bookingCalendar/index.scss +1 -0
  265. package/src/lib/scss/components/button/buttons.scss +161 -0
  266. package/src/lib/scss/components/button/index.scss +1 -0
  267. package/src/lib/scss/components/checkbox/checkbox.scss +115 -0
  268. package/src/lib/scss/components/checkbox/index.scss +1 -0
  269. package/src/lib/scss/components/dropdown/dropdown.scss +111 -0
  270. package/src/lib/scss/components/dropdown/index.scss +1 -0
  271. package/src/lib/scss/components/dynamicSubmit/dynamicSubmit.scss +1 -0
  272. package/src/lib/scss/components/dynamicSubmit/index.scss +1 -0
  273. package/src/lib/scss/components/form/form.scss +1 -0
  274. package/src/lib/scss/components/form/formValidationSummary.scss +55 -0
  275. package/src/lib/scss/components/form/index.scss +2 -0
  276. package/src/lib/scss/components/index.scss +21 -0
  277. package/src/lib/scss/components/inputGroup/index.scss +1 -0
  278. package/src/lib/scss/components/inputGroup/inputGroup.scss +67 -0
  279. package/src/lib/scss/components/inputHeader/index.scss +1 -0
  280. package/src/lib/scss/components/inputHeader/inputHeader.scss +132 -0
  281. package/src/lib/scss/components/money/index.scss +1 -0
  282. package/src/lib/scss/components/money/money.scss +51 -0
  283. package/src/lib/scss/components/numberInput/index.scss +1 -0
  284. package/src/lib/scss/components/numberInput/numberInput.scss +116 -0
  285. package/src/lib/scss/components/openingHours/index.scss +3 -0
  286. package/src/lib/scss/components/openingHours/openingHoursDay/index.scss +1 -0
  287. package/src/lib/scss/components/openingHours/openingHoursDay/openingHoursDay.scss +127 -0
  288. package/src/lib/scss/components/openingHours/openingHoursSpecial/index.scss +1 -0
  289. package/src/lib/scss/components/openingHours/openingHoursSpecial/openingHoursSpecial.scss +93 -0
  290. package/src/lib/scss/components/openingHours/openingHoursWeek/index.scss +1 -0
  291. package/src/lib/scss/components/openingHours/openingHoursWeek/openingHoursWeek.scss +23 -0
  292. package/src/lib/scss/components/radio/index.scss +1 -0
  293. package/src/lib/scss/components/radio/radio.scss +68 -0
  294. package/src/lib/scss/components/radioContainer/index.scss +1 -0
  295. package/src/lib/scss/components/radioContainer/radioContainer.scss +15 -0
  296. package/src/lib/scss/components/select/index.scss +1 -0
  297. package/src/lib/scss/components/select/select.scss +64 -0
  298. package/src/lib/scss/components/submit/index.scss +1 -0
  299. package/src/lib/scss/components/submit/submitValidationSummary.scss +35 -0
  300. package/src/lib/scss/components/tags/index.scss +1 -0
  301. package/src/lib/scss/components/tags/tags.scss +128 -0
  302. package/src/lib/scss/components/text/index.scss +1 -0
  303. package/src/lib/scss/components/text/text.scss +42 -0
  304. package/src/lib/scss/components/textArea/index.scss +1 -0
  305. package/src/lib/scss/components/textArea/textArea.scss +32 -0
  306. package/src/lib/scss/components/time/index.scss +1 -0
  307. package/src/lib/scss/components/time/time.scss +111 -0
  308. package/src/lib/scss/components/timeSpan/index.scss +1 -0
  309. package/src/lib/scss/components/timeSpan/timeSpan.scss +115 -0
  310. package/src/lib/scss/index.scss +8 -0
  311. package/src/lib/scss/styles/base.scss +7 -0
  312. package/src/lib/scss/styles/index.scss +2 -0
  313. package/src/lib/scss/styles/react-tippy.scss +4 -0
  314. package/src/lib/scss/variables/_buttons.scss +6 -0
  315. package/src/lib/scss/variables/_colors.scss +1 -0
  316. package/src/lib/scss/variables/_common.scss +12 -0
  317. package/src/lib/tsconfig.json +19 -0
  318. package/src/lib/types/ElementOverrideProp.ts +3 -0
  319. package/src/lib/types/Theme.ts +5 -0
  320. package/src/lib/types/ThemeOverrides.ts +46 -0
  321. package/src/lib/validators/EmailValidator.ts +15 -0
  322. package/src/lib/validators/LatitudeValidator.ts +25 -0
  323. package/src/lib/validators/LongitudeValidator.ts +25 -0
  324. package/src/lib/validators/NumberValidator.ts +50 -0
  325. package/src/lib/validators/UrlValidator.ts +20 -0
  326. package/src/lib/validators/base.ts +15 -0
  327. package/src/lib/validators/index.ts +6 -0
  328. package/src/stories/Basic.stories.ts +17 -0
  329. package/src/stories/Basic.tsx +1065 -0
  330. package/src/stories/Schedule.stories.ts +16 -0
  331. package/src/stories/Schedule.tsx +85 -0
  332. package/src/stories/ValidationPage.tsx +417 -0
  333. package/tsconfig.json +9 -22
  334. package/typedoc.json +6 -0
  335. package/webpack/webpack.config.base.js +139 -0
  336. package/webpack/webpack.config.dev.js +78 -0
  337. package/webpack/webpack.config.gh-pages.js +78 -0
  338. package/webpack/webpack.config.js +21 -0
  339. package/webpack/webpack.config.min.js +100 -0
  340. package/.vscode/launch.json +0 -15
  341. package/.vscode/settings.json +0 -27
  342. package/.vscode/tasks.json +0 -12
@@ -1,10 +1,10 @@
1
- /// <reference types="react" />
2
- import { BookingCalendarGridClasses } from './classes';
3
- import { GridItem } from '../utils';
4
- export interface BookingCalendarGridProps extends BookingCalendarGridClasses {
5
- items: GridItem[];
6
- containerRef?: (elem: HTMLElement) => void;
7
- dataRowsCount: number;
8
- width: number;
9
- }
10
- export declare function BookingCalendarGrid(props: BookingCalendarGridProps): JSX.Element;
1
+ import * as React from 'react';
2
+ import { BookingCalendarGridClasses } from './classes';
3
+ import { GridItem } from '../utils';
4
+ export interface BookingCalendarGridProps extends BookingCalendarGridClasses {
5
+ items: GridItem[];
6
+ containerRef?: (elem: HTMLElement) => void;
7
+ dataRowsCount: number;
8
+ width: number;
9
+ }
10
+ export declare function BookingCalendarGrid(props: BookingCalendarGridProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- export interface BookingCalendarGridClasses {
2
- className?: string;
3
- gridItemClassName?: string;
4
- }
5
- export declare const bookingCalendarGridDefaultClasses: BookingCalendarGridClasses;
1
+ export interface BookingCalendarGridClasses {
2
+ className?: string;
3
+ gridItemClassName?: string;
4
+ }
5
+ export declare const bookingCalendarGridDefaultClasses: BookingCalendarGridClasses;
@@ -1,57 +1,57 @@
1
- import * as React from 'react';
2
- import { BookingCalendarRenderItemProps } from '../bookingCalendarRenderItem/BookingCalendarRenderItem';
3
- import { BookingCalendarItemT } from '../common';
4
- import { BookingCalendarItemClasses } from './classes';
5
- import { Duration, Moment } from 'moment';
6
- export interface BookingCalendarItemBaseProps<T extends BookingCalendarItemT> {
7
- item: T;
8
- itemIndex: number;
9
- laneIndex: number;
10
- from: Moment;
11
- till: Moment;
12
- step: Duration;
13
- /**
14
- * Number between [0,1] that tells how far from previous item (or start) this item starts
15
- */
16
- marginStart: number;
17
- /**
18
- * Number between [0,1] that tells what part of the lane the item starts at
19
- */
20
- start: number;
21
- /**
22
- * Like start but can be negative (go offscreen)
23
- */
24
- realStart: number;
25
- /**
26
- * Actual start date shown on grid
27
- */
28
- realFrom: Moment;
29
- /**
30
- * Some part of the item was cut from the beginning
31
- */
32
- startIsCut: boolean;
33
- /**
34
- * Number between [0,1] that tells what part of the lane the item takes
35
- */
36
- width: number;
37
- /**
38
- * Number between [0,1] that tells what part of the lane the item ends at
39
- */
40
- end: number;
41
- /**
42
- * Like end but can be more than 1 (go offscreen)
43
- */
44
- realEnd: number;
45
- /**
46
- * Actual end date shown on grid
47
- */
48
- realTill: Moment;
49
- /**
50
- * Some part of the item was cut from the end
51
- */
52
- endIsCut: boolean;
53
- BookingCalendarRenderItem?: React.ComponentType<BookingCalendarRenderItemProps<T>>;
54
- }
55
- export interface BookingCalendarItemProps<T extends BookingCalendarItemT> extends BookingCalendarItemClasses, BookingCalendarItemBaseProps<T> {
56
- }
57
- export declare function BookingCalendarItem<T extends BookingCalendarItemT>(props: BookingCalendarItemProps<T>): JSX.Element;
1
+ import * as React from 'react';
2
+ import { BookingCalendarRenderItemProps } from '../bookingCalendarRenderItem/BookingCalendarRenderItem';
3
+ import { BookingCalendarItemT } from '../common';
4
+ import { BookingCalendarItemClasses } from './classes';
5
+ import { Duration, Moment } from 'moment';
6
+ export interface BookingCalendarItemBaseProps<T extends BookingCalendarItemT> {
7
+ item: T;
8
+ itemIndex: number;
9
+ laneIndex: number;
10
+ from: Moment;
11
+ till: Moment;
12
+ step: Duration;
13
+ /**
14
+ * Number between [0,1] that tells how far from previous item (or start) this item starts
15
+ */
16
+ marginStart: number;
17
+ /**
18
+ * Number between [0,1] that tells what part of the lane the item starts at
19
+ */
20
+ start: number;
21
+ /**
22
+ * Like start but can be negative (go offscreen)
23
+ */
24
+ realStart: number;
25
+ /**
26
+ * Actual start date shown on grid
27
+ */
28
+ realFrom: Moment;
29
+ /**
30
+ * Some part of the item was cut from the beginning
31
+ */
32
+ startIsCut: boolean;
33
+ /**
34
+ * Number between [0,1] that tells what part of the lane the item takes
35
+ */
36
+ width: number;
37
+ /**
38
+ * Number between [0,1] that tells what part of the lane the item ends at
39
+ */
40
+ end: number;
41
+ /**
42
+ * Like end but can be more than 1 (go offscreen)
43
+ */
44
+ realEnd: number;
45
+ /**
46
+ * Actual end date shown on grid
47
+ */
48
+ realTill: Moment;
49
+ /**
50
+ * Some part of the item was cut from the end
51
+ */
52
+ endIsCut: boolean;
53
+ BookingCalendarRenderItem?: React.ComponentType<BookingCalendarRenderItemProps<T>>;
54
+ }
55
+ export interface BookingCalendarItemProps<T extends BookingCalendarItemT> extends BookingCalendarItemClasses, BookingCalendarItemBaseProps<T> {
56
+ }
57
+ export declare function BookingCalendarItem<T extends BookingCalendarItemT>(props: BookingCalendarItemProps<T>): React.JSX.Element;
@@ -22,7 +22,8 @@ function BookingCalendarItem(props) {
22
22
  const style = React.useMemo(() => (0, _utils.getItemPositionStyle)(marginStart, width), [marginStart, width]);
23
23
  return /*#__PURE__*/React.createElement("div", {
24
24
  className: (0, _classnames.default)(_classes.bookingCalendarItemDefaultClasses.className, className),
25
- style: style
25
+ style: style,
26
+ "data-id": props.item.id
26
27
  }, /*#__PURE__*/React.createElement(BookingCalendarRenderItem, props));
27
28
  }
28
29
  //# sourceMappingURL=BookingCalendarItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookingCalendarItem.js","names":["React","_interopRequireWildcard","require","_BookingCalendarRenderItem","_classnames","_interopRequireDefault","_utils","_classes","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","BookingCalendarItem","props","className","marginStart","width","BookingCalendarRenderItem","DefaultBookingCalendarRenderItem","style","useMemo","getItemPositionStyle","createElement","classNames","bookingCalendarItemDefaultClasses"],"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarItem/BookingCalendarItem.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport {\r\n BookingCalendarRenderItem as DefaultBookingCalendarRenderItem,\r\n BookingCalendarRenderItemProps,\r\n} from '../bookingCalendarRenderItem/BookingCalendarRenderItem';\r\nimport { BookingCalendarItemT } from '../common';\r\nimport classNames from 'classnames';\r\nimport { getItemPositionStyle } from './../utils';\r\nimport {\r\n BookingCalendarItemClasses,\r\n bookingCalendarItemDefaultClasses,\r\n} from './classes';\r\nimport { Duration, Moment } from 'moment';\r\n\r\nexport interface BookingCalendarItemBaseProps<T extends BookingCalendarItemT> {\r\n item: T;\r\n itemIndex: number;\r\n laneIndex: number;\r\n from: Moment;\r\n till: Moment;\r\n step: Duration;\r\n /**\r\n * Number between [0,1] that tells how far from previous item (or start) this item starts\r\n */\r\n marginStart: number;\r\n\r\n /**\r\n * Number between [0,1] that tells what part of the lane the item starts at\r\n */\r\n start: number;\r\n /**\r\n * Like start but can be negative (go offscreen)\r\n */\r\n realStart: number;\r\n /**\r\n * Actual start date shown on grid\r\n */\r\n realFrom: Moment;\r\n /**\r\n * Some part of the item was cut from the beginning\r\n */\r\n startIsCut: boolean;\r\n /**\r\n * Number between [0,1] that tells what part of the lane the item takes\r\n */\r\n width: number;\r\n /**\r\n * Number between [0,1] that tells what part of the lane the item ends at\r\n */\r\n end: number;\r\n /**\r\n * Like end but can be more than 1 (go offscreen)\r\n */\r\n realEnd: number;\r\n /**\r\n * Actual end date shown on grid\r\n */\r\n realTill: Moment;\r\n /**\r\n * Some part of the item was cut from the end\r\n */\r\n endIsCut: boolean;\r\n\r\n BookingCalendarRenderItem?: React.ComponentType<\r\n BookingCalendarRenderItemProps<T>\r\n >;\r\n}\r\n\r\nexport interface BookingCalendarItemProps<T extends BookingCalendarItemT>\r\n extends BookingCalendarItemClasses,\r\n BookingCalendarItemBaseProps<T> {}\r\n\r\nexport function BookingCalendarItem<T extends BookingCalendarItemT>(\r\n props: BookingCalendarItemProps<T>\r\n) {\r\n const {\r\n className,\r\n marginStart,\r\n width,\r\n BookingCalendarRenderItem = DefaultBookingCalendarRenderItem,\r\n } = props;\r\n const style = React.useMemo(() => getItemPositionStyle(marginStart, width), [\r\n marginStart,\r\n width,\r\n ]);\r\n return (\r\n <div\r\n className={classNames(\r\n bookingCalendarItemDefaultClasses.className,\r\n className\r\n )}\r\n style={style}\r\n >\r\n <BookingCalendarRenderItem {...props} />\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAGmB,SAAAG,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAX,wBAAAO,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAhB,GAAA,QAAAgB,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAnB,GAAA,EAAAgB,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAf,GAAA,EAAAgB,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAhB,GAAA,CAAAgB,GAAA,SAAAL,MAAA,CAAAT,OAAA,GAAAF,GAAA,MAAAQ,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAArB,GAAA,EAAAW,MAAA,YAAAA,MAAA;AA6DZ,SAASW,mBAAmBA,CACjCC,KAAkC,EAClC;EACA,MAAM;IACJC,SAAS;IACTC,WAAW;IACXC,KAAK;IACLC,yBAAyB,GAAGC;EAC9B,CAAC,GAAGL,KAAK;EACT,MAAMM,KAAK,GAAGrC,KAAK,CAACsC,OAAO,CAAC,MAAM,IAAAC,2BAAoB,EAACN,WAAW,EAAEC,KAAK,CAAC,EAAE,CAC1ED,WAAW,EACXC,KAAK,CACN,CAAC;EACF,oBACElC,KAAA,CAAAwC,aAAA;IACER,SAAS,EAAE,IAAAS,mBAAU,EACnBC,0CAAiC,CAACV,SAAS,EAC3CA,SACF,CAAE;IACFK,KAAK,EAAEA;EAAM,gBAEbrC,KAAA,CAAAwC,aAAA,CAACL,yBAAyB,EAAKJ,KAAQ,CACpC,CAAC;AAEV"}
1
+ {"version":3,"file":"BookingCalendarItem.js","names":["React","_interopRequireWildcard","require","_BookingCalendarRenderItem","_classnames","_interopRequireDefault","_utils","_classes","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","BookingCalendarItem","props","className","marginStart","width","BookingCalendarRenderItem","DefaultBookingCalendarRenderItem","style","useMemo","getItemPositionStyle","createElement","classNames","bookingCalendarItemDefaultClasses","item","id"],"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarItem/BookingCalendarItem.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport {\r\n BookingCalendarRenderItem as DefaultBookingCalendarRenderItem,\r\n BookingCalendarRenderItemProps,\r\n} from '../bookingCalendarRenderItem/BookingCalendarRenderItem';\r\nimport { BookingCalendarItemT } from '../common';\r\nimport classNames from 'classnames';\r\nimport { getItemPositionStyle } from './../utils';\r\nimport {\r\n BookingCalendarItemClasses,\r\n bookingCalendarItemDefaultClasses,\r\n} from './classes';\r\nimport { Duration, Moment } from 'moment';\r\n\r\nexport interface BookingCalendarItemBaseProps<T extends BookingCalendarItemT> {\r\n item: T;\r\n itemIndex: number;\r\n laneIndex: number;\r\n from: Moment;\r\n till: Moment;\r\n step: Duration;\r\n /**\r\n * Number between [0,1] that tells how far from previous item (or start) this item starts\r\n */\r\n marginStart: number;\r\n\r\n /**\r\n * Number between [0,1] that tells what part of the lane the item starts at\r\n */\r\n start: number;\r\n /**\r\n * Like start but can be negative (go offscreen)\r\n */\r\n realStart: number;\r\n /**\r\n * Actual start date shown on grid\r\n */\r\n realFrom: Moment;\r\n /**\r\n * Some part of the item was cut from the beginning\r\n */\r\n startIsCut: boolean;\r\n /**\r\n * Number between [0,1] that tells what part of the lane the item takes\r\n */\r\n width: number;\r\n /**\r\n * Number between [0,1] that tells what part of the lane the item ends at\r\n */\r\n end: number;\r\n /**\r\n * Like end but can be more than 1 (go offscreen)\r\n */\r\n realEnd: number;\r\n /**\r\n * Actual end date shown on grid\r\n */\r\n realTill: Moment;\r\n /**\r\n * Some part of the item was cut from the end\r\n */\r\n endIsCut: boolean;\r\n\r\n BookingCalendarRenderItem?: React.ComponentType<\r\n BookingCalendarRenderItemProps<T>\r\n >;\r\n}\r\n\r\nexport interface BookingCalendarItemProps<T extends BookingCalendarItemT>\r\n extends BookingCalendarItemClasses,\r\n BookingCalendarItemBaseProps<T> {}\r\n\r\nexport function BookingCalendarItem<T extends BookingCalendarItemT>(\r\n props: BookingCalendarItemProps<T>\r\n) {\r\n const {\r\n className,\r\n marginStart,\r\n width,\r\n BookingCalendarRenderItem = DefaultBookingCalendarRenderItem,\r\n } = props;\r\n const style = React.useMemo(\r\n () => getItemPositionStyle(marginStart, width),\r\n [marginStart, width]\r\n );\r\n return (\r\n <div\r\n className={classNames(\r\n bookingCalendarItemDefaultClasses.className,\r\n className\r\n )}\r\n style={style}\r\n data-id={props.item.id}\r\n >\r\n <BookingCalendarRenderItem {...props} />\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAGmB,SAAAG,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAX,wBAAAO,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAhB,GAAA,QAAAgB,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAnB,GAAA,EAAAgB,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAf,GAAA,EAAAgB,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAhB,GAAA,CAAAgB,GAAA,SAAAL,MAAA,CAAAT,OAAA,GAAAF,GAAA,MAAAQ,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAArB,GAAA,EAAAW,MAAA,YAAAA,MAAA;AA6DZ,SAASW,mBAAmBA,CACjCC,KAAkC,EAClC;EACA,MAAM;IACJC,SAAS;IACTC,WAAW;IACXC,KAAK;IACLC,yBAAyB,GAAGC;EAC9B,CAAC,GAAGL,KAAK;EACT,MAAMM,KAAK,GAAGrC,KAAK,CAACsC,OAAO,CACzB,MAAM,IAAAC,2BAAoB,EAACN,WAAW,EAAEC,KAAK,CAAC,EAC9C,CAACD,WAAW,EAAEC,KAAK,CACrB,CAAC;EACD,oBACElC,KAAA,CAAAwC,aAAA;IACER,SAAS,EAAE,IAAAS,mBAAU,EACnBC,0CAAiC,CAACV,SAAS,EAC3CA,SACF,CAAE;IACFK,KAAK,EAAEA,KAAM;IACb,WAASN,KAAK,CAACY,IAAI,CAACC;EAAG,gBAEvB5C,KAAA,CAAAwC,aAAA,CAACL,yBAAyB,EAAKJ,KAAQ,CACpC,CAAC;AAEV"}
@@ -1,4 +1,4 @@
1
- export interface BookingCalendarItemClasses {
2
- className?: string;
3
- }
4
- export declare const bookingCalendarItemDefaultClasses: BookingCalendarItemClasses;
1
+ export interface BookingCalendarItemClasses {
2
+ className?: string;
3
+ }
4
+ export declare const bookingCalendarItemDefaultClasses: BookingCalendarItemClasses;
@@ -1,2 +1,2 @@
1
- export * from './BookingCalendarItem';
2
- export * from './classes';
1
+ export * from './BookingCalendarItem';
2
+ export * from './classes';
@@ -1,16 +1,16 @@
1
- import { Duration, Moment } from 'moment';
2
- import * as React from 'react';
3
- import { BookingCalendarItemProps } from '../bookingCalendarItem/BookingCalendarItem';
4
- import { BookingCalendarRenderItemProps } from '../bookingCalendarRenderItem';
5
- import { BookingCalendarItemT } from './../common';
6
- import { BookingCalendarLaneClasses } from './classes';
7
- export interface BookingCalendarLaneProps<T extends BookingCalendarItemT> extends BookingCalendarLaneClasses {
8
- items: T[];
9
- laneIndex: number;
10
- from: Moment;
11
- till: Moment;
12
- step: Duration;
13
- BookingCalendarItem?: React.ComponentType<BookingCalendarItemProps<T>>;
14
- BookingCalendarRenderItem?: React.ComponentType<BookingCalendarRenderItemProps<T>>;
15
- }
16
- export declare function BookingCalendarLane<T extends BookingCalendarItemT>(props: BookingCalendarLaneProps<T>): JSX.Element;
1
+ import { Duration, Moment } from 'moment';
2
+ import * as React from 'react';
3
+ import { BookingCalendarItemProps } from '../bookingCalendarItem/BookingCalendarItem';
4
+ import { BookingCalendarRenderItemProps } from '../bookingCalendarRenderItem';
5
+ import { BookingCalendarItemT } from './../common';
6
+ import { BookingCalendarLaneClasses } from './classes';
7
+ export interface BookingCalendarLaneProps<T extends BookingCalendarItemT> extends BookingCalendarLaneClasses {
8
+ items: T[];
9
+ laneIndex: number;
10
+ from: Moment;
11
+ till: Moment;
12
+ step: Duration;
13
+ BookingCalendarItem?: React.ComponentType<BookingCalendarItemProps<T>>;
14
+ BookingCalendarRenderItem?: React.ComponentType<BookingCalendarRenderItemProps<T>>;
15
+ }
16
+ export declare function BookingCalendarLane<T extends BookingCalendarItemT>(props: BookingCalendarLaneProps<T>): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- export interface BookingCalendarLaneClasses {
2
- className?: string;
3
- }
4
- export declare const bookingCalendarLaneDefaultClasses: BookingCalendarLaneClasses;
1
+ export interface BookingCalendarLaneClasses {
2
+ className?: string;
3
+ }
4
+ export declare const bookingCalendarLaneDefaultClasses: BookingCalendarLaneClasses;
@@ -1,2 +1,2 @@
1
- export * from './BookingCalendarLane';
2
- export * from './classes';
1
+ export * from './BookingCalendarLane';
2
+ export * from './classes';
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
2
- import { BookingCalendarLaneHeaderClasses } from './classes';
3
- export interface BookingCalendarLaneHeaderProps<TLaneData> extends BookingCalendarLaneHeaderClasses {
4
- laneKey: string | number;
5
- data: TLaneData;
6
- }
7
- export declare function BookingCalendarLaneHeader<TLaneData>(props: BookingCalendarLaneHeaderProps<TLaneData>): JSX.Element;
1
+ import * as React from 'react';
2
+ import { BookingCalendarLaneHeaderClasses } from './classes';
3
+ export interface BookingCalendarLaneHeaderProps<TLaneData> extends BookingCalendarLaneHeaderClasses {
4
+ laneKey: string | number;
5
+ data: TLaneData;
6
+ }
7
+ export declare function BookingCalendarLaneHeader<TLaneData>(props: BookingCalendarLaneHeaderProps<TLaneData>): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- export interface BookingCalendarLaneHeaderClasses {
2
- className?: string;
3
- }
4
- export declare const bookingCalendarLaneHeaderDefaultClasses: BookingCalendarLaneHeaderClasses;
1
+ export interface BookingCalendarLaneHeaderClasses {
2
+ className?: string;
3
+ }
4
+ export declare const bookingCalendarLaneHeaderDefaultClasses: BookingCalendarLaneHeaderClasses;
@@ -1 +1 @@
1
- export * from './BookingCalendarLaneHeader';
1
+ export * from './BookingCalendarLaneHeader';
@@ -1,11 +1,11 @@
1
- /// <reference types="react" />
2
- import { BookingCalendarDateRange, BookingCalendarItemT } from '../common';
3
- import { Duration, Moment } from 'moment';
4
- import { BookingCalendarLanesHeaderClasses } from './classes';
5
- export interface BookingCalendarLanesHeaderProps<T extends BookingCalendarItemT> extends BookingCalendarLanesHeaderClasses {
6
- step: Duration;
7
- from: Moment;
8
- till: Moment;
9
- onRangeChange?: (range: BookingCalendarDateRange) => void;
10
- }
11
- export declare function BookingCalendarLanesHeader<T extends BookingCalendarItemT>(props: BookingCalendarLanesHeaderProps<T>): JSX.Element;
1
+ import * as React from 'react';
2
+ import { BookingCalendarDateRange, BookingCalendarItemT } from '../common';
3
+ import { Duration, Moment } from 'moment';
4
+ import { BookingCalendarLanesHeaderClasses } from './classes';
5
+ export interface BookingCalendarLanesHeaderProps<T extends BookingCalendarItemT> extends BookingCalendarLanesHeaderClasses {
6
+ step: Duration;
7
+ from: Moment;
8
+ till: Moment;
9
+ onRangeChange?: (range: BookingCalendarDateRange) => void;
10
+ }
11
+ export declare function BookingCalendarLanesHeader<T extends BookingCalendarItemT>(props: BookingCalendarLanesHeaderProps<T>): React.JSX.Element;
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.BookingCalendarLanesHeader = BookingCalendarLanesHeader;
7
7
  var _classnames = _interopRequireDefault(require("classnames"));
8
8
  var React = _interopRequireWildcard(require("react"));
9
+ var _classes = require("./classes");
9
10
  var _utils = require("../utils");
10
11
  var _bookingCalendarLane = require("../bookingCalendarLane");
11
12
  var _BookingCalendarLanesHeaderRenderItem = require("./BookingCalendarLanesHeaderRenderItem");
12
- var _ = require(".");
13
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -28,9 +28,9 @@ function BookingCalendarLanesHeader(props) {
28
28
  const items = React.useMemo(() => (0, _utils.generateControlItems)(from, till, step, from === null || from === void 0 ? void 0 : from.clone().startOf('day')), [from, till, step]);
29
29
  const BookingCalendarLanesHeaderRenderItem = React.useMemo(() => (0, _BookingCalendarLanesHeaderRenderItem.BookingCalendarLanesHeaderRenderItemFactory)(onRangeChange), [onRangeChange]);
30
30
  return /*#__PURE__*/React.createElement("div", {
31
- className: (0, _classnames.default)(_.bookingCalendarLanesHeaderDefaultClasses.className, className)
31
+ className: (0, _classnames.default)(_classes.bookingCalendarLanesHeaderDefaultClasses.className, className)
32
32
  }, /*#__PURE__*/React.createElement(_bookingCalendarLane.BookingCalendarLane, {
33
- className: (0, _classnames.default)(_.bookingCalendarLanesHeaderDefaultClasses.laneClassName, laneClassName),
33
+ className: (0, _classnames.default)(_classes.bookingCalendarLanesHeaderDefaultClasses.laneClassName, laneClassName),
34
34
  items: items,
35
35
  from: from,
36
36
  till: till,
@@ -1 +1 @@
1
- {"version":3,"file":"BookingCalendarLanesHeader.js","names":["_classnames","_interopRequireDefault","require","React","_interopRequireWildcard","_utils","_bookingCalendarLane","_BookingCalendarLanesHeaderRenderItem","_","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","BookingCalendarLanesHeader","props","className","laneClassName","step","from","till","onRangeChange","items","useMemo","generateControlItems","clone","startOf","BookingCalendarLanesHeaderRenderItem","BookingCalendarLanesHeaderRenderItemFactory","createElement","classNames","bookingCalendarLanesHeaderDefaultClasses","BookingCalendarLane","laneIndex","BookingCalendarRenderItem"],"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeader.tsx"],"sourcesContent":["import classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { BookingCalendarDateRange, BookingCalendarItemT } from '../common';\r\nimport { Duration, Moment } from 'moment';\r\nimport { BookingCalendarLanesHeaderClasses } from './classes';\r\nimport { generateControlItems } from '../utils';\r\nimport { BookingCalendarLane } from '../bookingCalendarLane';\r\nimport { BookingCalendarLanesHeaderRenderItemFactory } from './BookingCalendarLanesHeaderRenderItem';\r\nimport { bookingCalendarLanesHeaderDefaultClasses } from '.';\r\n\r\nexport interface BookingCalendarLanesHeaderProps<\r\n T extends BookingCalendarItemT\r\n> extends BookingCalendarLanesHeaderClasses {\r\n step: Duration;\r\n from: Moment;\r\n till: Moment;\r\n onRangeChange?: (range: BookingCalendarDateRange) => void;\r\n}\r\n\r\nexport function BookingCalendarLanesHeader<T extends BookingCalendarItemT>(\r\n props: BookingCalendarLanesHeaderProps<T>\r\n) {\r\n const { className, laneClassName, step, from, till, onRangeChange } = props;\r\n if (!step || !from || !till) {\r\n return null;\r\n }\r\n const items = React.useMemo(\r\n () => generateControlItems(from, till, step, from?.clone().startOf('day')),\r\n [from, till, step]\r\n );\r\n const BookingCalendarLanesHeaderRenderItem = React.useMemo(\r\n () => BookingCalendarLanesHeaderRenderItemFactory(onRangeChange),\r\n [onRangeChange]\r\n );\r\n return (\r\n <div\r\n className={classNames(\r\n bookingCalendarLanesHeaderDefaultClasses.className,\r\n className\r\n )}\r\n >\r\n <BookingCalendarLane\r\n className={classNames(\r\n bookingCalendarLanesHeaderDefaultClasses.laneClassName,\r\n laneClassName\r\n )}\r\n items={items}\r\n from={from}\r\n till={till}\r\n laneIndex={-1}\r\n BookingCalendarRenderItem={BookingCalendarLanesHeaderRenderItem}\r\n step={step}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CAAE;IACdC,yBAAyB,EAAEP,oCAAqC;IAChET,IAAI,EAAEA;EAAK,CACZ,CACE,CAAC;AAEV"}
1
+ {"version":3,"file":"BookingCalendarLanesHeader.js","names":["_classnames","_interopRequireDefault","require","React","_interopRequireWildcard","_classes","_utils","_bookingCalendarLane","_BookingCalendarLanesHeaderRenderItem","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","BookingCalendarLanesHeader","props","className","laneClassName","step","from","till","onRangeChange","items","useMemo","generateControlItems","clone","startOf","BookingCalendarLanesHeaderRenderItem","BookingCalendarLanesHeaderRenderItemFactory","createElement","classNames","bookingCalendarLanesHeaderDefaultClasses","BookingCalendarLane","laneIndex","BookingCalendarRenderItem"],"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeader.tsx"],"sourcesContent":["import classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { BookingCalendarDateRange, BookingCalendarItemT } from '../common';\r\nimport { Duration, Moment } from 'moment';\r\nimport {\r\n BookingCalendarLanesHeaderClasses,\r\n bookingCalendarLanesHeaderDefaultClasses,\r\n} from './classes';\r\nimport { generateControlItems } from '../utils';\r\nimport { BookingCalendarLane } from '../bookingCalendarLane';\r\nimport { BookingCalendarLanesHeaderRenderItemFactory } from './BookingCalendarLanesHeaderRenderItem';\r\n\r\nexport interface BookingCalendarLanesHeaderProps<T extends BookingCalendarItemT>\r\n extends BookingCalendarLanesHeaderClasses {\r\n step: Duration;\r\n from: Moment;\r\n till: Moment;\r\n onRangeChange?: (range: BookingCalendarDateRange) => void;\r\n}\r\n\r\nexport function BookingCalendarLanesHeader<T extends BookingCalendarItemT>(\r\n props: BookingCalendarLanesHeaderProps<T>\r\n) {\r\n const { className, laneClassName, step, from, till, onRangeChange } = props;\r\n if (!step || !from || !till) {\r\n return null;\r\n }\r\n const items = React.useMemo(\r\n () => generateControlItems(from, till, step, from?.clone().startOf('day')),\r\n [from, till, step]\r\n );\r\n const BookingCalendarLanesHeaderRenderItem = React.useMemo(\r\n () => BookingCalendarLanesHeaderRenderItemFactory(onRangeChange),\r\n [onRangeChange]\r\n );\r\n return (\r\n <div\r\n className={classNames(\r\n bookingCalendarLanesHeaderDefaultClasses.className,\r\n className\r\n )}\r\n >\r\n <BookingCalendarLane\r\n className={classNames(\r\n bookingCalendarLanesHeaderDefaultClasses.laneClassName,\r\n laneClassName\r\n )}\r\n items={items}\r\n from={from}\r\n till={till}\r\n laneIndex={-1}\r\n BookingCalendarRenderItem={BookingCalendarLanesHeaderRenderItem}\r\n step={step}\r\n />\r\n </div>\r\n );\r\n}\r\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AAGA,IAAAG,QAAA,GAAAH,OAAA;AAIA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,oBAAA,GAAAL,OAAA;AACA,IAAAM,qCAAA,GAAAN,OAAA;AAAqG,SAAAO,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAN,wBAAAU,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,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GzC,KAAK,CAACqC,OAAO,CACxD,MAAM,IAAAK,iFAA2C,EAACP,aAAa,CAAC,EAChE,CAACA,aAAa,CAChB,CAAC;EACD,oBACEnC,KAAA,CAAA2C,aAAA;IACEb,SAAS,EAAE,IAAAc,mBAAU,EACnBC,iDAAwC,CAACf,SAAS,EAClDA,SACF;EAAE,gBAEF9B,KAAA,CAAA2C,aAAA,CAACvC,oBAAA,CAAA0C,mBAAmB;IAClBhB,SAAS,EAAE,IAAAc,mBAAU,EACnBC,iDAAwC,CAACd,aAAa,EACtDA,aACF,CAAE;IACFK,KAAK,EAAEA,KAAM;IACbH,IAAI,EAAEA,IAAK;IACXC,IAAI,EAAEA,IAAK;IACXa,SAAS,EAAE,CAAC,CAAE;IACdC,yBAAyB,EAAEP,oCAAqC;IAChET,IAAI,EAAEA;EAAK,CACZ,CACE,CAAC;AAEV"}
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { BookingCalendarRenderItemProps } from '../bookingCalendarRenderItem';
3
- import { BookingCalendarItemT } from '../common';
4
- import { BookingCalendarDateRange } from '..';
5
- export declare const BookingCalendarLanesHeaderRenderItemFactory: (onRangeChange: (range: BookingCalendarDateRange) => void) => <T extends BookingCalendarItemT>(props: BookingCalendarRenderItemProps<T>) => JSX.Element;
1
+ import * as React from 'react';
2
+ import { BookingCalendarRenderItemProps } from '../bookingCalendarRenderItem';
3
+ import { BookingCalendarItemT, BookingCalendarDateRange } from '../common';
4
+ export declare const BookingCalendarLanesHeaderRenderItemFactory: (onRangeChange: (range: BookingCalendarDateRange) => void) => <T extends BookingCalendarItemT>(props: BookingCalendarRenderItemProps<T>) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"BookingCalendarLanesHeaderRenderItem.js","names":["_classnames","_interopRequireDefault","require","React","_interopRequireWildcard","_classes","_Button","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","BookingCalendarLanesHeaderRenderItemFactory","onRangeChange","BookingCalendarLanesHeaderRenderItem","props","item","className","startIsCut","endIsCut","realFrom","realTill","onClick","useCallback","from","till","createElement","classNames","bookingCalendarRenderItemDefaultClasses","Button","noShadow","type","Fragment","format","exports"],"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeaderRenderItem.tsx"],"sourcesContent":["import classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { BookingCalendarRenderItemProps } from '../bookingCalendarRenderItem';\r\nimport { bookingCalendarRenderItemDefaultClasses } from '../bookingCalendarRenderItem/classes';\r\nimport { BookingCalendarItemT } from '../common';\r\nimport { Button } from '../../button/Button';\r\nimport { BookingCalendarDateRange } from '..';\r\n\r\nexport const BookingCalendarLanesHeaderRenderItemFactory = (\r\n onRangeChange: (range: BookingCalendarDateRange) => void\r\n) =>\r\n function BookingCalendarLanesHeaderRenderItem<T extends BookingCalendarItemT>(\r\n props: BookingCalendarRenderItemProps<T>\r\n ) {\r\n const { item, className, startIsCut, endIsCut, realFrom, realTill } = props;\r\n const onClick = React.useCallback(\r\n () => onRangeChange({ from: item.from, till: item.till }),\r\n [item]\r\n );\r\n return item ? (\r\n <div\r\n className={classNames(\r\n bookingCalendarRenderItemDefaultClasses.className,\r\n className\r\n )}\r\n >\r\n <Button\r\n className=\"bookingCalendar__lanesHeader__renderItem__button\"\r\n noShadow={true}\r\n onClick={onClick}\r\n type=\"primary\"\r\n >\r\n {startIsCut || endIsCut ? (\r\n <>\r\n {item.from.format('ddd, Do')}\r\n <br />\r\n <span className=\"bookingCalendar__lanesHeader__renderItem__button__mutedText bookingCalendar__lanesHeader__renderItem__button__mutedText--split\">\r\n <span>{startIsCut && realFrom.format('M/D H:mm')}</span>\r\n <span>{endIsCut && realTill.format('M/D H:mm')}</span>\r\n </span>\r\n </>\r\n ) : (\r\n <>\r\n {item.from.format('ddd')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,UAAU,IAAIE,QAAQ,CAACa,MAAM,CAAC,UAAU,CAAQ,CAAC,eACxD/C,KAAA,CAAAwC,aAAA,eAAOP,QAAQ,IAAIE,QAAQ,CAACY,MAAM,CAAC,UAAU,CAAQ,CACjD,CACN,CAAC,gBAEH/C,KAAA,CAAAwC,aAAA,CAAAxC,KAAA,CAAA8C,QAAA,QACGhB,IAAI,CAACQ,IAAI,CAACS,MAAM,CAAC,KAAK,CAAC,eACxB/C,KAAA,CAAAwC,aAAA,WAAK,CAAC,eACNxC,KAAA,CAAAwC,aAAA;IAAMT,SAAS,EAAC;EAA6D,GAC1ED,IAAI,CAACQ,IAAI,CAACS,MAAM,CAAC,IAAI,CAClB,CACN,CAEE,CACL,CAAC,GACJ,IAAI;AACV,CAAC;AAACC,OAAA,CAAAtB,2CAAA,GAAAA,2CAAA"}
1
+ {"version":3,"file":"BookingCalendarLanesHeaderRenderItem.js","names":["_classnames","_interopRequireDefault","require","React","_interopRequireWildcard","_classes","_Button","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","BookingCalendarLanesHeaderRenderItemFactory","onRangeChange","BookingCalendarLanesHeaderRenderItem","props","item","className","startIsCut","endIsCut","realFrom","realTill","onClick","useCallback","from","till","createElement","classNames","bookingCalendarRenderItemDefaultClasses","Button","noShadow","type","Fragment","format","exports"],"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeaderRenderItem.tsx"],"sourcesContent":["import classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { BookingCalendarRenderItemProps } from '../bookingCalendarRenderItem';\r\nimport { bookingCalendarRenderItemDefaultClasses } from '../bookingCalendarRenderItem/classes';\r\nimport { BookingCalendarItemT, BookingCalendarDateRange } from '../common';\r\nimport { Button } from '../../button/Button';\r\n\r\nexport const BookingCalendarLanesHeaderRenderItemFactory = (\r\n onRangeChange: (range: BookingCalendarDateRange) => void\r\n) =>\r\n function BookingCalendarLanesHeaderRenderItem<T extends BookingCalendarItemT>(\r\n props: BookingCalendarRenderItemProps<T>\r\n ) {\r\n const { item, className, startIsCut, endIsCut, realFrom, realTill } = props;\r\n const onClick = React.useCallback(\r\n () => onRangeChange({ from: item.from, till: item.till }),\r\n [item]\r\n );\r\n return item ? (\r\n <div\r\n className={classNames(\r\n bookingCalendarRenderItemDefaultClasses.className,\r\n className\r\n )}\r\n >\r\n <Button\r\n className=\"bookingCalendar__lanesHeader__renderItem__button\"\r\n noShadow={true}\r\n onClick={onClick}\r\n type=\"primary\"\r\n >\r\n {startIsCut || endIsCut ? (\r\n <>\r\n {item.from.format('ddd, Do')}\r\n <br />\r\n <span className=\"bookingCalendar__lanesHeader__renderItem__button__mutedText bookingCalendar__lanesHeader__renderItem__button__mutedText--split\">\r\n <span>{startIsCut && realFrom.format('M/D H:mm')}</span>\r\n <span>{endIsCut && realTill.format('M/D H:mm')}</span>\r\n </span>\r\n </>\r\n ) : (\r\n <>\r\n {item.from.format('ddd')}\r\n <br />\r\n <span className=\"bookingCalendar__lanesHeader__renderItem__button__mutedText\">\r\n {item.from.format('Do')}\r\n </span>\r\n </>\r\n )}\r\n </Button>\r\n </div>\r\n ) : null;\r\n };\r\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AAA6C,SAAAK,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAJ,wBAAAQ,GAAA,EA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+1,5 @@
1
- export interface BookingCalendarLanesHeaderClasses {
2
- className?: string;
3
- laneClassName?: string;
4
- }
5
- export declare const bookingCalendarLanesHeaderDefaultClasses: BookingCalendarLanesHeaderClasses;
1
+ export interface BookingCalendarLanesHeaderClasses {
2
+ className?: string;
3
+ laneClassName?: string;
4
+ }
5
+ export declare const bookingCalendarLanesHeaderDefaultClasses: BookingCalendarLanesHeaderClasses;
@@ -1,2 +1,2 @@
1
- export * from './BookingCalendarLanesHeader';
2
- export * from './classes';
1
+ export * from './BookingCalendarLanesHeader';
2
+ export * from './classes';
@@ -1,9 +1,9 @@
1
- import * as React from 'react';
2
- import { BookingCalendarItemProps } from '../bookingCalendarItem';
3
- import { BookingCalendarItemT } from './../common';
4
- import { BookingCalendarRenderItemClasses } from './classes';
5
- export interface BookingCalendarRenderItemProps<T extends BookingCalendarItemT> extends BookingCalendarItemProps<T>, BookingCalendarRenderItemClasses {
6
- alwaysShowContent?: boolean;
7
- children?: React.ReactNode;
8
- }
9
- export declare function BookingCalendarRenderItem<T extends BookingCalendarItemT>(props: BookingCalendarRenderItemProps<T>): JSX.Element;
1
+ import * as React from 'react';
2
+ import { BookingCalendarItemProps } from '../bookingCalendarItem';
3
+ import { BookingCalendarItemT } from './../common';
4
+ import { BookingCalendarRenderItemClasses } from './classes';
5
+ export interface BookingCalendarRenderItemProps<T extends BookingCalendarItemT> extends BookingCalendarItemProps<T>, BookingCalendarRenderItemClasses {
6
+ alwaysShowContent?: boolean;
7
+ children?: React.ReactNode;
8
+ }
9
+ export declare function BookingCalendarRenderItem<T extends BookingCalendarItemT>(props: BookingCalendarRenderItemProps<T>): React.JSX.Element;
@@ -1,6 +1,6 @@
1
- export interface BookingCalendarRenderItemClasses {
2
- className?: string;
3
- cutStartClassname?: string;
4
- cutEndClassname?: string;
5
- }
6
- export declare const bookingCalendarRenderItemDefaultClasses: BookingCalendarRenderItemClasses;
1
+ export interface BookingCalendarRenderItemClasses {
2
+ className?: string;
3
+ cutStartClassname?: string;
4
+ cutEndClassname?: string;
5
+ }
6
+ export declare const bookingCalendarRenderItemDefaultClasses: BookingCalendarRenderItemClasses;
@@ -1 +1 @@
1
- export * from './BookingCalendarRenderItem';
1
+ export * from './BookingCalendarRenderItem';
@@ -1,37 +1,38 @@
1
- import * as React from 'react';
2
- export declare type BookingCalendarSelectionCoordinates = [number, number];
3
- export interface BookingCalendarSelectionData {
4
- origin: BookingCalendarSelectionCoordinates;
5
- target: BookingCalendarSelectionCoordinates;
6
- }
7
- export interface BookingCalendarSelectionProps {
8
- disabled?: boolean;
9
- onSelecting?: (data: {
10
- origin: BookingCalendarSelectionCoordinates;
11
- target: BookingCalendarSelectionCoordinates;
12
- }) => void;
13
- onSelected?: (data: {
14
- origin: BookingCalendarSelectionCoordinates;
15
- target: BookingCalendarSelectionCoordinates;
16
- }) => void;
17
- dataRowsCount: number;
18
- minSelectionSize: number;
19
- }
20
- export interface BookingCalendarSelectionState {
21
- selectionBoxOrigin: BookingCalendarSelectionCoordinates;
22
- selectionBoxTarget: BookingCalendarSelectionCoordinates;
23
- hold: boolean;
24
- animation: string;
25
- selectionBox: boolean;
26
- }
27
- export default class BookingCalendarSelection extends React.Component<BookingCalendarSelectionProps, BookingCalendarSelectionState> {
28
- private animationInProgress;
29
- private containerRef;
30
- constructor(props: any);
31
- handleTransformBox(): "scaleY(-1) scaleX(-1)" | "scaleY(-1)" | "scaleX(-1)";
32
- handleMouseLeave(evt: React.MouseEvent<HTMLElement>): void;
33
- handleMouseUp(evt: React.MouseEvent<HTMLElement>): void;
34
- handleMouseDown(e: React.MouseEvent<HTMLDivElement>): void;
35
- private handleMouseMove;
36
- render(): JSX.Element;
37
- }
1
+ import * as React from 'react';
2
+ export type BookingCalendarSelectionCoordinates = [number, number];
3
+ export interface BookingCalendarSelectionData {
4
+ origin: BookingCalendarSelectionCoordinates;
5
+ target: BookingCalendarSelectionCoordinates;
6
+ }
7
+ export interface BookingCalendarSelectionProps {
8
+ disabled?: boolean;
9
+ onSelecting?: (data: {
10
+ origin: BookingCalendarSelectionCoordinates;
11
+ target: BookingCalendarSelectionCoordinates;
12
+ }) => void;
13
+ onSelected?: (data: {
14
+ origin: BookingCalendarSelectionCoordinates;
15
+ target: BookingCalendarSelectionCoordinates;
16
+ }, e: React.MouseEvent<HTMLElement>) => void;
17
+ dataRowsCount: number;
18
+ minSelectionSize: number;
19
+ children?: React.ReactNode;
20
+ }
21
+ export interface BookingCalendarSelectionState {
22
+ selectionBoxOrigin: BookingCalendarSelectionCoordinates;
23
+ selectionBoxTarget: BookingCalendarSelectionCoordinates;
24
+ hold: boolean;
25
+ animation: string;
26
+ selectionBox: boolean;
27
+ }
28
+ export default class BookingCalendarSelection extends React.Component<BookingCalendarSelectionProps, BookingCalendarSelectionState> {
29
+ private animationInProgress;
30
+ private containerRef;
31
+ constructor(props: any);
32
+ handleTransformBox(): "scaleY(-1) scaleX(-1)" | "scaleY(-1)" | "scaleX(-1)";
33
+ handleMouseLeave(evt: React.MouseEvent<HTMLElement>): void;
34
+ handleMouseUp(evt: React.MouseEvent<HTMLElement>): void;
35
+ handleMouseDown(e: React.MouseEvent<HTMLDivElement>): void;
36
+ private handleMouseMove;
37
+ render(): React.JSX.Element;
38
+ }
@@ -5,11 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
+ var _classes = require("./classes");
8
9
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
10
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
11
  class BookingCalendarSelection extends React.Component {
11
12
  constructor(props) {
12
13
  super(props);
14
+ this.animationInProgress = void 0;
15
+ this.containerRef = void 0;
13
16
  this.animationInProgress = null;
14
17
  this.containerRef = /*#__PURE__*/React.createRef();
15
18
  this.state = {
@@ -80,7 +83,7 @@ class BookingCalendarSelection extends React.Component {
80
83
  (_this$props$onSelecte = (_this$props = this.props).onSelected) === null || _this$props$onSelecte === void 0 ? void 0 : _this$props$onSelecte.call(_this$props, {
81
84
  origin: this.state.selectionBoxOrigin,
82
85
  target: this.state.selectionBoxTarget
83
- });
86
+ }, evt);
84
87
  }
85
88
  }
86
89
  handleMouseDown(e) {
@@ -133,7 +136,7 @@ class BookingCalendarSelection extends React.Component {
133
136
  const boxVisible = Math.sqrt(Math.pow(this.state.selectionBoxTarget[1] - this.state.selectionBoxOrigin[1], 2) + Math.pow(this.state.selectionBoxTarget[0] - this.state.selectionBoxOrigin[0], 2)) > this.props.minSelectionSize;
134
137
  return /*#__PURE__*/React.createElement("div", {
135
138
  ref: this.containerRef,
136
- className: "bookingCalendar__selection__container",
139
+ className: _classes.bookingCalendarSelectionDefaultClasses.root,
137
140
  style: {
138
141
  zIndex: this.state.selectionBox ? 99999 : undefined,
139
142
  gridRowEnd: `span ${this.props.dataRowsCount}`
@@ -143,9 +146,9 @@ class BookingCalendarSelection extends React.Component {
143
146
  onMouseMove: this.handleMouseMove,
144
147
  onMouseLeave: this.handleMouseLeave
145
148
  }, boxVisible && this.state.selectionBox && /*#__PURE__*/React.createElement("div", {
146
- className: `bookingCalendar__selection ${this.state.animation}`,
149
+ className: `${_classes.bookingCalendarSelectionDefaultClasses.selection} ${this.state.animation}`,
147
150
  style: baseStyle
148
- }), this.props.children);
151
+ }, this.props.children));
149
152
  }
150
153
  }
151
154
  exports.default = BookingCalendarSelection;