mautourco-components 0.2.29 → 0.2.31
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/Avatar/Avatar.js +1 -12
- package/dist/components/atoms/Button/Button.js +1 -12
- package/dist/components/atoms/Checkbox/Checkbox.js +2 -13
- package/dist/components/atoms/Chip/Chip.js +1 -12
- package/dist/components/atoms/Icon/icons/AccomIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/AirIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/ArrivalIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/ArrowDownOutlineIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/ArrowRightOutlineIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/BadgeAlertIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/BikeIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/BookingIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/Building2OutlineIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/BuildingIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/BusIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/Calendar2Icon.js +1 -12
- package/dist/components/atoms/Icon/icons/CalendarIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/CalendarOutlineIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/CalendarRangeOutlineIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/CarFront.js +1 -12
- package/dist/components/atoms/Icon/icons/CarIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/CatamaranIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/Check.js +1 -12
- package/dist/components/atoms/Icon/icons/CheckCircleIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/Chevron.js +1 -1
- package/dist/components/atoms/Icon/icons/ClockIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/Close.js +1 -12
- package/dist/components/atoms/Icon/icons/CloseCircleIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/DeleteIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/DepartureIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/EyeIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/FacebookIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/HomeIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/Info2Icon.d.ts +4 -0
- package/dist/components/atoms/Icon/icons/Info2Icon.js +25 -0
- package/dist/components/atoms/Icon/icons/InfoIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/Land.js +1 -12
- package/dist/components/atoms/Icon/icons/LineIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/LinkedInIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/LuggageIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/MapIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/MapPinIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/MautoucoLogo.d.ts +0 -1
- package/dist/components/atoms/Icon/icons/MautoucoLogo.js +1 -12
- package/dist/components/atoms/Icon/icons/MenuIcon.d.ts +0 -1
- package/dist/components/atoms/Icon/icons/MenuIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/MicroIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/MinusIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/MoreIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/MoreVerticalIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/NightIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/PlaneIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/PlaneLandingOutlineIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/PlaneTakeoffOutlineIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/PlusCircleIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/PlusIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/QuotationIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/SeaIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/Search.js +1 -12
- package/dist/components/atoms/Icon/icons/Settings.js +1 -12
- package/dist/components/atoms/Icon/icons/ShipIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/StopWatchIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/StrollerIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/TwitterIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/User.js +1 -12
- package/dist/components/atoms/Icon/icons/UserIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/Utensils.js +1 -12
- package/dist/components/atoms/Icon/icons/WalletIcon.js +1 -12
- package/dist/components/atoms/Icon/icons/Youtube.js +1 -12
- package/dist/components/atoms/Icon/icons/registry.d.ts +1 -0
- package/dist/components/atoms/Icon/icons/registry.js +2 -0
- package/dist/components/atoms/Illustration/illustrations.js +4 -4
- package/dist/components/atoms/Inputs/DropdownInput/DropdownInput.js +1 -12
- package/dist/components/atoms/Inputs/Input/Input.d.ts +2 -1
- package/dist/components/atoms/Inputs/Input/Input.js +2 -13
- package/dist/components/atoms/Link/Link.js +4 -15
- package/dist/components/atoms/RatingStar/RatingStar.js +2 -13
- package/dist/components/atoms/SegmentedButton/SegmentedButton.js +3 -14
- package/dist/components/atoms/SelectedValue/SelectedValue.js +1 -12
- package/dist/components/atoms/Slider/Slider.js +1 -12
- package/dist/components/atoms/Spinner/Spinner.js +1 -12
- package/dist/components/atoms/Tab/Tab.js +1 -1
- package/dist/components/atoms/Typography/Typography.js +2 -13
- package/dist/components/molecules/AccomodationDocket/AccomodationDocket.js +3 -14
- package/dist/components/molecules/ActionDropdown/ActionDropdown.d.ts +0 -1
- package/dist/components/molecules/ActionDropdown/ActionDropdown.js +5 -16
- package/dist/components/molecules/AddItemButton/AddItemButton.js +1 -12
- package/dist/components/molecules/BookingPax/BookingPaxAccom.js +3 -14
- package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.d.ts +0 -1
- package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.js +5 -5
- package/dist/components/molecules/BookingPax/BookingPaxExcursion.js +1 -12
- package/dist/components/molecules/BookingPax/BookingPaxHeader.js +2 -2
- package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.d.ts +0 -1
- package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.js +1 -12
- package/dist/components/molecules/BookingPax/BookingPaxRemarks.js +1 -12
- package/dist/components/molecules/BookingPax/BookingPaxTransfer.js +1 -12
- package/dist/components/molecules/BookingResume/BookingResumeLayout/BookingResumeLayout.js +1 -12
- package/dist/components/molecules/BookingResume/ResumeAccom/ResumeAccom.js +1 -12
- package/dist/components/molecules/BookingResume/ResumeExcursion/ResumeExcursion.js +1 -12
- package/dist/components/molecules/BookingResume/ResumeOtherService.js +1 -12
- package/dist/components/molecules/BookingResume/ResumeTransfer.js +1 -12
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +1 -12
- package/dist/components/molecules/Calendar/CalendarInput.js +2 -13
- package/dist/components/molecules/Calendar/DateTime.d.ts +9 -9
- package/dist/components/molecules/Calendar/DateTime.js +3 -3
- package/dist/components/molecules/Calendar/TimePicker.js +1 -12
- package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +4 -0
- package/dist/components/molecules/DateDisplay/DateDisplay.js +5 -18
- package/dist/components/molecules/DetailsInfo/DetailsAction.js +2 -13
- package/dist/components/molecules/DetailsInfo/DetailsAgency/DetailsAgency.js +1 -12
- package/dist/components/molecules/DetailsInfo/DetailsClient/DetailsClient.js +1 -12
- package/dist/components/molecules/DetailsInfo/DetailsFile.js +1 -12
- package/dist/components/molecules/DetailsInfo/DetailsInfo.d.ts +0 -1
- package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.css +50 -0
- package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.d.ts +2 -0
- package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.js +3 -13
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.d.ts +2 -1
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.js +2 -13
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.d.ts +2 -1
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.js +2 -13
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.d.ts +3 -2
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.js +14 -11
- package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.js +1 -12
- package/dist/components/molecules/DocketPrices/DocketPrices.js +1 -12
- package/dist/components/molecules/ExcursionDocket/ExcursionDocket.js +1 -12
- package/dist/components/molecules/FeatureRow/FeatureRow.js +1 -12
- package/dist/components/molecules/FromTo/FromTo.d.ts +0 -1
- package/dist/components/molecules/FromTo/FromTo.js +1 -12
- package/dist/components/molecules/GlobalAmenities/GlobalAmenities.js +1 -12
- package/dist/components/molecules/LocationDropdown/LocationDropdown.js +6 -17
- package/dist/components/molecules/MultiSelectDropdown/MultiSelectDropdown.d.ts +1 -0
- package/dist/components/molecules/MultiSelectDropdown/MultiSelectDropdown.js +23 -28
- package/dist/components/molecules/OtherServiceDocket/OtherServiceDocket.js +1 -12
- package/dist/components/molecules/Pagination/Pagination.js +4 -15
- package/dist/components/molecules/PaxChips/PaxChips.d.ts +11 -0
- package/dist/components/molecules/PaxChips/PaxChips.js +9 -0
- package/dist/components/molecules/PaxDisplay/PaxDisplay.d.ts +0 -1
- package/dist/components/molecules/PaxDisplay/PaxDisplay.js +5 -16
- package/dist/components/molecules/PriceDisplay/PriceDisplay.js +1 -12
- package/dist/components/molecules/RatingTab/RatingTab.js +1 -12
- package/dist/components/molecules/SectionTitle/SectionTitle.js +1 -12
- package/dist/components/molecules/ServiceInfo/ServiceInfo.js +2 -13
- package/dist/components/molecules/ServiceLanguages/ServiceLanguages.js +1 -12
- package/dist/components/molecules/ServiceSelector/ServiceSelector.js +4 -15
- package/dist/components/molecules/ServiceTitle/ServiceTitle.js +1 -12
- package/dist/components/molecules/Stepper/Stepper.js +1 -12
- package/dist/components/molecules/StepperTimeline/StepperTimeline.js +6 -17
- package/dist/components/molecules/TabGroup/TabGroup.js +1 -12
- package/dist/components/molecules/TableServiceItem/DetailsCol.js +1 -12
- package/dist/components/molecules/TableServiceItem/ItemCol.d.ts +0 -1
- package/dist/components/molecules/TableServiceItem/ItemCol.js +2 -13
- package/dist/components/molecules/TableServiceItem/RowOtherServices.js +1 -12
- package/dist/components/molecules/TableServiceItem/RowTransfer.js +1 -12
- package/dist/components/molecules/TableServiceItem/index.d.ts +0 -1
- package/dist/components/molecules/TextWithBorderBottom/TextWithBorderBottom.js +1 -1
- package/dist/components/molecules/TextWithIcon/TextWithIcon.d.ts +0 -1
- package/dist/components/molecules/TextWithIcon/TextWithIcon.js +1 -12
- package/dist/components/molecules/TimelineItem/ServiceAccommodation.js +1 -12
- package/dist/components/molecules/TimelineItem/ServiceExcursion.js +1 -12
- package/dist/components/molecules/TimelineItem/ServiceTransfer.js +1 -12
- package/dist/components/molecules/TimelineItem/TimelineHeader.js +1 -12
- package/dist/components/molecules/TimelineItem/TimelineItem.d.ts +0 -1
- package/dist/components/molecules/TimelineItem/TimelineItem.js +1 -12
- package/dist/components/molecules/Toast/Toast.css +2107 -0
- package/dist/components/molecules/Toast/Toast.d.ts +2 -2
- package/dist/components/molecules/Toast/Toast.js +1 -12
- package/dist/components/molecules/TooltipDisplay/TooltipDisplay.js +1 -12
- package/dist/components/molecules/TransferDocket/TransferDocket.js +2 -13
- package/dist/components/molecules/UserCard/UserCard.js +3 -14
- package/dist/components/organisms/Booking/BookingDocket/BookingDocket.d.ts +0 -1
- package/dist/components/organisms/Booking/BookingDocket/BookingDocket.js +1 -1
- package/dist/components/organisms/Booking/BookingHeader.js +1 -12
- package/dist/components/organisms/Booking/BookingStep/BookingStep.js +1 -12
- package/dist/components/organisms/CarBookingCard/CarBookingCard.js +2 -2
- package/dist/components/organisms/CarBookingCard/CarBookingCardSkeleton.js +1 -12
- package/dist/components/organisms/CardContainer/CardContainer.js +1 -12
- package/dist/components/organisms/DateTimePicker/DateTimePicker.js +1 -12
- package/dist/components/organisms/Dialog/Dialog.js +3 -15
- package/dist/components/organisms/DialogBookingAddItem/AddItemNewService.d.ts +16 -0
- package/dist/components/organisms/DialogBookingAddItem/AddItemNewService.js +44 -0
- package/dist/components/organisms/DialogBookingAddItem/AddItemSelector.d.ts +8 -0
- package/dist/components/organisms/DialogBookingAddItem/AddItemSelector.js +12 -0
- package/dist/components/organisms/DialogBookingAddItem/DialogBookingAddItem.d.ts +17 -0
- package/dist/components/organisms/DialogBookingAddItem/DialogBookingAddItem.js +55 -0
- package/dist/components/organisms/DialogBookingAddItem/index.d.ts +3 -0
- package/dist/components/organisms/DialogBookingAddItem/index.js +3 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.d.ts +2 -2
- package/dist/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.js +1 -12
- package/dist/components/organisms/DialogBookingConfirm/BookingMailSent.js +1 -12
- package/dist/components/organisms/DialogBookingConfirm/BookingReference.js +1 -12
- package/dist/components/organisms/DialogBookingConfirm/BookingSuccess.js +1 -12
- package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.d.ts +4 -0
- package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.js +2 -13
- package/dist/components/organisms/DialogCancelService/CancelBooking/CancelBooking.css +2117 -0
- package/dist/components/organisms/DialogCancelService/CancelBooking/CancelBooking.d.ts +16 -0
- package/dist/components/organisms/DialogCancelService/CancelBooking/CancelBooking.js +28 -0
- package/dist/components/organisms/DialogCancelService/CancelPolicy.d.ts +29 -0
- package/dist/components/organisms/DialogCancelService/CancelPolicy.js +8 -0
- package/dist/components/organisms/DialogCancelService/ConfirmDelete/ConfirmDelete.css +2143 -0
- package/dist/components/organisms/DialogCancelService/ConfirmDelete/ConfirmDelete.d.ts +14 -0
- package/dist/components/organisms/DialogCancelService/ConfirmDelete/ConfirmDelete.js +24 -0
- package/dist/components/organisms/DialogCancelService/DialogCancelService.d.ts +15 -0
- package/dist/components/organisms/DialogCancelService/DialogCancelService.js +14 -0
- package/dist/components/organisms/DialogCancelService/FromList.d.ts +12 -0
- package/dist/components/organisms/DialogCancelService/FromList.js +18 -0
- package/dist/components/organisms/DialogCancelService/index.d.ts +5 -0
- package/dist/components/organisms/DialogCancelService/index.js +1 -0
- package/dist/components/organisms/DialogComparison/DialogComparison.css +2116 -0
- package/dist/components/organisms/DialogComparison/DialogComparison.d.ts +24 -0
- package/dist/components/organisms/DialogComparison/DialogComparison.js +69 -0
- package/dist/components/organisms/DialogDeleteConfirm/DialogDeleteConfirm.d.ts +14 -0
- package/dist/components/organisms/DialogDeleteConfirm/DialogDeleteConfirm.js +11 -0
- package/dist/components/organisms/DialogSendingMail/DialogSendingMail.d.ts +11 -0
- package/dist/components/organisms/DialogSendingMail/DialogSendingMail.js +8 -0
- package/dist/components/organisms/DialogSendingMail/DialogSendingMailContent.d.ts +15 -0
- package/dist/components/organisms/DialogSendingMail/DialogSendingMailContent.js +49 -0
- package/dist/components/organisms/DialogSendingMail/index.d.ts +4 -0
- package/dist/components/organisms/DialogSendingMail/index.js +2 -0
- package/dist/components/organisms/DialogSendingMail/sending-mail-schema.d.ts +7 -0
- package/dist/components/organisms/DialogSendingMail/sending-mail-schema.js +16 -0
- package/dist/components/organisms/Docket/Docket.js +8 -19
- package/dist/components/organisms/Footer/Footer.js +3 -14
- package/dist/components/organisms/MultipleQuotationDocket/MultipleQuotationDocket.js +2 -13
- package/dist/components/organisms/PaxSelector/PaxSelector.js +22 -22
- package/dist/components/organisms/QuoteHeader/QuoteHeader.js +2 -13
- package/dist/components/organisms/RoundTrip/RoundTrip.js +1 -1
- package/dist/components/organisms/SearchBarTransfer/SearchBarTransfer.js +5 -5
- package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.js +1 -12
- package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.js +1 -12
- package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.d.ts +0 -1
- package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.js +1 -12
- package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.js +1 -12
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion/HeaderTransfer.js +1 -12
- package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.js +1 -12
- package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.js +1 -12
- package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.js +1 -12
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.d.ts +0 -1
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicyLayout/TabCancellationPolicyLayout.js +1 -12
- package/dist/components/organisms/TabServiceDetails/Accommodation.js +1 -1
- package/dist/components/organisms/TabServiceDetails/DetailContentTransfer.js +1 -12
- package/dist/components/organisms/TabServiceDetails/DetailsContentAccom.js +2 -2
- package/dist/components/organisms/TabServiceDetails/DetailsContentExcursion.js +1 -12
- package/dist/components/organisms/TabServiceDetails/Excursion.js +1 -1
- package/dist/components/organisms/TabServiceDetails/TabServiceDetails.d.ts +0 -1
- package/dist/components/organisms/TabServiceDetails/TabServiceDetailsLayout/TabServiceDetailsLayout.js +1 -12
- package/dist/components/organisms/TabServiceDetails/Transfer.js +1 -1
- package/dist/components/organisms/Table/Table.css +48 -32
- package/dist/components/organisms/Table/Table.d.ts +4 -1
- package/dist/components/organisms/Table/Table.js +19 -16
- package/dist/components/organisms/Table/TableCell.d.ts +3 -2
- package/dist/components/organisms/Table/TableCell.js +2 -13
- package/dist/components/organisms/Table/columns/booking-cancel-service-columns.d.ts +5 -0
- package/dist/components/organisms/Table/columns/booking-cancel-service-columns.js +166 -0
- package/dist/components/organisms/Table/columns/booking-columns.js +7 -22
- package/dist/components/organisms/Table/columns/comparison-columns.d.ts +3 -0
- package/dist/components/organisms/Table/columns/comparison-columns.js +97 -0
- package/dist/components/organisms/Table/columns/detail-resume-columns.d.ts +3 -1
- package/dist/components/organisms/Table/columns/detail-resume-columns.js +20 -33
- package/dist/components/organisms/Table/columns/index.d.ts +13 -4
- package/dist/components/organisms/Table/columns/index.js +4 -0
- package/dist/components/organisms/Table/columns/quotation-columns.d.ts +4 -1
- package/dist/components/organisms/Table/columns/quotation-columns.js +10 -19
- package/dist/components/organisms/Timeline/Timeline.js +1 -1
- package/dist/components/organisms/TopNavigation/DesktopNav.d.ts +0 -1
- package/dist/components/organisms/TopNavigation/DesktopNav.js +5 -16
- package/dist/components/organisms/TopNavigation/MobileNav.js +9 -20
- package/dist/components/organisms/TransferLine/TransferLine.js +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/calendar.js +2 -2
- package/dist/components/ui/form.d.ts +24 -0
- package/dist/components/ui/form.js +79 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.js +30 -0
- package/dist/hooks/useBookingPax.d.ts +1 -1
- package/dist/index.d.ts +26 -15
- package/dist/index.js +10 -2
- package/dist/lib/price-formatter.d.ts +1 -0
- package/dist/lib/price-formatter.js +13 -0
- package/dist/lib/shared-constant.d.ts +1 -0
- package/dist/lib/shared-constant.js +1 -0
- package/dist/lib/utils.d.ts +1 -2
- package/dist/lib/utils.js +1 -1
- package/dist/styles/tokens/tokens.d.ts +464 -464
- package/package.json +7 -3
- package/src/components/atoms/Icon/icons/Info2Icon.tsx +42 -0
- package/src/components/atoms/Icon/icons/registry.tsx +2 -0
- package/src/components/atoms/Inputs/Input/Input.tsx +4 -2
- package/src/components/molecules/Calendar/DateTime.tsx +6 -4
- package/src/components/molecules/DateDisplay/DateDisplay.tsx +7 -7
- package/src/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.css +27 -0
- package/src/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.tsx +12 -1
- package/src/components/molecules/DialogContentPolicy/DialogCancellationAccom.tsx +9 -2
- package/src/components/molecules/DialogContentPolicy/DialogCancellationExcursion.tsx +10 -2
- package/src/components/molecules/DialogContentPolicy/DialogCancellationList.tsx +22 -15
- package/src/components/molecules/DialogContentPolicy/DialogContentPolicy.tsx +1 -1
- package/src/components/molecules/MultiSelectDropdown/MultiSelectDropdown.tsx +117 -82
- package/src/components/molecules/PaxChips/PaxChips.tsx +30 -0
- package/src/components/molecules/TextWithIcon/TextWithIcon.tsx +2 -2
- package/src/components/molecules/Toast/Toast.css +27 -0
- package/src/components/molecules/Toast/Toast.tsx +9 -9
- package/src/components/organisms/Dialog/Dialog.tsx +85 -64
- package/src/components/organisms/{BookingAddItem → DialogBookingAddItem}/AddItemNewService.tsx +17 -2
- package/src/components/organisms/{BookingAddItem/BookingAddItem.tsx → DialogBookingAddItem/DialogBookingAddItem.tsx} +6 -6
- package/src/components/organisms/{BookingAddItem → DialogBookingAddItem}/index.ts +1 -1
- package/src/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.tsx +2 -2
- package/src/components/organisms/DialogBookingConfirm/DialogBookingConfirm.tsx +14 -2
- package/src/components/organisms/DialogCancelService/CancelBooking/CancelBooking.css +24 -0
- package/src/components/organisms/DialogCancelService/CancelBooking/CancelBooking.tsx +98 -0
- package/src/components/organisms/DialogCancelService/CancelPolicy.tsx +68 -0
- package/src/components/organisms/DialogCancelService/ConfirmDelete/ConfirmDelete.css +56 -0
- package/src/components/organisms/DialogCancelService/ConfirmDelete/ConfirmDelete.tsx +67 -0
- package/src/components/organisms/DialogCancelService/DialogCancelService.tsx +32 -0
- package/src/components/organisms/DialogCancelService/FromList.tsx +50 -0
- package/src/components/organisms/DialogCancelService/index.ts +6 -0
- package/src/components/organisms/DialogComparison/DialogComparison.css +23 -0
- package/src/components/organisms/DialogComparison/DialogComparison.tsx +157 -0
- package/src/components/organisms/DialogDeleteConfirm/DialogDeleteConfirm.tsx +57 -0
- package/src/components/organisms/DialogSendingMail/DialogSendingMail.tsx +27 -0
- package/src/components/organisms/DialogSendingMail/DialogSendingMailContent.tsx +115 -0
- package/src/components/organisms/DialogSendingMail/index.ts +5 -0
- package/src/components/organisms/DialogSendingMail/sending-mail-schema.ts +19 -0
- package/src/components/organisms/Table/Table.css +48 -32
- package/src/components/organisms/Table/Table.tsx +30 -6
- package/src/components/organisms/Table/TableCell.tsx +8 -4
- package/src/components/organisms/Table/columns/booking-cancel-service-columns.tsx +226 -0
- package/src/components/organisms/Table/columns/booking-columns.tsx +2 -19
- package/src/components/organisms/Table/columns/comparison-columns.tsx +140 -0
- package/src/components/organisms/Table/columns/detail-resume-columns.tsx +35 -37
- package/src/components/organisms/Table/columns/index.ts +4 -0
- package/src/components/organisms/Table/columns/quotation-columns.tsx +17 -9
- package/src/components/ui/form.tsx +160 -0
- package/src/components/ui/label.tsx +22 -0
- /package/src/components/organisms/{BookingAddItem → DialogBookingAddItem}/AddItemSelector.tsx +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '../../../styles/components/molecule/toast.css';
|
|
3
|
-
import {
|
|
3
|
+
import { IconName } from '../../atoms/Icon/icons/registry';
|
|
4
4
|
export type ToastType = 'informational' | 'success' | 'warning' | 'danger';
|
|
5
5
|
export interface ToastProps {
|
|
6
6
|
/** Toast message text */
|
|
@@ -10,7 +10,7 @@ export interface ToastProps {
|
|
|
10
10
|
/** Additional CSS classes */
|
|
11
11
|
className?: string;
|
|
12
12
|
/** Icon name */
|
|
13
|
-
iconName?:
|
|
13
|
+
iconName?: IconName;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Toast component - A brief, auto-dismissing message that appears to notify the user.
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import '../../../styles/components/molecule/toast.css';
|
|
14
3
|
import Icon from '../../atoms/Icon/Icon';
|
|
@@ -24,6 +13,6 @@ import { Text } from '../../atoms/Typography/Typography';
|
|
|
24
13
|
*/
|
|
25
14
|
var Toast = function (_a) {
|
|
26
15
|
var text = _a.text, _b = _a.type, type = _b === void 0 ? 'informational' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, _d = _a.iconName, iconName = _d === void 0 ? 'badge-alert' : _d;
|
|
27
|
-
return (_jsx("div",
|
|
16
|
+
return (_jsx("div", { className: "toast toast--".concat(type, " ").concat(className).trim(), children: _jsxs("div", { className: "toast__container", children: [_jsx("div", { className: "toast__icon-wrapper", children: _jsx(Icon, { name: iconName, size: "md", className: "toast__icon" }) }), _jsx(Text, { size: "sm", variant: "bold", leading: "5", className: "toast__text", children: text })] }) }));
|
|
28
17
|
};
|
|
29
18
|
export default Toast;
|
|
@@ -1,18 +1,7 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { Text } from '../../atoms/Typography/Typography';
|
|
14
3
|
import { Tooltip, TooltipContent, TooltipTrigger } from '../../ui/tooltip';
|
|
15
4
|
export var TooltipDisplay = function (props) {
|
|
16
5
|
var children = props.children, content = props.content, _a = props.side, side = _a === void 0 ? 'right' : _a, _b = props.maxWidth, maxWidth = _b === void 0 ? '300px' : _b;
|
|
17
|
-
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger,
|
|
6
|
+
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { className: "text-[var(--color-icon-branded)]", asChild: true, children: children }), _jsx(TooltipContent, { className: "max-w-[".concat(maxWidth, "]"), side: side, style: { maxWidth: maxWidth }, children: _jsx(Text, { variant: "medium", size: "sm", className: "!text-white", children: content }) })] }));
|
|
18
7
|
};
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import React from 'react';
|
|
14
3
|
import Button from '../../atoms/Button/Button';
|
|
@@ -53,8 +42,8 @@ export var TransferDocket = function (_a) {
|
|
|
53
42
|
if (childGroups.length === 0) {
|
|
54
43
|
return null;
|
|
55
44
|
}
|
|
56
|
-
return (_jsx("div",
|
|
45
|
+
return (_jsx("div", { className: "transfer-docket__children", children: childGroups.map(function (group, index) { return (_jsxs(React.Fragment, { children: [index > 0 && _jsx("div", { className: "transfer-docket__divider-vertical" }), _jsxs("span", { className: "transfer-docket__child-info", children: [_jsxs(Text, { size: "sm", variant: "medium", color: "default", children: [group.count, " Child", group.count > 1 ? 'ren' : ''] }), group.age > 0 ? (_jsxs(Text, { size: "sm", variant: "medium", className: "transfer-docket__child-age", children: [' ', "(", group.age, " y.o)"] })) : null] })] }, "child-".concat(index))); }) }));
|
|
57
46
|
};
|
|
58
|
-
return (_jsxs("div",
|
|
47
|
+
return (_jsxs("div", { className: "transfer-docket", children: [_jsxs("div", { className: "transfer-docket__header", children: [_jsxs("div", { className: "transfer-docket__title-section", children: [_jsx("div", { className: "transfer-docket__title-bar" }), _jsx(Icon, { name: "bus", size: "sm" }), _jsx(Text, { variant: "bold", size: "sm", color: "accent", children: "Transfer" })] }), removeMode ? (_jsx(Button, { variant: "destructive", size: "sm", leadingIcon: "close", onClick: onRemove, className: "transfer-docket__remove-button", children: "Remove" })) : (TotalPrice && Currency && _jsx(PriceDisplay, { currency: Currency, price: TotalPrice }))] }), _jsxs("div", { className: "transfer-docket__details", children: [TransferDate && (_jsx(DateDisplay, { date: TransferDate, calendarSize: "sm", textSize: "sm", colorMode: "green" })), (LocationFromName || LocationToName) && (_jsxs("div", { className: "transfer-docket__transfer-point", children: [_jsx(Text, { variant: "medium", size: "sm", color: "subtle", leading: "none", children: LocationFromName || 'From' }), _jsx(Icon, { name: "arrow-down-outline", size: "sm" }), _jsx(Text, { variant: "medium", size: "sm", color: "subtle", leading: "none", children: LocationToName || 'To' })] })), _jsxs("div", { className: "transfer-docket__guests", children: [AdultCount !== undefined && AdultCount > 0 && (_jsxs(TextWithIcon, { icon: "user", textSize: "sm", color: "subtle", children: [AdultCount, " Adult", AdultCount > 1 ? 's' : ''] })), ((ChildCount && ChildCount > 0) || (TeenCount && TeenCount > 0)) ? (_jsxs("div", { className: "transfer-docket__children-wrapper", children: [_jsx(Icon, { name: "user", size: "sm", color: "var(--color-text-subtle, #303642)" }), formatChildrenInfo()] })) : null] }), VehicleTypeName && (_jsx(TextWithIcon, { icon: "car", textSize: "sm", color: "subtle", textLeading: "none", children: VehicleTypeName }))] })] }));
|
|
59
48
|
};
|
|
60
49
|
export default TransferDocket;
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
2
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
14
3
|
import { Avatar } from "../../atoms/Avatar/Avatar";
|
|
@@ -50,8 +39,8 @@ export var UserCard = function (_a) {
|
|
|
50
39
|
setOpen(false);
|
|
51
40
|
setQuery("");
|
|
52
41
|
};
|
|
53
|
-
return (_jsxs("div",
|
|
42
|
+
return (_jsxs("div", { ref: rootRef, className: "relative inline-flex items-center gap-3 ".concat(className, " ").concat(user.isAdmin ? "cursor-pointer rounded-[11px] border border-[#D9D9D9] bg-white px-[13px] py-2" : ""), children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Avatar, { name: user.name, size: "md", shape: "circle" }), _jsxs("div", { className: "flex flex-col leading-tight", children: [_jsxs("div", { className: "text-[13px] text-muted-foreground", children: ["Welcome back,", " ", _jsx("span", { className: "font-medium text-foreground", children: user.name }), " ", _jsx("span", { "aria-hidden": true, children: "\uD83D\uDC4B" })] }), _jsx("div", { className: "text-[13px] font-semibold text-foreground", children: selectedAgency ? selectedAgency.name : user.agency })] })] }), user.isAdmin && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", "aria-expanded": open, "aria-haspopup": "listbox", onClick: function () { return setOpen(function (v) { return !v; }); }, className: "inline-flex h-8 w-8 items-center justify-center rounded-lg bg-teal-600 text-white shadow-[0_2px_6px_rgba(0,0,0,0.15)] outline-none focus-visible:ring-2 focus-visible:ring-teal-300", title: "Open agency selector", children: _jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", "aria-hidden": "true", className: "transition-transform ".concat(open ? "rotate-180" : ""), children: _jsx("path", { d: "M6 9l6 6 6-6", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), open && (_jsxs("div", { className: "absolute right-0 top-12 z-50 w-[340px] rounded-2xl border border-black/5 bg-white p-3 shadow-[0_12px_30px_rgba(0,0,0,0.15)]", children: [_jsxs("div", { className: "relative mb-3", children: [_jsx("input", { ref: searchRef, value: query, onChange: function (e) { return setQuery(e.target.value); }, placeholder: "Search", className: "w-full rounded-xl border border-black/10 bg-white px-10 py-2 text-sm outline-none focus:border-black/20 shadow-[inset_0_1px_2px_rgba(0,0,0,0.06)]" }), _jsx("div", { className: "absolute -translate-y-1/2 pointer-events-none left-3 top-1/2", children: _jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", children: _jsx("path", { d: "M21 21l-4.3-4.3M10.5 18a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15z", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }) }) })] }), _jsxs("ul", { role: "listbox", className: "pr-1 overflow-auto max-h-64", children: [filteredAgencies.map(function (a) {
|
|
54
43
|
var isActive = (selectedAgency === null || selectedAgency === void 0 ? void 0 : selectedAgency.id) === a.id;
|
|
55
|
-
return (_jsx("li", { children: _jsxs("button",
|
|
56
|
-
}), filteredAgencies.length === 0 && (_jsx("li",
|
|
44
|
+
return (_jsx("li", { children: _jsxs("button", { type: "button", onClick: function () { return handleSelect(a); }, className: "flex w-full items-center justify-between gap-3 rounded-lg px-2 py-2 text-left hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-teal-300 ".concat(isActive ? "bg-black/[0.04]" : ""), "aria-selected": isActive, role: "option", children: [_jsx("span", { className: "text-[14px]", children: a.name }), _jsx("span", { className: "text-[13px] font-semibold", children: a.localisation })] }) }, a.id));
|
|
45
|
+
}), filteredAgencies.length === 0 && (_jsx("li", { className: "px-2 py-6 text-sm text-center text-muted-foreground", children: "No results" }))] })] }))] }))] }));
|
|
57
46
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ResumeAccomProps, ResumeExcursionProps, ResumeOtherServiceProps, ResumeTransferProps } from '@/src/components/molecules/BookingResume';
|
|
3
2
|
import './BookingDocket.css';
|
|
4
3
|
export type BookingResumeData = ResumeAccomProps | ResumeTransferProps | ResumeExcursionProps | ResumeOtherServiceProps;
|
|
@@ -40,5 +40,5 @@ export var BookingDocket = function (props) {
|
|
|
40
40
|
setIsBookingOpen(true);
|
|
41
41
|
}
|
|
42
42
|
}, [isBookingOpen, resumes, isDesktop]);
|
|
43
|
-
return (_jsx(LazyMotion,
|
|
43
|
+
return (_jsx(LazyMotion, { features: domAnimation, children: _jsxs("div", { className: "booking-docket__container", children: [!isDesktop && !isBookingOpen && (_jsx("div", { className: "flex justify-end mb-4", children: _jsxs(motion.button, { className: "booking-docket__mobile-button", onClick: handleBookingOpen, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.3 }, children: [_jsx(Icon, { name: "booking", size: "lg" }), _jsx(Text, { size: "lg", as: "span", variant: "bold", children: "Your booking" }), _jsx(Icon, { name: "eye", size: "lg" })] }, "booking-open") })), _jsx(AnimatePresence, { initial: false, children: isBookingOpen && (_jsx(motion.div, { className: "booking-docket", initial: { height: 0, opacity: 0 }, animate: { height: height, opacity: 1 }, exit: { height: 0 }, children: _jsxs("div", { ref: contentRef, children: [_jsxs("div", { className: "booking-docket__content", children: [_jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx(Heading, { level: 6, color: "accent", as: "h2", children: "Your Booking" }), _jsx("img", { src: "/images/mautourco-logo.png", alt: "Mautourco Logo", width: 150 })] }), _jsxs("div", { className: "flex gap-x-4 items-center", children: [_jsx(Text, { variant: "bold", size: "lg", children: "Booking file date range :" }), _jsx(DateDisplay, { dates: dates })] })] }), _jsx(BookingResume, { children: resumes.map(function (resume, index) { return (_jsxs("div", { children: [resume.type === 'accommodation' && (_jsx(BookingResume.Accommodation, __assign({}, resume.data))), resume.type === 'transfer' && (_jsx(BookingResume.Transfer, __assign({}, resume.data))), resume.type === 'excursion' && (_jsx(BookingResume.Excursion, __assign({}, resume.data))), resume.type === 'otherService' && (_jsx(BookingResume.OtherService, __assign({}, resume.data)))] }, index)); }) })] }), _jsx("img", { src: "/images/svg/resume-bottom-bg.svg", alt: "bottom background", className: "booking-docket__bg" })] }) }, "booking-docket")) }), !isDesktop && isBookingOpen && (_jsx("div", { className: "flex justify-end mt-10", children: _jsxs(motion.button, { className: "booking-docket__mobile-button", onClick: handleBookingOpen, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.3 }, children: [_jsx(Text, { size: "lg", as: "span", variant: "bold", children: "Close" }), _jsx(Icon, { name: "close-circle", size: "lg" })] }, "booking-close") }))] }) }));
|
|
44
44
|
};
|
|
@@ -1,17 +1,6 @@
|
|
|
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
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { Heading, Text } from '../../atoms/Typography/Typography';
|
|
14
3
|
export var BookingHeader = function (props) {
|
|
15
4
|
var fileNumber = props.fileNumber, reference = props.reference, isBooking = props.isBooking, location = props.location;
|
|
16
|
-
return (_jsxs("div",
|
|
5
|
+
return (_jsxs("div", { className: "space-y-2", children: [_jsxs(Text, { color: "light", children: ["File number: ", fileNumber] }), _jsxs(Heading, { level: 6, as: "h1", color: "brand", children: [isBooking ? 'Booking' : 'Quotation', ": N\u00B0 ", reference] }), _jsx(Text, { color: "accent", size: "xl", children: location })] }));
|
|
17
6
|
};
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import Button from '../../../atoms/Button/Button';
|
|
14
3
|
import { StepperTimeline, } from '../../../molecules/StepperTimeline/StepperTimeline';
|
|
@@ -29,5 +18,5 @@ export var BookingStep = function (props) {
|
|
|
29
18
|
useEffect(function () {
|
|
30
19
|
setCurrentIndex(currentStep ? currentStep - 1 : 0);
|
|
31
20
|
}, [currentStep]);
|
|
32
|
-
return (_jsxs("div",
|
|
21
|
+
return (_jsxs("div", { className: "booking-step", children: [_jsx(StepperTimeline, { steps: steps, className: className, currentIndex: currentIndex, onChange: handleStepChange }), _jsx(Button, { trailingIcon: "arrow-right-outline", variant: "secondary", className: "w-[189px]", disabled: nextDisabled, onClick: handleNextClick, children: currentIndex === steps.length - 1 ? 'Confirm' : 'Next' })] }));
|
|
33
22
|
};
|
|
@@ -32,9 +32,9 @@ var CarBookingCard = function (_a) {
|
|
|
32
32
|
]
|
|
33
33
|
.filter(Boolean)
|
|
34
34
|
.join(' ');
|
|
35
|
-
return (_jsxs("article",
|
|
35
|
+
return (_jsxs("article", { className: classes, children: [_jsx("div", { className: "car-booking-card__image-wrap", children: _jsx("img", { className: "car-booking-card__image", src: imageSrc, alt: "" }) }), _jsx("div", { className: "car-booking-card__active-divider" }), _jsxs("div", { className: "car-booking-card__body", children: [priceRows.length > 0 && !readonly && (_jsxs("section", { className: "car-booking-card__section car-booking-card__section--price", children: [_jsx(Divider, { variant: "dashed", className: "car-booking-card__dashed-divider" }), _jsxs("div", { className: "car-booking-card__price-content", children: [_jsx(Text, { as: "h3", size: "md", variant: "bold", leading: "none", color: "default", className: "car-booking-card__section-title", children: priceTitle }), _jsx("div", { className: "car-booking-card__price-rows", children: priceRows.map(function (row, idx) { return (_jsxs("div", { className: "car-booking-card__price-row", children: [_jsx(Text, { size: "sm", leading: "5", variant: "regular", color: "subtle", className: "car-booking-card__price-label", children: row.label }), _jsx(Text, { size: "sm", leading: "5", variant: "bold", color: "subtle", className: "car-booking-card__price-value", children: row.value })] }, "".concat(row.label, "-").concat(idx))); }) })] }), _jsx(Divider, { variant: "dashed", className: "car-booking-card__dashed-divider" })] })), _jsxs("section", { className: "car-booking-card__section car-booking-card__section--content", children: [_jsxs("div", { className: "car-booking-card__title", children: [_jsx("span", { className: "car-booking-card__title-marker", "aria-hidden": "true" }), _jsx(Heading, { level: 4, variant: "bold", color: "accent", className: "car-booking-card__title-text", children: title })] }), _jsx("div", { className: "car-booking-card__features", children: features.map(function (feature, idx) {
|
|
36
36
|
var _a;
|
|
37
37
|
return (_jsx(FeatureRow, __assign({}, feature, { className: "car-booking-card__feature-row ".concat((_a = feature.className) !== null && _a !== void 0 ? _a : '').trim() }), "".concat(feature.label, "-").concat(idx)));
|
|
38
|
-
}) })
|
|
38
|
+
}) }), infoText && !readonly && (_jsxs("div", { className: "car-booking-card__info", children: [_jsx("span", { className: "car-booking-card__info-icon", "aria-hidden": "true", children: "i" }), _jsx(Text, { size: "sm", leading: "5", variant: "regular", color: "default", className: "car-booking-card__info-text", children: infoText })] }))] }), resolvedShowSupplement && !readonly && (_jsxs("section", { className: "car-booking-card__section car-booking-card__section--supplement", children: [_jsx(Divider, { variant: "dashed", className: "car-booking-card__dashed-divider" }), _jsxs("div", { className: "car-booking-card__supplement-header", children: [_jsx(Text, { as: "h3", size: "md", variant: "bold", leading: "none", color: "default", className: "car-booking-card__section-title", children: supplementLabel }), supplementMessage && (_jsx(Text, { as: "p", size: "sm", leading: "5", variant: "regular", className: "car-booking-card__supplement-message", children: supplementMessage }))] }), readonly ? (_jsx(Text, { size: "sm", leading: "5", variant: "regular", color: supplementValue ? "default" : "subtle", className: "car-booking-card__supplement-value", children: supplementValue || supplementPlaceholder })) : (_jsx(DropdownInput, { placeholder: supplementPlaceholder, value: supplementValue, state: resolvedSupplementState, options: supplementOptions, onSelect: onSupplementSelect }))] })), !readonly && _jsxs("footer", { className: "car-booking-card__footer", children: [_jsxs("div", { className: "car-booking-card__total", children: [_jsx(Text, { size: "sm", variant: "bold", color: "accent", className: "car-booking-card__total-price", children: totalPrice }), _jsx(Text, { size: "sm", variant: "regular", color: "subtle", className: "car-booking-card__total-label", children: totalPriceLabel })] }), !readonly && (_jsx(Button, __assign({ variant: "primary", size: "sm" }, ctaButtonProps, { onClick: onCtaClick, className: "car-booking-card__cta ".concat((_b = ctaButtonProps === null || ctaButtonProps === void 0 ? void 0 : ctaButtonProps.className) !== null && _b !== void 0 ? _b : '').trim(), children: ctaLabel })))] })] })] }));
|
|
39
39
|
};
|
|
40
40
|
export default CarBookingCard;
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
2
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
3
|
if (ar || !(i in from)) {
|
|
@@ -30,6 +19,6 @@ var CarBookingCardSkeleton = function (_a) {
|
|
|
30
19
|
]
|
|
31
20
|
.filter(Boolean)
|
|
32
21
|
.join(' ');
|
|
33
|
-
return (_jsxs("article",
|
|
22
|
+
return (_jsxs("article", { className: classes, children: [_jsx("div", { className: "car-booking-card-skeleton__image-wrap", children: _jsx("div", { className: "car-booking-card-skeleton__image" }) }), _jsx("div", { className: "car-booking-card-skeleton__active-divider" }), _jsxs("div", { className: "car-booking-card-skeleton__body", children: [showPriceBreakdown && (_jsxs("section", { className: "car-booking-card-skeleton__section car-booking-card-skeleton__section--price", children: [_jsx("div", { className: "car-booking-card-skeleton__divider" }), _jsxs("div", { className: "car-booking-card-skeleton__price-content", children: [_jsx("div", { className: "car-booking-card-skeleton__section-title" }), _jsx("div", { className: "car-booking-card-skeleton__price-rows", children: __spreadArray([], Array(priceRowsCount), true).map(function (_, idx) { return (_jsxs("div", { className: "car-booking-card-skeleton__price-row", children: [_jsx("div", { className: "car-booking-card-skeleton__price-label" }), _jsx("div", { className: "car-booking-card-skeleton__price-value" })] }, "price-row-".concat(idx))); }) })] }), _jsx("div", { className: "car-booking-card-skeleton__divider" })] })), _jsxs("section", { className: "car-booking-card-skeleton__section car-booking-card-skeleton__section--content", children: [_jsxs("div", { className: "car-booking-card-skeleton__title", children: [_jsx("span", { className: "car-booking-card-skeleton__title-marker", "aria-hidden": "true" }), _jsx("div", { className: "car-booking-card-skeleton__title-text" })] }), _jsx("div", { className: "car-booking-card-skeleton__features", children: __spreadArray([], Array(featureRowsCount), true).map(function (_, idx) { return (_jsxs("div", { className: "car-booking-card-skeleton__feature-row", children: [_jsx("div", { className: "car-booking-card-skeleton__feature-icon" }), _jsx("div", { className: "car-booking-card-skeleton__feature-label" })] }, "feature-".concat(idx))); }) })] }), showSupplement && (_jsxs("section", { className: "car-booking-card-skeleton__section car-booking-card-skeleton__section--supplement", children: [_jsx("div", { className: "car-booking-card-skeleton__divider" }), _jsx("div", { className: "car-booking-card-skeleton__supplement-header", children: _jsx("div", { className: "car-booking-card-skeleton__section-title" }) }), _jsx("div", { className: "car-booking-card-skeleton__supplement-input" })] })), _jsxs("footer", { className: "car-booking-card-skeleton__footer", children: [_jsxs("div", { className: "car-booking-card-skeleton__total", children: [_jsx("div", { className: "car-booking-card-skeleton__total-price" }), _jsx("div", { className: "car-booking-card-skeleton__total-label" })] }), _jsx("div", { className: "car-booking-card-skeleton__cta" })] })] })] }));
|
|
34
23
|
};
|
|
35
24
|
export default CarBookingCardSkeleton;
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
/**
|
|
14
3
|
* CardContainer is a versatile UI element that groups related content,
|
|
@@ -22,6 +11,6 @@ export var CardContainer = function (_a) {
|
|
|
22
11
|
var baseClass = 'card-container';
|
|
23
12
|
var spacingClass = "card-container--spacing-".concat(spacing);
|
|
24
13
|
var classes = [baseClass, spacingClass, className].filter(Boolean).join(' ');
|
|
25
|
-
return (_jsx("div",
|
|
14
|
+
return (_jsx("div", { className: classes, onClick: onClick, "data-testid": testId, children: children }));
|
|
26
15
|
};
|
|
27
16
|
export default CardContainer;
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
14
3
|
import CalendarInput from '../../molecules/Calendar/CalendarInput';
|
|
@@ -112,6 +101,6 @@ var DateTimePicker = function (_a) {
|
|
|
112
101
|
ensurePopoverVisible(popoverContentRef, triggerRef, isOpen);
|
|
113
102
|
}
|
|
114
103
|
}, [isOpen]);
|
|
115
|
-
return (_jsxs(Popover,
|
|
104
|
+
return (_jsxs(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx("div", { ref: triggerRef, children: _jsx(CalendarInput, { placeholder: placeholder, value: value, disabled: disabled, state: state, className: inputClassName, iconBGFull: iconBGFull, iconPosition: iconPosition, showChevron: showChevron, isOpen: isOpen, icon: icon }) }) }), _jsx(PopoverContent, { ref: popoverContentRef, className: "w-auto border-transparent !p-0", side: "bottom", align: "start", sideOffset: 8, avoidCollisions: false, children: _jsx(DateTime, { mode: mode, selectionMode: selectionMode, numberOfMonths: numberOfMonths, disableBeforeToday: disableBeforeToday, disableToday: disableToday, onChange: handleDtChange, defaultDateRange: selectedDateRange, defaultTime: selectedTime }) })] }));
|
|
116
105
|
};
|
|
117
106
|
export default DateTimePicker;
|
|
@@ -1,15 +1,6 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { AnimatePresence, domAnimation, LazyMotion } from 'motion/react';
|
|
3
|
+
import * as motion from 'motion/react-m';
|
|
13
4
|
import { useCallback, useEffect, useRef } from 'react';
|
|
14
5
|
import { createPortal } from 'react-dom';
|
|
15
6
|
import { useMobile } from '../../../hooks/useMobile';
|
|
@@ -152,10 +143,7 @@ export var Dialog = function (_a) {
|
|
|
152
143
|
]
|
|
153
144
|
.filter(Boolean)
|
|
154
145
|
.join(' ');
|
|
155
|
-
|
|
156
|
-
return null;
|
|
157
|
-
}
|
|
158
|
-
var dialogContent = (_jsxs(_Fragment, { children: [_jsx("div", { className: "dialog-overlay", onClick: handleOverlayClick, "aria-hidden": "true" }), _jsx("div", __assign({ className: "dialog", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, "aria-describedby": bodyId, ref: dialogRef, tabIndex: -1, onClick: handleOverlayClick }, { children: _jsxs("div", __assign({ className: contentClasses }, { children: [_jsxs("div", __assign({ className: headerClasses }, { children: [_jsx("h2", __assign({ id: titleId, className: titleClasses }, { children: title })), showCloseButton && (_jsx("button", __assign({ type: "button", className: closeButtonClasses, onClick: onClose, "aria-label": "Close dialog" }, { children: _jsx(Icon, { name: "close", size: "md" }) })))] })), _jsx("div", __assign({ id: bodyId, className: bodyClasses }, { children: _jsx("div", __assign({ className: "dialog__body-content" }, { children: children })) })), showFooter && (_jsx("div", __assign({ className: footerClasses }, { children: footer ? (footer) : (_jsxs("div", __assign({ className: footerButtonsClasses }, { children: [_jsx(Button, __assign({ variant: "outline-secondary", size: isMobileSize ? 'sm' : 'md', onClick: handleSecondaryClick }, { children: secondaryButtonText })), _jsx(Button, __assign({ variant: "secondary", size: isMobileSize ? 'sm' : 'md', onClick: handlePrimaryClick }, { children: primaryButtonText }))] }))) })))] })) }))] }));
|
|
146
|
+
var dialogContent = (_jsx(LazyMotion, { features: domAnimation, children: _jsx(AnimatePresence, { children: isOpen && (_jsxs(_Fragment, { children: [_jsx(motion.div, { className: "dialog-overlay", onClick: handleOverlayClick, "aria-hidden": "true", initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2, ease: 'easeInOut' } }), _jsx(motion.div, { className: "dialog", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, "aria-describedby": bodyId, ref: dialogRef, tabIndex: -1, onClick: handleOverlayClick, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 20 }, transition: { duration: 0.25, ease: 'easeOut' }, children: _jsxs(motion.div, { className: contentClasses, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2, delay: 0.05 }, children: [_jsxs("div", { className: headerClasses, children: [_jsx("h2", { id: titleId, className: titleClasses, children: title }), showCloseButton && (_jsx("button", { type: "button", className: closeButtonClasses, onClick: onClose, "aria-label": "Close dialog", children: _jsx(Icon, { name: "close", size: "md" }) }))] }), _jsx("div", { id: bodyId, className: bodyClasses, children: _jsx("div", { className: "dialog__body-content", children: children }) }), showFooter && (_jsx("div", { className: footerClasses, children: footer ? (footer) : (_jsxs("div", { className: footerButtonsClasses, children: [_jsx(Button, { variant: "outline-secondary", size: isMobileSize ? 'sm' : 'md', onClick: handleSecondaryClick, children: secondaryButtonText }), _jsx(Button, { variant: "secondary", size: isMobileSize ? 'sm' : 'md', onClick: handlePrimaryClick, children: primaryButtonText })] })) }))] }) })] })) }) }));
|
|
159
147
|
// Use portal to render at the document body level
|
|
160
148
|
return createPortal(dialogContent, document.body);
|
|
161
149
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BookingPaxClientInfo } from '../../molecules/BookingPax';
|
|
2
|
+
import { ServiceOption, ServiceType } from '../../molecules/ServiceSelector';
|
|
3
|
+
export interface AddItemNewServicePayload {
|
|
4
|
+
clients: BookingPaxClientInfo[];
|
|
5
|
+
dates?: string | string[];
|
|
6
|
+
service: ServiceType;
|
|
7
|
+
}
|
|
8
|
+
export interface AddItemNewServiceProps {
|
|
9
|
+
options?: ServiceOption[];
|
|
10
|
+
date: string | string[];
|
|
11
|
+
clients: BookingPaxClientInfo[];
|
|
12
|
+
onServiceChange: (service: ServiceType) => void;
|
|
13
|
+
onNext: (payload: AddItemNewServicePayload) => void;
|
|
14
|
+
onBack: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const AddItemNewService: React.FC<AddItemNewServiceProps>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { useCallback, useState } from 'react';
|
|
12
|
+
import Button from '../../atoms/Button/Button';
|
|
13
|
+
import Checkbox from '../../atoms/Checkbox/Checkbox';
|
|
14
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
15
|
+
import ServiceSelector from '../../molecules/ServiceSelector';
|
|
16
|
+
import DateTimePicker from '../DateTimePicker/DateTimePicker';
|
|
17
|
+
export var AddItemNewService = function (props) {
|
|
18
|
+
var date = props.date, options = props.options, clients = props.clients, onServiceChange = props.onServiceChange, onNext = props.onNext, onBack = props.onBack;
|
|
19
|
+
var _a = useState('accommodation'), service = _a[0], setService = _a[1];
|
|
20
|
+
var _b = useState([]), selectedClients = _b[0], setSelectedClients = _b[1];
|
|
21
|
+
var _c = useState(date !== null && date !== void 0 ? date : []), dates = _c[0], setDates = _c[1];
|
|
22
|
+
var handleServiceChange = function (service) {
|
|
23
|
+
onServiceChange(service);
|
|
24
|
+
setService(service);
|
|
25
|
+
};
|
|
26
|
+
var isAccommodation = service === 'accommodation';
|
|
27
|
+
var selectionMode = isAccommodation ? 'range' : 'single';
|
|
28
|
+
var numberOfMonths = isAccommodation ? 2 : 1;
|
|
29
|
+
var handleClientChange = useCallback(function (client) {
|
|
30
|
+
if (selectedClients.includes(client)) {
|
|
31
|
+
setSelectedClients(selectedClients.filter(function (c) { return c.clientId !== client.clientId; }));
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
setSelectedClients(__spreadArray(__spreadArray([], selectedClients, true), [client], false));
|
|
35
|
+
}
|
|
36
|
+
}, [selectedClients]);
|
|
37
|
+
return (_jsxs("div", { className: "space-y-9", children: [_jsxs("div", { className: "flex sm:items-center gap-4 flex-col sm:flex-row", children: [_jsx(ServiceSelector, { className: "sm:basis-[245px] xl:basis-[260px] shrink-0 grow-0", value: service, onChange: handleServiceChange, options: options }), _jsx("div", { className: "sm:basis-[245px] xl:basis-[260px] shrink-0 grow-0", children: _jsx(DateTimePicker, { mode: "calendar", selectionMode: selectionMode, defaultValue: date, placeholder: "Select date", numberOfMonths: numberOfMonths, iconPosition: "left", iconBGFull: false, showChevron: true, onValueChange: setDates }) })] }), _jsxs("div", { className: "space-y-4", children: [_jsx(Text, { variant: "bold", children: "Please select the pax affected by the new service" }), _jsx("ul", { children: clients.map(function (client, index) { return (_jsx("li", { children: _jsx(Checkbox, { id: "cl-".concat(index), label: "".concat(client.firstName, " ").concat(client.lastName, " (").concat(client.clientType).concat(client.clientType !== 'Adult' ? " - ".concat(client.age, " years old") : '', ")"), checked: selectedClients.some(function (c) { return c.clientId === client.clientId; }), onChange: function () { return handleClientChange(client); } }) }, "cl-".concat(index))); }) })] }), _jsxs("div", { className: "flex justify-end gap-x-4 [&>*]:w-[250px] pb-2", children: [_jsx(Button, { variant: "outline-secondary", onClick: onBack, children: "Back" }), _jsx(Button, { variant: "secondary", onClick: function () {
|
|
38
|
+
return onNext({
|
|
39
|
+
clients: selectedClients,
|
|
40
|
+
dates: Array.isArray(dates) ? dates : [dates],
|
|
41
|
+
service: service,
|
|
42
|
+
});
|
|
43
|
+
}, disabled: selectedClients.length === 0, children: "Next" })] })] }));
|
|
44
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
3
|
+
import { AddItemButton } from '../../molecules/AddItemButton/AddItemButton';
|
|
4
|
+
export var AddItemType;
|
|
5
|
+
(function (AddItemType) {
|
|
6
|
+
AddItemType["NEW"] = "NEW";
|
|
7
|
+
AddItemType["EXISTING"] = "EXISTING";
|
|
8
|
+
})(AddItemType || (AddItemType = {}));
|
|
9
|
+
export var AddItemSelector = function (_a) {
|
|
10
|
+
var onAddItem = _a.onAddItem;
|
|
11
|
+
return (_jsxs("div", { className: "space-y-9", children: [_jsx(Text, { 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", { 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, { size: "sm", variant: "medium", children: "Note: This action is irreversible and cannot be undone." })] }));
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BookingPaxClientInfo } from '../../molecules/BookingPax';
|
|
3
|
+
import { ServiceOption, ServiceType } from '../../molecules/ServiceSelector';
|
|
4
|
+
import { AddItemNewServicePayload } from './AddItemNewService';
|
|
5
|
+
import { AddItemType } from './AddItemSelector';
|
|
6
|
+
export interface DialogBookingAddItemProps {
|
|
7
|
+
open: boolean;
|
|
8
|
+
serviceDate?: string | string[];
|
|
9
|
+
serviceOptions?: ServiceOption[];
|
|
10
|
+
clients: BookingPaxClientInfo[];
|
|
11
|
+
setOpen: (open: boolean) => void;
|
|
12
|
+
onAddItem?: (type: AddItemType) => void;
|
|
13
|
+
onServiceChange?: (service: ServiceType) => void;
|
|
14
|
+
onValidatePax?: (payload: AddItemNewServicePayload) => void;
|
|
15
|
+
onBackToSelector?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const DialogBookingAddItem: React.FC<DialogBookingAddItemProps>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { AnimatePresence, domAnimation, LazyMotion } from 'motion/react';
|
|
14
|
+
import * as motion from 'motion/react-m';
|
|
15
|
+
import { useLayoutEffect, useRef, useState } from 'react';
|
|
16
|
+
import { DEFAULT_SERVICE_SELECTOR_OPTIONS } from '../../molecules/ServiceSelector/ServiceSelector';
|
|
17
|
+
import Dialog from '../Dialog/Dialog';
|
|
18
|
+
import { AddItemNewService } from './AddItemNewService';
|
|
19
|
+
import { AddItemSelector, AddItemType } from './AddItemSelector';
|
|
20
|
+
export var DialogBookingAddItem = function (props) {
|
|
21
|
+
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;
|
|
22
|
+
var _c = useState(null), selectedType = _c[0], setSelectedType = _c[1];
|
|
23
|
+
var contentRef = useRef(null);
|
|
24
|
+
var _d = useState('auto'), contentHeight = _d[0], setContentHeight = _d[1];
|
|
25
|
+
var handleAddItem = function (type) {
|
|
26
|
+
onAddItem === null || onAddItem === void 0 ? void 0 : onAddItem(type);
|
|
27
|
+
setSelectedType(type);
|
|
28
|
+
console.log(type);
|
|
29
|
+
};
|
|
30
|
+
var handleClose = function () {
|
|
31
|
+
setOpen(false);
|
|
32
|
+
setSelectedType(null);
|
|
33
|
+
};
|
|
34
|
+
// Measure and update content height when selectedType changes
|
|
35
|
+
useLayoutEffect(function () {
|
|
36
|
+
setTimeout(function () {
|
|
37
|
+
if (contentRef.current && open) {
|
|
38
|
+
var measuredHeight = contentRef.current.scrollHeight;
|
|
39
|
+
setContentHeight(measuredHeight);
|
|
40
|
+
}
|
|
41
|
+
}, 50);
|
|
42
|
+
}, [selectedType, open, serviceDate, serviceOptions, clients]);
|
|
43
|
+
var title = selectedType === AddItemType.EXISTING
|
|
44
|
+
? 'Add new service to your existing pax'
|
|
45
|
+
: 'Select how to add items to your booking';
|
|
46
|
+
return (_jsx(Dialog, { isOpen: open, onClose: handleClose, showFooter: false, title: title, className: "!max-w-[798px]", children: _jsx(LazyMotion, { features: domAnimation, children: _jsx(motion.div, { animate: { height: contentHeight }, transition: { duration: 0.2, ease: 'easeInOut' }, style: { overflow: 'hidden' }, children: _jsx("div", { ref: contentRef, children: _jsx(AnimatePresence, { mode: "wait", initial: false, children: selectedType === AddItemType.EXISTING ? (_jsx(motion.div, { 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
|
|
47
|
+
? serviceOptions
|
|
48
|
+
: DEFAULT_SERVICE_SELECTOR_OPTIONS.map(function (_a) {
|
|
49
|
+
var disabled = _a.disabled, badge = _a.badge, option = __rest(_a, ["disabled", "badge"]);
|
|
50
|
+
return option;
|
|
51
|
+
}), clients: clients, onNext: function (payload) { return onValidatePax === null || onValidatePax === void 0 ? void 0 : onValidatePax(payload); }, onBack: function () {
|
|
52
|
+
onBackToSelector === null || onBackToSelector === void 0 ? void 0 : onBackToSelector();
|
|
53
|
+
setSelectedType(null);
|
|
54
|
+
} }) }, "add-item-new-service")) : (_jsx(motion.div, { 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")) }) }) }) }) }));
|
|
55
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CancellationPolicyItem } from '../../molecules/DialogContentPolicy/DialogCancellationList';
|
|
2
2
|
export interface BookingCancellationPolicyProps {
|
|
3
3
|
/**
|
|
4
4
|
* Whether the dialog is open.
|
|
@@ -11,7 +11,7 @@ export interface BookingCancellationPolicyProps {
|
|
|
11
11
|
/**
|
|
12
12
|
* The cancellations to display.
|
|
13
13
|
*/
|
|
14
|
-
cancellations:
|
|
14
|
+
cancellations: CancellationPolicyItem[];
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* BookingCancellationPolicy is a component that allows the user to display the booking cancellation policy.
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { DialogContentPolicy } from '../../molecules/DialogContentPolicy';
|
|
14
3
|
import { DialogBookingConfirm } from './DialogBookingConfirm';
|
|
@@ -27,5 +16,5 @@ import { DialogBookingConfirm } from './DialogBookingConfirm';
|
|
|
27
16
|
*/
|
|
28
17
|
export var BookingCancellationPolicy = function (props) {
|
|
29
18
|
var open = props.open, setOpen = props.setOpen, cancellations = props.cancellations;
|
|
30
|
-
return (_jsx(DialogBookingConfirm,
|
|
19
|
+
return (_jsx(DialogBookingConfirm, { open: open, setOpen: setOpen, title: "Confirmation of Terms & Cancellation policy", className: "!max-w-[800px]", children: _jsx(DialogContentPolicy.List, { cancellations: cancellations }) }));
|
|
31
20
|
};
|