@mirai/core 0.3.37 → 0.3.38
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/build/Core.Notifications.js +50 -67
- package/build/Core.Notifications.js.map +1 -1
- package/build/Core.constants.js +11 -14
- package/build/Core.constants.js.map +1 -1
- package/build/Core.definition.js +3 -3
- package/build/Core.definition.js.map +1 -1
- package/build/Core.js +46 -73
- package/build/Core.js.map +1 -1
- package/build/Core.provider.js +41 -91
- package/build/Core.provider.js.map +1 -1
- package/build/components/Booking/Booking.constants.js +14 -14
- package/build/components/Booking/Booking.constants.js.map +1 -1
- package/build/components/Booking/Booking.js +100 -134
- package/build/components/Booking/Booking.js.map +1 -1
- package/build/components/Booking/Booking.l10n.js +37 -29
- package/build/components/Booking/Booking.l10n.js.map +1 -1
- package/build/components/Booking/Booking.skeleton.js +6 -4
- package/build/components/Booking/Booking.skeleton.js.map +1 -1
- package/build/components/Booking/components/Field/Field.js +23 -23
- package/build/components/Booking/components/Field/Field.js.map +1 -1
- package/build/components/Booking/components/Field/Field.l10n.js +1 -1
- package/build/components/Booking/components/Field/Field.l10n.js.map +1 -1
- package/build/components/Booking/components/Field/index.js +1 -1
- package/build/components/Booking/components/Field/index.js.map +1 -1
- package/build/components/Booking/components/index.js +1 -1
- package/build/components/Booking/components/index.js.map +1 -1
- package/build/components/Booking/helpers/getOccupationCaption.js +39 -44
- package/build/components/Booking/helpers/getOccupationCaption.js.map +1 -1
- package/build/components/Booking/helpers/index.js +2 -2
- package/build/components/Booking/helpers/index.js.map +1 -1
- package/build/components/Booking/helpers/trackStateChange.js +45 -41
- package/build/components/Booking/helpers/trackStateChange.js.map +1 -1
- package/build/components/Booking/index.js +2 -2
- package/build/components/Booking/index.js.map +1 -1
- package/build/components/Booking/partials/Booking.Details.js +56 -57
- package/build/components/Booking/partials/Booking.Details.js.map +1 -1
- package/build/components/Booking/partials/Booking.FormCancel.js +30 -32
- package/build/components/Booking/partials/Booking.FormCancel.js.map +1 -1
- package/build/components/Booking/partials/Booking.FormEdit.js +5 -3
- package/build/components/Booking/partials/Booking.FormEdit.js.map +1 -1
- package/build/components/Booking/partials/Booking.FormResend.js +16 -13
- package/build/components/Booking/partials/Booking.FormResend.js.map +1 -1
- package/build/components/Booking/partials/Booking.Menu.js +56 -79
- package/build/components/Booking/partials/Booking.Menu.js.map +1 -1
- package/build/components/Booking/partials/Booking.Modal.js +70 -107
- package/build/components/Booking/partials/Booking.Modal.js.map +1 -1
- package/build/components/Booking/partials/Booking.ModalAgency.js +17 -17
- package/build/components/Booking/partials/Booking.ModalAgency.js.map +1 -1
- package/build/components/Booking/partials/Booking.Others.js +31 -45
- package/build/components/Booking/partials/Booking.Others.js.map +1 -1
- package/build/components/Booking/partials/Booking.PriceBreakdown.js +62 -87
- package/build/components/Booking/partials/Booking.PriceBreakdown.js.map +1 -1
- package/build/components/Booking/partials/Booking.Summary.js +48 -63
- package/build/components/Booking/partials/Booking.Summary.js.map +1 -1
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Details.test.js.snap +12 -12
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Menu.test.js.snap +20 -20
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Modal.test.js.snap +4 -4
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Others.test.js.snap +4 -4
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Summary.test.js.snap +4 -4
- package/build/components/Booking/partials/index.js +6 -6
- package/build/components/Booking/partials/index.js.map +1 -1
- package/build/components/BookingQuery/BookingQuery.constants.js +2 -2
- package/build/components/BookingQuery/BookingQuery.constants.js.map +1 -1
- package/build/components/BookingQuery/BookingQuery.js +53 -106
- package/build/components/BookingQuery/BookingQuery.js.map +1 -1
- package/build/components/BookingQuery/BookingQuery.l10n.js +1 -1
- package/build/components/BookingQuery/BookingQuery.l10n.js.map +1 -1
- package/build/components/BookingQuery/BookingQuery.skeleton.js +2 -3
- package/build/components/BookingQuery/BookingQuery.skeleton.js.map +1 -1
- package/build/components/BookingQuery/__tests__/__snapshots__/BookingQuery.test.js.snap +12 -12
- package/build/components/BookingQuery/helpers/getErrorText.js +2 -3
- package/build/components/BookingQuery/helpers/getErrorText.js.map +1 -1
- package/build/components/BookingQuery/helpers/index.js +1 -1
- package/build/components/BookingQuery/helpers/index.js.map +1 -1
- package/build/components/BookingQuery/index.js +2 -2
- package/build/components/BookingQuery/index.js.map +1 -1
- package/build/components/Checkout/Checkout.constants.js +12 -12
- package/build/components/Checkout/Checkout.constants.js.map +1 -1
- package/build/components/Checkout/Checkout.js +84 -118
- package/build/components/Checkout/Checkout.js.map +1 -1
- package/build/components/Checkout/Checkout.l10n.js +12 -13
- package/build/components/Checkout/Checkout.l10n.js.map +1 -1
- package/build/components/Checkout/Checkout.skeleton.js +6 -4
- package/build/components/Checkout/Checkout.skeleton.js.map +1 -1
- package/build/components/Checkout/components/InputRadio/InputRadio.js +24 -30
- package/build/components/Checkout/components/InputRadio/InputRadio.js.map +1 -1
- package/build/components/Checkout/components/InputRadio/index.js +1 -1
- package/build/components/Checkout/components/InputRadio/index.js.map +1 -1
- package/build/components/Checkout/components/index.js +1 -1
- package/build/components/Checkout/components/index.js.map +1 -1
- package/build/components/Checkout/helpers/generateId.js +6 -5
- package/build/components/Checkout/helpers/generateId.js.map +1 -1
- package/build/components/Checkout/helpers/getFieldProps.js +24 -31
- package/build/components/Checkout/helpers/getFieldProps.js.map +1 -1
- package/build/components/Checkout/helpers/getVariant.js +11 -17
- package/build/components/Checkout/helpers/getVariant.js.map +1 -1
- package/build/components/Checkout/helpers/index.js +5 -5
- package/build/components/Checkout/helpers/index.js.map +1 -1
- package/build/components/Checkout/helpers/testDNI.js +3 -2
- package/build/components/Checkout/helpers/testDNI.js.map +1 -1
- package/build/components/Checkout/helpers/trackDataSource.js +72 -72
- package/build/components/Checkout/helpers/trackDataSource.js.map +1 -1
- package/build/components/Checkout/helpers/trackForm.js +13 -11
- package/build/components/Checkout/helpers/trackForm.js.map +1 -1
- package/build/components/Checkout/index.js +2 -2
- package/build/components/Checkout/index.js.map +1 -1
- package/build/components/Checkout/partials/Checkout.Confirmation.js +123 -160
- package/build/components/Checkout/partials/Checkout.Confirmation.js.map +1 -1
- package/build/components/Checkout/partials/Checkout.Details.js +72 -82
- package/build/components/Checkout/partials/Checkout.Details.js.map +1 -1
- package/build/components/Checkout/partials/Checkout.Form.js +102 -146
- package/build/components/Checkout/partials/Checkout.Form.js.map +1 -1
- package/build/components/Checkout/partials/Checkout.Session.js +35 -43
- package/build/components/Checkout/partials/Checkout.Session.js.map +1 -1
- package/build/components/Checkout/partials/Checkout.Summary.Line.js +21 -20
- package/build/components/Checkout/partials/Checkout.Summary.Line.js.map +1 -1
- package/build/components/Checkout/partials/Checkout.Summary.js +86 -80
- package/build/components/Checkout/partials/Checkout.Summary.js.map +1 -1
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Confirmation.test.js.snap +6 -6
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Details.test.js.snap +6 -6
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Form.test.js.snap +4 -4
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Session.test.js.snap +8 -8
- package/build/components/Checkout/partials/index.js +5 -5
- package/build/components/Checkout/partials/index.js.map +1 -1
- package/build/components/Deals/Deals.Calendar.js +82 -97
- package/build/components/Deals/Deals.Calendar.js.map +1 -1
- package/build/components/Deals/Deals.constants.js +5 -5
- package/build/components/Deals/Deals.constants.js.map +1 -1
- package/build/components/Deals/Deals.js +111 -165
- package/build/components/Deals/Deals.js.map +1 -1
- package/build/components/Deals/Deals.l10n.js +11 -9
- package/build/components/Deals/Deals.l10n.js.map +1 -1
- package/build/components/Deals/Deals.skeleton.js +5 -3
- package/build/components/Deals/Deals.skeleton.js.map +1 -1
- package/build/components/Deals/__tests__/__snapshots__/Deals.Calendar.test.js.snap +3 -3
- package/build/components/Deals/__tests__/__snapshots__/Deals.test.js.snap +17 -17
- package/build/components/Deals/helpers/calcFromDate.js +7 -6
- package/build/components/Deals/helpers/calcFromDate.js.map +1 -1
- package/build/components/Deals/helpers/calcMinStay.js +6 -7
- package/build/components/Deals/helpers/calcMinStay.js.map +1 -1
- package/build/components/Deals/helpers/calcNightWithDeals.js +5 -4
- package/build/components/Deals/helpers/calcNightWithDeals.js.map +1 -1
- package/build/components/Deals/helpers/calcToDate.js +5 -10
- package/build/components/Deals/helpers/calcToDate.js.map +1 -1
- package/build/components/Deals/helpers/calcTooltips.js +15 -14
- package/build/components/Deals/helpers/calcTooltips.js.map +1 -1
- package/build/components/Deals/helpers/getCurrency.js +11 -9
- package/build/components/Deals/helpers/getCurrency.js.map +1 -1
- package/build/components/Deals/helpers/index.js +7 -7
- package/build/components/Deals/helpers/index.js.map +1 -1
- package/build/components/Deals/helpers/validate.js +15 -24
- package/build/components/Deals/helpers/validate.js.map +1 -1
- package/build/components/Deals/index.js +2 -2
- package/build/components/Deals/index.js.map +1 -1
- package/build/components/Environment/Environment.State.js +60 -68
- package/build/components/Environment/Environment.State.js.map +1 -1
- package/build/components/Environment/Environment.constants.js +1 -1
- package/build/components/Environment/Environment.constants.js.map +1 -1
- package/build/components/Environment/Environment.js +22 -25
- package/build/components/Environment/Environment.js.map +1 -1
- package/build/components/Environment/index.js +2 -2
- package/build/components/Environment/index.js.map +1 -1
- package/build/components/Finder/Finder.compact.js +54 -74
- package/build/components/Finder/Finder.compact.js.map +1 -1
- package/build/components/Finder/Finder.constants.js +9 -7
- package/build/components/Finder/Finder.constants.js.map +1 -1
- package/build/components/Finder/Finder.js +121 -152
- package/build/components/Finder/Finder.js.map +1 -1
- package/build/components/Finder/Finder.l10n.js +1 -1
- package/build/components/Finder/Finder.l10n.js.map +1 -1
- package/build/components/Finder/Finder.skeleton.js +24 -23
- package/build/components/Finder/Finder.skeleton.js.map +1 -1
- package/build/components/Finder/__tests__/__snapshots__/Finder.test.js.snap +44 -44
- package/build/components/Finder/components/Calendar/Calendar.constants.js +6 -6
- package/build/components/Finder/components/Calendar/Calendar.constants.js.map +1 -1
- package/build/components/Finder/components/Calendar/Calendar.js +77 -125
- package/build/components/Finder/components/Calendar/Calendar.js.map +1 -1
- package/build/components/Finder/components/Calendar/Calendar.l10n.js +13 -13
- package/build/components/Finder/components/Calendar/Calendar.l10n.js.map +1 -1
- package/build/components/Finder/components/Calendar/__tests__/__snapshots__/Calendar.test.js.snap +8 -8
- package/build/components/Finder/components/Calendar/helpers/fetchPrices.js +37 -74
- package/build/components/Finder/components/Calendar/helpers/fetchPrices.js.map +1 -1
- package/build/components/Finder/components/Calendar/helpers/getVisibleDate.js +4 -3
- package/build/components/Finder/components/Calendar/helpers/getVisibleDate.js.map +1 -1
- package/build/components/Finder/components/Calendar/helpers/index.js +2 -2
- package/build/components/Finder/components/Calendar/helpers/index.js.map +1 -1
- package/build/components/Finder/components/Calendar/index.js +1 -1
- package/build/components/Finder/components/Calendar/index.js.map +1 -1
- package/build/components/Finder/components/Places/Places.js +38 -46
- package/build/components/Finder/components/Places/Places.js.map +1 -1
- package/build/components/Finder/components/Places/Places.l10n.js +1 -1
- package/build/components/Finder/components/Places/Places.l10n.js.map +1 -1
- package/build/components/Finder/components/Places/helpers/calcColumns.js +27 -26
- package/build/components/Finder/components/Places/helpers/calcColumns.js.map +1 -1
- package/build/components/Finder/components/Places/helpers/index.js +1 -1
- package/build/components/Finder/components/Places/helpers/index.js.map +1 -1
- package/build/components/Finder/components/Places/index.js +1 -1
- package/build/components/Finder/components/Places/index.js.map +1 -1
- package/build/components/Finder/components/index.js +2 -2
- package/build/components/Finder/components/index.js.map +1 -1
- package/build/components/Finder/helpers/getDataSource.js +35 -42
- package/build/components/Finder/helpers/getDataSource.js.map +1 -1
- package/build/components/Finder/helpers/getForwarderUrl.js +37 -51
- package/build/components/Finder/helpers/getForwarderUrl.js.map +1 -1
- package/build/components/Finder/helpers/getHotels.js +17 -29
- package/build/components/Finder/helpers/getHotels.js.map +1 -1
- package/build/components/Finder/helpers/getOccupationDataSource.js +53 -67
- package/build/components/Finder/helpers/getOccupationDataSource.js.map +1 -1
- package/build/components/Finder/helpers/getPlaceCaption.js +6 -6
- package/build/components/Finder/helpers/getPlaceCaption.js.map +1 -1
- package/build/components/Finder/helpers/getPlacesOptions.js +24 -30
- package/build/components/Finder/helpers/getPlacesOptions.js.map +1 -1
- package/build/components/Finder/helpers/index.js +9 -9
- package/build/components/Finder/helpers/index.js.map +1 -1
- package/build/components/Finder/helpers/parseCalendarProps.js +13 -14
- package/build/components/Finder/helpers/parseCalendarProps.js.map +1 -1
- package/build/components/Finder/helpers/parseValue.js +12 -10
- package/build/components/Finder/helpers/parseValue.js.map +1 -1
- package/build/components/Finder/helpers/validate.js +5 -4
- package/build/components/Finder/helpers/validate.js.map +1 -1
- package/build/components/Finder/index.js +2 -2
- package/build/components/Finder/index.js.map +1 -1
- package/build/components/Profile/Profile.Account.js +59 -118
- package/build/components/Profile/Profile.Account.js.map +1 -1
- package/build/components/Profile/Profile.Password.js +55 -105
- package/build/components/Profile/Profile.Password.js.map +1 -1
- package/build/components/Profile/Profile.Signout.js +31 -68
- package/build/components/Profile/Profile.Signout.js.map +1 -1
- package/build/components/Profile/Profile.constants.js +3 -3
- package/build/components/Profile/Profile.constants.js.map +1 -1
- package/build/components/Profile/Profile.js +20 -30
- package/build/components/Profile/Profile.js.map +1 -1
- package/build/components/Profile/Profile.l10n.js +1 -1
- package/build/components/Profile/Profile.l10n.js.map +1 -1
- package/build/components/Profile/Profile.skeleton.js +108 -109
- package/build/components/Profile/Profile.skeleton.js.map +1 -1
- package/build/components/Profile/components/Bookings/Booking.constants.js +5 -5
- package/build/components/Profile/components/Bookings/Booking.constants.js.map +1 -1
- package/build/components/Profile/components/Bookings/Booking.l10n.js +1 -1
- package/build/components/Profile/components/Bookings/Booking.l10n.js.map +1 -1
- package/build/components/Profile/components/Bookings/Bookings.Item.js +36 -35
- package/build/components/Profile/components/Bookings/Bookings.Item.js.map +1 -1
- package/build/components/Profile/components/Bookings/Bookings.Search.js +23 -34
- package/build/components/Profile/components/Bookings/Bookings.Search.js.map +1 -1
- package/build/components/Profile/components/Bookings/Bookings.js +62 -92
- package/build/components/Profile/components/Bookings/Bookings.js.map +1 -1
- package/build/components/Profile/components/Bookings/helpers/groupDatasource.js +12 -18
- package/build/components/Profile/components/Bookings/helpers/groupDatasource.js.map +1 -1
- package/build/components/Profile/components/Bookings/helpers/index.js +1 -1
- package/build/components/Profile/components/Bookings/helpers/index.js.map +1 -1
- package/build/components/Profile/components/Bookings/index.js +1 -1
- package/build/components/Profile/components/Bookings/index.js.map +1 -1
- package/build/components/Profile/components/index.js +1 -1
- package/build/components/Profile/components/index.js.map +1 -1
- package/build/components/Profile/index.js +2 -2
- package/build/components/Profile/index.js.map +1 -1
- package/build/components/Rates/Rates.Filter.js +83 -96
- package/build/components/Rates/Rates.Filter.js.map +1 -1
- package/build/components/Rates/Rates.Footer.js +70 -87
- package/build/components/Rates/Rates.Footer.js.map +1 -1
- package/build/components/Rates/Rates.Skeleton.js +66 -66
- package/build/components/Rates/Rates.Skeleton.js.map +1 -1
- package/build/components/Rates/Rates.js +88 -191
- package/build/components/Rates/Rates.js.map +1 -1
- package/build/components/Rates/Rates.l10n.js +1 -1
- package/build/components/Rates/Rates.l10n.js.map +1 -1
- package/build/components/Rates/components/Item/Item.js +96 -131
- package/build/components/Rates/components/Item/Item.js.map +1 -1
- package/build/components/Rates/components/Item/Item.l10n.js +1 -1
- package/build/components/Rates/components/Item/Item.l10n.js.map +1 -1
- package/build/components/Rates/components/Item/components/Amenities/Amenities.js +15 -17
- package/build/components/Rates/components/Item/components/Amenities/Amenities.js.map +1 -1
- package/build/components/Rates/components/Item/components/Amenities/index.js +1 -1
- package/build/components/Rates/components/Item/components/Amenities/index.js.map +1 -1
- package/build/components/Rates/components/Item/components/Discount/Discount.js +48 -43
- package/build/components/Rates/components/Item/components/Discount/Discount.js.map +1 -1
- package/build/components/Rates/components/Item/components/Discount/index.js +1 -1
- package/build/components/Rates/components/Item/components/Discount/index.js.map +1 -1
- package/build/components/Rates/components/Item/components/Features/Features.js +21 -28
- package/build/components/Rates/components/Item/components/Features/Features.js.map +1 -1
- package/build/components/Rates/components/Item/components/Features/index.js +1 -1
- package/build/components/Rates/components/Item/components/Features/index.js.map +1 -1
- package/build/components/Rates/components/Item/components/ModalInfo/ModalInfo.js +23 -21
- package/build/components/Rates/components/Item/components/ModalInfo/ModalInfo.js.map +1 -1
- package/build/components/Rates/components/Item/components/ModalInfo/index.js +1 -1
- package/build/components/Rates/components/Item/components/ModalInfo/index.js.map +1 -1
- package/build/components/Rates/components/Item/components/ModalRateInfo/ModalRateInfo.js +16 -16
- package/build/components/Rates/components/Item/components/ModalRateInfo/ModalRateInfo.js.map +1 -1
- package/build/components/Rates/components/Item/components/ModalRateInfo/index.js +1 -1
- package/build/components/Rates/components/Item/components/ModalRateInfo/index.js.map +1 -1
- package/build/components/Rates/components/Item/components/index.js +5 -5
- package/build/components/Rates/components/Item/components/index.js.map +1 -1
- package/build/components/Rates/components/Item/index.js +3 -3
- package/build/components/Rates/components/Item/index.js.map +1 -1
- package/build/components/Rates/components/index.js +1 -1
- package/build/components/Rates/components/index.js.map +1 -1
- package/build/components/Rates/helpers/getForwarderUrl.js +39 -52
- package/build/components/Rates/helpers/getForwarderUrl.js.map +1 -1
- package/build/components/Rates/helpers/index.js +1 -1
- package/build/components/Rates/helpers/index.js.map +1 -1
- package/build/components/Rates/index.js +2 -2
- package/build/components/Rates/index.js.map +1 -1
- package/build/components/Session/Session.Account.js +51 -60
- package/build/components/Session/Session.Account.js.map +1 -1
- package/build/components/Session/Session.Login.Modal.js +104 -205
- package/build/components/Session/Session.Login.Modal.js.map +1 -1
- package/build/components/Session/Session.Login.js +27 -36
- package/build/components/Session/Session.Login.js.map +1 -1
- package/build/components/Session/Session.constants.js +5 -5
- package/build/components/Session/Session.constants.js.map +1 -1
- package/build/components/Session/Session.js +18 -31
- package/build/components/Session/Session.js.map +1 -1
- package/build/components/Session/Session.l10n.js +1 -1
- package/build/components/Session/Session.l10n.js.map +1 -1
- package/build/components/Session/Session.skeleton.js +7 -8
- package/build/components/Session/Session.skeleton.js.map +1 -1
- package/build/components/Session/__tests__/__snapshots__/Session.test.js.snap +15 -15
- package/build/components/Session/helpers/getDomain.js +4 -3
- package/build/components/Session/helpers/getDomain.js.map +1 -1
- package/build/components/Session/helpers/getSignupUrl.js +6 -4
- package/build/components/Session/helpers/getSignupUrl.js.map +1 -1
- package/build/components/Session/helpers/index.js +4 -4
- package/build/components/Session/helpers/index.js.map +1 -1
- package/build/components/Session/helpers/template.js +7 -9
- package/build/components/Session/helpers/template.js.map +1 -1
- package/build/components/Session/helpers/trackLogin.js +12 -9
- package/build/components/Session/helpers/trackLogin.js.map +1 -1
- package/build/components/Session/index.js +2 -2
- package/build/components/Session/index.js.map +1 -1
- package/build/components/Signup/Signup.constants.js +1 -1
- package/build/components/Signup/Signup.constants.js.map +1 -1
- package/build/components/Signup/Signup.js +54 -122
- package/build/components/Signup/Signup.js.map +1 -1
- package/build/components/Signup/Signup.l10n.js +1 -1
- package/build/components/Signup/Signup.l10n.js.map +1 -1
- package/build/components/Signup/Signup.skeleton.js +81 -82
- package/build/components/Signup/Signup.skeleton.js.map +1 -1
- package/build/components/Signup/__tests__/__snapshots__/Signup.test.js.snap +9 -9
- package/build/components/Signup/index.js +2 -2
- package/build/components/Signup/index.js.map +1 -1
- package/build/components/__shared__/BookingDates/BookingDates.constants.js +1 -1
- package/build/components/__shared__/BookingDates/BookingDates.constants.js.map +1 -1
- package/build/components/__shared__/BookingDates/BookingDates.js +29 -30
- package/build/components/__shared__/BookingDates/BookingDates.js.map +1 -1
- package/build/components/__shared__/BookingDates/BookingDates.l10n.js +1 -1
- package/build/components/__shared__/BookingDates/BookingDates.l10n.js.map +1 -1
- package/build/components/__shared__/BookingDates/index.js +1 -1
- package/build/components/__shared__/BookingDates/index.js.map +1 -1
- package/build/components/__shared__/BookingTable/BookingTable.Row.js +46 -53
- package/build/components/__shared__/BookingTable/BookingTable.Row.js.map +1 -1
- package/build/components/__shared__/BookingTable/BookingTable.constants.js +3 -3
- package/build/components/__shared__/BookingTable/BookingTable.constants.js.map +1 -1
- package/build/components/__shared__/BookingTable/BookingTable.js +34 -51
- package/build/components/__shared__/BookingTable/BookingTable.js.map +1 -1
- package/build/components/__shared__/BookingTable/BookingTable.l10n.js +1 -1
- package/build/components/__shared__/BookingTable/BookingTable.l10n.js.map +1 -1
- package/build/components/__shared__/BookingTable/index.js +1 -1
- package/build/components/__shared__/BookingTable/index.js.map +1 -1
- package/build/components/__shared__/ButtonMore/ButtonMore.js +16 -15
- package/build/components/__shared__/ButtonMore/ButtonMore.js.map +1 -1
- package/build/components/__shared__/ButtonMore/ButtonMore.l10n.js +1 -1
- package/build/components/__shared__/ButtonMore/ButtonMore.l10n.js.map +1 -1
- package/build/components/__shared__/ButtonMore/__tests__/__snapshots__/ButtonMore.test.js.snap +3 -3
- package/build/components/__shared__/ButtonMore/index.js +1 -1
- package/build/components/__shared__/ButtonMore/index.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/ButtonPayment.constants.js +5 -5
- package/build/components/__shared__/ButtonPayment/ButtonPayment.constants.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/ButtonPayment.js +132 -218
- package/build/components/__shared__/ButtonPayment/ButtonPayment.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/ButtonPayment.l10n.js +1 -1
- package/build/components/__shared__/ButtonPayment/ButtonPayment.l10n.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/__tests__/__snapshots__/ButtonPayment.test.js.snap +4 -4
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.js +30 -45
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.l10n.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.l10n.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormAddon/helpers/getCtaKey.js +11 -8
- package/build/components/__shared__/ButtonPayment/components/FormAddon/helpers/getCtaKey.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormAddon/helpers/index.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormAddon/helpers/index.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormAddon/index.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormAddon/index.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.constants.js +2 -2
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.constants.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.js +74 -91
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.l10n.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.l10n.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/helpers/getStyle.js +9 -7
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/helpers/getStyle.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/helpers/index.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/helpers/index.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/index.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/index.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.constants.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.constants.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.js +63 -83
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.l10n.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/FormPaycomet.l10n.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/helpers/index.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/helpers/index.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/helpers/useMutationObserver.js +7 -8
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/helpers/useMutationObserver.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/index.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormPaycomet/index.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.constants.js +11 -9
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.constants.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.js +49 -66
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.l10n.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/FormSipay.l10n.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/__tests__/__snapshots__/FormSipay.test.js.snap +3 -3
- package/build/components/__shared__/ButtonPayment/components/FormSipay/helpers/getStyle.js +7 -5
- package/build/components/__shared__/ButtonPayment/components/FormSipay/helpers/getStyle.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/helpers/index.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/helpers/index.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/index.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormSipay/index.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/InputField/InputField.js +13 -15
- package/build/components/__shared__/ButtonPayment/components/InputField/InputField.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/InputField/index.js +1 -1
- package/build/components/__shared__/ButtonPayment/components/InputField/index.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/index.js +4 -4
- package/build/components/__shared__/ButtonPayment/components/index.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/helpers/getComponent.js +19 -14
- package/build/components/__shared__/ButtonPayment/helpers/getComponent.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/helpers/getUrl.js +5 -16
- package/build/components/__shared__/ButtonPayment/helpers/getUrl.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/helpers/getUrlBooking.js +24 -22
- package/build/components/__shared__/ButtonPayment/helpers/getUrlBooking.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/helpers/getUrlCriptan.js +10 -7
- package/build/components/__shared__/ButtonPayment/helpers/getUrlCriptan.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/helpers/getUrlTpv.js +23 -21
- package/build/components/__shared__/ButtonPayment/helpers/getUrlTpv.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/helpers/index.js +3 -3
- package/build/components/__shared__/ButtonPayment/helpers/index.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/helpers/loadScript.js +11 -9
- package/build/components/__shared__/ButtonPayment/helpers/loadScript.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/helpers/toUrlParams.js +7 -9
- package/build/components/__shared__/ButtonPayment/helpers/toUrlParams.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/index.js +1 -1
- package/build/components/__shared__/ButtonPayment/index.js.map +1 -1
- package/build/components/__shared__/Field/Field.js +32 -36
- package/build/components/__shared__/Field/Field.js.map +1 -1
- package/build/components/__shared__/Field/__tests__/__snapshots__/Field.test.js.snap +14 -14
- package/build/components/__shared__/Field/index.js +1 -1
- package/build/components/__shared__/Field/index.js.map +1 -1
- package/build/components/__shared__/FieldOccupation/FieldOccupation.js +34 -39
- package/build/components/__shared__/FieldOccupation/FieldOccupation.js.map +1 -1
- package/build/components/__shared__/FieldOccupation/FieldOccupation.l10n.js +1 -1
- package/build/components/__shared__/FieldOccupation/FieldOccupation.l10n.js.map +1 -1
- package/build/components/__shared__/FieldOccupation/__tests__/__snapshots__/FieldOccupation.test.js.snap +16 -16
- package/build/components/__shared__/FieldOccupation/helpers/getAccommodationType.js +21 -25
- package/build/components/__shared__/FieldOccupation/helpers/getAccommodationType.js.map +1 -1
- package/build/components/__shared__/FieldOccupation/helpers/getOccupationCaption.js +31 -29
- package/build/components/__shared__/FieldOccupation/helpers/getOccupationCaption.js.map +1 -1
- package/build/components/__shared__/FieldOccupation/helpers/index.js +2 -2
- package/build/components/__shared__/FieldOccupation/helpers/index.js.map +1 -1
- package/build/components/__shared__/FieldOccupation/index.js +1 -1
- package/build/components/__shared__/FieldOccupation/index.js.map +1 -1
- package/build/components/__shared__/FieldPromocode/FieldPromocode.js +12 -12
- package/build/components/__shared__/FieldPromocode/FieldPromocode.js.map +1 -1
- package/build/components/__shared__/FieldPromocode/FieldPromocode.l10n.js +1 -1
- package/build/components/__shared__/FieldPromocode/FieldPromocode.l10n.js.map +1 -1
- package/build/components/__shared__/FieldPromocode/index.js +1 -1
- package/build/components/__shared__/FieldPromocode/index.js.map +1 -1
- package/build/components/__shared__/Occupation/Occupation.Group.js +32 -36
- package/build/components/__shared__/Occupation/Occupation.Group.js.map +1 -1
- package/build/components/__shared__/Occupation/Occupation.constants.js +22 -19
- package/build/components/__shared__/Occupation/Occupation.constants.js.map +1 -1
- package/build/components/__shared__/Occupation/Occupation.js +71 -118
- package/build/components/__shared__/Occupation/Occupation.js.map +1 -1
- package/build/components/__shared__/Occupation/Occupation.l10n.js +18 -16
- package/build/components/__shared__/Occupation/Occupation.l10n.js.map +1 -1
- package/build/components/__shared__/Occupation/__tests__/__snapshots__/Occupation.test.js.snap +7 -7
- package/build/components/__shared__/Occupation/helpers/checkRoom.js +19 -19
- package/build/components/__shared__/Occupation/helpers/checkRoom.js.map +1 -1
- package/build/components/__shared__/Occupation/helpers/consolidateValue.js +47 -51
- package/build/components/__shared__/Occupation/helpers/consolidateValue.js.map +1 -1
- package/build/components/__shared__/Occupation/helpers/getAgeOptions.js +5 -16
- package/build/components/__shared__/Occupation/helpers/getAgeOptions.js.map +1 -1
- package/build/components/__shared__/Occupation/helpers/getGroupHint.js +7 -15
- package/build/components/__shared__/Occupation/helpers/getGroupHint.js.map +1 -1
- package/build/components/__shared__/Occupation/helpers/getScrollHeight.js +8 -9
- package/build/components/__shared__/Occupation/helpers/getScrollHeight.js.map +1 -1
- package/build/components/__shared__/Occupation/helpers/index.js +6 -6
- package/build/components/__shared__/Occupation/helpers/index.js.map +1 -1
- package/build/components/__shared__/Occupation/helpers/prepareRoom.js +17 -15
- package/build/components/__shared__/Occupation/helpers/prepareRoom.js.map +1 -1
- package/build/components/__shared__/Occupation/helpers/toParties.js +18 -19
- package/build/components/__shared__/Occupation/helpers/toParties.js.map +1 -1
- package/build/components/__shared__/Occupation/index.js +2 -2
- package/build/components/__shared__/Occupation/index.js.map +1 -1
- package/build/components/__shared__/Payment/Payment.constants.js +6 -6
- package/build/components/__shared__/Payment/Payment.constants.js.map +1 -1
- package/build/components/__shared__/Payment/Payment.js +78 -94
- package/build/components/__shared__/Payment/Payment.js.map +1 -1
- package/build/components/__shared__/Payment/Payment.l10n.js +1 -1
- package/build/components/__shared__/Payment/Payment.l10n.js.map +1 -1
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.constants.js +10 -10
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.constants.js.map +1 -1
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.js +64 -85
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.js.map +1 -1
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.l10n.js +1 -1
- package/build/components/__shared__/Payment/components/AmazonPay/AmazonPay.l10n.js.map +1 -1
- package/build/components/__shared__/Payment/components/AmazonPay/helpers/getScriptUrl.js +8 -5
- package/build/components/__shared__/Payment/components/AmazonPay/helpers/getScriptUrl.js.map +1 -1
- package/build/components/__shared__/Payment/components/AmazonPay/helpers/index.js +1 -1
- package/build/components/__shared__/Payment/components/AmazonPay/helpers/index.js.map +1 -1
- package/build/components/__shared__/Payment/components/AmazonPay/index.js +1 -1
- package/build/components/__shared__/Payment/components/AmazonPay/index.js.map +1 -1
- package/build/components/__shared__/Payment/components/Aplazame/Aplazame.js +29 -46
- package/build/components/__shared__/Payment/components/Aplazame/Aplazame.js.map +1 -1
- package/build/components/__shared__/Payment/components/Aplazame/Aplazame.l10n.js +1 -1
- package/build/components/__shared__/Payment/components/Aplazame/Aplazame.l10n.js.map +1 -1
- package/build/components/__shared__/Payment/components/Aplazame/index.js +1 -1
- package/build/components/__shared__/Payment/components/Aplazame/index.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/Card.constants.js +1 -1
- package/build/components/__shared__/Payment/components/Card/Card.constants.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/Card.js +34 -54
- package/build/components/__shared__/Payment/components/Card/Card.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/Card.l10n.js +1 -1
- package/build/components/__shared__/Payment/components/Card/Card.l10n.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/helpers/formatValues.js +23 -31
- package/build/components/__shared__/Payment/components/Card/helpers/formatValues.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/helpers/getCardConfig.js +3 -4
- package/build/components/__shared__/Payment/components/Card/helpers/getCardConfig.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/helpers/getCardType.js +17 -12
- package/build/components/__shared__/Payment/components/Card/helpers/getCardType.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/helpers/index.js +5 -5
- package/build/components/__shared__/Payment/components/Card/helpers/index.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/helpers/testCVV.js +2 -3
- package/build/components/__shared__/Payment/components/Card/helpers/testCVV.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/helpers/testCard.js +4 -5
- package/build/components/__shared__/Payment/components/Card/helpers/testCard.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/helpers/testExpire.js +3 -2
- package/build/components/__shared__/Payment/components/Card/helpers/testExpire.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/index.js +1 -1
- package/build/components/__shared__/Payment/components/Card/index.js.map +1 -1
- package/build/components/__shared__/Payment/components/PCI/PCI.constants.js +6 -6
- package/build/components/__shared__/Payment/components/PCI/PCI.constants.js.map +1 -1
- package/build/components/__shared__/Payment/components/PCI/PCI.js +136 -155
- package/build/components/__shared__/Payment/components/PCI/PCI.js.map +1 -1
- package/build/components/__shared__/Payment/components/PCI/PCI.l10n.js +1 -1
- package/build/components/__shared__/Payment/components/PCI/PCI.l10n.js.map +1 -1
- package/build/components/__shared__/Payment/components/PCI/helpers/formatValues.js +15 -15
- package/build/components/__shared__/Payment/components/PCI/helpers/formatValues.js.map +1 -1
- package/build/components/__shared__/Payment/components/PCI/helpers/getStyle.js +9 -7
- package/build/components/__shared__/Payment/components/PCI/helpers/getStyle.js.map +1 -1
- package/build/components/__shared__/Payment/components/PCI/helpers/index.js +2 -2
- package/build/components/__shared__/Payment/components/PCI/helpers/index.js.map +1 -1
- package/build/components/__shared__/Payment/components/PCI/index.js +1 -1
- package/build/components/__shared__/Payment/components/PCI/index.js.map +1 -1
- package/build/components/__shared__/Payment/components/Tpv/Tpv.js +19 -36
- package/build/components/__shared__/Payment/components/Tpv/Tpv.js.map +1 -1
- package/build/components/__shared__/Payment/components/Tpv/Tpv.l10n.js +1 -1
- package/build/components/__shared__/Payment/components/Tpv/Tpv.l10n.js.map +1 -1
- package/build/components/__shared__/Payment/components/Tpv/index.js +1 -1
- package/build/components/__shared__/Payment/components/Tpv/index.js.map +1 -1
- package/build/components/__shared__/Payment/components/index.js +5 -5
- package/build/components/__shared__/Payment/components/index.js.map +1 -1
- package/build/components/__shared__/Payment/helpers/getCaption.js +31 -25
- package/build/components/__shared__/Payment/helpers/getCaption.js.map +1 -1
- package/build/components/__shared__/Payment/helpers/getComponent.js +23 -17
- package/build/components/__shared__/Payment/helpers/getComponent.js.map +1 -1
- package/build/components/__shared__/Payment/helpers/getImage.js +6 -4
- package/build/components/__shared__/Payment/helpers/getImage.js.map +1 -1
- package/build/components/__shared__/Payment/helpers/index.js +3 -3
- package/build/components/__shared__/Payment/helpers/index.js.map +1 -1
- package/build/components/__shared__/Payment/index.js +5 -5
- package/build/components/__shared__/Payment/index.js.map +1 -1
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.Line.js +21 -20
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.Line.js.map +1 -1
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.js +63 -66
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.js.map +1 -1
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.l10n.js +1 -1
- package/build/components/__shared__/PriceBreakdown/PriceBreakdown.l10n.js.map +1 -1
- package/build/components/__shared__/PriceBreakdown/index.js +1 -1
- package/build/components/__shared__/PriceBreakdown/index.js.map +1 -1
- package/build/components/__shared__/Skeleton/Skeleton.js +13 -19
- package/build/components/__shared__/Skeleton/Skeleton.js.map +1 -1
- package/build/components/__shared__/Skeleton/index.js +1 -1
- package/build/components/__shared__/Skeleton/index.js.map +1 -1
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.js +10 -8
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.js.map +1 -1
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.l10n.js +1 -1
- package/build/components/__shared__/TextRequiredFields/TextRequiredFields.l10n.js.map +1 -1
- package/build/components/__shared__/TextRequiredFields/index.js +1 -1
- package/build/components/__shared__/TextRequiredFields/index.js.map +1 -1
- package/build/components/__shared__/index.js +12 -12
- package/build/components/__shared__/index.js.map +1 -1
- package/build/components/helpers/ICON.AMENITIES.js +123 -83
- package/build/components/helpers/ICON.AMENITIES.js.map +1 -1
- package/build/components/helpers/ICON.js +43 -29
- package/build/components/helpers/ICON.js.map +1 -1
- package/build/components/helpers/constants.js +15 -13
- package/build/components/helpers/constants.js.map +1 -1
- package/build/components/helpers/getButtonPaymentKey.js +17 -11
- package/build/components/helpers/getButtonPaymentKey.js.map +1 -1
- package/build/components/helpers/getButtonPaymentKey.l10n.js +1 -1
- package/build/components/helpers/getButtonPaymentKey.l10n.js.map +1 -1
- package/build/components/helpers/getCalendarCaption.js +13 -25
- package/build/components/helpers/getCalendarCaption.js.map +1 -1
- package/build/components/helpers/getCountryCode.js +3 -2
- package/build/components/helpers/getCountryCode.js.map +1 -1
- package/build/components/helpers/index.js +13 -13
- package/build/components/helpers/index.js.map +1 -1
- package/build/components/helpers/isJest.js +1 -1
- package/build/components/helpers/isJest.js.map +1 -1
- package/build/components/helpers/parseHtml.js +37 -38
- package/build/components/helpers/parseHtml.js.map +1 -1
- package/build/components/helpers/parseToParties.js +5 -4
- package/build/components/helpers/parseToParties.js.map +1 -1
- package/build/components/helpers/testPassword.js +3 -2
- package/build/components/helpers/testPassword.js.map +1 -1
- package/build/components/helpers/toQueryString.js +9 -12
- package/build/components/helpers/toQueryString.js.map +1 -1
- package/build/components/helpers/toUrlParams.js +7 -9
- package/build/components/helpers/toUrlParams.js.map +1 -1
- package/build/components/helpers/trace.js +8 -8
- package/build/components/helpers/trace.js.map +1 -1
- package/build/components/helpers/translate.js +11 -10
- package/build/components/helpers/translate.js.map +1 -1
- package/build/components/index.js +22 -80
- package/build/components/index.js.map +1 -1
- package/build/helpers/checkSession.js +20 -42
- package/build/helpers/checkSession.js.map +1 -1
- package/build/helpers/consolidateStore.js +148 -160
- package/build/helpers/consolidateStore.js.map +1 -1
- package/build/helpers/fetchConfig.js +16 -57
- package/build/helpers/fetchConfig.js.map +1 -1
- package/build/helpers/fetchCookies.js +12 -13
- package/build/helpers/fetchCookies.js.map +1 -1
- package/build/helpers/fetchSession.js +33 -30
- package/build/helpers/fetchSession.js.map +1 -1
- package/build/helpers/fetchUrlParams.js +3 -2
- package/build/helpers/fetchUrlParams.js.map +1 -1
- package/build/helpers/findComponents.js +20 -25
- package/build/helpers/findComponents.js.map +1 -1
- package/build/helpers/findDangerousCSSRules.js +21 -48
- package/build/helpers/findDangerousCSSRules.js.map +1 -1
- package/build/helpers/findInstance.js +20 -34
- package/build/helpers/findInstance.js.map +1 -1
- package/build/helpers/getAccommodationType.js +4 -4
- package/build/helpers/getAccommodationType.js.map +1 -1
- package/build/helpers/getGhost.js +6 -13
- package/build/helpers/getGhost.js.map +1 -1
- package/build/helpers/getLocale.js +12 -22
- package/build/helpers/getLocale.js.map +1 -1
- package/build/helpers/getTags.js +24 -30
- package/build/helpers/getTags.js.map +1 -1
- package/build/helpers/index.js +12 -12
- package/build/helpers/index.js.map +1 -1
- package/build/helpers/loadEnvironment.js +9 -8
- package/build/helpers/loadEnvironment.js.map +1 -1
- package/build/helpers/loadSentry.js +6 -7
- package/build/helpers/loadSentry.js.map +1 -1
- package/build/helpers/theme.js +17 -24
- package/build/helpers/theme.js.map +1 -1
- package/build/helpers/toOccupation.js +36 -48
- package/build/helpers/toOccupation.js.map +1 -1
- package/build/index.js +71 -120
- package/build/index.js.map +1 -1
- package/build/services/Club/constants.js +2 -2
- package/build/services/Club/constants.js.map +1 -1
- package/build/services/Club/get.js +21 -49
- package/build/services/Club/get.js.map +1 -1
- package/build/services/Club/index.js +1 -1
- package/build/services/Club/index.js.map +1 -1
- package/build/services/Engine/constants.js +2 -2
- package/build/services/Engine/constants.js.map +1 -1
- package/build/services/Engine/get.js +22 -54
- package/build/services/Engine/get.js.map +1 -1
- package/build/services/Engine/index.js +1 -1
- package/build/services/Engine/index.js.map +1 -1
- package/build/services/Rates/constants.js +8 -8
- package/build/services/Rates/constants.js.map +1 -1
- package/build/services/Rates/get.js +195 -227
- package/build/services/Rates/get.js.map +1 -1
- package/build/services/Rates/helpers/getPrice.js +9 -7
- package/build/services/Rates/helpers/getPrice.js.map +1 -1
- package/build/services/Rates/helpers/index.js +4 -4
- package/build/services/Rates/helpers/index.js.map +1 -1
- package/build/services/Rates/helpers/normalizePrice.js +4 -3
- package/build/services/Rates/helpers/normalizePrice.js.map +1 -1
- package/build/services/Rates/helpers/parseAmenities.js +67 -89
- package/build/services/Rates/helpers/parseAmenities.js.map +1 -1
- package/build/services/Rates/helpers/parseDiscount.js +21 -21
- package/build/services/Rates/helpers/parseDiscount.js.map +1 -1
- package/build/services/Rates/index.js +1 -1
- package/build/services/Rates/index.js.map +1 -1
- package/build/services/index.js +3 -3
- package/build/services/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -10,236 +9,205 @@ var _services = require("@mirai/services");
|
|
|
10
9
|
var _jsSha = _interopRequireDefault(require("js-sha1"));
|
|
11
10
|
var _constants = require("./constants");
|
|
12
11
|
var _helpers = require("./helpers");
|
|
13
|
-
var _excluded = ["currency", "locale", "session"];
|
|
14
|
-
/* eslint-disable no-async-promise-executor */
|
|
15
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
deal = discounts.offerTotal;
|
|
143
|
-
var originalPrice = Math.max((deal === null || deal === void 0 ? void 0 : deal.withTaxes) || 0, (club === null || club === void 0 ? void 0 : club.withTaxes) || 0, (promoCode === null || promoCode === void 0 ? void 0 : promoCode.withTaxes) || 0) || totalPrice;
|
|
144
|
-
rates.push({
|
|
145
|
-
amount: [min, availability < max ? availability : max],
|
|
146
|
-
basePrice: (0, _helpers.normalizePrice)(totalPriceOriginal, currency),
|
|
147
|
-
boardName: boardName,
|
|
148
|
-
cancellation: {
|
|
149
|
-
hint: "".concat(cancelName, " ").concat(cancelEnd ? cancelEnd : '').trim(),
|
|
150
|
-
title: cancelTitle,
|
|
151
|
-
text: cancelText
|
|
152
|
-
},
|
|
153
|
-
dayPrice: (0, _helpers.getPrice)({
|
|
154
|
-
currency: currency,
|
|
155
|
-
hotelCurrency: hotelCurrency,
|
|
156
|
-
price: withTaxesAvgPrice
|
|
157
|
-
}),
|
|
158
|
-
days: detail.map(function () {
|
|
159
|
-
var _ref8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
160
|
-
value = _ref8.dayStandardFormat,
|
|
161
|
-
deal = _ref8.offerId,
|
|
162
|
-
price = _ref8.price;
|
|
163
|
-
return {
|
|
164
|
-
deal: deal,
|
|
165
|
-
price: (0, _helpers.getPrice)({
|
|
166
|
-
currency: currency,
|
|
167
|
-
hotelCurrency: hotelCurrency,
|
|
168
|
-
price: price
|
|
169
|
-
}),
|
|
170
|
-
value: value
|
|
171
|
-
};
|
|
172
|
-
}),
|
|
173
|
-
deals: deals,
|
|
174
|
-
discount: (0, _helpers.parseDiscount)(_objectSpread(_objectSpread({
|
|
175
|
-
currency: currency,
|
|
176
|
-
hotelCurrency: hotelCurrency
|
|
177
|
-
}, discounts), {}, {
|
|
178
|
-
originalPrice: originalPrice,
|
|
179
|
-
totalPrice: totalPrice
|
|
180
|
-
})),
|
|
181
|
-
id: id,
|
|
182
|
-
included: _toConsumableArray(new Set(Object.values(included).flat())).slice(0, 3),
|
|
183
|
-
localTaxes: localTaxes,
|
|
184
|
-
originalPrice: (0, _helpers.getPrice)({
|
|
185
|
-
currency: currency,
|
|
186
|
-
hotelCurrency: hotelCurrency,
|
|
187
|
-
price: originalPrice
|
|
188
|
-
}),
|
|
189
|
-
price: (0, _helpers.getPrice)({
|
|
190
|
-
currency: currency,
|
|
191
|
-
hotelCurrency: hotelCurrency,
|
|
192
|
-
price: totalPrice + localTaxes
|
|
193
|
-
}),
|
|
194
|
-
name: name,
|
|
195
|
-
paymentConditions: paymentConditions,
|
|
196
|
-
restrictions: restrictions
|
|
197
|
-
});
|
|
198
|
-
});
|
|
199
|
-
});
|
|
13
|
+
/* eslint-disable no-async-promise-executor */
|
|
14
|
+
|
|
15
|
+
const {
|
|
16
|
+
DOUBLE,
|
|
17
|
+
SINGLE
|
|
18
|
+
} = _constants.BED_TYPE;
|
|
19
|
+
const KEY_HASH = 'm14357';
|
|
20
|
+
const get = function () {
|
|
21
|
+
let {
|
|
22
|
+
currency: userCurrency,
|
|
23
|
+
locale,
|
|
24
|
+
session = {},
|
|
25
|
+
...others
|
|
26
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
27
|
+
return new Promise(async (resolve, reject) => {
|
|
28
|
+
const {
|
|
29
|
+
idtokenprovider: id,
|
|
30
|
+
checkin,
|
|
31
|
+
nights
|
|
32
|
+
} = others;
|
|
33
|
+
const params = Object.entries({
|
|
34
|
+
currency: userCurrency,
|
|
35
|
+
...others,
|
|
36
|
+
accessClubToken: session.authorization,
|
|
37
|
+
cid: (0, _jsSha.default)("".concat(KEY_HASH, "-").concat(id, "-").concat(checkin, "-").concat(nights)),
|
|
38
|
+
lang: locale.split('-')[0]
|
|
39
|
+
}).filter(_ref => {
|
|
40
|
+
let [, value] = _ref;
|
|
41
|
+
return value !== undefined;
|
|
42
|
+
});
|
|
43
|
+
const response = await (0, _dataSources.request)({
|
|
44
|
+
hostname: process.env.SERVICE_BOOKING,
|
|
45
|
+
endpoint: "/request_availability_v2.json?".concat(new URLSearchParams(params)),
|
|
46
|
+
//TODO: back have to change the endpoint for don`t have remove this headers
|
|
47
|
+
headers: {
|
|
48
|
+
'Content-Type': undefined,
|
|
49
|
+
'X-Requested-With': undefined
|
|
50
|
+
}
|
|
51
|
+
}).catch(reject);
|
|
52
|
+
if (!response || response.result === 'EXCEPTION') return reject({
|
|
53
|
+
error: 'Upss, something bad happened!'
|
|
54
|
+
}); //TODO
|
|
55
|
+
|
|
56
|
+
const {
|
|
57
|
+
currencyCode: hotelCurrency,
|
|
58
|
+
measureUnit: unit,
|
|
59
|
+
roomTypes
|
|
60
|
+
} = response;
|
|
61
|
+
const currency = userCurrency || hotelCurrency;
|
|
62
|
+
await _services.ServiceCurrency.exchange(currency);
|
|
63
|
+
resolve({
|
|
64
|
+
items: Object.values(roomTypes).map(function () {
|
|
65
|
+
let {
|
|
66
|
+
amountAvailable: availability,
|
|
67
|
+
name,
|
|
68
|
+
newInfoRoom: info = {},
|
|
69
|
+
occupationOptions = {}
|
|
70
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
71
|
+
const rates = [];
|
|
72
|
+
const {
|
|
73
|
+
description,
|
|
74
|
+
roomTypeInfo: {
|
|
75
|
+
bedDistributions: bedType = [],
|
|
76
|
+
photos,
|
|
77
|
+
roomSize: size
|
|
78
|
+
} = {}
|
|
79
|
+
} = info;
|
|
80
|
+
const {
|
|
81
|
+
occupationQuantities: {
|
|
82
|
+
numAdults: adults = 0,
|
|
83
|
+
totalChildren: children = 0
|
|
84
|
+
} = {},
|
|
85
|
+
rates: occupationRates
|
|
86
|
+
} = Object.values(occupationOptions)[0];
|
|
87
|
+
Object.values(occupationRates).forEach(function () {
|
|
88
|
+
let {
|
|
89
|
+
boardOptions: boards,
|
|
90
|
+
cancellationPolicyDeadline: cancelEnd,
|
|
91
|
+
cancellationPolicyName: cancelName,
|
|
92
|
+
cancellationPolicyText: cancelText,
|
|
93
|
+
cancellationPolicyTooltip: cancelTitle,
|
|
94
|
+
includedList: included,
|
|
95
|
+
name,
|
|
96
|
+
paymentText: paymentConditions,
|
|
97
|
+
restrictions
|
|
98
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
99
|
+
Object.values(boards).forEach(function () {
|
|
100
|
+
let {
|
|
101
|
+
boardGroupName: boardName,
|
|
102
|
+
detail,
|
|
103
|
+
discountPricesBefore: discounts = {},
|
|
104
|
+
id,
|
|
105
|
+
maxRoomsPerReservation: max,
|
|
106
|
+
minRoomsPerReservation: min,
|
|
107
|
+
offersApplied: deals,
|
|
108
|
+
totalLocalTaxes: localTaxes,
|
|
109
|
+
totalPriceOriginal,
|
|
110
|
+
totalPriceWithTaxes: totalPrice,
|
|
111
|
+
withTaxesAvgPrice
|
|
112
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
113
|
+
const {
|
|
114
|
+
clientCodeTotal: promoCode,
|
|
115
|
+
clubTotal: club,
|
|
116
|
+
offerTotal: deal
|
|
117
|
+
} = discounts;
|
|
118
|
+
const originalPrice = Math.max((deal === null || deal === void 0 ? void 0 : deal.withTaxes) || 0, (club === null || club === void 0 ? void 0 : club.withTaxes) || 0, (promoCode === null || promoCode === void 0 ? void 0 : promoCode.withTaxes) || 0) || totalPrice;
|
|
119
|
+
rates.push({
|
|
120
|
+
amount: [min, availability < max ? availability : max],
|
|
121
|
+
basePrice: (0, _helpers.normalizePrice)(totalPriceOriginal, currency),
|
|
122
|
+
boardName,
|
|
123
|
+
cancellation: {
|
|
124
|
+
hint: "".concat(cancelName, " ").concat(cancelEnd ? cancelEnd : '').trim(),
|
|
125
|
+
title: cancelTitle,
|
|
126
|
+
text: cancelText
|
|
127
|
+
},
|
|
128
|
+
dayPrice: (0, _helpers.getPrice)({
|
|
129
|
+
currency,
|
|
130
|
+
hotelCurrency,
|
|
131
|
+
price: withTaxesAvgPrice
|
|
132
|
+
}),
|
|
133
|
+
days: detail.map(function () {
|
|
134
|
+
let {
|
|
135
|
+
dayStandardFormat: value,
|
|
136
|
+
offerId: deal,
|
|
137
|
+
price
|
|
138
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
200
139
|
return {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
bedTypes: bedType.reduce(function (result, next) {
|
|
207
|
-
_constants.BED_DISPOSITION[next].forEach(function () {
|
|
208
|
-
var _ref9 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
209
|
-
amount = _ref9.amount,
|
|
210
|
-
type = _ref9.type;
|
|
211
|
-
if ([DOUBLE, SINGLE].includes(type) && amount > 0) result[result.length ? 1 : 0] = type;
|
|
212
|
-
});
|
|
213
|
-
return result;
|
|
214
|
-
}, []),
|
|
215
|
-
description: description,
|
|
216
|
-
images: photos === null || photos === void 0 ? void 0 : photos.map(function () {
|
|
217
|
-
var _ref10 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
218
|
-
alt = _ref10.photoAltDescription,
|
|
219
|
-
large = _ref10.urlLarge,
|
|
220
|
-
thumbnail = _ref10.urlMediumRect;
|
|
221
|
-
return {
|
|
222
|
-
alt: alt,
|
|
223
|
-
large: large,
|
|
224
|
-
thumbnail: thumbnail
|
|
225
|
-
};
|
|
140
|
+
deal,
|
|
141
|
+
price: (0, _helpers.getPrice)({
|
|
142
|
+
currency,
|
|
143
|
+
hotelCurrency,
|
|
144
|
+
price
|
|
226
145
|
}),
|
|
227
|
-
|
|
228
|
-
maxOccupation: adults + children,
|
|
229
|
-
rates: rates,
|
|
230
|
-
size: size ? "".concat(size, " ").concat(_constants.UNIT[unit].size) : undefined
|
|
146
|
+
value
|
|
231
147
|
};
|
|
232
|
-
})
|
|
148
|
+
}),
|
|
149
|
+
deals,
|
|
150
|
+
discount: (0, _helpers.parseDiscount)({
|
|
151
|
+
currency,
|
|
152
|
+
hotelCurrency,
|
|
153
|
+
...discounts,
|
|
154
|
+
originalPrice,
|
|
155
|
+
totalPrice
|
|
156
|
+
}),
|
|
157
|
+
id,
|
|
158
|
+
included: [...new Set(Object.values(included).flat())].slice(0, 3),
|
|
159
|
+
localTaxes,
|
|
160
|
+
originalPrice: (0, _helpers.getPrice)({
|
|
161
|
+
currency,
|
|
162
|
+
hotelCurrency,
|
|
163
|
+
price: originalPrice
|
|
164
|
+
}),
|
|
165
|
+
price: (0, _helpers.getPrice)({
|
|
166
|
+
currency,
|
|
167
|
+
hotelCurrency,
|
|
168
|
+
price: totalPrice + localTaxes
|
|
169
|
+
}),
|
|
170
|
+
name,
|
|
171
|
+
paymentConditions,
|
|
172
|
+
restrictions
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
return {
|
|
177
|
+
amenities: (0, _helpers.parseAmenities)(info),
|
|
178
|
+
availability,
|
|
179
|
+
bedDisposition: bedType.map(type => _constants.BED_DISPOSITION[type]),
|
|
180
|
+
bedTypes: bedType.reduce((result, next) => {
|
|
181
|
+
_constants.BED_DISPOSITION[next].forEach(function () {
|
|
182
|
+
let {
|
|
183
|
+
amount,
|
|
184
|
+
type
|
|
185
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
186
|
+
if ([DOUBLE, SINGLE].includes(type) && amount > 0) result[result.length ? 1 : 0] = type;
|
|
233
187
|
});
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
188
|
+
return result;
|
|
189
|
+
}, []),
|
|
190
|
+
description,
|
|
191
|
+
images: photos === null || photos === void 0 ? void 0 : photos.map(function () {
|
|
192
|
+
let {
|
|
193
|
+
photoAltDescription: alt,
|
|
194
|
+
urlLarge: large,
|
|
195
|
+
urlMediumRect: thumbnail
|
|
196
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
197
|
+
return {
|
|
198
|
+
alt,
|
|
199
|
+
large,
|
|
200
|
+
thumbnail
|
|
201
|
+
};
|
|
202
|
+
}),
|
|
203
|
+
name,
|
|
204
|
+
maxOccupation: adults + children,
|
|
205
|
+
rates,
|
|
206
|
+
size: size ? "".concat(size, " ").concat(_constants.UNIT[unit].size) : undefined
|
|
207
|
+
};
|
|
208
|
+
})
|
|
209
|
+
});
|
|
210
|
+
});
|
|
244
211
|
};
|
|
212
|
+
exports.get = get;
|
|
245
213
|
//# sourceMappingURL=get.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.js","names":["_dataSources","require","_services","_jsSha","_interopRequireDefault","_constants","_helpers","_excluded","obj","__esModule","default","_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","return","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","catch","_catch","delegateYield","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","iter","Array","from","isArray","_arrayLikeToArray","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_nonIterableRest","minLen","toString","test","len","arr2","ownKeys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","apply","_objectSpread","arguments","_defineProperty","getOwnPropertyDescriptors","defineProperties","key","_toPropertyKey","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","Number","asyncGeneratorStep","gen","reject","_next","_throw","info","error","_asyncToGenerator","fn","self","args","err","_objectWithoutProperties","source","excluded","target","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","DOUBLE","BED_TYPE","SINGLE","KEY_HASH","get","exports","_ref","userCurrency","currency","locale","_ref$session","session","others","_ref2","_callee","id","checkin","nights","params","response","hotelCurrency","unit","roomTypes","_callee$","_context","idtokenprovider","entries","accessClubToken","authorization","cid","sha1","concat","lang","split","_ref3","_ref4","request","hostname","process","env","SERVICE_BOOKING","endpoint","URLSearchParams","headers","result","currencyCode","measureUnit","ServiceCurrency","exchange","items","map","_ref5","availability","amountAvailable","_ref5$newInfoRoom","newInfoRoom","_ref5$occupationOptio","occupationOptions","rates","description","_info$roomTypeInfo","roomTypeInfo","_info$roomTypeInfo2","_info$roomTypeInfo2$b","bedDistributions","bedType","photos","size","roomSize","_Object$values$","_Object$values$$occup","occupationQuantities","_Object$values$$occup2","_Object$values$$occup3","numAdults","adults","_Object$values$$occup4","totalChildren","children","occupationRates","_ref6","boards","boardOptions","cancelEnd","cancellationPolicyDeadline","cancelName","cancellationPolicyName","cancelText","cancellationPolicyText","cancelTitle","cancellationPolicyTooltip","included","includedList","paymentConditions","paymentText","restrictions","_ref7","boardName","boardGroupName","detail","_ref7$discountPricesB","discountPricesBefore","discounts","max","maxRoomsPerReservation","min","minRoomsPerReservation","deals","offersApplied","localTaxes","totalLocalTaxes","totalPriceOriginal","totalPrice","totalPriceWithTaxes","withTaxesAvgPrice","promoCode","clientCodeTotal","club","clubTotal","deal","offerTotal","originalPrice","Math","withTaxes","amount","basePrice","normalizePrice","cancellation","trim","title","text","dayPrice","getPrice","price","days","_ref8","dayStandardFormat","offerId","discount","parseDiscount","Set","flat","amenities","parseAmenities","bedDisposition","BED_DISPOSITION","bedTypes","reduce","_ref9","includes","images","_ref10","alt","photoAltDescription","large","urlLarge","thumbnail","urlMediumRect","maxOccupation","UNIT","_x","_x2"],"sources":["../../../src/services/Rates/get.js"],"sourcesContent":["/* eslint-disable no-async-promise-executor */\nimport { request } from '@mirai/data-sources';\nimport { ServiceCurrency } from '@mirai/services';\nimport sha1 from 'js-sha1';\n\nimport { BED_DISPOSITION, BED_TYPE, UNIT } from './constants';\nimport { getPrice, normalizePrice, parseAmenities, parseDiscount } from './helpers';\n\nconst { DOUBLE, SINGLE } = BED_TYPE;\n\nconst KEY_HASH = 'm14357';\n\nexport const get = ({ currency: userCurrency, locale, session = {}, ...others } = {}) =>\n new Promise(async (resolve, reject) => {\n const { idtokenprovider: id, checkin, nights } = others;\n const params = Object.entries({\n currency: userCurrency,\n ...others,\n accessClubToken: session.authorization,\n cid: sha1(`${KEY_HASH}-${id}-${checkin}-${nights}`),\n lang: locale.split('-')[0],\n }).filter(([, value]) => value !== undefined);\n\n const response = await request({\n hostname: process.env.SERVICE_BOOKING,\n endpoint: `/request_availability_v2.json?${new URLSearchParams(params)}`,\n //TODO: back have to change the endpoint for don`t have remove this headers\n headers: { 'Content-Type': undefined, 'X-Requested-With': undefined },\n }).catch(reject);\n\n if (!response || response.result === 'EXCEPTION') return reject({ error: 'Upss, something bad happened!' }); //TODO\n\n const { currencyCode: hotelCurrency, measureUnit: unit, roomTypes } = response;\n const currency = userCurrency || hotelCurrency;\n await ServiceCurrency.exchange(currency);\n\n resolve({\n items: Object.values(roomTypes).map(\n ({ amountAvailable: availability, name, newInfoRoom: info = {}, occupationOptions = {} } = {}) => {\n const rates = [];\n const { description, roomTypeInfo: { bedDistributions: bedType = [], photos, roomSize: size } = {} } = info;\n const {\n occupationQuantities: { numAdults: adults = 0, totalChildren: children = 0 } = {},\n rates: occupationRates,\n } = Object.values(occupationOptions)[0];\n\n Object.values(occupationRates).forEach(\n ({\n boardOptions: boards,\n cancellationPolicyDeadline: cancelEnd,\n cancellationPolicyName: cancelName,\n cancellationPolicyText: cancelText,\n cancellationPolicyTooltip: cancelTitle,\n includedList: included,\n name,\n paymentText: paymentConditions,\n restrictions,\n } = {}) => {\n Object.values(boards).forEach(\n ({\n boardGroupName: boardName,\n detail,\n discountPricesBefore: discounts = {},\n id,\n maxRoomsPerReservation: max,\n minRoomsPerReservation: min,\n offersApplied: deals,\n totalLocalTaxes: localTaxes,\n totalPriceOriginal,\n totalPriceWithTaxes: totalPrice,\n withTaxesAvgPrice,\n } = {}) => {\n const { clientCodeTotal: promoCode, clubTotal: club, offerTotal: deal } = discounts;\n const originalPrice =\n Math.max(deal?.withTaxes || 0, club?.withTaxes || 0, promoCode?.withTaxes || 0) || totalPrice;\n\n rates.push({\n amount: [min, availability < max ? availability : max],\n basePrice: normalizePrice(totalPriceOriginal, currency),\n boardName,\n cancellation: {\n hint: `${cancelName} ${cancelEnd ? cancelEnd : ''}`.trim(),\n title: cancelTitle,\n text: cancelText,\n },\n dayPrice: getPrice({ currency, hotelCurrency, price: withTaxesAvgPrice }),\n days: detail.map(({ dayStandardFormat: value, offerId: deal, price } = {}) => ({\n deal,\n price: getPrice({ currency, hotelCurrency, price }),\n value,\n })),\n deals,\n discount: parseDiscount({ currency, hotelCurrency, ...discounts, originalPrice, totalPrice }),\n id,\n included: [...new Set(Object.values(included).flat())].slice(0, 3),\n localTaxes,\n originalPrice: getPrice({ currency, hotelCurrency, price: originalPrice }),\n price: getPrice({ currency, hotelCurrency, price: totalPrice + localTaxes }),\n name,\n paymentConditions,\n restrictions,\n });\n },\n );\n },\n );\n\n return {\n amenities: parseAmenities(info),\n availability,\n bedDisposition: bedType.map((type) => BED_DISPOSITION[type]),\n bedTypes: bedType.reduce((result, next) => {\n BED_DISPOSITION[next].forEach(({ amount, type } = {}) => {\n if ([DOUBLE, SINGLE].includes(type) && amount > 0) result[result.length ? 1 : 0] = type;\n });\n\n return result;\n }, []),\n description,\n images: photos?.map(({ photoAltDescription: alt, urlLarge: large, urlMediumRect: thumbnail } = {}) => ({\n alt,\n large,\n thumbnail,\n })),\n name,\n maxOccupation: adults + children,\n rates,\n size: size ? `${size} ${UNIT[unit].size}` : undefined,\n };\n },\n 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"}
|
|
1
|
+
{"version":3,"file":"get.js","names":["_dataSources","require","_services","_jsSha","_interopRequireDefault","_constants","_helpers","obj","__esModule","default","DOUBLE","SINGLE","BED_TYPE","KEY_HASH","get","currency","userCurrency","locale","session","others","arguments","length","undefined","Promise","resolve","reject","idtokenprovider","id","checkin","nights","params","Object","entries","accessClubToken","authorization","cid","sha1","concat","lang","split","filter","_ref","value","response","request","hostname","process","env","SERVICE_BOOKING","endpoint","URLSearchParams","headers","catch","result","error","currencyCode","hotelCurrency","measureUnit","unit","roomTypes","ServiceCurrency","exchange","items","values","map","amountAvailable","availability","name","newInfoRoom","info","occupationOptions","rates","description","roomTypeInfo","bedDistributions","bedType","photos","roomSize","size","occupationQuantities","numAdults","adults","totalChildren","children","occupationRates","forEach","boardOptions","boards","cancellationPolicyDeadline","cancelEnd","cancellationPolicyName","cancelName","cancellationPolicyText","cancelText","cancellationPolicyTooltip","cancelTitle","includedList","included","paymentText","paymentConditions","restrictions","boardGroupName","boardName","detail","discountPricesBefore","discounts","maxRoomsPerReservation","max","minRoomsPerReservation","min","offersApplied","deals","totalLocalTaxes","localTaxes","totalPriceOriginal","totalPriceWithTaxes","totalPrice","withTaxesAvgPrice","clientCodeTotal","promoCode","clubTotal","club","offerTotal","deal","originalPrice","Math","withTaxes","push","amount","basePrice","normalizePrice","cancellation","hint","trim","title","text","dayPrice","getPrice","price","days","dayStandardFormat","offerId","discount","parseDiscount","Set","flat","slice","amenities","parseAmenities","bedDisposition","type","BED_DISPOSITION","bedTypes","reduce","next","includes","images","photoAltDescription","alt","urlLarge","large","urlMediumRect","thumbnail","maxOccupation","UNIT","exports"],"sources":["../../../src/services/Rates/get.js"],"sourcesContent":["/* eslint-disable no-async-promise-executor */\nimport { request } from '@mirai/data-sources';\nimport { ServiceCurrency } from '@mirai/services';\nimport sha1 from 'js-sha1';\n\nimport { BED_DISPOSITION, BED_TYPE, UNIT } from './constants';\nimport { getPrice, normalizePrice, parseAmenities, parseDiscount } from './helpers';\n\nconst { DOUBLE, SINGLE } = BED_TYPE;\n\nconst KEY_HASH = 'm14357';\n\nexport const get = ({ currency: userCurrency, locale, session = {}, ...others } = {}) =>\n new Promise(async (resolve, reject) => {\n const { idtokenprovider: id, checkin, nights } = others;\n const params = Object.entries({\n currency: userCurrency,\n ...others,\n accessClubToken: session.authorization,\n cid: sha1(`${KEY_HASH}-${id}-${checkin}-${nights}`),\n lang: locale.split('-')[0],\n }).filter(([, value]) => value !== undefined);\n\n const response = await request({\n hostname: process.env.SERVICE_BOOKING,\n endpoint: `/request_availability_v2.json?${new URLSearchParams(params)}`,\n //TODO: back have to change the endpoint for don`t have remove this headers\n headers: { 'Content-Type': undefined, 'X-Requested-With': undefined },\n }).catch(reject);\n\n if (!response || response.result === 'EXCEPTION') return reject({ error: 'Upss, something bad happened!' }); //TODO\n\n const { currencyCode: hotelCurrency, measureUnit: unit, roomTypes } = response;\n const currency = userCurrency || hotelCurrency;\n await ServiceCurrency.exchange(currency);\n\n resolve({\n items: Object.values(roomTypes).map(\n ({ amountAvailable: availability, name, newInfoRoom: info = {}, occupationOptions = {} } = {}) => {\n const rates = [];\n const { description, roomTypeInfo: { bedDistributions: bedType = [], photos, roomSize: size } = {} } = info;\n const {\n occupationQuantities: { numAdults: adults = 0, totalChildren: children = 0 } = {},\n rates: occupationRates,\n } = Object.values(occupationOptions)[0];\n\n Object.values(occupationRates).forEach(\n ({\n boardOptions: boards,\n cancellationPolicyDeadline: cancelEnd,\n cancellationPolicyName: cancelName,\n cancellationPolicyText: cancelText,\n cancellationPolicyTooltip: cancelTitle,\n includedList: included,\n name,\n paymentText: paymentConditions,\n restrictions,\n } = {}) => {\n Object.values(boards).forEach(\n ({\n boardGroupName: boardName,\n detail,\n discountPricesBefore: discounts = {},\n id,\n maxRoomsPerReservation: max,\n minRoomsPerReservation: min,\n offersApplied: deals,\n totalLocalTaxes: localTaxes,\n totalPriceOriginal,\n totalPriceWithTaxes: totalPrice,\n withTaxesAvgPrice,\n } = {}) => {\n const { clientCodeTotal: promoCode, clubTotal: club, offerTotal: deal } = discounts;\n const originalPrice =\n Math.max(deal?.withTaxes || 0, club?.withTaxes || 0, promoCode?.withTaxes || 0) || totalPrice;\n\n rates.push({\n amount: [min, availability < max ? availability : max],\n basePrice: normalizePrice(totalPriceOriginal, currency),\n boardName,\n cancellation: {\n hint: `${cancelName} ${cancelEnd ? cancelEnd : ''}`.trim(),\n title: cancelTitle,\n text: cancelText,\n },\n dayPrice: getPrice({ currency, hotelCurrency, price: withTaxesAvgPrice }),\n days: detail.map(({ dayStandardFormat: value, offerId: deal, price } = {}) => ({\n deal,\n price: getPrice({ currency, hotelCurrency, price }),\n value,\n })),\n deals,\n discount: parseDiscount({ currency, hotelCurrency, ...discounts, originalPrice, totalPrice }),\n id,\n included: [...new Set(Object.values(included).flat())].slice(0, 3),\n localTaxes,\n originalPrice: getPrice({ currency, hotelCurrency, price: originalPrice }),\n price: getPrice({ currency, hotelCurrency, price: totalPrice + localTaxes }),\n name,\n paymentConditions,\n restrictions,\n });\n },\n );\n },\n );\n\n return {\n amenities: parseAmenities(info),\n availability,\n bedDisposition: bedType.map((type) => BED_DISPOSITION[type]),\n bedTypes: bedType.reduce((result, next) => {\n BED_DISPOSITION[next].forEach(({ amount, type } = {}) => {\n if ([DOUBLE, SINGLE].includes(type) && amount > 0) result[result.length ? 1 : 0] = type;\n });\n\n return result;\n }, []),\n description,\n images: photos?.map(({ photoAltDescription: alt, urlLarge: large, urlMediumRect: thumbnail } = {}) => ({\n alt,\n large,\n thumbnail,\n })),\n name,\n maxOccupation: adults + children,\n rates,\n size: size ? `${size} ${UNIT[unit].size}` : undefined,\n };\n },\n ),\n });\n });\n"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAAoF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CAAEZ,GAAG,CAAC;YAAA,IAAC;cAAE6F,mBAAmB,EAAEC,GAAG;cAAEC,QAAQ,EAAEC,KAAK;cAAEC,aAAa,EAAEC;YAAU,CAAC,GAAA9I,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;YAAA,OAAM;cACrG0I,GAAG;cACHE,KAAK;cACLE;YACF,CAAC;UAAA,CAAC,CAAC;UACH/F,IAAI;UACJgG,aAAa,EAAElF,MAAM,GAAGE,QAAQ;UAChCZ,KAAK;UACLO,IAAI,EAAEA,IAAI,MAAAzC,MAAA,CAAMyC,IAAI,OAAAzC,MAAA,CAAI+H,eAAI,CAAC1G,IAAI,CAAC,CAACoB,IAAI,IAAKxD;QAC9C,CAAC;MACH,CACF;IACF,CAAC,CAAC;EACJ,CAAC,CAAC;AAAA;AAAC+I,OAAA,CAAAvJ,GAAA,GAAAA,GAAA"}
|
|
@@ -6,15 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getPrice = void 0;
|
|
7
7
|
var _services = require("@mirai/services");
|
|
8
8
|
var _normalizePrice = require("./normalizePrice");
|
|
9
|
-
|
|
9
|
+
const getPrice = _ref => {
|
|
10
10
|
var _ref2;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
normalize =
|
|
15
|
-
propPrice
|
|
11
|
+
let {
|
|
12
|
+
currency,
|
|
13
|
+
hotelCurrency,
|
|
14
|
+
normalize = true,
|
|
15
|
+
price: propPrice
|
|
16
|
+
} = _ref;
|
|
16
17
|
if (!propPrice) return;
|
|
17
|
-
|
|
18
|
+
const price = normalize ? (0, _normalizePrice.normalizePrice)(propPrice, hotelCurrency) : propPrice;
|
|
18
19
|
return +((_ref2 = currency !== hotelCurrency ? _services.ServiceCurrency.convert(currency, hotelCurrency, price, true) : price) === null || _ref2 === void 0 ? void 0 : _ref2.toFixed(2));
|
|
19
20
|
};
|
|
21
|
+
exports.getPrice = getPrice;
|
|
20
22
|
//# sourceMappingURL=getPrice.js.map
|