@licklist/design 0.71.19-stage.3 → 0.71.20

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/component/SelectEventProductSet/component/EditEventProductSet.js +0 -1
  2. package/dist/iframe/activity-card/ActivityCard.d.ts +2 -1
  3. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
  4. package/dist/iframe/activity-card/ActivityCard.js +7 -1
  5. package/dist/iframe/event/ticket-description/TicketDescription.d.ts +1 -3
  6. package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
  7. package/dist/iframe/event/ticket-description/TicketDescription.js +7 -10
  8. package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts +1 -5
  9. package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts.map +1 -1
  10. package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.js +1 -12
  11. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts +0 -4
  12. package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
  13. package/dist/iframe/order-process/components/BookingSummary/utils/index.js +2 -29
  14. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  15. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +2 -106
  16. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -3
  17. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  18. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -95
  19. package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
  20. package/dist/iframe/payment/order-items-table/hooks/useTableData.js +10 -83
  21. package/dist/iframe/payment/order-items-table/utils/index.d.ts.map +1 -1
  22. package/dist/iframe/payment/order-items-table/utils/index.js +0 -15
  23. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +2 -2
  24. package/dist/index.js +1 -1
  25. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  26. package/dist/product-set/form/ProductCategoriesControl.js +2 -48
  27. package/dist/product-set/form/ProductSetForm.d.ts +1 -3
  28. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  29. package/dist/product-set/form/ProductSetForm.js +4 -6
  30. package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
  31. package/dist/product-set/form/ProductsControl.js +5 -24
  32. package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
  33. package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
  34. package/dist/product-set/form/SelectCategoryModal.js +1 -1
  35. package/dist/product-set/form/context.d.ts +1 -3
  36. package/dist/product-set/form/context.d.ts.map +1 -1
  37. package/dist/product-set/form/context.js +1 -2
  38. package/dist/product-set/product/ProductControl.d.ts +0 -8
  39. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  40. package/dist/product-set/product/ProductControl.js +1 -25
  41. package/dist/product-set/utils/index.d.ts +0 -88
  42. package/dist/product-set/utils/index.d.ts.map +1 -1
  43. package/dist/product-set/utils/index.js +1 -19
  44. package/dist/report/ReportRunnerModal/ReportRunnerModal.d.ts +1 -1
  45. package/dist/report/ReportRunnerModal/ReportRunnerModal.d.ts.map +1 -1
  46. package/dist/sales/coupon/utils/index.d.ts +1 -2
  47. package/dist/sales/coupon/utils/index.d.ts.map +1 -1
  48. package/dist/sales/modals/refund-modal/RefundModal.d.ts +2 -6
  49. package/dist/sales/modals/refund-modal/RefundModal.d.ts.map +1 -1
  50. package/dist/sales/modals/refund-modal/RefundModal.js +4 -8
  51. package/dist/sales/modals/refund-modal/index.d.ts +2 -2
  52. package/dist/sales/modals/refund-modal/index.d.ts.map +1 -1
  53. package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
  54. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  55. package/dist/sortable-tree/SortableTreeItem.js +4 -10
  56. package/dist/styles/date-time-button/DateTimeButton.scss +1 -8
  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 +2 -36
  63. package/dist/styles/sales/ManualBooking.scss +0 -6
  64. package/dist/styles/themes/bookedit/index.scss +0 -19
  65. package/package.json +7 -8
  66. package/src/iframe/activity-card/ActivityCard.stories.tsx +2 -0
  67. package/src/iframe/activity-card/ActivityCard.tsx +4 -0
  68. package/src/iframe/event/ticket-description/TicketDescription.tsx +4 -11
  69. package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +2 -24
  70. package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -43
  71. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +75 -155
  72. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +1 -58
  73. package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +14 -84
  74. package/src/iframe/payment/order-items-table/utils/index.ts +0 -23
  75. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +2 -2
  76. package/src/product-set/form/ProductCategoriesControl.tsx +2 -38
  77. package/src/product-set/form/ProductSetForm.tsx +3 -11
  78. package/src/product-set/form/ProductsControl.tsx +15 -33
  79. package/src/product-set/form/SelectCategoryModal.tsx +2 -2
  80. package/src/product-set/form/context.tsx +0 -5
  81. package/src/product-set/product/ProductControl.tsx +1 -37
  82. package/src/product-set/utils/index.ts +0 -19
  83. package/src/report/ReportRunnerModal/ReportRunnerModal.tsx +1 -1
  84. package/src/sales/coupon/utils/index.ts +3 -5
  85. package/src/sales/modals/refund-modal/RefundModal.tsx +6 -15
  86. package/src/sales/modals/refund-modal/index.ts +2 -7
  87. package/src/sortable-tree/SortableTreeItem.tsx +1 -13
  88. package/src/styles/date-time-button/DateTimeButton.scss +1 -8
  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 +2 -36
  95. package/src/styles/sales/ManualBooking.scss +0 -6
  96. package/src/styles/themes/bookedit/index.scss +0 -19
  97. package/yarn.lock +366 -339
  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 -411
  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 -401
  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
@@ -33,7 +33,6 @@ import '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper';
33
33
  import 'react-bootstrap/Collapse';
34
34
  import '@licklist/plugins/dist/hooks/Media/useImages';
35
35
  import '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
36
- import 'react-select';
37
36
  import '@licklist/plugins/dist/context/app/hooks/useNotification';
38
37
  import '../../../../../static/index.js';
39
38
  import '../../../../../tiptap-editor/TipTapEditor.js';
@@ -6,6 +6,7 @@ export declare const LAYOUT_GRID = "grid";
6
6
  export declare const LAYOUT_LIST = "list";
7
7
  export type ActivityCardProps = {
8
8
  title: ReactNode;
9
+ duration: ReactNode;
9
10
  price: ReactNode;
10
11
  description?: ReactNode;
11
12
  onSelect: () => void;
@@ -16,5 +17,5 @@ export type ActivityCardProps = {
16
17
  resources?: ZoneResourcesAvailability;
17
18
  availabilityFormat?: AvailabilityFormat | null;
18
19
  };
19
- export declare const ActivityCard: ({ title, price, description, availableTimes, image, onSelect, isSelected, layout, availabilityFormat, resources, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, availabilityFormat, resources, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
20
21
  //# sourceMappingURL=ActivityCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AACpH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAA;AAG9F,eAAO,MAAM,WAAW,SAAS,CAAA;AACjC,eAAO,MAAM,WAAW,SAAS,CAAA;AAEjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,SAAS,CAAA;IAChB,KAAK,EAAE,SAAS,CAAA;IAChB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,WAAW,GAAG,OAAO,WAAW,CAAA;IAChD,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,yBAAyB,CAAA;IACrC,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,YAAY,uHAWtB,iBAAiB,4CA2DnB,CAAA"}
1
+ {"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AACpH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAA;AAG9F,eAAO,MAAM,WAAW,SAAS,CAAA;AACjC,eAAO,MAAM,WAAW,SAAS,CAAA;AAEjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,EAAE,SAAS,CAAA;IAChB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,WAAW,GAAG,OAAO,WAAW,CAAA;IAChD,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,yBAAyB,CAAA;IACrC,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,YAAY,iIAYtB,iBAAiB,4CA6DnB,CAAA"}
@@ -5,7 +5,7 @@ import { AvailabilityIndicator } from '../../availability-indicator/Availability
5
5
  var LAYOUT_GRID = 'grid';
6
6
  var LAYOUT_LIST = 'list';
7
7
  var ActivityCard = function(param) {
8
- var title = param.title, price = param.price, description = param.description, availableTimes = param.availableTimes, image = param.image, onSelect = param.onSelect, isSelected = param.isSelected, _param_layout = param.layout, layout = _param_layout === void 0 ? LAYOUT_GRID : _param_layout, availabilityFormat = param.availabilityFormat, resources = param.resources;
8
+ var title = param.title, duration = param.duration, price = param.price, description = param.description, availableTimes = param.availableTimes, image = param.image, onSelect = param.onSelect, isSelected = param.isSelected, _param_layout = param.layout, layout = _param_layout === void 0 ? LAYOUT_GRID : _param_layout, availabilityFormat = param.availabilityFormat, resources = param.resources;
9
9
  if (layout === LAYOUT_GRID) {
10
10
  return /*#__PURE__*/ jsxs("button", {
11
11
  type: "button",
@@ -24,6 +24,9 @@ var ActivityCard = function(param) {
24
24
  className: "activity-card-title",
25
25
  children: title
26
26
  }),
27
+ duration && /*#__PURE__*/ jsx("div", {
28
+ children: duration
29
+ }),
27
30
  price && /*#__PURE__*/ jsx("div", {
28
31
  children: price
29
32
  }),
@@ -61,6 +64,9 @@ var ActivityCard = function(param) {
61
64
  availableTimes && /*#__PURE__*/ jsx("div", {
62
65
  children: availableTimes
63
66
  }),
67
+ duration && /*#__PURE__*/ jsx("div", {
68
+ children: duration
69
+ }),
64
70
  price && /*#__PURE__*/ jsx("div", {
65
71
  children: price
66
72
  }),
@@ -4,13 +4,11 @@ interface TicketDescriptionProps {
4
4
  title: string;
5
5
  description: string;
6
6
  className?: string;
7
- classNameProductModal?: string;
8
7
  images: Image[] | null;
9
8
  price?: ReactNode;
10
9
  isRequired?: boolean;
11
10
  canExpand?: boolean;
12
- isModal?: boolean;
13
11
  }
14
- export declare function TicketDescription({ title, description, className, classNameProductModal, images, price, isRequired, canExpand, isModal }: TicketDescriptionProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function TicketDescription({ title, description, className, images, price, isRequired, canExpand, }: TicketDescriptionProps): import("react/jsx-runtime").JSX.Element;
15
13
  export {};
16
14
  //# sourceMappingURL=TicketDescription.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TicketDescription.d.ts","sourceRoot":"","sources":["../../../../src/iframe/event/ticket-description/TicketDescription.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAY,MAAM,OAAO,CAAA;AAE1D,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAA;AAK7D,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAID,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,SAAc,EACd,qBAA0B,EAC1B,MAAM,EACN,KAAK,EACL,UAAkB,EAClB,SAAgB,EAChB,OAAc,EACf,EAAE,sBAAsB,2CAmDxB"}
1
+ {"version":3,"file":"TicketDescription.d.ts","sourceRoot":"","sources":["../../../../src/iframe/event/ticket-description/TicketDescription.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAY,MAAM,OAAO,CAAA;AAE1D,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAA;AAK7D,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAID,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,SAAc,EACd,MAAM,EACN,KAAK,EACL,UAAkB,EAClB,SAAgB,GACjB,EAAE,sBAAsB,2CAiDxB"}
@@ -54,7 +54,7 @@ function _unsupported_iterable_to_array(o, minLen) {
54
54
  }
55
55
  var DESCRIPTION_MAX_LENGTH = 120;
56
56
  function TicketDescription(param) {
57
- var title = param.title, description = param.description, _param_className = param.className, className = _param_className === void 0 ? '' : _param_className, _param_classNameProductModal = param.classNameProductModal, classNameProductModal = _param_classNameProductModal === void 0 ? '' : _param_classNameProductModal, images = param.images, price = param.price, _param_isRequired = param.isRequired, isRequired = _param_isRequired === void 0 ? false : _param_isRequired, _param_canExpand = param.canExpand, canExpand = _param_canExpand === void 0 ? true : _param_canExpand, _param_isModal = param.isModal, isModal = _param_isModal === void 0 ? false : _param_isModal;
57
+ var title = param.title, description = param.description, _param_className = param.className, className = _param_className === void 0 ? '' : _param_className, images = param.images, price = param.price, _param_isRequired = param.isRequired, isRequired = _param_isRequired === void 0 ? false : _param_isRequired, _param_canExpand = param.canExpand, canExpand = _param_canExpand === void 0 ? true : _param_canExpand;
58
58
  var _useState = _sliced_to_array(useState(false), 2), isDescriptionExpanded = _useState[0], setIsDescriptionExpanded = _useState[1];
59
59
  var wrapperClasses = clsx('ticket-description', className);
60
60
  var imageSrc = images ? MediaService.getImageSrc(images, THUMBNAIL_IMAGE_SIZE) : null;
@@ -68,12 +68,11 @@ function TicketDescription(param) {
68
68
  className: "ticket-description__wrapper",
69
69
  style: descriptionWrapperStyle,
70
70
  children: /*#__PURE__*/ jsxs("div", {
71
- className: clsx('ticket-description__wrapper-children', classNameProductModal),
71
+ className: "ticket-description__wrapper-children",
72
72
  children: [
73
73
  imageSrc && /*#__PURE__*/ jsx("div", {
74
- className: clsx('image-wrapper', classNameProductModal && 'w-100 h-25'),
74
+ className: "image-wrapper",
75
75
  children: /*#__PURE__*/ jsx("img", {
76
- className: clsx(classNameProductModal && 'w-100'),
77
76
  src: imageSrc,
78
77
  alt: title
79
78
  })
@@ -85,14 +84,12 @@ function TicketDescription(param) {
85
84
  children: /*#__PURE__*/ jsx(Description, {
86
85
  title: title,
87
86
  isRequired: isRequired,
88
- description: description,
89
- isModal: isModal
87
+ description: description
90
88
  })
91
89
  }) : /*#__PURE__*/ jsx(Description, {
92
90
  title: title,
93
91
  isRequired: isRequired,
94
- description: description,
95
- isModal: isModal
92
+ description: description
96
93
  })
97
94
  ]
98
95
  })
@@ -107,9 +104,9 @@ function TicketDescription(param) {
107
104
  });
108
105
  }
109
106
  var Description = function(param) {
110
- var title = param.title, isRequired = param.isRequired, description = param.description, isModal = param.isModal;
107
+ var title = param.title, isRequired = param.isRequired, description = param.description;
111
108
  return /*#__PURE__*/ jsx("div", {
112
- className: clsx('description-content', isModal && 'ml-4 mt-2'),
109
+ className: "description-content",
113
110
  children: /*#__PURE__*/ jsxs("div", {
114
111
  className: "d-flex flex-column",
115
112
  children: [
@@ -1,12 +1,8 @@
1
1
  import { OrderItem } from '@licklist/plugins/dist/types/context/Iframe/orderItems';
2
- import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct';
3
- interface IOrderProduct extends OrderItem {
4
- orderProductModifiers?: OrderModifierByProduct[] | null;
5
- }
6
2
  type ProductSummaryProps = {
7
3
  name?: string;
8
4
  productQuantityError?: string;
9
- orderProduct: IOrderProduct;
5
+ orderProduct: OrderItem;
10
6
  };
11
7
  export declare const ProductSummary: ({ name, productQuantityError, orderProduct, }: ProductSummaryProps) => import("react/jsx-runtime").JSX.Element;
12
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAA;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AAKrG,UAAU,aAAc,SAAQ,SAAS;IACvC,qBAAqB,CAAC,EAAG,sBAAsB,EAAE,GAAG,IAAI,CAAC;CAC1D;AAED,KAAK,mBAAmB,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,YAAY,EAAE,aAAa,CAAA;CAC5B,CAAA;AAED,eAAO,MAAM,cAAc,kDAIxB,mBAAmB,4CAyCrB,CAAA"}
1
+ {"version":3,"file":"ProductSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAA;AAElF,KAAK,mBAAmB,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,YAAY,EAAE,SAAS,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,cAAc,kDAIxB,mBAAmB,4CA2BrB,CAAA"}
@@ -1,15 +1,13 @@
1
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { useIntl } from 'react-intl';
4
4
  import * as Config from '@licklist/core/dist/Config';
5
- import { ProductWithModifier } from '../../../CategoryProduct/components/ProductWithModifier/ProductWithModifier.js';
6
5
 
7
6
  var ProductSummary = function(param) {
8
7
  var name = param.name, productQuantityError = param.productQuantityError, orderProduct = param.orderProduct;
9
8
  var t = useTranslation('Design').t;
10
9
  var formatNumber = useIntl().formatNumber;
11
10
  var priceForOneProduct = orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.price;
12
- var modifiersSets = (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderModifiersSets) || (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderProductModifiers);
13
11
  var fullPrice = formatNumber(priceForOneProduct * (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.quantity), {
14
12
  style: 'currency',
15
13
  currency: Config.Currency.GBP
@@ -38,15 +36,6 @@ var ProductSummary = function(param) {
38
36
  })
39
37
  ]
40
38
  }),
41
- !!modifiersSets.length && /*#__PURE__*/ jsx(Fragment, {
42
- children: modifiersSets.map(function(modifier, index) {
43
- return /*#__PURE__*/ jsx(ProductWithModifier, {
44
- modifier: modifier,
45
- modifierKey: index,
46
- isSummary: true
47
- }, modifier.productQuantity.toString());
48
- })
49
- }),
50
39
  productQuantityError && /*#__PURE__*/ jsx("p", {
51
40
  className: "iframe-event__message-error",
52
41
  children: productQuantityError
@@ -1,12 +1,8 @@
1
- import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct';
2
1
  import { QuantityCheckProductInfo } from '@licklist/plugins/dist/types/Api/verifyStock';
3
2
  import { OrderItem } from '@licklist/plugins/dist/types/context/Iframe/orderItems';
4
3
  export declare const cartSumByOrderProducts: ({ orderProducts, isTotalSum, }: {
5
4
  orderProducts?: OrderItem[];
6
5
  isTotalSum?: boolean;
7
6
  }) => number;
8
- export declare const getModifierName: (modifier: OrderModifierByProduct) => string;
9
- export declare const calculateTotalModifiersPrice: (orderModifiersSets: OrderModifierByProduct[]) => number;
10
- export declare const getOrderProductModifiersPrice: (modifierFromProduct: OrderModifierByProduct) => number;
11
7
  export declare const getProductError: (productsWithErrors: QuantityCheckProductInfo[], productId: OrderItem["id"]) => string | undefined;
12
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACvB,MAAM,8DAA8D,CAAA;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAA;AAElF,eAAO,MAAM,sBAAsB,mCAGhC;IACD,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,WAkBA,CAAA;AAED,eAAO,MAAM,eAAe,aAChB,sBAAsB,WAKjC,CAAA;AAED,eAAO,MAAM,4BAA4B,uBACnB,sBAAsB,EAAE,WAUO,CAAA;AAErD,eAAO,MAAM,6BAA6B,wBACnB,sBAAsB,WAU5C,CAAA;AAED,eAAO,MAAM,eAAe,uBACN,wBAAwB,EAAE,aACnC,SAAS,CAAC,IAAI,CAAC,KACzB,MAAM,GAAG,SAGA,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAA;AAElF,eAAO,MAAM,sBAAsB,mCAGhC;IACD,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,WAeA,CAAA;AAED,eAAO,MAAM,eAAe,uBACN,wBAAwB,EAAE,aACnC,SAAS,CAAC,IAAI,CAAC,KACzB,MAAM,GAAG,SAGA,CAAA"}
@@ -5,37 +5,10 @@ var cartSumByOrderProducts = function(param) {
5
5
  }
6
6
  return orderProducts.reduce(function(prevSumValue, product) {
7
7
  if (!product) return 0;
8
- var modifiersPrice = calculateTotalModifiersPrice(product === null || product === void 0 ? void 0 : product.orderModifiersSets);
9
8
  var price = isTotalSum ? product === null || product === void 0 ? void 0 : product.price : product.hasDeposit ? product === null || product === void 0 ? void 0 : product.deposit : product === null || product === void 0 ? void 0 : product.price;
10
- return prevSumValue + price * product.quantity + modifiersPrice;
9
+ return prevSumValue + price * product.quantity;
11
10
  }, 0);
12
11
  };
13
- var getModifierName = function(modifier) {
14
- var modifierName = function(orderModifier) {
15
- var _orderModifier_modifier;
16
- var _orderModifier_modifier_name;
17
- return (_orderModifier_modifier_name = orderModifier === null || orderModifier === void 0 ? void 0 : (_orderModifier_modifier = orderModifier.modifier) === null || _orderModifier_modifier === void 0 ? void 0 : _orderModifier_modifier.name) !== null && _orderModifier_modifier_name !== void 0 ? _orderModifier_modifier_name : orderModifier === null || orderModifier === void 0 ? void 0 : orderModifier.name;
18
- };
19
- return "".concat(modifier.modifiers.map(function(item) {
20
- return (item === null || item === void 0 ? void 0 : item.quantity) > 1 ? "".concat(item === null || item === void 0 ? void 0 : item.quantity, "x - ").concat(modifierName(item)) : modifierName(item);
21
- }).join(', '));
22
- };
23
- var calculateTotalModifiersPrice = function(orderModifiersSets) {
24
- return orderModifiersSets === null || orderModifiersSets === void 0 ? void 0 : orderModifiersSets.map(function(set) {
25
- return set.modifiers.reduce(function(sum, modifier) {
26
- return sum + modifier.price * modifier.quantity * set.productQuantity;
27
- }, 0);
28
- }).reduce(function(total, setTotal) {
29
- return total + setTotal;
30
- }, 0);
31
- };
32
- var getOrderProductModifiersPrice = function(modifierFromProduct) {
33
- var modifiers = modifierFromProduct.modifiers, productQuantity = modifierFromProduct.productQuantity;
34
- var modifiersPrices = modifiers.reduce(function(prevSumModifier, modifier) {
35
- return prevSumModifier + modifier.price * modifier.quantity;
36
- }, 0);
37
- return modifiersPrices * productQuantity;
38
- };
39
12
  var getProductError = function(productsWithErrors, productId) {
40
13
  var _productsWithErrors_find;
41
14
  return (_productsWithErrors_find = productsWithErrors.find(function(productWithError) {
@@ -43,4 +16,4 @@ var getProductError = function(productsWithErrors, productId) {
43
16
  })) === null || _productsWithErrors_find === void 0 ? void 0 : _productsWithErrors_find.message;
44
17
  };
45
18
 
46
- export { calculateTotalModifiersPrice, cartSumByOrderProducts, getModifierName, getOrderProductModifiersPrice, getProductError };
19
+ export { cartSumByOrderProducts, getProductError };
@@ -1 +1 @@
1
- {"version":3,"file":"CategoryProduct.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAU5D,UAAU,oBAAoB;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC/C,eAAe,CAAC,EAAE,wBAAwB,EAAE,CAAA;CAC7C;AAED,eAAO,MAAM,eAAe,sFAMzB,oBAAoB,4CAoPtB,CAAA"}
1
+ {"version":3,"file":"CategoryProduct.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAI5D,UAAU,oBAAoB;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC/C,eAAe,CAAC,EAAE,wBAAwB,EAAE,CAAA;CAC7C;AAED,eAAO,MAAM,eAAe,sFAMzB,oBAAoB,4CA0KtB,CAAA"}
@@ -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"}