@licklist/design 0.58.6-dev.11 → 0.58.6-dev.2
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/calendar/Calendar.d.ts +1 -1
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/Calendar.js +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.js +1 -1
- package/dist/iframe/event/event-venue-map/IframeEventVenueMap.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 +2 -4
- 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 +2 -4
- 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 +0 -4
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
- package/dist/iframe/page/components/PageBody/constants.d.ts +0 -1
- 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/order-items-table/OrderItemsTable.js +1 -1
- package/dist/iframe/payment/payment-form/PaymentForm.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/payment/payment-page/PaymentTimer.js +1 -1
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.js +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.js +1 -1
- package/dist/product-set/form/VenueMapsControl.js +1 -1
- package/dist/product-set/product/ProductControl.d.ts +0 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +1 -1
- package/dist/product-set/product/constants.d.ts +0 -1
- package/dist/product-set/product/constants.d.ts.map +1 -1
- package/dist/product-set/product/constants.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/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +1 -1
- package/dist/sales/notes/NotesTableRow.js +1 -1
- package/dist/setting/dashboard/snippets/card/SnippetCard.js +1 -1
- package/dist/snippet/snippet-template/control/PropertyControl.d.ts +1 -3
- package/dist/snippet/snippet-template/control/PropertyControl.d.ts.map +1 -1
- package/dist/snippet/snippet-template/control/PropertyControl.js +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +1 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +1 -1
- package/dist/striped-static-table/StripedStaticTable.js +1 -1
- package/dist/styles/iframe-order-process/IframeOrderProcess.scss +18 -57
- package/dist/styles/iframe-page/PageBody.scss +1 -2
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
- package/dist/venue-map-sets/form/components/VenueMapImageControl.js +1 -1
- package/package.json +5 -3
- package/src/assets/iframe/calendar.svg +2 -2
- package/src/assets/iframe/ticket.svg +2 -2
- package/src/calendar/Calendar.stories.tsx +0 -23
- package/src/calendar/Calendar.tsx +5 -5
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +5 -0
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +0 -9
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +7 -58
- package/src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx +0 -8
- 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 +10 -63
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -4
- package/src/iframe/page/components/PageBody/constants.ts +0 -2
- package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +0 -10
- package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +6 -546
- package/src/iframe/payment/payment-page/PaymentPage.tsx +29 -38
- package/src/iframe/ryft/RyftPaymentForm.tsx +5 -11
- package/src/product-set/control/DateInput.tsx +14 -17
- package/src/product-set/product/ProductControl.tsx +3 -17
- package/src/product-set/product/constants.ts +0 -1
- package/src/product-set/product-category/ProductCategoryControl.tsx +43 -105
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +18 -4
- package/src/snippet/snippet-template/control/PropertyControl.tsx +2 -6
- package/src/sortable-tree/SortableTreeItem.tsx +4 -6
- package/src/styles/iframe-order-process/IframeOrderProcess.scss +18 -57
- package/src/styles/iframe-page/PageBody.scss +1 -2
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
- package/dist/iframe/ryft/utils/ryft-form.d.ts +0 -5
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +0 -1
- package/dist/iframe/ryft/utils/ryft-form.js +0 -1
- package/src/iframe/ryft/utils/ryft-form.ts +0 -47
|
@@ -3,7 +3,6 @@ import React, {
|
|
|
3
3
|
useCallback,
|
|
4
4
|
PropsWithChildren,
|
|
5
5
|
useEffect,
|
|
6
|
-
ReactElement,
|
|
7
6
|
} from "react";
|
|
8
7
|
import { Accordion } from "react-bootstrap";
|
|
9
8
|
import { useWindowDimensions } from "@licklist/plugins/dist/hooks/Media/useWindowDimensions";
|
|
@@ -21,9 +20,6 @@ export type BookingSummaryAccordionProps = PropsWithChildren<{
|
|
|
21
20
|
title?: string;
|
|
22
21
|
showTitleOnlyOnMobile?: boolean;
|
|
23
22
|
hasPeopleInput?: boolean;
|
|
24
|
-
// TODO Remove this, when all iframe pages will be ready
|
|
25
|
-
isPaymentPage?: boolean;
|
|
26
|
-
headerComponent?: ReactElement;
|
|
27
23
|
}>;
|
|
28
24
|
|
|
29
25
|
export const BookingSummaryAccordion = ({
|
|
@@ -31,8 +27,6 @@ export const BookingSummaryAccordion = ({
|
|
|
31
27
|
title,
|
|
32
28
|
showTitleOnlyOnMobile = false,
|
|
33
29
|
hasPeopleInput,
|
|
34
|
-
isPaymentPage,
|
|
35
|
-
headerComponent,
|
|
36
30
|
}: BookingSummaryAccordionProps) => {
|
|
37
31
|
const { width } = useWindowDimensions();
|
|
38
32
|
const [isExpanded, setIsExpanded] = useState(width <= MOBILE_WIDTH);
|
|
@@ -74,12 +68,10 @@ export const BookingSummaryAccordion = ({
|
|
|
74
68
|
return (
|
|
75
69
|
<Accordion defaultActiveKey={ACCORDION_KEY} onSelect={onSelect}>
|
|
76
70
|
<ToggleHeader
|
|
77
|
-
isPaymentPage={isPaymentPage}
|
|
78
71
|
showExpandButton={showExpandButton}
|
|
79
72
|
isExpanded={isExpanded}
|
|
80
73
|
title={title}
|
|
81
74
|
hideComponent={!showToggleHeader}
|
|
82
|
-
headerComponent={headerComponent}
|
|
83
75
|
/>
|
|
84
76
|
<Accordion.Collapse
|
|
85
77
|
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
|
+
<p className="m-0">{label}</p>
|
|
19
|
+
<p className="m-0 price">
|
|
20
20
|
{formatNumber(amount, {
|
|
21
21
|
style: "currency",
|
|
22
22
|
currency: Config.Currency.GBP,
|
|
23
23
|
})}
|
|
24
|
-
</
|
|
24
|
+
</p>
|
|
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, {
|
|
1
|
+
import React, { 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,23 +11,15 @@ type ToggleHeaderProps = {
|
|
|
11
11
|
isExpanded: boolean;
|
|
12
12
|
title?: string;
|
|
13
13
|
hideComponent?: boolean;
|
|
14
|
-
headerComponent?: ReactElement;
|
|
15
|
-
isPaymentPage: boolean;
|
|
16
14
|
};
|
|
17
15
|
|
|
18
|
-
interface HeaderContentProps
|
|
19
|
-
extends Omit<ToggleHeaderProps, "hideComponent" | "isExpanded"> {
|
|
20
|
-
currentEventKey: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
16
|
export const ToggleHeader = ({
|
|
24
17
|
showExpandButton,
|
|
25
18
|
isExpanded,
|
|
26
19
|
title,
|
|
27
20
|
hideComponent,
|
|
28
|
-
isPaymentPage,
|
|
29
|
-
headerComponent,
|
|
30
21
|
}: ToggleHeaderProps) => {
|
|
22
|
+
const { t } = useTranslation("Design");
|
|
31
23
|
const currentEventKey = useContext(AccordionContext);
|
|
32
24
|
|
|
33
25
|
const decoratedOnClick = useAccordionToggle(ACCORDION_KEY);
|
|
@@ -54,41 +46,14 @@ export const ToggleHeader = ({
|
|
|
54
46
|
onKeyPress={(event) => showExpandButton && decoratedOnClick(event)}
|
|
55
47
|
role="button"
|
|
56
48
|
tabIndex={0}
|
|
57
|
-
className=
|
|
58
|
-
"d-flex flex-column",
|
|
59
|
-
isPaymentPage && "payment-page-toggle"
|
|
60
|
-
)}
|
|
49
|
+
className="d-flex flex-column"
|
|
61
50
|
>
|
|
62
51
|
<h6 className={clsx("title", showExpandButton && "pointer")}>
|
|
63
52
|
<div className="d-flex w-100 align-content-center justify-content-between">
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
currentEventKey={currentEventKey}
|
|
68
|
-
isPaymentPage={isPaymentPage}
|
|
69
|
-
headerComponent={headerComponent}
|
|
70
|
-
/>
|
|
71
|
-
</div>
|
|
72
|
-
</h6>
|
|
73
|
-
{isExpanded && <hr className="mt-3" />}
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
};
|
|
53
|
+
<div className="d-flex">
|
|
54
|
+
<p className="m-0">{title || t("yourBooking")}</p>
|
|
55
|
+
</div>
|
|
77
56
|
|
|
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>
|
|
92
57
|
{showExpandButton && (
|
|
93
58
|
<div className="expand-button">
|
|
94
59
|
<Icon
|
|
@@ -97,31 +62,13 @@ const HeaderContent = ({
|
|
|
97
62
|
? "chevron-up"
|
|
98
63
|
: "chevron-down"
|
|
99
64
|
}
|
|
100
|
-
width="
|
|
65
|
+
width="1rem"
|
|
101
66
|
/>
|
|
102
67
|
</div>
|
|
103
68
|
)}
|
|
104
69
|
</div>
|
|
105
|
-
|
|
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
|
-
</>
|
|
70
|
+
</h6>
|
|
71
|
+
{isExpanded && <hr className="mt-3" />}
|
|
72
|
+
</div>
|
|
126
73
|
);
|
|
127
74
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
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";
|
|
5
4
|
|
|
6
5
|
export const MOBILE_WIDTH = 576;
|
|
7
6
|
export const ACCORDION_KEY = "booking-summary";
|
|
@@ -21,7 +20,4 @@ export type BookingSummaryProps = {
|
|
|
21
20
|
isLoading?: boolean;
|
|
22
21
|
peopleAmount: number;
|
|
23
22
|
isPaymentLink?: boolean;
|
|
24
|
-
isPaymentPage?: boolean;
|
|
25
|
-
headerComponent?: ReactElement;
|
|
26
|
-
footer?: ReactElement;
|
|
27
23
|
};
|
|
@@ -25,6 +25,4 @@ 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 PAGE_BODY_WITH_SCROLL = "page-body-with-scroll";
|
|
29
|
-
|
|
30
28
|
export const PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE = 300;
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
PAGE_LEFT_BLOCK_CONTAINER_ID,
|
|
17
17
|
PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE,
|
|
18
18
|
PAGE_CALENDAR_SELECT_WRAPPER,
|
|
19
|
-
PAGE_BODY_WITH_SCROLL,
|
|
20
19
|
} from "../constants";
|
|
21
20
|
import { ChangeRightBlockHeightEvent } from "../types";
|
|
22
21
|
|
|
@@ -47,19 +46,10 @@ export const useResizePageBody = () => {
|
|
|
47
46
|
const calenderWrapper = document.getElementById(
|
|
48
47
|
PAGE_CALENDAR_SELECT_WRAPPER
|
|
49
48
|
);
|
|
50
|
-
|
|
51
49
|
const CALENDAR_WRAPPER_HEIGHT = calenderWrapper
|
|
52
50
|
? calenderWrapper.clientHeight
|
|
53
51
|
: 0;
|
|
54
52
|
|
|
55
|
-
const paymentLinkPageBody = document.getElementById(PAGE_BODY_WITH_SCROLL);
|
|
56
|
-
if (paymentLinkPageBody) {
|
|
57
|
-
paymentLinkPageBody.scroll({
|
|
58
|
-
top: -height,
|
|
59
|
-
behavior: "smooth",
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
53
|
return {
|
|
64
54
|
maxHeight:
|
|
65
55
|
height -
|