@licklist/design 0.44.533 → 0.44.535
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/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
- package/dist/events/event-card/EventCard.js +1 -1
- package/dist/events/event-card/utils.d.ts +2 -1
- package/dist/events/event-card/utils.d.ts.map +1 -1
- package/dist/events/event-card/utils.js +1 -1
- package/dist/iframe/event/index.d.ts +0 -1
- package/dist/iframe/event/index.d.ts.map +1 -1
- package/dist/iframe/index.d.ts +1 -1
- package/dist/iframe/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -0
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/number-of-people-input/NumberOfPeopleInput.d.ts.map +1 -0
- package/dist/number-of-people-input/NumberOfPeopleInput.js +1 -0
- package/dist/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.d.ts +2 -3
- package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.d.ts.map +1 -0
- package/dist/number-of-people-input/components/RenderNumberOfPeopleInputComponent.js +1 -0
- package/dist/number-of-people-input/components/index.d.ts +2 -0
- package/dist/number-of-people-input/components/index.d.ts.map +1 -0
- package/dist/number-of-people-input/index.d.ts +3 -0
- package/dist/number-of-people-input/index.d.ts.map +1 -0
- package/dist/product-set/control/ProductSetControl.d.ts +2 -1
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +1 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +3 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +1 -1
- package/dist/styles/sales/BookingResults.scss +9 -1
- package/dist/types/iframe.d.ts +1 -0
- package/dist/types/iframe.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +0 -9
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -1
- package/src/events/event-card/EventCard.tsx +2 -2
- package/src/events/event-card/utils.ts +12 -1
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +0 -1
- package/src/iframe/event/index.ts +0 -1
- package/src/iframe/index.ts +0 -1
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +2 -2
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +1 -1
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +0 -1
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +5 -0
- package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/{iframe/event/event-details/components/number-of-people-input → number-of-people-input}/NumberOfPeopleInput.tsx +1 -1
- package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.stories.tsx +92 -0
- package/src/{iframe/event/event-details/components/number-of-people-input/component → number-of-people-input/components}/RenderNumberOfPeopleInputComponent.tsx +3 -3
- package/src/number-of-people-input/components/index.ts +1 -0
- package/src/number-of-people-input/index.ts +2 -0
- package/src/product-set/control/ProductSetControl.tsx +36 -0
- package/src/product-set/form/ProductCategoriesControl.tsx +0 -1
- package/src/product-set/form/ProductSetForm.stories.tsx +2 -6
- package/src/product-set/product-category/ProductCategory.stories.tsx +0 -1
- package/src/product-set/product-category/ProductCategoryControl.tsx +0 -23
- package/src/sales/booking/results/BookingResults.stories.tsx +0 -7
- package/src/sales/booking/results/components/ResultCard.tsx +6 -1
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +0 -7
- package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +20 -5
- package/src/styles/sales/BookingResults.scss +9 -1
- package/src/types/iframe.ts +1 -0
- package/dist/iframe/event/event-details/EventDetails.d.ts +0 -10
- package/dist/iframe/event/event-details/EventDetails.d.ts.map +0 -1
- package/dist/iframe/event/event-details/EventDetails.js +0 -1
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts +0 -9
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/category-product/CategoryProduct.js +0 -1
- package/dist/iframe/event/event-details/components/category-product/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/category-product/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts +0 -26
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/event-details-form/EventDetailsForm.js +0 -1
- package/dist/iframe/event/event-details/components/event-details-form/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/event-details-form/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/NumberOfPeopleInput.js +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/component/RenderNumberOfPeopleInputComponent.js +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/number-of-people-input/component/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/number-of-people-input/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts +0 -8
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.d.ts.map +0 -1
- package/dist/iframe/event/event-details/components/product-category-view/ProductCategoryView.js +0 -1
- package/dist/iframe/event/event-details/components/product-category-view/index.d.ts +0 -2
- package/dist/iframe/event/event-details/components/product-category-view/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/index.d.ts +0 -2
- package/dist/iframe/event/event-details/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/utils/index.d.ts +0 -2
- package/dist/iframe/event/event-details/utils/index.d.ts.map +0 -1
- package/dist/iframe/event/event-details/utils/routes.d.ts +0 -2
- package/dist/iframe/event/event-details/utils/routes.d.ts.map +0 -1
- package/dist/iframe/event/event-details/utils/routes.js +0 -1
- package/src/iframe/event/event-details/EventDetails.stories.tsx +0 -187
- package/src/iframe/event/event-details/EventDetails.tsx +0 -92
- package/src/iframe/event/event-details/EventDetailsOneStepForm.stories.tsx +0 -123
- package/src/iframe/event/event-details/components/category-product/CategoryProduct.tsx +0 -109
- package/src/iframe/event/event-details/components/category-product/index.ts +0 -1
- package/src/iframe/event/event-details/components/event-details-form/EventDetailsForm.tsx +0 -250
- package/src/iframe/event/event-details/components/event-details-form/index.ts +0 -5
- package/src/iframe/event/event-details/components/number-of-people-input/component/index.ts +0 -1
- package/src/iframe/event/event-details/components/number-of-people-input/index.ts +0 -1
- package/src/iframe/event/event-details/components/product-category-view/ProductCategoryView.tsx +0 -34
- package/src/iframe/event/event-details/components/product-category-view/index.ts +0 -1
- package/src/iframe/event/event-details/index.ts +0 -1
- package/src/iframe/event/event-details/utils/index.ts +0 -1
- package/src/iframe/event/event-details/utils/routes.ts +0 -6
- /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";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),r=require("@licklist/core/dist/Config"),l=require("react-i18next"),a=require("../../../../static/Icon.js"),n=e(require("clsx")),i=require("luxon"),s=require("@licklist/plugins/dist/utils/formatDate");exports.ResultCard=function(e){var c,u,o=e.order,
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),r=require("@licklist/core/dist/Config"),l=require("react-i18next"),a=require("../../../../static/Icon.js"),n=e(require("clsx")),i=require("luxon"),s=require("@licklist/plugins/dist/utils/formatDate");exports.ResultCard=function(e){var c,u,o,m=e.order,d=e.className,p=e.onCardClick,E=l.useTranslation("Design").t,f=m.id,v=m.people,N=m.user,q=m.status,D=m.startDate,x=(null===(c=m.products.map((function(e){return e.name})))||void 0===c?void 0:c.join(", "))||"",g=function(){p&&p(f)};return t.createElement("div",{className:n("result-card",d),onClick:g,onKeyUp:g,role:"button",tabIndex:0},t.createElement("div",{className:"card-content"},t.createElement("div",{className:"order-id"},f),t.createElement("div",{className:"order-people"},t.createElement(a.default,{type:"user",width:"10",height:"11"}),v),t.createElement("div",{className:"order-description"},t.createElement("p",{className:"name"},N.firstName," ",N.lastName),N.email&&t.createElement("p",null,N.email),(null===(u=N.userDetail)||void 0===u?void 0:u.phone)&&t.createElement("p",null,null===(o=N.userDetail)||void 0===o?void 0:o.phone),t.createElement("p",null,"------"),t.createElement("p",null,E("activity"),": "),t.createElement("p",null,E("staff"),": "),t.createElement("p",null,E("status"),": ",E(q)),t.createElement("p",null,E("date"),": ",s.formatDateStringForEvent(D,!1)),t.createElement("p",null,E("time"),": ",i.DateTime.fromISO(D).toFormat(r.TIME_FORMAT)),t.createElement("p",{className:"products",title:x},E("products"),": ",x))))};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ManualBookingOrder } from "@licklist/plugins/dist/context/sale/ManualBookingStepsContext";
|
|
3
|
+
import { RelyOnPeopleType } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
|
|
3
4
|
export interface ManualBookingSummaryProps {
|
|
4
5
|
eventName: string;
|
|
5
6
|
orders: ManualBookingOrder[];
|
|
@@ -7,6 +8,7 @@ export interface ManualBookingSummaryProps {
|
|
|
7
8
|
orderSumIncludingFee?: number | null;
|
|
8
9
|
isFeeFetching: boolean;
|
|
9
10
|
orderDate: string;
|
|
11
|
+
relyOnPeopleType?: RelyOnPeopleType | null;
|
|
10
12
|
}
|
|
11
|
-
export declare const ManualBookingSummary: ({ eventName, orders, ordersSum, orderSumIncludingFee, isFeeFetching, orderDate, }: ManualBookingSummaryProps) => JSX.Element;
|
|
13
|
+
export declare const ManualBookingSummary: ({ eventName, orders, ordersSum, orderSumIncludingFee, isFeeFetching, orderDate, relyOnPeopleType, }: ManualBookingSummaryProps) => JSX.Element;
|
|
12
14
|
//# sourceMappingURL=ManualBookingSummary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManualBookingSummary.d.ts","sourceRoot":"","sources":["../../../../src/sales/manual-booking/summary/ManualBookingSummary.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;
|
|
1
|
+
{"version":3,"file":"ManualBookingSummary.d.ts","sourceRoot":"","sources":["../../../../src/sales/manual-booking/summary/ManualBookingSummary.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AAQnG,OAAO,EAEL,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAIrE,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,oBAAoB,wGAQ9B,yBAAyB,gBAiF3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,a=require("@licklist/core/dist/Config");require("../../../static/loader/LoaderIndicator.js");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,a=require("@licklist/core/dist/Config");require("../../../static/loader/LoaderIndicator.js");var l=require("../../../static/loader/BlockLoader.js"),n=require("react-i18next");require("../../../static/loader/ButtonLoader.js"),require("../../../static/loader/SnippetLoader.js"),require("../../../static/loader/PaymentLoader.js");var c=require("luxon"),i=require("@licklist/core/dist/DataMapper/Product/ProductSetDataMapper"),m=require("react-intl"),o=require("@licklist/plugins/dist/utils/relyOnPeople");exports.ManualBookingSummary=function(e){var t=e.eventName,s=e.orders,u=e.ordersSum,d=e.orderSumIncludingFee,y=e.isFeeFetching,p=e.orderDate,v=e.relyOnPeopleType,E=n.useTranslation(["Design","Sale"]).t,N=m.useIntl().formatNumber,q=v&&v!==i.RELY_ON_PEOPLE_QUANTITY,O=c.DateTime.fromISO(p),P=O.toFormat(a.DATE_TIME_MANUAL_BOOKING_FORMAT),g=O.toFormat(a.TIME_FORMAT);return r.createElement("div",{className:"manual-booking-summary"},r.createElement("div",{className:"receipt-title"},E("Sale:receipt")),r.createElement("div",{className:"event-name border-summary-item"},t),r.createElement("div",{className:"border-summary-item"},P),r.createElement("div",{className:"border-summary-item"},g),s.length>0?r.createElement("div",{className:"summary-item-container"},s.map((function(e){var t=o.getRelyOnPeopleMultiplier({relyOnPeopleType:v,capacity:null==e?void 0:e.capacity});return r.createElement("div",{key:e.id,className:"d-flex justify-content-between border-summary-item"},r.createElement("div",null,e.name),q&&t&&r.createElement("div",null,"x ".concat(e.quantity*t," ").concat(E("people"))),r.createElement("div",null,N(e.quantity*e.price,{style:"currency",currency:a.Currency.GBP})))})),r.createElement("div",null,r.createElement("div",{className:"total-container"},r.createElement("div",null,E("Sale:total")),r.createElement("div",{className:"total-amount"},N(u,{style:"currency",currency:a.Currency.GBP}))),d&&r.createElement("div",{className:"total-container ".concat(y?"mt-6":"mt-4")},y||!d?r.createElement(l.BlockLoader,null):r.createElement(r.Fragment,null,r.createElement("div",null,E("Sale:includingOperationalCost")),r.createElement("div",{className:"total-amount"},N(d,{style:"currency",currency:a.Currency.GBP})))))):r.createElement("div",{className:"cart-items"},r.createElement("p",{className:"empty-cart"},E("Design:emptyBasket"))))};
|
|
@@ -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"})))})))};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
flex-wrap: wrap;
|
|
6
6
|
|
|
7
7
|
.result-card {
|
|
8
|
-
height:
|
|
8
|
+
height: 12.125rem;
|
|
9
9
|
border: 1px solid $gray-400;
|
|
10
10
|
max-width: calc(50% - 0.75rem);
|
|
11
11
|
flex: 0 0 calc(50% - 0.75rem);
|
|
@@ -62,6 +62,14 @@
|
|
|
62
62
|
font-size: 0.6875rem;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
+
|
|
66
|
+
.products {
|
|
67
|
+
display: inline-block;
|
|
68
|
+
width: 80%;
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
text-overflow: ellipsis;
|
|
72
|
+
}
|
|
65
73
|
}
|
|
66
74
|
|
|
67
75
|
&:hover {
|
package/dist/types/iframe.d.ts
CHANGED
|
@@ -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
|
@@ -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?.
|
|
28
|
+
? getFilteredTemplates(productSet?.smsTemplates)
|
|
28
29
|
: undefined,
|
|
29
30
|
steps:
|
|
30
31
|
productSet?.steps?.map(({ productCategories, ...step }) => ({
|
|
@@ -11,7 +11,7 @@ import { Sale } from "../../types/bookings";
|
|
|
11
11
|
import { TipTapEditor } from "../../tiptap-editor/TipTapEditor";
|
|
12
12
|
import {
|
|
13
13
|
EVENT_DESCRIPTION_SIZE,
|
|
14
|
-
|
|
14
|
+
formatContentWithoutTags,
|
|
15
15
|
getStatisticInfo,
|
|
16
16
|
} from "./utils";
|
|
17
17
|
import { ReactComponent as ChartBarIcon } from "../../assets/dashboard/chartBar.svg";
|
|
@@ -52,7 +52,7 @@ export function EventCard({
|
|
|
52
52
|
const { formatNumber, formatDate } = useIntl();
|
|
53
53
|
const { totalViews, ...statistics } = getStatisticInfo(eventStatistic, date);
|
|
54
54
|
const memoedContent = useMemo(
|
|
55
|
-
() =>
|
|
55
|
+
() => formatContentWithoutTags(description, EVENT_DESCRIPTION_SIZE),
|
|
56
56
|
[description]
|
|
57
57
|
);
|
|
58
58
|
|
|
@@ -8,7 +8,18 @@ export function formatContent(content, maxSymbols) {
|
|
|
8
8
|
return content;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const formatContentWithoutTags = (content, maxLength = 300) => {
|
|
12
|
+
if (!content) return "";
|
|
13
|
+
if (content < maxLength) return content;
|
|
14
|
+
const text = content.replace(/<[^>]*>/g, "");
|
|
15
|
+
const trimmedText = text.trim().replace(/\s\s+/g, " ");
|
|
16
|
+
|
|
17
|
+
const words = trimmedText.slice(0, maxLength).split(" ");
|
|
18
|
+
const index = String(content).indexOf(words[words.length - 2]);
|
|
19
|
+
return content.slice(0, index).concat("...");
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const EVENT_DESCRIPTION_SIZE = 300;
|
|
12
23
|
|
|
13
24
|
export const getStatisticInfo = (
|
|
14
25
|
eventStatistic: EventStatistic | null,
|
|
@@ -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";
|
package/src/iframe/index.ts
CHANGED
|
@@ -14,7 +14,7 @@ export const BookingSummary = ({
|
|
|
14
14
|
time,
|
|
15
15
|
menuSteps,
|
|
16
16
|
formValues,
|
|
17
|
-
|
|
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
|
-
{!
|
|
68
|
+
{!shouldHidePeopleAmount && peopleAmount > 0 && (
|
|
69
69
|
<>
|
|
70
70
|
<hr />
|
|
71
71
|
<div className="d-flex justify-content-between mt-3">
|
|
@@ -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
|
}}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect } from "react";
|
|
2
2
|
import { useFormContext, Controller } from "react-hook-form";
|
|
3
|
-
import { RenderNumberOfPeopleInputComponent } from "./
|
|
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 "
|
|
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
|
|
11
|
+
peopleAmountError?: boolean;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export const RenderNumberOfPeopleInputComponent = ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./RenderNumberOfPeopleInputComponent";
|
|
@@ -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,
|