@licklist/design 0.71.4-dev.0 → 0.71.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 (139) 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/SelectEventProductSet/component/EditEventProductSet.js +1 -2
  4. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  5. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -0
  6. package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
  7. package/dist/events/event-statistic-modal/utils/index.js +1 -7
  8. package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
  9. package/dist/events/event-venue-map/EventVenueMap.js +0 -1
  10. package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
  11. package/dist/events/event-venue-map/hooks/useCanvasSize.js +4 -11
  12. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
  13. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +0 -13
  14. package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
  15. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
  16. package/dist/iframe/ryft/utils/ryft-form.js +5 -4
  17. package/dist/layout/DropDown.d.ts +1 -2
  18. package/dist/layout/DropDown.d.ts.map +1 -1
  19. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  20. package/dist/notification/email-template/control/EmailTemplateControl.js +0 -3
  21. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  22. package/dist/product-set/form/ProductCategoriesControl.js +2 -48
  23. package/dist/product-set/form/ProductSetForm.d.ts +1 -4
  24. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  25. package/dist/product-set/form/ProductSetForm.js +1 -1
  26. package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
  27. package/dist/product-set/form/ProductZonesControl.js +2 -0
  28. package/dist/product-set/form/ProductsControl.js +0 -1
  29. package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
  30. package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
  31. package/dist/product-set/form/SelectCategoryModal.js +1 -1
  32. package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
  33. package/dist/product-set/form/SubProductsControl.js +3 -0
  34. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  35. package/dist/product-set/form/VenueMapsControl.js +3 -0
  36. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  37. package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
  38. package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +0 -6
  39. package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
  40. package/dist/product-set/product/deposit/ProductDepositControl.js +0 -3
  41. package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
  42. package/dist/product-set/product/duration/ProductDurationControl.js +0 -6
  43. package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
  44. package/dist/product-set/product/price/ProductPriceControl.js +0 -3
  45. package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
  46. package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +0 -6
  47. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  48. package/dist/product-set/product/quantity/ProductQuantityControl.js +0 -6
  49. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
  50. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +1 -4
  51. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  52. package/dist/product-set/product-category/ProductCategoryControl.js +0 -12
  53. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  54. package/dist/recurrence-input/RecurrenceEndInput.js +0 -3
  55. package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
  56. package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
  57. package/dist/resource/form/components/CapacityControl.js +0 -3
  58. package/dist/resource/form/components/SortControl.d.ts.map +1 -1
  59. package/dist/resource/form/components/SortControl.js +0 -3
  60. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  61. package/dist/sales/booking/results/components/ResultCard.js +2 -0
  62. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  63. package/dist/sales/coupon/control/CouponFormControl.js +0 -21
  64. package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
  65. package/dist/setting/admin/PaymentFeeForm.js +1 -16
  66. package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
  67. package/dist/setting/dashboard/DashboardSettingForm.js +1 -4
  68. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  69. package/dist/snippet/snippet-template/preview/Preview.js +0 -6
  70. package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
  71. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  72. package/dist/sortable-tree/SortableTreeItem.js +4 -10
  73. package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
  74. package/dist/static/CurrencyNumberInput.js +0 -3
  75. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  76. package/dist/static/form-number-input/FormNumberInput.js +0 -3
  77. package/dist/static/number-input/NumberInput.d.ts.map +1 -1
  78. package/dist/static/number-input/NumberInput.js +0 -3
  79. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +1 -1
  80. package/dist/styles/iframe-events/Calendar.scss +1 -1
  81. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  82. package/dist/styles/product-set/ProductSetForm.scss +0 -22
  83. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +3 -1
  84. package/dist/styles/sales/BookingResults.scss +1 -1
  85. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
  86. package/dist/zone/form/components/GameDurationControl.js +0 -3
  87. package/dist/zone/form/components/SortControl.d.ts.map +1 -1
  88. package/dist/zone/form/components/SortControl.js +0 -3
  89. package/package.json +5 -6
  90. package/src/affiliate/form/AffiliateForm.tsx +0 -1
  91. package/src/auth/Login/LoginComponent.tsx +1 -1
  92. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
  93. package/src/events/event-statistic-modal/utils/index.ts +1 -11
  94. package/src/events/event-venue-map/EventVenueMap.tsx +0 -1
  95. package/src/events/event-venue-map/hooks/useCanvasSize.ts +1 -5
  96. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +0 -9
  97. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
  98. package/src/iframe/ryft/utils/ryft-form.ts +5 -6
  99. package/src/layout/DropDown.tsx +1 -1
  100. package/src/notification/email-template/control/EmailTemplateControl.tsx +0 -1
  101. package/src/product-set/form/ProductCategoriesControl.tsx +1 -37
  102. package/src/product-set/form/ProductSetForm.tsx +2 -6
  103. package/src/product-set/form/ProductZonesControl.tsx +4 -1
  104. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  105. package/src/product-set/form/SubProductsControl.tsx +3 -0
  106. package/src/product-set/form/VenueMapsControl.tsx +3 -0
  107. package/src/product-set/product/ProductControl.tsx +1 -0
  108. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
  109. package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +0 -2
  110. package/src/product-set/product/deposit/ProductDepositControl.tsx +0 -1
  111. package/src/product-set/product/duration/ProductDurationControl.tsx +0 -2
  112. package/src/product-set/product/price/ProductPriceControl.tsx +0 -1
  113. package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +0 -2
  114. package/src/product-set/product/quantity/ProductQuantityControl.tsx +0 -2
  115. package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +0 -1
  116. package/src/product-set/product-category/ProductCategoryControl.tsx +0 -4
  117. package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
  118. package/src/recurrence-input/RecurrenceEndInput.tsx +0 -1
  119. package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +0 -1
  120. package/src/resource/form/components/CapacityControl.tsx +0 -1
  121. package/src/resource/form/components/SortControl.tsx +0 -1
  122. package/src/sales/booking/results/components/ResultCard.tsx +2 -0
  123. package/src/sales/coupon/control/CouponFormControl.tsx +0 -7
  124. package/src/setting/admin/PaymentFeeForm.tsx +0 -5
  125. package/src/setting/dashboard/DashboardSettingForm.tsx +0 -1
  126. package/src/snippet/snippet-template/preview/Preview.tsx +0 -6
  127. package/src/sortable-tree/SortableTreeItem.tsx +0 -6
  128. package/src/static/CurrencyNumberInput.tsx +0 -1
  129. package/src/static/form-number-input/FormNumberInput.tsx +0 -1
  130. package/src/static/number-input/NumberInput.tsx +0 -1
  131. package/src/styles/availability-indicator/AvailabilityIndicator.scss +1 -1
  132. package/src/styles/iframe-events/Calendar.scss +1 -1
  133. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  134. package/src/styles/product-set/ProductSetForm.scss +0 -22
  135. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +3 -1
  136. package/src/styles/sales/BookingResults.scss +1 -1
  137. package/src/zone/form/components/GameDurationControl.tsx +0 -1
  138. package/src/zone/form/components/SortControl.tsx +0 -1
  139. package/yarn.lock +14 -42
@@ -15,12 +15,10 @@
15
15
  height: 2.5rem;
16
16
  border-width: 2px;
17
17
  padding: 2px;
18
-
19
18
  label,
20
19
  .btn-switch-indicator {
21
20
  border-radius: 0.375rem !important;
22
21
  }
23
-
24
22
  label {
25
23
  height: 2rem;
26
24
  }
@@ -36,7 +34,6 @@
36
34
  margin-top: 1.5rem;
37
35
  margin-bottom: 1.5rem;
38
36
  }
39
-
40
37
  @include media-breakpoint-down(sm) {
41
38
  padding: 1.5rem 1rem;
42
39
  margin-top: 0.5rem;
@@ -62,21 +59,10 @@
62
59
  background-color: #ffdbdb;
63
60
  color: #d52902;
64
61
  }
65
-
66
62
  .category-badge {
67
63
  background-color: #e8f4f6;
68
64
  color: #1a93aa;
69
65
  }
70
-
71
- .item-icon {
72
- display: flex;
73
- justify-items: center;
74
- align-items: center;
75
- font-size: 0.65rem;
76
- padding: 0.2rem;
77
- margin-right: 1rem;
78
- }
79
-
80
66
  .product-badge {
81
67
  background-color: #e9f5ea;
82
68
  color: #269b36;
@@ -89,12 +75,10 @@
89
75
 
90
76
  .product-set-mobile-modal {
91
77
  margin: 0;
92
-
93
78
  .modal-content {
94
79
  border-radius: 1rem 1rem 0 0;
95
80
  border-width: 0;
96
81
  margin: 0;
97
-
98
82
  .modal-body {
99
83
  padding: 1rem 0;
100
84
  }
@@ -116,22 +100,18 @@
116
100
  font-weight: 600;
117
101
  font-size: 0.625rem;
118
102
  }
119
-
120
103
  .product-set-subtitle-dot {
121
104
  margin-right: 0.375rem;
122
105
  width: 0.375rem;
123
106
  height: 0.375rem;
124
107
  border-radius: 3px;
125
108
  }
126
-
127
109
  .product-set-subtitle-category-dot {
128
110
  background-color: #269b36;
129
111
  }
130
-
131
112
  .product-set-subtitle-step-dot {
132
113
  background-color: #1a93aa;
133
114
  }
134
-
135
115
  .product-set-subtitle-product-dot {
136
116
  background-color: #269b36;
137
117
  }
@@ -176,7 +156,6 @@
176
156
  justify-self: flex-end;
177
157
  align-items: flex-end;
178
158
  }
179
-
180
159
  .small-badge {
181
160
  font-size: 0.5rem;
182
161
  height: 1rem;
@@ -184,7 +163,6 @@
184
163
  padding: 0 0.2rem;
185
164
  margin-bottom: 0.2rem;
186
165
  }
187
-
188
166
  .product-set-save-btn-wrapper {
189
167
  padding-left: 0 !important;
190
168
  display: flex;
@@ -102,6 +102,7 @@
102
102
  }
103
103
 
104
104
  .ryft-payment-form {
105
+
105
106
  .form-disable-box {
106
107
  display: none;
107
108
  position: absolute;
@@ -183,6 +184,7 @@
183
184
  }
184
185
 
185
186
  @include media-breakpoint-up(md) {
187
+
186
188
  .ryft-payment-form,
187
189
  .form-disable-box {
188
190
  height: 50%;
@@ -211,4 +213,4 @@
211
213
  .divider {
212
214
  display: none !important;
213
215
  }
214
- }
216
+ }
@@ -5,7 +5,7 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 14rem;
8
+ height: 14.25rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);
@@ -1 +1 @@
1
- {"version":3,"file":"GameDurationControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/GameDurationControl.tsx"],"names":[],"mappings":"AAOA,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,mBAAmB,mBAE7B,wBAAwB,4CAgC1B,CAAA"}
1
+ {"version":3,"file":"GameDurationControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/GameDurationControl.tsx"],"names":[],"mappings":"AAOA,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,mBAAmB,mBAE7B,wBAAwB,4CA+B1B,CAAA"}
@@ -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.4-dev.0",
3
+ "version": "0.71.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.31.1-dev.4",
45
+ "@licklist/core": "0.32.1",
46
46
  "@licklist/eslint-config": "0.5.6",
47
- "@licklist/plugins": "0.34.0-dev.4",
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.1-dev.4",
64
+ "@licklist/core": "0.32.0",
65
65
  "@licklist/eslint-config": "0.5.6",
66
- "@licklist/plugins": "0.34.0-dev.4",
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,7 +202,6 @@
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"
@@ -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
 
@@ -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,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 { values } from 'lodash'
5
4
 
6
5
  export const TRANSLATION_KEYS = {
7
6
  shortQuantity: 'shortQuantity',
@@ -47,15 +46,6 @@ export const convertEventStatisticToTableData = (
47
46
 
48
47
  const summaryMap = new Map<string, TableDataRecord>()
49
48
 
50
- const maxTotalQuantity = values(eventStatistic?.productCategorySummary)
51
- .flat()
52
- .flatMap((categorySummary) => categorySummary.productsSummary)
53
- .reduce(
54
- (acc, productSummary) =>
55
- productSummary.totalQuantity > acc ? productSummary.totalQuantity : acc,
56
- 0,
57
- )
58
-
59
49
  summaryDays
60
50
  .map((day) => eventStatistic?.productCategorySummary[day])
61
51
  .flat()
@@ -102,7 +92,7 @@ export const convertEventStatisticToTableData = (
102
92
  quantity: totalQuantity
103
93
  ? `${
104
94
  existingProduct.metadata._productsSold + productsSold
105
- } / ${maxTotalQuantity}`
95
+ } / ${totalQuantity}`
106
96
  : String(existingProduct.metadata._productsSold + productsSold),
107
97
  total: String(existingProduct.metadata._total + total),
108
98
  metadata: {
@@ -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
  }`}
@@ -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,
@@ -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 || ''}
@@ -8,7 +8,6 @@ import {
8
8
  useFormContext,
9
9
  useWatch,
10
10
  } from 'react-hook-form'
11
- import { FaBars, FaBowlingBall, FaCalendar, FaTicketAlt } from 'react-icons/fa'
12
11
  import { useTranslation } from 'react-i18next'
13
12
  import { useSensor, MouseSensor } from '@dnd-kit/core'
14
13
  import {
@@ -26,11 +25,7 @@ import { ProductCategoryControl } from '../product-category'
26
25
  import { ProductCategory } from '../types'
27
26
  import { ProductsControl } from './ProductsControl'
28
27
  import { ProductSetFormValues, WithIsLoading } from './ProductSetForm'
29
- import {
30
- SelectCategoryModal,
31
- CATEGORY_TYPES_NAMES,
32
- CategoryConfig,
33
- } from './SelectCategoryModal'
28
+ import { SelectCategoryModal } from './SelectCategoryModal'
34
29
  import { ProductSetLoadingContext } from './context'
35
30
  import { VenueMapSetModal } from './VenueMapSetModal'
36
31
  import { moveArrayElements, sortArrayByIndex } from '../utils'
@@ -38,29 +33,6 @@ import { useSortableTreeFunctions } from '../hooks/useSortableTreeFunctions'
38
33
  // @TODO not for first release
39
34
  // import Popover from "./ProductSetFormPopover";
40
35
 
41
- const CATEGORIES_TYPE: Partial<Record<CategoryType, CategoryConfig>> = {
42
- [CATEGORY_TYPES_NAMES.tickets]: {
43
- label: 'tickets',
44
- icon: <FaTicketAlt color='#0e8ce2' size={10} />,
45
- },
46
- [CATEGORY_TYPES_NAMES.bookings]: {
47
- label: 'bookings',
48
- icon: <FaCalendar color='#0e8ce2' size={10} />,
49
- },
50
- [CATEGORY_TYPES_NAMES.menuItems]: {
51
- label: 'menuItems',
52
- icon: <FaBars color='#0e8ce2' size={10} />,
53
- },
54
- [CATEGORY_TYPES_NAMES.game]: {
55
- label: 'game',
56
- icon: <FaBowlingBall color='#0e8ce2' size={10} />,
57
- },
58
- [CATEGORY_TYPES_NAMES.fixedDuration]: {
59
- label: 'fixedDuration',
60
- icon: <FaCalendar color='#0e8ce2' size={10} />,
61
- },
62
- }
63
-
64
36
  interface ProductCategoriesControlProps extends WithIsLoading {
65
37
  stepIndex: number
66
38
  isOverrides?: boolean
@@ -256,8 +228,6 @@ export function ProductCategoriesControl({
256
228
  setIsExpanded(productCategoryId)
257
229
  }
258
230
 
259
- const categoryType = CATEGORIES_TYPE[productCategory.type]
260
-
261
231
  return (
262
232
  <Controller
263
233
  key={`product-category-${productCategory._id}`}
@@ -302,12 +272,6 @@ export function ProductCategoriesControl({
302
272
  )}
303
273
  modalClass={ProductSetModalClasses.category}
304
274
  isNewAdded={showCategoryModal}
305
- itemButton={
306
- <div className='btn-outline-primary item-icon sm border border-primary rounded-sm'>
307
- {categoryType.icon}
308
- <span className='ml-2'>{t(categoryType.label)}</span>
309
- </div>
310
- }
311
275
  body={
312
276
  <ProductCategoryControl
313
277
  isLoading={isLoading}
@@ -12,7 +12,7 @@ import { isEqual } from 'lodash'
12
12
  import { ProviderBookingManagementSetting } from '@licklist/core/dist/DataMapper/Provider/ProviderBookingManagementSettingDataMapper'
13
13
  import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper'
14
14
  import { WorkHour } from '@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper'
15
- import { transformErrorToMessage } from '@licklist/plugins/dist/utils/error'
15
+ import { transformErrorToMessage } from '@licklist/plugins'
16
16
  import { Dialog, useDialogContext } from '../../modals/dialog'
17
17
  import {
18
18
  ProductSetControl,
@@ -28,16 +28,12 @@ import { ErrorModal } from '../../iframe/order-process/components/ErrorModal'
28
28
  export interface WithIsLoading {
29
29
  isLoading: boolean
30
30
  }
31
- export interface WithIdOptional {
32
- id?: number
33
- }
34
-
35
31
  export interface WithId {
36
32
  id: number
37
33
  }
38
34
  export interface ProductSetFormValues
39
35
  extends FormValues,
40
- WithIdOptional,
36
+ WithId,
41
37
  ProductSetControlValues {
42
38
  steps: Step[]
43
39
  isOverrides?: boolean
@@ -1,4 +1,7 @@
1
- import { useContext, useState } from 'react'
1
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2
+ // @ts-nocheck
3
+ import React, { useContext, useState } from 'react'
4
+
2
5
  import {
3
6
  ArrayPath,
4
7
  Controller,
@@ -25,7 +25,7 @@ import {
25
25
  } from 'react-icons/fa'
26
26
  import { ProductSetLoadingContext } from './context'
27
27
 
28
- export const CATEGORY_TYPES_NAMES = {
28
+ const CATEGORY_TYPES_NAMES = {
29
29
  menuItems: CATEGORY_TYPE_MENU_ITEMS,
30
30
  tickets: CATEGORY_TYPE_TICKETS,
31
31
  bookings: CATEGORY_TYPE_BOOKINGS,
@@ -33,7 +33,7 @@ export const CATEGORY_TYPES_NAMES = {
33
33
  fixedDuration: CATEGORY_TYPE_FIXED_DURATION,
34
34
  } as const
35
35
 
36
- export type CategoryConfig = { label: string; icon: ReactElement }
36
+ type CategoryConfig = { label: string; icon: ReactElement }
37
37
 
38
38
  const MAIN_CATEGORIES: Partial<Record<CategoryType, CategoryConfig>> = {
39
39
  [CATEGORY_TYPES_NAMES.tickets]: {
@@ -70,6 +70,9 @@ export function SubProductsControl({
70
70
  images: subProducts[index]?.images as Image[],
71
71
  }
72
72
  // @ts-expect-error TS2345
73
+ // @TODO fix prod type error
74
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
75
+ // @ts-ignore
73
76
  append(subProductCopy)
74
77
  }}
75
78
  />
@@ -46,6 +46,9 @@ export const VenueMapsControl = ({
46
46
  url={image.url}
47
47
  name={name}
48
48
  points={points}
49
+ // @TODO fix prod type error
50
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
51
+ // @ts-ignore
49
52
  products={products}
50
53
  pointProducts={pointProducts}
51
54
  onPointProductsChange={onPointProductsChange}
@@ -34,6 +34,7 @@ import {
34
34
  } from 'react-hook-form'
35
35
  import { useTranslation } from 'react-i18next'
36
36
  import { useImages } from '@licklist/plugins/dist/hooks/Media/useImages'
37
+
37
38
  import {
38
39
  Image,
39
40
  IMAGE_TYPE_IMAGE,
@@ -1,4 +1,4 @@
1
- import { useContext } from 'react'
1
+ import React, { useContext } from 'react'
2
2
  import { Col, Form } from 'react-bootstrap'
3
3
  import { Controller, Path, useFormContext } from 'react-hook-form'
4
4
  import { HookFormService } from '@licklist/plugins'
@@ -86,7 +86,6 @@ export function ProductBookingManagementControl<T extends FormValues>(
86
86
  <Form.Control
87
87
  ref={ref}
88
88
  type='number'
89
- onWheel={(event) => event.currentTarget.blur()}
90
89
  min={0}
91
90
  step={1}
92
91
  value={value as string}
@@ -130,7 +129,6 @@ export function ProductBookingManagementControl<T extends FormValues>(
130
129
  <Form.Control
131
130
  ref={ref}
132
131
  type='number'
133
- onWheel={(event) => event.currentTarget.blur()}
134
132
  min='0'
135
133
  step='1'
136
134
  value={value as string}
@@ -50,7 +50,6 @@ export function ProductDepositControl<T extends FormValues>(
50
50
  <Form.Control
51
51
  ref={ref}
52
52
  type='number'
53
- onWheel={(event) => event.currentTarget.blur()}
54
53
  min={0}
55
54
  max={Number(totalPrice)}
56
55
  step='0.01'
@@ -91,7 +91,6 @@ export const ProductDurationControl = <T,>({
91
91
  <Form.Control
92
92
  type='number'
93
93
  min={0}
94
- onWheel={(event) => event.currentTarget.blur()}
95
94
  step={1}
96
95
  value={durationHours}
97
96
  disabled={disabled}
@@ -128,7 +127,6 @@ export const ProductDurationControl = <T,>({
128
127
  type='number'
129
128
  min={0}
130
129
  step={1}
131
- onWheel={(event) => event.currentTarget.blur()}
132
130
  disabled={disabled}
133
131
  value={durationMinutes}
134
132
  isInvalid={isInvalid}
@@ -59,7 +59,6 @@ export function ProductPriceControl<T extends FormValues>({
59
59
  ref={ref}
60
60
  type='number'
61
61
  min={0}
62
- onWheel={(event) => event.currentTarget.blur()}
63
62
  max={999999.99}
64
63
  step='0.01'
65
64
  value={value as string}
@@ -111,7 +111,6 @@ export function ProductQuantityConstantControl<T extends FormValues>(
111
111
  type='number'
112
112
  min={0}
113
113
  step={1}
114
- onWheel={(event) => event.currentTarget.blur()}
115
114
  value={value as string}
116
115
  isInvalid={HookFormService.isInvalid<T>(
117
116
  `${fieldNamePrefix}.totalQuantity` as Path<T>,
@@ -166,7 +165,6 @@ export function ProductQuantityConstantControl<T extends FormValues>(
166
165
  type='number'
167
166
  min={0}
168
167
  step={1}
169
- onWheel={(event) => event.currentTarget.blur()}
170
168
  value={value as string}
171
169
  onChange={onChange}
172
170
  onFocus={onFocus}
@@ -85,7 +85,6 @@ export function ProductQuantityControl<T extends FormValues>(
85
85
  type='number'
86
86
  min={0}
87
87
  step={1}
88
- onWheel={(event) => event.currentTarget.blur()}
89
88
  value={value as string}
90
89
  onChange={onChange}
91
90
  onFocus={onFocus}
@@ -144,7 +143,6 @@ export function ProductQuantityControl<T extends FormValues>(
144
143
  type='number'
145
144
  min={0}
146
145
  step={1}
147
- onWheel={(event) => event.currentTarget.blur()}
148
146
  value={value && (value as string)}
149
147
  onFocus={onFocus}
150
148
  onChange={onChange}
@@ -69,7 +69,6 @@ export function ProductQuantityRechargingControl<T extends FormValues>(
69
69
  type='number'
70
70
  min={0}
71
71
  step={1}
72
- onWheel={(event) => event.currentTarget.blur()}
73
72
  {...register(`${fieldNamePrefix}.totalQuantity` as Path<T>, {
74
73
  validate: (value) => {
75
74
  if (unlimited) return true