guestbell-forms 2.0.298 → 2.0.299

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 (209) hide show
  1. package/build/components/InputHeader/InputHeader.js +258 -323
  2. package/build/components/InputHeader/InputHeader.js.map +1 -1
  3. package/build/components/InputHeader/InputHeaderContext.js +6 -8
  4. package/build/components/InputHeader/InputHeaderContext.js.map +1 -1
  5. package/build/components/InputHeader/index.js +4 -6
  6. package/build/components/InputHeader/index.js.map +1 -1
  7. package/build/components/InputHeader/withInputHeaderContext.js +9 -13
  8. package/build/components/InputHeader/withInputHeaderContext.js.map +1 -1
  9. package/build/components/base/input/BaseInput.js +334 -418
  10. package/build/components/base/input/BaseInput.js.map +1 -1
  11. package/build/components/base/input/index.js +1 -1
  12. package/build/components/base/input/index.js.map +1 -1
  13. package/build/components/bookingCalendar/BookingCalendar.js +68 -85
  14. package/build/components/bookingCalendar/BookingCalendar.js.map +1 -1
  15. package/build/components/bookingCalendar/bookingCalendarControls/BookingCalendarControls.js +40 -71
  16. package/build/components/bookingCalendar/bookingCalendarControls/BookingCalendarControls.js.map +1 -1
  17. package/build/components/bookingCalendar/bookingCalendarControls/classes.js +1 -1
  18. package/build/components/bookingCalendar/bookingCalendarControls/classes.js.map +1 -1
  19. package/build/components/bookingCalendar/bookingCalendarControls/index.js +2 -2
  20. package/build/components/bookingCalendar/bookingCalendarControls/index.js.map +1 -1
  21. package/build/components/bookingCalendar/bookingCalendarDatePicker/BookingCalendarDatePicker.js +22 -41
  22. package/build/components/bookingCalendar/bookingCalendarDatePicker/BookingCalendarDatePicker.js.map +1 -1
  23. package/build/components/bookingCalendar/bookingCalendarDatePicker/classes.js +1 -1
  24. package/build/components/bookingCalendar/bookingCalendarDatePicker/classes.js.map +1 -1
  25. package/build/components/bookingCalendar/bookingCalendarDatePicker/index.js +2 -2
  26. package/build/components/bookingCalendar/bookingCalendarDatePicker/index.js.map +1 -1
  27. package/build/components/bookingCalendar/bookingCalendarGrid/BookingCalendarGrid.js +20 -24
  28. package/build/components/bookingCalendar/bookingCalendarGrid/BookingCalendarGrid.js.map +1 -1
  29. package/build/components/bookingCalendar/bookingCalendarGrid/classes.js +1 -1
  30. package/build/components/bookingCalendar/bookingCalendarGrid/classes.js.map +1 -1
  31. package/build/components/bookingCalendar/bookingCalendarItem/BookingCalendarItem.js +9 -12
  32. package/build/components/bookingCalendar/bookingCalendarItem/BookingCalendarItem.js.map +1 -1
  33. package/build/components/bookingCalendar/bookingCalendarItem/classes.js +1 -1
  34. package/build/components/bookingCalendar/bookingCalendarItem/classes.js.map +1 -1
  35. package/build/components/bookingCalendar/bookingCalendarItem/index.js +2 -2
  36. package/build/components/bookingCalendar/bookingCalendarItem/index.js.map +1 -1
  37. package/build/components/bookingCalendar/bookingCalendarLane/BookingCalendarLane.js +23 -28
  38. package/build/components/bookingCalendar/bookingCalendarLane/BookingCalendarLane.js.map +1 -1
  39. package/build/components/bookingCalendar/bookingCalendarLane/classes.js +1 -1
  40. package/build/components/bookingCalendar/bookingCalendarLane/classes.js.map +1 -1
  41. package/build/components/bookingCalendar/bookingCalendarLane/index.js +2 -2
  42. package/build/components/bookingCalendar/bookingCalendarLane/index.js.map +1 -1
  43. package/build/components/bookingCalendar/bookingCalendarLaneHeader/BookingCalendarLaneHeader.js +6 -6
  44. package/build/components/bookingCalendar/bookingCalendarLaneHeader/BookingCalendarLaneHeader.js.map +1 -1
  45. package/build/components/bookingCalendar/bookingCalendarLaneHeader/classes.js +1 -1
  46. package/build/components/bookingCalendar/bookingCalendarLaneHeader/classes.js.map +1 -1
  47. package/build/components/bookingCalendar/bookingCalendarLaneHeader/index.js +1 -1
  48. package/build/components/bookingCalendar/bookingCalendarLaneHeader/index.js.map +1 -1
  49. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeader.js +12 -16
  50. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeader.js.map +1 -1
  51. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeaderRenderItem.js +27 -31
  52. package/build/components/bookingCalendar/bookingCalendarLanesHeader/BookingCalendarLanesHeaderRenderItem.js.map +1 -1
  53. package/build/components/bookingCalendar/bookingCalendarLanesHeader/classes.js +1 -1
  54. package/build/components/bookingCalendar/bookingCalendarLanesHeader/classes.js.map +1 -1
  55. package/build/components/bookingCalendar/bookingCalendarLanesHeader/index.js +2 -2
  56. package/build/components/bookingCalendar/bookingCalendarLanesHeader/index.js.map +1 -1
  57. package/build/components/bookingCalendar/bookingCalendarRenderItem/BookingCalendarRenderItem.js +19 -19
  58. package/build/components/bookingCalendar/bookingCalendarRenderItem/BookingCalendarRenderItem.js.map +1 -1
  59. package/build/components/bookingCalendar/bookingCalendarRenderItem/classes.js +1 -1
  60. package/build/components/bookingCalendar/bookingCalendarRenderItem/classes.js.map +1 -1
  61. package/build/components/bookingCalendar/bookingCalendarRenderItem/index.js +1 -1
  62. package/build/components/bookingCalendar/bookingCalendarRenderItem/index.js.map +1 -1
  63. package/build/components/bookingCalendar/bookingCalendarSelection/BookingCalendarSelection.js +133 -175
  64. package/build/components/bookingCalendar/bookingCalendarSelection/BookingCalendarSelection.js.map +1 -1
  65. package/build/components/bookingCalendar/bookingCalendarTimeAxis/BookingCalendarTimeAxis.js +17 -19
  66. package/build/components/bookingCalendar/bookingCalendarTimeAxis/BookingCalendarTimeAxis.js.map +1 -1
  67. package/build/components/bookingCalendar/bookingCalendarTimeAxis/classes.js +1 -1
  68. package/build/components/bookingCalendar/bookingCalendarTimeAxis/classes.js.map +1 -1
  69. package/build/components/bookingCalendar/classes.js +1 -1
  70. package/build/components/bookingCalendar/classes.js.map +1 -1
  71. package/build/components/bookingCalendar/common.js +5 -7
  72. package/build/components/bookingCalendar/common.js.map +1 -1
  73. package/build/components/bookingCalendar/index.js +3 -3
  74. package/build/components/bookingCalendar/index.js.map +1 -1
  75. package/build/components/bookingCalendar/utils.js +143 -205
  76. package/build/components/bookingCalendar/utils.js.map +1 -1
  77. package/build/components/button/Button.js +101 -123
  78. package/build/components/button/Button.js.map +1 -1
  79. package/build/components/button/index.js +4 -6
  80. package/build/components/button/index.js.map +1 -1
  81. package/build/components/checkbox/Checkbox.js +102 -145
  82. package/build/components/checkbox/Checkbox.js.map +1 -1
  83. package/build/components/checkbox/index.js +4 -6
  84. package/build/components/checkbox/index.js.map +1 -1
  85. package/build/components/dropdown/Dropdown.js +41 -57
  86. package/build/components/dropdown/Dropdown.js.map +1 -1
  87. package/build/components/dropdown/index.js +4 -6
  88. package/build/components/dropdown/index.js.map +1 -1
  89. package/build/components/dynamicSubmit/DynamicSubmit.js +81 -123
  90. package/build/components/dynamicSubmit/DynamicSubmit.js.map +1 -1
  91. package/build/components/dynamicSubmit/index.js +4 -6
  92. package/build/components/dynamicSubmit/index.js.map +1 -1
  93. package/build/components/form/Form.js +139 -193
  94. package/build/components/form/Form.js.map +1 -1
  95. package/build/components/form/FormContext.js +6 -8
  96. package/build/components/form/FormContext.js.map +1 -1
  97. package/build/components/form/FormValidationSummary.js +57 -105
  98. package/build/components/form/FormValidationSummary.js.map +1 -1
  99. package/build/components/form/index.js +5 -7
  100. package/build/components/form/index.js.map +1 -1
  101. package/build/components/form/withFormContext.js +9 -13
  102. package/build/components/form/withFormContext.js.map +1 -1
  103. package/build/components/inputGroup/InputGroup.js +16 -48
  104. package/build/components/inputGroup/InputGroup.js.map +1 -1
  105. package/build/components/inputGroup/index.js +4 -6
  106. package/build/components/inputGroup/index.js.map +1 -1
  107. package/build/components/money/Money.js +137 -211
  108. package/build/components/money/Money.js.map +1 -1
  109. package/build/components/money/index.js +4 -6
  110. package/build/components/money/index.js.map +1 -1
  111. package/build/components/numberInput/NumberInput.js +106 -144
  112. package/build/components/numberInput/NumberInput.js.map +1 -1
  113. package/build/components/numberInput/index.js +4 -6
  114. package/build/components/numberInput/index.js.map +1 -1
  115. package/build/components/openingHours/openingHoursDay/OpeningHoursDay.js +162 -220
  116. package/build/components/openingHours/openingHoursDay/OpeningHoursDay.js.map +1 -1
  117. package/build/components/openingHours/openingHoursDay/index.js +4 -6
  118. package/build/components/openingHours/openingHoursDay/index.js.map +1 -1
  119. package/build/components/openingHours/openingHoursSpecial/OpeningHoursSpecial.js +114 -191
  120. package/build/components/openingHours/openingHoursSpecial/OpeningHoursSpecial.js.map +1 -1
  121. package/build/components/openingHours/openingHoursSpecial/index.js +4 -6
  122. package/build/components/openingHours/openingHoursSpecial/index.js.map +1 -1
  123. package/build/components/openingHours/openingHoursWeek/OpeningHoursWeek.js +150 -209
  124. package/build/components/openingHours/openingHoursWeek/OpeningHoursWeek.js.map +1 -1
  125. package/build/components/openingHours/openingHoursWeek/index.js +4 -6
  126. package/build/components/openingHours/openingHoursWeek/index.js.map +1 -1
  127. package/build/components/openingHours/utils/OpeningHoursUtil.js +51 -76
  128. package/build/components/openingHours/utils/OpeningHoursUtil.js.map +1 -1
  129. package/build/components/radio/Radio.js +38 -75
  130. package/build/components/radio/Radio.js.map +1 -1
  131. package/build/components/radio/index.js +4 -6
  132. package/build/components/radio/index.js.map +1 -1
  133. package/build/components/radioContainer/RadioContainer.js +19 -49
  134. package/build/components/radioContainer/RadioContainer.js.map +1 -1
  135. package/build/components/radioContainer/index.js +4 -6
  136. package/build/components/radioContainer/index.js.map +1 -1
  137. package/build/components/select/Select.js +186 -264
  138. package/build/components/select/Select.js.map +1 -1
  139. package/build/components/select/index.js +4 -6
  140. package/build/components/select/index.js.map +1 -1
  141. package/build/components/submit/Submit.js +50 -87
  142. package/build/components/submit/Submit.js.map +1 -1
  143. package/build/components/submit/index.js +4 -6
  144. package/build/components/submit/index.js.map +1 -1
  145. package/build/components/submit/subComponents/SubmitValidationSummary.js +5 -7
  146. package/build/components/submit/subComponents/SubmitValidationSummary.js.map +1 -1
  147. package/build/components/tags/Tags.js +365 -565
  148. package/build/components/tags/Tags.js.map +1 -1
  149. package/build/components/tags/index.js +4 -6
  150. package/build/components/tags/index.js.map +1 -1
  151. package/build/components/tags/subComponents/TagsSuggestions.js +29 -30
  152. package/build/components/tags/subComponents/TagsSuggestions.js.map +1 -1
  153. package/build/components/text/Text.js +95 -138
  154. package/build/components/text/Text.js.map +1 -1
  155. package/build/components/text/index.js +4 -6
  156. package/build/components/text/index.js.map +1 -1
  157. package/build/components/textArea/TextArea.js +52 -91
  158. package/build/components/textArea/TextArea.js.map +1 -1
  159. package/build/components/textArea/index.js +4 -6
  160. package/build/components/textArea/index.js.map +1 -1
  161. package/build/components/themeProvider/ThemeContext.js +6 -8
  162. package/build/components/themeProvider/ThemeContext.js.map +1 -1
  163. package/build/components/themeProvider/ThemeProvider.js +3 -5
  164. package/build/components/themeProvider/ThemeProvider.js.map +1 -1
  165. package/build/components/themeProvider/index.js +4 -6
  166. package/build/components/themeProvider/index.js.map +1 -1
  167. package/build/components/themeProvider/withThemeContext.js +10 -14
  168. package/build/components/themeProvider/withThemeContext.js.map +1 -1
  169. package/build/components/time/Time.js +184 -228
  170. package/build/components/time/Time.js.map +1 -1
  171. package/build/components/time/index.js +4 -6
  172. package/build/components/time/index.js.map +1 -1
  173. package/build/components/timeSpan/TimeSpan.js +226 -280
  174. package/build/components/timeSpan/TimeSpan.js.map +1 -1
  175. package/build/components/timeSpan/index.js +4 -6
  176. package/build/components/timeSpan/index.js.map +1 -1
  177. package/build/components/utils/Guid.js +3 -5
  178. package/build/components/utils/Guid.js.map +1 -1
  179. package/build/components/utils/ShallowEqual.js +5 -11
  180. package/build/components/utils/ShallowEqual.js.map +1 -1
  181. package/build/components/utils/TimeUtil.js +8 -22
  182. package/build/components/utils/TimeUtil.js.map +1 -1
  183. package/build/components/utils/Typescript.js.map +1 -1
  184. package/build/dist/guestbell-forms.css +0 -6
  185. package/build/dist/guestbell-forms.css.map +1 -1
  186. package/build/dist/guestbell-forms.min.css +1 -1
  187. package/build/dist/guestbell-forms.min.js +1 -1
  188. package/build/dist/guestbell-forms.min.js.map +1 -1
  189. package/build/dist/report.html +2 -2
  190. package/build/index.js +23 -23
  191. package/build/index.js.map +1 -1
  192. package/build/types/ElementOverrideProp.js.map +1 -1
  193. package/build/types/Theme.js.map +1 -1
  194. package/build/types/ThemeOverrides.js.map +1 -1
  195. package/build/validators/EmailValidator.js +8 -22
  196. package/build/validators/EmailValidator.js.map +1 -1
  197. package/build/validators/LatitudeValidator.js +13 -27
  198. package/build/validators/LatitudeValidator.js.map +1 -1
  199. package/build/validators/LongitudeValidator.js +13 -27
  200. package/build/validators/LongitudeValidator.js.map +1 -1
  201. package/build/validators/NumberValidator.js +27 -39
  202. package/build/validators/NumberValidator.js.map +1 -1
  203. package/build/validators/UrlValidator.js +9 -23
  204. package/build/validators/UrlValidator.js.map +1 -1
  205. package/build/validators/base.js.map +1 -1
  206. package/build/validators/index.js +6 -6
  207. package/build/validators/index.js.map +1 -1
  208. package/package.json +8 -5
  209. package/tsconfig.json +0 -1
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.bookingCalendarRenderItemDefaultClasses = void 0;
7
- var bookingCalendarRenderItemDefaultClasses = {
7
+ const bookingCalendarRenderItemDefaultClasses = {
8
8
  className: 'bookingCalendar__renderItem',
9
9
  cutStartClassname: 'bookingCalendar__renderItem--cutStart',
10
10
  cutEndClassname: 'bookingCalendar__renderItem--cutEnd'
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarRenderItem/classes.ts"],"names":["bookingCalendarRenderItemDefaultClasses","className","cutStartClassname","cutEndClassname"],"mappings":";;;;;;AAMO,IAAMA,uCAAyE,GAAG;AACvFC,EAAAA,SAAS,EAAE,6BAD4E;AAEvFC,EAAAA,iBAAiB,EAAE,uCAFoE;AAGvFC,EAAAA,eAAe,EAAE;AAHsE,CAAlF","sourcesContent":["export interface BookingCalendarRenderItemClasses {\r\n className?: string;\r\n cutStartClassname?: string;\r\n cutEndClassname?: string;\r\n}\r\n\r\nexport const bookingCalendarRenderItemDefaultClasses: BookingCalendarRenderItemClasses = {\r\n className: 'bookingCalendar__renderItem',\r\n cutStartClassname: 'bookingCalendar__renderItem--cutStart',\r\n cutEndClassname: 'bookingCalendar__renderItem--cutEnd',\r\n};\r\n"],"file":"classes.js"}
1
+ {"version":3,"file":"classes.js","names":["bookingCalendarRenderItemDefaultClasses","className","cutStartClassname","cutEndClassname"],"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarRenderItem/classes.ts"],"sourcesContent":["export interface BookingCalendarRenderItemClasses {\r\n className?: string;\r\n cutStartClassname?: string;\r\n cutEndClassname?: string;\r\n}\r\n\r\nexport const bookingCalendarRenderItemDefaultClasses: BookingCalendarRenderItemClasses = {\r\n className: 'bookingCalendar__renderItem',\r\n cutStartClassname: 'bookingCalendar__renderItem--cutStart',\r\n cutEndClassname: 'bookingCalendar__renderItem--cutEnd',\r\n};\r\n"],"mappings":";;;;;;AAMO,MAAMA,uCAAyE,GAAG;EACvFC,SAAS,EAAE,6BAD4E;EAEvFC,iBAAiB,EAAE,uCAFoE;EAGvFC,eAAe,EAAE;AAHsE,CAAlF"}
@@ -11,7 +11,7 @@ Object.keys(_BookingCalendarRenderItem).forEach(function (key) {
11
11
  if (key in exports && exports[key] === _BookingCalendarRenderItem[key]) return;
12
12
  Object.defineProperty(exports, key, {
13
13
  enumerable: true,
14
- get: function get() {
14
+ get: function () {
15
15
  return _BookingCalendarRenderItem[key];
16
16
  }
17
17
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarRenderItem/index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './BookingCalendarRenderItem';\r\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarRenderItem/index.ts"],"sourcesContent":["export * from './BookingCalendarRenderItem';\r\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -9,216 +7,176 @@ exports.default = void 0;
9
7
 
10
8
  var React = _interopRequireWildcard(require("react"));
11
9
 
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
-
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
-
16
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
17
-
18
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
19
-
20
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
21
-
22
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
23
-
24
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
25
-
26
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
+ 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); }
27
11
 
28
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
29
-
30
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
31
-
32
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
33
-
34
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
12
+ 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; }
35
13
 
36
14
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
37
15
 
38
- var BookingCalendarSelection = /*#__PURE__*/function (_React$Component) {
39
- _inherits(BookingCalendarSelection, _React$Component);
40
-
41
- var _super = _createSuper(BookingCalendarSelection);
42
-
43
- function BookingCalendarSelection(props) {
44
- var _this;
45
-
46
- _classCallCheck(this, BookingCalendarSelection);
47
-
48
- _this = _super.call(this, props);
16
+ class BookingCalendarSelection extends React.Component {
17
+ constructor(props) {
18
+ super(props);
49
19
 
50
- _defineProperty(_assertThisInitialized(_this), "animationInProgress", void 0);
20
+ _defineProperty(this, "animationInProgress", void 0);
51
21
 
52
- _defineProperty(_assertThisInitialized(_this), "containerRef", void 0);
22
+ _defineProperty(this, "containerRef", void 0);
53
23
 
54
- _this.animationInProgress = null;
55
- _this.containerRef = /*#__PURE__*/React.createRef();
56
- _this.state = {
24
+ this.animationInProgress = null;
25
+ this.containerRef = /*#__PURE__*/React.createRef();
26
+ this.state = {
57
27
  hold: false,
58
28
  selectionBox: false,
59
29
  selectionBoxOrigin: [0, 0],
60
30
  selectionBoxTarget: [0, 0],
61
31
  animation: ''
62
32
  };
63
- _this.handleMouseUp = _this.handleMouseUp.bind(_assertThisInitialized(_this));
64
- _this.handleMouseDown = _this.handleMouseDown.bind(_assertThisInitialized(_this));
65
- _this.handleMouseMove = _this.handleMouseMove.bind(_assertThisInitialized(_this));
66
- _this.handleMouseLeave = _this.handleMouseLeave.bind(_assertThisInitialized(_this));
67
- return _this;
33
+ this.handleMouseUp = this.handleMouseUp.bind(this);
34
+ this.handleMouseDown = this.handleMouseDown.bind(this);
35
+ this.handleMouseMove = this.handleMouseMove.bind(this);
36
+ this.handleMouseLeave = this.handleMouseLeave.bind(this);
68
37
  }
69
38
 
70
- _createClass(BookingCalendarSelection, [{
71
- key: "handleTransformBox",
72
- value: function handleTransformBox() {
73
- var _this$state = this.state,
74
- selectionBoxOrigin = _this$state.selectionBoxOrigin,
75
- selectionBoxTarget = _this$state.selectionBoxTarget;
39
+ handleTransformBox() {
40
+ const {
41
+ selectionBoxOrigin,
42
+ selectionBoxTarget
43
+ } = this.state;
76
44
 
77
- if (selectionBoxOrigin[1] > selectionBoxTarget[1] && selectionBoxOrigin[0] > selectionBoxTarget[0]) {
78
- return 'scaleY(-1) scaleX(-1)';
79
- }
80
-
81
- if (selectionBoxOrigin[1] > selectionBoxTarget[1]) {
82
- return 'scaleY(-1)';
83
- }
45
+ if (selectionBoxOrigin[1] > selectionBoxTarget[1] && selectionBoxOrigin[0] > selectionBoxTarget[0]) {
46
+ return 'scaleY(-1) scaleX(-1)';
47
+ }
84
48
 
85
- if (selectionBoxOrigin[0] > selectionBoxTarget[0]) {
86
- return 'scaleX(-1)';
87
- }
49
+ if (selectionBoxOrigin[1] > selectionBoxTarget[1]) {
50
+ return 'scaleY(-1)';
51
+ }
88
52
 
89
- return null;
53
+ if (selectionBoxOrigin[0] > selectionBoxTarget[0]) {
54
+ return 'scaleX(-1)';
90
55
  }
91
- }, {
92
- key: "handleMouseLeave",
93
- value: function handleMouseLeave(evt) {
94
- /*if (this.state.hold) {
56
+
57
+ return null;
58
+ }
59
+
60
+ handleMouseLeave(evt) {
61
+ /*if (this.state.hold) {
62
+ this.setState({
63
+ hold: false,
64
+ animation: 'bookingCalendar__selection--fadeout',
65
+ });
66
+ this.animationInProgress = (setTimeout(() => {
95
67
  this.setState({
96
- hold: false,
97
- animation: 'bookingCalendar__selection--fadeout',
68
+ selectionBox: false,
69
+ animation: '',
70
+ selectionBoxOrigin: [0, 0],
71
+ selectionBoxTarget: [0, 0],
98
72
  });
99
- this.animationInProgress = (setTimeout(() => {
100
- this.setState({
101
- selectionBox: false,
102
- animation: '',
103
- selectionBoxOrigin: [0, 0],
104
- selectionBoxTarget: [0, 0],
105
- });
106
- this.animationInProgress = null;
107
- }, 300) as unknown) as number;
108
- }*/
109
- }
110
- }, {
111
- key: "handleMouseUp",
112
- value: function handleMouseUp(evt) {
113
- var _this2 = this;
73
+ this.animationInProgress = null;
74
+ }, 300) as unknown) as number;
75
+ }*/
76
+ }
114
77
 
115
- if (this.state.hold) {
116
- var _this$props$onSelecte, _this$props;
78
+ handleMouseUp(evt) {
79
+ if (this.state.hold) {
80
+ var _this$props$onSelecte, _this$props;
117
81
 
118
- var distance = Math.sqrt(Math.pow(this.state.selectionBoxTarget[1] - this.state.selectionBoxOrigin[1], 2) + Math.pow(this.state.selectionBoxTarget[0] - this.state.selectionBoxOrigin[0], 2));
82
+ const distance = Math.sqrt(Math.pow(this.state.selectionBoxTarget[1] - this.state.selectionBoxOrigin[1], 2) + Math.pow(this.state.selectionBoxTarget[0] - this.state.selectionBoxOrigin[0], 2));
83
+ this.setState({
84
+ hold: false,
85
+ animation: 'bookingCalendar__selection--fadeout'
86
+ });
87
+ this.animationInProgress = setTimeout(() => {
119
88
  this.setState({
120
- hold: false,
121
- animation: 'bookingCalendar__selection--fadeout'
122
- });
123
- this.animationInProgress = setTimeout(function () {
124
- _this2.setState({
125
- selectionBox: false,
126
- animation: '',
127
- selectionBoxOrigin: [0, 0],
128
- selectionBoxTarget: [0, 0]
129
- });
130
-
131
- _this2.animationInProgress = null;
132
- }, 300);
133
-
134
- if (distance < this.props.minSelectionSize) {
135
- return;
136
- }
137
-
138
- (_this$props$onSelecte = (_this$props = this.props).onSelected) === null || _this$props$onSelecte === void 0 ? void 0 : _this$props$onSelecte.call(_this$props, {
139
- origin: this.state.selectionBoxOrigin,
140
- target: this.state.selectionBoxTarget
89
+ selectionBox: false,
90
+ animation: '',
91
+ selectionBoxOrigin: [0, 0],
92
+ selectionBoxTarget: [0, 0]
141
93
  });
142
- }
143
- }
144
- }, {
145
- key: "handleMouseDown",
146
- value: function handleMouseDown(e) {
147
- var _this$containerRef$cu;
94
+ this.animationInProgress = null;
95
+ }, 300);
148
96
 
149
- if (this.props.disabled || e.nativeEvent.button !== 0) {
97
+ if (distance < this.props.minSelectionSize) {
150
98
  return;
151
99
  }
152
100
 
153
- clearTimeout(this.animationInProgress);
154
- this.animationInProgress = null;
155
- this.setState({
156
- selectionBox: false,
157
- animation: ''
101
+ (_this$props$onSelecte = (_this$props = this.props).onSelected) === null || _this$props$onSelecte === void 0 ? void 0 : _this$props$onSelecte.call(_this$props, {
102
+ origin: this.state.selectionBoxOrigin,
103
+ target: this.state.selectionBoxTarget
158
104
  });
159
- var bb = (_this$containerRef$cu = this.containerRef.current) === null || _this$containerRef$cu === void 0 ? void 0 : _this$containerRef$cu.getBoundingClientRect();
105
+ }
106
+ }
107
+
108
+ handleMouseDown(e) {
109
+ var _this$containerRef$cu;
110
+
111
+ if (this.props.disabled || e.nativeEvent.button !== 0) {
112
+ return;
113
+ }
114
+
115
+ clearTimeout(this.animationInProgress);
116
+ this.animationInProgress = null;
117
+ this.setState({
118
+ selectionBox: false,
119
+ animation: ''
120
+ });
121
+ const bb = (_this$containerRef$cu = this.containerRef.current) === null || _this$containerRef$cu === void 0 ? void 0 : _this$containerRef$cu.getBoundingClientRect();
122
+ this.setState({
123
+ hold: true,
124
+ selectionBoxOrigin: [e.nativeEvent.pageX - bb.x, e.nativeEvent.pageY - bb.y],
125
+ selectionBoxTarget: [e.nativeEvent.pageX - bb.x, e.nativeEvent.pageY - bb.y]
126
+ });
127
+ }
128
+
129
+ handleMouseMove(evt) {
130
+ if (this.state.hold && !this.state.selectionBox) {
160
131
  this.setState({
161
- hold: true,
162
- selectionBoxOrigin: [e.nativeEvent.pageX - bb.x, e.nativeEvent.pageY - bb.y],
163
- selectionBoxTarget: [e.nativeEvent.pageX - bb.x, e.nativeEvent.pageY - bb.y]
132
+ selectionBox: true
164
133
  });
165
134
  }
166
- }, {
167
- key: "handleMouseMove",
168
- value: function handleMouseMove(evt) {
169
- if (this.state.hold && !this.state.selectionBox) {
170
- this.setState({
171
- selectionBox: true
172
- });
173
- }
174
135
 
175
- if (this.state.selectionBox && !this.animationInProgress) {
176
- var _this$containerRef$cu2, _this$props$onSelecti, _this$props2;
136
+ if (this.state.selectionBox && !this.animationInProgress) {
137
+ var _this$containerRef$cu2, _this$props$onSelecti, _this$props2;
177
138
 
178
- var bb = (_this$containerRef$cu2 = this.containerRef.current) === null || _this$containerRef$cu2 === void 0 ? void 0 : _this$containerRef$cu2.getBoundingClientRect();
179
- this.setState({
180
- selectionBoxTarget: [evt.nativeEvent.pageX - (bb === null || bb === void 0 ? void 0 : bb.x), evt.nativeEvent.pageY - (bb === null || bb === void 0 ? void 0 : bb.y)]
181
- });
182
- (_this$props$onSelecti = (_this$props2 = this.props).onSelecting) === null || _this$props$onSelecti === void 0 ? void 0 : _this$props$onSelecti.call(_this$props2, {
183
- origin: this.state.selectionBoxOrigin,
184
- target: this.state.selectionBoxTarget
185
- });
186
- }
187
- }
188
- }, {
189
- key: "render",
190
- value: function render() {
191
- var baseStyle = {
192
- zIndex: 10,
193
- left: this.state.selectionBoxOrigin[0],
194
- top: this.state.selectionBoxOrigin[1],
195
- height: Math.abs(this.state.selectionBoxTarget[1] - this.state.selectionBoxOrigin[1] - 1),
196
- width: Math.abs(this.state.selectionBoxTarget[0] - this.state.selectionBoxOrigin[0] - 1),
197
- userSelect: 'none',
198
- transformOrigin: 'top left',
199
- transform: this.handleTransformBox()
200
- };
201
- var 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;
202
- return /*#__PURE__*/React.createElement("div", {
203
- ref: this.containerRef,
204
- className: "bookingCalendar__selection__container",
205
- style: {
206
- zIndex: this.state.selectionBox ? 99999 : undefined,
207
- gridRowEnd: "span ".concat(this.props.dataRowsCount)
208
- },
209
- onMouseDown: this.handleMouseDown,
210
- onMouseUp: this.handleMouseUp,
211
- onMouseMove: this.handleMouseMove,
212
- onMouseLeave: this.handleMouseLeave
213
- }, boxVisible && this.state.selectionBox && /*#__PURE__*/React.createElement("div", {
214
- className: "bookingCalendar__selection ".concat(this.state.animation),
215
- style: baseStyle
216
- }), this.props.children);
139
+ const bb = (_this$containerRef$cu2 = this.containerRef.current) === null || _this$containerRef$cu2 === void 0 ? void 0 : _this$containerRef$cu2.getBoundingClientRect();
140
+ this.setState({
141
+ selectionBoxTarget: [evt.nativeEvent.pageX - (bb === null || bb === void 0 ? void 0 : bb.x), evt.nativeEvent.pageY - (bb === null || bb === void 0 ? void 0 : bb.y)]
142
+ });
143
+ (_this$props$onSelecti = (_this$props2 = this.props).onSelecting) === null || _this$props$onSelecti === void 0 ? void 0 : _this$props$onSelecti.call(_this$props2, {
144
+ origin: this.state.selectionBoxOrigin,
145
+ target: this.state.selectionBoxTarget
146
+ });
217
147
  }
218
- }]);
148
+ }
149
+
150
+ render() {
151
+ const baseStyle = {
152
+ zIndex: 10,
153
+ left: this.state.selectionBoxOrigin[0],
154
+ top: this.state.selectionBoxOrigin[1],
155
+ height: Math.abs(this.state.selectionBoxTarget[1] - this.state.selectionBoxOrigin[1] - 1),
156
+ width: Math.abs(this.state.selectionBoxTarget[0] - this.state.selectionBoxOrigin[0] - 1),
157
+ userSelect: 'none',
158
+ transformOrigin: 'top left',
159
+ transform: this.handleTransformBox()
160
+ };
161
+ 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;
162
+ return /*#__PURE__*/React.createElement("div", {
163
+ ref: this.containerRef,
164
+ className: "bookingCalendar__selection__container",
165
+ style: {
166
+ zIndex: this.state.selectionBox ? 99999 : undefined,
167
+ gridRowEnd: `span ${this.props.dataRowsCount}`
168
+ },
169
+ onMouseDown: this.handleMouseDown,
170
+ onMouseUp: this.handleMouseUp,
171
+ onMouseMove: this.handleMouseMove,
172
+ onMouseLeave: this.handleMouseLeave
173
+ }, boxVisible && this.state.selectionBox && /*#__PURE__*/React.createElement("div", {
174
+ className: `bookingCalendar__selection ${this.state.animation}`,
175
+ style: baseStyle
176
+ }), this.props.children);
177
+ }
219
178
 
220
- return BookingCalendarSelection;
221
- }(React.Component);
179
+ }
222
180
 
223
181
  exports.default = BookingCalendarSelection;
224
182
  //# sourceMappingURL=BookingCalendarSelection.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarSelection/BookingCalendarSelection.tsx"],"names":["BookingCalendarSelection","props","animationInProgress","containerRef","React","createRef","state","hold","selectionBox","selectionBoxOrigin","selectionBoxTarget","animation","handleMouseUp","bind","handleMouseDown","handleMouseMove","handleMouseLeave","evt","distance","Math","sqrt","pow","setState","setTimeout","minSelectionSize","onSelected","origin","target","e","disabled","nativeEvent","button","clearTimeout","bb","current","getBoundingClientRect","pageX","x","pageY","y","onSelecting","baseStyle","zIndex","left","top","height","abs","width","userSelect","transformOrigin","transform","handleTransformBox","boxVisible","undefined","gridRowEnd","dataRowsCount","children","Component"],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;;;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X,CAA8B,CAA9B,IAAmC,KAAKJ,KAAL,CAAWG,kBAAX,CAA8B,CAA9B,CADrC,EAEE,CAFF,IAIEU,IAAI,CAACE,GAAL,CACE,KAAKf,KAAL,CAAWI,kBAAX,CAA8B,CAA9B,IAAmC,KAAKJ,KAAL,CAAWG,kBAAX,CAA8B,CAA9B,CADrC,EAEE,CAFF,CALJ,IASI,KAAKR,KAAL,CAAWuB,gBAVjB;AAWA,0BACE;AACE,QAAA,GAAG,EAAE,KAAKrB,YADZ;AAEE,QAAA,SAAS,EAAC,uCAFZ;AAGE,QAAA,KAAK,EAAE;AACLuC,UAAAA,MAAM,EAAE,KAAKpC,KAAL,CAAWE,YAAX,GAA0B,KAA1B,GAAkC6C,SADrC;AAELC,UAAAA,UAAU,iBAAU,KAAKrD,KAAL,CAAWsD,aAArB;AAFL,SAHT;AAOE,QAAA,WAAW,EAAE,KAAKzC,eAPpB;AAQE,QAAA,SAAS,EAAE,KAAKF,aARlB;AASE,QAAA,WAAW,EAAE,KAAKG,eATpB;AAUE,QAAA,YAAY,EAAE,KAAKC;AAVrB,SAYGoC,UAAU,IAAI,KAAK9C,KAAL,CAAWE,YAAzB,iBACC;AACE,QAAA,SAAS,uCAAgC,KAAKF,KAAL,CAAWK,SAA3C,CADX;AAEE,QAAA,KAAK,EAAE8B;AAFT,QAbJ,EAkBG,KAAKxC,KAAL,CAAWuD,QAlBd,CADF;AAsBD;;;;EAzLmDpD,KAAK,CAACqD,S","sourcesContent":["import * as React from 'react';\r\n\r\nexport type BookingCalendarSelectionCoordinates = [number, number];\r\nexport interface BookingCalendarSelectionData {\r\n origin: BookingCalendarSelectionCoordinates;\r\n target: BookingCalendarSelectionCoordinates;\r\n}\r\nexport interface BookingCalendarSelectionProps {\r\n disabled?: boolean;\r\n onSelecting?: (data: {\r\n origin: BookingCalendarSelectionCoordinates;\r\n target: BookingCalendarSelectionCoordinates;\r\n }) => void;\r\n onSelected?: (data: {\r\n origin: BookingCalendarSelectionCoordinates;\r\n target: BookingCalendarSelectionCoordinates;\r\n }) => void;\r\n dataRowsCount: number;\r\n minSelectionSize: number;\r\n}\r\n\r\nexport interface BookingCalendarSelectionState {\r\n selectionBoxOrigin: BookingCalendarSelectionCoordinates;\r\n selectionBoxTarget: BookingCalendarSelectionCoordinates;\r\n hold: boolean;\r\n animation: string;\r\n selectionBox: boolean;\r\n}\r\n\r\nexport default class BookingCalendarSelection extends React.Component<\r\n BookingCalendarSelectionProps,\r\n BookingCalendarSelectionState\r\n> {\r\n private animationInProgress: number;\r\n private containerRef: React.RefObject<HTMLDivElement>;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.animationInProgress = null;\r\n this.containerRef = React.createRef();\r\n this.state = {\r\n hold: false,\r\n selectionBox: false,\r\n selectionBoxOrigin: [0, 0],\r\n selectionBoxTarget: [0, 0],\r\n animation: '',\r\n };\r\n this.handleMouseUp = this.handleMouseUp.bind(this);\r\n this.handleMouseDown = this.handleMouseDown.bind(this);\r\n this.handleMouseMove = this.handleMouseMove.bind(this);\r\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\r\n }\r\n\r\n handleTransformBox() {\r\n const { selectionBoxOrigin, selectionBoxTarget } = this.state;\r\n if (\r\n selectionBoxOrigin[1] > selectionBoxTarget[1] &&\r\n selectionBoxOrigin[0] > selectionBoxTarget[0]\r\n ) {\r\n return 'scaleY(-1) scaleX(-1)';\r\n }\r\n\r\n if (selectionBoxOrigin[1] > selectionBoxTarget[1]) {\r\n return 'scaleY(-1)';\r\n }\r\n if (selectionBoxOrigin[0] > selectionBoxTarget[0]) {\r\n return 'scaleX(-1)';\r\n }\r\n return null;\r\n }\r\n\r\n handleMouseLeave(evt: React.MouseEvent<HTMLElement>) {\r\n /*if (this.state.hold) {\r\n this.setState({\r\n hold: false,\r\n animation: 'bookingCalendar__selection--fadeout',\r\n });\r\n this.animationInProgress = (setTimeout(() => {\r\n this.setState({\r\n selectionBox: false,\r\n animation: '',\r\n selectionBoxOrigin: [0, 0],\r\n selectionBoxTarget: [0, 0],\r\n });\r\n this.animationInProgress = null;\r\n }, 300) as unknown) as number;\r\n }*/\r\n }\r\n\r\n handleMouseUp(evt: React.MouseEvent<HTMLElement>) {\r\n if (this.state.hold) {\r\n const distance = Math.sqrt(\r\n Math.pow(\r\n this.state.selectionBoxTarget[1] - this.state.selectionBoxOrigin[1],\r\n 2\r\n ) +\r\n Math.pow(\r\n this.state.selectionBoxTarget[0] - this.state.selectionBoxOrigin[0],\r\n 2\r\n )\r\n );\r\n this.setState({\r\n hold: false,\r\n animation: 'bookingCalendar__selection--fadeout',\r\n });\r\n this.animationInProgress = (setTimeout(() => {\r\n this.setState({\r\n selectionBox: false,\r\n animation: '',\r\n selectionBoxOrigin: [0, 0],\r\n selectionBoxTarget: [0, 0],\r\n });\r\n this.animationInProgress = null;\r\n }, 300) as unknown) as number;\r\n if (distance < this.props.minSelectionSize) {\r\n return;\r\n }\r\n this.props.onSelected?.({\r\n origin: this.state.selectionBoxOrigin,\r\n target: this.state.selectionBoxTarget,\r\n });\r\n }\r\n }\r\n\r\n handleMouseDown(e: React.MouseEvent<HTMLDivElement>) {\r\n if (this.props.disabled || e.nativeEvent.button !== 0) {\r\n return;\r\n }\r\n clearTimeout(this.animationInProgress);\r\n this.animationInProgress = null;\r\n this.setState({ selectionBox: false, animation: '' });\r\n\r\n const bb = this.containerRef.current?.getBoundingClientRect();\r\n this.setState({\r\n hold: true,\r\n selectionBoxOrigin: [\r\n e.nativeEvent.pageX - bb.x,\r\n e.nativeEvent.pageY - bb.y,\r\n ],\r\n selectionBoxTarget: [\r\n e.nativeEvent.pageX - bb.x,\r\n e.nativeEvent.pageY - bb.y,\r\n ],\r\n });\r\n }\r\n\r\n private handleMouseMove(evt: React.MouseEvent<HTMLDivElement>) {\r\n if (this.state.hold && !this.state.selectionBox) {\r\n this.setState({ selectionBox: true });\r\n }\r\n if (this.state.selectionBox && !this.animationInProgress) {\r\n const bb = this.containerRef.current?.getBoundingClientRect();\r\n this.setState({\r\n selectionBoxTarget: [\r\n evt.nativeEvent.pageX - bb?.x,\r\n evt.nativeEvent.pageY - bb?.y,\r\n ],\r\n });\r\n\r\n this.props.onSelecting?.({\r\n origin: this.state.selectionBoxOrigin,\r\n target: this.state.selectionBoxTarget,\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n const baseStyle: React.CSSProperties = {\r\n zIndex: 10,\r\n left: this.state.selectionBoxOrigin[0],\r\n top: this.state.selectionBoxOrigin[1],\r\n height: Math.abs(\r\n this.state.selectionBoxTarget[1] - this.state.selectionBoxOrigin[1] - 1\r\n ),\r\n width: Math.abs(\r\n this.state.selectionBoxTarget[0] - this.state.selectionBoxOrigin[0] - 1\r\n ),\r\n userSelect: 'none',\r\n transformOrigin: 'top left',\r\n transform: this.handleTransformBox(),\r\n };\r\n const boxVisible =\r\n Math.sqrt(\r\n Math.pow(\r\n this.state.selectionBoxTarget[1] - this.state.selectionBoxOrigin[1],\r\n 2\r\n ) +\r\n Math.pow(\r\n this.state.selectionBoxTarget[0] - this.state.selectionBoxOrigin[0],\r\n 2\r\n )\r\n ) > this.props.minSelectionSize;\r\n return (\r\n <div\r\n ref={this.containerRef}\r\n className=\"bookingCalendar__selection__container\"\r\n style={{\r\n zIndex: this.state.selectionBox ? 99999 : undefined,\r\n gridRowEnd: `span ${this.props.dataRowsCount}`,\r\n }}\r\n onMouseDown={this.handleMouseDown}\r\n onMouseUp={this.handleMouseUp}\r\n onMouseMove={this.handleMouseMove}\r\n onMouseLeave={this.handleMouseLeave}\r\n >\r\n {boxVisible && this.state.selectionBox && (\r\n <div\r\n className={`bookingCalendar__selection ${this.state.animation}`}\r\n style={baseStyle}\r\n />\r\n )}\r\n {this.props.children}\r\n </div>\r\n );\r\n }\r\n}\r\n"],"file":"BookingCalendarSelection.js"}
1
+ {"version":3,"file":"BookingCalendarSelection.js","names":["BookingCalendarSelection","React","Component","constructor","props","animationInProgress","containerRef","createRef","state","hold","selectionBox","selectionBoxOrigin","selectionBoxTarget","animation","handleMouseUp","bind","handleMouseDown","handleMouseMove","handleMouseLeave","handleTransformBox","evt","distance","Math","sqrt","pow","setState","setTimeout","minSelectionSize","onSelected","origin","target","e","disabled","nativeEvent","button","clearTimeout","bb","current","getBoundingClientRect","pageX","x","pageY","y","onSelecting","render","baseStyle","zIndex","left","top","height","abs","width","userSelect","transformOrigin","transform","boxVisible","undefined","gridRowEnd","dataRowsCount","children"],"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarSelection/BookingCalendarSelection.tsx"],"sourcesContent":["import * as React from 'react';\r\n\r\nexport type BookingCalendarSelectionCoordinates = [number, number];\r\nexport interface BookingCalendarSelectionData {\r\n origin: BookingCalendarSelectionCoordinates;\r\n target: BookingCalendarSelectionCoordinates;\r\n}\r\nexport interface BookingCalendarSelectionProps {\r\n disabled?: boolean;\r\n onSelecting?: (data: {\r\n origin: BookingCalendarSelectionCoordinates;\r\n target: BookingCalendarSelectionCoordinates;\r\n }) => void;\r\n onSelected?: (data: {\r\n origin: BookingCalendarSelectionCoordinates;\r\n target: BookingCalendarSelectionCoordinates;\r\n }) => void;\r\n dataRowsCount: number;\r\n minSelectionSize: number;\r\n}\r\n\r\nexport interface BookingCalendarSelectionState {\r\n selectionBoxOrigin: BookingCalendarSelectionCoordinates;\r\n selectionBoxTarget: BookingCalendarSelectionCoordinates;\r\n hold: boolean;\r\n animation: string;\r\n selectionBox: boolean;\r\n}\r\n\r\nexport default class BookingCalendarSelection extends React.Component<\r\n BookingCalendarSelectionProps,\r\n BookingCalendarSelectionState\r\n> {\r\n private animationInProgress: number;\r\n private containerRef: React.RefObject<HTMLDivElement>;\r\n\r\n constructor(props) {\r\n super(props);\r\n this.animationInProgress = null;\r\n this.containerRef = React.createRef();\r\n this.state = {\r\n hold: false,\r\n selectionBox: false,\r\n selectionBoxOrigin: [0, 0],\r\n selectionBoxTarget: [0, 0],\r\n animation: '',\r\n };\r\n this.handleMouseUp = this.handleMouseUp.bind(this);\r\n this.handleMouseDown = this.handleMouseDown.bind(this);\r\n this.handleMouseMove = this.handleMouseMove.bind(this);\r\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\r\n }\r\n\r\n handleTransformBox() {\r\n const { selectionBoxOrigin, selectionBoxTarget } = this.state;\r\n if (\r\n selectionBoxOrigin[1] > selectionBoxTarget[1] &&\r\n selectionBoxOrigin[0] > selectionBoxTarget[0]\r\n ) {\r\n return 'scaleY(-1) scaleX(-1)';\r\n }\r\n\r\n if (selectionBoxOrigin[1] > selectionBoxTarget[1]) {\r\n return 'scaleY(-1)';\r\n }\r\n if (selectionBoxOrigin[0] > selectionBoxTarget[0]) {\r\n return 'scaleX(-1)';\r\n }\r\n return null;\r\n }\r\n\r\n handleMouseLeave(evt: React.MouseEvent<HTMLElement>) {\r\n /*if (this.state.hold) {\r\n this.setState({\r\n hold: false,\r\n animation: 'bookingCalendar__selection--fadeout',\r\n });\r\n this.animationInProgress = (setTimeout(() => {\r\n this.setState({\r\n selectionBox: false,\r\n animation: '',\r\n selectionBoxOrigin: [0, 0],\r\n selectionBoxTarget: [0, 0],\r\n });\r\n this.animationInProgress = null;\r\n }, 300) as unknown) as number;\r\n }*/\r\n }\r\n\r\n handleMouseUp(evt: React.MouseEvent<HTMLElement>) {\r\n if (this.state.hold) {\r\n const distance = Math.sqrt(\r\n Math.pow(\r\n this.state.selectionBoxTarget[1] - this.state.selectionBoxOrigin[1],\r\n 2\r\n ) +\r\n Math.pow(\r\n this.state.selectionBoxTarget[0] - this.state.selectionBoxOrigin[0],\r\n 2\r\n )\r\n );\r\n this.setState({\r\n hold: false,\r\n animation: 'bookingCalendar__selection--fadeout',\r\n });\r\n this.animationInProgress = (setTimeout(() => {\r\n this.setState({\r\n selectionBox: false,\r\n animation: '',\r\n selectionBoxOrigin: [0, 0],\r\n selectionBoxTarget: [0, 0],\r\n });\r\n this.animationInProgress = null;\r\n }, 300) as unknown) as number;\r\n if (distance < this.props.minSelectionSize) {\r\n return;\r\n }\r\n this.props.onSelected?.({\r\n origin: this.state.selectionBoxOrigin,\r\n target: this.state.selectionBoxTarget,\r\n });\r\n }\r\n }\r\n\r\n handleMouseDown(e: React.MouseEvent<HTMLDivElement>) {\r\n if (this.props.disabled || e.nativeEvent.button !== 0) {\r\n return;\r\n }\r\n clearTimeout(this.animationInProgress);\r\n this.animationInProgress = null;\r\n this.setState({ selectionBox: false, animation: '' });\r\n\r\n const bb = this.containerRef.current?.getBoundingClientRect();\r\n this.setState({\r\n hold: true,\r\n selectionBoxOrigin: [\r\n e.nativeEvent.pageX - bb.x,\r\n e.nativeEvent.pageY - bb.y,\r\n ],\r\n selectionBoxTarget: [\r\n e.nativeEvent.pageX - bb.x,\r\n e.nativeEvent.pageY - bb.y,\r\n ],\r\n });\r\n }\r\n\r\n private handleMouseMove(evt: React.MouseEvent<HTMLDivElement>) {\r\n if (this.state.hold && !this.state.selectionBox) {\r\n this.setState({ selectionBox: true });\r\n }\r\n if (this.state.selectionBox && !this.animationInProgress) {\r\n const bb = this.containerRef.current?.getBoundingClientRect();\r\n this.setState({\r\n selectionBoxTarget: [\r\n evt.nativeEvent.pageX - bb?.x,\r\n evt.nativeEvent.pageY - bb?.y,\r\n ],\r\n });\r\n\r\n this.props.onSelecting?.({\r\n origin: this.state.selectionBoxOrigin,\r\n target: this.state.selectionBoxTarget,\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n const baseStyle: React.CSSProperties = {\r\n zIndex: 10,\r\n left: this.state.selectionBoxOrigin[0],\r\n top: this.state.selectionBoxOrigin[1],\r\n height: Math.abs(\r\n this.state.selectionBoxTarget[1] - this.state.selectionBoxOrigin[1] - 1\r\n ),\r\n width: Math.abs(\r\n this.state.selectionBoxTarget[0] - this.state.selectionBoxOrigin[0] - 1\r\n ),\r\n userSelect: 'none',\r\n transformOrigin: 'top left',\r\n transform: this.handleTransformBox(),\r\n };\r\n const boxVisible =\r\n Math.sqrt(\r\n Math.pow(\r\n this.state.selectionBoxTarget[1] - this.state.selectionBoxOrigin[1],\r\n 2\r\n ) +\r\n Math.pow(\r\n this.state.selectionBoxTarget[0] - this.state.selectionBoxOrigin[0],\r\n 2\r\n )\r\n ) > this.props.minSelectionSize;\r\n return (\r\n <div\r\n ref={this.containerRef}\r\n className=\"bookingCalendar__selection__container\"\r\n style={{\r\n zIndex: this.state.selectionBox ? 99999 : undefined,\r\n gridRowEnd: `span ${this.props.dataRowsCount}`,\r\n }}\r\n onMouseDown={this.handleMouseDown}\r\n onMouseUp={this.handleMouseUp}\r\n onMouseMove={this.handleMouseMove}\r\n onMouseLeave={this.handleMouseLeave}\r\n >\r\n {boxVisible && this.state.selectionBox && (\r\n <div\r\n className={`bookingCalendar__selection ${this.state.animation}`}\r\n style={baseStyle}\r\n />\r\n )}\r\n {this.props.children}\r\n </div>\r\n );\r\n }\r\n}\r\n"],"mappings":";;;;;;;AAAA;;;;;;;;AA6Be,MAAMA,wBAAN,SAAuCC,KAAK,CAACC,SAA7C,CAGb;EAIAC,WAAW,CAACC,KAAD,EAAQ;IACjB,MAAMA,KAAN;;IADiB;;IAAA;;IAEjB,KAAKC,mBAAL,GAA2B,IAA3B;IACA,KAAKC,YAAL,gBAAoBL,KAAK,CAACM,SAAN,EAApB;IACA,KAAKC,KAAL,GAAa;MACXC,IAAI,EAAE,KADK;MAEXC,YAAY,EAAE,KAFH;MAGXC,kBAAkB,EAAE,CAAC,CAAD,EAAI,CAAJ,CAHT;MAIXC,kBAAkB,EAAE,CAAC,CAAD,EAAI,CAAJ,CAJT;MAKXC,SAAS,EAAE;IALA,CAAb;IAOA,KAAKC,aAAL,GAAqB,KAAKA,aAAL,CAAmBC,IAAnB,CAAwB,IAAxB,CAArB;IACA,KAAKC,eAAL,GAAuB,KAAKA,eAAL,CAAqBD,IAArB,CAA0B,IAA1B,CAAvB;IACA,KAAKE,eAAL,GAAuB,KAAKA,eAAL,CAAqBF,IAArB,CAA0B,IAA1B,CAAvB;IACA,KAAKG,gBAAL,GAAwB,KAAKA,gBAAL,CAAsBH,IAAtB,CAA2B,IAA3B,CAAx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&& typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -15,28 +13,28 @@ var _classnames = _interopRequireDefault(require("classnames"));
15
13
 
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
15
 
18
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
+ 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); }
19
17
 
20
- 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; }
18
+ 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; }
21
19
 
22
20
  function BookingCalendarTimeAxis(props) {
23
- var className = props.className,
24
- timeAxisItemClassName = props.timeAxisItemClassName,
25
- items = props.items,
26
- getMomentFormatFunction = props.getMomentFormatFunction,
27
- bestStep = props.bestStep;
28
- var svgRef = React.useRef();
21
+ const {
22
+ className,
23
+ timeAxisItemClassName,
24
+ items,
25
+ getMomentFormatFunction,
26
+ bestStep
27
+ } = props;
28
+ const svgRef = React.useRef();
29
29
  return /*#__PURE__*/React.createElement("svg", {
30
30
  className: (0, _classnames.default)(_classes.bookingCalendarTimeAxisDefaultClasses.className, className),
31
31
  ref: svgRef
32
- }, /*#__PURE__*/React.createElement("g", null, items.map(function (item, key) {
33
- return /*#__PURE__*/React.createElement("svg", {
34
- key: key,
35
- x: "".concat(item.left * 100, "%")
36
- }, /*#__PURE__*/React.createElement("text", {
37
- transform: "translate(-7) rotate(90)",
38
- className: (0, _classnames.default)(_classes.bookingCalendarTimeAxisDefaultClasses.timeAxisItemClassName, timeAxisItemClassName)
39
- }, item.date.format(getMomentFormatFunction === null || getMomentFormatFunction === void 0 ? void 0 : getMomentFormatFunction(item.date, bestStep))));
40
- })));
32
+ }, /*#__PURE__*/React.createElement("g", null, items.map((item, key) => /*#__PURE__*/React.createElement("svg", {
33
+ key: key,
34
+ x: `${item.left * 100}%`
35
+ }, /*#__PURE__*/React.createElement("text", {
36
+ transform: "translate(-7) rotate(90)",
37
+ className: (0, _classnames.default)(_classes.bookingCalendarTimeAxisDefaultClasses.timeAxisItemClassName, timeAxisItemClassName)
38
+ }, item.date.format(getMomentFormatFunction === null || getMomentFormatFunction === void 0 ? void 0 : getMomentFormatFunction(item.date, bestStep)))))));
41
39
  }
42
40
  //# sourceMappingURL=BookingCalendarTimeAxis.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarTimeAxis/BookingCalendarTimeAxis.tsx"],"names":["BookingCalendarTimeAxis","props","className","timeAxisItemClassName","items","getMomentFormatFunction","bestStep","svgRef","React","useRef","bookingCalendarTimeAxisDefaultClasses","map","item","key","left","date","format"],"mappings":";;;;;;;;;AAAA;;AACA;;AAIA;;;;;;;;AAYO,SAASA,uBAAT,CAAiCC,KAAjC,EAAsE;AAC3E,MACEC,SADF,GAMID,KANJ,CACEC,SADF;AAAA,MAEEC,qBAFF,GAMIF,KANJ,CAEEE,qBAFF;AAAA,MAGEC,KAHF,GAMIH,KANJ,CAGEG,KAHF;AAAA,MAIEC,uBAJF,GAMIJ,KANJ,CAIEI,uBAJF;AAAA,MAKEC,QALF,GAMIL,KANJ,CAKEK,QALF;AAOA,MAAMC,MAAM,GAAGC,KAAK,CAACC,MAAN,EAAf;AACA,sBACE;AACE,IAAA,SAAS,EAAE,yBACTC,+CAAsCR,SAD7B,EAETA,SAFS,CADb;AAKE,IAAA,GAAG,EAAEK;AALP,kBAOE,+BACGH,KAAK,CAACO,GAAN,CAAU,UAACC,IAAD,EAAOC,GAAP;AAAA,wBACT;AAAK,MAAA,GAAG,EAAEA,GAAV;AAAe,MAAA,CAAC,YAAKD,IAAI,CAACE,IAAL,GAAY,GAAjB;AAAhB,oBACE;AACE,MAAA,SAAS,EAAC,0BADZ;AAEE,MAAA,SAAS,EAAE,yBACTJ,+CAAsCP,qBAD7B,EAETA,qBAFS;AAFb,OAOGS,IAAI,CAACG,IAAL,CAAUC,MAAV,CAAiBX,uBAAjB,aAAiBA,uBAAjB,uBAAiBA,uBAAuB,CAAGO,IAAI,CAACG,IAAR,EAAcT,QAAd,CAAxC,CAPH,CADF,CADS;AAAA,GAAV,CADH,CAPF,CADF;AAyBD","sourcesContent":["import * as React from 'react';\r\nimport {\r\n BookingCalendarTimeAxisClasses,\r\n bookingCalendarTimeAxisDefaultClasses,\r\n} from './classes';\r\nimport classNames from 'classnames';\r\nimport { GridItem } from '../utils';\r\nimport { Duration } from 'moment';\r\nimport { GetMomentFormatFunctionType } from '..';\r\n\r\nexport interface BookingCalendarTimeAxisProps\r\n extends BookingCalendarTimeAxisClasses {\r\n items: GridItem[];\r\n bestStep: Duration;\r\n getMomentFormatFunction: GetMomentFormatFunctionType;\r\n}\r\n\r\nexport function BookingCalendarTimeAxis(props: BookingCalendarTimeAxisProps) {\r\n const {\r\n className,\r\n timeAxisItemClassName,\r\n items,\r\n getMomentFormatFunction,\r\n bestStep,\r\n } = props;\r\n const svgRef = React.useRef<SVGSVGElement>();\r\n return (\r\n <svg\r\n className={classNames(\r\n bookingCalendarTimeAxisDefaultClasses.className,\r\n className\r\n )}\r\n ref={svgRef}\r\n >\r\n <g>\r\n {items.map((item, key) => (\r\n <svg key={key} x={`${item.left * 100}%`}>\r\n <text\r\n transform=\"translate(-7) rotate(90)\"\r\n className={classNames(\r\n bookingCalendarTimeAxisDefaultClasses.timeAxisItemClassName,\r\n timeAxisItemClassName\r\n )}\r\n >\r\n {item.date.format(getMomentFormatFunction?.(item.date, bestStep))}\r\n </text>\r\n </svg>\r\n ))}\r\n </g>\r\n </svg>\r\n );\r\n}\r\n"],"file":"BookingCalendarTimeAxis.js"}
1
+ {"version":3,"file":"BookingCalendarTimeAxis.js","names":["BookingCalendarTimeAxis","props","className","timeAxisItemClassName","items","getMomentFormatFunction","bestStep","svgRef","React","useRef","classNames","bookingCalendarTimeAxisDefaultClasses","map","item","key","left","date","format"],"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarTimeAxis/BookingCalendarTimeAxis.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport {\r\n BookingCalendarTimeAxisClasses,\r\n bookingCalendarTimeAxisDefaultClasses,\r\n} from './classes';\r\nimport classNames from 'classnames';\r\nimport { GridItem } from '../utils';\r\nimport { Duration } from 'moment';\r\nimport { GetMomentFormatFunctionType } from '..';\r\n\r\nexport interface BookingCalendarTimeAxisProps\r\n extends BookingCalendarTimeAxisClasses {\r\n items: GridItem[];\r\n bestStep: Duration;\r\n getMomentFormatFunction: GetMomentFormatFunctionType;\r\n}\r\n\r\nexport function BookingCalendarTimeAxis(props: BookingCalendarTimeAxisProps) {\r\n const {\r\n className,\r\n timeAxisItemClassName,\r\n items,\r\n getMomentFormatFunction,\r\n bestStep,\r\n } = props;\r\n const svgRef = React.useRef<SVGSVGElement>();\r\n return (\r\n <svg\r\n className={classNames(\r\n bookingCalendarTimeAxisDefaultClasses.className,\r\n className\r\n )}\r\n ref={svgRef}\r\n >\r\n <g>\r\n {items.map((item, key) => (\r\n <svg key={key} x={`${item.left * 100}%`}>\r\n <text\r\n transform=\"translate(-7) rotate(90)\"\r\n className={classNames(\r\n bookingCalendarTimeAxisDefaultClasses.timeAxisItemClassName,\r\n timeAxisItemClassName\r\n )}\r\n >\r\n {item.date.format(getMomentFormatFunction?.(item.date, bestStep))}\r\n </text>\r\n </svg>\r\n ))}\r\n </g>\r\n </svg>\r\n );\r\n}\r\n"],"mappings":";;;;;;;AAAA;;AACA;;AAIA;;;;;;;;AAYO,SAASA,uBAAT,CAAiCC,KAAjC,EAAsE;EAC3E,MAAM;IACJC,SADI;IAEJC,qBAFI;IAGJC,KAHI;IAIJC,uBAJI;IAKJC;EALI,IAMFL,KANJ;EAOA,MAAMM,MAAM,GAAGC,KAAK,CAACC,MAAN,EAAf;EACA,oBACE;IACE,SAAS,EAAE,IAAAC,mBAAA,EACTC,8CAAA,CAAsCT,SAD7B,EAETA,SAFS,CADb;IAKE,GAAG,EAAEK;EALP,gBAOE,+BACGH,KAAK,CAACQ,GAAN,CAAU,CAACC,IAAD,EAAOC,GAAP,kBACT;IAAK,GAAG,EAAEA,GAAV;IAAe,CAAC,EAAG,GAAED,IAAI,CAACE,IAAL,GAAY,GAAI;EAArC,gBACE;IACE,SAAS,EAAC,0BADZ;IAEE,SAAS,EAAE,IAAAL,mBAAA,EACTC,8CAAA,CAAsCR,qBAD7B,EAETA,qBAFS;EAFb,GAOGU,IAAI,CAACG,IAAL,CAAUC,MAAV,CAAiBZ,uBAAjB,aAAiBA,uBAAjB,uBAAiBA,uBAAuB,CAAGQ,IAAI,CAACG,IAAR,EAAcV,QAAd,CAAxC,CAPH,CADF,CADD,CADH,CAPF,CADF;AAyBD"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.bookingCalendarTimeAxisDefaultClasses = void 0;
7
- var bookingCalendarTimeAxisDefaultClasses = {
7
+ const bookingCalendarTimeAxisDefaultClasses = {
8
8
  className: 'bookingCalendar__timeAxis',
9
9
  timeAxisItemClassName: 'bookingCalendar__timeAxis__item'
10
10
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarTimeAxis/classes.ts"],"names":["bookingCalendarTimeAxisDefaultClasses","className","timeAxisItemClassName"],"mappings":";;;;;;AAKO,IAAMA,qCAAqE,GAAG;AACnFC,EAAAA,SAAS,EAAE,2BADwE;AAEnFC,EAAAA,qBAAqB,EAAE;AAF4D,CAA9E","sourcesContent":["export interface BookingCalendarTimeAxisClasses {\r\n className?: string;\r\n timeAxisItemClassName?: string;\r\n}\r\n\r\nexport const bookingCalendarTimeAxisDefaultClasses: BookingCalendarTimeAxisClasses = {\r\n className: 'bookingCalendar__timeAxis',\r\n timeAxisItemClassName: 'bookingCalendar__timeAxis__item',\r\n};\r\n"],"file":"classes.js"}
1
+ {"version":3,"file":"classes.js","names":["bookingCalendarTimeAxisDefaultClasses","className","timeAxisItemClassName"],"sources":["../../../../src/lib/components/bookingCalendar/bookingCalendarTimeAxis/classes.ts"],"sourcesContent":["export interface BookingCalendarTimeAxisClasses {\r\n className?: string;\r\n timeAxisItemClassName?: string;\r\n}\r\n\r\nexport const bookingCalendarTimeAxisDefaultClasses: BookingCalendarTimeAxisClasses = {\r\n className: 'bookingCalendar__timeAxis',\r\n timeAxisItemClassName: 'bookingCalendar__timeAxis__item',\r\n};\r\n"],"mappings":";;;;;;AAKO,MAAMA,qCAAqE,GAAG;EACnFC,SAAS,EAAE,2BADwE;EAEnFC,qBAAqB,EAAE;AAF4D,CAA9E"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.bookingCalendarDefaultClasses = void 0;
7
- var bookingCalendarDefaultClasses = {
7
+ const bookingCalendarDefaultClasses = {
8
8
  className: 'bookingCalendar',
9
9
  laneContainerClassName: 'bookingCalendar__laneContainer',
10
10
  laneHeaderContainerClassName: 'bookingCalendar__laneHeaderContainer',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/components/bookingCalendar/classes.ts"],"names":["bookingCalendarDefaultClasses","className","laneContainerClassName","laneHeaderContainerClassName","lanesHeaderContainerClassName","lanesHeaderHeaderContainerClassName","tableClassName"],"mappings":";;;;;;AAYO,IAAMA,6BAAqD,GAAG;AACnEC,EAAAA,SAAS,EAAE,iBADwD;AAEnEC,EAAAA,sBAAsB,EAAE,gCAF2C;AAGnEC,EAAAA,4BAA4B,EAAE,sCAHqC;AAInEC,EAAAA,6BAA6B,EAAE,uCAJoC;AAKnEC,EAAAA,mCAAmC,EACjC,6CANiE;AAOnEC,EAAAA,cAAc,EAAE;AAPmD,CAA9D","sourcesContent":["import { BookingCalendarControlsClasses } from './bookingCalendarControls/classes';\r\n\r\nexport interface BookingCalendarClasses {\r\n className?: string;\r\n laneContainerClassName?: string;\r\n laneHeaderContainerClassName?: string;\r\n lanesHeaderHeaderContainerClassName?: string;\r\n lanesHeaderContainerClassName?: string;\r\n tableClassName?: string;\r\n controlsClasses?: BookingCalendarControlsClasses;\r\n}\r\n\r\nexport const bookingCalendarDefaultClasses: BookingCalendarClasses = {\r\n className: 'bookingCalendar',\r\n laneContainerClassName: 'bookingCalendar__laneContainer',\r\n laneHeaderContainerClassName: 'bookingCalendar__laneHeaderContainer',\r\n lanesHeaderContainerClassName: 'bookingCalendar__lanesHeaderContainer',\r\n lanesHeaderHeaderContainerClassName:\r\n 'bookingCalendar__lanesHeaderHeaderContainer',\r\n tableClassName: 'bookingCalendar__table',\r\n};\r\n"],"file":"classes.js"}
1
+ {"version":3,"file":"classes.js","names":["bookingCalendarDefaultClasses","className","laneContainerClassName","laneHeaderContainerClassName","lanesHeaderContainerClassName","lanesHeaderHeaderContainerClassName","tableClassName"],"sources":["../../../src/lib/components/bookingCalendar/classes.ts"],"sourcesContent":["import { BookingCalendarControlsClasses } from './bookingCalendarControls/classes';\r\n\r\nexport interface BookingCalendarClasses {\r\n className?: string;\r\n laneContainerClassName?: string;\r\n laneHeaderContainerClassName?: string;\r\n lanesHeaderHeaderContainerClassName?: string;\r\n lanesHeaderContainerClassName?: string;\r\n tableClassName?: string;\r\n controlsClasses?: BookingCalendarControlsClasses;\r\n}\r\n\r\nexport const bookingCalendarDefaultClasses: BookingCalendarClasses = {\r\n className: 'bookingCalendar',\r\n laneContainerClassName: 'bookingCalendar__laneContainer',\r\n laneHeaderContainerClassName: 'bookingCalendar__laneHeaderContainer',\r\n lanesHeaderContainerClassName: 'bookingCalendar__lanesHeaderContainer',\r\n lanesHeaderHeaderContainerClassName:\r\n 'bookingCalendar__lanesHeaderHeaderContainer',\r\n tableClassName: 'bookingCalendar__table',\r\n};\r\n"],"mappings":";;;;;;AAYO,MAAMA,6BAAqD,GAAG;EACnEC,SAAS,EAAE,iBADwD;EAEnEC,sBAAsB,EAAE,gCAF2C;EAGnEC,4BAA4B,EAAE,sCAHqC;EAInEC,6BAA6B,EAAE,uCAJoC;EAKnEC,mCAAmC,EACjC,6CANiE;EAOnEC,cAAc,EAAE;AAPmD,CAA9D"}
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -9,11 +7,11 @@ exports.defaultGridAvailableSteps = exports.defaultGetNewMomentFunction = export
9
7
 
10
8
  var _moment = _interopRequireWildcard(require("moment"));
11
9
 
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
+ 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); }
13
11
 
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; }
12
+ 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
13
 
16
- var defaultGetMomentFormatFunction = function defaultGetMomentFormatFunction(date, bestStep) {
14
+ const defaultGetMomentFormatFunction = (date, bestStep) => {
17
15
  if (!date || !bestStep) {
18
16
  return undefined;
19
17
  }
@@ -27,11 +25,11 @@ var defaultGetMomentFormatFunction = function defaultGetMomentFormatFunction(dat
27
25
 
28
26
  exports.defaultGetMomentFormatFunction = defaultGetMomentFormatFunction;
29
27
 
30
- var defaultGetNewMomentFunction = function defaultGetNewMomentFunction(date) {
28
+ const defaultGetNewMomentFunction = date => {
31
29
  return (0, _moment.default)(date);
32
30
  };
33
31
 
34
32
  exports.defaultGetNewMomentFunction = defaultGetNewMomentFunction;
35
- var defaultGridAvailableSteps = [(0, _moment.duration)(1, 'minute'), (0, _moment.duration)(5, 'minute'), (0, _moment.duration)(10, 'minute'), (0, _moment.duration)(15, 'minute'), (0, _moment.duration)(20, 'minute'), (0, _moment.duration)(30, 'minute'), (0, _moment.duration)(1, 'hour'), (0, _moment.duration)(2, 'hour'), (0, _moment.duration)(4, 'hour'), (0, _moment.duration)(6, 'hour'), (0, _moment.duration)(8, 'hour'), (0, _moment.duration)(12, 'hour'), (0, _moment.duration)(1, 'day')];
33
+ const defaultGridAvailableSteps = [(0, _moment.duration)(1, 'minute'), (0, _moment.duration)(5, 'minute'), (0, _moment.duration)(10, 'minute'), (0, _moment.duration)(15, 'minute'), (0, _moment.duration)(20, 'minute'), (0, _moment.duration)(30, 'minute'), (0, _moment.duration)(1, 'hour'), (0, _moment.duration)(2, 'hour'), (0, _moment.duration)(4, 'hour'), (0, _moment.duration)(6, 'hour'), (0, _moment.duration)(8, 'hour'), (0, _moment.duration)(12, 'hour'), (0, _moment.duration)(1, 'day')];
36
34
  exports.defaultGridAvailableSteps = defaultGridAvailableSteps;
37
35
  //# sourceMappingURL=common.js.map