@licklist/design 0.58.6-dev.6 → 0.58.6-dev.8
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 +2 -2
- 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,10 +1,52 @@
|
|
|
1
1
|
.payment_link {
|
|
2
|
+
padding: 0 0 1rem 0;
|
|
3
|
+
|
|
4
|
+
.button-wrapper {
|
|
5
|
+
top: 2rem;
|
|
6
|
+
right: 2rem;
|
|
7
|
+
position: absolute;
|
|
8
|
+
z-index: 100;
|
|
9
|
+
}
|
|
10
|
+
|
|
2
11
|
.page-body {
|
|
12
|
+
padding: 0;
|
|
13
|
+
height: calc(100vh - 2rem) !important;
|
|
14
|
+
|
|
15
|
+
.navigation {
|
|
16
|
+
display: block;
|
|
17
|
+
@include media-breakpoint-down(sm) {
|
|
18
|
+
padding: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.right-block {
|
|
23
|
+
margin-left: 0;
|
|
24
|
+
height: calc(100vh - 2rem);
|
|
25
|
+
max-height: calc(100vh - 1rem);
|
|
26
|
+
@include media-breakpoint-down(sm) {
|
|
27
|
+
width: calc(100% - 2rem);
|
|
28
|
+
max-width: unset;
|
|
29
|
+
position: inherit;
|
|
30
|
+
overflow: visible;
|
|
31
|
+
margin: 0 1rem 1rem;
|
|
32
|
+
height: unset;
|
|
33
|
+
min-height: unset;
|
|
34
|
+
max-height: 100%;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
3
38
|
.left-block {
|
|
4
39
|
.left-block-container {
|
|
5
40
|
position: relative;
|
|
6
41
|
max-height: 100%;
|
|
7
42
|
|
|
43
|
+
.payment-title {
|
|
44
|
+
font-size: 0.875rem;
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
align-items: center;
|
|
47
|
+
margin-left: 0.5rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
8
50
|
.ryft-payment-form {
|
|
9
51
|
.submit-button-wrapper {
|
|
10
52
|
margin: -1rem 0 1rem;
|
|
@@ -13,7 +55,55 @@
|
|
|
13
55
|
width: 100%;
|
|
14
56
|
}
|
|
15
57
|
}
|
|
58
|
+
#mobile-pay-divider-container {
|
|
59
|
+
display: flex;
|
|
60
|
+
position: relative;
|
|
61
|
+
margin-bottom: 1rem;
|
|
62
|
+
#mobile-pay-divider-text {
|
|
63
|
+
margin-right: 1rem;
|
|
64
|
+
font-size: 0.875rem;
|
|
65
|
+
font-weight: 600;
|
|
66
|
+
}
|
|
67
|
+
#mobile-pay-divider {
|
|
68
|
+
width: 100%;
|
|
69
|
+
border-bottom: 1px #dfdfdf solid;
|
|
70
|
+
margin-bottom: 0.6rem;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
16
73
|
|
|
74
|
+
#card-title-container {
|
|
75
|
+
height: auto;
|
|
76
|
+
border: none;
|
|
77
|
+
margin-bottom: 0.5rem;
|
|
78
|
+
text-align: left;
|
|
79
|
+
:first-child {
|
|
80
|
+
font-size: 1rem;
|
|
81
|
+
font-weight: 600;
|
|
82
|
+
margin-bottom: 1rem;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.form-label {
|
|
86
|
+
margin-bottom: 0.5rem;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
.mobile-pay-title {
|
|
90
|
+
display: block;
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
font-size: 1rem;
|
|
93
|
+
color: black;
|
|
94
|
+
padding: 0;
|
|
95
|
+
font-style: normal;
|
|
96
|
+
font-family: inherit;
|
|
97
|
+
margin-bottom: 1rem;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
.form {
|
|
101
|
+
.input {
|
|
102
|
+
border: 2px solid #525252 !important;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.ryft-payment-form {
|
|
17
107
|
@include media-breakpoint-up(md) {
|
|
18
108
|
.submit-button-wrapper {
|
|
19
109
|
max-width: 15.5rem;
|
|
@@ -22,10 +112,9 @@
|
|
|
22
112
|
|
|
23
113
|
// it's style for Google and Apple pay container, for unknown reasons we can't move this html elements with appendChild or replaceChild
|
|
24
114
|
.ryft-pay-grid {
|
|
25
|
-
position: absolute !important;
|
|
26
|
-
top: 10rem;
|
|
27
115
|
width: 100%;
|
|
28
116
|
max-width: 15.5rem;
|
|
117
|
+
margin-bottom: 1rem;
|
|
29
118
|
}
|
|
30
119
|
.ryft-pay-apple-pay-button {
|
|
31
120
|
border-radius: 0.25rem;
|
|
@@ -36,6 +125,36 @@
|
|
|
36
125
|
display: none !important;
|
|
37
126
|
}
|
|
38
127
|
}
|
|
128
|
+
@include media-breakpoint-down(sm) {
|
|
129
|
+
.left-block-container {
|
|
130
|
+
max-height: 100%;
|
|
131
|
+
overflow: visible;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@include media-breakpoint-down(sm) {
|
|
137
|
+
flex-direction: column-reverse;
|
|
138
|
+
overflow: scroll;
|
|
139
|
+
|
|
140
|
+
@include media-breakpoint-down(sm) {
|
|
141
|
+
.left-block {
|
|
142
|
+
min-height: 100%;
|
|
143
|
+
}
|
|
144
|
+
.right-block {
|
|
145
|
+
margin: 0 auto;
|
|
146
|
+
width: 100%;
|
|
147
|
+
.children-wrapper {
|
|
148
|
+
.accordion {
|
|
149
|
+
.collapse {
|
|
150
|
+
overflow: visible;
|
|
151
|
+
overflow-x: unset;
|
|
152
|
+
scrollbar-width: unset;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
39
158
|
}
|
|
40
159
|
}
|
|
41
160
|
::-webkit-scrollbar {
|
|
@@ -62,3 +181,7 @@
|
|
|
62
181
|
}
|
|
63
182
|
}
|
|
64
183
|
}
|
|
184
|
+
|
|
185
|
+
#ryft-threeDSMethodIframe {
|
|
186
|
+
display: none;
|
|
187
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.58.6-dev.
|
|
3
|
+
"version": "0.58.6-dev.8",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"react-hook-form": "7.13.0",
|
|
145
145
|
"react-i18next": "11.8.8",
|
|
146
146
|
"react-intl": "5.15.8",
|
|
147
|
-
"react-konva": "
|
|
147
|
+
"react-konva": "^17.0.2-6",
|
|
148
148
|
"react-loader": "2.4.7",
|
|
149
149
|
"react-loading-skeleton": "^3.3.1",
|
|
150
150
|
"react-overlays": "4.1.1",
|
|
@@ -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,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,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Meta } from "@storybook/react";
|
|
3
3
|
import { BookingSummary } from "./BookingSummary";
|
|
4
|
+
import { SummaryTotalBlock } from "./components/SummaryTotal";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
title: "Iframe/Order-Process/BookingSummary",
|
|
@@ -138,6 +139,14 @@ export function Default() {
|
|
|
138
139
|
<div className="payment-process">
|
|
139
140
|
<div className="col-lg-4">
|
|
140
141
|
<BookingSummary
|
|
142
|
+
isPaymentPage
|
|
143
|
+
eventName="new Event"
|
|
144
|
+
footer={
|
|
145
|
+
<div className="d-flex flex-column justify-content-between">
|
|
146
|
+
<SummaryTotalBlock label={"Total"} amount={2} />
|
|
147
|
+
<SummaryTotalBlock label={"Total with discount"} amount={1} />
|
|
148
|
+
</div>
|
|
149
|
+
}
|
|
141
150
|
date="29 Sept 2022 at 09:00"
|
|
142
151
|
menuSteps={menuSteps as any}
|
|
143
152
|
peopleAmount={5}
|
|
@@ -8,6 +8,8 @@ import { ProductsByMenuStep } from "./components/ProductsByMenuStep";
|
|
|
8
8
|
import { BookingSummaryProps } from "./types";
|
|
9
9
|
import { SummaryTotal } from "./components/SummaryTotal";
|
|
10
10
|
import { BookingSummaryAccordion } from "./components/BookingSummaryAccordion";
|
|
11
|
+
import { ReactComponent as TicketIcon } from "../../../../assets/iframe/ticket.svg";
|
|
12
|
+
import { ReactComponent as CalendarIcon } from "../../../../assets/iframe/calendar.svg";
|
|
11
13
|
|
|
12
14
|
export const BookingSummary = ({
|
|
13
15
|
date,
|
|
@@ -22,6 +24,10 @@ export const BookingSummary = ({
|
|
|
22
24
|
hasPeopleInput,
|
|
23
25
|
isPaymentLink,
|
|
24
26
|
peopleAmount,
|
|
27
|
+
footer,
|
|
28
|
+
headerComponent,
|
|
29
|
+
// TODO Remove this, when all iframe pages will be ready
|
|
30
|
+
isPaymentPage,
|
|
25
31
|
}: Omit<BookingSummaryProps, "totallWithDiscount">) => {
|
|
26
32
|
const { t } = useTranslation("Design");
|
|
27
33
|
const { formatNumber } = useIntl();
|
|
@@ -36,11 +42,18 @@ export const BookingSummary = ({
|
|
|
36
42
|
|
|
37
43
|
return (
|
|
38
44
|
<div className="payment-booking-summary">
|
|
39
|
-
<BookingSummaryAccordion
|
|
45
|
+
<BookingSummaryAccordion
|
|
46
|
+
isPaymentPage={isPaymentPage}
|
|
47
|
+
hasPeopleInput={hasPeopleInput}
|
|
48
|
+
headerComponent={headerComponent}
|
|
49
|
+
>
|
|
40
50
|
<div className="event-info">
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
<EventInfo
|
|
52
|
+
eventName={eventName}
|
|
53
|
+
isPaymentPage={isPaymentPage}
|
|
54
|
+
date={date}
|
|
55
|
+
time={time}
|
|
56
|
+
/>
|
|
44
57
|
</div>
|
|
45
58
|
<hr />
|
|
46
59
|
|
|
@@ -62,8 +75,8 @@ export const BookingSummary = ({
|
|
|
62
75
|
{!shouldHidePeopleAmount && peopleAmount > 0 && (
|
|
63
76
|
<>
|
|
64
77
|
<hr />
|
|
65
|
-
<div className="d-flex justify-content-between mt-3">
|
|
66
|
-
<p className="m-0">{t("people")}:</p>
|
|
78
|
+
<div className="d-flex justify-content-between mt-3 people">
|
|
79
|
+
<p className="m-0 payment-metadata">{t("people")}:</p>
|
|
67
80
|
<p className="price">{peopleAmount}</p>
|
|
68
81
|
</div>
|
|
69
82
|
</>
|
|
@@ -73,7 +86,9 @@ export const BookingSummary = ({
|
|
|
73
86
|
<>
|
|
74
87
|
<hr />
|
|
75
88
|
<div className="d-flex justify-content-between mt-3">
|
|
76
|
-
<p className="m-0">
|
|
89
|
+
<p className="m-0 payment-metadata">
|
|
90
|
+
{t("transactionFee")}:
|
|
91
|
+
</p>
|
|
77
92
|
<p className="price">
|
|
78
93
|
{formatNumber(transactionFee, {
|
|
79
94
|
style: "currency",
|
|
@@ -84,6 +99,7 @@ export const BookingSummary = ({
|
|
|
84
99
|
</>
|
|
85
100
|
)}
|
|
86
101
|
</div>
|
|
102
|
+
{footer}
|
|
87
103
|
</div>
|
|
88
104
|
) : (
|
|
89
105
|
<div className="cart-items">
|
|
@@ -97,3 +113,38 @@ export const BookingSummary = ({
|
|
|
97
113
|
|
|
98
114
|
BookingSummary.SummaryTotal = SummaryTotal;
|
|
99
115
|
BookingSummary.Accordion = BookingSummaryAccordion;
|
|
116
|
+
|
|
117
|
+
const EventInfo = ({
|
|
118
|
+
isPaymentPage,
|
|
119
|
+
eventName,
|
|
120
|
+
date,
|
|
121
|
+
time,
|
|
122
|
+
}: Pick<
|
|
123
|
+
BookingSummaryProps,
|
|
124
|
+
"date" | "time" | "eventName" | "isPaymentPage"
|
|
125
|
+
>) => {
|
|
126
|
+
if (isPaymentPage) {
|
|
127
|
+
return (
|
|
128
|
+
<>
|
|
129
|
+
<div className="d-flex align-items-center mb-5">
|
|
130
|
+
<TicketIcon height={16} width={20} fill="black" />
|
|
131
|
+
<div className="m-0 pl-2 title event-name metadata">{eventName}</div>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div className="d-flex align-items-center mb-5">
|
|
135
|
+
<CalendarIcon height={16} width={20} fill="black" />
|
|
136
|
+
<div className="m-0 pl-2 metadata">{date}</div>
|
|
137
|
+
</div>
|
|
138
|
+
{time && <div className="mb-5 metadata">{time}</div>}
|
|
139
|
+
</>
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<>
|
|
145
|
+
<p className="m-0 title event-name">{eventName}</p>
|
|
146
|
+
<p className="m-0">{date}</p>
|
|
147
|
+
{time && <p className="m-0">{time}</p>}
|
|
148
|
+
</>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
@@ -3,6 +3,7 @@ import React, {
|
|
|
3
3
|
useCallback,
|
|
4
4
|
PropsWithChildren,
|
|
5
5
|
useEffect,
|
|
6
|
+
ReactElement,
|
|
6
7
|
} from "react";
|
|
7
8
|
import { Accordion } from "react-bootstrap";
|
|
8
9
|
import { useWindowDimensions } from "@licklist/plugins/dist/hooks/Media/useWindowDimensions";
|
|
@@ -20,6 +21,9 @@ export type BookingSummaryAccordionProps = PropsWithChildren<{
|
|
|
20
21
|
title?: string;
|
|
21
22
|
showTitleOnlyOnMobile?: boolean;
|
|
22
23
|
hasPeopleInput?: boolean;
|
|
24
|
+
// TODO Remove this, when all iframe pages will be ready
|
|
25
|
+
isPaymentPage?: boolean;
|
|
26
|
+
headerComponent?: ReactElement;
|
|
23
27
|
}>;
|
|
24
28
|
|
|
25
29
|
export const BookingSummaryAccordion = ({
|
|
@@ -27,6 +31,8 @@ export const BookingSummaryAccordion = ({
|
|
|
27
31
|
title,
|
|
28
32
|
showTitleOnlyOnMobile = false,
|
|
29
33
|
hasPeopleInput,
|
|
34
|
+
isPaymentPage,
|
|
35
|
+
headerComponent,
|
|
30
36
|
}: BookingSummaryAccordionProps) => {
|
|
31
37
|
const { width } = useWindowDimensions();
|
|
32
38
|
const [isExpanded, setIsExpanded] = useState(width <= MOBILE_WIDTH);
|
|
@@ -68,10 +74,12 @@ export const BookingSummaryAccordion = ({
|
|
|
68
74
|
return (
|
|
69
75
|
<Accordion defaultActiveKey={ACCORDION_KEY} onSelect={onSelect}>
|
|
70
76
|
<ToggleHeader
|
|
77
|
+
isPaymentPage={isPaymentPage}
|
|
71
78
|
showExpandButton={showExpandButton}
|
|
72
79
|
isExpanded={isExpanded}
|
|
73
80
|
title={title}
|
|
74
81
|
hideComponent={!showToggleHeader}
|
|
82
|
+
headerComponent={headerComponent}
|
|
75
83
|
/>
|
|
76
84
|
<Accordion.Collapse
|
|
77
85
|
eventKey={ACCORDION_KEY}
|
|
@@ -3,7 +3,7 @@ import { useIntl } from "react-intl";
|
|
|
3
3
|
import * as Config from "@licklist/core/dist/Config";
|
|
4
4
|
|
|
5
5
|
export type SummaryTotalBlockProps = {
|
|
6
|
-
label
|
|
6
|
+
label?: string;
|
|
7
7
|
amount: number;
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -15,13 +15,13 @@ export const SummaryTotalBlock = ({
|
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<div className="total">
|
|
18
|
-
<
|
|
19
|
-
<
|
|
18
|
+
{label && <div>{label}</div>}
|
|
19
|
+
<div className="m-0 price">
|
|
20
20
|
{formatNumber(amount, {
|
|
21
21
|
style: "currency",
|
|
22
22
|
currency: Config.Currency.GBP,
|
|
23
23
|
})}
|
|
24
|
-
</
|
|
24
|
+
</div>
|
|
25
25
|
</div>
|
|
26
26
|
);
|
|
27
27
|
};
|
package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext, useEffect } from "react";
|
|
1
|
+
import React, { ReactElement, useContext, useEffect } from "react";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
import { useAccordionToggle } from "react-bootstrap/AccordionToggle";
|
|
4
4
|
import AccordionContext from "react-bootstrap/AccordionContext";
|
|
@@ -11,15 +11,23 @@ type ToggleHeaderProps = {
|
|
|
11
11
|
isExpanded: boolean;
|
|
12
12
|
title?: string;
|
|
13
13
|
hideComponent?: boolean;
|
|
14
|
+
headerComponent?: ReactElement;
|
|
15
|
+
isPaymentPage: boolean;
|
|
14
16
|
};
|
|
15
17
|
|
|
18
|
+
interface HeaderContentProps
|
|
19
|
+
extends Omit<ToggleHeaderProps, "hideComponent" | "isExpanded"> {
|
|
20
|
+
currentEventKey: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
export const ToggleHeader = ({
|
|
17
24
|
showExpandButton,
|
|
18
25
|
isExpanded,
|
|
19
26
|
title,
|
|
20
27
|
hideComponent,
|
|
28
|
+
isPaymentPage,
|
|
29
|
+
headerComponent,
|
|
21
30
|
}: ToggleHeaderProps) => {
|
|
22
|
-
const { t } = useTranslation("Design");
|
|
23
31
|
const currentEventKey = useContext(AccordionContext);
|
|
24
32
|
|
|
25
33
|
const decoratedOnClick = useAccordionToggle(ACCORDION_KEY);
|
|
@@ -46,14 +54,41 @@ export const ToggleHeader = ({
|
|
|
46
54
|
onKeyPress={(event) => showExpandButton && decoratedOnClick(event)}
|
|
47
55
|
role="button"
|
|
48
56
|
tabIndex={0}
|
|
49
|
-
className=
|
|
57
|
+
className={clsx(
|
|
58
|
+
"d-flex flex-column",
|
|
59
|
+
isPaymentPage && "payment-page-toggle"
|
|
60
|
+
)}
|
|
50
61
|
>
|
|
51
62
|
<h6 className={clsx("title", showExpandButton && "pointer")}>
|
|
52
63
|
<div className="d-flex w-100 align-content-center justify-content-between">
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
64
|
+
<HeaderContent
|
|
65
|
+
showExpandButton={showExpandButton}
|
|
66
|
+
title={title}
|
|
67
|
+
currentEventKey={currentEventKey}
|
|
68
|
+
isPaymentPage={isPaymentPage}
|
|
69
|
+
headerComponent={headerComponent}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
</h6>
|
|
73
|
+
{isExpanded && <hr className="mt-3" />}
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
56
77
|
|
|
78
|
+
const HeaderContent = ({
|
|
79
|
+
title,
|
|
80
|
+
showExpandButton,
|
|
81
|
+
currentEventKey,
|
|
82
|
+
isPaymentPage,
|
|
83
|
+
headerComponent,
|
|
84
|
+
}: HeaderContentProps) => {
|
|
85
|
+
const { t } = useTranslation("Design");
|
|
86
|
+
|
|
87
|
+
if (isPaymentPage) {
|
|
88
|
+
return (
|
|
89
|
+
<>
|
|
90
|
+
<div className="d-flex">
|
|
91
|
+
<p className="m-0 mr-2 toggle-title">{title || t("yourBooking")}</p>
|
|
57
92
|
{showExpandButton && (
|
|
58
93
|
<div className="expand-button">
|
|
59
94
|
<Icon
|
|
@@ -62,13 +97,31 @@ export const ToggleHeader = ({
|
|
|
62
97
|
? "chevron-up"
|
|
63
98
|
: "chevron-down"
|
|
64
99
|
}
|
|
65
|
-
width="
|
|
100
|
+
width="0.5rem"
|
|
66
101
|
/>
|
|
67
102
|
</div>
|
|
68
103
|
)}
|
|
69
104
|
</div>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
105
|
+
{headerComponent}
|
|
106
|
+
</>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
return (
|
|
110
|
+
<>
|
|
111
|
+
<div className="d-flex">
|
|
112
|
+
<p className="m-0">{title || t("yourBooking")}</p>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
{showExpandButton && (
|
|
116
|
+
<div className="expand-button">
|
|
117
|
+
<Icon
|
|
118
|
+
type={
|
|
119
|
+
currentEventKey === ACCORDION_KEY ? "chevron-up" : "chevron-down"
|
|
120
|
+
}
|
|
121
|
+
width="1rem"
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
)}
|
|
125
|
+
</>
|
|
73
126
|
);
|
|
74
127
|
};
|
|
@@ -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
|
|
|
5
6
|
export const MOBILE_WIDTH = 576;
|
|
6
7
|
export const ACCORDION_KEY = "booking-summary";
|
|
@@ -20,4 +21,7 @@ export type BookingSummaryProps = {
|
|
|
20
21
|
isLoading?: boolean;
|
|
21
22
|
peopleAmount: number;
|
|
22
23
|
isPaymentLink?: boolean;
|
|
24
|
+
isPaymentPage?: boolean;
|
|
25
|
+
headerComponent?: ReactElement;
|
|
26
|
+
footer?: ReactElement;
|
|
23
27
|
};
|
|
@@ -25,4 +25,6 @@ export const COLLAPSE_MARGIN = 36;
|
|
|
25
25
|
|
|
26
26
|
export const PAGE_LEFT_BLOCK_CONTAINER_ID = "page-left-block-container";
|
|
27
27
|
export const PAGE_CALENDAR_SELECT_WRAPPER = "calendar-select-wrapper";
|
|
28
|
+
export const PAYMENT_LINK_PAGE_BODY = "payment_link_page_body";
|
|
29
|
+
|
|
28
30
|
export const PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE = 300;
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
PAGE_LEFT_BLOCK_CONTAINER_ID,
|
|
17
17
|
PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE,
|
|
18
18
|
PAGE_CALENDAR_SELECT_WRAPPER,
|
|
19
|
+
PAYMENT_LINK_PAGE_BODY,
|
|
19
20
|
} from "../constants";
|
|
20
21
|
import { ChangeRightBlockHeightEvent } from "../types";
|
|
21
22
|
|
|
@@ -46,10 +47,19 @@ export const useResizePageBody = () => {
|
|
|
46
47
|
const calenderWrapper = document.getElementById(
|
|
47
48
|
PAGE_CALENDAR_SELECT_WRAPPER
|
|
48
49
|
);
|
|
50
|
+
|
|
49
51
|
const CALENDAR_WRAPPER_HEIGHT = calenderWrapper
|
|
50
52
|
? calenderWrapper.clientHeight
|
|
51
53
|
: 0;
|
|
52
54
|
|
|
55
|
+
const paymentLinkPageBody = document.getElementById(PAYMENT_LINK_PAGE_BODY);
|
|
56
|
+
if (paymentLinkPageBody) {
|
|
57
|
+
paymentLinkPageBody.scroll({
|
|
58
|
+
top: -rightBlockHeight,
|
|
59
|
+
behavior: "smooth",
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
53
63
|
return {
|
|
54
64
|
maxHeight:
|
|
55
65
|
height -
|