@licklist/design 0.71.5-dev.8 → 0.71.5

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 (174) 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/SaleDeadline/SaleDeadline.d.ts +1 -7
  4. package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
  5. package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.js +7 -10
  6. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -4
  7. package/dist/events/edit-event-modal/hooks/useValidationOptions.d.ts +1 -0
  8. package/dist/events/edit-event-modal/hooks/useValidationOptions.d.ts.map +1 -1
  9. package/dist/events/edit-event-modal/hooks/useValidationOptions.js +6 -1
  10. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
  11. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
  12. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.js +0 -1
  13. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +1 -2
  14. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
  15. package/dist/events/event-statistic-modal/EventStatisticModal.js +2 -2
  16. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +1 -1
  17. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
  18. package/dist/events/event-statistic-modal/hooks/useTableData.js +4 -5
  19. package/dist/events/event-statistic-modal/utils/index.d.ts +1 -1
  20. package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
  21. package/dist/events/event-statistic-modal/utils/index.js +13 -34
  22. package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
  23. package/dist/events/event-venue-map/EventVenueMap.js +0 -1
  24. package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
  25. package/dist/events/event-venue-map/hooks/useCanvasSize.js +4 -11
  26. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
  27. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +0 -13
  28. package/dist/iframe/page/components/PageBody/constants.d.ts +0 -1
  29. package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
  30. package/dist/iframe/page/components/PageBody/constants.js +1 -2
  31. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
  32. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -6
  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 -4
  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/control/ProductSetControl.d.ts +0 -2
  43. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  44. package/dist/product-set/control/ProductSetControl.js +0 -5
  45. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  46. package/dist/product-set/form/ProductCategoriesControl.js +2 -49
  47. package/dist/product-set/form/ProductSetForm.d.ts +2 -6
  48. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  49. package/dist/product-set/form/ProductSetForm.js +2 -3
  50. package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
  51. package/dist/product-set/form/ProductZonesControl.js +2 -0
  52. package/dist/product-set/form/ProductsControl.js +0 -2
  53. package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
  54. package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
  55. package/dist/product-set/form/SelectCategoryModal.js +1 -1
  56. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  57. package/dist/product-set/form/SubProductsControl.js +3 -0
  58. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  59. package/dist/product-set/form/VenueMapsControl.js +3 -0
  60. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  61. package/dist/product-set/product/advanced-options/AdvancedOptions.js +0 -1
  62. package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
  63. package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +0 -6
  64. package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
  65. package/dist/product-set/product/deposit/ProductDepositControl.js +0 -3
  66. package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
  67. package/dist/product-set/product/duration/ProductDurationControl.js +0 -6
  68. package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
  69. package/dist/product-set/product/price/ProductPriceControl.js +0 -3
  70. package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
  71. package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +0 -6
  72. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  73. package/dist/product-set/product/quantity/ProductQuantityControl.js +0 -6
  74. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
  75. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +1 -4
  76. package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
  77. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  78. package/dist/product-set/product-category/ProductCategoryControl.js +1 -19
  79. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  80. package/dist/recurrence-input/RecurrenceEndInput.js +0 -3
  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 +0 -3
  84. package/dist/resource/form/components/SortControl.d.ts.map +1 -1
  85. package/dist/resource/form/components/SortControl.js +0 -3
  86. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  87. package/dist/sales/booking/results/components/ResultCard.js +2 -0
  88. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  89. package/dist/sales/coupon/control/CouponFormControl.js +0 -21
  90. package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
  91. package/dist/setting/admin/PaymentFeeForm.js +1 -16
  92. package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
  93. package/dist/setting/dashboard/DashboardSettingForm.js +1 -4
  94. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  95. package/dist/snippet/snippet-template/preview/Preview.js +0 -7
  96. package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
  97. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  98. package/dist/sortable-tree/SortableTreeItem.js +4 -10
  99. package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
  100. package/dist/static/CurrencyNumberInput.js +0 -3
  101. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  102. package/dist/static/form-number-input/FormNumberInput.js +0 -3
  103. package/dist/static/number-input/NumberInput.d.ts.map +1 -1
  104. package/dist/static/number-input/NumberInput.js +0 -3
  105. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +1 -1
  106. package/dist/styles/iframe-events/Calendar.scss +1 -1
  107. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  108. package/dist/styles/product-set/ProductSetForm.scss +0 -22
  109. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +3 -1
  110. package/dist/styles/sales/BookingResults.scss +1 -1
  111. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
  112. package/dist/zone/form/components/GameDurationControl.js +0 -3
  113. package/dist/zone/form/components/SortControl.d.ts.map +1 -1
  114. package/dist/zone/form/components/SortControl.js +0 -3
  115. package/package.json +7 -9
  116. package/src/affiliate/form/AffiliateForm.tsx +0 -1
  117. package/src/auth/Login/LoginComponent.tsx +1 -1
  118. package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +16 -42
  119. package/src/events/edit-event-modal/hooks/useValidationOptions.tsx +5 -0
  120. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -1
  121. package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +1 -6
  122. package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -3
  123. package/src/events/event-statistic-modal/hooks/useTableData.tsx +3 -5
  124. package/src/events/event-statistic-modal/utils/index.ts +32 -68
  125. package/src/events/event-venue-map/EventVenueMap.tsx +0 -1
  126. package/src/events/event-venue-map/hooks/useCanvasSize.ts +1 -5
  127. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +0 -9
  128. package/src/iframe/page/components/PageBody/constants.ts +0 -1
  129. package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +2 -11
  130. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
  131. package/src/iframe/ryft/RyftPaymentForm.tsx +8 -10
  132. package/src/iframe/ryft/utils/ryft-form.ts +5 -6
  133. package/src/layout/DropDown.tsx +1 -1
  134. package/src/notification/email-template/control/EmailTemplateControl.tsx +0 -1
  135. package/src/product-set/control/ProductSetControl.tsx +0 -5
  136. package/src/product-set/form/ProductCategoriesControl.tsx +1 -38
  137. package/src/product-set/form/ProductSetForm.tsx +2 -8
  138. package/src/product-set/form/ProductZonesControl.tsx +4 -1
  139. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  140. package/src/product-set/form/SubProductsControl.tsx +3 -0
  141. package/src/product-set/form/VenueMapsControl.tsx +3 -0
  142. package/src/product-set/product/ProductControl.tsx +1 -0
  143. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
  144. package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +0 -2
  145. package/src/product-set/product/deposit/ProductDepositControl.tsx +0 -1
  146. package/src/product-set/product/duration/ProductDurationControl.tsx +0 -2
  147. package/src/product-set/product/price/ProductPriceControl.tsx +0 -1
  148. package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +0 -2
  149. package/src/product-set/product/quantity/ProductQuantityControl.tsx +0 -2
  150. package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +0 -1
  151. package/src/product-set/product-category/ProductCategoryControl.tsx +0 -17
  152. package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
  153. package/src/recurrence-input/RecurrenceEndInput.tsx +0 -1
  154. package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +0 -1
  155. package/src/resource/form/components/CapacityControl.tsx +0 -1
  156. package/src/resource/form/components/SortControl.tsx +0 -1
  157. package/src/sales/booking/results/components/ResultCard.tsx +2 -0
  158. package/src/sales/coupon/control/CouponFormControl.tsx +0 -7
  159. package/src/setting/admin/PaymentFeeForm.tsx +0 -5
  160. package/src/setting/dashboard/DashboardSettingForm.tsx +0 -1
  161. package/src/snippet/snippet-template/preview/Preview.tsx +0 -6
  162. package/src/sortable-tree/SortableTreeItem.tsx +0 -6
  163. package/src/static/CurrencyNumberInput.tsx +0 -1
  164. package/src/static/form-number-input/FormNumberInput.tsx +0 -1
  165. package/src/static/number-input/NumberInput.tsx +0 -1
  166. package/src/styles/availability-indicator/AvailabilityIndicator.scss +1 -1
  167. package/src/styles/iframe-events/Calendar.scss +1 -1
  168. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  169. package/src/styles/product-set/ProductSetForm.scss +0 -22
  170. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +3 -1
  171. package/src/styles/sales/BookingResults.scss +1 -1
  172. package/src/zone/form/components/GameDurationControl.tsx +0 -1
  173. package/src/zone/form/components/SortControl.tsx +0 -1
  174. package/yarn.lock +339 -366
@@ -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.71.5-dev.8",
3
+ "version": "0.71.5",
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.2-dev.2",
45
+ "@licklist/core": "0.32.1",
46
46
  "@licklist/eslint-config": "0.5.6",
47
- "@licklist/plugins": "0.35.0-dev.0",
47
+ "@licklist/plugins": "0.34.0",
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.2-dev.2",
64
+ "@licklist/core": "0.32.0",
65
65
  "@licklist/eslint-config": "0.5.6",
66
- "@licklist/plugins": "0.35.0-dev.0",
66
+ "@licklist/plugins": "0.35.0",
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.71.4-dev.1"
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)}>
@@ -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
 
@@ -9,9 +9,6 @@ import { Switch, NumberInput } from '../../../../static'
9
9
  const SALE_DEADLINE_BEFORE_TYPE = 'before'
10
10
  const SALE_DEADLINE_AFTER_TYPE = 'after'
11
11
 
12
- export const SALE_DEADLINE_NAME_CATEGORY = 'saleDeadlineCategory'
13
- export const SALE_DEADLINE_NAME = 'saleDeadline'
14
-
15
12
  const SALE_DEADLINES_EVENT_START_TYPES = [
16
13
  { type: SALE_DEADLINE_BEFORE_TYPE },
17
14
  { type: SALE_DEADLINE_AFTER_TYPE },
@@ -21,28 +18,11 @@ type DeadlineType =
21
18
  | typeof SALE_DEADLINE_BEFORE_TYPE
22
19
  | typeof SALE_DEADLINE_AFTER_TYPE
23
20
 
24
- export const DEADLINE_NAME = [
25
- SALE_DEADLINE_NAME_CATEGORY,
26
- SALE_DEADLINE_NAME,
27
- ] as const
28
-
29
- export type DeadLineNameType = (typeof DEADLINE_NAME)[number]
30
-
31
21
  type SaleDeadlineType = {
32
22
  saleDeadline: null | number
33
- } | {
34
- [key: string] : null | number
35
23
  }
36
24
 
37
- export const SaleDeadline = ({
38
- disabled = false,
39
- onlyBefore = false,
40
- deadLineCategory,
41
- }: {
42
- disabled?: boolean
43
- onlyBefore?: boolean
44
- deadLineCategory?: string
45
- }) => {
25
+ export const SaleDeadline = ({ disabled = false }: { disabled?: boolean }) => {
46
26
  const { t } = useTranslation(['Design'])
47
27
  const {
48
28
  control,
@@ -52,11 +32,9 @@ export const SaleDeadline = ({
52
32
  const [deadlineType, setDeadlineType] = useState<DeadlineType>(
53
33
  SALE_DEADLINE_BEFORE_TYPE,
54
34
  )
55
-
56
- const saleDeadline = watch(deadLineCategory || SALE_DEADLINE_NAME)
35
+ const saleDeadline = watch('saleDeadline')
57
36
 
58
37
  useEffect(() => {
59
- if (onlyBefore) return
60
38
  if (saleDeadline > 0) {
61
39
  setDeadlineType(SALE_DEADLINE_AFTER_TYPE)
62
40
  }
@@ -67,11 +45,11 @@ export const SaleDeadline = ({
67
45
  <Form.Group className='sales-deadline'>
68
46
  <Form.Label>{t('Design:salesDeadline')}</Form.Label>
69
47
  <Form.Control.Feedback type='invalid'>
70
- {errors.root?.message}
48
+ {errors.saleDeadline?.message}
71
49
  </Form.Control.Feedback>
72
50
  <Controller
73
51
  control={control}
74
- name={deadLineCategory || SALE_DEADLINE_NAME}
52
+ name='saleDeadline'
75
53
  render={({
76
54
  field: { value, onChange },
77
55
  fieldState: { invalid, error },
@@ -133,22 +111,18 @@ export const SaleDeadline = ({
133
111
 
134
112
  return (
135
113
  <>
136
- {!onlyBefore && (
137
- <Form.Group className='d-flex flex-column flex-grow-1 align-items-start'>
138
- <Switch
139
- name='sale-deadline'
140
- options={SALE_DEADLINES_EVENT_START_TYPES.map(
141
- ({ type }) => ({
142
- id: type,
143
- value: t(`Design:${type}`),
144
- }),
145
- )}
146
- value={deadlineType}
147
- onChange={changeValueByType}
148
- disabled={disabled}
149
- />
150
- </Form.Group>
151
- )}
114
+ <Form.Group className='d-flex flex-column flex-grow-1 align-items-start'>
115
+ <Switch
116
+ name='sale-deadline'
117
+ options={SALE_DEADLINES_EVENT_START_TYPES.map(({ type }) => ({
118
+ id: type,
119
+ value: t(`Design:${type}`),
120
+ }))}
121
+ value={deadlineType}
122
+ onChange={changeValueByType}
123
+ disabled={disabled}
124
+ />
125
+ </Form.Group>
152
126
  <div className='d-flex'>
153
127
  <Form.Group className='d-flex flex-column col-4 pl-0'>
154
128
  <Form.Label>{t('Design:saleDays')}</Form.Label>
@@ -12,6 +12,11 @@ export const useValidationOptions = () => {
12
12
  required: t('Validation:fieldRequired', {
13
13
  attribute: t('start'),
14
14
  }) as string,
15
+ // TODO: uncomment when event splitting is implemented
16
+ // and extract into plugins
17
+ validate: (value) =>
18
+ DateTime.fromISO(value).diffNow().toMillis() > 0 ||
19
+ (t('Validation:fieldValidEventStart') as string),
15
20
  },
16
21
 
17
22
  end: {
@@ -20,7 +20,6 @@ export const getDefaultValues = (
20
20
  relyOnPeopleType: productSet?.relyOnPeopleType ?? null,
21
21
  thankYouPageUrl: productSet?.thankYouPageUrl ?? '',
22
22
  fieldSetId: productSet?.fieldSetId,
23
- saleDeadline: productSet?.saleDeadline,
24
23
  emailTemplates:
25
24
  productSet?.mailTemplates && productSet?.mailTemplates?.length > 0
26
25
  ? getFilteredTemplates(productSet?.mailTemplates)
@@ -40,6 +39,7 @@ export const getDefaultValues = (
40
39
  ...product,
41
40
  subProducts: subProducts?.map(({ ...subProducts }) => ({
42
41
  ...subProducts,
42
+ originalProductId: null,
43
43
  productCategoryId: undefined,
44
44
  })),
45
45
  productCategoryId: undefined,
@@ -61,12 +61,7 @@ export const EditRecurrentEventModal = ({
61
61
  <Form onSubmit={handleSubmit(onSubmit)} noValidate>
62
62
  <Modal.Header className='border-0'>
63
63
  <Modal.Title as='h6'>{title}</Modal.Title>
64
- <Button
65
- variant='danger'
66
- className='btn-sm rounded'
67
- disabled={disabled}
68
- onClick={onHide}
69
- >
64
+ <Button variant='danger' className='btn-sm rounded' onClick={onHide}>
70
65
  <FaTimes size={16} />
71
66
  </Button>
72
67
  </Modal.Header>
@@ -12,7 +12,6 @@ export type EventStatisticModalProps = {
12
12
  date?: Event['startAt'] | null
13
13
  eventStatistic?: EventStatistic | null
14
14
  title?: string
15
- eventId?: string
16
15
  }
17
16
 
18
17
  export const EventStatisticModal = ({
@@ -21,11 +20,10 @@ export const EventStatisticModal = ({
21
20
  date,
22
21
  eventStatistic,
23
22
  title,
24
- eventId,
25
23
  }: EventStatisticModalProps) => {
26
24
  const { t } = useTranslation('Design')
27
25
 
28
- const data = useTableData(date, eventStatistic, eventId )
26
+ const data = useTableData(date, eventStatistic)
29
27
  const handleClose = () => {
30
28
  setIsOpen(false)
31
29
  }
@@ -11,7 +11,6 @@ import { StaticTableData } from '../../../table'
11
11
  export const useTableData = (
12
12
  date: Event['startAt'] | null,
13
13
  eventStatistic: EventStatistic | null,
14
- eventId: string
15
14
  ) => {
16
15
  const { t } = useTranslation('Design')
17
16
  const { formatNumber } = useIntl()
@@ -34,7 +33,6 @@ export const useTableData = (
34
33
  const transformStatisticToTableRows = (
35
34
  date: Event['startAt'],
36
35
  statistic: EventStatistic | null,
37
- eventId: string
38
36
  ) => {
39
37
  if (!statistic) {
40
38
  return []
@@ -42,7 +40,7 @@ export const useTableData = (
42
40
 
43
41
  const tableDataRows: StaticTableData[] = []
44
42
 
45
- convertEventStatisticToTableData(date, statistic, eventId).forEach(
43
+ convertEventStatisticToTableData(date, statistic).forEach(
46
44
  ({ name, quantity, total, isBold, isHeader, key }) => {
47
45
  const formattedTotal = !Object.keys(TRANSLATION_KEYS).includes(
48
46
  String(total),
@@ -84,9 +82,9 @@ export const useTableData = (
84
82
  }
85
83
 
86
84
  useEffect(() => {
87
- setTableRows(transformStatisticToTableRows(date, eventStatistic, eventId))
85
+ setTableRows(transformStatisticToTableRows(date, eventStatistic))
88
86
  // eslint-disable-next-line react-hooks/exhaustive-deps
89
- }, [date, eventId, eventStatistic])
87
+ }, [date, eventStatistic])
90
88
 
91
89
  return tableRows
92
90
  }
@@ -1,7 +1,6 @@
1
1
  import { EventStatistic } from '@licklist/core/dist/DataMapper/Provider/EventStatisticDataMapper'
2
2
  import { DateTime } from 'luxon'
3
3
  import { DATE_FORMAT, DATE_TIME_FULL_FORMAT } from '@licklist/core/dist/Config'
4
- import { max } from 'lodash'
5
4
 
6
5
  export const TRANSLATION_KEYS = {
7
6
  shortQuantity: 'shortQuantity',
@@ -25,7 +24,6 @@ type TableDataRecord = {
25
24
  export const convertEventStatisticToTableData = (
26
25
  date: string,
27
26
  eventStatistic: EventStatistic,
28
- eventId: string,
29
27
  ) => {
30
28
  let totalAmount = 0
31
29
  let totalQuantity = 0
@@ -58,19 +56,11 @@ export const convertEventStatisticToTableData = (
58
56
  ? 1
59
57
  : -1,
60
58
  )
61
- .filter((item) => item.eventId === Number(eventId))
62
59
  .forEach(
63
- (
64
- { totalPerCategory, productsSummary = [], categoryName, eventId },
65
- _,
66
- selfCategory,
67
- ) => {
60
+ ({ totalPerCategory, productsSummary = [], categoryName, eventId }) => {
68
61
  let quantity = 0
69
- totalAmount += totalPerCategory || 0
70
62
 
71
- const allProductSummaryAtCategory = selfCategory
72
- .filter((category) => category.categoryName === categoryName)
73
- .flatMap((categorySummary) => categorySummary.productsSummary)
63
+ totalAmount += totalPerCategory || 0
74
64
 
75
65
  if (!summaryMap.has(`${categoryName}`)) {
76
66
  summaryMap.set(`${categoryName}`, {
@@ -83,62 +73,36 @@ export const convertEventStatisticToTableData = (
83
73
  })
84
74
  }
85
75
 
86
- productsSummary?.forEach((productSummary, productIndex) => {
87
- quantity += productSummary.productsSold
88
-
89
- const existingProduct = summaryMap.get(
90
- `${categoryName}.${productSummary.name}`,
91
- ) ?? {
92
- metadata: {
93
- _productsSold: 0,
94
- _total: 0,
95
- },
96
- }
97
-
98
- const overrides = allProductSummaryAtCategory.filter(
99
- (summary) => summary.originalProductId === productSummary.id,
100
- )
101
-
102
- const highestOverrideTotalQuantity = overrides.reduce<number | null>(
103
- (acc, override) => {
104
- if (!override.totalQuantity) return acc
105
-
106
- if (override.totalQuantity > (acc || 0)) {
107
- return override.totalQuantity
108
- }
109
-
110
- return acc
111
- },
112
- null,
113
- )
114
-
115
- const totalQuantity =
116
- (productSummary.totalQuantity || highestOverrideTotalQuantity) &&
117
- max([productSummary.totalQuantity, highestOverrideTotalQuantity])
118
-
119
- summaryMap.set(`${categoryName}.${productSummary.name}`, {
120
- name: productSummary.name,
121
- key: `${eventId}.${categoryName}${productIndex}${productSummary.name}`,
122
- quantity: totalQuantity
123
- ? `${
124
- existingProduct.metadata._productsSold +
125
- productSummary.productsSold
126
- } / ${totalQuantity}`
127
- : String(
128
- existingProduct.metadata._productsSold +
129
- productSummary.productsSold,
130
- ),
131
- total: String(
132
- existingProduct.metadata._total + productSummary.total,
133
- ),
134
- metadata: {
135
- _productsSold:
136
- existingProduct.metadata._productsSold +
137
- productSummary.productsSold,
138
- _total: existingProduct.metadata._total + productSummary.total,
139
- },
140
- })
141
- })
76
+ productsSummary?.forEach(
77
+ ({ productsSold, name, totalQuantity, total }) => {
78
+ quantity += productsSold
79
+
80
+ const existingProduct = summaryMap.get(
81
+ `${categoryName}.${name}`,
82
+ ) ?? {
83
+ metadata: {
84
+ _productsSold: 0,
85
+ _total: 0,
86
+ },
87
+ }
88
+
89
+ summaryMap.set(`${categoryName}.${name}`, {
90
+ name,
91
+ key: `${eventId}.${categoryName}.${name}`,
92
+ quantity: totalQuantity
93
+ ? `${
94
+ existingProduct.metadata._productsSold + productsSold
95
+ } / ${totalQuantity}`
96
+ : String(existingProduct.metadata._productsSold + productsSold),
97
+ total: String(existingProduct.metadata._total + total),
98
+ metadata: {
99
+ _productsSold:
100
+ existingProduct.metadata._productsSold + productsSold,
101
+ _total: existingProduct.metadata._total + total,
102
+ },
103
+ })
104
+ },
105
+ )
142
106
 
143
107
  const prevTotalPerCategory = summaryMap.get(
144
108
  `${categoryName}.${TRANSLATION_KEYS.totalPerCategory}`,
@@ -49,7 +49,6 @@ export const EventVenueMap = forwardRef<VenueMapRef, EventVenueMapProps>(
49
49
  },
50
50
  ref,
51
51
  ) => {
52
- // TODO fix often updating of canvasSizes, which leads to flashing poingts
53
52
  const canvasSizes = useCanvasSize({ width, height })
54
53
 
55
54
  return (
@@ -10,17 +10,13 @@ export const useCanvasSize = ({
10
10
  width: componentWidth,
11
11
  height: componentHeight,
12
12
  }: CanvasSizeProps) => {
13
- // TODO Fix often updating of width and height
14
13
  const { width, height } = useWindowDimensions()
15
14
 
16
- // eslint-disable-next-line react-hooks/exhaustive-deps
17
- const memoizedDimensions = useMemo(() => ({ width, height }), [width])
18
-
19
15
  const memoedComponentParameters = useMemo(() => {
20
16
  if (!componentWidth && !componentHeight) return null
21
17
 
22
18
  return { width: componentWidth, height: componentHeight }
23
19
  }, [componentWidth, componentHeight])
24
20
 
25
- return memoedComponentParameters || memoizedDimensions
21
+ return memoedComponentParameters || { width, height }
26
22
  }
@@ -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
  }`}
@@ -1,5 +1,4 @@
1
1
  export const TAB_WIDTH = 768
2
- export const MOBILE_WIDTH = 480
3
2
  export const RIGHT_BLOCK_RESIZED_EVENT = 'RIGHT_BLOCK_RESIZED_EVENT'
4
3
  // The sum of paddings in PageBody + header for first block
5
4
  export const STANDARD_BODY_PADDING = 48 + 49
@@ -2,7 +2,6 @@ import { useEffect, useMemo, useState, useRef } from 'react'
2
2
  import { useWindowDimensions } from '@licklist/plugins/dist/hooks/Media/useWindowDimensions'
3
3
  import {
4
4
  TAB_WIDTH,
5
- MOBILE_WIDTH,
6
5
  STANDARD_BODY_PADDING,
7
6
  STANDARD_HEADER_FOOTER_SIZE,
8
7
  RIGHT_BLOCK_RESIZED_EVENT,
@@ -61,16 +60,6 @@ export const useResizePageBody = () => {
61
60
  })
62
61
  }
63
62
 
64
- if (width <= MOBILE_WIDTH && Boolean(CALENDAR_WRAPPER_HEIGHT)) {
65
- return {
66
- maxHeight:
67
- height -
68
- STANDARD_BODY_PADDING -
69
- rightBlockHeight -
70
- CALENDAR_WRAPPER_HEIGHT,
71
- }
72
-
73
- }
74
63
  return {
75
64
  maxHeight:
76
65
  height -
@@ -98,6 +87,7 @@ export const useResizePageBody = () => {
98
87
 
99
88
  if (width >= TAB_WIDTH && !isContainerSizeApplied) {
100
89
  isContainerSizeApplied.current = true
90
+
101
91
  setLeftBlockContainerSizes({
102
92
  width: leftBlockContainer.clientWidth,
103
93
  height: leftBlockContainer.clientHeight,
@@ -127,6 +117,7 @@ export const useResizePageBody = () => {
127
117
  ) {
128
118
  minimalMapSize.current = calculatedMinimalMapSize
129
119
  }
120
+
130
121
  return {
131
122
  width: leftBlockContainer.clientWidth,
132
123
  height: minimalMapSize.current,
@@ -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,
@@ -5,14 +5,12 @@ import { useForm } from 'react-hook-form'
5
5
  import Button from 'react-bootstrap/Button'
6
6
  import { useHistory } from 'react-router-dom'
7
7
  import Alert from 'react-bootstrap/Alert'
8
- import {
9
- STATUS_APPROVED,
10
- STATUS_CAPTURED,
11
- STATUS_PENDING_ACTION,
12
- STATUS_PENDING_PAYMENT,
13
- } from '@licklist/core/dist/DataMapper/Order/PaymentSessionOrderDataMapper'
14
8
  import {
15
9
  useRyftPayment,
10
+ RYFT_STATUS_APPROVED,
11
+ RYFT_STATUS_CAPTURED,
12
+ RYFT_STATUS_PENDING_ACTION,
13
+ RYFT_STATUS_PENDING_PAYMENT,
16
14
  AttemptPaymentResponse,
17
15
  } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment'
18
16
  import { ProviderPaymentSettings } from '@licklist/core/dist/DataMapper/Setting/ProviderPaymentSettingsDataMapper'
@@ -107,7 +105,7 @@ export const RyftPaymentForm = ({
107
105
 
108
106
  if ('requiredAction' in paymentSession) {
109
107
  if (
110
- paymentSession.status !== STATUS_PENDING_ACTION ||
108
+ paymentSession.status !== RYFT_STATUS_PENDING_ACTION ||
111
109
  !paymentSession.requiredAction?.url
112
110
  ) {
113
111
  redirectOnFailAttempt(paymentSession)
@@ -119,9 +117,9 @@ export const RyftPaymentForm = ({
119
117
  }
120
118
 
121
119
  if (
122
- paymentSession.status === STATUS_APPROVED ||
123
- paymentSession.status === STATUS_CAPTURED ||
124
- paymentSession.status === STATUS_PENDING_PAYMENT
120
+ paymentSession.status === RYFT_STATUS_APPROVED ||
121
+ paymentSession.status === RYFT_STATUS_CAPTURED ||
122
+ paymentSession.status === RYFT_STATUS_PENDING_PAYMENT
125
123
  ) {
126
124
  redirectOnFailAttempt(paymentSession)
127
125
  return
@@ -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 || ''}
@@ -23,7 +23,6 @@ import { ruleForUrlWithProtocol } from '@licklist/plugins/dist/validation/Rules/
23
23
  import { WorkHour } from '@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper'
24
24
  import { checkIfZoneCategory } from '@licklist/plugins'
25
25
  import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper'
26
- import { SaleDeadline } from 'src/events/edit-event-modal/component/SaleDeadline'
27
26
  import { WarningMessage } from '../../static'
28
27
  import { SelectItem } from '../../types/generic/SelectItem'
29
28
  import {
@@ -67,7 +66,6 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
67
66
  productGroups?: SelectItem[]
68
67
  relyOnPeopleType?: RelyOnPeopleType | null
69
68
  fieldSetId?: number
70
- saleDeadline?: number
71
69
  steps: Step[]
72
70
  emailTemplates?: TemplateItem[]
73
71
  smsTemplates?: TemplateItem[]
@@ -95,7 +93,6 @@ export interface ProductSetControlProps {
95
93
  workHours: WorkHour[] | undefined
96
94
  providerHasBookingManagement?: boolean
97
95
  isOverrides?: boolean
98
- saleDeadline?: number
99
96
  isCreateNewOverrides?: boolean
100
97
  timeZone: string
101
98
  }
@@ -225,8 +222,6 @@ export function ProductSetControl({
225
222
  </>
226
223
  )}
227
224
 
228
- <SaleDeadline disabled={false} onlyBefore />
229
-
230
225
  <div className='divider' />
231
226
 
232
227
  <TutorialGifCard isOverrides={isOverrides} />