@licklist/design 0.71.18-dev.18 → 0.71.18-dev.3

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 (135) hide show
  1. package/dist/events/edit-event-modal/IntervalInput.d.ts +1 -3
  2. package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
  3. package/dist/events/edit-event-modal/IntervalInput.js +4 -11
  4. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +1 -3
  5. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
  6. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +3 -14
  7. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +0 -1
  8. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts +1 -5
  9. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
  10. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.js +3 -5
  11. package/dist/events/event-statistic-modal/utils/index.js +3 -3
  12. package/dist/iframe/event/ticket-description/TicketDescription.d.ts +1 -3
  13. package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
  14. package/dist/iframe/event/ticket-description/TicketDescription.js +7 -10
  15. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  16. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  17. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -2
  18. package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts +1 -5
  19. package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts.map +1 -1
  20. package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.js +1 -12
  21. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +0 -1
  22. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  23. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts +0 -4
  24. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  25. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +2 -29
  26. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  27. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +2 -106
  28. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -3
  29. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  30. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -95
  31. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  32. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +10 -83
  33. package/dist/iframe/payment/order-items-table/utils/index.d.ts.map +1 -1
  34. package/dist/iframe/payment/order-items-table/utils/index.js +0 -15
  35. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +2 -2
  36. package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
  37. package/dist/iframe/payment/payment-page/PaymentPage.js +1 -4
  38. package/dist/index.js +1 -1
  39. package/dist/product-set/form/ProductSetForm.d.ts +1 -3
  40. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  41. package/dist/product-set/form/ProductSetForm.js +4 -6
  42. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  43. package/dist/product-set/form/ProductsControl.js +5 -24
  44. package/dist/product-set/form/context.d.ts +1 -3
  45. package/dist/product-set/form/context.d.ts.map +1 -1
  46. package/dist/product-set/form/context.js +1 -2
  47. package/dist/product-set/product/ProductControl.d.ts +0 -8
  48. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  49. package/dist/product-set/product/ProductControl.js +1 -25
  50. package/dist/product-set/utils/index.d.ts +0 -88
  51. package/dist/product-set/utils/index.d.ts.map +1 -1
  52. package/dist/product-set/utils/index.js +1 -19
  53. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  54. package/dist/sales/coupon/utils/index.d.ts +1 -2
  55. package/dist/sales/coupon/utils/index.d.ts.map +1 -1
  56. package/dist/styles/date-time-button/DateTimeButton.scss +0 -7
  57. package/dist/styles/events/EditEventModal.scss +0 -2
  58. package/dist/styles/iframe-page/Page.scss +0 -16
  59. package/dist/styles/iframe-page/PageBody.scss +0 -4
  60. package/dist/styles/modals/Modals.scss +0 -16
  61. package/dist/styles/product-set/EditProductSetElement.scss +0 -1
  62. package/dist/styles/product-set/ProductSetForm.scss +0 -11
  63. package/dist/styles/sales/ManualBooking.scss +0 -6
  64. package/dist/styles/themes/bookedit/index.scss +0 -19
  65. package/package.json +6 -6
  66. package/src/events/edit-event-modal/IntervalInput.tsx +3 -13
  67. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -16
  68. package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +1 -9
  69. package/src/events/event-statistic-modal/utils/index.ts +4 -4
  70. package/src/iframe/event/ticket-description/TicketDescription.tsx +4 -11
  71. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +0 -2
  72. package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +2 -24
  73. package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -1
  74. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +1 -42
  75. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +75 -155
  76. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +1 -58
  77. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +14 -84
  78. package/src/iframe/payment/order-items-table/utils/index.ts +0 -23
  79. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +2 -2
  80. package/src/iframe/payment/payment-page/PaymentPage.tsx +10 -8
  81. package/src/product-set/form/ProductSetForm.tsx +3 -11
  82. package/src/product-set/form/ProductsControl.tsx +15 -33
  83. package/src/product-set/form/context.tsx +0 -5
  84. package/src/product-set/product/ProductControl.tsx +1 -37
  85. package/src/product-set/utils/index.ts +0 -19
  86. package/src/recurrence-input/RecurrenceInput.tsx +5 -3
  87. package/src/sales/coupon/utils/index.ts +3 -5
  88. package/src/styles/date-time-button/DateTimeButton.scss +0 -7
  89. package/src/styles/events/EditEventModal.scss +0 -2
  90. package/src/styles/iframe-page/Page.scss +0 -16
  91. package/src/styles/iframe-page/PageBody.scss +0 -4
  92. package/src/styles/modals/Modals.scss +0 -16
  93. package/src/styles/product-set/EditProductSetElement.scss +0 -1
  94. package/src/styles/product-set/ProductSetForm.scss +0 -11
  95. package/src/styles/sales/ManualBooking.scss +0 -6
  96. package/src/styles/themes/bookedit/index.scss +0 -19
  97. package/yarn.lock +376 -377
  98. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts +0 -18
  99. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +0 -1
  100. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +0 -295
  101. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts +0 -15
  102. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map +0 -1
  103. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +0 -90
  104. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts +0 -14
  105. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map +0 -1
  106. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +0 -404
  107. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts +0 -10
  108. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts.map +0 -1
  109. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.js +0 -87
  110. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/index.d.ts +0 -2
  111. package/dist/iframe/ProductWithModifierModal/ModifierSetModal/index.d.ts.map +0 -1
  112. package/dist/iframe/ProductWithModifierModal/index.d.ts +0 -2
  113. package/dist/iframe/ProductWithModifierModal/index.d.ts.map +0 -1
  114. package/dist/iframe/ProductWithModifierModal/utils.d.ts +0 -5
  115. package/dist/iframe/ProductWithModifierModal/utils.d.ts.map +0 -1
  116. package/dist/iframe/ProductWithModifierModal/utils.js +0 -21
  117. package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts +0 -23
  118. package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts.map +0 -1
  119. package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.js +0 -62
  120. package/dist/iframe/order-process/components/CategoryProduct/constants.d.ts +0 -2
  121. package/dist/iframe/order-process/components/CategoryProduct/constants.d.ts.map +0 -1
  122. package/dist/iframe/order-process/components/CategoryProduct/constants.js +0 -4
  123. package/dist/iframe/order-process/components/utils/useOnWindowUnmount.d.ts +0 -6
  124. package/dist/iframe/order-process/components/utils/useOnWindowUnmount.d.ts.map +0 -1
  125. package/dist/iframe/order-process/components/utils/useOnWindowUnmount.js +0 -18
  126. package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +0 -212
  127. package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +0 -76
  128. package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +0 -393
  129. package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +0 -98
  130. package/src/iframe/ProductWithModifierModal/ModifierSetModal/index.ts +0 -1
  131. package/src/iframe/ProductWithModifierModal/index.ts +0 -1
  132. package/src/iframe/ProductWithModifierModal/utils.ts +0 -29
  133. package/src/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.tsx +0 -86
  134. package/src/iframe/order-process/components/CategoryProduct/constants.ts +0 -1
  135. package/src/iframe/order-process/components/utils/useOnWindowUnmount.ts +0 -25
@@ -1,24 +1,14 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { useState, useMemo, useEffect } from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { useMemo, useEffect } from 'react';
3
3
  import { useFormContext, Controller } from 'react-hook-form';
4
4
  import clsx from 'clsx';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { useIntl } from 'react-intl';
7
7
  import * as Config from '@licklist/core/dist/Config';
8
8
  import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService';
9
- import { ProductWithModifierSetModal } from '../../../ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js';
10
9
  import { TicketDescription } from '../../../event/ticket-description/TicketDescription.js';
11
10
  import { ProductQuantityInput } from './components/ProductQuantityInput/ProductQuantityInput.js';
12
- import { ProductWithModifier } from './components/ProductWithModifier/ProductWithModifier.js';
13
11
 
14
- function _array_like_to_array(arr, len) {
15
- if (len == null || len > arr.length) len = arr.length;
16
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
17
- return arr2;
18
- }
19
- function _array_with_holes(arr) {
20
- if (Array.isArray(arr)) return arr;
21
- }
22
12
  function _define_property(obj, key, value) {
23
13
  if (key in obj) {
24
14
  Object.defineProperty(obj, key, {
@@ -32,33 +22,6 @@ function _define_property(obj, key, value) {
32
22
  }
33
23
  return obj;
34
24
  }
35
- function _iterable_to_array_limit(arr, i) {
36
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
37
- if (_i == null) return;
38
- var _arr = [];
39
- var _n = true;
40
- var _d = false;
41
- var _s, _e;
42
- try {
43
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
44
- _arr.push(_s.value);
45
- if (i && _arr.length === i) break;
46
- }
47
- } catch (err) {
48
- _d = true;
49
- _e = err;
50
- } finally{
51
- try {
52
- if (!_n && _i["return"] != null) _i["return"]();
53
- } finally{
54
- if (_d) throw _e;
55
- }
56
- }
57
- return _arr;
58
- }
59
- function _non_iterable_rest() {
60
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
61
- }
62
25
  function _object_spread(target) {
63
26
  for(var i = 1; i < arguments.length; i++){
64
27
  var source = arguments[i] != null ? arguments[i] : {};
@@ -98,17 +61,6 @@ function _object_spread_props(target, source) {
98
61
  }
99
62
  return target;
100
63
  }
101
- function _sliced_to_array(arr, i) {
102
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
103
- }
104
- function _unsupported_iterable_to_array(o, minLen) {
105
- if (!o) return;
106
- if (typeof o === "string") return _array_like_to_array(o, minLen);
107
- var n = Object.prototype.toString.call(o).slice(8, -1);
108
- if (n === "Object" && o.constructor) n = o.constructor.name;
109
- if (n === "Map" || n === "Set") return Array.from(n);
110
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
111
- }
112
64
  var CategoryProduct = function(param) {
113
65
  var product = param.product, category = param.category, _param_canExpandDescription = param.canExpandDescription, canExpandDescription = _param_canExpandDescription === void 0 ? true : _param_canExpandDescription, productsWithErrors = param.productsWithErrors, soldOutProducts = param.soldOutProducts;
114
66
  var formatNumber = useIntl().formatNumber;
@@ -117,8 +69,6 @@ var CategoryProduct = function(param) {
117
69
  'Validation'
118
70
  ]).t;
119
71
  var _useFormContext = useFormContext(), control = _useFormContext.control, clearErrors = _useFormContext.clearErrors, setError = _useFormContext.setError;
120
- var _useState = _sliced_to_array(useState(undefined), 2), editOrderModifierIndex = _useState[0], setEditOrderModifierIndex = _useState[1];
121
- var _useState1 = _sliced_to_array(useState(undefined), 2), modifierIndex = _useState1[0], setModifierIndex = _useState1[1];
122
72
  var hasDeposits = category.allowDeposits && (product === null || product === void 0 ? void 0 : product.deposit) < product.price;
123
73
  var productQuantityError = useMemo(function() {
124
74
  if (!productsWithErrors) {
@@ -193,40 +143,6 @@ var CategoryProduct = function(param) {
193
143
  },
194
144
  render: function(param) {
195
145
  var _param_field = param.field, onChange = _param_field.onChange, tmp = _param_field.value, productInfo = tmp === void 0 ? {} : tmp, ref = _param_field.ref, _param_fieldState = param.fieldState, invalid = _param_fieldState.invalid, error = _param_fieldState.error;
196
- var _productInfo_orderModifiersSets;
197
- var deleteOrderModifier = function(orderModifierIndex) {
198
- var _productInfo_orderModifiersSets;
199
- var removedOrderModifierIndex = (_productInfo_orderModifiersSets = productInfo.orderModifiersSets) === null || _productInfo_orderModifiersSets === void 0 ? void 0 : _productInfo_orderModifiersSets.filter(function(_, index) {
200
- return index !== orderModifierIndex;
201
- });
202
- var productInfoWithRemove = _object_spread_props(_object_spread({}, productInfo), {
203
- orderModifiersSets: removedOrderModifierIndex,
204
- quantity: removedOrderModifierIndex.reduce(function(acc, product) {
205
- return product.productQuantity + acc;
206
- }, 0)
207
- });
208
- onChange(productInfoWithRemove);
209
- };
210
- var editOrderModifierSet = function(orderModifierIndex) {
211
- var editOrderModifierIndex = productInfo.orderModifiersSets.find(function(_, index) {
212
- setModifierIndex(index);
213
- return index === orderModifierIndex;
214
- });
215
- setEditOrderModifierIndex(editOrderModifierIndex);
216
- };
217
- var onChangeWithModifierSets = function(value) {
218
- var _productInfo_orderModifiersSets;
219
- var editedOrderModifiersSets = (_productInfo_orderModifiersSets = productInfo.orderModifiersSets) === null || _productInfo_orderModifiersSets === void 0 ? void 0 : _productInfo_orderModifiersSets.filter(function(_, index) {
220
- return index !== modifierIndex;
221
- }).concat(value.orderModifiersSets);
222
- onChange(_object_spread_props(_object_spread({}, value), {
223
- orderModifiersSets: editedOrderModifiersSets,
224
- quantity: editedOrderModifiersSets.reduce(function(acc, product) {
225
- return product.productQuantity + acc;
226
- }, 0)
227
- }));
228
- setEditOrderModifierIndex(undefined);
229
- };
230
146
  return /*#__PURE__*/ jsxs("div", {
231
147
  id: String(product.id),
232
148
  className: "iframe-event__category-product",
@@ -278,16 +194,6 @@ var CategoryProduct = function(param) {
278
194
  })
279
195
  })
280
196
  }),
281
- ((_productInfo_orderModifiersSets = productInfo.orderModifiersSets) === null || _productInfo_orderModifiersSets === void 0 ? void 0 : _productInfo_orderModifiersSets.length) > 0 && /*#__PURE__*/ jsx(Fragment, {
282
- children: productInfo.orderModifiersSets.map(function(modifier, index) {
283
- return /*#__PURE__*/ jsx(ProductWithModifier, {
284
- modifier: modifier,
285
- modifierKey: index,
286
- editOrderModifierSet: editOrderModifierSet,
287
- deleteOrderModifier: deleteOrderModifier
288
- }, modifier.productQuantity.toString());
289
- })
290
- }),
291
197
  hasDeposits && (category === null || category === void 0 ? void 0 : category.remainderExpireAfter) > 0 && /*#__PURE__*/ jsx("div", {
292
198
  className: "mt-4",
293
199
  children: t('Design:payNowAndReminderDays', {
@@ -315,16 +221,6 @@ var CategoryProduct = function(param) {
315
221
  HookFormService.hasError(error, 'validate') && error.message
316
222
  ]
317
223
  })
318
- }),
319
- /*#__PURE__*/ jsx(ProductWithModifierSetModal, {
320
- show: !!editOrderModifierIndex,
321
- onHide: function() {
322
- return setEditOrderModifierIndex(undefined);
323
- },
324
- editOrderModifier: editOrderModifierIndex,
325
- onChange: onChangeWithModifierSets,
326
- product: product,
327
- category: category
328
224
  })
329
225
  ]
330
226
  });
@@ -1,7 +1,6 @@
1
1
  import { FieldValues, RefCallBack, UseFormClearErrors } from 'react-hook-form';
2
2
  import { Product, ProductCategory } from '@licklist/plugins/dist/types/context/sale/menuSteps';
3
- import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct';
4
- export interface FormOrderItem {
3
+ interface FormOrderItem {
5
4
  id: number;
6
5
  name: string;
7
6
  price: number;
@@ -10,7 +9,6 @@ export interface FormOrderItem {
10
9
  deposit?: number | null;
11
10
  quantity: number;
12
11
  capacity?: number | null;
13
- orderModifiersSets?: OrderModifierByProduct[] | null;
14
12
  }
15
13
  interface ProductQuantityInputProps {
16
14
  product: Product;
@@ -1 +1 @@
1
- {"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AAKrG,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,kBAAkB,CAAC,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAA;CACrD;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED,eAAO,MAAM,oBAAoB,gGAQ9B,yBAAyB,4CAoH3B,CAAA"}
1
+ {"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAG5D,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED,eAAO,MAAM,oBAAoB,gGAQ9B,yBAAyB,4CAiE3B,CAAA"}
@@ -1,62 +1,12 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { useState } from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
3
2
  import clsx from 'clsx';
4
3
  import { Button } from 'react-bootstrap';
5
- import { isEmpty } from 'lodash';
6
4
  import { useTranslation } from 'react-i18next';
7
5
  import { NumberInput } from '../NumberInput/NumberInput.js';
8
- import { ProductWithModifierSetModal } from '../../../../../ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js';
9
6
 
10
- function _array_like_to_array(arr, len) {
11
- if (len == null || len > arr.length) len = arr.length;
12
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
13
- return arr2;
14
- }
15
- function _array_with_holes(arr) {
16
- if (Array.isArray(arr)) return arr;
17
- }
18
- function _iterable_to_array_limit(arr, i) {
19
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
20
- if (_i == null) return;
21
- var _arr = [];
22
- var _n = true;
23
- var _d = false;
24
- var _s, _e;
25
- try {
26
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
27
- _arr.push(_s.value);
28
- if (i && _arr.length === i) break;
29
- }
30
- } catch (err) {
31
- _d = true;
32
- _e = err;
33
- } finally{
34
- try {
35
- if (!_n && _i["return"] != null) _i["return"]();
36
- } finally{
37
- if (_d) throw _e;
38
- }
39
- }
40
- return _arr;
41
- }
42
- function _non_iterable_rest() {
43
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
44
- }
45
- function _sliced_to_array(arr, i) {
46
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
47
- }
48
- function _unsupported_iterable_to_array(o, minLen) {
49
- if (!o) return;
50
- if (typeof o === "string") return _array_like_to_array(o, minLen);
51
- var n = Object.prototype.toString.call(o).slice(8, -1);
52
- if (n === "Object" && o.constructor) n = o.constructor.name;
53
- if (n === "Map" || n === "Set") return Array.from(n);
54
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
55
- }
56
7
  var ProductQuantityInput = function(param) {
57
8
  var product = param.product, category = param.category, _onChange = param.onChange, clearErrors = param.clearErrors, refCallback = param.refCallback, productInfo = param.productInfo, invalid = param.invalid;
58
9
  var t = useTranslation('Design').t;
59
- var _useState = _sliced_to_array(useState(false), 2), open = _useState[0], handleOpenModal = _useState[1];
60
10
  var onChange = function(quantity) {
61
11
  _onChange({
62
12
  id: product.id,
@@ -64,61 +14,17 @@ var ProductQuantityInput = function(param) {
64
14
  deposit: product === null || product === void 0 ? void 0 : product.deposit,
65
15
  hasDeposit: category.allowDeposits && (product === null || product === void 0 ? void 0 : product.deposit) < product.price,
66
16
  price: product.price,
67
- orderModifiersSets: [],
68
17
  productCategoryId: category.id,
69
18
  quantity: quantity,
70
19
  capacity: product === null || product === void 0 ? void 0 : product.capacity
71
20
  });
72
21
  };
73
- var onChangeWithModifierSets = function(productOrder) {
74
- var _productInfo_orderModifiersSets;
75
- if (isEmpty(productInfo)) {
76
- _onChange(productOrder);
77
- return handleOpenModal(false);
78
- }
79
- _onChange({
80
- id: productInfo.id,
81
- name: productInfo.name,
82
- deposit: productInfo === null || productInfo === void 0 ? void 0 : productInfo.deposit,
83
- hasDeposit: productInfo.hasDeposit,
84
- price: productInfo.price,
85
- orderModifiersSets: (_productInfo_orderModifiersSets = productInfo.orderModifiersSets) === null || _productInfo_orderModifiersSets === void 0 ? void 0 : _productInfo_orderModifiersSets.concat(productOrder.orderModifiersSets),
86
- productCategoryId: category.id,
87
- quantity: productInfo.quantity + productOrder.quantity,
88
- capacity: productInfo === null || productInfo === void 0 ? void 0 : productInfo.capacity
89
- });
90
- return handleOpenModal(false);
91
- };
92
22
  if (product.isSoldOut) {
93
23
  return /*#__PURE__*/ jsx("div", {
94
24
  className: "iframe-event__sold-out-wrapper",
95
25
  children: t('Design:soldOut')
96
26
  });
97
27
  }
98
- if (product.modifiersSet.length) {
99
- return /*#__PURE__*/ jsxs(Fragment, {
100
- children: [
101
- /*#__PURE__*/ jsx(Button, {
102
- ref: refCallback,
103
- disabled: product.isSoldOut,
104
- className: clsx("iframe-event__".concat((productInfo === null || productInfo === void 0 ? void 0 : productInfo.quantity) ? 'unselect-product' : 'select-product'), invalid && 'error'),
105
- onClick: function() {
106
- return handleOpenModal(true);
107
- },
108
- children: "+"
109
- }),
110
- /*#__PURE__*/ jsx(ProductWithModifierSetModal, {
111
- show: open,
112
- onHide: function() {
113
- return handleOpenModal(false);
114
- },
115
- onChange: onChangeWithModifierSets,
116
- product: product,
117
- category: category
118
- })
119
- ]
120
- });
121
- }
122
28
  if ((product === null || product === void 0 ? void 0 : product.maxAmount) === 1) {
123
29
  return /*#__PURE__*/ jsx(Button, {
124
30
  ref: refCallback,
@@ -1 +1 @@
1
- {"version":3,"file":"useTableData.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/payment/order-items-table/hooks/useTableData.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,OAAO,EAAE,oBAAoB,EAAe,MAAM,UAAU,CAAA;AAQ5D,eAAO,MAAM,2BAA2B;;;;CAIvC,CAAA;AAED,eAAO,MAAM,YAAY,oEAKtB,oBAAoB;;;;;;;;;;IA+KtB,CAAA"}
1
+ {"version":3,"file":"useTableData.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/payment/order-items-table/hooks/useTableData.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,OAAO,EAAE,oBAAoB,EAAe,MAAM,UAAU,CAAA;AAI5D,eAAO,MAAM,2BAA2B;;;;CAIvC,CAAA;AAED,eAAO,MAAM,YAAY,oEAKtB,oBAAoB;;;;;;;;;;IA8GtB,CAAA"}
@@ -1,10 +1,10 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useMemo } from 'react';
3
- import { flatten, flatMap, uniqueId } from 'lodash';
3
+ import { uniqueId } from 'lodash';
4
4
  import { useIntl } from 'react-intl';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { PAYMENT_TYPE_NET_PROFIT, PAYMENT_TYPE_FEE, PAYMENT_TYPE_VAT } from '@licklist/core/dist/DataMapper/Order/PaymentDataMapper';
7
- import { getTotalSumByCategory } from '../utils/index.js';
7
+ import { getTotalSumByCategory, getProductQuantityAndPrice } from '../utils/index.js';
8
8
  import { getOrderSummaryItems } from '../utils/paymentSummary.js';
9
9
 
10
10
  function _array_like_to_array(arr, len) {
@@ -74,68 +74,14 @@ var useTableData = function(param) {
74
74
  price: wrapLabelContent("".concat(t('total'), ": ").concat(formatPrice(getTotalSumByCategory(order.orderProducts, products))))
75
75
  };
76
76
  };
77
- var reworkProductStructure = function(order) {
78
- return order ? flatMap(order, function(item) {
79
- if (!item || !Array.isArray(item)) return [];
80
- return item.map(function(modGroup, idx) {
81
- var _order_deletedAt, _order_orderId, _order_price, _order_productId, _modGroup_productQuantity, _order_deposit;
82
- return {
83
- deletedAt: (_order_deletedAt = order.deletedAt) !== null && _order_deletedAt !== void 0 ? _order_deletedAt : null,
84
- id: "".concat(order.id, "-").concat(idx + 1),
85
- orderId: (_order_orderId = order.orderId) !== null && _order_orderId !== void 0 ? _order_orderId : null,
86
- price: (_order_price = order.price) !== null && _order_price !== void 0 ? _order_price : 0,
87
- productId: (_order_productId = order.productId) !== null && _order_productId !== void 0 ? _order_productId : '',
88
- quantity: (_modGroup_productQuantity = modGroup.productQuantity) !== null && _modGroup_productQuantity !== void 0 ? _modGroup_productQuantity : 1,
89
- deposit: (_order_deposit = order.deposit) !== null && _order_deposit !== void 0 ? _order_deposit : 0,
90
- orderProductModifiers: modGroup.modifiers.map(function(mod) {
91
- var _mod_modifierId, _mod_price, _mod_productId, _mod_quantity, _mod_modifierSetId, _mod_modifier;
92
- return {
93
- modifierId: (_mod_modifierId = mod.modifierId) !== null && _mod_modifierId !== void 0 ? _mod_modifierId : '',
94
- price: (_mod_price = mod.price) !== null && _mod_price !== void 0 ? _mod_price : 0,
95
- productId: (_mod_productId = mod.productId) !== null && _mod_productId !== void 0 ? _mod_productId : '',
96
- quantity: (_mod_quantity = mod.quantity) !== null && _mod_quantity !== void 0 ? _mod_quantity : 1,
97
- modifierSetId: (_mod_modifierSetId = mod.modifierSetId) !== null && _mod_modifierSetId !== void 0 ? _mod_modifierSetId : '',
98
- modifier: (_mod_modifier = mod.modifier) !== null && _mod_modifier !== void 0 ? _mod_modifier : null
99
- };
100
- })
101
- };
102
- });
103
- }) : [];
104
- };
105
- var renderProductItem = function(param) {
106
- var product = param.product, productsForCategory = param.productsForCategory;
107
- var _productsForCategory_find, _product_orderProductModifiers;
108
- if (product.quantity === 0) {
109
- return null;
110
- }
111
- var name = ((_productsForCategory_find = productsForCategory.find(function(item) {
112
- return item.id === product.productId;
113
- })) === null || _productsForCategory_find === void 0 ? void 0 : _productsForCategory_find.name) || '';
114
- return {
115
- key: product.id,
116
- name: name,
117
- quantity: /*#__PURE__*/ jsxs("div", {
118
- className: "quantity",
119
- children: [
120
- /*#__PURE__*/ jsx("div", {
121
- className: "multiplier",
122
- children: "x"
123
- }),
124
- product.quantity
125
- ]
126
- }),
127
- price: formatPrice(product.price),
128
- modifier: (product === null || product === void 0 ? void 0 : (_product_orderProductModifiers = product.orderProductModifiers) === null || _product_orderProductModifiers === void 0 ? void 0 : _product_orderProductModifiers.map(renderModifierItem)) || []
129
- };
130
- };
131
- var renderModifierItem = function(orderModifier) {
132
- var quantity = orderModifier.quantity, modifier = orderModifier.modifier, modifierId = orderModifier.modifierId, price = orderModifier.price;
77
+ var renderProductItem = function(product) {
78
+ var _getProductQuantityAndPrice = getProductQuantityAndPrice(order.orderProducts, product), quantity = _getProductQuantityAndPrice.quantity, price = _getProductQuantityAndPrice.price;
133
79
  if (quantity === 0) {
134
80
  return null;
135
81
  }
136
82
  return {
137
- key: modifierId,
138
- name: " - ".concat((modifier === null || modifier === void 0 ? void 0 : modifier.name) || ''),
83
+ key: product.id,
84
+ name: product.name,
139
85
  quantity: /*#__PURE__*/ jsxs("div", {
140
86
  className: "quantity",
141
87
  children: [
@@ -154,38 +100,19 @@ var useTableData = function(param) {
154
100
  return product.productCategoryId;
155
101
  })));
156
102
  return productCategories.reduce(function(previousValues, categoryId) {
157
- var productsForCategory = order === null || order === void 0 ? void 0 : order.products.filter(function(product) {
103
+ var products = order.products.filter(function(product) {
158
104
  return product.productCategoryId === categoryId;
159
105
  });
160
- var products = order.orderProducts.filter(function(el) {
161
- return productsForCategory.map(function(product) {
162
- return product.id;
163
- }).includes(el.productId);
164
- });
165
106
  if (!products.length) {
166
107
  return previousValues;
167
108
  }
168
- var productsWithReworkedModifier = products.map(function(product) {
169
- if (!product.orderProductModifiers.length) return product;
170
- return reworkProductStructure(product);
171
- });
172
- var filteredProducts = flatten(productsWithReworkedModifier).map(function(product) {
173
- return renderProductItem({
174
- product: product,
175
- productsForCategory: productsForCategory
176
- });
177
- });
178
- var productWithModifier = flatMap(filteredProducts, function(item) {
179
- return [
180
- item
181
- ].concat(_to_consumable_array(item.modifier));
182
- });
109
+ var filteredProducts = products.map(renderProductItem).filter(Boolean);
183
110
  if (!filteredProducts.length) {
184
111
  return previousValues;
185
112
  }
186
113
  return _to_consumable_array(previousValues).concat([
187
- renderCategoryItem(productsForCategory)
188
- ], _to_consumable_array(productWithModifier));
114
+ renderCategoryItem(products)
115
+ ], _to_consumable_array(filteredProducts));
189
116
  }, []);
190
117
  };
191
118
  var renderSummaryItems = function(summaryItems) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/payment/order-items-table/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,0DAA0D,CAAA;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAU5F,oBAAY,mBAAmB;IAC7B,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,GAAG,QAAQ;CACZ;AAED,UAAU,qBAAqB;IAC7B,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,mBAAmB,UACvB,KAAK,2BACa,qBAAqB,EAAE,WAuBjD,CAAA;AAED,eAAO,MAAM,sBAAsB,aAAc,KAAK,CAAC,UAAU,CAAC,WAUjE,CAAA;AAED,eAAO,MAAM,0BAA0B,kBACtB,KAAK,CAAC,eAAe,CAAC,WAC5B,OAAO;;;CAMjB,CAAA;AAED,eAAO,MAAM,qBAAqB,aACtB,KAAK,CAAC,UAAU,CAAC,oBACT,MAAM,KACvB,MAgCF,CAAA;AAED,eAAO,MAAM,wBAAwB,kBAAmB,aAAa;;;GAIhE,CAAA;AAEL,eAAO,MAAM,qBAAqB,kBACjB,KAAK,CAAC,eAAe,CAAC,YAC3B,OAAO,EAAE,WA8Bd,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/payment/order-items-table/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,0DAA0D,CAAA;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAS5F,oBAAY,mBAAmB;IAC7B,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,GAAG,QAAQ;CACZ;AAED,UAAU,qBAAqB;IAC7B,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,mBAAmB,UACvB,KAAK,2BACa,qBAAqB,EAAE,WAsBjD,CAAA;AAED,eAAO,MAAM,sBAAsB,aAAc,KAAK,CAAC,UAAU,CAAC,WAUjE,CAAA;AAED,eAAO,MAAM,0BAA0B,kBACtB,KAAK,CAAC,eAAe,CAAC,WAC5B,OAAO;;;CAMjB,CAAA;AAED,eAAO,MAAM,qBAAqB,aACtB,KAAK,CAAC,UAAU,CAAC,oBACT,MAAM,KACvB,MAgCF,CAAA;AAED,eAAO,MAAM,wBAAwB,kBAAmB,aAAa;;;GAIhE,CAAA;AAEL,eAAO,MAAM,qBAAqB,kBACjB,KAAK,CAAC,eAAe,CAAC,YAC3B,OAAO,EAAE,WASd,CAAA"}
@@ -91,22 +91,7 @@ var getExternalPaymentDetail = function(paymentDetail) {
91
91
  };
92
92
  var getTotalSumByCategory = function(orderProducts, products) {
93
93
  return products.reduce(function(prevSum, product) {
94
- var _orderProducts_find;
95
94
  var _getProductQuantityAndPrice = getProductQuantityAndPrice(orderProducts, product), quantity = _getProductQuantityAndPrice.quantity, price = _getProductQuantityAndPrice.price;
96
- var modifierFromProduct = (_orderProducts_find = orderProducts.find(function(orderProduct) {
97
- return orderProduct.productId === product.id;
98
- })) === null || _orderProducts_find === void 0 ? void 0 : _orderProducts_find.orderProductModifiers;
99
- if (modifierFromProduct) {
100
- var modifierPrice = modifierFromProduct.reduce(function(prevSum, param) {
101
- var modifiers = param.modifiers;
102
- var modifiersPrices = modifiers.reduce(function(prevSumModifier, modifier) {
103
- return prevSumModifier + modifier.price * modifier.quantity;
104
- }, 0);
105
- return prevSum + modifiersPrices;
106
- }, 0);
107
- var priceWithModifier = price + modifierPrice;
108
- return prevSum + priceWithModifier * quantity;
109
- }
110
95
  return prevSum + price * quantity;
111
96
  }, 0);
112
97
  };
@@ -30,7 +30,7 @@ function _unsupported_iterable_to_array(o, minLen) {
30
30
  var paymentNotProcessedSummary = function(param) {
31
31
  var order = param.order, externalDiscount = param.externalDiscount, paymentDetail = param.paymentDetail;
32
32
  var externalPaymentDetail = paymentDetail ? getExternalPaymentDetail(paymentDetail) : undefined;
33
- var total = (order === null || order === void 0 ? void 0 : order.fullAmount) || calculateTotalPrice(order, externalPaymentDetail);
33
+ var total = calculateTotalPrice(order, externalPaymentDetail);
34
34
  var summaryItems = [
35
35
  {
36
36
  translateKey: AMOUNT_TOTAL,
@@ -56,7 +56,7 @@ var processedPaymentSummary = function(param) {
56
56
  price: getPaymentValueByType(order.payments, key)
57
57
  };
58
58
  });
59
- var total = order.fullAmount || calculateTotalPrice(order, externalPaymentDetail);
59
+ var total = calculateTotalPrice(order, externalPaymentDetail);
60
60
  var totalDiscount = calculateTotalDiscount(order.payments);
61
61
  var summaryItems = [
62
62
  {
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentPage.d.ts","sourceRoot":"","sources":["../../../../src/iframe/payment/payment-page/PaymentPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAA;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAA;AAI9F,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAA;AAOnC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,UAAU,YAAa,SAAQ,oBAAoB;IACjD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,IAAI,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,eAAe,CAAC,EAAE,eAAe,CAAA;CAClC;AAED,eAAO,MAAM,WAAW,kIAQrB,YAAY,4CA+Md,CAAA"}
1
+ {"version":3,"file":"PaymentPage.d.ts","sourceRoot":"","sources":["../../../../src/iframe/payment/payment-page/PaymentPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAA;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAA;AAI9F,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAA;AAOnC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,UAAU,YAAa,SAAQ,oBAAoB;IACjD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,IAAI,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,eAAe,CAAC,EAAE,eAAe,CAAA;CAClC;AAED,eAAO,MAAM,WAAW,kIAQrB,YAAY,4CAiNd,CAAA"}
@@ -189,8 +189,6 @@ var PaymentPage = function(_param) {
189
189
  var isCalculatedAmountGreaterThanOrderAmount = !hasRemaingToPay && orderCartAmountByFormValues > (data === null || data === void 0 ? void 0 : data.amount);
190
190
  var isPaymentLinkWithRemainingToPay = (data === null || data === void 0 ? void 0 : data.remaining_to_pay) && !!Number(data === null || data === void 0 ? void 0 : data.remaining_to_pay);
191
191
  var totalPaidWithRemainingToPay = (data === null || data === void 0 ? void 0 : data.amount_to_pay) && !!Number(data === null || data === void 0 ? void 0 : data.amount_to_pay);
192
- var _bookingSummaryProps_transactionFee;
193
- var totalBooked = paymentMetadata ? paymentMetadata.paid ? paymentMetadata.total - paymentMetadata.paid : paymentMetadata.total : orderTotalAmountByFormValues + ((_bookingSummaryProps_transactionFee = bookingSummaryProps === null || bookingSummaryProps === void 0 ? void 0 : bookingSummaryProps.transactionFee) !== null && _bookingSummaryProps_transactionFee !== void 0 ? _bookingSummaryProps_transactionFee : 0);
194
192
  return /*#__PURE__*/ jsx(Page, {
195
193
  className: "payment_link",
196
194
  children: /*#__PURE__*/ jsx(PageBody, {
@@ -207,9 +205,8 @@ var PaymentPage = function(_param) {
207
205
  rightBlock: /*#__PURE__*/ jsx(PageBody.RightBlock, {
208
206
  children: /*#__PURE__*/ jsx(BookingSummary, _object_spread_props(_object_spread({}, bookingSummaryProps), {
209
207
  isPaymentPage: true,
210
- headerTitle: t('totalBooking'),
211
208
  headerComponent: /*#__PURE__*/ jsx(SummaryTotalBlock, {
212
- amount: totalBooked
209
+ amount: paymentMetadata ? paymentMetadata.total : orderTotalAmountByFormValues + ((bookingSummaryProps === null || bookingSummaryProps === void 0 ? void 0 : bookingSummaryProps.transactionFee) || 0)
213
210
  }),
214
211
  footer: /*#__PURE__*/ jsx("div", {
215
212
  className: "d-flex flex-column justify-content-between",
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ export { ErrorFallback } from './error/ErrorFallback.js';
23
23
  export { ProductSetShortForm } from './events/edit-event-modal/component/ProductSetShortForm/ProductSetShortForm.js';
24
24
  export { SelectEventProductSet } from './events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js';
25
25
  export { EditEventForm } from './events/edit-event-modal/component/EditEventForm/EditEventForm.js';
26
- export { DEFAULT_RECURRENT_MODE_TYPE, EditRecurrentEventModal, MODE_ALL_EVENTS, MODE_THIS_AND_FOLLOWING_EVENTS, MODE_THIS_EVENT, RECURRENT_MODE_TYPES_LIST, RECURRENT_MODE_TYPES_WITHOUT_ALL } from './events/edit-recurrent-event-modal/EditRecurrentEventModal.js';
26
+ export { DEFAULT_RECURRENT_MODE_TYPE, EditRecurrentEventModal, MODE_ALL_EVENTS, MODE_THIS_AND_FOLLOWING_EVENTS, MODE_THIS_EVENT, RECURRENT_MODE_TYPES_LIST } from './events/edit-recurrent-event-modal/EditRecurrentEventModal.js';
27
27
  export { EventCard } from './events/event-card/EventCard.js';
28
28
  export { EventCardSkeleton } from './events/event-card/EventCardSkeleton.js';
29
29
  export { EventStatisticModal } from './events/event-statistic-modal/EventStatisticModal.js';
@@ -1,7 +1,6 @@
1
1
  import { FormValues } from '@licklist/plugins/dist/types/services/Form/hook-form-service';
2
2
  import { VenueMapSet } from '@licklist/core/dist/DataMapper/Product/VenueMapSetDataMapper';
3
3
  import { ServerError } from '@licklist/plugins/dist/hooks/Api/useHttpQuery';
4
- import { ModifierSet } from '@licklist/core/dist/DataMapper/Product/ModifierSetDataMapper';
5
4
  import { ProviderBookingManagementSetting } from '@licklist/core/dist/DataMapper/Provider/ProviderBookingManagementSettingDataMapper';
6
5
  import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper';
7
6
  import { WorkHour } from '@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper';
@@ -38,7 +37,6 @@ export interface ProductSetFormProps extends WithIsLoading, ProductSetControlSha
38
37
  saleDeadline?: number;
39
38
  isCreateNewOverrides?: boolean;
40
39
  timeZone: string;
41
- modifiersSetList?: ModifierSet[];
42
40
  }
43
- export declare function ProductSetForm({ companyName, isLoading, defaultValues, onSubmitAndRedirect, onSubmitNoRedirect, productGroupList, modifiersSetList, serverErrors, providerHasMap, venueMapSets, providerHasBookingManagement, zones, isCreateAction, workHours, saleDeadline, isOverrides, isCreateNewOverrides, timeZone, ...shared }: ProductSetFormProps): import("react/jsx-runtime").JSX.Element;
41
+ export declare function ProductSetForm({ companyName, isLoading, defaultValues, onSubmitAndRedirect, onSubmitNoRedirect, productGroupList, serverErrors, providerHasMap, venueMapSets, providerHasBookingManagement, zones, isCreateAction, workHours, saleDeadline, isOverrides, isCreateNewOverrides, timeZone, ...shared }: ProductSetFormProps): import("react/jsx-runtime").JSX.Element;
44
42
  //# sourceMappingURL=ProductSetForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAA;AAIzF,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAA;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAA;AAI1F,OAAO,EAAE,gCAAgC,EAAE,MAAM,oFAAoF,CAAA;AACrI,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAA;AAGrF,OAAO,EAEL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAQ3D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAA;CACnB;AACD,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAA;CACX;AACD,MAAM,WAAW,oBACf,SAAQ,UAAU,EAChB,cAAc,EACd,uBAAuB;IACzB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,mBACf,SAAQ,aAAa,EACnB,uBAAuB;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC,mBAAmB,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAC3D,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAC3D,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAA;IAC/B,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;IAC5B,4BAA4B,CAAC,EAAE,gCAAgC,CAAC,sBAAsB,CAAC,CAAA;IACvF,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,EAAE,MAAM,CAAA;IAChB,gBAAgB,CAAC,EAAE,WAAW,EAAE,CAAA;CACjC;AAED,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,cAAsB,EACtB,YAAiB,EACjB,4BAA4B,EAC5B,KAAK,EACL,cAAc,EACd,SAAS,EACT,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,QAAQ,EACR,GAAG,MAAM,EACV,EAAE,mBAAmB,2CAkKrB"}
1
+ {"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAA;AAIzF,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAA;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAK3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oFAAoF,CAAA;AACrI,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAA;AAGrF,OAAO,EAEL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAI3D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAA;CACnB;AACD,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAA;CACX;AACD,MAAM,WAAW,oBACf,SAAQ,UAAU,EAChB,cAAc,EACd,uBAAuB;IACzB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,mBACf,SAAQ,aAAa,EACnB,uBAAuB;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC,mBAAmB,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAC3D,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAC3D,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAA;IAC/B,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;IAC5B,4BAA4B,CAAC,EAAE,gCAAgC,CAAC,sBAAsB,CAAC,CAAA;IACvF,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,cAAsB,EACtB,YAAiB,EACjB,4BAA4B,EAC5B,KAAK,EACL,cAAc,EACd,SAAS,EACT,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,QAAQ,EACR,GAAG,MAAM,EACV,EAAE,mBAAmB,2CAiKrB"}
@@ -10,7 +10,7 @@ import { Dialog } from '../../modals/dialog/Dialog.js';
10
10
  import { useDialogContext } from '../../modals/dialog/DialogContext.js';
11
11
  import { ProductSetControl } from '../control/ProductSetControl.js';
12
12
  import { ProductSetContextProvider, ProductSetLoadingContext } from './context.js';
13
- import { updateModifiersSetAtProductSetForm, getFilteredTemplates, checkAvailableTimesErrors } from '../utils/index.js';
13
+ import { getFilteredTemplates, checkAvailableTimesErrors } from '../utils/index.js';
14
14
  import { ErrorModal } from '../../iframe/order-process/components/ErrorModal/ErrorModal.js';
15
15
 
16
16
  function _array_like_to_array(arr, len) {
@@ -139,14 +139,13 @@ function _unsupported_iterable_to_array(o, minLen) {
139
139
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
140
140
  }
141
141
  function ProductSetForm(_param) {
142
- var companyName = _param.companyName, isLoading = _param.isLoading, defaultValues = _param.defaultValues, onSubmitAndRedirect = _param.onSubmitAndRedirect, onSubmitNoRedirect = _param.onSubmitNoRedirect, productGroupList = _param.productGroupList, modifiersSetList = _param.modifiersSetList, serverErrors = _param.serverErrors, _param_providerHasMap = _param.providerHasMap, providerHasMap = _param_providerHasMap === void 0 ? false : _param_providerHasMap, _param_venueMapSets = _param.venueMapSets, venueMapSets = _param_venueMapSets === void 0 ? [] : _param_venueMapSets, providerHasBookingManagement = _param.providerHasBookingManagement, zones = _param.zones, isCreateAction = _param.isCreateAction, workHours = _param.workHours; _param.saleDeadline; var isOverrides = _param.isOverrides, isCreateNewOverrides = _param.isCreateNewOverrides, timeZone = _param.timeZone, shared = _object_without_properties(_param, [
142
+ var companyName = _param.companyName, isLoading = _param.isLoading, defaultValues = _param.defaultValues, onSubmitAndRedirect = _param.onSubmitAndRedirect, onSubmitNoRedirect = _param.onSubmitNoRedirect, productGroupList = _param.productGroupList, serverErrors = _param.serverErrors, _param_providerHasMap = _param.providerHasMap, providerHasMap = _param_providerHasMap === void 0 ? false : _param_providerHasMap, _param_venueMapSets = _param.venueMapSets, venueMapSets = _param_venueMapSets === void 0 ? [] : _param_venueMapSets, providerHasBookingManagement = _param.providerHasBookingManagement, zones = _param.zones, isCreateAction = _param.isCreateAction, workHours = _param.workHours; _param.saleDeadline; var isOverrides = _param.isOverrides, isCreateNewOverrides = _param.isCreateNewOverrides, timeZone = _param.timeZone, shared = _object_without_properties(_param, [
143
143
  "companyName",
144
144
  "isLoading",
145
145
  "defaultValues",
146
146
  "onSubmitAndRedirect",
147
147
  "onSubmitNoRedirect",
148
148
  "productGroupList",
149
- "modifiersSetList",
150
149
  "serverErrors",
151
150
  "providerHasMap",
152
151
  "venueMapSets",
@@ -163,7 +162,7 @@ function ProductSetForm(_param) {
163
162
  var _useDialogContext = useDialogContext(), isShownDialog = _useDialogContext.isShownDialog, onBeforeUnload = _useDialogContext.onBeforeUnload, onPopState = _useDialogContext.onPopState, onApproveDialog = _useDialogContext.onApproveDialog, onDeclineDialog = _useDialogContext.onDeclineDialog;
164
163
  var _useState = _sliced_to_array(useState(''), 2), errorMessage = _useState[0], setErrorMessage = _useState[1];
165
164
  var form = useForm({
166
- defaultValues: updateModifiersSetAtProductSetForm(defaultValues),
165
+ defaultValues: defaultValues,
167
166
  mode: 'onChange'
168
167
  });
169
168
  var setError = form.setError, reset = form.reset;
@@ -184,7 +183,7 @@ function ProductSetForm(_param) {
184
183
  if (!defaultValues || isEqual(defaultValues, formValues)) {
185
184
  return;
186
185
  }
187
- reset(updateModifiersSetAtProductSetForm(defaultValues));
186
+ reset(defaultValues);
188
187
  // eslint-disable-next-line react-hooks/exhaustive-deps
189
188
  }, [
190
189
  defaultValues
@@ -218,7 +217,6 @@ function ProductSetForm(_param) {
218
217
  return /*#__PURE__*/ jsxs(ProductSetContextProvider, {
219
218
  productGroupList: productGroupList,
220
219
  providerHasMap: providerHasMap,
221
- modifiersSetList: modifiersSetList,
222
220
  venueMapSets: venueMapSets,
223
221
  providerHasBookingManagement: providerHasBookingManagement,
224
222
  zones: zones,
@@ -1 +1 @@
1
- {"version":3,"file":"ProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductsControl.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAA;AAC/F,OAAO,EAAkB,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAA;AAI9E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAQhD,UAAU,oBAAqB,SAAQ,aAAa;IAClD,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAA;IACvE,SAAS,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,YAAY,CAAA;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AA+BD,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,oBAAoB,2CAkPtB"}
1
+ {"version":3,"file":"ProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductsControl.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAA;AAC/F,OAAO,EAAkB,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAA;AAI9E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAQhD,UAAU,oBAAqB,SAAQ,aAAa;IAClD,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAA;IACvE,SAAS,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,YAAY,CAAA;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AA6BD,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,oBAAoB,2CAkOtB"}