@licklist/design 0.58.6-dev.6 → 0.58.6-dev.7
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/calendar.svg +2 -2
- package/dist/assets/iframe/calendar.svg.js +1 -1
- package/dist/assets/iframe/ticket.svg +2 -2
- package/dist/assets/iframe/ticket.svg.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +2 -2
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts +4 -2
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts +4 -2
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +4 -0
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/constants.d.ts +1 -0
- package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/constants.js +1 -1
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts +5 -0
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -0
- package/dist/iframe/ryft/utils/ryft-form.js +1 -0
- package/dist/styles/iframe-order-process/IframeOrderProcess.scss +57 -18
- package/dist/styles/iframe-page/PageBody.scss +2 -1
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +125 -2
- package/package.json +1 -1
- package/src/assets/iframe/calendar.svg +2 -2
- package/src/assets/iframe/ticket.svg +2 -2
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +9 -0
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +58 -7
- package/src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx +8 -0
- package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx +4 -4
- package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx +63 -10
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +4 -0
- package/src/iframe/page/components/PageBody/constants.ts +2 -0
- package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +10 -0
- package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +546 -6
- package/src/iframe/payment/payment-page/PaymentPage.tsx +38 -29
- package/src/iframe/ryft/RyftPaymentForm.tsx +11 -5
- package/src/iframe/ryft/utils/ryft-form.ts +47 -0
- package/src/styles/iframe-order-process/IframeOrderProcess.scss +57 -18
- package/src/styles/iframe-page/PageBody.scss +2 -1
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +125 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="16" height="15" viewBox="0 0 16 15" fill="
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 0C3.44772 0 3 0.447715 3 1H1C0.447715 1 0 1.44772 0 2V4H16V2C16 1.44772 15.5523 1 15 1H13C13 0.447715 12.5523 0 12 0C11.4477 0 11 0.447715 11 1H5C5 0.447715 4.55228 0 4 0ZM16 6C16 5.44772 15.5523 5 15 5H1C0.447715 5 0 5.44772 0 6V12C0 13.6569 1.34315 15 3 15H13C14.6569 15 16 13.6569 16 12V6ZM2 7H14V12C14 12.5523 13.5523 13 13 13H3L2.88338 12.9933C2.38604 12.9355 2 12.5128 2 12V7ZM10.5 9C10.2239 9 10 9.22386 10 9.5V11.5C10 11.7761 10.2239 12 10.5 12H12.5C12.7761 12 13 11.7761 13 11.5V9.5C13 9.22386 12.7761 9 12.5 9H10.5Z"
|
|
1
|
+
<svg width="16" height="15" viewBox="0 0 16 15" fill="#979797" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 0C3.44772 0 3 0.447715 3 1H1C0.447715 1 0 1.44772 0 2V4H16V2C16 1.44772 15.5523 1 15 1H13C13 0.447715 12.5523 0 12 0C11.4477 0 11 0.447715 11 1H5C5 0.447715 4.55228 0 4 0ZM16 6C16 5.44772 15.5523 5 15 5H1C0.447715 5 0 5.44772 0 6V12C0 13.6569 1.34315 15 3 15H13C14.6569 15 16 13.6569 16 12V6ZM2 7H14V12C14 12.5523 13.5523 13 13 13H3L2.88338 12.9933C2.38604 12.9355 2 12.5128 2 12V7ZM10.5 9C10.2239 9 10 9.22386 10 9.5V11.5C10 11.7761 10.2239 12 10.5 12H12.5C12.7761 12 13 11.7761 13 11.5V9.5C13 9.22386 12.7761 9 12.5 9H10.5Z" />
|
|
3
3
|
</svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,a=require("react");(e=a)&&"object"==typeof e&&"default"in e&&e.default;function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},n.apply(null,arguments)}exports.ReactComponent=function(e){return a.createElement("svg",n({width:16,height:15,fill:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,a=require("react");(e=a)&&"object"==typeof e&&"default"in e&&e.default;function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},n.apply(null,arguments)}exports.ReactComponent=function(e){return a.createElement("svg",n({width:16,height:15,fill:"#979797",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 0a1 1 0 00-1 1H1a1 1 0 00-1 1v2h16V2a1 1 0 00-1-1h-2a1 1 0 10-2 0H5a1 1 0 00-1-1zm12 6a1 1 0 00-1-1H1a1 1 0 00-1 1v6a3 3 0 003 3h10a3 3 0 003-3V6zM2 7h12v5a1 1 0 01-1 1H3l-.117-.007A1 1 0 012 12V7zm8.5 2a.5.5 0 00-.5.5v2a.5.5 0 00.5.5h2a.5.5 0 00.5-.5v-2a.5.5 0 00-.5-.5h-2z"})))};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="18" height="14" viewBox="0 0 18 14" fill="
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M18 2.00002C18 0.89543 17.1046 0 16 0H2C0.89543 0 0 0.89543 0 2L0.000956201 4.35567C0.00105503 4.59911 0.0899525 4.83415 0.250979 5.01672C0.731269 5.56128 1 6.25846 1 7C1 7.74154 0.731269 8.43872 0.250979 8.98328C0.0899525 9.16585 0.00105503 9.4009 0.000956201 9.64433L0 11.9996C0 13.1046 0.89543 14 2 14H16C17.1046 14 18 13.1046 18 12L17.9999 9.64574C17.9999 9.40205 17.9109 9.16675 17.7497 8.98404C17.269 8.43938 17 7.7419 17 7C17 6.2581 17.269 5.56062 17.7497 5.01596C17.9109 4.83325 17.9999 4.59795 17.9999 4.35426L18 2.00002ZM2.07187 4.09764L2 4.002L1.999 2H5C5 2.55228 5.44772 3 6 3C6.55228 3 7 2.55228 7 2H16L15.999 4.002L15.929 4.09646C15.3306 4.93393 15 5.94228 15 7L15.0069 7.26333C15.057 8.22459 15.3805 9.13586 15.929 9.90354L15.999 9.997L16 12H7C7 11.4477 6.55228 11 6 11C5.44772 11 5 11.4477 5 12H2V9.996L2.07187 9.90236C2.66972 9.06511 3 8.05722 3 7C3 5.94278 2.66972 4.93489 2.07187 4.09764ZM6 6C6.55228 6 7 5.55228 7 5C7 4.44772 6.55228 4 6 4C5.44772 4 5 4.44772 5 5C5 5.55228 5.44772 6 6 6ZM7 9C7 9.55229 6.55228 10 6 10C5.44772 10 5 9.55229 5 9C5 8.44771 5.44772 8 6 8C6.55228 8 7 8.44771 7 9Z"
|
|
1
|
+
<svg width="18" height="14" viewBox="0 0 18 14" fill="#979797" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M18 2.00002C18 0.89543 17.1046 0 16 0H2C0.89543 0 0 0.89543 0 2L0.000956201 4.35567C0.00105503 4.59911 0.0899525 4.83415 0.250979 5.01672C0.731269 5.56128 1 6.25846 1 7C1 7.74154 0.731269 8.43872 0.250979 8.98328C0.0899525 9.16585 0.00105503 9.4009 0.000956201 9.64433L0 11.9996C0 13.1046 0.89543 14 2 14H16C17.1046 14 18 13.1046 18 12L17.9999 9.64574C17.9999 9.40205 17.9109 9.16675 17.7497 8.98404C17.269 8.43938 17 7.7419 17 7C17 6.2581 17.269 5.56062 17.7497 5.01596C17.9109 4.83325 17.9999 4.59795 17.9999 4.35426L18 2.00002ZM2.07187 4.09764L2 4.002L1.999 2H5C5 2.55228 5.44772 3 6 3C6.55228 3 7 2.55228 7 2H16L15.999 4.002L15.929 4.09646C15.3306 4.93393 15 5.94228 15 7L15.0069 7.26333C15.057 8.22459 15.3805 9.13586 15.929 9.90354L15.999 9.997L16 12H7C7 11.4477 6.55228 11 6 11C5.44772 11 5 11.4477 5 12H2V9.996L2.07187 9.90236C2.66972 9.06511 3 8.05722 3 7C3 5.94278 2.66972 4.93489 2.07187 4.09764ZM6 6C6.55228 6 7 5.55228 7 5C7 4.44772 6.55228 4 6 4C5.44772 4 5 4.44772 5 5C5 5.55228 5.44772 6 6 6ZM7 9C7 9.55229 6.55228 10 6 10C5.44772 10 5 9.55229 5 9C5 8.44771 5.44772 8 6 8C6.55228 8 7 8.44771 7 9Z" />
|
|
3
3
|
</svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,a=require("react");(e=a)&&"object"==typeof e&&"default"in e&&e.default;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},l.apply(null,arguments)}exports.ReactComponent=function(e){return a.createElement("svg",l({width:18,height:14,fill:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,a=require("react");(e=a)&&"object"==typeof e&&"default"in e&&e.default;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},l.apply(null,arguments)}exports.ReactComponent=function(e){return a.createElement("svg",l({width:18,height:14,fill:"#979797",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 2a2 2 0 00-2-2H2a2 2 0 00-2 2l.001 2.356a1 1 0 00.25.66C.731 5.562 1 6.259 1 7S.731 8.439.251 8.983a1 1 0 00-.25.661L0 12a2 2 0 002 2h14a2 2 0 002-2V9.646a1 1 0 00-.25-.662A2.984 2.984 0 0117 7c0-.742.269-1.44.75-1.984a1 1 0 00.25-.662V2zM2.072 4.098L2 4.002 1.999 2H5a1 1 0 002 0h9l-.001 2.002-.07.094A4.982 4.982 0 0015 7l.007.263c.05.962.373 1.873.922 2.64l.07.094L16 12H7a1 1 0 10-2 0H2V9.996l.072-.094A4.982 4.982 0 003 7c0-1.057-.33-2.065-.928-2.902zM6 6a1 1 0 100-2 1 1 0 000 2zm1 3a1 1 0 11-2 0 1 1 0 012 0z"})))};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BookingSummaryProps } from "./types";
|
|
3
3
|
export declare const BookingSummary: {
|
|
4
|
-
({ date, time, menuSteps, formValues, shouldHidePeopleAmount, eventName, transactionFee, productsWithErrors, isLoading, hasPeopleInput, isPaymentLink, peopleAmount, }: Omit<BookingSummaryProps, "totallWithDiscount">): JSX.Element;
|
|
4
|
+
({ date, time, menuSteps, formValues, shouldHidePeopleAmount, eventName, transactionFee, productsWithErrors, isLoading, hasPeopleInput, isPaymentLink, peopleAmount, footer, headerComponent, isPaymentPage, }: Omit<BookingSummaryProps, "totallWithDiscount">): JSX.Element;
|
|
5
5
|
SummaryTotal: ({ formValues, totalWithDiscount, transactionFee, isFreePayment, }: Pick<BookingSummaryProps, "formValues" | "totalWithDiscount" | "transactionFee" | "isFreePayment">) => JSX.Element;
|
|
6
|
-
Accordion: ({ children, title, showTitleOnlyOnMobile, hasPeopleInput, }: import("./components/BookingSummaryAccordion").BookingSummaryAccordionProps) => JSX.Element;
|
|
6
|
+
Accordion: ({ children, title, showTitleOnlyOnMobile, hasPeopleInput, isPaymentPage, headerComponent, }: import("./components/BookingSummaryAccordion").BookingSummaryAccordionProps) => JSX.Element;
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=BookingSummary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingSummary.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/BookingSummary/BookingSummary.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"BookingSummary.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/BookingSummary/BookingSummary.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAM9C,eAAO,MAAM,cAAc;oNAiBxB,KAAK,mBAAmB,EAAE,oBAAoB,CAAC;;;CAiFjD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),a=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,r=require("@licklist/core/dist/Config"),n=require("../../../../static/loader/LoaderIndicator.js"),m=require("react-i18next");require("../../../../static/index.js");var l=require("lodash"),c=require("react-intl"),s=require("../../../../assets/iframe/calendar.svg.js"),i=require("../../../../assets/iframe/ticket.svg.js");require("./components/SummaryTotal/components/SummaryTotalBlock.js");var o=require("./components/ProductsByMenuStep/ProductsByMenuStep.js"),u=require("./components/SummaryTotal/SummaryTotal.js"),d=require("./components/BookingSummaryAccordion/BookingSummaryAccordion.js"),p=function(e){var t,s=e.date,i=e.time,u=e.menuSteps,p=e.formValues,E=void 0===p?{}:p,v=e.shouldHidePeopleAmount,g=e.eventName,N=e.transactionFee,f=void 0===N?0:N,h=e.productsWithErrors,P=void 0===h?[]:h,k=e.isLoading,S=e.hasPeopleInput,b=e.isPaymentLink,q=e.peopleAmount,j=e.footer,B=e.headerComponent,x=e.isPaymentPage,A=m.useTranslation("Design").t,T=c.useIntl().formatNumber;return k?a.createElement("div",{className:"payment-booking-summary"},a.createElement(n.LoaderIndicator,{isLoaded:!1})):a.createElement("div",{className:"payment-booking-summary"},a.createElement(d.BookingSummaryAccordion,{isPaymentPage:x,hasPeopleInput:S,headerComponent:B},a.createElement("div",{className:"event-info"},a.createElement(y,{eventName:g,isPaymentPage:x,date:s,time:i})),a.createElement("hr",null),(null===(t=l.values(E))||void 0===t?void 0:t.length)>0?a.createElement("div",null,a.createElement("div",{className:"cart-items"},a.createElement("div",{className:"products-by-menu-step"},u.map((function(e){return a.createElement(o.ProductsByMenuStep,{isPaymentLink:b,key:e.id,orderItems:E,step:e,productsWithErrors:P})}))),!v&&q>0&&a.createElement(a.Fragment,null,a.createElement("hr",null),a.createElement("div",{className:"d-flex justify-content-between mt-3 people"},a.createElement("p",{className:"m-0 payment-metadata"},A("people"),":"),a.createElement("p",{className:"price"},q))),!!f&&a.createElement(a.Fragment,null,a.createElement("hr",null),a.createElement("div",{className:"d-flex justify-content-between mt-3"},a.createElement("p",{className:"m-0 payment-metadata"},A("transactionFee"),":"),a.createElement("p",{className:"price"},T(f,{style:"currency",currency:r.Currency.GBP}))))),j):a.createElement("div",{className:"cart-items"},a.createElement("p",{className:"empty-cart"},A("emptyBasket")))))};p.SummaryTotal=u.SummaryTotal,p.Accordion=d.BookingSummaryAccordion;var y=function(e){var t=e.isPaymentPage,r=e.eventName,n=e.date,m=e.time;return t?a.createElement(a.Fragment,null,a.createElement("div",{className:"d-flex align-items-center mb-5"},a.createElement(i.ReactComponent,{height:16,width:20,fill:"black"}),a.createElement("div",{className:"m-0 pl-2 title event-name metadata"},r)),a.createElement("div",{className:"d-flex align-items-center mb-5"},a.createElement(s.ReactComponent,{height:16,width:20,fill:"black"}),a.createElement("div",{className:"m-0 pl-2 metadata"},n)),m&&a.createElement("div",{className:"mb-5 metadata"},m)):a.createElement(a.Fragment,null,a.createElement("p",{className:"m-0 title event-name"},r),a.createElement("p",{className:"m-0"},n),m&&a.createElement("p",{className:"m-0"},m))};exports.BookingSummary=p;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { PropsWithChildren } from "react";
|
|
1
|
+
import { PropsWithChildren, ReactElement } from "react";
|
|
2
2
|
export type BookingSummaryAccordionProps = PropsWithChildren<{
|
|
3
3
|
title?: string;
|
|
4
4
|
showTitleOnlyOnMobile?: boolean;
|
|
5
5
|
hasPeopleInput?: boolean;
|
|
6
|
+
isPaymentPage?: boolean;
|
|
7
|
+
headerComponent?: ReactElement;
|
|
6
8
|
}>;
|
|
7
|
-
export declare const BookingSummaryAccordion: ({ children, title, showTitleOnlyOnMobile, hasPeopleInput, }: BookingSummaryAccordionProps) => JSX.Element;
|
|
9
|
+
export declare const BookingSummaryAccordion: ({ children, title, showTitleOnlyOnMobile, hasPeopleInput, isPaymentPage, headerComponent, }: BookingSummaryAccordionProps) => JSX.Element;
|
|
8
10
|
//# sourceMappingURL=BookingSummaryAccordion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingSummaryAccordion.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx"],"names":[],"mappings":"AAAA,OAAc,EAGZ,iBAAiB,
|
|
1
|
+
{"version":3,"file":"BookingSummaryAccordion.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx"],"names":[],"mappings":"AAAA,OAAc,EAGZ,iBAAiB,EAEjB,YAAY,EACb,MAAM,OAAO,CAAC;AAaf,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,YAAY,CAAC;CAChC,CAAC,CAAC;AAEH,eAAO,MAAM,uBAAuB,gGAOjC,4BAA4B,gBA+D9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react"),o=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-bootstrap"),a=require("@licklist/plugins/dist/hooks/Media/useWindowDimensions"),s=require("../../types/index.js"),r=require("../../../../../page/components/PageBody/constants.js"),c=require("../../../../../page/components/PageBody/hooks/useResizePageBody.js"),l=require("../ToggleHeader/ToggleHeader.js");exports.BookingSummaryAccordion=function(e){var d=e.children,u=e.title,E=e.showTitleOnlyOnMobile,p=void 0!==E&&E,C=e.hasPeopleInput,w=a.useWindowDimensions().width,O=t.__read(n.useState(w<=s.MOBILE_WIDTH),2),_=O[0],
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react"),o=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-bootstrap"),a=require("@licklist/plugins/dist/hooks/Media/useWindowDimensions"),s=require("../../types/index.js"),r=require("../../../../../page/components/PageBody/constants.js"),c=require("../../../../../page/components/PageBody/hooks/useResizePageBody.js"),l=require("../ToggleHeader/ToggleHeader.js");exports.BookingSummaryAccordion=function(e){var d=e.children,u=e.title,E=e.showTitleOnlyOnMobile,p=void 0!==E&&E,C=e.hasPeopleInput,g=e.isPaymentPage,m=e.headerComponent,w=a.useWindowDimensions().width,O=t.__read(n.useState(w<=s.MOBILE_WIDTH),2),_=O[0],h=O[1],v=c.useResizePageBody().rightBlockContentStyles,y=w<=s.MOBILE_WIDTH,f=n.useCallback((function(e){h(e===s.ACCORDION_KEY)}),[]),B=n.useCallback((function(){window.dispatchEvent(new Event(r.RIGHT_BLOCK_EXPAND))}),[]),I=n.useCallback((function(){window.dispatchEvent(new Event(r.RIGHT_BLOCK_EXPANDED))}),[]),P=n.useCallback((function(){window.dispatchEvent(new Event(r.RIGHT_BLOCK_COLLAPSE))}),[]),D=n.useCallback((function(){window.dispatchEvent(new Event(r.RIGHT_BLOCK_COLLAPSED))}),[]);n.useEffect((function(){w>s.MOBILE_WIDTH?h(!0):h(!1)}),[w,h]);var A=!p||p&&y;return o.createElement(i.Accordion,{defaultActiveKey:s.ACCORDION_KEY,onSelect:f},o.createElement(l.ToggleHeader,{isPaymentPage:g,showExpandButton:y,isExpanded:_,title:u,hideComponent:!A,headerComponent:m}),o.createElement(i.Accordion.Collapse,{eventKey:s.ACCORDION_KEY,onEnter:B,onEntered:I,onExit:P,onExited:D,className:"".concat(A&&"has-toggler"," ").concat(C&&"collapse-with-people-input"),style:v},o.createElement("div",{className:"summary-wrapper"},d)))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummaryTotalBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx"],"names":[],"mappings":";AAIA,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"SummaryTotalBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx"],"names":[],"mappings":";AAIA,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,iBAAiB,uBAG3B,sBAAsB,gBAcxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("react"),t=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("react"),t=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,l=require("@licklist/core/dist/Config"),a=require("react-intl");exports.SummaryTotalBlock=function(e){var r=e.label,c=e.amount,u=a.useIntl().formatNumber;return t.createElement("div",{className:"total"},r&&t.createElement("div",null,r),t.createElement("div",{className:"m-0 price"},u(c,{style:"currency",currency:l.Currency.GBP})))};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
2
|
type ToggleHeaderProps = {
|
|
3
3
|
showExpandButton: boolean;
|
|
4
4
|
isExpanded: boolean;
|
|
5
5
|
title?: string;
|
|
6
6
|
hideComponent?: boolean;
|
|
7
|
+
headerComponent?: ReactElement;
|
|
8
|
+
isPaymentPage: boolean;
|
|
7
9
|
};
|
|
8
|
-
export declare const ToggleHeader: ({ showExpandButton, isExpanded, title, hideComponent, }: ToggleHeaderProps) => JSX.Element;
|
|
10
|
+
export declare const ToggleHeader: ({ showExpandButton, isExpanded, title, hideComponent, isPaymentPage, headerComponent, }: ToggleHeaderProps) => JSX.Element;
|
|
9
11
|
export {};
|
|
10
12
|
//# sourceMappingURL=ToggleHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ToggleHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAyB,MAAM,OAAO,CAAC;AAQnE,KAAK,iBAAiB,GAAG;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAOF,eAAO,MAAM,YAAY,4FAOtB,iBAAiB,gBA8CnB,CAAC"}
|
package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js
CHANGED
|
@@ -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=require("react"),n=e(t),r=require("react-i18next"),
|
|
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=require("react"),n=e(t),r=require("react-i18next"),a=require("../../../../../../static/Icon.js"),o=e(require("clsx")),c=require("../../types/index.js");require("../../../../../../static/index.js");var l=require("react-bootstrap/AccordionToggle"),i=e(require("react-bootstrap/AccordionContext")),s=function(e){var t=e.title,o=e.showExpandButton,l=e.currentEventKey,i=e.isPaymentPage,s=e.headerComponent,u=r.useTranslation("Design").t;return i?n.createElement(n.Fragment,null,n.createElement("div",{className:"d-flex"},n.createElement("p",{className:"m-0 mr-2 toggle-title"},t||u("yourBooking")),o&&n.createElement("div",{className:"expand-button"},n.createElement(a.default,{type:l===c.ACCORDION_KEY?"chevron-up":"chevron-down",width:"0.5rem"}))),s):n.createElement(n.Fragment,null,n.createElement("div",{className:"d-flex"},n.createElement("p",{className:"m-0"},t||u("yourBooking"))),o&&n.createElement("div",{className:"expand-button"},n.createElement(a.default,{type:l===c.ACCORDION_KEY?"chevron-up":"chevron-down",width:"1rem"})))};exports.ToggleHeader=function(e){var r=e.showExpandButton,a=e.isExpanded,u=e.title,m=e.hideComponent,d=e.isPaymentPage,p=e.headerComponent,E=t.useContext(i),f=l.useAccordionToggle(c.ACCORDION_KEY);return t.useEffect((function(){E||!a?E&&!a&&f(void 0):f(void 0)}),[a]),m?null:n.createElement("div",{onClick:function(e){return r&&f(e)},onKeyPress:function(e){return r&&f(e)},role:"button",tabIndex:0,className:o("d-flex flex-column",d&&"payment-page-toggle")},n.createElement("h6",{className:o("title",r&&"pointer")},n.createElement("div",{className:"d-flex w-100 align-content-center justify-content-between"},n.createElement(s,{showExpandButton:r,title:u,currentEventKey:E,isPaymentPage:d,headerComponent:p}))),a&&n.createElement("hr",{className:"mt-3"}))};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
|
|
2
2
|
import { OrderItems } from "@licklist/plugins/dist/types/context/Iframe/orderItems";
|
|
3
3
|
import { MenuStep } from "@licklist/plugins/dist/types/context/sale/menuSteps";
|
|
4
|
+
import { ReactElement } from "react";
|
|
4
5
|
export declare const MOBILE_WIDTH = 576;
|
|
5
6
|
export declare const ACCORDION_KEY = "booking-summary";
|
|
6
7
|
export type BookingSummaryProps = {
|
|
@@ -18,5 +19,8 @@ export type BookingSummaryProps = {
|
|
|
18
19
|
isLoading?: boolean;
|
|
19
20
|
peopleAmount: number;
|
|
20
21
|
isPaymentLink?: boolean;
|
|
22
|
+
isPaymentPage?: boolean;
|
|
23
|
+
headerComponent?: ReactElement;
|
|
24
|
+
footer?: ReactElement;
|
|
21
25
|
};
|
|
22
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,eAAO,MAAM,YAAY,MAAM,CAAC;AAChC,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAE/C,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC"}
|
|
@@ -15,5 +15,6 @@ export declare const SEPARATOR_DEFAULT_WIDTH = 2;
|
|
|
15
15
|
export declare const COLLAPSE_MARGIN = 36;
|
|
16
16
|
export declare const PAGE_LEFT_BLOCK_CONTAINER_ID = "page-left-block-container";
|
|
17
17
|
export declare const PAGE_CALENDAR_SELECT_WRAPPER = "calendar-select-wrapper";
|
|
18
|
+
export declare const PAYMENT_LINK_PAGE_BODY = "payment_link_page_body";
|
|
18
19
|
export declare const PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE = 300;
|
|
19
20
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/page/components/PageBody/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AAErE,eAAO,MAAM,qBAAqB,QAAU,CAAC;AAE7C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAG9C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAI9C,eAAO,MAAM,0CAA0C,KAAK,CAAC;AAE7D,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAC/D,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAC3D,eAAO,MAAM,oBAAoB,iCAAiC,CAAC;AACnE,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AACtD,eAAO,MAAM,4BAA4B,oCAAoC,CAAC;AAC9E,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAC1E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AACxE,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AACtE,eAAO,MAAM,gCAAgC,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/page/components/PageBody/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AAErE,eAAO,MAAM,qBAAqB,QAAU,CAAC;AAE7C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAG9C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAI9C,eAAO,MAAM,0CAA0C,KAAK,CAAC;AAE7D,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAC/D,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAC3D,eAAO,MAAM,oBAAoB,iCAAiC,CAAC;AACnE,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AACtD,eAAO,MAAM,4BAA4B,oCAAoC,CAAC;AAC9E,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAC1E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AACxE,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AACtE,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAE/D,eAAO,MAAM,gCAAgC,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.COLLAPSE_MARGIN=36,exports.DEFAULT_RIGHT_BLOCK_HEIGHT=132,exports.PAGE_CALENDAR_SELECT_WRAPPER="calendar-select-wrapper",exports.PAGE_LEFT_BLOCK_CONTAINER_ID="page-left-block-container",exports.PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE=300,exports.PAGE_RIGHT_BLOCK_BOTTOM_ID="page-right-block-bottom-block",exports.PAGE_RIGHT_BLOCK_CHILDREN_ID="page-right-block-children-block",exports.PAGE_RIGHT_BLOCK_ID="page-right-block",exports.RIGHT_BLOCK_COLLAPSE="RIGHT_BLOCK_COLLAPSE_CLICKED",exports.RIGHT_BLOCK_COLLAPSED="RIGHT_BLOCK_COLLAPSED",exports.RIGHT_BLOCK_EXPAND="RIGHT_BLOCK_EXPAND_CLICKED",exports.RIGHT_BLOCK_EXPANDED="RIGHT_BLOCK_EXPANDED",exports.RIGHT_BLOCK_RESIZED_EVENT="RIGHT_BLOCK_RESIZED_EVENT",exports.SEPARATOR_DEFAULT_WIDTH=2,exports.STANDARD_BODY_PADDING=97,exports.STANDARD_HEADER_FOOTER_SIZE=96,exports.TAB_WIDTH=768;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.COLLAPSE_MARGIN=36,exports.DEFAULT_RIGHT_BLOCK_HEIGHT=132,exports.PAGE_CALENDAR_SELECT_WRAPPER="calendar-select-wrapper",exports.PAGE_LEFT_BLOCK_CONTAINER_ID="page-left-block-container",exports.PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE=300,exports.PAGE_RIGHT_BLOCK_BOTTOM_ID="page-right-block-bottom-block",exports.PAGE_RIGHT_BLOCK_CHILDREN_ID="page-right-block-children-block",exports.PAGE_RIGHT_BLOCK_ID="page-right-block",exports.PAYMENT_LINK_PAGE_BODY="payment_link_page_body",exports.RIGHT_BLOCK_COLLAPSE="RIGHT_BLOCK_COLLAPSE_CLICKED",exports.RIGHT_BLOCK_COLLAPSED="RIGHT_BLOCK_COLLAPSED",exports.RIGHT_BLOCK_EXPAND="RIGHT_BLOCK_EXPAND_CLICKED",exports.RIGHT_BLOCK_EXPANDED="RIGHT_BLOCK_EXPANDED",exports.RIGHT_BLOCK_RESIZED_EVENT="RIGHT_BLOCK_RESIZED_EVENT",exports.SEPARATOR_DEFAULT_WIDTH=2,exports.STANDARD_BODY_PADDING=97,exports.STANDARD_HEADER_FOOTER_SIZE=96,exports.TAB_WIDTH=768;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizePageBody.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/page/components/PageBody/hooks/useResizePageBody.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useResizePageBody.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/page/components/PageBody/hooks/useResizePageBody.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;eAMnB,MAAM;gBACL,MAAM;;CA4OjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react"),i=((e=n)&&"object"==typeof e&&"default"in e&&e.default,require("@licklist/plugins/dist/hooks/Media/useWindowDimensions")),r=require("../constants.js");exports.useResizePageBody=function(){var e=i.useWindowDimensions(),u=e.height,_=e.width,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react"),i=((e=n)&&"object"==typeof e&&"default"in e&&e.default,require("@licklist/plugins/dist/hooks/Media/useWindowDimensions")),r=require("../constants.js");exports.useResizePageBody=function(){var e=i.useWindowDimensions(),u=e.height,_=e.width,o=t.__read(n.useState(r.DEFAULT_RIGHT_BLOCK_HEIGHT),2),E=o[0],c=o[1],d=t.__read(n.useState({width:r.PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE,height:r.PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE}),2),s=d[0],f=d[1],L=n.useRef(void 0),A=n.useRef(!1),T=t.__read(n.useState(!1),2),a=T[0],D=T[1],I=t.__read(n.useState(!1),2),v=I[0],O=I[1],R=t.__read(n.useState(!1),2),l=R[0],B=R[1],h=t.__read(n.useState(!1),2),w=h[0],C=h[1],H=n.useMemo((function(){if(_>=r.TAB_WIDTH)return{};if(!v&&!w)return{};var e=document.getElementById(r.PAGE_CALENDAR_SELECT_WRAPPER),t=e?e.clientHeight:0,n=document.getElementById(r.PAYMENT_LINK_PAGE_BODY);return n&&n.scroll({top:-E,behavior:"smooth"}),{maxHeight:u-r.STANDARD_BODY_PADDING-E-r.STANDARD_HEADER_FOOTER_SIZE-t}}),[u,_,E,a,v,l,w]),P=new ResizeObserver((function(){var e=document.getElementById(r.PAGE_LEFT_BLOCK_CONTAINER_ID);if(e){if(_>=r.TAB_WIDTH&&!A)return A.current=!0,void f({width:e.clientWidth,height:e.clientHeight});A.current=!1,f((function(){var t=e.clientWidth<=e.clientHeight?e.clientWidth:e.clientHeight;return(!L.current||L.current&&t>L.current)&&(L.current=t),{width:e.clientWidth,height:L.current}}))}})),S=n.useMemo((function(){if(_>=r.TAB_WIDTH)return{};if(!v&&!w)return{};var e=.75*(u-r.STANDARD_BODY_PADDING-r.STANDARD_HEADER_FOOTER_SIZE),t=0,n=document.getElementById(r.PAGE_RIGHT_BLOCK_BOTTOM_ID);return n&&(t=r.SEPARATOR_DEFAULT_WIDTH+n.clientHeight),{maxHeight:e-t-r.COLLAPSE_MARGIN}}),[u,_,E,a,v,l,w]);return n.useEffect((function(){var e=function(e){var t=e.detail.height;c(t)};return window.addEventListener(r.RIGHT_BLOCK_RESIZED_EVENT,(function(t){return e(t)})),function(){window.removeEventListener(r.RIGHT_BLOCK_RESIZED_EVENT,(function(t){return e(t)}))}}),[]),n.useEffect((function(){var e=function(){D(!0),O(!1),B(!1),C(!1)};return window.addEventListener(r.RIGHT_BLOCK_EXPAND,e),function(){window.removeEventListener(r.RIGHT_BLOCK_EXPAND,e)}}),[]),n.useEffect((function(){var e=function(){D(!1),O(!0),B(!1),C(!1)};return window.addEventListener(r.RIGHT_BLOCK_EXPANDED,e),function(){window.removeEventListener(r.RIGHT_BLOCK_EXPANDED,e)}}),[]),n.useEffect((function(){var e=function(){D(!1),O(!1),B(!0),C(!1)};return window.addEventListener(r.RIGHT_BLOCK_COLLAPSE,e),function(){window.removeEventListener(r.RIGHT_BLOCK_COLLAPSE,e)}}),[]),n.useEffect((function(){var e=function(){D(!1),O(!1),B(!1),C(!0)};return window.addEventListener(r.RIGHT_BLOCK_COLLAPSED,e),function(){window.removeEventListener(r.RIGHT_BLOCK_COLLAPSED,e)}}),[]),n.useEffect((function(){var e=document.getElementById(r.PAGE_LEFT_BLOCK_CONTAINER_ID);if(e)return P.observe(e),function(){e&&P.unobserve(e)}}),[]),n.useEffect((function(){L.current=void 0}),[_]),{leftBlockStyles:H,rightBlockContentStyles:S,leftBlockContainerSizes:s}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentPage.d.ts","sourceRoot":"","sources":["../../../../src/iframe/payment/payment-page/PaymentPage.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAI/F,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"PaymentPage.d.ts","sourceRoot":"","sources":["../../../../src/iframe/payment/payment-page/PaymentPage.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAI/F,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAOpC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,YAAa,SAAQ,oBAAoB;IACjD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,IAAI,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;IACrE,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,eAAO,MAAM,WAAW,kIAQrB,YAAY,gBAkKd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),r=require("react"),o=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,a=require("react-router-dom"),n=require("../../../static/loader/LoaderIndicator.js"),l=require("react-i18next"),m=require("react-bootstrap");require("../../../static/index.js");var s=require("../../page/components/PageBody/constants.js");require("../../order-process/components/Timer/Timer.js"),require("../../order-process/components/NavigationSteps/NavigationSteps.js");var i=require("../../page/Page.js"),c=require("../../page/components/PageBody/PageBody.js");require("../../page/components/PageHeader/PageHeader.js"),require("../../order-process/components/NavigationFooter/NavigationFooter.js");var u=require("@licklist/plugins/dist/context/payment/PaymentSessionContext"),d=require("../../order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.js"),p=require("../../ryft/RyftPaymentForm.js"),y=require("../../order-process/components/BookingSummary/utils/index.js"),g=require("../../order-process/components/BookingSummary/BookingSummary.js");require("../../order-process/components/PaymentCard/PaymentCard.js"),require("../../order-process/components/BookingSummaryFooter/BookingSummaryFooter.js"),require("../../order-process/components/ErrorModal/ErrorModal.js"),require("../../order-process/components/utils/useCategoryVerification.js"),require("../../order-process/components/CalendarStepsForm/CalendarStepsForm.js");var f=require("./PaymentTimer.js");exports.PaymentPage=function(e){var P=e.onCloseIframePayment,E=e.onFailIframePayment,B=e.data,k=e.isLoading,S=e.bookingSummaryProps,q=e.paymentMetadata,v=t.__rest(e,["onCloseIframePayment","onFailIframePayment","data","isLoading","bookingSummaryProps","paymentMetadata"]),j=l.useTranslation("Design").t,b=a.useLocation().search,x=r.useContext(u.PaymentSessionContext).isPaymentSessionExpired,F=Boolean(new URLSearchParams(b).get("isIframePayment"));if(r.useEffect((function(){F&&P&&window.addEventListener("beforeunload",(function(){P()}))}),[]),r.useEffect((function(){x&&F&&E&&E()}),[x]),k)return o.createElement(n.LoaderIndicator,{isLoaded:!1});if(null===B)return o.createElement(i.Page,null,o.createElement(c.PageBody,{leftBlock:o.createElement(c.PageBody.LeftBlock,null,o.createElement("div",{className:"d-flex h-100 w-100 justify-content-center align-items-center flex-column"},o.createElement("h6",null,j("linkNotActiveOrExpired")),o.createElement(m.Col,{xs:12,md:3},o.createElement(m.Button,{className:"mt-5 w-20",onClick:function(){window.location.href="https://booked.it/"}},j("backToSite")))))}));var T=y.cartSumByOrderProducts((null==S?void 0:S.formValues)&&Object.values(null==S?void 0:S.formValues)),C=T>(null==B?void 0:B.amount);return o.createElement(i.Page,{className:"payment_link"},o.createElement(c.PageBody,{id:s.PAYMENT_LINK_PAGE_BODY,leftBlock:o.createElement(c.PageBody.LeftBlock,null,o.createElement("div",{className:"d-flex align-items-center mb-5"},o.createElement(f.PaymentTimer,null)),o.createElement(p.RyftPaymentForm,t.__assign({},v))),rightBlock:o.createElement(c.PageBody.RightBlock,null,o.createElement(g.BookingSummary,t.__assign({},S,{isPaymentPage:!0,headerComponent:o.createElement(d.SummaryTotalBlock,{amount:q?q.total:T+((null==S?void 0:S.transactionFee)||0)}),footer:o.createElement("div",{className:"d-flex flex-column justify-content-between"},q?o.createElement(o.Fragment,null,o.createElement(d.SummaryTotalBlock,{label:j("total"),amount:q.total||0}),o.createElement(d.SummaryTotalBlock,{label:j("paidSum"),amount:q.paid||0}),o.createElement(d.SummaryTotalBlock,{label:j("remaining"),amount:q.total-q.paid||0})):o.createElement(o.Fragment,null,C&&o.createElement(d.SummaryTotalBlock,{label:j("total"),amount:T+((null==S?void 0:S.transactionFee)||0)}),o.createElement(d.SummaryTotalBlock,{label:j(C?"totalWithDiscount":"total"),amount:(null==B?void 0:B.amount)+((null==S?void 0:S.transactionFee)||0)})))})))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":";AAOA,OAAO,EAKL,sBAAsB,EACvB,MAAM,kDAAkD,CAAC;AAI1D,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAChD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,uEAMzB,oBAAoB,gBAyJtB,CAAC"}
|
|
@@ -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=require("tslib"),r=require("react"),
|
|
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=require("tslib"),r=require("react"),n=e(r),a=require("react-router-dom"),i=require("../../static/loader/BlockLoader.js"),o=require("react-i18next"),u=e(require("react-bootstrap/Button")),s=require("react-hook-form"),c=require("../../static/loader/ButtonLoader.js"),l=e(require("react-bootstrap/Alert"));require("../../static/index.js");var d=require("@licklist/plugins/dist/hooks/Ryft/useRyftPayment"),f=require("./utils/ryft-form.js"),m={insufficient_funds:"insufficientFunds",declined_do_not_honour:"declinedDoNotHonour",invalid_card_number:"invalidCardNumber",restricted_card:"restrictedCard",security_violation:"securityViolation",expired_card:"expiredCard",gateway_reject:"gatewayReject",bad_track_data:"badTrackData","3ds_authentication_failure":"3dsAuthenticationFailure",unknown_error:"unknownError"};exports.RyftPaymentForm=function(e){var y,_,v=e.accountId,E=e.isCreateLoading,p=e.initRyft,g=e.resetReferrer,R=e.onSubmit,b=o.useTranslation(["Design","Validation","Ryft"]).t,h=r.useRef(null),q=a.useHistory(),k=t.__read(r.useState(!1),2),w=k[0],N=k[1],S=t.__read(r.useState(!1),2),T=S[0],F=S[1],A=t.__read(r.useState(!1),2),P=A[0],j=A[1],x=t.__read(r.useState(void 0),2),C=x[0],D=x[1],L=d.useRyftPayment().addEventHandler,U=s.useForm(),V=function(){g&&g()},B=function(e){(null==e?void 0:e.id)&&(null==e?void 0:e.returnUrl)&&(window.location.href="".concat(e.returnUrl,"&ps=").concat(e.id),V())};return r.useEffect((function(){return f.injectComponentsInRyftForm({t:b})}),[null===(_=null===(y=h.current)||void 0===y?void 0:y.childNodes)||void 0===_?void 0:_.length]),r.useEffect((function(){v.data&&!v.isError&&p((function(){L("cardValidationChanged",(function(e){N(e.isValid)})),j(!1)}),(function(){return j(!0)}))}),[v.data]),v.isLoading||v.isFetching||E?n.createElement("div",{className:"mt-5 pt-5"},n.createElement(i.BlockLoader,null)):v.isError?n.createElement("div",{className:"mt-5 ryft-init-failure"},n.createElement(l,{key:"danger",variant:"danger"},n.createElement("h5",null,b("Ryft:errorMessage")),b("Ryft:noPaymentProviderFound"))):P?n.createElement("div",{className:"mt-5 ryft-init-failure"},n.createElement(l,{key:"danger",variant:"danger"},n.createElement("h5",null,b("Ryft:errorMessage")),b("Ryft:initFailureMessage"),n.createElement("div",{className:"flex flex-column align-items-center mt-4"},n.createElement(u,{variant:"primary",onClick:function(){q.go(0)}},b("Ryft:refresh"))))):n.createElement(n.Fragment,null,n.createElement("form",{ref:h,id:"ryft-pay-form",noValidate:!0,onSubmit:U.handleSubmit((function(){return t.__awaiter(void 0,void 0,void 0,(function(){var e,r,n;return t.__generator(this,(function(t){switch(t.label){case 0:F(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,R()];case 2:if((e=t.sent())||D("unknown_error"),"requiredAction"in e){if(e.status!==d.RYFT_STATUS_PENDING_ACTION||!(null===(n=e.requiredAction)||void 0===n?void 0:n.url))return B(e),[2];window.location.href=e.requiredAction.url,V()}return e.status===d.RYFT_STATUS_APPROVED||e.status===d.RYFT_STATUS_CAPTURED?(B(e),[2]):(e.lastError&&(D(e.lastError),V()),[3,5]);case 3:return r=t.sent(),D(r),[3,5];case 4:return F(!1),[7];case 5:return[2]}}))}))})),className:"ryft-payment-form"},n.createElement("div",{className:"submit-button-wrapper mt-4 p-1"},n.createElement(u,{type:"submit",disabled:T||!w},T&&n.createElement(c.ButtonLoader,null),b("Design:buyNow"))),C&&n.createElement("div",{id:"ryft-payment-error"},b("".concat(m[C])))))},exports.ryftErrorMap=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ryft-form.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ryft/utils/ryft-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,eAAO,MAAM,0BAA0B;OAGlC,UAAU,MAAM,EAAE,CAAC;UAyCvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.injectComponentsInRyftForm=function(e){var t=e.t,n=document.getElementById("ryft-pay-iframe"),i=document.getElementById("card-title-container");if(n&&!i){var r=document.createElement("div"),d=document.createElement("div"),a=document.createElement("div");a.id="card-title-container",r.textContent=t("Design:enterCardDetails"),d.className="bold-text form-label",d.innerText=t("Design:paymentDetails"),a.append(r,d),null==n||n.before(a);var o=document.getElementById("ryft-pay-grid");if(o){var m=document.createElement("div"),c=document.createElement("div"),l=document.createElement("div"),s=document.createElement("div");m.className="mobile-pay-title",m.innerText=t("Design:expressCheckoutWith"),c.id="mobile-pay-divider-text",c.innerText="or",l.id="mobile-pay-divider",s.id="mobile-pay-divider-container",s.append(c,l),o.before(m),o.after(s)}}};
|
|
@@ -46,9 +46,8 @@
|
|
|
46
46
|
color: $snippet-page-header-steps-body-color;
|
|
47
47
|
transition: $color-transition;
|
|
48
48
|
margin-left: 0.5rem;
|
|
49
|
-
width: 6rem;
|
|
50
49
|
word-break: break-word;
|
|
51
|
-
font-size: 0.
|
|
50
|
+
font-size: 0.875rem;
|
|
52
51
|
|
|
53
52
|
@include media-breakpoint-down(sm) {
|
|
54
53
|
display: none;
|
|
@@ -62,6 +61,31 @@
|
|
|
62
61
|
font-weight: 400;
|
|
63
62
|
font-size: 0.875rem;
|
|
64
63
|
|
|
64
|
+
.payment-page-toggle {
|
|
65
|
+
p {
|
|
66
|
+
font-size: 1rem;
|
|
67
|
+
font-weight: 600;
|
|
68
|
+
}
|
|
69
|
+
.price {
|
|
70
|
+
font-weight: 700;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.payment-metadata {
|
|
75
|
+
font-weight: 500;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.total {
|
|
79
|
+
display: flex;
|
|
80
|
+
justify-content: space-between;
|
|
81
|
+
align-items: center;
|
|
82
|
+
|
|
83
|
+
div {
|
|
84
|
+
font-size: 1rem;
|
|
85
|
+
font-weight: 700;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
65
89
|
b {
|
|
66
90
|
display: block;
|
|
67
91
|
font-size: 1rem;
|
|
@@ -113,6 +137,15 @@
|
|
|
113
137
|
|
|
114
138
|
.cart-items {
|
|
115
139
|
font-weight: 400;
|
|
140
|
+
margin-bottom: 1.4rem;
|
|
141
|
+
border-bottom: 2px solid $separator-color;
|
|
142
|
+
|
|
143
|
+
.people {
|
|
144
|
+
margin-bottom: 0;
|
|
145
|
+
p {
|
|
146
|
+
margin-bottom: 0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
116
149
|
|
|
117
150
|
.empty-cart {
|
|
118
151
|
margin: 1rem 0;
|
|
@@ -125,8 +158,11 @@
|
|
|
125
158
|
}
|
|
126
159
|
|
|
127
160
|
.products-by-menu-step {
|
|
161
|
+
margin-top: 1.4rem;
|
|
162
|
+
font-size: 0.875rem;
|
|
128
163
|
.title {
|
|
129
|
-
font-
|
|
164
|
+
font-size: 1rem;
|
|
165
|
+
font-weight: 600;
|
|
130
166
|
}
|
|
131
167
|
|
|
132
168
|
.categories {
|
|
@@ -136,8 +172,8 @@
|
|
|
136
172
|
}
|
|
137
173
|
|
|
138
174
|
.products {
|
|
139
|
-
margin-top:
|
|
140
|
-
|
|
175
|
+
margin-top: 1.4rem;
|
|
176
|
+
font-size: 0.875rem;
|
|
141
177
|
.product {
|
|
142
178
|
margin: 0.5rem 0;
|
|
143
179
|
|
|
@@ -148,6 +184,15 @@
|
|
|
148
184
|
margin-bottom: 0.5rem;
|
|
149
185
|
}
|
|
150
186
|
}
|
|
187
|
+
|
|
188
|
+
.name {
|
|
189
|
+
font-weight: 600;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.price {
|
|
193
|
+
font-weight: 400;
|
|
194
|
+
font-size: 0.875rem;
|
|
195
|
+
}
|
|
151
196
|
}
|
|
152
197
|
|
|
153
198
|
&:not(:last-child) {
|
|
@@ -168,6 +213,12 @@
|
|
|
168
213
|
margin: 0 0 0.5rem;
|
|
169
214
|
|
|
170
215
|
.title {
|
|
216
|
+
font-size: 1rem;
|
|
217
|
+
font-weight: 600;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.metadata {
|
|
221
|
+
font-size: 0.95rem;
|
|
171
222
|
font-weight: 600;
|
|
172
223
|
}
|
|
173
224
|
}
|
|
@@ -181,19 +232,7 @@
|
|
|
181
232
|
}
|
|
182
233
|
|
|
183
234
|
hr {
|
|
184
|
-
margin:
|
|
185
|
-
border-width: 2px;
|
|
186
|
-
border-color: $separator-color;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.products {
|
|
190
|
-
font-size: 0.75rem;
|
|
191
|
-
|
|
192
|
-
.product {
|
|
193
|
-
.name {
|
|
194
|
-
font-weight: 500;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
235
|
+
margin-bottom: 1.5rem;
|
|
197
236
|
}
|
|
198
237
|
}
|
|
199
238
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// TODO when all iframe pages will be ready, think how we can combine it all in page-body style
|
|
1
2
|
.page-body {
|
|
2
3
|
display: flex;
|
|
3
4
|
background-color: transparent;
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
.right-block {
|
|
80
|
-
height:
|
|
81
|
+
height: 100%;
|
|
81
82
|
max-width: 17.5rem;
|
|
82
83
|
min-width: 17.5rem;
|
|
83
84
|
width: 100%;
|