@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
|
});
|
|
@@ -14,69 +13,38 @@ var _Occupation = require("./Occupation.constants");
|
|
|
14
13
|
var _Occupation2 = require("./Occupation.Group");
|
|
15
14
|
var _Occupation3 = require("./Occupation.l10n");
|
|
16
15
|
var style = _interopRequireWildcard(require("./Occupation.module.css"));
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
19
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return (0, _helpers.prepareRoom)(dataSource || _Occupation.DATASOURCE);
|
|
46
|
-
}) : [] : _ref$value,
|
|
47
|
-
_ref$onChange = _ref.onChange,
|
|
48
|
-
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
49
|
-
_ref$onError = _ref.onError,
|
|
50
|
-
onError = _ref$onError === void 0 ? function () {} : _ref$onError,
|
|
51
|
-
onSubmit = _ref.onSubmit,
|
|
52
|
-
_ref$onValid = _ref.onValid,
|
|
53
|
-
onValid = _ref$onValid === void 0 ? function () {} : _ref$onValid,
|
|
54
|
-
others = _objectWithoutProperties(_ref, _excluded);
|
|
55
|
-
var _useLocale = (0, _locale.useLocale)(),
|
|
56
|
-
translate = _useLocale.translate;
|
|
57
|
-
var itemsRef = (0, _react.useRef)([]);
|
|
58
|
-
var _useState = (0, _react.useState)(),
|
|
59
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
60
|
-
scrollEnd = _useState2[0],
|
|
61
|
-
setScrollEnd = _useState2[1];
|
|
62
|
-
var _useState3 = (0, _react.useState)(error),
|
|
63
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
64
|
-
withError = _useState4[0],
|
|
65
|
-
setWithError = _useState4[1];
|
|
66
|
-
var _useState5 = (0, _react.useState)(false),
|
|
67
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
68
|
-
withWarning = _useState6[0],
|
|
69
|
-
setWithWarning = _useState6[1];
|
|
70
|
-
var _useState7 = (0, _react.useState)([]),
|
|
71
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
72
|
-
currentDataSource = _useState8[0],
|
|
73
|
-
setCurrentDataSource = _useState8[1];
|
|
74
|
-
(0, _react.useEffect)(function () {
|
|
20
|
+
const Occupation = exports.Occupation = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
21
|
+
let {
|
|
22
|
+
dataSource = _Occupation.DATASOURCE,
|
|
23
|
+
error,
|
|
24
|
+
maxRooms,
|
|
25
|
+
minRooms = 1,
|
|
26
|
+
type = _Occupation.ACCOMMODATION_TYPE.ROOM,
|
|
27
|
+
value = dataSource ? [...Array(minRooms)].map(() => (0, _helpers.prepareRoom)(dataSource || _Occupation.DATASOURCE)) : [],
|
|
28
|
+
onChange = () => {},
|
|
29
|
+
onError = () => {},
|
|
30
|
+
onSubmit,
|
|
31
|
+
onValid = () => {},
|
|
32
|
+
...others
|
|
33
|
+
} = _ref;
|
|
34
|
+
const {
|
|
35
|
+
translate
|
|
36
|
+
} = (0, _locale.useLocale)();
|
|
37
|
+
const itemsRef = (0, _react.useRef)([]);
|
|
38
|
+
const [scrollEnd, setScrollEnd] = (0, _react.useState)();
|
|
39
|
+
const [withError, setWithError] = (0, _react.useState)(error);
|
|
40
|
+
const [withWarning, setWithWarning] = (0, _react.useState)(false);
|
|
41
|
+
const [currentDataSource, setCurrentDataSource] = (0, _react.useState)([]);
|
|
42
|
+
(0, _react.useEffect)(() => {
|
|
75
43
|
if (JSON.stringify(dataSource) !== JSON.stringify(currentDataSource)) setWithWarning(false);
|
|
76
44
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
45
|
}, [currentDataSource, dataSource]);
|
|
78
|
-
(0, _react.useEffect)(
|
|
79
|
-
|
|
46
|
+
(0, _react.useEffect)(() => {
|
|
47
|
+
let nextValue = (0, _helpers.consolidateValue)(value, dataSource, currentDataSource);
|
|
80
48
|
if (!nextValue) {
|
|
81
49
|
setWithWarning(true);
|
|
82
50
|
onError(_Occupation.ERROR.NO_ROOM);
|
|
@@ -90,83 +58,76 @@ var Occupation = exports.Occupation = /*#__PURE__*/_react.default.forwardRef(fun
|
|
|
90
58
|
|
|
91
59
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
92
60
|
}, [dataSource, value]);
|
|
93
|
-
(0, _react.useEffect)(
|
|
61
|
+
(0, _react.useEffect)(() => {
|
|
94
62
|
var _itemsRef$current;
|
|
95
63
|
setWithError(error);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return age === undefined;
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
});
|
|
64
|
+
const roomIndex = value.findIndex(room => room.some(function () {
|
|
65
|
+
let {
|
|
66
|
+
ages = [],
|
|
67
|
+
type
|
|
68
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
69
|
+
return type === _Occupation.TYPE.CHILD && ages.some(age => age === undefined);
|
|
70
|
+
}));
|
|
107
71
|
if (roomIndex < 0) return;
|
|
108
|
-
|
|
72
|
+
const scrollHeight = (0, _helpers.getScrollHeight)({
|
|
109
73
|
hasAges: true,
|
|
110
|
-
roomIndex
|
|
111
|
-
rooms: (_itemsRef$current = itemsRef.current) === null || _itemsRef$current === void 0 ? void 0 : _itemsRef$current.map(
|
|
112
|
-
return el === null || el === void 0 ? void 0 : el.scrollHeight;
|
|
113
|
-
})
|
|
74
|
+
roomIndex,
|
|
75
|
+
rooms: (_itemsRef$current = itemsRef.current) === null || _itemsRef$current === void 0 ? void 0 : _itemsRef$current.map(el => el === null || el === void 0 ? void 0 : el.scrollHeight)
|
|
114
76
|
});
|
|
115
77
|
if (scrollHeight >= 0) setScrollEnd(scrollEnd !== scrollHeight ? scrollHeight : scrollEnd + 0.1);
|
|
116
78
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
117
79
|
}, [error]);
|
|
118
|
-
|
|
80
|
+
const handleAddRoom = () => {
|
|
119
81
|
var _itemsRef$current2;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
82
|
+
const {
|
|
83
|
+
parentNode: {
|
|
84
|
+
scrollHeight
|
|
85
|
+
} = {}
|
|
86
|
+
} = ((_itemsRef$current2 = itemsRef.current) === null || _itemsRef$current2 === void 0 ? void 0 : _itemsRef$current2.length) > 0 && itemsRef.current[0] || {};
|
|
124
87
|
if (scrollHeight) setScrollEnd(scrollHeight);
|
|
125
|
-
handleChange([
|
|
88
|
+
handleChange([...value, (0, _helpers.prepareRoom)(dataSource)]);
|
|
126
89
|
setWithWarning(false);
|
|
127
90
|
};
|
|
128
|
-
|
|
91
|
+
const handleRemoveRoom = (event, roomIndex, groupValue) => {
|
|
129
92
|
event.stopPropagation();
|
|
130
93
|
scroll(roomIndex, groupValue);
|
|
131
|
-
handleChange(value.filter(
|
|
132
|
-
return roomIndex !== index;
|
|
133
|
-
}));
|
|
94
|
+
handleChange(value.filter((_, index) => roomIndex !== index));
|
|
134
95
|
itemsRef.current = [];
|
|
135
96
|
setWithWarning(false);
|
|
136
97
|
};
|
|
137
|
-
|
|
98
|
+
const handleIndividual = (roomIndex, groupIndex, groupValue) => {
|
|
138
99
|
dataSource[groupIndex].fulfill && scroll(roomIndex, groupValue);
|
|
139
|
-
|
|
140
|
-
nextValue[roomIndex] =
|
|
100
|
+
const nextValue = [...value];
|
|
101
|
+
nextValue[roomIndex] = [...nextValue[roomIndex]] || [];
|
|
141
102
|
nextValue[roomIndex][groupIndex] = groupValue.amount === 0 ? undefined : groupValue;
|
|
142
103
|
handleChange(nextValue);
|
|
143
104
|
setWithWarning(false);
|
|
144
105
|
};
|
|
145
|
-
|
|
106
|
+
const handleChange = nextValue => {
|
|
146
107
|
onChange(nextValue);
|
|
147
108
|
(0, _helpers.checkRoom)(nextValue, dataSource) ? handleValid() : onError(_Occupation.ERROR.NOT_FILLED);
|
|
148
109
|
};
|
|
149
|
-
|
|
110
|
+
const handleSubmit = () => {
|
|
150
111
|
setWithWarning(false);
|
|
151
112
|
onSubmit(value);
|
|
152
113
|
};
|
|
153
|
-
|
|
114
|
+
const handleValid = () => {
|
|
154
115
|
setWithError(false);
|
|
155
116
|
onValid();
|
|
156
117
|
};
|
|
157
|
-
|
|
118
|
+
const scroll = (roomIndex, groupValue) => {
|
|
158
119
|
var _groupValue$ages, _itemsRef$current3;
|
|
159
|
-
|
|
120
|
+
const scrollHeight = (0, _helpers.getScrollHeight)({
|
|
160
121
|
hasAges: (groupValue === null || groupValue === void 0 ? void 0 : (_groupValue$ages = groupValue.ages) === null || _groupValue$ages === void 0 ? void 0 : _groupValue$ages.length) > 0,
|
|
161
|
-
roomIndex
|
|
162
|
-
rooms: (_itemsRef$current3 = itemsRef.current) === null || _itemsRef$current3 === void 0 ? void 0 : _itemsRef$current3.map(
|
|
163
|
-
return el === null || el === void 0 ? void 0 : el.scrollHeight;
|
|
164
|
-
})
|
|
122
|
+
roomIndex,
|
|
123
|
+
rooms: (_itemsRef$current3 = itemsRef.current) === null || _itemsRef$current3 === void 0 ? void 0 : _itemsRef$current3.map(el => el === null || el === void 0 ? void 0 : el.scrollHeight)
|
|
165
124
|
});
|
|
166
125
|
if (scrollHeight >= 0) setScrollEnd(scrollEnd !== scrollHeight ? scrollHeight : scrollEnd + 0.1);
|
|
167
126
|
};
|
|
168
|
-
|
|
169
|
-
|
|
127
|
+
const {
|
|
128
|
+
testId
|
|
129
|
+
} = others;
|
|
130
|
+
const isValid = (0, _helpers.checkRoom)(value, dataSource);
|
|
170
131
|
return /*#__PURE__*/_react.default.createElement(_ui.View, _extends({}, others, {
|
|
171
132
|
role: "occupation",
|
|
172
133
|
ref: ref,
|
|
@@ -181,13 +142,11 @@ var Occupation = exports.Occupation = /*#__PURE__*/_react.default.forwardRef(fun
|
|
|
181
142
|
snap: false,
|
|
182
143
|
className: style.scrollview
|
|
183
144
|
}, value.map(function () {
|
|
184
|
-
|
|
185
|
-
|
|
145
|
+
let room = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
146
|
+
let roomIndex = arguments.length > 1 ? arguments[1] : undefined;
|
|
186
147
|
return /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
187
148
|
key: roomIndex,
|
|
188
|
-
ref:
|
|
189
|
-
return itemsRef.current[roomIndex] = el;
|
|
190
|
-
},
|
|
149
|
+
ref: el => itemsRef.current[roomIndex] = el,
|
|
191
150
|
wide: true
|
|
192
151
|
}, /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
193
152
|
row: true,
|
|
@@ -202,20 +161,14 @@ var Occupation = exports.Occupation = /*#__PURE__*/_react.default.forwardRef(fun
|
|
|
202
161
|
inline: true,
|
|
203
162
|
preventDefault: true,
|
|
204
163
|
small: true,
|
|
205
|
-
onPress:
|
|
206
|
-
return handleRemoveRoom(event, roomIndex, room[roomIndex]);
|
|
207
|
-
},
|
|
164
|
+
onPress: event => handleRemoveRoom(event, roomIndex, room[roomIndex]),
|
|
208
165
|
testId: testId ? "".concat(testId, "-remove-room-").concat(roomIndex) : undefined
|
|
209
|
-
}, translate(_Occupation3.L10N.ACTION_REMOVE))), dataSource.map(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
return handleIndividual(roomIndex, groupIndex, value);
|
|
216
|
-
}
|
|
217
|
-
}));
|
|
218
|
-
}));
|
|
166
|
+
}, translate(_Occupation3.L10N.ACTION_REMOVE))), dataSource.map((group, groupIndex) => /*#__PURE__*/_react.default.createElement(_Occupation2.OccupationGroup, _extends({}, group, {
|
|
167
|
+
error: error,
|
|
168
|
+
key: groupIndex,
|
|
169
|
+
value: room[groupIndex],
|
|
170
|
+
onChange: value => handleIndividual(roomIndex, groupIndex, value)
|
|
171
|
+
}))));
|
|
219
172
|
})), /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
220
173
|
row: true,
|
|
221
174
|
className: (0, _ui.styles)(style.buttons, style.offset)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Occupation.js","names":["_locale","require","_ui","_propTypes","_interopRequireDefault","_react","_interopRequireWildcard","_helpers","_Occupation","_Occupation2","_Occupation3","style","_excluded","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","_slicedToArray","arr","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","r","l","t","Symbol","iterator","e","n","u","a","f","o","next","done","push","value","return","Array","isArray","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_nonIterableSpread","minLen","_arrayLikeToArray","toString","slice","constructor","name","from","test","iter","len","arr2","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","keys","Occupation","exports","React","forwardRef","_ref","ref","_ref$dataSource","dataSource","DATASOURCE","error","maxRooms","_ref$minRooms","minRooms","_ref$type","type","ACCOMMODATION_TYPE","ROOM","_ref$value","map","prepareRoom","_ref$onChange","onChange","_ref$onError","onError","onSubmit","_ref$onValid","onValid","others","_useLocale","useLocale","translate","itemsRef","useRef","_useState","useState","_useState2","scrollEnd","setScrollEnd","_useState3","_useState4","withError","setWithError","_useState5","_useState6","withWarning","setWithWarning","_useState7","_useState8","currentDataSource","setCurrentDataSource","useEffect","JSON","stringify","nextValue","consolidateValue","ERROR","NO_ROOM","checkRoom","handleValid","handleChange","_itemsRef$current","roomIndex","findIndex","room","some","_ref2","undefined","_ref2$ages","ages","TYPE","CHILD","age","scrollHeight","getScrollHeight","hasAges","rooms","current","el","handleAddRoom","_itemsRef$current2","_ref3","_ref3$parentNode","parentNode","_ref3$parentNode2","concat","handleRemoveRoom","event","groupValue","stopPropagation","scroll","filter","_","index","handleIndividual","groupIndex","fulfill","amount","NOT_FILLED","handleSubmit","_groupValue$ages","_itemsRef$current3","testId","isValid","createElement","View","role","className","styles","container","Notification","small","warning","notification","L10N","NOTIFICATION_ERROR_UNFILLED_FIELDS","NOTIFICATION_WARNING_OCCUPATION","ScrollView","scrollTo","snap","scrollview","wide","row","header","offset","Text","action","id","LABEL_PLACE_TYPE_COUNT","PLACE","Action","inline","preventDefault","onPress","ACTION_REMOVE","group","OccupationGroup","buttons","Button","disabled","secondary","buttonAdd","ACTION_ADD_PLACE_TYPE","buttonSubmit","ACTION_NEXT","displayName","propTypes","PropTypes","arrayOf","SHAPE","bool","number","oneOf","values","VALUE","func"],"sources":["../../../../src/components/__shared__/Occupation/Occupation.jsx"],"sourcesContent":["import { useLocale } from '@mirai/locale';\nimport { Action, Button, Notification, ScrollView, Text, View, styles } from '@mirai/ui';\nimport PropTypes from 'prop-types';\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport { checkRoom, consolidateValue, getScrollHeight, prepareRoom } from './helpers';\nimport { TYPE } from './Occupation.constants';\nimport { ACCOMMODATION_TYPE, DATASOURCE, ERROR, PLACE, SHAPE } from './Occupation.constants';\nimport { OccupationGroup } from './Occupation.Group';\nimport { L10N } from './Occupation.l10n';\nimport * as style from './Occupation.module.css';\n\nconst Occupation = React.forwardRef(\n (\n {\n dataSource = DATASOURCE,\n error,\n maxRooms,\n minRooms = 1,\n type = ACCOMMODATION_TYPE.ROOM,\n value = dataSource ? [...Array(minRooms)].map(() => prepareRoom(dataSource || DATASOURCE)) : [],\n onChange = () => {},\n onError = () => {},\n onSubmit,\n onValid = () => {},\n ...others\n },\n ref,\n ) => {\n const { translate } = useLocale();\n const itemsRef = useRef([]);\n\n const [scrollEnd, setScrollEnd] = useState();\n const [withError, setWithError] = useState(error);\n const [withWarning, setWithWarning] = useState(false);\n const [currentDataSource, setCurrentDataSource] = useState([]);\n\n useEffect(() => {\n if (JSON.stringify(dataSource) !== JSON.stringify(currentDataSource)) setWithWarning(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentDataSource, dataSource]);\n\n useEffect(() => {\n let nextValue = consolidateValue(value, dataSource, currentDataSource);\n if (!nextValue) {\n setWithWarning(true);\n onError(ERROR.NO_ROOM);\n nextValue = [prepareRoom(dataSource)];\n } else if (error && checkRoom(nextValue, dataSource)) {\n handleValid();\n }\n if (JSON.stringify(dataSource) !== JSON.stringify(currentDataSource)) setCurrentDataSource(dataSource);\n // ! TODO: Check why doesnt work witn non-hotels\n if (JSON.stringify(nextValue) !== JSON.stringify(value)) handleChange(nextValue);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dataSource, value]);\n\n useEffect(() => {\n setWithError(error);\n const roomIndex = value.findIndex((room) =>\n room.some(({ ages = [], type } = {}) => type === TYPE.CHILD && ages.some((age) => age === undefined)),\n );\n if (roomIndex < 0) return;\n\n const scrollHeight = getScrollHeight({\n hasAges: true,\n roomIndex,\n rooms: itemsRef.current?.map((el) => el?.scrollHeight),\n });\n if (scrollHeight >= 0) setScrollEnd(scrollEnd !== scrollHeight ? scrollHeight : scrollEnd + 0.1);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [error]);\n\n const handleAddRoom = () => {\n const { parentNode: { scrollHeight } = {} } = (itemsRef.current?.length > 0 && itemsRef.current[0]) || {};\n if (scrollHeight) setScrollEnd(scrollHeight);\n\n handleChange([...value, prepareRoom(dataSource)]);\n setWithWarning(false);\n };\n\n const handleRemoveRoom = (event, roomIndex, groupValue) => {\n event.stopPropagation();\n scroll(roomIndex, groupValue);\n\n handleChange(value.filter((_, index) => roomIndex !== index));\n itemsRef.current = [];\n setWithWarning(false);\n };\n\n const handleIndividual = (roomIndex, groupIndex, groupValue) => {\n dataSource[groupIndex].fulfill && scroll(roomIndex, groupValue);\n\n const nextValue = [...value];\n nextValue[roomIndex] = [...nextValue[roomIndex]] || [];\n nextValue[roomIndex][groupIndex] = groupValue.amount === 0 ? undefined : groupValue;\n\n handleChange(nextValue);\n setWithWarning(false);\n };\n\n const handleChange = (nextValue) => {\n onChange(nextValue);\n checkRoom(nextValue, dataSource) ? handleValid() : onError(ERROR.NOT_FILLED);\n };\n\n const handleSubmit = () => {\n setWithWarning(false);\n onSubmit(value);\n };\n\n const handleValid = () => {\n setWithError(false);\n onValid();\n };\n\n const scroll = (roomIndex, groupValue) => {\n const scrollHeight = getScrollHeight({\n hasAges: groupValue?.ages?.length > 0,\n roomIndex,\n rooms: itemsRef.current?.map((el) => el?.scrollHeight),\n });\n if (scrollHeight >= 0) setScrollEnd(scrollEnd !== scrollHeight ? scrollHeight : scrollEnd + 0.1);\n };\n\n const { testId } = others;\n const isValid = checkRoom(value, dataSource);\n\n return (\n <View {...others} role=\"occupation\" ref={ref} className={styles(style.container, others.className)}>\n {(withError || withWarning) && (\n <Notification small error={withError} warning={withWarning} className={style.notification}>\n {translate(withError ? L10N.NOTIFICATION_ERROR_UNFILLED_FIELDS : L10N.NOTIFICATION_WARNING_OCCUPATION)}\n </Notification>\n )}\n <ScrollView scrollTo={scrollEnd} snap={false} className={style.scrollview}>\n {value.map((room = [], roomIndex) => (\n <View key={roomIndex} ref={(el) => (itemsRef.current[roomIndex] = el)} wide>\n <View row className={styles(style.header, style.offset)}>\n <Text action>\n {translate({ id: `${L10N.LABEL_PLACE_TYPE_COUNT.id}.${PLACE[type]}` }, { roomIndex: roomIndex + 1 })}\n </Text>\n {value.length > minRooms && (\n <Action\n inline\n preventDefault\n small\n onPress={(event) => handleRemoveRoom(event, roomIndex, room[roomIndex])}\n testId={testId ? `${testId}-remove-room-${roomIndex}` : undefined}\n >\n {translate(L10N.ACTION_REMOVE)}\n </Action>\n )}\n </View>\n {dataSource.map((group, groupIndex) => (\n <OccupationGroup\n {...group}\n error={error}\n key={groupIndex}\n value={room[groupIndex]}\n onChange={(value) => handleIndividual(roomIndex, groupIndex, value)}\n />\n ))}\n </View>\n ))}\n </ScrollView>\n\n <View row className={styles(style.buttons, style.offset)}>\n <Button\n disabled={maxRooms && value.length >= maxRooms}\n preventDefault\n secondary\n className={style.buttonAdd}\n onPress={handleAddRoom}\n testId={testId ? `${testId}-add-room` : undefined}\n >\n {translate({ id: `${L10N.ACTION_ADD_PLACE_TYPE.id}.${PLACE[type]}` })}\n </Button>\n {onSubmit && (\n <Button\n disabled={!isValid}\n className={style.buttonSubmit}\n preventDefault\n onPress={handleSubmit}\n testId={testId ? `${testId}-submit` : undefined}\n >\n {translate(L10N.ACTION_NEXT)}\n </Button>\n )}\n </View>\n </View>\n );\n },\n);\n\nOccupation.displayName = 'Mirai:Finder:Occupation';\n\nOccupation.propTypes = {\n dataSource: PropTypes.arrayOf(SHAPE.DATASOURCE),\n error: PropTypes.bool,\n maxRooms: PropTypes.number,\n minRooms: PropTypes.number,\n type: PropTypes.oneOf(Object.values(ACCOMMODATION_TYPE)),\n value: PropTypes.arrayOf(PropTypes.arrayOf(SHAPE.VALUE)),\n onChange: PropTypes.func,\n onError: PropTypes.func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,EAAEoI,kBAAS,CAACK,KAAK,CAAC1N,MAAM,CAAC2N,MAAM,CAACzI,8BAAkB,CAAC,CAAC;EACxD3C,KAAK,EAAE8K,kBAAS,CAACC,OAAO,CAACD,kBAAS,CAACC,OAAO,CAACC,iBAAK,CAACK,KAAK,CAAC,CAAC;EACxDpI,QAAQ,EAAE6H,kBAAS,CAACQ,IAAI;EACxBnI,OAAO,EAAE2H,kBAAS,CAACQ,IAAI;EACvBlI,QAAQ,EAAE0H,kBAAS,CAACQ,IAAI;EACxBhI,OAAO,EAAEwH,kBAAS,CAACQ;AACrB,CAAC"}
|
|
1
|
+
{"version":3,"file":"Occupation.js","names":["_locale","require","_ui","_propTypes","_interopRequireDefault","_react","_interopRequireWildcard","_helpers","_Occupation","_Occupation2","_Occupation3","style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","_extends","assign","bind","target","arguments","length","source","key","apply","Occupation","exports","React","forwardRef","_ref","ref","dataSource","DATASOURCE","error","maxRooms","minRooms","type","ACCOMMODATION_TYPE","ROOM","value","Array","map","prepareRoom","onChange","onError","onSubmit","onValid","others","translate","useLocale","itemsRef","useRef","scrollEnd","setScrollEnd","useState","withError","setWithError","withWarning","setWithWarning","currentDataSource","setCurrentDataSource","useEffect","JSON","stringify","nextValue","consolidateValue","ERROR","NO_ROOM","checkRoom","handleValid","handleChange","_itemsRef$current","roomIndex","findIndex","room","some","ages","undefined","TYPE","CHILD","age","scrollHeight","getScrollHeight","hasAges","rooms","current","el","handleAddRoom","_itemsRef$current2","parentNode","handleRemoveRoom","event","groupValue","stopPropagation","scroll","filter","_","index","handleIndividual","groupIndex","fulfill","amount","NOT_FILLED","handleSubmit","_groupValue$ages","_itemsRef$current3","testId","isValid","createElement","View","role","className","styles","container","Notification","small","warning","notification","L10N","NOTIFICATION_ERROR_UNFILLED_FIELDS","NOTIFICATION_WARNING_OCCUPATION","ScrollView","scrollTo","snap","scrollview","wide","row","header","offset","Text","action","id","concat","LABEL_PLACE_TYPE_COUNT","PLACE","Action","inline","preventDefault","onPress","ACTION_REMOVE","group","OccupationGroup","buttons","Button","disabled","secondary","buttonAdd","ACTION_ADD_PLACE_TYPE","buttonSubmit","ACTION_NEXT","displayName","propTypes","PropTypes","arrayOf","SHAPE","bool","number","oneOf","values","VALUE","func"],"sources":["../../../../src/components/__shared__/Occupation/Occupation.jsx"],"sourcesContent":["import { useLocale } from '@mirai/locale';\nimport { Action, Button, Notification, ScrollView, Text, View, styles } from '@mirai/ui';\nimport PropTypes from 'prop-types';\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport { checkRoom, consolidateValue, getScrollHeight, prepareRoom } from './helpers';\nimport { TYPE } from './Occupation.constants';\nimport { ACCOMMODATION_TYPE, DATASOURCE, ERROR, PLACE, SHAPE } from './Occupation.constants';\nimport { OccupationGroup } from './Occupation.Group';\nimport { L10N } from './Occupation.l10n';\nimport * as style from './Occupation.module.css';\n\nconst Occupation = React.forwardRef(\n (\n {\n dataSource = DATASOURCE,\n error,\n maxRooms,\n minRooms = 1,\n type = ACCOMMODATION_TYPE.ROOM,\n value = dataSource ? [...Array(minRooms)].map(() => prepareRoom(dataSource || DATASOURCE)) : [],\n onChange = () => {},\n onError = () => {},\n onSubmit,\n onValid = () => {},\n ...others\n },\n ref,\n ) => {\n const { translate } = useLocale();\n const itemsRef = useRef([]);\n\n const [scrollEnd, setScrollEnd] = useState();\n const [withError, setWithError] = useState(error);\n const [withWarning, setWithWarning] = useState(false);\n const [currentDataSource, setCurrentDataSource] = useState([]);\n\n useEffect(() => {\n if (JSON.stringify(dataSource) !== JSON.stringify(currentDataSource)) setWithWarning(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentDataSource, dataSource]);\n\n useEffect(() => {\n let nextValue = consolidateValue(value, dataSource, currentDataSource);\n if (!nextValue) {\n setWithWarning(true);\n onError(ERROR.NO_ROOM);\n nextValue = [prepareRoom(dataSource)];\n } else if (error && checkRoom(nextValue, dataSource)) {\n handleValid();\n }\n if (JSON.stringify(dataSource) !== JSON.stringify(currentDataSource)) setCurrentDataSource(dataSource);\n // ! TODO: Check why doesnt work witn non-hotels\n if (JSON.stringify(nextValue) !== JSON.stringify(value)) handleChange(nextValue);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dataSource, value]);\n\n useEffect(() => {\n setWithError(error);\n const roomIndex = value.findIndex((room) =>\n room.some(({ ages = [], type } = {}) => type === TYPE.CHILD && ages.some((age) => age === undefined)),\n );\n if (roomIndex < 0) return;\n\n const scrollHeight = getScrollHeight({\n hasAges: true,\n roomIndex,\n rooms: itemsRef.current?.map((el) => el?.scrollHeight),\n });\n if (scrollHeight >= 0) setScrollEnd(scrollEnd !== scrollHeight ? scrollHeight : scrollEnd + 0.1);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [error]);\n\n const handleAddRoom = () => {\n const { parentNode: { scrollHeight } = {} } = (itemsRef.current?.length > 0 && itemsRef.current[0]) || {};\n if (scrollHeight) setScrollEnd(scrollHeight);\n\n handleChange([...value, prepareRoom(dataSource)]);\n setWithWarning(false);\n };\n\n const handleRemoveRoom = (event, roomIndex, groupValue) => {\n event.stopPropagation();\n scroll(roomIndex, groupValue);\n\n handleChange(value.filter((_, index) => roomIndex !== index));\n itemsRef.current = [];\n setWithWarning(false);\n };\n\n const handleIndividual = (roomIndex, groupIndex, groupValue) => {\n dataSource[groupIndex].fulfill && scroll(roomIndex, groupValue);\n\n const nextValue = [...value];\n nextValue[roomIndex] = [...nextValue[roomIndex]] || [];\n nextValue[roomIndex][groupIndex] = groupValue.amount === 0 ? undefined : groupValue;\n\n handleChange(nextValue);\n setWithWarning(false);\n };\n\n const handleChange = (nextValue) => {\n onChange(nextValue);\n checkRoom(nextValue, dataSource) ? handleValid() : onError(ERROR.NOT_FILLED);\n };\n\n const handleSubmit = () => {\n setWithWarning(false);\n onSubmit(value);\n };\n\n const handleValid = () => {\n setWithError(false);\n onValid();\n };\n\n const scroll = (roomIndex, groupValue) => {\n const scrollHeight = getScrollHeight({\n hasAges: groupValue?.ages?.length > 0,\n roomIndex,\n rooms: itemsRef.current?.map((el) => el?.scrollHeight),\n });\n if (scrollHeight >= 0) setScrollEnd(scrollEnd !== scrollHeight ? scrollHeight : scrollEnd + 0.1);\n };\n\n const { testId } = others;\n const isValid = checkRoom(value, dataSource);\n\n return (\n <View {...others} role=\"occupation\" ref={ref} className={styles(style.container, others.className)}>\n {(withError || withWarning) && (\n <Notification small error={withError} warning={withWarning} className={style.notification}>\n {translate(withError ? L10N.NOTIFICATION_ERROR_UNFILLED_FIELDS : L10N.NOTIFICATION_WARNING_OCCUPATION)}\n </Notification>\n )}\n <ScrollView scrollTo={scrollEnd} snap={false} className={style.scrollview}>\n {value.map((room = [], roomIndex) => (\n <View key={roomIndex} ref={(el) => (itemsRef.current[roomIndex] = el)} wide>\n <View row className={styles(style.header, style.offset)}>\n <Text action>\n {translate({ id: `${L10N.LABEL_PLACE_TYPE_COUNT.id}.${PLACE[type]}` }, { roomIndex: roomIndex + 1 })}\n </Text>\n {value.length > minRooms && (\n <Action\n inline\n preventDefault\n small\n onPress={(event) => handleRemoveRoom(event, roomIndex, room[roomIndex])}\n testId={testId ? `${testId}-remove-room-${roomIndex}` : undefined}\n >\n {translate(L10N.ACTION_REMOVE)}\n </Action>\n )}\n </View>\n {dataSource.map((group, groupIndex) => (\n <OccupationGroup\n {...group}\n error={error}\n key={groupIndex}\n value={room[groupIndex]}\n onChange={(value) => handleIndividual(roomIndex, groupIndex, value)}\n />\n ))}\n </View>\n ))}\n </ScrollView>\n\n <View row className={styles(style.buttons, style.offset)}>\n <Button\n disabled={maxRooms && value.length >= maxRooms}\n preventDefault\n secondary\n className={style.buttonAdd}\n onPress={handleAddRoom}\n testId={testId ? `${testId}-add-room` : undefined}\n >\n {translate({ id: `${L10N.ACTION_ADD_PLACE_TYPE.id}.${PLACE[type]}` })}\n </Button>\n {onSubmit && (\n <Button\n disabled={!isValid}\n className={style.buttonSubmit}\n preventDefault\n onPress={handleSubmit}\n testId={testId ? `${testId}-submit` : undefined}\n >\n {translate(L10N.ACTION_NEXT)}\n </Button>\n )}\n </View>\n </View>\n );\n },\n);\n\nOccupation.displayName = 'Mirai:Finder:Occupation';\n\nOccupation.propTypes = {\n dataSource: PropTypes.arrayOf(SHAPE.DATASOURCE),\n error: PropTypes.bool,\n maxRooms: PropTypes.number,\n minRooms: PropTypes.number,\n type: PropTypes.oneOf(Object.values(ACCOMMODATION_TYPE)),\n value: PropTypes.arrayOf(PropTypes.arrayOf(SHAPE.VALUE)),\n onChange: PropTypes.func,\n onError: PropTypes.func,\n onSubmit: PropTypes.func,\n onValid: PropTypes.func,\n};\n\nexport { Occupation };\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAC,uBAAA,CAAAL,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAEA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,YAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAL,uBAAA,CAAAL,OAAA;AAAiD,SAAAW,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAA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AAG,CAAC,CAC9D,CAAC,EACRS,QAAQ,iBACP1D,MAAA,CAAAa,OAAA,CAAA4G,aAAA,CAAC5H,GAAA,CAAA+J,MAAM;IACLC,QAAQ,EAAE,CAACrC,OAAQ;IACnBI,SAAS,EAAEtH,KAAK,CAAC2J,YAAa;IAC9BX,cAAc;IACdC,OAAO,EAAEnC,YAAa;IACtBG,MAAM,EAAEA,MAAM,MAAA0B,MAAA,CAAM1B,MAAM,eAAY7B;EAAU,GAE/C7B,SAAS,CAACsE,iBAAI,CAAC+B,WAAW,CACrB,CAEN,CACF,CAAC;AAEX,CACF,CAAC;AAED5H,UAAU,CAAC6H,WAAW,GAAG,yBAAyB;AAElD7H,UAAU,CAAC8H,SAAS,GAAG;EACrBxH,UAAU,EAAEyH,kBAAS,CAACC,OAAO,CAACC,iBAAK,CAAC1H,UAAU,CAAC;EAC/CC,KAAK,EAAEuH,kBAAS,CAACG,IAAI;EACrBzH,QAAQ,EAAEsH,kBAAS,CAACI,MAAM;EAC1BzH,QAAQ,EAAEqH,kBAAS,CAACI,MAAM;EAC1BxH,IAAI,EAAEoH,kBAAS,CAACK,KAAK,CAACvJ,MAAM,CAACwJ,MAAM,CAACzH,8BAAkB,CAAC,CAAC;EACxDE,KAAK,EAAEiH,kBAAS,CAACC,OAAO,CAACD,kBAAS,CAACC,OAAO,CAACC,iBAAK,CAACK,KAAK,CAAC,CAAC;EACxDpH,QAAQ,EAAE6G,kBAAS,CAACQ,IAAI;EACxBpH,OAAO,EAAE4G,kBAAS,CAACQ,IAAI;EACvBnH,QAAQ,EAAE2G,kBAAS,CAACQ,IAAI;EACxBlH,OAAO,EAAE0G,kBAAS,CAACQ;AACrB,CAAC"}
|
|
@@ -5,15 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.L10N = void 0;
|
|
7
7
|
var _Occupation = require("./Occupation.constants");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
CHILD = _Occupation.TYPE.CHILD,
|
|
15
|
-
GUEST = _Occupation.TYPE.GUEST;
|
|
16
|
-
var L10N = exports.L10N = {
|
|
8
|
+
const {
|
|
9
|
+
ADULT,
|
|
10
|
+
CHILD,
|
|
11
|
+
GUEST
|
|
12
|
+
} = _Occupation.TYPE;
|
|
13
|
+
const L10N = exports.L10N = {
|
|
17
14
|
ACTION_ADD_PLACE_TYPE: {
|
|
18
15
|
id: 'finder.action.add_place_type'
|
|
19
16
|
},
|
|
@@ -39,13 +36,18 @@ var L10N = exports.L10N = {
|
|
|
39
36
|
LABEL_AGE_UP_TO: {
|
|
40
37
|
id: 'common.label.age_up_to'
|
|
41
38
|
},
|
|
42
|
-
LABEL_OCCUPATION_TYPE:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
39
|
+
LABEL_OCCUPATION_TYPE: {
|
|
40
|
+
// ! TODO: Should bind type
|
|
41
|
+
[ADULT]: {
|
|
42
|
+
id: 'finder.label.occupation_type_adult'
|
|
43
|
+
},
|
|
44
|
+
[CHILD]: {
|
|
45
|
+
id: 'finder.label.occupation_type_child'
|
|
46
|
+
},
|
|
47
|
+
[GUEST]: {
|
|
48
|
+
id: 'finder.label.occupation_type_guest'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
49
51
|
LABEL_PLACE_TYPE: {
|
|
50
52
|
id: 'finder.label.place_type'
|
|
51
53
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Occupation.l10n.js","names":["_Occupation","require","
|
|
1
|
+
{"version":3,"file":"Occupation.l10n.js","names":["_Occupation","require","ADULT","CHILD","GUEST","TYPE","L10N","exports","ACTION_ADD_PLACE_TYPE","id","ACTION_NEXT","ACTION_REMOVE","LABEL_AGE","LABEL_AGE_FROM","LABEL_AGE_HINT","LABEL_AGE_RANGE","LABEL_AGE_UP_TO","LABEL_OCCUPATION_TYPE","LABEL_PLACE_TYPE","LABEL_PLACE_TYPE_COUNT","NOTIFICATION_ERROR_UNFILLED_FIELDS","NOTIFICATION_WARNING_OCCUPATION"],"sources":["../../../../src/components/__shared__/Occupation/Occupation.l10n.js"],"sourcesContent":["import { TYPE } from './Occupation.constants';\n\nconst { ADULT, CHILD, GUEST } = TYPE;\n\nexport const L10N = {\n ACTION_ADD_PLACE_TYPE: { id: 'finder.action.add_place_type' }, // ! TODO: Should bind type\n ACTION_NEXT: { id: 'finder.action.next' },\n ACTION_REMOVE: { id: 'finder.action.remove' },\n\n LABEL_AGE: { id: 'common.label.age' },\n LABEL_AGE_FROM: { id: 'common.label.age_from' },\n LABEL_AGE_HINT: { id: 'common.label.age_hint' },\n LABEL_AGE_RANGE: { id: 'common.label.age_range' },\n LABEL_AGE_UP_TO: { id: 'common.label.age_up_to' },\n LABEL_OCCUPATION_TYPE: {\n // ! TODO: Should bind type\n [ADULT]: { id: 'finder.label.occupation_type_adult' },\n [CHILD]: { id: 'finder.label.occupation_type_child' },\n [GUEST]: { id: 'finder.label.occupation_type_guest' },\n },\n LABEL_PLACE_TYPE: { id: 'finder.label.place_type' }, // ! TODO: Should bind type\n LABEL_PLACE_TYPE_COUNT: { id: 'finder.label.place_type_count' }, // ! TODO: Should bind type\n\n NOTIFICATION_ERROR_UNFILLED_FIELDS: { id: 'common.notification.error_unfilled_fields' },\n NOTIFICATION_WARNING_OCCUPATION: { id: 'finder.notification.warning_occupation' },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEA,MAAM;EAAEC,KAAK;EAAEC,KAAK;EAAEC;AAAM,CAAC,GAAGC,gBAAI;AAE7B,MAAMC,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAG;EAClBE,qBAAqB,EAAE;IAAEC,EAAE,EAAE;EAA+B,CAAC;EAAE;EAC/DC,WAAW,EAAE;IAAED,EAAE,EAAE;EAAqB,CAAC;EACzCE,aAAa,EAAE;IAAEF,EAAE,EAAE;EAAuB,CAAC;EAE7CG,SAAS,EAAE;IAAEH,EAAE,EAAE;EAAmB,CAAC;EACrCI,cAAc,EAAE;IAAEJ,EAAE,EAAE;EAAwB,CAAC;EAC/CK,cAAc,EAAE;IAAEL,EAAE,EAAE;EAAwB,CAAC;EAC/CM,eAAe,EAAE;IAAEN,EAAE,EAAE;EAAyB,CAAC;EACjDO,eAAe,EAAE;IAAEP,EAAE,EAAE;EAAyB,CAAC;EACjDQ,qBAAqB,EAAE;IACrB;IACA,CAACf,KAAK,GAAG;MAAEO,EAAE,EAAE;IAAqC,CAAC;IACrD,CAACN,KAAK,GAAG;MAAEM,EAAE,EAAE;IAAqC,CAAC;IACrD,CAACL,KAAK,GAAG;MAAEK,EAAE,EAAE;IAAqC;EACtD,CAAC;EACDS,gBAAgB,EAAE;IAAET,EAAE,EAAE;EAA0B,CAAC;EAAE;EACrDU,sBAAsB,EAAE;IAAEV,EAAE,EAAE;EAAgC,CAAC;EAAE;;EAEjEW,kCAAkC,EAAE;IAAEX,EAAE,EAAE;EAA4C,CAAC;EACvFY,+BAA+B,EAAE;IAAEZ,EAAE,EAAE;EAAyC;AAClF,CAAC"}
|
package/build/components/__shared__/Occupation/__tests__/__snapshots__/Occupation.test.js.snap
CHANGED
|
@@ -22,7 +22,7 @@ exports[` 1`] = `
|
|
|
22
22
|
xmlns="http://www.w3.org/2000/svg"
|
|
23
23
|
>
|
|
24
24
|
<path
|
|
25
|
-
d="M12 5.
|
|
25
|
+
d="M12 5.99 19.53 19H4.47L12 5.99M12 2 1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
|
|
26
26
|
/>
|
|
27
27
|
</svg>
|
|
28
28
|
</span>
|
|
@@ -346,7 +346,7 @@ exports[` 1`] = `
|
|
|
346
346
|
opacity=".87"
|
|
347
347
|
/>
|
|
348
348
|
<path
|
|
349
|
-
d="M16.59 8.
|
|
349
|
+
d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
|
|
350
350
|
/>
|
|
351
351
|
</svg>
|
|
352
352
|
</span>
|
|
@@ -480,7 +480,7 @@ exports[` 1`] = `
|
|
|
480
480
|
opacity=".87"
|
|
481
481
|
/>
|
|
482
482
|
<path
|
|
483
|
-
d="M16.59 8.
|
|
483
|
+
d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
|
|
484
484
|
/>
|
|
485
485
|
</svg>
|
|
486
486
|
</span>
|
|
@@ -2193,7 +2193,7 @@ exports[`component:<Occupation> prop:value prop:error 1`] = `
|
|
|
2193
2193
|
opacity=".87"
|
|
2194
2194
|
/>
|
|
2195
2195
|
<path
|
|
2196
|
-
d="M16.59 8.
|
|
2196
|
+
d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
|
|
2197
2197
|
/>
|
|
2198
2198
|
</svg>
|
|
2199
2199
|
</span>
|
|
@@ -2327,7 +2327,7 @@ exports[`component:<Occupation> prop:value prop:error 1`] = `
|
|
|
2327
2327
|
opacity=".87"
|
|
2328
2328
|
/>
|
|
2329
2329
|
<path
|
|
2330
|
-
d="M16.59 8.
|
|
2330
|
+
d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
|
|
2331
2331
|
/>
|
|
2332
2332
|
</svg>
|
|
2333
2333
|
</span>
|
|
@@ -2855,7 +2855,7 @@ exports[`component:<Occupation> removing a room 1`] = `
|
|
|
2855
2855
|
opacity=".87"
|
|
2856
2856
|
/>
|
|
2857
2857
|
<path
|
|
2858
|
-
d="M16.59 8.
|
|
2858
|
+
d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
|
|
2859
2859
|
/>
|
|
2860
2860
|
</svg>
|
|
2861
2861
|
</span>
|
|
@@ -2989,7 +2989,7 @@ exports[`component:<Occupation> removing a room 1`] = `
|
|
|
2989
2989
|
opacity=".87"
|
|
2990
2990
|
/>
|
|
2991
2991
|
<path
|
|
2992
|
-
d="M16.59 8.
|
|
2992
|
+
d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
|
|
2993
2993
|
/>
|
|
2994
2994
|
</svg>
|
|
2995
2995
|
</span>
|
|
@@ -4,33 +4,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.checkRoom = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const checkRoom = function () {
|
|
8
|
+
let rooms = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
9
|
+
let dataSource = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
10
10
|
if (!rooms.length || !dataSource.length) return false;
|
|
11
|
-
|
|
11
|
+
let valid = true;
|
|
12
12
|
rooms.every(function () {
|
|
13
|
-
|
|
14
|
-
room.filter(function (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
let room = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
14
|
+
room.filter(individual => !!individual).every(function () {
|
|
15
|
+
let {
|
|
16
|
+
ages = [],
|
|
17
|
+
type: key
|
|
18
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
19
|
+
const found = dataSource.find(_ref => {
|
|
20
|
+
let {
|
|
21
|
+
type
|
|
22
|
+
} = _ref;
|
|
23
23
|
return parseInt(key) === type;
|
|
24
24
|
});
|
|
25
|
-
|
|
26
|
-
fulfill
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}).length) valid = false;
|
|
25
|
+
const {
|
|
26
|
+
fulfill
|
|
27
|
+
} = found || {};
|
|
28
|
+
if (!found || fulfill && ages.filter(age => age === undefined).length) valid = false;
|
|
30
29
|
return valid;
|
|
31
30
|
});
|
|
32
31
|
return valid;
|
|
33
32
|
});
|
|
34
33
|
return valid;
|
|
35
34
|
};
|
|
35
|
+
exports.checkRoom = checkRoom;
|
|
36
36
|
//# sourceMappingURL=checkRoom.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkRoom.js","names":["checkRoom","
|
|
1
|
+
{"version":3,"file":"checkRoom.js","names":["checkRoom","rooms","arguments","length","undefined","dataSource","valid","every","room","filter","individual","ages","type","key","found","find","_ref","parseInt","fulfill","age","exports"],"sources":["../../../../../src/components/__shared__/Occupation/helpers/checkRoom.js"],"sourcesContent":["export const checkRoom = (rooms = [], dataSource = []) => {\n if (!rooms.length || !dataSource.length) return false;\n\n let valid = true;\n\n rooms.every((room = []) => {\n room\n .filter((individual) => !!individual)\n .every(({ ages = [], type: key } = {}) => {\n const found = dataSource.find(({ type }) => parseInt(key) === type);\n const { fulfill } = found || {};\n\n if (!found || (fulfill && ages.filter((age) => age === undefined).length)) valid = false;\n return valid;\n });\n\n return valid;\n });\n\n return valid;\n};\n"],"mappings":";;;;;;AAAO,MAAMA,SAAS,GAAG,SAAAA,CAAA,EAAiC;EAAA,IAAhCC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IAAEG,UAAU,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EACnD,IAAI,CAACD,KAAK,CAACE,MAAM,IAAI,CAACE,UAAU,CAACF,MAAM,EAAE,OAAO,KAAK;EAErD,IAAIG,KAAK,GAAG,IAAI;EAEhBL,KAAK,CAACM,KAAK,CAAC,YAAe;IAAA,IAAdC,IAAI,GAAAN,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IACpBM,IAAI,CACDC,MAAM,CAAEC,UAAU,IAAK,CAAC,CAACA,UAAU,CAAC,CACpCH,KAAK,CAAC,YAAmC;MAAA,IAAlC;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