@licklist/design 0.70.0-dev.7 → 0.70.1

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 (168) 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 +1 -3
  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/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.d.ts.map +1 -1
  17. package/dist/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.js +0 -14
  18. package/dist/date-time-button/DateContent.d.ts.map +1 -1
  19. package/dist/date-time-button/DateContent.js +3 -3
  20. package/dist/date-time-button/DateTimeButton.d.ts +1 -3
  21. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  22. package/dist/date-time-button/DateTimeButton.js +1 -2
  23. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -2
  24. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  25. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -0
  26. package/dist/iframe/activity-card/ActivityCard.d.ts +1 -5
  27. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
  28. package/dist/iframe/activity-card/ActivityCard.js +1 -10
  29. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
  30. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +0 -13
  31. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +2 -0
  32. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  33. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
  34. package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
  35. package/dist/iframe/ryft/RyftPaymentForm.js +3 -3
  36. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
  37. package/dist/iframe/ryft/utils/ryft-form.js +5 -4
  38. package/dist/layout/DropDown.d.ts +1 -2
  39. package/dist/layout/DropDown.d.ts.map +1 -1
  40. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  41. package/dist/notification/email-template/control/EmailTemplateControl.js +0 -3
  42. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  43. package/dist/product-set/form/ProductCategoriesControl.js +2 -48
  44. package/dist/product-set/form/ProductSetForm.d.ts +1 -4
  45. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  46. package/dist/product-set/form/ProductSetForm.js +1 -1
  47. package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
  48. package/dist/product-set/form/ProductZonesControl.js +2 -0
  49. package/dist/product-set/form/ProductsControl.js +0 -1
  50. package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
  51. package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
  52. package/dist/product-set/form/SelectCategoryModal.js +1 -1
  53. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  54. package/dist/product-set/form/SubProductsControl.js +3 -0
  55. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  56. package/dist/product-set/form/VenueMapsControl.js +3 -0
  57. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  58. package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
  59. package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +0 -6
  60. package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
  61. package/dist/product-set/product/deposit/ProductDepositControl.js +0 -3
  62. package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
  63. package/dist/product-set/product/duration/ProductDurationControl.js +0 -6
  64. package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
  65. package/dist/product-set/product/price/ProductPriceControl.js +0 -3
  66. package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
  67. package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +0 -6
  68. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  69. package/dist/product-set/product/quantity/ProductQuantityControl.js +0 -6
  70. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
  71. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +1 -4
  72. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  73. package/dist/product-set/product-category/ProductCategoryControl.js +0 -12
  74. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  75. package/dist/recurrence-input/RecurrenceEndInput.js +0 -3
  76. package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
  77. package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
  78. package/dist/resource/form/components/CapacityControl.js +0 -3
  79. package/dist/resource/form/components/SortControl.d.ts.map +1 -1
  80. package/dist/resource/form/components/SortControl.js +0 -3
  81. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  82. package/dist/sales/booking/results/components/ResultCard.js +2 -0
  83. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  84. package/dist/sales/coupon/control/CouponFormControl.js +0 -21
  85. package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
  86. package/dist/setting/admin/PaymentFeeForm.js +1 -16
  87. package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
  88. package/dist/setting/dashboard/DashboardSettingForm.js +1 -4
  89. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  90. package/dist/snippet/snippet-template/preview/Preview.js +0 -7
  91. package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
  92. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  93. package/dist/sortable-tree/SortableTreeItem.js +4 -10
  94. package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
  95. package/dist/static/CurrencyNumberInput.js +0 -3
  96. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  97. package/dist/static/form-number-input/FormNumberInput.js +0 -3
  98. package/dist/static/number-input/NumberInput.d.ts.map +1 -1
  99. package/dist/static/number-input/NumberInput.js +0 -3
  100. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -18
  101. package/dist/styles/date-time-button/DateTimeButton.scss +1 -1
  102. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  103. package/dist/styles/product-set/ProductSetForm.scss +0 -22
  104. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +3 -1
  105. package/dist/styles/sales/BookingResults.scss +1 -1
  106. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
  107. package/dist/zone/form/components/GameDurationControl.js +0 -3
  108. package/dist/zone/form/components/SortControl.d.ts.map +1 -1
  109. package/dist/zone/form/components/SortControl.js +0 -3
  110. package/package.json +7 -9
  111. package/src/affiliate/form/AffiliateForm.tsx +0 -1
  112. package/src/assets/iframe/available.svg +4 -4
  113. package/src/auth/Login/LoginComponent.tsx +1 -1
  114. package/src/availability-indicator/AvailabilityIndicator.tsx +16 -91
  115. package/src/calendar/Calendar.tsx +0 -2
  116. package/src/calendar/components/CalendarDates/CalendarDates.tsx +0 -3
  117. package/src/calendar/utils/index.ts +26 -17
  118. package/src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx +1 -16
  119. package/src/date-time-button/DateContent.tsx +3 -3
  120. package/src/date-time-button/DateTimeButton.tsx +0 -4
  121. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
  122. package/src/iframe/activity-card/ActivityCard.tsx +0 -19
  123. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +0 -9
  124. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +2 -0
  125. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
  126. package/src/iframe/ryft/RyftPaymentForm.tsx +7 -6
  127. package/src/iframe/ryft/utils/ryft-form.ts +5 -6
  128. package/src/layout/DropDown.tsx +1 -1
  129. package/src/notification/email-template/control/EmailTemplateControl.tsx +0 -1
  130. package/src/product-set/form/ProductCategoriesControl.tsx +1 -37
  131. package/src/product-set/form/ProductSetForm.tsx +2 -6
  132. package/src/product-set/form/ProductZonesControl.tsx +4 -1
  133. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  134. package/src/product-set/form/SubProductsControl.tsx +3 -0
  135. package/src/product-set/form/VenueMapsControl.tsx +3 -0
  136. package/src/product-set/product/ProductControl.tsx +1 -0
  137. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
  138. package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +0 -2
  139. package/src/product-set/product/deposit/ProductDepositControl.tsx +0 -1
  140. package/src/product-set/product/duration/ProductDurationControl.tsx +0 -2
  141. package/src/product-set/product/price/ProductPriceControl.tsx +0 -1
  142. package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +0 -2
  143. package/src/product-set/product/quantity/ProductQuantityControl.tsx +0 -2
  144. package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +0 -1
  145. package/src/product-set/product-category/ProductCategoryControl.tsx +0 -4
  146. package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
  147. package/src/recurrence-input/RecurrenceEndInput.tsx +0 -1
  148. package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +0 -1
  149. package/src/resource/form/components/CapacityControl.tsx +0 -1
  150. package/src/resource/form/components/SortControl.tsx +0 -1
  151. package/src/sales/booking/results/components/ResultCard.tsx +2 -0
  152. package/src/sales/coupon/control/CouponFormControl.tsx +0 -7
  153. package/src/setting/admin/PaymentFeeForm.tsx +0 -5
  154. package/src/setting/dashboard/DashboardSettingForm.tsx +0 -1
  155. package/src/snippet/snippet-template/preview/Preview.tsx +0 -6
  156. package/src/sortable-tree/SortableTreeItem.tsx +0 -6
  157. package/src/static/CurrencyNumberInput.tsx +0 -1
  158. package/src/static/form-number-input/FormNumberInput.tsx +0 -1
  159. package/src/static/number-input/NumberInput.tsx +0 -1
  160. package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -18
  161. package/src/styles/date-time-button/DateTimeButton.scss +1 -1
  162. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  163. package/src/styles/product-set/ProductSetForm.scss +0 -22
  164. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +3 -1
  165. package/src/styles/sales/BookingResults.scss +1 -1
  166. package/src/zone/form/components/GameDurationControl.tsx +0 -1
  167. package/src/zone/form/components/SortControl.tsx +0 -1
  168. package/yarn.lock +852 -902
@@ -77,9 +77,6 @@ var GameDurationControl = function(param) {
77
77
  required: false,
78
78
  min: 1
79
79
  })), {
80
- onWheel: function(event) {
81
- return event.currentTarget.blur();
82
- },
83
80
  placeholder: t('Design:duration'),
84
81
  isInvalid: Boolean(errors.defaultDuration),
85
82
  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,4CAoC1D,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,4CAmC1D,CAAA"}
@@ -77,9 +77,6 @@ var SortControl = function(param) {
77
77
  required: false,
78
78
  min: 1
79
79
  })), {
80
- onWheel: function(event) {
81
- return event.currentTarget.blur();
82
- },
83
80
  placeholder: t('Design:ordering'),
84
81
  isInvalid: Boolean(errors.sort),
85
82
  disabled: isLoading
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.70.0-dev.7",
3
+ "version": "0.70.1",
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.31.1-dev.4",
45
+ "@licklist/core": "0.30.3",
46
46
  "@licklist/eslint-config": "0.5.6",
47
- "@licklist/plugins": "0.34.0-dev.4",
47
+ "@licklist/plugins": "0.33.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.31.1-dev.4",
64
+ "@licklist/core": "0.30.3",
65
65
  "@licklist/eslint-config": "0.5.6",
66
- "@licklist/plugins": "0.34.0-dev.4",
66
+ "@licklist/plugins": "0.33.4",
67
67
  "@mantine/core": "6.0.22",
68
68
  "@mantine/hooks": "6.0.22",
69
69
  "@mdx-js/react": "1.6.22",
@@ -202,10 +202,8 @@
202
202
  "yarn tsc"
203
203
  ]
204
204
  },
205
- "packageManager": "yarn@4.4.0",
206
205
  "volta": {
207
206
  "node": "20.9.0",
208
207
  "yarn": "4.4.0"
209
- },
210
- "stableVersion": "0.69.1-dev.3"
211
- }
208
+ }
209
+ }
@@ -76,7 +76,6 @@ export const AffiliateForm = ({
76
76
  const copyToClipboard = () =>
77
77
  // eslint-disable-next-line consistent-return
78
78
  window.navigator.clipboard.writeText(formValues.link)
79
-
80
79
  return (
81
80
  <FormProvider {...form}>
82
81
  <Form onSubmit={form.handleSubmit(handleSubmit)}>
@@ -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>
@@ -44,7 +44,7 @@ const LoginComponent = ({
44
44
  const handleError = (error: any) => {
45
45
  notification.danger({
46
46
  title: 'Error',
47
- message: error?.response?.data?.message || error.message,
47
+ message: error.message,
48
48
  })
49
49
  }
50
50
 
@@ -1,15 +1,9 @@
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'
9
4
  import { ReactComponent as AvailableIcon } from '../assets/iframe/available.svg'
10
5
  import { ReactComponent as LimitedIcon } from '../assets/iframe/limited.svg'
11
6
  import { ReactComponent as SoldOutIcon } from '../assets/iframe/soldOut.svg'
12
- import { TAB_WIDTH } from '../iframe/page/components/PageBody/constants'
13
7
 
14
8
  const LOTS_OF_SPACE_LIMIT = 0.2
15
9
  const LIMITED_LIMIT = 0.8
@@ -19,94 +13,38 @@ type Config = {
19
13
  Icon: FunctionComponent<SVGProps<SVGSVGElement>>
20
14
  }
21
15
 
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 = ({
16
+ const getIconsAndLabels = ({
34
17
  bookedResources,
35
18
  totalResources,
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 }
19
+ }: ZoneResourcesAvailability): Config => {
20
+ if (bookedResources === totalResources) {
21
+ return { label: 'soldOut', Icon: SoldOutIcon }
46
22
  }
47
23
 
48
- return availableResources === 1
49
- ? { label: 'availableSingleResource' }
50
- : { label: 'availableMultipleResources', argument: availableResources }
51
- }
52
-
53
- const getIconsAndLabelsWithArgument = ({
54
- bookedResources,
55
- totalResources,
56
- availabilityFormat,
57
- }: GetIconsAndLabels): GetIconsAndLabelsWithArgumentResult => {
58
24
  // lots of space if less than 80% booked
59
25
  if (bookedResources / totalResources <= LOTS_OF_SPACE_LIMIT) {
60
- return {
61
- ...getLabelsWithArgument({
62
- bookedResources,
63
- totalResources,
64
- availabilityFormat,
65
- label: 'lotsOfSpace',
66
- }),
67
- Icon: AvailableIcon,
68
- }
26
+ return { label: 'lotsOfSpace', Icon: AvailableIcon }
69
27
  }
70
28
 
71
29
  if (bookedResources / totalResources >= LIMITED_LIMIT) {
72
- return {
73
- ...getLabelsWithArgument({
74
- bookedResources,
75
- totalResources,
76
- availabilityFormat,
77
- label: 'limited',
78
- }),
79
- Icon: LimitedIcon,
80
- }
30
+ return { label: 'limited', Icon: LimitedIcon }
81
31
  }
82
32
 
83
- return {
84
- ...getLabelsWithArgument({
85
- bookedResources,
86
- totalResources,
87
- availabilityFormat,
88
- label: 'available',
89
- }),
90
- Icon: AvailableIcon,
91
- }
33
+ return { label: 'available', Icon: AvailableIcon }
92
34
  }
93
35
 
94
36
  type AvailabilityIndicatorProps = {
95
37
  resources: ZoneResourcesAvailability
96
38
  isUnavailable?: boolean
97
39
  isSoldOut?: boolean
98
- availabilityFormat?: AvailabilityFormat | null
99
40
  }
100
41
 
101
42
  export const AvailabilityIndicator = ({
102
43
  resources,
103
44
  isUnavailable,
104
- isSoldOut: _isSoldOut,
105
- availabilityFormat,
45
+ isSoldOut,
106
46
  }: AvailabilityIndicatorProps) => {
107
47
  const { t } = useTranslation('Design')
108
- const isSoldOut =
109
- _isSoldOut || resources.bookedResources === resources.totalResources
110
48
 
111
49
  if (isUnavailable) {
112
50
  return <Indicator Icon={SoldOutIcon} label={t('notAvailable')} />
@@ -116,27 +54,14 @@ export const AvailabilityIndicator = ({
116
54
  return <Indicator Icon={SoldOutIcon} label={t('soldOut')} />
117
55
  }
118
56
 
119
- const { Icon, label, argument } = getIconsAndLabelsWithArgument({
120
- ...resources,
121
- availabilityFormat,
122
- })
57
+ const { Icon, label } = getIconsAndLabels(resources)
123
58
 
124
- return (
125
- <Indicator
126
- Icon={Icon}
127
- label={t(label, argument ? { argument } : undefined)}
128
- />
129
- )
59
+ return <Indicator Icon={Icon} label={t(label)} />
130
60
  }
131
61
 
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
- }
62
+ const Indicator = ({ Icon, label }: Config) => (
63
+ <div className='availability-indicator'>
64
+ <Icon />
65
+ <div>{label}</div>
66
+ </div>
67
+ )
@@ -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
  import { CalendarButtons } from './components/CalendarButtons'
6
5
  import { CalendarDates } from './components/CalendarDates'
@@ -22,7 +21,6 @@ export type CalendarProps = {
22
21
  fromPrice?: string | ReactElement | null
23
22
  isLoading?: boolean
24
23
  initialDate?: DateTime
25
- availabilityFormat?: AvailabilityFormat | null
26
24
  getDateTimeButtonProps: (
27
25
  date: DateTime,
28
26
  ) => Pick<DateTimeButtonProps, 'resources' | 'showResources' | 'isDisabled'>
@@ -11,7 +11,6 @@ export type CalendarDatesProps = Pick<
11
11
  | 'setSelectedDate'
12
12
  | 'fromPrice'
13
13
  | 'getDateTimeButtonProps'
14
- | 'availabilityFormat'
15
14
  >
16
15
 
17
16
  export const CalendarDates = ({
@@ -19,7 +18,6 @@ export const CalendarDates = ({
19
18
  selectedDate,
20
19
  setSelectedDate,
21
20
  fromPrice,
22
- availabilityFormat,
23
21
  getDateTimeButtonProps,
24
22
  }: CalendarDatesProps) => {
25
23
  const fillCalendarDates = useMemo(() => {
@@ -58,7 +56,6 @@ export const CalendarDates = ({
58
56
  onSelect={() => setSelectedDate(date)}
59
57
  price={fromPrice}
60
58
  variant={Variant.month}
61
- availabilityFormat={availabilityFormat}
62
59
  {...props}
63
60
  />
64
61
  )
@@ -1,31 +1,40 @@
1
- import { TimeZone } from '@licklist/core/dist/DataMapper/Common/TimeZoneDataMapper'
2
1
  import { DateTime, Interval } from 'luxon'
3
2
 
4
- type Builder = (args: {
5
- initialDate?: DateTime
6
- timeZone: TimeZone['name']
7
- }) => DateTime[]
8
-
9
- export const getMonthCalendarDates: Builder = ({
10
- initialDate: _initialDate,
11
- timeZone,
12
- }): DateTime[] => {
13
- const initialDate = _initialDate || DateTime.now().setZone(timeZone)
14
-
3
+ export const getMonthCalendarDates = (
4
+ initialDate: DateTime,
5
+ timeZone?: string,
6
+ ): DateTime[] => {
15
7
  const startOfMonth = initialDate.startOf('month')
16
8
  const endOfMonth = initialDate.endOf('month')
17
9
 
18
- return Interval.fromDateTimes(startOfMonth, endOfMonth)
10
+ const dateTimes = Interval.fromDateTimes(startOfMonth, endOfMonth)
19
11
  .splitBy({ day: 1 })
20
12
  .map((d) => d.start)
21
- }
22
13
 
23
- export const getWeekCalendarDates: Builder = ({ timeZone }): DateTime[] => {
24
- const initialDate = DateTime.now().setZone(timeZone)
14
+ if (timeZone) {
15
+ return dateTimes.map((date) =>
16
+ date.setZone(timeZone, { keepLocalTime: true }),
17
+ )
18
+ }
25
19
 
20
+ return dateTimes
21
+ }
22
+
23
+ export const getWeekCalendarDates = (
24
+ initialDate: DateTime,
25
+ timeZone?: string,
26
+ ): DateTime[] => {
26
27
  const lastDay = initialDate.plus({ days: 7 })
27
28
 
28
- return Interval.fromDateTimes(initialDate, lastDay)
29
+ const dateTimes = Interval.fromDateTimes(initialDate, lastDay)
29
30
  .splitBy({ day: 1 })
30
31
  .map((d) => d.start)
32
+
33
+ if (timeZone) {
34
+ return dateTimes.map((date) =>
35
+ date.setZone(timeZone, { keepLocalTime: true }),
36
+ )
37
+ }
38
+
39
+ return dateTimes
31
40
  }
@@ -17,7 +17,6 @@ import { HasPermissionProp } from '@licklist/plugins/dist/types/permission/Permi
17
17
  import FormErrorService from '@licklist/plugins/dist/services/Form/FormErrorService'
18
18
  import { ServerError } from '@licklist/plugins/dist/hooks/Api/useHttpQuery'
19
19
  import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService'
20
- import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification'
21
20
 
22
21
  import {
23
22
  CreateSortableListItem,
@@ -85,7 +84,7 @@ export const CustomFieldSet = ({
85
84
  useEffect(() => {
86
85
  FormErrorService.handleServerErrors(serverErrors, setError)
87
86
  }, [serverErrors, setError])
88
- const notification = useNotification()
87
+
89
88
  const { fields, append, remove } = useFieldArray({
90
89
  control,
91
90
  name: CUSTOM_FIELDS,
@@ -98,13 +97,6 @@ export const CustomFieldSet = ({
98
97
 
99
98
  if (!response) return
100
99
 
101
- notification.success({
102
- title: t('App:success'),
103
- message: t('Notification:createSuccessfully', {
104
- argument: t('customField'),
105
- }),
106
- })
107
-
108
100
  setFieldSets((prevFieldSets) => {
109
101
  const nextFieldSets = [...prevFieldSets]
110
102
 
@@ -123,13 +115,6 @@ export const CustomFieldSet = ({
123
115
  const removeFieldSet = async () => {
124
116
  if (fieldSet.id !== null) {
125
117
  await onFieldSetDelete(fieldSet)
126
-
127
- notification.success({
128
- title: t('App:success'),
129
- message: t('Notification:theRemovedSuccessfully', {
130
- argument: t('customField'),
131
- }),
132
- })
133
118
  }
134
119
 
135
120
  setFieldSets(
@@ -6,9 +6,9 @@ import {
6
6
  } from '@licklist/core/dist/Config'
7
7
  import { getDayWithOrdinal } from '@licklist/plugins/dist/utils/formatDate'
8
8
  import clsx from 'clsx'
9
+ import { isToday, isTomorrow } from 'date-fns'
9
10
  import { DateTime } from 'luxon'
10
11
  import { useTranslation } from 'react-i18next'
11
- import { isToday, isTomorrow } from '@licklist/plugins/dist'
12
12
  import { DateTimeButtonProps, Variant } from './DateTimeButton'
13
13
 
14
14
  type DateContentProps = Pick<
@@ -55,9 +55,9 @@ export const DateContent = ({
55
55
  }
56
56
 
57
57
  const getDate = (date: DateTime): string => {
58
- if (isToday(date)) return 'today'
58
+ if (isToday(date.toJSDate())) return 'today'
59
59
 
60
- if (isTomorrow(date)) return 'tomorrow'
60
+ if (isTomorrow(date.toJSDate())) return 'tomorrow'
61
61
 
62
62
  return date.toFormat(DAY_OF_WEEK)
63
63
  }
@@ -2,7 +2,6 @@ import { ReactElement } from 'react'
2
2
  import clsx from 'clsx'
3
3
  import { DateTime } from 'luxon'
4
4
  import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper'
5
- import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper'
6
5
  import { AvailabilityIndicator } from '../availability-indicator'
7
6
  import { DateContent } from './DateContent'
8
7
 
@@ -22,7 +21,6 @@ export type DateTimeButtonProps = {
22
21
  resources?: ZoneResourcesAvailability | null
23
22
  showResources?: boolean
24
23
  variant: Variant
25
- availabilityFormat?: AvailabilityFormat | null
26
24
  }
27
25
 
28
26
  export const DateTimeButton = ({
@@ -35,7 +33,6 @@ export const DateTimeButton = ({
35
33
  resources,
36
34
  showResources,
37
35
  variant = Variant.week,
38
- availabilityFormat,
39
36
  }: DateTimeButtonProps) => {
40
37
  const isSoldOut =
41
38
  _isSoldOut ||
@@ -72,7 +69,6 @@ export const DateTimeButton = ({
72
69
  {price && !isDisabled && <div className='price'>{price}</div>}
73
70
  {showResources && resources && (
74
71
  <AvailabilityIndicator
75
- availabilityFormat={availabilityFormat}
76
72
  resources={resources}
77
73
  isUnavailable={_isDisabled || isPast}
78
74
  isSoldOut={isSoldOut}
@@ -39,6 +39,7 @@ export const getDefaultValues = (
39
39
  ...product,
40
40
  subProducts: subProducts?.map(({ ...subProducts }) => ({
41
41
  ...subProducts,
42
+ originalProductId: null,
42
43
  productCategoryId: undefined,
43
44
  })),
44
45
  productCategoryId: undefined,
@@ -1,9 +1,6 @@
1
1
  import { ReactNode } from 'react'
2
2
  import clsx from 'clsx'
3
3
  import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper'
4
- import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper'
5
- import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper'
6
- import { AvailabilityIndicator } from '../../availability-indicator'
7
4
 
8
5
  export const LAYOUT_GRID = 'grid'
9
6
  export const LAYOUT_LIST = 'list'
@@ -18,8 +15,6 @@ export type ActivityCardProps = {
18
15
  layout?: typeof LAYOUT_GRID | typeof LAYOUT_LIST
19
16
  availableTimes?: string | null
20
17
  image?: Image | null
21
- resources?: ZoneResourcesAvailability
22
- availabilityFormat?: AvailabilityFormat | null
23
18
  }
24
19
 
25
20
  export const ActivityCard = ({
@@ -32,8 +27,6 @@ export const ActivityCard = ({
32
27
  onSelect,
33
28
  isSelected,
34
29
  layout = LAYOUT_GRID,
35
- availabilityFormat,
36
- resources,
37
30
  }: ActivityCardProps) => {
38
31
  if (layout === LAYOUT_GRID) {
39
32
  return (
@@ -53,12 +46,6 @@ export const ActivityCard = ({
53
46
  {description && (
54
47
  <div className='mt-2 activity-card-description'>{description}</div>
55
48
  )}
56
- {resources && (
57
- <AvailabilityIndicator
58
- resources={resources}
59
- availabilityFormat={availabilityFormat}
60
- />
61
- )}
62
49
  </div>
63
50
  </button>
64
51
  )
@@ -84,12 +71,6 @@ export const ActivityCard = ({
84
71
  {description && (
85
72
  <div className='mt-2 activity-card-description'>{description}</div>
86
73
  )}
87
- {resources && (
88
- <AvailabilityIndicator
89
- resources={resources}
90
- availabilityFormat={availabilityFormat}
91
- />
92
- )}
93
74
  </div>
94
75
 
95
76
  <hr className='list-activity-card-hr' />
@@ -89,7 +89,6 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
89
89
  <FormControl
90
90
  type='number'
91
91
  onChange={(e) => handleChangeValue(Number(e.target.value))}
92
- onWheel={(event) => event.currentTarget.blur()}
93
92
  value={value}
94
93
  min={0}
95
94
  max={max}
@@ -102,14 +101,6 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
102
101
  <button
103
102
  type='button'
104
103
  onClick={handleArrowUpClick}
105
- onWheel={(event) => event.currentTarget.blur()}
106
- onFocus={(event) =>
107
- event.target.addEventListener(
108
- 'wheel',
109
- (event) => event.preventDefault(),
110
- { passive: false },
111
- )
112
- }
113
104
  className={`payment-number-input__btn-up ${
114
105
  plusButtonGreyedOut && 'disabled-number-input-button'
115
106
  }`}
@@ -2,6 +2,7 @@ import clsx from 'clsx'
2
2
  import { Button } from 'react-bootstrap'
3
3
  import { useTranslation } from 'react-i18next'
4
4
  import { FieldValues, RefCallBack, UseFormClearErrors } from 'react-hook-form'
5
+ import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper'
5
6
  import {
6
7
  Product,
7
8
  ProductCategory,
@@ -14,6 +15,7 @@ interface FormOrderItem {
14
15
  price: number
15
16
  productCategoryId: number
16
17
  hasDeposit?: boolean
18
+ zoneId?: Zone['id']
17
19
  deposit?: number | null
18
20
  quantity: number
19
21
  capacity?: number | null
@@ -61,7 +61,6 @@ const processedPaymentSummary = ({
61
61
  const total = calculateTotalPrice(order, externalPaymentDetail)
62
62
 
63
63
  const totalDiscount = calculateTotalDiscount(order.payments)
64
-
65
64
  let summaryItems: SummaryItem[] = [
66
65
  {
67
66
  translateKey: AMOUNT_TOTAL,
@@ -10,7 +10,6 @@ import {
10
10
  RYFT_STATUS_APPROVED,
11
11
  RYFT_STATUS_CAPTURED,
12
12
  RYFT_STATUS_PENDING_ACTION,
13
- RYFT_STATUS_PENDING_PAYMENT,
14
13
  AttemptPaymentResponse,
15
14
  } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment'
16
15
  import { ProviderPaymentSettings } from '@licklist/core/dist/DataMapper/Setting/ProviderPaymentSettingsDataMapper'
@@ -85,7 +84,7 @@ export const RyftPaymentForm = ({
85
84
 
86
85
  // Handle there cases when orderStatus - Captured, Approved,
87
86
  // or when no redirect URL and orderStatus - PendingAction
88
- window.location.href = `${paymentSession.returnUrl}&paymentSessionId=${paymentSession.id}`
87
+ window.location.href = `${paymentSession.returnUrl}&ps=${paymentSession.id}`
89
88
  setReferrerBeforePayment()
90
89
  }
91
90
 
@@ -113,8 +112,7 @@ export const RyftPaymentForm = ({
113
112
 
114
113
  if (
115
114
  paymentSession.status === RYFT_STATUS_APPROVED ||
116
- paymentSession.status === RYFT_STATUS_CAPTURED ||
117
- paymentSession.status === RYFT_STATUS_PENDING_PAYMENT
115
+ paymentSession.status === RYFT_STATUS_CAPTURED
118
116
  ) {
119
117
  redirectOnFailAttempt(paymentSession)
120
118
  return
@@ -221,9 +219,12 @@ export const RyftPaymentForm = ({
221
219
  onSubmit={methods.handleSubmit(handleSubmit)}
222
220
  className='ryft-payment-form'
223
221
  >
224
- <div className='form-disable-box' id='form-disable-box' />
222
+ <div className='form-disable-box' id="form-disable-box"/>
225
223
  <div className='submit-button-wrapper mt-4 p-1'>
226
- <Button type='submit' disabled={isBtnDisabled || !isValid}>
224
+ <Button
225
+ type='submit'
226
+ disabled={isBtnDisabled || !isValid}
227
+ >
227
228
  {isBtnDisabled && <ButtonLoader />}
228
229
  {t('Design:buyNow')}
229
230
  </Button>
@@ -61,22 +61,20 @@ export const injectComponentsInRyftForm = ({
61
61
  divider.id = 'mobile-pay-divider'
62
62
  container.id = 'mobile-pay-divider-container'
63
63
  container.append(dividerText, divider)
64
- const payIframe = document.getElementById('ryft-pay-iframe')
64
+ const payIframe = document.getElementById("ryft-pay-iframe");
65
65
  if (payIframe) {
66
66
  const formBox = document.getElementById('form-disable-box')
67
67
  if (formBox) {
68
- formBox.style.display = isDisableButton ? 'block' : 'none'
68
+ formBox.style.display = isDisableButton ? "block" : "none"
69
69
  }
70
70
 
71
71
  const googleButton = document.getElementById(
72
72
  'gpay-button-online-api-id',
73
73
  ) as HTMLButtonElement
74
- const appleButton = document.getElementById(
75
- 'ryft-pay-apple-pay-button',
76
- ) as HTMLButtonElement
74
+ const appleButton =document.getElementById("ryft-pay-apple-pay-button") as HTMLButtonElement
77
75
  if (googleButton) {
78
76
  googleButton.disabled = isDisableButton
79
- googleButton.style.opacity = !isDisableButton ? '1' : '0.6'
77
+ googleButton.style.opacity = isDisableButton ? '1' : '0.6'
80
78
  }
81
79
  if (appleButton) {
82
80
  appleButton.disabled = isDisableButton
@@ -88,6 +86,7 @@ export const injectComponentsInRyftForm = ({
88
86
  const applePayButton = document.createElement('button')
89
87
  applePayButton.id = 'apple-pay'
90
88
  applePayButton.type = 'button'
89
+ applePayButton.style.opacity = !isDisableButton ? '1' : '0.6'
91
90
  applePayButton.className = 'bg-dark btn btn-primary apple-pay-button'
92
91
  applePayButton.textContent = t('Events:payWithApple')
93
92
  applePayButton.onclick = onApplePayButtonClick
@@ -1,4 +1,4 @@
1
- import React, { forwardRef } from 'react'
1
+ import { forwardRef } from 'react'
2
2
 
3
3
  interface Props {
4
4
  children?: React.ReactNode | React.ReactNode[]
@@ -434,7 +434,6 @@ export const EmailTemplateControl = forwardRef(
434
434
  `templateOptionValues.${option?.id}.value`,
435
435
  )}
436
436
  type='number'
437
- onWheel={(event) => event.currentTarget.blur()}
438
437
  placeholder={t(`Design:${option.name}`)}
439
438
  id={option.name + option.id}
440
439
  defaultValue={option.selectedValue || ''}