@licklist/design 0.70.6-dev.0 → 0.70.6

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 (178) hide show
  1. package/dist/affiliate/form/AffiliateForm.d.ts.map +1 -1
  2. package/dist/assets/iframe/available.svg +4 -4
  3. package/dist/assets/iframe/available.svg.js +18 -16
  4. package/dist/auth/Login/LoginComponent.js +1 -2
  5. package/dist/availability-indicator/AvailabilityIndicator.d.ts +2 -4
  6. package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +1 -1
  7. package/dist/availability-indicator/AvailabilityIndicator.js +18 -112
  8. package/dist/calendar/Calendar.d.ts +0 -2
  9. package/dist/calendar/Calendar.d.ts.map +1 -1
  10. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
  11. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
  12. package/dist/calendar/components/CalendarDates/CalendarDates.js +2 -3
  13. package/dist/calendar/utils/index.d.ts +2 -8
  14. package/dist/calendar/utils/index.d.ts.map +1 -1
  15. package/dist/calendar/utils/index.js +21 -9
  16. package/dist/date-time-button/DateContent.d.ts.map +1 -1
  17. package/dist/date-time-button/DateContent.js +3 -3
  18. package/dist/date-time-button/DateTimeButton.d.ts +1 -3
  19. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  20. package/dist/date-time-button/DateTimeButton.js +3 -5
  21. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +2 -3
  22. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  23. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -0
  24. package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
  25. package/dist/events/event-venue-map/EventVenueMap.js +0 -1
  26. package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
  27. package/dist/events/event-venue-map/hooks/useCanvasSize.js +4 -11
  28. package/dist/iframe/activity-card/ActivityCard.d.ts +1 -3
  29. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
  30. package/dist/iframe/activity-card/ActivityCard.js +3 -5
  31. package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
  32. package/dist/iframe/event/ticket-description/TicketDescription.js +32 -43
  33. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
  34. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +0 -13
  35. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
  36. package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
  37. package/dist/iframe/ryft/RyftPaymentForm.js +12 -25
  38. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
  39. package/dist/iframe/ryft/utils/ryft-form.js +5 -4
  40. package/dist/layout/DropDown.d.ts +1 -2
  41. package/dist/layout/DropDown.d.ts.map +1 -1
  42. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  43. package/dist/notification/email-template/control/EmailTemplateControl.js +0 -3
  44. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  45. package/dist/product-set/form/ProductCategoriesControl.js +2 -48
  46. package/dist/product-set/form/ProductSetForm.d.ts +1 -4
  47. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  48. package/dist/product-set/form/ProductSetForm.js +1 -1
  49. package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
  50. package/dist/product-set/form/ProductZonesControl.js +2 -0
  51. package/dist/product-set/form/ProductsControl.js +0 -1
  52. package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
  53. package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
  54. package/dist/product-set/form/SelectCategoryModal.js +1 -1
  55. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  56. package/dist/product-set/form/SubProductsControl.js +3 -0
  57. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  58. package/dist/product-set/form/VenueMapsControl.js +3 -0
  59. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  60. package/dist/product-set/product/advanced-options/AdvancedOptions.js +1 -1
  61. package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
  62. package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +0 -6
  63. package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
  64. package/dist/product-set/product/deposit/ProductDepositControl.js +0 -3
  65. package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
  66. package/dist/product-set/product/duration/ProductDurationControl.js +0 -6
  67. package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
  68. package/dist/product-set/product/price/ProductPriceControl.js +0 -3
  69. package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
  70. package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +0 -6
  71. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  72. package/dist/product-set/product/quantity/ProductQuantityControl.js +0 -6
  73. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
  74. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +1 -4
  75. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  76. package/dist/product-set/product-category/ProductCategoryControl.js +0 -12
  77. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  78. package/dist/recurrence-input/RecurrenceEndInput.js +0 -3
  79. package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
  80. package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
  81. package/dist/resource/form/components/CapacityControl.js +0 -3
  82. package/dist/resource/form/components/SortControl.d.ts.map +1 -1
  83. package/dist/resource/form/components/SortControl.js +0 -3
  84. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  85. package/dist/sales/booking/results/components/ResultCard.js +2 -0
  86. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  87. package/dist/sales/coupon/control/CouponFormControl.js +0 -21
  88. package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
  89. package/dist/setting/admin/PaymentFeeForm.js +1 -16
  90. package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
  91. package/dist/setting/dashboard/DashboardSettingForm.js +1 -4
  92. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  93. package/dist/snippet/snippet-template/preview/Preview.js +3 -11
  94. package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
  95. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  96. package/dist/sortable-tree/SortableTreeItem.js +4 -10
  97. package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
  98. package/dist/static/CurrencyNumberInput.js +0 -3
  99. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  100. package/dist/static/form-number-input/FormNumberInput.js +0 -3
  101. package/dist/static/number-input/NumberInput.d.ts.map +1 -1
  102. package/dist/static/number-input/NumberInput.js +0 -3
  103. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -9
  104. package/dist/styles/date-time-button/DateTimeButton.scss +1 -2
  105. package/dist/styles/iframe-events/TicketDescription.scss +1 -1
  106. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  107. package/dist/styles/product-set/ProductSetForm.scss +0 -22
  108. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +3 -1
  109. package/dist/styles/sales/BookingResults.scss +1 -1
  110. package/dist/tiptap-editor/TipTapEditor.d.ts +1 -2
  111. package/dist/tiptap-editor/TipTapEditor.d.ts.map +1 -1
  112. package/dist/tiptap-editor/TipTapEditor.js +2 -32
  113. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
  114. package/dist/zone/form/components/GameDurationControl.js +0 -3
  115. package/dist/zone/form/components/SortControl.d.ts.map +1 -1
  116. package/dist/zone/form/components/SortControl.js +0 -3
  117. package/package.json +6 -8
  118. package/src/affiliate/form/AffiliateForm.tsx +0 -1
  119. package/src/assets/iframe/available.svg +4 -4
  120. package/src/auth/Login/LoginComponent.tsx +1 -1
  121. package/src/availability-indicator/AvailabilityIndicator.tsx +17 -92
  122. package/src/calendar/Calendar.tsx +0 -2
  123. package/src/calendar/components/CalendarDates/CalendarDates.tsx +0 -3
  124. package/src/calendar/utils/index.ts +26 -17
  125. package/src/date-time-button/DateContent.tsx +3 -3
  126. package/src/date-time-button/DateTimeButton.tsx +3 -7
  127. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
  128. package/src/events/event-venue-map/EventVenueMap.tsx +0 -1
  129. package/src/events/event-venue-map/hooks/useCanvasSize.ts +1 -5
  130. package/src/iframe/activity-card/ActivityCard.tsx +2 -15
  131. package/src/iframe/event/ticket-description/TicketDescription.tsx +22 -35
  132. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +0 -9
  133. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
  134. package/src/iframe/ryft/RyftPaymentForm.tsx +3 -14
  135. package/src/iframe/ryft/utils/ryft-form.ts +5 -6
  136. package/src/layout/DropDown.tsx +1 -1
  137. package/src/notification/email-template/control/EmailTemplateControl.tsx +0 -1
  138. package/src/product-set/form/ProductCategoriesControl.tsx +1 -37
  139. package/src/product-set/form/ProductSetForm.tsx +2 -6
  140. package/src/product-set/form/ProductZonesControl.tsx +4 -1
  141. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  142. package/src/product-set/form/SubProductsControl.tsx +3 -0
  143. package/src/product-set/form/VenueMapsControl.tsx +3 -0
  144. package/src/product-set/product/ProductControl.tsx +1 -0
  145. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
  146. package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +0 -2
  147. package/src/product-set/product/deposit/ProductDepositControl.tsx +0 -1
  148. package/src/product-set/product/duration/ProductDurationControl.tsx +0 -2
  149. package/src/product-set/product/price/ProductPriceControl.tsx +0 -1
  150. package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +0 -2
  151. package/src/product-set/product/quantity/ProductQuantityControl.tsx +0 -2
  152. package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +0 -1
  153. package/src/product-set/product-category/ProductCategoryControl.tsx +0 -4
  154. package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
  155. package/src/recurrence-input/RecurrenceEndInput.tsx +0 -1
  156. package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +0 -1
  157. package/src/resource/form/components/CapacityControl.tsx +0 -1
  158. package/src/resource/form/components/SortControl.tsx +0 -1
  159. package/src/sales/booking/results/components/ResultCard.tsx +2 -0
  160. package/src/sales/coupon/control/CouponFormControl.tsx +0 -7
  161. package/src/setting/admin/PaymentFeeForm.tsx +0 -5
  162. package/src/setting/dashboard/DashboardSettingForm.tsx +0 -1
  163. package/src/snippet/snippet-template/preview/Preview.tsx +5 -13
  164. package/src/sortable-tree/SortableTreeItem.tsx +0 -6
  165. package/src/static/CurrencyNumberInput.tsx +0 -1
  166. package/src/static/form-number-input/FormNumberInput.tsx +0 -1
  167. package/src/static/number-input/NumberInput.tsx +0 -1
  168. package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -9
  169. package/src/styles/date-time-button/DateTimeButton.scss +1 -2
  170. package/src/styles/iframe-events/TicketDescription.scss +1 -1
  171. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  172. package/src/styles/product-set/ProductSetForm.scss +0 -22
  173. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +3 -1
  174. package/src/styles/sales/BookingResults.scss +1 -1
  175. package/src/tiptap-editor/TipTapEditor.tsx +1 -8
  176. package/src/zone/form/components/GameDurationControl.tsx +0 -1
  177. package/src/zone/form/components/SortControl.tsx +0 -1
  178. package/yarn.lock +18 -34
@@ -1 +1 @@
1
- {"version":3,"file":"AffiliateForm.d.ts","sourceRoot":"","sources":["../../../src/affiliate/form/AffiliateForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,4DAA4D,CAAA;AAEtF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAGpE,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IAChC,YAAY,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACnD,YAAY,EAAE,oBAAoB,CAAA;IAClC,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,aAAa,8DAKvB,kBAAkB,4CA+FpB,CAAA"}
1
+ {"version":3,"file":"AffiliateForm.d.ts","sourceRoot":"","sources":["../../../src/affiliate/form/AffiliateForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,4DAA4D,CAAA;AAEtF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAGpE,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IAChC,YAAY,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACnD,YAAY,EAAE,oBAAoB,CAAA;IAClC,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,aAAa,8DAKvB,kBAAkB,4CA8FpB,CAAA"}
@@ -1,5 +1,5 @@
1
- <svg viewBox="auto" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect x="14%" y="0" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
3
- <rect x="14%" y="33%" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
4
- <rect x="14%" y="66%" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
1
+ <svg width="7" height="11" viewBox="0 0 7 11" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="0.943939" y="1.03658" width="5.25188" height="3.04878" rx="1.5" fill="#4CF973" stroke="white"/>
3
+ <rect x="0.943939" y="4.10976" width="5.25188" height="3.04878" rx="1.5" fill="#4CF973" stroke="white"/>
4
+ <rect x="0.943939" y="7.18292" width="5.25188" height="3.04878" rx="1.5" fill="#4CF973" stroke="white"/>
5
5
  </svg>
@@ -4,31 +4,33 @@ var _rect, _rect2, _rect3;
4
4
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
5
5
  const SvgAvailable = props => /*#__PURE__*/React.createElement("svg", _extends({
6
6
  xmlns: "http://www.w3.org/2000/svg",
7
- fill: "none",
8
- viewBox: "auto"
7
+ width: 7,
8
+ height: 11,
9
+ fill: "none"
9
10
  }, props), _rect || (_rect = /*#__PURE__*/React.createElement("rect", {
10
- width: "63%",
11
- height: "29%",
12
- x: "14%",
11
+ width: 5.252,
12
+ height: 3.049,
13
+ x: 0.944,
14
+ y: 1.037,
13
15
  fill: "#4CF973",
14
16
  stroke: "#fff",
15
- rx: "15%"
17
+ rx: 1.5
16
18
  })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement("rect", {
17
- width: "63%",
18
- height: "29%",
19
- x: "14%",
20
- y: "33%",
19
+ width: 5.252,
20
+ height: 3.049,
21
+ x: 0.944,
22
+ y: 4.11,
21
23
  fill: "#4CF973",
22
24
  stroke: "#fff",
23
- rx: "15%"
25
+ rx: 1.5
24
26
  })), _rect3 || (_rect3 = /*#__PURE__*/React.createElement("rect", {
25
- width: "63%",
26
- height: "29%",
27
- x: "14%",
28
- y: "66%",
27
+ width: 5.252,
28
+ height: 3.049,
29
+ x: 0.944,
30
+ y: 7.183,
29
31
  fill: "#4CF973",
30
32
  stroke: "#fff",
31
- rx: "15%"
33
+ rx: 1.5
32
34
  })));
33
35
 
34
36
  export { SvgAvailable as ReactComponent };
@@ -203,10 +203,9 @@ var LoginComponent = function(param) {
203
203
  var _useState = _sliced_to_array(useState(false), 2), isLoading = _useState[0], setIsLoading = _useState[1];
204
204
  var userApiService = useUserApi(request);
205
205
  var handleError = function(error) {
206
- var _error_response_data, _error_response;
207
206
  notification.danger({
208
207
  title: 'Error',
209
- message: (error === null || error === void 0 ? void 0 : (_error_response = error.response) === null || _error_response === void 0 ? void 0 : (_error_response_data = _error_response.data) === null || _error_response_data === void 0 ? void 0 : _error_response_data.message) || error.message
208
+ message: error.message
210
209
  });
211
210
  };
212
211
  var storeSecrets = function(secrets) {
@@ -1,11 +1,9 @@
1
1
  import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper';
2
- import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
3
2
  type AvailabilityIndicatorProps = {
4
- resources?: ZoneResourcesAvailability;
3
+ resources: ZoneResourcesAvailability;
5
4
  isUnavailable?: boolean;
6
5
  isSoldOut?: boolean;
7
- availabilityFormat?: AvailabilityFormat | null;
8
6
  };
9
- export declare const AvailabilityIndicator: ({ resources, isUnavailable, isSoldOut: _isSoldOut, availabilityFormat, }: AvailabilityIndicatorProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const AvailabilityIndicator: ({ resources, isUnavailable, isSoldOut, }: AvailabilityIndicatorProps) => import("react/jsx-runtime").JSX.Element;
10
8
  export {};
11
9
  //# sourceMappingURL=AvailabilityIndicator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvailabilityIndicator.d.ts","sourceRoot":"","sources":["../../src/availability-indicator/AvailabilityIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AACpH,OAAO,EAEL,kBAAkB,EACnB,MAAM,2DAA2D,CAAA;AAuFlE,KAAK,0BAA0B,GAAG;IAChC,SAAS,CAAC,EAAE,yBAAyB,CAAA;IACrC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,qBAAqB,6EAK/B,0BAA0B,4CAwB5B,CAAA"}
1
+ {"version":3,"file":"AvailabilityIndicator.d.ts","sourceRoot":"","sources":["../../src/availability-indicator/AvailabilityIndicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AAiCpH,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,yBAAyB,CAAA;IACpC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,qBAAqB,6CAI/B,0BAA0B,4CAc5B,CAAA"}
@@ -1,117 +1,40 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useTranslation } from 'react-i18next';
3
- import { AVAILABILITY_FORMAT_NUMBER } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
4
- import { useWindowDimensions } from '@licklist/plugins';
5
3
  import { ReactComponent as SvgAvailable } from '../assets/iframe/available.svg.js';
6
4
  import { ReactComponent as SvgLimited } from '../assets/iframe/limited.svg.js';
7
5
  import { ReactComponent as SvgSoldOut } from '../assets/iframe/soldOut.svg.js';
8
- import { TAB_WIDTH } from '../iframe/page/components/PageBody/constants.js';
9
6
 
10
- function _define_property(obj, key, value) {
11
- if (key in obj) {
12
- Object.defineProperty(obj, key, {
13
- value: value,
14
- enumerable: true,
15
- configurable: true,
16
- writable: true
17
- });
18
- } else {
19
- obj[key] = value;
20
- }
21
- return obj;
22
- }
23
- function _object_spread(target) {
24
- for(var i = 1; i < arguments.length; i++){
25
- var source = arguments[i] != null ? arguments[i] : {};
26
- var ownKeys = Object.keys(source);
27
- if (typeof Object.getOwnPropertySymbols === "function") {
28
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
29
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
30
- }));
31
- }
32
- ownKeys.forEach(function(key) {
33
- _define_property(target, key, source[key]);
34
- });
35
- }
36
- return target;
37
- }
38
- function ownKeys(object, enumerableOnly) {
39
- var keys = Object.keys(object);
40
- if (Object.getOwnPropertySymbols) {
41
- var symbols = Object.getOwnPropertySymbols(object);
42
- if (enumerableOnly) {
43
- symbols = symbols.filter(function(sym) {
44
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
45
- });
46
- }
47
- keys.push.apply(keys, symbols);
48
- }
49
- return keys;
50
- }
51
- function _object_spread_props(target, source) {
52
- source = source != null ? source : {};
53
- if (Object.getOwnPropertyDescriptors) {
54
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
55
- } else {
56
- ownKeys(Object(source)).forEach(function(key) {
57
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
58
- });
59
- }
60
- return target;
61
- }
62
7
  var LOTS_OF_SPACE_LIMIT = 0.2;
63
8
  var LIMITED_LIMIT = 0.8;
64
- var getLabelsWithArgument = function(param) {
65
- var bookedResources = param.bookedResources, totalResources = param.totalResources, availabilityFormat = param.availabilityFormat, label = param.label;
66
- var availableResources = totalResources - bookedResources;
67
- if (availabilityFormat !== AVAILABILITY_FORMAT_NUMBER) {
9
+ var getIconsAndLabels = function(param) {
10
+ var bookedResources = param.bookedResources, totalResources = param.totalResources;
11
+ if (bookedResources === totalResources) {
68
12
  return {
69
- label: label
13
+ label: 'soldOut',
14
+ Icon: SvgSoldOut
70
15
  };
71
16
  }
72
- return availableResources === 1 ? {
73
- label: 'availableSingleSpace'
74
- } : {
75
- label: 'availableMultipleSpaces',
76
- argument: availableResources
77
- };
78
- };
79
- var getIconsAndLabelsWithArgument = function(param) {
80
- var bookedResources = param.bookedResources, totalResources = param.totalResources, availabilityFormat = param.availabilityFormat;
81
17
  // lots of space if less than 80% booked
82
18
  if (bookedResources / totalResources <= LOTS_OF_SPACE_LIMIT) {
83
- return _object_spread_props(_object_spread({}, getLabelsWithArgument({
84
- bookedResources: bookedResources,
85
- totalResources: totalResources,
86
- availabilityFormat: availabilityFormat,
87
- label: 'lotsOfSpace'
88
- })), {
19
+ return {
20
+ label: 'lotsOfSpace',
89
21
  Icon: SvgAvailable
90
- });
22
+ };
91
23
  }
92
24
  if (bookedResources / totalResources >= LIMITED_LIMIT) {
93
- return _object_spread_props(_object_spread({}, getLabelsWithArgument({
94
- bookedResources: bookedResources,
95
- totalResources: totalResources,
96
- availabilityFormat: availabilityFormat,
97
- label: 'limited'
98
- })), {
25
+ return {
26
+ label: 'limited',
99
27
  Icon: SvgLimited
100
- });
28
+ };
101
29
  }
102
- return _object_spread_props(_object_spread({}, getLabelsWithArgument({
103
- bookedResources: bookedResources,
104
- totalResources: totalResources,
105
- availabilityFormat: availabilityFormat,
106
- label: 'available'
107
- })), {
30
+ return {
31
+ label: 'available',
108
32
  Icon: SvgAvailable
109
- });
33
+ };
110
34
  };
111
35
  var AvailabilityIndicator = function(param) {
112
- var resources = param.resources, isUnavailable = param.isUnavailable, _isSoldOut = param.isSoldOut, availabilityFormat = param.availabilityFormat;
36
+ var resources = param.resources, isUnavailable = param.isUnavailable, isSoldOut = param.isSoldOut;
113
37
  var t = useTranslation('Design').t;
114
- var isSoldOut = _isSoldOut || (resources === null || resources === void 0 ? void 0 : resources.bookedResources) === (resources === null || resources === void 0 ? void 0 : resources.totalResources);
115
38
  if (isUnavailable) {
116
39
  return /*#__PURE__*/ jsx(Indicator, {
117
40
  Icon: SvgSoldOut,
@@ -124,36 +47,19 @@ var AvailabilityIndicator = function(param) {
124
47
  label: t('soldOut')
125
48
  });
126
49
  }
127
- var _getIconsAndLabelsWithArgument = getIconsAndLabelsWithArgument(_object_spread_props(_object_spread({}, resources), {
128
- availabilityFormat: availabilityFormat
129
- })), Icon = _getIconsAndLabelsWithArgument.Icon, label = _getIconsAndLabelsWithArgument.label, argument = _getIconsAndLabelsWithArgument.argument;
50
+ var _getIconsAndLabels = getIconsAndLabels(resources), Icon = _getIconsAndLabels.Icon, label = _getIconsAndLabels.label;
130
51
  return /*#__PURE__*/ jsx(Indicator, {
131
52
  Icon: Icon,
132
- label: t(label, argument ? {
133
- argument: argument
134
- } : undefined)
53
+ label: t(label)
135
54
  });
136
55
  };
137
56
  var Indicator = function(param) {
138
57
  var Icon = param.Icon, label = param.label;
139
- var width = useWindowDimensions().width;
140
- var iconSizes = width > TAB_WIDTH ? {
141
- height: 15,
142
- width: 11
143
- } : {
144
- height: 11,
145
- width: 7
146
- };
147
58
  return /*#__PURE__*/ jsxs("div", {
148
59
  className: "availability-indicator",
149
60
  children: [
150
- /*#__PURE__*/ jsx(Icon, {
151
- height: iconSizes.height,
152
- width: iconSizes.width,
153
- viewBox: "auto"
154
- }),
61
+ /*#__PURE__*/ jsx(Icon, {}),
155
62
  /*#__PURE__*/ jsx("div", {
156
- className: "indicator-label",
157
63
  children: label
158
64
  })
159
65
  ]
@@ -1,6 +1,5 @@
1
1
  import { Dispatch, ReactElement, SetStateAction } from 'react';
2
2
  import { DateTime } from 'luxon';
3
- import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
4
3
  import { DateTimeButtonProps } from 'src/date-time-button';
5
4
  export declare const defaultStartDay: DateTime<true>;
6
5
  export type CalendarProps = {
@@ -12,7 +11,6 @@ export type CalendarProps = {
12
11
  fromPrice?: string | ReactElement | null;
13
12
  isLoading?: boolean;
14
13
  initialDate?: DateTime;
15
- availabilityFormat?: AvailabilityFormat | null;
16
14
  getDateTimeButtonProps: (date: DateTime) => Pick<DateTimeButtonProps, 'resources' | 'showResources' | 'isDisabled'>;
17
15
  };
18
16
  export declare const Calendar: (props: CalendarProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/calendar/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,MAA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CAAA;IACrB,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAA;IAClD,aAAa,EAAE,QAAQ,EAAE,CAAA;IACzB,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAA;IAC7B,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAA;IAC1D,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAAA;IACxC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,QAAQ,CAAA;IACtB,sBAAsB,EAAE,CACtB,IAAI,EAAE,QAAQ,KACX,IAAI,CAAC,mBAAmB,EAAE,WAAW,GAAG,eAAe,GAAG,YAAY,CAAC,CAAA;CAC7E,CAAA;AAED,eAAO,MAAM,QAAQ,UAAW,aAAa,4CAW5C,CAAA"}
@@ -1,4 +1,4 @@
1
1
  import { CalendarProps } from '../../Calendar';
2
- export type CalendarDatesProps = Pick<CalendarProps, 'calendarDates' | 'selectedDate' | 'setSelectedDate' | 'fromPrice' | 'getDateTimeButtonProps' | 'availabilityFormat'>;
3
- export declare const CalendarDates: ({ calendarDates, selectedDate, setSelectedDate, fromPrice, availabilityFormat, getDateTimeButtonProps, }: CalendarDatesProps) => import("react/jsx-runtime").JSX.Element;
2
+ export type CalendarDatesProps = Pick<CalendarProps, 'calendarDates' | 'selectedDate' | 'setSelectedDate' | 'fromPrice' | 'getDateTimeButtonProps'>;
3
+ export declare const CalendarDates: ({ calendarDates, selectedDate, setSelectedDate, fromPrice, getDateTimeButtonProps, }: CalendarDatesProps) => import("react/jsx-runtime").JSX.Element;
4
4
  //# sourceMappingURL=CalendarDates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarDates.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarDates/CalendarDates.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACX,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,wBAAwB,GACxB,oBAAoB,CACvB,CAAA;AAED,eAAO,MAAM,aAAa,6GAOvB,kBAAkB,4CA6CpB,CAAA"}
1
+ {"version":3,"file":"CalendarDates.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarDates/CalendarDates.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACX,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,wBAAwB,CAC3B,CAAA;AAED,eAAO,MAAM,aAAa,yFAMvB,kBAAkB,4CA4CpB,CAAA"}
@@ -57,7 +57,7 @@ function _unsupported_iterable_to_array(o, minLen) {
57
57
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
58
58
  }
59
59
  var CalendarDates = function(param) {
60
- var calendarDates = param.calendarDates, selectedDate = param.selectedDate, setSelectedDate = param.setSelectedDate, fromPrice = param.fromPrice, availabilityFormat = param.availabilityFormat, getDateTimeButtonProps = param.getDateTimeButtonProps;
60
+ var calendarDates = param.calendarDates, selectedDate = param.selectedDate, setSelectedDate = param.setSelectedDate, fromPrice = param.fromPrice, getDateTimeButtonProps = param.getDateTimeButtonProps;
61
61
  var fillCalendarDates = useMemo(function() {
62
62
  var _calendarDates_;
63
63
  var _calendarDates__weekday;
@@ -90,8 +90,7 @@ var CalendarDates = function(param) {
90
90
  return setSelectedDate(date);
91
91
  },
92
92
  price: fromPrice,
93
- variant: Variant.month,
94
- availabilityFormat: availabilityFormat
93
+ variant: Variant.month
95
94
  }, props), +date);
96
95
  })
97
96
  })
@@ -1,10 +1,4 @@
1
- import { TimeZone } from '@licklist/core/dist/DataMapper/Common/TimeZoneDataMapper';
2
1
  import { DateTime } from 'luxon';
3
- type Builder = (args: {
4
- initialDate?: DateTime;
5
- timeZone: TimeZone['name'];
6
- }) => DateTime[];
7
- export declare const getMonthCalendarDates: Builder;
8
- export declare const getWeekCalendarDates: Builder;
9
- export {};
2
+ export declare const getMonthCalendarDates: (initialDate: DateTime, timeZone?: string) => DateTime[];
3
+ export declare const getWeekCalendarDates: (initialDate: DateTime, timeZone?: string) => DateTime[];
10
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/calendar/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0DAA0D,CAAA;AACnF,OAAO,EAAE,QAAQ,EAAY,MAAM,OAAO,CAAA;AAE1C,KAAK,OAAO,GAAG,CAAC,IAAI,EAAE;IACpB,WAAW,CAAC,EAAE,QAAQ,CAAA;IACtB,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;CAC3B,KAAK,QAAQ,EAAE,CAAA;AAEhB,eAAO,MAAM,qBAAqB,EAAE,OAYnC,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,OAQlC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/calendar/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,OAAO,CAAA;AAE1C,eAAO,MAAM,qBAAqB,gBACnB,QAAQ,aACV,MAAM,KAChB,QAAQ,EAeV,CAAA;AAED,eAAO,MAAM,oBAAoB,gBAClB,QAAQ,aACV,MAAM,KAChB,QAAQ,EAcV,CAAA"}
@@ -1,27 +1,39 @@
1
- import { DateTime, Interval } from 'luxon';
1
+ import { Interval } from 'luxon';
2
2
 
3
- var getMonthCalendarDates = function(param) {
4
- var _initialDate = param.initialDate, timeZone = param.timeZone;
5
- var initialDate = _initialDate || DateTime.now().setZone(timeZone);
3
+ var getMonthCalendarDates = function(initialDate, timeZone) {
6
4
  var startOfMonth = initialDate.startOf('month');
7
5
  var endOfMonth = initialDate.endOf('month');
8
- return Interval.fromDateTimes(startOfMonth, endOfMonth).splitBy({
6
+ var dateTimes = Interval.fromDateTimes(startOfMonth, endOfMonth).splitBy({
9
7
  day: 1
10
8
  }).map(function(d) {
11
9
  return d.start;
12
10
  });
11
+ if (timeZone) {
12
+ return dateTimes.map(function(date) {
13
+ return date.setZone(timeZone, {
14
+ keepLocalTime: true
15
+ });
16
+ });
17
+ }
18
+ return dateTimes;
13
19
  };
14
- var getWeekCalendarDates = function(param) {
15
- var timeZone = param.timeZone;
16
- var initialDate = DateTime.now().setZone(timeZone);
20
+ var getWeekCalendarDates = function(initialDate, timeZone) {
17
21
  var lastDay = initialDate.plus({
18
22
  days: 7
19
23
  });
20
- return Interval.fromDateTimes(initialDate, lastDay).splitBy({
24
+ var dateTimes = Interval.fromDateTimes(initialDate, lastDay).splitBy({
21
25
  day: 1
22
26
  }).map(function(d) {
23
27
  return d.start;
24
28
  });
29
+ if (timeZone) {
30
+ return dateTimes.map(function(date) {
31
+ return date.setZone(timeZone, {
32
+ keepLocalTime: true
33
+ });
34
+ });
35
+ }
36
+ return dateTimes;
25
37
  };
26
38
 
27
39
  export { getMonthCalendarDates, getWeekCalendarDates };
@@ -1 +1 @@
1
- {"version":3,"file":"DateContent.d.ts","sourceRoot":"","sources":["../../src/date-time-button/DateContent.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAGhC,OAAO,EAAE,mBAAmB,EAAW,MAAM,kBAAkB,CAAA;AAE/D,KAAK,gBAAgB,GAAG,IAAI,CAC1B,mBAAmB,EACnB,YAAY,GAAG,YAAY,GAAG,SAAS,CACxC,GAAG;IACF,IAAI,EAAE,QAAQ,CAAA;CACf,CAAA;AAED,eAAO,MAAM,WAAW,+CAKrB,gBAAgB,4CA6BlB,CAAA"}
1
+ {"version":3,"file":"DateContent.d.ts","sourceRoot":"","sources":["../../src/date-time-button/DateContent.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,mBAAmB,EAAW,MAAM,kBAAkB,CAAA;AAE/D,KAAK,gBAAgB,GAAG,IAAI,CAC1B,mBAAmB,EACnB,YAAY,GAAG,YAAY,GAAG,SAAS,CACxC,GAAG;IACF,IAAI,EAAE,QAAQ,CAAA;CACf,CAAA;AAED,eAAO,MAAM,WAAW,+CAKrB,gBAAgB,4CA6BlB,CAAA"}
@@ -2,8 +2,8 @@ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import { TIME_FORMAT, DAY_NUMBER, DAY_NUMBER_WITH_MONTH, DAY_OF_WEEK } from '@licklist/core/dist/Config';
3
3
  import { getDayWithOrdinal } from '@licklist/plugins/dist/utils/formatDate';
4
4
  import clsx from 'clsx';
5
+ import { isToday, isTomorrow } from 'date-fns';
5
6
  import { useTranslation } from 'react-i18next';
6
- import { isToday, isTomorrow } from '@licklist/plugins/dist';
7
7
  import { Variant } from './DateTimeButton.js';
8
8
 
9
9
  function _array_like_to_array(arr, len) {
@@ -81,8 +81,8 @@ var DateContent = function(param) {
81
81
  });
82
82
  };
83
83
  var getDate = function(date) {
84
- if (isToday(date)) return 'today';
85
- if (isTomorrow(date)) return 'tomorrow';
84
+ if (isToday(date.toJSDate())) return 'today';
85
+ if (isTomorrow(date.toJSDate())) return 'tomorrow';
86
86
  return date.toFormat(DAY_OF_WEEK);
87
87
  };
88
88
 
@@ -1,7 +1,6 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { DateTime } from 'luxon';
3
3
  import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper';
4
- import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
5
4
  export declare enum Variant {
6
5
  week = "week",
7
6
  month = "month",
@@ -17,7 +16,6 @@ export type DateTimeButtonProps = {
17
16
  resources?: ZoneResourcesAvailability | null;
18
17
  showResources?: boolean;
19
18
  variant: Variant;
20
- availabilityFormat?: AvailabilityFormat | null;
21
19
  };
22
- export declare const DateTimeButton: ({ date, isDisabled: _isDisabled, isSelected, isSoldOut: _isSoldOut, onSelect, price, resources, showResources, variant, availabilityFormat, }: DateTimeButtonProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const DateTimeButton: ({ date, isDisabled: _isDisabled, isSelected, isSoldOut: _isSoldOut, onSelect, price, resources, showResources, variant, }: DateTimeButtonProps) => import("react/jsx-runtime").JSX.Element;
23
21
  //# sourceMappingURL=DateTimeButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimeButton.d.ts","sourceRoot":"","sources":["../../src/date-time-button/DateTimeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AACpH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAA;AAI9F,oBAAY,OAAO;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAA;IAClC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,IAAI,CAAA;IAC7C,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,cAAc,kJAWxB,mBAAmB,4CA4CrB,CAAA"}
1
+ {"version":3,"file":"DateTimeButton.d.ts","sourceRoot":"","sources":["../../src/date-time-button/DateTimeButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AAIpH,oBAAY,OAAO;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,EAAE,OAAO,CAAA;IACnB,UAAU,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAA;IAClC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,IAAI,CAAA;IAC7C,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,cAAc,8HAUxB,mBAAmB,4CA2CrB,CAAA"}
@@ -11,12 +11,11 @@ var Variant;
11
11
  Variant["time"] = "time";
12
12
  })(Variant || (Variant = {}));
13
13
  var DateTimeButton = function(param) {
14
- var date = param.date, _isDisabled = param.isDisabled, isSelected = param.isSelected, _isSoldOut = param.isSoldOut, onSelect = param.onSelect, price = param.price, resources = param.resources, showResources = param.showResources, _param_variant = param.variant, variant = _param_variant === void 0 ? "week" : _param_variant, availabilityFormat = param.availabilityFormat;
14
+ var date = param.date, _isDisabled = param.isDisabled, isSelected = param.isSelected, _isSoldOut = param.isSoldOut, onSelect = param.onSelect, price = param.price, resources = param.resources, showResources = param.showResources, _param_variant = param.variant, variant = _param_variant === void 0 ? "week" : _param_variant;
15
15
  var isSoldOut = _isSoldOut || resources && resources.bookedResources >= resources.totalResources;
16
16
  var isTimeVariant = variant === "time";
17
17
  var isPast = variant === "time" ? isPastTime(date) : isPastDate(date);
18
18
  var isDisabled = _isDisabled || isSoldOut || isPast;
19
- var isUnavailable = _isDisabled || isPast;
20
19
  return /*#__PURE__*/ jsxs("button", {
21
20
  type: "button",
22
21
  onClick: function() {
@@ -36,10 +35,9 @@ var DateTimeButton = function(param) {
36
35
  className: "price",
37
36
  children: price
38
37
  }),
39
- showResources && (resources || isUnavailable) && /*#__PURE__*/ jsx(AvailabilityIndicator, {
40
- availabilityFormat: availabilityFormat,
38
+ showResources && resources && /*#__PURE__*/ jsx(AvailabilityIndicator, {
41
39
  resources: resources,
42
- isUnavailable: isUnavailable,
40
+ isUnavailable: _isDisabled || isPast,
43
41
  isSoldOut: isSoldOut
44
42
  })
45
43
  ]
@@ -22,7 +22,7 @@ import 'react-bootstrap/Col';
22
22
  import 'react-bootstrap/InputGroup';
23
23
  import 'react-bootstrap/Row';
24
24
  import '@licklist/plugins/dist/services/Form/FormErrorService';
25
- import '@licklist/plugins/dist/utils/error';
25
+ import '@licklist/plugins';
26
26
  import { ProductSetContextProvider } from '../../../../../product-set/form/context.js';
27
27
  import { getFilteredTemplates } from '../../../../../product-set/utils/index.js';
28
28
  import 'react-bootstrap/Button';
@@ -33,13 +33,13 @@ import '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper';
33
33
  import 'react-bootstrap/Collapse';
34
34
  import '@licklist/plugins/dist/hooks/Media/useImages';
35
35
  import '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
36
- import '@licklist/plugins';
37
36
  import '@licklist/plugins/dist/context/app/hooks/useNotification';
38
37
  import '../../../../../static/index.js';
39
38
  import '../../../../../tiptap-editor/TipTapEditor.js';
40
39
  import '@licklist/core/dist/DataMapper/Product/ProductDataMapper';
41
40
  import '@licklist/core/dist/DataMapper/Provider/SnippetTemplateDataMapper';
42
41
  import 'react-color';
42
+ import '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
43
43
  import '../../../../../calendar/Calendar.js';
44
44
  import 'luxon';
45
45
  import 'react-intl';
@@ -69,7 +69,6 @@ import '@licklist/plugins/dist';
69
69
  import '../../../../../iframe/order-process/components/BookingSummary/BookingSummary.js';
70
70
  import '../../../../../iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js';
71
71
  import '../../../../../iframe/payment/payment-status-page/PaymentStatusPage.js';
72
- import '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
73
72
  import '../../../../../static/manual-date-picker/constants/index.js';
74
73
  import '../../../../../iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js';
75
74
  import '../../../../../sortable-tree/SortableTree.js';
@@ -1 +1 @@
1
- {"version":3,"file":"getDefaultProductSet.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/utils/getDefaultProductSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAAM,6DAA6D,CAAA;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AAE/E,eAAO,MAAM,gBAAgB,gBACd,UAAU,GAAG,IAAI,qBACX,OAAO,KACzB,oBAsCD,CAAA"}
1
+ {"version":3,"file":"getDefaultProductSet.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/utils/getDefaultProductSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAAM,6DAA6D,CAAA;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AAE/E,eAAO,MAAM,gBAAgB,gBACd,UAAU,GAAG,IAAI,qBACX,OAAO,KACzB,oBAuCD,CAAA"}
@@ -135,6 +135,7 @@ var getDefaultValues = function(productSet, hasNoRecurrences) {
135
135
  subProducts: subProducts === null || subProducts === void 0 ? void 0 : subProducts.map(function(_param) {
136
136
  var subProducts = _extends({}, _object_destructuring_empty(_param));
137
137
  return _object_spread_props(_object_spread({}, subProducts), {
138
+ originalProductId: null,
138
139
  productCategoryId: undefined
139
140
  });
140
141
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"EventVenueMap.d.ts","sourceRoot":"","sources":["../../../src/events/event-venue-map/EventVenueMap.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAA;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,0DAA0D,CAAA;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAG7D,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAA;CACtC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,CAAA;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAA;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,C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CAAA;IACX,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,CAAA;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAA;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,CAAA;IACvC,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,CAAA;IACjE,eAAe,CAAC,EAAE,wBAAwB,EAAE,CAAA;CAC7C,GAAG,wBAAwB,CAAA;AAE5B,eAAO,MAAM,aAAa;SAXnB,MAAM;aACF,OAAO,CAAC,KAAK,CAAC,EAAE;WAClB,MAAM;qBACI,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI;eACvC,OAAO;eACP,OAAO,CAAC,OAAO,CAAC,EAAE;oBACb,OAAO,CAAC,YAAY,CAAC,EAAE;4BACf,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI;sBAC/C,wBAAwB,EAAE;0EAiD7C,CAAA"}
@@ -58,7 +58,6 @@ function _object_spread_props(target, source) {
58
58
  }
59
59
  var EventVenueMap = /*#__PURE__*/ forwardRef(function(param, ref) {
60
60
  var url = param.url, points = param.points, _param_editMode = param.editMode, editMode = _param_editMode === void 0 ? false : _param_editMode, name = param.name, onPointsChange = param.onPointsChange, products = param.products, pointProducts = param.pointProducts, onPointProductsChange = param.onPointProductsChange, width = param.width, height = param.height, onPointClick = param.onPointClick, _param_usedInIframe = param.usedInIframe, usedInIframe = _param_usedInIframe === void 0 ? false : _param_usedInIframe, _param_choosedProductUuids = param.choosedProductUuids, choosedProductUuids = _param_choosedProductUuids === void 0 ? [] : _param_choosedProductUuids, _param_errorOnChoosedProductUuids = param.errorOnChoosedProductUuids, errorOnChoosedProductUuids = _param_errorOnChoosedProductUuids === void 0 ? [] : _param_errorOnChoosedProductUuids, soldOutProducts = param.soldOutProducts;
61
- // TODO fix often updating of canvasSizes, which leads to flashing poingts
62
61
  var canvasSizes = useCanvasSize({
63
62
  width: width,
64
63
  height: height
@@ -1 +1 @@
1
- {"version":3,"file":"useCanvasSize.d.ts","sourceRoot":"","sources":["../../../../src/events/event-venue-map/hooks/useCanvasSize.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,aAAa,wDAGvB,eAAe;;;CAcjB,CAAA"}
1
+ {"version":3,"file":"useCanvasSize.d.ts","sourceRoot":"","sources":["../../../../src/events/event-venue-map/hooks/useCanvasSize.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,aAAa,wDAGvB,eAAe;;;CAUjB,CAAA"}
@@ -3,17 +3,7 @@ import { useWindowDimensions } from '@licklist/plugins/dist/hooks/Media/useWindo
3
3
 
4
4
  var useCanvasSize = function(param) {
5
5
  var componentWidth = param.width, componentHeight = param.height;
6
- // TODO Fix often updating of width and height
7
6
  var _useWindowDimensions = useWindowDimensions(), width = _useWindowDimensions.width, height = _useWindowDimensions.height;
8
- // eslint-disable-next-line react-hooks/exhaustive-deps
9
- var memoizedDimensions = useMemo(function() {
10
- return {
11
- width: width,
12
- height: height
13
- };
14
- }, [
15
- width
16
- ]);
17
7
  var memoedComponentParameters = useMemo(function() {
18
8
  if (!componentWidth && !componentHeight) return null;
19
9
  return {
@@ -24,7 +14,10 @@ var useCanvasSize = function(param) {
24
14
  componentWidth,
25
15
  componentHeight
26
16
  ]);
27
- return memoedComponentParameters || memoizedDimensions;
17
+ return memoedComponentParameters || {
18
+ width: width,
19
+ height: height
20
+ };
28
21
  };
29
22
 
30
23
  export { useCanvasSize };
@@ -1,7 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
3
3
  import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper';
4
- import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper';
5
4
  export declare const LAYOUT_GRID = "grid";
6
5
  export declare const LAYOUT_LIST = "list";
7
6
  export type ActivityCardProps = {
@@ -15,7 +14,6 @@ export type ActivityCardProps = {
15
14
  availableTimes?: string | null;
16
15
  image?: Image | null;
17
16
  resources?: ZoneResourcesAvailability;
18
- availabilityFormat?: AvailabilityFormat | null;
19
17
  };
20
- export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, availabilityFormat, resources, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, resources, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
21
19
  //# sourceMappingURL=ActivityCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AACpH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAA;AAG9F,eAAO,MAAM,WAAW,SAAS,CAAA;AACjC,eAAO,MAAM,WAAW,SAAS,CAAA;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