mautourco-components 0.2.30 → 0.2.32
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/README.md +54 -24
- 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.js +2 -13
- 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.js +1 -12
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.d.ts +0 -1
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.js +1 -12
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.d.ts +0 -1
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.js +1 -12
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.d.ts +3 -3
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.js +2 -2
- 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/{CancelService → DialogCancelService}/CancelPolicy.d.ts +2 -2
- package/dist/components/organisms/DialogCancelService/CancelPolicy.js +8 -0
- package/dist/components/organisms/DialogCancelService/ConfirmDelete/ConfirmDelete.js +24 -0
- package/dist/components/organisms/{CancelService/CancelService.d.ts → DialogCancelService/DialogCancelService.d.ts} +4 -3
- package/dist/components/organisms/DialogCancelService/DialogCancelService.js +14 -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 +1 -1
- package/dist/components/organisms/Table/TableCell.js +1 -12
- package/dist/components/organisms/Table/columns/booking-cancel-service-columns.js +15 -31
- 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.js +16 -31
- package/dist/components/organisms/Table/columns/index.d.ts +11 -7
- package/dist/components/organisms/Table/columns/index.js +2 -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/mautourco.css +40 -0
- 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/DialogContentPolicy/DialogCancellationList.tsx +6 -6
- 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/{CancelService → DialogCancelService}/CancelPolicy.tsx +4 -4
- package/src/components/organisms/{CancelService/CancelService.tsx → DialogCancelService/DialogCancelService.tsx} +7 -5
- 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 +24 -5
- package/src/components/organisms/Table/columns/booking-cancel-service-columns.tsx +16 -32
- 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 +17 -33
- package/src/components/organisms/Table/columns/index.ts +2 -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/dist/components/organisms/CancelService/CancelPolicy.js +0 -19
- package/dist/components/organisms/CancelService/CancelService.js +0 -23
- package/dist/components/organisms/CancelService/ConfirmDelete/ConfirmDelete.js +0 -35
- package/dist/components/organisms/CancelService/FromList.js +0 -29
- /package/dist/components/organisms/{CancelService → DialogCancelService}/ConfirmDelete/ConfirmDelete.css +0 -0
- /package/dist/components/organisms/{CancelService → DialogCancelService}/ConfirmDelete/ConfirmDelete.d.ts +0 -0
- /package/dist/components/organisms/{CancelService → DialogCancelService}/FromList.d.ts +0 -0
- /package/src/components/organisms/{BookingAddItem → DialogBookingAddItem}/AddItemSelector.tsx +0 -0
- /package/src/components/organisms/{CancelService → DialogCancelService}/ConfirmDelete/ConfirmDelete.css +0 -0
- /package/src/components/organisms/{CancelService → DialogCancelService}/ConfirmDelete/ConfirmDelete.tsx +0 -0
- /package/src/components/organisms/{CancelService → DialogCancelService}/FromList.tsx +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DetailResumeAccommodation, DetailResumeExcursion, DetailResumeOtherService, DetailResumeTransfer } from '@/src/types/table';
|
|
2
|
+
import { ColumnType } from '../Table/TableCell';
|
|
3
|
+
import './DialogComparison.css';
|
|
4
|
+
export type ComparisonData = DetailResumeAccommodation | DetailResumeTransfer | DetailResumeExcursion | DetailResumeOtherService;
|
|
5
|
+
export interface MultiComparisonData {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
data: ComparisonData[];
|
|
9
|
+
}
|
|
10
|
+
export interface DialogComparisonProps {
|
|
11
|
+
open: boolean;
|
|
12
|
+
setOpen: (open: boolean) => void;
|
|
13
|
+
data: MultiComparisonData[];
|
|
14
|
+
columns?: ColumnType<ComparisonData>[];
|
|
15
|
+
onBookNow: (payload: {
|
|
16
|
+
selectedValues: string[];
|
|
17
|
+
filteredData: MultiComparisonData[];
|
|
18
|
+
}) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const isComparisonAccommodation: (data: ComparisonData) => data is ComparisonData & DetailResumeAccommodation;
|
|
21
|
+
export declare const isComparisonTransfer: (data: ComparisonData) => data is ComparisonData & DetailResumeTransfer;
|
|
22
|
+
export declare const isComparisonExcursion: (data: ComparisonData) => data is ComparisonData & DetailResumeExcursion;
|
|
23
|
+
export declare const isComparisonOtherService: (data: ComparisonData) => data is ComparisonData & DetailResumeOtherService;
|
|
24
|
+
export declare const DialogComparison: (props: DialogComparisonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ServiceType, } from '../../../types/table/index';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import Button from '../../atoms/Button/Button';
|
|
5
|
+
import Chip from '../../atoms/Chip/Chip';
|
|
6
|
+
import MultiSelectDropdown from '../../molecules/MultiSelectDropdown/MultiSelectDropdown';
|
|
7
|
+
import { DialogBookingConfirm } from '../DialogBookingConfirm';
|
|
8
|
+
import { Table } from '../Table';
|
|
9
|
+
import { columns as defaultColumns } from '../Table/columns';
|
|
10
|
+
import './DialogComparison.css';
|
|
11
|
+
export var isComparisonAccommodation = function (data) {
|
|
12
|
+
return data.Type === ServiceType.ACCOMMODATION;
|
|
13
|
+
};
|
|
14
|
+
export var isComparisonTransfer = function (data) {
|
|
15
|
+
return data.Type === ServiceType.TRANSFER;
|
|
16
|
+
};
|
|
17
|
+
export var isComparisonExcursion = function (data) {
|
|
18
|
+
return data.Type === ServiceType.EXCURSION;
|
|
19
|
+
};
|
|
20
|
+
export var isComparisonOtherService = function (data) {
|
|
21
|
+
return data.Type === ServiceType.OTHER_SERVICE;
|
|
22
|
+
};
|
|
23
|
+
export var DialogComparison = function (props) {
|
|
24
|
+
var open = props.open, data = props.data, columns = props.columns, setOpen = props.setOpen, onBookNow = props.onBookNow;
|
|
25
|
+
var _a = useState([]), selectedValues = _a[0], setSelectedValues = _a[1];
|
|
26
|
+
var _b = useState(data), filteredData = _b[0], setFilteredData = _b[1];
|
|
27
|
+
var getTotalRows = function (comparisonData) {
|
|
28
|
+
var totalMap = new Map();
|
|
29
|
+
comparisonData.forEach(function (item) {
|
|
30
|
+
if (isComparisonAccommodation(item)) {
|
|
31
|
+
var currency = item.Currency;
|
|
32
|
+
var total = parseFloat(item.Total) || 0;
|
|
33
|
+
var currentTotal = totalMap.get(currency) || 0;
|
|
34
|
+
totalMap.set(currency, currentTotal + total);
|
|
35
|
+
}
|
|
36
|
+
if (isComparisonTransfer(item) || isComparisonExcursion(item)) {
|
|
37
|
+
var currency = item.Currency;
|
|
38
|
+
var total = parseFloat(item.TotalPrice) || 0;
|
|
39
|
+
var currentTotal = totalMap.get(currency) || 0;
|
|
40
|
+
totalMap.set(currency, currentTotal + total);
|
|
41
|
+
}
|
|
42
|
+
if (isComparisonOtherService(item)) {
|
|
43
|
+
var currency = item.currency;
|
|
44
|
+
var total = parseFloat(item.total_price) || 0;
|
|
45
|
+
var currentTotal = totalMap.get(currency) || 0;
|
|
46
|
+
totalMap.set(currency, currentTotal + total);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return Object.fromEntries(totalMap);
|
|
50
|
+
};
|
|
51
|
+
var handleSelectionChange = function (selectedValues) {
|
|
52
|
+
if (selectedValues.length >= 1) {
|
|
53
|
+
setSelectedValues(selectedValues);
|
|
54
|
+
setFilteredData(data.filter(function (d) { return selectedValues.includes(d.id); }));
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
useEffect(function () {
|
|
58
|
+
setSelectedValues(data.map(function (d) { return d.id; }));
|
|
59
|
+
}, [data]);
|
|
60
|
+
return (_jsx(DialogBookingConfirm, { title: "Comparison of the quotations", open: open, setOpen: setOpen, className: "!max-w-[1255px]", closeOnOverlayClick: true, children: _jsxs("div", { className: "dialog-comparison", children: [_jsx("div", { className: "dialog-comparison__filter", children: _jsx(MultiSelectDropdown, { options: data.map(function (d) { return ({
|
|
61
|
+
id: d.id,
|
|
62
|
+
label: d.name,
|
|
63
|
+
}); }), selectedValues: selectedValues, onSelectionChange: handleSelectionChange, maxDisplayedChips: 2, useTextForMaxDisplayedChips: true }) }), _jsx("div", { className: "dialog-comparison__list", children: filteredData.map(function (d, index) { return (_jsxs("div", { className: "dialog-comparison__item", children: [_jsx(Chip, { label: d.name, color: "brand", type: "outline", size: "lg" }), _jsx(Table, { data: d.data, columns: columns || defaultColumns.comparison(), totalRows: getTotalRows(d.data), isTotalBorderDash: false, totalSubstractedSpace: 0 })] }, "cp-".concat(index))); }) }), _jsx("div", { className: "dialog-comparison__footer", children: _jsx(Button, { variant: "secondary", onClick: function () {
|
|
64
|
+
return onBookNow({
|
|
65
|
+
selectedValues: selectedValues,
|
|
66
|
+
filteredData: filteredData,
|
|
67
|
+
});
|
|
68
|
+
}, children: "Book now" }) })] }) }));
|
|
69
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps } from '../../atoms/Button/Button';
|
|
3
|
+
export interface DialogDeleteConfirmProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
setOpen: (open: boolean) => void;
|
|
6
|
+
message: string;
|
|
7
|
+
title: string;
|
|
8
|
+
cancelText?: string;
|
|
9
|
+
okText?: string;
|
|
10
|
+
okVariant?: ButtonProps['variant'];
|
|
11
|
+
onOk?: () => void;
|
|
12
|
+
onCancel?: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const DialogDeleteConfirm: React.FC<DialogDeleteConfirmProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Button from '../../atoms/Button/Button';
|
|
3
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
4
|
+
import { DialogBookingConfirm } from '../DialogBookingConfirm';
|
|
5
|
+
export var DialogDeleteConfirm = function (props) {
|
|
6
|
+
var open = props.open, setOpen = props.setOpen, message = props.message, title = props.title, _a = props.cancelText, cancelText = _a === void 0 ? 'Cancel' : _a, _b = props.okText, okText = _b === void 0 ? 'Delete' : _b, _c = props.okVariant, okVariant = _c === void 0 ? 'destructive' : _c, onOk = props.onOk, onCancel = props.onCancel;
|
|
7
|
+
return (_jsx(DialogBookingConfirm, { open: open, setOpen: setOpen, title: title, className: "!max-w-[500px]", closeOnOverlayClick: true, children: _jsxs("div", { className: "space-y-9", children: [_jsx(Text, { variant: "medium", size: "sm", leading: "4", children: _jsx("span", { dangerouslySetInnerHTML: { __html: message } }) }), _jsxs("div", { className: "grid grid-cols-2 gap-x-4", children: [_jsx(Button, { variant: "outline-secondary", onClick: function () {
|
|
8
|
+
setOpen(false);
|
|
9
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
10
|
+
}, children: cancelText }), _jsx(Button, { variant: okVariant, onClick: onOk, children: okText })] })] }) }));
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface DialogSendingMailProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
setOpen: (open: boolean) => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
type?: 'booking' | 'quotation';
|
|
7
|
+
}
|
|
8
|
+
export declare const DialogSendingMail: {
|
|
9
|
+
(props: DialogSendingMailProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Content: React.FC<import("./DialogSendingMailContent").DialogSendingMailContentProps>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { DialogBookingConfirm } from '../DialogBookingConfirm';
|
|
3
|
+
import { DialogSendingMailContent } from './DialogSendingMailContent';
|
|
4
|
+
export var DialogSendingMail = function (props) {
|
|
5
|
+
var open = props.open, setOpen = props.setOpen, children = props.children, _a = props.type, type = _a === void 0 ? 'booking' : _a;
|
|
6
|
+
return (_jsx(DialogBookingConfirm, { open: open, title: "Send ".concat(type, " via mail"), setOpen: setOpen, className: "!max-w-[800px]", closeOnOverlayClick: true, children: children }));
|
|
7
|
+
};
|
|
8
|
+
DialogSendingMail.Content = DialogSendingMailContent;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SendingMailSchema } from './sending-mail-schema';
|
|
3
|
+
export interface DialogSendingMailContentProps {
|
|
4
|
+
userInfo: {
|
|
5
|
+
firstName: string;
|
|
6
|
+
lastName: string;
|
|
7
|
+
email: string;
|
|
8
|
+
};
|
|
9
|
+
subject: string;
|
|
10
|
+
type: 'booking' | 'quotation';
|
|
11
|
+
onSubmit: (data: SendingMailSchema) => void;
|
|
12
|
+
onPreviewAttachment?: () => void;
|
|
13
|
+
onCancel?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const DialogSendingMailContent: React.FC<DialogSendingMailContentProps>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
14
|
+
import { useEffect } from 'react';
|
|
15
|
+
import { useForm } from 'react-hook-form';
|
|
16
|
+
import Button from '../../atoms/Button/Button';
|
|
17
|
+
import Input from '../../atoms/Inputs/Input/Input';
|
|
18
|
+
import Textarea from '../../atoms/Inputs/Textarea/Textarea';
|
|
19
|
+
import Toast from '../../molecules/Toast/Toast';
|
|
20
|
+
import { Form, FormControl, FormField, FormItem, FormMessage } from '../../ui/form';
|
|
21
|
+
import { sendingMailSchema } from './sending-mail-schema';
|
|
22
|
+
export var DialogSendingMailContent = function (props) {
|
|
23
|
+
var userInfo = props.userInfo, subject = props.subject, type = props.type, onSubmit = props.onSubmit, onPreviewAttachment = props.onPreviewAttachment, onCancel = props.onCancel;
|
|
24
|
+
var messageText = function () {
|
|
25
|
+
var name = "".concat(userInfo.firstName, " ").concat(userInfo.lastName);
|
|
26
|
+
return "Dear Sir/Madam, \n\nPlease find your ".concat(type, " for ").concat(name, " attached here with.\nWe remain at your disposal for any questions or further clarification.\n\nKind regards,\nThe Mautourco Team");
|
|
27
|
+
};
|
|
28
|
+
var form = useForm({
|
|
29
|
+
resolver: zodResolver(sendingMailSchema),
|
|
30
|
+
defaultValues: {
|
|
31
|
+
email: userInfo.email,
|
|
32
|
+
subject: subject,
|
|
33
|
+
message: messageText(),
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
useEffect(function () {
|
|
37
|
+
form.setValue('subject', subject);
|
|
38
|
+
}, [subject]);
|
|
39
|
+
return (_jsx(Form, __assign({}, form, { children: _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), children: [_jsxs("div", { className: "space-y-6", children: [_jsx(FormField, { control: form.control, name: "email", rules: { required: true }, render: function (_a) {
|
|
40
|
+
var field = _a.field;
|
|
41
|
+
return (_jsx(FormItem, { children: _jsxs("div", { className: "relative", children: [_jsx(FormControl, { children: _jsx(Input, __assign({ type: "email", placeholder: "Recipient *" }, field)) }), _jsx(FormMessage, { className: "absolute bottom-0 translate-y-5" })] }) }));
|
|
42
|
+
} }), _jsx(FormField, { control: form.control, name: "subject", render: function (_a) {
|
|
43
|
+
var field = _a.field;
|
|
44
|
+
return (_jsx(FormItem, { children: _jsxs("div", { className: "relative", children: [_jsx(FormControl, { children: _jsx(Input, __assign({ placeholder: "Subject" }, field)) }), _jsx(FormMessage, { className: "absolute bottom-0 translate-y-5" })] }) }));
|
|
45
|
+
} }), _jsx(FormField, { control: form.control, name: "message", rules: { required: true }, render: function (_a) {
|
|
46
|
+
var field = _a.field;
|
|
47
|
+
return (_jsx(FormItem, { children: _jsxs("div", { className: "relative", children: [_jsx(FormControl, { children: _jsx(Textarea, __assign({ placeholder: "Write your email here... *" }, field)) }), _jsx(FormMessage, { className: "absolute bottom-0 translate-y-4" })] }) }));
|
|
48
|
+
} }), _jsx(Button, { type: "button", size: "sm", onClick: onPreviewAttachment, children: "Preview Attachment" })] }), _jsx(Toast, { type: "warning", className: "mt-8", text: "Disclaimer: Email formatting may appear distorted in certain older email clients (e.g Outlook Classic ). Content will remain intact, but the visual layout may differ from the original" }), _jsxs("div", { className: "flex justify-end gap-4 [&>*]:w-[250px] pb-2 pt-9", children: [_jsx(Button, { type: "button", variant: "outline-secondary", size: "sm", onClick: onCancel, children: "Cancel" }), _jsx(Button, { type: "submit", variant: "secondary", size: "sm", children: "Send" })] })] }) })));
|
|
49
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EMAIL_REGEX } from '../../../lib/shared-constant';
|
|
2
|
+
import z from 'zod';
|
|
3
|
+
export var sendingMailSchema = z.object({
|
|
4
|
+
email: z
|
|
5
|
+
.string()
|
|
6
|
+
.regex(EMAIL_REGEX, {
|
|
7
|
+
message: 'Please enter a valid email',
|
|
8
|
+
})
|
|
9
|
+
.refine(function (v) { return v !== ''; }, {
|
|
10
|
+
error: 'Email is required',
|
|
11
|
+
}),
|
|
12
|
+
subject: z.string().optional(),
|
|
13
|
+
message: z.string().refine(function (v) { return v !== ''; }, {
|
|
14
|
+
error: 'Message is required',
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
@@ -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 { useEffect, useState } from 'react';
|
|
14
3
|
import '../../../styles/components/organism/docket.css';
|
|
@@ -26,27 +15,27 @@ import { TransferDocket } from '../../molecules/TransferDocket/TransferDocket';
|
|
|
26
15
|
*/
|
|
27
16
|
export var DocketCollapsedHeader = function (_a) {
|
|
28
17
|
var _b = _a.title, title = _b === void 0 ? 'Your quotation' : _b, onClick = _a.onClick, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
29
|
-
return (_jsxs("div",
|
|
18
|
+
return (_jsxs("div", { className: "docket__collapsed-header ".concat(className), onClick: onClick, role: "button", tabIndex: 0, onKeyDown: function (e) {
|
|
30
19
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
31
20
|
e.preventDefault();
|
|
32
21
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
33
22
|
}
|
|
34
|
-
}
|
|
23
|
+
}, children: [_jsxs("div", { className: "docket__collapsed-header-title", children: [_jsx(Icon, { name: "quotation", size: "lg" }), _jsx("h2", { className: "docket__collapsed-header-title-text", children: title })] }), _jsx(Icon, { name: "eye", size: "lg" })] }));
|
|
35
24
|
};
|
|
36
25
|
/**
|
|
37
26
|
* Empty state component for docket when no content is provided
|
|
38
27
|
*/
|
|
39
28
|
export var DocketEmptyState = function (_a) {
|
|
40
29
|
var _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
41
|
-
return (_jsx("div",
|
|
30
|
+
return (_jsx("div", { className: "docket__empty-state ".concat(className), children: _jsxs("div", { className: "docket__empty-state-content", children: [_jsx("div", { className: "docket__empty-state-illustration", children: _jsx("img", { src: "/images/docket-empty-illustration.svg", alt: "Empty docket illustration", className: "docket__empty-state-image" }) }), _jsxs("p", { className: "docket__empty-state-text", children: [_jsx("span", { className: "docket__empty-state-text-bold", children: "Start by adding a service here\u2014" }), _jsx("span", { className: "docket__empty-state-text-regular", children: "you'll be able to create and compare multiple quotations." })] })] }) }));
|
|
42
31
|
};
|
|
43
32
|
/**
|
|
44
33
|
* DocketHeader component for the docket title and more options button
|
|
45
34
|
*/
|
|
46
35
|
export var DocketHeader = function (_a) {
|
|
47
36
|
var _b = _a.title, title = _b === void 0 ? 'Your quotation' : _b, moreOptions = _a.moreOptions, onMoreOptionsClick = _a.onMoreOptionsClick, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
48
|
-
var chipTrigger = (_jsx(Chip,
|
|
49
|
-
return (_jsxs("div",
|
|
37
|
+
var chipTrigger = (_jsx(Chip, { trailingIcon: "chevron-down", className: "docket__header-more-options", children: "More options" }));
|
|
38
|
+
return (_jsxs("div", { className: "docket__header ".concat(className), children: [_jsxs("div", { className: "docket__header-title", children: [_jsx(Icon, { name: "quotation", size: "lg" }), _jsx("h2", { className: "docket__header-title-text", children: title })] }), moreOptions && moreOptions.length > 0 ? (_jsx(ActionDropdown, { data: moreOptions, maxWidth: "200px", children: chipTrigger })) : onMoreOptionsClick ? (_jsx("div", { onClick: onMoreOptionsClick, children: chipTrigger })) : null] }));
|
|
50
39
|
};
|
|
51
40
|
/**
|
|
52
41
|
* DocketFooter component for action buttons
|
|
@@ -54,7 +43,7 @@ export var DocketHeader = function (_a) {
|
|
|
54
43
|
export var DocketFooter = function (_a) {
|
|
55
44
|
var _b = _a.mode, mode = _b === void 0 ? 'multiple' : _b, onAddNewQuoteClick = _a.onAddNewQuoteClick, onViewClick = _a.onViewClick, onSaveClick = _a.onSaveClick, onBookNowClick = _a.onBookNowClick, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
56
45
|
var isSingleMode = mode === 'single';
|
|
57
|
-
return (_jsxs("div",
|
|
46
|
+
return (_jsxs("div", { className: "docket__footer ".concat(className), children: [!isSingleMode && onAddNewQuoteClick && (_jsx(Button, { variant: "outline-secondary", size: "sm", leadingIcon: "plus", onClick: onAddNewQuoteClick, className: "docket__footer-button docket__footer-button--full", children: "Add new quote" })), _jsxs("div", { className: "docket__footer-actions", children: [!isSingleMode && onViewClick && (_jsx(Button, { variant: "outline-secondary", size: "sm", onClick: onViewClick, className: "docket__footer-button", children: "View" })), onSaveClick && (_jsx(Button, { variant: "outline-secondary", size: "sm", onClick: onSaveClick, className: "docket__footer-button", children: "Save" })), onBookNowClick && (_jsx(Button, { variant: "secondary", size: "sm", onClick: onBookNowClick, className: "docket__footer-button docket__footer-button--primary", children: "Book now" }))] })] }));
|
|
58
47
|
};
|
|
59
48
|
/**
|
|
60
49
|
* Docket is a container component for displaying quotation/docket information.
|
|
@@ -121,13 +110,13 @@ export var Docket = function (_a) {
|
|
|
121
110
|
if (renderedServices.length === 0) {
|
|
122
111
|
return _jsx(DocketEmptyState, {});
|
|
123
112
|
}
|
|
124
|
-
return _jsx("div",
|
|
113
|
+
return _jsx("div", { className: "docket__services", children: renderedServices });
|
|
125
114
|
};
|
|
126
115
|
// Collect all prices from all dockets
|
|
127
116
|
var allPrices = dockets ? dockets.flatMap(function (docket) { return docket.prices || []; }) : [];
|
|
128
117
|
var containerClasses = containerClassName
|
|
129
118
|
? "docket__container ".concat(containerClassName)
|
|
130
119
|
: 'docket__container';
|
|
131
|
-
return (_jsxs("div",
|
|
120
|
+
return (_jsxs("div", { className: containerClasses, children: [isMobile && !isOpen && (_jsx(DocketCollapsedHeader, { title: title, onClick: handleToggle })), isMobile && isOpen && (_jsxs("div", { className: "docket__mobile-wrapper", children: [_jsx("div", { className: "docket__close-header", children: _jsxs("div", { className: "docket__close-header-content", children: [_jsx("h2", { className: "docket__close-header-text", children: "Close" }), _jsx("button", { className: "docket__close-button", onClick: handleClose, "aria-label": "Close docket", children: _jsx(Icon, { name: "close", size: "lg" }) })] }) }), _jsxs("div", { className: classes, onClick: onClick, "data-testid": testId, children: [showHeader && (_jsx(DocketHeader, { title: title, moreOptions: moreOptions, onMoreOptionsClick: onMoreOptionsClick })), _jsx("div", { className: "docket__content", children: renderContent() }), allPrices.length > 0 && (_jsx("div", { className: "docket__prices-section", children: _jsx(DocketPrices, { prices: allPrices }) })), showFooter && (_jsx(DocketFooter, { mode: mode, onAddNewQuoteClick: onAddNewQuoteClick, onViewClick: onViewClick, onSaveClick: onSaveClick, onBookNowClick: onBookNowClick }))] })] })), !isMobile && (_jsxs("div", { className: classes, onClick: onClick, "data-testid": testId, children: [showHeader && (_jsx(DocketHeader, { title: title, moreOptions: moreOptions, onMoreOptionsClick: onMoreOptionsClick })), _jsx("div", { className: "docket__content", children: renderContent() }), allPrices.length > 0 && (_jsxs("div", { className: "docket__prices-section", children: [_jsx(Icon, { name: "line", size: "lg" }), _jsx(DocketPrices, { prices: allPrices }), _jsx(Icon, { name: "line", size: "lg" })] })), showFooter && (_jsx(DocketFooter, { mode: mode, onAddNewQuoteClick: onAddNewQuoteClick, onViewClick: onViewClick, onSaveClick: onSaveClick, onBookNowClick: onBookNowClick }))] }))] }));
|
|
132
121
|
};
|
|
133
122
|
export default Docket;
|
|
@@ -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 { useState } from "react";
|
|
14
3
|
import { Text } from "../../atoms/Typography/Typography";
|
|
@@ -22,13 +11,13 @@ export var Footer = function (_a) {
|
|
|
22
11
|
setOpenSection(function (prev) { return (prev === id ? null : id); });
|
|
23
12
|
};
|
|
24
13
|
var year = new Date().getFullYear();
|
|
25
|
-
return (_jsx("footer",
|
|
14
|
+
return (_jsx("footer", { className: "footer", children: _jsxs("div", { className: "footer__wrapper", children: [_jsxs("div", { className: "footer__desktop", children: [_jsxs("div", { className: "footer__top-row", children: [_jsxs("div", { className: "footer__content-left", children: [columns.map(function (col) { return (_jsxs("div", { className: "footer__column", children: [_jsx(Text, { as: "h4", className: "footer__column-title", children: col.title }), _jsx("div", { className: "footer__column-links", children: col.links.map(function (link) { return (_jsx(Link, { href: link.href, onClick: link.onClick, theme: "dark", className: "text-xs no-underline hover:opacity-80", children: link.label }, link.label)); }) })] }, col.id)); }), _jsxs("div", { className: "footer__contact", children: [_jsx(Text, { as: "h4", className: "footer__column-title", children: contact.title }), _jsxs("div", { className: "footer__contact-info", children: [contact.addressLines.map(function (line) { return (_jsx("p", { children: line }, line)); }), contact.phone && _jsxs("p", { children: ["Tel: ", contact.phone] }), contact.fax && _jsxs("p", { children: ["Fax: ", contact.fax] }), contact.email && (_jsx(Link, { href: "mailto:".concat(contact.email), theme: "dark", className: "text-xs no-underline", children: contact.email }))] })] }), _jsxs("div", { className: "footer__socials", children: [_jsx(Text, { as: "h4", className: "footer__column-title", children: "Socials" }), _jsx("div", { className: "footer__socials-icons", children: socials.map(function (s) { return (_jsx("a", { href: s.href, "aria-label": s.label, className: "footer__social-link", children: s.icon }, s.id)); }) })] })] }), logo && (_jsx("div", { className: "footer__logo-section", children: _jsxs("div", { className: "footer__logo-container", children: [_jsx("a", { href: homeUrl !== null && homeUrl !== void 0 ? homeUrl : "/", onClick: function (e) {
|
|
26
15
|
e.preventDefault();
|
|
27
16
|
onLinkClick === null || onLinkClick === void 0 ? void 0 : onLinkClick({ label: "Home", route: homeUrl !== null && homeUrl !== void 0 ? homeUrl : "/" });
|
|
28
|
-
}
|
|
17
|
+
}, children: logo }), _jsxs(Text, { as: "p", className: "footer__copyright", children: ["\u00A9 ", year, " Mautourco, All Rights Reserved"] })] }) }))] }), !logo && (_jsxs(Text, { as: "p", className: "footer__copyright-standalone", children: ["\u00A9 ", year, " Mautourco, All Rights Reserved"] }))] }), _jsxs("div", { className: "footer__mobile", children: [columns.map(function (col) { return (_jsxs("div", { className: "footer__mobile-section", children: [_jsxs("button", { type: "button", onClick: function () { return toggleSection(col.id); }, className: "footer__mobile-section-button", children: [_jsx("span", { children: col.title }), _jsx("span", { className: "footer__mobile-section-icon ".concat(openSection === col.id ? "footer__mobile-section-icon--rotated" : ""), children: _jsx(Icon, { name: "chevron-down", size: "sm", color: "white" }) })] }), openSection === col.id && (_jsx("div", { className: "footer__mobile-section-content", children: col.links.map(function (link) { return (_jsx(Link, { href: link.href, onClick: link.onClick, theme: "dark", className: "text-xs no-underline", children: link.label }, link.label)); }) }))] }, col.id)); }), _jsxs("div", { className: "footer__mobile-contact", children: [_jsx(Text, { as: "h4", className: "footer__mobile-contact-title", children: contact.title }), _jsxs("div", { className: "footer__mobile-contact-info", children: [contact.addressLines.map(function (line) { return (_jsx("p", { children: line }, line)); }), contact.phone && _jsxs("p", { children: ["Tel: ", contact.phone] }), contact.fax && _jsxs("p", { children: ["Fax: ", contact.fax] }), contact.email && (_jsx(Link, { href: "mailto:".concat(contact.email), theme: "dark", className: "text-xs no-underline", children: contact.email }))] })] }), _jsxs("div", { className: "footer__mobile-footer", children: [_jsx("a", { href: homeUrl !== null && homeUrl !== void 0 ? homeUrl : "/", onClick: function (e) {
|
|
29
18
|
e.preventDefault();
|
|
30
19
|
onLinkClick === null || onLinkClick === void 0 ? void 0 : onLinkClick({ label: "Home", route: homeUrl !== null && homeUrl !== void 0 ? homeUrl : "/" });
|
|
31
|
-
}
|
|
20
|
+
}, children: logo }), _jsxs(Text, { as: "p", className: "footer__mobile-copyright", children: ["\u00A9 ", year, " Mautourco, All Rights Reserved"] })] })] })] }) }));
|
|
32
21
|
};
|
|
33
22
|
var defaultColumns = [
|
|
34
23
|
{
|
|
@@ -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 Chip from '../../atoms/Chip/Chip';
|
|
@@ -36,10 +25,10 @@ var DocketDetails = function (_a) {
|
|
|
36
25
|
var data = _a.data;
|
|
37
26
|
var type = data.type, serviceName = data.serviceName, startDate = data.startDate, endDate = data.endDate, nights = data.nights, clientType = data.clientType, adults = data.adults, children = data.children, roomType = data.roomType, mealPlan = data.mealPlan, details = data.details, errorMessage = data.errorMessage;
|
|
38
27
|
var icon = getServiceIcon(type);
|
|
39
|
-
return (_jsxs("div",
|
|
28
|
+
return (_jsxs("div", { className: "multiple-quotation-docket__details", children: [errorMessage && (_jsx("div", { className: "multiple-quotation-docket__error", children: _jsx(Text, { variant: "bold", size: "sm", color: "state-error", children: errorMessage }) })), serviceName && (_jsx("div", { className: "multiple-quotation-docket__service-name", children: _jsx(Text, { variant: "bold", size: "base", children: serviceName }) })), (startDate || endDate || nights) && (_jsxs("div", { className: "multiple-quotation-docket__date-info", children: [startDate && endDate && (_jsxs("div", { className: "multiple-quotation-docket__date-range", children: [_jsx(TextWithIcon, { icon: "calendar-range-outline", color: "accent", children: startDate }), _jsx(Icon, { name: "arrow-right-outline", size: "sm" }), _jsx(TextWithIcon, { icon: "calendar-range-outline", color: "accent", children: endDate })] })), nights !== undefined && (_jsxs(TextWithIcon, { icon: "night", color: "subtle", children: [nights, " nights"] }))] })), (clientType || adults || children) && (_jsxs("div", { className: "multiple-quotation-docket__client-info", children: [clientType && (_jsxs("div", { className: "multiple-quotation-docket__client-type", children: [_jsx(Text, { variant: "bold", size: "sm", color: "subtle", children: "Client type:" }), _jsx(Text, { variant: "medium", size: "sm", color: "subtle", children: clientType })] })), _jsxs("div", { className: "multiple-quotation-docket__guests", children: [adults !== undefined && (_jsxs(TextWithIcon, { icon: "user", color: "subtle", children: [adults, " Adults"] })), children && children.length > 0 && (_jsx("div", { className: "multiple-quotation-docket__children", children: children.map(function (child, index) { return (_jsxs("div", { className: "multiple-quotation-docket__child", children: [_jsx(TextWithIcon, { icon: "user", color: "subtle", children: _jsxs("span", { children: [_jsx("span", { children: "1 Child " }), _jsxs("span", { className: "multiple-quotation-docket__child-age", children: ["(", child.age, " y.o)"] })] }) }), index < children.length - 1 && (_jsx("div", { className: "multiple-quotation-docket__divider" }))] }, index)); }) }))] })] })), (roomType || mealPlan) && (_jsxs("div", { className: "multiple-quotation-docket__room-info", children: [roomType && (_jsx(TextWithIcon, { icon: "accom", color: "subtle", children: roomType })), mealPlan && (_jsxs("div", { className: "multiple-quotation-docket__meal-plan", children: [_jsx(TextWithIcon, { icon: "utensils", color: "subtle", children: "Meal-Plan" }), _jsx("div", { className: "multiple-quotation-docket__divider" }), _jsx(Text, { variant: "medium", size: "sm", color: "subtle", children: mealPlan })] }))] })), details && details.length > 0 && (_jsx("div", { className: "multiple-quotation-docket__additional-details", children: details.map(function (detail, index) { return (_jsxs(TextWithIcon, { icon: detail.icon, color: "subtle", children: [detail.label, ": ", detail.value] }, index)); }) }))] }));
|
|
40
29
|
};
|
|
41
30
|
export var MultipleQuotationDocket = function (_a) {
|
|
42
31
|
var _b = _a.title, title = _b === void 0 ? 'Your quotation' : _b, services = _a.services, totalPrices = _a.totalPrices, onMoreOptionsClick = _a.onMoreOptionsClick, onAddNewQuoteClick = _a.onAddNewQuoteClick, onViewClick = _a.onViewClick, onSaveClick = _a.onSaveClick, onBookNowClick = _a.onBookNowClick, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
43
|
-
return (_jsxs(CardContainer,
|
|
32
|
+
return (_jsxs(CardContainer, { spacing: "chill", className: "multiple-quotation-docket ".concat(className), children: [_jsxs("div", { className: "multiple-quotation-docket__header", children: [_jsxs("div", { className: "multiple-quotation-docket__title", children: [_jsx(Icon, { name: "quotation", size: "lg" }), _jsx(Heading, { level: 4, variant: "bold", className: "multiple-quotation-docket__title-text", children: title })] }), onMoreOptionsClick && (_jsx(Chip, { type: "outline", color: "neutral", size: "sm", trailingIcon: "chevron-down", onClick: onMoreOptionsClick, className: "multiple-quotation-docket__more-options", children: "More options" }))] }), _jsx("div", { className: "multiple-quotation-docket__services", children: services.map(function (service, index) { return (_jsxs("div", { className: "multiple-quotation-docket__service", children: [_jsxs("div", { className: "multiple-quotation-docket__service-header", children: [_jsxs("div", { className: "multiple-quotation-docket__service-title", children: [_jsx("div", { className: "multiple-quotation-docket__section-bar" }), _jsx(Icon, { name: getServiceIcon(service.type), size: "sm", color: "var(--color-icon-branded, #0f7173)" }), _jsx(Text, { variant: "bold", size: "sm", color: "accent", children: service.type })] }), _jsxs(Chip, { type: "filled", color: "accent", size: "sm", children: [service.currency, " ", service.price] })] }), _jsx(DocketDetails, { data: service })] }, index)); }) }), totalPrices.length > 0 && (_jsxs("div", { className: "multiple-quotation-docket__total", children: [_jsx("div", { className: "multiple-quotation-docket__total-line" }), _jsxs("div", { className: "multiple-quotation-docket__total-content", children: [_jsx(Text, { variant: "bold", size: "sm", children: "Total :" }), _jsx("div", { className: "multiple-quotation-docket__total-prices", children: totalPrices.map(function (total, index) { return (_jsxs(Text, { variant: "bold", size: "sm", children: [total.currency, " ", total.amount] }, index)); }) })] }), _jsx("div", { className: "multiple-quotation-docket__total-line" })] })), _jsxs("div", { className: "multiple-quotation-docket__actions", children: [onAddNewQuoteClick && (_jsx(Button, { variant: "outline-secondary", size: "sm", leadingIcon: "plus", onClick: onAddNewQuoteClick, className: "multiple-quotation-docket__action-button", children: "Add new quote" })), _jsxs("div", { className: "multiple-quotation-docket__action-group", children: [onViewClick && (_jsx(Button, { variant: "outline-secondary", size: "sm", onClick: onViewClick, className: "multiple-quotation-docket__action-button multiple-quotation-docket__action-button--flex", children: "View" })), onSaveClick && (_jsx(Button, { variant: "outline-secondary", size: "sm", onClick: onSaveClick, className: "multiple-quotation-docket__action-button multiple-quotation-docket__action-button--flex", children: "Save" })), onBookNowClick && (_jsx(Button, { variant: "primary", size: "sm", onClick: onBookNowClick, className: "multiple-quotation-docket__action-button multiple-quotation-docket__action-button--book", children: "Book now" }))] })] })] }));
|
|
44
33
|
};
|
|
45
34
|
export default MultipleQuotationDocket;
|