@licklist/design 0.44.485-dev.71 → 0.44.485-dev.74
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.
- package/dist/assets/iframe/dateInfo/available.svg +5 -0
- package/dist/assets/iframe/dateInfo/available.svg.js +1 -0
- package/dist/assets/iframe/dateInfo/limited.svg +5 -0
- package/dist/assets/iframe/dateInfo/limited.svg.js +1 -0
- package/dist/assets/iframe/dateInfo/soldOut.svg +6 -0
- package/dist/assets/iframe/dateInfo/soldOut.svg.js +1 -0
- package/dist/events/event-venue-map/EventVenueMap.d.ts +3 -3
- package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/VenueMap/VenueMap.d.ts +2 -2
- package/dist/events/event-venue-map/components/VenueMap/VenueMap.d.ts.map +1 -1
- package/dist/iframe/event/event-venue-map/IframeEventVenueMap.d.ts +1 -4
- package/dist/iframe/event/event-venue-map/IframeEventVenueMap.d.ts.map +1 -1
- package/dist/iframe/index.d.ts +1 -0
- package/dist/iframe/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.d.ts +2 -2
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +2 -2
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +2 -2
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/components/Category.d.ts +2 -2
- package/dist/iframe/order-process/components/CalendarStepsForm/components/Category.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/components/CategoryProductModal.d.ts +2 -2
- package/dist/iframe/order-process/components/CalendarStepsForm/components/CategoryProductModal.d.ts.map +1 -1
- package/dist/iframe/order-process/components/Category/Category.d.ts +3 -3
- package/dist/iframe/order-process/components/Category/Category.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts +3 -3
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/select-date-time/component/date-container/SelectDateAndTimeEvent.d.ts +8 -0
- package/dist/iframe/select-date-time/component/date-container/SelectDateAndTimeEvent.d.ts.map +1 -0
- package/dist/iframe/select-date-time/component/date-container/SelectDateAndTimeEvent.js +1 -0
- package/dist/iframe/select-date-time/component/date-container/SelectDateAndTimeEventList.d.ts +10 -0
- package/dist/iframe/select-date-time/component/date-container/SelectDateAndTimeEventList.d.ts.map +1 -0
- package/dist/iframe/select-date-time/index.d.ts +2 -0
- package/dist/iframe/select-date-time/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/logo/Logo.d.ts +1 -1
- package/dist/logo/Logo.d.ts.map +1 -1
- package/dist/sales/manual-booking/category-product/CategoryProduct.d.ts +2 -2
- package/dist/sales/manual-booking/category-product/CategoryProduct.d.ts.map +1 -1
- package/dist/sales/manual-booking/category-products/CategoryProducts.d.ts +2 -2
- package/dist/sales/manual-booking/category-products/CategoryProducts.d.ts.map +1 -1
- package/dist/sales/manual-booking/controll/ManualBookingStepsControll.d.ts +2 -2
- package/dist/sales/manual-booking/controll/ManualBookingStepsControll.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +1 -1
- package/dist/styles/iframe-events/SelectDateAndTimeEvent.scss +85 -0
- package/dist/styles/iframe-events/_index.scss +1 -0
- package/package.json +1 -1
- package/src/assets/iframe/dateInfo/available.svg +5 -0
- package/src/assets/iframe/dateInfo/limited.svg +5 -0
- package/src/assets/iframe/dateInfo/soldOut.svg +6 -0
- package/src/events/event-venue-map/EventVenueMap.tsx +2 -2
- package/src/events/event-venue-map/components/VenueMap/VenueMap.tsx +2 -2
- package/src/iframe/index.ts +1 -0
- package/src/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.tsx +2 -2
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +2 -2
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +2 -2
- package/src/iframe/order-process/components/CalendarStepsForm/components/Category.tsx +2 -2
- package/src/iframe/order-process/components/CalendarStepsForm/components/CategoryProductModal.tsx +2 -2
- package/src/iframe/order-process/components/Category/Category.tsx +3 -3
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +3 -3
- package/src/iframe/select-date-time/component/date-container/SelectDateAndTimeEvent.tsx +73 -0
- package/src/iframe/select-date-time/component/date-container/SelectDateAndTimeEventList.stories.tsx +158 -0
- package/src/iframe/select-date-time/component/date-container/SelectDateAndTimeEventList.tsx +39 -0
- package/src/iframe/select-date-time/index.ts +1 -0
- package/src/logo/Logo.tsx +1 -1
- package/src/sales/manual-booking/category-product/CategoryProduct.tsx +2 -2
- package/src/sales/manual-booking/category-products/CategoryProducts.tsx +2 -2
- package/src/sales/manual-booking/controll/ManualBookingStepsControll.tsx +2 -2
- package/src/styles/iframe-events/SelectDateAndTimeEvent.scss +85 -0
- package/src/styles/iframe-events/_index.scss +1 -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"),o=require("react-i18next"),i=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");var s=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 l=require("../../../iframe/event/event-product-sets/EventProductSets.js");require("../../../iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js");var c=require("../../../iframe/event/event-calendar/EventCalendar.js");require("../../../iframe/event/event-step-venue-map-zones/EventStepVenueMapZones.js");var u=require("../../../iframe/event/event-venue-map/IframeEventVenueMap.js");require("../../../iframe/payment/payment-form/PaymentForm.js"),require("../../../iframe/payment/order-items-table/OrderItemsTable.js");var d=require("../context/snippetTemplate.js"),p=require("../../../iframe/page/components/PageHeader/PageHeader.js");require("../../../iframe/payment/payment-status-header/PaymentStatusHeader.js");var v=require("../../../iframe/order-process/components/BookingSummary/BookingSummary.js"),f=require("../../../iframe/order-process/components/NavigationSteps/NavigationSteps.js"),E=require("../../../iframe/order-process/components/Timer/Timer.js");require("../../../iframe/order-process/components/PaymentCard/PaymentCard.js");var g=require("../../../iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.js");require("../../../iframe/order-process/components/ErrorModal/ErrorModal.js");var y=require("../../../iframe/page/components/PageBody/PageBody.js");require("../../../iframe/order-process/components/utils/useCategoryVerification.js"),require("../../../iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js"),require("../../../iframe/order-process/components/Category/Category.js"),require("../../../iframe/powered-by/PoweredBy.js");var b=require("../../../iframe/page/Page.js");require("../../../iframe/payment/payment-page/PaymentPage.js"),require("../../../iframe/payment/payment-status-page/PaymentStatusPage.js"),require("../../../iframe/custom-fields/components/CustomDateField.js");var N=require("../context/snippetTemplateView.js"),S=require("@licklist/core/dist/DataMapper/Provider/SnippetDataMapper"),C=require("../settings/SettingButton.js");exports.Preview=function(e){var q=e.onSettingClick,h=e.providerHasMap,j=void 0!==h&&h,B=o.useTranslation("Design").t,P=t.__read(a.useState(0),2),k=P[0],w=P[1],x=t.__read(a.useState(0),2),I=x[0],T=x[1],A=a.useContext(N.SnippetTemplateViewContext).setView,M=a.useContext(d.SnippetTemplateContext).template.type,_=void 0===M?S.SNIPPET_TYPE_EVENT_LIST:M,D=function(e){A(e),q()};return r.createElement("div",{className:"w-100 h-100 snippet-template-preview"},r.createElement(b.Page,{headerBlock:r.createElement("div",{className:"d-flex mt-5 pt-5 p-5 iframe-page snippet-template-additional-header"},r.createElement(C.SettingButton,{view:"pageHeaderSteps",onClick:D,className:"m-0"},r.createElement(C.SettingButton,{view:"pageHeader",onClick:D,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(p.PageHeader,{showCloseButton:!0,showBackButton:!0},r.createElement(E.Timer,{timer:600}),r.createElement(n.MemoryRouter,{initialEntries:["/step1","/step2"]},r.createElement(f.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(C.SettingButton,{view:"page",onClick:D,className:"snippet-template-body-button"})),r.createElement(y.PageBody,{className:"snippet-template",leftBlock:r.createElement(C.SettingButton,{view:"pageBodyLeftBlock",onClick:D,className:"mr-4"},r.createElement(y.PageBody.LeftBlock,{title:"About this event"},r.createElement(C.SettingButton,{view:"elements",onClick:D,className:"mt-5 m-0",containerClassName:"mt-5 pt-5"},r.createElement("div",{className:"mt-3"},r.createElement("h3",null,B("elements"))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,B("Texts")),r.createElement("p",null,"XXXX")),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,B("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"},B("firstName")),r.createElement("input",{type:"text",className:"form-control",placeholder:B("firstName")}))),r.createElement("div",{className:"form-row"},r.createElement("button",{type:"button",className:"btn btn-link"},B("iHaveAccount")))))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,B("Number input")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement(s.NumberInput,{value:k,onChange:function(e){return w(e)},onArrowDown:function(){return w((function(e){return e-1}))},onArrowUp:function(){return w((function(e){return e+1}))}}))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,B("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"},B("dayOfBirthShort")),r.createElement("select",{className:"form-control",placeholder:B("firstName")},r.createElement("option",null,"2022"),r.createElement("option",null,"2023"))))))),r.createElement("div",{className:"mt-5 snippet-template__form"},r.createElement("h4",null,B("Button")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement(i.Button,{size:"sm"},"Submit")))),j&&_===S.SNIPPET_TYPE_VENUE_MAP&&r.createElement(r.Fragment,null,r.createElement("div",{className:"pt-4"},r.createElement("h4",null,B("Calendar")),r.createElement(C.SettingButton,{view:"calendar",onClick:D,className:"mt-3 m-0",containerClassName:"mt-5 pt-5"},r.createElement(c.EventCalendar,null))),r.createElement("div",{className:"pt-4"},r.createElement(C.SettingButton,{view:"productSet",onClick:D,className:"mt-3 m-0",containerClassName:"mt-5 pt-5"},r.createElement("h4",null,B("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:T,selectedProductSetId:I})))),r.createElement("div",{className:"pt-4"},r.createElement("form",{className:"category-steps-form pt-4 mt-4"},r.createElement("h4",null,B("Venue Map")),r.createElement("div",{className:"position-relative pt-4 mt-4"},r.createElement(C.SettingButton,{view:"venueMap",onClick:D,className:"mt-n6 m-0",containerClassName:"mt-5 pt-5"},r.createElement(u.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(y.PageBody.RightBlock,{bottomBlock:r.createElement(g.BookingSummaryFooter,null)},r.createElement(C.SettingButton,{view:"pageBodyRightBlock",onClick:D,containerClassName:"snippet-template-button-fixed-height",className:"m-0"}),r.createElement(v.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"})))})))};
|
|
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");var s=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 l=require("../../../iframe/event/event-product-sets/EventProductSets.js");require("../../../iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.js");var c=require("../../../iframe/event/event-calendar/EventCalendar.js");require("../../../iframe/event/event-step-venue-map-zones/EventStepVenueMapZones.js");var u=require("../../../iframe/event/event-venue-map/IframeEventVenueMap.js");require("../../../iframe/payment/payment-form/PaymentForm.js"),require("../../../iframe/payment/order-items-table/OrderItemsTable.js");var d=require("../context/snippetTemplate.js"),p=require("../../../iframe/page/components/PageHeader/PageHeader.js");require("../../../iframe/payment/payment-status-header/PaymentStatusHeader.js");var v=require("../../../iframe/order-process/components/BookingSummary/BookingSummary.js"),f=require("../../../iframe/order-process/components/NavigationSteps/NavigationSteps.js"),E=require("../../../iframe/order-process/components/Timer/Timer.js");require("../../../iframe/order-process/components/PaymentCard/PaymentCard.js");var g=require("../../../iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.js");require("../../../iframe/order-process/components/ErrorModal/ErrorModal.js");var y=require("../../../iframe/page/components/PageBody/PageBody.js");require("../../../iframe/order-process/components/utils/useCategoryVerification.js"),require("../../../iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js"),require("../../../iframe/order-process/components/Category/Category.js"),require("../../../iframe/powered-by/PoweredBy.js");var b=require("../../../iframe/page/Page.js");require("../../../iframe/payment/payment-page/PaymentPage.js"),require("../../../iframe/payment/payment-status-page/PaymentStatusPage.js"),require("../../../iframe/custom-fields/components/CustomDateField.js"),require("../../../iframe/select-date-time/component/date-container/SelectDateAndTimeEvent.js");var N=require("../context/snippetTemplateView.js"),S=require("@licklist/core/dist/DataMapper/Provider/SnippetDataMapper"),C=require("../settings/SettingButton.js");exports.Preview=function(e){var q=e.onSettingClick,h=e.providerHasMap,j=void 0!==h&&h,B=i.useTranslation("Design").t,P=t.__read(a.useState(0),2),k=P[0],w=P[1],x=t.__read(a.useState(0),2),I=x[0],T=x[1],A=a.useContext(N.SnippetTemplateViewContext).setView,M=a.useContext(d.SnippetTemplateContext).template.type,_=void 0===M?S.SNIPPET_TYPE_EVENT_LIST:M,D=function(e){A(e),q()};return r.createElement("div",{className:"w-100 h-100 snippet-template-preview"},r.createElement(b.Page,{headerBlock:r.createElement("div",{className:"d-flex mt-5 pt-5 p-5 iframe-page snippet-template-additional-header"},r.createElement(C.SettingButton,{view:"pageHeaderSteps",onClick:D,className:"m-0"},r.createElement(C.SettingButton,{view:"pageHeader",onClick:D,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(p.PageHeader,{showCloseButton:!0,showBackButton:!0},r.createElement(E.Timer,{timer:600}),r.createElement(n.MemoryRouter,{initialEntries:["/step1","/step2"]},r.createElement(f.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(C.SettingButton,{view:"page",onClick:D,className:"snippet-template-body-button"})),r.createElement(y.PageBody,{className:"snippet-template",leftBlock:r.createElement(C.SettingButton,{view:"pageBodyLeftBlock",onClick:D,className:"mr-4"},r.createElement(y.PageBody.LeftBlock,{title:"About this event"},r.createElement(C.SettingButton,{view:"elements",onClick:D,className:"mt-5 m-0",containerClassName:"mt-5 pt-5"},r.createElement("div",{className:"mt-3"},r.createElement("h3",null,B("elements"))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,B("Texts")),r.createElement("p",null,"XXXX")),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,B("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"},B("firstName")),r.createElement("input",{type:"text",className:"form-control",placeholder:B("firstName")}))),r.createElement("div",{className:"form-row"},r.createElement("button",{type:"button",className:"btn btn-link"},B("iHaveAccount")))))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,B("Number input")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement(s.NumberInput,{value:k,onChange:function(e){return w(e)},onArrowDown:function(){return w((function(e){return e-1}))},onArrowUp:function(){return w((function(e){return e+1}))}}))),r.createElement("div",{className:"mt-5"},r.createElement("h4",null,B("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"},B("dayOfBirthShort")),r.createElement("select",{className:"form-control",placeholder:B("firstName")},r.createElement("option",null,"2022"),r.createElement("option",null,"2023"))))))),r.createElement("div",{className:"mt-5 snippet-template__form"},r.createElement("h4",null,B("Button")),r.createElement("div",{className:"d-flex flex-column w-100"},r.createElement(o.Button,{size:"sm"},"Submit")))),j&&_===S.SNIPPET_TYPE_VENUE_MAP&&r.createElement(r.Fragment,null,r.createElement("div",{className:"pt-4"},r.createElement("h4",null,B("Calendar")),r.createElement(C.SettingButton,{view:"calendar",onClick:D,className:"mt-3 m-0",containerClassName:"mt-5 pt-5"},r.createElement(c.EventCalendar,null))),r.createElement("div",{className:"pt-4"},r.createElement(C.SettingButton,{view:"productSet",onClick:D,className:"mt-3 m-0",containerClassName:"mt-5 pt-5"},r.createElement("h4",null,B("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:T,selectedProductSetId:I})))),r.createElement("div",{className:"pt-4"},r.createElement("form",{className:"category-steps-form pt-4 mt-4"},r.createElement("h4",null,B("Venue Map")),r.createElement("div",{className:"position-relative pt-4 mt-4"},r.createElement(C.SettingButton,{view:"venueMap",onClick:D,className:"mt-n6 m-0",containerClassName:"mt-5 pt-5"},r.createElement(u.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(y.PageBody.RightBlock,{bottomBlock:r.createElement(g.BookingSummaryFooter,null)},r.createElement(C.SettingButton,{view:"pageBodyRightBlock",onClick:D,containerClassName:"snippet-template-button-fixed-height",className:"m-0"}),r.createElement(v.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"})))})))};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
.event-date-list {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: start;
|
|
5
|
+
grid-gap: 1rem;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
|
|
8
|
+
.event-date-set {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
font-size: .82rem;
|
|
14
|
+
line-height: 1.3rem;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
background-color: $snippet-product-set-background-color;
|
|
17
|
+
border-radius: .2rem;
|
|
18
|
+
text-align: center;
|
|
19
|
+
border: 2px solid $snippet-product-set-border-color;
|
|
20
|
+
color: $snippet-product-set-font-color;
|
|
21
|
+
flex-grow: 1;
|
|
22
|
+
transition: $color-transition;
|
|
23
|
+
min-width: 6rem;
|
|
24
|
+
max-width: 7.25rem;
|
|
25
|
+
min-height: 2.75rem;
|
|
26
|
+
max-height: 8.375rem;
|
|
27
|
+
|
|
28
|
+
&.disabled {
|
|
29
|
+
border: 2px solid $snippet-product-set-background-color;
|
|
30
|
+
background-color: $snippet-product-set-background-color;
|
|
31
|
+
color: $snippet-product-set-font-color;
|
|
32
|
+
opacity: 0.5;
|
|
33
|
+
|
|
34
|
+
.descriptions {
|
|
35
|
+
color: $snippet-product-set-font-color;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.selected {
|
|
40
|
+
border: 2px solid $snippet-active-product-set-border-color;
|
|
41
|
+
background-color: $snippet-active-product-set-border-color;
|
|
42
|
+
color: white;
|
|
43
|
+
transition: $color-transition;
|
|
44
|
+
|
|
45
|
+
.descriptions {
|
|
46
|
+
color: white;
|
|
47
|
+
font-weight: 600;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.time {
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.time-container {
|
|
56
|
+
min-width: 4.175rem;
|
|
57
|
+
max-width: 4.175rem;
|
|
58
|
+
height: 2.75rem;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.time {
|
|
63
|
+
font-size: .875rem;
|
|
64
|
+
font-weight: 300;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.descriptions {
|
|
68
|
+
font-size: .7rem;
|
|
69
|
+
line-height: 1.03rem;
|
|
70
|
+
font-weight: 300;
|
|
71
|
+
color: #0E8CE2;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.info {
|
|
75
|
+
display: flex;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
font-weight: 300;
|
|
78
|
+
flex-direction: row;
|
|
79
|
+
|
|
80
|
+
.logo {
|
|
81
|
+
width: .5rem;
|
|
82
|
+
margin-right: .5rem;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="7" height="11" viewBox="0 0 7 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="0.943939" y="1.03658" width="5.25188" height="3.04878" rx="1.5" fill="#4CF973" stroke="white"/>
|
|
3
|
+
<rect x="0.943939" y="4.10976" width="5.25188" height="3.04878" rx="1.5" fill="#4CF973" stroke="white"/>
|
|
4
|
+
<rect x="0.943939" y="7.18292" width="5.25188" height="3.04878" rx="1.5" fill="#4CF973" stroke="white"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="7" height="11" viewBox="0 0 7 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="1.2406" y="1.03658" width="5.25188" height="3.04878" rx="1.5" fill="#E4E4E4" stroke="white"/>
|
|
3
|
+
<rect x="1.2406" y="4.10976" width="5.25188" height="3.04878" rx="1.5" fill="#FDD054" stroke="white"/>
|
|
4
|
+
<rect x="1.2406" y="7.18292" width="5.25188" height="3.04878" rx="1.5" fill="#FDD054" stroke="white"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="7" height="10" viewBox="0 0 7 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="5.94013" height="10" transform="translate(0.497131)" fill="white"/>
|
|
3
|
+
<rect x="0.591156" y="0.5" width="5.75211" height="3" rx="1.5" fill="#E4E4E4" stroke="white"/>
|
|
4
|
+
<rect x="0.591156" y="3.5" width="5.75211" height="3" rx="1.5" fill="#E4E4E4" stroke="white"/>
|
|
5
|
+
<rect x="0.591156" y="6.5" width="5.75211" height="3" rx="1.5" fill="#E4E4E4" stroke="white"/>
|
|
6
|
+
</svg>
|
|
@@ -3,7 +3,7 @@ import { EventVenueMapProvider } from "@licklist/plugins/dist/context/event/Even
|
|
|
3
3
|
import { Point } from "@licklist/plugins/dist/types/context/event/point";
|
|
4
4
|
import { PointProduct } from "@licklist/core/dist/DataMapper/Product/PointProductDataMapper";
|
|
5
5
|
import { Product } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
|
|
6
|
-
import {
|
|
6
|
+
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
7
7
|
import { VenueMap, VenueMapRef } from "./components/VenueMap";
|
|
8
8
|
import { useCanvasSize } from "./hooks/useCanvasSize";
|
|
9
9
|
|
|
@@ -25,7 +25,7 @@ export type EventVenueMapProps = {
|
|
|
25
25
|
products?: Partial<Product>[];
|
|
26
26
|
pointProducts?: Partial<PointProduct>[];
|
|
27
27
|
onPointProductsChange?: (values: Partial<PointProduct>[]) => void;
|
|
28
|
-
soldOutProducts?:
|
|
28
|
+
soldOutProducts?: QuantityCheckProductInfo[];
|
|
29
29
|
} & EventVenueMapIframeProps;
|
|
30
30
|
|
|
31
31
|
export const EventVenueMap = forwardRef<VenueMapRef, EventVenueMapProps>(
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
EventVenueMapContext,
|
|
12
12
|
EventVenueMapContextProps,
|
|
13
13
|
} from "@licklist/plugins/dist/context/event/EventVenueMapContext";
|
|
14
|
-
import {
|
|
14
|
+
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
15
15
|
import { useImage } from "../../hooks/useImage";
|
|
16
16
|
import { useStageActions } from "../../hooks/useStageActions";
|
|
17
17
|
import { MapPoint } from "../MapPoint";
|
|
@@ -33,7 +33,7 @@ export type VenueMapProps = {
|
|
|
33
33
|
usedInIframe?: boolean;
|
|
34
34
|
choosedProductUuids?: string[];
|
|
35
35
|
errorOnChoosedProductUuids?: string[];
|
|
36
|
-
soldOutProducts?:
|
|
36
|
+
soldOutProducts?: QuantityCheckProductInfo[];
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export const VenueMap = forwardRef<VenueMapRef, VenueMapProps>(
|
package/src/iframe/index.ts
CHANGED
|
@@ -2,13 +2,13 @@ import React, { useMemo } from "react";
|
|
|
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 {
|
|
5
|
+
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
6
6
|
import { Order, MenuStep } from "../../../../../../types";
|
|
7
7
|
|
|
8
8
|
export type ProductsByMenuStepsProps = {
|
|
9
9
|
orderProducts: Order[];
|
|
10
10
|
step: MenuStep;
|
|
11
|
-
productsWithErrors?:
|
|
11
|
+
productsWithErrors?: QuantityCheckProductInfo[];
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
const getIdFromEntity = (entities: { id: number }[]) =>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
2
2
|
import { MenuStep, Order } from "../../../../../types";
|
|
3
3
|
|
|
4
4
|
export const MOBILE_WIDTH = 576;
|
|
@@ -16,7 +16,7 @@ export type BookingSummaryProps = {
|
|
|
16
16
|
hasPeopleInput?: boolean;
|
|
17
17
|
transactionFee?: number;
|
|
18
18
|
isFreePayment?: boolean;
|
|
19
|
-
productsWithErrors?:
|
|
19
|
+
productsWithErrors?: QuantityCheckProductInfo[];
|
|
20
20
|
isLoading?: boolean;
|
|
21
21
|
peopleAmount: number;
|
|
22
22
|
};
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import { Step } from "@licklist/core/dist/DataMapper/Product/StepDataMapper";
|
|
20
20
|
import { useTranslation } from "react-i18next";
|
|
21
21
|
import { Product } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
|
|
22
|
-
import {
|
|
22
|
+
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
23
23
|
import { Category } from "./components/Category";
|
|
24
24
|
import { MenuStep } from "../../../../types";
|
|
25
25
|
import { STEP_FORM_ID } from "../../constants";
|
|
@@ -46,7 +46,7 @@ export interface CalendarStepsFormProps {
|
|
|
46
46
|
onActiveVenueMapChange?: (nextVenueMapId: string) => void;
|
|
47
47
|
title: string;
|
|
48
48
|
menuStepWithVenueMap: Step;
|
|
49
|
-
soldOutProducts?:
|
|
49
|
+
soldOutProducts?: QuantityCheckProductInfo[];
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export type StepsFormRef = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PointProduct } from "@licklist/core/dist/DataMapper/Product/PointProductDataMapper";
|
|
3
|
-
import {
|
|
3
|
+
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
4
4
|
import { ProductCategory } from "../../../../../types";
|
|
5
5
|
import { CategoryProductModal } from "./CategoryProductModal";
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ export type CategoryProps = {
|
|
|
9
9
|
activePointId?: number;
|
|
10
10
|
pointProducts: PointProduct[];
|
|
11
11
|
onCloseModal: () => void;
|
|
12
|
-
soldOutProducts?:
|
|
12
|
+
soldOutProducts?: QuantityCheckProductInfo[];
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export const Category = ({
|
package/src/iframe/order-process/components/CalendarStepsForm/components/CategoryProductModal.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import React, { useMemo } from "react";
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { Button } from "react-bootstrap";
|
|
4
4
|
import { PointProduct } from "@licklist/core/dist/DataMapper/Product/PointProductDataMapper";
|
|
5
|
-
import {
|
|
5
|
+
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
6
6
|
import { ProductCategory, Product } from "../../../../../types";
|
|
7
7
|
import { CategoryProduct } from "../../CategoryProduct";
|
|
8
8
|
import Icon from "../../../../../static/Icon";
|
|
@@ -13,7 +13,7 @@ export type CategoryProductModalProps = {
|
|
|
13
13
|
category: ProductCategory;
|
|
14
14
|
pointProducts: PointProduct[];
|
|
15
15
|
onCloseModal: () => void;
|
|
16
|
-
soldOutProducts?:
|
|
16
|
+
soldOutProducts?: QuantityCheckProductInfo[];
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export const CategoryProductModal = ({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
3
|
import { DeepMap, FieldError } from "react-hook-form";
|
|
4
|
-
import {
|
|
4
|
+
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
5
5
|
import { ProductCategory } from "../../../../types";
|
|
6
6
|
import { CategoryProduct } from "../CategoryProduct";
|
|
7
7
|
|
|
8
8
|
interface CategoryProps {
|
|
9
9
|
productCategories: ProductCategory[];
|
|
10
|
-
productsWithErrors?:
|
|
11
|
-
soldOutProducts?:
|
|
10
|
+
productsWithErrors?: QuantityCheckProductInfo[];
|
|
11
|
+
soldOutProducts?: QuantityCheckProductInfo[];
|
|
12
12
|
errors?: DeepMap<Record<string, any>, FieldError>;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next";
|
|
|
5
5
|
import { useIntl } from "react-intl";
|
|
6
6
|
import * as Config from "@licklist/core/dist/Config";
|
|
7
7
|
import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
|
|
8
|
-
import {
|
|
8
|
+
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
9
9
|
import { TicketDescription } from "../../../event/ticket-description";
|
|
10
10
|
import { ProductCategory, Product } from "../../../../types";
|
|
11
11
|
import { ProductQuantityInput } from "./components/ProductQuantityInput";
|
|
@@ -14,8 +14,8 @@ interface CategoryProductProps {
|
|
|
14
14
|
product: Product;
|
|
15
15
|
category: ProductCategory;
|
|
16
16
|
canExpandDescription?: boolean;
|
|
17
|
-
productsWithErrors?:
|
|
18
|
-
soldOutProducts?:
|
|
17
|
+
productsWithErrors?: QuantityCheckProductInfo[];
|
|
18
|
+
soldOutProducts?: QuantityCheckProductInfo[];
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export const CategoryProduct = ({
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { ReactComponent as LimitedSvg } from "../../../../assets/iframe/dateInfo/limited.svg";
|
|
4
|
+
import { ReactComponent as AvailableSvg } from "../../../../assets/iframe/dateInfo/available.svg";
|
|
5
|
+
import { ReactComponent as SoldOutSvg } from "../../../../assets/iframe/dateInfo/soldOut.svg";
|
|
6
|
+
import { Logo } from "../../../../logo";
|
|
7
|
+
|
|
8
|
+
export type SelectDateAndTimeEventProps = {
|
|
9
|
+
date: any;
|
|
10
|
+
selected: boolean;
|
|
11
|
+
onSelectProductSet?: (id: number) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const SelectDateAndTimeEvent = ({
|
|
15
|
+
date,
|
|
16
|
+
selected,
|
|
17
|
+
onSelectProductSet,
|
|
18
|
+
}: SelectDateAndTimeEventProps) => {
|
|
19
|
+
const { title, disabled, info, descriptions, id, time } = date;
|
|
20
|
+
|
|
21
|
+
const onClick = () => {
|
|
22
|
+
if (disabled) return;
|
|
23
|
+
onSelectProductSet(id);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const infoLogo = useMemo(() => {
|
|
27
|
+
if (info?.logo === "limit") {
|
|
28
|
+
return <LimitedSvg />;
|
|
29
|
+
}
|
|
30
|
+
if (info?.logo === "available") {
|
|
31
|
+
return <AvailableSvg />;
|
|
32
|
+
}
|
|
33
|
+
if (info?.logo === "soldOut") {
|
|
34
|
+
return <SoldOutSvg />;
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
}, [info, SoldOutSvg, AvailableSvg, LimitedSvg]);
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<div
|
|
41
|
+
role="button"
|
|
42
|
+
onClick={onClick}
|
|
43
|
+
onKeyPress={onClick}
|
|
44
|
+
className={clsx(
|
|
45
|
+
"event-date-set",
|
|
46
|
+
disabled && "disabled",
|
|
47
|
+
selected && "selected",
|
|
48
|
+
time && "time-container"
|
|
49
|
+
)}
|
|
50
|
+
tabIndex={0}
|
|
51
|
+
>
|
|
52
|
+
{title}
|
|
53
|
+
{time && <div className="time">{time}</div>}
|
|
54
|
+
{descriptions && (
|
|
55
|
+
<div
|
|
56
|
+
className={clsx(
|
|
57
|
+
"descriptions",
|
|
58
|
+
selected && "selected",
|
|
59
|
+
disabled && "disabled"
|
|
60
|
+
)}
|
|
61
|
+
>
|
|
62
|
+
{descriptions}
|
|
63
|
+
</div>
|
|
64
|
+
)}
|
|
65
|
+
{info && (
|
|
66
|
+
<div className="info">
|
|
67
|
+
{info.logo && <Logo className="logo" logo={infoLogo} />}
|
|
68
|
+
<div>{info.descriptions}</div>
|
|
69
|
+
</div>
|
|
70
|
+
)}
|
|
71
|
+
</div>
|
|
72
|
+
);
|
|
73
|
+
};
|
package/src/iframe/select-date-time/component/date-container/SelectDateAndTimeEventList.stories.tsx
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Meta } from "@storybook/react";
|
|
3
|
+
import { SelectDateAndTimeEventList } from "./SelectDateAndTimeEventList";
|
|
4
|
+
import { Form } from "react-bootstrap";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Iframe/Date Selector",
|
|
8
|
+
component: SelectDateAndTimeEventList,
|
|
9
|
+
} as Meta;
|
|
10
|
+
|
|
11
|
+
export function Default() {
|
|
12
|
+
const [eventDayId, setEventDayId] = useState<number>();
|
|
13
|
+
const [eventTimeId, setEventTimeId] = useState<number>();
|
|
14
|
+
const [eventTimeWithInfoId, setEventTimeWithInfoId] = useState<number>();
|
|
15
|
+
|
|
16
|
+
const dayList = [
|
|
17
|
+
{
|
|
18
|
+
id: 1,
|
|
19
|
+
title: "TODAY",
|
|
20
|
+
descriptions: "13th March",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 2,
|
|
24
|
+
title: "TODAY",
|
|
25
|
+
disabled: true,
|
|
26
|
+
descriptions: "13th March",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 3,
|
|
30
|
+
title: "TOMORROW",
|
|
31
|
+
descriptions: "13th March",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 4,
|
|
35
|
+
title: "TOMORROW",
|
|
36
|
+
descriptions: "13th March",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 5,
|
|
40
|
+
title: "TOMORROW",
|
|
41
|
+
descriptions: "13th March",
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
const dayListWithInfo = [
|
|
46
|
+
{
|
|
47
|
+
id: 1,
|
|
48
|
+
title: "TODAY",
|
|
49
|
+
descriptions: "13th March",
|
|
50
|
+
info: {
|
|
51
|
+
descriptions: "test",
|
|
52
|
+
logo: "limit",
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 2,
|
|
57
|
+
title: "TODAY",
|
|
58
|
+
disabled: true,
|
|
59
|
+
descriptions: "13th March",
|
|
60
|
+
info: {
|
|
61
|
+
descriptions: "test",
|
|
62
|
+
logo: "soldOut",
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 3,
|
|
67
|
+
title: "TOMORROW",
|
|
68
|
+
descriptions: "13th March",
|
|
69
|
+
info: {
|
|
70
|
+
descriptions: "test",
|
|
71
|
+
logo: "limit",
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 4,
|
|
76
|
+
title: "TOMORROW",
|
|
77
|
+
descriptions: "13th March",
|
|
78
|
+
info: {
|
|
79
|
+
descriptions: "test",
|
|
80
|
+
logo: "available",
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: 5,
|
|
85
|
+
title: "TOMORROW",
|
|
86
|
+
descriptions: "13th March",
|
|
87
|
+
info: {
|
|
88
|
+
descriptions: "test",
|
|
89
|
+
logo: "available",
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
|
|
94
|
+
const timeList = [
|
|
95
|
+
{
|
|
96
|
+
id: 1,
|
|
97
|
+
time: "10:30",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 2,
|
|
101
|
+
time: "11:30",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: 3,
|
|
105
|
+
time: "12:30",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: 4,
|
|
109
|
+
time: "13:30",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: 5,
|
|
113
|
+
time: "14:30",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: 6,
|
|
117
|
+
time: "11:30",
|
|
118
|
+
disabled: true,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: 7,
|
|
122
|
+
time: "12:30",
|
|
123
|
+
},
|
|
124
|
+
];
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<div className="bg-white" style={{height:"40rem"}}>
|
|
128
|
+
<Form className="event-booking-form">
|
|
129
|
+
<Form.Group>
|
|
130
|
+
<SelectDateAndTimeEventList
|
|
131
|
+
title="Select Date & Time"
|
|
132
|
+
dateList={dayList}
|
|
133
|
+
selectedProductSetId={eventDayId}
|
|
134
|
+
onSelectProductSet={setEventDayId}
|
|
135
|
+
/>
|
|
136
|
+
</Form.Group>
|
|
137
|
+
<Form.Group>
|
|
138
|
+
<SelectDateAndTimeEventList
|
|
139
|
+
title="Select your Date with Info"
|
|
140
|
+
dateList={dayListWithInfo}
|
|
141
|
+
timeContainer
|
|
142
|
+
selectedProductSetId={eventTimeWithInfoId}
|
|
143
|
+
onSelectProductSet={setEventTimeWithInfoId}
|
|
144
|
+
/>
|
|
145
|
+
</Form.Group>
|
|
146
|
+
<Form.Group>
|
|
147
|
+
<SelectDateAndTimeEventList
|
|
148
|
+
title="Select your Time"
|
|
149
|
+
dateList={timeList}
|
|
150
|
+
timeContainer
|
|
151
|
+
selectedProductSetId={eventTimeId}
|
|
152
|
+
onSelectProductSet={setEventTimeId}
|
|
153
|
+
/>
|
|
154
|
+
</Form.Group>
|
|
155
|
+
</Form>
|
|
156
|
+
</div>
|
|
157
|
+
);
|
|
158
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { SelectDateAndTimeEvent } from "./SelectDateAndTimeEvent";
|
|
4
|
+
|
|
5
|
+
export type EventProductSetsProps = {
|
|
6
|
+
selectedProductSetId?: number;
|
|
7
|
+
onSelectProductSet?: (productSetId: number) => void;
|
|
8
|
+
dateList: any[];
|
|
9
|
+
title?: string;
|
|
10
|
+
timeContainer?: boolean;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const SelectDateAndTimeEventList = ({
|
|
14
|
+
selectedProductSetId,
|
|
15
|
+
onSelectProductSet,
|
|
16
|
+
dateList,
|
|
17
|
+
title,
|
|
18
|
+
timeContainer,
|
|
19
|
+
}: EventProductSetsProps) => {
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
<h5>{title}</h5>
|
|
23
|
+
<div
|
|
24
|
+
className={clsx("event-date-list", timeContainer && "time-container")}
|
|
25
|
+
>
|
|
26
|
+
{dateList.map((date) => {
|
|
27
|
+
return (
|
|
28
|
+
<SelectDateAndTimeEvent
|
|
29
|
+
key={date.id}
|
|
30
|
+
date={date}
|
|
31
|
+
selected={selectedProductSetId === date.id}
|
|
32
|
+
onSelectProductSet={onSelectProductSet}
|
|
33
|
+
/>
|
|
34
|
+
);
|
|
35
|
+
})}
|
|
36
|
+
</div>
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SelectDateAndTimeEvent } from "./component/date-container/SelectDateAndTimeEvent";
|