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
|
@@ -19,7 +19,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
19
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
20
|
};
|
|
21
21
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
22
|
-
import {
|
|
22
|
+
import { useEffect, useRef, useState } from 'react';
|
|
23
23
|
import Icon from '../../atoms/Icon/Icon';
|
|
24
24
|
import { Text } from '../../atoms/Typography/Typography';
|
|
25
25
|
var DEFAULT_PAX_DATA = {
|
|
@@ -123,7 +123,7 @@ var AgeSelector = function (_a) {
|
|
|
123
123
|
border: 'none',
|
|
124
124
|
outline: 'none',
|
|
125
125
|
width: '100%',
|
|
126
|
-
cursor: 'text'
|
|
126
|
+
cursor: 'text',
|
|
127
127
|
} }), _jsx("button", __assign({ type: "button", className: "pax-selector__age-dropdown-btn", onClick: function (e) {
|
|
128
128
|
e.preventDefault();
|
|
129
129
|
e.stopPropagation();
|
|
@@ -134,7 +134,7 @@ var AgeSelector = function (_a) {
|
|
|
134
134
|
cursor: 'pointer',
|
|
135
135
|
padding: 0,
|
|
136
136
|
display: 'flex',
|
|
137
|
-
alignItems: 'center'
|
|
137
|
+
alignItems: 'center',
|
|
138
138
|
} }, { children: _jsx(Icon, { name: "chevron-down", size: "sm", className: "dropdown-input__icon dropdown-input__icon--chevron" }) }))] })), isOpen && (_jsx("div", __assign({ className: "dropdown-menu", role: "listbox" }, { children: ageOptions.map(function (age) { return (_jsx("div", __assign({ className: "dropdown-option ".concat((value === null || value === void 0 ? void 0 : value.toString()) === age ? 'dropdown-option--selected' : ''), onClick: function () { return handleSelect(age); }, role: "option", "aria-selected": (value === null || value === void 0 ? void 0 : value.toString()) === age }, { children: age }), age)); }) })))] }))] })));
|
|
139
139
|
};
|
|
140
140
|
var StepperRow = function (_a) {
|
|
@@ -223,16 +223,25 @@ var RoomEditor = function (_a) {
|
|
|
223
223
|
var teenAgeChunks = chunkAges(room.teenAges || [], 'Teen');
|
|
224
224
|
var childAgeChunks = chunkAges(room.childAges || [], 'Child');
|
|
225
225
|
var infantAgeChunks = chunkAges(room.infantAges || [], 'Infant');
|
|
226
|
-
return (_jsxs("div", __assign({ className: "pax-selector__room-container" }, { children: [_jsxs("div", __assign({ className: "pax-selector__room-header" }, { children: [_jsxs("div", __assign({ className: "pax-selector__room-title" }, { children: [_jsxs(Text, __assign({ size: "lg", variant: "bold", color: "accent", className: "pax-selector__room-name" }, { children: ["Room ", roomNumber] })), _jsx(Icon, { name: "home", size: "md", className: "pax-selector__room-icon" })] })), showRemove && (_jsxs("button", __assign({ type: "button", className: "pax-selector__room-remove", onClick: onRemove, "aria-label": "Remove room ".concat(roomNumber) }, { children: [_jsx(Icon, { name: "close", size: "sm", className: "pax-selector__room-remove-icon" }), _jsx("span", __assign({ className: "pax-selector__room-remove-text" }, { children: "Remove" }))] })))] })), _jsxs("div", __assign({ className: "pax-selector__room-content" }, { children: [_jsxs("div", __assign({ className: "pax-selector__steppers" }, { children: [_jsx(StepperRow, { label: "Adult", value: room.adults, max: maxAdults, onChange: function (val) { return handleFieldChange('adults', val); } }), _jsx(StepperRow, { label: "Teen", value: room.teens, max: maxTeens, onChange: function (val) { return handleFieldChange('teens', val); } }), _jsx(StepperRow, { label: "Child", value: room.children, max: maxChildren, onChange: function (val) { return handleFieldChange('children', val); } }), _jsx(StepperRow, { label: "Infant", value: room.infants, max: maxInfants, onChange: function (val) { return handleFieldChange('infants', val); } })] })), (
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
226
|
+
return (_jsxs("div", __assign({ className: "pax-selector__room-container" }, { children: [_jsxs("div", __assign({ className: "pax-selector__room-header" }, { children: [_jsxs("div", __assign({ className: "pax-selector__room-title" }, { children: [_jsxs(Text, __assign({ size: "lg", variant: "bold", color: "accent", className: "pax-selector__room-name" }, { children: ["Room ", roomNumber] })), _jsx(Icon, { name: "home", size: "md", className: "pax-selector__room-icon" })] })), showRemove && (_jsxs("button", __assign({ type: "button", className: "pax-selector__room-remove", onClick: onRemove, "aria-label": "Remove room ".concat(roomNumber) }, { children: [_jsx(Icon, { name: "close", size: "sm", className: "pax-selector__room-remove-icon" }), _jsx("span", __assign({ className: "pax-selector__room-remove-text" }, { children: "Remove" }))] })))] })), _jsxs("div", __assign({ className: "pax-selector__room-content" }, { children: [_jsxs("div", __assign({ className: "pax-selector__steppers" }, { children: [_jsx(StepperRow, { label: "Adult", value: room.adults, max: maxAdults, onChange: function (val) { return handleFieldChange('adults', val); } }), _jsx(StepperRow, { label: "Teen", value: room.teens, max: maxTeens, onChange: function (val) { return handleFieldChange('teens', val); } }), _jsx(StepperRow, { label: "Child", value: room.children, max: maxChildren, onChange: function (val) { return handleFieldChange('children', val); } }), _jsx(StepperRow, { label: "Infant", value: room.infants, max: maxInfants, onChange: function (val) { return handleFieldChange('infants', val); } })] })), (room.teens > 0 || room.children > 0 || room.infants > 0) && (_jsxs("div", __assign({ className: "pax-selector__age-section" }, { children: [_jsx(Text, __assign({ size: "base", variant: "bold", color: "default", className: "pax-selector__age-section-title" }, { children: "Please specify the age :" })), _jsxs("div", __assign({ className: "pax-selector__age-groups" }, { children: [room.teens > 0 &&
|
|
227
|
+
teenAgeChunks.map(function (chunk, chunkIndex) { return (_jsx("div", __assign({ className: "pax-selector__age-row" }, { children: chunk.map(function (age, ageIndex) {
|
|
228
|
+
var actualIndex = chunkIndex * 2 + ageIndex;
|
|
229
|
+
return (_jsx(AgeSelector, { label: "Teen", value: age, onChange: function (selectedAge) {
|
|
230
|
+
return handleAgeChange('teenAges', actualIndex, selectedAge);
|
|
231
|
+
}, ageRange: CHILD_CATEGORY_AGES, required: true }, "teen-".concat(actualIndex)));
|
|
232
|
+
}) }), "teen-chunk-".concat(chunkIndex))); }), room.children > 0 &&
|
|
233
|
+
childAgeChunks.map(function (chunk, chunkIndex) { return (_jsx("div", __assign({ className: "pax-selector__age-row" }, { children: chunk.map(function (age, ageIndex) {
|
|
234
|
+
var actualIndex = chunkIndex * 2 + ageIndex;
|
|
235
|
+
return (_jsx(AgeSelector, { label: "Child", value: age, onChange: function (selectedAge) {
|
|
236
|
+
return handleAgeChange('childAges', actualIndex, selectedAge);
|
|
237
|
+
}, ageRange: CHILD_CATEGORY_AGES, required: true }, "child-".concat(actualIndex)));
|
|
238
|
+
}) }), "child-chunk-".concat(chunkIndex))); }), room.infants > 0 &&
|
|
239
|
+
infantAgeChunks.map(function (chunk, chunkIndex) { return (_jsx("div", __assign({ className: "pax-selector__age-row" }, { children: chunk.map(function (age, ageIndex) {
|
|
240
|
+
var actualIndex = chunkIndex * 2 + ageIndex;
|
|
241
|
+
return (_jsx(AgeSelector, { label: "Infant", value: age, onChange: function (selectedAge) {
|
|
242
|
+
return handleAgeChange('infantAges', actualIndex, selectedAge);
|
|
243
|
+
}, ageRange: CHILD_CATEGORY_AGES, required: true }, "infant-".concat(actualIndex)));
|
|
244
|
+
}) }), "infant-chunk-".concat(chunkIndex))); })] }))] }))), _jsx(ClientTypeSelector, { value: room.clientType, onChange: function (val) { return handleFieldChange('clientType', val); } })] }))] })));
|
|
236
245
|
};
|
|
237
246
|
var PaxSelector = function (_a) {
|
|
238
247
|
var _b = _a.label, label = _b === void 0 ? 'Number of pax' : _b, value = _a.value, onChange = _a.onChange, onAddRoom = _a.onAddRoom, onDone = _a.onDone, _c = _a.placeholder, placeholder = _c === void 0 ? 'Select pax' : _c, _d = _a.className, className = _d === void 0 ? '' : _d, _e = _a.maxAdults, maxAdults = _e === void 0 ? 10 : _e, _f = _a.maxTeens, maxTeens = _f === void 0 ? 10 : _f, _g = _a.maxChildren, maxChildren = _g === void 0 ? 10 : _g, _h = _a.maxInfants, maxInfants = _h === void 0 ? 10 : _h, _j = _a.showAddRoom, showAddRoom = _j === void 0 ? true : _j, _k = _a.multipleRooms, multipleRooms = _k === void 0 ? false : _k, defaultRooms = _a.defaultRooms, onRoomsChange = _a.onRoomsChange, onRemoveRoom = _a.onRemoveRoom, _l = _a.defaultPaxData, defaultPaxData = _l === void 0 ? DEFAULT_PAX_DATA_WITH_ADULTS : _l;
|
|
@@ -249,7 +258,11 @@ var PaxSelector = function (_a) {
|
|
|
249
258
|
}, [value, multipleRooms]);
|
|
250
259
|
// Initialize with default pax data and trigger onChange on mount
|
|
251
260
|
useEffect(function () {
|
|
252
|
-
if (!hasInitialized.current &&
|
|
261
|
+
if (!hasInitialized.current &&
|
|
262
|
+
!value &&
|
|
263
|
+
defaultPaxData &&
|
|
264
|
+
!multipleRooms &&
|
|
265
|
+
onChange) {
|
|
253
266
|
hasInitialized.current = true;
|
|
254
267
|
onChange(defaultPaxData);
|
|
255
268
|
}
|
|
@@ -354,9 +367,7 @@ var PaxSelector = function (_a) {
|
|
|
354
367
|
};
|
|
355
368
|
var getTotalPax = function () {
|
|
356
369
|
if (multipleRooms) {
|
|
357
|
-
return rooms.reduce(function (total, room) {
|
|
358
|
-
return total + room.adults + room.teens + room.children + room.infants;
|
|
359
|
-
}, 0);
|
|
370
|
+
return rooms.reduce(function (total, room) { return total + room.adults + room.teens + room.children + room.infants; }, 0);
|
|
360
371
|
}
|
|
361
372
|
var adults = internalData.adults, teens = internalData.teens, children = internalData.children, infants = internalData.infants;
|
|
362
373
|
return adults + teens + children + infants;
|
|
@@ -371,7 +382,9 @@ var PaxSelector = function (_a) {
|
|
|
371
382
|
var hasPax = getTotalPax() > 0;
|
|
372
383
|
return (_jsxs("div", __assign({ className: "pax-selector ".concat(className), ref: containerRef }, { children: [_jsxs("button", __assign({ type: "button", className: "pax-selector__trigger", onClick: function () { return setIsOpen(!isOpen); }, "aria-expanded": isOpen, "aria-haspopup": "true" }, { children: [_jsx(Text, __assign({ size: "sm", variant: "regular", className: "pax-selector__label" }, { children: label })), _jsxs("div", __assign({ className: "pax-selector__input ".concat(isOpen ? 'pax-selector__input--active' : '') }, { children: [_jsxs("div", __assign({ className: "pax-selector__input-content" }, { children: [_jsx(Icon, { name: "user-icon", size: "sm", className: "pax-selector__input-icon" }), _jsx("span", __assign({ className: "pax-selector__input-text ".concat(!hasPax ? 'pax-selector__input-placeholder' : '') }, { children: getDisplayText() }))] })), _jsx(Icon, { name: "chevron-down", size: "sm", className: "pax-selector__chevron ".concat(isOpen ? 'pax-selector__chevron--open' : '') })] }))] })), isOpen && (_jsxs("div", __assign({ className: "pax-selector__dropdown" }, { children: [multipleRooms ? (_jsxs(_Fragment, { children: [showAddRoom && (_jsxs("button", __assign({ type: "button", className: "pax-selector__add-room", onClick: handleAddRoom }, { children: [_jsx(Icon, { name: "home", size: "sm", className: "pax-selector__add-room-icon" }), "Add a room", _jsx(Icon, { name: "plus", size: "sm", className: "pax-selector__add-room-icon" })] }))), _jsx("div", __assign({ className: "pax-selector__rooms" }, { children: rooms.map(function (room, index) { return (_jsx(RoomEditor, { room: room, roomNumber: index + 1, showRemove: rooms.length > 1, maxAdults: maxAdults, maxTeens: maxTeens, maxChildren: maxChildren, maxInfants: maxInfants, onChange: function (updatedRoom) { return handleRoomChange(room.roomId, updatedRoom); }, onRemove: function () { return handleRemoveRoom(room.roomId); } }, room.roomId)); }) }))] })) : (
|
|
373
384
|
/* Single Room Mode */
|
|
374
|
-
_jsxs(_Fragment, { children: [_jsxs("div", __assign({ className: "pax-selector__steppers" }, { children: [_jsx(StepperRow, { label: "Adult", value: internalData.adults, max: maxAdults, onChange: function (val) { return handleDataChange('adults', val); } }), _jsx(StepperRow, { label: "Teen", value: internalData.teens, max: maxTeens, onChange: function (val) { return handleDataChange('teens', val); } }), _jsx(StepperRow, { label: "Child", value: internalData.children, max: maxChildren, onChange: function (val) { return handleDataChange('children', val); } }), _jsx(StepperRow, { label: "Infant", value: internalData.infants, max: maxInfants, onChange: function (val) { return handleDataChange('infants', val); } })] })), (
|
|
385
|
+
_jsxs(_Fragment, { children: [_jsxs("div", __assign({ className: "pax-selector__steppers" }, { children: [_jsx(StepperRow, { label: "Adult", value: internalData.adults, max: maxAdults, onChange: function (val) { return handleDataChange('adults', val); } }), _jsx(StepperRow, { label: "Teen", value: internalData.teens, max: maxTeens, onChange: function (val) { return handleDataChange('teens', val); } }), _jsx(StepperRow, { label: "Child", value: internalData.children, max: maxChildren, onChange: function (val) { return handleDataChange('children', val); } }), _jsx(StepperRow, { label: "Infant", value: internalData.infants, max: maxInfants, onChange: function (val) { return handleDataChange('infants', val); } })] })), (internalData.teens > 0 ||
|
|
386
|
+
internalData.children > 0 ||
|
|
387
|
+
internalData.infants > 0) && (_jsxs("div", __assign({ className: "pax-selector__age-section" }, { children: [_jsx(Text, __assign({ size: "base", variant: "bold", color: "default", className: "pax-selector__age-section-title" }, { children: "Please specify the age :" })), _jsx("div", __assign({ className: "pax-selector__age-groups" }, { children: (function () {
|
|
375
388
|
var chunkAges = function (ages, category) {
|
|
376
389
|
var chunks = [];
|
|
377
390
|
for (var i = 0; i < ages.length; i += 2) {
|
|
@@ -387,16 +400,25 @@ var PaxSelector = function (_a) {
|
|
|
387
400
|
ages[index] = age;
|
|
388
401
|
handleDataChange(category, ages);
|
|
389
402
|
};
|
|
390
|
-
return (_jsxs(_Fragment, { children: [internalData.teens > 0 &&
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
403
|
+
return (_jsxs(_Fragment, { children: [internalData.teens > 0 &&
|
|
404
|
+
teenAgeChunks.map(function (chunk, chunkIndex) { return (_jsx("div", __assign({ className: "pax-selector__age-row" }, { children: chunk.map(function (age, ageIndex) {
|
|
405
|
+
var actualIndex = chunkIndex * 2 + ageIndex;
|
|
406
|
+
return (_jsx(AgeSelector, { label: "Teen", value: age, onChange: function (selectedAge) {
|
|
407
|
+
return handleAgeChange('teenAges', actualIndex, selectedAge);
|
|
408
|
+
}, ageRange: CHILD_CATEGORY_AGES, required: true }, "teen-".concat(actualIndex)));
|
|
409
|
+
}) }), "teen-chunk-".concat(chunkIndex))); }), internalData.children > 0 &&
|
|
410
|
+
childAgeChunks.map(function (chunk, chunkIndex) { return (_jsx("div", __assign({ className: "pax-selector__age-row" }, { children: chunk.map(function (age, ageIndex) {
|
|
411
|
+
var actualIndex = chunkIndex * 2 + ageIndex;
|
|
412
|
+
return (_jsx(AgeSelector, { label: "Child", value: age, onChange: function (selectedAge) {
|
|
413
|
+
return handleAgeChange('childAges', actualIndex, selectedAge);
|
|
414
|
+
}, ageRange: CHILD_CATEGORY_AGES, required: true }, "child-".concat(actualIndex)));
|
|
415
|
+
}) }), "child-chunk-".concat(chunkIndex))); }), internalData.infants > 0 &&
|
|
416
|
+
infantAgeChunks.map(function (chunk, chunkIndex) { return (_jsx("div", __assign({ className: "pax-selector__age-row" }, { children: chunk.map(function (age, ageIndex) {
|
|
417
|
+
var actualIndex = chunkIndex * 2 + ageIndex;
|
|
418
|
+
return (_jsx(AgeSelector, { label: "Infant", value: age, onChange: function (selectedAge) {
|
|
419
|
+
return handleAgeChange('infantAges', actualIndex, selectedAge);
|
|
420
|
+
}, ageRange: CHILD_CATEGORY_AGES, required: true }, "infant-".concat(actualIndex)));
|
|
421
|
+
}) }), "infant-chunk-".concat(chunkIndex))); })] }));
|
|
400
422
|
})() }))] }))), _jsx(ClientTypeSelector, { value: internalData.clientType, onChange: function (val) { return handleDataChange('clientType', val); } })] })), _jsxs("div", __assign({ className: "pax-selector__actions" }, { children: [_jsx("button", __assign({ type: "button", className: "pax-selector__clear-btn", onClick: handleClear }, { children: "Clear Pax" })), _jsx("button", __assign({ type: "button", className: "pax-selector__done-btn", onClick: handleDone }, { children: "Done" }))] }))] })))] })));
|
|
401
423
|
};
|
|
402
424
|
export default PaxSelector;
|
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
import { HeaderAccomProps } from './HeaderAccom';
|
|
2
2
|
import { Policy } from './PolicyAccom/PolicyAccom';
|
|
3
3
|
export interface CancellationAccomProps extends HeaderAccomProps {
|
|
4
|
+
/**
|
|
5
|
+
* The image of the cancellation accommodation.
|
|
6
|
+
*/
|
|
4
7
|
image: string;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the cancellation accommodation is on request.
|
|
10
|
+
*/
|
|
5
11
|
isOnRequest?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The room policies of the cancellation accommodation.
|
|
14
|
+
*/
|
|
6
15
|
roomPolicies: Array<{
|
|
7
16
|
roomName: string;
|
|
8
17
|
policies: Policy[];
|
|
9
18
|
}>;
|
|
10
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* CancellationAccom is a component that allows the user to display the cancellation accommodation.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <CancellationAccom
|
|
25
|
+
* hotelName="Hotel Name"
|
|
26
|
+
* pax="8 pax"
|
|
27
|
+
* dates={['2024-01-01', '2024-01-02']}
|
|
28
|
+
* image="/images/accom.png"
|
|
29
|
+
* roomPolicies={roomPolicies}
|
|
30
|
+
* isOnRequest={false}
|
|
31
|
+
* />
|
|
32
|
+
*
|
|
33
|
+
* @param props - The props for the CancellationAccom component.
|
|
34
|
+
* @returns The CancellationAccom component.
|
|
35
|
+
*/
|
|
11
36
|
export default function CancellationAccom(props: CancellationAccomProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,22 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import CancellationBody from './CancellationBody';
|
|
14
14
|
import CancellationHeader from './CancellationHeader';
|
|
15
15
|
import DetailsCancellationPolicy from './TabCancellationPolicy';
|
|
16
|
+
/**
|
|
17
|
+
* CancellationAccom is a component that allows the user to display the cancellation accommodation.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <CancellationAccom
|
|
21
|
+
* hotelName="Hotel Name"
|
|
22
|
+
* pax="8 pax"
|
|
23
|
+
* dates={['2024-01-01', '2024-01-02']}
|
|
24
|
+
* image="/images/accom.png"
|
|
25
|
+
* roomPolicies={roomPolicies}
|
|
26
|
+
* isOnRequest={false}
|
|
27
|
+
* />
|
|
28
|
+
*
|
|
29
|
+
* @param props - The props for the CancellationAccom component.
|
|
30
|
+
* @returns The CancellationAccom component.
|
|
31
|
+
*/
|
|
16
32
|
export default function CancellationAccom(props) {
|
|
17
33
|
var hotelName = props.hotelName, pax = props.pax, dates = props.dates, image = props.image, roomPolicies = props.roomPolicies, isOnRequest = props.isOnRequest;
|
|
18
34
|
return (_jsx(DetailsCancellationPolicy.Layout, __assign({ title: "Accommodation", icon: "accom", isOnRequest: isOnRequest, image: image, header: _jsx(CancellationHeader, { children: _jsx(CancellationHeader.Accom, { hotelName: hotelName, pax: pax, dates: dates }) }) }, { children: _jsx(CancellationBody, { children: roomPolicies.map(function (roomPolicy, index) { return (_jsx(CancellationBody.Accom, { roomName: roomPolicy.roomName, policies: roomPolicy.policies }, index)); }) }) })));
|
|
@@ -2,6 +2,30 @@ import React from 'react';
|
|
|
2
2
|
import PolicyAccom from './PolicyAccom/PolicyAccom';
|
|
3
3
|
import PolicyExcursion from './PolicyExcursion';
|
|
4
4
|
import PolicyTransfer from './PolicyTransfer';
|
|
5
|
+
/**
|
|
6
|
+
* CancellationBody is a component that allows the user to display the cancellation body.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* <CancellationBody>
|
|
10
|
+
* <CancellationBody.Accom
|
|
11
|
+
* roomName="Room Name"
|
|
12
|
+
* policies={policies}
|
|
13
|
+
* />
|
|
14
|
+
* <CancellationBody.Excursion
|
|
15
|
+
* name="Excursion Name"
|
|
16
|
+
* date="2024-01-01"
|
|
17
|
+
* pickUpPoint="Pick Up Point"
|
|
18
|
+
* policies={policies}
|
|
19
|
+
* />
|
|
20
|
+
* <CancellationBody.Transfer
|
|
21
|
+
* carName="Car Name"
|
|
22
|
+
* transferData={transferData}
|
|
23
|
+
* />
|
|
24
|
+
* </CancellationBody>
|
|
25
|
+
*
|
|
26
|
+
* @param props - The props for the CancellationBody component.
|
|
27
|
+
* @returns The CancellationBody component.
|
|
28
|
+
*/
|
|
5
29
|
declare function CancellationBody(props: React.PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
6
30
|
declare namespace CancellationBody {
|
|
7
31
|
var Accom: typeof PolicyAccom;
|
|
@@ -13,6 +13,30 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import PolicyAccom from './PolicyAccom/PolicyAccom';
|
|
14
14
|
import PolicyExcursion from './PolicyExcursion';
|
|
15
15
|
import PolicyTransfer from './PolicyTransfer';
|
|
16
|
+
/**
|
|
17
|
+
* CancellationBody is a component that allows the user to display the cancellation body.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <CancellationBody>
|
|
21
|
+
* <CancellationBody.Accom
|
|
22
|
+
* roomName="Room Name"
|
|
23
|
+
* policies={policies}
|
|
24
|
+
* />
|
|
25
|
+
* <CancellationBody.Excursion
|
|
26
|
+
* name="Excursion Name"
|
|
27
|
+
* date="2024-01-01"
|
|
28
|
+
* pickUpPoint="Pick Up Point"
|
|
29
|
+
* policies={policies}
|
|
30
|
+
* />
|
|
31
|
+
* <CancellationBody.Transfer
|
|
32
|
+
* carName="Car Name"
|
|
33
|
+
* transferData={transferData}
|
|
34
|
+
* />
|
|
35
|
+
* </CancellationBody>
|
|
36
|
+
*
|
|
37
|
+
* @param props - The props for the CancellationBody component.
|
|
38
|
+
* @returns The CancellationBody component.
|
|
39
|
+
*/
|
|
16
40
|
export default function CancellationBody(props) {
|
|
17
41
|
return _jsx("div", __assign({ className: "cancellation-body" }, props));
|
|
18
42
|
}
|
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
export interface CancellationExcursionProps {
|
|
2
|
+
/**
|
|
3
|
+
* The name of the cancellation excursion.
|
|
4
|
+
*/
|
|
2
5
|
name: string;
|
|
6
|
+
/**
|
|
7
|
+
* The date of the cancellation excursion.
|
|
8
|
+
*/
|
|
3
9
|
date: string;
|
|
10
|
+
/**
|
|
11
|
+
* The image of the cancellation excursion.
|
|
12
|
+
*/
|
|
4
13
|
image: string;
|
|
14
|
+
/**
|
|
15
|
+
* The pick up point of the cancellation excursion.
|
|
16
|
+
*/
|
|
5
17
|
pickUpPoint: string;
|
|
18
|
+
/**
|
|
19
|
+
* The policies of the cancellation excursion.
|
|
20
|
+
*/
|
|
6
21
|
policies: string;
|
|
7
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* CancellationExcursion is a component that allows the user to display the cancellation excursion.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* <CancellationExcursion
|
|
28
|
+
* name="Excursion Name"
|
|
29
|
+
* date="2024-01-01"
|
|
30
|
+
* image="/images/excursion.png"
|
|
31
|
+
* pickUpPoint="Pick Up Point"
|
|
32
|
+
* policies="Policies"
|
|
33
|
+
* />
|
|
34
|
+
*
|
|
35
|
+
* @param props - The props for the CancellationExcursion component.
|
|
36
|
+
* @returns The CancellationExcursion component.
|
|
37
|
+
*/
|
|
8
38
|
export default function CancellationExcursion(props: CancellationExcursionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import CancellationBody from './CancellationBody';
|
|
14
14
|
import CancellationHeader from './CancellationHeader';
|
|
15
15
|
import DetailsCancellationPolicy from './TabCancellationPolicy';
|
|
16
|
+
/**
|
|
17
|
+
* CancellationExcursion is a component that allows the user to display the cancellation excursion.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <CancellationExcursion
|
|
21
|
+
* name="Excursion Name"
|
|
22
|
+
* date="2024-01-01"
|
|
23
|
+
* image="/images/excursion.png"
|
|
24
|
+
* pickUpPoint="Pick Up Point"
|
|
25
|
+
* policies="Policies"
|
|
26
|
+
* />
|
|
27
|
+
*
|
|
28
|
+
* @param props - The props for the CancellationExcursion component.
|
|
29
|
+
* @returns The CancellationExcursion component.
|
|
30
|
+
*/
|
|
16
31
|
export default function CancellationExcursion(props) {
|
|
17
32
|
var name = props.name, date = props.date, image = props.image, pickUpPoint = props.pickUpPoint, policies = props.policies;
|
|
18
33
|
return (_jsx(DetailsCancellationPolicy.Layout, __assign({ title: "Excursion", icon: "map", isOnRequest: false, image: image, header: _jsx(CancellationHeader, { children: _jsx(CancellationHeader.Excursion, { name: name, date: date }) }) }, { children: _jsx(CancellationBody, { children: _jsx(CancellationBody.Excursion, { pickUpPoint: pickUpPoint, policies: policies }) }) })));
|
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
import HeaderAccom from './HeaderAccom';
|
|
3
3
|
import HeaderExcursion from './HeaderExcursion';
|
|
4
4
|
import HeaderTransfer from './HeaderExcursion/HeaderTransfer';
|
|
5
|
+
/**
|
|
6
|
+
* CancellationHeader is a component that allows the user to display the cancellation header.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* <CancellationHeader>
|
|
10
|
+
* <CancellationHeader.Accom
|
|
11
|
+
* hotelName="Hotel Name"
|
|
12
|
+
* pax="8 pax"
|
|
13
|
+
* dates={['2024-01-01', '2024-01-02']}
|
|
14
|
+
* />
|
|
15
|
+
* <CancellationHeader.Excursion
|
|
16
|
+
* name="Excursion Name"
|
|
17
|
+
* date="2024-01-01"
|
|
18
|
+
* />
|
|
19
|
+
* <CancellationHeader.Transfer
|
|
20
|
+
* carName="Car Name"
|
|
21
|
+
* transferData={transferData}
|
|
22
|
+
* />
|
|
23
|
+
* </CancellationHeader>
|
|
24
|
+
*
|
|
25
|
+
* @param props - The props for the CancellationHeader component.
|
|
26
|
+
* @returns The CancellationHeader component.
|
|
27
|
+
*/
|
|
5
28
|
declare function CancellationHeader(props: React.PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
6
29
|
declare namespace CancellationHeader {
|
|
7
30
|
var Accom: typeof HeaderAccom;
|
|
@@ -13,6 +13,29 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import HeaderAccom from './HeaderAccom';
|
|
14
14
|
import HeaderExcursion from './HeaderExcursion';
|
|
15
15
|
import HeaderTransfer from './HeaderExcursion/HeaderTransfer';
|
|
16
|
+
/**
|
|
17
|
+
* CancellationHeader is a component that allows the user to display the cancellation header.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <CancellationHeader>
|
|
21
|
+
* <CancellationHeader.Accom
|
|
22
|
+
* hotelName="Hotel Name"
|
|
23
|
+
* pax="8 pax"
|
|
24
|
+
* dates={['2024-01-01', '2024-01-02']}
|
|
25
|
+
* />
|
|
26
|
+
* <CancellationHeader.Excursion
|
|
27
|
+
* name="Excursion Name"
|
|
28
|
+
* date="2024-01-01"
|
|
29
|
+
* />
|
|
30
|
+
* <CancellationHeader.Transfer
|
|
31
|
+
* carName="Car Name"
|
|
32
|
+
* transferData={transferData}
|
|
33
|
+
* />
|
|
34
|
+
* </CancellationHeader>
|
|
35
|
+
*
|
|
36
|
+
* @param props - The props for the CancellationHeader component.
|
|
37
|
+
* @returns The CancellationHeader component.
|
|
38
|
+
*/
|
|
16
39
|
export default function CancellationHeader(props) {
|
|
17
40
|
return _jsx("div", __assign({ className: "cancellation-header" }, props));
|
|
18
41
|
}
|
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
import { TransferData } from './HeaderExcursion/HeaderTransfer';
|
|
2
2
|
export interface CancellationTransferProps {
|
|
3
|
+
/**
|
|
4
|
+
* The image of the cancellation transfer.
|
|
5
|
+
*/
|
|
3
6
|
image: string;
|
|
7
|
+
/**
|
|
8
|
+
* The car name of the cancellation transfer.
|
|
9
|
+
*/
|
|
4
10
|
carName: string;
|
|
11
|
+
/**
|
|
12
|
+
* The transfer data of the cancellation transfer.
|
|
13
|
+
*/
|
|
5
14
|
transferData: TransferData[];
|
|
6
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* CancellationTransfer is a component that allows the user to display the cancellation transfer.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <CancellationTransfer
|
|
21
|
+
* image="/images/transfer.png"
|
|
22
|
+
* carName="Car Name"
|
|
23
|
+
* transferData={transferData}
|
|
24
|
+
* />
|
|
25
|
+
*
|
|
26
|
+
* @param props - The props for the CancellationTransfer component.
|
|
27
|
+
* @returns The CancellationTransfer component.
|
|
28
|
+
*/
|
|
7
29
|
export default function CancellationTransfer(props: CancellationTransferProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,19 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import CancellationBody from './CancellationBody';
|
|
14
14
|
import CancellationHeader from './CancellationHeader';
|
|
15
15
|
import DetailsCancellationPolicy from './TabCancellationPolicy';
|
|
16
|
+
/**
|
|
17
|
+
* CancellationTransfer is a component that allows the user to display the cancellation transfer.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <CancellationTransfer
|
|
21
|
+
* image="/images/transfer.png"
|
|
22
|
+
* carName="Car Name"
|
|
23
|
+
* transferData={transferData}
|
|
24
|
+
* />
|
|
25
|
+
*
|
|
26
|
+
* @param props - The props for the CancellationTransfer component.
|
|
27
|
+
* @returns The CancellationTransfer component.
|
|
28
|
+
*/
|
|
16
29
|
export default function CancellationTransfer(props) {
|
|
17
30
|
var image = props.image, carName = props.carName, transferData = props.transferData;
|
|
18
31
|
return (_jsx(DetailsCancellationPolicy.Layout, __assign({ title: "Transfer", icon: "car", isOnRequest: false, image: image, header: _jsx(CancellationHeader, { children: _jsx(CancellationHeader.Transfer, { data: transferData }) }) }, { children: _jsx(CancellationBody, { children: _jsx(CancellationBody.Transfer, { carName: carName }) }) })));
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
export interface HeaderAccomProps {
|
|
2
|
+
/**
|
|
3
|
+
* The hotel name of the header accommodation.
|
|
4
|
+
*/
|
|
2
5
|
hotelName: string;
|
|
6
|
+
/**
|
|
7
|
+
* The pax of the header accommodation.
|
|
8
|
+
*/
|
|
3
9
|
pax: number | string;
|
|
10
|
+
/**
|
|
11
|
+
* The dates of the header accommodation.
|
|
12
|
+
*/
|
|
4
13
|
dates: string[];
|
|
5
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* HeaderAccom is a component that allows the user to display the header accommodation.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <HeaderAccom
|
|
20
|
+
* hotelName="Hotel Name"
|
|
21
|
+
* pax="8 pax"
|
|
22
|
+
* dates={['2024-01-01', '2024-01-02']}
|
|
23
|
+
* />
|
|
24
|
+
*
|
|
25
|
+
* @param props - The props for the HeaderAccom component.
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
6
28
|
export default function HeaderAccom(props: HeaderAccomProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,6 +14,19 @@ import useStays from '@/src/hooks/useStays';
|
|
|
14
14
|
import { DateDisplay } from '../../molecules/DateDisplay/DateDisplay';
|
|
15
15
|
import { ServiceTitle } from '../../molecules/ServiceTitle/ServiceTitle';
|
|
16
16
|
import TextWithIcon from '../../molecules/TextWithIcon/TextWithIcon';
|
|
17
|
+
/**
|
|
18
|
+
* HeaderAccom is a component that allows the user to display the header accommodation.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <HeaderAccom
|
|
22
|
+
* hotelName="Hotel Name"
|
|
23
|
+
* pax="8 pax"
|
|
24
|
+
* dates={['2024-01-01', '2024-01-02']}
|
|
25
|
+
* />
|
|
26
|
+
*
|
|
27
|
+
* @param props - The props for the HeaderAccom component.
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
17
30
|
export default function HeaderAccom(props) {
|
|
18
31
|
var hotelName = props.hotelName, pax = props.pax, dates = props.dates;
|
|
19
32
|
var stay = useStays(dates);
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
export interface HeaderExcursionProps {
|
|
2
|
+
/**
|
|
3
|
+
* The name of the header excursion.
|
|
4
|
+
*/
|
|
2
5
|
name: string;
|
|
6
|
+
/**
|
|
7
|
+
* The date of the header excursion.
|
|
8
|
+
*/
|
|
3
9
|
date: string;
|
|
4
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* HeaderExcursion is a component that allows the user to display the header excursion.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <HeaderExcursion
|
|
16
|
+
* name="Excursion Name"
|
|
17
|
+
* date="2024-01-01"
|
|
18
|
+
* />
|
|
19
|
+
*
|
|
20
|
+
* @param props - The props for the HeaderExcursion component.
|
|
21
|
+
* @returns The HeaderExcursion component.
|
|
22
|
+
*/
|
|
5
23
|
export default function HeaderExcursion(props: HeaderExcursionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { DateDisplay } from '../../molecules/DateDisplay/DateDisplay';
|
|
3
3
|
import { ServiceTitle } from '../../molecules/ServiceTitle/ServiceTitle';
|
|
4
|
+
/**
|
|
5
|
+
* HeaderExcursion is a component that allows the user to display the header excursion.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <HeaderExcursion
|
|
9
|
+
* name="Excursion Name"
|
|
10
|
+
* date="2024-01-01"
|
|
11
|
+
* />
|
|
12
|
+
*
|
|
13
|
+
* @param props - The props for the HeaderExcursion component.
|
|
14
|
+
* @returns The HeaderExcursion component.
|
|
15
|
+
*/
|
|
4
16
|
export default function HeaderExcursion(props) {
|
|
5
17
|
var name = props.name, date = props.date;
|
|
6
18
|
return (_jsxs("div", { children: [_jsx(ServiceTitle, { title: name, textSize: "sm" }), _jsx(DateDisplay, { dates: [date], arrowSize: "xs", calendarSize: "xs" })] }));
|
|
@@ -2081,6 +2081,13 @@
|
|
|
2081
2081
|
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
|
|
2082
2082
|
}
|
|
2083
2083
|
|
|
2084
|
+
|
|
2085
|
+
.policy-accom {
|
|
2086
|
+
.chip__label {
|
|
2087
|
+
column-gap: 1rem;
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2084
2091
|
.policy-accom__period {
|
|
2085
2092
|
display: inline-flex;
|
|
2086
2093
|
align-items: center;
|
|
@@ -10,6 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import Chip from '@/src/components/atoms/Chip/Chip';
|
|
13
14
|
import { Fragment } from 'react';
|
|
14
15
|
import { Text } from '../../../atoms/Typography/Typography';
|
|
15
16
|
import { DateDisplay } from '../../../molecules/DateDisplay/DateDisplay';
|
|
@@ -17,5 +18,5 @@ import TextWithIcon from '../../../molecules/TextWithIcon/TextWithIcon';
|
|
|
17
18
|
import './PolicyAccom.css';
|
|
18
19
|
export default function PolicyAccom(props) {
|
|
19
20
|
var roomName = props.roomName, policies = props.policies, index = props.index;
|
|
20
|
-
return (_jsxs("div", __assign({ className: "policy-accom" }, { children: [_jsxs("div", __assign({ className: "grid gap-y-1" }, { children: [_jsxs(TextWithIcon, __assign({ icon: "accom" }, { children: ["Room ", index !== undefined && index + 1] })), _jsx(Text, __assign({ size: "sm" }, { children: roomName }))] })), policies.map(function (policy, index) { return (_jsxs(Fragment, { children: [_jsxs(
|
|
21
|
+
return (_jsxs("div", __assign({ className: "policy-accom" }, { children: [_jsxs("div", __assign({ className: "grid gap-y-1" }, { children: [_jsxs(TextWithIcon, __assign({ icon: "accom" }, { children: ["Room ", index !== undefined && index + 1] })), _jsx(Text, __assign({ size: "sm" }, { children: roomName }))] })), policies.map(function (policy, index) { return (_jsxs(Fragment, { children: [_jsxs(Chip, __assign({ type: "outline", color: "brand", isBlackText: true }, { children: ["Policy period applies", ' ', _jsx(DateDisplay, { dates: [policy.ValidFrom, policy.ValidTo], textSize: "xs" })] })), _jsxs("div", __assign({ className: "space-y-2" }, { children: [_jsxs(Text, __assign({ variant: "bold", size: "xs", leading: "4" }, { children: [policy.Value, " % of total price"] })), _jsx(Text, __assign({ size: "xs", leading: "4" }, { children: policy.Description }))] }))] }, "policy-".concat(index))); })] })));
|
|
21
22
|
}
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
export interface PolicyExcursionProps {
|
|
2
|
+
/**
|
|
3
|
+
* The pick up point of the policy excursion.
|
|
4
|
+
*/
|
|
2
5
|
pickUpPoint: string;
|
|
6
|
+
/**
|
|
7
|
+
* The policies of the policy excursion.
|
|
8
|
+
*/
|
|
3
9
|
policies: string;
|
|
4
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* PolicyExcursion is a component that allows the user to display the policy excursion.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <PolicyExcursion
|
|
16
|
+
* pickUpPoint="Pick Up Point"
|
|
17
|
+
* policies="Policies"
|
|
18
|
+
* />
|
|
19
|
+
*
|
|
20
|
+
* @param props - The props for the PolicyExcursion component.
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
5
23
|
export default function PolicyExcursion(props: PolicyExcursionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,6 +11,18 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { Text } from '../../atoms/Typography/Typography';
|
|
14
|
+
/**
|
|
15
|
+
* PolicyExcursion is a component that allows the user to display the policy excursion.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* <PolicyExcursion
|
|
19
|
+
* pickUpPoint="Pick Up Point"
|
|
20
|
+
* policies="Policies"
|
|
21
|
+
* />
|
|
22
|
+
*
|
|
23
|
+
* @param props - The props for the PolicyExcursion component.
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
14
26
|
export default function PolicyExcursion(props) {
|
|
15
27
|
var pickUpPoint = props.pickUpPoint, policies = props.policies;
|
|
16
28
|
return (_jsxs("div", __assign({ className: "policy-excursion space-y-6" }, { children: [_jsxs("div", __assign({ className: "space-y-2" }, { children: [_jsx(Text, __assign({ variant: "bold", size: "xs", leading: "4" }, { children: "Pick-up point:" })), _jsx(Text, __assign({ size: "xs", leading: "4" }, { children: pickUpPoint }))] })), _jsx(Text, __assign({ size: "xs", leading: "4" }, { children: policies }))] })));
|