@licklist/design 0.70.6 → 0.70.8-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) 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 +16 -18
  4. package/dist/auth/Login/LoginComponent.js +2 -1
  5. package/dist/availability-indicator/AvailabilityIndicator.d.ts +4 -2
  6. package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +1 -1
  7. package/dist/availability-indicator/AvailabilityIndicator.js +112 -18
  8. package/dist/calendar/Calendar.d.ts +2 -0
  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 +3 -2
  13. package/dist/calendar/utils/index.d.ts +8 -2
  14. package/dist/calendar/utils/index.d.ts.map +1 -1
  15. package/dist/calendar/utils/index.js +9 -21
  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 +3 -1
  19. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  20. package/dist/date-time-button/DateTimeButton.js +5 -3
  21. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +3 -2
  22. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  23. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +0 -1
  24. package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
  25. package/dist/events/event-venue-map/EventVenueMap.js +1 -0
  26. package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
  27. package/dist/events/event-venue-map/hooks/useCanvasSize.js +11 -4
  28. package/dist/iframe/activity-card/ActivityCard.d.ts +3 -1
  29. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
  30. package/dist/iframe/activity-card/ActivityCard.js +5 -3
  31. package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
  32. package/dist/iframe/event/ticket-description/TicketDescription.js +43 -32
  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 +13 -0
  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 +25 -12
  38. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
  39. package/dist/iframe/ryft/utils/ryft-form.js +4 -5
  40. package/dist/layout/DropDown.d.ts +2 -1
  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 +3 -0
  44. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  45. package/dist/product-set/form/ProductCategoriesControl.js +48 -2
  46. package/dist/product-set/form/ProductSetForm.d.ts +4 -1
  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 +0 -2
  51. package/dist/product-set/form/ProductsControl.js +1 -0
  52. package/dist/product-set/form/SelectCategoryModal.d.ts +12 -0
  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 +0 -3
  57. package/dist/product-set/form/VenueMapSetModal.d.ts.map +1 -1
  58. package/dist/product-set/form/VenueMapSetModal.js +7 -7
  59. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  60. package/dist/product-set/form/VenueMapsControl.js +0 -3
  61. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  62. package/dist/product-set/product/advanced-options/AdvancedOptions.js +1 -1
  63. package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
  64. package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +6 -0
  65. package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
  66. package/dist/product-set/product/deposit/ProductDepositControl.js +3 -0
  67. package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
  68. package/dist/product-set/product/duration/ProductDurationControl.js +6 -0
  69. package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
  70. package/dist/product-set/product/price/ProductPriceControl.js +3 -0
  71. package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
  72. package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +6 -0
  73. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  74. package/dist/product-set/product/quantity/ProductQuantityControl.js +6 -0
  75. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
  76. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +4 -1
  77. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  78. package/dist/product-set/product-category/ProductCategoryControl.js +12 -0
  79. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  80. package/dist/recurrence-input/RecurrenceEndInput.js +3 -0
  81. package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
  82. package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
  83. package/dist/resource/form/components/CapacityControl.js +3 -0
  84. package/dist/resource/form/components/SortControl.d.ts.map +1 -1
  85. package/dist/resource/form/components/SortControl.js +3 -0
  86. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  87. package/dist/sales/booking/results/components/ResultCard.js +0 -2
  88. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  89. package/dist/sales/coupon/control/CouponFormControl.js +21 -0
  90. package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
  91. package/dist/setting/admin/PaymentFeeForm.js +16 -1
  92. package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
  93. package/dist/setting/dashboard/DashboardSettingForm.js +4 -1
  94. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  95. package/dist/snippet/snippet-template/preview/Preview.js +11 -3
  96. package/dist/sortable-tree/SortableTreeItem.d.ts +2 -1
  97. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  98. package/dist/sortable-tree/SortableTreeItem.js +10 -4
  99. package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
  100. package/dist/static/CurrencyNumberInput.js +3 -0
  101. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  102. package/dist/static/form-number-input/FormNumberInput.js +3 -0
  103. package/dist/static/number-input/NumberInput.d.ts.map +1 -1
  104. package/dist/static/number-input/NumberInput.js +3 -0
  105. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +9 -0
  106. package/dist/styles/date-time-button/DateTimeButton.scss +2 -1
  107. package/dist/styles/iframe-events/TicketDescription.scss +1 -1
  108. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  109. package/dist/styles/product-set/ProductSetForm.scss +22 -0
  110. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
  111. package/dist/styles/sales/BookingResults.scss +1 -1
  112. package/dist/tiptap-editor/TipTapEditor.d.ts +2 -1
  113. package/dist/tiptap-editor/TipTapEditor.d.ts.map +1 -1
  114. package/dist/tiptap-editor/TipTapEditor.js +32 -2
  115. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
  116. package/dist/zone/form/components/GameDurationControl.js +3 -0
  117. package/dist/zone/form/components/SortControl.d.ts.map +1 -1
  118. package/dist/zone/form/components/SortControl.js +3 -0
  119. package/package.json +8 -6
  120. package/src/affiliate/form/AffiliateForm.tsx +1 -0
  121. package/src/assets/iframe/available.svg +4 -4
  122. package/src/auth/Login/LoginComponent.tsx +1 -1
  123. package/src/availability-indicator/AvailabilityIndicator.tsx +92 -17
  124. package/src/calendar/Calendar.tsx +2 -0
  125. package/src/calendar/components/CalendarDates/CalendarDates.tsx +3 -0
  126. package/src/calendar/utils/index.ts +17 -26
  127. package/src/date-time-button/DateContent.tsx +3 -3
  128. package/src/date-time-button/DateTimeButton.tsx +7 -3
  129. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
  130. package/src/events/event-venue-map/EventVenueMap.tsx +1 -0
  131. package/src/events/event-venue-map/hooks/useCanvasSize.ts +5 -1
  132. package/src/iframe/activity-card/ActivityCard.tsx +15 -2
  133. package/src/iframe/event/ticket-description/TicketDescription.tsx +35 -22
  134. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +9 -0
  135. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -0
  136. package/src/iframe/ryft/RyftPaymentForm.tsx +14 -3
  137. package/src/iframe/ryft/utils/ryft-form.ts +6 -5
  138. package/src/layout/DropDown.tsx +1 -1
  139. package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -0
  140. package/src/product-set/form/ProductCategoriesControl.tsx +37 -1
  141. package/src/product-set/form/ProductSetForm.tsx +6 -2
  142. package/src/product-set/form/ProductZonesControl.tsx +1 -4
  143. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  144. package/src/product-set/form/SubProductsControl.tsx +0 -3
  145. package/src/product-set/form/VenueMapSetModal.tsx +8 -9
  146. package/src/product-set/form/VenueMapsControl.tsx +0 -3
  147. package/src/product-set/product/ProductControl.tsx +0 -1
  148. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
  149. package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +2 -0
  150. package/src/product-set/product/deposit/ProductDepositControl.tsx +1 -0
  151. package/src/product-set/product/duration/ProductDurationControl.tsx +2 -0
  152. package/src/product-set/product/price/ProductPriceControl.tsx +1 -0
  153. package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +2 -0
  154. package/src/product-set/product/quantity/ProductQuantityControl.tsx +2 -0
  155. package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +1 -0
  156. package/src/product-set/product-category/ProductCategoryControl.tsx +4 -0
  157. package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
  158. package/src/recurrence-input/RecurrenceEndInput.tsx +1 -0
  159. package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +1 -0
  160. package/src/resource/form/components/CapacityControl.tsx +1 -0
  161. package/src/resource/form/components/SortControl.tsx +1 -0
  162. package/src/sales/booking/results/components/ResultCard.tsx +0 -2
  163. package/src/sales/coupon/control/CouponFormControl.tsx +7 -0
  164. package/src/setting/admin/PaymentFeeForm.tsx +5 -0
  165. package/src/setting/dashboard/DashboardSettingForm.tsx +1 -0
  166. package/src/snippet/snippet-template/preview/Preview.tsx +13 -5
  167. package/src/sortable-tree/SortableTreeItem.tsx +6 -0
  168. package/src/static/CurrencyNumberInput.tsx +1 -0
  169. package/src/static/form-number-input/FormNumberInput.tsx +1 -0
  170. package/src/static/number-input/NumberInput.tsx +1 -0
  171. package/src/styles/availability-indicator/AvailabilityIndicator.scss +9 -0
  172. package/src/styles/date-time-button/DateTimeButton.scss +2 -1
  173. package/src/styles/iframe-events/TicketDescription.scss +1 -1
  174. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  175. package/src/styles/product-set/ProductSetForm.scss +22 -0
  176. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
  177. package/src/styles/sales/BookingResults.scss +1 -1
  178. package/src/tiptap-editor/TipTapEditor.tsx +8 -1
  179. package/src/zone/form/components/GameDurationControl.tsx +1 -0
  180. package/src/zone/form/components/SortControl.tsx +1 -0
  181. package/yarn.lock +53 -36
@@ -240,7 +240,7 @@ var ProductSetModalClasses = {
240
240
  productZones: 'edit-product-zone'
241
241
  };
242
242
  function SortableTreeItem(param) {
243
- var id = param.id, title = param.title, badge = param.badge, subTitle = param.subTitle, body = param.body, children = param.children, preItem = param.preItem, postItem = param.postItem, sortableItems = param.sortableItems, _param_isExpanded = param.isExpanded, isExpanded = _param_isExpanded === void 0 ? false : _param_isExpanded, _param_shouldExpand = param.shouldExpand, shouldExpand = _param_shouldExpand === void 0 ? true : _param_shouldExpand, _param_isInvalid = param.isInvalid, isInvalid = _param_isInvalid === void 0 ? false : _param_isInvalid, _param_isIconInHeader = param.isIconInHeader, isIconInHeader = _param_isIconInHeader === void 0 ? true : _param_isIconInHeader, _param_treeLineIconColor = param.treeLineIconColor, treeLineIconColor = _param_treeLineIconColor === void 0 ? '' : _param_treeLineIconColor, _param_modalLabel = param.modalLabel, modalLabel = _param_modalLabel === void 0 ? '' : _param_modalLabel, modalClass = param.modalClass, _param_isNewAdded = param.isNewAdded, isNewAdded = _param_isNewAdded === void 0 ? false : _param_isNewAdded, onDelete = param.onDelete, validate = param.validate, cancelChanges = param.cancelChanges, saveValidField = param.saveValidField, edit = param.edit, secondaryBadge = param.secondaryBadge, setIsExpanded = param.setIsExpanded, isOverride = param.isOverride;
243
+ var id = param.id, title = param.title, badge = param.badge, subTitle = param.subTitle, body = param.body, children = param.children, preItem = param.preItem, postItem = param.postItem, sortableItems = param.sortableItems, _param_isExpanded = param.isExpanded, isExpanded = _param_isExpanded === void 0 ? false : _param_isExpanded, _param_shouldExpand = param.shouldExpand, shouldExpand = _param_shouldExpand === void 0 ? true : _param_shouldExpand, _param_isInvalid = param.isInvalid, isInvalid = _param_isInvalid === void 0 ? false : _param_isInvalid, _param_isIconInHeader = param.isIconInHeader, isIconInHeader = _param_isIconInHeader === void 0 ? true : _param_isIconInHeader, _param_treeLineIconColor = param.treeLineIconColor, treeLineIconColor = _param_treeLineIconColor === void 0 ? '' : _param_treeLineIconColor, _param_modalLabel = param.modalLabel, modalLabel = _param_modalLabel === void 0 ? '' : _param_modalLabel, modalClass = param.modalClass, _param_isNewAdded = param.isNewAdded, isNewAdded = _param_isNewAdded === void 0 ? false : _param_isNewAdded, onDelete = param.onDelete, validate = param.validate, cancelChanges = param.cancelChanges, saveValidField = param.saveValidField, edit = param.edit, secondaryBadge = param.secondaryBadge, setIsExpanded = param.setIsExpanded, isOverride = param.isOverride, itemButton = param.itemButton;
244
244
  var _useState = _sliced_to_array(useState(isExpanded), 2), expanded = _useState[0], setExpanded = _useState[1];
245
245
  var _useState1 = _sliced_to_array(useState(isNewAdded), 2), isModalVisible = _useState1[0], setIsModalVisible = _useState1[1];
246
246
  var t = useTranslation('Design').t;
@@ -433,9 +433,15 @@ function SortableTreeItem(param) {
433
433
  /*#__PURE__*/ jsxs("div", {
434
434
  className: clsx(modalLabel ? 'sortable-tree-product-set-title-container' : 'sortable-tree-title-container'),
435
435
  children: [
436
- /*#__PURE__*/ jsx("span", {
437
- className: clsx('sortable-tree-item-title', modalLabel && 'sortable-tree-product-set-element-title'),
438
- children: title
436
+ /*#__PURE__*/ jsxs("span", {
437
+ className: clsx('sortable-tree-item-title', modalLabel && 'sortable-tree-product-set-element-title', 'd-flex justify-content-between'),
438
+ children: [
439
+ title,
440
+ /*#__PURE__*/ jsx("div", {
441
+ className: "sortable-tree-item-subtitle",
442
+ children: itemButton
443
+ })
444
+ ]
439
445
  }),
440
446
  !expanded && /*#__PURE__*/ jsx("span", {
441
447
  className: "sortable-tree-item-subtitle",
@@ -1 +1 @@
1
- {"version":3,"file":"CurrencyNumberInput.d.ts","sourceRoot":"","sources":["../../src/static/CurrencyNumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAQ,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAExD,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,eAAO,MAAM,mBAAmB,uHAoC/B,CAAA"}
1
+ {"version":3,"file":"CurrencyNumberInput.d.ts","sourceRoot":"","sources":["../../src/static/CurrencyNumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAQ,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAExD,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAChE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,eAAO,MAAM,mBAAmB,uHAqC/B,CAAA"}
@@ -88,6 +88,9 @@ var CurrencyNumberInput = /*#__PURE__*/ forwardRef(function(_param, ref) {
88
88
  disabled: disabled,
89
89
  value: value,
90
90
  onChange: onChange,
91
+ onWheel: function(event) {
92
+ return event.currentTarget.blur();
93
+ },
91
94
  ref: ref
92
95
  }, props)),
93
96
  /*#__PURE__*/ jsx(Form.Control.Feedback, {
@@ -1 +1 @@
1
- {"version":3,"file":"FormNumberInput.d.ts","sourceRoot":"","sources":["../../../src/static/form-number-input/FormNumberInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,eAAe,EAGhB,MAAM,iBAAiB,CAAA;AAIxB,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,IAAI,CACV,eAAe,EACf,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CACpD,CAAA;CACF;AAED,eAAO,MAAM,eAAe,2DAOzB,oBAAoB,4CAiEtB,CAAA"}
1
+ {"version":3,"file":"FormNumberInput.d.ts","sourceRoot":"","sources":["../../../src/static/form-number-input/FormNumberInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,eAAe,EAGhB,MAAM,iBAAiB,CAAA;AAIxB,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,IAAI,CACV,eAAe,EACf,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CACpD,CAAA;CACF;AAED,eAAO,MAAM,eAAe,2DAOzB,oBAAoB,4CAkEtB,CAAA"}
@@ -106,6 +106,9 @@ var FormNumberInput = function(param) {
106
106
  type: "number",
107
107
  step: step,
108
108
  disabled: disabled,
109
+ onWheel: function(event) {
110
+ return event.currentTarget.blur();
111
+ },
109
112
  isInvalid: HookFormService.isInvalid(fieldName, errors)
110
113
  }, field), {
111
114
  onChange: function(event) {
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../src/static/number-input/NumberInput.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,wBAAgB,WAAW,CAAC,EAC1B,QAAgB,EAChB,SAAc,EACd,KAAK,EACL,QAAQ,EACR,WAAW,EACX,SAAS,EACT,GAAG,EACH,GAAG,EACH,YAAY,GACb,EAAE,gBAAgB,2CAmDlB"}
1
+ {"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../src/static/number-input/NumberInput.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,wBAAgB,WAAW,CAAC,EAC1B,QAAgB,EAChB,SAAc,EACd,KAAK,EACL,QAAQ,EACR,WAAW,EACX,SAAS,EACT,GAAG,EACH,GAAG,EACH,YAAY,GACb,EAAE,gBAAgB,2CAoDlB"}
@@ -27,6 +27,9 @@ function NumberInput(param) {
27
27
  children: [
28
28
  /*#__PURE__*/ jsx(FormControl, {
29
29
  type: "number",
30
+ onWheel: function(event) {
31
+ return event.currentTarget.blur();
32
+ },
30
33
  onChange: function(e) {
31
34
  return onChange(Number(e.target.value));
32
35
  },
@@ -4,6 +4,15 @@
4
4
  align-items: center;
5
5
  gap: 0.5rem;
6
6
  font-weight: 300;
7
+ width: 100%;
8
+
9
+
10
+ .indicator-label {
11
+ text-overflow: ellipsis;
12
+ white-space: nowrap;
13
+ overflow: hidden;
14
+ flex-shrink: 2;
15
+ }
7
16
 
8
17
  @include media-breakpoint-down(sm) {
9
18
  div {
@@ -79,7 +79,8 @@
79
79
 
80
80
  &.only-time-container {
81
81
  min-width: 5.3rem;
82
- max-width: 5.3rem;
82
+ max-width: 8.3rem;
83
+ flex-grow: 1;
83
84
  min-height: 2.75rem;
84
85
  border: 2px solid $snippet-calendar-disabled-button-border-color;
85
86
  }
@@ -6,7 +6,7 @@
6
6
 
7
7
  &__wrapper {
8
8
  height: var(--description-wrapper-height);
9
- margin-bottom: 1rem;
9
+ margin-bottom: 0.5rem;
10
10
 
11
11
  &-children {
12
12
  display: flex;
@@ -15,7 +15,7 @@ body[bkdt-scrollable='false'] .bkdt-mask {
15
15
  left: 0;
16
16
  width: 100%;
17
17
  height: 100%;
18
- z-index: 1000000;
18
+ z-index: 2147483646;
19
19
  background-color: rgba(0, 0, 0, 0.5);
20
20
  display: none;
21
21
  }
@@ -24,7 +24,7 @@ body[bkdt-scrollable='false'] .bkdt-mask {
24
24
  position: fixed;
25
25
  top: 0;
26
26
  left: 0;
27
- z-index: 1000001;
27
+ z-index: 2147483647;
28
28
  display: none;
29
29
  width: 100%;
30
30
  height: 100%;
@@ -15,10 +15,12 @@
15
15
  height: 2.5rem;
16
16
  border-width: 2px;
17
17
  padding: 2px;
18
+
18
19
  label,
19
20
  .btn-switch-indicator {
20
21
  border-radius: 0.375rem !important;
21
22
  }
23
+
22
24
  label {
23
25
  height: 2rem;
24
26
  }
@@ -34,6 +36,7 @@
34
36
  margin-top: 1.5rem;
35
37
  margin-bottom: 1.5rem;
36
38
  }
39
+
37
40
  @include media-breakpoint-down(sm) {
38
41
  padding: 1.5rem 1rem;
39
42
  margin-top: 0.5rem;
@@ -59,10 +62,21 @@
59
62
  background-color: #ffdbdb;
60
63
  color: #d52902;
61
64
  }
65
+
62
66
  .category-badge {
63
67
  background-color: #e8f4f6;
64
68
  color: #1a93aa;
65
69
  }
70
+
71
+ .item-icon {
72
+ display: flex;
73
+ justify-items: center;
74
+ align-items: center;
75
+ font-size: 0.65rem;
76
+ padding: 0.2rem;
77
+ margin-right: 1rem;
78
+ }
79
+
66
80
  .product-badge {
67
81
  background-color: #e9f5ea;
68
82
  color: #269b36;
@@ -75,10 +89,12 @@
75
89
 
76
90
  .product-set-mobile-modal {
77
91
  margin: 0;
92
+
78
93
  .modal-content {
79
94
  border-radius: 1rem 1rem 0 0;
80
95
  border-width: 0;
81
96
  margin: 0;
97
+
82
98
  .modal-body {
83
99
  padding: 1rem 0;
84
100
  }
@@ -100,18 +116,22 @@
100
116
  font-weight: 600;
101
117
  font-size: 0.625rem;
102
118
  }
119
+
103
120
  .product-set-subtitle-dot {
104
121
  margin-right: 0.375rem;
105
122
  width: 0.375rem;
106
123
  height: 0.375rem;
107
124
  border-radius: 3px;
108
125
  }
126
+
109
127
  .product-set-subtitle-category-dot {
110
128
  background-color: #269b36;
111
129
  }
130
+
112
131
  .product-set-subtitle-step-dot {
113
132
  background-color: #1a93aa;
114
133
  }
134
+
115
135
  .product-set-subtitle-product-dot {
116
136
  background-color: #269b36;
117
137
  }
@@ -156,6 +176,7 @@
156
176
  justify-self: flex-end;
157
177
  align-items: flex-end;
158
178
  }
179
+
159
180
  .small-badge {
160
181
  font-size: 0.5rem;
161
182
  height: 1rem;
@@ -163,6 +184,7 @@
163
184
  padding: 0 0.2rem;
164
185
  margin-bottom: 0.2rem;
165
186
  }
187
+
166
188
  .product-set-save-btn-wrapper {
167
189
  padding-left: 0 !important;
168
190
  display: flex;
@@ -102,7 +102,6 @@
102
102
  }
103
103
 
104
104
  .ryft-payment-form {
105
-
106
105
  .form-disable-box {
107
106
  display: none;
108
107
  position: absolute;
@@ -184,7 +183,6 @@
184
183
  }
185
184
 
186
185
  @include media-breakpoint-up(md) {
187
-
188
186
  .ryft-payment-form,
189
187
  .form-disable-box {
190
188
  height: 50%;
@@ -213,4 +211,4 @@
213
211
  .divider {
214
212
  display: none !important;
215
213
  }
216
- }
214
+ }
@@ -5,7 +5,7 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 14.25rem;
8
+ height: 14rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);
@@ -7,6 +7,7 @@ export interface TipTapEditorProps {
7
7
  editorStyle?: React.CSSProperties;
8
8
  className?: string;
9
9
  id?: string;
10
+ hideEmptyEditor?: boolean;
10
11
  }
11
- export declare function TipTapEditor({ viewMode, withEmoji, content, onUpdate, disabled, editorStyle, className, id, }: TipTapEditorProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function TipTapEditor({ viewMode, withEmoji, content, onUpdate, disabled, editorStyle, className, id, hideEmptyEditor, }: TipTapEditorProps): import("react/jsx-runtime").JSX.Element;
12
13
  //# sourceMappingURL=TipTapEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TipTapEditor.d.ts","sourceRoot":"","sources":["../../src/tiptap-editor/TipTapEditor.tsx"],"names":[],"mappings":"AAuBA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AA0BD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAiB,EACjB,OAAO,EACP,QAAQ,EACR,QAAgB,EAChB,WAAW,EACX,SAAS,EACT,EAAE,GACH,EAAE,iBAAiB,2CA2CnB"}
1
+ {"version":3,"file":"TipTapEditor.d.ts","sourceRoot":"","sources":["../../src/tiptap-editor/TipTapEditor.tsx"],"names":[],"mappings":"AAuBA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AA0BD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAiB,EACjB,OAAO,EACP,QAAQ,EACR,QAAgB,EAChB,WAAW,EACX,SAAS,EACT,EAAE,EACF,eAAuB,GACxB,EAAE,iBAAiB,2CAgDnB"}
@@ -21,6 +21,34 @@ import clsx from 'clsx';
21
21
  import { TipTapMenu } from './TipTapMenu/TipTapMenu.js';
22
22
  import { EmojiReplacer } from './TipTapMenu/extensions/EmojiReplacer.js';
23
23
 
24
+ function _define_property(obj, key, value) {
25
+ if (key in obj) {
26
+ Object.defineProperty(obj, key, {
27
+ value: value,
28
+ enumerable: true,
29
+ configurable: true,
30
+ writable: true
31
+ });
32
+ } else {
33
+ obj[key] = value;
34
+ }
35
+ return obj;
36
+ }
37
+ function _object_spread(target) {
38
+ for(var i = 1; i < arguments.length; i++){
39
+ var source = arguments[i] != null ? arguments[i] : {};
40
+ var ownKeys = Object.keys(source);
41
+ if (typeof Object.getOwnPropertySymbols === "function") {
42
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
43
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
44
+ }));
45
+ }
46
+ ownKeys.forEach(function(key) {
47
+ _define_property(target, key, source[key]);
48
+ });
49
+ }
50
+ return target;
51
+ }
24
52
  var DEFAULT_CONTENT = '<p></p>';
25
53
  var EXTENSIONS = [
26
54
  Blockquote,
@@ -44,7 +72,7 @@ var EXTENSIONS = [
44
72
  EmojiReplacer
45
73
  ];
46
74
  function TipTapEditor(param) {
47
- var viewMode = param.viewMode, _param_withEmoji = param.withEmoji, withEmoji = _param_withEmoji === void 0 ? false : _param_withEmoji, content = param.content, onUpdate = param.onUpdate, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, editorStyle = param.editorStyle, className = param.className, id = param.id;
75
+ var viewMode = param.viewMode, _param_withEmoji = param.withEmoji, withEmoji = _param_withEmoji === void 0 ? false : _param_withEmoji, content = param.content, onUpdate = param.onUpdate, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, editorStyle = param.editorStyle, className = param.className, id = param.id, _param_hideEmptyEditor = param.hideEmptyEditor, hideEmptyEditor = _param_hideEmptyEditor === void 0 ? false : _param_hideEmptyEditor;
48
76
  var editor = useEditor({
49
77
  extensions: EXTENSIONS,
50
78
  editable: !disabled,
@@ -81,7 +109,9 @@ function TipTapEditor(param) {
81
109
  /*#__PURE__*/ jsx(EditorContent, {
82
110
  name: "editor",
83
111
  className: clsx(!viewMode ? 'editor editor-with-menu' : 'editor-without-menu', disabled && 'editor-disabled', className),
84
- style: editorStyle,
112
+ style: _object_spread({}, editorStyle, hideEmptyEditor ? {
113
+ display: (editor === null || editor === void 0 ? void 0 : editor.isEmpty) ? 'none' : 'block'
114
+ } : {}),
85
115
  editor: editor
86
116
  })
87
117
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"GameDurationControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/GameDurationControl.tsx"],"names":[],"mappings":"AAOA,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,mBAAmB,mBAE7B,wBAAwB,4CA+B1B,CAAA"}
1
+ {"version":3,"file":"GameDurationControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/GameDurationControl.tsx"],"names":[],"mappings":"AAOA,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,mBAAmB,mBAE7B,wBAAwB,4CAgC1B,CAAA"}
@@ -77,6 +77,9 @@ var GameDurationControl = function(param) {
77
77
  required: false,
78
78
  min: 1
79
79
  })), {
80
+ onWheel: function(event) {
81
+ return event.currentTarget.blur();
82
+ },
80
83
  placeholder: t('Design:duration'),
81
84
  isInvalid: Boolean(errors.defaultDuration),
82
85
  disabled: isLoading
@@ -1 +1 @@
1
- {"version":3,"file":"SortControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/SortControl.tsx"],"names":[],"mappings":"AAOA,KAAK,gBAAgB,GAAG;IACtB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,kBAAmB,gBAAgB,4CAmC1D,CAAA"}
1
+ {"version":3,"file":"SortControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/SortControl.tsx"],"names":[],"mappings":"AAOA,KAAK,gBAAgB,GAAG;IACtB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,kBAAmB,gBAAgB,4CAoC1D,CAAA"}
@@ -77,6 +77,9 @@ var SortControl = function(param) {
77
77
  required: false,
78
78
  min: 1
79
79
  })), {
80
+ onWheel: function(event) {
81
+ return event.currentTarget.blur();
82
+ },
80
83
  placeholder: t('Design:ordering'),
81
84
  isInvalid: Boolean(errors.sort),
82
85
  disabled: isLoading
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.70.6",
3
+ "version": "0.70.8-dev.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -42,9 +42,9 @@
42
42
  ]
43
43
  },
44
44
  "peerDependencies": {
45
- "@licklist/core": "0.30.3",
45
+ "@licklist/core": "0.31.1-dev.4",
46
46
  "@licklist/eslint-config": "0.5.6",
47
- "@licklist/plugins": "0.33.6",
47
+ "@licklist/plugins": "0.34.0-dev.4",
48
48
  "lodash": "4.17.21",
49
49
  "luxon": "3.5.0",
50
50
  "react": "17.0.2",
@@ -61,9 +61,9 @@
61
61
  "@dnd-kit/utilities": "2.0.0",
62
62
  "@fortawesome/fontawesome-svg-core": "1.2.34",
63
63
  "@fortawesome/free-solid-svg-icons": "5.15.2",
64
- "@licklist/core": "0.30.3",
64
+ "@licklist/core": "0.31.1-dev.4",
65
65
  "@licklist/eslint-config": "0.5.6",
66
- "@licklist/plugins": "0.33.6",
66
+ "@licklist/plugins": "0.34.0-dev.4",
67
67
  "@mantine/core": "6.0.22",
68
68
  "@mantine/hooks": "6.0.22",
69
69
  "@mdx-js/react": "1.6.22",
@@ -202,8 +202,10 @@
202
202
  "yarn tsc"
203
203
  ]
204
204
  },
205
+ "packageManager": "yarn@4.4.0",
205
206
  "volta": {
206
207
  "node": "20.9.0",
207
208
  "yarn": "4.4.0"
208
- }
209
+ },
210
+ "stableVersion": "0.69.1-dev.3"
209
211
  }
@@ -76,6 +76,7 @@ export const AffiliateForm = ({
76
76
  const copyToClipboard = () =>
77
77
  // eslint-disable-next-line consistent-return
78
78
  window.navigator.clipboard.writeText(formValues.link)
79
+
79
80
  return (
80
81
  <FormProvider {...form}>
81
82
  <Form onSubmit={form.handleSubmit(handleSubmit)}>
@@ -1,5 +1,5 @@
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"/>
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"/>
5
5
  </svg>
@@ -44,7 +44,7 @@ const LoginComponent = ({
44
44
  const handleError = (error: any) => {
45
45
  notification.danger({
46
46
  title: 'Error',
47
- message: error.message,
47
+ message: error?.response?.data?.message || error.message,
48
48
  })
49
49
  }
50
50
 
@@ -1,9 +1,15 @@
1
1
  import { FunctionComponent, SVGProps } from 'react'
2
2
  import { useTranslation } from 'react-i18next'
3
3
  import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper'
4
+ import {
5
+ AVAILABILITY_FORMAT_NUMBER,
6
+ AvailabilityFormat,
7
+ } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper'
8
+ import { useWindowDimensions } from '@licklist/plugins'
4
9
  import { ReactComponent as AvailableIcon } from '../assets/iframe/available.svg'
5
10
  import { ReactComponent as LimitedIcon } from '../assets/iframe/limited.svg'
6
11
  import { ReactComponent as SoldOutIcon } from '../assets/iframe/soldOut.svg'
12
+ import { TAB_WIDTH } from '../iframe/page/components/PageBody/constants'
7
13
 
8
14
  const LOTS_OF_SPACE_LIMIT = 0.2
9
15
  const LIMITED_LIMIT = 0.8
@@ -13,38 +19,94 @@ type Config = {
13
19
  Icon: FunctionComponent<SVGProps<SVGSVGElement>>
14
20
  }
15
21
 
16
- const getIconsAndLabels = ({
22
+ type GetIconsAndLabelsWithArgumentResult = Config & {
23
+ argument?: number
24
+ }
25
+
26
+ interface GetIconsAndLabels extends ZoneResourcesAvailability {
27
+ availabilityFormat?: AvailabilityFormat | null
28
+ }
29
+ interface GetAppropreateLabelFormat extends GetIconsAndLabels {
30
+ label?: string
31
+ }
32
+
33
+ const getLabelsWithArgument = ({
17
34
  bookedResources,
18
35
  totalResources,
19
- }: ZoneResourcesAvailability): Config => {
20
- if (bookedResources === totalResources) {
21
- return { label: 'soldOut', Icon: SoldOutIcon }
36
+ availabilityFormat,
37
+ label,
38
+ }: GetAppropreateLabelFormat): {
39
+ label: string
40
+ argument?: number
41
+ } => {
42
+ const availableResources = totalResources - bookedResources
43
+
44
+ if (availabilityFormat !== AVAILABILITY_FORMAT_NUMBER) {
45
+ return { label }
22
46
  }
23
47
 
48
+ return availableResources === 1
49
+ ? { label: 'availableSingleSpace' }
50
+ : { label: 'availableMultipleSpaces', argument: availableResources }
51
+ }
52
+
53
+ const getIconsAndLabelsWithArgument = ({
54
+ bookedResources,
55
+ totalResources,
56
+ availabilityFormat,
57
+ }: GetIconsAndLabels): GetIconsAndLabelsWithArgumentResult => {
24
58
  // lots of space if less than 80% booked
25
59
  if (bookedResources / totalResources <= LOTS_OF_SPACE_LIMIT) {
26
- return { label: 'lotsOfSpace', Icon: AvailableIcon }
60
+ return {
61
+ ...getLabelsWithArgument({
62
+ bookedResources,
63
+ totalResources,
64
+ availabilityFormat,
65
+ label: 'lotsOfSpace',
66
+ }),
67
+ Icon: AvailableIcon,
68
+ }
27
69
  }
28
70
 
29
71
  if (bookedResources / totalResources >= LIMITED_LIMIT) {
30
- return { label: 'limited', Icon: LimitedIcon }
72
+ return {
73
+ ...getLabelsWithArgument({
74
+ bookedResources,
75
+ totalResources,
76
+ availabilityFormat,
77
+ label: 'limited',
78
+ }),
79
+ Icon: LimitedIcon,
80
+ }
31
81
  }
32
82
 
33
- return { label: 'available', Icon: AvailableIcon }
83
+ return {
84
+ ...getLabelsWithArgument({
85
+ bookedResources,
86
+ totalResources,
87
+ availabilityFormat,
88
+ label: 'available',
89
+ }),
90
+ Icon: AvailableIcon,
91
+ }
34
92
  }
35
93
 
36
94
  type AvailabilityIndicatorProps = {
37
- resources: ZoneResourcesAvailability
95
+ resources?: ZoneResourcesAvailability
38
96
  isUnavailable?: boolean
39
97
  isSoldOut?: boolean
98
+ availabilityFormat?: AvailabilityFormat | null
40
99
  }
41
100
 
42
101
  export const AvailabilityIndicator = ({
43
102
  resources,
44
103
  isUnavailable,
45
- isSoldOut,
104
+ isSoldOut: _isSoldOut,
105
+ availabilityFormat,
46
106
  }: AvailabilityIndicatorProps) => {
47
107
  const { t } = useTranslation('Design')
108
+ const isSoldOut =
109
+ _isSoldOut || resources?.bookedResources === resources?.totalResources
48
110
 
49
111
  if (isUnavailable) {
50
112
  return <Indicator Icon={SoldOutIcon} label={t('notAvailable')} />
@@ -54,14 +116,27 @@ export const AvailabilityIndicator = ({
54
116
  return <Indicator Icon={SoldOutIcon} label={t('soldOut')} />
55
117
  }
56
118
 
57
- const { Icon, label } = getIconsAndLabels(resources)
119
+ const { Icon, label, argument } = getIconsAndLabelsWithArgument({
120
+ ...resources,
121
+ availabilityFormat,
122
+ })
58
123
 
59
- return <Indicator Icon={Icon} label={t(label)} />
124
+ return (
125
+ <Indicator
126
+ Icon={Icon}
127
+ label={t(label, argument ? { argument } : undefined)}
128
+ />
129
+ )
60
130
  }
61
131
 
62
- const Indicator = ({ Icon, label }: Config) => (
63
- <div className='availability-indicator'>
64
- <Icon />
65
- <div>{label}</div>
66
- </div>
67
- )
132
+ const Indicator = ({ Icon, label }: Config) => {
133
+ const { width } = useWindowDimensions()
134
+ const iconSizes =
135
+ width > TAB_WIDTH ? { height: 15, width: 11 } : { height: 11, width: 7 }
136
+ return (
137
+ <div className='availability-indicator'>
138
+ <Icon height={iconSizes.height} width={iconSizes.width} viewBox='auto' />
139
+ <div className='indicator-label'>{label}</div>
140
+ </div>
141
+ )
142
+ }
@@ -1,5 +1,6 @@
1
1
  import { Dispatch, ReactElement, SetStateAction } from 'react'
2
2
  import { DateTime } from 'luxon'
3
+ import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper'
3
4
  import { DateTimeButtonProps } from 'src/date-time-button'
4
5
  import { CalendarButtons } from './components/CalendarButtons'
5
6
  import { CalendarDates } from './components/CalendarDates'
@@ -21,6 +22,7 @@ export type CalendarProps = {
21
22
  fromPrice?: string | ReactElement | null
22
23
  isLoading?: boolean
23
24
  initialDate?: DateTime
25
+ availabilityFormat?: AvailabilityFormat | null
24
26
  getDateTimeButtonProps: (
25
27
  date: DateTime,
26
28
  ) => Pick<DateTimeButtonProps, 'resources' | 'showResources' | 'isDisabled'>
@@ -11,6 +11,7 @@ export type CalendarDatesProps = Pick<
11
11
  | 'setSelectedDate'
12
12
  | 'fromPrice'
13
13
  | 'getDateTimeButtonProps'
14
+ | 'availabilityFormat'
14
15
  >
15
16
 
16
17
  export const CalendarDates = ({
@@ -18,6 +19,7 @@ export const CalendarDates = ({
18
19
  selectedDate,
19
20
  setSelectedDate,
20
21
  fromPrice,
22
+ availabilityFormat,
21
23
  getDateTimeButtonProps,
22
24
  }: CalendarDatesProps) => {
23
25
  const fillCalendarDates = useMemo(() => {
@@ -56,6 +58,7 @@ export const CalendarDates = ({
56
58
  onSelect={() => setSelectedDate(date)}
57
59
  price={fromPrice}
58
60
  variant={Variant.month}
61
+ availabilityFormat={availabilityFormat}
59
62
  {...props}
60
63
  />
61
64
  )