@licklist/design 0.69.3-dev.7 → 0.69.4

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 (185) hide show
  1. package/dist/affiliate/form/AffiliateForm.d.ts.map +1 -1
  2. package/dist/auth/Login/LoginComponent.js +1 -2
  3. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +1 -2
  4. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
  5. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +2 -3
  6. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +1 -2
  7. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
  8. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +28 -31
  9. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +1 -2
  10. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
  11. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +2 -14
  12. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  13. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -0
  14. package/dist/events/event-card/utils.d.ts +0 -1
  15. package/dist/events/event-card/utils.d.ts.map +1 -1
  16. package/dist/events/event-card/utils.js +2 -6
  17. package/dist/iframe/activity-card/ActivityCard.d.ts +1 -3
  18. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
  19. package/dist/iframe/activity-card/ActivityCard.js +1 -8
  20. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
  21. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +0 -13
  22. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  23. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +0 -2
  24. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
  25. package/dist/iframe/ryft/RyftPaymentForm.d.ts +2 -2
  26. package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
  27. package/dist/iframe/ryft/RyftPaymentForm.js +2 -8
  28. package/dist/iframe/ryft/utils/ryft-form.d.ts +1 -2
  29. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
  30. package/dist/iframe/ryft/utils/ryft-form.js +1 -20
  31. package/dist/index.js +0 -1
  32. package/dist/layout/DropDown.d.ts +1 -2
  33. package/dist/layout/DropDown.d.ts.map +1 -1
  34. package/dist/modals/confirmation/ConfirmModal.d.ts +1 -3
  35. package/dist/modals/confirmation/ConfirmModal.d.ts.map +1 -1
  36. package/dist/modals/confirmation/ConfirmModal.js +8 -172
  37. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  38. package/dist/notification/email-template/control/EmailTemplateControl.js +0 -3
  39. package/dist/product-set/card/ProductSetCard.d.ts +2 -6
  40. package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
  41. package/dist/product-set/card/ProductSetCard.js +11 -20
  42. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  43. package/dist/product-set/control/DateAndRecurrenceInput.js +3 -4
  44. package/dist/product-set/control/DateInput.d.ts.map +1 -1
  45. package/dist/product-set/control/DateInput.js +2 -2
  46. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  47. package/dist/product-set/form/ProductCategoriesControl.js +2 -48
  48. package/dist/product-set/form/ProductSetForm.d.ts +1 -4
  49. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  50. package/dist/product-set/form/ProductSetForm.js +1 -64
  51. package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
  52. package/dist/product-set/form/ProductZonesControl.js +2 -0
  53. package/dist/product-set/form/ProductsControl.js +0 -1
  54. package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
  55. package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
  56. package/dist/product-set/form/SelectCategoryModal.js +1 -1
  57. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  58. package/dist/product-set/form/SubProductsControl.js +3 -0
  59. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  60. package/dist/product-set/form/VenueMapsControl.js +3 -0
  61. package/dist/product-set/form/index.d.ts +0 -1
  62. package/dist/product-set/form/index.d.ts.map +1 -1
  63. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  64. package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
  65. package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +0 -6
  66. package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
  67. package/dist/product-set/product/deposit/ProductDepositControl.js +0 -3
  68. package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
  69. package/dist/product-set/product/duration/ProductDurationControl.js +0 -6
  70. package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
  71. package/dist/product-set/product/price/ProductPriceControl.js +0 -3
  72. package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
  73. package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +0 -6
  74. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  75. package/dist/product-set/product/quantity/ProductQuantityControl.js +0 -6
  76. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
  77. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +1 -4
  78. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  79. package/dist/product-set/product-category/ProductCategoryControl.js +0 -12
  80. package/dist/product-set/utils/index.d.ts +0 -7
  81. package/dist/product-set/utils/index.d.ts.map +1 -1
  82. package/dist/product-set/utils/index.js +1 -10
  83. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  84. package/dist/recurrence-input/RecurrenceEndInput.js +0 -3
  85. package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
  86. package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
  87. package/dist/resource/form/components/CapacityControl.js +0 -3
  88. package/dist/resource/form/components/SortControl.d.ts.map +1 -1
  89. package/dist/resource/form/components/SortControl.js +0 -3
  90. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  91. package/dist/sales/booking/results/components/ResultCard.js +2 -0
  92. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  93. package/dist/sales/coupon/control/CouponFormControl.js +0 -21
  94. package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
  95. package/dist/setting/admin/PaymentFeeForm.js +1 -16
  96. package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
  97. package/dist/setting/dashboard/DashboardSettingForm.js +1 -4
  98. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  99. package/dist/snippet/snippet-template/preview/Preview.js +0 -6
  100. package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
  101. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  102. package/dist/sortable-tree/SortableTreeItem.js +4 -10
  103. package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
  104. package/dist/static/CurrencyNumberInput.js +0 -3
  105. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  106. package/dist/static/form-number-input/FormNumberInput.js +0 -3
  107. package/dist/static/number-input/NumberInput.d.ts.map +1 -1
  108. package/dist/static/number-input/NumberInput.js +0 -3
  109. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +0 -9
  110. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  111. package/dist/styles/product-set/ProductSetForm.scss +0 -22
  112. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +0 -25
  113. package/dist/styles/sales/BookingResults.scss +1 -1
  114. package/dist/typeahead/Typeahead.d.ts +1 -5
  115. package/dist/typeahead/Typeahead.d.ts.map +1 -1
  116. package/dist/typeahead/Typeahead.js +2 -9
  117. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
  118. package/dist/zone/form/components/GameDurationControl.js +0 -3
  119. package/dist/zone/form/components/SortControl.d.ts.map +1 -1
  120. package/dist/zone/form/components/SortControl.js +0 -3
  121. package/package.json +6 -8
  122. package/src/affiliate/form/AffiliateForm.tsx +0 -1
  123. package/src/auth/Login/LoginComponent.tsx +1 -1
  124. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +0 -3
  125. package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +85 -88
  126. package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +1 -11
  127. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
  128. package/src/events/event-card/utils.ts +1 -5
  129. package/src/iframe/activity-card/ActivityCard.tsx +0 -6
  130. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +0 -9
  131. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +0 -1
  132. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
  133. package/src/iframe/ryft/RyftPaymentForm.tsx +4 -9
  134. package/src/iframe/ryft/utils/ryft-form.ts +2 -28
  135. package/src/layout/DropDown.tsx +1 -1
  136. package/src/modals/confirmation/ConfirmModal.tsx +3 -19
  137. package/src/notification/email-template/control/EmailTemplateControl.tsx +0 -1
  138. package/src/product-set/card/ProductSetCard.tsx +6 -32
  139. package/src/product-set/control/DateAndRecurrenceInput.tsx +1 -3
  140. package/src/product-set/control/DateInput.tsx +1 -2
  141. package/src/product-set/form/ProductCategoriesControl.tsx +1 -37
  142. package/src/product-set/form/ProductSetForm.tsx +2 -24
  143. package/src/product-set/form/ProductZonesControl.tsx +4 -1
  144. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  145. package/src/product-set/form/SubProductsControl.tsx +3 -0
  146. package/src/product-set/form/VenueMapsControl.tsx +3 -0
  147. package/src/product-set/form/index.ts +0 -1
  148. package/src/product-set/product/ProductControl.tsx +1 -0
  149. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
  150. package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +0 -2
  151. package/src/product-set/product/deposit/ProductDepositControl.tsx +0 -1
  152. package/src/product-set/product/duration/ProductDurationControl.tsx +0 -2
  153. package/src/product-set/product/price/ProductPriceControl.tsx +0 -1
  154. package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +0 -2
  155. package/src/product-set/product/quantity/ProductQuantityControl.tsx +0 -2
  156. package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +0 -1
  157. package/src/product-set/product-category/ProductCategoryControl.tsx +0 -4
  158. package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
  159. package/src/product-set/utils/index.ts +0 -11
  160. package/src/recurrence-input/RecurrenceEndInput.tsx +0 -1
  161. package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +0 -1
  162. package/src/resource/form/components/CapacityControl.tsx +0 -1
  163. package/src/resource/form/components/SortControl.tsx +0 -1
  164. package/src/sales/booking/results/components/ResultCard.tsx +2 -0
  165. package/src/sales/coupon/control/CouponFormControl.tsx +0 -7
  166. package/src/setting/admin/PaymentFeeForm.tsx +0 -5
  167. package/src/setting/dashboard/DashboardSettingForm.tsx +0 -1
  168. package/src/snippet/snippet-template/preview/Preview.tsx +0 -6
  169. package/src/sortable-tree/SortableTreeItem.tsx +0 -6
  170. package/src/static/CurrencyNumberInput.tsx +0 -1
  171. package/src/static/form-number-input/FormNumberInput.tsx +0 -1
  172. package/src/static/number-input/NumberInput.tsx +0 -1
  173. package/src/styles/availability-indicator/AvailabilityIndicator.scss +0 -9
  174. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  175. package/src/styles/product-set/ProductSetForm.scss +0 -22
  176. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +0 -25
  177. package/src/styles/sales/BookingResults.scss +1 -1
  178. package/src/typeahead/Typeahead.tsx +1 -15
  179. package/src/zone/form/components/GameDurationControl.tsx +0 -1
  180. package/src/zone/form/components/SortControl.tsx +0 -1
  181. package/yarn.lock +25 -25
  182. package/dist/product-set/form/ProductSetNameControl.d.ts +0 -6
  183. package/dist/product-set/form/ProductSetNameControl.d.ts.map +0 -1
  184. package/dist/product-set/form/ProductSetNameControl.js +0 -35
  185. package/src/product-set/form/ProductSetNameControl.tsx +0 -27
@@ -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.69.3-dev.7",
3
+ "version": "0.69.4",
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.0-dev.0",
45
+ "@licklist/core": "0.30.3",
46
46
  "@licklist/eslint-config": "0.5.6",
47
- "@licklist/plugins": "0.33.2-dev.1",
47
+ "@licklist/plugins": "0.33.1",
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.0-dev.0",
64
+ "@licklist/core": "0.30.3",
65
65
  "@licklist/eslint-config": "0.5.6",
66
- "@licklist/plugins": "0.33.0-dev.0",
66
+ "@licklist/plugins": "0.33.1",
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"
208
+ }
211
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)}>
@@ -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
 
@@ -64,7 +64,6 @@ export interface EditEventFormProps extends HasPermissionProp {
64
64
  isExternalPaymentLinkEnabled?: boolean
65
65
  timeZone: string
66
66
  eventProductSet?: ProductSet
67
- overrideNameError?: string
68
67
  }
69
68
 
70
69
  const eventImageTypes = {
@@ -86,7 +85,6 @@ export const EditEventForm = ({
86
85
  isExternalPaymentLinkEnabled,
87
86
  timeZone,
88
87
  eventProductSet,
89
- overrideNameError,
90
88
  }: EditEventFormProps) => {
91
89
  const { t } = useTranslation(['Design', 'Validation'])
92
90
 
@@ -408,7 +406,6 @@ export const EditEventForm = ({
408
406
  showEditProductSet={showEditProductSet}
409
407
  timeZone={timeZone}
410
408
  eventProductSet={eventProductSet}
411
- overrideNameError={overrideNameError}
412
409
  />
413
410
 
414
411
  {hasPermission && !showEditProductSet && (
@@ -5,12 +5,9 @@ import { useId } from '@react-aria/utils'
5
5
  import { Controller, useFormContext } from 'react-hook-form'
6
6
  import { HasPermissionProp } from '@licklist/plugins/dist/types/permission/Permission'
7
7
  import { ProductSet } from '@licklist/core/dist/DataMapper/Product/ProductSetDataMapper'
8
- import { uniqBy } from 'lodash'
9
- import { getTypeHeadItemsFromMenus } from '../../../../product-set/utils'
10
8
  import { ConfirmModal } from '../../../../modals/confirmation/ConfirmModal'
11
9
  import { EditEventFormValues } from '../EditEventForm/EditEventForm'
12
10
  import { EditEventProductSet } from './component/EditEventProductSet'
13
- import { Typeahead } from '../../../../typeahead'
14
11
 
15
12
  interface SelectEventProductSetProps extends HasPermissionProp {
16
13
  productSets?: ProductSet[]
@@ -20,7 +17,6 @@ interface SelectEventProductSetProps extends HasPermissionProp {
20
17
  setEditProductSetId: (value: string) => void
21
18
  timeZone: string
22
19
  eventProductSet?: ProductSet
23
- overrideNameError?: string
24
20
  }
25
21
 
26
22
  export const SelectEventProductSet = ({
@@ -31,7 +27,6 @@ export const SelectEventProductSet = ({
31
27
  setShowEditProductSet,
32
28
  timeZone,
33
29
  eventProductSet,
34
- overrideNameError,
35
30
  }: SelectEventProductSetProps) => {
36
31
  const productSets = eventProductSet
37
32
  ? [..._productSets, eventProductSet]
@@ -53,22 +48,6 @@ export const SelectEventProductSet = ({
53
48
  const productSetId = watch('productSetId')
54
49
  const editedProductSet = watch('editedProductSet')
55
50
 
56
- const typeheadValues = uniqBy(
57
- getTypeHeadItemsFromMenus(
58
- editedProductSet
59
- ? productSets.map((productSet) =>
60
- productSet.id === editedProductSet.id
61
- ? editedProductSet
62
- : productSet,
63
- )
64
- : productSets,
65
- ),
66
- (item) => item.id,
67
- )
68
- const selectedProductSetTypeheadValue = productSetId
69
- ? typeheadValues?.find((typeheadValue) => typeheadValue.id === productSetId)
70
- : undefined
71
-
72
51
  const onEditProductSet = useCallback(
73
52
  () => {
74
53
  setEditProductSetId(String(productSetId))
@@ -122,7 +101,6 @@ export const SelectEventProductSet = ({
122
101
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
123
102
  const onSubmit = (value: EditEventFormValues['editedProductSet']) => {
124
103
  setShowEditProductSet(false)
125
- setValue('productSetId', value.id)
126
104
  setValue('editedProductSet', value)
127
105
  }
128
106
 
@@ -138,73 +116,93 @@ export const SelectEventProductSet = ({
138
116
  <Controller
139
117
  control={control}
140
118
  name='productSetId'
141
- render={() => (
142
- <>
143
- <div className='d-flex align-items-center flex-row w-100'>
144
- <ConfirmModal>
145
- {(confirm) => (
146
- <Typeahead
147
- name='productSetId'
148
- value={selectedProductSetTypeheadValue}
149
- containerStyles={{ width: '100%' }}
150
- onChangeValue={(typeheadValue) => {
151
- onChangeProductSet(Number(typeheadValue.id), confirm)
152
- }}
153
- isInvalid={!!overrideNameError}
154
- options={typeheadValues}
155
- placeholder={t('Design:choose')}
156
- noOptionsMessage={t('Design:noAvailableProductSets')}
157
- />
158
- )}
159
- </ConfirmModal>
160
-
161
- <div className='buttons-container'>
162
- {!showEditProductSet && !editedProductSet && (
163
- <Button
164
- variant=''
165
- className='btn product-set-button mr-4'
166
- onClick={handleCreateProductSet}
167
- >
168
- {t('addNewProductSet')}
169
- </Button>
170
- )}
171
- {showOverrideProductSet && (
172
- <Button
173
- variant=''
174
- className='btn product-set-button'
175
- onClick={onEditProductSet}
176
- >
177
- {isOverrideProductSet
178
- ? t('editOverrides')
179
- : t('editProductSet')}
180
- </Button>
181
- )}
182
- {showEditProductSet && (
183
- <Button
184
- variant=''
185
- className='btn product-set-button'
186
- onClick={revertEditProductSet}
187
- >
188
- {t('cancelAndRevert')}
189
- </Button>
190
- )}
191
- {!showEditProductSet && editedProductSet && (
192
- <Button
193
- variant=''
194
- className='btn product-set-button ml-4 text-danger'
195
- onClick={revertEditProductSet}
196
- >
197
- {t('undoChanges')}
198
- </Button>
199
- )}
119
+ render={({ field }) => {
120
+ const fieldValue = String(field.value)
121
+ return (
122
+ <>
123
+ <div className='d-flex align-items-center flex-row w-100'>
124
+ <ConfirmModal>
125
+ {(confirm) => (
126
+ <Form.Control
127
+ as='select'
128
+ onChange={(e) =>
129
+ onChangeProductSet(Number(e.target.value), confirm)
130
+ }
131
+ isInvalid={Boolean(errors.productSetId)}
132
+ value={fieldValue}
133
+ >
134
+ <option value='' hidden>
135
+ {t('Design:chooseProductSet')}
136
+ </option>
137
+ {productSets?.map((productSet) => {
138
+ const isCurrentEditedProductSet =
139
+ editedProductSet &&
140
+ editedProductSet?.id === productSet?.id
141
+ return (
142
+ <option key={productSet.id} value={productSet.id}>
143
+ {isCurrentEditedProductSet ||
144
+ productSet.isOverride
145
+ ? `[${t('edited')}] ${
146
+ isCurrentEditedProductSet
147
+ ? editedProductSet?.name
148
+ : productSet.name
149
+ }`
150
+ : productSet.name}
151
+ </option>
152
+ )
153
+ })}
154
+ </Form.Control>
155
+ )}
156
+ </ConfirmModal>
157
+
158
+ <div className='buttons-container'>
159
+ {!showEditProductSet && !editedProductSet && (
160
+ <Button
161
+ variant=''
162
+ className='btn product-set-button mr-4'
163
+ onClick={handleCreateProductSet}
164
+ >
165
+ {t('addNewProductSet')}
166
+ </Button>
167
+ )}
168
+ {showOverrideProductSet && (
169
+ <Button
170
+ variant=''
171
+ className='btn product-set-button'
172
+ onClick={onEditProductSet}
173
+ >
174
+ {isOverrideProductSet
175
+ ? t('editOverrides')
176
+ : t('editProductSet')}
177
+ </Button>
178
+ )}
179
+ {showEditProductSet && (
180
+ <Button
181
+ variant=''
182
+ className='btn product-set-button'
183
+ onClick={revertEditProductSet}
184
+ >
185
+ {t('cancelAndRevert')}
186
+ </Button>
187
+ )}
188
+ {!showEditProductSet && editedProductSet && (
189
+ <Button
190
+ variant=''
191
+ className='btn product-set-button ml-4 text-danger'
192
+ onClick={revertEditProductSet}
193
+ >
194
+ {t('undoChanges')}
195
+ </Button>
196
+ )}
197
+ </div>
200
198
  </div>
201
- </div>
202
199
 
203
- <div className='manual-form-error'>
204
- {errors?.productSetId?.message || overrideNameError}
205
- </div>
206
- </>
207
- )}
200
+ <Form.Control.Feedback type='invalid'>
201
+ {errors?.productSetId?.message}
202
+ </Form.Control.Feedback>
203
+ </>
204
+ )
205
+ }}
208
206
  />
209
207
  </Form.Group>
210
208
  </div>
@@ -215,7 +213,6 @@ export const SelectEventProductSet = ({
215
213
  productSetId === editedProductSet?.id && editedProductSet
216
214
  }
217
215
  timeZone={timeZone}
218
- overrideNameError={overrideNameError}
219
216
  />
220
217
  )}
221
218
  </>
@@ -23,14 +23,12 @@ interface EditEventProductSetProps {
23
23
  onSubmit: (value: EditEventFormValues['editedProductSet']) => void
24
24
  defaultValues?: EditEventFormValues['editedProductSet']
25
25
  timeZone: string
26
- overrideNameError?: string
27
26
  }
28
27
 
29
28
  export const EditEventProductSet = ({
30
29
  onSubmit,
31
30
  defaultValues,
32
31
  timeZone,
33
- overrideNameError,
34
32
  }: EditEventProductSetProps) => {
35
33
  const { companyId } = useParams<{
36
34
  companyId: string
@@ -66,15 +64,7 @@ export const EditEventProductSet = ({
66
64
  mode: 'onChange',
67
65
  })
68
66
 
69
- const { reset, handleSubmit, watch, setError } = form
70
-
71
- useEffect(() => {
72
- if (!overrideNameError) {
73
- return
74
- }
75
- setError('name', { message: overrideNameError })
76
- // eslint-disable-next-line react-hooks/exhaustive-deps
77
- }, [overrideNameError])
67
+ const { reset, handleSubmit, watch } = form
78
68
 
79
69
  const formValues = watch()
80
70
 
@@ -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,
@@ -21,14 +21,10 @@ export const formatContentWithoutTags = (
21
21
  .replace(/\s\s+/g, ' ')
22
22
 
23
23
  const words = trimmedText.slice(0, maxLength).split(' ')
24
- const contentWithMinLength = content.slice(0, MIN_EVENT_DESCRIPTION_SIZE)
25
24
  const index = String(content).indexOf(words[words.length - 2])
26
- const slicedContent = content.slice(0, index)
27
- const contentWithMinSize = contentWithMinLength.length > slicedContent.length ? contentWithMinLength : slicedContent
28
- return contentWithMinSize.concat('...')
25
+ return content.slice(0, index).concat('...')
29
26
  }
30
27
 
31
- export const MIN_EVENT_DESCRIPTION_SIZE = 150
32
28
  export const EVENT_DESCRIPTION_SIZE = 350
33
29
 
34
30
  /**
@@ -1,8 +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 { AvailabilityIndicator } from '../../availability-indicator'
6
4
 
7
5
  export const LAYOUT_GRID = 'grid'
8
6
  export const LAYOUT_LIST = 'list'
@@ -17,7 +15,6 @@ export type ActivityCardProps = {
17
15
  layout?: typeof LAYOUT_GRID | typeof LAYOUT_LIST
18
16
  availableTimes?: string | null
19
17
  image?: Image | null
20
- resources?: ZoneResourcesAvailability
21
18
  }
22
19
 
23
20
  export const ActivityCard = ({
@@ -30,7 +27,6 @@ export const ActivityCard = ({
30
27
  onSelect,
31
28
  isSelected,
32
29
  layout = LAYOUT_GRID,
33
- resources,
34
30
  }: ActivityCardProps) => {
35
31
  if (layout === LAYOUT_GRID) {
36
32
  return (
@@ -50,7 +46,6 @@ export const ActivityCard = ({
50
46
  {description && (
51
47
  <div className='mt-2 activity-card-description'>{description}</div>
52
48
  )}
53
- {resources && <AvailabilityIndicator resources={resources} />}
54
49
  </div>
55
50
  </button>
56
51
  )
@@ -76,7 +71,6 @@ export const ActivityCard = ({
76
71
  {description && (
77
72
  <div className='mt-2 activity-card-description'>{description}</div>
78
73
  )}
79
- {resources && <AvailabilityIndicator resources={resources} />}
80
74
  </div>
81
75
 
82
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
  }`}
@@ -51,7 +51,6 @@ export const ProductQuantityInput = ({
51
51
  hasDeposit: category.allowDeposits && product?.deposit < product.price,
52
52
  price: product.price,
53
53
  productCategoryId: category.id,
54
- zoneId: category.zone?.id,
55
54
  quantity,
56
55
  capacity: product?.capacity,
57
56
  })
@@ -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,
@@ -38,7 +38,7 @@ export interface RyftPaymentFormProps {
38
38
  isCreateLoading: boolean
39
39
  isAppUsingInIframe?: boolean
40
40
  onApplePayButtonClick?: () => void
41
- payButtonDisabled?: boolean
41
+ applePayButtonDisabled?: boolean
42
42
  initRyft: (
43
43
  onSuccess: () => void,
44
44
  onFailure: (error?: string) => void,
@@ -57,7 +57,6 @@ export const RyftPaymentForm = ({
57
57
  initRyft,
58
58
  resetReferrer,
59
59
  onSubmit,
60
- payButtonDisabled,
61
60
  }: RyftPaymentFormProps) => {
62
61
  const { t } = useTranslation(['Design', 'Validation', 'Ryft'])
63
62
  const formRef = useRef<HTMLFormElement | null>(null)
@@ -90,6 +89,7 @@ export const RyftPaymentForm = ({
90
89
 
91
90
  const handleSubmit = async () => {
92
91
  setIsBtnDisabled(true)
92
+
93
93
  try {
94
94
  const paymentSession = await onSubmit()
95
95
 
@@ -142,21 +142,17 @@ export const RyftPaymentForm = ({
142
142
  t,
143
143
  isAppUsingInIframe,
144
144
  onApplePayButtonClick,
145
- isDisableButton: !payButtonDisabled,
146
145
  additionalPaymentMethodsEnabled:
147
146
  providerPaymentSettings?.additionalPaymentMethodsEnabled,
148
147
  })
149
148
  },
150
149
  // eslint-disable-next-line react-hooks/exhaustive-deps
151
- [
152
- formRef.current?.childNodes?.length,
153
- showApplePayButton,
154
- payButtonDisabled,
155
- ],
150
+ [formRef.current?.childNodes?.length, showApplePayButton],
156
151
  )
157
152
 
158
153
  useEffect(() => {
159
154
  if (!accountId.data?.account_id || accountId.isError) return
155
+
160
156
  initRyft(
161
157
  () => {
162
158
  addEventHandler('cardValidationChanged', (e: MessageEvent['data']) => {
@@ -219,7 +215,6 @@ export const RyftPaymentForm = ({
219
215
  onSubmit={methods.handleSubmit(handleSubmit)}
220
216
  className='ryft-payment-form'
221
217
  >
222
- <div className='form-disable-box' id='form-disable-box' />
223
218
  <div className='submit-button-wrapper mt-4 p-1'>
224
219
  <Button type='submit' disabled={isBtnDisabled || !isValid}>
225
220
  {isBtnDisabled && <ButtonLoader />}
@@ -7,7 +7,6 @@ interface InjectComponentsInRyftForm
7
7
  'onApplePayButtonClick' | 'isAppUsingInIframe'
8
8
  > {
9
9
  t: TFunction<string[]>
10
- isDisableButton?: boolean
11
10
  additionalPaymentMethodsEnabled?: boolean
12
11
  }
13
12
 
@@ -15,19 +14,16 @@ export const injectComponentsInRyftForm = ({
15
14
  t,
16
15
  additionalPaymentMethodsEnabled,
17
16
  isAppUsingInIframe,
18
- isDisableButton,
19
17
  onApplePayButtonClick,
20
18
  }: InjectComponentsInRyftForm) => {
21
19
  const cardContainer = document.getElementById('ryft-pay-iframe')
20
+
22
21
  if (!cardContainer) {
23
22
  return
24
23
  }
25
24
  // Removing of the old title container
26
25
  document.getElementById('card-title-container')?.remove()
27
26
 
28
- cardContainer.style.opacity = isDisableButton ? '0.6' : '1'
29
- cardContainer.ariaDisabled = isDisableButton?.toString()
30
-
31
27
  const cardTitle = document.createElement('div')
32
28
  const cardText = document.createElement('div')
33
29
  const cardTitleContainer = document.createElement('div')
@@ -39,6 +35,7 @@ export const injectComponentsInRyftForm = ({
39
35
  cardContainer?.before(cardTitleContainer)
40
36
 
41
37
  const payGrid = document.getElementById('ryft-pay-grid')
38
+
42
39
  if (!payGrid || !additionalPaymentMethodsEnabled) {
43
40
  return
44
41
  }
@@ -61,29 +58,6 @@ export const injectComponentsInRyftForm = ({
61
58
  divider.id = 'mobile-pay-divider'
62
59
  container.id = 'mobile-pay-divider-container'
63
60
  container.append(dividerText, divider)
64
- const payIframe = document.getElementById('ryft-pay-iframe')
65
- if (payIframe) {
66
- const formBox = document.getElementById('form-disable-box')
67
- if (formBox) {
68
- formBox.style.display = isDisableButton ? 'block' : 'none'
69
- }
70
-
71
- const googleButton = document.getElementById(
72
- 'gpay-button-online-api-id',
73
- ) as HTMLButtonElement
74
- const appleButton = document.getElementById(
75
- 'ryft-pay-apple-pay-button',
76
- ) as HTMLButtonElement
77
- if (googleButton) {
78
- googleButton.disabled = isDisableButton
79
- googleButton.style.opacity = isDisableButton ? '1' : '0.6'
80
- }
81
- if (appleButton) {
82
- appleButton.disabled = isDisableButton
83
- appleButton.style.opacity = isDisableButton ? '1' : '0.6'
84
- }
85
- }
86
-
87
61
  if (isAppUsingInIframe) {
88
62
  const applePayButton = document.createElement('button')
89
63
  applePayButton.id = 'apple-pay'
@@ -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[]
@@ -20,9 +20,6 @@ export type ConfirmModalTypes =
20
20
  export interface ConfirmModalProps {
21
21
  type?: ConfirmModalTypes
22
22
  children?: (confirm: (action: ConfirmAction) => void) => ReactNode
23
- // confirm function memoize the callback function. It's an alternative function
24
- confirmationHandler?: () => Promise<boolean | undefined>
25
- disabledButtons?: boolean
26
23
  title?: string
27
24
  content?: string | ReactNode
28
25
  onClose?: () => void
@@ -40,9 +37,7 @@ export function ConfirmModal({
40
37
  type = 'default',
41
38
  children,
42
39
  onClose,
43
- confirmationHandler,
44
40
  title,
45
- disabledButtons,
46
41
  content,
47
42
  hideButtons = false,
48
43
  }: ConfirmModalProps) {
@@ -57,16 +52,10 @@ export function ConfirmModal({
57
52
  setIsOpen(() => true)
58
53
  }
59
54
 
60
- const handleConfirmation = async (e) => {
55
+ const handleConfirmation = (e) => {
61
56
  e.stopPropagation()
62
- if (!actionRef.current && !confirmationHandler) return
63
- if (confirmationHandler) {
64
- const res = await confirmationHandler()
65
- if (res) {
66
- setIsOpen(() => false)
67
- }
68
- return
69
- }
57
+ if (!actionRef.current) return
58
+
70
59
  actionRef.current()
71
60
  setIsOpen(() => false)
72
61
  }
@@ -99,7 +88,6 @@ export function ConfirmModal({
99
88
  <Button
100
89
  variant='danger'
101
90
  className='btn-sm rounded'
102
- disabled={disabledButtons}
103
91
  onClick={handleClose}
104
92
  data-id={CONFIRM_MODAL_ACTION_DECLINE}
105
93
  >
@@ -117,14 +105,12 @@ export function ConfirmModal({
117
105
  variant='outline'
118
106
  className='cancel-button'
119
107
  onClick={handleClose}
120
- disabled={disabledButtons}
121
108
  data-id={CONFIRM_MODAL_ACTION_DECLINE}
122
109
  >
123
110
  {t('cancel')}
124
111
  </Button>
125
112
  <Button
126
113
  variant='danger'
127
- disabled={disabledButtons}
128
114
  onClick={handleConfirmation}
129
115
  data-id={CONFIRM_MODAL_ACTION_CONFIRM}
130
116
  >
@@ -135,7 +121,6 @@ export function ConfirmModal({
135
121
  <>
136
122
  <Button
137
123
  variant='danger'
138
- disabled={disabledButtons}
139
124
  onClick={handleClose}
140
125
  data-id={CONFIRM_MODAL_ACTION_DECLINE}
141
126
  >
@@ -143,7 +128,6 @@ export function ConfirmModal({
143
128
  </Button>
144
129
  <Button
145
130
  variant='success'
146
- disabled={disabledButtons}
147
131
  onClick={handleConfirmation}
148
132
  data-id={CONFIRM_MODAL_ACTION_CONFIRM}
149
133
  >