mautourco-components 0.2.21 → 0.2.23
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/components/atoms/Checkbox/Checkbox.d.ts +3 -2
- package/dist/components/atoms/Checkbox/Checkbox.js +16 -6
- package/dist/components/atoms/Icon/icons/PlusCircleIcon.js +1 -1
- package/dist/components/atoms/Inputs/Input/Input.d.ts +1 -1
- package/dist/components/molecules/AddItemButton/AddItemButton.css +2088 -0
- package/dist/components/molecules/AddItemButton/AddItemButton.d.ts +7 -0
- package/dist/components/molecules/AddItemButton/AddItemButton.js +19 -0
- package/dist/components/molecules/BookingPax/BookingPax.d.ts +43 -0
- package/dist/components/molecules/BookingPax/BookingPax.js +43 -0
- package/dist/components/molecules/BookingPax/BookingPaxAccom.d.ts +34 -0
- package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.css +10 -0
- package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.d.ts +89 -1
- package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.js +34 -11
- package/dist/components/molecules/BookingPax/BookingPaxExcursion.d.ts +43 -0
- package/dist/components/molecules/BookingPax/BookingPaxExcursion.js +19 -0
- package/dist/components/molecules/BookingPax/BookingPaxHeader.d.ts +15 -0
- package/dist/components/molecules/BookingPax/BookingPaxHeader.js +13 -0
- package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.d.ts +30 -0
- package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.js +15 -0
- package/dist/components/molecules/BookingPax/BookingPaxRemarks.d.ts +14 -0
- package/dist/components/molecules/BookingPax/BookingPaxRemarks.js +11 -0
- package/dist/components/molecules/BookingPax/BookingPaxTransfer.d.ts +51 -0
- package/dist/components/molecules/BookingPax/BookingPaxTransfer.js +19 -2
- package/dist/components/molecules/BookingPax/index.d.ts +1 -0
- package/dist/components/molecules/BookingPax/index.js +1 -0
- package/dist/components/molecules/Calendar/DateTime.d.ts +5 -5
- package/dist/components/molecules/Calendar/DateTime.js +48 -37
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.d.ts +20 -0
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.js +17 -6
- package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.d.ts +18 -0
- package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.js +14 -3
- package/dist/components/molecules/ServiceSelector/ServiceSelector.d.ts +3 -0
- package/dist/components/molecules/ServiceSelector/ServiceSelector.js +23 -12
- package/dist/components/organisms/Booking/BookingPaxList.d.ts +64 -0
- package/dist/components/organisms/Booking/BookingPaxList.js +19 -0
- package/dist/components/organisms/BookingAddItem/AddItemNewService.d.ts +12 -0
- package/dist/components/organisms/BookingAddItem/AddItemNewService.js +48 -0
- package/dist/components/organisms/BookingAddItem/AddItemSelector.d.ts +9 -0
- package/dist/components/organisms/BookingAddItem/AddItemSelector.js +23 -0
- package/dist/components/organisms/BookingAddItem/BookingAddItem.d.ts +16 -0
- package/dist/components/organisms/BookingAddItem/BookingAddItem.js +66 -0
- package/dist/components/organisms/BookingAddItem/index.d.ts +3 -0
- package/dist/components/organisms/BookingAddItem/index.js +3 -0
- package/dist/components/organisms/DateTimePicker/DateTimePicker.js +11 -7
- package/dist/components/organisms/Dialog/Dialog.d.ts +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +4 -4
- package/dist/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.d.ts +29 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.js +31 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingMailSent.d.ts +29 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingMailSent.js +31 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingReference.d.ts +35 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingReference.js +37 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingSuccess.d.ts +35 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingSuccess.js +33 -0
- package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.d.ts +39 -2
- package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.js +25 -1
- package/dist/components/organisms/DialogBookingConfirm/index.d.ts +5 -0
- package/dist/components/organisms/DialogBookingConfirm/index.js +1 -0
- package/dist/components/organisms/PaxSelector/PaxSelector.d.ts +1 -0
- package/dist/components/organisms/PaxSelector/PaxSelector.js +50 -28
- package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.d.ts +25 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.js +16 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationBody.d.ts +24 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationBody.js +24 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.d.ts +30 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.js +15 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.d.ts +23 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.js +23 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.d.ts +22 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.js +13 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.d.ts +22 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.js +13 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.d.ts +18 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.js +12 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +7 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.js +2 -1
- package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.d.ts +18 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.js +12 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.d.ts +11 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.js +11 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.d.ts +29 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.js +29 -0
- package/dist/components/ui/popover.js +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +4 -2
- package/dist/styles/components/checkbox.css +16 -9
- package/dist/styles/components/molecule/calendarInput.css +3 -4
- package/dist/styles/components/molecule/service-selector.css +70 -21
- package/package.json +1 -2
- package/src/components/atoms/Checkbox/Checkbox.tsx +38 -23
- package/src/components/atoms/Icon/icons/PlusCircleIcon.tsx +2 -2
- package/src/components/atoms/Inputs/Input/Input.tsx +1 -1
- package/src/components/molecules/AddItemButton/AddItemButton.css +5 -0
- package/src/components/molecules/AddItemButton/AddItemButton.tsx +18 -0
- package/src/components/molecules/BookingPax/BookingPax.tsx +43 -0
- package/src/components/molecules/BookingPax/BookingPaxAccom.tsx +34 -0
- package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.css +6 -0
- package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.tsx +92 -18
- package/src/components/molecules/BookingPax/BookingPaxExcursion.tsx +43 -0
- package/src/components/molecules/BookingPax/BookingPaxHeader.tsx +28 -1
- package/src/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.tsx +30 -0
- package/src/components/molecules/BookingPax/BookingPaxRemarks.tsx +14 -0
- package/src/components/molecules/BookingPax/BookingPaxTransfer.tsx +52 -2
- package/src/components/molecules/BookingPax/index.ts +2 -0
- package/src/components/molecules/Calendar/DateTime.tsx +69 -53
- package/src/components/molecules/DialogContentPolicy/DialogCancellationList.tsx +32 -12
- package/src/components/molecules/DialogContentPolicy/DialogContentPolicy.tsx +27 -11
- package/src/components/molecules/ServiceSelector/ServiceSelector.tsx +91 -83
- package/src/components/organisms/Booking/BookingPaxList.tsx +64 -0
- package/src/components/organisms/BookingAddItem/AddItemNewService.tsx +95 -0
- package/src/components/organisms/BookingAddItem/AddItemSelector.tsx +43 -0
- package/src/components/organisms/BookingAddItem/BookingAddItem.tsx +120 -0
- package/src/components/organisms/BookingAddItem/index.ts +3 -0
- package/src/components/organisms/DateTimePicker/DateTimePicker.tsx +13 -7
- package/src/components/organisms/Dialog/Dialog.tsx +13 -20
- package/src/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.tsx +44 -0
- package/src/components/organisms/DialogBookingConfirm/BookingMailSent.tsx +56 -0
- package/src/components/organisms/DialogBookingConfirm/BookingReference.tsx +74 -0
- package/src/components/organisms/DialogBookingConfirm/BookingSuccess.tsx +67 -0
- package/src/components/organisms/DialogBookingConfirm/DialogBookingConfirm.tsx +43 -2
- package/src/components/organisms/DialogBookingConfirm/index.ts +6 -0
- package/src/components/organisms/PaxSelector/PaxSelector.tsx +305 -193
- package/src/components/organisms/TabCancellationPolicy/CancellationAccom.tsx +25 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationBody.tsx +24 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationExcursion.tsx +30 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationHeader.tsx +23 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationTransfer.tsx +22 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderAccom.tsx +22 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderExcursion.tsx +18 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +3 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.tsx +3 -2
- package/src/components/organisms/TabCancellationPolicy/PolicyExcursion.tsx +18 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyTransfer.tsx +11 -0
- package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicy.tsx +29 -0
- package/src/components/ui/popover.tsx +2 -4
- package/src/styles/components/checkbox.css +16 -9
- package/src/styles/components/molecule/calendarInput.css +12 -13
- package/src/styles/components/molecule/service-selector.css +71 -23
- package/dist/components/ui/checkbox.d.ts +0 -4
- package/dist/components/ui/checkbox.js +0 -31
- package/src/components/ui/checkbox.tsx +0 -32
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
14
|
+
import { AddItemButton } from '../../molecules/AddItemButton/AddItemButton';
|
|
15
|
+
export var AddItemType;
|
|
16
|
+
(function (AddItemType) {
|
|
17
|
+
AddItemType["NEW"] = "NEW";
|
|
18
|
+
AddItemType["EXISTING"] = "EXISTING";
|
|
19
|
+
})(AddItemType || (AddItemType = {}));
|
|
20
|
+
export var AddItemSelector = function (_a) {
|
|
21
|
+
var onAddItem = _a.onAddItem;
|
|
22
|
+
return (_jsxs("div", __assign({ className: "space-y-9" }, { children: [_jsx(Text, __assign({ size: "sm", variant: "medium" }, { children: "If you are sure you want to add this service, please confirm below. New prices and cancellation policies will apply to the added service." })), _jsxs("div", __assign({ className: "grid grid-cols-2 gap-4" }, { children: [_jsx(AddItemButton, { label: _jsxs(_Fragment, { children: ["Add new service ", _jsx("br", {}), " and new pax"] }), onClick: function () { return onAddItem === null || onAddItem === void 0 ? void 0 : onAddItem(AddItemType.NEW); } }), _jsx(AddItemButton, { label: _jsxs(_Fragment, { children: ["Add new service ", _jsx("br", {}), " for your existing pax"] }), onClick: function () { return onAddItem === null || onAddItem === void 0 ? void 0 : onAddItem(AddItemType.EXISTING); } })] })), _jsx(Text, __assign({ size: "sm", variant: "medium" }, { children: "Note: This action is irreversible and cannot be undone." }))] })));
|
|
23
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BookingPaxClientInfo } from '../../molecules/BookingPax';
|
|
3
|
+
import { ServiceOption, ServiceType } from '../../molecules/ServiceSelector';
|
|
4
|
+
import { AddItemType } from './AddItemSelector';
|
|
5
|
+
export interface BookingAddItemProps {
|
|
6
|
+
open: boolean;
|
|
7
|
+
serviceDate?: string | string[];
|
|
8
|
+
serviceOptions?: ServiceOption[];
|
|
9
|
+
clients: BookingPaxClientInfo[];
|
|
10
|
+
setOpen: (open: boolean) => void;
|
|
11
|
+
onAddItem?: (type: AddItemType) => void;
|
|
12
|
+
onServiceChange?: (service: ServiceType) => void;
|
|
13
|
+
onValidatePax?: (selectedClients: BookingPaxClientInfo[]) => void;
|
|
14
|
+
onBackToSelector?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const BookingAddItem: React.FC<BookingAddItemProps>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { AnimatePresence, domAnimation, LazyMotion } from 'motion/react';
|
|
25
|
+
import * as motion from 'motion/react-m';
|
|
26
|
+
import { useLayoutEffect, useRef, useState } from 'react';
|
|
27
|
+
import { DEFAULT_SERVICE_SELECTOR_OPTIONS } from '../../molecules/ServiceSelector/ServiceSelector';
|
|
28
|
+
import Dialog from '../Dialog/Dialog';
|
|
29
|
+
import { AddItemNewService } from './AddItemNewService';
|
|
30
|
+
import { AddItemSelector, AddItemType } from './AddItemSelector';
|
|
31
|
+
export var BookingAddItem = function (props) {
|
|
32
|
+
var open = props.open, _a = props.serviceDate, serviceDate = _a === void 0 ? [] : _a, _b = props.serviceOptions, serviceOptions = _b === void 0 ? [] : _b, clients = props.clients, setOpen = props.setOpen, onAddItem = props.onAddItem, onServiceChange = props.onServiceChange, onValidatePax = props.onValidatePax, onBackToSelector = props.onBackToSelector;
|
|
33
|
+
var _c = useState(null), selectedType = _c[0], setSelectedType = _c[1];
|
|
34
|
+
var contentRef = useRef(null);
|
|
35
|
+
var _d = useState('auto'), contentHeight = _d[0], setContentHeight = _d[1];
|
|
36
|
+
var handleAddItem = function (type) {
|
|
37
|
+
onAddItem === null || onAddItem === void 0 ? void 0 : onAddItem(type);
|
|
38
|
+
setSelectedType(type);
|
|
39
|
+
console.log(type);
|
|
40
|
+
};
|
|
41
|
+
var handleClose = function () {
|
|
42
|
+
setOpen(false);
|
|
43
|
+
setSelectedType(null);
|
|
44
|
+
};
|
|
45
|
+
// Measure and update content height when selectedType changes
|
|
46
|
+
useLayoutEffect(function () {
|
|
47
|
+
setTimeout(function () {
|
|
48
|
+
if (contentRef.current && open) {
|
|
49
|
+
var measuredHeight = contentRef.current.scrollHeight;
|
|
50
|
+
setContentHeight(measuredHeight);
|
|
51
|
+
}
|
|
52
|
+
}, 50);
|
|
53
|
+
}, [selectedType, open, serviceDate, serviceOptions, clients]);
|
|
54
|
+
var title = selectedType === AddItemType.EXISTING
|
|
55
|
+
? 'Add new service to your existing pax'
|
|
56
|
+
: 'Select how to add items to your booking';
|
|
57
|
+
return (_jsx(Dialog, __assign({ isOpen: open, onClose: handleClose, showFooter: false, title: title, className: "!max-w-[798px]" }, { children: _jsx(LazyMotion, __assign({ features: domAnimation }, { children: _jsx(motion.div, __assign({ animate: { height: contentHeight }, transition: { duration: 0.2, ease: 'easeInOut' }, style: { overflow: 'hidden' } }, { children: _jsx("div", __assign({ ref: contentRef }, { children: _jsx(AnimatePresence, __assign({ mode: "wait" }, { children: selectedType === AddItemType.EXISTING ? (_jsx(motion.div, __assign({ initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 }, transition: { duration: 0.25, ease: 'easeInOut' } }, { children: _jsx(AddItemNewService, { date: serviceDate, onServiceChange: function (service) { return onServiceChange === null || onServiceChange === void 0 ? void 0 : onServiceChange(service); }, options: serviceOptions.length > 0
|
|
58
|
+
? serviceOptions
|
|
59
|
+
: DEFAULT_SERVICE_SELECTOR_OPTIONS.map(function (_a) {
|
|
60
|
+
var disabled = _a.disabled, badge = _a.badge, option = __rest(_a, ["disabled", "badge"]);
|
|
61
|
+
return option;
|
|
62
|
+
}), clients: clients, onNext: function (selectedClients) { return onValidatePax === null || onValidatePax === void 0 ? void 0 : onValidatePax(selectedClients); }, onBack: function () {
|
|
63
|
+
onBackToSelector === null || onBackToSelector === void 0 ? void 0 : onBackToSelector();
|
|
64
|
+
setSelectedType(null);
|
|
65
|
+
} }) }), "add-item-new-service")) : (_jsx(motion.div, __assign({ initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 10 }, transition: { duration: 0.25, ease: 'easeInOut' } }, { children: _jsx(AddItemSelector, { onAddItem: handleAddItem }) }), "add-item-selector")) })) })) })) })) })));
|
|
66
|
+
};
|
|
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import React, { useState } from 'react';
|
|
13
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
14
14
|
import CalendarInput from '../../molecules/Calendar/CalendarInput';
|
|
15
15
|
import DateTime from '../../molecules/Calendar/DateTime';
|
|
16
16
|
import { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover';
|
|
@@ -28,7 +28,7 @@ var formatDateRange = function (dateRange) {
|
|
|
28
28
|
var DateTimePicker = function (_a) {
|
|
29
29
|
var _b = _a.placeholder, placeholder = _b === void 0 ? 'Select date' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.mode, mode = _d === void 0 ? 'both' : _d, _e = _a.selectionMode, selectionMode = _e === void 0 ? 'range' : _e, _f = _a.numberOfMonths, numberOfMonths = _f === void 0 ? 2 : _f, _g = _a.disableBeforeToday, disableBeforeToday = _g === void 0 ? true : _g, _h = _a.disableToday, disableToday = _h === void 0 ? false : _h, onValueChange = _a.onValueChange, defaultValue = _a.defaultValue, _j = _a.iconBGFull, iconBGFull = _j === void 0 ? true : _j, _k = _a.iconPosition, iconPosition = _k === void 0 ? 'right' : _k, _l = _a.showChevron, showChevron = _l === void 0 ? false : _l, icon = _a.icon;
|
|
30
30
|
// Parse default value and set initial state
|
|
31
|
-
var parseDefaultValue = function () {
|
|
31
|
+
var parseDefaultValue = useMemo(function () {
|
|
32
32
|
if (!defaultValue)
|
|
33
33
|
return { value: '', dateRange: undefined };
|
|
34
34
|
try {
|
|
@@ -46,6 +46,7 @@ var DateTimePicker = function (_a) {
|
|
|
46
46
|
var date = new Date(defaultValue);
|
|
47
47
|
var dateRange = { from: date, to: date };
|
|
48
48
|
var displayValue = format(date, 'dd/MM/yyyy');
|
|
49
|
+
console.log('defaultValue', defaultValue, selectionMode, displayValue);
|
|
49
50
|
return { value: displayValue, dateRange: dateRange };
|
|
50
51
|
}
|
|
51
52
|
}
|
|
@@ -53,10 +54,9 @@ var DateTimePicker = function (_a) {
|
|
|
53
54
|
console.error('Error parsing default date value:', error);
|
|
54
55
|
}
|
|
55
56
|
return { value: '', dateRange: undefined };
|
|
56
|
-
};
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var _o = useState(initialState.dateRange), selectedDateRange = _o[0], setSelectedDateRange = _o[1];
|
|
57
|
+
}, [defaultValue, selectionMode]);
|
|
58
|
+
var _m = useState(parseDefaultValue.value), value = _m[0], setValue = _m[1];
|
|
59
|
+
var _o = useState([]), selectedDateRange = _o[0], setSelectedDateRange = _o[1];
|
|
60
60
|
var _p = useState(undefined), selectedTime = _p[0], setSelectedTime = _p[1];
|
|
61
61
|
var _q = useState(false), isOpen = _q[0], setIsOpen = _q[1];
|
|
62
62
|
var handleDtChange = React.useCallback(function (payload) {
|
|
@@ -95,6 +95,10 @@ var DateTimePicker = function (_a) {
|
|
|
95
95
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(timeStr);
|
|
96
96
|
}
|
|
97
97
|
}, [onValueChange, selectionMode]);
|
|
98
|
-
|
|
98
|
+
useEffect(function () {
|
|
99
|
+
setValue(parseDefaultValue.value);
|
|
100
|
+
setSelectedDateRange(parseDefaultValue.dateRange);
|
|
101
|
+
}, [defaultValue]);
|
|
102
|
+
return (_jsxs(Popover, __assign({ open: isOpen, onOpenChange: setIsOpen }, { children: [_jsx(PopoverTrigger, __assign({ asChild: true }, { children: _jsx("div", { children: _jsx(CalendarInput, { placeholder: placeholder, value: value, disabled: disabled, iconBGFull: iconBGFull, iconPosition: iconPosition, showChevron: showChevron, isOpen: isOpen, icon: icon }) }) })), _jsx(PopoverContent, __assign({ className: "w-auto border-transparent !p-0" }, { children: _jsx(DateTime, { mode: mode, selectionMode: selectionMode, numberOfMonths: numberOfMonths, disableBeforeToday: disableBeforeToday, disableToday: disableToday, onChange: handleDtChange, defaultDateRange: selectedDateRange, defaultTime: selectedTime }) }))] })));
|
|
99
103
|
};
|
|
100
104
|
export default DateTimePicker;
|
|
@@ -10,12 +10,12 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
-
import {
|
|
13
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
14
14
|
import { createPortal } from 'react-dom';
|
|
15
15
|
import { useMobile } from '../../../hooks/useMobile';
|
|
16
|
+
import '../../../styles/components/organism/dialog.css';
|
|
16
17
|
import Button from '../../atoms/Button/Button';
|
|
17
18
|
import Icon from '../../atoms/Icon/Icon';
|
|
18
|
-
import '../../../styles/components/organism/dialog.css';
|
|
19
19
|
/**
|
|
20
20
|
* Dialog component - A modal dialog that adapts to different screen sizes
|
|
21
21
|
*
|
|
@@ -32,8 +32,8 @@ import '../../../styles/components/organism/dialog.css';
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
export var Dialog = function (_a) {
|
|
35
|
-
var isOpen = _a.isOpen, onClose = _a.onClose,
|
|
36
|
-
var
|
|
35
|
+
var isOpen = _a.isOpen, onClose = _a.onClose, _b = _a.title, title = _b === void 0 ? '' : _b, children = _a.children, footer = _a.footer, _c = _a.size, size = _c === void 0 ? 'responsive' : _c, _d = _a.primaryButtonText, primaryButtonText = _d === void 0 ? 'Save and update' : _d, _e = _a.secondaryButtonText, secondaryButtonText = _e === void 0 ? 'Cancel' : _e, onPrimaryClick = _a.onPrimaryClick, onSecondaryClick = _a.onSecondaryClick, _f = _a.showFooter, showFooter = _f === void 0 ? true : _f, _g = _a.showCloseButton, showCloseButton = _g === void 0 ? true : _g, _h = _a.closeOnOverlayClick, closeOnOverlayClick = _h === void 0 ? true : _h, _j = _a.closeOnEscape, closeOnEscape = _j === void 0 ? true : _j, _k = _a.className, className = _k === void 0 ? '' : _k, ariaLabelledBy = _a.ariaLabelledBy, ariaDescribedBy = _a.ariaDescribedBy;
|
|
36
|
+
var _l = useMobile(), isMobile = _l.isMobile, isTablet = _l.isTablet, isDesktop = _l.isDesktop;
|
|
37
37
|
var dialogRef = useRef(null);
|
|
38
38
|
var previousFocusRef = useRef(null);
|
|
39
39
|
// Determine the actual size based on responsive setting
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CancellationItem } from '../../molecules/DialogContentPolicy/DialogCancellationList';
|
|
2
|
+
export interface BookingCancellationPolicyProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the dialog is open.
|
|
5
|
+
*/
|
|
6
|
+
open: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The callback function to call when the dialog is closed.
|
|
9
|
+
*/
|
|
10
|
+
setOpen: (open: boolean) => void;
|
|
11
|
+
/**
|
|
12
|
+
* The cancellations to display.
|
|
13
|
+
*/
|
|
14
|
+
cancellations: CancellationItem[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* BookingCancellationPolicy is a component that allows the user to display the booking cancellation policy.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <BookingCancellationPolicy
|
|
21
|
+
* open={open}
|
|
22
|
+
* setOpen={setOpen}
|
|
23
|
+
* cancellations={cancellations}
|
|
24
|
+
* />
|
|
25
|
+
*
|
|
26
|
+
* @param props - The props for the BookingCancellationPolicy component.
|
|
27
|
+
* @returns The BookingCancellationPolicy component.
|
|
28
|
+
*/
|
|
29
|
+
export declare const BookingCancellationPolicy: (props: BookingCancellationPolicyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { DialogContentPolicy } from '../../molecules/DialogContentPolicy';
|
|
14
|
+
import { DialogBookingConfirm } from './DialogBookingConfirm';
|
|
15
|
+
/**
|
|
16
|
+
* BookingCancellationPolicy is a component that allows the user to display the booking cancellation policy.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <BookingCancellationPolicy
|
|
20
|
+
* open={open}
|
|
21
|
+
* setOpen={setOpen}
|
|
22
|
+
* cancellations={cancellations}
|
|
23
|
+
* />
|
|
24
|
+
*
|
|
25
|
+
* @param props - The props for the BookingCancellationPolicy component.
|
|
26
|
+
* @returns The BookingCancellationPolicy component.
|
|
27
|
+
*/
|
|
28
|
+
export var BookingCancellationPolicy = function (props) {
|
|
29
|
+
var open = props.open, setOpen = props.setOpen, cancellations = props.cancellations;
|
|
30
|
+
return (_jsx(DialogBookingConfirm, __assign({ open: open, setOpen: setOpen, title: "Confirmation of Terms & Cancellation policy", className: "!max-w-[800px]" }, { children: _jsx(DialogContentPolicy.List, { cancellations: cancellations }) })));
|
|
31
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BookingMailSentProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the dialog is open.
|
|
5
|
+
*/
|
|
6
|
+
open: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The callback function to call when the dialog is closed.
|
|
9
|
+
*/
|
|
10
|
+
setOpen: (open: boolean) => void;
|
|
11
|
+
/**
|
|
12
|
+
* The callback function to call when the next button is clicked.
|
|
13
|
+
*/
|
|
14
|
+
onNext: () => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* BookingMailSent is a component that allows the user to display the booking mail sent confirmation.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <BookingMailSent
|
|
21
|
+
* open={open}
|
|
22
|
+
* setOpen={setOpen}
|
|
23
|
+
* onNext={onNext}
|
|
24
|
+
* />
|
|
25
|
+
*
|
|
26
|
+
* @param props - The props for the BookingMailSent component.
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
export declare const BookingMailSent: React.FC<BookingMailSentProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Button, Heading } from '@/src';
|
|
14
|
+
import { DialogBookingConfirm } from './DialogBookingConfirm';
|
|
15
|
+
/**
|
|
16
|
+
* BookingMailSent is a component that allows the user to display the booking mail sent confirmation.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <BookingMailSent
|
|
20
|
+
* open={open}
|
|
21
|
+
* setOpen={setOpen}
|
|
22
|
+
* onNext={onNext}
|
|
23
|
+
* />
|
|
24
|
+
*
|
|
25
|
+
* @param props - The props for the BookingMailSent component.
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
export var BookingMailSent = function (props) {
|
|
29
|
+
var open = props.open, setOpen = props.setOpen, onNext = props.onNext;
|
|
30
|
+
return (_jsx(DialogBookingConfirm, __assign({ open: open, setOpen: setOpen, className: "!max-w-[800px]" }, { children: _jsxs("div", __assign({ className: "space-y-9" }, { children: [_jsxs("div", __assign({ className: "space-y-8" }, { children: [_jsx("img", { src: "/images/svg/booking-mail-sent.svg", alt: "Booking success", className: "mx-auto", width: 150, height: 150 }), _jsx(Heading, __assign({ as: "p", level: 6, variant: "medium", className: "text-center" }, { children: "You will receive a copy of your booking in your mail inbox." }))] })), _jsx(Button, __assign({ variant: "secondary", onClick: onNext, className: "w-full" }, { children: "Go to booking grid" }))] })) })));
|
|
31
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BookingReferenceProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the dialog is open.
|
|
5
|
+
*/
|
|
6
|
+
open: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The callback function to call when the dialog is closed.
|
|
9
|
+
*/
|
|
10
|
+
setOpen: (open: boolean) => void;
|
|
11
|
+
/**
|
|
12
|
+
* The callback function to call when the cancel button is clicked.
|
|
13
|
+
*/
|
|
14
|
+
onCancel: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* The callback function to call when the confirm button is clicked.
|
|
17
|
+
*/
|
|
18
|
+
onConfirm: (ref: string) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* BookingReference is a component that allows the user to display the booking reference.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <BookingReference
|
|
25
|
+
* open={open}
|
|
26
|
+
* setOpen={setOpen}
|
|
27
|
+
* onCancel={onCancel}
|
|
28
|
+
* onConfirm={onConfirm}
|
|
29
|
+
* />
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
* @param props - The props for the BookingReference component.
|
|
33
|
+
* @returns The BookingReference component.
|
|
34
|
+
*/
|
|
35
|
+
export declare const BookingReference: React.FC<BookingReferenceProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { useState } from 'react';
|
|
14
|
+
import Button from '../../atoms/Button/Button';
|
|
15
|
+
import Input from '../../atoms/Inputs/Input/Input';
|
|
16
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
17
|
+
import { DialogBookingConfirm } from './DialogBookingConfirm';
|
|
18
|
+
/**
|
|
19
|
+
* BookingReference is a component that allows the user to display the booking reference.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <BookingReference
|
|
23
|
+
* open={open}
|
|
24
|
+
* setOpen={setOpen}
|
|
25
|
+
* onCancel={onCancel}
|
|
26
|
+
* onConfirm={onConfirm}
|
|
27
|
+
* />
|
|
28
|
+
*
|
|
29
|
+
*
|
|
30
|
+
* @param props - The props for the BookingReference component.
|
|
31
|
+
* @returns The BookingReference component.
|
|
32
|
+
*/
|
|
33
|
+
export var BookingReference = function (props) {
|
|
34
|
+
var open = props.open, setOpen = props.setOpen, onCancel = props.onCancel, onConfirm = props.onConfirm;
|
|
35
|
+
var _a = useState(''), reference = _a[0], setReference = _a[1];
|
|
36
|
+
return (_jsx(DialogBookingConfirm, __assign({ open: open, setOpen: setOpen, title: "Reference number", className: "!max-w-[500px]" }, { children: _jsxs("div", __assign({ className: "space-y-9" }, { children: [_jsxs("div", __assign({ className: "space-y-2" }, { children: [_jsx("label", { children: _jsx(Text, __assign({ as: "span", size: "sm" }, { children: "Reference number" })) }), _jsx(Input, { placeholder: "Please insert a reference number", value: reference, onChange: function (e) { return setReference(e.target.value); } })] })), _jsxs("div", __assign({ className: "grid grid-cols-2 gap-x-4" }, { children: [_jsx(Button, __assign({ variant: "outline-secondary", onClick: onCancel }, { children: "Cancel" })), _jsx(Button, __assign({ variant: "secondary", onClick: function () { return onConfirm(reference); } }, { children: "Confirm booking" }))] }))] })) })));
|
|
37
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BookingSuccessProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the dialog is open.
|
|
5
|
+
*/
|
|
6
|
+
open: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The name of the booking.
|
|
9
|
+
*/
|
|
10
|
+
bookingName: string;
|
|
11
|
+
/**
|
|
12
|
+
* The callback function to call when the dialog is closed.
|
|
13
|
+
*/
|
|
14
|
+
setOpen: (open: boolean) => void;
|
|
15
|
+
/**
|
|
16
|
+
* The callback function to call when the next button is clicked.
|
|
17
|
+
*/
|
|
18
|
+
onNext: () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* BookingSuccess is a component that allows the user to display the booking success.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <BookingSuccess
|
|
25
|
+
* open={open}
|
|
26
|
+
* bookingName={bookingName}
|
|
27
|
+
* setOpen={setOpen}
|
|
28
|
+
* onNext={onNext}
|
|
29
|
+
* />
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
* @param props - The props for the BookingSuccess component.
|
|
33
|
+
* @returns The BookingSuccess component.
|
|
34
|
+
*/
|
|
35
|
+
export declare const BookingSuccess: React.FC<BookingSuccessProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Button, Heading, Text } from '@/src';
|
|
14
|
+
import { DialogBookingConfirm } from './DialogBookingConfirm';
|
|
15
|
+
/**
|
|
16
|
+
* BookingSuccess is a component that allows the user to display the booking success.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <BookingSuccess
|
|
20
|
+
* open={open}
|
|
21
|
+
* bookingName={bookingName}
|
|
22
|
+
* setOpen={setOpen}
|
|
23
|
+
* onNext={onNext}
|
|
24
|
+
* />
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* @param props - The props for the BookingSuccess component.
|
|
28
|
+
* @returns The BookingSuccess component.
|
|
29
|
+
*/
|
|
30
|
+
export var BookingSuccess = function (props) {
|
|
31
|
+
var open = props.open, bookingName = props.bookingName, setOpen = props.setOpen, onNext = props.onNext;
|
|
32
|
+
return (_jsx(DialogBookingConfirm, __assign({ open: open, setOpen: setOpen, className: "!max-w-[800px]" }, { children: _jsxs("div", __assign({ className: "space-y-9" }, { children: [_jsxs("div", __assign({ className: "space-y-8" }, { children: [_jsx("img", { src: "/images/svg/booking-confirm.svg", alt: "Booking success", className: "mx-auto", width: 150, height: 150 }), _jsxs("div", __assign({ className: "text-center" }, { children: [_jsx(Heading, __assign({ as: "p", level: 6, variant: "medium" }, { children: "Your booking has been successfully confirmed!" })), _jsxs(Text, __assign({ variant: "bold", size: "lg" }, { children: ["\"", bookingName, "\""] }))] }))] })), _jsx(Button, __assign({ variant: "secondary", onClick: onNext, className: "w-full" }, { children: "Confirm booking" }))] })) })));
|
|
33
|
+
};
|
|
@@ -1,10 +1,47 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface DialogBookingConfirmProps {
|
|
3
|
+
/**
|
|
4
|
+
* Whether the dialog is open.
|
|
5
|
+
*/
|
|
3
6
|
open: boolean;
|
|
4
|
-
|
|
7
|
+
/**
|
|
8
|
+
* The title of the dialog.
|
|
9
|
+
*/
|
|
10
|
+
title?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The children of the dialog.
|
|
13
|
+
*/
|
|
5
14
|
children: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* The callback function to call when the dialog is closed.
|
|
17
|
+
*/
|
|
6
18
|
setOpen: (open: boolean) => void;
|
|
19
|
+
/**
|
|
20
|
+
* The class name of the dialog.
|
|
21
|
+
*/
|
|
7
22
|
className?: string;
|
|
8
23
|
}
|
|
9
|
-
|
|
24
|
+
/**
|
|
25
|
+
* DialogBookingConfirm is a component that allows the user to display the booking confirmation.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* <DialogBookingConfirm
|
|
29
|
+
* open={open}
|
|
30
|
+
* title={title}
|
|
31
|
+
* children={children}
|
|
32
|
+
* setOpen={setOpen}
|
|
33
|
+
* className={className}
|
|
34
|
+
* />
|
|
35
|
+
*
|
|
36
|
+
*
|
|
37
|
+
* @param props - The props for the DialogBookingConfirm component.
|
|
38
|
+
* @returns The DialogBookingConfirm component.
|
|
39
|
+
*/
|
|
40
|
+
export declare const DialogBookingConfirm: {
|
|
41
|
+
(props: DialogBookingConfirmProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
Reference: React.FC<import("./BookingReference").BookingReferenceProps>;
|
|
43
|
+
CancellationPolicy: (props: import("./BookingCancellationPolicy").BookingCancellationPolicyProps) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
Success: React.FC<import("./BookingSuccess").BookingSuccessProps>;
|
|
45
|
+
MailSent: React.FC<import("./BookingMailSent").BookingMailSentProps>;
|
|
46
|
+
};
|
|
10
47
|
export {};
|
|
@@ -11,7 +11,31 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import Dialog from '../Dialog/Dialog';
|
|
14
|
+
import { BookingCancellationPolicy } from './BookingCancellationPolicy';
|
|
15
|
+
import { BookingMailSent } from './BookingMailSent';
|
|
16
|
+
import { BookingReference } from './BookingReference';
|
|
17
|
+
import { BookingSuccess } from './BookingSuccess';
|
|
18
|
+
/**
|
|
19
|
+
* DialogBookingConfirm is a component that allows the user to display the booking confirmation.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <DialogBookingConfirm
|
|
23
|
+
* open={open}
|
|
24
|
+
* title={title}
|
|
25
|
+
* children={children}
|
|
26
|
+
* setOpen={setOpen}
|
|
27
|
+
* className={className}
|
|
28
|
+
* />
|
|
29
|
+
*
|
|
30
|
+
*
|
|
31
|
+
* @param props - The props for the DialogBookingConfirm component.
|
|
32
|
+
* @returns The DialogBookingConfirm component.
|
|
33
|
+
*/
|
|
14
34
|
export var DialogBookingConfirm = function (props) {
|
|
15
35
|
var open = props.open, title = props.title, children = props.children, setOpen = props.setOpen, className = props.className;
|
|
16
|
-
return (_jsx(Dialog, __assign({ isOpen: open, onClose: function () { return setOpen(false); }, title: title, className: className, showFooter: false }, { children: children })));
|
|
36
|
+
return (_jsx(Dialog, __assign({ isOpen: open, onClose: function () { return setOpen(false); }, title: title, className: className, showFooter: false, closeOnOverlayClick: false }, { children: children })));
|
|
17
37
|
};
|
|
38
|
+
DialogBookingConfirm.Reference = BookingReference;
|
|
39
|
+
DialogBookingConfirm.CancellationPolicy = BookingCancellationPolicy;
|
|
40
|
+
DialogBookingConfirm.Success = BookingSuccess;
|
|
41
|
+
DialogBookingConfirm.MailSent = BookingMailSent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './DialogBookingConfirm';
|
|
2
|
+
export type { BookingCancellationPolicyProps } from './BookingCancellationPolicy';
|
|
3
|
+
export type { BookingMailSentProps } from './BookingMailSent';
|
|
4
|
+
export type { BookingReferenceProps } from './BookingReference';
|
|
5
|
+
export type { BookingSuccessProps } from './BookingSuccess';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DialogBookingConfirm';
|