@licklist/design 0.44.533 → 0.44.534

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 (112) hide show
  1. package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
  2. package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
  3. package/dist/iframe/event/index.d.ts +0 -1
  4. package/dist/iframe/event/index.d.ts.map +1 -1
  5. package/dist/iframe/index.d.ts +1 -1
  6. package/dist/iframe/index.d.ts.map +1 -1
  7. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  8. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  9. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -1
  10. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -0
  11. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  12. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  13. package/dist/index.d.ts +1 -0
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +1 -1
  16. package/dist/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
  17. package/dist/number-of-people-input/NumberOfPeopleInput.js +1 -0
  18. package/dist/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.d.ts +2 -3
  19. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
  20. package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +1 -0
  21. package/dist/number-of-people-input/components/index.d.ts +2 -0
  22. package/dist/number-of-people-input/components/index.d.ts.map +1 -0
  23. package/dist/number-of-people-input/index.d.ts +3 -0
  24. package/dist/number-of-people-input/index.d.ts.map +1 -0
  25. package/dist/product-set/control/ProductSetControl.d.ts +2 -1
  26. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  27. package/dist/product-set/control/ProductSetControl.js +1 -1
  28. package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
  29. package/dist/product-set/form/ProductCategoriesControl.js +1 -1
  30. package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
  31. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  32. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  33. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +3 -1
  34. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  35. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  36. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  37. package/dist/types/iframe.d.ts +1 -0
  38. package/dist/types/iframe.d.ts.map +1 -1
  39. package/package.json +1 -1
  40. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +0 -9
  41. package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -1
  42. package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +0 -1
  43. package/src/iframe/event/index.ts +0 -1
  44. package/src/iframe/index.ts +0 -1
  45. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +2 -2
  46. package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -1
  47. package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +0 -1
  48. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +5 -0
  49. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  50. package/src/index.ts +1 -0
  51. package/src/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
  52. package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +92 -0
  53. package/src/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.tsx +3 -3
  54. package/src/number-of-people-input/components/index.ts +1 -0
  55. package/src/number-of-people-input/index.ts +2 -0
  56. package/src/product-set/control/ProductSetControl.tsx +36 -0
  57. package/src/product-set/form/ProductCategoriesControl.tsx +0 -1
  58. package/src/product-set/form/ProductSetForm.stories.tsx +2 -6
  59. package/src/product-set/product-category/ProductCategory.stories.tsx +0 -1
  60. package/src/product-set/product-category/ProductCategoryControl.tsx +0 -23
  61. package/src/sales/booking/results/BookingResults.stories.tsx +0 -7
  62. package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +0 -7
  63. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +20 -5
  64. package/src/types/iframe.ts +1 -0
  65. package/dist/iframe/event/event-details/EventDetails.d.ts +0 -10
  66. package/dist/iframe/event/event-details/EventDetails.d.ts.map +0 -1
  67. package/dist/iframe/event/event-details/EventDetails.js +0 -1
  68. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +0 -9
  69. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +0 -1
  70. package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +0 -1
  71. package/dist/iframe/event/event-details/components/category-product/index.d.ts +0 -2
  72. package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +0 -1
  73. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +0 -26
  74. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +0 -1
  75. package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +0 -1
  76. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +0 -2
  77. package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +0 -1
  78. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
  79. package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +0 -1
  80. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
  81. package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +0 -1
  82. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +0 -2
  83. package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +0 -1
  84. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +0 -2
  85. package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +0 -1
  86. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +0 -8
  87. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +0 -1
  88. package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +0 -1
  89. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +0 -2
  90. package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +0 -1
  91. package/dist/iframe/event/event-details/index.d.ts +0 -2
  92. package/dist/iframe/event/event-details/index.d.ts.map +0 -1
  93. package/dist/iframe/event/event-details/utils/index.d.ts +0 -2
  94. package/dist/iframe/event/event-details/utils/index.d.ts.map +0 -1
  95. package/dist/iframe/event/event-details/utils/routes.d.ts +0 -2
  96. package/dist/iframe/event/event-details/utils/routes.d.ts.map +0 -1
  97. package/dist/iframe/event/event-details/utils/routes.js +0 -1
  98. package/src/iframe/event/event-details/EventDetails.stories.tsx +0 -187
  99. package/src/iframe/event/event-details/EventDetails.tsx +0 -92
  100. package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +0 -123
  101. package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +0 -109
  102. package/src/iframe/event/event-details/components/category-product/index.ts +0 -1
  103. package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +0 -250
  104. package/src/iframe/event/event-details/components/event-details-form/index.ts +0 -5
  105. package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +0 -1
  106. package/src/iframe/event/event-details/components/number-of-people-input/index.ts +0 -1
  107. package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +0 -34
  108. package/src/iframe/event/event-details/components/product-category-view/index.ts +0 -1
  109. package/src/iframe/event/event-details/index.ts +0 -1
  110. package/src/iframe/event/event-details/utils/index.ts +0 -1
  111. package/src/iframe/event/event-details/utils/routes.ts +0 -6
  112. /package/dist/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.d.ts +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),a=require("react"),r=(e=a)&&"object"==typeof e&&"default"in e?e.default:e,n=require("react-router-dom"),i=require("react-i18next"),o=require("react-bootstrap");require("../../../iframe/event/event-booking-form/EventBookingForm.js"),require("../../../iframe/event/event-booking-view/EventBookingView.js");var s=require("../../../iframe/event/event-card/IframeEventCard.js");require("../../../iframe/event/event-card/IframeEventCardSkeleton.js"),require("../../../iframe/event/ticket-description/TicketDescription.js");var l=require("../../../iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js");require("../../../iframe/event/event-details/EventDetails.js"),require("../../../iframe/event/event-tables/EventTables.js"),require("../../../iframe/event/event-order-summary/EventOrderSummary.js"),require("../../../iframe/event/event-booking-products/EventBookingProducts.js"),require("../../../iframe/event/event-order-short-summary/EventOrderShortSummary.js"),require("../../../iframe/order-process/components/NavigationFooter/NavigationFooter.js"),require("../../../iframe/event/event-description/EventDescription.js");var m=require("../../../iframe/event/event-product-sets/EventProductSets.js");require("../../../iframe/event/event-step-venue-map-zones/EventStepVenueMapZones.js");var c=require("../../../iframe/event/event-venue-map/IframeEventVenueMap.js");require("../../../iframe/payment/payment-form/PaymentForm.js"),require("../../../iframe/payment/order-items-table/OrderItemsTable.js"),require("../../../iframe/back-button/BackButton.js");var u=require("../context/snippetTemplate.js"),d=require("../../../iframe/page/components/PageHeader/PageHeader.js");require("../../../iframe/payment/payment-status-header/PaymentStatusHeader.js");var p=require("../../../iframe/order-process/components/BookingSummary/BookingSummary.js"),v=require("../../../iframe/order-process/components/NavigationSteps/NavigationSteps.js"),f=require("../../../iframe/order-process/components/Timer/Timer.js");require("../../../iframe/order-process/components/PaymentCard/PaymentCard.js");var E=require("../../../iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.js");require("../../../iframe/order-process/components/ErrorModal/ErrorModal.js");var g=require("../../../iframe/page/components/PageBody/PageBody.js");require("../../../calendar/components/CalendarSelect/CalendarSelect.js"),require("../../../iframe/order-process/components/utils/useCategoryVerification.js"),require("../../../iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js"),require("../../../iframe/powered-by/PoweredBy.js");var y=require("../../../iframe/page/Page.js");require("../../../iframe/payment/payment-page/PaymentPage.js"),require("../../../iframe/payment/payment-status-page/PaymentStatusPage.js"),require("../../../iframe/activity-card/ActivityCard.js"),require("../../../iframe/custom-fields/components/CustomDateField.js");var b=require("../context/snippetTemplateView.js"),N=require("@licklist/core/dist/DataMapper/Provider/SnippetDataMapper"),S=require("../../../calendar/utils/index.js"),C=require("../../../calendar/Calendar.js"),q=require("../settings/SettingButton.js");exports.Preview=function(e){var h=e.onSettingClick,j=e.providerHasMap,B=void 0!==j&&j,k=i.useTranslation("Design").t,P=t.__read(a.useState(0),2),w=P[0],x=P[1],I=t.__read(a.useState(0),2),T=I[0],A=I[1],D=a.useContext(b.SnippetTemplateViewContext).setView,M=a.useContext(u.SnippetTemplateContext).template.type,_=void 0===M?N.SNIPPET_TYPE_EVENT_LIST:M,V=function(e){D(e),h()},F=t.__read(a.useState(C.defaultStartDay),2),H=F[0],X=F[1],O=t.__read(a.useState(null),2),U=O[0],Q=O[1],R=S.getMonthCalendarDates(H);return r.createElement("div",{className:"w-100 h-100 snippet-template-preview"},r.createElement(y.Page,{headerBlock:r.createElement("div",{className:"d-flex mt-5 pt-5 p-5 iframe-page snippet-template-additional-header"},r.createElement(q.SettingButton,{view:"pageHeaderSteps",onClick:V,className:"m-0"},r.createElement(q.SettingButton,{view:"pageHeader",onClick:V,className:"m-0 snippet-template-button-left",containerClassName:"mr-5 asd"}),r.createElement("div",{className:"header-block mt-5 pt-5"},r.createElement("div",{className:"mt-5 pt-5 external-header"},r.createElement(d.PageHeader,{showCloseButton:!0,showBackButton:!0},r.createElement(f.Timer,{timer:600}),r.createElement(n.MemoryRouter,{initialEntries:["/step1","/step2"]},r.createElement(v.NavigationSteps,{steps:[{pathname:"/step1",key:"/step1",name:"Burger"},{pathname:"/step2",key:"/step2",name:"Cheese"}]})))))))},r.createElement("div",{className:"page-body pb-5 mb-5 pt-3 mt-3"},r.createElement(q.SettingButton,{view:"page",onClick:V,className:"snippet-template-body-button"})),r.createElement(g.PageBody,{className:"snippet-template",leftBlock:r.createElement(q.SettingButton,{view:"pageBodyLeftBlock",onClick:V,className:"mr-4"},r.createElement(g.PageBody.LeftBlock,{title:"About this event"},r.createElement(q.SettingButton,{view:"elements",onClick:V,className:"mt-5 m-0",containerClassName:"mt-5 pt-5"},r.createElement("div",{className:"mt-3"},r.createElement("h3",null,k("elements"))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("Texts")),r.createElement("p",null,"XXXX")),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("form")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement("div",{className:"w-100"},r.createElement("div",{className:"form-row"},r.createElement("div",{className:"form-group col-12"},r.createElement("label",{className:"form-label"},k("firstName")),r.createElement("input",{type:"text",className:"form-control",placeholder:k("firstName")}))),r.createElement("div",{className:"form-row"},r.createElement("button",{type:"button",className:"btn btn-link"},k("iHaveAccount")))))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("Number input")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement(l.NumberInput,{value:w,onChange:function(e){return x(e)},onArrowDown:function(){return x((function(e){return e-1}))},onArrowUp:function(){return x((function(e){return e+1}))}}))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("Dropdown")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement("div",{className:"w-100"},r.createElement("div",{className:"form-row"},r.createElement("div",{className:"form-group col-12"},r.createElement("label",{className:"form-label"},k("dayOfBirthShort")),r.createElement("select",{className:"form-control",placeholder:k("firstName")},r.createElement("option",null,"2022"),r.createElement("option",null,"2023"))))))),r.createElement("div",{className:"mt-5 snippet-template__form"},r.createElement("h4",null,k("Button")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement(o.Button,{size:"sm"},"Submit")))),B&&_===N.SNIPPET_TYPE_VENUE_MAP&&r.createElement(r.Fragment,null,r.createElement("div",{className:"pt-4"},r.createElement("h4",null,k("Calendar")),r.createElement(q.SettingButton,{view:"calendar",onClick:V,className:"mt-3 m-0",containerClassName:"mt-5 pt-5"},r.createElement(C.Calendar,{currentDate:H,setCurrentDate:X,selectedDate:U,setSelectedDate:Q,calendarDates:R}))),r.createElement("div",{className:"pt-4"},r.createElement(q.SettingButton,{view:"productSet",onClick:V,className:"mt-3 m-0",containerClassName:"mt-5 pt-5"},r.createElement("h4",null,k("Product Sets")),r.createElement("div",{className:"pt-5 mt-5"},r.createElement(m.EventProductSets,{productSets:[{id:1,name:"Test 1"},{id:2,name:"Test 2"},{id:3,name:"Test 3"}],onSelectProductSet:A,selectedProductSetId:T})))),r.createElement("div",{className:"pt-4"},r.createElement("form",{className:"category-steps-form pt-4 mt-4"},r.createElement("h4",null,k("Venue Map")),r.createElement("div",{className:"position-relative pt-4 mt-4"},r.createElement(q.SettingButton,{view:"venueMap",onClick:V,className:"mt-n6 m-0",containerClassName:"mt-5 pt-5"},r.createElement(c.IframeEventVenueMap,{url:"https://fastly.picsum.photos/id/13/2500/1667.jpg?hmac=SoX9UoHhN8HyklRA4A3vcCWJMVtiBXUg0W4ljWTor7s",usedInIframe:!0,pointProducts:[{id:9,menuStepId:75,pointId:21,productUuid:"beb6393c-2fdd-40f7-bb92-8800685b203f"},{id:10,menuStepId:75,pointId:24,productUuid:"beb6393c-2fdd-40f7-bb92-8800685b203a"}],points:[{id:21,venueMapId:7,createdAt:null,updatedAt:null,deletedAt:null,xCoordinate:799.39,yCoordinate:1108.45},{id:24,venueMapId:7,createdAt:null,updatedAt:null,deletedAt:null,xCoordinate:1400.2,yCoordinate:1431.77}],choosedProductUuids:["beb6393c-2fdd-40f7-bb92-8800685b203f"],products:[{id:148,productCategoryId:57,productGroupId:null,availableQuantity:980,zoneId:null,name:"Cofee",description:"",price:15,deposit:0,minQuantity:1,maxQuantity:15,totalQuantity:980,type:"sale",capacity:0,duration:0,weight:0,isAvailable:!0,isSoldOut:!1,isRequired:!1,isUnlimited:!1,quantitySelector:1,hasSpecialNotes:!1,termsAndConditions:null,subProducts:[],images:null,productCategory:null,uuid:"beb6393c-2fdd-40f7-bb92-8800685b203f"},{id:149,productCategoryId:57,productGroupId:null,availableQuantity:980,zoneId:null,name:"Cofee 2",description:"",price:15,deposit:0,minQuantity:1,maxQuantity:15,totalQuantity:980,type:"sale",capacity:0,duration:0,weight:0,isAvailable:!0,isSoldOut:!1,isRequired:!1,isUnlimited:!1,quantitySelector:1,hasSpecialNotes:!1,termsAndConditions:null,subProducts:[],images:null,productCategory:null,uuid:"beb6393c-2fdd-40f7-bb92-8800685b203a"}]})))))))),rightBlock:r.createElement(g.PageBody.RightBlock,{bottomBlock:r.createElement(E.BookingSummaryFooter,null)},r.createElement(q.SettingButton,{view:"pageBodyRightBlock",onClick:V,containerClassName:"snippet-template-button-fixed-height",className:"m-0"}),r.createElement(p.BookingSummary.Accordion,{showTitleOnlyOnMobile:!0},r.createElement(s.IframeEventCard,{imageSrc:"https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&auto=format&fit=crop&w=687&q=80",title:"XXXX",type:"Party Doors 22:00 - 03:00",cost:6,date:"Sat 2nd May",goToDetails:function(){return null},shortDate:"07/03/2023"})))})))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),a=require("react"),r=(e=a)&&"object"==typeof e&&"default"in e?e.default:e,n=require("react-router-dom"),i=require("react-i18next"),o=require("react-bootstrap");require("../../../iframe/event/event-booking-form/EventBookingForm.js"),require("../../../iframe/event/event-booking-view/EventBookingView.js");var m=require("../../../iframe/event/event-card/IframeEventCard.js");require("../../../iframe/event/event-card/IframeEventCardSkeleton.js"),require("../../../iframe/event/ticket-description/TicketDescription.js"),require("../../../iframe/event/event-tables/EventTables.js"),require("../../../iframe/event/event-order-summary/EventOrderSummary.js"),require("../../../iframe/event/event-booking-products/EventBookingProducts.js"),require("../../../iframe/event/event-order-short-summary/EventOrderShortSummary.js"),require("../../../iframe/order-process/components/NavigationFooter/NavigationFooter.js"),require("../../../iframe/event/event-description/EventDescription.js");var l=require("../../../iframe/event/event-product-sets/EventProductSets.js");require("../../../iframe/event/event-step-venue-map-zones/EventStepVenueMapZones.js");var s=require("../../../iframe/event/event-venue-map/IframeEventVenueMap.js");require("../../../iframe/payment/payment-form/PaymentForm.js"),require("../../../iframe/payment/order-items-table/OrderItemsTable.js"),require("../../../iframe/back-button/BackButton.js");var c=require("../context/snippetTemplate.js"),u=require("../../../iframe/page/components/PageHeader/PageHeader.js");require("../../../iframe/payment/payment-status-header/PaymentStatusHeader.js");var d=require("../../../iframe/order-process/components/BookingSummary/BookingSummary.js"),p=require("../../../iframe/order-process/components/NavigationSteps/NavigationSteps.js"),v=require("../../../iframe/order-process/components/Timer/Timer.js");require("../../../iframe/order-process/components/PaymentCard/PaymentCard.js");var f=require("../../../iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.js"),E=require("../../../iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js");require("../../../iframe/order-process/components/ErrorModal/ErrorModal.js");var g=require("../../../iframe/page/components/PageBody/PageBody.js");require("../../../calendar/components/CalendarSelect/CalendarSelect.js"),require("../../../iframe/order-process/components/utils/useCategoryVerification.js"),require("../../../iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js"),require("../../../iframe/powered-by/PoweredBy.js");var y=require("../../../iframe/page/Page.js");require("../../../iframe/payment/payment-page/PaymentPage.js"),require("../../../iframe/payment/payment-status-page/PaymentStatusPage.js"),require("../../../iframe/activity-card/ActivityCard.js"),require("../../../iframe/custom-fields/components/CustomDateField.js");var b=require("../context/snippetTemplateView.js"),N=require("@licklist/core/dist/DataMapper/Provider/SnippetDataMapper"),S=require("../../../calendar/utils/index.js"),C=require("../../../calendar/Calendar.js"),q=require("../settings/SettingButton.js");exports.Preview=function(e){var h=e.onSettingClick,j=e.providerHasMap,B=void 0!==j&&j,k=i.useTranslation("Design").t,P=t.__read(a.useState(0),2),w=P[0],x=P[1],I=t.__read(a.useState(0),2),T=I[0],A=I[1],M=a.useContext(b.SnippetTemplateViewContext).setView,D=a.useContext(c.SnippetTemplateContext).template.type,_=void 0===D?N.SNIPPET_TYPE_EVENT_LIST:D,V=function(e){M(e),h()},F=t.__read(a.useState(C.defaultStartDay),2),H=F[0],X=F[1],O=t.__read(a.useState(null),2),U=O[0],Q=O[1],R=S.getMonthCalendarDates(H);return r.createElement("div",{className:"w-100 h-100 snippet-template-preview"},r.createElement(y.Page,{headerBlock:r.createElement("div",{className:"d-flex mt-5 pt-5 p-5 iframe-page snippet-template-additional-header"},r.createElement(q.SettingButton,{view:"pageHeaderSteps",onClick:V,className:"m-0"},r.createElement(q.SettingButton,{view:"pageHeader",onClick:V,className:"m-0 snippet-template-button-left",containerClassName:"mr-5 asd"}),r.createElement("div",{className:"header-block mt-5 pt-5"},r.createElement("div",{className:"mt-5 pt-5 external-header"},r.createElement(u.PageHeader,{showCloseButton:!0,showBackButton:!0},r.createElement(v.Timer,{timer:600}),r.createElement(n.MemoryRouter,{initialEntries:["/step1","/step2"]},r.createElement(p.NavigationSteps,{steps:[{pathname:"/step1",key:"/step1",name:"Burger"},{pathname:"/step2",key:"/step2",name:"Cheese"}]})))))))},r.createElement("div",{className:"page-body pb-5 mb-5 pt-3 mt-3"},r.createElement(q.SettingButton,{view:"page",onClick:V,className:"snippet-template-body-button"})),r.createElement(g.PageBody,{className:"snippet-template",leftBlock:r.createElement(q.SettingButton,{view:"pageBodyLeftBlock",onClick:V,className:"mr-4"},r.createElement(g.PageBody.LeftBlock,{title:"About this event"},r.createElement(q.SettingButton,{view:"elements",onClick:V,className:"mt-5 m-0",containerClassName:"mt-5 pt-5"},r.createElement("div",{className:"mt-3"},r.createElement("h3",null,k("elements"))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("Texts")),r.createElement("p",null,"XXXX")),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("form")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement("div",{className:"w-100"},r.createElement("div",{className:"form-row"},r.createElement("div",{className:"form-group col-12"},r.createElement("label",{className:"form-label"},k("firstName")),r.createElement("input",{type:"text",className:"form-control",placeholder:k("firstName")}))),r.createElement("div",{className:"form-row"},r.createElement("button",{type:"button",className:"btn btn-link"},k("iHaveAccount")))))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("Number input")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement(E.NumberInput,{value:w,onChange:function(e){return x(e)},onArrowDown:function(){return x((function(e){return e-1}))},onArrowUp:function(){return x((function(e){return e+1}))}}))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,k("Dropdown")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement("div",{className:"w-100"},r.createElement("div",{className:"form-row"},r.createElement("div",{className:"form-group col-12"},r.createElement("label",{className:"form-label"},k("dayOfBirthShort")),r.createElement("select",{className:"form-control",placeholder:k("firstName")},r.createElement("option",null,"2022"),r.createElement("option",null,"2023"))))))),r.createElement("div",{className:"mt-5 snippet-template__form"},r.createElement("h4",null,k("Button")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement(o.Button,{size:"sm"},"Submit")))),B&&_===N.SNIPPET_TYPE_VENUE_MAP&&r.createElement(r.Fragment,null,r.createElement("div",{className:"pt-4"},r.createElement("h4",null,k("Calendar")),r.createElement(q.SettingButton,{view:"calendar",onClick:V,className:"mt-3 m-0",containerClassName:"mt-5 pt-5"},r.createElement(C.Calendar,{currentDate:H,setCurrentDate:X,selectedDate:U,setSelectedDate:Q,calendarDates:R}))),r.createElement("div",{className:"pt-4"},r.createElement(q.SettingButton,{view:"productSet",onClick:V,className:"mt-3 m-0",containerClassName:"mt-5 pt-5"},r.createElement("h4",null,k("Product Sets")),r.createElement("div",{className:"pt-5 mt-5"},r.createElement(l.EventProductSets,{productSets:[{id:1,name:"Test 1"},{id:2,name:"Test 2"},{id:3,name:"Test 3"}],onSelectProductSet:A,selectedProductSetId:T})))),r.createElement("div",{className:"pt-4"},r.createElement("form",{className:"category-steps-form pt-4 mt-4"},r.createElement("h4",null,k("Venue Map")),r.createElement("div",{className:"position-relative pt-4 mt-4"},r.createElement(q.SettingButton,{view:"venueMap",onClick:V,className:"mt-n6 m-0",containerClassName:"mt-5 pt-5"},r.createElement(s.IframeEventVenueMap,{url:"https://fastly.picsum.photos/id/13/2500/1667.jpg?hmac=SoX9UoHhN8HyklRA4A3vcCWJMVtiBXUg0W4ljWTor7s",usedInIframe:!0,pointProducts:[{id:9,menuStepId:75,pointId:21,productUuid:"beb6393c-2fdd-40f7-bb92-8800685b203f"},{id:10,menuStepId:75,pointId:24,productUuid:"beb6393c-2fdd-40f7-bb92-8800685b203a"}],points:[{id:21,venueMapId:7,createdAt:null,updatedAt:null,deletedAt:null,xCoordinate:799.39,yCoordinate:1108.45},{id:24,venueMapId:7,createdAt:null,updatedAt:null,deletedAt:null,xCoordinate:1400.2,yCoordinate:1431.77}],choosedProductUuids:["beb6393c-2fdd-40f7-bb92-8800685b203f"],products:[{id:148,productCategoryId:57,productGroupId:null,availableQuantity:980,zoneId:null,name:"Cofee",description:"",price:15,deposit:0,minQuantity:1,maxQuantity:15,totalQuantity:980,type:"sale",capacity:0,duration:0,weight:0,isAvailable:!0,isSoldOut:!1,isRequired:!1,isUnlimited:!1,quantitySelector:1,hasSpecialNotes:!1,termsAndConditions:null,subProducts:[],images:null,productCategory:null,uuid:"beb6393c-2fdd-40f7-bb92-8800685b203f"},{id:149,productCategoryId:57,productGroupId:null,availableQuantity:980,zoneId:null,name:"Cofee 2",description:"",price:15,deposit:0,minQuantity:1,maxQuantity:15,totalQuantity:980,type:"sale",capacity:0,duration:0,weight:0,isAvailable:!0,isSoldOut:!1,isRequired:!1,isUnlimited:!1,quantitySelector:1,hasSpecialNotes:!1,termsAndConditions:null,subProducts:[],images:null,productCategory:null,uuid:"beb6393c-2fdd-40f7-bb92-8800685b203a"}]})))))))),rightBlock:r.createElement(g.PageBody.RightBlock,{bottomBlock:r.createElement(f.BookingSummaryFooter,null)},r.createElement(q.SettingButton,{view:"pageBodyRightBlock",onClick:V,containerClassName:"snippet-template-button-fixed-height",className:"m-0"}),r.createElement(d.BookingSummary.Accordion,{showTitleOnlyOnMobile:!0},r.createElement(m.IframeEventCard,{imageSrc:"https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&auto=format&fit=crop&w=687&q=80",title:"XXXX",type:"Party Doors 22:00 - 03:00",cost:6,date:"Sat 2nd May",goToDetails:function(){return null},shortDate:"07/03/2023"})))})))};
@@ -14,6 +14,7 @@ export interface Product {
14
14
  isRequired?: boolean;
15
15
  isUnlimited?: boolean;
16
16
  images: CoreProduct["images"];
17
+ capacity?: number | null;
17
18
  uuid: string;
18
19
  }
19
20
  export interface ProductCategory {
@@ -1 +1 @@
1
- {"version":3,"file":"iframe.d.ts","sourceRoot":"","sources":["../../src/types/iframe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0DAA0D,CAAC;AAClG,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAE9E,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,CAAC,EAAE,eAAe,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAID,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,MAAM,UAAU,GAAG,CACvB,GAAG,EACC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACrB,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAC5D,IAAI,CAAC;AAEV,MAAM,MAAM,gBAAgB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"iframe.d.ts","sourceRoot":"","sources":["../../src/types/iframe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0DAA0D,CAAC;AAClG,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAE9E,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,CAAC,EAAE,eAAe,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAID,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,MAAM,UAAU,GAAG,CACvB,GAAG,EACC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACrB,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAC5D,IAAI,CAAC;AAEV,MAAM,MAAM,gBAAgB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.44.533",
3
+ "version": "0.44.534",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -60,7 +60,6 @@ const contextValue = {
60
60
  minSubItems: 1,
61
61
  maxSubItems: 10,
62
62
  quantityType: "constant",
63
- isRelyOnPeople: false,
64
63
  isTimeRelated: false,
65
64
  hasTicket: false,
66
65
  allowDeposits: false,
@@ -126,7 +125,6 @@ const contextValue = {
126
125
  minSubItems: 0,
127
126
  maxSubItems: 0,
128
127
  quantityType: "recharging",
129
- isRelyOnPeople: false,
130
128
  isTimeRelated: false,
131
129
  hasTicket: false,
132
130
  allowDeposits: false,
@@ -144,7 +142,6 @@ const contextValue = {
144
142
  minSubItems: 0,
145
143
  maxSubItems: 0,
146
144
  quantityType: "recharging",
147
- isRelyOnPeople: false,
148
145
  isTimeRelated: false,
149
146
  hasTicket: false,
150
147
  allowDeposits: false,
@@ -713,7 +710,6 @@ const defaultProductSets = [
713
710
  minSubItems: 1,
714
711
  maxSubItems: 10,
715
712
  quantityType: "constant",
716
- isRelyOnPeople: false,
717
713
  isTimeRelated: false,
718
714
  hasTicket: false,
719
715
  allowDeposits: false,
@@ -779,7 +775,6 @@ const defaultProductSets = [
779
775
  minSubItems: 0,
780
776
  maxSubItems: 0,
781
777
  quantityType: "recharging",
782
- isRelyOnPeople: false,
783
778
  isTimeRelated: false,
784
779
  hasTicket: false,
785
780
  allowDeposits: false,
@@ -797,7 +792,6 @@ const defaultProductSets = [
797
792
  minSubItems: 0,
798
793
  maxSubItems: 0,
799
794
  quantityType: "recharging",
800
- isRelyOnPeople: false,
801
795
  isTimeRelated: false,
802
796
  hasTicket: false,
803
797
  allowDeposits: false,
@@ -906,7 +900,6 @@ const defaultProductSets = [
906
900
  minSubItems: 1,
907
901
  maxSubItems: 10,
908
902
  quantityType: "constant",
909
- isRelyOnPeople: false,
910
903
  isTimeRelated: false,
911
904
  hasTicket: false,
912
905
  allowDeposits: false,
@@ -972,7 +965,6 @@ const defaultProductSets = [
972
965
  minSubItems: 0,
973
966
  maxSubItems: 0,
974
967
  quantityType: "recharging",
975
- isRelyOnPeople: false,
976
968
  isTimeRelated: false,
977
969
  hasTicket: false,
978
970
  allowDeposits: false,
@@ -990,7 +982,6 @@ const defaultProductSets = [
990
982
  minSubItems: 0,
991
983
  maxSubItems: 0,
992
984
  quantityType: "recharging",
993
- isRelyOnPeople: false,
994
985
  isTimeRelated: false,
995
986
  hasTicket: false,
996
987
  allowDeposits: false,
@@ -15,6 +15,7 @@ export const getDefaultValues = (
15
15
  type: productSet?.type ?? DEFAULT_PRODUCT_SET_TYPE,
16
16
  termsAndConditions: productSet?.termsAndConditions ?? "",
17
17
  operationalCost: productSet?.operationalCost ?? DEFAULT_OPERATIONAL_COST_TYPE,
18
+ relyOnPeopleType: productSet?.relyOnPeopleType ?? null,
18
19
  thankYouPageUrl: productSet?.thankYouPageUrl ?? "",
19
20
  isDefault: productSet?.isDefault ?? false,
20
21
  fieldSetId: productSet?.fieldSetId,
@@ -24,7 +25,7 @@ export const getDefaultValues = (
24
25
  : undefined,
25
26
  smsTemplates:
26
27
  productSet?.smsTemplates && productSet?.smsTemplates?.length > 0
27
- ? getFilteredTemplates(productSet?.mailTemplates)
28
+ ? getFilteredTemplates(productSet?.smsTemplates)
28
29
  : undefined,
29
30
  steps:
30
31
  productSet?.steps?.map(({ productCategories, ...step }) => ({
@@ -26,7 +26,6 @@ const MENU_STEPS = [
26
26
  maxSubItems: 1,
27
27
  quantityType: "constant",
28
28
  type: "menuItems",
29
- isRelyOnPeople: false,
30
29
  collectUserInfo: false,
31
30
  isTimeRelated: false,
32
31
  hasTicket: false,
@@ -1,7 +1,6 @@
1
1
  export { EventBookingForm } from "./event-booking-form";
2
2
  export { EventBookingView } from "./event-booking-view";
3
3
  export { IframeEventCard, IframeEventCardSkeleton } from "./event-card";
4
- export { EventDetails } from "./event-details";
5
4
  export { TicketDescription } from "./ticket-description";
6
5
  export { EventTables } from "./event-tables";
7
6
  export { EventOrderSummary } from "./event-order-summary";
@@ -3,7 +3,6 @@ export {
3
3
  EventBookingView,
4
4
  EventOrderSummary,
5
5
  EventTables,
6
- EventDetails,
7
6
  IframeEventCard,
8
7
  TicketDescription,
9
8
  EventBookingProducts,
@@ -14,7 +14,7 @@ export const BookingSummary = ({
14
14
  time,
15
15
  menuSteps,
16
16
  formValues,
17
- isNotShownPeopleAmount,
17
+ shouldHidePeopleAmount,
18
18
  eventName,
19
19
  transactionFee = 0,
20
20
  productsWithErrors,
@@ -65,7 +65,7 @@ export const BookingSummary = ({
65
65
  />
66
66
  );
67
67
  })}
68
- {!isNotShownPeopleAmount && peopleAmount > 0 && (
68
+ {!shouldHidePeopleAmount && peopleAmount > 0 && (
69
69
  <>
70
70
  <hr />
71
71
  <div className="d-flex justify-content-between mt-3">
@@ -12,7 +12,7 @@ export type BookingSummaryProps = {
12
12
  [key: string]: Order;
13
13
  };
14
14
  totalWithDiscount?: number;
15
- isNotShownPeopleAmount?: boolean;
15
+ shouldHidePeopleAmount?: boolean;
16
16
  eventName?: string;
17
17
  hasPeopleInput?: boolean;
18
18
  transactionFee?: number;
@@ -212,7 +212,6 @@ const MENU_STEPS = [
212
212
  minSubItems: 1,
213
213
  quantityType: "constant" as const,
214
214
  type: "menuItems" as const,
215
- isRelyOnPeople: false,
216
215
  collectUserInfo: false,
217
216
  isTimeRelated: false,
218
217
  hasTicket: false,
@@ -13,6 +13,7 @@ interface FormOrderItem {
13
13
  productsCategoryId: number;
14
14
  deposit?: number | null;
15
15
  quantity: number;
16
+ capacity?: number | null;
16
17
  }
17
18
 
18
19
  interface ProductQuantityInputProps {
@@ -46,6 +47,7 @@ export const ProductQuantityInput = ({
46
47
  price: product.price,
47
48
  productsCategoryId: category.id,
48
49
  quantity: productInfo?.quantity ? 0 : 1,
50
+ capacity: product?.capacity,
49
51
  });
50
52
  };
51
53
 
@@ -84,6 +86,7 @@ export const ProductQuantityInput = ({
84
86
  price: product.price,
85
87
  productsCategoryId: category.id,
86
88
  quantity: val || null,
89
+ capacity: product?.capacity,
87
90
  });
88
91
  clearErrors(`${product.id}` as const);
89
92
  }}
@@ -95,6 +98,7 @@ export const ProductQuantityInput = ({
95
98
  price: product.price,
96
99
  productsCategoryId: category.id,
97
100
  quantity: productInfo?.quantity - 1 || 0,
101
+ capacity: product?.capacity,
98
102
  });
99
103
  clearErrors(`${product.id}` as const);
100
104
  }}
@@ -106,6 +110,7 @@ export const ProductQuantityInput = ({
106
110
  price: product.price,
107
111
  productsCategoryId: category.id,
108
112
  quantity: (productInfo?.quantity ?? 0) + 1,
113
+ capacity: product?.capacity,
109
114
  });
110
115
  clearErrors(`${product.id}` as const);
111
116
  }}
@@ -38,7 +38,7 @@ Default.args = {
38
38
  },
39
39
  numberOfPeople: 1,
40
40
  },
41
- isNotShownPeopleAmount: true,
41
+ shouldHidePeopleAmount: true,
42
42
  menuSteps: [],
43
43
  },
44
44
  };
package/src/index.ts CHANGED
@@ -41,3 +41,4 @@ export * from "./sorting-select";
41
41
  export * from "./date-time-button";
42
42
  export * from "./calendar";
43
43
  export * from "./availability-indicator";
44
+ export * from "./number-of-people-input";
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect } from "react";
2
2
  import { useFormContext, Controller } from "react-hook-form";
3
- import { RenderNumberOfPeopleInputComponent } from "./component";
3
+ import { RenderNumberOfPeopleInputComponent } from "./components";
4
4
 
5
5
  const NUMBER_OF_PEOPLE = "numberOfPeople";
6
6
 
@@ -0,0 +1,92 @@
1
+ import React, { useState } from "react";
2
+ import { Meta } from "@storybook/react";
3
+ import { RenderNumberOfPeopleInputComponent } from "./RenderNumberOfPeopleInputComponent";
4
+
5
+ export default {
6
+ title: "NumberOfPeopleInput/RenderNumberOfPeopleInputComponent",
7
+ component: RenderNumberOfPeopleInputComponent,
8
+ } as Meta;
9
+
10
+ const productCategories = [
11
+ {
12
+ id: 1,
13
+ name: "Early Bird General Admission",
14
+ products: [
15
+ {
16
+ id: 7,
17
+ name: "Beer",
18
+ description: `Ticket is valid for students and non students.
19
+ You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
20
+ Ticket valid for entry before 11.30pm for 12.30am showtime.`,
21
+ minQuantity: 1,
22
+ maxQuantity: 10,
23
+ price: 1,
24
+ },
25
+ {
26
+ id: 8,
27
+ name: "Wine",
28
+ description: `Ticket is valid for students and non students.
29
+ You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
30
+ Ticket valid for entry before 11.30pm for 12.30am showtime.`,
31
+ minQuantity: 1,
32
+ maxQuantity: 10,
33
+ price: 1,
34
+ isRequired: true,
35
+ },
36
+ ],
37
+ },
38
+ {
39
+ id: 2,
40
+ name: "Nice",
41
+ products: [
42
+ {
43
+ id: 3,
44
+ name: "Beer",
45
+ description: `Ticket is valid for students and non students.
46
+ You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
47
+ Ticket valid for entry before 11.30pm for 12.30am showtime.`,
48
+ minQuantity: 1,
49
+ maxQuantity: 10,
50
+ price: 1,
51
+ },
52
+ {
53
+ id: 5,
54
+ name: "Wine",
55
+ description: `Ticket is valid for students and non students.
56
+ You do not need student ID for this event but do require regular age ID e.g. driving licence or passport.
57
+ Ticket valid for entry before 11.30pm for 12.30am showtime.`,
58
+ minQuantity: 1,
59
+ maxQuantity: 10,
60
+ price: 1,
61
+ },
62
+ ],
63
+ },
64
+ ];
65
+
66
+ const menus = [
67
+ {
68
+ id: 1,
69
+ name: "Menu 1",
70
+ menuSteps: [
71
+ {
72
+ id: 1,
73
+ name: "Burger",
74
+ productCategories: productCategories,
75
+ },
76
+ ],
77
+ },
78
+ ];
79
+
80
+ export function Default() {
81
+ const [peopleAmount, setPeopleAmount] = useState(0);
82
+
83
+ return (
84
+ <div>
85
+ <RenderNumberOfPeopleInputComponent
86
+ peopleAmount={peopleAmount}
87
+ onChangePeopleAmount={(amount) => setPeopleAmount(amount)}
88
+ peopleAmountError={false}
89
+ />
90
+ </div>
91
+ );
92
+ }
@@ -1,14 +1,14 @@
1
1
  import React from "react";
2
2
  import { useTranslation, Trans } from "react-i18next";
3
3
  import clsx from "clsx";
4
- import { NumberInput } from "../../../../../order-process/components/CategoryProduct/components/NumberInput";
4
+ import { NumberInput } from "../../iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput";
5
5
 
6
6
  const NUMBER_OF_PEOPLE = "numberOfPeople";
7
7
 
8
- interface RenderNumberOfPeopleInputComponentProps {
8
+ export interface RenderNumberOfPeopleInputComponentProps {
9
9
  onChangePeopleAmount: (value: number) => void;
10
10
  peopleAmount: number;
11
- peopleAmountError: boolean;
11
+ peopleAmountError?: boolean;
12
12
  }
13
13
 
14
14
  export const RenderNumberOfPeopleInputComponent = ({
@@ -0,0 +1 @@
1
+ export * from "./RenderNumberOfPeopleInputComponent";
@@ -0,0 +1,2 @@
1
+ export * from "./NumberOfPeopleInput";
2
+ export * from "./components";
@@ -7,8 +7,13 @@ import {
7
7
  OPERATIONAL_COST_CUSTOMER,
8
8
  OPERATIONAL_COST_PROVIDER,
9
9
  OPERATIONAL_COST_TYPES,
10
+ RELY_ON_PEOPLE_QUANTITY,
11
+ RELY_ON_PEOPLE_PRODUCT_CAPACITY_QUANTITY,
12
+ RELY_ON_PEOPLE_PRODUCT_QUANTITY,
10
13
  OperationalCostType,
11
14
  ProductSetType,
15
+ RELY_ON_PEOPLE_TYPES,
16
+ RelyOnPeopleType,
12
17
  } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
13
18
  import { useId } from "@react-aria/utils";
14
19
  import { FieldSet } from "@licklist/core/dist/DataMapper/Order/FieldSetDataMapper";
@@ -34,6 +39,12 @@ const OPERATIONAL_COST_TITLES = {
34
39
  [OPERATIONAL_COST_CUSTOMER]: "operationalCostCustomer",
35
40
  } as const;
36
41
 
42
+ const RELY_ON_PEOPLE_TYPE_TITLES = {
43
+ [RELY_ON_PEOPLE_PRODUCT_CAPACITY_QUANTITY]: "peopleProductCapacityQuantity",
44
+ [RELY_ON_PEOPLE_PRODUCT_QUANTITY]: "peopleProductQuantity",
45
+ [RELY_ON_PEOPLE_QUANTITY]: "peopleQuantity",
46
+ };
47
+
37
48
  export interface TemplateItem {
38
49
  id: string;
39
50
  value: EmailTemplate | SmsTemplate;
@@ -48,6 +59,7 @@ export interface ProductSetControlValues extends DateAndRecurrenceInputValues {
48
59
  isDefault: boolean;
49
60
  operationalCost: OperationalCostType;
50
61
  productGroups?: SelectItem[];
62
+ relyOnPeopleType?: RelyOnPeopleType | null;
51
63
  fieldSetId?: number;
52
64
  steps?: Step[];
53
65
  emailTemplates?: TemplateItem[];
@@ -100,6 +112,7 @@ export function ProductSetControl({
100
112
 
101
113
  const nameId = useId();
102
114
  const termsAndConditionsId = useId();
115
+ const relyOnPeopleTypeId = useId();
103
116
 
104
117
  return (
105
118
  <Row
@@ -220,6 +233,29 @@ export function ProductSetControl({
220
233
  </Form.Control>
221
234
  </Form.Group>
222
235
 
236
+ <Form.Group controlId={relyOnPeopleTypeId}>
237
+ <Form.Label>{t("peopleQuantityType")}</Form.Label>
238
+ <Form.Control
239
+ {...register("relyOnPeopleType")}
240
+ as="select"
241
+ defaultValue={null}
242
+ >
243
+ <option value="">{t("notRequired")}</option>
244
+ {Object.keys(RELY_ON_PEOPLE_TYPES).map((relyOnPeopleType) => (
245
+ <option
246
+ value={RELY_ON_PEOPLE_TYPES[relyOnPeopleType]}
247
+ key={RELY_ON_PEOPLE_TYPES[relyOnPeopleType]}
248
+ >
249
+ {t(
250
+ RELY_ON_PEOPLE_TYPE_TITLES[
251
+ RELY_ON_PEOPLE_TYPES[relyOnPeopleType]
252
+ ]
253
+ )}
254
+ </option>
255
+ ))}
256
+ </Form.Control>
257
+ </Form.Group>
258
+
223
259
  <Form.Group controlId={termsAndConditionsId}>
224
260
  <Form.Label>{t("Design:termsAndConditions")}</Form.Label>
225
261
  <Form.Control
@@ -48,7 +48,6 @@ const getCategoryDefaultValue = (
48
48
  maxSubItems: null,
49
49
  quantityType: QUANTITY_TYPE_STANDARD,
50
50
  type: categoryType,
51
- isRelyOnPeople: categoryType === CATEGORY_TYPE_TICKETS,
52
51
  isTimeRelated: false,
53
52
  collectUserInfo: false,
54
53
  hasTicket: categoryType === CATEGORY_TYPE_TICKETS,
@@ -11,6 +11,7 @@ import {
11
11
  import {
12
12
  OPERATIONAL_COST_CUSTOMER,
13
13
  OPERATIONAL_COST_PROVIDER,
14
+ RELY_ON_PEOPLE_PRODUCT_QUANTITY,
14
15
  } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
15
16
  import { FieldSet } from "@licklist/core/dist/DataMapper/Order/FieldSetDataMapper";
16
17
  import { ProductSetForm, ProductSetFormProps } from "./ProductSetForm";
@@ -104,6 +105,7 @@ Default.args = {
104
105
  termsAndConditions: "",
105
106
  isDefault: true,
106
107
  operationalCost: OPERATIONAL_COST_CUSTOMER,
108
+ relyOnPeopleType: RELY_ON_PEOPLE_PRODUCT_QUANTITY,
107
109
  steps: [
108
110
  {
109
111
  id: 1,
@@ -115,7 +117,6 @@ Default.args = {
115
117
  minSubItems: 1,
116
118
  maxSubItems: 10,
117
119
  quantityType: "constant",
118
- isRelyOnPeople: false,
119
120
  isTimeRelated: false,
120
121
  hasTicket: false,
121
122
  allowDeposits: false,
@@ -184,7 +185,6 @@ Default.args = {
184
185
  minSubItems: 0,
185
186
  maxSubItems: 0,
186
187
  quantityType: "recharging",
187
- isRelyOnPeople: false,
188
188
  isTimeRelated: false,
189
189
  hasTicket: false,
190
190
  allowDeposits: false,
@@ -203,7 +203,6 @@ Default.args = {
203
203
  minSubItems: 0,
204
204
  maxSubItems: 0,
205
205
  quantityType: "recharging",
206
- isRelyOnPeople: false,
207
206
  isTimeRelated: false,
208
207
  hasTicket: false,
209
208
  allowDeposits: false,
@@ -289,7 +288,6 @@ Default.args = {
289
288
  minSubItems: 0,
290
289
  maxSubItems: null,
291
290
  quantityType: "recharging",
292
- isRelyOnPeople: false,
293
291
  isTimeRelated: false,
294
292
  hasTicket: false,
295
293
  allowDeposits: false,
@@ -898,7 +896,6 @@ Valid.args = {
898
896
  minSubItems: 0,
899
897
  maxSubItems: 0,
900
898
  quantityType: "recharging",
901
- isRelyOnPeople: false,
902
899
  isTimeRelated: false,
903
900
  hasTicket: false,
904
901
  allowDeposits: false,
@@ -1113,7 +1110,6 @@ Valid.args = {
1113
1110
  minSubItems: 0,
1114
1111
  maxSubItems: 0,
1115
1112
  quantityType: "recharging",
1116
- isRelyOnPeople: false,
1117
1113
  isTimeRelated: false,
1118
1114
  hasTicket: false,
1119
1115
  allowDeposits: false,
@@ -26,7 +26,6 @@ const categoryMock: Partial<ProductCategoryControlValues> = {
26
26
  minSubItems: 0,
27
27
  maxSubItems: 0,
28
28
  quantityType: QUANTITY_TYPE_STANDARD,
29
- isRelyOnPeople: false,
30
29
  isTimeRelated: false,
31
30
  hasTicket: false,
32
31
  allowDeposits: false,
@@ -28,7 +28,6 @@ export interface ProductCategoryControlValues extends FormValues {
28
28
  maxSubItems: number | null;
29
29
  quantityType: QuantityType;
30
30
  type: CategoryType;
31
- isRelyOnPeople: boolean;
32
31
  isTimeRelated: boolean;
33
32
  collectUserInfo: boolean;
34
33
  hasTicket: boolean;
@@ -97,7 +96,6 @@ export function ProductCategoryControl({
97
96
  const minSubItemsId = useId();
98
97
  const maxSubItemsId = useId();
99
98
  const quantityType = useId();
100
- const isRelyOnPeopleId = useId();
101
99
  const isTimeRelatedId = useId();
102
100
  const collectUserInfoId = useId();
103
101
  const hasTicketId = useId();
@@ -464,27 +462,6 @@ export function ProductCategoryControl({
464
462
  </Form.Group>
465
463
  )}
466
464
 
467
- <Form.Group
468
- controlId={isRelyOnPeopleId}
469
- className="advanced-switch-container"
470
- >
471
- <Form.Label>{t("isRelyOnPeople")}</Form.Label>
472
-
473
- <div>
474
- <Controller
475
- render={({ field: { name, value, onChange } }) => (
476
- <BooleanSwitch
477
- name={name}
478
- value={Boolean(value)}
479
- onChange={onChange}
480
- disabled={isLoading || category.hasTicket}
481
- />
482
- )}
483
- control={control}
484
- name={`${fieldNamePrefix}.isRelyOnPeople` as const}
485
- />
486
- </div>
487
- </Form.Group>
488
465
  {!category.hasTicket && (
489
466
  <Form.Group
490
467
  controlId={isTimeRelatedId}