@licklist/design 0.71.2 → 0.71.4-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/affiliate/form/AffiliateForm.d.ts.map +1 -1
  2. package/dist/auth/Login/LoginComponent.js +2 -1
  3. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +2 -1
  4. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  5. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +0 -1
  6. package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
  7. package/dist/events/event-statistic-modal/utils/index.js +7 -1
  8. package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
  9. package/dist/events/event-venue-map/EventVenueMap.js +1 -0
  10. package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
  11. package/dist/events/event-venue-map/hooks/useCanvasSize.js +11 -4
  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 +13 -0
  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 +4 -5
  17. package/dist/layout/DropDown.d.ts +2 -1
  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 +3 -0
  21. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  22. package/dist/product-set/form/ProductCategoriesControl.js +48 -2
  23. package/dist/product-set/form/ProductSetForm.d.ts +4 -1
  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 +0 -2
  28. package/dist/product-set/form/ProductsControl.js +1 -0
  29. package/dist/product-set/form/SelectCategoryModal.d.ts +12 -0
  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 +0 -3
  34. package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
  35. package/dist/product-set/form/VenueMapsControl.js +0 -3
  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 +6 -0
  39. package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
  40. package/dist/product-set/product/deposit/ProductDepositControl.js +3 -0
  41. package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
  42. package/dist/product-set/product/duration/ProductDurationControl.js +6 -0
  43. package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
  44. package/dist/product-set/product/price/ProductPriceControl.js +3 -0
  45. package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
  46. package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +6 -0
  47. package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
  48. package/dist/product-set/product/quantity/ProductQuantityControl.js +6 -0
  49. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
  50. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +4 -1
  51. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  52. package/dist/product-set/product-category/ProductCategoryControl.js +12 -0
  53. package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
  54. package/dist/recurrence-input/RecurrenceEndInput.js +3 -0
  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 +3 -0
  58. package/dist/resource/form/components/SortControl.d.ts.map +1 -1
  59. package/dist/resource/form/components/SortControl.js +3 -0
  60. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  61. package/dist/sales/booking/results/components/ResultCard.js +0 -2
  62. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  63. package/dist/sales/coupon/control/CouponFormControl.js +21 -0
  64. package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
  65. package/dist/setting/admin/PaymentFeeForm.js +16 -1
  66. package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
  67. package/dist/setting/dashboard/DashboardSettingForm.js +4 -1
  68. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  69. package/dist/snippet/snippet-template/preview/Preview.js +6 -0
  70. package/dist/sortable-tree/SortableTreeItem.d.ts +2 -1
  71. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  72. package/dist/sortable-tree/SortableTreeItem.js +10 -4
  73. package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
  74. package/dist/static/CurrencyNumberInput.js +3 -0
  75. package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
  76. package/dist/static/form-number-input/FormNumberInput.js +3 -0
  77. package/dist/static/number-input/NumberInput.d.ts.map +1 -1
  78. package/dist/static/number-input/NumberInput.js +3 -0
  79. package/dist/styles/availability-indicator/AvailabilityIndicator.scss +1 -1
  80. package/dist/styles/date-time-button/DateTimeButton.scss +1 -0
  81. package/dist/styles/iframe-events/Calendar.scss +1 -1
  82. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  83. package/dist/styles/product-set/ProductSetForm.scss +22 -0
  84. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
  85. package/dist/styles/sales/BookingResults.scss +1 -1
  86. package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
  87. package/dist/zone/form/components/GameDurationControl.js +3 -0
  88. package/dist/zone/form/components/SortControl.d.ts.map +1 -1
  89. package/dist/zone/form/components/SortControl.js +3 -0
  90. package/package.json +6 -5
  91. package/src/affiliate/form/AffiliateForm.tsx +1 -0
  92. package/src/auth/Login/LoginComponent.tsx +1 -1
  93. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
  94. package/src/events/event-statistic-modal/utils/index.ts +11 -1
  95. package/src/events/event-venue-map/EventVenueMap.tsx +1 -0
  96. package/src/events/event-venue-map/hooks/useCanvasSize.ts +5 -1
  97. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +9 -0
  98. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -0
  99. package/src/iframe/ryft/utils/ryft-form.ts +6 -5
  100. package/src/layout/DropDown.tsx +1 -1
  101. package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -0
  102. package/src/product-set/form/ProductCategoriesControl.tsx +37 -1
  103. package/src/product-set/form/ProductSetForm.tsx +6 -2
  104. package/src/product-set/form/ProductZonesControl.tsx +1 -4
  105. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  106. package/src/product-set/form/SubProductsControl.tsx +0 -3
  107. package/src/product-set/form/VenueMapsControl.tsx +0 -3
  108. package/src/product-set/product/ProductControl.tsx +0 -1
  109. package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
  110. package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +2 -0
  111. package/src/product-set/product/deposit/ProductDepositControl.tsx +1 -0
  112. package/src/product-set/product/duration/ProductDurationControl.tsx +2 -0
  113. package/src/product-set/product/price/ProductPriceControl.tsx +1 -0
  114. package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +2 -0
  115. package/src/product-set/product/quantity/ProductQuantityControl.tsx +2 -0
  116. package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +1 -0
  117. package/src/product-set/product-category/ProductCategoryControl.tsx +4 -0
  118. package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
  119. package/src/recurrence-input/RecurrenceEndInput.tsx +1 -0
  120. package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +1 -0
  121. package/src/resource/form/components/CapacityControl.tsx +1 -0
  122. package/src/resource/form/components/SortControl.tsx +1 -0
  123. package/src/sales/booking/results/components/ResultCard.tsx +0 -2
  124. package/src/sales/coupon/control/CouponFormControl.tsx +7 -0
  125. package/src/setting/admin/PaymentFeeForm.tsx +5 -0
  126. package/src/setting/dashboard/DashboardSettingForm.tsx +1 -0
  127. package/src/snippet/snippet-template/preview/Preview.tsx +6 -0
  128. package/src/sortable-tree/SortableTreeItem.tsx +6 -0
  129. package/src/static/CurrencyNumberInput.tsx +1 -0
  130. package/src/static/form-number-input/FormNumberInput.tsx +1 -0
  131. package/src/static/number-input/NumberInput.tsx +1 -0
  132. package/src/styles/availability-indicator/AvailabilityIndicator.scss +1 -1
  133. package/src/styles/date-time-button/DateTimeButton.scss +1 -0
  134. package/src/styles/iframe-events/Calendar.scss +1 -1
  135. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
  136. package/src/styles/product-set/ProductSetForm.scss +22 -0
  137. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
  138. package/src/styles/sales/BookingResults.scss +1 -1
  139. package/src/zone/form/components/GameDurationControl.tsx +1 -0
  140. package/src/zone/form/components/SortControl.tsx +1 -0
  141. package/yarn.lock +138 -110
@@ -15,10 +15,12 @@
15
15
  height: 2.5rem;
16
16
  border-width: 2px;
17
17
  padding: 2px;
18
+
18
19
  label,
19
20
  .btn-switch-indicator {
20
21
  border-radius: 0.375rem !important;
21
22
  }
23
+
22
24
  label {
23
25
  height: 2rem;
24
26
  }
@@ -34,6 +36,7 @@
34
36
  margin-top: 1.5rem;
35
37
  margin-bottom: 1.5rem;
36
38
  }
39
+
37
40
  @include media-breakpoint-down(sm) {
38
41
  padding: 1.5rem 1rem;
39
42
  margin-top: 0.5rem;
@@ -59,10 +62,21 @@
59
62
  background-color: #ffdbdb;
60
63
  color: #d52902;
61
64
  }
65
+
62
66
  .category-badge {
63
67
  background-color: #e8f4f6;
64
68
  color: #1a93aa;
65
69
  }
70
+
71
+ .item-icon {
72
+ display: flex;
73
+ justify-items: center;
74
+ align-items: center;
75
+ font-size: 0.65rem;
76
+ padding: 0.2rem;
77
+ margin-right: 1rem;
78
+ }
79
+
66
80
  .product-badge {
67
81
  background-color: #e9f5ea;
68
82
  color: #269b36;
@@ -75,10 +89,12 @@
75
89
 
76
90
  .product-set-mobile-modal {
77
91
  margin: 0;
92
+
78
93
  .modal-content {
79
94
  border-radius: 1rem 1rem 0 0;
80
95
  border-width: 0;
81
96
  margin: 0;
97
+
82
98
  .modal-body {
83
99
  padding: 1rem 0;
84
100
  }
@@ -100,18 +116,22 @@
100
116
  font-weight: 600;
101
117
  font-size: 0.625rem;
102
118
  }
119
+
103
120
  .product-set-subtitle-dot {
104
121
  margin-right: 0.375rem;
105
122
  width: 0.375rem;
106
123
  height: 0.375rem;
107
124
  border-radius: 3px;
108
125
  }
126
+
109
127
  .product-set-subtitle-category-dot {
110
128
  background-color: #269b36;
111
129
  }
130
+
112
131
  .product-set-subtitle-step-dot {
113
132
  background-color: #1a93aa;
114
133
  }
134
+
115
135
  .product-set-subtitle-product-dot {
116
136
  background-color: #269b36;
117
137
  }
@@ -156,6 +176,7 @@
156
176
  justify-self: flex-end;
157
177
  align-items: flex-end;
158
178
  }
179
+
159
180
  .small-badge {
160
181
  font-size: 0.5rem;
161
182
  height: 1rem;
@@ -163,6 +184,7 @@
163
184
  padding: 0 0.2rem;
164
185
  margin-bottom: 0.2rem;
165
186
  }
187
+
166
188
  .product-set-save-btn-wrapper {
167
189
  padding-left: 0 !important;
168
190
  display: flex;
@@ -102,7 +102,6 @@
102
102
  }
103
103
 
104
104
  .ryft-payment-form {
105
-
106
105
  .form-disable-box {
107
106
  display: none;
108
107
  position: absolute;
@@ -184,7 +183,6 @@
184
183
  }
185
184
 
186
185
  @include media-breakpoint-up(md) {
187
-
188
186
  .ryft-payment-form,
189
187
  .form-disable-box {
190
188
  height: 50%;
@@ -213,4 +211,4 @@
213
211
  .divider {
214
212
  display: none !important;
215
213
  }
216
- }
214
+ }
@@ -5,7 +5,7 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 14.25rem;
8
+ height: 14rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);
@@ -1 +1 @@
1
- {"version":3,"file":"GameDurationControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/GameDurationControl.tsx"],"names":[],"mappings":"AAOA,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,mBAAmB,mBAE7B,wBAAwB,4CA+B1B,CAAA"}
1
+ {"version":3,"file":"GameDurationControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/GameDurationControl.tsx"],"names":[],"mappings":"AAOA,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,mBAAmB,mBAE7B,wBAAwB,4CAgC1B,CAAA"}
@@ -77,6 +77,9 @@ var GameDurationControl = function(param) {
77
77
  required: false,
78
78
  min: 1
79
79
  })), {
80
+ onWheel: function(event) {
81
+ return event.currentTarget.blur();
82
+ },
80
83
  placeholder: t('Design:duration'),
81
84
  isInvalid: Boolean(errors.defaultDuration),
82
85
  disabled: isLoading
@@ -1 +1 @@
1
- {"version":3,"file":"SortControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/SortControl.tsx"],"names":[],"mappings":"AAOA,KAAK,gBAAgB,GAAG;IACtB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,kBAAmB,gBAAgB,4CAmC1D,CAAA"}
1
+ {"version":3,"file":"SortControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/SortControl.tsx"],"names":[],"mappings":"AAOA,KAAK,gBAAgB,GAAG;IACtB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,kBAAmB,gBAAgB,4CAoC1D,CAAA"}
@@ -77,6 +77,9 @@ var SortControl = function(param) {
77
77
  required: false,
78
78
  min: 1
79
79
  })), {
80
+ onWheel: function(event) {
81
+ return event.currentTarget.blur();
82
+ },
80
83
  placeholder: t('Design:ordering'),
81
84
  isInvalid: Boolean(errors.sort),
82
85
  disabled: isLoading
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.71.2",
3
+ "version": "0.71.4-dev.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -42,9 +42,9 @@
42
42
  ]
43
43
  },
44
44
  "peerDependencies": {
45
- "@licklist/core": "0.31.5",
45
+ "@licklist/core": "0.31.1-dev.4",
46
46
  "@licklist/eslint-config": "0.5.6",
47
- "@licklist/plugins": "0.34.0",
47
+ "@licklist/plugins": "0.34.0-dev.4",
48
48
  "lodash": "4.17.21",
49
49
  "luxon": "3.5.0",
50
50
  "react": "17.0.2",
@@ -61,9 +61,9 @@
61
61
  "@dnd-kit/utilities": "2.0.0",
62
62
  "@fortawesome/fontawesome-svg-core": "1.2.34",
63
63
  "@fortawesome/free-solid-svg-icons": "5.15.2",
64
- "@licklist/core": "0.32.0",
64
+ "@licklist/core": "0.31.1-dev.4",
65
65
  "@licklist/eslint-config": "0.5.6",
66
- "@licklist/plugins": "0.35.0",
66
+ "@licklist/plugins": "0.34.0-dev.4",
67
67
  "@mantine/core": "6.0.22",
68
68
  "@mantine/hooks": "6.0.22",
69
69
  "@mdx-js/react": "1.6.22",
@@ -202,6 +202,7 @@
202
202
  "yarn tsc"
203
203
  ]
204
204
  },
205
+ "packageManager": "yarn@4.4.0",
205
206
  "volta": {
206
207
  "node": "20.9.0",
207
208
  "yarn": "4.4.0"
@@ -76,6 +76,7 @@ export const AffiliateForm = ({
76
76
  const copyToClipboard = () =>
77
77
  // eslint-disable-next-line consistent-return
78
78
  window.navigator.clipboard.writeText(formValues.link)
79
+
79
80
  return (
80
81
  <FormProvider {...form}>
81
82
  <Form onSubmit={form.handleSubmit(handleSubmit)}>
@@ -44,7 +44,7 @@ const LoginComponent = ({
44
44
  const handleError = (error: any) => {
45
45
  notification.danger({
46
46
  title: 'Error',
47
- message: error.message,
47
+ message: error?.response?.data?.message || error.message,
48
48
  })
49
49
  }
50
50
 
@@ -39,7 +39,6 @@ export const getDefaultValues = (
39
39
  ...product,
40
40
  subProducts: subProducts?.map(({ ...subProducts }) => ({
41
41
  ...subProducts,
42
- originalProductId: null,
43
42
  productCategoryId: undefined,
44
43
  })),
45
44
  productCategoryId: undefined,
@@ -1,6 +1,7 @@
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'
4
5
 
5
6
  export const TRANSLATION_KEYS = {
6
7
  shortQuantity: 'shortQuantity',
@@ -46,6 +47,15 @@ export const convertEventStatisticToTableData = (
46
47
 
47
48
  const summaryMap = new Map<string, TableDataRecord>()
48
49
 
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
+
49
59
  summaryDays
50
60
  .map((day) => eventStatistic?.productCategorySummary[day])
51
61
  .flat()
@@ -92,7 +102,7 @@ export const convertEventStatisticToTableData = (
92
102
  quantity: totalQuantity
93
103
  ? `${
94
104
  existingProduct.metadata._productsSold + productsSold
95
- } / ${totalQuantity}`
105
+ } / ${maxTotalQuantity}`
96
106
  : String(existingProduct.metadata._productsSold + productsSold),
97
107
  total: String(existingProduct.metadata._total + total),
98
108
  metadata: {
@@ -49,6 +49,7 @@ 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
52
53
  const canvasSizes = useCanvasSize({ width, height })
53
54
 
54
55
  return (
@@ -10,13 +10,17 @@ export const useCanvasSize = ({
10
10
  width: componentWidth,
11
11
  height: componentHeight,
12
12
  }: CanvasSizeProps) => {
13
+ // TODO Fix often updating of width and height
13
14
  const { width, height } = useWindowDimensions()
14
15
 
16
+ // eslint-disable-next-line react-hooks/exhaustive-deps
17
+ const memoizedDimensions = useMemo(() => ({ width, height }), [width])
18
+
15
19
  const memoedComponentParameters = useMemo(() => {
16
20
  if (!componentWidth && !componentHeight) return null
17
21
 
18
22
  return { width: componentWidth, height: componentHeight }
19
23
  }, [componentWidth, componentHeight])
20
24
 
21
- return memoedComponentParameters || { width, height }
25
+ return memoedComponentParameters || memoizedDimensions
22
26
  }
@@ -89,6 +89,7 @@ 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()}
92
93
  value={value}
93
94
  min={0}
94
95
  max={max}
@@ -101,6 +102,14 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
101
102
  <button
102
103
  type='button'
103
104
  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
+ }
104
113
  className={`payment-number-input__btn-up ${
105
114
  plusButtonGreyedOut && 'disabled-number-input-button'
106
115
  }`}
@@ -61,6 +61,7 @@ const processedPaymentSummary = ({
61
61
  const total = calculateTotalPrice(order, externalPaymentDetail)
62
62
 
63
63
  const totalDiscount = calculateTotalDiscount(order.payments)
64
+
64
65
  let summaryItems: SummaryItem[] = [
65
66
  {
66
67
  translateKey: AMOUNT_TOTAL,
@@ -61,20 +61,22 @@ 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("ryft-pay-apple-pay-button") as HTMLButtonElement
74
+ const appleButton = document.getElementById(
75
+ 'ryft-pay-apple-pay-button',
76
+ ) as HTMLButtonElement
75
77
  if (googleButton) {
76
78
  googleButton.disabled = isDisableButton
77
- googleButton.style.opacity = isDisableButton ? '1' : '0.6'
79
+ googleButton.style.opacity = !isDisableButton ? '1' : '0.6'
78
80
  }
79
81
  if (appleButton) {
80
82
  appleButton.disabled = isDisableButton
@@ -86,7 +88,6 @@ export const injectComponentsInRyftForm = ({
86
88
  const applePayButton = document.createElement('button')
87
89
  applePayButton.id = 'apple-pay'
88
90
  applePayButton.type = 'button'
89
- applePayButton.style.opacity = !isDisableButton ? '1' : '0.6'
90
91
  applePayButton.className = 'bg-dark btn btn-primary apple-pay-button'
91
92
  applePayButton.textContent = t('Events:payWithApple')
92
93
  applePayButton.onclick = onApplePayButtonClick
@@ -1,4 +1,4 @@
1
- import { forwardRef } from 'react'
1
+ import React, { forwardRef } from 'react'
2
2
 
3
3
  interface Props {
4
4
  children?: React.ReactNode | React.ReactNode[]
@@ -434,6 +434,7 @@ export const EmailTemplateControl = forwardRef(
434
434
  `templateOptionValues.${option?.id}.value`,
435
435
  )}
436
436
  type='number'
437
+ onWheel={(event) => event.currentTarget.blur()}
437
438
  placeholder={t(`Design:${option.name}`)}
438
439
  id={option.name + option.id}
439
440
  defaultValue={option.selectedValue || ''}
@@ -8,6 +8,7 @@ import {
8
8
  useFormContext,
9
9
  useWatch,
10
10
  } from 'react-hook-form'
11
+ import { FaBars, FaBowlingBall, FaCalendar, FaTicketAlt } from 'react-icons/fa'
11
12
  import { useTranslation } from 'react-i18next'
12
13
  import { useSensor, MouseSensor } from '@dnd-kit/core'
13
14
  import {
@@ -25,7 +26,11 @@ import { ProductCategoryControl } from '../product-category'
25
26
  import { ProductCategory } from '../types'
26
27
  import { ProductsControl } from './ProductsControl'
27
28
  import { ProductSetFormValues, WithIsLoading } from './ProductSetForm'
28
- import { SelectCategoryModal } from './SelectCategoryModal'
29
+ import {
30
+ SelectCategoryModal,
31
+ CATEGORY_TYPES_NAMES,
32
+ CategoryConfig,
33
+ } from './SelectCategoryModal'
29
34
  import { ProductSetLoadingContext } from './context'
30
35
  import { VenueMapSetModal } from './VenueMapSetModal'
31
36
  import { moveArrayElements, sortArrayByIndex } from '../utils'
@@ -33,6 +38,29 @@ import { useSortableTreeFunctions } from '../hooks/useSortableTreeFunctions'
33
38
  // @TODO not for first release
34
39
  // import Popover from "./ProductSetFormPopover";
35
40
 
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
+
36
64
  interface ProductCategoriesControlProps extends WithIsLoading {
37
65
  stepIndex: number
38
66
  isOverrides?: boolean
@@ -228,6 +256,8 @@ export function ProductCategoriesControl({
228
256
  setIsExpanded(productCategoryId)
229
257
  }
230
258
 
259
+ const categoryType = CATEGORIES_TYPE[productCategory.type]
260
+
231
261
  return (
232
262
  <Controller
233
263
  key={`product-category-${productCategory._id}`}
@@ -272,6 +302,12 @@ export function ProductCategoriesControl({
272
302
  )}
273
303
  modalClass={ProductSetModalClasses.category}
274
304
  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
+ }
275
311
  body={
276
312
  <ProductCategoryControl
277
313
  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'
15
+ import { transformErrorToMessage } from '@licklist/plugins/dist/utils/error'
16
16
  import { Dialog, useDialogContext } from '../../modals/dialog'
17
17
  import {
18
18
  ProductSetControl,
@@ -28,12 +28,16 @@ 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
+
31
35
  export interface WithId {
32
36
  id: number
33
37
  }
34
38
  export interface ProductSetFormValues
35
39
  extends FormValues,
36
- WithId,
40
+ WithIdOptional,
37
41
  ProductSetControlValues {
38
42
  steps: Step[]
39
43
  isOverrides?: boolean
@@ -1,7 +1,4 @@
1
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2
- // @ts-nocheck
3
- import React, { useContext, useState } from 'react'
4
-
1
+ import { useContext, useState } from 'react'
5
2
  import {
6
3
  ArrayPath,
7
4
  Controller,
@@ -25,7 +25,7 @@ import {
25
25
  } from 'react-icons/fa'
26
26
  import { ProductSetLoadingContext } from './context'
27
27
 
28
- const CATEGORY_TYPES_NAMES = {
28
+ export 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 @@ const CATEGORY_TYPES_NAMES = {
33
33
  fixedDuration: CATEGORY_TYPE_FIXED_DURATION,
34
34
  } as const
35
35
 
36
- type CategoryConfig = { label: string; icon: ReactElement }
36
+ export type CategoryConfig = { label: string; icon: ReactElement }
37
37
 
38
38
  const MAIN_CATEGORIES: Partial<Record<CategoryType, CategoryConfig>> = {
39
39
  [CATEGORY_TYPES_NAMES.tickets]: {
@@ -70,9 +70,6 @@ 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
76
73
  append(subProductCopy)
77
74
  }}
78
75
  />
@@ -46,9 +46,6 @@ 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
52
49
  products={products}
53
50
  pointProducts={pointProducts}
54
51
  onPointProductsChange={onPointProductsChange}
@@ -34,7 +34,6 @@ 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
-
38
37
  import {
39
38
  Image,
40
39
  IMAGE_TYPE_IMAGE,
@@ -1,4 +1,4 @@
1
- import React, { useContext } from 'react'
1
+ import { 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,6 +86,7 @@ export function ProductBookingManagementControl<T extends FormValues>(
86
86
  <Form.Control
87
87
  ref={ref}
88
88
  type='number'
89
+ onWheel={(event) => event.currentTarget.blur()}
89
90
  min={0}
90
91
  step={1}
91
92
  value={value as string}
@@ -129,6 +130,7 @@ export function ProductBookingManagementControl<T extends FormValues>(
129
130
  <Form.Control
130
131
  ref={ref}
131
132
  type='number'
133
+ onWheel={(event) => event.currentTarget.blur()}
132
134
  min='0'
133
135
  step='1'
134
136
  value={value as string}
@@ -50,6 +50,7 @@ export function ProductDepositControl<T extends FormValues>(
50
50
  <Form.Control
51
51
  ref={ref}
52
52
  type='number'
53
+ onWheel={(event) => event.currentTarget.blur()}
53
54
  min={0}
54
55
  max={Number(totalPrice)}
55
56
  step='0.01'
@@ -91,6 +91,7 @@ export const ProductDurationControl = <T,>({
91
91
  <Form.Control
92
92
  type='number'
93
93
  min={0}
94
+ onWheel={(event) => event.currentTarget.blur()}
94
95
  step={1}
95
96
  value={durationHours}
96
97
  disabled={disabled}
@@ -127,6 +128,7 @@ export const ProductDurationControl = <T,>({
127
128
  type='number'
128
129
  min={0}
129
130
  step={1}
131
+ onWheel={(event) => event.currentTarget.blur()}
130
132
  disabled={disabled}
131
133
  value={durationMinutes}
132
134
  isInvalid={isInvalid}
@@ -59,6 +59,7 @@ export function ProductPriceControl<T extends FormValues>({
59
59
  ref={ref}
60
60
  type='number'
61
61
  min={0}
62
+ onWheel={(event) => event.currentTarget.blur()}
62
63
  max={999999.99}
63
64
  step='0.01'
64
65
  value={value as string}
@@ -111,6 +111,7 @@ export function ProductQuantityConstantControl<T extends FormValues>(
111
111
  type='number'
112
112
  min={0}
113
113
  step={1}
114
+ onWheel={(event) => event.currentTarget.blur()}
114
115
  value={value as string}
115
116
  isInvalid={HookFormService.isInvalid<T>(
116
117
  `${fieldNamePrefix}.totalQuantity` as Path<T>,
@@ -165,6 +166,7 @@ export function ProductQuantityConstantControl<T extends FormValues>(
165
166
  type='number'
166
167
  min={0}
167
168
  step={1}
169
+ onWheel={(event) => event.currentTarget.blur()}
168
170
  value={value as string}
169
171
  onChange={onChange}
170
172
  onFocus={onFocus}
@@ -85,6 +85,7 @@ export function ProductQuantityControl<T extends FormValues>(
85
85
  type='number'
86
86
  min={0}
87
87
  step={1}
88
+ onWheel={(event) => event.currentTarget.blur()}
88
89
  value={value as string}
89
90
  onChange={onChange}
90
91
  onFocus={onFocus}
@@ -143,6 +144,7 @@ export function ProductQuantityControl<T extends FormValues>(
143
144
  type='number'
144
145
  min={0}
145
146
  step={1}
147
+ onWheel={(event) => event.currentTarget.blur()}
146
148
  value={value && (value as string)}
147
149
  onFocus={onFocus}
148
150
  onChange={onChange}
@@ -69,6 +69,7 @@ export function ProductQuantityRechargingControl<T extends FormValues>(
69
69
  type='number'
70
70
  min={0}
71
71
  step={1}
72
+ onWheel={(event) => event.currentTarget.blur()}
72
73
  {...register(`${fieldNamePrefix}.totalQuantity` as Path<T>, {
73
74
  validate: (value) => {
74
75
  if (unlimited) return true